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,20 @@
/**
* @license lucide-react v0.469.0 - ISC
*
* This source code is licensed under the ISC license.
* See the LICENSE file in the root directory of this source tree.
*/
import createLucideIcon from '../createLucideIcon.js';
const Group = createLucideIcon("Group", [
["path", { d: "M3 7V5c0-1.1.9-2 2-2h2", key: "adw53z" }],
["path", { d: "M17 3h2c1.1 0 2 .9 2 2v2", key: "an4l38" }],
["path", { d: "M21 17v2c0 1.1-.9 2-2 2h-2", key: "144t0e" }],
["path", { d: "M7 21H5c-1.1 0-2-.9-2-2v-2", key: "rtnfgi" }],
["rect", { width: "7", height: "5", x: "7", y: "7", rx: "1", key: "1eyiv7" }],
["rect", { width: "7", height: "5", x: "10", y: "12", rx: "1", key: "1qlmkx" }]
]);
export { Group as default };
//# sourceMappingURL=group.js.map
@@ -0,0 +1 @@
{"version":3,"file":"laptop-minimal.js","sources":["../../../src/icons/laptop-minimal.ts"],"sourcesContent":["import createLucideIcon from '../createLucideIcon';\n\n/**\n * @component @name LaptopMinimal\n * @description Lucide SVG icon component, renders SVG Element with children.\n *\n * @preview ![img](data:image/svg+xml;base64,PHN2ZyAgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIgogIHdpZHRoPSIyNCIKICBoZWlnaHQ9IjI0IgogIHZpZXdCb3g9IjAgMCAyNCAyNCIKICBmaWxsPSJub25lIgogIHN0cm9rZT0iIzAwMCIgc3R5bGU9ImJhY2tncm91bmQtY29sb3I6ICNmZmY7IGJvcmRlci1yYWRpdXM6IDJweCIKICBzdHJva2Utd2lkdGg9IjIiCiAgc3Ryb2tlLWxpbmVjYXA9InJvdW5kIgogIHN0cm9rZS1saW5lam9pbj0icm91bmQiCj4KICA8cmVjdCB3aWR0aD0iMTgiIGhlaWdodD0iMTIiIHg9IjMiIHk9IjQiIHJ4PSIyIiByeT0iMiIgLz4KICA8bGluZSB4MT0iMiIgeDI9IjIyIiB5MT0iMjAiIHkyPSIyMCIgLz4KPC9zdmc+Cg==) - https://lucide.dev/icons/laptop-minimal\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 LaptopMinimal = createLucideIcon('LaptopMinimal', [\n ['rect', { width: '18', height: '12', x: '3', y: '4', rx: '2', ry: '2', key: '1qhy41' }],\n ['line', { x1: '2', x2: '22', y1: '20', y2: '20', key: 'ni3hll' }],\n]);\n\nexport default LaptopMinimal;\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,CAAA,CAAM,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,EAAQ,CAAA,CAAA,CAAA,CAAA,CAAM,CAAA,CAAA,CAAA,EAAG,CAAK,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAG,KAAK,CAAI,CAAA,CAAA,CAAA,GAAA,CAAK,CAAA,CAAA,EAAI,CAAA,CAAA,CAAA,CAAK,CAAA,CAAA,CAAA,CAAA,CAAA,CAAK,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,GAAU,CAAA,CAAA;AAAA,CACvF,CAAA,CAAC,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAQ,CAAE,CAAA,CAAA,CAAA,EAAI,CAAK,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAI,CAAM,CAAA,CAAA,CAAA,CAAA,CAAA,EAAA,CAAI,CAAA,CAAA,CAAA,CAAA,CAAM,CAAA,CAAA,CAAA,CAAA,CAAI,CAAA,CAAA,CAAA,CAAA,CAAM,EAAA,CAAA,CAAA,CAAA,CAAA,CAAK,UAAU,CAAA;AACnE,CAAC,CAAA,CAAA;;"}
@@ -0,0 +1,8 @@
import type { TSESTree } from '@typescript-eslint/types';
import { DefinitionBase } from './DefinitionBase';
import { DefinitionType } from './DefinitionType';
export declare class TSModuleNameDefinition extends DefinitionBase<DefinitionType.TSModuleName, TSESTree.TSModuleDeclaration, null, TSESTree.Identifier> {
readonly isTypeDefinition = true;
readonly isVariableDefinition = true;
constructor(name: TSESTree.Identifier, node: TSModuleNameDefinition['node']);
}
@@ -0,0 +1 @@
{"version":3,"file":"enum.js","sourceRoot":"","sources":["../../../lib/vocabularies/jtd/enum.ts"],"names":[],"mappings":";;AAEA,mDAAsD;AACtD,yCAAwC;AACxC,yCAAwC;AAIxC,MAAM,KAAK,GAA2B;IACpC,OAAO,EAAE,4CAA4C;IACrD,MAAM,EAAE,CAAC,EAAC,UAAU,EAAC,EAAE,EAAE,CAAC,IAAA,WAAC,EAAA,mBAAmB,UAAU,GAAG;CAC5D,CAAA;AAED,MAAM,GAAG,GAA0B;IACjC,OAAO,EAAE,MAAM;IACf,UAAU,EAAE,OAAO;IACnB,KAAK;IACL,IAAI,CAAC,GAAe;QAClB,IAAA,wBAAa,EAAC,GAAG,CAAC,CAAA;QAClB,MAAM,EAAC,GAAG,EAAE,IAAI,EAAE,MAAM,EAAE,WAAW,EAAE,YAAY,EAAE,EAAE,EAAC,GAAG,GAAG,CAAA;QAC9D,IAAI,MAAM,CAAC,MAAM,KAAK,CAAC;YAAE,MAAM,IAAI,KAAK,CAAC,gCAAgC,CAAC,CAAA;QAC1E,IAAI,MAAM,CAAC,MAAM,KAAK,IAAI,GAAG,C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CAAC;CACF,CAAA;AAED,kBAAe,GAAG,CAAA"}
@@ -0,0 +1,3 @@
import { ZodReadonlyDef } from "zod/v3";
import { Refs } from "../Refs.js";
export declare const parseReadonlyDef: (def: ZodReadonlyDef<any>, refs: Refs) => import("../parseTypes.js").JsonSchema7Type | undefined;
@@ -0,0 +1 @@
{"version":3,"file":"fork-knife.js","sources":[],"sourcesContent":[],"names":[],"mappings":";;;;;;;"}
@@ -0,0 +1,3 @@
declare function clamp(value: number, [min, max]: [number, number]): number;
export { clamp };
@@ -0,0 +1,153 @@
// forward declarations
declare global {
namespace NodeJS {
// eslint-disable-next-line @typescript-eslint/no-empty-interface
interface ReadableStream {}
}
/**
* Stub for https://developer.mozilla.org/en-US/docs/Web/API/AbortSignal
*/
// eslint-disable-next-line @typescript-eslint/no-empty-interface
interface AbortSignal {}
/**
* Stub for https://developer.mozilla.org/en-US/docs/Web/API/ReadableStream
*/
// eslint-disable-next-line @typescript-eslint/no-empty-interface
interface ReadableStream<R = any> {}
/**
* Stub for https://developer.mozilla.org/en-US/docs/Web/API/Uint8Array
*/
// eslint-disable-next-line @typescript-eslint/no-empty-interface
interface Uint8Array {}
}
import { ReactNode } from "react";
import { ErrorInfo } from "./client";
export {};
declare const POSTPONED_STATE_SIGIL: unique symbol;
/**
* This is an opaque type i.e. users should not make any assumptions about its structure.
* It is JSON-serializeable to be a able to store it and retrvieve later for use with {@link https://react.dev/reference/react-dom/server/resume `resume`}.
*/
export interface PostponedState {
[POSTPONED_STATE_SIGIL]: never;
}
/**
* @see {@link https://developer.mozilla.org/en-US/docs/Web/HTML/Reference/Elements/script/type/importmap Import maps}
*/
// TODO: Ideally TypeScripts standard library would include this type.
// Until then we keep the prefixed one for future compatibility.
export interface ReactImportMap {
/**
* @see {@link https://developer.mozilla.org/en-US/docs/Web/HTML/Reference/Elements/script/type/importmap#imports `imports` reference}
*/
imports?: {
[specifier: string]: string;
} | undefined;
/**
* @see {@link https://developer.mozilla.org/en-US/docs/Web/HTML/Reference/Elements/script/type/importmap#integrity `integrity` reference}
*/
integrity?: {
[moduleURL: string]: string;
} | undefined;
/**
* @see {@link https://developer.mozilla.org/en-US/docs/Web/HTML/Reference/Elements/script/type/importmap#scopes `scopes` reference}
*/
scopes?: {
[scope: string]: {
[specifier: string]: string;
};
} | undefined;
}
export interface BootstrapScriptDescriptor {
src: string;
integrity?: string | undefined;
crossOrigin?: string | undefined;
}
export interface PrerenderOptions {
bootstrapScriptContent?: string;
bootstrapScripts?: Array<string | BootstrapScriptDescriptor>;
bootstrapModules?: Array<string | BootstrapScriptDescriptor>;
/**
* Maximum length of the header content in unicode code units i.e. string.length.
* Must be a positive integer if specified.
* @default 2000
*/
headersLengthHint?: number | undefined;
identifierPrefix?: string;
importMap?: ReactImportMap | undefined;
namespaceURI?: string;
onError?: (error: unknown, errorInfo: ErrorInfo) => string | void;
onHeaders?: (headers: Headers) => void | undefined;
progressiveChunkSize?: number;
signal?: AbortSignal;
}
export interface PrerenderResult {
postponed: null | PostponedState;
prelude: ReadableStream<Uint8Array>;
}
/**
* Only available in the environments with [Web Streams](https://developer.mozilla.org/en-US/docs/Web/API/Streams_API) (this includes browsers, Deno, and some modern edge runtimes).
*
* @see [API](https://react.dev/reference/react-dom/static/prerender)
*/
export function prerender(
reactNode: ReactNode,
options?: PrerenderOptions,
): Promise<PrerenderResult>;
export interface PrerenderToNodeStreamResult {
prelude: NodeJS.ReadableStream;
postponed: null | PostponedState;
}
/**
* Only available in the environments with [Node.js Streams](https://nodejs.dev/learn/nodejs-streams).
*
* @see [API](https://react.dev/reference/react-dom/static/prerenderToNodeStream)
*
* @param children
* @param options
*/
export function prerenderToNodeStream(
reactNode: ReactNode,
options?: PrerenderOptions,
): Promise<PrerenderToNodeStreamResult>;
export interface ResumeOptions {
nonce?: string;
signal?: AbortSignal;
onError?: (error: unknown) => string | undefined | void;
}
/**
* @see {@link https://react.dev/reference/react-dom/static/resumeAndPrerender `resumeAndPrerender` reference documentation}
* @version 19.2
*/
export function resumeAndPrerender(
children: React.ReactNode,
postponedState: null | PostponedState,
options?: Omit<ResumeOptions, "nonce">,
): Promise<PrerenderResult>;
/**
* @see {@link https://react.dev/reference/react-dom/static/resumeAndPrerenderToNodeStream `resumeAndPrerenderToNodeStream`` reference documentation}
* @version 19.2
*/
export function resumeAndPrerenderToNodeStream(
children: React.ReactNode,
postponedState: null | PostponedState,
options?: Omit<ResumeOptions, "nonce">,
): Promise<PrerenderToNodeStreamResult>;
export const version: string;
@@ -0,0 +1,10 @@
"use strict";
const daysInMonth = require("./daysInMonth.js");
function addMonths(date, months) {
const expectedMonth = date.getMonth() + months;
const tempMaxDay = daysInMonth(new Date(date.getFullYear(), expectedMonth, 1, 0, 0, 0, 0));
const currentDay = date.getDate();
date.setMonth(expectedMonth, currentDay > tempMaxDay ? tempMaxDay : currentDay);
return date;
}
module.exports = addMonths;
@@ -0,0 +1 @@
{"version":3,"file":"usb.js","sources":["../../../src/icons/usb.ts"],"sourcesContent":["import createLucideIcon from '../createLucideIcon';\n\n/**\n * @component @name Usb\n * @description Lucide SVG icon component, renders SVG Element with children.\n *\n * @preview ![img](data:image/svg+xml;base64,PHN2ZyAgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIgogIHdpZHRoPSIyNCIKICBoZWlnaHQ9IjI0IgogIHZpZXdCb3g9IjAgMCAyNCAyNCIKICBmaWxsPSJub25lIgogIHN0cm9rZT0iIzAwMCIgc3R5bGU9ImJhY2tncm91bmQtY29sb3I6ICNmZmY7IGJvcmRlci1yYWRpdXM6IDJweCIKICBzdHJva2Utd2lkdGg9IjIiCiAgc3Ryb2tlLWxpbmVjYXA9InJvdW5kIgogIHN0cm9rZS1saW5lam9pbj0icm91bmQiCj4KICA8Y2lyY2xlIGN4PSIxMCIgY3k9IjciIHI9IjEiIC8+CiAgPGNpcmNsZSBjeD0iNCIgY3k9IjIwIiByPSIxIiAvPgogIDxwYXRoIGQ9Ik00LjcgMTkuMyAxOSA1IiAvPgogIDxwYXRoIGQ9Im0yMSAzLTMgMSAyIDJaIiAvPgogIDxwYXRoIGQ9Ik05LjI2IDcuNjggNSAxMmwyIDUiIC8+CiAgPHBhdGggZD0ibTEwIDE0IDUgMiAzLjUtMy41IiAvPgogIDxwYXRoIGQ9Im0xOCAxMiAxLTEgMSAxLTEgMVoiIC8+Cjwvc3ZnPgo=) - https://lucide.dev/icons/usb\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 Usb = createLucideIcon('Usb', [\n ['circle', { cx: '10', cy: '7', r: '1', key: 'dypaad' }],\n ['circle', { cx: '4', cy: '20', r: '1', key: '22iqad' }],\n ['path', { d: 'M4.7 19.3 19 5', key: '1enqfc' }],\n ['path', { d: 'm21 3-3 1 2 2Z', key: 'd3ov82' }],\n ['path', { d: 'M9.26 7.68 5 12l2 5', key: '1esawj' }],\n ['path', { d: 'm10 14 5 2 3.5-3.5', key: 'v8oal5' }],\n ['path', { d: 'm18 12 1-1 1 1-1 1Z', key: '1bh22v' }],\n]);\n\nexport default Usb;\n"],"names":[],"mappings":";;;;;;;;;AAaM,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAM,iBAAiB,KAAO,CAAA,CAAA,CAAA;AAAA,CAClC,CAAA,CAAC,QAAU,CAAA,CAAA,CAAA,CAAE,EAAI,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,EAAM,CAAI,CAAA,CAAA,CAAA,GAAA,CAAK,CAAA,CAAG,EAAA,CAAA,CAAA,CAAA,CAAA,CAAK,GAAK,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,EAAU,CAAA,CAAA;AAAA,CACvD,CAAA,CAAC,QAAU,CAAA,CAAA,CAAA,CAAE,EAAI,CAAA,CAAA,CAAA,CAAA,CAAA,EAAK,CAAI,CAAA,CAAA,C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CAAA,CAAA,CAAA,CAAA,CAAQ,CAAA,CAAA,CAAA,CAAE,GAAG,CAAuB,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;AACtD,CAAC,CAAA,CAAA;;"}
@@ -0,0 +1,3 @@
import {assert} from './index.js';
globalThis.assert = assert;
@@ -0,0 +1,170 @@
"use strict";
// A path exclusive reservation system
// reserve([list, of, paths], fn)
// When the fn is first in line for all its paths, it
// is called with a cb that clears the reservation.
//
// Used by async unpack to avoid clobbering paths in use,
// while still allowing maximal safe parallelization.
Object.defineProperty(exports, "__esModule", { value: true });
exports.PathReservations = void 0;
const node_path_1 = require("node:path");
const normalize_unicode_js_1 = require("./normalize-unicode.js");
const strip_trailing_slashes_js_1 = require("./strip-trailing-slashes.js");
const platform = process.env.TESTING_TAR_FAKE_PLATFORM || process.platform;
const isWindows = platform === 'win32';
// return a set of parent dirs for a given path
// '/a/b/c/d' -> ['/', '/a', '/a/b', '/a/b/c', '/a/b/c/d']
const getDirs = (path) => {
const dirs = path
.split('/')
.slice(0, -1)
.reduce((set, path) => {
const s = set.at(-1);
if (s !== undefined) {
path = (0, node_path_1.join)(s, path);
}
set.push(path || '/');
return set;
}, []);
return dirs;
};
class PathReservations {
// path => [function or Set]
// A Set object means a directory reservation
// A fn is a direct reservation on that path
#queues = new Map();
// fn => {paths:[path,...], dirs:[path, ...]}
#reservations = new Map();
// functions currently running
#running = new Set();
reserve(paths, fn) {
paths =
isWindows ?
['win32 parallelization disabled']
: paths.map(p => {
// don't need normPath, because we skip this entirely for windows
return (0, strip_trailing_slashes_js_1.stripTrailingSlashes)((0, node_path_1.join)((0, normalize_unicode_js_1.normalizeUnicode)(p)));
});
const dirs = new Set(paths.map(path => getDirs(path)).reduce((a, b) => a.concat(b)));
this.#reservations.set(fn, { dirs, paths });
for (const p of paths) {
const q = this.#queues.get(p);
if (!q) {
this.#queues.set(p, [fn]);
}
else {
q.push(fn);
}
}
for (const dir of dirs) {
const q = this.#queues.get(dir);
if (!q) {
this.#queues.set(dir, [new Set([fn])]);
}
else {
const l = q.at(-1);
if (l instanceof Set) {
l.add(fn);
}
else {
q.push(new Set([fn]));
}
}
}
return this.#run(fn);
}
// return the queues for each path the function cares about
// fn => {paths, dirs}
#getQueues(fn) {
const res = this.#reservations.get(fn);
/* c8 ignore start */
if (!res) {
throw new Error('function does not have any path reservations');
}
/* c8 ignore stop */
return {
paths: res.paths.map((path) => this.#queues.get(path)),
dirs: [...res.dirs].map(path => this.#queues.get(path)),
};
}
// check if fn is first in line for all its paths, and is
// included in the first set for all its dir queues
check(fn) {
const { paths, dirs } = this.#getQueues(fn);
return (paths.every(q => q && q[0] === fn) &&
dirs.every(q => q && q[0] instanceof Set && q[0].has(fn)));
}
// run the function if it's first in line and not already running
#run(fn) {
if (this.#running.has(fn) || !this.check(fn)) {
return false;
}
this.#running.add(fn);
fn(() => this.#clear(fn));
return true;
}
#clear(fn) {
if (!this.#running.has(fn)) {
return false;
}
const res = this.#reservations.get(fn);
/* c8 ignore start */
if (!res) {
throw new Error('invalid reservation');
}
/* c8 ignore stop */
const { paths, dirs } = res;
const next = new Set();
for (const path of paths) {
const q = this.#queues.get(path);
/* c8 ignore start */
if (!q || q?.[0] !== fn) {
continue;
}
/* c8 ignore stop */
const q0 = q[1];
if (!q0) {
this.#queues.delete(path);
continue;
}
q.shift();
if (typeof q0 === 'function') {
next.add(q0);
}
else {
for (const f of q0) {
next.add(f);
}
}
}
for (const dir of dirs) {
const q = this.#queues.get(dir);
const q0 = q?.[0];
/* c8 ignore next - type safety only */
if (!q || !(q0 instanceof Set))
continue;
if (q0.size === 1 && q.length === 1) {
this.#queues.delete(dir);
continue;
}
else if (q0.size === 1) {
q.shift();
// next one must be a function,
// or else the Set would've been reused
const n = q[0];
if (typeof n === 'function') {
next.add(n);
}
}
else {
q0.delete(fn);
}
}
this.#running.delete(fn);
next.forEach(fn => this.#run(fn));
return true;
}
}
exports.PathReservations = PathReservations;
//# sourceMappingURL=path-reservations.js.map
@@ -0,0 +1,19 @@
/**
* @license lucide-react v0.469.0 - ISC
*
* This source code is licensed under the ISC license.
* See the LICENSE file in the root directory of this source tree.
*/
import createLucideIcon from '../createLucideIcon.js';
const Gamepad = createLucideIcon("Gamepad", [
["line", { x1: "6", x2: "10", y1: "12", y2: "12", key: "161bw2" }],
["line", { x1: "8", x2: "8", y1: "10", y2: "14", key: "1i6ji0" }],
["line", { x1: "15", x2: "15.01", y1: "13", y2: "13", key: "dqpgro" }],
["line", { x1: "18", x2: "18.01", y1: "11", y2: "11", key: "meh2c" }],
["rect", { width: "20", height: "12", x: "2", y: "6", rx: "2", key: "9lu3g6" }]
]);
export { Gamepad as default };
//# sourceMappingURL=gamepad.js.map
@@ -0,0 +1,3 @@
import * as z from "./external.js";
export * from "./external.js";
export { z, z as default };
@@ -0,0 +1,42 @@
/**
* @fileoverview Rule to flag when initializing octal literal
* @author Ilya Volodin
*/
"use strict";
//------------------------------------------------------------------------------
// Rule Definition
//------------------------------------------------------------------------------
/** @type {import('../types').Rule.RuleModule} */
module.exports = {
meta: {
type: "suggestion",
docs: {
description: "Disallow octal literals",
recommended: true,
url: "https://eslint.org/docs/latest/rules/no-octal",
},
schema: [],
messages: {
noOctal: "Octal literals should not be used.",
},
},
create(context) {
return {
Literal(node) {
if (typeof node.value === "number" && /^0\d/u.test(node.raw)) {
context.report({
node,
messageId: "noOctal",
});
}
},
};
},
};
@@ -0,0 +1 @@
{"version":3,"names":["_gatherSequenceExpressions","require","toSequenceExpression","nodes","scope","length","declars","result","gatherSequenceExpressions","declar","push"],"sources":["../../src/converters/toSequenceExpression.ts"],"sourcesContent":["// TODO(Babel 8) Remove this file\nif (process.env.BABEL_8_BREAKING && process.env.IS_PUBLISH) {\n throw new Error(\n \"Internal Babel error: This file should only be loaded in Babel 7\",\n );\n}\n\nimport gatherSequenceExpressions from \"./gatherSequenceExpressions.ts\";\nimport type * as t from \"../index.ts\";\nimport type { DeclarationInfo } from \"./gatherSequenceExpressions.ts\";\n\n/**\n * Turn an array of statement `nodes` into a `SequenceExpression`.\n *\n * Variable declarations are turned into simple assignments and their\n * declarations hoisted to the top of the current scope.\n *\n * Expression statements are just resolved to their expression.\n */\nexport default function toSequenceExpression(\n nodes: readonly t.Node[],\n scope: any,\n): t.SequenceExpression | undefined {\n if (!nodes?.length) return;\n\n const declars: DeclarationInfo[] = [];\n const result = gatherSequenceExpressions(nodes, declars);\n if (!result) return;\n\n for (const declar of declars) {\n scope.push(declar);\n }\n\n // @ts-expect-error fixme: gatherSequenceExpressions will return an Expression when there are only one element\n return result;\n}\n"],"mappings":";;;;;;AAOA,IAAAA,0BAAA,GAAAC,OAAA;AAYe,SAASC,oBAAoBA,CAC1CC,KAAwB,EACxBC,KAAU,EACwB;EAClC,IAAI,EAACD,KAAK,YAALA,KAAK,CAAEE,MAAM,GAAE;EAEpB,MAAMC,OAA0B,GAAG,EAAE;EACrC,MAAMC,MAAM,GAAG,IAAAC,kCAAyB,EAACL,KAAK,EAAEG,OAAO,CAAC;EACxD,IAAI,CAACC,MAAM,EAAE;EAEb,KAAK,MAAME,MAAM,IAAIH,OAAO,EAAE;IAC5BF,KAAK,CAACM,IAAI,CAACD,MAAM,CAAC;EACpB;EAGA,OAAOF,MAAM;AACf","ignoreList":[]}
@@ -0,0 +1,30 @@
"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
exports.parseArrayDef = void 0;
const v3_1 = require("zod/v3");
const errorMessages_js_1 = require("../errorMessages.js");
const parseDef_js_1 = require("../parseDef.js");
function parseArrayDef(def, refs) {
const res = {
type: "array",
};
if (def.type?._def &&
def.type?._def?.typeName !== v3_1.ZodFirstPartyTypeKind.ZodAny) {
res.items = (0, parseDef_js_1.parseDef)(def.type._def, {
...refs,
currentPath: [...refs.currentPath, "items"],
});
}
if (def.minLength) {
(0, errorMessages_js_1.setResponseValueAndErrors)(res, "minItems", def.minLength.value, def.minLength.message, refs);
}
if (def.maxLength) {
(0, errorMessages_js_1.setResponseValueAndErrors)(res, "maxItems", def.maxLength.value, def.maxLength.message, refs);
}
if (def.exactLength) {
(0, errorMessages_js_1.setResponseValueAndErrors)(res, "minItems", def.exactLength.value, def.exactLength.message, refs);
(0, errorMessages_js_1.setResponseValueAndErrors)(res, "maxItems", def.exactLength.value, def.exactLength.message, refs);
}
return res;
}
exports.parseArrayDef = parseArrayDef;
@@ -0,0 +1,45 @@
/**
* @fileoverview Rule to flag usage of __proto__ property
* @author Ilya Volodin
*/
"use strict";
//------------------------------------------------------------------------------
// Requirements
//------------------------------------------------------------------------------
const { getStaticPropertyName } = require("./utils/ast-utils");
//------------------------------------------------------------------------------
// Rule Definition
//------------------------------------------------------------------------------
/** @type {import('../types').Rule.RuleModule} */
module.exports = {
meta: {
type: "suggestion",
docs: {
description: "Disallow the use of the `__proto__` property",
recommended: false,
url: "https://eslint.org/docs/latest/rules/no-proto",
},
schema: [],
messages: {
unexpectedProto: "The '__proto__' property is deprecated.",
},
},
create(context) {
return {
MemberExpression(node) {
if (getStaticPropertyName(node) === "__proto__") {
context.report({ node, messageId: "unexpectedProto" });
}
},
};
},
};
@@ -0,0 +1,3 @@
// Just reexport the types from cjs
// This is a bit indirect. There is not an index.js, but TypeScript will look for index.d.ts for types.
export * from './index.js';
@@ -0,0 +1 @@
{"version":3,"file":"alarm-plus.js","sources":[],"sourcesContent":[],"names":[],"mappings":";;;;;;;"}
@@ -0,0 +1,7 @@
import type { FlatConfig } from '@typescript-eslint/utils/ts-eslint';
/**
* Contains all of `stylistic`, along with additional stylistic rules that require type information.
* @see {@link https://typescript-eslint.io/users/configs#stylistic-type-checked}
*/
declare const _default: (plugin: FlatConfig.Plugin, parser: FlatConfig.Parser) => FlatConfig.ConfigArray;
export default _default;
@@ -0,0 +1,2 @@
import type { LibDefinition } from '../variable';
export declare const esnext_array: LibDefinition;
@@ -0,0 +1,89 @@
"use strict";
Object.defineProperty(exports, "__esModule", {
value: true
});
exports.default = void 0;
var _isValidIdentifier = require("../validators/isValidIdentifier.js");
var _index = require("../builders/generated/index.js");
var _default = exports.default = valueToNode;
const objectToString = Function.call.bind(Object.prototype.toString);
function isRegExp(value) {
return objectToString(value) === "[object RegExp]";
}
function isPlainObject(value) {
if (typeof value !== "object" || value === null || Object.prototype.toString.call(value) !== "[object Object]") {
return false;
}
const proto = Object.getPrototypeOf(value);
return proto === null || Object.getPrototypeOf(proto) === null;
}
function valueToNode(value) {
if (value === undefined) {
return (0, _index.identifier)("undefined");
}
if (value === true || value === false) {
return (0, _index.booleanLiteral)(value);
}
if (value === null) {
return (0, _index.nullLiteral)();
}
if (typeof value === "string") {
return (0, _index.stringLiteral)(value);
}
if (typeof value === "number") {
let result;
if (Number.isFinite(value)) {
result = (0, _index.numericLiteral)(Math.abs(value));
} else {
let numerator;
if (Number.isNaN(value)) {
numerator = (0, _index.numericLiteral)(0);
} else {
numerator = (0, _index.numericLiteral)(1);
}
result = (0, _index.binaryExpression)("/", numerator, (0, _index.numericLiteral)(0));
}
if (value < 0 || Object.is(value, -0)) {
result = (0, _index.unaryExpression)("-", result);
}
return result;
}
if (typeof value === "bigint") {
if (value < 0) {
return (0, _index.unaryExpression)("-", (0, _index.bigIntLiteral)(-value));
} else {
return (0, _index.bigIntLiteral)(value);
}
}
if (isRegExp(value)) {
const pattern = value.source;
const flags = /\/([a-z]*)$/.exec(value.toString())[1];
return (0, _index.regExpLiteral)(pattern, flags);
}
if (Array.isArray(value)) {
return (0, _index.arrayExpression)(value.map(valueToNode));
}
if (isPlainObject(value)) {
const props = [];
for (const key of Object.keys(value)) {
let nodeKey,
computed = false;
if ((0, _isValidIdentifier.default)(key)) {
if (key === "__proto__") {
computed = true;
nodeKey = (0, _index.stringLiteral)(key);
} else {
nodeKey = (0, _index.identifier)(key);
}
} else {
nodeKey = (0, _index.stringLiteral)(key);
}
props.push((0, _index.objectProperty)(nodeKey, valueToNode(value[key]), computed));
}
return (0, _index.objectExpression)(props);
}
throw new Error("don't know how to turn this value into a node");
}
//# sourceMappingURL=valueToNode.js.map
@@ -0,0 +1,7 @@
Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
const require_adapter_cloudflare_pages_conninfo = require("./conninfo.js");
const require_adapter_cloudflare_pages_handler = require("./handler.js");
exports.getConnInfo = require_adapter_cloudflare_pages_conninfo.getConnInfo;
exports.handle = require_adapter_cloudflare_pages_handler.handle;
exports.handleMiddleware = require_adapter_cloudflare_pages_handler.handleMiddleware;
exports.serveStatic = require_adapter_cloudflare_pages_handler.serveStatic;
@@ -0,0 +1,15 @@
var regexMatcher = (options, match) => {
if (match.regexName === 'recentYear') {
return {
warning: options.translations.warnings.recentYears,
suggestions: [options.translations.suggestions.recentYears, options.translations.suggestions.associatedYears]
};
}
return {
warning: null,
suggestions: []
};
};
export { regexMatcher as default };
//# sourceMappingURL=feedback.mjs.map
@@ -0,0 +1 @@
module.exports={A:{A:{"2":"_E"},B:{"1":"_K","2":"_I"},C:{"1":"_5J","2":"_KM"},D:{"1":"_5F","2":"_aD yB","194":"zB _WN"},E:{"1":"_JB","2":"_RB"},F:{"1":"_OI","2":"_RS","194":"_rB _7H"},G:{"1":"_9","2":"_iB"},H:{"2":"1D"},I:{"2":"_P"},J:{"2":"_B"},K:{"2":"_N"},L:{"194":"I"},M:{"1":"YC"},N:{"2":"_A"},O:{"2":"bC"},P:{"2":"J","194":"_U"},Q:{"2":"JE"},R:{"194":"KE"},S:{"1":"_C"}},B:5,C:"KeyboardEvent.code",D:true};
@@ -0,0 +1,21 @@
/**
* @license lucide-react v0.469.0 - ISC
*
* This source code is licensed under the ISC license.
* See the LICENSE file in the root directory of this source tree.
*/
import createLucideIcon from '../createLucideIcon.js';
const CircleFadingArrowUp = createLucideIcon("CircleFadingArrowUp", [
["path", { d: "M12 2a10 10 0 0 1 7.38 16.75", key: "175t95" }],
["path", { d: "m16 12-4-4-4 4", key: "177agl" }],
["path", { d: "M12 16V8", key: "1sbj14" }],
["path", { d: "M2.5 8.875a10 10 0 0 0-.5 3", key: "1vce0s" }],
["path", { d: "M2.83 16a10 10 0 0 0 2.43 3.4", key: "o3fkw4" }],
["path", { d: "M4.636 5.235a10 10 0 0 1 .891-.857", key: "1szpfk" }],
["path", { d: "M8.644 21.42a10 10 0 0 0 7.631-.38", key: "9yhvd4" }]
]);
export { CircleFadingArrowUp as default };
//# sourceMappingURL=circle-fading-arrow-up.js.map
@@ -0,0 +1,26 @@
'use strict'
const fs = require('graceful-fs').promises
const log = require('./log')
async function list (gyp, args) {
const devDir = gyp.devDir
log.verbose('list', 'using node-gyp dir:', devDir)
let versions = []
try {
const dir = await fs.readdir(devDir)
if (Array.isArray(dir)) {
versions = dir.filter((v) => v !== 'current')
}
} catch (err) {
if (err && err.code !== 'ENOENT') {
throw err
}
}
return versions
}
module.exports = list
module.exports.usage = 'Prints a listing of the currently installed node development files'
@@ -0,0 +1,2 @@
import type { LibDefinition } from '../variable';
export declare const es2015_core: LibDefinition;
@@ -0,0 +1,36 @@
"use strict";
var __importDefault = (this && this.__importDefault) || function (mod) {
return (mod && mod.__esModule) ? mod : { "default": mod };
};
Object.defineProperty(exports, "__esModule", { value: true });
exports.defaultErrorMap = void 0;
exports.setErrorMap = setErrorMap;
exports.getErrorMap = getErrorMap;
const en_js_1 = __importDefault(require("./locales/en.cjs"));
exports.defaultErrorMap = en_js_1.default;
let overrideErrorMap = en_js_1.default;
function setErrorMap(map) {
overrideErrorMap = map;
}
function getErrorMap() {
return overrideErrorMap;
}
// seal-cjs-exports
(function () {
var keys = Object.getOwnPropertyNames(exports);
for (var i = 0; i < keys.length; i++) {
var desc = Object.getOwnPropertyDescriptor(exports, keys[i]);
if (!desc || !desc.get || !desc.configurable) continue;
var value;
try {
value = desc.get();
} catch (e) {
continue;
}
// a circular require may not have settled this one yet, so leave it live
if (value === undefined) continue;
Object.defineProperty(exports, keys[i], { value: value, writable: false, enumerable: desc.enumerable, configurable: false });
}
Object.freeze(exports);
})();
@@ -0,0 +1,11 @@
import { toSPKI as exportPublic, toPKCS8 as exportPrivate } from '../lib/asn1.js';
import { keyToJWK } from '../lib/key_to_jwk.js';
export async function exportSPKI(key) {
return exportPublic(key);
}
export async function exportPKCS8(key) {
return exportPrivate(key);
}
export async function exportJWK(key) {
return keyToJWK(key);
}
@@ -0,0 +1 @@
module.exports={C:{"115":0.00767,"120":0.046,"121":0.11116,"127":0.00383,"140":0.00767,"147":0.00383,"150":0.01533,"151":0.00383,"152":0.046,"153":0.0115,"154":0.19165,"155":0.3488,"156":0.3603,_:"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 116 117 118 119 122 123 124 125 126 128 129 130 131 132 133 134 135 136 137 138 139 141 142 143 144 145 146 148 149 157 158 159 160 3.5 3.6"},D:{"77":0.01917,"80":0.00383,"81":0.03066,"83":0.0115,"89":0.00767,"92":0.0345,"93":0.00383,"95":0.00383,"97":0.00767,"101":0.00383,"103":0.0345,"104":0.01917,"105":0.02683,"106":0.01533,"107":0.01533,"108":0.023,"109":0.09583,"110":0.02683,"111":0.02683,"112":0.02683,"113":0.00383,"114":0.00383,"116":0.04983,"117":0.01917,"118":0.49829,"119":0.09199,"120":0.13799,"122":0.00383,"124":0.02683,"126":0.00767,"127":0.00383,"128":0.07283,"130":0.0115,"131":0.0575,"132":0.03066,"133":0.18782,"134":0.13416,"135":0.13416,"136":0.13032,"137":0.15715,"138":0.16099,"139":0.14182,"140":0.18398,"141":0.17632,"142":0.83559,"143":0.14949,"144":0.45229,"145":0.00767,"146":0.13799,"147":0.0345,"148":0.10349,"149":0.13416,"150":0.35647,"151":6.96073,"152":5.24354,"153":4.74142,"154":1.71335,"155":0.06899,"156":0.00383,_:"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 78 79 84 85 86 87 88 90 91 94 96 98 99 100 102 115 121 123 125 129 157"},F:{"95":0.00383,"134":0.01533,"135":0.27981,_:"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 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 9.5-9.6 10.0-10.1 10.5 10.6 11.1 11.5 11.6 12.1"},B:{"92":0.00767,"100":0.0115,"109":0.00383,"111":0.00383,"119":0.04983,"120":0.06133,"133":0.0115,"135":0.00383,"136":0.00383,"137":0.00383,"138":0.00767,"142":0.0115,"143":0.00383,"144":0.00383,"145":0.07283,"146":0.00767,"147":0.0115,"148":0.0115,"149":0.023,"150":0.06133,"151":0.53662,"152":2.08899,"153":2.57194,"154":0.72444,_:"12 13 14 15 16 17 18 79 80 81 83 84 85 86 87 88 89 90 91 93 94 95 96 97 98 99 101 102 103 104 105 106 107 108 110 112 113 114 115 116 117 118 121 122 123 124 125 126 127 128 129 130 131 132 134 139 140 141"},E:{"5":0.00383,"27":0.03833,_:"4 6 7 8 9 10 11 12 13 14 15 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.2 16.3 16.4 17.0 17.2 18.0 18.1 18.4 27.1 27.2 TP","15.6":0.046,"16.1":0.01533,"16.5":0.0115,"16.6":0.14949,"17.1":0.023,"17.3":0.0115,"17.4":0.00383,"17.5":0.00767,"17.6":0.06899,"18.2":0.58262,"18.3":0.01533,"18.5-18.7":0.046,"26.0":0.00383,"26.1":0.00767,"26.2":0.01533,"26.3":0.01533,"26.4":0.00767,"26.5":0.12649,"26.6":0.54812},G:{"8":0,"3.2":0,"4.0-4.1":0,"4.2-4.3":0.00088,"5.0-5.1":0.00088,"6.0-6.1":0,"7.0-7.1":0.00176,"8.1-8.4":0,"9.0-9.2":0,"9.3":0,"10.0-10.2":0,"10.3":0.00881,"11.0-11.2":0.00088,"11.3-11.4":0.00176,"12.0-12.1":0,"12.2-12.5":0.02291,"13.0-13.1":0,"13.2":0.00441,"13.3":0,"13.4-13.7":0.00088,"14.0-14.4":0.00352,"14.5-14.8":0.00529,"15.0-15.1":0.00529,"15.2-15.3":0.00352,"15.4":0.00441,"15.5":0.00529,"15.6-15.8":0.11455,"16.0":0.00881,"16.1":0.01586,"16.2":0.00881,"16.3":0.01938,"16.4":0.00441,"16.5":0.00705,"16.6-16.7":0.15948,"17.0":0.00617,"17.1":0.00881,"17.2":0.00881,"17.3":0.01322,"17.4":0.0185,"17.5":0.03613,"17.6-17.7":0.0934,"18.0":0.01938,"18.1":0.03877,"18.2":0.05287,"18.3":0.09164,"18.4":0.05727,"18.5-18.7":1.18335,"26.0":0.05727,"26.1":0.05815,"26.2":0.15155,"26.3":0.16389,"26.4":0.11983,"26.5":0.8027,"26.6":4.95278,"27.0":0.37976,"27.1":0,"27.2":0.00969},P:{"4":0.00913,"21":0.01827,"22":0.10047,"23":0.0274,"24":0.06394,"25":0.13701,"26":0.13701,"27":0.50236,"28":1.26046,"29":0.89511,"30":4.74043,_:"20 5.0-5.4 6.2-6.4 8.2 10.1 11.1-11.2 12.0 13.0 14.0 15.0 16.0 17.0 19.0","7.2-7.4":0.15527,"9.2":0.00913,"18.0":0.00913},I:{"0":0.09243,"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.00004},K:{"0":0.29597,_:"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":46.85634},R:{_:"0"},M:{"0":0.25897},Q:{_:"14.9"},O:{"0":0.40079},H:{all:0}};
@@ -0,0 +1 @@
{"version":3,"file":"routerContext.cjs","names":[],"sources":["../../src/routerContext.tsx"],"sourcesContent":["'use client'\n\nimport * as React from 'react'\nimport type { AnyRouter } from '@tanstack/router-core'\n\nexport const routerContext = React.createContext<AnyRouter>(null!)\n"],"mappings":";;;;;AAKA,IAAa,gBAAgB,MAAM,cAAyB,KAAM"}
@@ -0,0 +1,21 @@
// packages/react/use-rect/src/use-rect.tsx
import * as React from "react";
import { observeElementRect } from "@radix-ui/rect";
function useRect(measurable) {
const [rect, setRect] = React.useState();
React.useEffect(() => {
if (measurable) {
const unobserve = observeElementRect(measurable, setRect);
return () => {
setRect(void 0);
unobserve();
};
}
return;
}, [measurable]);
return rect;
}
export {
useRect
};
//# sourceMappingURL=index.mjs.map
@@ -0,0 +1,17 @@
/**
* @license lucide-react v0.469.0 - ISC
*
* This source code is licensed under the ISC license.
* See the LICENSE file in the root directory of this source tree.
*/
import createLucideIcon from '../createLucideIcon.js';
const Image = createLucideIcon("Image", [
["rect", { width: "18", height: "18", x: "3", y: "3", rx: "2", ry: "2", key: "1m3agn" }],
["circle", { cx: "9", cy: "9", r: "2", key: "af1f0g" }],
["path", { d: "m21 15-3.086-3.086a2 2 0 0 0-2.828 0L6 21", key: "1xmnt7" }]
]);
export { Image as default };
//# sourceMappingURL=image.js.map
@@ -0,0 +1,2 @@
import type Ajv from "../../core";
export default function addMetaSchema2020(this: Ajv, $data?: boolean): Ajv;
@@ -0,0 +1 @@
{"version":3,"names":["_assertClassBrand","require","_classPrivateFieldGet2","privateMap","receiver","get","assertClassBrand"],"sources":["../../src/helpers/classPrivateFieldGet2.ts"],"sourcesContent":["/* @minVersion 7.24.0 */\n\nimport assertClassBrand from \"./assertClassBrand.ts\";\n\nexport default function _classPrivateFieldGet2(\n privateMap: WeakMap<any, any>,\n receiver: any,\n) {\n return privateMap.get(assertClassBrand(privateMap, receiver));\n}\n"],"mappings":";;;;;;AAEA,IAAAA,iBAAA,GAAAC,OAAA;AAEe,SAASC,sBAAsBA,CAC5CC,UAA6B,EAC7BC,QAAa,EACb;EACA,OAAOD,UAAU,CAACE,GAAG,CAAC,IAAAC,yBAAgB,EAACH,UAAU,EAAEC,QAAQ,CAAC,CAAC;AAC/D","ignoreList":[]}
@@ -0,0 +1,15 @@
import { RouterServer } from "./RouterServer.js";
import { renderRouterToStream } from "./renderRouterToStream.js";
import { jsx } from "react/jsx-runtime";
import { defineHandlerCallback } from "@tanstack/router-core/ssr/server";
//#region src/ssr/defaultStreamHandler.tsx
var defaultStreamHandler = defineHandlerCallback(({ request, router, responseHeaders }) => renderRouterToStream({
request,
router,
responseHeaders,
children: /* @__PURE__ */ jsx(RouterServer, { router })
}));
//#endregion
export { defaultStreamHandler };
//# sourceMappingURL=defaultStreamHandler.js.map
@@ -0,0 +1,6 @@
//#region src/isServer/client.ts
const isServer = false;
//#endregion
export { isServer };
//# sourceMappingURL=client.js.map
@@ -0,0 +1,34 @@
import { IDelay } from "./delay.interface";
import { IBackOffOptions } from "../options";
import { JitterFactory } from "../jitter/jitter.factory";
export abstract class Delay implements IDelay {
protected attempt = 0;
constructor(private options: IBackOffOptions) {}
public apply() {
return new Promise(resolve => setTimeout(resolve, this.jitteredDelay));
}
public setAttemptNumber(attempt: number) {
this.attempt = attempt;
}
private get jitteredDelay() {
const jitter = JitterFactory(this.options);
return jitter(this.delay);
}
private get delay() {
const constant = this.options.startingDelay;
const base = this.options.timeMultiple;
const power = this.numOfDelayedAttempts;
const delay = constant * Math.pow(base, power);
return Math.min(delay, this.options.maxDelay);
}
protected get numOfDelayedAttempts() {
return this.attempt;
}
}
@@ -0,0 +1,201 @@
Apache License
Version 2.0, January 2004
http://www.apache.org/licenses/
TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION
1. Definitions.
"License" shall mean the terms and conditions for use, reproduction,
and distribution as defined by Sections 1 through 9 of this document.
"Licensor" shall mean the copyright owner or entity authorized by
the copyright owner that is granting the License.
"Legal Entity" shall mean the union of the acting entity and all
other entities that control, are controlled by, or are under common
control with that entity. For the purposes of this definition,
"control" means (i) the power, direct or indirect, to cause the
direction or management of such entity, whether by contract or
otherwise, or (ii) ownership of fifty percent (50%) or more of the
outstanding shares, or (iii) beneficial ownership of such entity.
"You" (or "Your") shall mean an individual or Legal Entity
exercising permissions granted by this License.
"Source" form shall mean the preferred form for making modifications,
including but not limited to software source code, documentation
source, and configuration files.
"Object" form shall mean any form resulting from mechanical
transformation or translation of a Source form, including but
not limited to compiled object code, generated documentation,
and conversions to other media types.
"Work" shall mean the work of authorship, whether in Source or
Object form, made available under the License, as indicated by a
copyright notice that is included in or attached to the work
(an example is provided in the Appendix below).
"Derivative Works" shall mean any work, whether in Source or Object
form, that is based on (or derived from) the Work and for which the
editorial revisions, annotations, elaborations, or other modifications
represent, as a whole, an original work of authorship. For the purposes
of this License, Derivative Works shall not include works that remain
separable from, or merely link (or bind by name) to the interfaces of,
the Work and Derivative Works thereof.
"Contribution" shall mean any work of authorship, including
the original version of the Work and any modifications or additions
to that Work or Derivative Works thereof, that is intentionally
submitted to Licensor for inclusion in the Work by the copyright owner
or by an individual or Legal Entity authorized to submit on behalf of
the copyright owner. For the purposes of this definition, "submitted"
means any form of electronic, verbal, or written communication sent
to the Licensor or its representatives, including but not limited to
communication on electronic mailing lists, source code control systems,
and issue tracking systems that are managed by, or on behalf of, the
Licensor for the purpose of discussing and improving the Work, but
excluding communication that is conspicuously marked or otherwise
designated in writing by the copyright owner as "Not a Contribution."
"Contributor" shall mean Licensor and any individual or Legal Entity
on behalf of whom a Contribution has been received by Licensor and
subsequently incorporated within the Work.
2. Grant of Copyright License. Subject to the terms and conditions of
this License, each Contributor hereby grants to You a perpetual,
worldwide, non-exclusive, no-charge, royalty-free, irrevocable
copyright license to reproduce, prepare Derivative Works of,
publicly display, publicly perform, sublicense, and distribute the
Work and such Derivative Works in Source or Object form.
3. Grant of Patent License. Subject to the terms and conditions of
this License, each Contributor hereby grants to You a perpetual,
worldwide, non-exclusive, no-charge, royalty-free, irrevocable
(except as stated in this section) patent license to make, have made,
use, offer to sell, sell, import, and otherwise transfer the Work,
where such license applies only to those patent claims licensable
by such Contributor that are necessarily infringed by their
Contribution(s) alone or by combination of their Contribution(s)
with the Work to which such Contribution(s) was submitted. If You
institute patent litigation against any entity (including a
cross-claim or counterclaim in a lawsuit) alleging that the Work
or a Contribution incorporated within the Work constitutes direct
or contributory patent infringement, then any patent licenses
granted to You under this License for that Work shall terminate
as of the date such litigation is filed.
4. Redistribution. You may reproduce and distribute copies of the
Work or Derivative Works thereof in any medium, with or without
modifications, and in Source or Object form, provided that You
meet the following conditions:
(a) You must give any other recipients of the Work or
Derivative Works a copy of this License; and
(b) You must cause any modified files to carry prominent notices
stating that You changed the files; and
(c) You must retain, in the Source form of any Derivative Works
that You distribute, all copyright, patent, trademark, and
attribution notices from the Source form of the Work,
excluding those notices that do not pertain to any part of
the Derivative Works; and
(d) If the Work includes a "NOTICE" text file as part of its
distribution, then any Derivative Works that You distribute must
include a readable copy of the attribution notices contained
within such NOTICE file, excluding those notices that do not
pertain to any part of the Derivative Works, in at least one
of the following places: within a NOTICE text file distributed
as part of the Derivative Works; within the Source form or
documentation, if provided along with the Derivative Works; or,
within a display generated by the Derivative Works, if and
wherever such third-party notices normally appear. The contents
of the NOTICE file are for informational purposes only and
do not modify the License. You may add Your own attribution
notices within Derivative Works that You distribute, alongside
or as an addendum to the NOTICE text from the Work, provided
that such additional attribution notices cannot be construed
as modifying the License.
You may add Your own copyright statement to Your modifications and
may provide additional or different license terms and conditions
for use, reproduction, or distribution of Your modifications, or
for any such Derivative Works as a whole, provided Your use,
reproduction, and distribution of the Work otherwise complies with
the conditions stated in this License.
5. Submission of Contributions. Unless You explicitly state otherwise,
any Contribution intentionally submitted for inclusion in the Work
by You to the Licensor shall be under the terms and conditions of
this License, without any additional terms or conditions.
Notwithstanding the above, nothing herein shall supersede or modify
the terms of any separate license agreement you may have executed
with Licensor regarding such Contributions.
6. Trademarks. This License does not grant permission to use the trade
names, trademarks, service marks, or product names of the Licensor,
except as required for reasonable and customary use in describing the
origin of the Work and reproducing the content of the NOTICE file.
7. Disclaimer of Warranty. Unless required by applicable law or
agreed to in writing, Licensor provides the Work (and each
Contributor provides its Contributions) on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
implied, including, without limitation, any warranties or conditions
of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A
PARTICULAR PURPOSE. You are solely responsible for determining the
appropriateness of using or redistributing the Work and assume any
risks associated with Your exercise of permissions under this License.
8. Limitation of Liability. In no event and under no legal theory,
whether in tort (including negligence), contract, or otherwise,
unless required by applicable law (such as deliberate and grossly
negligent acts) or agreed to in writing, shall any Contributor be
liable to You for damages, including any direct, indirect, special,
incidental, or consequential damages of any character arising as a
result of this License or out of the use or inability to use the
Work (including but not limited to damages for loss of goodwill,
work stoppage, computer failure or malfunction, or any and all
other commercial damages or losses), even if such Contributor
has been advised of the possibility of such damages.
9. Accepting Warranty or Additional Liability. While redistributing
the Work or Derivative Works thereof, You may choose to offer,
and charge a fee for, acceptance of support, warranty, indemnity,
or other liability obligations and/or rights consistent with this
License. However, in accepting such obligations, You may act only
on Your own behalf and on Your sole responsibility, not on behalf
of any other Contributor, and only if You agree to indemnify,
defend, and hold each Contributor harmless for any liability
incurred by, or claims asserted against, such Contributor by reason
of your accepting any such warranty or additional liability.
END OF TERMS AND CONDITIONS
APPENDIX: How to apply the Apache License to your work.
To apply the Apache License to your work, attach the following
boilerplate notice, with the fields enclosed by brackets "[]"
replaced with your own identifying information. (Don't include
the brackets!) The text should be enclosed in the appropriate
comment syntax for the file format. We also recommend that a
file or class name and description of purpose be included on the
same "printed page" as the copyright notice for easier
identification within third-party archives.
Copyright [yyyy] [name of copyright owner]
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.
@@ -0,0 +1,3 @@
import type { TSESTree } from '@typescript-eslint/utils';
import type { SourceCode } from '@typescript-eslint/utils/ts-eslint';
export declare function isReferenceToGlobalFunction(calleeName: string, node: TSESTree.Node, sourceCode: SourceCode): boolean;
@@ -0,0 +1,75 @@
/*! *****************************************************************************
Copyright (c) Microsoft Corporation. All rights reserved.
Licensed under the Apache License, Version 2.0 (the "License"); you may not use
this file except in compliance with the License. You may obtain a copy of the
License at http://www.apache.org/licenses/LICENSE-2.0
THIS CODE IS PROVIDED ON AN *AS IS* BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
KIND, EITHER EXPRESS OR IMPLIED, INCLUDING WITHOUT LIMITATION ANY IMPLIED
WARRANTIES OR CONDITIONS OF TITLE, FITNESS FOR A PARTICULAR PURPOSE,
MERCHANTABILITY OR NON-INFRINGEMENT.
See the Apache Version 2.0 License for specific language governing permissions
and limitations under the License.
***************************************************************************** */
/// <reference lib="es2018.asynciterable" />
interface AsyncGenerator<T = unknown, TReturn = any, TNext = any> extends AsyncIteratorObject<T, TReturn, TNext> {
// NOTE: 'next' is defined using a tuple to ensure we report the correct assignability errors in all places.
next(...[value]: [] | [TNext]): Promise<IteratorResult<T, TReturn>>;
return(value: TReturn | PromiseLike<TReturn>): Promise<IteratorResult<T, TReturn>>;
throw(e: any): Promise<IteratorResult<T, TReturn>>;
[Symbol.asyncIterator](): AsyncGenerator<T, TReturn, TNext>;
}
interface AsyncGeneratorFunction {
/**
* Creates a new AsyncGenerator object.
* @param args A list of arguments the function accepts.
*/
new (...args: any[]): AsyncGenerator;
/**
* Creates a new AsyncGenerator object.
* @param args A list of arguments the function accepts.
*/
(...args: any[]): AsyncGenerator;
/**
* The length of the arguments.
*/
readonly length: number;
/**
* Returns the name of the function.
*/
readonly name: string;
/**
* A reference to the prototype.
*/
readonly prototype: AsyncGenerator;
}
interface AsyncGeneratorFunctionConstructor {
/**
* Creates a new AsyncGenerator function.
* @param args A list of arguments the function accepts.
*/
new (...args: string[]): AsyncGeneratorFunction;
/**
* Creates a new AsyncGenerator function.
* @param args A list of arguments the function accepts.
*/
(...args: string[]): AsyncGeneratorFunction;
/**
* The length of the arguments.
*/
readonly length: number;
/**
* Returns the name of the function.
*/
readonly name: string;
/**
* A reference to the prototype.
*/
readonly prototype: AsyncGeneratorFunction;
}
@@ -0,0 +1 @@
{"version":3,"file":"arrow-up-left-square.js","sources":[],"sourcesContent":[],"names":[],"mappings":";;;;;;;"}
@@ -0,0 +1,14 @@
import { ZodBigIntDef } from "zod/v3";
import { Refs } from "../Refs.js";
import { ErrorMessages } from "../errorMessages.js";
export type JsonSchema7BigintType = {
type: "integer";
format: "int64";
minimum?: BigInt;
exclusiveMinimum?: BigInt;
maximum?: BigInt;
exclusiveMaximum?: BigInt;
multipleOf?: BigInt;
errorMessage?: ErrorMessages<JsonSchema7BigintType>;
};
export declare function parseBigintDef(def: ZodBigIntDef, refs: Refs): JsonSchema7BigintType;
@@ -0,0 +1 @@
{"version":3,"file":"piggy-bank.js","sources":["../../../src/icons/piggy-bank.ts"],"sourcesContent":["import createLucideIcon from '../createLucideIcon';\n\n/**\n * @component @name PiggyBank\n * @description Lucide SVG icon component, renders SVG Element with children.\n *\n * @preview ![img](data:image/svg+xml;base64,PHN2ZyAgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIgogIHdpZHRoPSIyNCIKICBoZWlnaHQ9IjI0IgogIHZpZXdCb3g9IjAgMCAyNCAyNCIKICBmaWxsPSJub25lIgogIHN0cm9rZT0iIzAwMCIgc3R5bGU9ImJhY2tncm91bmQtY29sb3I6ICNmZmY7IGJvcmRlci1yYWRpdXM6IDJweCIKICBzdHJva2Utd2lkdGg9IjIiCiAgc3Ryb2tlLWxpbmVjYXA9InJvdW5kIgogIHN0cm9rZS1saW5lam9pbj0icm91bmQiCj4KICA8cGF0aCBkPSJNMTkgNWMtMS41IDAtMi44IDEuNC0zIDItMy41LTEuNS0xMS0uMy0xMSA1IDAgMS44IDAgMyAyIDQuNVYyMGg0di0yaDN2Mmg0di00YzEtLjUgMS43LTEgMi0yaDJ2LTRoLTJjMC0xLS41LTEuNS0xLTJWNXoiIC8+CiAgPHBhdGggZD0iTTIgOXYxYzAgMS4xLjkgMiAyIDJoMSIgLz4KICA8cGF0aCBkPSJNMTYgMTFoLjAxIiAvPgo8L3N2Zz4K) - https://lucide.dev/icons/piggy-bank\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 PiggyBank = createLucideIcon('PiggyBank', [\n [\n 'path',\n {\n d: 'M19 5c-1.5 0-2.8 1.4-3 2-3.5-1.5-11-.3-11 5 0 1.8 0 3 2 4.5V20h4v-2h3v2h4v-4c1-.5 1.7-1 2-2h2v-4h-2c0-1-.5-1.5-1-2V5z',\n key: '1ivx2i',\n },\n ],\n ['path', { d: 'M2 9v1c0 1.1.9 2 2 2h1', key: 'nm575m' }],\n ['path', { d: 'M16 11h.01', key: 'xkw8gn' }],\n]);\n\nexport default PiggyBank;\n"],"names":[],"mappings":";;;;;;;;;AAaM,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAY,iBAAiB,WAAa,CAAA,CAAA,CAAA;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A,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,CACvD,CAAC,CAAA,CAAA,CAAA,CAAA,CAAA,CAAQ,CAAA,CAAA,CAAA,CAAE,GAAG,CAAc,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAK,UAAU,CAAA;AAC7C,CAAC,CAAA,CAAA;;"}
@@ -0,0 +1,17 @@
/**
* @license lucide-react v0.469.0 - ISC
*
* This source code is licensed under the ISC license.
* See the LICENSE file in the root directory of this source tree.
*/
import createLucideIcon from '../createLucideIcon.js';
const Baseline = createLucideIcon("Baseline", [
["path", { d: "M4 20h16", key: "14thso" }],
["path", { d: "m6 16 6-12 6 12", key: "1b4byz" }],
["path", { d: "M8 12h8", key: "1wcyev" }]
]);
export { Baseline as default };
//# sourceMappingURL=baseline.js.map
@@ -0,0 +1,536 @@
"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 (mod) {
if (mod && mod.__esModule) return mod;
var result = {};
if (mod != null) for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k);
__setModuleDefault(result, mod);
return result;
};
var __importDefault = (this && this.__importDefault) || function (mod) {
return (mod && mod.__esModule) ? mod : { "default": mod };
};
Object.defineProperty(exports, "__esModule", { value: true });
exports.decodeXML = exports.decodeHTMLStrict = exports.decodeHTMLAttribute = exports.decodeHTML = exports.determineBranch = exports.EntityDecoder = exports.DecodingMode = exports.BinTrieFlags = exports.fromCodePoint = exports.replaceCodePoint = exports.decodeCodePoint = exports.xmlDecodeTree = exports.htmlDecodeTree = void 0;
var decode_data_html_js_1 = __importDefault(require("./generated/decode-data-html.js"));
exports.htmlDecodeTree = decode_data_html_js_1.default;
var decode_data_xml_js_1 = __importDefault(require("./generated/decode-data-xml.js"));
exports.xmlDecodeTree = decode_data_xml_js_1.default;
var decode_codepoint_js_1 = __importStar(require("./decode_codepoint.js"));
exports.decodeCodePoint = decode_codepoint_js_1.default;
var decode_codepoint_js_2 = require("./decode_codepoint.js");
Object.defineProperty(exports, "replaceCodePoint", { enumerable: true, get: function () { return decode_codepoint_js_2.replaceCodePoint; } });
Object.defineProperty(exports, "fromCodePoint", { enumerable: true, get: function () { return decode_codepoint_js_2.fromCodePoint; } });
var CharCodes;
(function (CharCodes) {
CharCodes[CharCodes["NUM"] = 35] = "NUM";
CharCodes[CharCodes["SEMI"] = 59] = "SEMI";
CharCodes[CharCodes["EQUALS"] = 61] = "EQUALS";
CharCodes[CharCodes["ZERO"] = 48] = "ZERO";
CharCodes[CharCodes["NINE"] = 57] = "NINE";
CharCodes[CharCodes["LOWER_A"] = 97] = "LOWER_A";
CharCodes[CharCodes["LOWER_F"] = 102] = "LOWER_F";
CharCodes[CharCodes["LOWER_X"] = 120] = "LOWER_X";
CharCodes[CharCodes["LOWER_Z"] = 122] = "LOWER_Z";
CharCodes[CharCodes["UPPER_A"] = 65] = "UPPER_A";
CharCodes[CharCodes["UPPER_F"] = 70] = "UPPER_F";
CharCodes[CharCodes["UPPER_Z"] = 90] = "UPPER_Z";
})(CharCodes || (CharCodes = {}));
/** Bit that needs to be set to convert an upper case ASCII character to lower case */
var TO_LOWER_BIT = 32;
var BinTrieFlags;
(function (BinTrieFlags) {
BinTrieFlags[BinTrieFlags["VALUE_LENGTH"] = 49152] = "VALUE_LENGTH";
BinTrieFlags[BinTrieFlags["BRANCH_LENGTH"] = 16256] = "BRANCH_LENGTH";
BinTrieFlags[BinTrieFlags["JUMP_TABLE"] = 127] = "JUMP_TABLE";
})(BinTrieFlags = exports.BinTrieFlags || (exports.BinTrieFlags = {}));
function isNumber(code) {
return code >= CharCodes.ZERO && code <= CharCodes.NINE;
}
function isHexadecimalCharacter(code) {
return ((code >= CharCodes.UPPER_A && code <= CharCodes.UPPER_F) ||
(code >= CharCodes.LOWER_A && code <= CharCodes.LOWER_F));
}
function isAsciiAlphaNumeric(code) {
return ((code >= CharCodes.UPPER_A && code <= CharCodes.UPPER_Z) ||
(code >= CharCodes.LOWER_A && code <= CharCodes.LOWER_Z) ||
isNumber(code));
}
/**
* Checks if the given character is a valid end character for an entity in an attribute.
*
* Attribute values that aren't terminated properly aren't parsed, and shouldn't lead to a parser error.
* See the example in https://html.spec.whatwg.org/multipage/parsing.html#named-character-reference-state
*/
function isEntityInAttributeInvalidEnd(code) {
return code === CharCodes.EQUALS || isAsciiAlphaNumeric(code);
}
var EntityDecoderState;
(function (EntityDecoderState) {
EntityDecoderState[EntityDecoderState["EntityStart"] = 0] = "EntityStart";
EntityDecoderState[EntityDecoderState["NumericStart"] = 1] = "NumericStart";
EntityDecoderState[EntityDecoderState["NumericDecimal"] = 2] = "NumericDecimal";
EntityDecoderState[EntityDecoderState["NumericHex"] = 3] = "NumericHex";
EntityDecoderState[EntityDecoderState["NamedEntity"] = 4] = "NamedEntity";
})(EntityDecoderState || (EntityDecoderState = {}));
var DecodingMode;
(function (DecodingMode) {
/** Entities in text nodes that can end with any character. */
DecodingMode[DecodingMode["Legacy"] = 0] = "Legacy";
/** Only allow entities terminated with a semicolon. */
DecodingMode[DecodingMode["Strict"] = 1] = "Strict";
/** Entities in attributes have limitations on ending characters. */
DecodingMode[DecodingMode["Attribute"] = 2] = "Attribute";
})(DecodingMode = exports.DecodingMode || (exports.DecodingMode = {}));
/**
* Token decoder with support of writing partial entities.
*/
var EntityDecoder = /** @class */ (function () {
function EntityDecoder(
/** The tree used to decode entities. */
decodeTree,
/**
* The function that is called when a codepoint is decoded.
*
* For multi-byte named entities, this will be called multiple times,
* with the second codepoint, and the same `consumed` value.
*
* @param codepoint The decoded codepoint.
* @param consumed The number of bytes consumed by the decoder.
*/
emitCodePoint,
/** An object that is used to produce errors. */
errors) {
this.decodeTree = decodeTree;
this.emitCodePoint = emitCodePoint;
this.errors = errors;
/** The current state of the decoder. */
this.state = EntityDecoderState.EntityStart;
/** Characters that were consumed while parsing an entity. */
this.consumed = 1;
/**
* The result of the entity.
*
* Either the result index of a numeric entity, or the codepoint of a
* numeric entity.
*/
this.result = 0;
/** The current index in the decode tree. */
this.treeIndex = 0;
/** The number of characters that were consumed in excess. */
this.excess = 1;
/** The mode in which the decoder is operating. */
this.decodeMode = DecodingMode.Strict;
}
/** Resets the instance to make it reusable. */
EntityDecoder.prototype.startEntity = function (decodeMode) {
this.decodeMode = decodeMode;
this.state = EntityDecoderState.EntityStart;
this.result = 0;
this.treeIndex = 0;
this.excess = 1;
this.consumed = 1;
};
/**
* Write an entity to the decoder. This can be called multiple times with partial entities.
* If the entity is incomplete, the decoder will return -1.
*
* Mirrors the implementation of `getDecoder`, but with the ability to stop decoding if the
* entity is incomplete, and resume when the next string is written.
*
* @param string The string containing the entity (or a continuation of the entity).
* @param offset The offset at which the entity begins. Should be 0 if this is not the first call.
* @returns The number of characters that were consumed, or -1 if the entity is incomplete.
*/
EntityDecoder.prototype.write = function (str, offset) {
switch (this.state) {
case EntityDecoderState.EntityStart: {
if (str.charCodeAt(offset) === CharCodes.NUM) {
this.state = EntityDecoderState.NumericStart;
this.consumed += 1;
return this.stateNumericStart(str, offset + 1);
}
this.state = EntityDecoderState.NamedEntity;
return this.stateNamedEntity(str, offset);
}
case EntityDecoderState.NumericStart: {
return this.stateNumericStart(str, offset);
}
case EntityDecoderState.NumericDecimal: {
return this.stateNumericDecimal(str, offset);
}
case EntityDecoderState.NumericHex: {
return this.stateNumericHex(str, offset);
}
case EntityDecoderState.NamedEntity: {
return this.stateNamedEntity(str, offset);
}
}
};
/**
* Switches between the numeric decimal and hexadecimal states.
*
* Equivalent to the `Numeric character reference state` in the HTML spec.
*
* @param str The string containing the entity (or a continuation of the entity).
* @param offset The current offset.
* @returns The number of characters that were consumed, or -1 if the entity is incomplete.
*/
EntityDecoder.prototype.stateNumericStart = function (str, offset) {
if (offset >= str.length) {
return -1;
}
if ((str.charCodeAt(offset) | TO_LOWER_BIT) === CharCodes.LOWER_X) {
this.state = EntityDecoderState.NumericHex;
this.consumed += 1;
return this.stateNumericHex(str, offset + 1);
}
this.state = EntityDecoderState.NumericDecimal;
return this.stateNumericDecimal(str, offset);
};
EntityDecoder.prototype.addToNumericResult = function (str, start, end, base) {
if (start !== end) {
var digitCount = end - start;
this.result =
this.result * Math.pow(base, digitCount) +
parseInt(str.substr(start, digitCount), base);
this.consumed += digitCount;
}
};
/**
* Parses a hexadecimal numeric entity.
*
* Equivalent to the `Hexademical character reference state` in the HTML spec.
*
* @param str The string containing the entity (or a continuation of the entity).
* @param offset The current offset.
* @returns The number of characters that were consumed, or -1 if the entity is incomplete.
*/
EntityDecoder.prototype.stateNumericHex = function (str, offset) {
var startIdx = offset;
while (offset < str.length) {
var char = str.charCodeAt(offset);
if (isNumber(char) || isHexadecimalCharacter(char)) {
offset += 1;
}
else {
this.addToNumericResult(str, startIdx, offset, 16);
return this.emitNumericEntity(char, 3);
}
}
this.addToNumericResult(str, startIdx, offset, 16);
return -1;
};
/**
* Parses a decimal numeric entity.
*
* Equivalent to the `Decimal character reference state` in the HTML spec.
*
* @param str The string containing the entity (or a continuation of the entity).
* @param offset The current offset.
* @returns The number of characters that were consumed, or -1 if the entity is incomplete.
*/
EntityDecoder.prototype.stateNumericDecimal = function (str, offset) {
var startIdx = offset;
while (offset < str.length) {
var char = str.charCodeAt(offset);
if (isNumber(char)) {
offset += 1;
}
else {
this.addToNumericResult(str, startIdx, offset, 10);
return this.emitNumericEntity(char, 2);
}
}
this.addToNumericResult(str, startIdx, offset, 10);
return -1;
};
/**
* Validate and emit a numeric entity.
*
* Implements the logic from the `Hexademical character reference start
* state` and `Numeric character reference end state` in the HTML spec.
*
* @param lastCp The last code point of the entity. Used to see if the
* entity was terminated with a semicolon.
* @param expectedLength The minimum number of characters that should be
* consumed. Used to validate that at least one digit
* was consumed.
* @returns The number of characters that were consumed.
*/
EntityDecoder.prototype.emitNumericEntity = function (lastCp, expectedLength) {
var _a;
// Ensure we consumed at least one digit.
if (this.consumed <= expectedLength) {
(_a = this.errors) === null || _a === void 0 ? void 0 : _a.absenceOfDigitsInNumericCharacterReference(this.consumed);
return 0;
}
// Figure out if this is a legit end of the entity
if (lastCp === CharCodes.SEMI) {
this.consumed += 1;
}
else if (this.decodeMode === DecodingMode.Strict) {
return 0;
}
this.emitCodePoint((0, decode_codepoint_js_1.replaceCodePoint)(this.result), this.consumed);
if (this.errors) {
if (lastCp !== CharCodes.SEMI) {
this.errors.missingSemicolonAfterCharacterReference();
}
this.errors.validateNumericCharacterReference(this.result);
}
return this.consumed;
};
/**
* Parses a named entity.
*
* Equivalent to the `Named character reference state` in the HTML spec.
*
* @param str The string containing the entity (or a continuation of the entity).
* @param offset The current offset.
* @returns The number of characters that were consumed, or -1 if the entity is incomplete.
*/
EntityDecoder.prototype.stateNamedEntity = function (str, offset) {
var decodeTree = this.decodeTree;
var current = decodeTree[this.treeIndex];
// The mask is the number of bytes of the value, including the current byte.
var valueLength = (current & BinTrieFlags.VALUE_LENGTH) >> 14;
for (; offset < str.length; offset++, this.excess++) {
var char = str.charCodeAt(offset);
this.treeIndex = determineBranch(decodeTree, current, this.treeIndex + Math.max(1, valueLength), char);
if (this.treeIndex < 0) {
return this.result === 0 ||
// If we are parsing an attribute
(this.decodeMode === DecodingMode.Attribute &&
// We shouldn't have consumed any characters after the entity,
(valueLength === 0 ||
// And there should be no invalid characters.
isEntityInAttributeInvalidEnd(char)))
? 0
: this.emitNotTerminatedNamedEntity();
}
current = decodeTree[this.treeIndex];
valueLength = (current & BinTrieFlags.VALUE_LENGTH) >> 14;
// If the branch is a value, store it and continue
if (valueLength !== 0) {
// If the entity is terminated by a semicolon, we are done.
if (char === CharCodes.SEMI) {
return this.emitNamedEntityData(this.treeIndex, valueLength, this.consumed + this.excess);
}
// If we encounter a non-terminated (legacy) entity while parsing strictly, then ignore it.
if (this.decodeMode !== DecodingMode.Strict) {
this.result = this.treeIndex;
this.consumed += this.excess;
this.excess = 0;
}
}
}
return -1;
};
/**
* Emit a named entity that was not terminated with a semicolon.
*
* @returns The number of characters consumed.
*/
EntityDecoder.prototype.emitNotTerminatedNamedEntity = function () {
var _a;
var _b = this, result = _b.result, decodeTree = _b.decodeTree;
var valueLength = (decodeTree[result] & BinTrieFlags.VALUE_LENGTH) >> 14;
this.emitNamedEntityData(result, valueLength, this.consumed);
(_a = this.errors) === null || _a === void 0 ? void 0 : _a.missingSemicolonAfterCharacterReference();
return this.consumed;
};
/**
* Emit a named entity.
*
* @param result The index of the entity in the decode tree.
* @param valueLength The number of bytes in the entity.
* @param consumed The number of characters consumed.
*
* @returns The number of characters consumed.
*/
EntityDecoder.prototype.emitNamedEntityData = function (result, valueLength, consumed) {
var decodeTree = this.decodeTree;
this.emitCodePoint(valueLength === 1
? decodeTree[result] & ~BinTrieFlags.VALUE_LENGTH
: decodeTree[result + 1], consumed);
if (valueLength === 3) {
// For multi-byte values, we need to emit the second byte.
this.emitCodePoint(decodeTree[result + 2], consumed);
}
return consumed;
};
/**
* Signal to the parser that the end of the input was reached.
*
* Remaining data will be emitted and relevant errors will be produced.
*
* @returns The number of characters consumed.
*/
EntityDecoder.prototype.end = function () {
var _a;
switch (this.state) {
case EntityDecoderState.NamedEntity: {
// Emit a named entity if we have one.
return this.result !== 0 &&
(this.decodeMode !== DecodingMode.Attribute ||
this.result === this.treeIndex)
? this.emitNotTerminatedNamedEntity()
: 0;
}
// Otherwise, emit a numeric entity if we have one.
case EntityDecoderState.NumericDecimal: {
return this.emitNumericEntity(0, 2);
}
case EntityDecoderState.NumericHex: {
return this.emitNumericEntity(0, 3);
}
case EntityDecoderState.NumericStart: {
(_a = this.errors) === null || _a === void 0 ? void 0 : _a.absenceOfDigitsInNumericCharacterReference(this.consumed);
return 0;
}
case EntityDecoderState.EntityStart: {
// Return 0 if we have no entity.
return 0;
}
}
};
return EntityDecoder;
}());
exports.EntityDecoder = EntityDecoder;
/**
* Creates a function that decodes entities in a string.
*
* @param decodeTree The decode tree.
* @returns A function that decodes entities in a string.
*/
function getDecoder(decodeTree) {
var ret = "";
var decoder = new EntityDecoder(decodeTree, function (str) { return (ret += (0, decode_codepoint_js_1.fromCodePoint)(str)); });
return function decodeWithTrie(str, decodeMode) {
var lastIndex = 0;
var offset = 0;
while ((offset = str.indexOf("&", offset)) >= 0) {
ret += str.slice(lastIndex, offset);
decoder.startEntity(decodeMode);
var len = decoder.write(str,
// Skip the "&"
offset + 1);
if (len < 0) {
lastIndex = offset + decoder.end();
break;
}
lastIndex = offset + len;
// If `len` is 0, skip the current `&` and continue.
offset = len === 0 ? lastIndex + 1 : lastIndex;
}
var result = ret + str.slice(lastIndex);
// Make sure we don't keep a reference to the final string.
ret = "";
return result;
};
}
/**
* Determines the branch of the current node that is taken given the current
* character. This function is used to traverse the trie.
*
* @param decodeTree The trie.
* @param current The current node.
* @param nodeIdx The index right after the current node and its value.
* @param char The current character.
* @returns The index of the next node, or -1 if no branch is taken.
*/
function determineBranch(decodeTree, current, nodeIdx, char) {
var branchCount = (current & BinTrieFlags.BRANCH_LENGTH) >> 7;
var jumpOffset = current & BinTrieFlags.JUMP_TABLE;
// Case 1: Single branch encoded in jump offset
if (branchCount === 0) {
return jumpOffset !== 0 && char === jumpOffset ? nodeIdx : -1;
}
// Case 2: Multiple branches encoded in jump table
if (jumpOffset) {
var value = char - jumpOffset;
return value < 0 || value >= branchCount
? -1
: decodeTree[nodeIdx + value] - 1;
}
// Case 3: Multiple branches encoded in dictionary
// Binary search for the character.
var lo = nodeIdx;
var hi = lo + branchCount - 1;
while (lo <= hi) {
var mid = (lo + hi) >>> 1;
var midVal = decodeTree[mid];
if (midVal < char) {
lo = mid + 1;
}
else if (midVal > char) {
hi = mid - 1;
}
else {
return decodeTree[mid + branchCount];
}
}
return -1;
}
exports.determineBranch = determineBranch;
var htmlDecoder = getDecoder(decode_data_html_js_1.default);
var xmlDecoder = getDecoder(decode_data_xml_js_1.default);
/**
* Decodes an HTML string.
*
* @param str The string to decode.
* @param mode The decoding mode.
* @returns The decoded string.
*/
function decodeHTML(str, mode) {
if (mode === void 0) { mode = DecodingMode.Legacy; }
return htmlDecoder(str, mode);
}
exports.decodeHTML = decodeHTML;
/**
* Decodes an HTML string in an attribute.
*
* @param str The string to decode.
* @returns The decoded string.
*/
function decodeHTMLAttribute(str) {
return htmlDecoder(str, DecodingMode.Attribute);
}
exports.decodeHTMLAttribute = decodeHTMLAttribute;
/**
* Decodes an HTML string, requiring all entities to be terminated by a semicolon.
*
* @param str The string to decode.
* @returns The decoded string.
*/
function decodeHTMLStrict(str) {
return htmlDecoder(str, DecodingMode.Strict);
}
exports.decodeHTMLStrict = decodeHTMLStrict;
/**
* Decodes an XML string, requiring all entities to be terminated by a semicolon.
*
* @param str The string to decode.
* @returns The decoded string.
*/
function decodeXML(str) {
return xmlDecoder(str, DecodingMode.Strict);
}
exports.decodeXML = decodeXML;
//# sourceMappingURL=decode.js.map
@@ -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 UserRound = createLucideIcon("UserRound", [
["circle", { cx: "12", cy: "8", r: "5", key: "1hypcn" }],
["path", { d: "M20 21a8 8 0 0 0-16 0", key: "rfgkzh" }]
]);
export { UserRound as default };
//# sourceMappingURL=user-round.js.map
@@ -0,0 +1 @@
{"version":3,"file":"hard-drive-upload.js","sources":["../../../src/icons/hard-drive-upload.ts"],"sourcesContent":["import createLucideIcon from '../createLucideIcon';\n\n/**\n * @component @name HardDriveUpload\n * @description Lucide SVG icon component, renders SVG Element with children.\n *\n * @preview ![img](data:image/svg+xml;base64,PHN2ZyAgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIgogIHdpZHRoPSIyNCIKICBoZWlnaHQ9IjI0IgogIHZpZXdCb3g9IjAgMCAyNCAyNCIKICBmaWxsPSJub25lIgogIHN0cm9rZT0iIzAwMCIgc3R5bGU9ImJhY2tncm91bmQtY29sb3I6ICNmZmY7IGJvcmRlci1yYWRpdXM6IDJweCIKICBzdHJva2Utd2lkdGg9IjIiCiAgc3Ryb2tlLWxpbmVjYXA9InJvdW5kIgogIHN0cm9rZS1saW5lam9pbj0icm91bmQiCj4KICA8cGF0aCBkPSJtMTYgNi00LTQtNCA0IiAvPgogIDxwYXRoIGQ9Ik0xMiAydjgiIC8+CiAgPHJlY3Qgd2lkdGg9IjIwIiBoZWlnaHQ9IjgiIHg9IjIiIHk9IjE0IiByeD0iMiIgLz4KICA8cGF0aCBkPSJNNiAxOGguMDEiIC8+CiAgPHBhdGggZD0iTTEwIDE4aC4wMSIgLz4KPC9zdmc+Cg==) - https://lucide.dev/icons/hard-drive-upload\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 HardDriveUpload = createLucideIcon('HardDriveUpload', [\n ['path', { d: 'm16 6-4-4-4 4', key: '13yo43' }],\n ['path', { d: 'M12 2v8', key: '1q4o3n' }],\n ['rect', { width: '20', height: '8', x: '2', y: '14', rx: '2', key: 'w68u3i' }],\n ['path', { d: 'M6 18h.01', key: 'uhywen' }],\n ['path', { d: 'M10 18h.01', key: 'h775k' }],\n]);\n\nexport default HardDriveU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,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAK,UAAU,CAAA,CAAA;AAAA,CAAA,CAC1C,CAAC,CAAA,CAAA,CAAA,CAAA,CAAA,CAAQ,CAAA,CAAA,CAAA,CAAE,GAAG,CAAc,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAK,SAAS,CAAA;AAC5C,CAAC,CAAA,CAAA;;"}
@@ -0,0 +1,13 @@
"use strict";
Object.defineProperty(exports, "__esModule", {
value: true
});
exports.default = isBlockScoped;
var _index = require("./generated/index.js");
var _isLet = require("./isLet.js");
function isBlockScoped(node) {
return (0, _index.isFunctionDeclaration)(node) || (0, _index.isClassDeclaration)(node) || (0, _isLet.default)(node);
}
//# sourceMappingURL=isBlockScoped.js.map
@@ -0,0 +1,4 @@
'use strict';
/** @type {import('.')} */
module.exports = Object;
@@ -0,0 +1,18 @@
"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
exports.transformRef = void 0;
var assignRef_1 = require("./assignRef");
var createRef_1 = require("./createRef");
/**
* Transforms one ref to another
* @example
* ```tsx
* const ResizableWithRef = forwardRef((props, ref) =>
* <Resizable {...props} ref={transformRef(ref, i => i ? i.resizable : null)}/>
* );
* ```
*/
function transformRef(ref, transformer) {
return (0, createRef_1.createCallbackRef)(function (value) { return (0, assignRef_1.assignRef)(ref, transformer(value)); });
}
exports.transformRef = transformRef;
@@ -0,0 +1 @@
{"version":3,"file":"diceware.json.mjs","sources":[],"sourcesContent":[],"names":[],"mappings":";;;;;;"}
@@ -0,0 +1,9 @@
/**
* Decides if the supplied variable is variant label
*/
function isVariantLabel(v) {
return typeof v === "string" || Array.isArray(v);
}
export { isVariantLabel };
//# sourceMappingURL=is-variant-label.mjs.map
@@ -0,0 +1,7 @@
{
"version": 3,
"sources": ["../src/index.ts", "../src/create-context.tsx"],
"sourcesContent": ["export { createContext, createContextScope } from './create-context';\nexport type { CreateScope, Scope } from './create-context';\n", "import * as React from 'react';\n\nfunction createContext<ContextValueType extends object | null>(\n rootComponentName: string,\n defaultContext?: ContextValueType\n) {\n const Context = React.createContext<ContextValueType | undefined>(defaultContext);\n\n const Provider: React.FC<ContextValueType & { children: React.ReactNode }> = (props) => {\n const { children, ...context } = props;\n // Only re-memoize when prop values change\n // eslint-disable-next-line react-hooks/exhaustive-deps\n const value = React.useMemo(() => context, Object.values(context)) as ContextValueType;\n return <Context.Provider value={value}>{children}</Context.Provider>;\n };\n\n Provider.displayName = rootComponentName + 'Provider';\n\n function useContext(consumerName: string) {\n const context = React.useContext(Context);\n if (context) return context;\n if (defaultContext !== undefined) return defaultContext;\n // if a defaultContext wasn't specified, it's a required context.\n throw new Error(`\\`${consumerName}\\` must be used within \\`${rootComponentName}\\``);\n }\n\n return [Provider, useContext] as const;\n}\n\n/* -------------------------------------------------------------------------------------------------\n * createContextScope\n * -----------------------------------------------------------------------------------------------*/\n\ntype Scope<C = any> = { [scopeName: string]: React.Context<C>[] } | undefined;\ntype ScopeHook = (scope: Scope) => { [__scopeProp: string]: Scope };\ninterface CreateScope {\n scopeName: string;\n (): ScopeHook;\n}\n\nfunction createContextScope(scopeName: string, createContextScopeDeps: CreateScope[] = []) {\n let defaultContexts: any[] = [];\n\n /* -----------------------------------------------------------------------------------------------\n * createContext\n * ---------------------------------------------------------------------------------------------*/\n\n function createContext<ContextValueType extends object | null>(\n rootComponentName: string,\n defaultContext?: ContextValueType\n ) {\n const BaseContext = React.createContext<ContextValueType | undefined>(defaultContext);\n const index = defaultContexts.length;\n defaultContexts = [...defaultContexts, defaultContext];\n\n const Provider: React.FC<\n ContextValueType & { scope: Scope<ContextValueType>; children: React.ReactNode }\n > = (props) => {\n const { scope, children, ...context } = props;\n const Context = scope?.[scopeName]?.[index] || BaseContext;\n // Only re-memoize when prop values change\n // eslint-disable-next-line react-hooks/exhaustive-deps\n const value = React.useMemo(() => context, Object.values(context)) as ContextValueType;\n return <Context.Provider value={value}>{children}</Context.Provider>;\n };\n\n Provider.displayName = rootComponentName + 'Provider';\n\n function useContext(consumerName: string, scope: Scope<ContextValueType | undefined>) {\n const Context = scope?.[scopeName]?.[index] || BaseContext;\n const context = React.useContext(Context);\n if (context) return context;\n if (defaultContext !== undefined) return defaultContext;\n // if a defaultContext wasn't specified, it's a required context.\n throw new Error(`\\`${consumerName}\\` must be used within \\`${rootComponentName}\\``);\n }\n\n return [Provider, useContext] as const;\n }\n\n /* -----------------------------------------------------------------------------------------------\n * createScope\n * ---------------------------------------------------------------------------------------------*/\n\n const createScope: CreateScope = () => {\n const scopeContexts = defaultContexts.map((defaultContext) => {\n return React.createContext(defaultContext);\n });\n return function useScope(scope: Scope) {\n const contexts = scope?.[scopeName] || scopeContexts;\n return React.useMemo(\n () => ({ [`__scope${scopeName}`]: { ...scope, [scopeName]: contexts } }),\n [scope, contexts]\n );\n };\n };\n\n createScope.scopeName = scopeName;\n return [createContext, composeContextScopes(createScope, ...createContextScopeDeps)] as const;\n}\n\n/* -------------------------------------------------------------------------------------------------\n * composeContextScopes\n * -----------------------------------------------------------------------------------------------*/\n\nfunction composeContextScopes(...scopes: CreateScope[]) {\n const baseScope = scopes[0];\n if (scopes.length === 1) return baseScope;\n\n const createScope: CreateScope = () => {\n const scopeHooks = scopes.map((createScope) => ({\n useScope: createScope(),\n scopeName: createScope.scopeName,\n }));\n\n return funLine truncated
"mappings": ";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA,uBAAAA;AAAA,EAAA;AAAA;AAAA;;;ACAA,YAAuB;AAaZ;AAXX,SAASC,eACP,mBACA,gBACA;AACA,QAAM,UAAgB,oBAA4C,cAAc;AAEhF,QAAM,WAAuE,CAAC,UAAU;AACtF,UAAM,EAAE,UAAU,GAAG,QAAQ,IAAI;AAGjC,UAAM,QAAc,cAAQ,MAAM,SAAS,OAAO,OAAO,OAAO,CAAC;AACjE,WAAO,4CAAC,QAAQ,UAAR,EAAiB,OAAe,U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;AACvC,aAAa;AAAA,QACX,OAAO,EAAE,CAAC,UAAU,SAAS,EAAE,GAAG,EAAE,GAAG,OAAO,CAAC,SAAS,GAAG,SAAS,EAAE;AAAA,QACtE,CAAC,OAAO,QAAQ;AAAA,MAClB;AAAA,IACF;AAAA,EACF;AAEA,cAAY,YAAY;AACxB,SAAO,CAACD,gBAAe,qBAAqB,aAAa,GAAG,sBAAsB,CAAC;AACrF;AAMA,SAAS,wBAAwB,QAAuB;AACtD,QAAM,YAAY,OAAO,CAAC;AAC1B,MAAI,OAAO,WAAW,EAAG,QAAO;AAEhC,QAAM,cAA2B,MAAM;AACrC,UAAM,aAAa,OAAO,IAAI,CAACE,kBAAiB;AAAA,MAC9C,UAAUA,aAAY;AAAA,MACtB,WAAWA,aAAY;AAAA,IACzB,EAAE;AAEF,WAAO,SAAS,kBAAkB,gBAAgB;AAChD,YAAM,aAAa,WAAW,OAAO,CAACC,aAAY,EAAE,UAAU,UAAU,MAAM;AAI5E,cAAM,aAAa,SAAS,cAAc;AAC1C,cAAM,eAAe,WAAW,UAAU,SAAS,EAAE;AACrD,eAAO,EAAE,GAAGA,aAAY,GAAG,aAAa;AAAA,MAC1C,GAAG,CAAC,CAAC;AAEL,aAAa,cAAQ,OAAO,EAAE,CAAC,UAAU,UAAU,SAAS,EAAE,GAAG,WAAW,IAAI,CAAC,UAAU,CAAC;AAAA,IAC9F;AAAA,EACF;AAEA,cAAY,YAAY,UAAU;AAClC,SAAO;AACT;",
"names": ["createContext", "createContext", "useContext", "createScope", "nextScopes"]
}
@@ -0,0 +1 @@
{"version":3,"file":"worm.js","sources":["../../../src/icons/worm.ts"],"sourcesContent":["import createLucideIcon from '../createLucideIcon';\n\n/**\n * @component @name Worm\n * @description Lucide SVG icon component, renders SVG Element with children.\n *\n * @preview ![img](data:image/svg+xml;base64,PHN2ZyAgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIgogIHdpZHRoPSIyNCIKICBoZWlnaHQ9IjI0IgogIHZpZXdCb3g9IjAgMCAyNCAyNCIKICBmaWxsPSJub25lIgogIHN0cm9rZT0iIzAwMCIgc3R5bGU9ImJhY2tncm91bmQtY29sb3I6ICNmZmY7IGJvcmRlci1yYWRpdXM6IDJweCIKICBzdHJva2Utd2lkdGg9IjIiCiAgc3Ryb2tlLWxpbmVjYXA9InJvdW5kIgogIHN0cm9rZS1saW5lam9pbj0icm91bmQiCj4KICA8cGF0aCBkPSJtMTkgMTItMS41IDMiIC8+CiAgPHBhdGggZD0iTTE5LjYzIDE4LjgxIDIyIDIwIiAvPgogIDxwYXRoIGQ9Ik02LjQ3IDguMjNhMS42OCAxLjY4IDAgMCAxIDIuNDQgMS45M2wtLjY0IDIuMDhhNi43NiA2Ljc2IDAgMCAwIDEwLjE2IDcuNjdsLjQyLS4yN2ExIDEgMCAxIDAtMi43My00LjIxbC0uNDIuMjdhMS43NiAxLjc2IDAgMCAxLTIuNjMtMS45OWwuNjQtMi4wOEE2LjY2IDYuNjYgMCAwIDAgMy45NCAzLjlsLS43LjRhMSAxIDAgMSAwIDIuNTUgNC4zNHoiIC8+Cjwvc3ZnPgo=) - https://lucide.dev/icons/worm\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 Worm = createLucideIcon('Worm', [\n ['path', { d: 'm19 12-1.5 3', key: '9bcu4o' }],\n ['path', { d: 'M19.63 18.81 22 20', key: '121v98' }],\n [\n 'path',\n {\n d: 'M6.47 8.23a1.68 1.68 0 0 1 2.44 1.93l-.64 2.08a6.76 6.76 0 0 0 10.16 7.67l.42-.27a1 1 0 1 0-2.73-4.21l-.42.27a1.76 1.76 0 0 1-2.63-1.99l.64-2.08A6.66 6.66 0 0 0 3.94 3.9l-.7.4a1 1 0 1 0 2.55 4.34z',\n key: '1tij6q',\n },\n ],\n]);\n\nexport default Worm;\n"],"names":[],"mappings":";;;;;;;;;AAaM,CA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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,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;AAAA,CACP,CAAA,CAAA,CAAA,CAAA;AAAA,CACF,CAAA,CAAA;AACF,CAAC,CAAA,CAAA;;"}
@@ -0,0 +1 @@
{"version":3,"file":"earth.js","sources":["../../../src/icons/earth.ts"],"sourcesContent":["import createLucideIcon from '../createLucideIcon';\n\n/**\n * @component @name Earth\n * @description Lucide SVG icon component, renders SVG Element with children.\n *\n * @preview ![img](data:image/svg+xml;base64,PHN2ZyAgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIgogIHdpZHRoPSIyNCIKICBoZWlnaHQ9IjI0IgogIHZpZXdCb3g9IjAgMCAyNCAyNCIKICBmaWxsPSJub25lIgogIHN0cm9rZT0iIzAwMCIgc3R5bGU9ImJhY2tncm91bmQtY29sb3I6ICNmZmY7IGJvcmRlci1yYWRpdXM6IDJweCIKICBzdHJva2Utd2lkdGg9IjIiCiAgc3Ryb2tlLWxpbmVjYXA9InJvdW5kIgogIHN0cm9rZS1saW5lam9pbj0icm91bmQiCj4KICA8cGF0aCBkPSJNMjEuNTQgMTVIMTdhMiAyIDAgMCAwLTIgMnY0LjU0IiAvPgogIDxwYXRoIGQ9Ik03IDMuMzRWNWEzIDMgMCAwIDAgMyAzYTIgMiAwIDAgMSAyIDJjMCAxLjEuOSAyIDIgMmEyIDIgMCAwIDAgMi0yYzAtMS4xLjktMiAyLTJoMy4xNyIgLz4KICA8cGF0aCBkPSJNMTEgMjEuOTVWMThhMiAyIDAgMCAwLTItMmEyIDIgMCAwIDEtMi0ydi0xYTIgMiAwIDAgMC0yLTJIMi4wNSIgLz4KICA8Y2lyY2xlIGN4PSIxMiIgY3k9IjEyIiByPSIxMCIgLz4KPC9zdmc+Cg==) - https://lucide.dev/icons/earth\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 Earth = createLucideIcon('Earth', [\n ['path', { d: 'M21.54 15H17a2 2 0 0 0-2 2v4.54', key: '1djwo0' }],\n [\n 'path',\n {\n d: 'M7 3.34V5a3 3 0 0 0 3 3a2 2 0 0 1 2 2c0 1.1.9 2 2 2a2 2 0 0 0 2-2c0-1.1.9-2 2-2h3.17',\n key: '1tzkfa',\n },\n ],\n ['path', { d: 'M11 21.95V18a2 2 0 0 0-2-2a2 2 0 0 1-2-2v-1a2 2 0 0 0-2-2H2.05', key: '14pb5j' }],\n ['circle', { cx: '12', cy: '12', r: '10', key: '1mglay' }],\n]);\n\nexport default Earth;\n"],"names":[],"mappings":";;;;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A,CAAA,CAAK,EAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA;AAAA,CACP,CAAA,CAAA,CAAA,CAAA;AAAA,CACF,CAAA,CAAA,CAAA;AAAA,CAAA,CACA,CAAC,CAAA,CAAA,CAAA,CAAA,CAAA,CAAQ,CAAA,CAAA,CAAA,CAAE,GAAG,CAAkE,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,CAAK,UAAU,CAAA,CAAA;AAAA,CAC/F,CAAA,CAAC,QAAU,CAAA,CAAA,CAAA,CAAE,EAAI,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,EAAM,CAAI,CAAA,CAAA,CAAA,IAAA,CAAM,CAAA,CAAG,EAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAM,GAAK,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,EAAU,CAAA;AAC3D,CAAC,CAAA,CAAA;;"}
@@ -0,0 +1,13 @@
require('thenify-all').withCallback(
require('zlib'),
exports, [
'deflate',
'deflateRaw',
'gzip',
'gunzip',
'inflate',
'inflateRaw',
'unzip',
]
)
@@ -0,0 +1 @@
{"version":3,"file":"use-page-in-view.mjs","sources":["../../../src/utils/use-page-in-view.ts"],"sourcesContent":["\"use client\"\n\nimport { useEffect, useState } from \"react\"\n\nexport function usePageInView() {\n const [isInView, setIsInView] = useState(true)\n\n useEffect(() => {\n const handleVisibilityChange = () => setIsInView(!document.hidden)\n\n if (document.hidden) {\n handleVisibilityChange()\n }\n\n document.addEventListener(\"visibilitychange\", handleVisibilityChange)\n\n return () => {\n document.removeEventListener(\n \"visibilitychange\",\n handleVisibilityChange\n )\n }\n }, [])\n\n return isInView\n}\n"],"names":[],"mappings":";;;;;;AAQQ;AAEA;AACI;;AAGJ;AAEA;AACI;AAIJ;;AAGJ;AACJ;;"}
@@ -0,0 +1,54 @@
"use client";
import { invariant, warning } from 'motion-utils';
import { useContext } from 'react';
import { MotionContext } from '../context/MotionContext/index.mjs';
import { useMotionValue } from './use-motion-value.mjs';
import { useTransform } from './use-transform.mjs';
// Keep things reasonable and avoid scale: Infinity. In practise we might need
// to add another value, opacity, that could interpolate scaleX/Y [0,0.01] => [0,1]
// to simply hide content at unreasonable scales.
const maxScale = 100000;
const invertScale = (scale) => scale > 0.001 ? 1 / scale : maxScale;
let hasWarned = false;
/**
* Returns a `MotionValue` each for `scaleX` and `scaleY` that update with the inverse
* of their respective parent scales.
*
* This is useful for undoing the distortion of content when scaling a parent component.
*
* By default, `useInvertedScale` will automatically fetch `scaleX` and `scaleY` from the nearest parent.
* By passing other `MotionValue`s in as `useInvertedScale({ scaleX, scaleY })`, it will invert the output
* of those instead.
*
* ```jsx
* const MyComponent = () => {
* const { scaleX, scaleY } = useInvertedScale()
* return <motion.div style={{ scaleX, scaleY }} />
* }
* ```
*
* @deprecated
*/
function useInvertedScale(scale) {
let parentScaleX = useMotionValue(1);
let parentScaleY = useMotionValue(1);
const { visualElement } = useContext(MotionContext);
invariant(!!(scale || visualElement), "If no scale values are provided, useInvertedScale must be used within a child of another motion component.");
warning(hasWarned, "useInvertedScale is deprecated and will be removed in 3.0. Use the layout prop instead.");
hasWarned = true;
if (scale) {
parentScaleX = scale.scaleX || parentScaleX;
parentScaleY = scale.scaleY || parentScaleY;
}
else if (visualElement) {
parentScaleX = visualElement.getValue("scaleX", 1);
parentScaleY = visualElement.getValue("scaleY", 1);
}
const scaleX = useTransform(parentScaleX, invertScale);
const scaleY = useTransform(parentScaleY, invertScale);
return { scaleX, scaleY };
}
export { invertScale, useInvertedScale };
//# sourceMappingURL=use-inverted-scale.mjs.map
@@ -0,0 +1,22 @@
import { Context } from "../../context.js";
import { Cookie, CookieOptions, CookiePrefixOptions, SignedCookie } from "../../utils/cookie.js";
//#region src/helper/cookie/index.d.ts
interface GetCookie {
(c: Context, key: string): string | undefined;
(c: Context): Cookie;
(c: Context, key: string, prefixOptions?: CookiePrefixOptions): string | undefined;
}
interface GetSignedCookie {
(c: Context, secret: string | BufferSource, key: string): Promise<string | undefined | false>;
(c: Context, secret: string | BufferSource): Promise<SignedCookie>;
(c: Context, secret: string | BufferSource, key: string, prefixOptions?: CookiePrefixOptions): Promise<string | undefined | false>;
}
export declare const getCookie: GetCookie;
export declare const getSignedCookie: GetSignedCookie;
export declare const generateCookie: (name: string, value: string, opt?: CookieOptions) => string;
export declare const setCookie: (c: Context, name: string, value: string, opt?: CookieOptions) => void;
export declare const generateSignedCookie: (name: string, value: string, secret: string | BufferSource, opt?: CookieOptions) => Promise<string>;
export declare const setSignedCookie: (c: Context, name: string, value: string, secret: string | BufferSource, opt?: CookieOptions) => Promise<void>;
export declare const deleteCookie: (c: Context, name: string, opt?: CookieOptions) => string | undefined;
//#endregion
export {};
@@ -0,0 +1,724 @@
#include <cmath>
#include <cstring>
#include <limits>
#include <napi.h>
#include "convert.h"
namespace node_sqlite3 {
namespace {
// Element size in bytes for each typed-array kind.
inline size_t TypedArrayElementSize(napi_typedarray_type type) {
switch (type) {
case napi_int8_array:
case napi_uint8_array:
case napi_uint8_clamped_array: return 1;
case napi_int16_array:
case napi_uint16_array: return 2;
case napi_int32_array:
case napi_uint32_array:
case napi_float32_array: return 4;
case napi_float64_array:
case napi_bigint64_array:
case napi_biguint64_array: return 8;
default: return 0;
}
}
// Human-readable type name for "unsupported type" errors. Never throws;
// falls back to a generic name when the constructor is inaccessible
// (e.g. a Proxy whose get trap throws).
std::string BindTypeName(const Napi::Value& source) {
auto env = source.Env();
switch (source.Type()) {
case napi_symbol: return "Symbol";
case napi_function: return "Function";
case napi_external: return "External";
default: break;
}
if (source.IsObject()) {
Napi::Object obj = source.As<Napi::Object>();
Napi::Value ctor = obj.Get("constructor");
if (!env.IsExceptionPending() && ctor.IsObject()) {
Napi::Value name = ctor.As<Napi::Object>().Get("name");
if (!env.IsExceptionPending() && name.IsString()) {
std::string s = name.As<Napi::String>().Utf8Value();
if (!s.empty()) return s;
}
}
return "Object";
}
return "value";
}
void ThrowUnsupportedBindType(const Napi::Value& source,
const std::string& subject) {
auto env = source.Env();
std::string msg = "Cannot bind " + subject +
": unsupported type " + BindTypeName(source) +
". Serialize it explicitly (e.g. JSON.stringify) before binding.";
Napi::TypeError::New(env, msg).ThrowAsJavaScriptException();
}
// Range of doubles that convert to int64 without undefined behaviour.
// The upper bound is inclusive: JS cannot express 2^63-1, so the double
// 2^63 is the rounded form of it and clamps to INT64_MAX.
const double kInt64MinAsDouble = -9223372036854775808.0; // -(2^63)
const double kInt64MaxAsDouble = 9223372036854775808.0; // 2^63
} // namespace
// Resolves one global constructor, caching it per environment.
//
// The uncached form read `env.Global().Get("RegExp")` on every call: a
// napi_get_global, a JS string built from the C literal, and a property
// get — to answer a question whose answer is fixed for the lifetime of
// the environment. The bind paths ask it for every named-parameter call,
// where it was one of the largest single costs.
//
// The reference holds the current environment's constructor, which is
// precisely what the uncached lookup returned; caching changes nothing
// about which objects match.
static Napi::Function GlobalCtor(Napi::Env env, napi_ref* slot,
const char* name) {
if (*slot != NULL) {
napi_value cached = NULL;
if (napi_get_reference_value(env, *slot, &cached) == napi_ok
&& cached != NULL) {
return Napi::Function(env, cached);
}
}
Napi::Value ctor = env.Global().Get(name);
if (!ctor.IsFunction()) return Napi::Function();
// A weak reference would let the constructor be collected out from
// under us; these live as long as the environment does.
napi_create_reference(env, ctor, 1, slot);
return ctor.As<Napi::Function>();
}
bool IsNamedParameterMap(Napi::Value source) {
if (!source.IsObject() || source.IsArray()) return false;
auto env = source.Env();
auto* addon = env.GetInstanceData<Database::AddonData>();
// Fast path: a plain object literal — which is what a named-parameter
// map almost always is. Its prototype is Object.prototype, and none
// of the shapes rejected below share that prototype, so one
// comparison settles all six of them.
napi_value proto = NULL;
if (napi_get_prototype(env, source, &proto) == napi_ok && proto != NULL) {
napi_value object_proto = NULL;
if (addon->object_prototype == NULL) {
Napi::Value base = env.Global().Get("Object");
if (base.IsFunction()) {
Napi::Value p = base.As<Napi::Object>().Get("prototype");
if (p.IsObject()) {
napi_create_reference(env, p, 1,
&addon->object_prototype);
}
}
}
if (addon->object_prototype != NULL
&& napi_get_reference_value(env, addon->object_prototype,
&object_proto) == napi_ok) {
bool same = false;
if (napi_strict_equals(env, proto, object_proto, &same) == napi_ok
&& same) {
return true;
}
}
}
// Anything else: the explicit checks. Cheap predicates first; IsDate
// matches across realms, and the RegExp lookup only runs once the
// value is known to be an object. Binary views bind positionally,
// like the other non-map shapes.
return !source.IsBuffer() && !source.IsTypedArray()
&& !source.IsDataView() && !source.IsArrayBuffer()
&& !source.IsDate()
&& !OtherInstanceOf(source.As<Napi::Object>(), "RegExp");
}
bool ResolveNamedKey(Napi::Env env, Napi::Value key, NamedKey* out,
std::string* storage) {
// Long enough that no realistic parameter name reaches the fallback,
// so the whole classification is a single napi call.
char stack[128];
size_t written = 0;
const size_t capacity = sizeof(stack);
bool have_text = false;
if (key.IsString()
&& napi_get_value_string_utf8(env, key, stack, capacity, &written)
== napi_ok
&& written + 1 < capacity) {
storage->assign(stack, written);
have_text = true;
}
if (have_text) {
const char c = storage->empty() ? '\0' : (*storage)[0];
const bool could_be_numeric = c == '\0'
|| (c >= '0' && c <= '9')
|| c == '-' || c == '+' || c == '.'
|| c == ' ' || c == '\t' || c == '\n' || c == '\r'
|| c == '\f' || c == '\v';
if (!could_be_numeric) {
out->positional = false;
out->name = storage->c_str();
return true;
}
}
// Either an unusual key, or one that really might be a number: fall
// back to the coercion, which is the definitive test.
Napi::Number num = key.ToNumber();
if (env.IsExceptionPending()) return false;
// Bind positions are 1-based, so a key reading as zero or a negative
// number selects nothing. Such a key is treated as a name, which is
// what it literally is, and reported as an unknown one — the async
// path cannot represent a zero position either, so this is also what
// keeps the two implementations wording it the same way.
if (num.Int32Value() == num.DoubleValue() && num.Int32Value() > 0) {
out->positional = true;
out->index = num.Int32Value();
return true;
}
if (!have_text) {
*storage = key.As<Napi::String>().Utf8Value();
if (env.IsExceptionPending()) return false;
}
out->positional = false;
out->name = storage->c_str();
return true;
}
// True for a plain-object instance of the named global constructor
// ("Date", "RegExp"), matching JS instanceof across realms.
bool OtherInstanceOf(Napi::Object source, const char* object_type) {
auto env = source.Env();
auto* addon = env.GetInstanceData<Database::AddonData>();
Napi::Function ctor;
if (strncmp(object_type, "Date", 4) == 0) {
ctor = GlobalCtor(env, &addon->date_ctor, "Date");
} else if (strncmp(object_type, "RegExp", 6) == 0) {
ctor = GlobalCtor(env, &addon->regexp_ctor, "RegExp");
}
if (ctor.IsEmpty()) return false;
return source.InstanceOf(ctor);
}
std::unique_ptr<Values::Field> ConvertToField(const Napi::Value source,
const std::string& subject, const FieldPos& pos) {
// Exhaustive dispatch. Order matters for the hot path: cheap primitive
// checks run before the object checks (InstanceOf lookups hit the
// global object). Every JS type either maps to a field or throws —
// returning nullptr therefore always implies a pending exception, so
// nothing can silently skip a value. The constructors carry the bind
// position (index or name) through to Bind(Parameters&&, bool).
#define MAKE_FIELD(kind, ...) (pos.index > 0 ? std::make_unique<Values::kind>(pos.index, __VA_ARGS__) : std::make_unique<Values::kind>(pos.name, __VA_ARGS__))
// One napi_typeof up front, then compare against it. Each of
// node-addon-api's IsNumber()/IsString()/... calls napi_typeof itself,
// so an if-else chain over them pays that ABI call once per arm it
// tries — six times over for a value that turns out to be a BigInt.
napi_valuetype vtype = napi_undefined;
if (napi_typeof(source.Env(), source, &vtype) != napi_ok) {
return nullptr;
}
if (vtype == napi_number) {
double val = source.As<Napi::Number>().DoubleValue();
// Number.isInteger within the int64 range binds as INTEGER (64-bit,
// not the old Int32 round-trip). NaN and ±Infinity fail the
// trunc/finiteness test and bind as REAL (NaN becomes NULL, per
// sqlite's bind_double semantics).
if (std::isfinite(val) && val == std::trunc(val)
&& val >= kInt64MinAsDouble && val < kInt64MaxAsDouble) {
return MAKE_FIELD(Integer, static_cast<int64_t>(val));
}
if (val == kInt64MaxAsDouble) {
// 2^63 as a double is the rounded form of 2^63-1: clamp so the
// top of the int64 range stays reachable from JS numbers.
return MAKE_FIELD(Integer, INT64_MAX);
}
return MAKE_FIELD(Float, val);
}
else if (vtype == napi_string) {
std::string val = source.As<Napi::String>().Utf8Value();
return MAKE_FIELD(Text, val.length(), val.c_str());
}
else if (vtype == napi_boolean) {
return MAKE_FIELD(Integer, source.As<Napi::Boolean>().Value() ? 1 : 0);
}
else if (vtype == napi_null) {
return pos.index > 0
? std::make_unique<Values::Null>(pos.index)
: std::make_unique<Values::Null>(pos.name);
}
else if (vtype == napi_undefined) {
// Binds as NULL, matching null: object shorthand
// { $x: obj.maybeMissing } is a common call shape. Typo'd property
// names are caught by the named-parameter and arity checks in
// Bind(Parameters&&, bool), not by rejecting undefined.
auto field = pos.index > 0
? std::make_unique<Values::Null>(pos.index)
: std::make_unique<Values::Null>(pos.name);
field->from_undefined = true;
return field;
}
else if (vtype == napi_bigint) {
bool lossless = false;
int64_t val = source.As<Napi::BigInt>().Int64Value(&lossless);
if (!lossless) {
std::string digits = source.ToString().Utf8Value();
Napi::RangeError::New(source.Env(),
"Cannot bind " + subject + ": BigInt " +
digits + " is outside the signed 64-bit integer range"
).ThrowAsJavaScriptException();
return nullptr;
}
return MAKE_FIELD(Integer, val);
}
else if (vtype != napi_object) {
// Symbols, functions, external values.
ThrowUnsupportedBindType(source, subject);
return nullptr;
}
else if (source.IsDataView()) {
// Must be tested before IsBuffer(): napi_is_buffer() also answers
// true for DataViews, and routing one through Napi::Buffer fails
// ("Invalid argument"). data arrives already offset by
// byte_offset, like the typed-array call.
size_t bytes = 0;
void* data = NULL;
napi_get_dataview_info(source.Env(), source, &bytes, &data,
NULL, NULL);
if (bytes > static_cast<size_t>(std::numeric_limits<int>::max())) {
Napi::RangeError::New(source.Env(),
"Cannot bind " + subject + ": DataView of " +
std::to_string(bytes) + " bytes exceeds the bind size limit"
).ThrowAsJavaScriptException();
return nullptr;
}
return MAKE_FIELD(Blob, bytes, data);
}
else if (source.IsBuffer()) {
// Node Buffers and plain Uint8Arrays: Data() and Length() honour
// byteOffset for both.
Napi::Buffer<char> buffer = source.As<Napi::Buffer<char>>();
if (buffer.Length() > static_cast<size_t>(std::numeric_limits<int>::max())) {
// Buffers can exceed 2 GB on 64-bit Node; sqlite3_bind_blob takes
// an int, so without this the length narrows to a negative number.
Napi::RangeError::New(source.Env(),
"Cannot bind " + subject + ": Buffer of " +
std::to_string(buffer.Length()) + " bytes exceeds the bind size limit"
).ThrowAsJavaScriptException();
return nullptr;
}
return MAKE_FIELD(Blob, buffer.Length(), buffer.Data());
}
else if (source.IsTypedArray()) {
// Any other typed array (Uint16Array, Float64Array, ...): raw
// element count times the element size, with the data pointer
// already offset by byteOffset per napi_get_typedarray_info.
napi_typedarray_type type;
size_t elements = 0;
void* data = NULL;
napi_get_typedarray_info(source.Env(), source, &type,
&elements, &data, NULL, NULL);
size_t bytes = elements * TypedArrayElementSize(type);
if (bytes > static_cast<size_t>(std::numeric_limits<int>::max())) {
Napi::RangeError::New(source.Env(),
"Cannot bind " + subject + ": typed array of " +
std::to_string(bytes) + " bytes exceeds the bind size limit"
).ThrowAsJavaScriptException();
return nullptr;
}
return MAKE_FIELD(Blob, bytes, data);
}
else if (source.IsArrayBuffer()) {
Napi::ArrayBuffer buffer = source.As<Napi::ArrayBuffer>();
if (buffer.ByteLength() > static_cast<size_t>(std::numeric_limits<int>::max())) {
Napi::RangeError::New(source.Env(),
"Cannot bind " + subject + ": ArrayBuffer exceeds the bind size limit"
).ThrowAsJavaScriptException();
return nullptr;
}
return MAKE_FIELD(Blob, buffer.ByteLength(), buffer.Data());
}
else if (source.IsDate()) {
// Documented v8/v9 behaviour: epoch milliseconds as REAL. Opt-in
// TEXT binding is deliberately out of scope for D02.
return MAKE_FIELD(Float, source.As<Napi::Date>().ValueOf());
}
else if (source.IsObject()) {
if (OtherInstanceOf(source.As<Napi::Object>(), "RegExp")) {
std::string val = source.ToString().Utf8Value();
return MAKE_FIELD(Text, val.length(), val.c_str());
}
// Plain objects, arrays, Maps, class instances: refused. The old
// behaviour bound the literal string "[object Object]".
ThrowUnsupportedBindType(source, subject);
return nullptr;
}
// Symbols, functions, anything else.
ThrowUnsupportedBindType(source, subject);
return nullptr;
#undef MAKE_FIELD
}
std::string BindSubject::Describe() const {
if (name != nullptr) return std::string("parameter ") + name;
return "parameter " + std::to_string(index);
}
bool BindValueDirect(sqlite3_stmt* stmt, int pos, const Napi::Value source,
const BindSubject& subject, int* rc, bool* from_undefined) {
auto env = source.Env();
// One napi_typeof, then a switch. node-addon-api's IsNumber()/
// IsString()/... each call napi_typeof, so an if-else chain over them
// pays that ABI call once per arm it tries.
napi_valuetype type = napi_undefined;
if (napi_typeof(env, source, &type) != napi_ok) return false;
switch (type) {
case napi_number: {
const double val = source.As<Napi::Number>().DoubleValue();
// Number.isInteger within the int64 range binds as INTEGER;
// NaN and +/-Infinity fail the finiteness test and bind REAL.
if (std::isfinite(val) && val == std::trunc(val)
&& val >= kInt64MinAsDouble && val < kInt64MaxAsDouble) {
*rc = sqlite3_bind_int64(stmt, pos, static_cast<int64_t>(val));
return true;
}
if (val == kInt64MaxAsDouble) {
// 2^63 as a double is the rounded form of 2^63-1: clamp so
// the top of the range stays reachable from a JS number.
*rc = sqlite3_bind_int64(stmt, pos, INT64_MAX);
return true;
}
*rc = sqlite3_bind_double(stmt, pos, val);
return true;
}
case napi_string: {
// Two napi calls (length, then write) is the documented way to
// read a string of unknown length; the payload is malloc'd
// once and handed to SQLite rather than copied into a
// std::string and then copied again.
size_t length = 0;
if (napi_get_value_string_utf8(env, source, NULL, 0, &length)
!= napi_ok) {
return false;
}
char* buffer = static_cast<char*>(malloc(length + 1));
if (buffer == NULL) {
Napi::Error::New(env, "Cannot bind " + subject.Describe() +
": out of memory").ThrowAsJavaScriptException();
return false;
}
size_t written = 0;
if (napi_get_value_string_utf8(env, source, buffer, length + 1,
&written) != napi_ok) {
free(buffer);
return false;
}
*rc = sqlite3_bind_text64(stmt, pos, buffer,
static_cast<sqlite3_uint64>(written), free, SQLITE_UTF8);
return true;
}
case napi_boolean: {
*rc = sqlite3_bind_int64(stmt, pos,
source.As<Napi::Boolean>().Value() ? 1 : 0);
return true;
}
case napi_null: {
*rc = sqlite3_bind_null(stmt, pos);
return true;
}
case napi_undefined: {
// Binds as NULL, like the Field path; the caller uses
// `from_undefined` for the zero-parameter call shape.
if (from_undefined != NULL) *from_undefined = true;
*rc = sqlite3_bind_null(stmt, pos);
return true;
}
case napi_bigint: {
bool lossless = false;
const int64_t val =
source.As<Napi::BigInt>().Int64Value(&lossless);
if (!lossless) {
const std::string digits = source.ToString().Utf8Value();
Napi::RangeError::New(env,
"Cannot bind " + subject.Describe() + ": BigInt " +
digits + " is outside the signed 64-bit integer range"
).ThrowAsJavaScriptException();
return false;
}
*rc = sqlite3_bind_int64(stmt, pos, val);
return true;
}
case napi_object:
break; // handled below
default:
// Symbols, functions, external values.
ThrowUnsupportedBindType(source, subject.Describe());
return false;
}
// Binary views. SQLITE_TRANSIENT: SQLite copies before returning, so
// the JS-owned bytes need not outlive this call.
const void* data = NULL;
size_t bytes = 0;
const char* kind = NULL;
if (source.IsDataView()) {
// Before IsBuffer(): napi_is_buffer() also answers true for a
// DataView, and routing one through Napi::Buffer fails.
napi_get_dataview_info(env, source, &bytes,
const_cast<void**>(&data), NULL, NULL);
kind = "DataView";
}
else if (source.IsBuffer()) {
// Node Buffers and plain Uint8Arrays: Data() and Length() honour
// byteOffset for both.
Napi::Buffer<char> buffer = source.As<Napi::Buffer<char>>();
data = buffer.Data();
bytes = buffer.Length();
kind = "Buffer";
}
else if (source.IsTypedArray()) {
napi_typedarray_type ta_type;
size_t elements = 0;
napi_get_typedarray_info(env, source, &ta_type, &elements,
const_cast<void**>(&data), NULL, NULL);
bytes = elements * TypedArrayElementSize(ta_type);
kind = "typed array";
}
else if (source.IsArrayBuffer()) {
Napi::ArrayBuffer buffer = source.As<Napi::ArrayBuffer>();
data = buffer.Data();
bytes = buffer.ByteLength();
kind = "ArrayBuffer";
}
if (kind != NULL) {
if (bytes > static_cast<size_t>(std::numeric_limits<int>::max())) {
// Views can exceed 2 GB on 64-bit Node; the wording matches
// the Field path per shape.
const std::string what = std::strcmp(kind, "ArrayBuffer") == 0
? "ArrayBuffer exceeds the bind size limit"
: std::string(kind) + " of " + std::to_string(bytes) +
" bytes exceeds the bind size limit";
Napi::RangeError::New(env,
"Cannot bind " + subject.Describe() + ": " + what
).ThrowAsJavaScriptException();
return false;
}
// A zero-length view can carry a NULL data pointer, and
// sqlite3_bind_blob64(NULL, 0) binds SQL NULL rather than an empty
// blob. The Field path always had a real allocation behind it, so
// an empty Buffer round-tripped as an empty blob; keep that by
// handing SQLite a non-NULL pointer it will read zero bytes from.
*rc = sqlite3_bind_blob64(stmt, pos, data != NULL ? data : "",
static_cast<sqlite3_uint64>(bytes), SQLITE_TRANSIENT);
return true;
}
if (source.IsDate()) {
// Documented v8/v9 behaviour: epoch milliseconds as REAL.
*rc = sqlite3_bind_double(stmt, pos,
source.As<Napi::Date>().ValueOf());
return true;
}
if (OtherInstanceOf(source.As<Napi::Object>(), "RegExp")) {
const std::string val = source.ToString().Utf8Value();
*rc = sqlite3_bind_text64(stmt, pos, val.c_str(),
static_cast<sqlite3_uint64>(val.length()),
SQLITE_TRANSIENT, SQLITE_UTF8);
return true;
}
// Plain objects, arrays, Maps, class instances: refused.
ThrowUnsupportedBindType(source, subject.Describe());
return false;
}
void ValueToCell(Cell* cell, sqlite3_value* value) {
cell->str.clear();
cell->integer = 0;
cell->real = 0.;
switch (sqlite3_value_type(value)) {
case SQLITE_INTEGER: {
cell->type = SQLITE_INTEGER;
cell->integer = sqlite3_value_int64(value);
} break;
case SQLITE_FLOAT: {
cell->type = SQLITE_FLOAT;
cell->real = sqlite3_value_double(value);
} break;
case SQLITE_TEXT: {
cell->type = SQLITE_TEXT;
// sqlite3_value_text first, then sqlite3_value_bytes: the docs
// require that order so the UTF-8 conversion happens before the
// length is read.
const char* text =
reinterpret_cast<const char*>(sqlite3_value_text(value));
int length = sqlite3_value_bytes(value);
if (length > 0 && text != NULL) {
cell->str.assign(text, length);
}
} break;
case SQLITE_BLOB: {
cell->type = SQLITE_BLOB;
const void* blob = sqlite3_value_blob(value);
int length = sqlite3_value_bytes(value);
if (length > 0 && blob != NULL) {
cell->str.assign(static_cast<const char*>(blob), length);
}
} break;
default: {
cell->type = SQLITE_NULL;
}
}
}
std::string ValueOrigin::Describe() const {
if (literal != nullptr) return *literal;
if (literal_cstr != nullptr) return std::string(literal_cstr);
if (column_names != nullptr && index < column_names->size()) {
return "column '" + (*column_names)[index] + "'";
}
return "result column " + std::to_string(index);
}
Napi::Value ConvertInt64ToJS(Napi::Env env, sqlite3_int64 value,
int integer_mode, const ValueOrigin& origin) {
// A single range compare on the int64 — deliberately not a call into
// JS: this runs per integer cell.
const bool safe = value >= -(1LL << 53) + 1 && value < (1LL << 53);
switch (integer_mode) {
case Database::INTEGER_BIGINT:
return Napi::BigInt::New(env, static_cast<int64_t>(value));
case Database::INTEGER_MIXED:
if (!safe)
return Napi::BigInt::New(env, static_cast<int64_t>(value));
return Napi::Number::New(env, static_cast<double>(value));
default:
if (safe) return Napi::Number::New(env, static_cast<double>(value));
// The default throws instead of truncating: a silent double
// conversion is exactly the corruption this mode guards
// against. The callback-free sync paths surface this directly;
// async completions deliver it to the user callback.
Napi::RangeError::New(env,
"Integer " + std::to_string(value) + " in " +
origin.Describe() +
" is outside the safe integer range (-(2^53-1) .. 2^53-1); "
"configure('integerMode', 'bigint' | 'mixed') to read it "
"exactly"
).ThrowAsJavaScriptException();
return env.Null();
}
}
Napi::Value ColumnToJS(Napi::Env env, sqlite3_stmt* stmt, int column,
int integer_mode, const ValueOrigin& origin, bool* raised) {
switch (sqlite3_column_type(stmt, column)) {
case SQLITE_INTEGER: {
// The one branch that can raise (the 'number'-mode RangeError
// for an unsafe int64): report it through `raised` so the row
// loop stays free of napi_is_exception_pending calls.
const sqlite3_int64 value = sqlite3_column_int64(stmt, column);
const bool safe = value >= -(1LL << 53) + 1 && value < (1LL << 53);
if (integer_mode == Database::INTEGER_NUMBER && !safe) {
if (raised != NULL) *raised = true;
}
return ConvertInt64ToJS(env, value, integer_mode, origin);
}
case SQLITE_FLOAT: {
return Napi::Number::New(env,
sqlite3_column_double(stmt, column));
}
case SQLITE_TEXT: {
const char* text = reinterpret_cast<const char*>(
sqlite3_column_text(stmt, column));
const int length = sqlite3_column_bytes(stmt, column);
if (text == NULL || length <= 0) {
return Napi::String::New(env, "", 0);
}
return Napi::String::New(env, text, static_cast<size_t>(length));
}
case SQLITE_BLOB: {
const char* blob = reinterpret_cast<const char*>(
sqlite3_column_blob(stmt, column));
const int length = sqlite3_column_bytes(stmt, column);
if (blob == NULL || length <= 0) {
return Napi::Buffer<char>::Copy(env, "", 0);
}
return Napi::Buffer<char>::Copy(env, blob,
static_cast<size_t>(length));
}
default: {
// SQLITE_NULL, and anything unexpected, as the Cell path does.
return env.Null();
}
}
}
Napi::Value CellToJS(Napi::Env env, Cell& cell, int integer_mode,
const ValueOrigin& origin, bool move_payload, bool* raised) {
switch (cell.type) {
case SQLITE_INTEGER: {
// The one branch that can raise; see ColumnToJS for why the
// failure travels in a bool rather than through the env.
const bool safe = cell.integer >= -(1LL << 53) + 1
&& cell.integer < (1LL << 53);
if (integer_mode == Database::INTEGER_NUMBER && !safe) {
if (raised != NULL) *raised = true;
}
return ConvertInt64ToJS(env, cell.integer, integer_mode, origin);
}
case SQLITE_FLOAT: {
return Napi::Number::New(env, cell.real);
}
case SQLITE_TEXT: {
return Napi::String::New(env, cell.str.data(), cell.str.size());
}
case SQLITE_BLOB: {
// Zero-copy for large blobs: transfer ownership of the bytes
// to the Buffer finalizer. Small blobs are cheaper to copy
// (external-buffer bookkeeping outweighs the memcpy), and the
// copy fallback also covers environments without external
// buffer support (e.g. sandboxed renderers).
if (move_payload && cell.str.size() >= 4096) {
auto* payload = new std::string(std::move(cell.str));
napi_value buf = NULL;
napi_status st = napi_create_external_buffer(env,
payload->size(), &(*payload)[0],
[](napi_env, void*, void* hint) {
delete static_cast<std::string*>(hint);
},
payload, &buf);
if (st == napi_ok) {
return Napi::Buffer<char>(env, buf);
}
// No external-buffer support (e.g. sandboxed renderers):
// fall back to a copy from the payload we still hold.
Napi::Buffer<char> copy = Napi::Buffer<char>::Copy(env,
payload->data(), payload->size());
delete payload;
return copy;
}
return Napi::Buffer<char>::Copy(env,
cell.str.data(), cell.str.size());
}
case SQLITE_NULL: {
return env.Null();
}
default:
return env.Null();
}
}
} // namespace node_sqlite3
@@ -0,0 +1,17 @@
/**
* @license lucide-react v0.469.0 - ISC
*
* This source code is licensed under the ISC license.
* See the LICENSE file in the root directory of this source tree.
*/
import createLucideIcon from '../createLucideIcon.js';
const CircleArrowOutDownRight = createLucideIcon("CircleArrowOutDownRight", [
["path", { d: "M12 22a10 10 0 1 1 10-10", key: "130bv5" }],
["path", { d: "M22 22 12 12", key: "131aw7" }],
["path", { d: "M22 16v6h-6", key: "1gvm70" }]
]);
export { CircleArrowOutDownRight as default };
//# sourceMappingURL=circle-arrow-out-down-right.js.map
@@ -0,0 +1,38 @@
import { observeTimeline } from 'motion-dom';
import { canUseNativeTimeline } from './utils/can-use-native-timeline.mjs';
import { getTimeline } from './utils/get-timeline.mjs';
import { offsetToViewTimelineRange } from './utils/offset-to-range.mjs';
function attachToAnimation(animation, options) {
const timeline = getTimeline(options);
const range = options.target
? offsetToViewTimelineRange(options.offset)
: undefined;
/**
* Use native timeline when:
* - No target: ScrollTimeline (existing behaviour)
* - Target with mappable offset: ViewTimeline with named range
* - Target with unmappable offset: fall back to JS observe
*/
const useNative = options.target
? canUseNativeTimeline(options.target) && !!range
: canUseNativeTimeline();
return animation.attachTimeline({
timeline: useNative ? timeline : undefined,
...(range &&
useNative && {
rangeStart: range.rangeStart,
rangeEnd: range.rangeEnd,
}),
observe: (valueAnimation) => {
valueAnimation.pause();
return observeTimeline((progress) => {
valueAnimation.time =
valueAnimation.iterationDuration * progress;
}, timeline);
},
});
}
export { attachToAnimation };
//# sourceMappingURL=attach-animation.mjs.map
@@ -0,0 +1 @@
{"version":3,"file":"parse.d.ts","sourceRoot":"","sources":["../../src/parse.ts"],"names":[],"mappings":"AAoBA,OAAO,EAAE,YAAY,IAAI,EAAE,EAAE,MAAM,QAAQ,CAAA;AAC3C,OAAO,EAAE,gBAAgB,EAAE,KAAK,EAAE,cAAc,EAAE,MAAM,UAAU,CAAA;AAElE,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,cAAc,CAAA;AAC9C,OAAO,EAAE,GAAG,EAAE,MAAM,UAAU,CAAA;AAC9B,OAAO,EAAE,SAAS,EAAE,MAAM,iBAAiB,CAAA;AAC3C,OAAO,EAAc,KAAK,QAAQ,EAAE,KAAK,MAAM,EAAE,MAAM,kBAAkB,CAAA;AAOzE,QAAA,MAAM,KAAK,eAAkB,CAAA;AAC7B,QAAA,MAAM,UAAU,eAAuB,CAAA;AACvC,QAAA,MAAM,SAAS,eAAsB,CAAA;AACrC,QAAA,MAAM,SAAS,eAAsB,CAAA;AACrC,QAAA,MAAM,YAAY,eAAyB,CAAA;AAC3C,QAAA,MAAM,EAAE,eAA2B,CAAA;AACnC,QAAA,MAAM,GAAG,eAAiC,CAAA;AAC1C,QAAA,MAAM,IAAI,eAAiB,CAAA;AAC3B,QAAA,MAAM,QAAQ,eAAqB,CAAA;AACnC,QAAA,MAAM,MAAM,eAAmB,CAAA;AAC/B,QAAA,MAAM,KAAK,eAAkB,CAAA;AAC7B,QAAA,MAAM,KAAK,eAAkB,C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,GAAG,CAAC,GAAG,EAAE,MAAM,EAAE,QAAQ,CAAC,EAAE,cAAc,EAAE,EAAE,CAAC,EAAE,MAAM,IAAI,GAAG,IAAI;CAsCnE"}
@@ -0,0 +1 @@
{"version":3,"file":"snowflake.js","sources":["../../../src/icons/snowflake.ts"],"sourcesContent":["import createLucideIcon from '../createLucideIcon';\n\n/**\n * @component @name Snowflake\n * @description Lucide SVG icon component, renders SVG Element with children.\n *\n * @preview ![img](data:image/svg+xml;base64,PHN2ZyAgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIgogIHdpZHRoPSIyNCIKICBoZWlnaHQ9IjI0IgogIHZpZXdCb3g9IjAgMCAyNCAyNCIKICBmaWxsPSJub25lIgogIHN0cm9rZT0iIzAwMCIgc3R5bGU9ImJhY2tncm91bmQtY29sb3I6ICNmZmY7IGJvcmRlci1yYWRpdXM6IDJweCIKICBzdHJva2Utd2lkdGg9IjIiCiAgc3Ryb2tlLWxpbmVjYXA9InJvdW5kIgogIHN0cm9rZS1saW5lam9pbj0icm91bmQiCj4KICA8cGF0aCBkPSJtMTAgMjAtMS4yNS0yLjVMNiAxOCIgLz4KICA8cGF0aCBkPSJNMTAgNCA4Ljc1IDYuNSA2IDYiIC8+CiAgPHBhdGggZD0ibTE0IDIwIDEuMjUtMi41TDE4IDE4IiAvPgogIDxwYXRoIGQ9Im0xNCA0IDEuMjUgMi41TDE4IDYiIC8+CiAgPHBhdGggZD0ibTE3IDIxLTMtNmgtNCIgLz4KICA8cGF0aCBkPSJtMTcgMy0zIDYgMS41IDMiIC8+CiAgPHBhdGggZD0iTTIgMTJoNi41TDEwIDkiIC8+CiAgPHBhdGggZD0ibTIwIDEwLTEuNSAyIDEuNSAyIiAvPgogIDxwYXRoIGQ9Ik0yMiAxMmgtNi41TDE0IDE1IiAvPgogIDxwYXRoIGQ9Im00IDEwIDEuNSAyTDQgMTQiIC8+CiAgPHBhdGggZD0ibTcgMjEgMy02LTEuNS0zIiAvPgogIDxwYXRoIGQ9Im03IDMgMyA2aDQiIC8+Cjwvc3ZnPgo=) - https://lucide.dev/icons/snowflake\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 Snowflake = createLucideIcon('Snowflake', [\n ['path', { d: 'm10 20-1.25-2.5L6 18', key: '18frcb' }],\n ['path', { d: 'M10 4 8.75 6.5 6 6', key: '7mghy3' }],\n ['path', { d: 'm14 20 1.25-2.5L18 18', key: '1chtki' }],\n ['path', { d: 'm14 4 1.25 2.5L18 6', key: '1b4wsy' }],\n ['path', { d: 'm17 21-3-6h-4', key: '15hhxa' }],\n ['path', { d: 'm17 3-3 6 1.5 3', key: '11697g' }],\n ['path', { d: 'M2 12h6.5L10 9', key: 'kv9z4n' }],\n ['path', { d: 'm20 10-1.5 2 1.5 2', key: '1swlpi' }],\n ['path', { d: 'M22 12h-6.5L14 15', key: '1mxi28' }],\n ['path', { d: 'm4 10 1.5 2L4 14', key: 'k9enpj' }],\n ['path', { d: 'm7 21 3-6-1.5-3', key: 'j8hb9u' }],\n ['path', { d: 'm7 3 3 6h4', key: '1otusx' }],\n]);\n\nexport default Snowflake;\n"],"names":[],"mappings":";;;;;;;;;AAaM,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAY,iBAAiB,WAAa,CAAA,CAAA,CAAA;AAAA,CAAA,CAC9C,CAAC,CAAA,CAAA,CAAA,CAAA,CAAA,CAAQ,CAAA,CAAA,CAAA,CAAE,GAAG,CAAwB,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;A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A,CAAA,CAAE,GAAG,CAAmB,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,CAChD,CAAC,CAAA,CAAA,CAAA,CAAA,CAAA,CAAQ,CAAA,CAAA,CAAA,CAAE,GAAG,CAAc,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAK,UAAU,CAAA;AAC7C,CAAC,CAAA,CAAA;;"}
@@ -0,0 +1 @@
{"version":3,"file":"HeadContent.dev.cjs","names":[],"sources":["../../src/HeadContent.dev.tsx"],"sourcesContent":["'use client'\n\nimport * as React from 'react'\nimport { Asset } from './Asset'\nimport { useRouter } from './useRouter'\nimport { useHydrated } from './ClientOnly'\nimport { useTags } from './headContentUtils'\nimport type { HeadContentProps } from './HeadContent'\n\nconst DEV_STYLES_ATTR = 'data-tanstack-router-dev-styles'\n\n/**\n * Render route-managed head tags (title, meta, links, styles, head scripts).\n * Place inside the document head of your app shell.\n *\n * Development version: filters out dev styles link after hydration and\n * includes a fallback cleanup effect for hydration mismatch cases.\n *\n * @link https://tanstack.com/router/latest/docs/framework/react/guide/document-head-management\n */\nexport function HeadContent(props: HeadContentProps) {\n const tags = useTags(props.assetCrossOrigin)\n const router = useRouter()\n const nonce = router.options.ssr?.nonce\n const hydrated = useHydrated()\n\n // Fallback cleanup for hydration mismatch cases\n // Runs when hydration completes to remove any orphaned dev styles links from DOM\n React.useEffect(() => {\n if (hydrated) {\n document\n .querySelectorAll(`link[${DEV_STYLES_ATTR}]`)\n .forEach((el) => el.remove())\n }\n }, [hydrated])\n\n // Filter out dev styles after hydration\n const filteredTags = hydrated\n ? tags.filter((tag) => !tag.attrs?.[DEV_STYLES_ATTR])\n : tags\n\n return (\n <>\n {filteredTags.map((tag) => (\n <Asset {...tag} key={`tsr-meta-${JSON.stringify(tag)}`} nonce={nonce} />\n ))}\n </>\n )\n}\n"],"mappings":";;;;;;;;;;AASA,IAAM,kBAAkB;;;;;;;;;;AAWxB,SAAgB,YAAY,OAAyB;CACnD,MAAM,OAAO,yBAAA,QAAQ,MAAM,iBAAiB;CAE5C,MAAM,QADS,kBAAA,WAAW,CACL,QAAQ,KAAK;CAClC,MAAM,WAAW,mBAAA,aAAa;AAI9B,OAAM,gBAAgB;AACpB,MAAI,SACF,UACG,iBAAiB,QAAQ,gBAAgB,GAAG,CAC5C,SAAS,OAAO,GAAG,QAAQ,CAAC;IAEhC,CAAC,SAAS,CAAC;AAOd,QACE,iBAAA,GAAA,kBAAA,KAAA,kBAAA,UAAA,EAAA,WALmB,WACjB,KAAK,QAAQ,QAAQ,CAAC,IAAI,QAAQ,iBAAiB,GACnD,MAIc,KAAK,QACjB,iBAAA,GAAA,MAAA,eAAC,cAAA,OAAD;EAAO,GAAI;EAAK,KAAK,YAAY,KAAK,UAAU,IAAI;EAAW;EAAS,CAAA,CACxE,EACD,CAAA"}
@@ -0,0 +1,3 @@
var m=Object.defineProperty;var t=(o,r)=>m(o,"name",{value:r,configurable:!0});import p from"node:repl";import{v as l}from"./package-CeBgXWuR.mjs";import{t as c}from"./index-7AaEi15b.mjs";import"node:url";import"esbuild";import"node:crypto";import"node:fs";import"node:path";import"node:os";import"./temporary-directory-CwHp0_NW.mjs";console.log(`Welcome to tsx v${l} (Node.js ${process.version}).
Type ".help" for more information.`);const s=p.start(),{eval:f}=s,v=t(async function(o,r,e,i){const n=await c(o,e,{loader:"ts",tsconfigRaw:{compilerOptions:{preserveValueImports:!0}},define:{require:"global.require"}}).catch(a=>(console.log(a.message),{code:`
`}));return f.call(this,n.code,r,e,i)},"preEval");s.eval=v;
@@ -0,0 +1,2 @@
import type * as ts from 'typescript';
export declare function typeDeclaredInLib(declarationFiles: ts.SourceFile[], program: ts.Program): boolean;
@@ -0,0 +1 @@
{"version":3,"file":"square-split-vertical.js","sources":["../../../src/icons/square-split-vertical.ts"],"sourcesContent":["import createLucideIcon from '../createLucideIcon';\n\n/**\n * @component @name SquareSplitVertical\n * @description Lucide SVG icon component, renders SVG Element with children.\n *\n * @preview ![img](data:image/svg+xml;base64,PHN2ZyAgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIgogIHdpZHRoPSIyNCIKICBoZWlnaHQ9IjI0IgogIHZpZXdCb3g9IjAgMCAyNCAyNCIKICBmaWxsPSJub25lIgogIHN0cm9rZT0iIzAwMCIgc3R5bGU9ImJhY2tncm91bmQtY29sb3I6ICNmZmY7IGJvcmRlci1yYWRpdXM6IDJweCIKICBzdHJva2Utd2lkdGg9IjIiCiAgc3Ryb2tlLWxpbmVjYXA9InJvdW5kIgogIHN0cm9rZS1saW5lam9pbj0icm91bmQiCj4KICA8cGF0aCBkPSJNNSA4VjVjMC0xIDEtMiAyLTJoMTBjMSAwIDIgMSAyIDJ2MyIgLz4KICA8cGF0aCBkPSJNMTkgMTZ2M2MwIDEtMSAyLTIgMkg3Yy0xIDAtMi0xLTItMnYtMyIgLz4KICA8bGluZSB4MT0iNCIgeDI9IjIwIiB5MT0iMTIiIHkyPSIxMiIgLz4KPC9zdmc+Cg==) - https://lucide.dev/icons/square-split-vertical\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 SquareSplitVertical = createLucideIcon('SquareSplitVertical', [\n ['path', { d: 'M5 8V5c0-1 1-2 2-2h10c1 0 2 1 2 2v3', key: '1pi83i' }],\n ['path', { d: 'M19 16v3c0 1-1 2-2 2H7c-1 0-2-1-2-2v-3', key: 'ido5k7' }],\n ['line', { x1: '4', x2: '20', y1: '12', y2: '12', key: '1e0a9i' }],\n]);\n\nexport default SquareSplitVertical;\n"],"names":[],"mappings":";;;;;;;;;AAaM,CAA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AI,CAAA,CAAA,CAAA,CAAA,CAAM,EAAA,CAAA,CAAA,CAAA,CAAA,CAAK,UAAU,CAAA;AACnE,CAAC,CAAA,CAAA;;"}
@@ -0,0 +1,60 @@
"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
exports.astConverter = astConverter;
const convert_1 = require("./convert");
const convert_comments_1 = require("./convert-comments");
const node_utils_1 = require("./node-utils");
const simple_traverse_1 = require("./simple-traverse");
function astConverter(ast, parseSettings, shouldPreserveNodeMaps) {
/**
* The TypeScript compiler produced fundamental parse errors when parsing the
* source.
*/
const { parseDiagnostics } = ast;
if (parseDiagnostics.length) {
throw (0, convert_1.convertError)(parseDiagnostics[0]);
}
/**
* Recursively convert the TypeScript AST into an ESTree-compatible AST
*/
const instance = new convert_1.Converter(ast, {
allowInvalidAST: parseSettings.allowInvalidAST,
errorOnUnknownASTType: parseSettings.errorOnUnknownASTType,
shouldPreserveNodeMaps,
suppressDeprecatedPropertyWarnings: parseSettings.suppressDeprecatedPropertyWarnings,
});
const estree = instance.convertProgram();
/**
* Optionally remove range and loc if specified
*/
if (!parseSettings.range || !parseSettings.loc) {
(0, simple_traverse_1.simpleTraverse)(estree, {
enter: node => {
if (!parseSettings.range) {
// eslint-disable-next-line @typescript-eslint/ban-ts-comment -- TS 4.0 made this an error because the types aren't optional
// @ts-expect-error
delete node.range;
}
if (!parseSettings.loc) {
// eslint-disable-next-line @typescript-eslint/ban-ts-comment -- TS 4.0 made this an error because the types aren't optional
// @ts-expect-error
delete node.loc;
}
},
});
}
/**
* Optionally convert and include all tokens in the AST
*/
if (parseSettings.tokens) {
estree.tokens = (0, node_utils_1.convertTokens)(ast);
}
/**
* Optionally convert and include all comments in the AST
*/
if (parseSettings.comment) {
estree.comments = (0, convert_comments_1.convertComments)(ast);
}
const astMaps = instance.getASTMaps();
return { astMaps, estree };
}
@@ -0,0 +1,25 @@
"use strict";
Object.defineProperty(exports, "__esModule", {
value: true
});
exports.default = _inherits;
var _setPrototypeOf = require("./setPrototypeOf.js");
function _inherits(subClass, superClass) {
if (typeof superClass !== "function" && superClass !== null) {
throw new TypeError("Super expression must either be null or a function");
}
subClass.prototype = Object.create(superClass && superClass.prototype, {
constructor: {
value: subClass,
writable: true,
configurable: true
}
});
Object.defineProperty(subClass, "prototype", {
writable: false
});
if (superClass) (0, _setPrototypeOf.default)(subClass, superClass);
}
//# sourceMappingURL=inherits.js.map
@@ -0,0 +1,114 @@
import { type Form } from './parse-class.js';
export type { Form };
export type MatcherOptions = {
/** perform a case-insensitive match */
nocase?: boolean;
/** do not treat strings starting with `.` specially */
dot?: boolean;
/** do not match extglobs (treat them as normal strings) */
noext?: boolean;
/**
* normalize unicode in the pattern and the tested strings, with
* this form. `true` means `'NFC'`.
*/
normalize?: boolean | Form;
};
export type Item = {
t: 'lit';
ch: string;
} | {
t: 'any' | 'star';
} | {
t: 'class';
re: RegExp;
} | {
t: 'ext';
type: string;
alts: Item[][];
};
export type Token = Item | {
t: 'open';
type: string;
} | {
t: 'bar';
} | {
t: 'close';
};
export type NegNode = {
t: 'neg';
id: number;
sub: Node;
next: Node;
};
export type SplitNode = {
t: 'split';
id: number;
out: Node[];
};
export type Node = ({
t: 'lit';
id: number;
next: Node;
} & Lit) | {
t: 'any' | 'star';
id: number;
next: Node;
} | {
t: 'class';
id: number;
re: RegExp;
next: Node;
} | SplitNode | NegNode | {
t: 'match';
id: number;
};
/**
* A literal char. With `nocase:true`, `re` folds case, and `ascii`
* holds its results for ASCII chars, by char code: 1 for a match,
* and 2 for not.
*/
export type Lit = {
ch: string;
re?: RegExp;
ascii?: Uint8Array;
};
/**
* For each node id, the gen of the last state that has the node as
* a thread, and of the last state that walked through it. A state is
* built to the end before the states around it go on, and the nodes
* of a negated sub-pattern are only in its states (other than the
* match node, which is never marked). So one mark for each node is
* enough to know if the state being built has it. The Sims of a
* matcher never run at the same time, so they share one Marks.
*/
export type Marks = {
has: Float64Array;
seen: Float64Array;
gen: number;
};
/**
* A node in a graph with no splits or negations. Such a graph is a
* chain of nodes that each match one char, or a `*`.
*/
export type LinearNode = Exclude<Node, SplitNode | NegNode | {
t: 'match';
}>;
export declare class Matcher {
#private;
pattern: string;
options: MatcherOptions;
constructor(pattern: string, options?: MatcherOptions);
test(s: string): boolean;
/**
* The same as {@link Matcher#test}, but the string is not checked
* for `/` chars, so the result for a string that has one is not
* defined. Only use it for a string that is known to be one path
* portion, such as a part of a path that was split on `/`. It can
* be faster, because some patterns do not need to look at each char
* of the string.
*/
testUnchecked(s: string): boolean;
/** a readable listing of the state machine */
toString(): string;
}
//# sourceMappingURL=index.d.ts.map
@@ -0,0 +1 @@
{"version":3,"file":"arrow-up-down.js","sources":["../../../src/icons/arrow-up-down.ts"],"sourcesContent":["import createLucideIcon from '../createLucideIcon';\n\n/**\n * @component @name ArrowUpDown\n * @description Lucide SVG icon component, renders SVG Element with children.\n *\n * @preview ![img](data:image/svg+xml;base64,PHN2ZyAgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIgogIHdpZHRoPSIyNCIKICBoZWlnaHQ9IjI0IgogIHZpZXdCb3g9IjAgMCAyNCAyNCIKICBmaWxsPSJub25lIgogIHN0cm9rZT0iIzAwMCIgc3R5bGU9ImJhY2tncm91bmQtY29sb3I6ICNmZmY7IGJvcmRlci1yYWRpdXM6IDJweCIKICBzdHJva2Utd2lkdGg9IjIiCiAgc3Ryb2tlLWxpbmVjYXA9InJvdW5kIgogIHN0cm9rZS1saW5lam9pbj0icm91bmQiCj4KICA8cGF0aCBkPSJtMjEgMTYtNCA0LTQtNCIgLz4KICA8cGF0aCBkPSJNMTcgMjBWNCIgLz4KICA8cGF0aCBkPSJtMyA4IDQtNCA0IDQiIC8+CiAgPHBhdGggZD0iTTcgNHYxNiIgLz4KPC9zdmc+Cg==) - https://lucide.dev/icons/arrow-up-down\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 ArrowUpDown = createLucideIcon('ArrowUpDown', [\n ['path', { d: 'm21 16-4 4-4-4', key: 'f6ql7i' }],\n ['path', { d: 'M17 20V4', key: '1ejh1v' }],\n ['path', { d: 'm3 8 4-4 4 4', key: '11wl7u' }],\n ['path', { d: 'M7 4v16', key: '1glfcx' }],\n]);\n\nexport default ArrowUpDown;\n"],"names":[],"mappings":";;;;;;;;;AAaM,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAc,iBAAiB,aAAe,CAAA,CAAA,CAAA;AAAA,CAAA,CAClD,CAAC,CAAA,CAAA,CAAA,CAAA,CAAA,CAAQ,CAAA,CAAA,CAAA,CAAE,GAAG,CAAkB,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,CAC/C,CAAC,CAAA,CAAA,CAAA,CAAA,CAAA,CAAQ,CAAA,CAAA,CAAA,CAAE,GAAG,CAAY,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAK,UAAU,CAAA,CAAA;AAAA,CAAA,CACzC,CAAC,CAAA,CAAA,CAAA,CAAA,CAAA,CAAQ,CAAA,CAAA,CAAA,CAAE,GAAG,CAAgB,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,CAC7C,CAAC,CAAA,CAAA,CAAA,CAAA,CAAA,CAAQ,CAAA,CAAA,CAAA,CAAE,GAAG,CAAW,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAK,UAAU,CAAA;AAC1C,CAAC,CAAA,CAAA;;"}
@@ -0,0 +1 @@
{"version":3,"file":"useMatch.cjs","names":[],"sources":["../../src/useMatch.tsx"],"sourcesContent":["'use client'\n\nimport * as React from 'react'\nimport { useStore } from '@tanstack/react-store'\nimport { invariant, replaceEqualDeep } from '@tanstack/router-core'\nimport { isServer } from '@tanstack/router-core/isServer'\nimport { dummyMatchContext, matchContext } from './matchContext'\nimport { useRouter } from './useRouter'\nimport type {\n StructuralSharingOption,\n ValidateSelected,\n} from './structuralSharing'\nimport type {\n AnyRouter,\n MakeRouteMatch,\n MakeRouteMatchUnion,\n RegisteredRouter,\n StrictOrFrom,\n ThrowConstraint,\n ThrowOrOptional,\n} from '@tanstack/router-core'\n\nconst dummyStore = {\n get: () => undefined,\n subscribe: () => ({ unsubscribe: () => {} }),\n} as any\n\nexport interface UseMatchBaseOptions<\n TRouter extends AnyRouter,\n TFrom,\n TStrict extends boolean,\n TThrow extends boolean,\n TSelected,\n TStructuralSharing extends boolean,\n> {\n select?: (\n match: MakeRouteMatch<TRouter['routeTree'], TFrom, TStrict>,\n ) => ValidateSelected<TRouter, TSelected, TStructuralSharing>\n shouldThrow?: TThrow\n}\n\nexport type UseMatchRoute<out TFrom> = <\n TRouter extends AnyRouter = RegisteredRouter,\n TSelected = unknown,\n TStructuralSharing extends boolean = boolean,\n>(\n opts?: UseMatchBaseOptions<\n TRouter,\n TFrom,\n true,\n true,\n TSelected,\n TStructuralSharing\n > &\n StructuralSharingOption<TRouter, TSelected, TStructuralSharing>,\n) => UseMatchResult<TRouter, TFrom, true, TSelected>\n\nexport type UseMatchOptions<\n TRouter extends AnyRouter,\n TFrom extends string | undefined,\n TStrict extends boolean,\n TThrow extends boolean,\n TSelected,\n TStructuralSharing extends boolean,\n> = StrictOrFrom<TRouter, TFrom, TStrict> &\n UseMatchBaseOptions<\n TRouter,\n TFrom,\n TStrict,\n TThrow,\n TSelected,\n TStructuralSharing\n > &\n StructuralSharingOption<TRouter, TSelected, TStructuralSharing>\n\nexport type UseMatchResult<\n TRouter extends AnyRouter,\n TFrom,\n TStrict extends boolean,\n TSelected,\n> = unknown extends TSelected\n ? TStrict extends true\n ? MakeRouteMatch<TRouter['routeTree'], TFrom, TStrict>\n : MakeRouteMatchUnion<TRouter>\n : TSelected\n\n/**\n * Read and select the nearest or targeted route match.\n * @link https://tanstack.com/router/latest/docs/framework/react/api/router/useMatchHook\n */\nexport function useMatch<\n TRouter extends AnyRouter = RegisteredRouter,\n const TFrom extends string | undefined = undefined,\n TStrict extends boolean = true,\n TThrow extends boolean = true,\n TSelected = unknown,\n TStructuralSharing extends boolean = boolean,\n>(\n opts: UseMatchOptions<\n TRouter,\n TFrom,\n TStrict,\n ThrowConstraint<TStrict, TThrow>,\n TSelected,\n TStructuralSharing\n >,\n): ThrowOrOptional<UseMatchResult<TRouter, TFrom, TStrict, TSelected>, TThrow> {\n const router = useRouter<TRouter>()\n const nearestMatchId = React.useContext(\n opts.from ? dummyMatchContext : matchContext,\n )\n\n const key = opts.from ?? nearestMatchId\n const matchStore = key\n ? opts.from\n ? router.stores.getRouteMatchStore(key)\n : router.stores.matchStores.get(key)\n : undefined\n\n if (isServer ?? router.isServer) {\n const match = matchStore?.get()\n if ((opts.shouldThrow ?? true) && !match) {\n if (process.env.NODE_ENV !== 'production') {\n throw new Error(\n `Invariant failed: Could not find ${opts.from ? `an active match from \"${opts.from}\"` : 'a nearest match!'}`,\n )\n }\n\n invariant()\n }\n\n if (match === undefined) {\n return undefined as any\n }\n\n return (opts.select ? opts.select(match as any) : match) as any\n }\n\n const previousResult =\n // eslint-disable-next-line react-hooks/rules-of-hooks -- condition is static\n React.useRef<ValidateSelected<TRouter, TSelected, TStructuralSharing>>(\n undefined,\n )\n\n // eslint-disable-next-line react-hooks/rules-of-hooks -- condition is static\n return useStore(matchStore ?? dummyStore, (match) => {\n if ((opts.shouldThrow ?? true) && !match) {\n if (process.env.NODE_ENV !== 'production') {\n throw new Error(\n `Invariant failed: Could not find ${opts.from ? `an active match from \"${opts.from}\"` : 'a nearest match!'}`,\n )\n }\n\n invariant()\n }\n\n if (match === undefined) {\n return undefined\n }\n\n const selected = (\n opts.select ? opts.select(match as any) : match\n ) as ValidateSelected<TRouter, TSelected, TStructuralSharing>\n\n if (opts.structuralSharing ?? router.options.defaultStructuralSharing) {\n const shared = replaceEqualDeep(previousResult.current, selected)\n previousResult.current = shared\n return shared\n }\n\n return selected\n }) as any\n}\n"],"mappings":";;;;Line truncated
@@ -0,0 +1,17 @@
/**
* @license lucide-react v0.469.0 - ISC
*
* This source code is licensed under the ISC license.
* See the LICENSE file in the root directory of this source tree.
*/
import createLucideIcon from '../createLucideIcon.js';
const UserMinus = createLucideIcon("UserMinus", [
["path", { d: "M16 21v-2a4 4 0 0 0-4-4H6a4 4 0 0 0-4 4v2", key: "1yyitq" }],
["circle", { cx: "9", cy: "7", r: "4", key: "nufk8" }],
["line", { x1: "22", x2: "16", y1: "11", y2: "11", key: "1shjgl" }]
]);
export { UserMinus as default };
//# sourceMappingURL=user-minus.js.map
@@ -0,0 +1,27 @@
/*! *****************************************************************************
Copyright (c) Microsoft Corporation. All rights reserved.
Licensed under the Apache License, Version 2.0 (the "License"); you may not use
this file except in compliance with the License. You may obtain a copy of the
License at http://www.apache.org/licenses/LICENSE-2.0
THIS CODE IS PROVIDED ON AN *AS IS* BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
KIND, EITHER EXPRESS OR IMPLIED, INCLUDING WITHOUT LIMITATION ANY IMPLIED
WARRANTIES OR CONDITIONS OF TITLE, FITNESS FOR A PARTICULAR PURPOSE,
MERCHANTABILITY OR NON-INFRINGEMENT.
See the Apache Version 2.0 License for specific language governing permissions
and limitations under the License.
***************************************************************************** */
interface String {
/**
* Returns true if all leading surrogates and trailing surrogates appear paired and in order.
*/
isWellFormed(): boolean;
/**
* Returns a string where all lone or out-of-order surrogates have been replaced by the Unicode replacement character (U+FFFD).
*/
toWellFormed(): string;
}
@@ -0,0 +1 @@
{"version":3,"file":"assert-valid-pattern.js","sourceRoot":"","sources":["../../src/assert-valid-pattern.ts"],"names":[],"mappings":"AAAA,MAAM,kBAAkB,GAAG,IAAI,GAAG,EAAE,CAAA;AACpC,MAAM,CAAC,MAAM,kBAAkB,GAA+B,CAC5D,OAAgB,EACW,EAAE;IAC7B,IAAI,OAAO,OAAO,KAAK,QAAQ,EAAE,CAAC;QAChC,MAAM,IAAI,SAAS,CAAC,iBAAiB,CAAC,CAAA;IACxC,CAAC;IAED,IAAI,OAAO,CAAC,MAAM,GAAG,kBAAkB,EAAE,CAAC;QACxC,MAAM,IAAI,SAAS,CAAC,qBAAqB,CAAC,CAAA;IAC5C,CAAC;AACH,CAAC,CAAA","sourcesContent":["const MAX_PATTERN_LENGTH = 1024 * 64\nexport const assertValidPattern: (pattern: unknown) => void = (\n pattern: unknown,\n): asserts pattern is string => {\n if (typeof pattern !== 'string') {\n throw new TypeError('invalid pattern')\n }\n\n if (pattern.length > MAX_PATTERN_LENGTH) {\n throw new TypeError('pattern is too long')\n }\n}\n"]}
@@ -0,0 +1 @@
{"version":3,"file":"laptop.js","sources":["../../../src/icons/laptop.ts"],"sourcesContent":["import createLucideIcon from '../createLucideIcon';\n\n/**\n * @component @name Laptop\n * @description Lucide SVG icon component, renders SVG Element with children.\n *\n * @preview ![img](data:image/svg+xml;base64,PHN2ZyAgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIgogIHdpZHRoPSIyNCIKICBoZWlnaHQ9IjI0IgogIHZpZXdCb3g9IjAgMCAyNCAyNCIKICBmaWxsPSJub25lIgogIHN0cm9rZT0iIzAwMCIgc3R5bGU9ImJhY2tncm91bmQtY29sb3I6ICNmZmY7IGJvcmRlci1yYWRpdXM6IDJweCIKICBzdHJva2Utd2lkdGg9IjIiCiAgc3Ryb2tlLWxpbmVjYXA9InJvdW5kIgogIHN0cm9rZS1saW5lam9pbj0icm91bmQiCj4KICA8cGF0aCBkPSJNMjAgMTZWN2EyIDIgMCAwIDAtMi0ySDZhMiAyIDAgMCAwLTIgMnY5bTE2IDBING0xNiAwIDEuMjggMi41NWExIDEgMCAwIDEtLjkgMS40NUgzLjYyYTEgMSAwIDAgMS0uOS0xLjQ1TDQgMTYiIC8+Cjwvc3ZnPgo=) - https://lucide.dev/icons/laptop\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 Laptop = createLucideIcon('Laptop', [\n [\n 'path',\n {\n d: 'M20 16V7a2 2 0 0 0-2-2H6a2 2 0 0 0-2 2v9m16 0H4m16 0 1.28 2.55a1 1 0 0 1-.9 1.45H3.62a1 1 0 0 1-.9-1.45L4 16',\n key: 'tarvll',\n },\n ],\n]);\n\nexport default Laptop;\n"],"names":[],"mappings":";;;;;;;;;AAaM,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAS,iBAAiB,QAAU,CAAA,CAAA,CAAA;AAAA,CACxC,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,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;AAAA,CACP,CAAA,CAAA,CAAA,CAAA;AAAA,CACF,CAAA,CAAA;AACF,CAAC,CAAA,CAAA;;"}
@@ -0,0 +1,3 @@
export * from './index.js';
export { notFound, isNotFound, redirect, isRedirect, rootRouteId, } from '@tanstack/router-core';
export type { NotFoundError } from '@tanstack/router-core';
@@ -0,0 +1,24 @@
import { checkEncCryptoKey } from './crypto_key.js';
import { checkKeyLength } from './signing.js';
import { JOSENotSupported } from '../util/errors.js';
const subtleAlgorithm = (alg) => {
switch (alg) {
case 'RSA-OAEP':
case 'RSA-OAEP-256':
case 'RSA-OAEP-384':
case 'RSA-OAEP-512':
return 'RSA-OAEP';
default:
throw new JOSENotSupported(`alg ${alg} is not supported either by JOSE or your javascript runtime`);
}
};
export async function encrypt(alg, key, cek) {
checkEncCryptoKey(key, alg, 'encrypt');
checkKeyLength(alg, key);
return new Uint8Array(await crypto.subtle.encrypt(subtleAlgorithm(alg), key, cek));
}
export async function decrypt(alg, key, encryptedKey) {
checkEncCryptoKey(key, alg, 'decrypt');
checkKeyLength(alg, key);
return new Uint8Array(await crypto.subtle.decrypt(subtleAlgorithm(alg), key, encryptedKey));
}
@@ -0,0 +1,18 @@
/**
* JSON Web Token (JWT) Claims Set Decoding (no validation, no signature checking)
*
* @module
*/
import type * as types from '../types.d.ts';
/**
* Decodes a signed JSON Web Token payload. This does not validate the JWT Claims Set types or
* values. This does not validate the JWS Signature. For a proper Signed JWT Claims Set validation
* and JWS signature verification use `jose.jwtVerify()`. For an encrypted JWT Claims Set validation
* and JWE decryption use `jose.jwtDecrypt()`.
*
* This function is exported (as a named export) from the main `'jose'` module entry point as well
* as from its subpath export `'jose/jwt/decode'`.
*
* @param jwt JWT token in compact JWS serialization.
*/
export declare function decodeJwt<PayloadType = types.JWTPayload>(jwt: string): PayloadType & types.JWTPayload;
@@ -0,0 +1,614 @@
flf2a$ 6 5 15 1 1
rectangles.flf by David Villegas <mnementh@netcom.com> 12/94
$$@
$$@
$$@
$$@
$$@
$$@@
__ @
| |@
| |@
|__|@
|__|@
@@
_ _ @
| | |@
|_|_|@
$$$ @
$$$ @
$$$ @@
_ _ @
_| | |_ @
|_ _|@
|_ _|@
|_|_| @
@@
_ @
_| |_ @
| __|@
|__ |@
|_ _|@
|_| @@
@
__ __ @
|__| |@
| __|@
|__|__|@
@@
_ @
_| |_ @
| __|@
| __|@
|_ _|@
|_| @@
_ @
| |@
|_|@
$ @
$ @
$ @@
_ @
_|_|@
| | @
| | @
|_|_ @
|_|@@
_ @
|_|_ @
| |@
| |@
_|_|@
|_| @@
@
_____ @
| | | |@
|- -|@
|_|_|_|@
@@
@
_ @
_| |_ @
|_ _|@
|_| @
@@
$ @
$ @
$ @
_ @
| |@
|_|@@
$$$ @
$$$ @
___ @
|___|@
$$$ @
$$$ @@
$ @
$ @
$ @
_ @
|_|@
$ @@
@
_ @
/ |@
/ / @
|_/ @
@@
@
___ @
| |@
| | |@
|___|@
@@
@
___ @
|_ | @
_| |_ @
|_____|@
@@
@
___ @
|_ |@
| _|@
|___|@
@@
@
___ @
|_ |@
|_ |@
|___|@
@@
@
___ @
| | |@
|_ |@
|_|@
@@
@
___ @
| _|@
|_ |@
|___|@
@@
@
___ @
| _|@
| . |@
|___|@
@@
@
___ @
|_ |@
| |@
|_|@
@@
@
___ @
| . |@
| . |@
|___|@
@@
@
___ @
| . |@
|_ |@
|___|@
@@
@
_ @
|_|@
_ @
|_|@
@@
@
_ @
|_|@
_ @
| |@
|_|@@
__@
/ /@
/ / @
< < @
\ \ @
\_\@@
$$$$$ @
$$$$$ @
_____ @
|_____|@
|_____|@
$$$$$ @@
__ @
\ \ @
\ \ @
> >@
/ / @
/_/ @@
_____ @
|___ |@
| _|@
|_| @
|_| @
@@
@
_____ @
| __ |@
| |___|@
|_____|@
@@
@
_____ @
| _ |@
| |@
|__|__|@
@@
@
_____ @
| __ |@
| __ -|@
|_____|@
@@
@
_____ @
| |@
| --|@
|_____|@
@@
@
____ @
| \ @
| | |@
|____/ @
@@
@
_____ @
| __|@
| __|@
|_____|@
@@
@
_____ @
| __|@
| __|@
|__| @
@@
@
_____ @
| __|@
| | |@
|_____|@
@@
@
_____ @
| | |@
| |@
|__|__|@
@@
@
_____ @
| |@
|- -|@
|_____|@
@@
@
__ @
__| |@
| | |@
|_____|@
@@
@
_____ @
| | |@
| -|@
|__|__|@
@@
@
__ @
| | @
| |__ @
|_____|@
@@
@
_____ @
| |@
| | | |@
|_|_|_|@
@@
@
_____ @
| | |@
| | | |@
|_|___|@
@@
@
_____ @
| |@
| | |@
|_____|@
@@
@
_____ @
| _ |@
| __|@
|__| @
@@
@
_____ @
| |@
| | |@
|__ _|@
|__|@@
@
_____ @
| __ |@
| -|@
|__|__|@
@@
@
_____ @
| __|@
|__ |@
|_____|@
@@
@
_____ @
|_ _|@
| | @
|_| @
@@
@
_____ @
| | |@
| | |@
|_____|@
@@
@
_____ @
| | |@
| | |@
\___/ @
@@
@
_ _ _ @
| | | |@
| | | |@
|_____|@
@@
@
__ __ @
| | |@
|- -|@
|__|__|@
@@
@
__ __ @
| | |@
|_ _|@
|_| @
@@
@
_____ @
|__ |@
| __|@
|_____|@
@@
___ @
| _|@
| | @
| | @
| |_ @
|___|@@
@
_ @
| \ @
\ \ @
\_|@
@@
___ @
|_ |@
| |@
| |@
_| |@
|___|@@
_____ @
| _ |@
|_| |_|@
$$$$$ @
$$$$$ @
$$$$$ @@
$$$$$ @
$$$$$ @
$$$$$ @
$$$$$ @
_____ @
|_____|@@
___ @
|_ |@
|_|@
$$$ @
$$$ @
$$$ @@
@
@
___ @
| .'|@
|__,|@
@@
@
_ @
| |_ @
| . |@
|___|@
@@
@
@
___ @
| _|@
|___|@
@@
@
_ @
_| |@
| . |@
|___|@
@@
@
@
___ @
| -_|@
|___|@
@@
@
___ @
| _|@
| _|@
|_| @
@@
@
@
___ @
| . |@
|_ |@
|___|@@
@
_ @
| |_ @
| |@
|_|_|@
@@
@
_ @
|_|@
| |@
|_|@
@@
@
_ @
|_|@
| |@
_| |@
|___|@@
@
_ @
| |_ @
| '_|@
|_,_|@
@@
@
_ @
| |@
| |@
|_|@
@@
@
@
_____ @
| |@
|_|_|_|@
@@
@
@
___ @
| |@
|_|_|@
@@
@
@
___ @
| . |@
|___|@
@@
@
@
___ @
| . |@
| _|@
|_| @@
@
@
___ @
| . |@
|_ |@
|_|@@
@
@
___ @
| _|@
|_| @
@@
@
@
___ @
|_ -|@
|___|@
@@
@
_ @
| |_ @
| _|@
|_| @
@@
@
@
_ _ @
| | |@
|___|@
@@
@
@
_ _ @
| | |@
\_/ @
@@
@
@
_ _ _ @
| | | |@
|_____|@
@@
@
@
_ _ @
|_'_|@
|_,_|@
@@
@
@
_ _ @
| | |@
|_ |@
|___|@@
@
@
___ @
|- _|@
|___|@
@@
___ @
| _|@
_| | @
|_ | @
| |_ @
|___|@@
_ @
| |@
| |@
| |@
| |@
|_|@@
___ @
|_ | @
| |_ @
| _|@
_| | @
|___| @@
_____ @
| | |@
|_|___|@
$$$$$ @
$$$$$ @
$$$$$ @@
__ __ @
|__|__|@
| _ |@
| |@
|__|__|@
@@
__ __ @
|__|__|@
| |@
| | |@
|_____|@
@@
__ __ @
|__|__|@
| | |@
| | |@
|_____|@
@@
_ _ @
|_|_|@
___ @
| .'|@
|__,|@
@@
_ _ @
|_|_|@
___ @
| . |@
|___|@
@@
_ _ @
|_|_|@
_ _ @
| | |@
|___|@
@@
@
_____ @
| __ |@
| __ -|@
| ___|@
|_| @@