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,11 @@
import { a as absFloor } from "./absFloor-BlD_nfEw.mjs";
import { m as monthDiff } from "./monthDiff-BZ0YZrA0.mjs";
import parse from "./parse.mjs";
function diffInYears(date, input, asFloat) {
const parsed = parse(input);
const output = monthDiff(date, parsed) / 12;
return asFloat ? output : absFloor(output);
}
export {
diffInYears as default
};
@@ -0,0 +1,119 @@
/** The Standard Typed interface. This is a base type extended by other specs. */
interface StandardTypedV1<Input = unknown, Output = Input> {
/** The Standard properties. */
readonly "~standard": StandardTypedV1.Props<Input, Output>;
}
declare namespace StandardTypedV1 {
/** The Standard Typed properties interface. */
interface Props<Input = unknown, Output = Input> {
/** The version number of the standard. */
readonly version: 1;
/** The vendor name of the schema library. */
readonly vendor: string;
/** Inferred types associated with the schema. */
readonly types?: Types<Input, Output> | undefined;
}
/** The Standard Typed types interface. */
interface Types<Input = unknown, Output = Input> {
/** The input type of the schema. */
readonly input: Input;
/** The output type of the schema. */
readonly output: Output;
}
/** Infers the input type of a Standard Typed. */
type InferInput<Schema extends StandardTypedV1> = NonNullable<Schema["~standard"]["types"]>["input"];
/** Infers the output type of a Standard Typed. */
type InferOutput<Schema extends StandardTypedV1> = NonNullable<Schema["~standard"]["types"]>["output"];
}
/** The Standard Schema interface. */
interface StandardSchemaV1<Input = unknown, Output = Input> {
/** The Standard Schema properties. */
readonly "~standard": StandardSchemaV1.Props<Input, Output>;
}
declare namespace StandardSchemaV1 {
/** The Standard Schema properties interface. */
interface Props<Input = unknown, Output = Input> extends StandardTypedV1.Props<Input, Output> {
/** Validates unknown input values. */
readonly validate: (value: unknown, options?: StandardSchemaV1.Options | undefined) => Result<Output> | Promise<Result<Output>>;
}
/** The result interface of the validate function. */
type Result<Output> = SuccessResult<Output> | FailureResult;
/** The result interface if validation succeeds. */
interface SuccessResult<Output> {
/** The typed output value. */
readonly value: Output;
/** A falsy value for `issues` indicates success. */
readonly issues?: undefined;
}
interface Options {
/** Explicit support for additional vendor-specific parameters, if needed. */
readonly libraryOptions?: Record<string, unknown> | undefined;
}
/** The result interface if validation fails. */
interface FailureResult {
/** The issues of failed validation. */
readonly issues: ReadonlyArray<Issue>;
}
/** The issue interface of the failure output. */
interface Issue {
/** The error message of the issue. */
readonly message: string;
/** The path of the issue, if any. */
readonly path?: ReadonlyArray<PropertyKey | PathSegment> | undefined;
}
/** The path segment interface of the issue. */
interface PathSegment {
/** The key representing a path segment. */
readonly key: PropertyKey;
}
/** The Standard types interface. */
interface Types<Input = unknown, Output = Input> extends StandardTypedV1.Types<Input, Output> {
}
/** Infers the input type of a Standard. */
type InferInput<Schema extends StandardTypedV1> = StandardTypedV1.InferInput<Schema>;
/** Infers the output type of a Standard. */
type InferOutput<Schema extends StandardTypedV1> = StandardTypedV1.InferOutput<Schema>;
}
/** The Standard JSON Schema interface. */
interface StandardJSONSchemaV1<Input = unknown, Output = Input> {
/** The Standard JSON Schema properties. */
readonly "~standard": StandardJSONSchemaV1.Props<Input, Output>;
}
declare namespace StandardJSONSchemaV1 {
/** The Standard JSON Schema properties interface. */
interface Props<Input = unknown, Output = Input> extends StandardTypedV1.Props<Input, Output> {
/** Methods for generating the input/output JSON Schema. */
readonly jsonSchema: StandardJSONSchemaV1.Converter;
}
/** The Standard JSON Schema converter interface. */
interface Converter {
/** Converts the input type to JSON Schema. May throw if conversion is not supported. */
readonly input: (options: StandardJSONSchemaV1.Options) => Record<string, unknown>;
/** Converts the output type to JSON Schema. May throw if conversion is not supported. */
readonly output: (options: StandardJSONSchemaV1.Options) => Record<string, unknown>;
}
/**
* The target version of the generated JSON Schema.
*
* It is *strongly recommended* that implementers support `"draft-2020-12"` and `"draft-07"`, as they are both in wide use. All other targets can be implemented on a best-effort basis. Libraries should throw if they don't support a specified target.
*
* The `"openapi-3.0"` target is intended as a standardized specifier for OpenAPI 3.0 which is a superset of JSON Schema `"draft-04"`.
*/
type Target = "draft-2020-12" | "draft-07" | "openapi-3.0" | ({} & string);
/** The options for the input/output methods. */
interface Options {
/** Specifies the target version of the generated JSON Schema. Support for all versions is on a best-effort basis. If a given version is not supported, the library should throw. */
readonly target: Target;
/** Explicit support for additional vendor-specific parameters, if needed. */
readonly libraryOptions?: Record<string, unknown> | undefined;
}
/** The Standard types interface. */
interface Types<Input = unknown, Output = Input> extends StandardTypedV1.Types<Input, Output> {
}
/** Infers the input type of a Standard. */
type InferInput<Schema extends StandardTypedV1> = StandardTypedV1.InferInput<Schema>;
/** Infers the output type of a Standard. */
type InferOutput<Schema extends StandardTypedV1> = StandardTypedV1.InferOutput<Schema>;
}
export { StandardJSONSchemaV1, StandardSchemaV1, StandardTypedV1 };
@@ -0,0 +1 @@
{"version":3,"file":"blake1.js","sourceRoot":"","sources":["src/blake1.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;GAuBG;AACH,OAAO,EAAE,MAAM,EAAE,GAAG,EAAE,GAAG,EAAE,MAAM,aAAa,CAAC;AAC/C,OAAO,EAAE,SAAS,EAAE,SAAS,EAAE,SAAS,EAAE,SAAS,EAAE,MAAM,UAAU,CAAC;AACtE,OAAO,KAAK,GAAG,MAAM,WAAW,CAAC;AACjC,kBAAkB;AAClB,OAAO,EACL,MAAM,EAAE,OAAO,EAAE,OAAO,EACxB,KAAK,EAAE,YAAY,EACnB,UAAU,EAKX,MAAM,YAAY,CAAC;AAQpB,gGAAgG;AAChG,MAAM,UAAU,GAAG,eAAe,CAAC,IAAI,WAAW,CAAC,CAAC,CAAC,CAAC;AAEtD,oGAAoG;AACpG,qEAAqE;AACrE,MAAe,MAAM;IACV,MAAM,GAAG,KAAK,CAAC;IACd,QAAQ,GAAG,KAAK,CAAC;IACjB,MAAM,GAAG,CAAC,CAAC;IACX,GAAG,GAAG,CAAC,CAAC;IACR,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,eAAe;QACf,KAAK,CAAC,MAAM,CAAC,CAAC;QACd,MAAM,CAAC,GAAG,UAAU,CAAC,GAAG,CAAC,CAAC;QAC1B,MAAM,KAAK,GAAG,IAAI,CAAC,GAAG,EAAE,CAAC;QACzB,KAAK,IAAI,CAAC,GAAG,CAAC,EAAE,CAAC,GAAG,IAAI,CAAC,SAAS,GAAG,CAAC,EAAE,EAAE,CAAC;YAAELine truncated
@@ -0,0 +1 @@
{"version":3,"file":"magic-string.umd.js","sources":["../src/BitSet.js","../src/Chunk.js","../node_modules/.pnpm/@jridgewell+sourcemap-codec@1.5.5/node_modules/@jridgewell/sourcemap-codec/dist/sourcemap-codec.mjs","../src/SourceMap.js","../src/utils/guessIndent.js","../src/utils/getRelativePath.js","../src/utils/isObject.js","../src/utils/getLocator.js","../src/utils/Mappings.js","../src/MagicString.js","../src/Bundle.js","../src/index-legacy.js"],"sourcesContent":["export default class BitSet {\n\tconstructor(arg) {\n\t\tthis.bits = arg instanceof BitSet ? arg.bits.slice() : [];\n\t}\n\n\tadd(n) {\n\t\tthis.bits[n >> 5] |= 1 << (n & 31);\n\t}\n\n\thas(n) {\n\t\treturn !!(this.bits[n >> 5] & (1 << (n & 31)));\n\t}\n}\n","export default class Chunk {\n\tconstructor(start, end, content) {\n\t\tthis.start = start;\n\t\tthis.end = end;\n\t\tthis.original = content;\n\n\t\tthis.intro = '';\n\t\tthis.outro = '';\n\n\t\tthis.content = content;\n\t\tthis.storeName = false;\n\t\tthis.edited = false;\n\n\t\tif (DEBUG) {\n\t\t\t// we make these non-enumerable, for sanity while debugging\n\t\t\tObject.defineProperties(this, {\n\t\t\t\tprevious: { writable: true, value: null },\n\t\t\t\tnext: { writable: true, value: null },\n\t\t\t});\n\t\t} else {\n\t\t\tthis.previous = null;\n\t\t\tthis.next = null;\n\t\t}\n\t}\n\n\tappendLeft(content) {\n\t\tthis.outro += content;\n\t}\n\n\tappendRight(content) {\n\t\tthis.intro = this.intro + content;\n\t}\n\n\tclone() {\n\t\tconst chunk = new Chunk(this.start, this.end, this.original);\n\n\t\tchunk.intro = this.intro;\n\t\tchunk.outro = this.outro;\n\t\tchunk.content = this.content;\n\t\tchunk.storeName = this.storeName;\n\t\tchunk.edited = this.edited;\n\n\t\treturn chunk;\n\t}\n\n\tcontains(index) {\n\t\treturn this.start < index && index < this.end;\n\t}\n\n\teachNext(fn) {\n\t\tlet chunk = this;\n\t\twhile (chunk) {\n\t\t\tfn(chunk);\n\t\t\tchunk = chunk.next;\n\t\t}\n\t}\n\n\teachPrevious(fn) {\n\t\tlet chunk = this;\n\t\twhile (chunk) {\n\t\t\tfn(chunk);\n\t\t\tchunk = chunk.previous;\n\t\t}\n\t}\n\n\tedit(content, storeName, contentOnly) {\n\t\tthis.content = content;\n\t\tif (!contentOnly) {\n\t\t\tthis.intro = '';\n\t\t\tthis.outro = '';\n\t\t}\n\t\tthis.storeName = storeName;\n\n\t\tthis.edited = true;\n\n\t\treturn this;\n\t}\n\n\tprependLeft(content) {\n\t\tthis.outro = content + this.outro;\n\t}\n\n\tprependRight(content) {\n\t\tthis.intro = content + this.intro;\n\t}\n\n\treset() {\n\t\tthis.intro = '';\n\t\tthis.outro = '';\n\t\tif (this.edited) {\n\t\t\tthis.content = this.original;\n\t\t\tthis.storeName = false;\n\t\t\tthis.edited = false;\n\t\t}\n\t}\n\n\tsplit(index) {\n\t\tconst sliceIndex = index - this.start;\n\n\t\tconst originalBefore = this.original.slice(0, sliceIndex);\n\t\tconst originalAfter = this.original.slice(sliceIndex);\n\n\t\tthis.original = originalBefore;\n\n\t\tconst newChunk = new Chunk(index, this.end, originalAfter);\n\t\tnewChunk.outro = this.outro;\n\t\tthis.outro = '';\n\n\t\tthis.end = index;\n\n\t\tif (this.edited) {\n\t\t\t// after split we should save the edit content record into the correct chunk\n\t\t\t// to make sure sourcemap correct\n\t\t\t// For example:\n\t\t\t// ' test'.trim()\n\t\t\t// split -> ' ' + 'test'\n\t\t\t// ✔️ edit -> '' + 'test'\n\t\t\t// ✖️ edit -> 'test' + ''\n\t\t\t// TODO is this block necessary?...\n\t\t\tnewChunk.edit('', false);\n\t\t\tthis.content = '';\n\t\t} else {\n\t\t\tthis.content = originalBefore;\n\t\t}\n\n\t\tnewChunk.next = this.next;\n\t\tif (newChunk.next) newChunk.next.previous = newChunk;\n\t\tnewChunk.previous = this;\n\t\tthis.next = newChunk;\n\n\t\treturn newChunk;\n\t}\n\n\ttoString() {\n\t\treturn this.intro + this.content + this.outro;\n\t}\n\n\ttrimEnd(rx) {\n\t\tthis.outro = this.outro.replace(rx, '');\n\t\tif (this.outro.length) return true;\n\n\t\tconst trimmed = this.content.replace(rx, '');\n\n\t\tif (trimmed.length) {\n\t\t\tif (trimmed !== this.content) {\n\t\t\t\tthis.split(this.start + trimmed.length).edit('', undefined, true);\n\t\t\t\tif (this.edited) {\n\t\t\t\t\t// save the change, if it has been edited\n\t\t\t\t\tthis.edit(trimmed, this.storeName, true);\n\t\t\t\t}\n\t\t\t}\n\t\t\treturn true;\n\t\t} else {\n\t\t\tthis.edit('', undefined, true);\n\n\t\t\tthis.intro = this.intro.replace(rx, '');\n\t\t\tif (this.intro.length) return true;\n\t\t}\n\t}\n\n\ttrimStart(rx) {\n\t\tthis.intro = this.intro.replace(rx, '');\n\t\tif (this.intro.length) return true;\n\n\t\tconst trimmed = this.content.replace(rx, '');\n\n\t\tif (trimmed.length) {\n\t\t\tif (trimmed !== this.content) {\n\t\t\t\tconst newChunk = this.split(this.end - trimmed.length);\n\t\t\t\tif (this.edited) {\n\t\t\t\t\t// save the change, if it has been edited\n\t\t\t\t\tnewChunk.edit(trimmed, this.storeName, true);\n\t\t\t\t}\n\t\t\t\tthis.edit('', undefined, true);\n\t\t\t}\n\t\t\treturn true;\n\t\t} else {\n\t\t\tthis.edit('', undefined, true);\n\n\t\t\tthis.outro = this.outro.replaceLine truncated
@@ -0,0 +1,5 @@
import type * as errors from "../core/errors.cjs";
declare function _default(): {
localeError: errors.$ZodErrorMap;
};
export = _default;
@@ -0,0 +1,3 @@
declare const AbortSignalPlugin: any;
export default AbortSignalPlugin;
//# sourceMappingURL=abort-signal.d.ts.map
@@ -0,0 +1,820 @@
flf2a$ 8 6 14 1 3
puffy.flf by Juan Car (jc@juguete.quim.ucm.es)
Version 1.1 5/Mar/1994
$$$@
$$$@
$$$@
$$$@
$$$@
$$$@
$$$@
$$$@@
_ @
( )@
| |@
| |@
| |@
(_)@
(_)@
@@
$ _ _ $@
$( )( )$@
$(_)(_)$@
$ $@
$ $@
$ $@
$ $@
$ $@@
@
_ _ @
_( )( )_ @
(_ .. _)@
(_ _)@
(_)(_) @
@
@@
( ) @
/'_ \ @
( (_(_)@
\__ \ @
( )_) )@
`\_ _/'@
(_) @
@@
_ _ @
(_) /' )@
/' /' @
/' /' @
/' /' _ @
(_/' (_)@
@
@@
_____ @
( _ ) @
`\ ,/' @
/'_`\/\ @
| (_> ,<`@
`\___/\/'@
@
@@
$_$@
( )@
|/$@
$ $@
$ $@
$ $@
$ $@
$ $@@
_ @
/' )@
| ,/'@
| | @
| `\ @
`\__)@
@
@@
_ @
( `\ @
`\ |@
| |@
/' |@
(__/'@
@
@@
_ @
_( )_ @
( ` ' )@
> < @
(_, ,_)@
(_) @
@
@@
_ @
( ) @
__| |__ @
(__ __)@
| | @
(_) @
@
@@
$ $@
$ $@
$ $@
$ $@
$_$@
( )@
|/$@
$ $@@
@
@
______ @
(______)@
@
@
@
@@
$ $@
$ $@
$ $@
$ $@
$_$@
(_)@
$ $@
$ $@@
__ @
/ )@
/' /' @
/' /' @
/' /' @
(_/' @
@
@@
__ @
/' _`\ @
| ( ) |@
| | | |@
| (_) |@
`\___/'@
@
@@
_ @
/' )@
(_, |@
| |@
| |@
(_)@
@
@@
__ @
/'__`\ @
(_) ) )@
/' / @
/' /( )@
(_____/'@
@
@@
___ @
/'_ )@
(_)_) |@
_(_ < @
( )_) |@
`\____)@
@
@@
_ _ @
( )( ) @
| || | @
| || |_ @
(__ ,__)@
(_) @
@
@@
_____ @
( ___)@
| (__ @
|___ `\@
( )_) |@
`\___/'@
@
@@
_____ @
( ___)@
| (__ @
| _ `\@
| (_) |@
`\___/'@
@
@@
_______ @
(_____ )@
/'/'@
/'/' @
/'/' @
(_/ @
@
@@
_ @
/'_`\ @
( (_) )@
> _ <'@
( (_) )@
`\___/'@
@
@@
__ @
/'_ `\@
( (_) |@
\__, |@
| |@
(_)@
@
@@
$ $@
$ $@
$_$@
(_)@
$_$@
(_)@
$ $@
$ $@@
$ $@
$ $@
$_$@
(_)@
$_$@
( )@
|/$@
$ $@@
_ @
/' )@
/' /' @
< < @
\ `\ @
`\__)@
@
@@
@
@
______ @
(______)@
(______)@
@
@
@@
_ @
( `\ @
`\ `\ @
> >@
/' /' @
(_/' @
@
@@
_ @
/'_`\ @
(_) ) |@
/'/'@
|_| @
(_) @
@
@@
@
_ @
/'_`\ @
/'/'_` ) @
( ( (_| | @
\ `\__,_)@
`\_____)@
@@
_____ @
( _ )@
| (_) |@
| _ |@
| | | |@
(_) (_)@
@
@@
___ @
( _`\ @
| (_) )@
| _ <'@
| (_) )@
(____/'@
@
@@
___ @
( _`\ @
| ( (_)@
| | _ @
| (_( )@
(____/'@
@
@@
___ @
( _`\ @
| | ) |@
| | | )@
| |_) |@
(____/'@
@
@@
___ @
( _`\ @
| (_(_)@
| _)_ @
| (_( )@
(____/'@
@
@@
___ @
( _`\ @
| (_(_)@
| _) @
| | @
(_) @
@
@@
___ @
( _`\ @
| ( (_)@
| |___ @
| (_, )@
(____/'@
@
@@
_ _ @
( ) ( )@
| |_| |@
| _ |@
| | | |@
(_) (_)@
@
@@
_ @
(_)@
| |@
| |@
| |@
(_)@
@
@@
_____ @
(___ )@
| |@
_ | |@
( )_| |@
`\___/'@
@
@@
_ _ @
( ) ( )@
| |/'/'@
| , < @
| |\`\ @
(_) (_)@
@
@@
_ @
( ) @
| | @
| | _ @
| |_( )@
(____/'@
@
@@
@
/'\_/`\@
| |@
| (_) |@
| | | |@
(_) (_)@
@
@@
_ _ @
( ) ( )@
| `\| |@
| , ` |@
| |`\ |@
(_) (_)@
@
@@
_____ @
( _ )@
| ( ) |@
| | | |@
| (_) |@
(_____)@
@
@@
___ @
( _`\ @
| |_) )@
| ,__/'@
| | @
(_) @
@
@@
_____ @
( _ )@
| ( ) |@
| | | |@
| (('\|@
(___\_)@
@
@@
___ @
| _`\ @
| (_) )@
| , / @
| |\ \ @
(_) (_)@
@
@@
___ @
( _`\ @
| (_(_)@
`\__ \ @
( )_) |@
`\____)@
@
@@
_____ @
(_ _)@
| | @
| | @
| | @
(_) @
@
@@
_ _ @
( ) ( )@
| | | |@
| | | |@
| (_) |@
(_____)@
@
@@
_ _ @
( ) ( )@
| | | |@
| | | |@
| \_/ |@
`\___/'@
@
@@
_ _ @
( ) _ ( )@
| | ( ) | |@
| | | | | |@
| (_/ \_) |@
`\___x___/'@
@
@@
_ _ @
( ) ( )@
`\`\/'/'@
> < @
/'/\`\ @
(_) (_)@
@
@@
_ _ @
( ) ( )@
`\`\_/'/'@
`\ /' @
| | @
(_) @
@
@@
_______ @
(_____ )@
/'/'@
/'/' @
/'/'___ @
(_______)@
@
@@
___ @
( _)@
| | @
| | @
| |_ @
(___)@
@
@@
_ @
( `\ @
`\ `\ @
`\ `\ @
`\ `\ @
`\_)@
@
@@
___ @
(_ )@
| |@
| |@
_| |@
(___)@
@
@@
$ __ $@
$/ \$@
(_/\_)@
$ $@
$ $@
$ $@
$ $@
$ $@@
$ $ @
$ $ @
$ $ @
$ $ @
$ $ @
$ $ @
______ @
(______)@@
$_$@
( )@
$\|@
$ $@
$ $@
$ $@
$ $@
$ $@@
@
@
_ _ @
/'_` )@
( (_| |@
`\__,_)@
@
@@
_ @
( ) @
| |_ @
| '_`\ @
| |_) )@
(_,__/'@
@
@@
@
@
___ @
/'___)@
( (___ @
`\____)@
@
@@
_ @
( )@
_| |@
/'_` |@
( (_| |@
`\__,_)@
@
@@
@
@
__ @
/'__`\@
( ___/@
`\____)@
@
@@
___ @
/'___)@
| (__ @
| ,__) @
| | @
(_) @
@
@@
@
@
__ @
/'_ `\@
( (_) |@
`\__ |@
( )_) |@
\___/'@@
_ @
( ) @
| |__ @
| _ `\@
| | | |@
(_) (_)@
@
@@
@
_ @
(_)@
| |@
| |@
(_)@
@
@@
@
_ @
(_)@
| |@
| |@
_ | |@
( )_| |@
`\___/'@@
_ @
( ) @
| |/') @
| , < @
| |\`\ @
(_) (_)@
@
@@
_ @
(_ ) @
| | @
| | @
| | @
(___)@
@
@@
@
@
___ ___ @
/' _ ` _ `\@
| ( ) ( ) |@
(_) (_) (_)@
@
@@
@
@
___ @
/' _ `\@
| ( ) |@
(_) (_)@
@
@@
@
@
_ @
/'_`\ @
( (_) )@
`\___/'@
@
@@
@
@
_ _ @
( '_`\ @
| (_) )@
| ,__/'@
| | @
(_) @@
@
@
_ _ @
/'_` )@
( (_) |@
`\__, |@
| |@
(_)@@
@
@
_ __ @
( '__)@
| | @
(_) @
@
@@
@
@
___ @
/',__)@
\__, \@
(____/@
@
@@
_ @
( )_ @
| ,_)@
| | @
| |_ @
`\__)@
@
@@
@
@
_ _ @
( ) ( )@
| (_) |@
`\___/'@
@
@@
@
@
_ _ @
( ) ( )@
| \_/ |@
`\___/'@
@
@@
@
@
_ _ _ @
( ) ( ) ( )@
| \_/ \_/ |@
`\___x___/'@
@
@@
@
@
@
(`\/')@
> < @
(_/\_)@
@
@@
@
@
_ _ @
( ) ( )@
| (_) |@
`\__, |@
( )_| |@
`\___/'@@
@
@
____ @
(_ ,)@
/'/_ @
(____)@
@
@@
_ @
/' )@
| ,/'@
<' | @
| `\ @
`\__)@
@
@@
@
_ @
( )@
| |@
| |@
| |@
(_)@
@@
_ @
( `\ @
`\ | @
| `>@
/' | @
(__/' @
@
@@
_ _ @
/' \/' )@
(_/\__/' @
@
@
@
@
@@
(_)_(_)@
( _ )@
| (_) |@
| _ |@
| | | |@
(_) (_)@
@
@@
(_)_(_)@
( _ )@
| ( ) |@
| | | |@
| (_) |@
(_____)@
@
@@
(_) (_)@
( ) ( )@
| | | |@
| | | |@
| (_) |@
(_____)@
@
@@
_ _ @
(_) (_)@
_ _ @
/'_` )@
( (_| |@
`\__,_)@
@
@@
_ _ @
(_) (_)@
_ @
/'_`\ @
( (_) )@
`\___/'@
@
@@
_ _ @
(_) (_)@
_ _ @
( ) ( )@
| (_) |@
`\___/'@
@
@@
@
@
_____ @
( _ )@
| |/ /'@
| |\`\ @
| ||_/'@
(_) @@
@@ -0,0 +1,160 @@
{
"name": "otpauth",
"version": "9.5.1",
"description": "One Time Password (HOTP/TOTP) library for Node.js, Deno, Bun and browsers",
"keywords": [
"otp",
"hotp",
"totp",
"one time password",
"2fa",
"2 factor",
"two factor",
"two-factor",
"2step",
"2 step",
"two step",
"two-step",
"auth",
"authenticator",
"google authenticator"
],
"author": "Héctor Molinero Fernández <hector@molinero.dev>",
"license": "MIT",
"homepage": "https://github.com/hectorm/otpauth",
"repository": {
"type": "git",
"url": "https://github.com/hectorm/otpauth.git"
},
"bugs": {
"url": "https://github.com/hectorm/otpauth/issues"
},
"funding": "https://github.com/hectorm/otpauth?sponsor=1",
"type": "module",
"types": "./dist/otpauth.d.ts",
"main": "./dist/otpauth.node.cjs",
"browser": "./dist/otpauth.esm.js",
"exports": {
".": {
"types": {
"import": "./dist/otpauth.d.ts",
"require": "./dist/otpauth.d.cts"
},
"bun": "./dist/otpauth.esm.js",
"deno": "./dist/otpauth.esm.js",
"node": {
"import": "./dist/otpauth.node.mjs",
"require": "./dist/otpauth.node.cjs"
},
"default": "./dist/otpauth.esm.js"
},
"./slim": {
"types": {
"import": "./dist/otpauth.d.ts",
"require": "./dist/otpauth.d.cts"
},
"default": "./dist/otpauth.slim.esm.js"
},
"./bare": {
"types": {
"import": "./dist/otpauth.d.ts",
"require": "./dist/otpauth.d.cts"
},
"default": "./dist/otpauth.bare.esm.js"
},
"./dist/*": {
"types": {
"import": "./dist/otpauth.d.ts",
"require": "./dist/otpauth.d.cts"
},
"default": "./dist/*"
}
},
"files": [
"dist/"
],
"scripts": {
"all": "run-s build docs lint test",
"build": "run-s build:clean build:types build:compile",
"build:clean": "rimraf ./dist/",
"build:compile": "rollup -c",
"build:types": "run-s build:types:clean build:types:compile",
"build:types:clean": "rimraf ./types/",
"build:types:compile": "tsc -p ./src/",
"docs": "run-s docs:clean docs:compile",
"docs:clean": "rimraf ./docs/",
"docs:compile": "typedoc ./src/index.js --readme none --out ./docs/",
"lint": "run-s lint:eslint lint:prettier lint:tsc",
"lint:eslint": "eslint --max-warnings 0 ./",
"lint:prettier": "prettier --list-different ./",
"lint:tsc": "tsc --noEmit",
"format": "run-s format:eslint format:prettier",
"format:eslint": "eslint --fix ./",
"format:prettier": "prettier --write ./",
"test": "run-s test:node test:deno test:bun test:browser",
"test:node": "run-s test:node:esm test:node:cjs",
"test:node:esm": "run-s test:node:esm:unmin test:node:esm:min",
"test:node:esm:unmin": "node ./test/node.test.mjs",
"test:node:esm:min": "node ./test/node.test.min.mjs",
"test:node:cjs": "run-s test:node:cjs:unmin test:node:cjs:min",
"test:node:cjs:unmin": "node ./test/node.test.cjs",
"test:node:cjs:min": "node ./test/node.test.min.cjs",
"test:deno": "run-s --npm-path deno test:deno:esm",
"test:deno:esm": "run-s --npm-path deno test:deno:esm:unmin test:deno:esm:min",
"test:deno:esm:unmin": "deno test --no-npm --allow-read=./test/,./dist/ ./test/deno.test.mjs",
"test:deno:esm:min": "deno test --no-npm --allow-read=./test/,./dist/ ./test/deno.test.min.mjs",
"test:bun": "run-s --npm-path bun test:bun:esm",
"test:bun:esm": "run-s --npm-path bun test:bun:esm:unmin test:bun:esm:min",
"test:bun:esm:unmin": "bun test ./test/bun.test.mjs",
"test:bun:esm:min": "bun test ./test/bun.test.min.mjs ",
"test:quickjs": "run-s test:quickjs:esm",
"test:quickjs:esm": "run-s test:quickjs:esm:unmin test:quickjs:esm:min",
"test:quickjs:esm:unmin": "qjs ./test/quickjs.test.mjs",
"test:quickjs:esm:min": "qjs ./test/quickjs.test.min.mjs ",
"test:browser": "run-s test:browser:chromium test:browser:firefox test:browser:webkit",
"test:browser:chromium": "run-s test:browser:chromium:umd",
"test:browser:chromium:umd": "run-s test:browser:chromium:umd:unmin test:browser:chromium:umd:min",
"test:browser:chromium:umd:unmin": "node ./test/browser.test.mjs chromium",
"test:browser:chromium:umd:min": "node ./test/browser.test.min.mjs chromium",
"test:browser:firefox": "run-s test:browser:firefox:umd",
"test:browser:firefox:umd": "run-s test:browser:firefox:umd:unmin test:browser:firefox:umd:min",
"test:browser:firefox:umd:unmin": "node ./test/browser.test.mjs firefox",
"test:browser:firefox:umd:min": "node ./test/browser.test.min.mjs firefox",
"test:browser:webkit": "run-s test:browser:webkit:umd",
"test:browser:webkit:umd": "run-s test:browser:webkit:umd:unmin test:browser:webkit:umd:min",
"test:browser:webkit:umd:unmin": "node ./test/browser.test.mjs webkit",
"test:browser:webkit:umd:min": "node ./test/browser.test.min.mjs webkit",
"version": "run-s all version:jsr version:git",
"version:jsr": "node ./scripts/jsr.mjs",
"version:git": "git add -A ./jsr.json ./types/ ./dist/ ./docs/"
},
"dependencies": {
"@noble/hashes": "2.2.0"
},
"devDependencies": {
"@eslint/core": "~1.2.1",
"@eslint/js": "~10.0.1",
"@rollup/plugin-node-resolve": "~16.0.3",
"@rollup/plugin-replace": "~6.0.3",
"@rollup/plugin-swc": "~0.4.0",
"@rollup/plugin-terser": "~1.0.0",
"@rollup/plugin-virtual": "~3.0.2",
"@swc/core": "~1.15.30",
"@types/eslint": "~9.6.1",
"@types/eslint-config-prettier": "~6.11.3",
"@types/node": "~25.6.0",
"chai": "~6.2.2",
"eslint": "~10.2.1",
"eslint-config-prettier": "~10.1.8",
"globals": "~17.5.0",
"mocha": "~11.7.5",
"npm-run-all2": "~8.0.4",
"playwright": "~1.59.1",
"prettier": "~3.8.3",
"rimraf": "~6.1.3",
"rollup": "~4.60.2",
"rollup-plugin-dts": "~6.4.1",
"typedoc": "~0.28.19",
"typescript": "~6.0.3"
}
}
@@ -0,0 +1,24 @@
/**
* @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 Cat = createLucideIcon("Cat", [
[
"path",
{
d: "M12 5c.67 0 1.35.09 2 .26 1.78-2 5.03-2.84 6.42-2.26 1.4.58-.42 7-.42 7 .57 1.07 1 2.24 1 3.44C21 17.9 16.97 21 12 21s-9-3-9-7.56c0-1.25.5-2.4 1-3.44 0 0-1.89-6.42-.5-7 1.39-.58 4.72.23 6.5 2.23A9.04 9.04 0 0 1 12 5Z",
key: "x6xyqk"
}
],
["path", { d: "M8 14v.5", key: "1nzgdb" }],
["path", { d: "M16 14v.5", key: "1lajdz" }],
["path", { d: "M11.25 16.25h1.5L12 17l-.75-.75Z", key: "12kq1m" }]
]);
export { Cat as default };
//# sourceMappingURL=cat.js.map
@@ -0,0 +1,117 @@
import { useConstant } from '../../utils/use-constant.mjs';
/**
* Can manually trigger a drag gesture on one or more `drag`-enabled `motion` components.
*
* ```jsx
* const dragControls = useDragControls()
*
* function startDrag(event) {
* dragControls.start(event, { snapToCursor: true })
* }
*
* return (
* <>
* <div onPointerDown={startDrag} />
* <motion.div drag="x" dragControls={dragControls} />
* </>
* )
* ```
*
* @public
*/
class DragControls {
constructor() {
this.componentControls = new Set();
}
/**
* Subscribe a component's internal `VisualElementDragControls` to the user-facing API.
*
* @internal
*/
subscribe(controls) {
this.componentControls.add(controls);
return () => this.componentControls.delete(controls);
}
/**
* Start a drag gesture on every `motion` component that has this set of drag controls
* passed into it via the `dragControls` prop.
*
* ```jsx
* dragControls.start(e, {
* snapToCursor: true
* })
* ```
*
* @param event - PointerEvent
* @param options - Options
*
* @public
*/
start(event, options) {
this.componentControls.forEach((controls) => {
controls.start(event.nativeEvent || event, options);
});
}
/**
* Cancels a drag gesture.
*
* ```jsx
* dragControls.cancel()
* ```
*
* @public
*/
cancel() {
this.componentControls.forEach((controls) => {
controls.cancel();
});
}
/**
* Stops a drag gesture.
*
* ```jsx
* dragControls.stop()
* ```
*
* @public
*/
stop() {
this.componentControls.forEach((controls) => {
controls.stop();
});
}
}
const createDragControls = () => new DragControls();
/**
* Usually, dragging is initiated by pressing down on a `motion` component with a `drag` prop
* and moving it. For some use-cases, for instance clicking at an arbitrary point on a video scrubber, we
* might want to initiate that dragging from a different component than the draggable one.
*
* By creating a `dragControls` using the `useDragControls` hook, we can pass this into
* the draggable component's `dragControls` prop. It exposes a `start` method
* that can start dragging from pointer events on other components.
*
* ```jsx
* const dragControls = useDragControls()
*
* function startDrag(event) {
* dragControls.start(event, { snapToCursor: true })
* }
*
* return (
* <>
* <div onPointerDown={startDrag} />
* <motion.div drag="x" dragControls={dragControls} />
* </>
* )
* ```
*
* @public
*/
function useDragControls() {
return useConstant(createDragControls);
}
export { DragControls, useDragControls };
//# sourceMappingURL=use-drag-controls.mjs.map
@@ -0,0 +1 @@
module.exports={C:{"121":0.04462,"138":0.04462,"153":0.08366,"155":0.04462,"156":0.04462,_:"2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 139 140 141 142 143 144 145 146 147 148 149 150 151 152 154 157 158 159 160 3.5 3.6"},D:{"87":0.12827,"92":0.04462,"103":0.17289,"104":0.08366,"105":0.21193,"106":0.30116,"107":0.17289,"108":0.21193,"109":0.3402,"110":0.21193,"111":0.17289,"112":0.08366,"116":0.38481,"117":0.17289,"118":0.30116,"120":0.12827,"123":0.21193,"124":0.08366,"131":0.30116,"133":0.76963,"134":0.12827,"135":0.12827,"136":0.17289,"137":0.17289,"138":0.21193,"139":0.12827,"140":0.12827,"141":0.12827,"142":0.46847,"144":0.08366,"145":0.21193,"146":0.04462,"148":0.64136,"149":0.3402,"150":3.46332,"151":4.78507,"152":16.79235,"153":11.32689,"154":2.26426,_:"4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 83 84 85 86 88 89 90 91 93 94 95 96 97 98 99 100 101 102 113 114 115 119 121 122 125 126 127 128 129 130 132 143 147 155 156 157"},F:{"135":0.85328,_:"9 11 12 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 60 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 131 132 133 134 9.5-9.6 10.0-10.1 10.5 10.6 11.1 11.5 11.6 12.1"},B:{"119":0.04462,"120":0.08366,"149":0.04462,"151":0.08366,"152":1.87945,"153":2.77735,"154":0.46847,_:"12 13 14 15 16 17 18 79 80 81 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 150"},E:{_:"4 5 6 7 8 9 10 11 12 13 14 15 27 3.1 3.2 5.1 6.1 7.1 9.1 10.1 11.1 12.1 13.1 14.1 15.1 15.2-15.3 15.4 15.5 16.0 16.1 16.2 16.3 16.4 16.5 17.0 17.2 17.3 17.4 17.5 17.6 18.0 18.1 18.2 18.3 18.4 18.5-18.7 26.0 26.1 26.2 26.3 26.4 27.1 27.2 TP","15.6":0.04462,"16.6":0.04462,"17.1":0.04462,"26.5":1.9631,"26.6":0.12827},G:{"8":0,"3.2":0,"4.0-4.1":0,"4.2-4.3":0.00155,"5.0-5.1":0.00155,"6.0-6.1":0,"7.0-7.1":0.00309,"8.1-8.4":0,"9.0-9.2":0,"9.3":0,"10.0-10.2":0,"10.3":0.01547,"11.0-11.2":0.00155,"11.3-11.4":0.00309,"12.0-12.1":0,"12.2-12.5":0.04021,"13.0-13.1":0,"13.2":0.00773,"13.3":0,"13.4-13.7":0.00155,"14.0-14.4":0.00619,"14.5-14.8":0.00928,"15.0-15.1":0.00928,"15.2-15.3":0.00619,"15.4":0.00773,"15.5":0.00928,"15.6-15.8":0.20107,"16.0":0.01547,"16.1":0.02784,"16.2":0.01547,"16.3":0.03403,"16.4":0.00773,"16.5":0.01237,"16.6-16.7":0.27996,"17.0":0.01083,"17.1":0.01547,"17.2":0.01547,"17.3":0.0232,"17.4":0.03248,"17.5":0.06342,"17.6-17.7":0.16395,"18.0":0.03403,"18.1":0.06806,"18.2":0.0928,"18.3":0.16086,"18.4":0.10054,"18.5-18.7":2.07725,"26.0":0.10054,"26.1":0.10208,"26.2":0.26604,"26.3":0.28769,"26.4":0.21035,"26.5":1.40906,"26.6":8.69413,"27.0":0.66664,"27.1":0,"27.2":0.01701},P:{"30":2.87053,_:"4 20 21 22 23 24 25 26 27 28 29 5.0-5.4 6.2-6.4 7.2-7.4 8.2 9.2 10.1 11.1-11.2 12.0 13.0 14.0 15.0 16.0 17.0 18.0 19.0"},I:{"0":0,"3":0,"4":0,"2.1":0,"2.2":0,"2.3":0,"4.1":0,"4.2-4.3":0,"4.4":0,"4.4.3-4.4.4":0},K:{"0":0,_:"10 11 12 11.1 11.5 12.1"},A:{_:"6 7 8 9 10 11 5.5"},S:{_:"2.5 3.0-3.1"},J:{_:"7 10"},N:{_:"10 11"},L:{"0":26.05552},R:{_:"0"},M:{"0":0.17692},Q:{_:"14.9"},O:{_:"0"},H:{all:0}};
@@ -0,0 +1,16 @@
export * as core from "../core/index.cjs";
export * from "./parse.cjs";
export * from "./schemas.cjs";
export * from "./checks.cjs";
export { deepPartial } from "./deep-partial.cjs";
export { input, output } from "./in-out.cjs";
export type { infer } from "../core/index.cjs";
export type { JSONType } from "../core/util.cjs";
export type { CompileOptions } from "../core/index.cjs";
export { globalRegistry, registry, config, memoizer, $output, $input, $brand, clone, regexes, treeifyError, prettifyError, formatError, flattenError, TimePrecision, util, NEVER, INVALID, toZod, compile, withParser, ZodCompileAsyncError, ZodCompileUnsupportedError, getDiscriminatedOption, } from "../core/index.cjs";
export { toJSONSchema } from "../core/json-schema-processors.cjs";
export * as locales from "../locales/index.cjs";
/** A special constant with type `never` */
export * as iso from "./iso.cjs";
export { ZodMiniISODateTime, ZodMiniISODate, ZodMiniISOTime, ZodMiniISODuration, } from "./iso.cjs";
export * as coerce from "./coerce.cjs";
@@ -0,0 +1 @@
{"version":3,"file":"sandwich.js","sources":["../../../src/icons/sandwich.ts"],"sourcesContent":["import createLucideIcon from '../createLucideIcon';\n\n/**\n * @component @name Sandwich\n * @description Lucide SVG icon component, renders SVG Element with children.\n *\n * @preview ![img](data:image/svg+xml;base64,PHN2ZyAgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIgogIHdpZHRoPSIyNCIKICBoZWlnaHQ9IjI0IgogIHZpZXdCb3g9IjAgMCAyNCAyNCIKICBmaWxsPSJub25lIgogIHN0cm9rZT0iIzAwMCIgc3R5bGU9ImJhY2tncm91bmQtY29sb3I6ICNmZmY7IGJvcmRlci1yYWRpdXM6IDJweCIKICBzdHJva2Utd2lkdGg9IjIiCiAgc3Ryb2tlLWxpbmVjYXA9InJvdW5kIgogIHN0cm9rZS1saW5lam9pbj0icm91bmQiCj4KICA8cGF0aCBkPSJtMi4zNyAxMS4yMjMgOC4zNzItNi43NzdhMiAyIDAgMCAxIDIuNTE2IDBsOC4zNzEgNi43NzciIC8+CiAgPHBhdGggZD0iTTIxIDE1YTEgMSAwIDAgMSAxIDF2MmExIDEgMCAwIDEtMSAxaC01LjI1IiAvPgogIDxwYXRoIGQ9Ik0zIDE1YTEgMSAwIDAgMC0xIDF2MmExIDEgMCAwIDAgMSAxaDkiIC8+CiAgPHBhdGggZD0ibTYuNjcgMTUgNi4xMyA0LjZhMiAyIDAgMCAwIDIuOC0uNGwzLjE1LTQuMiIgLz4KICA8cmVjdCB3aWR0aD0iMjAiIGhlaWdodD0iNCIgeD0iMiIgeT0iMTEiIHJ4PSIxIiAvPgo8L3N2Zz4K) - https://lucide.dev/icons/sandwich\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 Sandwich = createLucideIcon('Sandwich', [\n ['path', { d: 'm2.37 11.223 8.372-6.777a2 2 0 0 1 2.516 0l8.371 6.777', key: 'f1wd0e' }],\n ['path', { d: 'M21 15a1 1 0 0 1 1 1v2a1 1 0 0 1-1 1h-5.25', key: '1pfu07' }],\n ['path', { d: 'M3 15a1 1 0 0 0-1 1v2a1 1 0 0 0 1 1h9', key: '1oq9qw' }],\n ['path', { d: 'm6.67 15 6.13 4.6a2 2 0 0 0 2.8-.4l3.15-4.2', key: '1fnwu5' }],\n ['rect', { width: '20', height: '4', x: '2', y: '11', rx: '1', key: 'itshg' }],\n]);\n\nexport default Sandwich;\n"],"names":[],"mappings":";;;;;;;;;AAaM,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAW,iBAAiB,UAAY,CAAA,CAAA,CAAA;AAAA,CAAA,CAC5C,CAAC,CAAA,CAAA,CAAA,CAAA,CAAA,CAAQ,CAAA,CAAA,CAAA,CAAE,GAAG,CAA0D,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAA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AAG,CAA+C,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,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,CAAA,CAC5E,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,CAAK,CAAG,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAK,GAAG,CAAM,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAI,CAAK,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAK,SAAS,CAAA;AAC/E,CAAC,CAAA,CAAA;;"}
@@ -0,0 +1,66 @@
import { MessageEvent, ErrorEvent } from './websocket'
import Dispatcher from './dispatcher'
import {
EventListenerOptions,
AddEventListenerOptions,
EventListenerOrEventListenerObject
} from './patch'
interface EventSourceEventMap {
error: ErrorEvent
message: MessageEvent
open: Event
}
interface EventSource extends EventTarget {
close(): void
readonly CLOSED: 2
readonly CONNECTING: 0
readonly OPEN: 1
onerror: ((this: EventSource, ev: ErrorEvent) => any) | null
onmessage: ((this: EventSource, ev: MessageEvent) => any) | null
onopen: ((this: EventSource, ev: Event) => any) | null
readonly readyState: 0 | 1 | 2
readonly url: string
readonly withCredentials: boolean
addEventListener<K extends keyof EventSourceEventMap>(
type: K,
listener: (this: EventSource, ev: EventSourceEventMap[K]) => any,
options?: boolean | AddEventListenerOptions
): void
addEventListener(
type: string,
listener: EventListenerOrEventListenerObject,
options?: boolean | AddEventListenerOptions
): void
removeEventListener<K extends keyof EventSourceEventMap>(
type: K,
listener: (this: EventSource, ev: EventSourceEventMap[K]) => any,
options?: boolean | EventListenerOptions
): void
removeEventListener(
type: string,
listener: EventListenerOrEventListenerObject,
options?: boolean | EventListenerOptions
): void
}
export declare const EventSource: {
prototype: EventSource
new (url: string | URL, init?: EventSourceInit): EventSource
readonly CLOSED: 2
readonly CONNECTING: 0
readonly OPEN: 1
}
interface EventSourceInit {
withCredentials?: boolean
// @deprecated use `node.dispatcher` instead
dispatcher?: Dispatcher
node?: {
dispatcher?: Dispatcher
reconnectionTime?: number
}
}
@@ -0,0 +1,15 @@
'use strict'
const { Buffer } = require('node:buffer')
const wasmBase64 = 'AGFzbQEAAAABJwdgAX8Bf2ADf39/AX9gAn9/AGABfwBgBH9/f38Bf2AAAGADf39/AALLAQgDZW52GHdhc21fb25faGVhZGVyc19jb21wbGV0ZQAEA2VudhV3YXNtX29uX21lc3NhZ2VfYmVnaW4AAANlbnYLd2FzbV9vbl91cmwAAQNlbnYOd2FzbV9vbl9zdGF0dXMAAQNlbnYUd2FzbV9vbl9oZWFkZXJfZmllbGQAAQNlbnYUd2FzbV9vbl9oZWFkZXJfdmFsdWUAAQNlbnYMd2FzbV9vbl9ib2R5AAEDZW52GHdhc21fb25fbWVzc2FnZV9jb21wbGV0ZQAAAzU0BQYAAAMAAAAAAAADAQMAAwMDAAACAAAAAAICAgICAgICAgIBAQEBAQEBAQEBAwAAAwAAAAQFAXABExMFAwEAAgYIAX8BQcDZBAsHxQcoBm1lbW9yeQIAC19pbml0aWFsaXplAAgZX19pbmRpcmVjdF9mdW5jdGlvbl90YWJsZQEAC2xsaHR0cF9pbml0AAkYbGxodHRwX3Nob3VsZF9rZWVwX2FsaXZlADcMbGxodHRwX2FsbG9jAAsGbWFsbG9jADkLbGxodHRwX2ZyZWUADARmcmVlAAwPbGxodHR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TVACgCAEEBayIAQX8gABs2AgALCwcAIAAtACgLBwAgAC0AKgsHACAALQArCwcAIAAtACkLBwAgAC8BNAsHACAALQAwC0ABBH8gACgCGCEBIAAvAS4hAiAALQAoIQMgACgCOCEEIAAQOCAAIAQ2AjggACADOgAoIAAgAjsBLiAAIAE2AhgL5YUCAgd/A34gASACaiEEAkAgACIDKAIMIgANACADKAIEBEAgAyABNgIECyMAQRBrIgkkAAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAn8CQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkAgAygCHCICQQJrDvwBAfkBAgMEBQYHCAkKCwwNDg8QERL4ARP3ARQV9gEWF/UBGBkaGxwdHh8g/QH7ASH0ASIjJCUmJygpKivzASwtLi8wMTLLine truncated
let wasmBuffer
Object.defineProperty(module, 'exports', {
get: () => {
return wasmBuffer
? wasmBuffer
: (wasmBuffer = Buffer.from(wasmBase64, 'base64'))
}
})
@@ -0,0 +1,534 @@
tlf2a$ 3 3 8 0 15 0 64 0
===============================================================================
This is pagga.tlf, or “Pagga”, by Sam Hocevar and pagga.
2010/01/17 -- Sam Hocevar <sam@hocevar.net>
font creation, all base characters
This font is free software. It comes without any warranty, to the extent
permitted by applicable law. You can redistribute it and/or modify it under
the terms of the Do What The Fuck You Want To Public License, Version 2,
as published by Sam Hocevar. See http://sam.zoy.org/wtfpl/COPYING for more
details.
This font is part of TOIlet’s official distribution. More information
on the TOIlet website at http://caca.zoy.org/wiki/toilet
===============================================================================
░░@
░░@
░░@@
░█@
░▀@
░▀@@
░▀░▀@
░░░░@
░░░░@@
░▄█▄█▄@
░▄█▄█▄@
░░▀░▀░@@
░▄█▀@
░▀██@
░▀▀░@@
░▀░█@
░▄▀░@
░▀░▀@@
░▄▀░@
░▄█▀@
░░▀▀@@
░▀@
░░@
░░@@
░▄▀░@
░█░░@
░░▀░@@
░▀▄░@
░░█░@
░▀░░@@
░▄░▄@
░▄█▄@
░▄▀▄@@
░░░░@
░▄█▄@
░░▀░@@
░░░░@
░░░░@
░▄▀░@@
░░░░@
░▄▄▄@
░░░░@@
░░░@
░░░@
░▀░@@
░░░█@
░▄▀░@
░▀░░@@
░▄▀▄@
░█/█@
░░▀░@@
░▀█░@
░░█░@
░▀▀▀@@
░▀▀▄@
░▄▀░@
░▀▀▀@@
░▀▀█@
░░▀▄@
░▀▀░@@
░█░█@
░░▀█@
░░░▀@@
░█▀▀@
░▀▀▄@
░▀▀░@@
░▄▀▀@
░█▀▄@
░░▀░@@
░▀▀█@
░▄▀░@
░▀░░@@
░▄▀▄@
░▄▀▄@
░░▀░@@
░▄▀▄@
░░▀█@
░▀▀░@@
░░░░@
░░▀░@
░░▀░@@
░░░░@
░░▀░@
░▄▀░@@
░░▄▀@
░▀▄░@
░░░▀@@
░░░░@
░▀▀▀@
░▀▀▀@@
░▀▄░@
░░▄▀@
░▀░░@@
░▀▀█@
░░▀░@
░░▀░@@
░▄▀▄@
░█▀▀@
░░▀░@@
░█▀█@
░█▀█@
░▀░▀@@
░█▀▄@
░█▀▄@
░▀▀░@@
░█▀▀@
░█░░@
░▀▀▀@@
░█▀▄@
░█░█@
░▀▀░@@
░█▀▀@
░█▀▀@
░▀▀▀@@
░█▀▀@
░█▀▀@
░▀░░@@
░█▀▀@
░█░█@
░▀▀▀@@
░█░█@
░█▀█@
░▀░▀@@
░▀█▀@
░░█░@
░▀▀▀@@
░▀▀█@
░░░█@
░▀▀░@@
░█░█@
░█▀▄@
░▀░▀@@
░█░░@
░█░░@
░▀▀▀@@
░█▄█@
░█░█@
░▀░▀@@
░█▀█@
░█░█@
░▀░▀@@
░█▀█@
░█░█@
░▀▀▀@@
░█▀█@
░█▀▀@
░▀░░@@
░▄▀▄@
░█\█@
░░▀\@@
░█▀▄@
░█▀▄@
░▀░▀@@
░█▀▀@
░▀▀█@
░▀▀▀@@
░▀█▀@
░░█░@
░░▀░@@
░█░█@
░█░█@
░▀▀▀@@
░█░█@
░▀▄▀@
░░▀░@@
░█░█@
░█▄█@
░▀░▀@@
░█░█@
░▄▀▄@
░▀░▀@@
░█░█@
░░█░@
░░▀░@@
░▀▀█@
░▄▀░@
░▀▀▀@@
░█▀░@
░█░░@
░▀▀░@@
░█░░@
░░▀▄@
░░░▀@@
░▀█░@
░░█░@
░▀▀░@@
░▄▀▄@
░░░░@
░░░░@@
░░░░@
░░░░@
░▀▀▀@@
░▀▄@
░░░@
░░░@@
░█▀█@
░█▀█@
░▀░▀@@
░█▀▄@
░█▀▄@
░▀▀░@@
░█▀▀@
░█░░@
░▀▀▀@@
░█▀▄@
░█░█@
░▀▀░@@
░█▀▀@
░█▀▀@
░▀▀▀@@
░█▀▀@
░█▀▀@
░▀░░@@
░█▀▀@
░█░█@
░▀▀▀@@
░█░█@
░█▀█@
░▀░▀@@
░▀█▀@
░░█░@
░▀▀▀@@
░▀▀█@
░░░█@
░▀▀░@@
░█░█@
░█▀▄@
░▀░▀@@
░█░░@
░█░░@
░▀▀▀@@
░█▄█@
░█░█@
░▀░▀@@
░█▀█@
░█░█@
░▀░▀@@
░█▀█@
░█░█@
░▀▀▀@@
░█▀█@
░█▀▀@
░▀░░@@
░▄▀▄@
░█\█@
░░▀\@@
░█▀▄@
░█▀▄@
░▀░▀@@
░█▀▀@
░▀▀█@
░▀▀▀@@
░▀█▀@
░░█░@
░░▀░@@
░█░█@
░█░█@
░▀▀▀@@
░█░█@
░▀▄▀@
░░▀░@@
░█░█@
░█▄█@
░▀░▀@@
░█░█@
░▄▀▄@
░▀░▀@@
░█░█@
░░█░@
░░▀░@@
░▀▀█@
░▄▀░@
░▀▀▀@@
░░█▀@
░▀▄░@
░░▀▀@@
░░█░@
░░█░@
░░▀░@@
░▀█░@
░░▄▀@
░▀▀░@@
░▄▀▄▀@
░░░░░@
░░░░░@@
░█▀█@
░█▀█@
░▀░▀@@
░█▀█@
░█░█@
░▀▀▀@@
░█░█@
░█░█@
░▀▀▀@@
░█▀█@
░█▀█@
░▀░▀@@
░█▀█@
░█░█@
░▀▀▀@@
░█░█@
░█░█@
░▀▀▀@@
░█▀▀░█▀▀@
░▀▀█░▀▀█@
░▀▀▀░▀▀▀@@
0x00C0 À LATIN CAPITAL LETTER A WITH GRAVE
░█▀█@
░█▀█@
░▀░▀@@
0x00C1 Á LATIN CAPITAL LETTER A WITH ACUTE
░█▀█@
░█▀█@
░▀░▀@@
0x00C2 Â LATIN CAPITAL LETTER A WITH CIRCUMFLEX
░█▀█@
░█▀█@
░▀░▀@@
0x00C3 Ã LATIN CAPITAL LETTER A WITH TILDE
░█▀█@
░█▀█@
░▀░▀@@
0x00C5 Å LATIN CAPITAL LETTER A WITH RING ABOVE
░█▀█@
░█▀█@
░▀░▀@@
0x00C6 Æ LATIN CAPITAL LETTER AE
░█▀█▀▀@
░█▀█▀▀@
░▀░▀▀▀@@
0x00C7 Ç LATIN CAPITAL LETTER C WITH CEDILLA
░█▀▀@
░█░░@
░▀▀▀@@
0x00C8 È LATIN CAPITAL LETTER E WITH GRAVE
░█▀▀@
░█▀▀@
░▀▀▀@@
0x00C9 É LATIN CAPITAL LETTER E WITH ACUTE
░█▀▀@
░█▀▀@
░▀▀▀@@
0x00CA Ê LATIN CAPITAL LETTER E WITH CIRCUMFLEX
░█▀▀@
░█▀▀@
░▀▀▀@@
0x00CB Ë LATIN CAPITAL LETTER E WITH DIAERESIS
░█▀▀@
░█▀▀@
░▀▀▀@@
0x00CC Ì LATIN CAPITAL LETTER I WITH GRAVE
░▀█▀@
░░█░@
░▀▀▀@@
0x00CD Í LATIN CAPITAL LETTER I WITH ACUTE
░▀█▀@
░░█░@
░▀▀▀@@
0x00CE Î LATIN CAPITAL LETTER I WITH CIRCUMFLEX
░▀█▀@
░░█░@
░▀▀▀@@
0x00CF Ï LATIN CAPITAL LETTER I WITH DIAERESIS
░▀█▀@
░░█░@
░▀▀▀@@
0x00D1 Ñ LATIN CAPITAL LETTER N WITH TILDE
░█▀█@
░█░█@
░▀░▀@@
0x00D2 Ò LATIN CAPITAL LETTER O WITH GRAVE
░█▀█@
░█░█@
░▀▀▀@@
0x00D3 Ó LATIN CAPITAL LETTER O WITH ACUTE
░█▀█@
░█░█@
░▀▀▀@@
0x00D4 Ô LATIN CAPITAL LETTER O WITH CIRCUMFLEX
░█▀█@
░█░█@
░▀▀▀@@
0x00D5 Õ LATIN CAPITAL LETTER O WITH TILDE
░█▀█@
░█░█@
░▀▀▀@@
0x00D8 Ø LATIN CAPITAL LETTER O WITH STROKE
░█▀█@
░█░█@
░▀▀▀@@
0x00D9 Ù LATIN CAPITAL LETTER U WITH GRAVE
░█░█@
░█░█@
░▀▀▀@@
0x00DA Ú LATIN CAPITAL LETTER U WITH ACUTE
░█░█@
░█░█@
░▀▀▀@@
0x00DB Û LATIN CAPITAL LETTER U WITH CIRCUMFLEX
░█░█@
░█░█@
░▀▀▀@@
0x00DD Ý LATIN CAPITAL LETTER Y WITH ACUTE
░█░█@
░░█░@
░░▀░@@
0x00E0 à LATIN SMALL LETTER A WITH GRAVE
░█▀█@
░█▀█@
░▀░▀@@
0x00E1 á LATIN SMALL LETTER A WITH ACUTE
░█▀█@
░█▀█@
░▀░▀@@
0x00E2 â LATIN SMALL LETTER A WITH CIRCUMFLEX
░█▀█@
░█▀█@
░▀░▀@@
0x00E3 ã LATIN SMALL LETTER A WITH TILDE
░█▀█@
░█▀█@
░▀░▀@@
0x00E5 å LATIN SMALL LETTER A WITH RING ABOVE
░█▀█@
░█▀█@
░▀░▀@@
0x00E6 æ LATIN SMALL LETTER AE
░█▀█▀▀@
░█▀█▀▀@
░▀░▀▀▀@@
0x00E7 ç LATIN SMALL LETTER C WITH CEDILLA
░█▀▀@
░█░░@
░▀▀▀@@
0x00E8 è LATIN SMALL LETTER E WITH GRAVE
░█▀▀@
░█▀▀@
░▀▀▀@@
0x00E9 é LATIN SMALL LETTER E WITH ACUTE
░█▀▀@
░█▀▀@
░▀▀▀@@
0x00EA ê LATIN SMALL LETTER E WITH CIRCUMFLEX
░█▀▀@
░█▀▀@
░▀▀▀@@
0x00EB ë LATIN SMALL LETTER E WITH DIAERESIS
░█▀▀@
░█▀▀@
░▀▀▀@@
0x00EC ì LATIN SMALL LETTER I WITH GRAVE
░▀█▀@
░░█░@
░▀▀▀@@
0x00ED í LATIN SMALL LETTER I WITH ACUTE
░▀█▀@
░░█░@
░▀▀▀@@
0x00EE î LATIN SMALL LETTER I WITH CIRCUMFLEX
░▀█▀@
░░█░@
░▀▀▀@@
0x00EF ï LATIN SMALL LETTER I WITH DIAERESIS
░▀█▀@
░░█░@
░▀▀▀@@
0x00F1 ñ LATIN SMALL LETTER N WITH TILDE
░█▀█@
░█░█@
░▀░▀@@
0x00F2 ò LATIN SMALL LETTER O WITH GRAVE
░█▀█@
░█░█@
░▀▀▀@@
0x00F3 ó LATIN SMALL LETTER O WITH ACUTE
░█▀█@
░█░█@
░▀▀▀@@
0x00F4 ô LATIN SMALL LETTER O WITH CIRCUMFLEX
░█▀█@
░█░█@
░▀▀▀@@
0x00F5 õ LATIN SMALL LETTER O WITH TILDE
░█▀█@
░█░█@
░▀▀▀@@
0x00F8 ø LATIN SMALL LETTER O WITH STROKE
░█▀█@
░█░█@
░▀▀▀@@
0x00F9 ù LATIN SMALL LETTER U WITH GRAVE
░█░█@
░█░█@
░▀▀▀@@
0x00FA ú LATIN SMALL LETTER U WITH ACUTE
░█░█@
░█░█@
░▀▀▀@@
0x00FB û LATIN SMALL LETTER U WITH CIRCUMFLEX
░█░█@
░█░█@
░▀▀▀@@
0x00FC ü LATIN SMALL LETTER U WITH DIAERESIS
░█░█@
░█░█@
░▀▀▀@@
0x00FD ý LATIN SMALL LETTER Y WITH ACUTE
░█░█@
░░█░@
░░▀░@@
0x00FF ÿ LATIN SMALL LETTER Y WITH DIAERESIS
░█░█@
░░█░@
░░▀░@@
0x0153 œ LATIN SMALL LIGATURE OE
░█▀█▀▀@
░█░█▀▀@
░▀▀▀▀▀@@
@@ -0,0 +1 @@
{"version":3,"file":"traversal.d.ts","sourceRoot":"https://raw.githubusercontent.com/fb55/domutils/0ab8bcf1ecfc70dfc93291a4cb2496578ac25e9c/src/","sources":["traversal.ts"],"names":[],"mappings":"AAAA,OAAO,EAEH,OAAO,EACP,SAAS,EACT,OAAO,EACP,UAAU,EAEb,MAAM,YAAY,CAAC;AAEpB;;;;;;GAMG;AACH,wBAAgB,WAAW,CAAC,IAAI,EAAE,OAAO,GAAG,SAAS,EAAE,CAEtD;AAED,wBAAgB,SAAS,CAAC,IAAI,EAAE,OAAO,GAAG,UAAU,GAAG,IAAI,CAAC;AAY5D;;;;;;;;;;GAUG;AACH,wBAAgB,WAAW,CAAC,IAAI,EAAE,OAAO,GAAG,OAAO,EAAE,CAepD;AAED;;;;;;;GAOG;AACH,wBAAgB,iBAAiB,CAC7B,IAAI,EAAE,OAAO,EACb,IAAI,EAAE,MAAM,GACb,MAAM,GAAG,SAAS,CAEpB;AAED;;;;;;;GAOG;AACH,wBAAgB,SAAS,CAAC,IAAI,EAAE,OAAO,EAAE,IAAI,EAAE,MAAM,GAAG,OAAO,CAM9D;AAED;;;;;;GAMG;AACH,wBAAgB,OAAO,CAAC,IAAI,EAAE,OAAO,GAAG,MAAM,CAE7C;AAED;;;;;;;GAOG;AACH,wBAAgB,kBAAkB,CAAC,IAAI,EAAE,OAAO,GAAG,OAAO,GAAG,IAAI,CAIhE;AAED;;;;;;;GAOG;AACH,wBAAgB,kBAAkB,CAAC,IAAI,EAAE,OAAO,GAAG,OAAO,GAAG,IAAI,CAIhE"}
@@ -0,0 +1 @@
{"version":3,"file":"fish-off.js","sources":["../../../src/icons/fish-off.ts"],"sourcesContent":["import createLucideIcon from '../createLucideIcon';\n\n/**\n * @component @name FishOff\n * @description Lucide SVG icon component, renders SVG Element with children.\n *\n * @preview ![img](data:image/svg+xml;base64,PHN2ZyAgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIgogIHdpZHRoPSIyNCIKICBoZWlnaHQ9IjI0IgogIHZpZXdCb3g9IjAgMCAyNCAyNCIKICBmaWxsPSJub25lIgogIHN0cm9rZT0iIzAwMCIgc3R5bGU9ImJhY2tncm91bmQtY29sb3I6ICNmZmY7IGJvcmRlci1yYWRpdXM6IDJweCIKICBzdHJva2Utd2lkdGg9IjIiCiAgc3Ryb2tlLWxpbmVjYXA9InJvdW5kIgogIHN0cm9rZS1saW5lam9pbj0icm91bmQiCj4KICA8cGF0aCBkPSJNMTggMTIuNDd2LjAzbTAtLjV2LjQ3bS0uNDc1IDUuMDU2QTYuNzQ0IDYuNzQ0IDAgMCAxIDE1IDE4Yy0zLjU2IDAtNy41Ni0yLjUzLTguNS02IC4zNDgtMS4yOCAxLjExNC0yLjQzMyAyLjEyMS0zLjM4bTMuNDQ0LTIuMDg4QTguODAyIDguODAyIDAgMCAxIDE1IDZjMy41NiAwIDYuMDYgMi41NCA3IDYtLjMwOSAxLjE0LS43ODYgMi4xNzctMS40MTMgMy4wNTgiIC8+CiAgPHBhdGggZD0iTTcgMTAuNjdDNyA4IDUuNTggNS45NyAyLjczIDUuNWMtMSAxLjUtMSA1IC4yMyA2LjUtMS4yNCAxLjUtMS4yNCA1LS4yMyA2LjVDNS41OCAxOC4wMyA3IDE2IDcgMTMuMzNtNy40OC00LjM3MkE5Ljc3IDkuNzcgMCAwIDEgMTYgNi4wN20wIDExLjg2YTkuNzcgOS43NyAwIDAgMS0xLjcyOC0zLjYxOCIgLz4KICA8cGF0aCBkPSJtMTYuMDEgMTcuOTMtLjIzIDEuNEEyIDIgMCAwIDEgMTMuOCAyMUg5LjVhNS45NiA1Ljk2IDAgMCAwIDEuNDktMy45OE04LjUzIDNoNS4yN2EyIDIgMCAwIDEgMS45OCAxLjY3bC4yMyAxLjRNMiAybDIwIDIwIiAvPgo8L3N2Zz4K) - https://lucide.dev/icons/fish-off\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 FishOff = createLucideIcon('FishOff', [\n [\n 'path',\n {\n d: 'M18 12.47v.03m0-.5v.47m-.475 5.056A6.744 6.744 0 0 1 15 18c-3.56 0-7.56-2.53-8.5-6 .348-1.28 1.114-2.433 2.121-3.38m3.444-2.088A8.802 8.802 0 0 1 15 6c3.56 0 6.06 2.54 7 6-.309 1.14-.786 2.177-1.413 3.058',\n key: '1j1hse',\n },\n ],\n [\n 'path',\n {\n d: 'M7 10.67C7 8 5.58 5.97 2.73 5.5c-1 1.5-1 5 .23 6.5-1.24 1.5-1.24 5-.23 6.5C5.58 18.03 7 16 7 13.33m7.48-4.372A9.77 9.77 0 0 1 16 6.07m0 11.86a9.77 9.77 0 0 1-1.728-3.618',\n key: '1q46z8',\n },\n ],\n [\n 'path',\n {\n d: 'm16.01 17.93-.23 1.4A2 2 0 0 1 13.8 21H9.5a5.96 5.96 0 0 0 1.49-3.98M8.53 3h5.27a2 2 0 0 1 1.98 1.67l.23 1.4M2 2l20 20',\n key: '1407gh',\n },\n ],\n]);\n\nexport default FishOff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AAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA;AAAA,CACH,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAK,EAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA;ALine truncated
@@ -0,0 +1,3 @@
Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
const require_middleware_request_id_request_id = require("./request-id.js");
exports.requestId = require_middleware_request_id_request_id.requestId;
@@ -0,0 +1,239 @@
v2.1.1. / 2025-12-01
==================
* update engines field in the package.json to reflect the current compatibility (Node <18). See: 2.0.0
* Minor changes (package metadata)
v2.1.0 / 2025-03-05
==================
* deps:
* use caret notation for dependency versions
* encodeurl@^2.0.0
* debug@^4.4.0
* remove `ServerResponse.headersSent` support check
* remove setImmediate support check
* update test dependencies
* remove unnecessary devDependency `safe-buffer`
* remove `unpipe` package and use native `unpipe()` method
* remove unnecessary devDependency `readable-stream`
* refactor: use object spread to copy error headers
* refactor: use replaceAll instead of replace with a regex
* refactor: replace setHeaders function with optimized inline header setting
v2.0.0 / 2024-09-02
==================
* drop support for node <18
* ignore status message for HTTP/2 (#53)
v1.3.1 / 2024-09-11
==================
* deps: encodeurl@~2.0.0
v1.3.0 / 2024-09-03
==================
* ignore status message for HTTP/2 (#53)
v1.2.1 / 2024-09-02
==================
* Gracefully handle when handling an error and socket is null
1.2.0 / 2022-03-22
==================
* Remove set content headers that break response
* deps: on-finished@2.4.1
* deps: statuses@2.0.1
- Rename `425 Unordered Collection` to standard `425 Too Early`
1.1.2 / 2019-05-09
==================
* Set stricter `Content-Security-Policy` header
* deps: parseurl@~1.3.3
* deps: statuses@~1.5.0
1.1.1 / 2018-03-06
==================
* Fix 404 output for bad / missing pathnames
* deps: encodeurl@~1.0.2
- Fix encoding `%` as last character
* deps: statuses@~1.4.0
1.1.0 / 2017-09-24
==================
* Use `res.headersSent` when available
1.0.6 / 2017-09-22
==================
* deps: debug@2.6.9
1.0.5 / 2017-09-15
==================
* deps: parseurl@~1.3.2
- perf: reduce overhead for full URLs
- perf: unroll the "fast-path" `RegExp`
1.0.4 / 2017-08-03
==================
* deps: debug@2.6.8
1.0.3 / 2017-05-16
==================
* deps: debug@2.6.7
- deps: ms@2.0.0
1.0.2 / 2017-04-22
==================
* deps: debug@2.6.4
- deps: ms@0.7.3
1.0.1 / 2017-03-21
==================
* Fix missing `</html>` in HTML document
* deps: debug@2.6.3
- Fix: `DEBUG_MAX_ARRAY_LENGTH`
1.0.0 / 2017-02-15
==================
* Fix exception when `err` cannot be converted to a string
* Fully URL-encode the pathname in the 404 message
* Only include the pathname in the 404 message
* Send complete HTML document
* Set `Content-Security-Policy: default-src 'self'` header
* deps: debug@2.6.1
- Allow colors in workers
- Deprecated `DEBUG_FD` environment variable set to `3` or higher
- Fix error when running under React Native
- Use same color for same namespace
- deps: ms@0.7.2
0.5.1 / 2016-11-12
==================
* Fix exception when `err.headers` is not an object
* deps: statuses@~1.3.1
* perf: hoist regular expressions
* perf: remove duplicate validation path
0.5.0 / 2016-06-15
==================
* Change invalid or non-numeric status code to 500
* Overwrite status message to match set status code
* Prefer `err.statusCode` if `err.status` is invalid
* Set response headers from `err.headers` object
* Use `statuses` instead of `http` module for status messages
- Includes all defined status messages
0.4.1 / 2015-12-02
==================
* deps: escape-html@~1.0.3
- perf: enable strict mode
- perf: optimize string replacement
- perf: use faster string coercion
0.4.0 / 2015-06-14
==================
* Fix a false-positive when unpiping in Node.js 0.8
* Support `statusCode` property on `Error` objects
* Use `unpipe` module for unpiping requests
* deps: escape-html@1.0.2
* deps: on-finished@~2.3.0
- Add defined behavior for HTTP `CONNECT` requests
- Add defined behavior for HTTP `Upgrade` requests
- deps: ee-first@1.1.1
* perf: enable strict mode
* perf: remove argument reassignment
0.3.6 / 2015-05-11
==================
* deps: debug@~2.2.0
- deps: ms@0.7.1
0.3.5 / 2015-04-22
==================
* deps: on-finished@~2.2.1
- Fix `isFinished(req)` when data buffered
0.3.4 / 2015-03-15
==================
* deps: debug@~2.1.3
- Fix high intensity foreground color for bold
- deps: ms@0.7.0
0.3.3 / 2015-01-01
==================
* deps: debug@~2.1.1
* deps: on-finished@~2.2.0
0.3.2 / 2014-10-22
==================
* deps: on-finished@~2.1.1
- Fix handling of pipelined requests
0.3.1 / 2014-10-16
==================
* deps: debug@~2.1.0
- Implement `DEBUG_FD` env variable support
0.3.0 / 2014-09-17
==================
* Terminate in progress response only on error
* Use `on-finished` to determine request status
0.2.0 / 2014-09-03
==================
* Set `X-Content-Type-Options: nosniff` header
* deps: debug@~2.0.0
0.1.0 / 2014-07-16
==================
* Respond after request fully read
- prevents hung responses and socket hang ups
* deps: debug@1.0.4
0.0.3 / 2014-07-11
==================
* deps: debug@1.0.3
- Add support for multiple wildcards in namespaces
0.0.2 / 2014-06-19
==================
* Handle invalid status codes
0.0.1 / 2014-06-05
==================
* deps: debug@1.0.2
0.0.0 / 2014-06-05
==================
* Extracted from connect/express
@@ -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 IterationCcw = createLucideIcon("IterationCcw", [
["path", { d: "M20 10c0-4.4-3.6-8-8-8s-8 3.6-8 8 3.6 8 8 8h8", key: "4znkd0" }],
["polyline", { points: "16 14 20 18 16 22", key: "11njsm" }]
]);
export { IterationCcw as default };
//# sourceMappingURL=iteration-ccw.js.map
@@ -0,0 +1 @@
module.exports={A:{A:{"2":"_E"},B:{"2":"_I","33":"_K"},C:{"1":"_yL","2":"_UK"},D:{"16":"_aL","33":"_H _sL"},E:{"1":"_uC","2":"_u","33":"_fJ _GR"},F:{"2":"_T","33":"_a"},G:{"1":"_7B","16":"_XE"},H:{"2":"1D"},I:{"16":"_G","33":"I"},J:{"16":"_B"},K:{"2":"_D","33":"H"},L:{"16":"I"},M:{"1":"YC"},N:{"16":"_A"},O:{"16":"bC"},P:{"16":"_F"},Q:{"33":"JE"},R:{"16":"KE"},S:{"1":"_C"}},B:4,C:"CSS print-color-adjust",D:true};
@@ -0,0 +1 @@
{"version":3,"names":["_index","require","_cleanJSXElementLiteralChild","buildChildren","node","elements","i","children","length","child","isJSXText","cleanJSXElementLiteralChild","isJSXExpressionContainer","expression","isJSXEmptyExpression","push"],"sources":["../../../src/builders/react/buildChildren.ts"],"sourcesContent":["import {\n isJSXText,\n isJSXExpressionContainer,\n isJSXEmptyExpression,\n} from \"../../validators/generated/index.ts\";\nimport cleanJSXElementLiteralChild from \"../../utils/react/cleanJSXElementLiteralChild.ts\";\nimport type * as t from \"../../index.ts\";\n\ntype ReturnedChild =\n | t.JSXSpreadChild\n | t.JSXElement\n | t.JSXFragment\n | t.Expression;\n\nexport default function buildChildren(\n node: t.JSXElement | t.JSXFragment,\n): ReturnedChild[] {\n const elements = [];\n\n for (let i = 0; i < node.children.length; i++) {\n let child: any = node.children[i];\n\n if (isJSXText(child)) {\n cleanJSXElementLiteralChild(child, elements);\n continue;\n }\n\n if (isJSXExpressionContainer(child)) child = child.expression;\n if (isJSXEmptyExpression(child)) continue;\n\n elements.push(child);\n }\n\n return elements;\n}\n"],"mappings":";;;;;;AAAA,IAAAA,MAAA,GAAAC,OAAA;AAKA,IAAAC,4BAAA,GAAAD,OAAA;AASe,SAASE,aAAaA,CACnCC,IAAkC,EACjB;EACjB,MAAMC,QAAQ,GAAG,EAAE;EAEnB,KAAK,IAAIC,CAAC,GAAG,CAAC,EAAEA,CAAC,GAAGF,IAAI,CAACG,QAAQ,CAACC,MAAM,EAAEF,CAAC,EAAE,EAAE;IAC7C,IAAIG,KAAU,GAAGL,IAAI,CAACG,QAAQ,CAACD,CAAC,CAAC;IAEjC,IAAI,IAAAI,gBAAS,EAACD,KAAK,CAAC,EAAE;MACpB,IAAAE,oCAA2B,EAACF,KAAK,EAAEJ,QAAQ,CAAC;MAC5C;IACF;IAEA,IAAI,IAAAO,+BAAwB,EAACH,KAAK,CAAC,EAAEA,KAAK,GAAGA,KAAK,CAACI,UAAU;IAC7D,IAAI,IAAAC,2BAAoB,EAACL,KAAK,CAAC,EAAE;IAEjCJ,QAAQ,CAACU,IAAI,CAACN,KAAK,CAAC;EACtB;EAEA,OAAOJ,QAAQ;AACjB","ignoreList":[]}
@@ -0,0 +1,301 @@
# Copyright (c) 2014 Google Inc. All rights reserved.
# Use of this source code is governed by a BSD-style license that can be
# found in the LICENSE file.
"""Xcode-ninja wrapper project file generator.
This updates the data structures passed to the Xcode gyp generator to build
with ninja instead. The Xcode project itself is transformed into a list of
executable targets, each with a build step to build with ninja, and a target
with every source and resource file. This appears to sidestep some of the
major performance headaches experienced using complex projects and large number
of targets within Xcode.
"""
import errno
import os
import re
import xml.sax.saxutils
import gyp.generator.ninja
def _WriteWorkspace(main_gyp, sources_gyp, params):
"""Create a workspace to wrap main and sources gyp paths."""
(build_file_root, _build_file_ext) = os.path.splitext(main_gyp)
workspace_path = build_file_root + ".xcworkspace"
options = params["options"]
if options.generator_output:
workspace_path = os.path.join(options.generator_output, workspace_path)
try:
os.makedirs(workspace_path)
except OSError as e:
if e.errno != errno.EEXIST:
raise
output_string = (
'<?xml version="1.0" encoding="UTF-8"?>\n' + '<Workspace version = "1.0">\n'
)
for gyp_name in [main_gyp, sources_gyp]:
name = os.path.splitext(os.path.basename(gyp_name))[0] + ".xcodeproj"
name = xml.sax.saxutils.quoteattr("group:" + name)
output_string += " <FileRef location = %s></FileRef>\n" % name
output_string += "</Workspace>\n"
workspace_file = os.path.join(workspace_path, "contents.xcworkspacedata")
try:
with open(workspace_file) as input_file:
input_string = input_file.read()
if input_string == output_string:
return
except OSError:
# Ignore errors if the file doesn't exist.
pass
with open(workspace_file, "w") as output_file:
output_file.write(output_string)
def _TargetFromSpec(old_spec, params):
"""Create fake target for xcode-ninja wrapper."""
# Determine ninja top level build dir (e.g. /path/to/out).
ninja_toplevel = None
jobs = 0
if params:
options = params["options"]
ninja_toplevel = os.path.join(
options.toplevel_dir, gyp.generator.ninja.ComputeOutputDir(params)
)
jobs = params.get("generator_flags", {}).get("xcode_ninja_jobs", 0)
target_name = old_spec.get("target_name")
product_name = old_spec.get("product_name", target_name)
ninja_target = {}
ninja_target["target_name"] = target_name
ninja_target["product_name"] = product_name
if product_extension := old_spec.get("product_extension"):
ninja_target["product_extension"] = product_extension
ninja_target["toolset"] = old_spec.get("toolset")
ninja_target["default_configuration"] = old_spec.get("default_configuration")
ninja_target["configurations"] = {}
# Tell Xcode to look in |ninja_toplevel| for build products.
new_xcode_settings = {}
if ninja_toplevel:
new_xcode_settings["CONFIGURATION_BUILD_DIR"] = (
"%s/$(CONFIGURATION)$(EFFECTIVE_PLATFORM_NAME)" % ninja_toplevel
)
if "configurations" in old_spec:
for config in old_spec["configurations"]:
old_xcode_settings = old_spec["configurations"][config].get(
"xcode_settings", {}
)
if "IPHONEOS_DEPLOYMENT_TARGET" in old_xcode_settings:
new_xcode_settings["CODE_SIGNING_REQUIRED"] = "NO"
new_xcode_settings["IPHONEOS_DEPLOYMENT_TARGET"] = old_xcode_settings[
"IPHONEOS_DEPLOYMENT_TARGET"
]
for key in ["BUNDLE_LOADER", "TEST_HOST"]:
if key in old_xcode_settings:
new_xcode_settings[key] = old_xcode_settings[key]
ninja_target["configurations"][config] = {}
ninja_target["configurations"][config]["xcode_settings"] = (
new_xcode_settings
)
ninja_target["mac_bundle"] = old_spec.get("mac_bundle", 0)
ninja_target["mac_xctest_bundle"] = old_spec.get("mac_xctest_bundle", 0)
ninja_target["ios_app_extension"] = old_spec.get("ios_app_extension", 0)
ninja_target["ios_watchkit_extension"] = old_spec.get("ios_watchkit_extension", 0)
ninja_target["ios_watchkit_app"] = old_spec.get("ios_watchkit_app", 0)
ninja_target["type"] = old_spec["type"]
if ninja_toplevel:
ninja_target["actions"] = [
{
"action_name": "Compile and copy %s via ninja" % target_name,
"inputs": [],
"outputs": [],
"action": [
"env",
"PATH=%s" % os.environ["PATH"],
"ninja",
"-C",
new_xcode_settings["CONFIGURATION_BUILD_DIR"],
target_name,
],
"message": "Compile and copy %s via ninja" % target_name,
},
]
if jobs > 0:
ninja_target["actions"][0]["action"].extend(("-j", jobs))
return ninja_target
def IsValidTargetForWrapper(target_extras, executable_target_pattern, spec):
"""Limit targets for Xcode wrapper.
Xcode sometimes performs poorly with too many targets, so only include
proper executable targets, with filters to customize.
Arguments:
target_extras: Regular expression to always add, matching any target.
executable_target_pattern: Regular expression limiting executable targets.
spec: Specifications for target.
"""
target_name = spec.get("target_name")
# Always include targets matching target_extras.
if target_extras is not None and re.search(target_extras, target_name):
return True
# Otherwise just show executable targets and xc_tests.
if int(spec.get("mac_xctest_bundle", 0)) != 0 or (
spec.get("type", "") == "executable"
and spec.get("product_extension", "") != "bundle"
):
# If there is a filter and the target does not match, exclude the target.
if executable_target_pattern is not None:
if not re.search(executable_target_pattern, target_name):
return False
return True
return False
def CreateWrapper(target_list, target_dicts, data, params):
"""Initialize targets for the ninja wrapper.
This sets up the necessary variables in the targets to generate Xcode projects
that use ninja as an external builder.
Arguments:
target_list: List of target pairs: 'base/base.gyp:base'.
target_dicts: Dict of target properties keyed on target pair.
data: Dict of flattened build files keyed on gyp path.
params: Dict of global options for gyp.
"""
orig_gyp = params["build_files"][0]
for gyp_name, gyp_dict in data.items():
if gyp_name == orig_gyp:
depth = gyp_dict["_DEPTH"]
# Check for custom main gyp name, otherwise use the default CHROMIUM_GYP_FILE
# and prepend .ninja before the .gyp extension.
generator_flags = params.get("generator_flags", {})
main_gyp = generator_flags.get("xcode_ninja_main_gyp", None)
if main_gyp is None:
(build_file_root, build_file_ext) = os.path.splitext(orig_gyp)
main_gyp = build_file_root + ".ninja" + build_file_ext
# Create new |target_list|, |target_dicts| and |data| data structures.
new_target_list = []
new_target_dicts = {}
new_data = {}
# Set base keys needed for |data|.
new_data[main_gyp] = {}
new_data[main_gyp]["included_files"] = []
new_data[main_gyp]["targets"] = []
new_data[main_gyp]["xcode_settings"] = data[orig_gyp].get("xcode_settings", {})
# Normally the xcode-ninja generator includes only valid executable targets.
# If |xcode_ninja_executable_target_pattern| is set, that list is reduced to
# executable targets that match the pattern. (Default all)
executable_target_pattern = generator_flags.get(
"xcode_ninja_executable_target_pattern", None
)
# For including other non-executable targets, add the matching target name
# to the |xcode_ninja_target_pattern| regular expression. (Default none)
target_extras = generator_flags.get("xcode_ninja_target_pattern", None)
for old_qualified_target in target_list:
spec = target_dicts[old_qualified_target]
if IsValidTargetForWrapper(target_extras, executable_target_pattern, spec):
# Add to new_target_list.
target_name = spec.get("target_name")
new_target_name = f"{main_gyp}:{target_name}#target"
new_target_list.append(new_target_name)
# Add to new_target_dicts.
new_target_dicts[new_target_name] = _TargetFromSpec(spec, params)
# Add to new_data.
for old_target in data[old_qualified_target.split(":")[0]]["targets"]:
if old_target["target_name"] == target_name:
new_data_target = {}
new_data_target["target_name"] = old_target["target_name"]
new_data_target["toolset"] = old_target["toolset"]
new_data[main_gyp]["targets"].append(new_data_target)
# Create sources target.
sources_target_name = "sources_for_indexing"
sources_target = _TargetFromSpec(
{
"target_name": sources_target_name,
"toolset": "target",
"default_configuration": "Default",
"mac_bundle": "0",
"type": "executable",
},
None,
)
# Tell Xcode to look everywhere for headers.
sources_target["configurations"] = {"Default": {"include_dirs": [depth]}}
# Put excluded files into the sources target so they can be opened in Xcode.
skip_excluded_files = not generator_flags.get(
"xcode_ninja_list_excluded_files", True
)
sources = []
for target, target_dict in target_dicts.items():
base = os.path.dirname(target)
files = target_dict.get("sources", []) + target_dict.get(
"mac_bundle_resources", []
)
if not skip_excluded_files:
files.extend(
target_dict.get("sources_excluded", [])
+ target_dict.get("mac_bundle_resources_excluded", [])
)
for action in target_dict.get("actions", []):
files.extend(action.get("inputs", []))
if not skip_excluded_files:
files.extend(action.get("inputs_excluded", []))
# Remove files starting with $. These are mostly intermediate files for the
# build system.
files = [file for file in files if not file.startswith("$")]
# Make sources relative to root build file.
relative_path = os.path.dirname(main_gyp)
sources += [
os.path.relpath(os.path.join(base, file), relative_path) for file in files
]
sources_target["sources"] = sorted(set(sources))
# Put sources_to_index in it's own gyp.
sources_gyp = os.path.join(os.path.dirname(main_gyp), sources_target_name + ".gyp")
fully_qualified_target_name = f"{sources_gyp}:{sources_target_name}#target"
# Add to new_target_list, new_target_dicts and new_data.
new_target_list.append(fully_qualified_target_name)
new_target_dicts[fully_qualified_target_name] = sources_target
new_data_target = {}
new_data_target["target_name"] = sources_target["target_name"]
new_data_target["_DEPTH"] = depth
new_data_target["toolset"] = "target"
new_data[sources_gyp] = {}
new_data[sources_gyp]["targets"] = []
new_data[sources_gyp]["included_files"] = []
new_data[sources_gyp]["xcode_settings"] = data[orig_gyp].get("xcode_settings", {})
new_data[sources_gyp]["targets"].append(new_data_target)
# Write workspace to file.
_WriteWorkspace(main_gyp, sources_gyp, params)
return (new_target_list, new_target_dicts, new_data)
@@ -0,0 +1,71 @@
"use strict";
const addDays = require("./addDays.js");
const addHours = require("./addHours.js");
const addMilliseconds = require("./addMilliseconds.js");
const addMinutes = require("./addMinutes.js");
const addMonths = require("./addMonths.js");
const addSeconds = require("./addSeconds.js");
const addYears = require("./addYears.js");
const units = require("./units.js");
const normalizeUnit = require("./normalizeUnit-Cn0hUyBC.js");
const daysInMonth = require("./daysInMonth.js");
const constants = require("./constants-DR3SPJ7u.js");
const { DAY: DAY$1, HOUR: HOUR$1, MINUTE: MINUTE$1, MONTH: MONTH$1, SECOND: SECOND$1, YEAR: YEAR$1 } = units;
function addNumber(date, num, unit) {
unit = normalizeUnit.normalizeUnit(unit);
switch (unit) {
case YEAR$1:
return addYears(date, num);
case MONTH$1:
return addMonths(date, num);
case DAY$1:
return addDays(date, num);
case HOUR$1:
return addHours(date, num);
case MINUTE$1:
return addMinutes(date, num);
case SECOND$1:
return addSeconds(date, num);
default:
return addMilliseconds(date, num);
}
}
const { DAY, HOUR, MINUTE, MONTH, SECOND, YEAR } = units;
function addObject(date, obj, times) {
let time = 0;
let expectedMonth = 0;
let expectedDay = 0;
Object.entries(obj).forEach(([unit, num]) => {
unit = normalizeUnit.normalizeUnit(unit);
num *= times;
switch (unit) {
case YEAR:
expectedMonth += num * 12;
return;
case MONTH:
expectedMonth += date.getMonth() + num;
return;
case DAY:
expectedDay = num;
return;
case HOUR:
num *= constants.MS_IN_HOUR;
break;
case MINUTE:
num *= constants.MS_IN_MINUTE;
break;
case SECOND:
num *= constants.MS_IN_SECOND;
break;
}
time += num;
});
if (expectedMonth) {
const tempMaxDay = daysInMonth(new Date(date.getFullYear(), expectedMonth, 1, 0, 0, 0, 0));
const currentDay = date.getDate();
date.setMonth(expectedMonth, (currentDay > tempMaxDay ? tempMaxDay : currentDay) + expectedDay);
}
return addMilliseconds(date, time);
}
exports.addNumber = addNumber;
exports.addObject = addObject;
@@ -0,0 +1 @@
{"version":3,"file":"honoWebStandardStreamableHttp.js","sourceRoot":"","sources":["../../../../src/examples/server/honoWebStandardStreamableHttp.ts"],"names":[],"mappings":"AAAA;;;;;;;GAOG;AAEH,OAAO,EAAE,IAAI,EAAE,MAAM,MAAM,CAAC;AAC5B,OAAO,EAAE,IAAI,EAAE,MAAM,WAAW,CAAC;AACjC,OAAO,EAAE,KAAK,EAAE,MAAM,mBAAmB,CAAC;AAC1C,OAAO,KAAK,CAAC,MAAM,QAAQ,CAAC;AAC5B,O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AAC;AAElD,6EAA6E;AAC7E,GAAG,CAAC,GAAG,CAAC,MAAM,EAAE,KAAK,EAAC,CAAC,EAAC,EAAE;IACtB,MAAM,SAAS,GAAG,IAAI,wCAAwC,EAAE,CAAC;IACjE,MAAM,MAAM,GAAG,SAAS,EAAE,CAAC;IAC3B,MAAM,MAAM,CAAC,OAAO,CAAC,SAAS,CAAC,CAAC;IAChC,OAAO,SAAS,CAAC,aAAa,CAAC,CAAC,CAAC,GAAG,CAAC,GAAG,CAAC,CAAC;AAC9C,CAAC,CAAC,CAAC;AAEH,mBAAmB;AACnB,MAAM,IAAI,GAAG,OAAO,CAAC,GAAG,CAAC,QAAQ,CAAC,CAAC,CAAC,QAAQ,CAAC,OAAO,CAAC,GAAG,CAAC,QAAQ,EAAE,EAAE,CAAC,CAAC,CAAC,CAAC,IAAI,CAAC;AAE9E,OAAO,CAAC,GAAG,CAAC,oCAAoC,IAAI,EAAE,CAAC,CAAC;AACxD,OAAO,CAAC,GAAG,CAAC,kCAAkC,IAAI,SAAS,CAAC,CAAC;AAC7D,OAAO,CAAC,GAAG,CAAC,kCAAkC,IAAI,MAAM,CAAC,CAAC;AAE1D,KAAK,CAAC;IACF,KAAK,EAAE,GAAG,CAAC,KAAK;IAChB,IAAI,EAAE,IAAI;CACb,CAAC,CAAC"}
@@ -0,0 +1 @@
{"version":3,"file":"tree-pine.js","sources":["../../../src/icons/tree-pine.ts"],"sourcesContent":["import createLucideIcon from '../createLucideIcon';\n\n/**\n * @component @name TreePine\n * @description Lucide SVG icon component, renders SVG Element with children.\n *\n * @preview ![img](data:image/svg+xml;base64,PHN2ZyAgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIgogIHdpZHRoPSIyNCIKICBoZWlnaHQ9IjI0IgogIHZpZXdCb3g9IjAgMCAyNCAyNCIKICBmaWxsPSJub25lIgogIHN0cm9rZT0iIzAwMCIgc3R5bGU9ImJhY2tncm91bmQtY29sb3I6ICNmZmY7IGJvcmRlci1yYWRpdXM6IDJweCIKICBzdHJva2Utd2lkdGg9IjIiCiAgc3Ryb2tlLWxpbmVjYXA9InJvdW5kIgogIHN0cm9rZS1saW5lam9pbj0icm91bmQiCj4KICA8cGF0aCBkPSJtMTcgMTQgMyAzLjNhMSAxIDAgMCAxLS43IDEuN0g0LjdhMSAxIDAgMCAxLS43LTEuN0w3IDE0aC0uM2ExIDEgMCAwIDEtLjctMS43TDkgOWgtLjJBMSAxIDAgMCAxIDggNy4zTDEyIDNsNCA0LjNhMSAxIDAgMCAxLS44IDEuN0gxNWwzIDMuM2ExIDEgMCAwIDEtLjcgMS43SDE3WiIgLz4KICA8cGF0aCBkPSJNMTIgMjJ2LTMiIC8+Cjwvc3ZnPgo=) - https://lucide.dev/icons/tree-pine\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 TreePine = createLucideIcon('TreePine', [\n [\n 'path',\n {\n d: 'm17 14 3 3.3a1 1 0 0 1-.7 1.7H4.7a1 1 0 0 1-.7-1.7L7 14h-.3a1 1 0 0 1-.7-1.7L9 9h-.2A1 1 0 0 1 8 7.3L12 3l4 4.3a1 1 0 0 1-.8 1.7H15l3 3.3a1 1 0 0 1-.7 1.7H17Z',\n key: 'cpyugq',\n },\n ],\n ['path', { d: 'M12 22v-3', key: 'kmzjlo' }],\n]);\n\nexport default TreePine;\n"],"names":[],"mappings":";;;;;;;;;AAaM,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAW,iBAAiB,UAAY,CAAA,CAAA,CAAA;AAAA,CAC5C,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,C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A,CAAA,CAAE,GAAG,CAAa,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAK,UAAU,CAAA;AAC5C,CAAC,CAAA,CAAA;;"}
@@ -0,0 +1,18 @@
Copyright 2010, 2011, Chris Winberry <chris@winberry.net>. All rights reserved.
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":"createLucideIcon.js","sources":["../../src/createLucideIcon.ts"],"sourcesContent":["import { createElement, forwardRef } from 'react';\nimport { mergeClasses, toKebabCase } from '@lucide/shared';\nimport { IconNode, LucideProps } from './types';\nimport Icon from './Icon';\n\n/**\n * Create a Lucide icon component\n * @param {string} iconName\n * @param {array} iconNode\n * @returns {ForwardRefExoticComponent} LucideIcon\n */\nconst createLucideIcon = (iconName: string, iconNode: IconNode) => {\n const Component = forwardRef<SVGSVGElement, LucideProps>(({ className, ...props }, ref) =>\n createElement(Icon, {\n ref,\n iconNode,\n className: mergeClasses(`lucide-${toKebabCase(iconName)}`, className),\n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,CAAA;AAAA,CAAA,CAAA,CACH,CAAA;AAEA,CAAU,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAc,EAAG,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAQ,CAAA,CAAA,CAAA;AAEnC,CAAO,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,SAAA,CAAA;AACT,CAAA,CAAA;;"}
@@ -0,0 +1,79 @@
{
"AbortError": "/api/Errors.html#class-aborterror",
"Agent": "/api/Agent.html#class-agent",
"AgentDispatchOptions": "/api/Agent.html#agentdispatchoptions-handler",
"AgentOptions": "/api/Agent.html#new-agentoptions",
"BalancedPool": "/api/BalancedPool.html#class-balancedpool",
"BalancedPoolOptions": "/api/BalancedPool.html#parameter-balancedpooloptions",
"BodyMixin": "/api/Fetch.html#new-formdata",
"Buffer": "https://nodejs.org/api/buffer.html#class-buffer",
"BuildOptions": "/api/Connector.html#buildconnectoroptions",
"CacheKey": "/api/CacheStore.html#cachekey",
"CacheStore": "/api/CacheStore.html#new-memorycachestoreoptions",
"CacheValue": "/api/CacheStore.html#cachevalue",
"ClientDestroyedError": "/api/Errors.html#class-clientdestroyederror",
"ClientOptions": "/api/Client.html#new-clienturl-options",
"ClientStats": "/api/ClientStats.html#class-clientstats",
"ConnectOptions": "/api/Dispatcher.html#class-dispatcher",
"Cookie": "/api/Cookies.html#cookie",
"DispatchController": "/api/Dispatcher.html#class-dispatcher",
"DispatchHandler": "/api/Dispatcher.html#class-dispatcher",
"DispatchOptions": "/api/Dispatcher.html#class-dispatcher",
"Dispatcher": "/api/Dispatcher.html#class-dispatcher",
"Duplex": "https://nodejs.org/api/stream.html#class-streamduplex",
"EnvHttpProxyAgent": "/api/EnvHttpProxyAgent.html#class-envhttpproxyagent",
"EnvHttpProxyAgentOptions": "/api/EnvHttpProxyAgent.html#new-envhttpproxyagentoptions",
"EventEmitter": "https://nodejs.org/api/events.html#class-eventemitter",
"GetResult": "/api/CacheStore.html#getresult",
"H2CClientOptions": "/api/H2CClient.html#new-h2cclienturl-options",
"HeadersInit": "https://developer.mozilla.org/docs/Web/API/Headers/Headers",
"InvalidArgumentError": "/api/Errors.html#class-invalidargumenterror",
"Iterable": "https://developer.mozilla.org/docs/Web/JavaScript/Reference/Iteration_protocols",
"MaxOriginsReachedError": "/api/Errors.html#class-maxoriginsreachederror",
"MockAgent": "/api/MockAgent.html#class-mockagent",
"MockAgentOptions": "/api/MockAgent.html#parameter-mockagentoptions",
"MockCallHistory": "/api/MockCallHistory.html#class-mockcallhistory",
"MockCallHistoryLog": "/api/MockCallHistoryLog.html#class-mockcallhistorylog",
"MockClient": "/api/MockClient.html#class-mockclient",
"MockClientOptions": "/api/MockClient.html#parameter-mockclientoptions",
"MockInterceptor": "/api/MockPool.html#return-mockinterceptor",
"MockInterceptor.Options": "/api/MockPool.html#parameter-mockpoolinterceptoptions",
"MockPool": "/api/MockPool.html#class-mockpool",
"MockPoolInterceptOptions": "/api/MockPool.html#parameter-mockpoolinterceptoptions",
"MockPoolOptions": "/api/MockPool.html#parameter-mockpooloptions",
"MockResponseOptions": "/api/MockPool.html#parameter-mockresponseoptions",
"MockScope": "/api/MockPool.html#return-mockscope",
"PendingInterceptor": "/api/MockAgent.html#new-mockagentoptions",
"PipelineOptions": "/api/Dispatcher.html#class-dispatcher",
"Pool": "/api/Pool.html#class-pool",
"PoolOptions": "/api/Pool.html#new-poolurl-options",
"PoolStats": "/api/PoolStats.html#class-poolstats",
"ProxyAgent": "/api/ProxyAgent.html#class-proxyagent",
"ProxyAgentOptions": "/api/ProxyAgent.html#new-proxyagentoptions",
"Readable": "https://nodejs.org/api/stream.html#class-streamreadable",
"Record": "https://www.typescriptlang.org/docs/handbook/utility-types.html#recordkeys-type",
"RequestInit": "/api/Fetch.html#new-formdata",
"RequestOptions": "/api/Dispatcher.html#class-dispatcher",
"ResponseInit": "/api/Fetch.html#new-formdata",
"RetryContext": "/api/RetryHandler.html#retrycontext",
"RetryHandler": "/api/RetryHandler.html#class-retryhandler",
"RetryHandlers": "/api/RetryHandler.html#parameter-retryhandlers",
"RetryOptions": "/api/RetryHandler.html#retryoptions",
"RetryState": "/api/RetryHandler.html#retrystate",
"RoundRobinPoolOptions": "/api/RoundRobinPool.html#parameter-roundrobinpooloptions",
"SnapshotRecorder": "/api/SnapshotAgent.html#new-snapshotagentoptions",
"Socket": "https://nodejs.org/api/net.html#class-netsocket",
"SocketInfo": "/api/Errors.html#new-requestretryerrormessage-code-options",
"StreamOptions": "/api/Dispatcher.html#class-dispatcher",
"TLSSocket": "https://nodejs.org/api/tls.html#class-tlstlssocket",
"UndiciError": "/api/Errors.html#class-undicierror",
"UndiciHeaders": "/api/Dispatcher.html#class-dispatcher",
"UpgradeOptions": "/api/Dispatcher.html#class-dispatcher",
"UrlObject": "/index.html#urlobject",
"WebSocketInit": "/api/WebSocket.html#new-websocketurl-protocols",
"WebSocketStreamOptions": "/api/WebSocket.html#new-websocketurl-protocols",
"Writable": "https://nodejs.org/api/stream.html#class-streamwritable",
"buildConnector.BuildOptions": "/api/Connector.html#buildconnectoroptions",
"net.Socket": "https://nodejs.org/api/net.html#class-netsocket",
"stream.Readable": "https://nodejs.org/api/stream.html#class-streamreadable"
}
@@ -0,0 +1,171 @@
// @ts-ignore TS6133
import { expect, test } from "vitest";
import * as z from "zod/v3";
import { util } from "../helpers/util.js";
const booleanRecord = z.record(z.boolean());
type booleanRecord = z.infer<typeof booleanRecord>;
const recordWithEnumKeys = z.record(z.enum(["Tuna", "Salmon"]), z.string());
type recordWithEnumKeys = z.infer<typeof recordWithEnumKeys>;
const recordWithLiteralKeys = z.record(z.union([z.literal("Tuna"), z.literal("Salmon")]), z.string());
type recordWithLiteralKeys = z.infer<typeof recordWithLiteralKeys>;
test("type inference", () => {
util.assertEqual<booleanRecord, Record<string, boolean>>(true);
util.assertEqual<recordWithEnumKeys, Partial<Record<"Tuna" | "Salmon", string>>>(true);
util.assertEqual<recordWithLiteralKeys, Partial<Record<"Tuna" | "Salmon", string>>>(true);
});
test("methods", () => {
booleanRecord.optional();
booleanRecord.nullable();
});
test("string record parse - pass", () => {
booleanRecord.parse({
k1: true,
k2: false,
1234: false,
});
});
test("string record parse - fail", () => {
const badCheck = () =>
booleanRecord.parse({
asdf: 1234,
} as any);
expect(badCheck).toThrow();
expect(() => booleanRecord.parse("asdf")).toThrow();
});
test("string record parse - fail", () => {
const badCheck = () =>
booleanRecord.parse({
asdf: {},
} as any);
expect(badCheck).toThrow();
});
test("string record parse - fail", () => {
const badCheck = () =>
booleanRecord.parse({
asdf: [],
} as any);
expect(badCheck).toThrow();
});
test("key schema", () => {
const result1 = recordWithEnumKeys.parse({
Tuna: "asdf",
Salmon: "asdf",
});
expect(result1).toEqual({
Tuna: "asdf",
Salmon: "asdf",
});
const result2 = recordWithLiteralKeys.parse({
Tuna: "asdf",
Salmon: "asdf",
});
expect(result2).toEqual({
Tuna: "asdf",
Salmon: "asdf",
});
// shouldn't require us to specify all props in record
const result3 = recordWithEnumKeys.parse({
Tuna: "abcd",
});
expect(result3).toEqual({
Tuna: "abcd",
});
// shouldn't require us to specify all props in record
const result4 = recordWithLiteralKeys.parse({
Salmon: "abcd",
});
expect(result4).toEqual({
Salmon: "abcd",
});
expect(() =>
recordWithEnumKeys.parse({
Tuna: "asdf",
Salmon: "asdf",
Trout: "asdf",
})
).toThrow();
expect(() =>
recordWithLiteralKeys.parse({
Tuna: "asdf",
Salmon: "asdf",
Trout: "asdf",
})
).toThrow();
});
// test("record element", () => {
// expect(booleanRecord.element).toBeInstanceOf(z.ZodBoolean);
// });
test("key and value getters", () => {
const rec = z.record(z.string(), z.number());
rec.keySchema.parse("asdf");
rec.valueSchema.parse(1234);
rec.element.parse(1234);
});
test("is not vulnerable to prototype pollution", async () => {
const rec = z.record(
z.object({
a: z.string(),
})
);
const data = JSON.parse(`
{
"__proto__": {
"a": "evil"
},
"b": {
"a": "good"
}
}
`);
const obj1 = rec.parse(data);
expect(obj1.a).toBeUndefined();
const obj2 = rec.safeParse(data);
expect(obj2.success).toBe(true);
if (obj2.success) {
expect(obj2.data.a).toBeUndefined();
}
const obj3 = await rec.parseAsync(data);
expect(obj3.a).toBeUndefined();
const obj4 = await rec.safeParseAsync(data);
expect(obj4.success).toBe(true);
if (obj4.success) {
expect(obj4.data.a).toBeUndefined();
}
});
test("dont parse undefined values", () => {
const result1 = z.record(z.any()).parse({ foo: undefined });
expect(result1).toEqual({
foo: undefined,
});
});
@@ -0,0 +1,176 @@
import type { IssueData, ZodErrorMap, ZodIssue } from "../ZodError.js";
import { getErrorMap } from "../errors.js";
import defaultErrorMap from "../locales/en.js";
import type { ZodParsedType } from "./util.js";
export const makeIssue = (params: {
data: any;
path: (string | number)[];
errorMaps: ZodErrorMap[];
issueData: IssueData;
}): ZodIssue => {
const { data, path, errorMaps, issueData } = params;
const fullPath = [...path, ...(issueData.path || [])];
const fullIssue = {
...issueData,
path: fullPath,
};
if (issueData.message !== undefined) {
return {
...issueData,
path: fullPath,
message: issueData.message,
};
}
let errorMessage = "";
const maps = errorMaps
.filter((m) => !!m)
.slice()
.reverse();
for (const map of maps) {
errorMessage = map(fullIssue, { data, defaultError: errorMessage }).message;
}
return {
...issueData,
path: fullPath,
message: errorMessage,
};
};
export type ParseParams = {
path: (string | number)[];
errorMap: ZodErrorMap;
async: boolean;
};
export type ParsePathComponent = string | number;
export type ParsePath = ParsePathComponent[];
export const EMPTY_PATH: ParsePath = [];
export interface ParseContext {
readonly common: {
readonly issues: ZodIssue[];
readonly contextualErrorMap?: ZodErrorMap | undefined;
readonly async: boolean;
};
readonly path: ParsePath;
readonly schemaErrorMap?: ZodErrorMap | undefined;
readonly parent: ParseContext | null;
readonly data: any;
readonly parsedType: ZodParsedType;
}
export type ParseInput = {
data: any;
path: (string | number)[];
parent: ParseContext;
};
export function addIssueToContext(ctx: ParseContext, issueData: IssueData): void {
const overrideMap = getErrorMap();
const issue = makeIssue({
issueData: issueData,
data: ctx.data,
path: ctx.path,
errorMaps: [
ctx.common.contextualErrorMap, // contextual error map is first priority
ctx.schemaErrorMap, // then schema-bound map if available
overrideMap, // then global override map
overrideMap === defaultErrorMap ? undefined : defaultErrorMap, // then global default map
].filter((x) => !!x),
});
ctx.common.issues.push(issue);
}
export type ObjectPair = {
key: SyncParseReturnType<any>;
value: SyncParseReturnType<any>;
};
export class ParseStatus {
value: "aborted" | "dirty" | "valid" = "valid";
dirty(): void {
if (this.value === "valid") this.value = "dirty";
}
abort(): void {
if (this.value !== "aborted") this.value = "aborted";
}
static mergeArray(status: ParseStatus, results: SyncParseReturnType<any>[]): SyncParseReturnType {
const arrayValue: any[] = [];
for (const s of results) {
if (s.status === "aborted") return INVALID;
if (s.status === "dirty") status.dirty();
arrayValue.push(s.value);
}
return { status: status.value, value: arrayValue };
}
static async mergeObjectAsync(
status: ParseStatus,
pairs: { key: ParseReturnType<any>; value: ParseReturnType<any> }[]
): Promise<SyncParseReturnType<any>> {
const syncPairs: ObjectPair[] = [];
for (const pair of pairs) {
const key = await pair.key;
const value = await pair.value;
syncPairs.push({
key,
value,
});
}
return ParseStatus.mergeObjectSync(status, syncPairs);
}
static mergeObjectSync(
status: ParseStatus,
pairs: {
key: SyncParseReturnType<any>;
value: SyncParseReturnType<any>;
alwaysSet?: boolean;
}[]
): SyncParseReturnType {
const finalObject: any = {};
for (const pair of pairs) {
const { key, value } = pair;
if (key.status === "aborted") return INVALID;
if (value.status === "aborted") return INVALID;
if (key.status === "dirty") status.dirty();
if (value.status === "dirty") status.dirty();
if (key.value !== "__proto__" && (typeof value.value !== "undefined" || pair.alwaysSet)) {
finalObject[key.value] = value.value;
}
}
return { status: status.value, value: finalObject };
}
}
export interface ParseResult {
status: "aborted" | "dirty" | "valid";
data: any;
}
export type INVALID = { status: "aborted" };
export const INVALID: INVALID = Object.freeze({
status: "aborted",
});
export type DIRTY<T> = { status: "dirty"; value: T };
export const DIRTY = <T>(value: T): DIRTY<T> => ({ status: "dirty", value });
export type OK<T> = { status: "valid"; value: T };
export const OK = <T>(value: T): OK<T> => ({ status: "valid", value });
export type SyncParseReturnType<T = any> = OK<T> | DIRTY<T> | INVALID;
export type AsyncParseReturnType<T> = Promise<SyncParseReturnType<T>>;
export type ParseReturnType<T> = SyncParseReturnType<T> | AsyncParseReturnType<T>;
export const isAborted = (x: ParseReturnType<any>): x is INVALID => (x as any).status === "aborted";
export const isDirty = <T>(x: ParseReturnType<T>): x is OK<T> | DIRTY<T> => (x as any).status === "dirty";
export const isValid = <T>(x: ParseReturnType<T>): x is OK<T> => (x as any).status === "valid";
export const isAsync = <T>(x: ParseReturnType<T>): x is AsyncParseReturnType<T> =>
typeof Promise !== "undefined" && x instanceof Promise;
@@ -0,0 +1,13 @@
"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
exports.ImplicitGlobalVariableDefinition = void 0;
const DefinitionBase_1 = require("./DefinitionBase");
const DefinitionType_1 = require("./DefinitionType");
class ImplicitGlobalVariableDefinition extends DefinitionBase_1.DefinitionBase {
isTypeDefinition = false;
isVariableDefinition = true;
constructor(name, node) {
super(DefinitionType_1.DefinitionType.ImplicitGlobalVariable, name, node, null);
}
}
exports.ImplicitGlobalVariableDefinition = ImplicitGlobalVariableDefinition;
@@ -0,0 +1,719 @@
export default `flf2a$ 7 7 20 -1 3
banner3 by Merlin Greywolf merlin@brahms.udel.edu
August 9, 1994
$$$@
$$$@
$$$@
$$$@
$$$@
$$$@
$$$@@
####$@
####$@
####$@
## $@
$@
####$@
####$@@
#### ####$@
#### ####$@
## ## $@
$ $@
$ $@
$@
$@@
## ## $@
## ## $@
#########$@
## ## $@
#########$@
## ## $@
## ## $@@
######## $@
## ## ##$@
## ## $@
######## $@
## ##$@
## ## ##$@
######## $@@
##### ## $@
## ## ## $@
##### ## $@
## $@
## #####$@
## ## ##$@
## #####$@@
#### $@
## ## $@
#### $@
#### $@
## ## ##$@
## ## $@
#### ##$@@
####$@
####$@
## $@
## $@
$@
$@
$@@
###$@
## $@
## $@
## $@
## $@
## $@
###$@@
### $@
## $@
##$@
##$@
##$@
## $@
### $@@
$@
## ## $@
## ## $@
#########$@
## ## $@
## ## $@
$@@
$@
## $@
## $@
######$@
## $@
## $@
$@@
$@
$@
$@
####$@
####$@
## $@
## $@@
$@
$@
$@
#######$@
$@
$@
$@@
$@
$@
$@
$@
$@
###$@
###$@@
##$@
## $@
## $@
## $@
## $@
## $@
## $@@
##### $@
## ## $@
## ##$@
## ##$@
## ##$@
## ## $@
##### $@@
## $@
#### $@
## $@
## $@
## $@
## $@
######$@@
####### $@
## ##$@
##$@
####### $@
## $@
## $@
#########$@@
####### $@
## ##$@
##$@
####### $@
##$@
## ##$@
####### $@@
## $@
## ## $@
## ## $@
## ## $@
#########$@
## $@
## $@@
########$@
## $@
## $@
####### $@
##$@
## ##$@
###### $@@
####### $@
## ##$@
## $@
######## $@
## ##$@
## ##$@
####### $@@
########$@
## ##$@
## $@
## $@
## $@
## $@
## $@@
####### $@
## ##$@
## ##$@
####### $@
## ##$@
## ##$@
####### $@@
####### $@
## ##$@
## ##$@
########$@
##$@
## ##$@
####### $@@
## $@
####$@
## $@
$@
## $@
####$@
## $@@
####$@
####$@
$@
####$@
####$@
## $@
## $@@
##$@
## $@
## $@
## $@
## $@
## $@
##$@@
$@
$@
#####$@
$@
#####$@
$@
$@@
## $@
## $@
## $@
##$@
## $@
## $@
## $@@
####### $@
## ##$@
## $@
### $@
## $@
$@
## $@@
####### $@
## ##$@
## ### ##$@
## ### ##$@
## ##### $@
## $@
####### $@@
### $@
## ## $@
## ## $@
## ##$@
#########$@
## ##$@
## ##$@@
######## $@
## ##$@
## ##$@
######## $@
## ##$@
## ##$@
######## $@@
###### $@
## ##$@
## $@
## $@
## $@
## ##$@
###### $@@
######## $@
## ##$@
## ##$@
## ##$@
## ##$@
## ##$@
######## $@@
########$@
## $@
## $@
###### $@
## $@
## $@
########$@@
########$@
## $@
## $@
###### $@
## $@
## $@
## $@@
###### $@
## ## $@
## $@
## ####$@
## ## $@
## ## $@
###### $@@
## ##$@
## ##$@
## ##$@
#########$@
## ##$@
## ##$@
## ##$@@
####$@
## $@
## $@
## $@
## $@
## $@
####$@@
##$@
##$@
##$@
##$@
## ##$@
## ##$@
###### $@@
## ##$@
## ## $@
## ## $@
##### $@
## ## $@
## ## $@
## ##$@@
## $@
## $@
## $@
## $@
## $@
## $@
########$@@
## ##$@
### ###$@
#### ####$@
## ### ##$@
## ##$@
## ##$@
## ##$@@
## ##$@
### ##$@
#### ##$@
## ## ##$@
## ####$@
## ###$@
## ##$@@
####### $@
## ##$@
## ##$@
## ##$@
## ##$@
## ##$@
####### $@@
######## $@
## ##$@
## ##$@
######## $@
## $@
## $@
## $@@
####### $@
## ##$@
## ##$@
## ##$@
## ## ##$@
## ## $@
##### ##$@@
######## $@
## ##$@
## ##$@
######## $@
## ## $@
## ## $@
## ##$@@
###### $@
## ##$@
## $@
###### $@
##$@
## ##$@
###### $@@
########$@
## $@
## $@
## $@
## $@
## $@
## $@@
## ##$@
## ##$@
## ##$@
## ##$@
## ##$@
## ##$@
####### $@@
## ##$@
## ##$@
## ##$@
## ##$@
## ## $@
## ## $@
### $@@
## ##$@
## ## ##$@
## ## ##$@
## ## ##$@
## ## ##$@
## ## ##$@
### ### $@@
## ##$@
## ## $@
## ## $@
### $@
## ## $@
## ## $@
## ##$@@
## ##$@
## ## $@
#### $@
## $@
## $@
## $@
## $@@
########$@
## $@
## $@
## $@
## $@
## $@
########$@@
######$@
## $@
## $@
## $@
## $@
## $@
######$@@
## $@
## $@
## $@
## $@
## $@
## $@
##$@@
######$@
##$@
##$@
##$@
##$@
##$@
######$@@
### $@
## ## $@
## ##$@
$@
$@
$@
$@@
$@
$@
$@
$@
$@
$@
#######$@@
####$@
####$@
## $@
##$@
$@
$@
$@@
### $@
## ## $@
## ## $@
## ##$@
#########$@
## ##$@
## ##$@@
######## $@
## ##$@
## ##$@
######## $@
## ##$@
## ##$@
######## $@@
###### $@
## ##$@
## $@
## $@
## $@
## ##$@
###### $@@
######## $@
## ##$@
## ##$@
## ##$@
## ##$@
## ##$@
######## $@@
########$@
## $@
## $@
###### $@
## $@
## $@
########$@@
########$@
## $@
## $@
###### $@
## $@
## $@
## $@@
###### $@
## ## $@
## $@
## ####$@
## ## $@
## ## $@
###### $@@
## ##$@
## ##$@
## ##$@
#########$@
## ##$@
## ##$@
## ##$@@
####$@
## $@
## $@
## $@
## $@
## $@
####$@@
##$@
##$@
##$@
##$@
## ##$@
## ##$@
###### $@@
## ##$@
## ## $@
## ## $@
##### $@
## ## $@
## ## $@
## ##$@@
## $@
## $@
## $@
## $@
## $@
## $@
########$@@
## ##$@
### ###$@
#### ####$@
## ### ##$@
## ##$@
## ##$@
## ##$@@
## ##$@
### ##$@
#### ##$@
## ## ##$@
## ####$@
## ###$@
## ##$@@
####### $@
## ##$@
## ##$@
## ##$@
## ##$@
## ##$@
####### $@@
######## $@
## ##$@
## ##$@
######## $@
## $@
## $@
## $@@
####### $@
## ##$@
## ##$@
## ##$@
## ## ##$@
## ## $@
##### ##$@@
######## $@
## ##$@
## ##$@
######## $@
## ## $@
## ## $@
## ##$@@
###### $@
## ##$@
## $@
###### $@
##$@
## ##$@
###### $@@
########$@
## $@
## $@
## $@
## $@
## $@
## $@@
## ##$@
## ##$@
## ##$@
## ##$@
## ##$@
## ##$@
####### $@@
## ##$@
## ##$@
## ##$@
## ##$@
## ## $@
## ## $@
### $@@
## ##$@
## ## ##$@
## ## ##$@
## ## ##$@
## ## ##$@
## ## ##$@
### ### $@@
## ##$@
## ## $@
## ## $@
### $@
## ## $@
## ## $@
## ##$@@
## ##$@
## ## $@
#### $@
## $@
## $@
## $@
## $@@
########$@
## $@
## $@
## $@
## $@
## $@
########$@@
####$@
## $@
## $@
### $@
## $@
## $@
####$@@
##$@
##$@
##$@
$@
##$@
##$@
##$@@
#### $@
## $@
## $@
###$@
## $@
## $@
#### $@@
#### $@
## ## ##$@
#### $@
$@
$@
$@
$@@
@
@
@
@
@
@
@@
@
@
@
@
@
@
@@
@
@
@
@
@
@
@@
@
@
@
@
@
@
@@
@
@
@
@
@
@
@@
@
@
@
@
@
@
@@
@
@
@
@
@
@
@@
`
@@ -0,0 +1,16 @@
import { IntrinsicElements } from "../intrinsic-elements.js";
import { PropsWithChildren } from "../types.js";
import { FC } from "../base.js";
//#region src/jsx/intrinsic-element/components.d.ts
export declare const title: FC<PropsWithChildren>;
export declare const script: FC<PropsWithChildren<IntrinsicElements['script']>>;
export declare const style: FC<PropsWithChildren<IntrinsicElements['style']>>;
export declare const link: FC<PropsWithChildren<IntrinsicElements['link']>>;
export declare const meta: FC<PropsWithChildren>;
export declare const form: FC<PropsWithChildren<{
action?: Function | string;
method?: 'get' | 'post';
}>>;
export declare const input: (props: PropsWithChildren) => unknown;
export declare const button: (props: PropsWithChildren) => unknown;
//#endregion
@@ -0,0 +1 @@
{"version":3,"file":"MeasureLayout.mjs","sources":["../../../../../src/motion/features/layout/MeasureLayout.tsx"],"sourcesContent":["\"use client\"\n\nimport { frame, microtask, globalProjectionState, type VisualElement } from \"motion-dom\"\nimport { Component, useContext } from \"react\"\nimport { usePresence } from \"../../../components/AnimatePresence/use-presence\"\nimport {\n LayoutGroupContext,\n LayoutGroupContextProps,\n} from \"../../../context/LayoutGroupContext\"\nimport { SwitchLayoutGroupContext } from \"../../../context/SwitchLayoutGroupContext\"\nimport { MotionProps } from \"../../types\"\n\ninterface MeasureContextProps {\n layoutGroup: LayoutGroupContextProps\n switchLayoutGroup?: SwitchLayoutGroupContext\n isPresent: boolean\n safeToRemove?: VoidFunction | null\n}\n\ntype MeasureProps = MotionProps &\n MeasureContextProps & { visualElement: VisualElement }\n\n/**\n * Track whether we've taken any snapshots yet. If not,\n * we can safely skip notification of didUpdate.\n *\n * Difficult to capture in a test but to prevent flickering\n * we must set this to true either on update or unmount.\n * Running `next-env/layout-id` in Safari will show this behaviour if broken.\n */\nlet hasTakenAnySnapshot = false\n\nclass MeasureLayoutWithContext extends Component<MeasureProps> {\n /**\n * This only mounts projection nodes for components that\n * need measuring, we might want to do it for all components\n * in order to incorporate transforms\n */\n componentDidMount() {\n const { visualElement, layoutGroup, switchLayoutGroup, layoutId } =\n this.props\n const { projection } = visualElement\n\n if (projection) {\n if (layoutGroup.group) layoutGroup.group.add(projection)\n\n if (switchLayoutGroup && switchLayoutGroup.register && layoutId) {\n switchLayoutGroup.register(projection)\n }\n\n if (hasTakenAnySnapshot) {\n projection.root!.didUpdate()\n }\n\n projection.addEventListener(\"animationComplete\", () => {\n this.safeToRemove()\n })\n projection.setOptions({\n ...projection.options,\n layoutDependency: this.props.layoutDependency,\n onExitComplete: () => this.safeToRemove(),\n })\n }\n\n globalProjectionState.hasEverUpdated = true\n }\n\n getSnapshotBeforeUpdate(prevProps: MeasureProps) {\n const { layoutDependency, visualElement, drag, isPresent } = this.props\n const { projection } = visualElement\n\n if (!projection) return null\n\n /**\n * TODO: We use this data in relegate to determine whether to\n * promote a previous element. There's no guarantee its presence data\n * will have updated by this point - if a bug like this arises it will\n * have to be that we markForRelegation and then find a new lead some other way,\n * perhaps in didUpdate\n */\n projection.isPresent = isPresent\n\n if (prevProps.layoutDependency !== layoutDependency) {\n projection.setOptions({\n ...projection.options,\n layoutDependency,\n })\n }\n\n hasTakenAnySnapshot = true\n\n if (\n drag ||\n prevProps.layoutDependency !== layoutDependency ||\n layoutDependency === undefined ||\n prevProps.isPresent !== isPresent\n ) {\n projection.willUpdate()\n } else {\n this.safeToRemove()\n }\n\n if (prevProps.isPresent !== isPresent) {\n if (isPresent) {\n projection.promote()\n } else if (!projection.relegate()) {\n /**\n * If there's another stack member taking over from this one,\n * it's in charge of the exit animation and therefore should\n * be in charge of the safe to remove. Otherwise we call it here.\n */\n frame.postRender(() => {\n const stack = projection.getStack()\n if (!stack || !stack.members.length) {\n this.safeToRemove()\n }\n })\n }\n }\n\n return null\n }\n\n componentDidUpdate() {\n const { visualElement, layoutAnchor } = this.props\n const { projection } = visualElement\n if (projection) {\n projection.options.layoutAnchor = layoutAnchor\n\n projection.root!.didUpdate()\n\n microtask.postRender(() => {\n if (!projection.currentAnimation && projection.isLead()) {\n this.safeToRemove()\n }\n })\n }\n }\n\n componentWillUnmount() {\n const {\n visualElement,\n layoutGrLine truncated
@@ -0,0 +1 @@
export { _lt as lt, _lte as lte, _gt as gt, _gte as gte, _positive as positive, _negative as negative, _nonpositive as nonpositive, _nonnegative as nonnegative, _multipleOf as multipleOf, _maxSize as maxSize, _minSize as minSize, _size as size, _maxLength as maxLength, _minLength as minLength, _length as length, _regex as regex, _lowercase as lowercase, _uppercase as uppercase, _includes as includes, _startsWith as startsWith, _endsWith as endsWith, _property as property, _properties as properties, _mime as mime, _overwrite as overwrite, _normalize as normalize, _trim as trim, _toLowerCase as toLowerCase, _toUpperCase as toUpperCase, _slugify as slugify, type $RefinementCtx as RefinementCtx, } from "../core/index.cjs";
@@ -0,0 +1,48 @@
/**
* Unmemoized version of {@link useRefToCallback}
* @see {@link useRefToCallback}
* @param ref
*/
export function refToCallback(ref) {
return (newValue) => {
if (typeof ref === 'function') {
ref(newValue);
}
else if (ref) {
ref.current = newValue;
}
};
}
const nullCallback = () => null;
// lets maintain a weak ref to, well, ref :)
// not using `kashe` to keep this package small
const weakMem = new WeakMap();
const weakMemoize = (ref) => {
const usedRef = ref || nullCallback;
const storedRef = weakMem.get(usedRef);
if (storedRef) {
return storedRef;
}
const cb = refToCallback(usedRef);
weakMem.set(usedRef, cb);
return cb;
};
/**
* Transforms a given `ref` into `callback`.
*
* To transform `callback` into ref use {@link useCallbackRef|useCallbackRef(undefined, callback)}
*
* @param {ReactRef} ref
* @returns {Function}
*
* @see https://github.com/theKashey/use-callback-ref#reftocallback
*
* @example
* const ref = useRef(0);
* const setRef = useRefToCallback(ref);
* 👉 setRef(10);
* ✅ ref.current === 10
*/
export function useRefToCallback(ref) {
return weakMemoize(ref);
}
@@ -0,0 +1,262 @@
/**
* @fileoverview Rule to flag the use of redundant constructors in classes.
* @author Alberto Rodríguez
*/
"use strict";
const astUtils = require("./utils/ast-utils");
//------------------------------------------------------------------------------
// Helpers
//------------------------------------------------------------------------------
/**
* Checks whether any of a method's parameters have a decorator or are a parameter property.
* @param {ASTNode} node A method definition node.
* @returns {boolean} `true` if any parameter had a decorator or is a parameter property.
*/
function hasDecoratorsOrParameterProperty(node) {
return node.value.params.some(
param =>
param.decorators?.length || param.type === "TSParameterProperty",
);
}
/**
* Checks whether a node's accessibility makes it not useless.
* @param {ASTNode} node A method definition node.
* @returns {boolean} `true` if the node has a useful accessibility.
*/
function hasUsefulAccessibility(node) {
switch (node.accessibility) {
case "protected":
case "private":
return true;
case "public":
return !!node.parent.parent.superClass;
default:
return false;
}
}
/**
* Checks whether a given array of statements is a single call of `super`.
* @param {ASTNode[]} body An array of statements to check.
* @returns {boolean} `true` if the body is a single call of `super`.
*/
function isSingleSuperCall(body) {
return (
body.length === 1 &&
body[0].type === "ExpressionStatement" &&
body[0].expression.type === "CallExpression" &&
body[0].expression.callee.type === "Super"
);
}
/**
* Checks whether a given node is a pattern which doesn't have any side effects.
* Default parameters and Destructuring parameters can have side effects.
* @param {ASTNode} node A pattern node.
* @returns {boolean} `true` if the node doesn't have any side effects.
*/
function isSimple(node) {
return node.type === "Identifier" || node.type === "RestElement";
}
/**
* Checks whether a given array of expressions is `...arguments` or not.
* `super(...arguments)` passes all arguments through.
* @param {ASTNode[]} superArgs An array of expressions to check.
* @returns {boolean} `true` if the superArgs is `...arguments`.
*/
function isSpreadArguments(superArgs) {
return (
superArgs.length === 1 &&
superArgs[0].type === "SpreadElement" &&
superArgs[0].argument.type === "Identifier" &&
superArgs[0].argument.name === "arguments"
);
}
/**
* Checks whether given 2 nodes are identifiers which have the same name or not.
* @param {ASTNode} ctorParam A node to check.
* @param {ASTNode} superArg A node to check.
* @returns {boolean} `true` if the nodes are identifiers which have the same
* name.
*/
function isValidIdentifierPair(ctorParam, superArg) {
return (
ctorParam.type === "Identifier" &&
superArg.type === "Identifier" &&
ctorParam.name === superArg.name
);
}
/**
* Checks whether given 2 nodes are a rest/spread pair which has the same values.
* @param {ASTNode} ctorParam A node to check.
* @param {ASTNode} superArg A node to check.
* @returns {boolean} `true` if the nodes are a rest/spread pair which has the
* same values.
*/
function isValidRestSpreadPair(ctorParam, superArg) {
return (
ctorParam.type === "RestElement" &&
superArg.type === "SpreadElement" &&
isValidIdentifierPair(ctorParam.argument, superArg.argument)
);
}
/**
* Checks whether given 2 nodes have the same value or not.
* @param {ASTNode} ctorParam A node to check.
* @param {ASTNode} superArg A node to check.
* @returns {boolean} `true` if the nodes have the same value or not.
*/
function isValidPair(ctorParam, superArg) {
return (
isValidIdentifierPair(ctorParam, superArg) ||
isValidRestSpreadPair(ctorParam, superArg)
);
}
/**
* Checks whether the parameters of a constructor and the arguments of `super()`
* have the same values or not.
* @param {ASTNode} ctorParams The parameters of a constructor to check.
* @param {ASTNode} superArgs The arguments of `super()` to check.
* @returns {boolean} `true` if those have the same values.
*/
function isPassingThrough(ctorParams, superArgs) {
if (ctorParams.length !== superArgs.length) {
return false;
}
for (let i = 0; i < ctorParams.length; ++i) {
if (!isValidPair(ctorParams[i], superArgs[i])) {
return false;
}
}
return true;
}
/**
* Checks whether the constructor body is a redundant super call.
* @param {Array} body constructor body content.
* @param {Array} ctorParams The params to check against super call.
* @returns {boolean} true if the constructor body is redundant
*/
function isRedundantSuperCall(body, ctorParams) {
return (
isSingleSuperCall(body) &&
ctorParams.every(isSimple) &&
(isSpreadArguments(body[0].expression.arguments) ||
isPassingThrough(ctorParams, body[0].expression.arguments))
);
}
//------------------------------------------------------------------------------
// Rule Definition
//------------------------------------------------------------------------------
/** @type {import('../types').Rule.RuleModule} */
module.exports = {
meta: {
dialects: ["javascript", "typescript"],
language: "javascript",
type: "suggestion",
docs: {
description: "Disallow unnecessary constructors",
recommended: false,
url: "https://eslint.org/docs/latest/rules/no-useless-constructor",
},
hasSuggestions: true,
schema: [],
messages: {
noUselessConstructor: "Useless constructor.",
removeConstructor: "Remove the constructor.",
},
},
create(context) {
const { sourceCode } = context;
/**
* Checks whether a node is a redundant constructor
* @param {ASTNode} node node to check
* @returns {void}
*/
function checkForConstructor(node) {
if (
node.kind !== "constructor" ||
node.value.type !== "FunctionExpression" ||
hasDecoratorsOrParameterProperty(node) ||
hasUsefulAccessibility(node)
) {
return;
}
/*
* Prevent crashing on parsers which do not require class constructor
* to have a body, e.g. typescript and flow
*/
if (!node.value.body) {
return;
}
const body = node.value.body.body;
const ctorParams = node.value.params;
const superClass = node.parent.parent.superClass;
const parenToken = sourceCode.getFirstToken(
node,
astUtils.isOpeningParenToken,
);
const loc = {
start: node.loc.start,
end: sourceCode.getTokenBefore(parenToken).loc.end,
};
if (
superClass
? isRedundantSuperCall(body, ctorParams)
: body.length === 0
) {
context.report({
loc,
messageId: "noUselessConstructor",
suggest: [
{
messageId: "removeConstructor",
*fix(fixer) {
const nextToken =
sourceCode.getTokenAfter(node);
const addSemiColon =
nextToken.type === "Punctuator" &&
nextToken.value === "[" &&
astUtils.needsPrecedingSemicolon(
sourceCode,
node,
);
yield fixer.replaceText(
node,
addSemiColon ? ";" : "",
);
},
},
],
});
}
}
return {
MethodDefinition: checkForConstructor,
};
},
};
@@ -0,0 +1,721 @@
export default `flf2a$ 7 7 13 0 5 0 64 0
Font Author: ?
Font based on TheDraw's "THE_EDGE.TDF"
FIGFont created with: http://patorjk.com/figfont-editor
$ $@
$ $@
$ $@
$ $@
$ $@
$ $@
$ $@@
▄$@
█$ @
█$ @
█$ @
@
▀$ @
@@
@
@
@
@
@
@
@@
@
@
@
@
@
@
@@
@
@
@
@
@
@
@@
@
@
@
@
@
@
@@
@
@
@
@
@
@
@@
@
@
@
@
@
@
@@
@
@
@
@
@
@
@@
@
@
@
@
@
@
@@
@
@
@
@
@
@
@@
@
@
@
@
@
@
@@
@
@
@
@
@
@
@@
@
@
@
@
@
@
@@
@
@
@
@
██$@
@
@@
@
@
@
@
@
@
@@
@
@
@
@
@
@
@@
@
@
@
@
@
@
@@
@
@
@
@
@
@
@@
@
@
@
@
@
@
@@
@
@
@
@
@
@
@@
@
@
@
@
@
@
@@
@
@
@
@
@
@
@@
@
@
@
@
@
@
@@
@
@
@
@
@
@
@@
@
@
@
@
@
@
@@
@
@
@
@
@
@
@@
@
@
@
@
@
@
@@
@
@
@
@
@
@
@@
@
@
@
@
@
@
@@
@
@
@
@
@
@
@@
@
@
@
@
@
@
@@
@
@
@
@
@
@
@@
██$ @
█ █$ @
█▄▄█$@
█ █$@
█$@
█$ @
▀$ @@
███$ @
█ █$ @
█ ▀ ▄$@
█ ▄▀$@
███$ @
@
@@
▄█▄$ @
█▀ ▀▄$ @
█ ▀$ @
█▄ ▄▀$@
▀███▀$ @
@
@@
██▄$ @
█ █$ @
█ █$@
█ █$ @
███▀$ @
@
@@
▄███▄$ @
█▀ ▀$ @
██▄▄ @
█▄ ▄▀$@
▀███▀$ @
@
@@
▄████$ @
█▀ ▀$@
█▀▀ @
█ @
█ @
▀ @
@@
▄▀$ @
▄▀ @
█ ▀▄$ @
█ █$@
███$ @
@
@@
▄ █$@
█ █$@
██▀▀█$@
█ █$@
█$ @
▀$ @
@@
▄█$@
██$@
██$@
▐█$@
▐$@
@
@@
▄▄▄▄▄$@
▄▀ █$ @
█$ @
▄ █$ @
▀$ @
@
@@
█ █▀$@
█▄█$ @
█▀▄$ @
█ █$ @
█$ @
▀$ @
@@
█$ @
█$ @
█$ @
███▄$ @
▀$@
@
@@
█▀▄▀█$@
█ █ █$@
█ ▄ █$@
█ █$@
█$ @
▀$ @
@@
▄$ @
█$ @
██ █$@
█ █ █$@
█ █ █$@
█ ██$@
@@
████▄$@
█ █$@
█ █$@
▀████$@
@
@
@@
█ ▄▄$ @
█ █$@
█▀▀▀$ @
█$ @
█$ @
▀$ @
@@
▄▄ █$ @
█ █$ @
▀▀▀█$ @
█$ @
█$ @
▀$@
@@
█▄▄▄▄$@
█ ▄▀$@
█▀▀▌$ @
█ █$ @
█$ @
▀$ @
@@
▄▄▄▄▄$ @
█ ▀▄$@
▄ ▀▀▀▀▄$ @
▀▄▄▄▄▀$ @
@
@
@@
▄▄▄▄▀$@
▀▀▀ █$ @
█$ @
█$ @
▀$ @
@
@@
▄$ @
█$ @
█ █$@
█ █$@
█▄ ▄█$@
▀▀▀$ @
@@
▄$ @
█$ @
█ █$@
█ █$@
█ █$ @
█▐$ @
▐$ @@
▄ ▄$ @
█ █$ @
█ ▄ █$@
█ █ █$@
█ █ █$ @
▀ ▀$ @
@@
▄$ @
▀▄ █$@
█ ▀$ @
▄ █$ @
█ ▀▄$@
▀ @
@@
▀▄ ▄$@
█ █$ @
▀█$ @
█$ @
▄▀$ @
@
@@
▄▄▄▄▄▄$ @
▀ ▄▄▀$ @
▄▀▀ ▄▀$@
▀▀▀▀▀▀$ @
@
@
@@
@
@
@
@
@
@
@@
@
@
@
@
@
@
@@
@
@
@
@
@
@
@@
@
@
@
@
@
@
@@
@
@
@
@
@
@
@@
@
@
@
@
@
@
@@
██$ @
█ █$ @
█▄▄█$@
█ █$@
█$@
█$ @
▀$ @@
███$ @
█ █$ @
█ ▀ ▄$@
█ ▄▀$@
███$ @
@
@@
▄█▄$ @
█▀ ▀▄$ @
█ ▀$ @
█▄ ▄▀$@
▀███▀$ @
@
@@
██▄$ @
█ █$ @
█ █$@
█ █$ @
███▀$ @
@
@@
▄███▄$ @
█▀ ▀$ @
██▄▄ @
█▄ ▄▀$@
▀███▀$ @
@
@@
▄████$ @
█▀ ▀$@
█▀▀ @
█ @
█ @
▀ @
@@
▄▀$ @
▄▀ @
█ ▀▄$ @
█ █$@
███$ @
@
@@
▄ █$@
█ █$@
██▀▀█$@
█ █$@
█$ @
▀$ @
@@
▄█$@
██$@
██$@
▐█$@
▐$@
@
@@
▄▄▄▄▄$@
▄▀ █$ @
█$ @
▄ █$ @
▀$ @
@
@@
█ █▀$@
█▄█$ @
█▀▄$ @
█ █$ @
█$ @
▀$ @
@@
█$ @
█$ @
█$ @
███▄$ @
▀$@
@
@@
█▀▄▀█$@
█ █ █$@
█ ▄ █$@
█ █$@
█$ @
▀$ @
@@
▄$ @
█$ @
██ █$@
█ █ █$@
█ █ █$@
█ ██$@
@@
████▄$@
█ █$@
█ █$@
▀████$@
@
@
@@
█ ▄▄$ @
█ █$@
█▀▀▀$ @
█$ @
█$ @
▀$ @
@@
▄▄ █$ @
█ █$ @
▀▀▀█$ @
█$ @
█$ @
▀$@
@@
█▄▄▄▄$@
█ ▄▀$@
█▀▀▌$ @
█ █$ @
█$ @
▀$ @
@@
▄▄▄▄▄$ @
█ ▀▄$@
▄ ▀▀▀▀▄$ @
▀▄▄▄▄▀$ @
@
@
@@
▄▄▄▄▀$@
▀▀▀ █$ @
█$ @
█$ @
▀$ @
@
@@
▄$ @
█$ @
█ █$@
█ █$@
█▄ ▄█$@
▀▀▀$ @
@@
▄$ @
█$ @
█ █$@
█ █$@
█ █$ @
█▐$ @
▐$ @@
▄ ▄$ @
█ █$ @
█ ▄ █$@
█ █ █$@
█ █ █$ @
▀ ▀$ @
@@
▄$ @
▀▄ █$@
█ ▀$ @
▄ █$ @
█ ▀▄$@
▀ @
@@
▀▄ ▄$@
█ █$ @
▀█$ @
█$ @
▄▀$ @
@
@@
▄▄▄▄▄▄$ @
▀ ▄▄▀$ @
▄▀▀ ▄▀$@
▀▀▀▀▀▀$ @
@
@
@@
@
@
@
@
@
@
@@
@
@
@
@
@
@
@@
@
@
@
@
@
@
@@
@
@
@
@
@
@
@@
@
@
@
@
@
@
@@
@
@
@
@
@
@
@@
@
@
@
@
@
@
@@
@
@
@
@
@
@
@@
@
@
@
@
@
@
@@
@
@
@
@
@
@
@@
@
@
@
@
@
@
@@
`
@@ -0,0 +1,460 @@
/******************************************************************************
Copyright (c) Microsoft Corporation.
Permission to use, copy, modify, and/or distribute this software for any
purpose with or without fee is hereby granted.
THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES WITH
REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY
AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT,
INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM
LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR
OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
PERFORMANCE OF THIS SOFTWARE.
***************************************************************************** */
/**
* Used to shim class extends.
*
* @param d The derived class.
* @param b The base class.
*/
export declare function __extends(d: Function, b: Function): void;
/**
* Copy the values of all of the enumerable own properties from one or more source objects to a
* target object. Returns the target object.
*
* @param t The target object to copy to.
* @param sources One or more source objects from which to copy properties
*/
export declare function __assign(t: any, ...sources: any[]): any;
/**
* Performs a rest spread on an object.
*
* @param t The source value.
* @param propertyNames The property names excluded from the rest spread.
*/
export declare function __rest(t: any, propertyNames: (string | symbol)[]): any;
/**
* Applies decorators to a target object
*
* @param decorators The set of decorators to apply.
* @param target The target object.
* @param key If specified, the own property to apply the decorators to.
* @param desc The property descriptor, defaults to fetching the descriptor from the target object.
* @experimental
*/
export declare function __decorate(decorators: Function[], target: any, key?: string | symbol, desc?: any): any;
/**
* Creates an observing function decorator from a parameter decorator.
*
* @param paramIndex The parameter index to apply the decorator to.
* @param decorator The parameter decorator to apply. Note that the return value is ignored.
* @experimental
*/
export declare function __param(paramIndex: number, decorator: Function): Function;
/**
* Applies decorators to a class or class member, following the native ECMAScript decorator specification.
* @param ctor For non-field class members, the class constructor. Otherwise, `null`.
* @param descriptorIn The `PropertyDescriptor` to use when unable to look up the property from `ctor`.
* @param decorators The decorators to apply
* @param contextIn The `DecoratorContext` to clone for each decorator application.
* @param initializers An array of field initializer mutation functions into which new initializers are written.
* @param extraInitializers An array of extra initializer functions into which new initializers are written.
*/
export declare function __esDecorate(ctor: Function | null, descriptorIn: object | null, decorators: Function[], contextIn: object, initializers: Function[] | null, extraInitializers: Function[]): void;
/**
* Runs field initializers or extra initializers generated by `__esDecorate`.
* @param thisArg The `this` argument to use.
* @param initializers The array of initializers to evaluate.
* @param value The initial value to pass to the initializers.
*/
export declare function __runInitializers(thisArg: unknown, initializers: Function[], value?: any): any;
/**
* Converts a computed property name into a `string` or `symbol` value.
*/
export declare function __propKey(x: any): string | symbol;
/**
* Assigns the name of a function derived from the left-hand side of an assignment.
* @param f The function to rename.
* @param name The new name for the function.
* @param prefix A prefix (such as `"get"` or `"set"`) to insert before the name.
*/
export declare function __setFunctionName(f: Function, name: string | symbol, prefix?: string): Function;
/**
* Creates a decorator that sets metadata.
*
* @param metadataKey The metadata key
* @param metadataValue The metadata value
* @experimental
*/
export declare function __metadata(metadataKey: any, metadataValue: any): Function;
/**
* Converts a generator function into a pseudo-async function, by treating each `yield` as an `await`.
*
* @param thisArg The reference to use as the `this` value in the generator function
* @param _arguments The optional arguments array
* @param P The optional promise constructor argument, defaults to the `Promise` property of the global object.
* @param generator The generator function
*/
export declare function __awaiter(thisArg: any, _arguments: any, P: Function, generator: Function): any;
/**
* Creates an Iterator object using the body as the implementation.
*
* @param thisArg The reference to use as the `this` value in the function
* @param body The generator state-machine based implementation.
*
* @see [./docs/generator.md]
*/
export declare function __generator(thisArg: any, body: Function): any;
/**
* Creates bindings for all enumerable properties of `m` on `exports`
*
* @param m The source object
* @param o The `exports` object.
*/
export declare function __exportStar(m: any, o: any): void;
/**
* Creates a value iterator from an `Iterable` or `ArrayLike` object.
*
* @param o The object.
* @throws {TypeError} If `o` is neither `Iterable`, nor an `ArrayLike`.
*/
export declare function __values(o: any): any;
/**
* Reads values from an `Iterable` or `ArrayLike` object and returns the resulting array.
*
* @param o The object to read from.
* @param n The maximum number of arguments to read, defaults to `Infinity`.
*/
export declare function __read(o: any, n?: number): any[];
/**
* Creates an array from iterable spread.
*
* @param args The Iterable objects to spread.
* @deprecated since TypeScript 4.2 - Use `__spreadArray`
*/
export declare function __spread(...args: any[][]): any[];
/**
* Creates an array from array spread.
*
* @param args The ArrayLikes to spread into the resulting array.
* @deprecated since TypeScript 4.2 - Use `__spreadArray`
*/
export declare function __spreadArrays(...args: any[][]): any[];
/**
* Spreads the `from` array into the `to` array.
*
* @param pack Replace empty elements with `undefined`.
*/
export declare function __spreadArray(to: any[], from: any[], pack?: boolean): any[];
/**
* Creates an object that signals to `__asyncGenerator` that it shouldn't be yielded,
* and instead should be awaited and the resulting value passed back to the generator.
*
* @param v The value to await.
*/
export declare function __await(v: any): any;
/**
* Converts a generator function into an async generator function, by using `yield __await`
* in place of normal `await`.
*
* @param thisArg The reference to use as the `this` value in the generator function
* @param _arguments The optional arguments array
* @param generator The generator function
*/
export declare function __asyncGenerator(thisArg: any, _arguments: any, generator: Function): any;
/**
* Used to wrap a potentially async iterator in such a way so that it wraps the result
* of calling iterator methods of `o` in `__await` instances, and then yields the awaited values.
*
* @param o The potentially async iterator.
* @returns A synchronous iterator yielding `__await` instances on every odd invocation
* and returning the awaited `IteratorResult` passed to `next` every even invocation.
*/
export declare function __asyncDelegator(o: any): any;
/**
* Creates a value async iterator from an `AsyncIterable`, `Iterable` or `ArrayLike` object.
*
* @param o The object.
* @throws {TypeError} If `o` is neither `AsyncIterable`, `Iterable`, nor an `ArrayLike`.
*/
export declare function __asyncValues(o: any): any;
/**
* Creates a `TemplateStringsArray` frozen object from the `cooked` and `raw` arrays.
*
* @param cooked The cooked possibly-sparse array.
* @param raw The raw string content.
*/
export declare function __makeTemplateObject(cooked: string[], raw: string[]): TemplateStringsArray;
/**
* Used to shim default and named imports in ECMAScript Modules transpiled to CommonJS.
*
* ```js
* import Default, { Named, Other } from "mod";
* // or
* import { default as Default, Named, Other } from "mod";
* ```
*
* @param mod The CommonJS module exports object.
*/
export declare function __importStar<T>(mod: T): T;
/**
* Used to shim default imports in ECMAScript Modules transpiled to CommonJS.
*
* ```js
* import Default from "mod";
* ```
*
* @param mod The CommonJS module exports object.
*/
export declare function __importDefault<T>(mod: T): T | { default: T };
/**
* Emulates reading a private instance field.
*
* @param receiver The instance from which to read the private field.
* @param state A WeakMap containing the private field value for an instance.
* @param kind Either `"f"` for a field, `"a"` for an accessor, or `"m"` for a method.
*
* @throws {TypeError} If `state` doesn't have an entry for `receiver`.
*/
export declare function __classPrivateFieldGet<T extends object, V>(
receiver: T,
state: { has(o: T): boolean, get(o: T): V | undefined },
kind?: "f"
): V;
/**
* Emulates reading a private static field.
*
* @param receiver The object from which to read the private static field.
* @param state The class constructor containing the definition of the static field.
* @param kind Either `"f"` for a field, `"a"` for an accessor, or `"m"` for a method.
* @param f The descriptor that holds the static field value.
*
* @throws {TypeError} If `receiver` is not `state`.
*/
export declare function __classPrivateFieldGet<T extends new (...args: any[]) => unknown, V>(
receiver: T,
state: T,
kind: "f",
f: { value: V }
): V;
/**
* Emulates evaluating a private instance "get" accessor.
*
* @param receiver The instance on which to evaluate the private "get" accessor.
* @param state A WeakSet used to verify an instance supports the private "get" accessor.
* @param kind Either `"f"` for a field, `"a"` for an accessor, or `"m"` for a method.
* @param f The "get" accessor function to evaluate.
*
* @throws {TypeError} If `state` doesn't have an entry for `receiver`.
*/
export declare function __classPrivateFieldGet<T extends object, V>(
receiver: T,
state: { has(o: T): boolean },
kind: "a",
f: () => V
): V;
/**
* Emulates evaluating a private static "get" accessor.
*
* @param receiver The object on which to evaluate the private static "get" accessor.
* @param state The class constructor containing the definition of the static "get" accessor.
* @param kind Either `"f"` for a field, `"a"` for an accessor, or `"m"` for a method.
* @param f The "get" accessor function to evaluate.
*
* @throws {TypeError} If `receiver` is not `state`.
*/
export declare function __classPrivateFieldGet<T extends new (...args: any[]) => unknown, V>(
receiver: T,
state: T,
kind: "a",
f: () => V
): V;
/**
* Emulates reading a private instance method.
*
* @param receiver The instance from which to read a private method.
* @param state A WeakSet used to verify an instance supports the private method.
* @param kind Either `"f"` for a field, `"a"` for an accessor, or `"m"` for a method.
* @param f The function to return as the private instance method.
*
* @throws {TypeError} If `state` doesn't have an entry for `receiver`.
*/
export declare function __classPrivateFieldGet<T extends object, V extends (...args: any[]) => unknown>(
receiver: T,
state: { has(o: T): boolean },
kind: "m",
f: V
): V;
/**
* Emulates reading a private static method.
*
* @param receiver The object from which to read the private static method.
* @param state The class constructor containing the definition of the static method.
* @param kind Either `"f"` for a field, `"a"` for an accessor, or `"m"` for a method.
* @param f The function to return as the private static method.
*
* @throws {TypeError} If `receiver` is not `state`.
*/
export declare function __classPrivateFieldGet<T extends new (...args: any[]) => unknown, V extends (...args: any[]) => unknown>(
receiver: T,
state: T,
kind: "m",
f: V
): V;
/**
* Emulates writing to a private instance field.
*
* @param receiver The instance on which to set a private field value.
* @param state A WeakMap used to store the private field value for an instance.
* @param value The value to store in the private field.
* @param kind Either `"f"` for a field, `"a"` for an accessor, or `"m"` for a method.
*
* @throws {TypeError} If `state` doesn't have an entry for `receiver`.
*/
export declare function __classPrivateFieldSet<T extends object, V>(
receiver: T,
state: { has(o: T): boolean, set(o: T, value: V): unknown },
value: V,
kind?: "f"
): V;
/**
* Emulates writing to a private static field.
*
* @param receiver The object on which to set the private static field.
* @param state The class constructor containing the definition of the private static field.
* @param value The value to store in the private field.
* @param kind Either `"f"` for a field, `"a"` for an accessor, or `"m"` for a method.
* @param f The descriptor that holds the static field value.
*
* @throws {TypeError} If `receiver` is not `state`.
*/
export declare function __classPrivateFieldSet<T extends new (...args: any[]) => unknown, V>(
receiver: T,
state: T,
value: V,
kind: "f",
f: { value: V }
): V;
/**
* Emulates writing to a private instance "set" accessor.
*
* @param receiver The instance on which to evaluate the private instance "set" accessor.
* @param state A WeakSet used to verify an instance supports the private "set" accessor.
* @param value The value to store in the private accessor.
* @param kind Either `"f"` for a field, `"a"` for an accessor, or `"m"` for a method.
* @param f The "set" accessor function to evaluate.
*
* @throws {TypeError} If `state` doesn't have an entry for `receiver`.
*/
export declare function __classPrivateFieldSet<T extends object, V>(
receiver: T,
state: { has(o: T): boolean },
value: V,
kind: "a",
f: (v: V) => void
): V;
/**
* Emulates writing to a private static "set" accessor.
*
* @param receiver The object on which to evaluate the private static "set" accessor.
* @param state The class constructor containing the definition of the static "set" accessor.
* @param value The value to store in the private field.
* @param kind Either `"f"` for a field, `"a"` for an accessor, or `"m"` for a method.
* @param f The "set" accessor function to evaluate.
*
* @throws {TypeError} If `receiver` is not `state`.
*/
export declare function __classPrivateFieldSet<T extends new (...args: any[]) => unknown, V>(
receiver: T,
state: T,
value: V,
kind: "a",
f: (v: V) => void
): V;
/**
* Checks for the existence of a private field/method/accessor.
*
* @param state The class constructor containing the static member, or the WeakMap or WeakSet associated with a private instance member.
* @param receiver The object for which to test the presence of the private member.
*/
export declare function __classPrivateFieldIn(
state: (new (...args: any[]) => unknown) | { has(o: any): boolean },
receiver: unknown,
): boolean;
/**
* Creates a re-export binding on `object` with key `objectKey` that references `target[key]`.
*
* @param object The local `exports` object.
* @param target The object to re-export from.
* @param key The property key of `target` to re-export.
* @param objectKey The property key to re-export as. Defaults to `key`.
*/
export declare function __createBinding(object: object, target: object, key: PropertyKey, objectKey?: PropertyKey): void;
/**
* Adds a disposable resource to a resource-tracking environment object.
* @param env A resource-tracking environment object.
* @param value Either a Disposable or AsyncDisposable object, `null`, or `undefined`.
* @param async When `true`, `AsyncDisposable` resources can be added. When `false`, `AsyncDisposable` resources cannot be added.
* @returns The {@link value} argument.
*
* @throws {TypeError} If {@link value} is not an object, or if either `Symbol.dispose` or `Symbol.asyncDispose` are not
* defined, or if {@link value} does not have an appropriate `Symbol.dispose` or `Symbol.asyncDispose` method.
*/
export declare function __addDisposableResource<T>(env: { stack: { value?: unknown, dispose?: Function, async: boolean }[]; error: unknown; hasError: boolean; }, value: T, async: boolean): T;
/**
* Disposes all resources in a resource-tracking environment object.
* @param env A resource-tracking environment object.
* @returns A {@link Promise} if any resources in the environment were marked as `async` when added; otherwise, `void`.
*
* @throws {SuppressedError} if an error thrown during disposal would have suppressed a prior error from disposal or the
* error recorded in the resource-tracking environment object.
* @seealso {@link __addDisposableResource}
*/
export declare function __disposeResources(env: { stack: { value?: unknown, dispose?: Function, async: boolean }[]; error: unknown; hasError: boolean; }): any;
/**
* Transforms a relative import specifier ending in a non-declaration TypeScript file extension to its JavaScript file extension counterpart.
* @param path The import specifier.
* @param preserveJsx Causes '*.tsx' to transform to '*.jsx' instead of '*.js'. Should be true when `--jsx` is set to `preserve`.
*/
export declare function __rewriteRelativeImportExtension(path: string, preserveJsx?: boolean): string;
@@ -0,0 +1 @@
{"version":3,"file":"flask-conical-off.js","sources":["../../../src/icons/flask-conical-off.ts"],"sourcesContent":["import createLucideIcon from '../createLucideIcon';\n\n/**\n * @component @name FlaskConicalOff\n * @description Lucide SVG icon component, renders SVG Element with children.\n *\n * @preview ![img](data:image/svg+xml;base64,PHN2ZyAgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIgogIHdpZHRoPSIyNCIKICBoZWlnaHQ9IjI0IgogIHZpZXdCb3g9IjAgMCAyNCAyNCIKICBmaWxsPSJub25lIgogIHN0cm9rZT0iIzAwMCIgc3R5bGU9ImJhY2tncm91bmQtY29sb3I6ICNmZmY7IGJvcmRlci1yYWRpdXM6IDJweCIKICBzdHJva2Utd2lkdGg9IjIiCiAgc3Ryb2tlLWxpbmVjYXA9InJvdW5kIgogIHN0cm9rZS1saW5lam9pbj0icm91bmQiCj4KICA8cGF0aCBkPSJNMTAgMnYyLjM0MyIgLz4KICA8cGF0aCBkPSJNMTQgMnY2LjM0MyIgLz4KICA8cGF0aCBkPSJtMiAyIDIwIDIwIiAvPgogIDxwYXRoIGQ9Ik0yMCAyMGEyIDIgMCAwIDEtMiAySDZhMiAyIDAgMCAxLTEuNzU1LTIuOTZsNS4yMjctOS41NjMiIC8+CiAgPHBhdGggZD0iTTYuNDUzIDE1SDE1IiAvPgogIDxwYXRoIGQ9Ik04LjUgMmg3IiAvPgo8L3N2Zz4K) - https://lucide.dev/icons/flask-conical-off\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 FlaskConicalOff = createLucideIcon('FlaskConicalOff', [\n ['path', { d: 'M10 2v2.343', key: '15t272' }],\n ['path', { d: 'M14 2v6.343', key: 'sxr80q' }],\n ['path', { d: 'm2 2 20 20', key: '1ooewy' }],\n ['path', { d: 'M20 20a2 2 0 0 1-2 2H6a2 2 0 0 1-1.755-2.96l5.227-9.563', key: 'k0duyd' }],\n ['path', { d: 'M6.453 15H15', key: '1f0z33' }],\n ['path', { d: 'M8.5 2h7', key: 'csnxdl' }],\n]);\n\nexport default FlaskConicalOff;\n"],"names":[],"mappings":";;;;;;;;;AAaM,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAkB,iBAAiB,iBAAmB,CAAA,CAAA,CAAA;AAAA,CAAA,CAC1D,CAAC,CAAA,CAAA,CAAA,CAAA,CAAA,CAAQ,CAAA,CAAA,CAAA,CAAE,GAAG,CAAe,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAK,UAAU,CAAA,CAAA;AAAA,CAAA,CAC5C,CAAC,CAAA,CAAA,CAAA,CAAA,CAAA,CAAQ,CAAA,CAAA,CAAA,CAAE,GAAG,CAAe,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAK,UAAU,CAAA,CAAA;AAAA,CAAA,CAC5C,CAAC,CAAA,CAAA,CAAA,CAAA,CAAA,CAAQ,CAAA,CAAA,CAAA,CAAE,GAAG,CAAc,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,C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CAAC,yBAAyB,CAAC,MAAM,EAAE,YAAY,CAAC,QAAQ,CAAC,GAAG,IAAI;IAElF;;;;OAIG;IACH,SAAS,CAAC,QAAQ,CAAC,4BAA4B,CAAC,MAAM,EAAE,iBAAiB,CAAC,QAAQ,CAAC,GAAG,IAAI;IAE1F;;;;OAIG;IACH,SAAS,CAAC,QAAQ,CAAC,8BAA8B,CAAC,MAAM,EAAE,MAAM,GAAG,IAAI;IAEvE;;;;OAIG;IACH,SAAS,CAAC,QAAQ,CAAC,oBAAoB,CAAC,MAAM,EAAE,MAAM,GAAG,IAAI;IAE7D;;;;OAIG;IACH,SAAS,CAAC,QAAQ,CAAC,2BAA2B,CAAC,MAAM,EAAE,MAAM,GAAG,IAAI;IAEpE;;;;;;;;;;;;;;;;;;;;;;;;;;OA0BG;cACc,aAAa,CAAC,CAAC,SAAS,SAAS,EAC9C,OAAO,EAAE,YAAY,EACrB,YAAY,EAAE,CAAC,EACf,OAAO,CAAC,EAAE,cAAc,GACzB,cAAc,CAAC,eAAe,CAAC,YAAY,CAAC,CAAC,CAAC,CAAC,EAAE,IAAI,EAAE,IAAI,CAAC;IAiF/D;;;;OAIG;IACH,OAAO,CAAC,CAAC,SAAS,SAASLine truncated
@@ -0,0 +1,76 @@
import { MiddlewareHandler } from "../../types.js";
import { Context } from "../../context.js";
//#region src/middleware/csrf/index.d.ts
type IsAllowedOriginHandler = (origin: string, context: Context) => boolean | Promise<boolean>;
declare const secFetchSiteValues: readonly ["same-origin", "same-site", "none", "cross-site"];
type SecFetchSite = (typeof secFetchSiteValues)[number];
type IsAllowedSecFetchSiteHandler = (secFetchSite: SecFetchSite, context: Context) => boolean | Promise<boolean>;
interface CSRFOptions {
origin?: string | string[] | IsAllowedOriginHandler;
secFetchSite?: SecFetchSite | SecFetchSite[] | IsAllowedSecFetchSiteHandler;
}
/**
* CSRF Protection Middleware for Hono.
*
* Protects against Cross-Site Request Forgery attacks by validating request origins
* and sec-fetch-site headers. The request is allowed if either validation passes.
*
* @see {@link https://hono.dev/docs/middleware/builtin/csrf}
*
* @param {CSRFOptions} [options] - The options for the CSRF protection middleware.
* @param {string|string[]|(origin: string, context: Context) => boolean} [options.origin] -
* Allowed origins for requests.
* - string: Single allowed origin (e.g., 'https://example.com')
* - string[]: Multiple allowed origins
* - function: Custom validation logic
* - Default: Only same origin as the request URL
* @param {string|string[]|(secFetchSite: string, context: Context) => boolean} [options.secFetchSite] -
* Sec-Fetch-Site header validation. Standard values include 'same-origin', 'same-site', 'cross-site', 'none'.
* - string: Single allowed value (e.g., 'same-origin')
* - string[]: Multiple allowed values (e.g., ['same-origin', 'same-site'])
* - function: Custom validation with access to context
* - Default: Only allows 'same-origin'
* @returns {MiddlewareHandler} The middleware handler function.
*
* @example
* ```ts
* const app = new Hono()
*
* // Default: both origin and sec-fetch-site validation
* app.use('*', csrf())
*
* // Allow specific origins
* app.use('*', csrf({ origin: 'https://example.com' }))
* app.use('*', csrf({ origin: ['https://app.com', 'https://api.com'] }))
*
* // Allow specific sec-fetch-site values
* app.use('*', csrf({ secFetchSite: 'same-origin' }))
* app.use('*', csrf({ secFetchSite: ['same-origin', 'same-site'] }))
*
* // Dynamic sec-fetch-site validation
* app.use('*', csrf({
* secFetchSite: (secFetchSite, c) => {
* // Always allow same-origin
* if (secFetchSite === 'same-origin') return true
* // Allow cross-site for webhook endpoints
* if (secFetchSite === 'cross-site' && c.req.path.startsWith('/webhook/')) {
* return true
* }
* return false
* }
* }))
*
* // Dynamic origin validation
* app.use('*', csrf({
* origin: (origin, c) => {
* // Allow same origin
* if (origin === new URL(c.req.url).origin) return true
* // Allow specific trusted domains
* return ['https://app.example.com', 'https://admin.example.com'].includes(origin)
* }
* }))
* ```
*/
export declare const csrf: (options?: CSRFOptions) => MiddlewareHandler;
//#endregion
export {};
@@ -0,0 +1,21 @@
import type { AnyRouter } from './router'
/**
* @private
* Handles hash-based scrolling after navigation completes.
* To be used in framework-specific <Transitioner> components during the onResolved event.
*/
export function handleHashScroll(router: AnyRouter) {
if (typeof document !== 'undefined' && (document as any).querySelector) {
const location = router.stores.location.get()
const hashScrollIntoViewOptions =
location.state.__hashScrollIntoViewOptions ?? true
if (hashScrollIntoViewOptions && location.hash !== '') {
const el = document.getElementById(location.hash)
if (el) {
el.scrollIntoView(hashScrollIntoViewOptions)
}
}
}
}
@@ -0,0 +1 @@
{"version":3,"file":"layers-2.js","sources":["../../../src/icons/layers-2.ts"],"sourcesContent":["import createLucideIcon from '../createLucideIcon';\n\n/**\n * @component @name Layers2\n * @description Lucide SVG icon component, renders SVG Element with children.\n *\n * @preview ![img](data:image/svg+xml;base64,PHN2ZyAgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIgogIHdpZHRoPSIyNCIKICBoZWlnaHQ9IjI0IgogIHZpZXdCb3g9IjAgMCAyNCAyNCIKICBmaWxsPSJub25lIgogIHN0cm9rZT0iIzAwMCIgc3R5bGU9ImJhY2tncm91bmQtY29sb3I6ICNmZmY7IGJvcmRlci1yYWRpdXM6IDJweCIKICBzdHJva2Utd2lkdGg9IjIiCiAgc3Ryb2tlLWxpbmVjYXA9InJvdW5kIgogIHN0cm9rZS1saW5lam9pbj0icm91bmQiCj4KICA8cGF0aCBkPSJtMTYuMDIgMTIgNS40OCAzLjEzYTEgMSAwIDAgMSAwIDEuNzRMMTMgMjEuNzRhMiAyIDAgMCAxLTIgMGwtOC41LTQuODdhMSAxIDAgMCAxIDAtMS43NEw3Ljk4IDEyIiAvPgogIDxwYXRoIGQ9Ik0xMyAxMy43NGEyIDIgMCAwIDEtMiAwTDIuNSA4Ljg3YTEgMSAwIDAgMSAwLTEuNzRMMTEgMi4yNmEyIDIgMCAwIDEgMiAwbDguNSA0Ljg3YTEgMSAwIDAgMSAwIDEuNzRaIiAvPgo8L3N2Zz4K) - https://lucide.dev/icons/layers-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 Layers2 = createLucideIcon('Layers2', [\n [\n 'path',\n {\n d: 'm16.02 12 5.48 3.13a1 1 0 0 1 0 1.74L13 21.74a2 2 0 0 1-2 0l-8.5-4.87a1 1 0 0 1 0-1.74L7.98 12',\n key: '1cuww1',\n },\n ],\n [\n 'path',\n {\n d: 'M13 13.74a2 2 0 0 1-2 0L2.5 8.87a1 1 0 0 1 0-1.74L11 2.26a2 2 0 0 1 2 0l8.5 4.87a1 1 0 0 1 0 1.74Z',\n key: 'pdlvxu',\n },\n ],\n]);\n\nexport default Layers2;\n"],"names":[],"mappings":";;;;;;;;;AAaM,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAU,iBAAiB,SAAW,CAAA,CAAA,CAAA;AAAA,CAC1C,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,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,C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 @@
# `seroval-plugins`
> Plugins for `seroval`
[![NPM](https://img.shields.io/npm/v/seroval.svg)](https://www.npmjs.com/package/seroval) [![JavaScript Style Guide](https://badgen.net/badge/code%20style/airbnb/ff5a5f?icon=airbnb)](https://github.com/airbnb/javascript)
## Install
```bash
npm install --save seroval-plugins
```
```bash
yarn add seroval-plugins
```
```bash
pnpm add seroval-plugins
```
## Features
### `seroval-plugins/web`
- [`AbortSignal`](https://developer.mozilla.org/en-US/docs/Web/API/AbortSignal)
- [`Blob`](https://developer.mozilla.org/en-US/docs/Web/API/Blob)
- [`CustomEvent`](https://developer.mozilla.org/en-US/docs/Web/API/CustomEvent)
- [`DOMException`](https://developer.mozilla.org/en-US/docs/Web/API/DOMException)
- [`Event`](https://developer.mozilla.org/en-US/docs/Web/API/Event)
- [`File`](https://developer.mozilla.org/en-US/docs/Web/API/File)
- [`FormData`](https://developer.mozilla.org/en-US/docs/Web/API/FormData)
- [`ImageData`](https://developer.mozilla.org/en-US/docs/Web/API/ImageData)
- [`Headers`](https://developer.mozilla.org/en-US/docs/Web/API/Headers)
- [`ReadableStream`](https://developer.mozilla.org/en-US/docs/Web/API/ReadableStream)
- [`Request`](https://developer.mozilla.org/en-US/docs/Web/API/Request)
- [`Response`](https://developer.mozilla.org/en-US/docs/Web/API/Response)
- [`URLSearchParams`](https://developer.mozilla.org/en-US/docs/Web/API/URLSearchParams)
- [`URL`](https://developer.mozilla.org/en-US/docs/Web/API/URL)
## Sponsors
![Sponsors](https://github.com/lxsmnsyc/sponsors/blob/main/sponsors.svg?raw=true)
## License
MIT © [lxsmnsyc](https://github.com/lxsmnsyc)
@@ -0,0 +1,109 @@
Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
//#region src/utils/html.ts
/**
* @module
* HTML utility.
*/
const HtmlEscapedCallbackPhase = {
Stringify: 1,
BeforeStream: 2,
Stream: 3
};
const raw = (value, callbacks) => {
const escapedString = new String(value);
escapedString.isEscaped = true;
escapedString.callbacks = callbacks;
return escapedString;
};
const escapeRe = /[&<>'"]/;
const stringBufferToString = async (buffer, callbacks) => {
let str = "";
callbacks ||= [];
const resolvedBuffer = await Promise.all(buffer);
for (let i = resolvedBuffer.length - 1;; i--) {
str += resolvedBuffer[i];
i--;
if (i < 0) break;
let r = resolvedBuffer[i];
if (typeof r === "object") callbacks.push(...r.callbacks || []);
const isEscaped = r.isEscaped;
r = await (typeof r === "object" ? r.toString() : r);
if (typeof r === "object") callbacks.push(...r.callbacks || []);
if (r.isEscaped ?? isEscaped) str += r;
else {
const buf = [str];
escapeToBuffer(r, buf);
str = buf[0];
}
}
return raw(str, callbacks);
};
const escapeToBuffer = (str, buffer) => {
const match = str.search(escapeRe);
if (match === -1) {
buffer[0] += str;
return;
}
let escape;
let index;
let lastIndex = 0;
for (index = match; index < str.length; index++) {
switch (str.charCodeAt(index)) {
case 34:
escape = "&quot;";
break;
case 39:
escape = "&#39;";
break;
case 38:
escape = "&amp;";
break;
case 60:
escape = "&lt;";
break;
case 62:
escape = "&gt;";
break;
default: continue;
}
buffer[0] += str.substring(lastIndex, index) + escape;
lastIndex = index + 1;
}
buffer[0] += str.substring(lastIndex, index);
};
const resolveCallbackSync = (str) => {
const callbacks = str.callbacks;
if (!callbacks?.length) return str;
const buffer = [str];
const context = {};
callbacks.forEach((c) => c({
phase: HtmlEscapedCallbackPhase.Stringify,
buffer,
context
}));
return buffer[0];
};
const resolveCallback = async (str, phase, preserveCallbacks, context, buffer) => {
if (typeof str === "object" && !(str instanceof String)) {
if (!(str instanceof Promise)) str = str.toString();
if (str instanceof Promise) str = await str;
}
const callbacks = str.callbacks;
if (!callbacks?.length) return Promise.resolve(str);
if (buffer) buffer[0] += str;
else buffer = [str];
const resStr = Promise.all(callbacks.map((c) => c({
phase,
buffer,
context
}))).then((res) => Promise.all(res.filter(Boolean).map((str) => resolveCallback(str, phase, false, context, buffer))).then(() => buffer[0]));
if (preserveCallbacks) return raw(await resStr, callbacks);
else return resStr;
};
//#endregion
exports.HtmlEscapedCallbackPhase = HtmlEscapedCallbackPhase;
exports.escapeToBuffer = escapeToBuffer;
exports.raw = raw;
exports.resolveCallback = resolveCallback;
exports.resolveCallbackSync = resolveCallbackSync;
exports.stringBufferToString = stringBufferToString;
@@ -0,0 +1,98 @@
/**
* @fileoverview Types for object-schema package.
*/
/**
* Built-in validation strategies.
*/
export type BuiltInValidationStrategy =
| "array"
| "boolean"
| "number"
| "object"
| "object?"
| "string"
| "string!";
/**
* Built-in merge strategies.
*/
export type BuiltInMergeStrategy = "assign" | "overwrite" | "replace";
/**
* Custom merge strategy.
*/
// eslint-disable-next-line @typescript-eslint/no-explicit-any -- https://github.com/eslint/rewrite/pull/90#discussion_r1687206213
export type CustomMergeStrategy = (target: any, source: any) => any;
/**
* Custom validation strategy.
*/
// eslint-disable-next-line @typescript-eslint/no-explicit-any -- https://github.com/eslint/rewrite/pull/90#discussion_r1687206213
export type CustomValidationStrategy = (value: any) => void;
interface BasePropertyDefinition {
/**
* Indicates if the property is required.
*/
required?: boolean;
/**
* The other properties that must be present when this property is used.
*/
requires?: string[];
}
/**
* Property definition that specifies explicit merge and validation strategies.
* This form cannot include a `schema`.
*/
export interface PropertyDefinitionWithStrategies extends BasePropertyDefinition {
/**
* The schema for the object value of this property.
*/
schema?: never;
/**
* The strategy to merge the property.
*/
merge: BuiltInMergeStrategy | CustomMergeStrategy;
/**
* The strategy to validate the property.
*/
validate: BuiltInValidationStrategy | CustomValidationStrategy;
}
/**
* Property definition that uses a nested `schema`.
* When `schema` is present, merge and validation strategies are optional.
*/
export interface PropertyDefinitionWithSchema extends BasePropertyDefinition {
/**
* The schema for the object value of this property.
*/
schema: ObjectDefinition;
/**
* The strategy to merge the property.
*/
merge?: BuiltInMergeStrategy | CustomMergeStrategy;
/**
* The strategy to validate the property.
*/
validate?: BuiltInValidationStrategy | CustomValidationStrategy;
}
/**
* Property definition.
*/
export type PropertyDefinition =
| PropertyDefinitionWithStrategies
| PropertyDefinitionWithSchema;
/**
* Object definition.
*/
export type ObjectDefinition = Record<string, PropertyDefinition>;
@@ -0,0 +1 @@
{"version":3,"file":"hostHeaderValidation.js","sourceRoot":"","sources":["../../../../src/server/middleware/hostHeaderValidation.ts"],"names":[],"mappings":"AAEA;;;;;;;;;;;;;;;;;;GAkBG;AACH,MAAM,UAAU,oBAAoB,CAAC,gBAA0B;IAC3D,OAAO,CAAC,GAAY,EAAE,GAAa,EAAE,IAAkB,EAAE,EAAE;QACvD,MAAM,UAAU,GAAG,GAAG,CAAC,OAAO,CAAC,IAAI,CAAC;QACpC,IAAI,CAAC,UAAU,EAAE,CAAC;YACd,GAAG,CAAC,MAAM,CAAC,GAAG,CAAC,CAAC,IAAI,CAAC;gBACjB,OAAO,EAAE,KAAK;gBACd,KAAK,EAAE;oBACH,IAAI,EAAE,CAAC,KAAK;oBACZ,OAAO,EAAE,qBAAqB;iBACjC;gBACD,EAAE,EAAE,IAAI;aACX,CAAC,CAAC;YACH,OAAO;QACX,CAAC;QAED,4EAA4E;QAC5E,IAAI,QAAgB,CAAC;QACrB,IAAI,CAAC;YACD,QAAQ,GAAG,IAAI,GAAG,CAAC,UAAU,UAAU,EAAE,CAAC,CAAC,QAAQ,CAAC;QACxD,CAAC;QAAC,MAAM,CAAC;YACL,GAAG,CAAC,MAAM,CAAC,GAAG,CAAC,CAAC,IAAI,CAAC;gBACjB,OAAO,EAAE,KAAK;gBACd,KAAK,EAAE;oBACH,IAAI,EAAE,CAAC,KAAK;oBACZ,OAAO,EAAE,wBAAwB,UAAU,EAAE;iBAChD;gBACD,EAAE,EAAE,IAAI;aACX,CAAC,CAAC;YACH,OAAO;QACX,CAAC;QAED,IAAI,CAAC,gBAAgB,CAAC,QAAQ,CAAC,QAAQ,CAAC,EAAE,CAAC;YACvC,GAAG,CAAC,MAAM,CAAC,GAAG,CAAC,CAAC,IAAI,CAAC;gBACjB,OAAO,EAAE,KAAK;gBACd,KAAK,EAAE;oBACH,IAAI,EAAE,CAAC,KAAK;oBACZ,OAAO,EAAE,iBAAiB,QAAQ,EAAE;iBACvC;gBACD,EAAE,EAAE,IAAI;aACX,CAAC,CAAC;YACH,OAAO;QACX,CAAC;QACD,IAAI,EAAE,CAAC;IACX,CAAC,CAAC;AACN,CAAC;AAED;;;;;;;;GAQG;AACH,MAAM,UAAU,uBAAuB;IACnC,OAAO,oBAAoB,CAAC,CAAC,WAAW,EAAE,WAAW,EAAE,OAAO,CAAC,CAAC,CAAC;AACrE,CAAC"}
@@ -0,0 +1,42 @@
import { px } from '../../value/types/numbers/units.mjs';
function pixelsToPercent(pixels, axis) {
if (axis.max === axis.min)
return 0;
return (pixels / (axis.max - axis.min)) * 100;
}
/**
* We always correct borderRadius as a percentage rather than pixels to reduce paints.
* For example, if you are projecting a box that is 100px wide with a 10px borderRadius
* into a box that is 200px wide with a 20px borderRadius, that is actually a 10%
* borderRadius in both states. If we animate between the two in pixels that will trigger
* a paint each time. If we animate between the two in percentage we'll avoid a paint.
*/
const correctBorderRadius = {
correct: (latest, node) => {
if (!node.target)
return latest;
/**
* If latest is a string, if it's a percentage we can return immediately as it's
* going to be stretched appropriately. Otherwise, if it's a pixel, convert it to a number.
*/
if (typeof latest === "string") {
if (px.test(latest)) {
latest = parseFloat(latest);
}
else {
return latest;
}
}
/**
* If latest is a number, it's a pixel value. We use the current viewportBox to calculate that
* pixel value as a percentage of each axis
*/
const x = pixelsToPercent(latest, node.target.x);
const y = pixelsToPercent(latest, node.target.y);
return `${x}% ${y}%`;
},
};
export { correctBorderRadius, pixelsToPercent };
//# sourceMappingURL=scale-border-radius.mjs.map
@@ -0,0 +1 @@
{"version":3,"names":["_getPrototypeOf","require","_isNativeReflectConstruct","_possibleConstructorReturn","_createSuper","Derived","hasNativeReflectConstruct","isNativeReflectConstruct","_createSuperInternal","Super","getPrototypeOf","result","NewTarget","constructor","Reflect","construct","arguments","apply","possibleConstructorReturn"],"sources":["../../src/helpers/createSuper.js"],"sourcesContent":["/* @minVersion 7.9.0 */\n\nimport getPrototypeOf from \"getPrototypeOf\";\nimport isNativeReflectConstruct from \"isNativeReflectConstruct\";\nimport possibleConstructorReturn from \"possibleConstructorReturn\";\n\nexport default function _createSuper(Derived) {\n var hasNativeReflectConstruct = isNativeReflectConstruct();\n\n return function _createSuperInternal() {\n var Super = getPrototypeOf(Derived),\n result;\n if (hasNativeReflectConstruct) {\n // NOTE: This doesn't work if this.__proto__.constructor has been modified.\n var NewTarget = getPrototypeOf(this).constructor;\n result = Reflect.construct(Super, arguments, NewTarget);\n } else {\n result = Super.apply(this, arguments);\n }\n return possibleConstructorReturn(this, result);\n };\n}\n"],"mappings":";;;;;;AAEA,IAAAA,eAAA,GAAAC,OAAA;AACA,IAAAC,yBAAA,GAAAD,OAAA;AACA,IAAAE,0BAAA,GAAAF,OAAA;AAEe,SAASG,YAAYA,CAACC,OAAO,EAAE;EAC5C,IAAIC,yBAAyB,GAAGC,yBAAwB,CAAC,CAAC;EAE1D,OAAO,SAASC,oBAAoBA,CAAA,EAAG;IACrC,IAAIC,KAAK,GAAGC,eAAc,CAACL,OAAO,CAAC;MACjCM,MAAM;IACR,IAAIL,yBAAyB,EAAE;MAE7B,IAAIM,SAAS,GAAGF,eAAc,CAAC,IAAI,CAAC,CAACG,WAAW;MAChDF,MAAM,GAAGG,OAAO,CAACC,SAAS,CAACN,KAAK,EAAEO,SAAS,EAAEJ,SAAS,CAAC;IACzD,CAAC,MAAM;MACLD,MAAM,GAAGF,KAAK,CAACQ,KAAK,CAAC,IAAI,EAAED,SAAS,CAAC;IACvC;IACA,OAAOE,0BAAyB,CAAC,IAAI,EAAEP,MAAM,CAAC;EAChD,CAAC;AACH","ignoreList":[]}
@@ -0,0 +1 @@
module.exports={A:{A:{"1":"_A","260":"_Z"},B:{"1":"_J"},C:{"1":"_jQ _XC","132":"B","260":"_PS","516":"_6H"},D:{"1":"_H _GC","132":"_Y _nE"},E:{"1":"_VI","132":"_5C"},F:{"1":"_1K _eF","16":"_mB","132":"_6 _gF _EN"},G:{"1":"_9B","132":"_EB"},H:{"132":"1D"},I:{"1":"_X","132":"_W"},J:{"132":"_B"},K:{"1":"H","16":"A","132":"_bD"},L:{"1":"I"},M:{"1":"YC"},N:{"1":"_A"},O:{"1":"bC"},P:{"1":"_F"},Q:{"1":"JE"},R:{"1":"KE"},S:{"1":"_C"}},B:4,C:"DOM Parsing and Serialization",D:true};
@@ -0,0 +1,165 @@
"use strict";
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
if (k2 === undefined) k2 = k;
var desc = Object.getOwnPropertyDescriptor(m, k);
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
desc = { enumerable: true, get: function() { return m[k]; } };
}
Object.defineProperty(o, k2, desc);
}) : (function(o, m, k, k2) {
if (k2 === undefined) k2 = k;
o[k2] = m[k];
}));
var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
Object.defineProperty(o, "default", { enumerable: true, value: v });
}) : function(o, v) {
o["default"] = v;
});
var __importStar = (this && this.__importStar) || (function () {
var ownKeys = function(o) {
ownKeys = Object.getOwnPropertyNames || function (o) {
var ar = [];
for (var k in o) if (Object.prototype.hasOwnProperty.call(o, k)) ar[ar.length] = k;
return ar;
};
return ownKeys(o);
};
return function (mod) {
if (mod && mod.__esModule) return mod;
var result = {};
if (mod != null) for (var k = ownKeys(mod), i = 0; i < k.length; i++) if (k[i] !== "default") __createBinding(result, mod, k[i]);
__setModuleDefault(result, mod);
return result;
};
})();
Object.defineProperty(exports, "__esModule", { value: true });
exports.isPromiseLike = isPromiseLike;
exports.isPromiseConstructorLike = isPromiseConstructorLike;
exports.isErrorLike = isErrorLike;
exports.isReadonlyErrorLike = isReadonlyErrorLike;
exports.isReadonlyTypeLike = isReadonlyTypeLike;
exports.isBuiltinTypeAliasLike = isBuiltinTypeAliasLike;
exports.isBuiltinSymbolLike = isBuiltinSymbolLike;
exports.isBuiltinSymbolLikeRecurser = isBuiltinSymbolLikeRecurser;
const tsutils = __importStar(require("ts-api-utils"));
const ts = __importStar(require("typescript"));
const isSymbolFromDefaultLibrary_1 = require("./isSymbolFromDefaultLibrary");
/**
* @example
* ```ts
* class DerivedClass extends Promise<number> {}
* DerivedClass.reject
* // ^ PromiseLike
* ```
*/
function isPromiseLike(program, type) {
return isBuiltinSymbolLike(program, type, 'Promise');
}
/**
* @example
* ```ts
* const value = Promise
* value.reject
* // ^ PromiseConstructorLike
* ```
*/
function isPromiseConstructorLike(program, type) {
return isBuiltinSymbolLike(program, type, 'PromiseConstructor');
}
/**
* @example
* ```ts
* class Foo extends Error {}
* new Foo()
* // ^ ErrorLike
* ```
*/
function isErrorLike(program, type) {
return isBuiltinSymbolLike(program, type, 'Error');
}
/**
* @example
* ```ts
* type T = Readonly<Error>
* // ^ ReadonlyErrorLike
* ```
*/
function isReadonlyErrorLike(program, type) {
return isReadonlyTypeLike(program, type, subtype => {
const [typeArgument] = subtype.aliasTypeArguments;
return (isErrorLike(program, typeArgument) ||
isReadonlyErrorLike(program, typeArgument));
});
}
/**
* @example
* ```ts
* type T = Readonly<{ foo: 'bar' }>
* // ^ ReadonlyTypeLike
* ```
*/
function isReadonlyTypeLike(program, type, predicate) {
return isBuiltinTypeAliasLike(program, type, subtype => {
return (subtype.aliasSymbol.getName() === 'Readonly' && !!predicate?.(subtype));
});
}
function isBuiltinTypeAliasLike(program, type, predicate) {
return isBuiltinSymbolLikeRecurser(program, type, subtype => {
const { aliasSymbol, aliasTypeArguments } = subtype;
if (!aliasSymbol || !aliasTypeArguments) {
return false;
}
if ((0, isSymbolFromDefaultLibrary_1.isSymbolFromDefaultLibrary)(program, aliasSymbol) &&
predicate(subtype)) {
return true;
}
return null;
});
}
function isBuiltinSymbolLike(program, type, symbolName) {
return isBuiltinSymbolLikeRecurser(program, type, subType => {
const symbol = subType.getSymbol();
if (!symbol) {
return false;
}
const actualSymbolName = symbol.getName();
if ((Array.isArray(symbolName)
? symbolName.some(name => actualSymbolName === name)
: actualSymbolName === symbolName) &&
(0, isSymbolFromDefaultLibrary_1.isSymbolFromDefaultLibrary)(program, symbol)) {
return true;
}
return null;
});
}
function isBuiltinSymbolLikeRecurser(program, type, predicate) {
if (type.isIntersection()) {
return type.types.some(t => isBuiltinSymbolLikeRecurser(program, t, predicate));
}
if (type.isUnion()) {
return type.types.every(t => isBuiltinSymbolLikeRecurser(program, t, predicate));
}
if (tsutils.isTypeParameter(type)) {
const t = type.getConstraint();
if (t) {
return isBuiltinSymbolLikeRecurser(program, t, predicate);
}
return false;
}
const predicateResult = predicate(type);
if (typeof predicateResult === 'boolean') {
return predicateResult;
}
const symbol = type.getSymbol();
if (symbol &&
tsutils.isSymbolFlagSet(symbol, ts.SymbolFlags.Class | ts.SymbolFlags.Interface)) {
const checker = program.getTypeChecker();
const declaredType = checker.getDeclaredTypeOfSymbol(symbol);
for (const baseType of checker.getBaseTypes(declaredType)) {
if (isBuiltinSymbolLikeRecurser(program, baseType, predicate)) {
return true;
}
}
}
return false;
}
@@ -0,0 +1,46 @@
/*
MIT License http://www.opensource.org/licenses/mit-license.php
Author Tobias Koppers @sokra
*/
"use strict";
/** @typedef {import("./Resolver").ResolveContext} ResolveContext */
/**
* @param {ResolveContext} options options for inner context
* @param {null | string} message message to log
* @returns {ResolveContext} inner context
*/
module.exports = function createInnerContext(options, message) {
let messageReported = false;
let innerLog;
if (options.log) {
if (message) {
/**
* @param {string} msg message
*/
innerLog = (msg) => {
if (!messageReported) {
/** @type {((str: string) => void)} */
(options.log)(message);
messageReported = true;
}
/** @type {((str: string) => void)} */
(options.log)(` ${msg}`);
};
} else {
innerLog = options.log;
}
}
return {
log: innerLog,
yield: options.yield,
fileDependencies: options.fileDependencies,
contextDependencies: options.contextDependencies,
missingDependencies: options.missingDependencies,
stack: options.stack,
};
};
@@ -0,0 +1,21 @@
MIT License
Copyright (c) 2020 Kasper Unn Weihe
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,3 @@
import * as React from 'react';
import { SideCarComponent, SideCarMedium } from './types';
export declare function exportSidecar<T>(medium: SideCarMedium<T>, exported: React.ComponentType<T>): SideCarComponent<T>;
@@ -0,0 +1,32 @@
import Options from '../../Options'
import { MatchEstimated } from '../../types'
export default (options: Options, match: MatchEstimated) => {
if (match.pattern !== 'wordSequence') {
return null
}
let warning = null
const suggestions: string[] = []
// Warning for common word sequences
if (match.wordCount >= 3) {
warning = options.translations.warnings.sequences
}
// Suggestions based on sequence characteristics
if (match.ascending) {
suggestions.push(options.translations.suggestions.sequences)
} else {
suggestions.push(options.translations.suggestions.anotherWord)
}
if (match.wordCount > 2) {
suggestions.push(options.translations.suggestions.useWords)
}
return {
warning,
suggestions,
}
}
@@ -0,0 +1 @@
{"version":3,"file":"index.js","names":[],"sources":["../../src/index.ts"],"sourcesContent":["// While the public API was clearly inspired by the \"history\" npm package,\n// This implementation attempts to be more lightweight by\n// making assumptions about the way TanStack Router works\n\nexport interface NavigateOptions {\n ignoreBlocker?: boolean\n}\n\ntype SubscriberHistoryAction =\n | {\n type: Exclude<HistoryAction, 'GO'>\n }\n | {\n type: 'GO'\n index: number\n }\n\ntype SubscriberArgs = {\n location: HistoryLocation\n action: SubscriberHistoryAction\n}\n\nexport interface RouterHistory {\n location: HistoryLocation\n length: number\n subscribers: Set<(opts: SubscriberArgs) => void>\n subscribe: (cb: (opts: SubscriberArgs) => void) => () => void\n push: (path: string, state?: any, navigateOpts?: NavigateOptions) => void\n replace: (path: string, state?: any, navigateOpts?: NavigateOptions) => void\n go: (index: number, navigateOpts?: NavigateOptions) => void\n back: (navigateOpts?: NavigateOptions) => void\n forward: (navigateOpts?: NavigateOptions) => void\n canGoBack: () => boolean\n createHref: (href: string) => string\n block: (blocker: NavigationBlocker) => () => void\n flush: () => void\n destroy: () => void\n notify: (action: SubscriberHistoryAction) => void\n _ignoreSubscribers?: boolean\n}\n\nexport interface HistoryLocation extends ParsedPath {\n state: ParsedHistoryState\n}\n\nexport interface ParsedPath {\n href: string\n pathname: string\n search: string\n hash: string\n}\n\nexport interface HistoryState {}\n\nexport type ParsedHistoryState = HistoryState & {\n key?: string // TODO: Remove in v2 - use __TSR_key instead\n __TSR_key?: string\n __TSR_index: number\n}\n\ntype ShouldAllowNavigation = any\n\nexport type HistoryAction = 'PUSH' | 'REPLACE' | 'FORWARD' | 'BACK' | 'GO'\n\nexport type BlockerFnArgs = {\n currentLocation: HistoryLocation\n nextLocation: HistoryLocation\n action: HistoryAction\n}\n\nexport type BlockerFn = (\n args: BlockerFnArgs,\n) => Promise<ShouldAllowNavigation> | ShouldAllowNavigation\n\nexport type NavigationBlocker = {\n blockerFn: BlockerFn\n enableBeforeUnload?: (() => boolean) | boolean\n}\n\ntype TryNavigateArgs = {\n task: () => void\n type: 'PUSH' | 'REPLACE' | 'BACK' | 'FORWARD' | 'GO'\n navigateOpts?: NavigateOptions\n} & (\n | {\n type: 'PUSH' | 'REPLACE'\n path: string\n state: any\n }\n | {\n type: 'BACK' | 'FORWARD' | 'GO'\n }\n)\n\nconst stateIndexKey = '__TSR_index'\nconst popStateEvent = 'popstate'\nconst beforeUnloadEvent = 'beforeunload'\n\nexport function createHistory(opts: {\n getLocation: () => HistoryLocation\n getLength: () => number\n pushState: (path: string, state: any) => void\n replaceState: (path: string, state: any) => void\n go: (n: number) => void\n back: (ignoreBlocker: boolean) => void\n forward: (ignoreBlocker: boolean) => void\n createHref: (path: string) => string\n flush?: () => void\n destroy?: () => void\n onBlocked?: () => void\n getBlockers?: () => Array<NavigationBlocker>\n setBlockers?: (blockers: Array<NavigationBlocker>) => void\n // Avoid notifying on forward/back/go, used for browser history as we already get notified by the popstate event\n notifyOnIndexChange?: boolean\n}): RouterHistory {\n let location = opts.getLocation()\n const subscribers = new Set<(opts: SubscriberArgs) => void>()\n\n const notify = (action: SubscriberHistoryAction) => {\n location = opts.getLocation()\n subscribers.forEach((subscriber) => subscriber({ location, action }))\n }\n\n const handleIndexChange = (action: SubscriberHistoryAction) => {\n if (opts.notifyOnIndexChange ?? true) notify(action)\n else location = opts.getLocation()\n }\n\n const tryNavigation = async ({\n task,\n navigateOpts,\n ...actionInfo\n }: TryNavigateArgs) => {\n const ignoreBlocker = navigateOpts?.ignoreBlocker ?? false\n if (ignoreBlocker) {\n task()\n return\n }\n\n const blockers = opts.getBlockers?.() ?? []\n const isPushOrReplace =\n actionInfo.type === 'PUSH' || actionInfo.type === 'REPLACE'\n if (typeof document !== 'undefined' && blockers.length && isPushOrReplace) {\n for (const blocker of blockers) {\n const nextLocation = parseHref(actionInfo.path, actionInfo.state)\n const isBlocked = await blocker.blockerFn({\n currentLocation: location,\n nextLocation,\n action: actionInfo.type,\n })\n if (isBlocked) {\n opts.onBlocked?.()\n return\n }\n }\n }\n\n task()\n }\n\n return {\n get location() {\n return location\n },\n get length() {\n return opts.getLength()\n },\n subscribers,\n subscribe: (cb: (opts: SubscriberArgs) => void) => {\n subscribers.add(cb)\n\n return () => {\n subscribers.delete(cb)\n }\n },\n push: (path, state, navigatLine truncated
@@ -0,0 +1,39 @@
/**
* @fileoverview Define the cursor which limits the number of tokens.
* @author Toru Nagashima
*/
"use strict";
//------------------------------------------------------------------------------
// Requirements
//------------------------------------------------------------------------------
const DecorativeCursor = require("./decorative-cursor");
//------------------------------------------------------------------------------
// Exports
//------------------------------------------------------------------------------
/**
* The decorative cursor which limits the number of tokens.
*/
module.exports = class LimitCursor extends DecorativeCursor {
/**
* Initializes this cursor.
* @param {Cursor} cursor The cursor to be decorated.
* @param {number} count The count of tokens this cursor iterates.
*/
constructor(cursor, count) {
super(cursor);
this.count = count;
}
/** @inheritdoc */
moveNext() {
if (this.count > 0) {
this.count -= 1;
return super.moveNext();
}
return false;
}
};
@@ -0,0 +1 @@
{"version":3,"names":["PluginPass","constructor","file","key","options","isAsync","_map","Map","opts","cwd","filename","set","val","get","availableHelper","name","versionRange","addHelper","buildCodeFrameError","node","msg","_Error","exports","default","prototype","getModuleName","addImport"],"sources":["../../src/transformation/plugin-pass.ts"],"sourcesContent":["import type * as t from \"@babel/types\";\nimport type File from \"./file/file.ts\";\n\nexport default class PluginPass<Options = object> {\n _map = new Map<unknown, unknown>();\n key: string | undefined | null;\n file: File;\n opts: Partial<Options>;\n\n /**\n * The working directory that Babel's programmatic options are loaded\n * relative to.\n */\n cwd: string;\n\n /** The absolute path of the file being compiled. */\n filename: string | void;\n\n /**\n * Is Babel executed in async mode or not.\n */\n isAsync: boolean;\n\n constructor(\n file: File,\n key: string | null,\n options: Options | undefined,\n isAsync: boolean,\n ) {\n this.key = key;\n this.file = file;\n this.opts = options || {};\n this.cwd = file.opts.cwd;\n this.filename = file.opts.filename;\n this.isAsync = isAsync;\n }\n\n set(key: unknown, val: unknown) {\n this._map.set(key, val);\n }\n\n get(key: unknown): any {\n return this._map.get(key);\n }\n\n availableHelper(name: string, versionRange?: string | null) {\n return this.file.availableHelper(name, versionRange);\n }\n\n addHelper(name: string) {\n return this.file.addHelper(name);\n }\n\n buildCodeFrameError(\n node: t.Node | undefined | null,\n msg: string,\n _Error?: typeof Error,\n ) {\n return this.file.buildCodeFrameError(node, msg, _Error);\n }\n}\n\nif (!process.env.BABEL_8_BREAKING) {\n (PluginPass as any).prototype.getModuleName = function getModuleName(\n this: PluginPass,\n ): string | undefined {\n // @ts-expect-error only exists in Babel 7\n return this.file.getModuleName();\n };\n (PluginPass as any).prototype.addImport = function addImport(\n this: PluginPass,\n ): void {\n // @ts-expect-error only exists in Babel 7\n this.file.addImport();\n };\n}\n"],"mappings":";;;;;;AAGe,MAAMA,UAAU,CAAmB;EAoBhDC,WAAWA,CACTC,IAAU,EACVC,GAAkB,EAClBC,OAA4B,EAC5BC,OAAgB,EAChB;IAAA,KAxBFC,IAAI,GAAG,IAAIC,GAAG,CAAmB,CAAC;IAAA,KAClCJ,GAAG;IAAA,KACHD,IAAI;IAAA,KACJM,IAAI;IAAA,KAMJC,GAAG;IAAA,KAGHC,QAAQ;IAAA,KAKRL,OAAO;IAQL,IAAI,CAACF,GAAG,GAAGA,GAAG;IACd,IAAI,CAACD,IAAI,GAAGA,IAAI;IAChB,IAAI,CAACM,IAAI,GAAGJ,OAAO,IAAI,CAAC,CAAC;IACzB,IAAI,CAACK,GAAG,GAAGP,IAAI,CAACM,IAAI,CAACC,GAAG;IACxB,IAAI,CAACC,QAAQ,GAAGR,IAAI,CAACM,IAAI,CAACE,QAAQ;IAClC,IAAI,CAACL,OAAO,GAAGA,OAAO;EACxB;EAEAM,GAAGA,CAACR,GAAY,EAAES,GAAY,EAAE;IAC9B,IAAI,CAACN,IAAI,CAACK,GAAG,CAACR,GAAG,EAAES,GAAG,CAAC;EACzB;EAEAC,GAAGA,CAACV,GAAY,EAAO;IACrB,OAAO,IAAI,CAACG,IAAI,CAACO,GAAG,CAACV,GAAG,CAAC;EAC3B;EAEAW,eAAeA,CAACC,IAAY,EAAEC,YAA4B,EAAE;IAC1D,OAAO,IAAI,CAACd,IAAI,CAACY,eAAe,CAACC,IAAI,EAAEC,YAAY,CAAC;EACtD;EAEAC,SAASA,CAACF,IAAY,EAAE;IACtB,OAAO,IAAI,CAACb,IAAI,CAACe,SAAS,CAACF,IAAI,CAAC;EAClC;EAEAG,mBAAmBA,CACjBC,IAA+B,EAC/BC,GAAW,EACXC,MAAqB,EACrB;IACA,OAAO,IAAI,CAACnB,IAAI,CAACgB,mBAAmB,CAACC,IAAI,EAAEC,GAAG,EAAEC,MAAM,CAAC;EACzD;AACF;AAACC,OAAA,CAAAC,OAAA,GAAAvB,UAAA;AAGEA,UAAU,CAASwB,SAAS,CAACC,aAAa,GAAG,SAASA,aAAaA,CAAA,EAE9C;EAEpB,OAAO,IAAI,CAACvB,IAAI,CAACuB,aAAa,CAAC,CAAC;AAClC,CAAC;AACAzB,UAAU,CAASwB,SAAS,CAACE,SAAS,GAAG,SAASA,SAASA,CAAA,EAEpD;EAEN,IAAI,CAACxB,IAAI,CAACwB,SAAS,CAAC,CAAC;AACvB,CAAC;AAAC","ignoreList":[]}
@@ -0,0 +1 @@
{"version":3,"file":"clipboard-list.js","sources":["../../../src/icons/clipboard-list.ts"],"sourcesContent":["import createLucideIcon from '../createLucideIcon';\n\n/**\n * @component @name ClipboardList\n * @description Lucide SVG icon component, renders SVG Element with children.\n *\n * @preview ![img](data:image/svg+xml;base64,PHN2ZyAgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIgogIHdpZHRoPSIyNCIKICBoZWlnaHQ9IjI0IgogIHZpZXdCb3g9IjAgMCAyNCAyNCIKICBmaWxsPSJub25lIgogIHN0cm9rZT0iIzAwMCIgc3R5bGU9ImJhY2tncm91bmQtY29sb3I6ICNmZmY7IGJvcmRlci1yYWRpdXM6IDJweCIKICBzdHJva2Utd2lkdGg9IjIiCiAgc3Ryb2tlLWxpbmVjYXA9InJvdW5kIgogIHN0cm9rZS1saW5lam9pbj0icm91bmQiCj4KICA8cmVjdCB3aWR0aD0iOCIgaGVpZ2h0PSI0IiB4PSI4IiB5PSIyIiByeD0iMSIgcnk9IjEiIC8+CiAgPHBhdGggZD0iTTE2IDRoMmEyIDIgMCAwIDEgMiAydjE0YTIgMiAwIDAgMS0yIDJINmEyIDIgMCAwIDEtMi0yVjZhMiAyIDAgMCAxIDItMmgyIiAvPgogIDxwYXRoIGQ9Ik0xMiAxMWg0IiAvPgogIDxwYXRoIGQ9Ik0xMiAxNmg0IiAvPgogIDxwYXRoIGQ9Ik04IDExaC4wMSIgLz4KICA8cGF0aCBkPSJNOCAxNmguMDEiIC8+Cjwvc3ZnPgo=) - https://lucide.dev/icons/clipboard-list\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 ClipboardList = createLucideIcon('ClipboardList', [\n ['rect', { width: '8', height: '4', x: '8', y: '2', rx: '1', ry: '1', key: 'tgr4d6' }],\n [\n 'path',\n {\n d: 'M16 4h2a2 2 0 0 1 2 2v14a2 2 0 0 1-2 2H6a2 2 0 0 1-2-2V6a2 2 0 0 1 2-2h2',\n key: '116196',\n },\n ],\n ['path', { d: 'M12 11h4', key: '1jrz19' }],\n ['path', { d: 'M12 16h4', key: 'n85exb' }],\n ['path', { d: 'M8 11h.01', key: '1dfujw' }],\n ['path', { d: 'M8 16h.01', key: '18s6g9' }],\n]);\n\nexport default ClipboardList;\n"],"names":[],"mappings":";;;;;;;;;AAaM,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAgB,iBAAiB,eAAiB,CAAA,CAAA,CAAA;AAAA,CAAA,CACtD,CAAC,CAAA,CAAA,CAAA,CAAA,CAAA,CAAQ,CAAA,CAAA,CAAA,CAAE,KAAO,CAAA,CAAA,CAAA,CAAA,CAAA,CAAK,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,EAAQ,CAAA,CAAA,CAAA,CAAK,CAAA,CAAA,CAAA,EAAG,CAAK,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAG,KAAK,CAAI,CAAA,CAAA,CAAA,GAAA,CAAK,CAAA,CAAA,EAAI,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,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,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,CAAa,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAK,UAAU,CAAA;AAC5C,CAAC,CAAA,CAAA;;"}
@@ -0,0 +1 @@
{"version":3,"file":"utils.js","sources":["../../src/utils.ts"],"sourcesContent":["export type NoInfer<A extends any> = [A][A extends any ? 0 : never]\n\nexport type PartialKeys<T, K extends keyof T> = Omit<T, K> & Partial<Pick<T, K>>\n\nexport function memo<TDeps extends ReadonlyArray<any>, TResult>(\n getDeps: () => [...TDeps],\n fn: (...args: NoInfer<[...TDeps]>) => TResult,\n opts: {\n key: false | string\n debug?: () => boolean\n onChange?: (result: TResult) => void\n initialDeps?: TDeps\n skipInitialOnChange?: boolean\n },\n) {\n let deps = opts.initialDeps ?? []\n let result: TResult | undefined\n let isInitial = true\n\n function memoizedFunction(): TResult {\n // Debug-only timing. In production builds, `process.env.NODE_ENV !==\n // 'production'` is constant-folded to `false` by downstream minifiers\n // (Terser/esbuild/swc with `define`), which DCEs the entire block.\n const debugEnabled =\n process.env.NODE_ENV !== 'production' && !!opts.key && !!opts.debug?.()\n let depTime = 0\n if (debugEnabled) depTime = Date.now()\n\n const newDeps = getDeps()\n\n const depsChanged =\n newDeps.length !== deps.length ||\n newDeps.some((dep: any, index: number) => deps[index] !== dep)\n\n if (!depsChanged) {\n return result!\n }\n\n deps = newDeps\n\n let resultTime = 0\n if (debugEnabled) resultTime = Date.now()\n\n result = fn(...newDeps)\n\n if (debugEnabled) {\n const depEndTime = Math.round((Date.now() - depTime) * 100) / 100\n const resultEndTime = Math.round((Date.now() - resultTime) * 100) / 100\n const resultFpsPercentage = resultEndTime / 16\n\n const pad = (str: number | string, num: number) => {\n str = String(str)\n while (str.length < num) {\n str = ' ' + str\n }\n return str\n }\n\n console.info(\n `%c⏱ ${pad(resultEndTime, 5)} /${pad(depEndTime, 5)} ms`,\n `\n font-size: .6rem;\n font-weight: bold;\n color: hsl(${Math.max(\n 0,\n Math.min(120 - 120 * resultFpsPercentage, 120),\n )}deg 100% 31%);`,\n opts?.key,\n )\n }\n\n if (opts?.onChange && !(isInitial && opts.skipInitialOnChange)) {\n opts.onChange(result)\n }\n\n isInitial = false\n\n return result\n }\n\n // Attach updateDeps to the function itself\n memoizedFunction.updateDeps = (newDeps: [...TDeps]) => {\n deps = newDeps\n }\n\n return memoizedFunction\n}\n\nexport function notUndefined<T>(value: T | undefined, msg?: string): T {\n if (value === undefined) {\n throw new Error(`Unexpected undefined${msg ? `: ${msg}` : ''}`)\n } else {\n return value\n }\n}\n\nexport const approxEqual = (a: number, b: number) => Math.abs(a - b) < 1.01\n\nexport const debounce = (\n targetWindow: Window & typeof globalThis,\n fn: Function,\n ms: number,\n) => {\n let timeoutId: number\n return function (this: any, ...args: Array<any>) {\n targetWindow.clearTimeout(timeoutId)\n timeoutId = targetWindow.setTimeout(() => fn.apply(this, args), ms)\n }\n}\n"],"names":[],"mappings":"AAIO,SAAS,KACd,SACA,IACA,MAOA;AACA,MAAI,OAAO,KAAK,eAAe,CAAA;AAC/B,MAAI;AACJ,MAAI,YAAY;AAEhB,WAAS,mBAA4B;AAfhC;AAmBH,UAAM,eACJ,QAAQ,IAAI,aAAa,gBAAgB,CAAC,CAAC,KAA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