docs: 仓库链接指向本镜像仓库
Dev Build / cleanup (push) Waiting to run
Dev Build / typecheck (push) Waiting to run

This commit is contained in:
TanTan committed 2026-11-13 09:27:07 +08:00
1 parent fa9c73363d
commit 2a69b23b47
18210 files changed
+5101211 -16

No files matched your search

@@ -0,0 +1 @@
{"version":3,"file":"omega.js","sources":["../../../src/icons/omega.ts"],"sourcesContent":["import createLucideIcon from '../createLucideIcon';\n\n/**\n * @component @name Omega\n * @description Lucide SVG icon component, renders SVG Element with children.\n *\n * @preview ![img](data:image/svg+xml;base64,PHN2ZyAgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIgogIHdpZHRoPSIyNCIKICBoZWlnaHQ9IjI0IgogIHZpZXdCb3g9IjAgMCAyNCAyNCIKICBmaWxsPSJub25lIgogIHN0cm9rZT0iIzAwMCIgc3R5bGU9ImJhY2tncm91bmQtY29sb3I6ICNmZmY7IGJvcmRlci1yYWRpdXM6IDJweCIKICBzdHJva2Utd2lkdGg9IjIiCiAgc3Ryb2tlLWxpbmVjYXA9InJvdW5kIgogIHN0cm9rZS1saW5lam9pbj0icm91bmQiCj4KICA8cGF0aCBkPSJNMyAyMGg0LjVhLjUuNSAwIDAgMCAuNS0uNXYtLjI4MmEuNTIuNTIgMCAwIDAtLjI0Ny0uNDM3IDggOCAwIDEgMSA4LjQ5NC0uMDAxLjUyLjUyIDAgMCAwLS4yNDcuNDM4di4yODJhLjUuNSAwIDAgMCAuNS41SDIxIiAvPgo8L3N2Zz4K) - https://lucide.dev/icons/omega\n * @see https://lucide.dev/guide/packages/lucide-react - Documentation\n *\n * @param {Object} props - Lucide icons props and any valid SVG attribute\n * @returns {JSX.Element} JSX Element\n *\n */\nconst Omega = createLucideIcon('Omega', [\n [\n 'path',\n {\n d: 'M3 20h4.5a.5.5 0 0 0 .5-.5v-.282a.52.52 0 0 0-.247-.437 8 8 0 1 1 8.494-.001.52.52 0 0 0-.247.438v.282a.5.5 0 0 0 .5.5H21',\n key: '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,CACP,CAAA,CAAA,CAAA,CAAA;AAAA,CACF,CAAA,CAAA;AACF,CAAC,CAAA,CAAA;;"}
@@ -0,0 +1 @@
{"version":3,"file":"package-plus.js","sources":["../../../src/icons/package-plus.ts"],"sourcesContent":["import createLucideIcon from '../createLucideIcon';\n\n/**\n * @component @name PackagePlus\n * @description Lucide SVG icon component, renders SVG Element with children.\n *\n * @preview ![img](data:image/svg+xml;base64,PHN2ZyAgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIgogIHdpZHRoPSIyNCIKICBoZWlnaHQ9IjI0IgogIHZpZXdCb3g9IjAgMCAyNCAyNCIKICBmaWxsPSJub25lIgogIHN0cm9rZT0iIzAwMCIgc3R5bGU9ImJhY2tncm91bmQtY29sb3I6ICNmZmY7IGJvcmRlci1yYWRpdXM6IDJweCIKICBzdHJva2Utd2lkdGg9IjIiCiAgc3Ryb2tlLWxpbmVjYXA9InJvdW5kIgogIHN0cm9rZS1saW5lam9pbj0icm91bmQiCj4KICA8cGF0aCBkPSJNMTYgMTZoNiIgLz4KICA8cGF0aCBkPSJNMTkgMTN2NiIgLz4KICA8cGF0aCBkPSJNMjEgMTBWOGEyIDIgMCAwIDAtMS0xLjczbC03LTRhMiAyIDAgMCAwLTIgMGwtNyA0QTIgMiAwIDAgMCAzIDh2OGEyIDIgMCAwIDAgMSAxLjczbDcgNGEyIDIgMCAwIDAgMiAwbDItMS4xNCIgLz4KICA8cGF0aCBkPSJtNy41IDQuMjcgOSA1LjE1IiAvPgogIDxwb2x5bGluZSBwb2ludHM9IjMuMjkgNyAxMiAxMiAyMC43MSA3IiAvPgogIDxsaW5lIHgxPSIxMiIgeDI9IjEyIiB5MT0iMjIiIHkyPSIxMiIgLz4KPC9zdmc+Cg==) - https://lucide.dev/icons/package-plus\n * @see https://lucide.dev/guide/packages/lucide-react - Documentation\n *\n * @param {Object} props - Lucide icons props and any valid SVG attribute\n * @returns {JSX.Element} JSX Element\n *\n */\nconst PackagePlus = createLucideIcon('PackagePlus', [\n ['path', { d: 'M16 16h6', key: '100bgy' }],\n ['path', { d: 'M19 13v6', key: '85cyf1' }],\n [\n 'path',\n {\n d: 'M21 10V8a2 2 0 0 0-1-1.73l-7-4a2 2 0 0 0-2 0l-7 4A2 2 0 0 0 3 8v8a2 2 0 0 0 1 1.73l7 4a2 2 0 0 0 2 0l2-1.14',\n key: 'e7tb2h',\n },\n ],\n ['path', { d: 'm7.5 4.27 9 5.15', key: '1c824w' }],\n ['polyline', { points: '3.29 7 12 12 20.71 7', key: 'ousv84' }],\n ['line', { x1: '12', x2: '12', y1: '22', y2: '12', key: 'a4e8g8' }],\n]);\n\nexport default PackagePlus;\n"],"names":[],"mappings":";;;;;;;;;AAaM,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAc,iBAAiB,aAAe,CAAA,CAAA,CAAA;AAAA,CAAA,CAClD,CAAC,CAAA,CAAA,CAAA,CAAA,CAAA,CAAQ,CAAA,CAAA,CAAA,CAAE,GAAG,CAAY,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAK,UAAU,CAAA,CAAA;AAAA,CAAA,CACzC,CAAC,CAAA,CAAA,CAAA,CAAA,CAAA,CAAQ,CAAA,CAAA,CAAA,CAAE,GAAG,CAAY,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAK,UAAU,CAAA,CAAA;AAAA,CACzC,CAAA,CAAA;AAAA,CAAA,CAAA,CAAA,CACE,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA;AAAA,CACA,CAAA,CAAA,CAAA,CAAA;AAAA,CACE,CAAA,CAAA,CAAA,CAAA,CAAA,CAAG,EAAA,CAAA,CAAA,CAA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AA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAK,UAAU,CAAA,CAAA;AAAA,CAC9D,CAAA,CAAC,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAQ,CAAE,CAAA,CAAA,CAAA,EAAI,CAAM,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAI,CAAM,CAAA,CAAA,CAAA,CAAA,CAAA,EAAA,CAAI,CAAA,CAAA,CAAA,CAAA,CAAM,CAAA,CAAA,CAAA,CAAA,CAAI,CAAA,CAAA,CAAA,CAAA,CAAM,EAAA,CAAA,CAAA,CAAA,CAAA,CAAK,UAAU,CAAA;AACpE,CAAC,CAAA,CAAA;;"}
@@ -0,0 +1,18 @@
/**
* @license lucide-react v0.469.0 - ISC
*
* This source code is licensed under the ISC license.
* See the LICENSE file in the root directory of this source tree.
*/
import createLucideIcon from '../createLucideIcon.js';
const RefreshCcw = createLucideIcon("RefreshCcw", [
["path", { d: "M21 12a9 9 0 0 0-9-9 9.75 9.75 0 0 0-6.74 2.74L3 8", key: "14sxne" }],
["path", { d: "M3 3v5h5", key: "1xhq8a" }],
["path", { d: "M3 12a9 9 0 0 0 9 9 9.75 9.75 0 0 0 6.74-2.74L21 16", key: "1hlbsb" }],
["path", { d: "M16 16h5v5", key: "ccwih5" }]
]);
export { RefreshCcw as default };
//# sourceMappingURL=refresh-ccw.js.map
@@ -0,0 +1 @@
{"version":3,"file":"pen-square.js","sources":[],"sourcesContent":[],"names":[],"mappings":";;;;;;;"}
@@ -0,0 +1,735 @@
import { loadRouteChunk } from './load-matches.js';
import { LRUCache } from './lru-cache.js';
import { ProcessRouteTreeResult, ProcessedTree } from './new-process-route-tree.js';
import { SearchParser, SearchSerializer } from './searchParams.js';
import { AnyRedirect, ResolvedRedirect } from './redirect.js';
import { HistoryLocation, HistoryState, ParsedHistoryState, RouterHistory } from '@tanstack/history';
import { Awaitable, Constrain, ControlledPromise, NoInfer, NonNullableUpdater, PickAsRequired, Updater } from './utils.js';
import { ParsedLocation } from './location.js';
import { AnyContext, AnyRoute, AnyRouteWithContext, LoaderStaleReloadMode, MakeRemountDepsOptionsUnion, RouteLike, RouteMask } from './route.js';
import { FullSearchSchema, RouteById, RoutePaths, RoutesById, RoutesByPath } from './routeInfo.js';
import { AnyRouteMatch, MakeRouteMatchUnion, MatchRouteOptions } from './Matches.js';
import { BuildLocationFn, CommitLocationOptions, NavigateFn } from './RouterProvider.js';
import { Manifest, RouterManagedTag } from './manifest.js';
import { AnySchema } from './validators.js';
import { NavigateOptions, ResolveRelativePath, ToOptions } from './link.js';
import { AnySerializationAdapter, ValidateSerializableInput } from './ssr/serializer/transformer.js';
import { GetStoreConfig, RouterStores } from './stores.js';
export type ControllablePromise<T = any> = Promise<T> & {
resolve: (value: T) => void;
reject: (value?: any) => void;
};
export type InjectedHtmlEntry = Promise<string>;
export interface Register {
}
export type RegisteredSsr<TRegister = Register> = TRegister extends {
ssr: infer TSSR;
} ? TSSR : false;
export type RegisteredRouter<TRegister = Register> = TRegister extends {
router: infer TRouter;
} ? TRouter : AnyRouter;
export type RegisteredConfigType<TRegister, TKey> = TRegister extends {
config: infer TConfig;
} ? TConfig extends {
'~types': infer TTypes;
} ? TKey extends keyof TTypes ? TTypes[TKey] : unknown : unknown : unknown;
export type DefaultRemountDepsFn<TRouteTree extends AnyRoute> = (opts: MakeRemountDepsOptionsUnion<TRouteTree>) => any;
export interface DefaultRouterOptionsExtensions {
}
export interface RouterOptionsExtensions extends DefaultRouterOptionsExtensions {
}
export type SSROption = boolean | 'data-only';
export interface RouterOptions<TRouteTree extends AnyRoute, TTrailingSlashOption extends TrailingSlashOption, TDefaultStructuralSharingOption extends boolean = false, TRouterHistory extends RouterHistory = RouterHistory, TDehydrated = undefined> extends RouterOptionsExtensions {
/**
* The history object that will be used to manage the browser history.
*
* If not provided, a new createBrowserHistory instance will be created and used.
*
* @link [API Docs](https://tanstack.com/router/latest/docs/framework/react/api/router/RouterOptionsType#history-property)
* @link [Guide](https://tanstack.com/router/latest/docs/framework/react/guide/history-types)
*/
history?: TRouterHistory;
/**
* A function that will be used to stringify search params when generating links.
*
* @default defaultStringifySearch
* @link [API Docs](https://tanstack.com/router/latest/docs/framework/react/api/router/RouterOptionsType#stringifysearch-method)
* @link [Guide](https://tanstack.com/router/latest/docs/framework/react/guide/custom-search-param-serialization)
*/
stringifySearch?: SearchSerializer;
/**
* A function that will be used to parse search params when parsing the current location.
*
* @default defaultParseSearch
* @link [API Docs](https://tanstack.com/router/latest/docs/framework/react/api/router/RouterOptionsType#parsesearch-method)
* @link [Guide](https://tanstack.com/router/latest/docs/framework/react/guide/custom-search-param-serialization)
*/
parseSearch?: SearchParser;
/**
* If `false`, routes will not be preloaded by default in any way.
*
* If `'intent'`, routes will be preloaded by default when the user hovers over a link or a `touchstart` event is detected on a `<Link>`.
*
* If `'viewport'`, routes will be preloaded by default when they are within the viewport.
*
* @default false
* @link [API Docs](https://tanstack.com/router/latest/docs/framework/react/api/router/RouterOptionsType#defaultpreload-property)
* @link [Guide](https://tanstack.com/router/latest/docs/framework/react/guide/preloading)
*/
defaultPreload?: false | 'intent' | 'viewport' | 'render';
/**
* The delay in milliseconds that a route must be hovered over or touched before it is preloaded.
*
* @default 50
* @link [API Docs](https://tanstack.com/router/latest/docs/framework/react/api/router/RouterOptionsType#defaultpreloaddelay-property)
* @link [Guide](https://tanstack.com/router/latest/docs/framework/react/guide/preloading#preload-delay)
*/
defaultPreloadDelay?: number;
/**
* The default `preloadIntentProximity` a route should use if no preloadIntentProximity is provided.
*
* @default 0
* @link [API Docs](https://tanstack.com/router/latest/docs/framework/react/api/router/RouterOptionsType#defaultpreloadintentproximity-property)
* @link [Guide](https://tanstack.com/router/latest/docs/framework/react/guide/preloading#preload-intent-proximity)
*/
defaultPreloadIntentProximity?: number;
/**
* The default `pendingMs` a route should use if no pendingMs is provided.
*
* @default 1000
* @link [API Docs](https://tanstack.com/router/latest/docs/framework/react/api/router/RouterOptionsType#defaultpendingms-property)
* @link [Guide](https://tanstack.com/router/latest/docs/framework/react/guide/data-loading#avoiding-pending-component-flash)
*/
defaultPendingMs?: number;
/**
* The default `pendingMinMs` a route should use if no pendingMinMs is provided.
*
* @default 500
* @link [API Docs](https://tanstack.com/router/latest/docs/framework/react/api/router/RouterOptionsType#defaultpendingminms-property)
* @link [Guide](https://tanstack.com/router/latest/docs/framework/react/guide/data-loading#avoiding-pending-component-flash)
*/
defaultPendingMinMs?: number;
/**
* The default `staleTime` a route should use if no staleTime is provided. This is the time in milliseconds that a route will be considered fresh.
*
* @default 0
* @link [API Docs](https://tanstack.com/router/latest/docs/framework/react/api/router/RouterOptionsType#defaultstaletime-property)
* @link [Guide](https://tanstack.com/router/latest/docs/framework/react/guide/data-loading#key-options)
*/
defaultStaleTime?: number;
/**
* The default stale reload mode a route loader should use if no `loader.staleReloadMode` is provided.
*
* `'background'` preserves the current stale-while-revalidate behavior.
* `'blocking'` waits for stale loader reloads to complete before resolving navigation.
*
* @default 'background'
*/
defaultStaleReloadMode?: LoaderStaleReloadMode;
/**
* The default `preloadStaleTime` a route should use if no preloadStaleTime is provided.
*
* @default 30_000 `(30 seconds)`
* @link [API Docs](https://tanstack.com/router/latest/docs/framework/react/api/router/RouterOptionsType#defaultpreloadstaletime-property)
* @link [Guide](https://tanstack.com/router/latest/docs/framework/react/guide/preloading)
*/
defaultPreloadStaleTime?: number;
/**
* The default `defaultPreloadGcTime` a route should use if no preloadGcTime is provided.
*
* @default 1_800_000 `(30 minutes)`
* @link [API Docs](https://tanstack.com/router/latest/docs/framework/react/api/router/RouterOptionsType#defaultpreloadgctime-property)
* @link [Guide](https://tanstack.com/router/latest/docs/framework/react/guide/preloading)
*/
defaultPreloadGcTime?: number;
/**
* If `true`, route navigations will called using `document.startViewTransition()`.
*
* If the browser does not support this api, this option will be ignored.
*
* See [MDN](https://developer.mozilla.org/en-US/docs/Web/API/Document/startViewTransition) for more information on how this function works.
*
* @link [API Docs](https://tanstack.com/router/latest/docs/framework/react/api/router/RouterOptionsType#defaultviewtransition-property)
*/
defaultViewTransition?: boolean | ViewTransitionOptions;
/**
* The default `hashScrollIntoView` a route should use if no hashScrollIntoView is provided while navigating
*
* See [MDN](https://developer.mozilla.org/en-US/docs/Web/API/Element/scrollIntoView) for more information on `ScrollIntoViewOptions`.
*
* @link [API Docs](https://tanstack.com/router/latest/docs/framework/react/api/router/RouterOptionsType#defaulthashscrollintoview-property)
*/
defaultHashScrollIntoView?: boolean | ScrollIntoViewOptions;
/**
* @default 'fuzzy'
* @link [API Docs](https://tanstack.com/router/latest/docs/framework/react/api/router/RouterOptionsType#notfoundmode-property)
* @link [Guide](https://tanstack.com/router/latest/docs/framework/react/guide/not-found-errors#the-notfoundmode-option)
*/
notFoundMode?: 'root' | 'fuzzy';
/**
* The default `gcTime` a route should use if no gcTime is provided.
*
* @default 1_800_000 `(30 minutes)`
* @link [API Docs](https://tanstack.com/router/latest/docs/framework/react/api/router/RouterOptionsType#defaultgctime-property)
* @link [Guide](https://tanstack.com/router/latest/docs/framework/react/guide/data-loading#key-options)
*/
defaultGcTime?: number;
/**
* If `true`, all routes will be matched as case-sensitive.
*
* @default false
* @link [API Docs](https://tanstack.com/router/latest/docs/framework/react/api/router/RouterOptionsType#casesensitive-property)
*/
caseSensitive?: boolean;
/**
*
* The route tree that will be used to configure the router instance.
*
* @link [API Docs](https://tanstack.com/router/latest/docs/framework/react/api/router/RouterOptionsType#routetree-property)
* @link [Guide](https://tanstack.com/router/latest/docs/framework/react/routing/route-trees)
*/
routeTree?: TRouteTree;
/**
* The basepath for then entire router. This is useful for mounting a router instance at a subpath.
* ```
* @default '/'
* @link [API Docs](https://tanstack.com/router/latest/docs/framework/react/api/router/RouterOptionsType#basepath-property)
*/
basepath?: string;
/**
* The root context that will be provided to all routes in the route tree.
*
* This can be used to provide a context to all routes in the tree without having to provide it to each route individually.
*
* Optional or required if the root route was created with [`createRootRouteWithContext()`](https://tanstack.com/router/latest/docs/framework/react/api/router/createRootRouteWithContextFunction).
*
* @link [API Docs](https://tanstack.com/router/latest/docs/framework/react/api/router/RouterOptionsType#context-property)
* @link [Guide](https://tanstack.com/router/latest/docs/framework/react/guide/router-context)
*/
context?: InferRouterContext<TRouteTree>;
additionalContext?: any;
/**
* A function that will be called when the router is dehydrated.
*
* The return value of this function will be serialized and stored in the router's dehydrated state.
*
* @link [API Docs](https://tanstack.com/router/latest/docs/framework/react/api/router/RouterOptionsType#dehydrate-method)
* @link [Guide](https://tanstack.com/router/latest/docs/framework/react/guide/external-data-loading#critical-dehydrationhydration)
*/
dehydrate?: () => Constrain<TDehydrated, ValidateSerializableInput<Register, TDehydrated>>;
/**
* A function that will be called when the router is hydrated.
*
* @link [API Docs](https://tanstack.com/router/latest/docs/framework/react/api/router/RouterOptionsType#hydrate-method)
* @link [Guide](https://tanstack.com/router/latest/docs/framework/react/guide/external-data-loading#critical-dehydrationhydration)
*/
hydrate?: (dehydrated: TDehydrated) => Awaitable<void>;
/**
* An array of route masks that will be used to mask routes in the route tree.
*
* Route masking is when you display a route at a different path than the one it is configured to match, like a modal popup that when shared will unmask to the modal's content instead of the modal's context.
*
* @link [API Docs](https://tanstack.com/router/latest/docs/framework/react/api/router/RouterOptionsType#routemasks-property)
* @link [Guide](https://tanstack.com/router/latest/docs/framework/react/guide/route-masking)
*/
routeMasks?: Array<RouteMask<TRouteTree>>;
/**
* If `true`, route masks will, by default, be removed when the page is reloaded.
*
* This can be overridden on a per-mask basis by setting the `unmaskOnReload` option on the mask, or on a per-navigation basis by setting the `unmaskOnReload` option in the `Navigate` options.
*
* @default false
* @link [API Docs](https://tanstack.com/router/latest/docs/framework/react/api/router/RouterOptionsType#unmaskonreload-property)
* @link [Guide](https://tanstack.com/router/latest/docs/framework/react/guide/route-masking#unmasking-on-page-reload)
*/
unmaskOnReload?: boolean;
/**
* Use `notFoundComponent` instead.
*
* @deprecated
* See https://tanstack.com/router/v1/docs/guide/not-found-errors#migrating-from-notfoundroute for more info.
* @link [API Docs](https://tanstack.com/router/latest/docs/framework/react/api/router/RouterOptionsType#notfoundroute-property)
*/
notFoundRoute?: AnyRoute;
/**
* Configures how trailing slashes are treated.
*
* - `'always'` will add a trailing slash if not present
* - `'never'` will remove the trailing slash if present
* - `'preserve'` will not modify the trailing slash.
*
* @default 'never'
* @link [API Docs](https://tanstack.com/router/latest/docs/framework/react/api/router/RouterOptionsType#trailingslash-property)
*/
trailingSlash?: TTrailingSlashOption;
/**
* While usually automatic, sometimes it can be useful to force the router into a server-side state, e.g. when using the router in a non-browser environment that has access to a global.document object.
*
* @default typeof document !== 'undefined'
* @link [API Docs](https://tanstack.com/router/latest/docs/framework/react/api/router/RouterOptionsType#isserver-property)
*/
isServer?: boolean;
/**
* @default false
*/
isShell?: boolean;
/**
* @default false
*/
isPrerendering?: boolean;
/**
* The default `ssr` a route should use if no `ssr` is provided.
*
* @default true
*/
defaultSsr?: SSROption;
search?: {
/**
* Configures how unknown search params (= not returned by any `validateSearch`) are treated.
*
* @default false
* @link [API Docs](https://tanstack.com/router/latest/docs/framework/react/api/router/RouterOptionsType#search.strict-property)
*/
strict?: boolean;
};
/**
* Configures whether structural sharing is enabled by default for fine-grained selectors.
*
* @link [API Docs](https://tanstack.com/router/latest/docs/framework/react/api/router/RouterOptionsType#defaultstructuralsharing-property)
*/
defaultStructuralSharing?: TDefaultStructuralSharingOption;
/**
* Configures which URI characters are allowed in path params that would ordinarily be escaped by encodeURIComponent.
*
* @link [API Docs](https://tanstack.com/router/latest/docs/framework/react/api/router/RouterOptionsType#pathparamsallowedcharacters-property)
* @link [Guide](https://tanstack.com/router/latest/docs/framework/react/guide/path-params#allowed-characters)
*/
pathParamsAllowedCharacters?: Array<';' | ':' | '@' | '&' | '=' | '+' | '$' | ','>;
defaultRemountDeps?: DefaultRemountDepsFn<TRouteTree>;
/**
* If `true`, scroll restoration will be enabled
*
* @default false
*/
scrollRestoration?: boolean | ((opts: {
location: ParsedLocation;
}) => boolean);
/**
* A function that will be called to get the key for the scroll restoration cache.
*
* @default (location) => location.href
*/
getScrollRestorationKey?: (location: ParsedLocation) => string;
/**
* The default behavior for scroll restoration.
*
* @default 'auto'
*/
scrollRestorationBehavior?: ScrollBehavior;
/**
* An array of selectors that will be used to scroll to the top of the page in addition to `window`
*
* @default ['window']
*/
scrollToTopSelectors?: Array<string | (() => Element | null | undefined)>;
/**
* When `true`, disables the global catch boundary that normally wraps all route matches.
* This allows unhandled errors to bubble up to top-level error handlers in the browser.
*
* Useful for testing tools (like Storybook Test Runner), error reporting services,
* and debugging scenarios where you want errors to reach the browser's global error handlers.
*
* @default false
*/
disableGlobalCatchBoundary?: boolean;
/**
* An array of URL protocols to allow in links, redirects, and navigation.
* Absolute URLs with protocols not in this list will be rejected.
*
* @default DEFAULT_PROTOCOL_ALLOWLIST (http:, https:, mailto:, tel:)
* @link [API Docs](https://tanstack.com/router/latest/docs/framework/react/api/router/RouterOptionsType#protocolallowlist-property)
*/
protocolAllowlist?: Array<string>;
serializationAdapters?: ReadonlyArray<AnySerializationAdapter>;
/**
* Configures how the router will rewrite the location between the actual href and the internal href of the router.
*
* @default undefined
* @description You can provide a custom rewrite pair (in/out).
* This is useful for shifting data from the origin to the path (for things like subdomain routing), or other advanced use cases.
*/
rewrite?: LocationRewrite;
origin?: string;
ssr?: {
nonce?: string;
};
}
export type LocationRewrite = {
/**
* A function that will be called to rewrite the URL before it is interpreted by the router from the history instance.
*
* @default undefined
*/
input?: LocationRewriteFunction;
/**
* A function that will be called to rewrite the URL before it is committed to the actual history instance from the router.
*
* @default undefined
*/
output?: LocationRewriteFunction;
};
/**
* A function that will be called to rewrite the URL.
*
* @param url The URL to rewrite.
* @returns The rewritten URL (as a URL instance or full href string) or undefined if no rewrite is needed.
*/
export type LocationRewriteFunction = ({ url, }: {
url: URL;
}) => undefined | string | URL;
export interface RouterState<in out TRouteTree extends AnyRoute = AnyRoute, in out TRouteMatch = MakeRouteMatchUnion> {
status: 'pending' | 'idle';
loadedAt: number;
isLoading: boolean;
isTransitioning: boolean;
matches: Array<TRouteMatch>;
location: ParsedLocation<FullSearchSchema<TRouteTree>>;
resolvedLocation?: ParsedLocation<FullSearchSchema<TRouteTree>>;
statusCode: number;
redirect?: AnyRedirect;
}
export interface BuildNextOptions {
to?: string | number | null;
params?: true | Updater<unknown>;
search?: true | Updater<unknown>;
hash?: true | Updater<string>;
state?: true | NonNullableUpdater<ParsedHistoryState, HistoryState>;
mask?: {
to?: string | number | null;
params?: true | Updater<unknown>;
search?: true | Updater<unknown>;
hash?: true | Updater<string>;
state?: true | NonNullableUpdater<ParsedHistoryState, HistoryState>;
unmaskOnReload?: boolean;
};
from?: string;
href?: string;
_fromLocation?: ParsedLocation;
unsafeRelative?: 'path';
_isNavigate?: boolean;
}
type NavigationEventInfo = {
fromLocation?: ParsedLocation;
toLocation: ParsedLocation;
pathChanged: boolean;
hrefChanged: boolean;
hashChanged: boolean;
};
export interface RouterEvents {
onBeforeNavigate: {
type: 'onBeforeNavigate';
} & NavigationEventInfo;
onBeforeLoad: {
type: 'onBeforeLoad';
} & NavigationEventInfo;
onLoad: {
type: 'onLoad';
} & NavigationEventInfo;
onResolved: {
type: 'onResolved';
} & NavigationEventInfo;
onBeforeRouteMount: {
type: 'onBeforeRouteMount';
} & NavigationEventInfo;
onRendered: {
type: 'onRendered';
} & NavigationEventInfo;
}
export type RouterEvent = RouterEvents[keyof RouterEvents];
export type ListenerFn<TEvent extends RouterEvent> = (event: TEvent) => void;
export type RouterListener<TRouterEvent extends RouterEvent> = {
eventType: TRouterEvent['type'];
fn: ListenerFn<TRouterEvent>;
};
export type SubscribeFn = <TType extends keyof RouterEvents>(eventType: TType, fn: ListenerFn<RouterEvents[TType]>) => () => void;
export interface MatchRoutesOpts {
preload?: boolean;
throwOnError?: boolean;
dest?: BuildNextOptions;
}
export type InferRouterContext<TRouteTree extends AnyRoute> = TRouteTree['types']['routerContext'];
export type RouterContextOptions<TRouteTree extends AnyRoute> = AnyContext extends InferRouterContext<TRouteTree> ? {
context?: InferRouterContext<TRouteTree>;
} : {
context: InferRouterContext<TRouteTree>;
};
export type RouterConstructorOptions<TRouteTree extends AnyRoute, TTrailingSlashOption extends TrailingSlashOption, TDefaultStructuralSharingOption extends boolean, TRouterHistory extends RouterHistory, TDehydrated extends Record<string, any>> = Omit<RouterOptions<TRouteTree, TTrailingSlashOption, TDefaultStructuralSharingOption, TRouterHistory, TDehydrated>, 'context' | 'serializationAdapters' | 'defaultSsr'> & RouterContextOptions<TRouteTree>;
export type PreloadRouteFn<TRouteTree extends AnyRoute, TTrailingSlashOption extends TrailingSlashOption, TDefaultStructuralSharingOption extends boolean, TRouterHistory extends RouterHistory> = <TFrom extends RoutePaths<TRouteTree> | string = string, TTo extends string | undefined = undefined, TMaskFrom extends RoutePaths<TRouteTree> | string = TFrom, TMaskTo extends string = ''>(opts: NavigateOptions<RouterCore<TRouteTree, TTrailingSlashOption, TDefaultStructuralSharingOption, TRouterHistory>, TFrom, TTo, TMaskFrom, TMaskTo> & {}) => Promise<Array<AnyRouteMatch> | undefined>;
export type MatchRouteFn<TRouteTree extends AnyRoute, TTrailingSlashOption extends TrailingSlashOption, TDefaultStructuralSharingOption extends boolean, TRouterHistory extends RouterHistory> = <TFrom extends RoutePaths<TRouteTree> = '/', TTo extends string | undefined = undefined, TResolved = ResolveRelativePath<TFrom, NoInfer<TTo>>>(location: ToOptions<RouterCore<TRouteTree, TTrailingSlashOption, TDefaultStructuralSharingOption, TRouterHistory>, TFrom, TTo>, opts?: MatchRouteOptions) => false | RouteById<TRouteTree, TResolved>['types']['allParams'];
export type UpdateFn<TRouteTree extends AnyRoute, TTrailingSlashOption extends TrailingSlashOption, TDefaultStructuralSharingOption extends boolean, TRouterHistory extends RouterHistory, TDehydrated extends Record<string, any>> = (newOptions: RouterConstructorOptions<TRouteTree, TTrailingSlashOption, TDefaultStructuralSharingOption, TRouterHistory, TDehydrated>) => void;
export type InvalidateFn<TRouter extends AnyRouter> = (opts?: {
filter?: (d: MakeRouteMatchUnion<TRouter>) => boolean;
sync?: boolean;
forcePending?: boolean;
}) => Promise<void>;
export type ParseLocationFn<TRouteTree extends AnyRoute> = (locationToParse: HistoryLocation, previousLocation?: ParsedLocation<FullSearchSchema<TRouteTree>>) => ParsedLocation<FullSearchSchema<TRouteTree>>;
export type GetMatchRoutesFn = (pathname: string) => {
matchedRoutes: ReadonlyArray<AnyRoute>;
/** exhaustive params, still in their string form */
routeParams: Record<string, string>;
foundRoute: AnyRoute | undefined;
parseError?: unknown;
};
export type EmitFn = (routerEvent: RouterEvent) => void;
export type LoadFn = (opts?: {
sync?: boolean;
}) => Promise<void>;
export type CommitLocationFn = ({ viewTransition, ignoreBlocker, ...next }: ParsedLocation & CommitLocationOptions) => Promise<void>;
export type StartTransitionFn = (fn: () => void) => void;
export interface MatchRoutesFn {
(pathname: string, locationSearch?: AnySchema, opts?: MatchRoutesOpts): Array<MakeRouteMatchUnion>;
/**
* @deprecated use the following signature instead
*/
(next: ParsedLocation, opts?: MatchRoutesOpts): Array<AnyRouteMatch>;
(pathnameOrNext: string | ParsedLocation, locationSearchOrOpts?: AnySchema | MatchRoutesOpts, opts?: MatchRoutesOpts): Array<AnyRouteMatch>;
}
export type GetMatchFn = (matchId: string) => AnyRouteMatch | undefined;
export type UpdateMatchFn = (id: string, updater: (match: AnyRouteMatch) => AnyRouteMatch) => void;
export type LoadRouteChunkFn = (route: AnyRoute) => Promise<Array<void>>;
export type ResolveRedirect = (err: AnyRedirect) => ResolvedRedirect;
export type ClearCacheFn<TRouter extends AnyRouter> = (opts?: {
filter?: (d: MakeRouteMatchUnion<TRouter>) => boolean;
}) => void;
export interface ServerSsr {
/**
* Injects HTML synchronously into the stream.
* Emits an onInjectedHtml event that listeners can handle.
* If no subscriber is listening, the HTML is buffered and can be retrieved via takeBufferedHtml().
*/
injectHtml: (html: string) => void;
/**
* Injects a script tag synchronously into the stream.
*/
injectScript: (script: string) => void;
isDehydrated: () => boolean;
isSerializationFinished: () => boolean;
onRenderFinished: (listener: () => void) => void;
setRenderFinished: () => void;
cleanup: () => void;
onSerializationFinished: (listener: () => void) => void;
dehydrate: (opts?: {
requestAssets?: Array<RouterManagedTag>;
}) => Promise<void>;
takeBufferedScripts: () => RouterManagedTag | undefined;
/**
* Takes any buffered HTML that was injected.
* Returns the buffered HTML string (which may include multiple script tags) or undefined if empty.
*/
takeBufferedHtml: () => string | undefined;
liftScriptBarrier: () => void;
}
export type AnyRouterWithContext<TContext> = RouterCore<AnyRouteWithContext<TContext>, any, any, any, any>;
export type AnyRouter = RouterCore<any, any, any, any, any>;
export interface ViewTransitionOptions {
types: Array<string> | ((locationChangeInfo: {
fromLocation?: ParsedLocation;
toLocation: ParsedLocation;
pathChanged: boolean;
hrefChanged: boolean;
hashChanged: boolean;
}) => Array<string> | false);
}
/**
* Convert an unknown error into a minimal, serializable object.
* Includes name and message (and stack in development).
*/
export declare function defaultSerializeError(err: unknown): {
name: string;
message: string;
} | {
data: unknown;
};
/** Options for configuring trailing-slash behavior. */
export declare const trailingSlashOptions: {
readonly always: "always";
readonly never: "never";
readonly preserve: "preserve";
};
export type TrailingSlashOption = (typeof trailingSlashOptions)[keyof typeof trailingSlashOptions];
/**
* Compute whether path, href or hash changed between previous and current
* resolved locations.
*/
export declare function getLocationChangeInfo(location: ParsedLocation, resolvedLocation?: ParsedLocation): {
fromLocation: ParsedLocation<{}> | undefined;
toLocation: ParsedLocation<{}>;
pathChanged: boolean;
hrefChanged: boolean;
hashChanged: boolean;
};
export type CreateRouterFn = <TRouteTree extends AnyRoute, TTrailingSlashOption extends TrailingSlashOption = 'never', TDefaultStructuralSharingOption extends boolean = false, TRouterHistory extends RouterHistory = RouterHistory, TDehydrated extends Record<string, any> = Record<string, any>>(options: undefined extends number ? 'strictNullChecks must be enabled in tsconfig.json' : RouterConstructorOptions<TRouteTree, TTrailingSlashOption, TDefaultStructuralSharingOption, TRouterHistory, TDehydrated>) => RouterCore<TRouteTree, TTrailingSlashOption, TDefaultStructuralSharingOption, TRouterHistory, TDehydrated>;
declare global {
var __TSR_CACHE__: {
routeTree: AnyRoute;
processRouteTreeResult: ProcessRouteTreeResult<AnyRoute>;
resolvePathCache: LRUCache<string, string>;
} | undefined;
}
/**
* Core, framework-agnostic router engine that powers TanStack Router.
*
* Provides navigation, matching, loading, preloading, caching and event APIs
* used by framework adapters (React/Solid). Prefer framework helpers like
* `createRouter` in app code.
*
* @link https://tanstack.com/router/latest/docs/framework/react/api/router/RouterType
*/
export declare class RouterCore<in out TRouteTree extends AnyRoute, in out TTrailingSlashOption extends TrailingSlashOption, in out TDefaultStructuralSharingOption extends boolean, in out TRouterHistory extends RouterHistory = RouterHistory, in out TDehydrated extends Record<string, any> = Record<string, any>> {
tempLocationKey: string | undefined;
resetNextScroll: boolean;
shouldViewTransition?: boolean | ViewTransitionOptions;
isViewTransitionTypesSupported?: boolean;
subscribers: Set<RouterListener<RouterEvent>>;
viewTransitionPromise?: ControlledPromise<true>;
isScrollRestoring: boolean;
isScrollRestorationSetup: boolean;
stores: RouterStores<TRouteTree>;
private getStoreConfig;
batch: (fn: () => void) => void;
options: PickAsRequired<RouterOptions<TRouteTree, TTrailingSlashOption, TDefaultStructuralSharingOption, TRouterHistory, TDehydrated>, 'stringifySearch' | 'parseSearch' | 'context'>;
history: TRouterHistory;
rewrite?: LocationRewrite;
origin?: string;
latestLocation: ParsedLocation<FullSearchSchema<TRouteTree>>;
pendingBuiltLocation?: ParsedLocation<FullSearchSchema<TRouteTree>>;
basepath: string;
routeTree: TRouteTree;
routesById: RoutesById<TRouteTree>;
routesByPath: RoutesByPath<TRouteTree>;
processedTree: ProcessedTree<TRouteTree, any, any>;
resolvePathCache: LRUCache<string, string>;
private routeBranchCache;
isServer: boolean;
pathParamsDecoder?: (encoded: string) => string;
protocolAllowlist: Set<string>;
/**
* @deprecated Use the `createRouter` function instead
*/
constructor(options: RouterConstructorOptions<TRouteTree, TTrailingSlashOption, TDefaultStructuralSharingOption, TRouterHistory, TDehydrated>, getStoreConfig: GetStoreConfig);
startTransition: StartTransitionFn;
isShell(): boolean;
isPrerendering(): boolean;
update: UpdateFn<TRouteTree, TTrailingSlashOption, TDefaultStructuralSharingOption, TRouterHistory, TDehydrated>;
get state(): RouterState<TRouteTree>;
updateLatestLocation: () => void;
buildRouteTree: () => ProcessRouteTreeResult<TRouteTree>;
setRoutes({ routesById, routesByPath, processedTree, }: ProcessRouteTreeResult<TRouteTree>): void;
/**
* Subscribe to router lifecycle events like `onBeforeNavigate`, `onLoad`,
* `onResolved`, etc. Returns an unsubscribe function.
*
* @link https://tanstack.com/router/latest/docs/framework/react/api/router/RouterEventsType
*/
subscribe: SubscribeFn;
emit: EmitFn;
/**
* Parse a HistoryLocation into a strongly-typed ParsedLocation using the
* current router options, rewrite rules and search parser/stringifier.
*/
parseLocation: ParseLocationFn<TRouteTree>;
/** Resolve a path using the router's trailing-slash policy. */
resolvePathWithBase: (from: string, path: string) => string;
private getRouteBranch;
get looseRoutesById(): Record<string, AnyRoute>;
matchRoutes: MatchRoutesFn;
private getParentContext;
private matchRoutesInternal;
getMatchedRoutes: GetMatchRoutesFn;
/**
* Lightweight route matching for buildLocation.
* Only computes fullPath, accumulated search, and params - skipping expensive
* operations like AbortController, ControlledPromise, loaderDeps, and full match objects.
*/
private matchRoutesLightweight;
cancelMatch: (id: string) => void;
cancelMatches: () => void;
/**
* Build the next ParsedLocation from navigation options without committing.
* Resolves `to`/`from`, params/search/hash/state, applies search validation
* and middlewares, and returns a stable, stringified location object.
*
* @link https://tanstack.com/router/latest/docs/framework/react/api/router/RouterType#buildlocation-method
*/
buildLocation: BuildLocationFn;
commitLocationPromise: undefined | ControlledPromise<void>;
/**
* Commit a previously built location to history (push/replace), optionally
* using view transitions and scroll restoration options.
*/
commitLocation: CommitLocationFn;
/** Convenience helper: build a location from options, then commit it. */
buildAndCommitLocation: ({ replace, resetScroll, hashScrollIntoView, viewTransition, ignoreBlocker, href, ...rest }?: BuildNextOptions & CommitLocationOptions) => Promise<void>;
/**
* Imperatively navigate using standard `NavigateOptions`. When `reloadDocument`
* or an absolute `href` is provided, performs a full document navigation.
* Otherwise, builds and commits a client-side location.
*
* @link https://tanstack.com/router/latest/docs/framework/react/api/router/NavigateOptionsType
*/
navigate: NavigateFn;
latestLoadPromise: undefined | Promise<void>;
beforeLoad: () => void;
load: LoadFn;
startViewTransition: (fn: () => Promise<void>) => void;
updateMatch: UpdateMatchFn;
getMatch: GetMatchFn;
/**
* Invalidate the current matches and optionally force them back into a pending state.
*
* - Marks all matches that pass the optional `filter` as `invalid: true`.
* - If `forcePending` is true, or a match is currently in `'error'` or `'notFound'` status,
* its status is reset to `'pending'` and its `error` cleared so that the loader is re-run
* on the next `load()` call (eg. after HMR or a manual invalidation).
*/
invalidate: InvalidateFn<RouterCore<TRouteTree, TTrailingSlashOption, TDefaultStructuralSharingOption, TRouterHistory, TDehydrated>>;
getParsedLocationHref: (location: ParsedLocation) => string;
resolveRedirect: (redirect: AnyRedirect) => AnyRedirect;
clearCache: ClearCacheFn<this>;
clearExpiredCache: () => void;
loadRouteChunk: typeof loadRouteChunk;
preloadRoute: PreloadRouteFn<TRouteTree, TTrailingSlashOption, TDefaultStructuralSharingOption, TRouterHistory>;
matchRoute: MatchRouteFn<TRouteTree, TTrailingSlashOption, TDefaultStructuralSharingOption, TRouterHistory>;
ssr?: {
manifest: Manifest | undefined;
};
serverSsr?: ServerSsr;
hasNotFoundMatch: () => boolean;
}
/** Error thrown when search parameter validation fails. */
export declare class SearchParamError extends Error {
}
/** Error thrown when path parameter parsing/validation fails. */
export declare class PathParamError extends Error {
}
/**
* Lazily import a module function and forward arguments to it, retaining
* parameter and return types for the selected export key.
*/
export declare function lazyFn<T extends Record<string, (...args: Array<any>) => any>, TKey extends keyof T = 'default'>(fn: () => Promise<T>, key?: TKey): (...args: Parameters<T[TKey]>) => Promise<Awaited<ReturnType<T[TKey]>>>;
/** Create an initial RouterState from a parsed location. */
export declare function getInitialRouterState(location: ParsedLocation): RouterState<any>;
/**
* Build the matched route chain and extract params for a pathname.
* Falls back to the root route if no specific route is found.
*/
export declare function getMatchedRoutes<TRouteLike extends RouteLike>({ pathname, routesById, processedTree, }: {
pathname: string;
routesById: Record<string, TRouteLike>;
processedTree: ProcessedTree<any, any, any>;
}): {
matchedRoutes: readonly TRouteLike[];
routeParams: Record<string, string>;
foundRoute: TRouteLike | undefined;
};
export {};
@@ -0,0 +1,938 @@
export default `flf2a$ 9 8 18 -1 18
AMC razor 2 font by LESTER
============================
-> Conversion to FigLet font by MEPH. (Part of ASCII Editor Service Pack I)
(http://studenten.freepage.de/meph/ascii/ascii/editor/_index.htm)
-> Defined: ASCII code alphanumeric
-> Uppercase characters only.
.-~~-.
(_^..^_)
Lester||||AMC - Anthony Cucchiara
*Mythos Online : Internet Magazine of Lovecraftian Horror - Dead Alice*
http://www.fortunecity.com/victorian/redlion/157/deadal.htm
*Visit my web page ANSI/ASCII/Fonts*
http://members.aol.com/lester5374/
$@
$@
$@
$@
$@
$@
$@
$@
$@@
. @
|\`+. @
| | @
| | @
\`+.| @
. @
|\`+. @
\`+.| @
@@
@
@
@
@
@
@
@
@
@@
@
@
@
@
@
@
@
@
@@
@
@
@
@
@
@
@
@
@@
@
@
@
@
@
@
@
@
@@
@
@
@
@
@
@
@
@
@@
@
@
@
@
@
@
@
@
@@
@
@
@
@
@
@
@
@
@@
@
@
@
@
@
@
@
@
@@
@
@
@
@
@
@
@
@
@@
@
@
@
@
@
@
@
@
@@
@
@
@
@
@
@
@
@
@@
@
@
@
@
@
@
@
@
@@
@
@
@
@
@
. @
|\`+. @
\`+.| @
@@
@
@
@
@
@
@
@
@
@@
. . @
.+'|=|\`+. @
| +' \`+ | @
| |\\ | | @
| | \\ | | @
| | \\| | @
| +. .+ | @
\`+.|=|.+' @
@@
. . @
.'|=|\`+. @
|.' | | @
| | @
| | @
| | @
| | @
|.+' @
@@
. . @
.+'|=|\`+. @
|.+' | | @
. | | @
.+'|=|.+' @
| | . @
| | .+'| @
\`+.|=|.+' @
@@
. . @
.+'|=|\`+. @
|.+' | | @
.'|=| | @
|.' | | @
. | | @
|\`+. | | @
\`+.|=|.+' @
@@
. . @
.+'| |\`+. @
| | | | @
\`++'=| | @
| | @
| | @
| | @
|.+' @
@@
. @
|~~|=|\`+. @
| | \`+.| @
| | . @
|..|=|\`+. @
. | | @
|\`+. | | @
\`+.|=|.+' @
@@
. . @
|\`+.=|\`+. @
| | \`+.| @
| | . @
| |=|\`+. @
| | | | @
| | | | @
\`+.|=|.+' @
@@
. . @
.+'|=.+'| @
|.+' | | @
|.+' @
.=' @
.+'| @
| | @
|..| @
@@
. . @
.+'|=|\`+. @
| | | | @
.' |=| \`. @
| | | | @
| | | | @
| | | | @
\`+.|=|.+' @
@@
. . @
.+'|=|\`+. @
| | | | @
| | | | @
\`+.|=| | @
. | | @
|\`+. | | @
\`+.|=|.+' @
@@
@
@
@
@
@
@
@
@
@@
@
@
@
@
@
@
@
@
@@
@
@
@
@
@
@
@
@
@@
@
@
@
@
@
@
@
@
@@
@
@
@
@
@
@
@
@
@@
@
@
@
@
@
@
@
@
@@
@
@
@
@
@
@
@
@
@@
. . @
.+'|=|\`+. @
| | | | @
| |=| | @
| | | | @
| | | | @
| | | | @
\`+.| |..| @
@@
. . @
.+'|=|\`+. @
| | | | @
| |'. '. @
| | | | @
| | | | @
| | | | @
\`+.|=|.+' @
@@
. . @
.+'|=|\`+. @
| | \`+.| @
| | @
| | @
| | . @
| | .+'| @
\`+.|=|.+' @
@@
. . @
.+'|=|\`+. @
| | \`+ | @
| | | | @
| | | | @
| | | | @
| | .+ | @
\`+.|=|.+' @
@@
. . @
.+'|=|\`+. @
| | \`+.| @
| |=|\`. @
| | \`.| @
| | . @
| | .+'| @
\`+.|=|.+' @
@@
. . @
.+'|=|\`+. @
| | \`+.| @
| |=|\`. @
| | \`.| @
| | @
| | @
\`+.| @
@@
. . @
.+'|=|\`+. @
| | \`+.| @
| | . @
| | |\`+. @
| | \`. | @
| | .+ | @
\`+.|=|.+' @
@@
. . @
.+'| |\`+. @
| | | | @
| |=| | @
| | | | @
| | | | @
| | | | @
\`+.| |..| @
@@
. @
|\`+. @
| | @
| | @
| | @
| | @
| | @
|.+' @
@@
. @
|\`+. @
| | @
| | @
| | @
. | | @
|\`+. | | @
\`+.|=|.+' @
@@
. . @
.+'| |\`. @
| | .+ | @
| |=|.+' @
| | |\`+. @
| | | | @
| | | | @
\`+.| |..| @
@@
. @
.+'| @
| | @
| | @
| | @
| | . @
| | .+'| @
\`+.|=|.+' @
@@
. . . @
.+'|=|\`+.=|\`+. @
| | \`+ | \`+ | @
| | | | | | @
| | | | | | @
| | | | | | @
| | | | | | @
\`+.| |.| |+' @
@@
. . @
.+'|=|\`+. @
| | \`+ | @
| | | | @
| | | | @
| | | | @
| | | | @
\`+.| |.| @
@@
. . @
.+'|=|\`+. @
| | | | @
| | | | @
| | | | @
| | | | @
| | | | @
\`+.|=|.+' @
@@
. . @
.+'|=|\`+. @
| | | | @
| |=\`++' @
| | @
| | @
| | @
\`+.| @
@@
. . @
.+'|=|\`+. @
| +' \`+ | @
| | | | @
| | | | @
| | .| | @
| +.\`. | @
\`+.|=|.-. @
@@
. . @
.+'|=|\`+. @
| | | | @
| |'. '. @
| | | | @
| | | | @
| | | | @
\`+.| |.+' @
@@
. . @
.+'|=|\`+. @
| | \`+.| @
| | . @
\`+.|=|\`+. @
. | | @
|\`+. | | @
\`+.|=|.+' @
@@
. . . @
.+'|=|\`+.=|\`+. @
|.+' | | \`+.| @
| | @
| | @
| | @
| | @
|.+' @
@@
. . @
.+'| |\`+. @
| | | | @
| | | | @
| | | | @
| | | | @
| | | | @
\`+.|=|.+' @
@@
. . @
.+'| .'| @
| | | | @
| | | | @
| | | | @
| | | | @
| | .+ | @
\`+.|=|.+' @
@@
. . . @
.+'| .'| .'| @
| | | | | | @
| | | | | | @
| | | | | | @
| | | | | | @
| | .+ | .+ | @
\`+.|=|.+'=|.+' @
@@
. . @
.+'| |\`+. @
| | | | @
.' .\`. \`. @
| | | | @
| | | | @
| | | | @
\`+.| |.+' @
@@
. . @
.+'|.+'| @
| || | @
\`+.\`'.+' @
| | @
| | @
| | @
|.+' @
@@
@
|~~|=|~~| @
|.+' | | @
|.+' @
.=' @
.+'| . @
| | .+'| @
|..|=|..| @
@@
@
@
@
@
@
@
@
@
@@
@
@
@
@
@
@
@
@
@@
@
@
@
@
@
@
@
@
@@
@
@
@
@
@
@
@
@
@@
@
@
@
@
@
@
@
@
@@
@
@
@
@
@
@
@
@
@@
. . @
.+'|=|\`+. @
| | | | @
| |=| | @
| | | | @
| | | | @
| | | | @
\`+.| |..| @
@@
. . @
.+'|=|\`+. @
| | | | @
| |'. '. @
| | | | @
| | | | @
| | | | @
\`+.|=|.+' @
@@
. . @
.+'|=|\`+. @
| | \`+.| @
| | @
| | @
| | . @
| | .+'| @
\`+.|=|.+' @
@@
. . @
.+'|=|\`+. @
| | \`+ | @
| | | | @
| | | | @
| | | | @
| | .+ | @
\`+.|=|.+' @
@@
. . @
.+'|=|\`+. @
| | \`+.| @
| |=|\`. @
| | \`.| @
| | . @
| | .+'| @
\`+.|=|.+' @
@@
. . @
.+'|=|\`+. @
| | \`+.| @
| |=|\`. @
| | \`.| @
| | @
| | @
\`+.| @
@@
. . @
.+'|=|\`+. @
| | \`+.| @
| | . @
| | |\`+. @
| | \`. | @
| | .+ | @
\`+.|=|.+' @
@@
. . @
.+'| |\`+. @
| | | | @
| |=| | @
| | | | @
| | | | @
| | | | @
\`+.| |..| @
@@
. @
|\`+. @
| | @
| | @
| | @
| | @
| | @
|.+' @
@@
. @
|\`+. @
| | @
| | @
| | @
. | | @
|\`+. | | @
\`+.|=|.+' @
@@
. . @
.+'| |\`. @
| | .+ | @
| |=|.+' @
| | |\`+. @
| | | | @
| | | | @
\`+.| |..| @
@@
. @
.+'| @
| | @
| | @
| | @
| | . @
| | .+'| @
\`+.|=|.+' @
@@
. . . @
.+'|=|\`+.=|\`+. @
| | \`+ | \`+ | @
| | | | | | @
| | | | | | @
| | | | | | @
| | | | | | @
\`+.| |.| |+' @
@@
. . @
.+'|=|\`+. @
| | \`+ | @
| | | | @
| | | | @
| | | | @
| | | | @
\`+.| |.| @
@@
. . @
.+'|=|\`+. @
| | | | @
| | | | @
| | | | @
| | | | @
| | | | @
\`+.|=|.+' @
@@
. . @
.+'|=|\`+. @
| | | | @
| |=\`++' @
| | @
| | @
| | @
\`+.| @
@@
. . @
.+'|=|\`+. @
| +' \`+ | @
| | | | @
| | | | @
| | .| | @
| +.\`. | @
\`+.|=|.-. @
@@
. . @
.+'|=|\`+. @
| | | | @
| |'. '. @
| | | | @
| | | | @
| | | | @
\`+.| |.+' @
@@
. . @
.+'|=|\`+. @
| | \`+.| @
| | . @
\`+.|=|\`+. @
. | | @
|\`+. | | @
\`+.|=|.+' @
@@
. . . @
.+'|=|\`+.=|\`+. @
|.+' | | \`+.| @
| | @
| | @
| | @
| | @
|.+' @
@@
. . @
.+'| |\`+. @
| | | | @
| | | | @
| | | | @
| | | | @
| | | | @
\`+.|=|.+' @
@@
. . @
.+'| .'| @
| | | | @
| | | | @
| | | | @
| | | | @
| | .+ | @
\`+.|=|.+' @
@@
. . . @
.+'| .'| .'| @
| | | | | | @
| | | | | | @
| | | | | | @
| | | | | | @
| | .+ | .+ | @
\`+.|=|.+'=|.+' @
@@
. . @
.+'| |\`+. @
| | | | @
.' .\`. \`. @
| | | | @
| | | | @
| | | | @
\`+.| |.+' @
@@
. . @
.+'|.+'| @
| || | @
\`+.\`'.+' @
| | @
| | @
| | @
|.+' @
@@
@
|~~|=|~~| @
|.+' | | @
|.+' @
.=' @
.+'| . @
| | .+'| @
|..|=|..| @
@@
@
@
@
@
@
@
@
@
@@
@
@
@
@
@
@
@
@
@@
@
@
@
@
@
@
@
@
@@
@
@
@
@
@
@
@
@
@@
@
@
@
@
@
@
@
@
@@
@
@
@
@
@
@
@
@
@@
@
@
@
@
@
@
@
@
@@
@
@
@
@
@
@
@
@
@@
@
@
@
@
@
@
@
@
@@
@
@
@
@
@
@
@
@
@@
@
@
@
@
@
@
@
@
@@
`
@@ -0,0 +1,426 @@
'use strict'
module.exports = Yallist
Yallist.Node = Node
Yallist.create = Yallist
function Yallist (list) {
var self = this
if (!(self instanceof Yallist)) {
self = new Yallist()
}
self.tail = null
self.head = null
self.length = 0
if (list && typeof list.forEach === 'function') {
list.forEach(function (item) {
self.push(item)
})
} else if (arguments.length > 0) {
for (var i = 0, l = arguments.length; i < l; i++) {
self.push(arguments[i])
}
}
return self
}
Yallist.prototype.removeNode = function (node) {
if (node.list !== this) {
throw new Error('removing node which does not belong to this list')
}
var next = node.next
var prev = node.prev
if (next) {
next.prev = prev
}
if (prev) {
prev.next = next
}
if (node === this.head) {
this.head = next
}
if (node === this.tail) {
this.tail = prev
}
node.list.length--
node.next = null
node.prev = null
node.list = null
return next
}
Yallist.prototype.unshiftNode = function (node) {
if (node === this.head) {
return
}
if (node.list) {
node.list.removeNode(node)
}
var head = this.head
node.list = this
node.next = head
if (head) {
head.prev = node
}
this.head = node
if (!this.tail) {
this.tail = node
}
this.length++
}
Yallist.prototype.pushNode = function (node) {
if (node === this.tail) {
return
}
if (node.list) {
node.list.removeNode(node)
}
var tail = this.tail
node.list = this
node.prev = tail
if (tail) {
tail.next = node
}
this.tail = node
if (!this.head) {
this.head = node
}
this.length++
}
Yallist.prototype.push = function () {
for (var i = 0, l = arguments.length; i < l; i++) {
push(this, arguments[i])
}
return this.length
}
Yallist.prototype.unshift = function () {
for (var i = 0, l = arguments.length; i < l; i++) {
unshift(this, arguments[i])
}
return this.length
}
Yallist.prototype.pop = function () {
if (!this.tail) {
return undefined
}
var res = this.tail.value
this.tail = this.tail.prev
if (this.tail) {
this.tail.next = null
} else {
this.head = null
}
this.length--
return res
}
Yallist.prototype.shift = function () {
if (!this.head) {
return undefined
}
var res = this.head.value
this.head = this.head.next
if (this.head) {
this.head.prev = null
} else {
this.tail = null
}
this.length--
return res
}
Yallist.prototype.forEach = function (fn, thisp) {
thisp = thisp || this
for (var walker = this.head, i = 0; walker !== null; i++) {
fn.call(thisp, walker.value, i, this)
walker = walker.next
}
}
Yallist.prototype.forEachReverse = function (fn, thisp) {
thisp = thisp || this
for (var walker = this.tail, i = this.length - 1; walker !== null; i--) {
fn.call(thisp, walker.value, i, this)
walker = walker.prev
}
}
Yallist.prototype.get = function (n) {
for (var i = 0, walker = this.head; walker !== null && i < n; i++) {
// abort out of the list early if we hit a cycle
walker = walker.next
}
if (i === n && walker !== null) {
return walker.value
}
}
Yallist.prototype.getReverse = function (n) {
for (var i = 0, walker = this.tail; walker !== null && i < n; i++) {
// abort out of the list early if we hit a cycle
walker = walker.prev
}
if (i === n && walker !== null) {
return walker.value
}
}
Yallist.prototype.map = function (fn, thisp) {
thisp = thisp || this
var res = new Yallist()
for (var walker = this.head; walker !== null;) {
res.push(fn.call(thisp, walker.value, this))
walker = walker.next
}
return res
}
Yallist.prototype.mapReverse = function (fn, thisp) {
thisp = thisp || this
var res = new Yallist()
for (var walker = this.tail; walker !== null;) {
res.push(fn.call(thisp, walker.value, this))
walker = walker.prev
}
return res
}
Yallist.prototype.reduce = function (fn, initial) {
var acc
var walker = this.head
if (arguments.length > 1) {
acc = initial
} else if (this.head) {
walker = this.head.next
acc = this.head.value
} else {
throw new TypeError('Reduce of empty list with no initial value')
}
for (var i = 0; walker !== null; i++) {
acc = fn(acc, walker.value, i)
walker = walker.next
}
return acc
}
Yallist.prototype.reduceReverse = function (fn, initial) {
var acc
var walker = this.tail
if (arguments.length > 1) {
acc = initial
} else if (this.tail) {
walker = this.tail.prev
acc = this.tail.value
} else {
throw new TypeError('Reduce of empty list with no initial value')
}
for (var i = this.length - 1; walker !== null; i--) {
acc = fn(acc, walker.value, i)
walker = walker.prev
}
return acc
}
Yallist.prototype.toArray = function () {
var arr = new Array(this.length)
for (var i = 0, walker = this.head; walker !== null; i++) {
arr[i] = walker.value
walker = walker.next
}
return arr
}
Yallist.prototype.toArrayReverse = function () {
var arr = new Array(this.length)
for (var i = 0, walker = this.tail; walker !== null; i++) {
arr[i] = walker.value
walker = walker.prev
}
return arr
}
Yallist.prototype.slice = function (from, to) {
to = to || this.length
if (to < 0) {
to += this.length
}
from = from || 0
if (from < 0) {
from += this.length
}
var ret = new Yallist()
if (to < from || to < 0) {
return ret
}
if (from < 0) {
from = 0
}
if (to > this.length) {
to = this.length
}
for (var i = 0, walker = this.head; walker !== null && i < from; i++) {
walker = walker.next
}
for (; walker !== null && i < to; i++, walker = walker.next) {
ret.push(walker.value)
}
return ret
}
Yallist.prototype.sliceReverse = function (from, to) {
to = to || this.length
if (to < 0) {
to += this.length
}
from = from || 0
if (from < 0) {
from += this.length
}
var ret = new Yallist()
if (to < from || to < 0) {
return ret
}
if (from < 0) {
from = 0
}
if (to > this.length) {
to = this.length
}
for (var i = this.length, walker = this.tail; walker !== null && i > to; i--) {
walker = walker.prev
}
for (; walker !== null && i > from; i--, walker = walker.prev) {
ret.push(walker.value)
}
return ret
}
Yallist.prototype.splice = function (start, deleteCount /*, ...nodes */) {
if (start > this.length) {
start = this.length - 1
}
if (start < 0) {
start = this.length + start;
}
for (var i = 0, walker = this.head; walker !== null && i < start; i++) {
walker = walker.next
}
var ret = []
for (var i = 0; walker && i < deleteCount; i++) {
ret.push(walker.value)
walker = this.removeNode(walker)
}
if (walker === null) {
walker = this.tail
}
if (walker !== this.head && walker !== this.tail) {
walker = walker.prev
}
for (var i = 2; i < arguments.length; i++) {
walker = insert(this, walker, arguments[i])
}
return ret;
}
Yallist.prototype.reverse = function () {
var head = this.head
var tail = this.tail
for (var walker = head; walker !== null; walker = walker.prev) {
var p = walker.prev
walker.prev = walker.next
walker.next = p
}
this.head = tail
this.tail = head
return this
}
function insert (self, node, value) {
var inserted = node === self.head ?
new Node(value, null, node, self) :
new Node(value, node, node.next, self)
if (inserted.next === null) {
self.tail = inserted
}
if (inserted.prev === null) {
self.head = inserted
}
self.length++
return inserted
}
function push (self, item) {
self.tail = new Node(item, self.tail, null, self)
if (!self.head) {
self.head = self.tail
}
self.length++
}
function unshift (self, item) {
self.head = new Node(item, null, self.head, self)
if (!self.tail) {
self.tail = self.head
}
self.length++
}
function Node (value, prev, next, list) {
if (!(this instanceof Node)) {
return new Node(value, prev, next, list)
}
this.list = list
this.value = value
if (prev) {
prev.next = this
this.prev = prev
} else {
this.prev = null
}
if (next) {
next.prev = this
this.next = next
} else {
this.next = null
}
}
try {
// add if support for Symbol.iterator is present
require('./iterator.js')(Yallist)
} catch (er) {}
@@ -0,0 +1,21 @@
/**
* @license lucide-react v0.469.0 - ISC
*
* This source code is licensed under the ISC license.
* See the LICENSE file in the root directory of this source tree.
*/
import createLucideIcon from '../createLucideIcon.js';
const WifiOff = createLucideIcon("WifiOff", [
["path", { d: "M12 20h.01", key: "zekei9" }],
["path", { d: "M8.5 16.429a5 5 0 0 1 7 0", key: "1bycff" }],
["path", { d: "M5 12.859a10 10 0 0 1 5.17-2.69", key: "1dl1wf" }],
["path", { d: "M19 12.859a10 10 0 0 0-2.007-1.523", key: "4k23kn" }],
["path", { d: "M2 8.82a15 15 0 0 1 4.177-2.643", key: "1grhjp" }],
["path", { d: "M22 8.82a15 15 0 0 0-11.288-3.764", key: "z3jwby" }],
["path", { d: "m2 2 20 20", key: "1ooewy" }]
]);
export { WifiOff as default };
//# sourceMappingURL=wifi-off.js.map
@@ -0,0 +1,69 @@
"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
exports.InMemoryEventStore = void 0;
/**
* Simple in-memory implementation of the EventStore interface for resumability
* This is primarily intended for examples and testing, not for production use
* where a persistent storage solution would be more appropriate.
*/
class InMemoryEventStore {
constructor() {
this.events = new Map();
}
/**
* Generates a unique event ID for a given stream ID
*/
generateEventId(streamId) {
return `${streamId}_${Date.now()}_${Math.random().toString(36).substring(2, 10)}`;
}
/**
* Extracts the stream ID from an event ID
*/
getStreamIdFromEventId(eventId) {
const parts = eventId.split('_');
return parts.length > 0 ? parts[0] : '';
}
/**
* Stores an event with a generated event ID
* Implements EventStore.storeEvent
*/
async storeEvent(streamId, message) {
const eventId = this.generateEventId(streamId);
this.events.set(eventId, { streamId, message });
return eventId;
}
/**
* Replays events that occurred after a specific event ID
* Implements EventStore.replayEventsAfter
*/
async replayEventsAfter(lastEventId, { send }) {
if (!lastEventId || !this.events.has(lastEventId)) {
return '';
}
// Extract the stream ID from the event ID
const streamId = this.getStreamIdFromEventId(lastEventId);
if (!streamId) {
return '';
}
let foundLastEvent = false;
// Sort events by eventId for chronological ordering
const sortedEvents = [...this.events.entries()].sort((a, b) => a[0].localeCompare(b[0]));
for (const [eventId, { streamId: eventStreamId, message }] of sortedEvents) {
// Only include events from the same stream
if (eventStreamId !== streamId) {
continue;
}
// Start sending events after we find the lastEventId
if (eventId === lastEventId) {
foundLastEvent = true;
continue;
}
if (foundLastEvent) {
await send(eventId, message);
}
}
return streamId;
}
}
exports.InMemoryEventStore = InMemoryEventStore;
//# sourceMappingURL=inMemoryEventStore.js.map
@@ -0,0 +1 @@
{"version":3,"file":"film.js","sources":["../../../src/icons/film.ts"],"sourcesContent":["import createLucideIcon from '../createLucideIcon';\n\n/**\n * @component @name Film\n * @description Lucide SVG icon component, renders SVG Element with children.\n *\n * @preview ![img](data:image/svg+xml;base64,PHN2ZyAgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIgogIHdpZHRoPSIyNCIKICBoZWlnaHQ9IjI0IgogIHZpZXdCb3g9IjAgMCAyNCAyNCIKICBmaWxsPSJub25lIgogIHN0cm9rZT0iIzAwMCIgc3R5bGU9ImJhY2tncm91bmQtY29sb3I6ICNmZmY7IGJvcmRlci1yYWRpdXM6IDJweCIKICBzdHJva2Utd2lkdGg9IjIiCiAgc3Ryb2tlLWxpbmVjYXA9InJvdW5kIgogIHN0cm9rZS1saW5lam9pbj0icm91bmQiCj4KICA8cmVjdCB3aWR0aD0iMTgiIGhlaWdodD0iMTgiIHg9IjMiIHk9IjMiIHJ4PSIyIiAvPgogIDxwYXRoIGQ9Ik03IDN2MTgiIC8+CiAgPHBhdGggZD0iTTMgNy41aDQiIC8+CiAgPHBhdGggZD0iTTMgMTJoMTgiIC8+CiAgPHBhdGggZD0iTTMgMTYuNWg0IiAvPgogIDxwYXRoIGQ9Ik0xNyAzdjE4IiAvPgogIDxwYXRoIGQ9Ik0xNyA3LjVoNCIgLz4KICA8cGF0aCBkPSJNMTcgMTYuNWg0IiAvPgo8L3N2Zz4K) - https://lucide.dev/icons/film\n * @see https://lucide.dev/guide/packages/lucide-react - Documentation\n *\n * @param {Object} props - Lucide icons props and any valid SVG attribute\n * @returns {JSX.Element} JSX Element\n *\n */\nconst Film = createLucideIcon('Film', [\n ['rect', { width: '18', height: '18', x: '3', y: '3', rx: '2', key: 'afitv7' }],\n ['path', { d: 'M7 3v18', key: 'bbkbws' }],\n ['path', { d: 'M3 7.5h4', key: 'zfgn84' }],\n ['path', { d: 'M3 12h18', key: '1i2n21' }],\n ['path', { d: 'M3 16.5h4', key: '1230mu' }],\n ['path', { d: 'M17 3v18', key: 'in4fa5' }],\n ['path', { d: 'M17 7.5h4', key: 'myr1c1' }],\n ['path', { d: 'M17 16.5h4', key: 'go4c1d' }],\n]);\n\nexport default Film;\n"],"names":[],"mappings":";;;;;;;;;AAaM,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAO,iBAAiB,MAAQ,CAAA,CAAA,CAAA;AAAA,CAAA,CACpC,CAAC,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAQ,CAAA,CAAA,CAAE,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAO,MAAM,CAAQ,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAM,CAAG,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAK,GAAG,CAAK,CAAA,CAAA,CAAA,CAAA,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AAA,CAAA,CAAE,GAAG,CAAa,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAK,UAAU,CAAA,CAAA;AAAA,CAAA,CAC1C,CAAC,CAAA,CAAA,CAAA,CAAA,CAAA,CAAQ,CAAA,CAAA,CAAA,CAAE,GAAG,CAAc,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAK,UAAU,CAAA;AAC7C,CAAC,CAAA,CAAA;;"}
@@ -0,0 +1,19 @@
'use strict';
var GetIntrinsic = require('get-intrinsic');
var callBindBasic = require('call-bind-apply-helpers');
/** @type {(thisArg: string, searchString: string, position?: number) => number} */
var $indexOf = callBindBasic([GetIntrinsic('%String.prototype.indexOf%')]);
/** @type {import('.')} */
module.exports = function callBoundIntrinsic(name, allowMissing) {
/* eslint no-extra-parens: 0 */
var intrinsic = /** @type {(this: unknown, ...args: unknown[]) => unknown} */ (GetIntrinsic(name, !!allowMissing));
if (typeof intrinsic === 'function' && $indexOf(name, '.prototype.') > -1) {
return callBindBasic(/** @type {const} */ ([intrinsic]));
}
return intrinsic;
};
@@ -0,0 +1,17 @@
"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
var skip_first_delay_1 = require("./skip-first/skip-first.delay");
var always_delay_1 = require("./always/always.delay");
function DelayFactory(options, attempt) {
var delay = initDelayClass(options);
delay.setAttemptNumber(attempt);
return delay;
}
exports.DelayFactory = DelayFactory;
function initDelayClass(options) {
if (!options.delayFirstAttempt) {
return new skip_first_delay_1.SkipFirstDelay(options);
}
return new always_delay_1.AlwaysDelay(options);
}
//# sourceMappingURL=delay.factory.js.map
@@ -0,0 +1,615 @@
flf2a$ 6 4 20 0 2
Derived from a copyrighted program by Jan Wolter (janc@crim.eecs.umich.edu)
Figlet-ized by Wendell Hicken (whicken@parasoft.com)
$$@
$$@
$$@
$$@
$$@
$$@@
@
/@
/ @
' @
o @
@@
@
o o@
' '@
@
@
@@
/ /@
-/-/-@
-/-/- @
/ / @
@
@@
,-/-@
(_/ @
/ ) @
-/-' @
@
@@
() /@
/ @
/ @
/ ()@
@
@@
() @
/\ @
( X @
\/ \@
@
@@
@
o@
'@
@
@
@@
_/@
/ @
/ @
/ @
@
@@
/@
/@
_/ @
/ @
@
@@
@
\ / @
--X--@
/ \ @
@
@@
@
/ @
--/--@
/ @
@
@@
@
@
@
o @
' @
@@
@
@
@
---@
@
@@
@
@
@
o@
@
@@
/@
/ @
/ @
/ @
@
@@
__ @
/ )@
/ / @
(__/ @
@
@@
_@
/@
/ @
/ @
@
@@
__ @
)@
.--' @
(__ @
@
@@
__ @
)@
-/ @
___/ @
@
@@
@
/ /@
'--/ @
/ @
@
@@
___@
/ @
'--. @
___) @
@
@@
@
/ @
/_ @
(__)@
@
@@
___@
/@
-/-@
/ @
@
@@
__ @
( )@
./' @
(__) @
@
@@
__ @
(__)@
/ @
/ @
@
@@
@
@
o@
@
o @
@@
@
@
o@
@
o @
' @@
/@
/ @
\ @
\@
@
@@
@
@
---@
---@
@
@@
\ @
\@
/@
/ @
@
@@
__ @
__)@
/ @
o @
@
@@
@
_ @
/o\ @
(____@
@
@@
_, @
/ | @
/--| @
_/ |_@
@
@@
_ __ @
( / )@
/--< @
/___/ @
@
@@
,___@
/ /@
/ @
(___/ @
@
@@
___ @
( / \@
/ /@
(/\_/ @
@
@@
______@
( / @
/-- @
(/____/@
@
@@
______@
( / @
-/-- @
_/ @
@
@@
,___@
/ /@
/ __ @
(___/ @
@
@@
__ @
( / /@
/--/ @
/ /_ @
@
@@
___ @
( / @
/ @
_/_ @
@
@@
___ @
( / @
/ @
_/_ @
// @
(/ @@
__ ,@
( /,/ @
/< @
/ \_ @
@
@@
__ @
( / @
/ @
(/___/@
@
@@
_ _ _ @
( / ) )@
/ / / @
/ / (_ @
@
@@
_ __ @
( / )@
/ / @
/ (_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@
@@
/ @
/_@
_/ @
/ @
@
@@
_ @
/ \_/@
@
@
@
@@
o_,o@
/ | @
/--| @
_/ |_@
@
@@
o__o@
/ ()@
/ / @
(___/ @
@
@@
__o o@
( / / @
/ / @
(_,/_ @
@
@@
@
o o@
__, @
(_/(_@
@
@@
@
o o@
__ @
(_) @
@
@@
@
o o@
, , @
(_/_ @
@
@@
__ @
/ )@
/--< @
/___/ @
/ @
@@
@@ -0,0 +1,51 @@
{
"name": "tree-kill",
"version": "1.2.2",
"description": "kill trees of processes",
"main": "index.js",
"types": "index.d.ts",
"bin": {
"tree-kill": "cli.js"
},
"scripts": {
"test": "mocha"
},
"repository": {
"type": "git",
"url": "git://github.com/pkrumins/node-tree-kill.git"
},
"homepage": "https://github.com/pkrumins/node-tree-kill",
"keywords": [
"tree",
"trees",
"process",
"processes",
"kill",
"signal"
],
"author": {
"name": "Peteris Krumins",
"email": "peteris.krumins@gmail.com",
"url": "http://www.catonmat.net"
},
"contributors": [
{
"name": "Todd Wolfson",
"email": "todd@twolfson.com",
"url": "http://twolfson.com/"
},
{
"name": "William Hilton",
"email": "wmhilton@gmail.com",
"url": "http://wmhilton.com/"
},
{
"name": "Fabrício Matté",
"url": "http://ultcombo.js.org/"
}
],
"license": "MIT",
"devDependencies": {
"mocha": "^2.2.5"
}
}
@@ -0,0 +1,99 @@
import { decodeXML, decodeHTML, DecodingMode } from "./decode.js";
import { encodeHTML, encodeNonAsciiHTML } from "./encode.js";
import { encodeXML, escapeUTF8, escapeAttribute, escapeText, } from "./escape.js";
/** The level of entities to support. */
export var EntityLevel;
(function (EntityLevel) {
/** Support only XML entities. */
EntityLevel[EntityLevel["XML"] = 0] = "XML";
/** Support HTML entities, which are a superset of XML entities. */
EntityLevel[EntityLevel["HTML"] = 1] = "HTML";
})(EntityLevel || (EntityLevel = {}));
export var EncodingMode;
(function (EncodingMode) {
/**
* The output is UTF-8 encoded. Only characters that need escaping within
* XML will be escaped.
*/
EncodingMode[EncodingMode["UTF8"] = 0] = "UTF8";
/**
* The output consists only of ASCII characters. Characters that need
* escaping within HTML, and characters that aren't ASCII characters will
* be escaped.
*/
EncodingMode[EncodingMode["ASCII"] = 1] = "ASCII";
/**
* Encode all characters that have an equivalent entity, as well as all
* characters that are not ASCII characters.
*/
EncodingMode[EncodingMode["Extensive"] = 2] = "Extensive";
/**
* Encode all characters that have to be escaped in HTML attributes,
* following {@link https://html.spec.whatwg.org/multipage/parsing.html#escapingString}.
*/
EncodingMode[EncodingMode["Attribute"] = 3] = "Attribute";
/**
* Encode all characters that have to be escaped in HTML text,
* following {@link https://html.spec.whatwg.org/multipage/parsing.html#escapingString}.
*/
EncodingMode[EncodingMode["Text"] = 4] = "Text";
})(EncodingMode || (EncodingMode = {}));
/**
* Decodes a string with entities.
*
* @param data String to decode.
* @param options Decoding options.
*/
export function decode(data, options = EntityLevel.XML) {
const level = typeof options === "number" ? options : options.level;
if (level === EntityLevel.HTML) {
const mode = typeof options === "object" ? options.mode : undefined;
return decodeHTML(data, mode);
}
return decodeXML(data);
}
/**
* Decodes a string with entities. Does not allow missing trailing semicolons for entities.
*
* @param data String to decode.
* @param options Decoding options.
* @deprecated Use `decode` with the `mode` set to `Strict`.
*/
export function decodeStrict(data, options = EntityLevel.XML) {
var _a;
const opts = typeof options === "number" ? { level: options } : options;
(_a = opts.mode) !== null && _a !== void 0 ? _a : (opts.mode = DecodingMode.Strict);
return decode(data, opts);
}
/**
* Encodes a string with entities.
*
* @param data String to encode.
* @param options Encoding options.
*/
export function encode(data, options = EntityLevel.XML) {
const opts = typeof options === "number" ? { level: options } : options;
// Mode `UTF8` just escapes XML entities
if (opts.mode === EncodingMode.UTF8)
return escapeUTF8(data);
if (opts.mode === EncodingMode.Attribute)
return escapeAttribute(data);
if (opts.mode === EncodingMode.Text)
return escapeText(data);
if (opts.level === EntityLevel.HTML) {
if (opts.mode === EncodingMode.ASCII) {
return encodeNonAsciiHTML(data);
}
return encodeHTML(data);
}
// ASCII and Extensive are equivalent
return encodeXML(data);
}
export { encodeXML, escape, escapeUTF8, escapeAttribute, escapeText, } from "./escape.js";
export { encodeHTML, encodeNonAsciiHTML,
// Legacy aliases (deprecated)
encodeHTML as encodeHTML4, encodeHTML as encodeHTML5, } from "./encode.js";
export { EntityDecoder, DecodingMode, decodeXML, decodeHTML, decodeHTMLStrict, decodeHTMLAttribute,
// Legacy aliases (deprecated)
decodeHTML as decodeHTML4, decodeHTML as decodeHTML5, decodeHTMLStrict as decodeHTML4Strict, decodeHTMLStrict as decodeHTML5Strict, decodeXML as decodeXMLStrict, } from "./decode.js";
//# sourceMappingURL=index.js.map
@@ -0,0 +1,7 @@
{
"version": 3,
"sources": ["../src/primitive.tsx"],
"sourcesContent": ["import * as React from 'react';\nimport * as ReactDOM from 'react-dom';\nimport { createSlot } from '@radix-ui/react-slot';\n\nconst NODES = [\n 'a',\n 'button',\n 'div',\n 'form',\n 'h2',\n 'h3',\n 'img',\n 'input',\n 'label',\n 'li',\n 'nav',\n 'ol',\n 'p',\n 'select',\n 'span',\n 'svg',\n 'ul',\n] as const;\n\ntype Primitives = { [E in (typeof NODES)[number]]: PrimitiveForwardRefComponent<E> };\ntype PrimitivePropsWithRef<E extends React.ElementType> = React.ComponentPropsWithRef<E> & {\n asChild?: boolean;\n};\n\ninterface PrimitiveForwardRefComponent<E extends React.ElementType>\n extends React.ForwardRefExoticComponent<PrimitivePropsWithRef<E>> {}\n\n/* -------------------------------------------------------------------------------------------------\n * Primitive\n * -----------------------------------------------------------------------------------------------*/\n\nconst Primitive = NODES.reduce((primitive, node) => {\n const Slot = createSlot(`Primitive.${node}`);\n const Node = React.forwardRef((props: PrimitivePropsWithRef<typeof node>, forwardedRef: any) => {\n const { asChild, ...primitiveProps } = props;\n const Comp: any = asChild ? Slot : node;\n\n if (typeof window !== 'undefined') {\n (window as any)[Symbol.for('radix-ui')] = true;\n }\n\n return <Comp {...primitiveProps} ref={forwardedRef} />;\n });\n\n Node.displayName = `Primitive.${node}`;\n\n return { ...primitive, [node]: Node };\n}, {} as Primitives);\n\n/* -------------------------------------------------------------------------------------------------\n * Utils\n * -----------------------------------------------------------------------------------------------*/\n\n/**\n * Flush custom event dispatch\n * https://github.com/radix-ui/primitives/pull/1378\n *\n * React batches *all* event handlers since version 18, this introduces certain considerations when using custom event types.\n *\n * Internally, React prioritises events in the following order:\n * - discrete\n * - continuous\n * - default\n *\n * https://github.com/facebook/react/blob/a8a4742f1c54493df00da648a3f9d26e3db9c8b5/packages/react-dom/src/events/ReactDOMEventListener.js#L294-L350\n *\n * `discrete` is an important distinction as updates within these events are applied immediately.\n * React however, is not able to infer the priority of custom event types due to how they are detected internally.\n * Because of this, it's possible for updates from custom events to be unexpectedly batched when\n * dispatched by another `discrete` event.\n *\n * In order to ensure that updates from custom events are applied predictably, we need to manually flush the batch.\n * This utility should be used when dispatching a custom event from within another `discrete` event, this utility\n * is not necessary when dispatching known event types, or if dispatching a custom type inside a non-discrete event.\n * For example:\n *\n * dispatching a known click \uD83D\uDC4E\n * target.dispatchEvent(new Event(\u2018click\u2019))\n *\n * dispatching a custom type within a non-discrete event \uD83D\uDC4E\n * onScroll={(event) => event.target.dispatchEvent(new CustomEvent(\u2018customType\u2019))}\n *\n * dispatching a custom type within a `discrete` event \uD83D\uDC4D\n * onPointerDown={(event) => dispatchDiscreteCustomEvent(event.target, new CustomEvent(\u2018customType\u2019))}\n *\n * Note: though React classifies `focus`, `focusin` and `focusout` events as `discrete`, it's not recommended to use\n * this utility with them. This is because it's possible for those handlers to be called implicitly during render\n * e.g. when focus is within a component as it is unmounted, or when managing focus on mount.\n */\n\nfunction dispatchDiscreteCustomEvent<E extends CustomEvent>(target: E['target'], event: E) {\n if (target) ReactDOM.flushSync(() => target.dispatchEvent(event));\n}\n\n/* -----------------------------------------------------------------------------------------------*/\n\nconst Root = Primitive;\n\nexport {\n Primitive,\n //\n Root,\n //\n dispatchDiscreteCustomEvent,\n};\nexport type { PrimitivePropsWithRef };\n"],
"mappings": ";AAAA,YAAY,WAAW;AACvB,YAAY,cAAc;AAC1B,SAAS,kBAAkB;AA4ChB;AA1CX,IAAM,QAAQ;AAAA,EACZ;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AACF;AAcA,IAAM,YAAY,MAAM,OAAO,CAAC,WAAW,SAAS;AAClD,QAAM,OAAO,WAAW,aAAa,IAAI,EAAE;AAC3C,QAAM,OAAa,iBAAW,CAAC,OAA2C,iBAAsB;AAC9F,UAAM,EAAE,SAAS,GAAG,eAAe,IAAI;AACvC,UAAM,OAAY,UAAU,OAAO;AAEnC,QAAI,OAAO,WAAW,aAAa;AACjC,MAAC,OAAe,OAAO,IAAI,UAAU,CAAC,IAAI;AAAA,IAC5C;AAEA,WAAO,oBAAC,QAAM,GAAG,gBAAgB,KAAK,cAAc;AAAA,EACtD,CAAC;AAED,OAAK,cAAc,aAAa,IAAI;AAEpC,SAAO,EAAE,GAAG,WAAW,CAAC,IAAI,GAAG,KAAK;AACtC,GAAG,CAAC,CAAe;AA2CnB,SAAS,4BAAmD,QAAqB,OAAU;AACzF,MAAI,OAAQ,CAAS,mBAAU,MAAM,OAAO,cAAc,KAAK,CAAC;AAClE;AAIA,IAAM,OAAO;",
"names": []
}
@@ -0,0 +1,20 @@
/**
* @license lucide-react v0.469.0 - ISC
*
* This source code is licensed under the ISC license.
* See the LICENSE file in the root directory of this source tree.
*/
import createLucideIcon from '../createLucideIcon.js';
const CalendarOff = createLucideIcon("CalendarOff", [
["path", { d: "M4.2 4.2A2 2 0 0 0 3 6v14a2 2 0 0 0 2 2h14a2 2 0 0 0 1.82-1.18", key: "16swn3" }],
["path", { d: "M21 15.5V6a2 2 0 0 0-2-2H9.5", key: "yhw86o" }],
["path", { d: "M16 2v4", key: "4m81vk" }],
["path", { d: "M3 10h7", key: "1wap6i" }],
["path", { d: "M21 10h-5.5", key: "quycpq" }],
["path", { d: "m2 2 20 20", key: "1ooewy" }]
]);
export { CalendarOff as default };
//# sourceMappingURL=calendar-off.js.map
@@ -0,0 +1,121 @@
import type { $ZodStringFormats } from "../core/checks.js";
import type * as errors from "../core/errors.js";
import * as util from "../core/util.js";
const error: () => errors.$ZodErrorMap = () => {
const Sizable: Record<string, { unit: string; verb: string }> = {
string: { unit: "tegn", verb: "å ha" },
file: { unit: "bytes", verb: "å ha" },
array: { unit: "elementer", verb: "å inneholde" },
set: { unit: "elementer", verb: "å inneholde" },
map: { unit: "elementer", verb: "å inneholde" },
};
function getSizing(origin: string): { unit: string; verb: string } | null {
return Sizable[origin] ?? null;
}
const FormatDictionary: {
[k in $ZodStringFormats | (string & {})]?: string;
} = {
regex: "input",
email: "e-postadresse",
url: "URL",
emoji: "emoji",
uuid: "UUID",
uuidv4: "UUIDv4",
uuidv6: "UUIDv6",
nanoid: "nanoid",
guid: "GUID",
cuid: "cuid",
cuid2: "cuid2",
ulid: "ULID",
xid: "XID",
ksuid: "KSUID",
datetime: "ISO dato- og klokkeslett",
date: "ISO-dato",
time: "ISO-klokkeslett",
duration: "ISO-varighet",
ipv4: "IPv4-adresse",
ipv6: "IPv6-adresse",
mac: "MAC-adresse",
cidrv4: "IPv4-spekter",
cidrv6: "IPv6-spekter",
base64: "base64-enkodet streng",
base64url: "base64url-enkodet streng",
json_string: "JSON-streng",
e164: "E.164-nummer",
credit_card: "kredittkortnummer",
currency_code: "valutakode",
iban: "IBAN",
jwt: "JWT",
template_literal: "input",
};
const TypeDictionary: {
[k in errors.$ZodInvalidTypeExpected | (string & {})]?: string;
} = {
nan: "NaN",
number: "tall",
array: "liste",
};
return (issue) => {
switch (issue.code) {
case "invalid_type": {
const expected = TypeDictionary[issue.expected] ?? issue.expected;
const receivedType = util.parsedType(issue.input);
const received = TypeDictionary[receivedType] ?? receivedType;
if (/^[A-Z]/.test(issue.expected)) {
return `Ugyldig input: forventet instanceof ${issue.expected}, fikk ${received}`;
}
return `Ugyldig input: forventet ${expected}, fikk ${received}`;
}
case "invalid_value":
if (issue.values.length === 1) return `Ugyldig verdi: forventet ${util.stringifyPrimitive(issue.values[0])}`;
return `Ugyldig valg: forventet en av ${util.joinValues(issue.values, "|")}`;
case "too_big": {
const adj = issue.inclusive ? "<=" : "<";
const sizing = getSizing(issue.origin);
if (sizing)
return `For stor(t): forventet ${issue.origin ?? "value"} til å ha ${adj}${issue.maximum.toString()} ${sizing.unit ?? "elementer"}`;
return `For stor(t): forventet ${issue.origin ?? "value"} til å ha ${adj}${issue.maximum.toString()}`;
}
case "too_small": {
const adj = issue.inclusive ? ">=" : ">";
const sizing = getSizing(issue.origin);
if (sizing) {
return `For lite(n): forventet ${issue.origin} til å ha ${adj}${issue.minimum.toString()} ${sizing.unit}`;
}
return `For lite(n): forventet ${issue.origin} til å ha ${adj}${issue.minimum.toString()}`;
}
case "invalid_format": {
const _issue = issue as errors.$ZodStringFormatIssues;
if (_issue.format === "starts_with") return `Ugyldig streng: må starte med "${_issue.prefix}"`;
if (_issue.format === "ends_with") return `Ugyldig streng: må ende med "${_issue.suffix}"`;
if (_issue.format === "includes") return `Ugyldig streng: må inneholde "${_issue.includes}"`;
if (_issue.format === "regex") return `Ugyldig streng: må matche mønsteret ${_issue.pattern}`;
return `Ugyldig ${FormatDictionary[_issue.format] ?? issue.format}`;
}
case "not_multiple_of":
return `Ugyldig tall: må være et multiplum av ${issue.divisor}`;
case "unrecognized_keys":
return `${issue.keys.length > 1 ? "Ukjente nøkler" : "Ukjent nøkkel"}: ${util.joinValues(issue.keys, ", ")}`;
case "invalid_key":
return `Ugyldig nøkkel i ${issue.origin}`;
case "invalid_union":
return "Ugyldig input";
case "invalid_element":
return `Ugyldig verdi i ${issue.origin}`;
default:
return `Ugyldig input`;
}
};
};
export default function (): { localeError: errors.$ZodErrorMap } {
return {
localeError: error(),
};
}
@@ -0,0 +1 @@
module.exports={A:{A:{"2":"_E"},B:{"1":"_5O","2":"_uL"},C:{"1":"_4H _p","2":"_bB _6F _L"},D:{"1":"_9K _l","2":"_v _hF","194":"_LL","450":"_aN _ZS k"},E:{"1":"_1C","2":"_pD"},F:{"1":"_jO","2":"_4B _eH _O","194":"_4E _MB"},G:{"1":"_kB","2":"_yC"},H:{"2":"1D"},I:{"1":"I","2":"_G"},J:{"2":"_B"},K:{"1":"H","2":"_D"},L:{"1":"I"},M:{"1":"YC"},N:{"2":"_A"},O:{"2":"bC"},P:{"1":"_GB","2":"_gN"},Q:{"2":"JE"},R:{"2":"KE"},S:{"2":"_C"}},B:5,C:"CSS Container Query Units",D:true};
@@ -0,0 +1,2 @@
import { FilterExpression, FilterExpressionKind, QueryFilterObject, TopLevelFilterExpression, and, code, exactRegex, exclude, exprInterpreter, filterVitePlugins, id, importerId, include, interpreter, interpreterImpl, makeIdFiltersToMatchWithQuery, moduleType, not, or, prefixRegex, queries, query } from "./filter/index.mjs";
export { FilterExpression, FilterExpressionKind, QueryFilterObject, TopLevelFilterExpression, and, code, exactRegex, exclude, exprInterpreter, filterVitePlugins, id, importerId, include, interpreter, interpreterImpl, makeIdFiltersToMatchWithQuery, moduleType, not, or, prefixRegex, queries, query };
@@ -0,0 +1,189 @@
/**
* @fileoverview enforce a maximum file length
* @author Alberto Rodríguez
*/
"use strict";
//------------------------------------------------------------------------------
// Requirements
//------------------------------------------------------------------------------
const astUtils = require("./utils/ast-utils");
//------------------------------------------------------------------------------
// Helpers
//------------------------------------------------------------------------------
/**
* Creates an array of numbers from `start` up to, but not including, `end`
* @param {number} start The start of the range
* @param {number} end The end of the range
* @returns {number[]} The range of numbers
*/
function range(start, end) {
return [...Array(end - start).keys()].map(x => x + start);
}
//------------------------------------------------------------------------------
// Rule Definition
//------------------------------------------------------------------------------
/** @type {import('../types').Rule.RuleModule} */
module.exports = {
meta: {
type: "suggestion",
docs: {
description: "Enforce a maximum number of lines per file",
recommended: false,
url: "https://eslint.org/docs/latest/rules/max-lines",
},
schema: [
{
oneOf: [
{
type: "integer",
minimum: 0,
},
{
type: "object",
properties: {
max: {
type: "integer",
minimum: 0,
},
skipComments: {
type: "boolean",
},
skipBlankLines: {
type: "boolean",
},
},
additionalProperties: false,
},
],
},
],
messages: {
exceed: "File has too many lines ({{actual}}). Maximum allowed is {{max}}.",
},
},
create(context) {
const option = context.options[0];
let max = 300;
if (typeof option === "object" && Object.hasOwn(option, "max")) {
max = option.max;
} else if (typeof option === "number") {
max = option;
}
const skipComments = option && option.skipComments;
const skipBlankLines = option && option.skipBlankLines;
const sourceCode = context.sourceCode;
/**
* Returns whether or not a token is a comment node type
* @param {Token} token The token to check
* @returns {boolean} True if the token is a comment node
*/
function isCommentNodeType(token) {
return token && (token.type === "Block" || token.type === "Line");
}
/**
* Returns the line numbers of a comment that don't have any code on the same line
* @param {Node} comment The comment node to check
* @returns {number[]} The line numbers
*/
function getLinesWithoutCode(comment) {
let start = comment.loc.start.line;
let end = comment.loc.end.line;
let token;
token = comment;
do {
token = sourceCode.getTokenBefore(token, {
includeComments: true,
});
} while (isCommentNodeType(token));
if (token && astUtils.isTokenOnSameLine(token, comment)) {
start += 1;
}
token = comment;
do {
token = sourceCode.getTokenAfter(token, {
includeComments: true,
});
} while (isCommentNodeType(token));
if (token && astUtils.isTokenOnSameLine(comment, token)) {
end -= 1;
}
if (start <= end) {
return range(start, end + 1);
}
return [];
}
return {
"Program:exit"() {
let lines = sourceCode.lines.map((text, i) => ({
lineNumber: i + 1,
text,
}));
/*
* If file ends with a linebreak, `sourceCode.lines` will have one extra empty line at the end.
* That isn't a real line, so we shouldn't count it.
*/
if (lines.length > 1 && lines.at(-1).text === "") {
lines.pop();
}
if (skipBlankLines) {
lines = lines.filter(l => l.text.trim() !== "");
}
if (skipComments) {
const comments = sourceCode.getAllComments();
const commentLines = new Set(
comments.flatMap(getLinesWithoutCode),
);
lines = lines.filter(l => !commentLines.has(l.lineNumber));
}
if (lines.length > max) {
const loc = {
start: {
line: lines[max].lineNumber,
column: 0,
},
end: {
line: sourceCode.lines.length,
column: sourceCode.lines.at(-1).length,
},
};
context.report({
loc,
messageId: "exceed",
data: {
max,
actual: lines.length,
},
});
}
},
};
},
};
@@ -0,0 +1 @@
{"version":3,"file":"scale-box-shadow.mjs","sources":["../../../../src/projection/styles/scale-box-shadow.ts"],"sourcesContent":["import { complex } from \"../../value/types/complex\"\nimport { mixNumber } from \"../../utils/mix/number\"\nimport type { ScaleCorrectorDefinition } from \"./types\"\n\nexport const correctBoxShadow: ScaleCorrectorDefinition = {\n correct: (latest: string, { treeScale, projectionDelta }) => {\n const original = latest\n const shadow = complex.parse(latest)\n\n // TODO: Doesn't support multiple shadows\n if (shadow.length > 5) return original\n\n const template = complex.createTransformer(latest)\n const offset = typeof shadow[0] !== \"number\" ? 1 : 0\n\n // Calculate the overall context scale\n const xScale = projectionDelta!.x.scale * treeScale!.x\n const yScale = projectionDelta!.y.scale * treeScale!.y\n\n // Scale x/y\n ;(shadow[0 + offset] as number) /= xScale\n ;(shadow[1 + offset] as number) /= yScale\n\n /**\n * Ideally we'd correct x and y scales individually, but because blur and\n * spread apply to both we have to take a scale average and apply that instead.\n * We could potentially improve the outcome of this by incorporating the ratio between\n * the two scales.\n */\n const averageScale = mixNumber(xScale, yScale, 0.5)\n\n // Blur\n if (typeof shadow[2 + offset] === \"number\")\n (shadow[2 + offset] as number) /= averageScale\n\n // Spread\n if (typeof shadow[3 + offset] === \"number\")\n (shadow[3 + offset] as number) /= averageScale\n\n return template(shadow)\n },\n}\n"],"names":[],"mappings":";;;AAIO,MAAM,gBAAgB,GAA6B;IACtD,OAAO,EAAE,CAAC,MAAc,EAAE,EAAE,SAAS,EAAE,eAAe,EAAE,KAAI;QACxD,MAAM,QAAQ,GAAG,MAAM;QACvB,MAAM,MAAM,GAAG,OAAO,CAAC,KAAK,CAAC,MAAM,CAAC;;AAGpC,QAAA,IAAI,MAAM,CAAC,MAAM,GAAG,CAAC;AAAE,YAAA,OAAO,QAAQ;QAEtC,MAAM,QAAQ,GAAG,OAAO,CAAC,iBAAiB,CAAC,MAAM,CAAC;AAClD,QAAA,MAAM,MAAM,GAAG,OAAO,MAAM,CAAC,CAAC,CAAC,KAAK,QAAQ,GAAG,CAAC,GAAG,CAAC;;QAGpD,MAAM,MAAM,GAAG,eAAgB,CAAC,CAAC,CAAC,KAAK,GAAG,SAAU,CAAC,CAAC;QACtD,MAAM,MAAM,GAAG,eAAgB,CAAC,CAAC,CAAC,KAAK,GAAG,SAAU,CAAC,CAAC;AAGpD,QAAA,MAAM,CAAC,CAAC,GAAG,MAAM,CAAY,IAAI,MAAM;AACvC,QAAA,MAAM,CAAC,CAAC,GAAG,MAAM,CAAY,IAAI,MAAM;AAEzC;;;;;AAKG;QACH,MAAM,YAAY,GAAG,SAAS,CAAC,MAAM,EAAE,MAAM,EAAE,GAAG,CAAC;;QAGnD,IAAI,OAAO,MAAM,CAAC,CAAC,GAAG,MAAM,CAAC,KAAK,QAAQ;AACrC,YAAA,MAAM,CAAC,CAAC,GAAG,MAAM,CAAY,IAAI,YAAY;;QAGlD,IAAI,OAAO,MAAM,CAAC,CAAC,GAAG,MAAM,CAAC,KAAK,QAAQ;AACrC,YAAA,MAAM,CAAC,CAAC,GAAG,MAAM,CAAY,IAAI,YAAY;AAElD,QAAA,OAAO,QAAQ,CAAC,MAAM,CAAC;IAC3B,CAAC;;;;;"}
@@ -0,0 +1 @@
{"version":3,"file":"flower-2.js","sources":["../../../src/icons/flower-2.ts"],"sourcesContent":["import createLucideIcon from '../createLucideIcon';\n\n/**\n * @component @name Flower2\n * @description Lucide SVG icon component, renders SVG Element with children.\n *\n * @preview ![img](data:image/svg+xml;base64,PHN2ZyAgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIgogIHdpZHRoPSIyNCIKICBoZWlnaHQ9IjI0IgogIHZpZXdCb3g9IjAgMCAyNCAyNCIKICBmaWxsPSJub25lIgogIHN0cm9rZT0iIzAwMCIgc3R5bGU9ImJhY2tncm91bmQtY29sb3I6ICNmZmY7IGJvcmRlci1yYWRpdXM6IDJweCIKICBzdHJva2Utd2lkdGg9IjIiCiAgc3Ryb2tlLWxpbmVjYXA9InJvdW5kIgogIHN0cm9rZS1saW5lam9pbj0icm91bmQiCj4KICA8cGF0aCBkPSJNMTIgNWEzIDMgMCAxIDEgMyAzbS0zLTNhMyAzIDAgMSAwLTMgM20zLTN2MU05IDhhMyAzIDAgMSAwIDMgM005IDhoMW01IDBhMyAzIDAgMSAxLTMgM20zLTNoLTFtLTIgM3YtMSIgLz4KICA8Y2lyY2xlIGN4PSIxMiIgY3k9IjgiIHI9IjIiIC8+CiAgPHBhdGggZD0iTTEyIDEwdjEyIiAvPgogIDxwYXRoIGQ9Ik0xMiAyMmM0LjIgMCA3LTEuNjY3IDctNS00LjIgMC03IDEuNjY3LTcgNVoiIC8+CiAgPHBhdGggZD0iTTEyIDIyYy00LjIgMC03LTEuNjY3LTctNSA0LjIgMCA3IDEuNjY3IDcgNVoiIC8+Cjwvc3ZnPgo=) - https://lucide.dev/icons/flower-2\n * @see https://lucide.dev/guide/packages/lucide-react - Documentation\n *\n * @param {Object} props - Lucide icons props and any valid SVG attribute\n * @returns {JSX.Element} JSX Element\n *\n */\nconst Flower2 = createLucideIcon('Flower2', [\n [\n 'path',\n {\n d: 'M12 5a3 3 0 1 1 3 3m-3-3a3 3 0 1 0-3 3m3-3v1M9 8a3 3 0 1 0 3 3M9 8h1m5 0a3 3 0 1 1-3 3m3-3h-1m-2 3v-1',\n key: '3pnvol',\n },\n ],\n ['circle', { cx: '12', cy: '8', r: '2', key: '1822b1' }],\n ['path', { d: 'M12 10v12', key: '6ubwww' }],\n ['path', { d: 'M12 22c4.2 0 7-1.667 7-5-4.2 0-7 1.667-7 5Z', key: '9hd38g' }],\n ['path', { d: 'M12 22c-4.2 0-7-1.667-7-5 4.2 0 7 1.667 7 5Z', key: 'ufn41s' }],\n]);\n\nexport default Flower2;\n"],"names":[],"mappings":";;;;;;;;;AAaM,CAAA,CA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AAA;;"}
@@ -0,0 +1 @@
{"version":3,"file":"lowercase-elements.mjs","sources":["../../../../src/render/svg/lowercase-elements.ts"],"sourcesContent":["/**\n * We keep these listed separately as we use the lowercase tag names as part\n * of the runtime bundle to detect SVG components\n */\nexport const lowercaseSVGElements = [\n \"animate\",\n \"circle\",\n \"defs\",\n \"desc\",\n \"ellipse\",\n \"g\",\n \"image\",\n \"line\",\n \"filter\",\n \"marker\",\n \"mask\",\n \"metadata\",\n \"path\",\n \"pattern\",\n \"polygon\",\n \"polyline\",\n \"rect\",\n \"stop\",\n \"switch\",\n \"symbol\",\n \"svg\",\n \"text\",\n \"tspan\",\n \"use\",\n \"view\",\n]\n"],"names":[],"mappings":"AAAA;;;AAGG;AACI,MAAM,oBAAoB,GAAG;IAChC,SAAS;IACT,QAAQ;IACR,MAAM;IACN,MAAM;IACN,SAAS;IACT,GAAG;IACH,OAAO;IACP,MAAM;IACN,QAAQ;IACR,QAAQ;IACR,MAAM;IACN,UAAU;IACV,MAAM;IACN,SAAS;IACT,SAAS;IACT,UAAU;IACV,MAAM;IACN,MAAM;IACN,QAAQ;IACR,QAAQ;IACR,KAAK;IACL,MAAM;IACN,OAAO;IACP,KAAK;IACL,MAAM;;;;;"}
@@ -0,0 +1,19 @@
/**
* @license lucide-react v0.469.0 - ISC
*
* This source code is licensed under the ISC license.
* See the LICENSE file in the root directory of this source tree.
*/
import createLucideIcon from '../createLucideIcon.js';
const Glasses = createLucideIcon("Glasses", [
["circle", { cx: "6", cy: "15", r: "4", key: "vux9w4" }],
["circle", { cx: "18", cy: "15", r: "4", key: "18o8ve" }],
["path", { d: "M14 15a2 2 0 0 0-2-2 2 2 0 0 0-2 2", key: "1ag4bs" }],
["path", { d: "M2.5 13 5 7c.7-1.3 1.4-2 3-2", key: "1hm1gs" }],
["path", { d: "M21.5 13 19 7c-.7-1.3-1.5-2-3-2", key: "1r31ai" }]
]);
export { Glasses as default };
//# sourceMappingURL=glasses.js.map
@@ -0,0 +1,85 @@
{{# def.definitions }}
{{# def.errors }}
{{# def.setupKeyword }}
{{## def._validateRef:_v:
{{? it.opts.passContext }}
{{=_v}}.call(this,
{{??}}
{{=_v}}(
{{?}}
{{=$data}}, {{# def.dataPath }}{{# def.passParentData }}, rootData)
#}}
{{ var $async, $refCode; }}
{{? $schema == '#' || $schema == '#/' }}
{{
if (it.isRoot) {
$async = it.async;
$refCode = 'validate';
} else {
$async = it.root.schema.$async === true;
$refCode = 'root.refVal[0]';
}
}}
{{??}}
{{ var $refVal = it.resolveRef(it.baseId, $schema, it.isRoot); }}
{{? $refVal === undefined }}
{{ var $message = it.MissingRefError.message(it.baseId, $schema); }}
{{? it.opts.missingRefs == 'fail' }}
{{ it.logger.error($message); }}
{{# def.error:'$ref' }}
{{? $breakOnError }} if (false) { {{?}}
{{?? it.opts.missingRefs == 'ignore' }}
{{ it.logger.warn($message); }}
{{? $breakOnError }} if (true) { {{?}}
{{??}}
{{ throw new it.MissingRefError(it.baseId, $schema, $message); }}
{{?}}
{{?? $refVal.inline }}
{{# def.setupNextLevel }}
{{
$it.schema = $refVal.schema;
$it.schemaPath = '';
$it.errSchemaPath = $schema;
}}
{{ var $code = it.validate($it).replace(/validate\.schema/g, $refVal.code); }}
{{= $code }}
{{? $breakOnError}}
if ({{=$nextValid}}) {
{{?}}
{{??}}
{{
$async = $refVal.$async === true || (it.async && $refVal.$async !== false);
$refCode = $refVal.code;
}}
{{?}}
{{?}}
{{? $refCode }}
{{# def.beginDefOut}}
{{# def._validateRef:$refCode }}
{{# def.storeDefOut:__callValidate }}
{{? $async }}
{{ if (!it.async) throw new Error('async schema referenced by sync schema'); }}
{{? $breakOnError }} var {{=$valid}}; {{?}}
try {
await {{=__callValidate}};
{{? $breakOnError }} {{=$valid}} = true; {{?}}
} catch (e) {
if (!(e instanceof ValidationError)) throw e;
if (vErrors === null) vErrors = e.errors;
else vErrors = vErrors.concat(e.errors);
errors = vErrors.length;
{{? $breakOnError }} {{=$valid}} = false; {{?}}
}
{{? $breakOnError }} if ({{=$valid}}) { {{?}}
{{??}}
if (!{{=__callValidate}}) {
if (vErrors === null) vErrors = {{=$refCode}}.errors;
else vErrors = vErrors.concat({{=$refCode}}.errors);
errors = vErrors.length;
} {{? $breakOnError }} else { {{?}}
{{?}}
{{?}}
@@ -0,0 +1,261 @@
const util = require('./util')
module.exports = function stringify (value, replacer, space) {
const stack = []
let indent = ''
let propertyList
let replacerFunc
let gap = ''
let quote
if (
replacer != null &&
typeof replacer === 'object' &&
!Array.isArray(replacer)
) {
space = replacer.space
quote = replacer.quote
replacer = replacer.replacer
}
if (typeof replacer === 'function') {
replacerFunc = replacer
} else if (Array.isArray(replacer)) {
propertyList = []
for (const v of replacer) {
let item
if (typeof v === 'string') {
item = v
} else if (
typeof v === 'number' ||
v instanceof String ||
v instanceof Number
) {
item = String(v)
}
if (item !== undefined && propertyList.indexOf(item) < 0) {
propertyList.push(item)
}
}
}
if (space instanceof Number) {
space = Number(space)
} else if (space instanceof String) {
space = String(space)
}
if (typeof space === 'number') {
if (space > 0) {
space = Math.min(10, Math.floor(space))
gap = ' '.substr(0, space)
}
} else if (typeof space === 'string') {
gap = space.substr(0, 10)
}
return serializeProperty('', {'': value})
function serializeProperty (key, holder) {
let value = holder[key]
if (value != null) {
if (typeof value.toJSON5 === 'function') {
value = value.toJSON5(key)
} else if (typeof value.toJSON === 'function') {
value = value.toJSON(key)
}
}
if (replacerFunc) {
value = replacerFunc.call(holder, key, value)
}
if (value instanceof Number) {
value = Number(value)
} else if (value instanceof String) {
value = String(value)
} else if (value instanceof Boolean) {
value = value.valueOf()
}
switch (value) {
case null: return 'null'
case true: return 'true'
case false: return 'false'
}
if (typeof value === 'string') {
return quoteString(value, false)
}
if (typeof value === 'number') {
return String(value)
}
if (typeof value === 'object') {
return Array.isArray(value) ? serializeArray(value) : serializeObject(value)
}
return undefined
}
function quoteString (value) {
const quotes = {
"'": 0.1,
'"': 0.2,
}
const replacements = {
"'": "\\'",
'"': '\\"',
'\\': '\\\\',
'\b': '\\b',
'\f': '\\f',
'\n': '\\n',
'\r': '\\r',
'\t': '\\t',
'\v': '\\v',
'\0': '\\0',
'\u2028': '\\u2028',
'\u2029': '\\u2029',
}
let product = ''
for (let i = 0; i < value.length; i++) {
const c = value[i]
switch (c) {
case "'":
case '"':
quotes[c]++
product += c
continue
case '\0':
if (util.isDigit(value[i + 1])) {
product += '\\x00'
continue
}
}
if (replacements[c]) {
product += replacements[c]
continue
}
if (c < ' ') {
let hexString = c.charCodeAt(0).toString(16)
product += '\\x' + ('00' + hexString).substring(hexString.length)
continue
}
product += c
}
const quoteChar = quote || Object.keys(quotes).reduce((a, b) => (quotes[a] < quotes[b]) ? a : b)
product = product.replace(new RegExp(quoteChar, 'g'), replacements[quoteChar])
return quoteChar + product + quoteChar
}
function serializeObject (value) {
if (stack.indexOf(value) >= 0) {
throw TypeError('Converting circular structure to JSON5')
}
stack.push(value)
let stepback = indent
indent = indent + gap
let keys = propertyList || Object.keys(value)
let partial = []
for (const key of keys) {
const propertyString = serializeProperty(key, value)
if (propertyString !== undefined) {
let member = serializeKey(key) + ':'
if (gap !== '') {
member += ' '
}
member += propertyString
partial.push(member)
}
}
let final
if (partial.length === 0) {
final = '{}'
} else {
let properties
if (gap === '') {
properties = partial.join(',')
final = '{' + properties + '}'
} else {
let separator = ',\n' + indent
properties = partial.join(separator)
final = '{\n' + indent + properties + ',\n' + stepback + '}'
}
}
stack.pop()
indent = stepback
return final
}
function serializeKey (key) {
if (key.length === 0) {
return quoteString(key, true)
}
const firstChar = String.fromCodePoint(key.codePointAt(0))
if (!util.isIdStartChar(firstChar)) {
return quoteString(key, true)
}
for (let i = firstChar.length; i < key.length; i++) {
if (!util.isIdContinueChar(String.fromCodePoint(key.codePointAt(i)))) {
return quoteString(key, true)
}
}
return key
}
function serializeArray (value) {
if (stack.indexOf(value) >= 0) {
throw TypeError('Converting circular structure to JSON5')
}
stack.push(value)
let stepback = indent
indent = indent + gap
let partial = []
for (let i = 0; i < value.length; i++) {
const propertyString = serializeProperty(String(i), value)
partial.push((propertyString !== undefined) ? propertyString : 'null')
}
let final
if (partial.length === 0) {
final = '[]'
} else {
if (gap === '') {
let properties = partial.join(',')
final = '[' + properties + ']'
} else {
let separator = ',\n' + indent
let properties = partial.join(separator)
final = '[\n' + indent + properties + ',\n' + stepback + ']'
}
}
stack.pop()
indent = stepback
return final
}
}
@@ -0,0 +1,18 @@
/**
* @license lucide-react v0.469.0 - ISC
*
* This source code is licensed under the ISC license.
* See the LICENSE file in the root directory of this source tree.
*/
import createLucideIcon from '../createLucideIcon.js';
const Annoyed = createLucideIcon("Annoyed", [
["circle", { cx: "12", cy: "12", r: "10", key: "1mglay" }],
["path", { d: "M8 15h8", key: "45n4r" }],
["path", { d: "M8 9h2", key: "1g203m" }],
["path", { d: "M14 9h2", key: "116p9w" }]
]);
export { Annoyed as default };
//# sourceMappingURL=annoyed.js.map
@@ -0,0 +1,22 @@
/**
* @license lucide-react v0.469.0 - ISC
*
* This source code is licensed under the ISC license.
* See the LICENSE file in the root directory of this source tree.
*/
import createLucideIcon from '../createLucideIcon.js';
const UnfoldHorizontal = createLucideIcon("UnfoldHorizontal", [
["path", { d: "M16 12h6", key: "15xry1" }],
["path", { d: "M8 12H2", key: "1jqql6" }],
["path", { d: "M12 2v2", key: "tus03m" }],
["path", { d: "M12 8v2", key: "1woqiv" }],
["path", { d: "M12 14v2", key: "8jcxud" }],
["path", { d: "M12 20v2", key: "1lh1kg" }],
["path", { d: "m19 15 3-3-3-3", key: "wjy7rq" }],
["path", { d: "m5 9-3 3 3 3", key: "j64kie" }]
]);
export { UnfoldHorizontal as default };
//# sourceMappingURL=unfold-horizontal.js.map
@@ -0,0 +1,238 @@
//#region src/utils/ipaddr.ts
/**
* Expand IPv6 Address
* @param ipV6 Shorten IPv6 Address
* @return expanded IPv6 Address
*/
const expandIPv6 = (ipV6) => {
const sections = ipV6.split(":");
const lastSection = sections.at(-1);
if (IPV4_REGEX.test(lastSection)) {
const octets = lastSection.split(".").map(Number);
sections.splice(-1, 1, (octets[0] << 8 | octets[1]).toString(16), (octets[2] << 8 | octets[3]).toString(16));
}
for (let i = 0; i < sections.length; i++) {
const node = sections[i];
if (node !== "") sections[i] = node.padStart(4, "0");
else {
while (sections[i + 1] === "") sections.splice(i + 1, 1);
sections[i] = new Array(8 - sections.length + 1).fill("0000").join(":");
}
}
return sections.join(":");
};
const IPV4_OCTET_PART = "(?:25[0-5]|2[0-4][0-9]|1[0-9]{2}|[1-9]?[0-9])";
const IPV4_REGEX = new RegExp(`^(?:${IPV4_OCTET_PART}\\.){3}${IPV4_OCTET_PART}$`);
const INVALID_IP_ADDRESS_ERROR_CODE = "ERR_INVALID_IP_ADDRESS";
const CHAR_CODE_0 = 48;
const CHAR_CODE_9 = 57;
const CHAR_CODE_A = 65;
const CHAR_CODE_F = 70;
const CHAR_CODE_a = 97;
const CHAR_CODE_f = 102;
const CHAR_CODE_DOT = 46;
const CHAR_CODE_COLON = 58;
const CHAR_CODE_PERCENT = 37;
/**
* Distinct Remote Addr
* @param remoteAddr Remote Addr
*/
const distinctRemoteAddr = (remoteAddr) => {
if (IPV4_REGEX.test(remoteAddr)) return "IPv4";
if (remoteAddr.includes(":")) return "IPv6";
};
const createInvalidIPAddressError = (message) => {
const error = new TypeError(message);
error.code = INVALID_IP_ADDRESS_ERROR_CODE;
return error;
};
const throwInvalidIPv4Address = (ipv4) => {
throw createInvalidIPAddressError(`Invalid IPv4 address: ${ipv4}`);
};
const throwInvalidIPv6Address = (ipv6) => {
throw createInvalidIPAddressError(`Invalid IPv6 address: ${ipv6}`);
};
const parseIPv4ToBinary = (ipv4, start, end, onInvalid) => {
let result = 0n;
let octets = 0;
let octet = 0;
let digits = 0;
let firstDigit = 0;
for (let i = start; i <= end; i++) {
const code = i < end ? ipv4.charCodeAt(i) : CHAR_CODE_DOT;
if (code >= CHAR_CODE_0 && code <= CHAR_CODE_9) {
if (digits === 0) firstDigit = code;
else if (firstDigit === CHAR_CODE_0) onInvalid();
octet = octet * 10 + code - CHAR_CODE_0;
if (octet > 255) onInvalid();
digits++;
continue;
}
if (code !== CHAR_CODE_DOT || digits === 0 || octets === 4) onInvalid();
result = (result << 8n) + BigInt(octet);
octets++;
octet = 0;
digits = 0;
}
if (octets !== 4) onInvalid();
return result;
};
const parseIPv6HexCode = (code) => {
if (code >= CHAR_CODE_0 && code <= CHAR_CODE_9) return code - CHAR_CODE_0;
if (code >= CHAR_CODE_A && code <= CHAR_CODE_F) return code - CHAR_CODE_A + 10;
if (code >= CHAR_CODE_a && code <= CHAR_CODE_f) return code - CHAR_CODE_a + 10;
return -1;
};
const isIPv6LinkLocal = (ipv6binary) => ipv6binary >> 118n === 1018n;
/**
* Convert IPv4 to Uint8Array
* @param ipv4 IPv4 Address
* @returns BigInt
*/
const convertIPv4ToBinary = (ipv4) => {
return parseIPv4ToBinary(ipv4, 0, ipv4.length, () => throwInvalidIPv4Address(ipv4));
};
/**
* Convert IPv6 to Uint8Array
* @param ipv6 IPv6 Address
* @returns BigInt
*/
const convertIPv6ToBinary = (ipv6) => {
const length = ipv6.length;
const sections = [];
let hasZoneId = false;
let compressAt = -1;
let index = 0;
if (length === 0) throwInvalidIPv6Address(ipv6);
while (index < length) {
if (sections.length > 8) throwInvalidIPv6Address(ipv6);
let code = ipv6.charCodeAt(index);
if (code === CHAR_CODE_PERCENT) {
if (index + 1 === length) throwInvalidIPv6Address(ipv6);
hasZoneId = true;
break;
}
if (code === CHAR_CODE_COLON) {
if (index + 1 < length && ipv6.charCodeAt(index + 1) === CHAR_CODE_COLON) {
if (compressAt !== -1) throwInvalidIPv6Address(ipv6);
compressAt = sections.length;
index += 2;
continue;
}
throwInvalidIPv6Address(ipv6);
}
let value = 0;
let digits = 0;
const sectionStart = index;
while (index < length) {
code = ipv6.charCodeAt(index);
const hex = parseIPv6HexCode(code);
if (hex === -1) break;
if (digits === 4) throwInvalidIPv6Address(ipv6);
value = value << 4 | hex;
digits++;
index++;
}
if (index < length && ipv6.charCodeAt(index) === CHAR_CODE_DOT) {
let ipv4End = length;
for (let i = index; i < length; i++) if (ipv6.charCodeAt(i) === CHAR_CODE_PERCENT) {
if (i + 1 === length) throwInvalidIPv6Address(ipv6);
hasZoneId = true;
ipv4End = i;
break;
}
const ipv4 = parseIPv4ToBinary(ipv6, sectionStart, ipv4End, () => throwInvalidIPv6Address(ipv6));
sections.push(Number(ipv4 >> 16n & 65535n), Number(ipv4 & 65535n));
index = length;
break;
}
if (digits === 0) throwInvalidIPv6Address(ipv6);
sections.push(value);
if (index === length) break;
code = ipv6.charCodeAt(index);
if (code === CHAR_CODE_PERCENT) {
if (index + 1 === length) throwInvalidIPv6Address(ipv6);
hasZoneId = true;
break;
}
if (code !== CHAR_CODE_COLON) throwInvalidIPv6Address(ipv6);
if (index + 1 < length && ipv6.charCodeAt(index + 1) === CHAR_CODE_COLON) {
if (compressAt !== -1) throwInvalidIPv6Address(ipv6);
compressAt = sections.length;
index += 2;
continue;
}
index++;
if (index === length) throwInvalidIPv6Address(ipv6);
}
if (compressAt === -1 ? sections.length !== 8 : sections.length >= 8) throwInvalidIPv6Address(ipv6);
let result = 0n;
const zeros = compressAt === -1 ? 0 : 8 - sections.length;
const firstSectionEnd = compressAt === -1 ? sections.length : compressAt;
for (let i = 0; i < firstSectionEnd; i++) {
result <<= 16n;
result += BigInt(sections[i]);
}
for (let i = 0; i < zeros; i++) result <<= 16n;
for (let i = firstSectionEnd; i < sections.length; i++) {
result <<= 16n;
result += BigInt(sections[i]);
}
if (hasZoneId && !isIPv6LinkLocal(result)) throwInvalidIPv6Address(ipv6);
return result;
};
/**
* Convert a binary representation of an IPv4 address to a string.
* @param ipV4 binary IPv4 Address
* @return IPv4 Address in string
*/
const convertIPv4BinaryToString = (ipV4) => {
const sections = [];
for (let i = 0; i < 4; i++) sections.push(ipV4 >> BigInt(8 * (3 - i)) & 255n);
return sections.join(".");
};
/**
* Check if a binary IPv6 address is an IPv4-mapped IPv6 address (::ffff:x.x.x.x)
* @param ipv6binary binary IPv6 Address
* @return true if the address is an IPv4-mapped IPv6 address
*/
const isIPv4MappedIPv6 = (ipv6binary) => ipv6binary >> 32n === 65535n;
/**
* Extract the IPv4 portion from an IPv4-mapped IPv6 address
* @param ipv6binary binary IPv4-mapped IPv6 Address
* @return binary IPv4 Address
*/
const convertIPv4MappedIPv6ToIPv4 = (ipv6binary) => ipv6binary & 4294967295n;
/**
* Convert a binary representation of an IPv6 address to a string.
* @param ipV6 binary IPv6 Address
* @return normalized IPv6 Address in string
*/
const convertIPv6BinaryToString = (ipV6) => {
if (ipV6 === 0n) return "::";
if (isIPv4MappedIPv6(ipV6)) return `::ffff:${convertIPv4BinaryToString(convertIPv4MappedIPv6ToIPv4(ipV6))}`;
const sections = [];
for (let i = 0; i < 8; i++) sections.push((ipV6 >> BigInt(16 * (7 - i)) & 65535n).toString(16));
let currentZeroStart = -1;
let maxZeroStart = -1;
let maxZeroEnd = -1;
for (let i = 0; i < 8; i++) if (sections[i] === "0") {
if (currentZeroStart === -1) currentZeroStart = i;
} else if (currentZeroStart > -1) {
if (i - currentZeroStart > maxZeroEnd - maxZeroStart) {
maxZeroStart = currentZeroStart;
maxZeroEnd = i;
}
currentZeroStart = -1;
}
if (currentZeroStart > -1) {
if (8 - currentZeroStart > maxZeroEnd - maxZeroStart) {
maxZeroStart = currentZeroStart;
maxZeroEnd = 8;
}
}
if (maxZeroStart !== -1 && maxZeroEnd - maxZeroStart > 1) sections.splice(maxZeroStart, maxZeroEnd - maxZeroStart, ":");
return sections.join(":").replace(/:{2,}/g, "::");
};
//#endregion
export { INVALID_IP_ADDRESS_ERROR_CODE, convertIPv4BinaryToString, convertIPv4MappedIPv6ToIPv4, convertIPv4ToBinary, convertIPv6BinaryToString, convertIPv6ToBinary, distinctRemoteAddr, expandIPv6, isIPv4MappedIPv6 };
@@ -0,0 +1,668 @@
/**
* @fileoverview Utility to load config files
* @author Nicholas C. Zakas
*/
"use strict";
//------------------------------------------------------------------------------
// Requirements
//------------------------------------------------------------------------------
const path = require("node:path");
const fs = require("node:fs/promises");
const findUp = require("find-up");
const { pathToFileURL } = require("node:url");
const debug = require("debug")("eslint:config-loader");
const { FlatConfigArray } = require("./flat-config-array");
const { WarningService } = require("../services/warning-service");
//-----------------------------------------------------------------------------
// Types
//-----------------------------------------------------------------------------
/** @typedef {import("../types").Linter.Config} Config */
/**
* @typedef {Object} ConfigLoaderOptions
* @property {string|false|undefined} configFile The path to the config file to use.
* @property {string} cwd The current working directory.
* @property {boolean} ignoreEnabled Indicates if ignore patterns should be honored.
* @property {Config|Array<Config>} [baseConfig] The base config to use.
* @property {Array<Config>} [defaultConfigs] The default configs to use.
* @property {Array<string>} [ignorePatterns] The ignore patterns to use.
* @property {Config|Array<Config>} [overrideConfig] The override config to use.
* @property {boolean} [hasUnstableNativeNodeJsTSConfigFlag] The flag to indicate whether the `unstable_native_nodejs_ts_config` flag is enabled.
* @property {WarningService} [warningService] The warning service to use.
*/
//------------------------------------------------------------------------------
// Helpers
//------------------------------------------------------------------------------
const FLAT_CONFIG_FILENAMES = [
"eslint.config.js",
"eslint.config.mjs",
"eslint.config.cjs",
"eslint.config.ts",
"eslint.config.mts",
"eslint.config.cts",
];
const importedConfigFileModificationTime = new Map();
/**
* Asserts that the given file path is valid.
* @param {string} filePath The file path to check.
* @returns {void}
* @throws {Error} If `filePath` is not a non-empty string.
*/
function assertValidFilePath(filePath) {
if (!filePath || typeof filePath !== "string") {
throw new Error("'filePath' must be a non-empty string");
}
}
/**
* Asserts that a configuration exists. A configuration exists if any
* of the following are true:
* - `configFilePath` is defined.
* - `useConfigFile` is `false`.
* @param {string|undefined} configFilePath The path to the config file.
* @param {ConfigLoaderOptions} loaderOptions The options to use when loading configuration files.
* @returns {void}
* @throws {Error} If no configuration exists.
*/
function assertConfigurationExists(configFilePath, loaderOptions) {
const { configFile: useConfigFile } = loaderOptions;
if (!configFilePath && useConfigFile !== false) {
const error = new Error("Could not find config file.");
error.messageTemplate = "config-file-missing";
throw error;
}
}
/**
* Check if the file is a TypeScript file.
* @param {string} filePath The file path to check.
* @returns {boolean} `true` if the file is a TypeScript file, `false` if it's not.
*/
function isFileTS(filePath) {
const fileExtension = path.extname(filePath);
return /^\.[mc]?ts$/u.test(fileExtension);
}
/**
* Check if ESLint is running in Bun.
* @returns {boolean} `true` if the ESLint is running Bun, `false` if it's not.
*/
function isRunningInBun() {
return !!globalThis.Bun;
}
/**
* Check if ESLint is running in Deno.
* @returns {boolean} `true` if the ESLint is running in Deno, `false` if it's not.
*/
function isRunningInDeno() {
return !!globalThis.Deno;
}
/**
* Checks if native TypeScript support is
* enabled in the current Node.js process.
*
* This function determines if the
* {@linkcode NodeJS.ProcessFeatures.typescript | typescript}
* feature is present in the
* {@linkcode process.features} object
* and if its value is either "strip" or "transform".
* @returns {boolean} `true` if native TypeScript support is enabled, otherwise `false`.
* @since 9.24.0
*/
function isNativeTypeScriptSupportEnabled() {
return (
// eslint-disable-next-line n/no-unsupported-features/node-builtins -- it's still an experimental feature.
["strip", "transform"].includes(process.features.typescript)
);
}
/**
* Load the TypeScript configuration file.
* @param {string} filePath The absolute file path to load.
* @param {URL} fileURL The file URL to load.
* @param {number} mtime The last modified timestamp of the file.
* @returns {Promise<any>} The configuration loaded from the file.
* @since 9.24.0
*/
async function loadTypeScriptConfigFileWithJiti(filePath, fileURL, mtime) {
const { createJiti, version: jitiVersion } =
// eslint-disable-next-line no-use-before-define -- `ConfigLoader.loadJiti` can be overwritten for testing
await ConfigLoader.loadJiti().catch(() => {
throw new Error(
"The 'jiti' library is required for loading TypeScript configuration files. Make sure to install it.",
);
});
// Ensure the version is at least 2.2.0.
const [jitiMajor, jitiMinor] = jitiVersion
.split(".")
.map(versionPart => Number(versionPart));
if (jitiMajor < 2 || (jitiMajor === 2 && jitiMinor < 2)) {
throw new Error(
"You are using an outdated version of the 'jiti' library. Please update to the latest version of 'jiti' to ensure compatibility and access to the latest features.",
);
}
/*
* Disabling `moduleCache` allows us to reload a
* config file when the last modified timestamp changes.
*/
const jitiOptions = {
moduleCache: false,
};
const jiti = createJiti(__filename, jitiOptions);
const config = await jiti.import(fileURL.href);
importedConfigFileModificationTime.set(filePath, mtime);
return config?.default ?? config;
}
/**
* Dynamically imports a module from the given file path.
* @param {string} filePath The absolute file path of the module to import.
* @param {URL} fileURL The file URL to load.
* @param {number} mtime The last modified timestamp of the file.
* @returns {Promise<any>} - A {@linkcode Promise | promise} that resolves to the imported ESLint config.
* @since 9.24.0
*/
async function dynamicImportConfig(filePath, fileURL, mtime) {
const module = await import(fileURL.href);
importedConfigFileModificationTime.set(filePath, mtime);
return module.default;
}
/**
* Load the config array from the given filename.
* @param {string} filePath The filename to load from.
* @param {boolean} hasUnstableNativeNodeJsTSConfigFlag The flag to indicate whether the `unstable_native_nodejs_ts_config` flag is enabled.
* @returns {Promise<any>} The config loaded from the config file.
*/
async function loadConfigFile(filePath, hasUnstableNativeNodeJsTSConfigFlag) {
debug(`Loading config from ${filePath}`);
const fileURL = pathToFileURL(filePath);
debug(`Config file URL is ${fileURL}`);
const mtime = (await fs.stat(filePath)).mtime.getTime();
/*
* Append a query with the config file's modification time (`mtime`) in order
* to import the current version of the config file. Without the query, `import()` would
* cache the config file module by the pathname only, and then always return
* the same version (the one that was actual when the module was imported for the first time).
*
* This ensures that the config file module is loaded and executed again
* if it has been changed since the last time it was imported.
* If it hasn't been changed, `import()` will just return the cached version.
*
* Note that we should not overuse queries (e.g., by appending the current time
* to always reload the config file module) as that could cause memory leaks
* because entries are never removed from the import cache.
*/
fileURL.searchParams.append("mtime", mtime);
/*
* With queries, we can bypass the import cache. However, when import-ing a CJS module,
* Node.js uses the require infrastructure under the hood. That includes the require cache,
* which caches the config file module by its file path (queries have no effect).
* Therefore, we also need to clear the require cache before importing the config file module.
* In order to get the same behavior with ESM and CJS config files, in particular - to reload
* the config file only if it has been changed, we track file modification times and clear
* the require cache only if the file has been changed.
*/
if (importedConfigFileModificationTime.get(filePath) !== mtime) {
delete require.cache[filePath];
}
const isTS = isFileTS(filePath);
const isBun = isRunningInBun();
const isDeno = isRunningInDeno();
/*
* If we are dealing with a TypeScript file, then we need to use `jiti` to load it
* in Node.js. Deno and Bun both allow native importing of TypeScript files.
*
* When Node.js supports native TypeScript imports, we can remove this check.
*/
if (isTS) {
if (hasUnstableNativeNodeJsTSConfigFlag) {
if (isNativeTypeScriptSupportEnabled()) {
return await dynamicImportConfig(filePath, fileURL, mtime);
}
if (!("typescript" in process.features)) {
throw new Error(
"The unstable_native_nodejs_ts_config flag is not supported in older versions of Node.js.",
);
}
throw new Error(
"The unstable_native_nodejs_ts_config flag is enabled, but native TypeScript support is not enabled in the current Node.js process. You need to either enable native TypeScript support by passing --experimental-strip-types or remove the unstable_native_nodejs_ts_config flag.",
);
}
if (!isDeno && !isBun) {
return await loadTypeScriptConfigFileWithJiti(
filePath,
fileURL,
mtime,
);
}
}
// fallback to normal runtime behavior
return await dynamicImportConfig(filePath, fileURL, mtime);
}
//-----------------------------------------------------------------------------
// Exports
//-----------------------------------------------------------------------------
/**
* Encapsulates the loading and caching of configuration files when looking up
* from the file being linted.
*/
class ConfigLoader {
/**
* Map of config file paths to the config arrays for those directories.
* @type {Map<string, FlatConfigArray|Promise<FlatConfigArray>>}
*/
#configArrays = new Map();
/**
* Map of absolute directory names to the config file paths for those directories.
* @type {Map<string, {configFilePath:string,basePath:string}|Promise<{configFilePath:string,basePath:string}>>}
*/
#configFilePaths = new Map();
/**
* The options to use when loading configuration files.
* @type {ConfigLoaderOptions}
*/
#options;
/**
* Creates a new instance.
* @param {ConfigLoaderOptions} options The options to use when loading configuration files.
*/
constructor(options) {
this.#options = options.warningService
? options
: { ...options, warningService: new WarningService() };
}
/**
* Determines which config file to use. This is determined by seeing if an
* override config file was specified, and if so, using it; otherwise, as long
* as override config file is not explicitly set to `false`, it will search
* upwards from `fromDirectory` for a file named `eslint.config.js`.
* @param {string} fromDirectory The directory from which to start searching.
* @returns {Promise<{configFilePath:string|undefined,basePath:string}>} Location information for
* the config file.
*/
async #locateConfigFileToUse(fromDirectory) {
// check cache first
if (this.#configFilePaths.has(fromDirectory)) {
return this.#configFilePaths.get(fromDirectory);
}
const resultPromise = ConfigLoader.locateConfigFileToUse({
useConfigFile: this.#options.configFile,
cwd: this.#options.cwd,
fromDirectory,
});
// ensure `ConfigLoader.locateConfigFileToUse` is called only once for `fromDirectory`
this.#configFilePaths.set(fromDirectory, resultPromise);
// Unwrap the promise. This is primarily for the sync `getCachedConfigArrayForPath` method.
const result = await resultPromise;
this.#configFilePaths.set(fromDirectory, result);
return result;
}
/**
* Calculates the config array for this run based on inputs.
* @param {string} configFilePath The absolute path to the config file to use if not overridden.
* @param {string} basePath The base path to use for relative paths in the config file.
* @returns {Promise<FlatConfigArray>} The config array for `eslint`.
*/
async #calculateConfigArray(configFilePath, basePath) {
// check for cached version first
if (this.#configArrays.has(configFilePath)) {
return this.#configArrays.get(configFilePath);
}
const configsPromise = ConfigLoader.calculateConfigArray(
configFilePath,
basePath,
this.#options,
);
// ensure `ConfigLoader.calculateConfigArray` is called only once for `configFilePath`
this.#configArrays.set(configFilePath, configsPromise);
// Unwrap the promise. This is primarily for the sync `getCachedConfigArrayForPath` method.
const configs = await configsPromise;
this.#configArrays.set(configFilePath, configs);
return configs;
}
/**
* Returns the config file path for the given directory or file. This will either use
* the override config file that was specified in the constructor options or
* search for a config file from the directory.
* @param {string} fileOrDirPath The file or directory path to get the config file path for.
* @returns {Promise<string|undefined>} The config file path or `undefined` if not found.
* @throws {Error} If `fileOrDirPath` is not a non-empty string.
* @throws {Error} If `fileOrDirPath` is not an absolute path.
*/
async findConfigFileForPath(fileOrDirPath) {
assertValidFilePath(fileOrDirPath);
const absoluteDirPath = path.resolve(
this.#options.cwd,
path.dirname(fileOrDirPath),
);
const { configFilePath } =
await this.#locateConfigFileToUse(absoluteDirPath);
return configFilePath;
}
/**
* Returns a configuration object for the given file based on the CLI options.
* This is the same logic used by the ESLint CLI executable to determine
* configuration for each file it processes.
* @param {string} filePath The path of the file or directory to retrieve config for.
* @returns {Promise<FlatConfigArray>} A configuration object for the file.
* @throws {Error} If no configuration for `filePath` exists.
*/
async loadConfigArrayForFile(filePath) {
assertValidFilePath(filePath);
debug(`Calculating config for file ${filePath}`);
const configFilePath = await this.findConfigFileForPath(filePath);
assertConfigurationExists(configFilePath, this.#options);
return this.loadConfigArrayForDirectory(filePath);
}
/**
* Returns a configuration object for the given directory based on the CLI options.
* This is the same logic used by the ESLint CLI executable to determine
* configuration for each file it processes.
* @param {string} dirPath The path of the directory to retrieve config for.
* @returns {Promise<FlatConfigArray>} A configuration object for the directory.
*/
async loadConfigArrayForDirectory(dirPath) {
assertValidFilePath(dirPath);
debug(`Calculating config for directory ${dirPath}`);
const absoluteDirPath = path.resolve(
this.#options.cwd,
path.dirname(dirPath),
);
const { configFilePath, basePath } =
await this.#locateConfigFileToUse(absoluteDirPath);
debug(`Using config file ${configFilePath} and base path ${basePath}`);
return this.#calculateConfigArray(configFilePath, basePath);
}
/**
* Returns a configuration array for the given file based on the CLI options.
* This is a synchronous operation and does not read any files from disk. It's
* intended to be used in locations where we know the config file has already
* been loaded and we just need to get the configuration for a file.
* @param {string} filePath The path of the file to retrieve a config object for.
* @returns {FlatConfigArray} A configuration object for the file.
* @throws {Error} If `filePath` is not a non-empty string.
* @throws {Error} If `filePath` is not an absolute path.
* @throws {Error} If the config file was not already loaded.
*/
getCachedConfigArrayForFile(filePath) {
assertValidFilePath(filePath);
debug(`Looking up cached config for ${filePath}`);
return this.getCachedConfigArrayForPath(path.dirname(filePath));
}
/**
* Returns a configuration array for the given directory based on the CLI options.
* This is a synchronous operation and does not read any files from disk. It's
* intended to be used in locations where we know the config file has already
* been loaded and we just need to get the configuration for a file.
* @param {string} fileOrDirPath The path of the directory to retrieve a config object for.
* @returns {FlatConfigArray} A configuration object for the directory.
* @throws {Error} If `dirPath` is not a non-empty string.
* @throws {Error} If `dirPath` is not an absolute path.
* @throws {Error} If the config file was not already loaded.
*/
getCachedConfigArrayForPath(fileOrDirPath) {
assertValidFilePath(fileOrDirPath);
debug(`Looking up cached config for ${fileOrDirPath}`);
const absoluteDirPath = path.resolve(this.#options.cwd, fileOrDirPath);
if (!this.#configFilePaths.has(absoluteDirPath)) {
throw new Error(`Could not find config file for ${fileOrDirPath}`);
}
const configFilePathInfo = this.#configFilePaths.get(absoluteDirPath);
if (typeof configFilePathInfo.then === "function") {
throw new Error(
`Config file path for ${fileOrDirPath} has not yet been calculated or an error occurred during the calculation`,
);
}
const { configFilePath } = configFilePathInfo;
const configArray = this.#configArrays.get(configFilePath);
if (!configArray || typeof configArray.then === "function") {
throw new Error(
`Config array for ${fileOrDirPath} has not yet been calculated or an error occurred during the calculation`,
);
}
return configArray;
}
/**
* Used to import the jiti dependency. This method is exposed internally for testing purposes.
* @returns {Promise<{createJiti: Function|undefined, version: string;}>} A promise that fulfills with an object containing the jiti module's createJiti function and version.
*/
static async loadJiti() {
const { createJiti } = await import("jiti");
const version = require("jiti/package.json").version;
return { createJiti, version };
}
/**
* Determines which config file to use. This is determined by seeing if an
* override config file was specified, and if so, using it; otherwise, as long
* as override config file is not explicitly set to `false`, it will search
* upwards from `fromDirectory` for a file named `eslint.config.js`.
* This method is exposed internally for testing purposes.
* @param {Object} [options] the options object
* @param {string|false|undefined} options.useConfigFile The path to the config file to use.
* @param {string} options.cwd Path to a directory that should be considered as the current working directory.
* @param {string} [options.fromDirectory] The directory from which to start searching. Defaults to `cwd`.
* @returns {Promise<{configFilePath:string|undefined,basePath:string}>} Location information for
* the config file.
*/
static async locateConfigFileToUse({
useConfigFile,
cwd,
fromDirectory = cwd,
}) {
// determine where to load config file from
let configFilePath;
let basePath = cwd;
if (typeof useConfigFile === "string") {
debug(`Override config file path is ${useConfigFile}`);
configFilePath = path.resolve(cwd, useConfigFile);
basePath = cwd;
} else if (useConfigFile !== false) {
debug("Searching for eslint.config.js");
configFilePath = await findUp(FLAT_CONFIG_FILENAMES, {
cwd: fromDirectory,
});
if (configFilePath) {
basePath = path.dirname(configFilePath);
}
}
return {
configFilePath,
basePath,
};
}
/**
* Calculates the config array for this run based on inputs.
* This method is exposed internally for testing purposes.
* @param {string} configFilePath The absolute path to the config file to use if not overridden.
* @param {string} basePath The base path to use for relative paths in the config file.
* @param {ConfigLoaderOptions} options The options to use when loading configuration files.
* @returns {Promise<FlatConfigArray>} The config array for `eslint`.
*/
static async calculateConfigArray(configFilePath, basePath, options) {
const {
cwd,
baseConfig,
ignoreEnabled,
ignorePatterns,
overrideConfig,
hasUnstableNativeNodeJsTSConfigFlag = false,
defaultConfigs = [],
warningService,
} = options;
debug(
`Calculating config array from config file ${configFilePath} and base path ${basePath}`,
);
const configs = new FlatConfigArray(baseConfig || [], {
basePath,
shouldIgnore: ignoreEnabled,
});
// load config file
if (configFilePath) {
debug(`Loading config file ${configFilePath}`);
const fileConfig = await loadConfigFile(
configFilePath,
hasUnstableNativeNodeJsTSConfigFlag,
);
/*
* It's possible that a config file could be empty or else
* have an empty object or array. In this case, we want to
* warn the user that they have an empty config.
*
* An empty CommonJS file exports an empty object while
* an empty ESM file exports undefined.
*/
let emptyConfig = typeof fileConfig === "undefined";
debug(
`Config file ${configFilePath} is ${emptyConfig ? "empty" : "not empty"}`,
);
if (!emptyConfig) {
if (Array.isArray(fileConfig)) {
if (fileConfig.length === 0) {
debug(
`Config file ${configFilePath} is an empty array`,
);
emptyConfig = true;
} else {
configs.push(...fileConfig);
}
} else {
if (
typeof fileConfig === "object" &&
fileConfig !== null &&
Object.keys(fileConfig).length === 0
) {
debug(
`Config file ${configFilePath} is an empty object`,
);
emptyConfig = true;
} else {
configs.push(fileConfig);
}
}
}
if (emptyConfig) {
warningService.emitEmptyConfigWarning(configFilePath);
}
}
// add in any configured defaults
configs.push(...defaultConfigs);
// append command line ignore patterns
if (ignorePatterns && ignorePatterns.length > 0) {
/*
* Ignore patterns are added to the end of the config array
* so they can override default ignores.
*/
configs.push({
basePath: cwd,
ignores: ignorePatterns,
});
}
if (overrideConfig) {
if (Array.isArray(overrideConfig)) {
configs.push(...overrideConfig);
} else {
configs.push(overrideConfig);
}
}
await configs.normalize();
return configs;
}
}
module.exports = { ConfigLoader };
@@ -0,0 +1,89 @@
declare type StringifyOptions = {
/**
* A function that alters the behavior of the stringification process, or an
* array of String and Number objects that serve as a allowlist for
* selecting/filtering the properties of the value object to be included in
* the JSON5 string. If this value is null or not provided, all properties
* of the object are included in the resulting JSON5 string.
*/
replacer?:
| ((this: any, key: string, value: any) => any)
| (string | number)[]
| null
/**
* A String or Number object that's used to insert white space into the
* output JSON5 string for readability purposes. If this is a Number, it
* indicates the number of space characters to use as white space; this
* number is capped at 10 (if it is greater, the value is just 10). Values
* less than 1 indicate that no space should be used. If this is a String,
* the string (or the first 10 characters of the string, if it's longer than
* that) is used as white space. If this parameter is not provided (or is
* null), no white space is used. If white space is used, trailing commas
* will be used in objects and arrays.
*/
space?: string | number | null
/**
* A String representing the quote character to use when serializing
* strings.
*/
quote?: string | null
}
/**
* Converts a JavaScript value to a JSON5 string.
* @param value The value to convert to a JSON5 string.
* @param replacer A function that alters the behavior of the stringification
* process. If this value is null or not provided, all properties of the object
* are included in the resulting JSON5 string.
* @param space A String or Number object that's used to insert white space into
* the output JSON5 string for readability purposes. If this is a Number, it
* indicates the number of space characters to use as white space; this number
* is capped at 10 (if it is greater, the value is just 10). Values less than 1
* indicate that no space should be used. If this is a String, the string (or
* the first 10 characters of the string, if it's longer than that) is used as
* white space. If this parameter is not provided (or is null), no white space
* is used. If white space is used, trailing commas will be used in objects and
* arrays.
* @returns The JSON5 string converted from the JavaScript value.
*/
declare function stringify(
value: any,
replacer?: ((this: any, key: string, value: any) => any) | null,
space?: string | number | null,
): string
/**
* Converts a JavaScript value to a JSON5 string.
* @param value The value to convert to a JSON5 string.
* @param replacer An array of String and Number objects that serve as a
* allowlist for selecting/filtering the properties of the value object to be
* included in the JSON5 string. If this value is null or not provided, all
* properties of the object are included in the resulting JSON5 string.
* @param space A String or Number object that's used to insert white space into
* the output JSON5 string for readability purposes. If this is a Number, it
* indicates the number of space characters to use as white space; this number
* is capped at 10 (if it is greater, the value is just 10). Values less than 1
* indicate that no space should be used. If this is a String, the string (or
* the first 10 characters of the string, if it's longer than that) is used as
* white space. If this parameter is not provided (or is null), no white space
* is used. If white space is used, trailing commas will be used in objects and
* arrays.
* @returns The JSON5 string converted from the JavaScript value.
*/
declare function stringify(
value: any,
replacer: (string | number)[],
space?: string | number | null,
): string
/**
* Converts a JavaScript value to a JSON5 string.
* @param value The value to convert to a JSON5 string.
* @param options An object specifying options.
* @returns The JSON5 string converted from the JavaScript value.
*/
declare function stringify(value: any, options: StringifyOptions): string
export = stringify
@@ -0,0 +1 @@
{"version":3,"file":"express.d.ts","sourceRoot":"","sources":["../../../src/server/express.ts"],"names":[],"mappings":"AAAA,OAAgB,EAAE,OAAO,EAAE,MAAM,SAAS,CAAC;AAG3C;;GAEG;AACH,MAAM,WAAW,0BAA0B;IACvC;;;OAGG;IACH,IAAI,CAAC,EAAE,MAAM,CAAC;IAEd;;;;;;;OAOG;IACH,YAAY,CAAC,EAAE,MAAM,EAAE,CAAC;CAC3B;AAED;;;;;;;;;;;;;;;;;;;;;;GAsBG;AACH,wBAAgB,mBAAmB,CAAC,OAAO,GAAE,0BAA+B,GAAG,OAAO,CA6BrF"}
@@ -0,0 +1,17 @@
/**
* @license lucide-react v0.469.0 - ISC
*
* This source code is licensed under the ISC license.
* See the LICENSE file in the root directory of this source tree.
*/
import createLucideIcon from '../createLucideIcon.js';
const SquarePlus = createLucideIcon("SquarePlus", [
["rect", { width: "18", height: "18", x: "3", y: "3", rx: "2", key: "afitv7" }],
["path", { d: "M8 12h8", key: "1wcyev" }],
["path", { d: "M12 8v8", key: "napkw2" }]
]);
export { SquarePlus as default };
//# sourceMappingURL=square-plus.js.map
@@ -0,0 +1,69 @@
import Benchmark from "benchmark";
import { z } from "zod/v3";
const emptySuite = new Benchmark.Suite("z.object: empty");
const shortSuite = new Benchmark.Suite("z.object: short");
const longSuite = new Benchmark.Suite("z.object: long");
const empty = z.object({});
const short = z.object({
string: z.string(),
});
const long = z.object({
string: z.string(),
number: z.number(),
boolean: z.boolean(),
});
emptySuite
.add("valid", () => {
empty.parse({});
})
.add("valid: extra keys", () => {
empty.parse({ string: "string" });
})
.add("invalid: null", () => {
try {
empty.parse(null);
} catch (_err) {}
})
.on("cycle", (e: Benchmark.Event) => {
console.log(`${(emptySuite as any).name}: ${e.target}`);
});
shortSuite
.add("valid", () => {
short.parse({ string: "string" });
})
.add("valid: extra keys", () => {
short.parse({ string: "string", number: 42 });
})
.add("invalid: null", () => {
try {
short.parse(null);
} catch (_err) {}
})
.on("cycle", (e: Benchmark.Event) => {
console.log(`${(shortSuite as any).name}: ${e.target}`);
});
longSuite
.add("valid", () => {
long.parse({ string: "string", number: 42, boolean: true });
})
.add("valid: extra keys", () => {
long.parse({ string: "string", number: 42, boolean: true, list: [] });
})
.add("invalid: null", () => {
try {
long.parse(null);
} catch (_err) {}
})
.on("cycle", (e: Benchmark.Event) => {
console.log(`${(longSuite as any).name}: ${e.target}`);
});
export default {
suites: [emptySuite, shortSuite, longSuite],
};
@@ -0,0 +1,7 @@
Copyright © James Long and contributors
Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:
The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
@@ -0,0 +1,65 @@
'use strict';
/**
* Copyright (C) 2017-present by Andrea Giammarchi - @WebReflection
*
* Permission is hereby granted, free of charge, to any person obtaining a copy
* of this software and associated documentation files (the "Software"), to deal
* in the Software without restriction, including without limitation the rights
* to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
* copies of the Software, and to permit persons to whom the Software is
* furnished to do so, subject to the following conditions:
*
* The above copyright notice and this permission notice shall be included in
* all copies or substantial portions of the Software.
*
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
* IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
* AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
* LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
* OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
* THE SOFTWARE.
*/
var replace = ''.replace;
var ca = /[&<>'"]/g;
var es = /&(?:amp|#38|lt|#60|gt|#62|apos|#39|quot|#34);/g;
var esca = {
'&': '&amp;',
'<': '&lt;',
'>': '&gt;',
"'": '&#39;',
'"': '&quot;'
};
var unes = {
'&amp;': '&',
'&#38;': '&',
'&lt;': '<',
'&#60;': '<',
'&gt;': '>',
'&#62;': '>',
'&apos;': "'",
'&#39;': "'",
'&quot;': '"',
'&#34;': '"'
};
function escape(es) {
return replace.call(es, ca, pe);
}
exports.escape = escape;
function unescape(un) {
return replace.call(un, es, cape);
}
exports.unescape = unescape;
function pe(m) {
return esca[m];
}
function cape(m) {
return unes[m];
}
@@ -0,0 +1,443 @@
'use strict';
/** Highest positive signed 32-bit float value */
const maxInt = 2147483647; // aka. 0x7FFFFFFF or 2^31-1
/** Bootstring parameters */
const base = 36;
const tMin = 1;
const tMax = 26;
const skew = 38;
const damp = 700;
const initialBias = 72;
const initialN = 128; // 0x80
const delimiter = '-'; // '\x2D'
/** Regular expressions */
const regexPunycode = /^xn--/;
const regexNonASCII = /[^\0-\x7F]/; // Note: U+007F DEL is excluded too.
const regexSeparators = /[\x2E\u3002\uFF0E\uFF61]/g; // RFC 3490 separators
/** Error messages */
const errors = {
'overflow': 'Overflow: input needs wider integers to process',
'not-basic': 'Illegal input >= 0x80 (not a basic code point)',
'invalid-input': 'Invalid input'
};
/** Convenience shortcuts */
const baseMinusTMin = base - tMin;
const floor = Math.floor;
const stringFromCharCode = String.fromCharCode;
/*--------------------------------------------------------------------------*/
/**
* A generic error utility function.
* @private
* @param {String} type The error type.
* @returns {Error} Throws a `RangeError` with the applicable error message.
*/
function error(type) {
throw new RangeError(errors[type]);
}
/**
* A generic `Array#map` utility function.
* @private
* @param {Array} array The array to iterate over.
* @param {Function} callback The function that gets called for every array
* item.
* @returns {Array} A new array of values returned by the callback function.
*/
function map(array, callback) {
const result = [];
let length = array.length;
while (length--) {
result[length] = callback(array[length]);
}
return result;
}
/**
* A simple `Array#map`-like wrapper to work with domain name strings or email
* addresses.
* @private
* @param {String} domain The domain name or email address.
* @param {Function} callback The function that gets called for every
* character.
* @returns {String} A new string of characters returned by the callback
* function.
*/
function mapDomain(domain, callback) {
const parts = domain.split('@');
let result = '';
if (parts.length > 1) {
// In email addresses, only the domain name should be punycoded. Leave
// the local part (i.e. everything up to `@`) intact.
result = parts[0] + '@';
domain = parts[1];
}
// Avoid `split(regex)` for IE8 compatibility. See #17.
domain = domain.replace(regexSeparators, '\x2E');
const labels = domain.split('.');
const encoded = map(labels, callback).join('.');
return result + encoded;
}
/**
* Creates an array containing the numeric code points of each Unicode
* character in the string. While JavaScript uses UCS-2 internally,
* this function will convert a pair of surrogate halves (each of which
* UCS-2 exposes as separate characters) into a single code point,
* matching UTF-16.
* @see `punycode.ucs2.encode`
* @see <https://mathiasbynens.be/notes/javascript-encoding>
* @memberOf punycode.ucs2
* @name decode
* @param {String} string The Unicode input string (UCS-2).
* @returns {Array} The new array of code points.
*/
function ucs2decode(string) {
const output = [];
let counter = 0;
const length = string.length;
while (counter < length) {
const value = string.charCodeAt(counter++);
if (value >= 0xD800 && value <= 0xDBFF && counter < length) {
// It's a high surrogate, and there is a next character.
const extra = string.charCodeAt(counter++);
if ((extra & 0xFC00) == 0xDC00) { // Low surrogate.
output.push(((value & 0x3FF) << 10) + (extra & 0x3FF) + 0x10000);
} else {
// It's an unmatched surrogate; only append this code unit, in case the
// next code unit is the high surrogate of a surrogate pair.
output.push(value);
counter--;
}
} else {
output.push(value);
}
}
return output;
}
/**
* Creates a string based on an array of numeric code points.
* @see `punycode.ucs2.decode`
* @memberOf punycode.ucs2
* @name encode
* @param {Array} codePoints The array of numeric code points.
* @returns {String} The new Unicode string (UCS-2).
*/
const ucs2encode = codePoints => String.fromCodePoint(...codePoints);
/**
* Converts a basic code point into a digit/integer.
* @see `digitToBasic()`
* @private
* @param {Number} codePoint The basic numeric code point value.
* @returns {Number} The numeric value of a basic code point (for use in
* representing integers) in the range `0` to `base - 1`, or `base` if
* the code point does not represent a value.
*/
const basicToDigit = function(codePoint) {
if (codePoint >= 0x30 && codePoint < 0x3A) {
return 26 + (codePoint - 0x30);
}
if (codePoint >= 0x41 && codePoint < 0x5B) {
return codePoint - 0x41;
}
if (codePoint >= 0x61 && codePoint < 0x7B) {
return codePoint - 0x61;
}
return base;
};
/**
* Converts a digit/integer into a basic code point.
* @see `basicToDigit()`
* @private
* @param {Number} digit The numeric value of a basic code point.
* @returns {Number} The basic code point whose value (when used for
* representing integers) is `digit`, which needs to be in the range
* `0` to `base - 1`. If `flag` is non-zero, the uppercase form is
* used; else, the lowercase form is used. The behavior is undefined
* if `flag` is non-zero and `digit` has no uppercase form.
*/
const digitToBasic = function(digit, flag) {
// 0..25 map to ASCII a..z or A..Z
// 26..35 map to ASCII 0..9
return digit + 22 + 75 * (digit < 26) - ((flag != 0) << 5);
};
/**
* Bias adaptation function as per section 3.4 of RFC 3492.
* https://tools.ietf.org/html/rfc3492#section-3.4
* @private
*/
const adapt = function(delta, numPoints, firstTime) {
let k = 0;
delta = firstTime ? floor(delta / damp) : delta >> 1;
delta += floor(delta / numPoints);
for (/* no initialization */; delta > baseMinusTMin * tMax >> 1; k += base) {
delta = floor(delta / baseMinusTMin);
}
return floor(k + (baseMinusTMin + 1) * delta / (delta + skew));
};
/**
* Converts a Punycode string of ASCII-only symbols to a string of Unicode
* symbols.
* @memberOf punycode
* @param {String} input The Punycode string of ASCII-only symbols.
* @returns {String} The resulting string of Unicode symbols.
*/
const decode = function(input) {
// Don't use UCS-2.
const output = [];
const inputLength = input.length;
let i = 0;
let n = initialN;
let bias = initialBias;
// Handle the basic code points: let `basic` be the number of input code
// points before the last delimiter, or `0` if there is none, then copy
// the first basic code points to the output.
let basic = input.lastIndexOf(delimiter);
if (basic < 0) {
basic = 0;
}
for (let j = 0; j < basic; ++j) {
// if it's not a basic code point
if (input.charCodeAt(j) >= 0x80) {
error('not-basic');
}
output.push(input.charCodeAt(j));
}
// Main decoding loop: start just after the last delimiter if any basic code
// points were copied; start at the beginning otherwise.
for (let index = basic > 0 ? basic + 1 : 0; index < inputLength; /* no final expression */) {
// `index` is the index of the next character to be consumed.
// Decode a generalized variable-length integer into `delta`,
// which gets added to `i`. The overflow checking is easier
// if we increase `i` as we go, then subtract off its starting
// value at the end to obtain `delta`.
const oldi = i;
for (let w = 1, k = base; /* no condition */; k += base) {
if (index >= inputLength) {
error('invalid-input');
}
const digit = basicToDigit(input.charCodeAt(index++));
if (digit >= base) {
error('invalid-input');
}
if (digit > floor((maxInt - i) / w)) {
error('overflow');
}
i += digit * w;
const t = k <= bias ? tMin : (k >= bias + tMax ? tMax : k - bias);
if (digit < t) {
break;
}
const baseMinusT = base - t;
if (w > floor(maxInt / baseMinusT)) {
error('overflow');
}
w *= baseMinusT;
}
const out = output.length + 1;
bias = adapt(i - oldi, out, oldi == 0);
// `i` was supposed to wrap around from `out` to `0`,
// incrementing `n` each time, so we'll fix that now:
if (floor(i / out) > maxInt - n) {
error('overflow');
}
n += floor(i / out);
i %= out;
// Insert `n` at position `i` of the output.
output.splice(i++, 0, n);
}
return String.fromCodePoint(...output);
};
/**
* Converts a string of Unicode symbols (e.g. a domain name label) to a
* Punycode string of ASCII-only symbols.
* @memberOf punycode
* @param {String} input The string of Unicode symbols.
* @returns {String} The resulting Punycode string of ASCII-only symbols.
*/
const encode = function(input) {
const output = [];
// Convert the input in UCS-2 to an array of Unicode code points.
input = ucs2decode(input);
// Cache the length.
const inputLength = input.length;
// Initialize the state.
let n = initialN;
let delta = 0;
let bias = initialBias;
// Handle the basic code points.
for (const currentValue of input) {
if (currentValue < 0x80) {
output.push(stringFromCharCode(currentValue));
}
}
const basicLength = output.length;
let handledCPCount = basicLength;
// `handledCPCount` is the number of code points that have been handled;
// `basicLength` is the number of basic code points.
// Finish the basic string with a delimiter unless it's empty.
if (basicLength) {
output.push(delimiter);
}
// Main encoding loop:
while (handledCPCount < inputLength) {
// All non-basic code points < n have been handled already. Find the next
// larger one:
let m = maxInt;
for (const currentValue of input) {
if (currentValue >= n && currentValue < m) {
m = currentValue;
}
}
// Increase `delta` enough to advance the decoder's <n,i> state to <m,0>,
// but guard against overflow.
const handledCPCountPlusOne = handledCPCount + 1;
if (m - n > floor((maxInt - delta) / handledCPCountPlusOne)) {
error('overflow');
}
delta += (m - n) * handledCPCountPlusOne;
n = m;
for (const currentValue of input) {
if (currentValue < n && ++delta > maxInt) {
error('overflow');
}
if (currentValue === n) {
// Represent delta as a generalized variable-length integer.
let q = delta;
for (let k = base; /* no condition */; k += base) {
const t = k <= bias ? tMin : (k >= bias + tMax ? tMax : k - bias);
if (q < t) {
break;
}
const qMinusT = q - t;
const baseMinusT = base - t;
output.push(
stringFromCharCode(digitToBasic(t + qMinusT % baseMinusT, 0))
);
q = floor(qMinusT / baseMinusT);
}
output.push(stringFromCharCode(digitToBasic(q, 0)));
bias = adapt(delta, handledCPCountPlusOne, handledCPCount === basicLength);
delta = 0;
++handledCPCount;
}
}
++delta;
++n;
}
return output.join('');
};
/**
* Converts a Punycode string representing a domain name or an email address
* to Unicode. Only the Punycoded parts of the input will be converted, i.e.
* it doesn't matter if you call it on a string that has already been
* converted to Unicode.
* @memberOf punycode
* @param {String} input The Punycoded domain name or email address to
* convert to Unicode.
* @returns {String} The Unicode representation of the given Punycode
* string.
*/
const toUnicode = function(input) {
return mapDomain(input, function(string) {
return regexPunycode.test(string)
? decode(string.slice(4).toLowerCase())
: string;
});
};
/**
* Converts a Unicode string representing a domain name or an email address to
* Punycode. Only the non-ASCII parts of the domain name will be converted,
* i.e. it doesn't matter if you call it with a domain that's already in
* ASCII.
* @memberOf punycode
* @param {String} input The domain name or email address to convert, as a
* Unicode string.
* @returns {String} The Punycode representation of the given domain name or
* email address.
*/
const toASCII = function(input) {
return mapDomain(input, function(string) {
return regexNonASCII.test(string)
? 'xn--' + encode(string)
: string;
});
};
/*--------------------------------------------------------------------------*/
/** Define the public API */
const punycode = {
/**
* A string representing the current Punycode.js version number.
* @memberOf punycode
* @type String
*/
'version': '2.3.1',
/**
* An object of methods to convert from JavaScript's internal character
* representation (UCS-2) to Unicode code points, and back.
* @see <https://mathiasbynens.be/notes/javascript-encoding>
* @memberOf punycode
* @type Object
*/
'ucs2': {
'decode': ucs2decode,
'encode': ucs2encode
},
'decode': decode,
'encode': encode,
'toASCII': toASCII,
'toUnicode': toUnicode
};
module.exports = punycode;
@@ -0,0 +1 @@
{"version":3,"file":"NativeAnimationWrapper.mjs","sources":["../../../src/animation/NativeAnimationWrapper.ts"],"sourcesContent":["import { NativeAnimation } from \"./NativeAnimation\"\nimport { AnyResolvedKeyframe } from \"./types\"\n\nexport class NativeAnimationWrapper<\n T extends AnyResolvedKeyframe\n> extends NativeAnimation<T> {\n constructor(animation: Animation) {\n super()\n\n this.animation = animation\n animation.onfinish = () => {\n this.finishedTime = this.time\n this.notifyFinished()\n }\n }\n}\n"],"names":[],"mappings":";;AAGM,MAAO,sBAEX,SAAQ,eAAkB,CAAA;AACxB,IAAA,WAAA,CAAY,SAAoB,EAAA;AAC5B,QAAA,KAAK,EAAE;AAEP,QAAA,IAAI,CAAC,SAAS,GAAG,SAAS;AAC1B,QAAA,SAAS,CAAC,QAAQ,GAAG,MAAK;AACtB,YAAA,IAAI,CAAC,YAAY,GAAG,IAAI,CAAC,IAAI;YAC7B,IAAI,CAAC,cAAc,EAAE;AACzB,QAAA,CAAC;IACL;AACH;;;;"}
@@ -0,0 +1,16 @@
/**
* @license lucide-react v0.469.0 - ISC
*
* This source code is licensed under the ISC license.
* See the LICENSE file in the root directory of this source tree.
*/
import createLucideIcon from '../createLucideIcon.js';
const MessageSquareDot = createLucideIcon("MessageSquareDot", [
["path", { d: "M11.7 3H5a2 2 0 0 0-2 2v16l4-4h12a2 2 0 0 0 2-2v-2.7", key: "uodpkb" }],
["circle", { cx: "18", cy: "6", r: "3", key: "1h7g24" }]
]);
export { MessageSquareDot as default };
//# sourceMappingURL=message-square-dot.js.map
@@ -0,0 +1,42 @@
const {createWrapper} = require('./wrapper');
let name = `@parcel/watcher-${process.platform}-${process.arch}`;
if (process.platform === 'linux') {
const { MUSL, familySync } = require('detect-libc');
const family = familySync();
if (family === MUSL) {
name += '-musl';
} else {
name += '-glibc';
}
}
let binding;
try {
binding = require(name);
} catch (err) {
handleError(err);
try {
binding = require('./build/Release/watcher.node');
} catch (err) {
handleError(err);
try {
binding = require('./build/Debug/watcher.node');
} catch (err) {
handleError(err);
throw new Error(`No prebuild or local build of @parcel/watcher found. Tried ${name}. Please ensure it is installed (don't use --no-optional when installing with npm). Otherwise it is possible we don't support your platform yet. If this is the case, please report an issue to https://github.com/parcel-bundler/watcher.`);
}
}
}
function handleError(err) {
if (err?.code !== 'MODULE_NOT_FOUND') {
throw err;
}
}
const wrapper = createWrapper(binding);
exports.writeSnapshot = wrapper.writeSnapshot;
exports.getEventsSince = wrapper.getEventsSince;
exports.subscribe = wrapper.subscribe;
exports.unsubscribe = wrapper.unsubscribe;
@@ -0,0 +1,2 @@
export * from './index.js';
export { HeadContent } from './HeadContent.dev';
@@ -0,0 +1,9 @@
/**
* @license lucide-react v0.469.0 - ISC
*
* This source code is licensed under the ISC license.
* See the LICENSE file in the root directory of this source tree.
*/
export { default } from './user-round-x.js';
//# sourceMappingURL=user-x-2.js.map
@@ -0,0 +1,13 @@
"use strict";
const normalizeUnit = require("./normalizeUnit-Cn0hUyBC.js");
const endOf = require("./endOf.js");
const parse = require("./parse.js");
function isBefore(date, input, unit) {
unit = normalizeUnit.normalizeUnit(unit);
const inputMs = +parse(input);
if (!unit) {
return +date < inputMs;
}
return +endOf(new Date(date), unit) < inputMs;
}
module.exports = isBefore;
@@ -0,0 +1,118 @@
import { MiddlewareHandler } from "../../types.js";
import { Context } from "../../context.js";
//#region src/middleware/language/language.d.ts
export type DetectorType = 'path' | 'querystring' | 'cookie' | 'header';
export type CacheType = 'cookie';
export interface DetectorOptions {
/** Order of language detection strategies */
order: DetectorType[];
/** Query parameter name for language */
lookupQueryString: string;
/** Cookie name for language */
lookupCookie: string;
/** Index in URL path where language code appears */
lookupFromPathIndex: number;
/** Header key for language detection */
lookupFromHeaderKey: string;
/** Caching strategies */
caches: CacheType[] | false;
/** Cookie configuration options */
cookieOptions?: {
domain?: string;
path?: string;
sameSite?: 'Strict' | 'Lax' | 'None';
secure?: boolean;
maxAge?: number;
httpOnly?: boolean;
};
/** Whether to ignore case in language codes */
ignoreCase: boolean;
/** Default language if none detected */
fallbackLanguage: string;
/** List of supported language codes */
supportedLanguages: string[];
/** Optional function to transform detected language codes */
convertDetectedLanguage?: (lang: string) => string;
/** Enable debug logging */
debug?: boolean;
}
export interface LanguageVariables {
language: string;
}
export declare const DEFAULT_OPTIONS: DetectorOptions;
/**
* Parse Accept-Language header values with quality scores
* @param header Accept-Language header string
* @returns Array of parsed languages with quality scores
*/
export declare function parseAcceptLanguage(header: string): Array<{
lang: string;
q: number;
}>;
/**
* Validate and normalize language codes
* @param lang Language code to normalize
* @param options Detector options
* @returns Normalized language code or undefined
*/
export declare const normalizeLanguage: (lang: string | null | undefined, options: DetectorOptions) => string | undefined;
/**
* Detects language from query parameter
*/
export declare const detectFromQuery: (c: Context, options: DetectorOptions) => string | undefined;
/**
* Detects language from cookie
*/
export declare const detectFromCookie: (c: Context, options: DetectorOptions) => string | undefined;
/**
* Detects language from Accept-Language header
*/
export declare function detectFromHeader(c: Context, options: DetectorOptions): string | undefined;
/**
* Detects language from URL path
*/
export declare function detectFromPath(c: Context, options: DetectorOptions): string | undefined;
/**
* Collection of all language detection strategies
*/
export declare const detectors: {
readonly querystring: (c: Context, options: DetectorOptions) => string | undefined;
readonly cookie: (c: Context, options: DetectorOptions) => string | undefined;
readonly header: typeof detectFromHeader;
readonly path: typeof detectFromPath;
};
/** Type for detector functions */
export type DetectorFunction = (c: Context, options: DetectorOptions) => string | undefined;
/** Type-safe detector map */
export type Detectors = Record<keyof typeof detectors, DetectorFunction>;
/**
* Validate detector options
* @param options Detector options to validate
* @throws Error if options are invalid
*/
export declare function validateOptions(options: DetectorOptions): void;
/**
* Language detector middleware factory
* @param userOptions Configuration options for the language detector
* @returns Hono middleware function
*
* @example
* ```ts
* type Variables = LanguageVariables
* const app = new Hono<{ Variables: Variables }>()
*
* app.use(
* languageDetector({
* supportedLanguages: ['en', 'ja'], // Must include fallback
* fallbackLanguage: 'en', // Required
* })
* )
*
* app.get('/', (c) => {
* const lang = c.get('language')
* return c.text(`Current language: ${lang}`)
* })
* ```
*/
export declare const languageDetector: (userOptions: Partial<DetectorOptions>) => MiddlewareHandler;
//#endregion
@@ -0,0 +1,18 @@
/**
* @license lucide-react v0.469.0 - ISC
*
* This source code is licensed under the ISC license.
* See the LICENSE file in the root directory of this source tree.
*/
import createLucideIcon from '../createLucideIcon.js';
const FileX2 = createLucideIcon("FileX2", [
["path", { d: "M4 22h14a2 2 0 0 0 2-2V7l-5-5H6a2 2 0 0 0-2 2v4", key: "1pf5j1" }],
["path", { d: "M14 2v4a2 2 0 0 0 2 2h4", key: "tnqrlb" }],
["path", { d: "m8 12.5-5 5", key: "b853mi" }],
["path", { d: "m3 12.5 5 5", key: "1qls4r" }]
]);
export { FileX2 as default };
//# sourceMappingURL=file-x-2.js.map
@@ -0,0 +1 @@
{"version":3,"file":"animate-elements.mjs","sources":["../../../../../src/animation/animators/waapi/animate-elements.ts"],"sourcesContent":["import {\n animationMapKey,\n AnimationPlaybackControls,\n AnimationScope,\n applyPxDefaults,\n DOMKeyframesDefinition,\n AnimationOptions as DynamicAnimationOptions,\n ElementOrSelector,\n fillWildcards,\n getAnimationMap,\n getComputedStyle,\n getValueTransition,\n NativeAnimation,\n NativeAnimationOptions,\n resolveElements,\n UnresolvedValueKeyframe,\n ValueKeyframe,\n} from \"motion-dom\"\nimport { invariant, secondsToMilliseconds } from \"motion-utils\"\n\ninterface AnimationDefinition {\n map: Map<string, NativeAnimation<any>>\n key: string\n unresolvedKeyframes: UnresolvedValueKeyframe[]\n options: Omit<NativeAnimationOptions, \"keyframes\"> & {\n keyframes?: ValueKeyframe[]\n }\n}\n\nexport function animateElements(\n elementOrSelector: ElementOrSelector,\n keyframes: DOMKeyframesDefinition,\n options?: DynamicAnimationOptions,\n scope?: AnimationScope\n) {\n // Gracefully handle null/undefined elements (e.g., from querySelector returning null)\n if (elementOrSelector == null) {\n return []\n }\n\n const elements = resolveElements(elementOrSelector, scope) as Array<\n HTMLElement | SVGElement\n >\n const numElements = elements.length\n\n invariant(\n Boolean(numElements),\n \"No valid elements provided.\",\n \"no-valid-elements\"\n )\n\n /**\n * WAAPI doesn't support interrupting animations.\n *\n * Therefore, starting animations requires a three-step process:\n * 1. Stop existing animations (write styles to DOM)\n * 2. Resolve keyframes (read styles from DOM)\n * 3. Create new animations (write styles to DOM)\n *\n * The hybrid `animate()` function uses AsyncAnimation to resolve\n * keyframes before creating new animations, which removes style\n * thrashing. Here, we have much stricter filesize constraints.\n * Therefore we do this in a synchronous way that ensures that\n * at least within `animate()` calls there is no style thrashing.\n *\n * In the motion-native-animate-mini-interrupt benchmark this\n * was 80% faster than a single loop.\n */\n const animationDefinitions: AnimationDefinition[] = []\n\n /**\n * Step 1: Build options and stop existing animations (write)\n */\n for (let i = 0; i < numElements; i++) {\n const element = elements[i]\n const elementTransition: DynamicAnimationOptions = { ...options }\n\n /**\n * Resolve stagger function if provided.\n */\n if (typeof elementTransition.delay === \"function\") {\n elementTransition.delay = elementTransition.delay(i, numElements)\n }\n\n for (const valueName in keyframes) {\n let valueKeyframes = keyframes[valueName as keyof typeof keyframes]!\n\n if (!Array.isArray(valueKeyframes)) {\n valueKeyframes = [valueKeyframes]\n }\n\n const valueOptions = {\n ...getValueTransition(elementTransition as any, valueName),\n }\n\n valueOptions.duration &&= secondsToMilliseconds(\n valueOptions.duration\n )\n\n valueOptions.delay &&= secondsToMilliseconds(valueOptions.delay)\n\n /**\n * If there's an existing animation playing on this element then stop it\n * before creating a new one.\n */\n const map = getAnimationMap(element)\n const key = animationMapKey(\n valueName,\n valueOptions.pseudoElement || \"\"\n )\n const currentAnimation = map.get(key)\n currentAnimation && currentAnimation.stop()\n\n animationDefinitions.push({\n map,\n key,\n unresolvedKeyframes: valueKeyframes,\n options: {\n ...valueOptions,\n element,\n name: valueName,\n allowFlatten:\n !elementTransition.type && !elementTransition.ease,\n },\n })\n }\n }\n\n /**\n * Step 2: Resolve keyframes (read)\n */\n for (let i = 0; i < animationDefinitions.length; i++) {\n const { unresolvedKeyframes, options: animationOptions } =\n animationDefinitions[i]\n\n const { element, name, pseudoElement } = animationOptions\n if (!pseudoElement && unresolvedKeyframes[0] === null) {\n unresolvedKeyframes[0] = getComputedStyle(element, name)\n }\n\n fillWildcards(unresolvedKeyframes)\n applyPxDefaults(unresolvedKeyframes, name)\n\n /**\n * If we only have one keyframe, explicitly read the initial keyframe\n * Line truncated
@@ -0,0 +1,7 @@
{
"version": 3,
"sources": ["../src/number.ts"],
"sourcesContent": ["function clamp(value: number, [min, max]: [number, number]): number {\n return Math.min(max, Math.max(min, value));\n}\n\nexport { clamp };\n"],
"mappings": ";AAAA,SAAS,MAAM,OAAe,CAAC,KAAK,GAAG,GAA6B;AAClE,SAAO,KAAK,IAAI,KAAK,KAAK,IAAI,KAAK,KAAK,CAAC;AAC3C;",
"names": []
}
@@ -0,0 +1 @@
{"version":3,"file":"Tokenizer.js","sourceRoot":"","sources":["../../src/Tokenizer.ts"],"names":[],"mappings":"AAAA,OAAO,EACH,aAAa,EACb,YAAY,EACZ,cAAc,EACd,aAAa,GAChB,MAAM,iBAAiB,CAAC;AAEzB,IAAW,SA4BV;AA5BD,WAAW,SAAS;IAChB,uCAAS,CAAA;IACT,gDAAa,CAAA;IACb,kDAAc,CAAA;IACd,8DAAoB,CAAA;IACpB,4CAAY,CAAA;IACZ,gEAAsB,CAAA;IACtB,8CAAa,CAAA;IACb,wCAAU,CAAA;IACV,wDAAkB,CAAA;IAClB,wDAAkB,CAAA;IAClB,0CAAW,CAAA;IACX,4CAAY,CAAA;IACZ,0CAAW,CAAA;IACX,0CAAW,CAAA;IACX,0CAAW,CAAA;IACX,sCAAS,CAAA;IACT,sCAAS,CAAA;IACT,sCAAS,CAAA;IACT,0DAAmB,CAAA;IACnB,8CAAa,CAAA;IACb,8CAAa,CAAA;IACb,8CAAa,CAAA;IACb,+CAAa,CAAA;IACb,8CAAa,CAAA;IACb,+CAAa,CAAA;IACb,+CAAa,CAAA;IACb,0EAA2B,CAAA;AAC/B,CAAC,EA5BU,SAAS,KAAT,SAAS,QA4BnB;AAED,8CAA8C;AAC9C,IAAW,KAsCV;AAtCD,WAAW,KAAK;IACZ,iCAAQ,CAAA;IACR,mDAAa,CAAA;IACb,2CAAS,CAAA;IACT,yDAAgB,CAAA;IAChB,iEAAoB,CAAA;IACpB,yDAAgB,CAAA;IAChB,+DAAmB,CAAA;IAEnB,aAAa;IACb,+DAAmB,CAAA;IACnB,uDAAe,CAAA;IACf,8DAAkB,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CAAC,KAAa;QACtB,IAAI,CAAC,MAAM,IAAI,IAAI,CAAC,MAAM,CAAC,MAAM,CAAC;QAClC,IAAI,CAAC,MAAM,GAAG,KAAK,CAAC;QACpB,IAAI,CAAC,KAAK,EAAE,CAAC;IACjB,CAAC;IAEM,GAAG;QACN,IAAI,IAAI,CAAC,OAAO;YAAE,IAAI,CAAC,MAAM,EAAE,CAAC;IACpC,CAAC;IAEM,KAAK;QACR,IAAI,CAAC,OAAO,GAAG,KAAK,CAAC;IACzB,CAAC;IAEM,MAAM;QACT,IAAI,CAAC,OAAO,GAAG,IAAI,CAAC;QACpB,IAAI,IAAI,CAAC,KAAK,GAAG,IAAI,CAAC,MAAM,CAAC,MAAM,GAAG,IAAI,CAAC,MAAM,EAAE,CAAC;YAChD,IAAI,CAAC,KAAK,EAAE,CAAC;QACjB,CAAC;IACL,CAAC;IAEO,SAAS,CAAC,CAAS;QACvB,IACI,CAAC,KAAK,SAAS,CAAC,EAAE;YAClB,CAAC,CAAC,IAAI,CAAC,cAAc,IAAI,IAAI,CAAC,aAAa,CAAC,SAAS,CAAC,EAAE,CAAC,CAAC,EAC5D,CAAC;YACC,IAAI,IAAI,CAAC,KAAK,GAAG,IAAI,CAAC,YAAY,EAAE,CAAC;gBACjC,IAAI,CAAC,GAAG,CAAC,MAAM,CAAC,IAAI,CAAC,YAAY,EAAE,IAAI,CAAC,KAAK,CAAC,CAAC;YACnD,CAAC;YACD,IAAI,CAAC,KAAK,GAAG,KAAK,CAAC,aAAa,CAAC;YACjC,IAAI,CAAC,YAAY,GAAG,IAAI,CAAC,KAAK,CAAC;QACnC,CAAC;aAAM,IAAI,IAAI,CAAC,cAAc,IAAI,CAAC,KAAK,SAAS,CAAC,GAAG,EAAE,CAAC;YACpD,IAAI,CAAC,Line truncated
@@ -0,0 +1,18 @@
/**
* @license lucide-react v0.469.0 - ISC
*
* This source code is licensed under the ISC license.
* See the LICENSE file in the root directory of this source tree.
*/
import createLucideIcon from '../createLucideIcon.js';
const Columns4 = createLucideIcon("Columns4", [
["rect", { width: "18", height: "18", x: "3", y: "3", rx: "2", key: "afitv7" }],
["path", { d: "M7.5 3v18", key: "w0wo6v" }],
["path", { d: "M12 3v18", key: "108xh3" }],
["path", { d: "M16.5 3v18", key: "10tjh1" }]
]);
export { Columns4 as default };
//# sourceMappingURL=columns-4.js.map
@@ -0,0 +1 @@
{"version":3,"file":"union.js","sourceRoot":"","sources":["../../../lib/vocabularies/jtd/union.ts"],"names":[],"mappings":";;AACA,kCAAqC;AAErC,MAAM,GAAG,GAA0B;IACjC,OAAO,EAAE,OAAO;IAChB,UAAU,EAAE,OAAO;IACnB,WAAW,EAAE,IAAI;IACjB,IAAI,EAAE,oBAAa;IACnB,KAAK,EAAE,EAAC,OAAO,EAAE,8BAA8B,EAAC;CACjD,CAAA;AAED,kBAAe,GAAG,CAAA"}
@@ -0,0 +1 @@
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/index.ts"],"names":[],"mappings":";;;;;;AAAA,MAAM,IAAI,GACR,OAAO,OAAO,KAAK,QAAQ,IAAI,OAAO;IACpC,CAAC,CAAC,OAAO;IACT,CAAC,CAAC;QACE,MAAM,EAAE,IAAI;QACZ,MAAM,EAAE,IAAI;KACb,CAAA;AACP,6CAA0C;AAC1C,8DAAgC;AAChC,6DAAmD;AASnD;;;GAGG;AACI,MAAM,QAAQ,GAAG,CACtB,CAAM,EACsC,EAAE,CAC9C,CAAC,CAAC,CAAC;IACH,OAAO,CAAC,KAAK,QAAQ;IACrB,CAAC,CAAC,YAAY,QAAQ;QACpB,CAAC,YAAY,qBAAM;QACnB,IAAA,QAAA,UAAU,EAAC,CAAC,CAAC;QACb,IAAA,QAAA,UAAU,EAAC,CAAC,CAAC,CAAC;AAElB;;GAEG;AAJe,CAAA;AARL,QAAA,QAAQ,GAAR,QAAQ,CAQH;AAElB;;GAEG;AACI,MAAM,UAAU,GAAG,CAAC,CAAM,EAA0B,EAAE,CAC3D,CAAC,CAAC,CAAC;IACH,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CAAC,CAAY;IACrB,CAAC,GAAG,CAAC,GAAY,KAAK,CAAC;IACvB,CAAC,WAAW,CAAC,GAAY,KAAK,CAAC;IAC/B,CAAC,YAAY,CAAC,GAAY,KAAK,CAAC;IAChC,CAAC,MAAM,CAAC,GAAY,KAAK,CAAC;IAC1B,CAAC,aAAa,CAAC,GAAY,IAAI,CAAC;IAChC,CAAC,YAAYLine truncated
@@ -0,0 +1 @@
module.exports={A:{A:{"2":"_IB","132":"_LC"},B:{"1":"_K","132":"_I"},C:{"1":"_CF","132":"_WI"},D:{"1":"_AH","132":"_fO"},E:{"1":"_1C","2":"_4","132":"_fJ _UD _xE"},F:{"1":"_HI","2":"_qC","16":"_hG","132":"C _CJ _4I"},G:{"1":"_kB","16":"_d","132":"_wD _5K"},H:{"2":"1D"},I:{"1":"I","16":"_m","132":"_CO"},J:{"132":"_B"},K:{"1":"H","132":"_D"},L:{"1":"I"},M:{"1":"YC"},N:{"132":"_A"},O:{"1":"bC"},P:{"1":"_yB","132":"_pC"},Q:{"1":"JE"},R:{"1":"KE"},S:{"1":"_C"}},B:5,C:"scrollIntoView",D:true};
@@ -0,0 +1,25 @@
/**
* @license lucide-react v0.469.0 - ISC
*
* This source code is licensed under the ISC license.
* See the LICENSE file in the root directory of this source tree.
*/
import createLucideIcon from '../createLucideIcon.js';
const MousePointerClick = createLucideIcon("MousePointerClick", [
["path", { d: "M14 4.1 12 6", key: "ita8i4" }],
["path", { d: "m5.1 8-2.9-.8", key: "1go3kf" }],
["path", { d: "m6 12-1.9 2", key: "mnht97" }],
["path", { d: "M7.2 2.2 8 5.1", key: "1cfko1" }],
[
"path",
{
d: "M9.037 9.69a.498.498 0 0 1 .653-.653l11 4.5a.5.5 0 0 1-.074.949l-4.349 1.041a1 1 0 0 0-.74.739l-1.04 4.35a.5.5 0 0 1-.95.074z",
key: "s0h3yz"
}
]
]);
export { MousePointerClick as default };
//# sourceMappingURL=mouse-pointer-click.js.map
@@ -0,0 +1,22 @@
MIT License
Copyright (c) Pooya Parsa <pooya@pi0.io>
Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:
The above copyright notice and this permission notice shall be included in all
copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
SOFTWARE.
@@ -0,0 +1 @@
{"version":3,"file":"file-edit.js","sources":[],"sourcesContent":[],"names":[],"mappings":";;;;;;;"}
@@ -0,0 +1,60 @@
import State from "../tokenizer/state";
import {charCodes} from "../util/charcodes";
export let isJSXEnabled;
export let isTypeScriptEnabled;
export let isFlowEnabled;
export let state;
export let input;
export let nextContextId;
export function getNextContextId() {
return nextContextId++;
}
// eslint-disable-next-line @typescript-eslint/no-explicit-any
export function augmentError(error) {
if ("pos" in error) {
const loc = locationForIndex(error.pos);
error.message += ` (${loc.line}:${loc.column})`;
error.loc = loc;
}
return error;
}
export class Loc {
constructor(line, column) {
this.line = line;
this.column = column;
}
}
export function locationForIndex(pos) {
let line = 1;
let column = 1;
for (let i = 0; i < pos; i++) {
if (input.charCodeAt(i) === charCodes.lineFeed) {
line++;
column = 1;
} else {
column++;
}
}
return new Loc(line, column);
}
export function initParser(
inputCode,
isJSXEnabledArg,
isTypeScriptEnabledArg,
isFlowEnabledArg,
) {
input = inputCode;
state = new State();
nextContextId = 1;
isJSXEnabled = isJSXEnabledArg;
isTypeScriptEnabled = isTypeScriptEnabledArg;
isFlowEnabled = isFlowEnabledArg;
}
@@ -0,0 +1,757 @@
import {LegacyPluginThis} from './plugin_this';
/**
* A synchronous callback that implements a custom Sass function. This can be
* passed to {@link LegacySharedOptions.functions} for either {@link render} or
* {@link renderSync}.
*
* If this throws an error, Sass will treat that as the function failing with
* that error message.
*
* ```js
* const result = sass.renderSync({
* file: 'style.scss',
* functions: {
* "sum($arg1, $arg2)": (arg1, arg2) => {
* if (!(arg1 instanceof sass.types.Number)) {
* throw new Error("$arg1: Expected a number");
* } else if (!(arg2 instanceof sass.types.Number)) {
* throw new Error("$arg2: Expected a number");
* }
* return new sass.types.Number(arg1.getValue() + arg2.getValue());
* }
* }
* });
* ```
*
* @param args - One argument for each argument that's declared in the signature
* that's passed to {@link LegacySharedOptions.functions}. If the signature
* [takes arbitrary
* arguments](https://sass-lang.com/documentation/at-rules/function#taking-arbitrary-arguments),
* they're passed as a single argument list in the last argument.
*
* @category Legacy
* @deprecated This only works with the legacy {@link render} and {@link
* renderSync} APIs. Use {@link CustomFunction} with {@link compile}, {@link
* compileString}, {@link compileAsync}, and {@link compileStringAsync} instead.
*/
export type LegacySyncFunction = (
this: LegacyPluginThis,
...args: LegacyValue[]
) => LegacyValue;
/**
* An asynchronous callback that implements a custom Sass function. This can be
* passed to {@link LegacySharedOptions.functions}, but only for {@link render}.
*
* An asynchronous function must return `undefined`. Its final argument will
* always be a callback, which it should call with the result of the function
* once it's done running.
*
* If this throws an error, Sass will treat that as the function failing with
* that error message.
*
* ```js
* sass.render({
* file: 'style.scss',
* functions: {
* "sum($arg1, $arg2)": (arg1, arg2, done) => {
* if (!(arg1 instanceof sass.types.Number)) {
* throw new Error("$arg1: Expected a number");
* } else if (!(arg2 instanceof sass.types.Number)) {
* throw new Error("$arg2: Expected a number");
* }
* done(new sass.types.Number(arg1.getValue() + arg2.getValue()));
* }
* }
* }, (result, error) => {
* // ...
* });
* ```
*
* This is passed one argument for each argument that's declared in the
* signature that's passed to {@link LegacySharedOptions.functions}. If the
* signature [takes arbitrary
* arguments](https://sass-lang.com/documentation/at-rules/function#taking-arbitrary-arguments),
* they're passed as a single argument list in the last argument before the
* callback.
*
* @category Legacy
* @deprecated This only works with the legacy {@link render} and {@link
* renderSync} APIs. Use {@link CustomFunction} with {@link compile}, {@link
* compileString}, {@link compileAsync}, and {@link compileStringAsync} instead.
*/
export type LegacyAsyncFunction =
| ((this: LegacyPluginThis, done: (result: LegacyValue) => void) => void)
| ((
this: LegacyPluginThis,
arg1: LegacyValue,
done: LegacyAsyncFunctionDone
) => void)
| ((
this: LegacyPluginThis,
arg1: LegacyValue,
arg2: LegacyValue,
done: LegacyAsyncFunctionDone
) => void)
| ((
this: LegacyPluginThis,
arg1: LegacyValue,
arg2: LegacyValue,
arg3: LegacyValue,
done: LegacyAsyncFunctionDone
) => void)
| ((
this: LegacyPluginThis,
arg1: LegacyValue,
arg2: LegacyValue,
arg3: LegacyValue,
arg4: LegacyValue,
done: LegacyAsyncFunctionDone
) => void)
| ((
this: LegacyPluginThis,
arg1: LegacyValue,
arg2: LegacyValue,
arg3: LegacyValue,
arg4: LegacyValue,
arg5: LegacyValue,
done: LegacyAsyncFunctionDone
) => void)
| ((
this: LegacyPluginThis,
arg1: LegacyValue,
arg2: LegacyValue,
arg3: LegacyValue,
arg4: LegacyValue,
arg5: LegacyValue,
arg6: LegacyValue,
done: LegacyAsyncFunctionDone
) => void)
| ((
this: LegacyPluginThis,
...args: [...LegacyValue[], LegacyAsyncFunctionDone]
) => void);
/**
* The function called by a {@link LegacyAsyncFunction} to indicate that it's
* finished.
*
* @param result - If this is a {@link LegacyValue}, that indicates that the
* function call completed successfully. If it's a {@link types.Error}, that
* indicates that the function call failed.
*
* @category Legacy
* @deprecated This only works with the legacy {@link render} and {@link
* renderSync} APIs. Use {@link CustomFunction} with {@link compile}, {@link
* compileString}, {@link compileAsync}, and {@link compileStringAsync} instead.
*/
export type LegacyAsyncFunctionDone = (
result: LegacyValue | types.Error
) => void;
/**
* A callback that implements a custom Sass function. For {@link renderSync},
* this must be a {@link LegacySyncFunction} which returns its result directly;
* for {@link render}, it may be either a {@link LegacySyncFunction} or a {@link
* LegacyAsyncFunction} which calls a callback with its result.
*
* See {@link LegacySharedOptions.functions} for more details.
*
* @category Legacy
* @deprecated This only works with the legacy {@link render} and {@link
* renderSync} APIs. Use {@link CustomFunction} with {@link compile}, {@link
* compileString}, {@link compileAsync}, and {@link compileStringAsync} instead.
*/
export type LegacyFunction<sync extends 'sync' | 'async'> = sync extends 'async'
? LegacySyncFunction | LegacyAsyncFunction
: LegacySyncFunction;
/**
* A type representing all the possible values that may be passed to or returned
* from a {@link LegacyFunction}.
*
* @category Legacy
* @deprecated This only works with the legacy {@link render} and {@link
* renderSync} APIs. Use {@link Value} with {@link compile}, {@link
* compileString}, {@link compileAsync}, and {@link compileStringAsync} instead.
*/
export type LegacyValue =
| types.Null
| types.Number
| types.String
| types.Boolean
| types.Color
| types.List
| types.Map;
/**
* A shorthand for `sass.types.Boolean.TRUE`.
*
* @category Legacy
* @deprecated This only works with the legacy {@link render} and {@link
* renderSync} APIs. Use {@link sassTrue} with {@link compile}, {@link
* compileString}, {@link compileAsync}, and {@link compileStringAsync} instead.
*/
export const TRUE: types.Boolean<true>;
/**
* A shorthand for `sass.types.Boolean.FALSE`.
*
* @category Legacy
* @deprecated This only works with the legacy {@link render} and {@link
* renderSync} APIs. Use {@link sassFalse} with {@link compile}, {@link
* compileString}, {@link compileAsync}, and {@link compileStringAsync} instead.
*/
export const FALSE: types.Boolean<false>;
/**
* A shorthand for `sass.types.Null.NULL`.
*
* @category Legacy
* @deprecated This only works with the legacy {@link render} and {@link
* renderSync} APIs. Use {@link sassNull} with {@link compile}, {@link
* compileString}, {@link compileAsync}, and {@link compileStringAsync} instead.
*/
export const NULL: types.Null;
/**
* The namespace for value types used in the legacy function API.
*
* @category Legacy
* @deprecated This only works with the legacy {@link render} and {@link
* renderSync} APIs. Use {@link Value} with {@link compile}, {@link
* compileString}, {@link compileAsync}, and {@link compileStringAsync} instead.
*/
export namespace types {
/**
* The class for Sass's singleton [`null`
* value](https://sass-lang.com/documentation/values/null). The value itself
* can be accessed through the {@link NULL} field.
*/
export class Null {
/** Sass's singleton `null` value. */
static readonly NULL: Null;
}
/**
* Sass's [number type](https://sass-lang.com/documentation/values/numbers).
*/
export class Number {
/**
* @param value - The numeric value of the number.
*
* @param unit - If passed, the number's unit.
*
* Complex units can be represented as
* `<unit>*<unit>*.../<unit>*<unit>*...`, with numerator units on the
* left-hand side of the `/` and denominator units on the right. A number
* with only numerator units may omit the `/` and the units after it, and a
* number with only denominator units may be represented
* with no units before the `/`.
*
* @example
*
* ```scss
* new sass.types.Number(0.5); // == 0.5
* new sass.types.Number(10, "px"); // == 10px
* new sass.types.Number(10, "px*px"); // == 10px * 1px
* new sass.types.Number(10, "px/s"); // == math.div(10px, 1s)
* new sass.types.Number(10, "px*px/s*s"); // == 10px * math.div(math.div(1px, 1s), 1s)
* ```
*/
constructor(value: number, unit?: string);
/**
* Returns the value of the number, ignoring units.
*
* **Heads up!** This means that `96px` and `1in` will return different
* values, even though they represent the same length.
*
* @example
*
* ```js
* const number = new sass.types.Number(10, "px");
* number.getValue(); // 10
* ```
*/
getValue(): number;
/**
* Destructively modifies this number by setting its numeric value to
* `value`, independent of its units.
*
* @deprecated Use {@link constructor} instead.
*/
setValue(value: number): void;
/**
* Returns a string representation of this number's units. Complex units are
* returned in the same format that {@link constructor} accepts them.
*
* @example
*
* ```js
* // number is `10px`.
* number.getUnit(); // "px"
*
* // number is `math.div(10px, 1s)`.
* number.getUnit(); // "px/s"
* ```
*/
getUnit(): string;
/**
* Destructively modifies this number by setting its units to `unit`,
* independent of its numeric value. Complex units are specified in the same
* format as {@link constructor}.
*
* @deprecated Use {@link constructor} instead.
*/
setUnit(unit: string): void;
}
/**
* Sass's [string type](https://sass-lang.com/documentation/values/strings).
*
* **Heads up!** This API currently provides no way of distinguishing between
* a [quoted](https://sass-lang.com/documentation/values/strings#quoted) and
* [unquoted](https://sass-lang.com/documentation/values/strings#unquoted)
* string.
*/
export class String {
/**
* Creates an unquoted string with the given contents.
*
* **Heads up!** This API currently provides no way of creating a
* [quoted](https://sass-lang.com/documentation/values/strings#quoted)
* string.
*/
constructor(value: string);
/**
* Returns the contents of the string. If the string contains escapes,
* those escapes are included literally if it’s
* [unquoted](https://sass-lang.com/documentation/values/strings#unquoted),
* while the values of the escapes are included if it’s
* [quoted](https://sass-lang.com/documentation/values/strings#quoted).
*
* @example
*
* ```
* // string is `Arial`.
* string.getValue(); // "Arial"
*
* // string is `"Helvetica Neue"`.
* string.getValue(); // "Helvetica Neue"
*
* // string is `\1F46D`.
* string.getValue(); // "\\1F46D"
*
* // string is `"\1F46D"`.
* string.getValue(); // "👭"
* ```
*/
getValue(): string;
/**
* Destructively modifies this string by setting its numeric value to
* `value`.
*
* **Heads up!** Even if the string was originally quoted, this will cause
* it to become unquoted.
*
* @deprecated Use {@link constructor} instead.
*/
setValue(value: string): void;
}
/**
* Sass's [boolean type](https://sass-lang.com/documentation/values/booleans).
*
* Custom functions should respect Sass’s notion of
* [truthiness](https://sass-lang.com/documentation/at-rules/control/if#truthiness-and-falsiness)
* by treating `false` and `null` as falsey and everything else as truthy.
*
* **Heads up!** Boolean values can't be constructed, they can only be
* accessed through the {@link TRUE} and {@link FALSE} constants.
*/
export class Boolean<T extends boolean = boolean> {
/**
* Returns `true` if this is Sass's `true` value and `false` if this is
* Sass's `false` value.
*
* @example
*
* ```js
* // boolean is `true`.
* boolean.getValue(); // true
* boolean === sass.types.Boolean.TRUE; // true
*
* // boolean is `false`.
* boolean.getValue(); // false
* boolean === sass.types.Boolean.FALSE; // true
* ```
*/
getValue(): T;
/** Sass's `true` value. */
static readonly TRUE: Boolean<true>;
/** Sass's `false` value. */
static readonly FALSE: Boolean<false>;
}
/**
* Sass's [color type](https://sass-lang.com/documentation/values/colors).
*/
export class Color {
/**
* Creates a new Sass color with the given red, green, blue, and alpha
* channels. The red, green, and blue channels must be integers between 0
* and 255 (inclusive), and alpha must be between 0 and 1 (inclusive).
*
* @example
*
* ```js
* new sass.types.Color(107, 113, 127); // #6b717f
* new sass.types.Color(0, 0, 0, 0); // rgba(0, 0, 0, 0)
* ```
*/
constructor(r: number, g: number, b: number, a?: number);
/**
* Creates a new Sass color with alpha, red, green, and blue channels taken
* from respective two-byte chunks of a hexidecimal number.
*
* @example
*
* ```js
* new sass.types.Color(0xff6b717f); // #6b717f
* new sass.types.Color(0x00000000); // rgba(0, 0, 0, 0)
* ```
*/
constructor(argb: number);
/**
* Returns the red channel of the color as an integer from 0 to 255.
*
* @example
*
* ```js
* // color is `#6b717f`.
* color.getR(); // 107
*
* // color is `#b37399`.
* color.getR(); // 179
* ```
*/
getR(): number;
/**
* Sets the red channel of the color. The value must be an integer between 0
* and 255 (inclusive).
*
* @deprecated Use {@link constructor} instead.
*/
setR(value: number): void;
/**
* Returns the green channel of the color as an integer from 0 to 255.
*
* @example
*
* ```js
* // color is `#6b717f`.
* color.getG(); // 113
*
* // color is `#b37399`.
* color.getG(); // 115
* ```
*/
getG(): number;
/**
* Sets the green channel of the color. The value must be an integer between
* 0 and 255 (inclusive).
*
* @deprecated Use {@link constructor} instead.
*/
setG(value: number): void;
/**
* Returns the blue channel of the color as an integer from 0 to 255.
*
* @example
*
* ```js
* // color is `#6b717f`.
* color.getB(); // 127
*
* // color is `#b37399`.
* color.getB(); // 153
* ```
*/
getB(): number;
/**
* Sets the blue channel of the color. The value must be an integer between
* 0 and 255 (inclusive).
*
* @deprecated Use {@link constructor} instead.
*/
setB(value: number): void;
/**
* Returns the alpha channel of the color as a number from 0 to 1.
*
* @example
*
* ```js
* // color is `#6b717f`.
* color.getA(); // 1
*
* // color is `transparent`.
* color.getA(); // 0
* ```
*/
getA(): number;
/**
* Sets the alpha channel of the color. The value must be between 0 and 1
* (inclusive).
*
* @deprecated Use {@link constructor} instead.
*/
setA(value: number): void;
}
/**
* Sass's [list type](https://sass-lang.com/documentation/values/lists).
*
* **Heads up!** This list type’s methods use 0-based indexing, even though
* within Sass lists use 1-based indexing. These methods also don’t support
* using negative numbers to index backwards from the end of the list.
*/
export class List {
/**
* Creates a new Sass list.
*
* **Heads up!** The initial values of the list elements are undefined.
* These elements must be set using {@link setValue} before accessing them
* or passing the list back to Sass.
*
* @example
*
* ```js
* const list = new sass.types.List(3);
* list.setValue(0, new sass.types.Number(10, "px"));
* list.setValue(1, new sass.types.Number(15, "px"));
* list.setValue(2, new sass.types.Number(32, "px"));
* list; // 10px, 15px, 32px
* ```
*
* @param length - The number of (initially undefined) elements in the list.
* @param commaSeparator - If `true`, the list is comma-separated; otherwise,
* it's space-separated. Defaults to `true`.
*/
constructor(length: number, commaSeparator?: boolean);
/**
* Returns the element at `index`, or `undefined` if that value hasn't yet
* been set.
*
* @example
*
* ```js
* // list is `10px, 15px, 32px`
* list.getValue(0); // 10px
* list.getValue(2); // 32px
* ```
*
* @param index - A (0-based) index into this list.
* @throws `Error` if `index` is less than 0 or greater than or equal to the
* number of elements in this list.
*/
getValue(index: number): LegacyValue | undefined;
/**
* Sets the element at `index` to `value`.
*
* @example
*
* ```js
* // list is `10px, 15px, 32px`
* list.setValue(1, new sass.types.Number(18, "px"));
* list; // 10px, 18px, 32px
* ```
*
* @param index - A (0-based) index into this list.
* @throws `Error` if `index` is less than 0 or greater than or equal to the
* number of elements in this list.
*/
setValue(index: number, value: LegacyValue): void;
/**
* Returns `true` if this list is comma-separated and `false` otherwise.
*
* @example
*
* ```js
* // list is `10px, 15px, 32px`
* list.getSeparator(); // true
*
* // list is `1px solid`
* list.getSeparator(); // false
* ```
*/
getSeparator(): boolean;
/**
* Sets whether the list is comma-separated.
*
* @param isComma - `true` to make the list comma-separated, `false` otherwise.
*/
setSeparator(isComma: boolean): void;
/**
* Returns the number of elements in the list.
*
* @example
*
* ```js
* // list is `10px, 15px, 32px`
* list.getLength(); // 3
*
* // list is `1px solid`
* list.getLength(); // 2
* ```
*/
getLength(): number;
}
/**
* Sass's [map type](https://sass-lang.com/documentation/values/maps).
*
* **Heads up!** This map type is represented as a list of key-value pairs
* rather than a mapping from keys to values. The only way to find the value
* associated with a given key is to iterate through the map checking for that
* key. Maps created through this API are still forbidden from having duplicate
* keys.
*/
export class Map {
/**
* Creates a new Sass map.
*
* **Heads up!** The initial keys and values of the map are undefined. They
* must be set using {@link setKey} and {@link setValue} before accessing
* them or passing the map back to Sass.
*
* @example
*
* ```js
* const map = new sass.types.Map(2);
* map.setKey(0, new sass.types.String("width"));
* map.setValue(0, new sass.types.Number(300, "px"));
* map.setKey(1, new sass.types.String("height"));
* map.setValue(1, new sass.types.Number(100, "px"));
* map; // (width: 300px, height: 100px)
* ```
*
* @param length - The number of (initially undefined) key/value pairs in the map.
*/
constructor(length: number);
/**
* Returns the value in the key/value pair at `index`.
*
* @example
*
* ```js
* // map is `(width: 300px, height: 100px)`
* map.getValue(0); // 300px
* map.getValue(1); // 100px
* ```
*
* @param index - A (0-based) index of a key/value pair in this map.
* @throws `Error` if `index` is less than 0 or greater than or equal to the
* number of pairs in this map.
*/
getValue(index: number): LegacyValue;
/**
* Sets the value in the key/value pair at `index` to `value`.
*
* @example
*
* ```js
* // map is `("light": 200, "medium": 400, "bold": 600)`
* map.setValue(1, new sass.types.Number(300));
* map; // ("light": 200, "medium": 300, "bold": 600)
* ```
*
* @param index - A (0-based) index of a key/value pair in this map.
* @throws `Error` if `index` is less than 0 or greater than or equal to the
* number of pairs in this map.
*/
setValue(index: number, value: LegacyValue): void;
/**
* Returns the key in the key/value pair at `index`.
*
* @example
*
* ```js
* // map is `(width: 300px, height: 100px)`
* map.getKey(0); // width
* map.getKey(1); // height
* ```
*
* @param index - A (0-based) index of a key/value pair in this map.
* @throws `Error` if `index` is less than 0 or greater than or equal to the
* number of pairs in this map.
*/
getKey(index: number): LegacyValue;
/**
* Sets the value in the key/value pair at `index` to `value`.
*
* @example
*
* ```js
* // map is `("light": 200, "medium": 400, "bold": 600)`
* map.setValue(1, new sass.types.String("lighter"));
* map; // ("lighter": 200, "medium": 300, "bold": 600)
* ```
*
* @param index - A (0-based) index of a key/value pair in this map.
* @throws `Error` if `index` is less than 0 or greater than or equal to the
* number of pairs in this map.
*/
setKey(index: number, key: LegacyValue): void;
/**
* Returns the number of key/value pairs in this map.
*
* @example
*
* ```js
* // map is `("light": 200, "medium": 400, "bold": 600)`
* map.getLength(); // 3
*
* // map is `(width: 300px, height: 100px)`
* map.getLength(); // 2
* ```
*/
getLength(): number;
}
/**
* An error that can be returned from a Sass function to signal that it
* encountered an error. This is the only way to signal an error
* asynchronously from a {@link LegacyAsyncFunction}.
*/
export class Error {
constructor(message: string);
}
}
@@ -0,0 +1,7 @@
{
"version": 3,
"sources": ["../../node_modules/@isaacs/fs-minipass/src/index.ts", "../../node_modules/minipass/src/index.ts", "../../src/create.ts", "../../src/list.ts", "../../src/options.ts", "../../src/make-command.ts", "../../src/parse.ts", "../../node_modules/minizlib/src/index.ts", "../../node_modules/minizlib/src/constants.ts", "../../src/header.ts", "../../src/large-numbers.ts", "../../src/types.ts", "../../src/pax.ts", "../../src/normalize-windows-path.ts", "../../src/read-entry.ts", "../../src/warn-method.ts", "../../src/strip-trailing-slashes.ts", "../../src/pack.ts", "../../src/write-entry.ts", "../../src/mode-fix.ts", "../../src/strip-absolute-path.ts", "../../src/winchars.ts", "../../node_modules/yallist/src/index.ts", "../../src/extract.ts", "../../src/unpack.ts", "../../src/get-write-flag.ts", "../../node_modules/chownr/src/index.ts", "../../src/mkdir.ts", "../../src/cwd-error.ts", "../../src/symlink-error.ts", "../../src/path-reservations.ts", "../../src/normalize-unicode.ts", "../../src/process-umask.ts", "../../src/replace.ts", "../../src/update.ts"],
"sourcesContent": ["import EE from 'events'\nimport fs from 'fs'\nimport { Minipass } from 'minipass'\n\nconst writev = fs.writev\n\nconst _autoClose = Symbol('_autoClose')\nconst _close = Symbol('_close')\nconst _ended = Symbol('_ended')\nconst _fd = Symbol('_fd')\nconst _finished = Symbol('_finished')\nconst _flags = Symbol('_flags')\nconst _flush = Symbol('_flush')\nconst _handleChunk = Symbol('_handleChunk')\nconst _makeBuf = Symbol('_makeBuf')\nconst _mode = Symbol('_mode')\nconst _needDrain = Symbol('_needDrain')\nconst _onerror = Symbol('_onerror')\nconst _onopen = Symbol('_onopen')\nconst _onread = Symbol('_onread')\nconst _onwrite = Symbol('_onwrite')\nconst _open = Symbol('_open')\nconst _path = Symbol('_path')\nconst _pos = Symbol('_pos')\nconst _queue = Symbol('_queue')\nconst _read = Symbol('_read')\nconst _readSize = Symbol('_readSize')\nconst _reading = Symbol('_reading')\nconst _remain = Symbol('_remain')\nconst _size = Symbol('_size')\nconst _write = Symbol('_write')\nconst _writing = Symbol('_writing')\nconst _defaultFlag = Symbol('_defaultFlag')\nconst _errored = Symbol('_errored')\n\nexport type ReadStreamOptions =\n Minipass.Options<Minipass.ContiguousData> & {\n fd?: number\n readSize?: number\n size?: number\n autoClose?: boolean\n }\n\nexport type ReadStreamEvents = Minipass.Events<Minipass.ContiguousData> & {\n open: [fd: number]\n}\n\nexport class ReadStream extends Minipass<\n Minipass.ContiguousData,\n Buffer,\n ReadStreamEvents\n> {\n [_errored]: boolean = false;\n [_fd]?: number;\n [_path]: string;\n [_readSize]: number;\n [_reading]: boolean = false;\n [_size]: number;\n [_remain]: number;\n [_autoClose]: boolean\n\n constructor(path: string, opt: ReadStreamOptions) {\n opt = opt || {}\n super(opt)\n\n this.readable = true\n this.writable = false\n\n if (typeof path !== 'string') {\n throw new TypeError('path must be a string')\n }\n\n this[_errored] = false\n this[_fd] = typeof opt.fd === 'number' ? opt.fd : undefined\n this[_path] = path\n this[_readSize] = opt.readSize || 16 * 1024 * 1024\n this[_reading] = false\n this[_size] = typeof opt.size === 'number' ? opt.size : Infinity\n this[_remain] = this[_size]\n this[_autoClose] =\n typeof opt.autoClose === 'boolean' ? opt.autoClose : true\n\n if (typeof this[_fd] === 'number') {\n this[_read]()\n } else {\n this[_open]()\n }\n }\n\n get fd() {\n return this[_fd]\n }\n\n get path() {\n return this[_path]\n }\n\n //@ts-ignore\n write() {\n throw new TypeError('this is a readable stream')\n }\n\n //@ts-ignore\n end() {\n throw new TypeError('this is a readable stream')\n }\n\n [_open]() {\n fs.open(this[_path], 'r', (er, fd) => this[_onopen](er, fd))\n }\n\n [_onopen](er?: NodeJS.ErrnoException | null, fd?: number) {\n if (er) {\n this[_onerror](er)\n } else {\n this[_fd] = fd\n this.emit('open', fd as number)\n this[_read]()\n }\n }\n\n [_makeBuf]() {\n return Buffer.allocUnsafe(Math.min(this[_readSize], this[_remain]))\n }\n\n [_read]() {\n if (!this[_reading]) {\n this[_reading] = true\n const buf = this[_makeBuf]()\n /* c8 ignore start */\n if (buf.length === 0) {\n return process.nextTick(() => this[_onread](null, 0, buf))\n }\n /* c8 ignore stop */\n fs.read(this[_fd] as number, buf, 0, buf.length, null, (er, br, b) =>\n this[_onread](er, br, b),\n )\n }\n }\n\n [_onread](er?: NodeJS.ErrnoException | null, br?: number, buf?: Buffer) {\n this[_reading] = false\n if (er) {\n this[_onerror](er)\n } else if (this[_handleChunk](br as number, buf as Buffer)) {\n this[_read]()\n }\n }\n\n [_close]() {\n if (this[_autoClose] && typeof this[_fd] === 'number') {\n const fd = this[_fd]\n this[_fd] = undefined\n fs.close(fd, er =>\n er ? this.emit('error', er) : this.emit('close'),\n )\n }\n }\n\n [_onerror](er: NodeJS.ErrnoException) {\n this[_reading] = true\n this[_close]()\n this.emit('error', er)\n }\n\n [_handleChunk](br: number, buf: Buffer) {\n let ret = false\n // no effect if infinite\n this[_remain] -= br\n if (br > 0) {\n ret = super.write(br < buf.length ? buf.subarray(0, br) : buf)\n }\n\n if (br === 0 || this[_remain] <= 0) {\n ret = false\n this[_close]()\n super.end()\n }\n\n return ret\n }\n\n emit<Event extends keyof ReadStreamEvents>(\n ev: Event,\n ...args: ReadStreamEvents[Event]\n ): boolean {\n switch (ev) {\n case 'prefinish':\n case 'finish':\n return false\n\n case 'drain':\n if (typeof this[_fd] === 'number') {\n this[_read]()\n }\n return false\n\n case 'error':\n if (this[_errored]) {\n return false\n }\n this[_errored] = true\n return super.emit(ev, ...args)\n\n Line truncated
"mappings": "6FAAA,OAAOA,OAAQ,SACf,OAAOC,MAAQ,KCMf,OAAS,gBAAAC,OAAoB,cAC7B,OAAOC,OAAY,cACnB,OAAS,iBAAAC,OAAqB,sBAT9B,IAAMC,GACJ,OAAO,SAAY,UAAY,QAC3B,QACA,CACE,OAAQ,KACR,OAAQ,MAiBHC,GACX,GAEA,CAAC,CAAC,GACF,OAAO,GAAM,WACZ,aAAaC,GACZ,aAAaJ,IACbK,GAAW,CAAC,GACZC,GAAW,CAAC,GAKHD,GAAc,GACzB,CAAC,CAAC,GACF,OAAO,GAAM,UACb,aAAaN,IACb,OAAQ,EAAwB,MAAS,YAExC,EAAwB,OAASC,GAAO,SAAS,UAAU,KAKjDM,GAAc,GACzB,CAAC,CAAC,GACF,OAAO,GAAM,UACb,aAAaP,IACb,OAAQ,EAAwB,OAAU,YAC1C,OAAQ,EAAwB,KAAQ,WAEpCQ,EAAM,OAAO,KAAK,EAClBC,EAAiB,OAAO,cAAc,EACtCC,GAAc,OAAO,YAAY,EACjCC,GAAe,OAAO,aAAa,EACnCC,GAAgB,OAAO,cAAc,EACrCC,GAAS,OAAO,QAAQ,EACxBC,GAAO,OAAO,MAAM,EACpBC,GAAQ,OAAO,OAAO,EACtBC,GAAa,OAAO,YAAY,EAChCC,EAAW,OAAO,UAAU,EAC5BC,GAAU,OAAO,SAAS,EAC1BC,EAAU,OAAO,SAAS,EAC1BC,GAAS,OAAO,QAAQ,EACxBC,GAAS,OAAO,QAAQ,EACxBC,EAAS,OAAO,QAAQ,EACxBC,EAAQ,OAAO,OAAO,EACtBC,EAAe,OAAO,cAAc,EACpCC,GAAa,OAAO,YAAY,EAChCC,GAAc,OAAO,aAAa,EAClCC,EAAa,OAAO,YAAY,EAEhCC,EAAY,OAAO,WAAW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D,EAC1D,CAAE,KAAM,sBAAsB,CAAE,CACjC,EAEI,GAGL,OAAOqC,GAAa,aACtBC,EAAKD,EACLA,EAAW,QAGRA,IAAUA,EAAW,QAE1B,IAAMzB,EAAK,KAAKP,CAAK,EAAIM,GAAQE,GAMjC,GAAI,CAAC,KAAKd,CAAU,GAAK,CAAC,OAAO,SAASqC,CAAK,GAC7C,GAAIlB,GAAkBkB,CAAK,EAEzBA,EAAQ,OAAO,KACbA,EAAM,OACNA,EAAM,WACNA,EAAM,UAAU,UAETpB,GAAkBoB,CAAK,EAEhCA,EAAQ,OAAO,KAAKA,CAAK,UAChB,OAAOA,GAAU,SAC1B,MAAM,IAAI,MACR,sDAAsD,EAO5D,OAAI,KAAKrC,CAAU,GAGb,KAAKR,CAAO,GAAK,KAAKK,CAAY,IAAM,GAAG,KAAKT,EAAK,EAAE,EAAI,EAG3D,KAAKI,CAAO,EAAG,KAAK,KAAK,OAAQ6C,CAAyB,EACzD,KAAKvC,EAAU,EAAEuC,CAAyB,EAE3C,KAAKxC,CAAY,IAAM,GAAG,KAAK,KAAK,UAAU,EAE9C0C,GAAI1B,EAAG0B,CAAE,EAEN,KAAK/C,CAAO,GAKf6C,EAAkC,QAStC,OAAOA,GAAU,UAEjB,EAAEC,IAAa,KAAKhD,CAAQ,GAAK,CAAC,KAAKC,EAAO,GAAG,YAGjD8C,EAAQ,OAAO,KAAKA,EAAOC,CAAQ,GAGjC,OAAO,SAASD,CAAK,GAAK,KAAK/C,CAAQ,IAEzC+C,EAAQ,KAAK9C,EAAO,EAAE,MAAM8C,CAAK,GAI/B,KAAK7C,CAAO,GAAK,KAAKK,CAAY,IAAM,GAAG,KAAKT,EAAK,EAAE,EAAI,EAE3Line truncated
"names": ["EE", "fs", "EventEmitter", "Stream", "StringDecoder", "proc", "isStream", "Minipass", "isReadable", "isWritable", "EOF", "MAYBE_EMIT_END", "EMITTED_END", "EMITTING_END", "EMITTED_ERROR", "CLOSED", "READ", "FLUSH", "FLUSHCHUNK", "ENCODING", "DECODER", "FLOWING", "PAUSED", "RESUME", "BUFFER", "PIPES", "BUFFERLENGTH", "BUFFERPUSH", "BUFFERSHIFT", "OBJECTMODE", "DESTROYED", "ERROR", "EMITDATA", "EMITEND", "EMITEND2", "ASYNC", "ABORT", "ABORTED", "SIGNAL", "DATALISTENERS", "DISCARDED", "defer", "fn", "nodefer", "isEndish", "ev", "isArrayBufferLike", "b", "isArrayBufferView", "Pipe", "src", "dest", "opts", "_er", "PipeProxyErrors", "er", "isObjectModeOptions", "o", "isEncodingOptions", "args", "options", "signal", "_enc", "_om", "a", "_", "chunk", "encoding", "cb", "n", "ret", "c", "noDrain", "ended", "p", "handler", "h", "data", "buf", "resolve", "reject", "stopped", "stop", "res", "onerr", "ondata", "onend", "ondestroy", "value", "rej", "next", "wc", "writev", "fs", "_autoClose", "_close", "_ended", "_fd", "_finished", "_flags", "_flush", "_handleChunk", "_makeBuf", "_mode", "_needDrain", "_onerror", "_onopen", "_onread", "_onwrite", "_open", "_path", "_pos", "_queue", "_read", "_readSize", "_reading", "_remain", "_size", "_write", "_writing", "_defaultFlag", "_errored", "ReadStream", "Minipass", "path", "opt", "er", "fd", "buf", "br", "b", "ret", "ev", "args", "ReadStreamSync", "threw", "WriteStream", "EE", "defaultFlag", "enc", "bw", "iovec", "WriteStreamSync", "path", "fs", "dirname", "parse", "argmap", "isSyncFile", "o", "isAsyncFile", "isSyncNoFile", "isAsyncNoFile", "isFile", "o", "dealiasKey", "k", "d", "argmap", "dealias", "opt", "result", "key", "v", "makeCommand", "syncFile", "asyncFile", "syncNoFile", "asyncNoFile", "validate", "opt_", "entries", "cb", "opt", "dealias", "isSyncFile", "isAsyncFile", "p", "isSyncNoFile", "isAsyncNoFile", "EE", "assert", "Buffer", "realZlib", "realZlib", "realZlibConstants", "constants", "OriginalBufferConcat", "Buffer", "desc", "noop", "args", "passthroughBufferConcat", "makeNoOp", "_", "_superWrite", "ZlibError", "err", "origin", "_flushFlag", "ZlibBase", "Minipass", "#sawError", "#ended", "#flushFlag", "#finishFlushFlag", "#fullFlushFlag", "#handle", "#onError", "opts", "mode", "realZlib", "er", "assert", "flushFlag", "chunk", "encoding", "cb", "data", "nativeHandle", "originalNativeClose", "originalClose", "result", "writeReturn", "r", "i", "Zlib", "#level", "#strategy", "constants", "level", "strategy", "origFlush", "Gzip", "Zlib", "#portable", "opts", "_superWrite", "data", "Unzip", "Zlib", "opts", "Brotli", "ZlibBase", "mode", "constants", "BrotliCompress", "BrotliDecompress", "Zstd", "ZstdCompress", "ZstdDecompress", "pathModule", "encode", "num", "buf", "encodeNegative", "encodePositive", "i", "flipped", "byte", "onesComp", "twosComp", "parse", "pre", "value", "pos", "twos", "len", "sum", "f", "types_exports", "__export", "code", "isCode", "isName", "name", "normalFsTypes", "c", "kv", "notNegative", "n", "Header", "#type", "data", "off", "ex", "gex", "#slurp", "buf", "t", "decString", "isNormalFS", "normalFsTypes", "exForFields", "gexForFields", "decNumber", "decDate", "isCode", "prefix", "sum", "i", "k", "v", "prefixSize", "split", "splitPrefix", "path", "encString", "encNumber", "encDate", "name", "type", "c", "code", "p", "pp", "ret", "root", "pathModule", "size", "numToDate", "num", "parse", "decSmallNumber", "nanUndef", "value", "MAXNUM", "encode", "encSmallNumber", "octalString", "padOctal", "str", "date", "NULLS", "basename", "Pax", "_Pax", "obj", "global", "body", "bodyLen", "bufLen", "buf", "i", "Header", "basename", "field", "r", "v", "s", "byteLen", "digits", "str", "ex", "g", "merge", "parseKV", "a", "b", "parseKVLine", "set", "line", "n", "kv", "k", "platform", "normalizeWindowsPath", "p", "ReadEntry", "Minipass", "header", "ex", "gex", "normalizeWindowsPath", "#slurp", "data", "writeLen", "r", "br", "k", "v", "warnMethod", "self", "code", "message", "data", "maxMetaEntrySize", "gzipHeader", "zstdHeader", "ZIP_HEADER_LEN", "STATE", "WRITEENTRY", "READENTRY", "NEXTENTRY", "PROCESSENTRY", "EX", "GEX", "META", "EMITMETA", "BUFFER", "QUEUE", "ENDED", "EMITTEDEND", "EMIT", "UNZIP", "CONSUMECHUNK", "CONSUMECHUNKSUB", "CONSUMEBODY", "CONSUMEMETA", "CONSUMEHEADER", "CONSUMING", "BUFFERCONCAT", "MAYBEEND", "WRITING", "ABORTED", "DONE", "SAW_VALID_ENTRY", "SAW_NULL_BLOCK", "SAW_EOF", "CLOSESTREAM", "MAX_DECOMPRESSION_RATIO", "COMPRESSEDBYTESREAD", "DECOMPRESSEDBYTESREAD", "CHECKDECOMPRESSIONRATIO", "noop", "Parser", "EE", "opt", "isTBR", "isTZST", "code", "message", "data", "warnMethod", "chunk", "position", "header", "Header", "er", "type", "entry", "ReadEntry", "onend", "c", "go", "ev", "args", "re", "br", "ret", "extra", "Pax", "ex", "error", "u", "ratio", "encoding", "cb", "i", "isZstd", "maybeBrotli", "ended", "Unzip", "ZstdDecompress", "BrotliDecompress", "have", "length", "stripTrailingSlashes", "str", "i", "slashesStart", "onReadEntryFuLine truncated
}
@@ -0,0 +1,153 @@
Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
const require_helper_css_common = require("../../helper/css/common.js");
//#region src/jsx/dom/css.ts
const splitRule = (rule) => {
const result = [];
let startPos = 0;
let depth = 0;
for (let i = 0, len = rule.length; i < len; i++) {
const char = rule[i];
if (char === "'" || char === "\"") {
const quote = char;
i++;
for (; i < len; i++) {
if (rule[i] === "\\") {
i++;
continue;
}
if (rule[i] === quote) break;
}
continue;
}
if (char === "{") {
depth++;
continue;
}
if (char === "}") {
depth--;
if (depth === 0) {
result.push(rule.slice(startPos, i + 1));
startPos = i + 1;
}
continue;
}
}
return result;
};
const createCssJsxDomObjects = ({ id }) => {
let styleSheet = void 0;
const findStyleSheet = () => {
if (!styleSheet) {
styleSheet = document.querySelector(`style#${id}`)?.sheet;
if (styleSheet) styleSheet.addedStyles = /* @__PURE__ */ new Set();
}
return styleSheet ? [styleSheet, styleSheet.addedStyles] : [];
};
const insertRule = (className, styleString) => {
const [sheet, addedStyles] = findStyleSheet();
if (!sheet || !addedStyles) {
Promise.resolve().then(() => {
if (!findStyleSheet()[0]) throw new Error("style sheet not found");
insertRule(className, styleString);
});
return;
}
if (!addedStyles.has(className)) {
addedStyles.add(className);
(className.startsWith(":-hono-global") ? splitRule(styleString) : [`${className[0] === "@" ? "" : "."}${className}{${styleString}}`]).forEach((rule) => {
sheet.insertRule(rule, sheet.cssRules.length);
});
}
};
const cssObject = { toString() {
const selector = this[require_helper_css_common.SELECTOR];
insertRule(selector, this[require_helper_css_common.STYLE_STRING]);
this[require_helper_css_common.SELECTORS].forEach(({ [require_helper_css_common.CLASS_NAME]: className, [require_helper_css_common.STYLE_STRING]: styleString }) => {
insertRule(className, styleString);
});
return this[require_helper_css_common.CLASS_NAME];
} };
const Style = ({ children, nonce }) => ({
tag: "style",
props: {
id,
nonce,
children: children && (Array.isArray(children) ? children : [children]).map((c) => c[require_helper_css_common.STYLE_STRING])
}
});
return [cssObject, Style];
};
/**
* @experimental
* `createCssContext` is an experimental feature.
* The API might be changed.
*
* @param options.id - The ID for the style element
* @param options.classNameSlug - Optional function to customize generated CSS class names
* @param options.onInvalidSlug - Optional callback function called when an invalid slug is returned from ClassNameSlug
*/
const createCssContext = ({ id, classNameSlug, onInvalidSlug }) => {
const [cssObject, Style] = createCssJsxDomObjects({ id });
const newCssClassNameObject = (cssClassName) => {
cssClassName.toString = cssObject.toString;
return cssClassName;
};
const css = (strings, ...values) => {
return newCssClassNameObject(require_helper_css_common.cssCommon(strings, values, classNameSlug, onInvalidSlug));
};
const cx = (...args) => {
args = require_helper_css_common.cxCommon(args);
return css(Array(args.length).fill(""), ...args);
};
const keyframes = (strings, ...values) => require_helper_css_common.keyframesCommon(strings, values, classNameSlug, onInvalidSlug);
const viewTransition = ((strings, ...values) => {
return newCssClassNameObject(require_helper_css_common.viewTransitionCommon(strings, values, classNameSlug, onInvalidSlug));
});
return {
css,
cx,
keyframes,
viewTransition,
Style
};
};
const defaultContext = createCssContext({ id: require_helper_css_common.DEFAULT_STYLE_ID });
/**
* @experimental
* `css` is an experimental feature.
* The API might be changed.
*/
const css = defaultContext.css;
/**
* @experimental
* `cx` is an experimental feature.
* The API might be changed.
*/
const cx = defaultContext.cx;
/**
* @experimental
* `keyframes` is an experimental feature.
* The API might be changed.
*/
const keyframes = defaultContext.keyframes;
/**
* @experimental
* `viewTransition` is an experimental feature.
* The API might be changed.
*/
const viewTransition = defaultContext.viewTransition;
/**
* @experimental
* `Style` is an experimental feature.
* The API might be changed.
*/
const Style = defaultContext.Style;
//#endregion
exports.Style = Style;
exports.createCssContext = createCssContext;
exports.createCssJsxDomObjects = createCssJsxDomObjects;
exports.css = css;
exports.cx = cx;
exports.keyframes = keyframes;
exports.rawCssString = require_helper_css_common.rawCssString;
exports.viewTransition = viewTransition;
@@ -0,0 +1,25 @@
Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
//#region src/utils/jwt/jwa.ts
/**
* @module
* JSON Web Algorithms (JWA)
* https://datatracker.ietf.org/doc/html/rfc7518
*/
let AlgorithmTypes = /* @__PURE__ */ function(AlgorithmTypes) {
AlgorithmTypes["HS256"] = "HS256";
AlgorithmTypes["HS384"] = "HS384";
AlgorithmTypes["HS512"] = "HS512";
AlgorithmTypes["RS256"] = "RS256";
AlgorithmTypes["RS384"] = "RS384";
AlgorithmTypes["RS512"] = "RS512";
AlgorithmTypes["PS256"] = "PS256";
AlgorithmTypes["PS384"] = "PS384";
AlgorithmTypes["PS512"] = "PS512";
AlgorithmTypes["ES256"] = "ES256";
AlgorithmTypes["ES384"] = "ES384";
AlgorithmTypes["ES512"] = "ES512";
AlgorithmTypes["EdDSA"] = "EdDSA";
return AlgorithmTypes;
}({});
//#endregion
exports.AlgorithmTypes = AlgorithmTypes;
@@ -0,0 +1,17 @@
/**
* @license lucide-react v0.469.0 - ISC
*
* This source code is licensed under the ISC license.
* See the LICENSE file in the root directory of this source tree.
*/
import createLucideIcon from '../createLucideIcon.js';
const Diff = createLucideIcon("Diff", [
["path", { d: "M12 3v14", key: "7cf3v8" }],
["path", { d: "M5 10h14", key: "elsbfy" }],
["path", { d: "M5 21h14", key: "11awu3" }]
]);
export { Diff as default };
//# sourceMappingURL=diff.js.map
@@ -0,0 +1,137 @@
/**
* Copyright (c) Meta Platforms, Inc. and affiliates.
*
* This source code is licensed under the MIT license found in the
* LICENSE file in the root directory of this source tree.
*
*
* @format
*/
'use strict';
Object.defineProperty(exports, "__esModule", {
value: true
});
exports.SimpleTraverserSkip = exports.SimpleTraverserBreak = exports.SimpleTraverser = void 0;
var _getVisitorKeys = require("./getVisitorKeys");
/**
* Can be thrown within the traversal "enter" function to prevent the traverser
* from traversing the node any further, essentially culling the remainder of the
* AST branch
*/
const SimpleTraverserSkip = new Error();
/**
* Can be thrown at any point during the traversal to immediately stop traversal
* entirely.
*/
exports.SimpleTraverserSkip = SimpleTraverserSkip;
const SimpleTraverserBreak = new Error();
/**
* A very simple traverser class to traverse AST trees.
*/
exports.SimpleTraverserBreak = SimpleTraverserBreak;
class SimpleTraverser {
/**
* Traverse the given AST tree.
* @param node The root node to traverse.
* @param options The option object.
*/
traverse(node, options) {
try {
this._traverse(node, null, options);
} catch (ex) {
if (ex === SimpleTraverserBreak) {
return;
}
throw ex;
}
}
/**
* Traverse the given AST tree recursively.
* @param node The current node.
* @param parent The parent node.
* @private
*/
_traverse(node, parent, options) {
if (!(0, _getVisitorKeys.isNode)(node)) {
return;
}
try {
options.enter(node, parent);
} catch (ex) {
if (ex === SimpleTraverserSkip) {
return;
}
this._setErrorContext(ex, node);
throw ex;
}
const keys = (0, _getVisitorKeys.getVisitorKeys)(node, options.visitorKeys);
for (const key of keys) {
const child = node[key];
if (Array.isArray(child)) {
for (let j = 0; j < child.length; ++j) {
this._traverse(child[j], node, options);
}
} else {
this._traverse(child, node, options);
}
}
try {
options.leave(node, parent);
} catch (ex) {
if (ex === SimpleTraverserSkip) {
return;
}
this._setErrorContext(ex, node);
throw ex;
}
}
/**
* Set useful contextual information onto the error object.
* @param ex The error object.
* @param node The current node.
* @private
*/
_setErrorContext(ex, node) {
// $FlowFixMe[prop-missing]
ex.currentNode = {
type: node.type,
range: node.range,
loc: node.loc
};
}
/**
* Traverse the given AST tree.
* @param node The root node to traverse.
* @param options The option object.
*/
static traverse(node, options) {
new SimpleTraverser().traverse(node, options);
}
}
exports.SimpleTraverser = SimpleTraverser;
SimpleTraverser.Break = SimpleTraverserBreak;
SimpleTraverser.Skip = SimpleTraverserSkip;