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,70 @@
/**
* @fileoverview Rule to disallow use of the new operator with global non-constructor functions
* @author Sosuke Suzuki
*/
"use strict";
//------------------------------------------------------------------------------
// Helpers
//------------------------------------------------------------------------------
const nonConstructorGlobalFunctionNames = ["Symbol", "BigInt"];
//------------------------------------------------------------------------------
// Rule Definition
//------------------------------------------------------------------------------
/** @type {import('../types').Rule.RuleModule} */
module.exports = {
meta: {
type: "problem",
docs: {
description:
"Disallow `new` operators with global non-constructor functions",
recommended: true,
url: "https://eslint.org/docs/latest/rules/no-new-native-nonconstructor",
},
schema: [],
messages: {
noNewNonconstructor:
"`{{name}}` cannot be called as a constructor.",
},
},
create(context) {
const sourceCode = context.sourceCode;
return {
"Program:exit"(node) {
const globalScope = sourceCode.getScope(node);
for (const nonConstructorName of nonConstructorGlobalFunctionNames) {
const variable = globalScope.set.get(nonConstructorName);
if (variable && variable.defs.length === 0) {
variable.references.forEach(ref => {
const idNode = ref.identifier;
const parent = idNode.parent;
if (
parent &&
parent.type === "NewExpression" &&
parent.callee === idNode
) {
context.report({
node: idNode,
messageId: "noNewNonconstructor",
data: { name: nonConstructorName },
});
}
});
}
}
},
};
},
};
@@ -0,0 +1,58 @@
{
"name": "deep-is",
"version": "0.1.4",
"description": "node's assert.deepEqual algorithm except for NaN being equal to NaN",
"main": "index.js",
"directories": {
"lib": ".",
"example": "example",
"test": "test"
},
"scripts": {
"test": "tape test/*.js"
},
"devDependencies": {
"tape": "~1.0.2"
},
"repository": {
"type": "git",
"url": "http://github.com/thlorenz/deep-is.git"
},
"keywords": [
"equality",
"equal",
"compare"
],
"author": {
"name": "Thorsten Lorenz",
"email": "thlorenz@gmx.de",
"url": "http://thlorenz.com"
},
"license": "MIT",
"testling": {
"files": "test/*.js",
"browsers": {
"ie": [
6,
7,
8,
9
],
"ff": [
3.5,
10,
15
],
"chrome": [
10,
22
],
"safari": [
5.1
],
"opera": [
12
]
}
}
}
@@ -0,0 +1 @@
{"version":3,"file":"receipt-text.js","sources":["../../../src/icons/receipt-text.ts"],"sourcesContent":["import createLucideIcon from '../createLucideIcon';\n\n/**\n * @component @name ReceiptText\n * @description Lucide SVG icon component, renders SVG Element with children.\n *\n * @preview ![img](data:image/svg+xml;base64,PHN2ZyAgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIgogIHdpZHRoPSIyNCIKICBoZWlnaHQ9IjI0IgogIHZpZXdCb3g9IjAgMCAyNCAyNCIKICBmaWxsPSJub25lIgogIHN0cm9rZT0iIzAwMCIgc3R5bGU9ImJhY2tncm91bmQtY29sb3I6ICNmZmY7IGJvcmRlci1yYWRpdXM6IDJweCIKICBzdHJva2Utd2lkdGg9IjIiCiAgc3Ryb2tlLWxpbmVjYXA9InJvdW5kIgogIHN0cm9rZS1saW5lam9pbj0icm91bmQiCj4KICA8cGF0aCBkPSJNNCAydjIwbDItMSAyIDEgMi0xIDIgMSAyLTEgMiAxIDItMSAyIDFWMmwtMiAxLTItMS0yIDEtMi0xLTIgMS0yLTEtMiAxWiIgLz4KICA8cGF0aCBkPSJNMTQgOEg4IiAvPgogIDxwYXRoIGQ9Ik0xNiAxMkg4IiAvPgogIDxwYXRoIGQ9Ik0xMyAxNkg4IiAvPgo8L3N2Zz4K) - https://lucide.dev/icons/receipt-text\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 ReceiptText = createLucideIcon('ReceiptText', [\n [\n 'path',\n { d: 'M4 2v20l2-1 2 1 2-1 2 1 2-1 2 1 2-1 2 1V2l-2 1-2-1-2 1-2-1-2 1-2-1-2 1Z', key: 'q3az6g' },\n ],\n ['path', { d: 'M14 8H8', key: '1l3xfs' }],\n ['path', { d: 'M16 12H8', key: '1fr5h0' }],\n ['path', { d: 'M13 16H8', key: 'wsln4y' }],\n]);\n\nexport default ReceiptText;\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,CAClD,CAAA,CAAA;AAAA,CAAA,CAAA,CAAA,CACE,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA;AAAA,CACA,CAAA,CAAA,CAAA,CAAA,CAAE,CAAA,CAAG,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAA2E,EAAA,CAAA,CAAA,CAAA,CAAA,CAAK,QAAS,CAAA,CAAA;AAAA,CAChG,CAAA,CAAA,CAAA;AAAA,CAAA,CACA,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,CAAA;AAAA,CAAA,CACxC,CAAC,CAAA,CAAA,CAAA,CAAA,CAAA,CAAQ,CAAA,CAAA,CAAA,CAAE,GAAG,CAAY,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAK,UAAU,CAAA,CAAA;AAAA,CAAA,CACzC,CAAC,CAAA,CAAA,CAAA,CAAA,CAAA,CAAQ,CAAA,CAAA,CAAA,CAAE,GAAG,CAAY,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAK,UAAU,CAAA;AAC3C,CAAC,CAAA,CAAA;;"}
@@ -0,0 +1,2 @@
export declare const assertValidPattern: (pattern: unknown) => void;
//# sourceMappingURL=assert-valid-pattern.d.ts.map
@@ -0,0 +1,136 @@
// src/use-controllable-state.tsx
import * as React from "react";
import { useLayoutEffect } from "@radix-ui/react-use-layout-effect";
var useInsertionEffect = React[" useInsertionEffect ".trim().toString()] || useLayoutEffect;
function useControllableState({
prop,
defaultProp,
onChange = () => {
},
caller
}) {
const [uncontrolledProp, setUncontrolledProp, onChangeRef] = useUncontrolledState({
defaultProp,
onChange
});
const isControlled = prop !== void 0;
const value = isControlled ? prop : uncontrolledProp;
if (true) {
const isControlledRef = React.useRef(prop !== void 0);
React.useEffect(() => {
const wasControlled = isControlledRef.current;
if (wasControlled !== isControlled) {
const from = wasControlled ? "controlled" : "uncontrolled";
const to = isControlled ? "controlled" : "uncontrolled";
console.warn(
`${caller} is changing from ${from} to ${to}. Components should not switch from controlled to uncontrolled (or vice versa). Decide between using a controlled or uncontrolled value for the lifetime of the component.`
);
}
isControlledRef.current = isControlled;
}, [isControlled, caller]);
}
const setValue = React.useCallback(
(nextValue) => {
if (isControlled) {
const value2 = isFunction(nextValue) ? nextValue(prop) : nextValue;
if (value2 !== prop) {
onChangeRef.current?.(value2);
}
} else {
setUncontrolledProp(nextValue);
}
},
[isControlled, prop, setUncontrolledProp, onChangeRef]
);
return [value, setValue];
}
function useUncontrolledState({
defaultProp,
onChange
}) {
const [value, setValue] = React.useState(defaultProp);
const prevValueRef = React.useRef(value);
const onChangeRef = React.useRef(onChange);
useInsertionEffect(() => {
onChangeRef.current = onChange;
}, [onChange]);
React.useEffect(() => {
if (prevValueRef.current !== value) {
onChangeRef.current?.(value);
prevValueRef.current = value;
}
}, [value, prevValueRef]);
return [value, setValue, onChangeRef];
}
function isFunction(value) {
return typeof value === "function";
}
// src/use-controllable-state-reducer.tsx
import * as React2 from "react";
import { useEffectEvent } from "@radix-ui/react-use-effect-event";
var SYNC_STATE = Symbol("RADIX:SYNC_STATE");
function useControllableStateReducer(reducer, userArgs, initialArg, init) {
const { prop: controlledState, defaultProp, onChange: onChangeProp, caller } = userArgs;
const isControlled = controlledState !== void 0;
const onChange = useEffectEvent(onChangeProp);
if (true) {
const isControlledRef = React2.useRef(controlledState !== void 0);
React2.useEffect(() => {
const wasControlled = isControlledRef.current;
if (wasControlled !== isControlled) {
const from = wasControlled ? "controlled" : "uncontrolled";
const to = isControlled ? "controlled" : "uncontrolled";
console.warn(
`${caller} is changing from ${from} to ${to}. Components should not switch from controlled to uncontrolled (or vice versa). Decide between using a controlled or uncontrolled value for the lifetime of the component.`
);
}
isControlledRef.current = isControlled;
}, [isControlled, caller]);
}
const args = [{ ...initialArg, state: defaultProp }];
if (init) {
args.push(init);
}
const [internalState, dispatch] = React2.useReducer(
(state2, action) => {
if (action.type === SYNC_STATE) {
return { ...state2, state: action.state };
}
const next = reducer(state2, action);
if (isControlled && !Object.is(next.state, state2.state)) {
onChange(next.state);
}
return next;
},
...args
);
const uncontrolledState = internalState.state;
const prevValueRef = React2.useRef(uncontrolledState);
React2.useEffect(() => {
if (prevValueRef.current !== uncontrolledState) {
prevValueRef.current = uncontrolledState;
if (!isControlled) {
onChange(uncontrolledState);
}
}
}, [uncontrolledState, prevValueRef, isControlled]);
const state = React2.useMemo(() => {
const isControlled2 = controlledState !== void 0;
if (isControlled2) {
return { ...internalState, state: controlledState };
}
return internalState;
}, [internalState, controlledState]);
React2.useEffect(() => {
if (isControlled && !Object.is(controlledState, internalState.state)) {
dispatch({ type: SYNC_STATE, state: controlledState });
}
}, [controlledState, internalState.state, isControlled]);
return [state, dispatch];
}
export {
useControllableState,
useControllableStateReducer
};
//# sourceMappingURL=index.mjs.map
@@ -0,0 +1,28 @@
"use strict";
/**
* Re-exports of task-related types from the MCP protocol spec.
* WARNING: These APIs are experimental and may change without notice.
*
* These types are defined in types.ts (matching the protocol spec) and
* re-exported here for convenience when working with experimental task features.
*/
Object.defineProperty(exports, "__esModule", { value: true });
exports.ServerTasksCapabilitySchema = exports.ClientTasksCapabilitySchema = exports.CancelTaskResultSchema = exports.CancelTaskRequestSchema = exports.ListTasksResultSchema = exports.ListTasksRequestSchema = exports.GetTaskPayloadRequestSchema = exports.GetTaskResultSchema = exports.GetTaskRequestSchema = exports.TaskStatusNotificationSchema = exports.TaskStatusNotificationParamsSchema = exports.CreateTaskResultSchema = exports.TaskSchema = exports.RelatedTaskMetadataSchema = exports.TaskCreationParamsSchema = void 0;
// Task schemas (Zod)
var types_js_1 = require("../../types.js");
Object.defineProperty(exports, "TaskCreationParamsSchema", { enumerable: true, get: function () { return types_js_1.TaskCreationParamsSchema; } });
Object.defineProperty(exports, "RelatedTaskMetadataSchema", { enumerable: true, get: function () { return types_js_1.RelatedTaskMetadataSchema; } });
Object.defineProperty(exports, "TaskSchema", { enumerable: true, get: function () { return types_js_1.TaskSchema; } });
Object.defineProperty(exports, "CreateTaskResultSchema", { enumerable: true, get: function () { return types_js_1.CreateTaskResultSchema; } });
Object.defineProperty(exports, "TaskStatusNotificationParamsSchema", { enumerable: true, get: function () { return types_js_1.TaskStatusNotificationParamsSchema; } });
Object.defineProperty(exports, "TaskStatusNotificationSchema", { enumerable: true, get: function () { return types_js_1.TaskStatusNotificationSchema; } });
Object.defineProperty(exports, "GetTaskRequestSchema", { enumerable: true, get: function () { return types_js_1.GetTaskRequestSchema; } });
Object.defineProperty(exports, "GetTaskResultSchema", { enumerable: true, get: function () { return types_js_1.GetTaskResultSchema; } });
Object.defineProperty(exports, "GetTaskPayloadRequestSchema", { enumerable: true, get: function () { return types_js_1.GetTaskPayloadRequestSchema; } });
Object.defineProperty(exports, "ListTasksRequestSchema", { enumerable: true, get: function () { return types_js_1.ListTasksRequestSchema; } });
Object.defineProperty(exports, "ListTasksResultSchema", { enumerable: true, get: function () { return types_js_1.ListTasksResultSchema; } });
Object.defineProperty(exports, "CancelTaskRequestSchema", { enumerable: true, get: function () { return types_js_1.CancelTaskRequestSchema; } });
Object.defineProperty(exports, "CancelTaskResultSchema", { enumerable: true, get: function () { return types_js_1.CancelTaskResultSchema; } });
Object.defineProperty(exports, "ClientTasksCapabilitySchema", { enumerable: true, get: function () { return types_js_1.ClientTasksCapabilitySchema; } });
Object.defineProperty(exports, "ServerTasksCapabilitySchema", { enumerable: true, get: function () { return types_js_1.ServerTasksCapabilitySchema; } });
//# sourceMappingURL=types.js.map
@@ -0,0 +1,15 @@
import type { $ZodMemoizer, $ZodType } from "./schemas.js";
export declare class $ZodCyclicError extends Error {
constructor();
}
/**
* Whether one parse can re-enter this schema, i.e. its subtree contains a cycle.
* Exported for `z.compile`, which refuses to compile such a schema: cycle
* breaking is driven from here off state keyed on the parse context, and a
* generated fast path has no context to key on.
*/
export declare function isRecursiveSchema(inst: $ZodType): boolean;
/** The memoizer that gives containers cycle support. `zod` installs it by default; `zod/mini` opts in with `config({ memoizer: memoizer() })`. */
export declare function memoizer(): $ZodMemoizer;
/** Whether this value is a node a back-edge resolved to before it finished. */
export declare function isBackEdge(ctx: object, value: unknown): boolean;
@@ -0,0 +1,27 @@
ESQuery is a library for querying the AST output by Esprima for patterns of syntax using a CSS style selector system. Check out the demo:
[demo](https://estools.github.io/esquery/)
The following selectors are supported:
* AST node type: `ForStatement`
* [wildcard](http://dev.w3.org/csswg/selectors4/#universal-selector): `*`
* [attribute existence](http://dev.w3.org/csswg/selectors4/#attribute-selectors): `[attr]`
* [attribute value](http://dev.w3.org/csswg/selectors4/#attribute-selectors): `[attr="foo"]` or `[attr=123]`
* attribute regex: `[attr=/foo.*/]` or (with flags) `[attr=/foo.*/is]`
* attribute conditions: `[attr!="foo"]`, `[attr>2]`, `[attr<3]`, `[attr>=2]`, or `[attr<=3]`
* nested attribute: `[attr.level2="foo"]`
* field: `FunctionDeclaration > Identifier.id`
* [First](http://dev.w3.org/csswg/selectors4/#the-first-child-pseudo) or [last](http://dev.w3.org/csswg/selectors4/#the-last-child-pseudo) child: `:first-child` or `:last-child`
* [nth-child](http://dev.w3.org/csswg/selectors4/#the-nth-child-pseudo) (no ax+b support): `:nth-child(2)`
* [nth-last-child](http://dev.w3.org/csswg/selectors4/#the-nth-last-child-pseudo) (no ax+b support): `:nth-last-child(1)`
* [descendant](http://dev.w3.org/csswg/selectors4/#descendant-combinators): `ancestor descendant`
* [child](http://dev.w3.org/csswg/selectors4/#child-combinators): `parent > child`
* [following sibling](http://dev.w3.org/csswg/selectors4/#general-sibling-combinators): `node ~ sibling`
* [adjacent sibling](http://dev.w3.org/csswg/selectors4/#adjacent-sibling-combinators): `node + adjacent`
* [negation](http://dev.w3.org/csswg/selectors4/#negation-pseudo): `:not(ForStatement)`
* [has](https://drafts.csswg.org/selectors-4/#has-pseudo): `:has(ForStatement)`, `:has(> ForStatement)`
* [matches-any](http://dev.w3.org/csswg/selectors4/#matches): `:is([attr] > :first-child, :last-child)`
* [subject indicator](http://dev.w3.org/csswg/selectors4/#subject): `!IfStatement > [name="foo"]`
* class of AST node: `:statement`, `:expression`, `:declaration`, `:function`, or `:pattern`
[![Build Status](https://travis-ci.org/estools/esquery.png?branch=master)](https://travis-ci.org/estools/esquery)
@@ -0,0 +1,98 @@
"use strict";
Object.defineProperty(exports, "__esModule", {
value: true
});
exports.beginHiddenCallStack = beginHiddenCallStack;
exports.endHiddenCallStack = endHiddenCallStack;
exports.expectedError = expectedError;
exports.injectVirtualStackFrame = injectVirtualStackFrame;
var _Object$getOwnPropert;
const ErrorToString = Function.call.bind(Error.prototype.toString);
const SUPPORTED = !!Error.captureStackTrace && ((_Object$getOwnPropert = Object.getOwnPropertyDescriptor(Error, "stackTraceLimit")) == null ? void 0 : _Object$getOwnPropert.writable) === true;
const START_HIDING = "startHiding - secret - don't use this - v1";
const STOP_HIDING = "stopHiding - secret - don't use this - v1";
const expectedErrors = new WeakSet();
const virtualFrames = new WeakMap();
function CallSite(filename) {
return Object.create({
isNative: () => false,
isConstructor: () => false,
isToplevel: () => true,
getFileName: () => filename,
getLineNumber: () => undefined,
getColumnNumber: () => undefined,
getFunctionName: () => undefined,
getMethodName: () => undefined,
getTypeName: () => undefined,
toString: () => filename
});
}
function injectVirtualStackFrame(error, filename) {
if (!SUPPORTED) return;
let frames = virtualFrames.get(error);
if (!frames) virtualFrames.set(error, frames = []);
frames.push(CallSite(filename));
return error;
}
function expectedError(error) {
if (!SUPPORTED) return;
expectedErrors.add(error);
return error;
}
function beginHiddenCallStack(fn) {
if (!SUPPORTED) return fn;
return Object.defineProperty(function (...args) {
setupPrepareStackTrace();
return fn(...args);
}, "name", {
value: STOP_HIDING
});
}
function endHiddenCallStack(fn) {
if (!SUPPORTED) return fn;
return Object.defineProperty(function (...args) {
return fn(...args);
}, "name", {
value: START_HIDING
});
}
function setupPrepareStackTrace() {
setupPrepareStackTrace = () => {};
const {
prepareStackTrace = defaultPrepareStackTrace
} = Error;
const MIN_STACK_TRACE_LIMIT = 50;
Error.stackTraceLimit && (Error.stackTraceLimit = Math.max(Error.stackTraceLimit, MIN_STACK_TRACE_LIMIT));
Error.prepareStackTrace = function stackTraceRewriter(err, trace) {
let newTrace = [];
const isExpected = expectedErrors.has(err);
let status = isExpected ? "hiding" : "unknown";
for (let i = 0; i < trace.length; i++) {
const name = trace[i].getFunctionName();
if (name === START_HIDING) {
status = "hiding";
} else if (name === STOP_HIDING) {
if (status === "hiding") {
status = "showing";
if (virtualFrames.has(err)) {
newTrace.unshift(...virtualFrames.get(err));
}
} else if (status === "unknown") {
newTrace = trace;
break;
}
} else if (status !== "hiding") {
newTrace.push(trace[i]);
}
}
return prepareStackTrace(err, newTrace);
};
}
function defaultPrepareStackTrace(err, trace) {
if (trace.length === 0) return ErrorToString(err);
return `${ErrorToString(err)}\n at ${trace.join("\n at ")}`;
}
0 && 0;
//# sourceMappingURL=rewrite-stack-trace.js.map
@@ -0,0 +1,58 @@
"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
exports.simpleTraverse = simpleTraverse;
const visitor_keys_1 = require("@typescript-eslint/visitor-keys");
function isValidNode(x) {
return (typeof x === 'object' &&
x != null &&
'type' in x &&
typeof x.type === 'string');
}
function getVisitorKeysForNode(allVisitorKeys, node) {
const keys = allVisitorKeys[node.type];
return (keys ?? []);
}
class SimpleTraverser {
allVisitorKeys = visitor_keys_1.visitorKeys;
selectors;
setParentPointers;
constructor(selectors, setParentPointers = false) {
this.selectors = selectors;
this.setParentPointers = setParentPointers;
if (selectors.visitorKeys) {
this.allVisitorKeys = selectors.visitorKeys;
}
}
traverse(node, parent) {
if (!isValidNode(node)) {
return;
}
if (this.setParentPointers) {
node.parent = parent;
}
if ('enter' in this.selectors) {
this.selectors.enter(node, parent);
}
else if (node.type in this.selectors.visitors) {
this.selectors.visitors[node.type](node, parent);
}
const keys = getVisitorKeysForNode(this.allVisitorKeys, node);
if (keys.length < 1) {
return;
}
for (const key of keys) {
const childOrChildren = node[key];
if (Array.isArray(childOrChildren)) {
for (const child of childOrChildren) {
this.traverse(child, node);
}
}
else {
this.traverse(childOrChildren, node);
}
}
}
}
function simpleTraverse(startingNode, options, setParentPointers = false) {
new SimpleTraverser(options, setParentPointers).traverse(startingNode, undefined);
}
@@ -0,0 +1,22 @@
/*! *****************************************************************************
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="es2019" />
/// <reference lib="dom" />
/// <reference lib="webworker.importscripts" />
/// <reference lib="scripthost" />
/// <reference lib="dom.iterable" />
/// <reference lib="dom.asynciterable" />
@@ -0,0 +1 @@
{"version":3,"file":"websocket.js","sourceRoot":"","sources":["../../../src/client/websocket.ts"],"names":[],"mappings":";;;AACA,0CAAmE;AAEnE,MAAM,WAAW,GAAG,KAAK,CAAC;AAE1B;;GAEG;AACH,MAAa,wBAAwB;IAQjC,YAAY,GAAQ;QAChB,IAAI,CAAC,IAAI,GAAG,GAAG,CAAC;IACpB,CAAC;IAED,KAAK;QACD,IAAI,IAAI,CAAC,OAAO,EAAE,CAAC;YACf,MAAM,IAAI,KAAK,CACX,mHAAmH,CACtH,CAAC;QACN,CAAC;QAED,OAAO,IAAI,OAAO,CAAC,CAAC,OAAO,EAAE,MAAM,EAAE,EAAE;YACnC,IAAI,CAAC,OAAO,GAAG,IAAI,SAAS,CAAC,IAAI,CAAC,IAAI,EAAE,WAAW,CAAC,CAAC;YAErD,IAAI,CAAC,OAAO,CAAC,OAAO,GAAG,KAAK,CAAC,EAAE;gBAC3B,MAAM,KAAK,GAAG,OAAO,IAAI,KAAK,CAAC,CAAC,CAAE,KAAK,CAAC,KAAe,CAAC,CAAC,CAAC,IAAI,KAAK,CAAC,oBAAoB,IAAI,CAAC,SAAS,CAAC,KAAK,CAAC,EAAE,CAAC,CAAC;gBACjH,MAAM,CAAC,KAAK,CAAC,CAAC;gBACd,IAAI,CAAC,OAAO,EAAE,CAAC,KAAK,CAAC,CAAC;YAC1B,CAAC,CAAC;YAEF,IAAI,CAAC,OAAO,CAAC,MAAM,GAAG,GAAG,EAAE;gBACvB,OAAO,EAAE,CAAC;YACd,CAAC,CAAC;YAEF,IAAI,CAAC,OAAO,CAAC,OAAO,GAAG,GAAG,EAAE;gBACxB,IAAI,CAAC,OAAO,EAAE,EAAE,CAAC;YACrB,CAAC,CAAC;YAEF,IAAI,CAAC,OAAO,CAAC,SAAS,GAAG,CAAC,KAAmB,EAAE,EAAE;gBAC7C,IAAI,OAAuB,CAAC;gBAC5B,IAAI,CAAC;oBACD,OAAO,GAAG,+BAAoB,CAAC,KAAK,CAAC,IAAI,CAAC,KAAK,CAAC,KAAK,CAAC,IAAI,CAAC,CAAC,CAAC;gBACjE,CAAC;gBAAC,OAAO,KAAK,EAAE,CAAC;oBACb,IAAI,CAAC,OAAO,EAAE,CAAC,KAAc,CAAC,CAAC;oBAC/B,OAAO;gBACX,CAAC;gBAED,IAAI,CAAC,SAAS,EAAE,CAAC,OAAO,CAAC,CAAC;YAC9B,CAAC,CAAC;QACN,CAAC,CAAC,CAAC;IACP,CAAC;IAED,KAAK,CAAC,KAAK;QACP,IAAI,CAAC,OAAO,EAAE,KAAK,EAAE,CAAC;IAC1B,CAAC;IAED,IAAI,CAAC,OAAuB;QACxB,OAAO,IAAI,OAAO,CAAC,CAAC,OAAO,EAAE,MAAM,EAAE,EAAE;YACnC,IAAI,CAAC,IAAI,CAAC,OAAO,EAAE,CAAC;gBAChB,MAAM,CAAC,IAAI,KAAK,CAAC,eAAe,CAAC,CAAC,CAAC;gBACnC,OAAO;YACX,CAAC;YAED,IAAI,CAAC,OAAO,EAAE,IAAI,CAAC,IAAI,CAAC,SAAS,CAAC,OAAO,CAAC,CAAC,CAAC;YAC5C,OAAO,EAAE,CAAC;QACd,CAAC,CAAC,CAAC;IACP,CAAC;CACJ;AAjED,4DAiEC"}
@@ -0,0 +1,23 @@
/**
* @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 BadgeInfo = createLucideIcon("BadgeInfo", [
[
"path",
{
d: "M3.85 8.62a4 4 0 0 1 4.78-4.77 4 4 0 0 1 6.74 0 4 4 0 0 1 4.78 4.78 4 4 0 0 1 0 6.74 4 4 0 0 1-4.77 4.78 4 4 0 0 1-6.75 0 4 4 0 0 1-4.78-4.77 4 4 0 0 1 0-6.76Z",
key: "3c2336"
}
],
["line", { x1: "12", x2: "12", y1: "16", y2: "12", key: "1y1yb1" }],
["line", { x1: "12", x2: "12.01", y1: "8", y2: "8", key: "110wyk" }]
]);
export { BadgeInfo as default };
//# sourceMappingURL=badge-info.js.map
@@ -0,0 +1,8 @@
import type { TSESTree } from '@typescript-eslint/types';
import type { ScopeManager } from '../ScopeManager';
import type { Scope } from './Scope';
import { ScopeBase } from './ScopeBase';
import { ScopeType } from './ScopeType';
export declare class TypeScope extends ScopeBase<ScopeType.type, TSESTree.TSInterfaceDeclaration | TSESTree.TSTypeAliasDeclaration, Scope> {
constructor(scopeManager: ScopeManager, upperScope: TypeScope['upper'], block: TypeScope['block']);
}
@@ -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.
***************************************************************************** */
/// <reference lib="es2025" />
/// <reference lib="esnext.intl" />
/// <reference lib="esnext.collection" />
/// <reference lib="esnext.decorators" />
/// <reference lib="esnext.disposable" />
/// <reference lib="esnext.array" />
/// <reference lib="esnext.error" />
/// <reference lib="esnext.sharedmemory" />
/// <reference lib="esnext.typedarrays" />
/// <reference lib="esnext.temporal" />
/// <reference lib="esnext.date" />
@@ -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 ArrowLeft = createLucideIcon("ArrowLeft", [
["path", { d: "m12 19-7-7 7-7", key: "1l729n" }],
["path", { d: "M19 12H5", key: "x3x0zl" }]
]);
export { ArrowLeft as default };
//# sourceMappingURL=arrow-left.js.map
@@ -0,0 +1,79 @@
/**
* gridstack-item.component.ts 12.6.0
* Copyright (c) 2022-2024 Alain Dumesny - see GridStack root license
*/
import { ElementRef, ViewContainerRef, OnDestroy, ComponentRef } from '@angular/core';
import { GridItemHTMLElement, GridStackNode } from 'gridstack';
import { BaseWidget } from './base-widget';
import * as i0 from "@angular/core";
/**
* Extended HTMLElement interface for grid items.
* Stores a back-reference to the Angular component for integration.
*/
export interface GridItemCompHTMLElement extends GridItemHTMLElement {
/** Back-reference to the Angular GridStackItem component */
_gridItemComp?: GridstackItemComponent;
}
/**
* Angular component wrapper for individual GridStack items.
*
* This component represents a single grid item and handles:
* - Dynamic content creation and management
* - Integration with parent GridStack component
* - Component lifecycle and cleanup
* - Widget options and configuration
*
* Use in combination with GridstackComponent for the parent grid.
*
* @example
* ```html
* <gridstack>
* <gridstack-item [options]="{x: 0, y: 0, w: 2, h: 1}">
* <my-widget-component></my-widget-component>
* </gridstack-item>
* </gridstack>
* ```
*/
export declare class GridstackItemComponent implements OnDestroy {
protected readonly elementRef: ElementRef<GridItemCompHTMLElement>;
/**
* Container for dynamic component creation within this grid item.
* Used to append child components programmatically.
*/
container?: ViewContainerRef;
/**
* Component reference for dynamic component removal.
* Used internally when this component is created dynamically.
*/
ref: ComponentRef<GridstackItemComponent> | undefined;
/**
* Reference to child widget component for serialization.
* Used to save/restore additional data along with grid position.
*/
childWidget: BaseWidget | undefined;
/**
* Grid item configuration options.
* Defines position, size, and behavior of this grid item.
*
* @example
* ```typescript
* itemOptions: GridStackNode = {
* x: 0, y: 0, w: 2, h: 1,
* noResize: true,
* content: 'Item content'
* };
* ```
*/
set options(val: GridStackNode);
/** return the latest grid options (from GS once built, otherwise initial values) */
get options(): GridStackNode;
protected _options?: GridStackNode;
/** return the native element that contains grid specific fields as well */
get el(): GridItemCompHTMLElement;
/** clears the initial options now that we've built */
clearOptions(): void;
constructor(elementRef: ElementRef<GridItemCompHTMLElement>);
ngOnDestroy(): void;
static ɵfac: i0.ɵɵFactoryDeclaration<GridstackItemComponent, never>;
static ɵcmp: i0.ɵɵComponentDeclaration<GridstackItemComponent, "gridstack-item", never, { "options": "options"; }, {}, never, ["*"], true>;
}
@@ -0,0 +1,424 @@
/**
* @license React
* react-dom.development.js
*
* Copyright (c) Meta Platforms, Inc. and affiliates.
*
* This source code is licensed under the MIT license found in the
* LICENSE file in the root directory of this source tree.
*/
"use strict";
"production" !== process.env.NODE_ENV &&
(function () {
function noop() {}
function testStringCoercion(value) {
return "" + value;
}
function createPortal$1(children, containerInfo, implementation) {
var key =
3 < arguments.length && void 0 !== arguments[3] ? arguments[3] : null;
try {
testStringCoercion(key);
var JSCompiler_inline_result = !1;
} catch (e) {
JSCompiler_inline_result = !0;
}
JSCompiler_inline_result &&
(console.error(
"The provided key is an unsupported type %s. This value must be coerced to a string before using it here.",
("function" === typeof Symbol &&
Symbol.toStringTag &&
key[Symbol.toStringTag]) ||
key.constructor.name ||
"Object"
),
testStringCoercion(key));
return {
$$typeof: REACT_PORTAL_TYPE,
key: null == key ? null : "" + key,
children: children,
containerInfo: containerInfo,
implementation: implementation
};
}
function getCrossOriginStringAs(as, input) {
if ("font" === as) return "";
if ("string" === typeof input)
return "use-credentials" === input ? input : "";
}
function getValueDescriptorExpectingObjectForWarning(thing) {
return null === thing
? "`null`"
: void 0 === thing
? "`undefined`"
: "" === thing
? "an empty string"
: 'something with type "' + typeof thing + '"';
}
function getValueDescriptorExpectingEnumForWarning(thing) {
return null === thing
? "`null`"
: void 0 === thing
? "`undefined`"
: "" === thing
? "an empty string"
: "string" === typeof thing
? JSON.stringify(thing)
: "number" === typeof thing
? "`" + thing + "`"
: 'something with type "' + typeof thing + '"';
}
function resolveDispatcher() {
var dispatcher = ReactSharedInternals.H;
null === dispatcher &&
console.error(
"Invalid hook call. Hooks can only be called inside of the body of a function component. This could happen for one of the following reasons:\n1. You might have mismatching versions of React and the renderer (such as React DOM)\n2. You might be breaking the Rules of Hooks\n3. You might have more than one copy of React in the same app\nSee https://react.dev/link/invalid-hook-call for tips about how to debug and fix this problem."
);
return dispatcher;
}
"undefined" !== typeof __REACT_DEVTOOLS_GLOBAL_HOOK__ &&
"function" ===
typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStart &&
__REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStart(Error());
var React = require("react"),
Internals = {
d: {
f: noop,
r: function () {
throw Error(
"Invalid form element. requestFormReset must be passed a form that was rendered by React."
);
},
D: noop,
C: noop,
L: noop,
m: noop,
X: noop,
S: noop,
M: noop
},
p: 0,
findDOMNode: null
},
REACT_PORTAL_TYPE = Symbol.for("react.portal"),
ReactSharedInternals =
React.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE;
("function" === typeof Map &&
null != Map.prototype &&
"function" === typeof Map.prototype.forEach &&
"function" === typeof Set &&
null != Set.prototype &&
"function" === typeof Set.prototype.clear &&
"function" === typeof Set.prototype.forEach) ||
console.error(
"React depends on Map and Set built-in types. Make sure that you load a polyfill in older browsers. https://reactjs.org/link/react-polyfills"
);
exports.__DOM_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE =
Internals;
exports.createPortal = function (children, container) {
var key =
2 < arguments.length && void 0 !== arguments[2] ? arguments[2] : null;
if (
!container ||
(1 !== container.nodeType &&
9 !== container.nodeType &&
11 !== container.nodeType)
)
throw Error("Target container is not a DOM element.");
return createPortal$1(children, container, null, key);
};
exports.flushSync = function (fn) {
var previousTransition = ReactSharedInternals.T,
previousUpdatePriority = Internals.p;
try {
if (((ReactSharedInternals.T = null), (Internals.p = 2), fn))
return fn();
} finally {
(ReactSharedInternals.T = previousTransition),
(Internals.p = previousUpdatePriority),
Internals.d.f() &&
console.error(
"flushSync was called from inside a lifecycle method. React cannot flush when React is already rendering. Consider moving this call to a scheduler task or micro task."
);
}
};
exports.preconnect = function (href, options) {
"string" === typeof href && href
? null != options && "object" !== typeof options
? console.error(
"ReactDOM.preconnect(): Expected the `options` argument (second) to be an object but encountered %s instead. The only supported option at this time is `crossOrigin` which accepts a string.",
getValueDescriptorExpectingEnumForWarning(options)
)
: null != options &&
"string" !== typeof options.crossOrigin &&
console.error(
"ReactDOM.preconnect(): Expected the `crossOrigin` option (second argument) to be a string but encountered %s instead. Try removing this option or passing a string value instead.",
getValueDescriptorExpectingObjectForWarning(options.crossOrigin)
)
: console.error(
"ReactDOM.preconnect(): Expected the `href` argument (first) to be a non-empty string but encountered %s instead.",
getValueDescriptorExpectingObjectForWarning(href)
);
"string" === typeof href &&
(options
? ((options = options.crossOrigin),
(options =
"string" === typeof options
? "use-credentials" === options
? options
: ""
: void 0))
: (options = null),
Internals.d.C(href, options));
};
exports.prefetchDNS = function (href) {
if ("string" !== typeof href || !href)
console.error(
"ReactDOM.prefetchDNS(): Expected the `href` argument (first) to be a non-empty string but encountered %s instead.",
getValueDescriptorExpectingObjectForWarning(href)
);
else if (1 < arguments.length) {
var options = arguments[1];
"object" === typeof options && options.hasOwnProperty("crossOrigin")
? console.error(
"ReactDOM.prefetchDNS(): Expected only one argument, `href`, but encountered %s as a second argument instead. This argument is reserved for future options and is currently disallowed. It looks like the you are attempting to set a crossOrigin property for this DNS lookup hint. Browsers do not perform DNS queries using CORS and setting this attribute on the resource hint has no effect. Try calling ReactDOM.prefetchDNS() with just a single string argument, `href`.",
getValueDescriptorExpectingEnumForWarning(options)
)
: console.error(
"ReactDOM.prefetchDNS(): Expected only one argument, `href`, but encountered %s as a second argument instead. This argument is reserved for future options and is currently disallowed. Try calling ReactDOM.prefetchDNS() with just a single string argument, `href`.",
getValueDescriptorExpectingEnumForWarning(options)
);
}
"string" === typeof href && Internals.d.D(href);
};
exports.preinit = function (href, options) {
"string" === typeof href && href
? null == options || "object" !== typeof options
? console.error(
"ReactDOM.preinit(): Expected the `options` argument (second) to be an object with an `as` property describing the type of resource to be preinitialized but encountered %s instead.",
getValueDescriptorExpectingEnumForWarning(options)
)
: "style" !== options.as &&
"script" !== options.as &&
console.error(
'ReactDOM.preinit(): Expected the `as` property in the `options` argument (second) to contain a valid value describing the type of resource to be preinitialized but encountered %s instead. Valid values for `as` are "style" and "script".',
getValueDescriptorExpectingEnumForWarning(options.as)
)
: console.error(
"ReactDOM.preinit(): Expected the `href` argument (first) to be a non-empty string but encountered %s instead.",
getValueDescriptorExpectingObjectForWarning(href)
);
if (
"string" === typeof href &&
options &&
"string" === typeof options.as
) {
var as = options.as,
crossOrigin = getCrossOriginStringAs(as, options.crossOrigin),
integrity =
"string" === typeof options.integrity ? options.integrity : void 0,
fetchPriority =
"string" === typeof options.fetchPriority
? options.fetchPriority
: void 0;
"style" === as
? Internals.d.S(
href,
"string" === typeof options.precedence
? options.precedence
: void 0,
{
crossOrigin: crossOrigin,
integrity: integrity,
fetchPriority: fetchPriority
}
)
: "script" === as &&
Internals.d.X(href, {
crossOrigin: crossOrigin,
integrity: integrity,
fetchPriority: fetchPriority,
nonce: "string" === typeof options.nonce ? options.nonce : void 0
});
}
};
exports.preinitModule = function (href, options) {
var encountered = "";
("string" === typeof href && href) ||
(encountered +=
" The `href` argument encountered was " +
getValueDescriptorExpectingObjectForWarning(href) +
".");
void 0 !== options && "object" !== typeof options
? (encountered +=
" The `options` argument encountered was " +
getValueDescriptorExpectingObjectForWarning(options) +
".")
: options &&
"as" in options &&
"script" !== options.as &&
(encountered +=
" The `as` option encountered was " +
getValueDescriptorExpectingEnumForWarning(options.as) +
".");
if (encountered)
console.error(
"ReactDOM.preinitModule(): Expected up to two arguments, a non-empty `href` string and, optionally, an `options` object with a valid `as` property.%s",
encountered
);
else
switch (
((encountered =
options && "string" === typeof options.as ? options.as : "script"),
encountered)
) {
case "script":
break;
default:
(encountered =
getValueDescriptorExpectingEnumForWarning(encountered)),
console.error(
'ReactDOM.preinitModule(): Currently the only supported "as" type for this function is "script" but received "%s" instead. This warning was generated for `href` "%s". In the future other module types will be supported, aligning with the import-attributes proposal. Learn more here: (https://github.com/tc39/proposal-import-attributes)',
encountered,
href
);
}
if ("string" === typeof href)
if ("object" === typeof options && null !== options) {
if (null == options.as || "script" === options.as)
(encountered = getCrossOriginStringAs(
options.as,
options.crossOrigin
)),
Internals.d.M(href, {
crossOrigin: encountered,
integrity:
"string" === typeof options.integrity
? options.integrity
: void 0,
nonce:
"string" === typeof options.nonce ? options.nonce : void 0
});
} else null == options && Internals.d.M(href);
};
exports.preload = function (href, options) {
var encountered = "";
("string" === typeof href && href) ||
(encountered +=
" The `href` argument encountered was " +
getValueDescriptorExpectingObjectForWarning(href) +
".");
null == options || "object" !== typeof options
? (encountered +=
" The `options` argument encountered was " +
getValueDescriptorExpectingObjectForWarning(options) +
".")
: ("string" === typeof options.as && options.as) ||
(encountered +=
" The `as` option encountered was " +
getValueDescriptorExpectingObjectForWarning(options.as) +
".");
encountered &&
console.error(
'ReactDOM.preload(): Expected two arguments, a non-empty `href` string and an `options` object with an `as` property valid for a `<link rel="preload" as="..." />` tag.%s',
encountered
);
if (
"string" === typeof href &&
"object" === typeof options &&
null !== options &&
"string" === typeof options.as
) {
encountered = options.as;
var crossOrigin = getCrossOriginStringAs(
encountered,
options.crossOrigin
);
Internals.d.L(href, encountered, {
crossOrigin: crossOrigin,
integrity:
"string" === typeof options.integrity ? options.integrity : void 0,
nonce: "string" === typeof options.nonce ? options.nonce : void 0,
type: "string" === typeof options.type ? options.type : void 0,
fetchPriority:
"string" === typeof options.fetchPriority
? options.fetchPriority
: void 0,
referrerPolicy:
"string" === typeof options.referrerPolicy
? options.referrerPolicy
: void 0,
imageSrcSet:
"string" === typeof options.imageSrcSet
? options.imageSrcSet
: void 0,
imageSizes:
"string" === typeof options.imageSizes
? options.imageSizes
: void 0,
media: "string" === typeof options.media ? options.media : void 0
});
}
};
exports.preloadModule = function (href, options) {
var encountered = "";
("string" === typeof href && href) ||
(encountered +=
" The `href` argument encountered was " +
getValueDescriptorExpectingObjectForWarning(href) +
".");
void 0 !== options && "object" !== typeof options
? (encountered +=
" The `options` argument encountered was " +
getValueDescriptorExpectingObjectForWarning(options) +
".")
: options &&
"as" in options &&
"string" !== typeof options.as &&
(encountered +=
" The `as` option encountered was " +
getValueDescriptorExpectingObjectForWarning(options.as) +
".");
encountered &&
console.error(
'ReactDOM.preloadModule(): Expected two arguments, a non-empty `href` string and, optionally, an `options` object with an `as` property valid for a `<link rel="modulepreload" as="..." />` tag.%s',
encountered
);
"string" === typeof href &&
(options
? ((encountered = getCrossOriginStringAs(
options.as,
options.crossOrigin
)),
Internals.d.m(href, {
as:
"string" === typeof options.as && "script" !== options.as
? options.as
: void 0,
crossOrigin: encountered,
integrity:
"string" === typeof options.integrity
? options.integrity
: void 0
}))
: Internals.d.m(href));
};
exports.requestFormReset = function (form) {
Internals.d.r(form);
};
exports.unstable_batchedUpdates = function (fn, a) {
return fn(a);
};
exports.useFormState = function (action, initialState, permalink) {
return resolveDispatcher().useFormState(action, initialState, permalink);
};
exports.useFormStatus = function () {
return resolveDispatcher().useHostTransitionStatus();
};
exports.version = "19.2.5";
"undefined" !== typeof __REACT_DEVTOOLS_GLOBAL_HOOK__ &&
"function" ===
typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStop &&
__REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStop(Error());
})();
@@ -0,0 +1 @@
module.exports={C:{"47":0.0032,"50":0.0032,"55":0.0032,"56":0.0032,"57":0.0032,"58":0.00959,"59":0.0032,"68":0.0032,"72":0.00959,"78":0.0032,"79":0.0032,"88":0.0032,"93":0.00959,"96":0.0032,"112":0.01599,"115":0.11509,"118":0.0032,"120":0.07353,"121":0.15026,"123":0.0032,"124":0.00639,"125":0.0032,"127":0.02238,"128":0.0032,"130":0.0032,"131":0.0032,"132":0.0032,"133":0.0032,"136":0.0032,"137":0.0032,"139":0.0032,"140":0.03517,"143":0.00639,"145":0.0032,"146":0.00959,"147":0.0032,"148":0.0032,"149":0.02558,"150":0.00959,"151":0.01918,"152":0.02558,"153":0.03836,"154":0.25896,"155":0.62661,"156":0.57546,"157":0.03517,_:"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 48 49 51 52 53 54 60 61 62 63 64 65 66 67 69 70 71 73 74 75 76 77 80 81 82 83 84 85 86 87 89 90 91 92 94 95 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 113 114 116 117 119 122 126 129 134 135 138 141 142 144 158 159 160 3.5 3.6"},D:{"41":0.0032,"50":0.0032,"53":0.0032,"58":0.0032,"59":0.00639,"64":0.00639,"65":0.0032,"66":0.0032,"67":0.0032,"68":0.0032,"69":0.01279,"70":0.0032,"71":0.00639,"72":0.02877,"73":0.00639,"74":0.0032,"75":0.00639,"76":0.00639,"77":0.01279,"78":0.0032,"79":0.00959,"80":0.00639,"81":0.0032,"83":0.00959,"84":0.0032,"86":0.0032,"87":0.01599,"88":0.00639,"91":0.00639,"93":0.01918,"94":0.02558,"95":0.01599,"98":0.01599,"101":0.03517,"102":0.00639,"103":0.19502,"104":0.01599,"105":0.01918,"106":0.01918,"107":0.01599,"108":0.01279,"109":0.54029,"110":0.01279,"111":0.07033,"112":0.01279,"113":0.00639,"114":0.05435,"115":0.0032,"116":0.06714,"117":0.01279,"118":0.28453,"119":0.18223,"120":0.16944,"121":0.00639,"122":0.01918,"123":0.03197,"124":0.01599,"125":0.0032,"126":0.01918,"127":0.0032,"128":0.07993,"129":0.0032,"130":0.02877,"131":0.06074,"132":0.00639,"133":0.06394,"134":0.04796,"135":0.05115,"136":0.08632,"137":0.06074,"138":0.16305,"139":0.07993,"140":0.23658,"141":0.04796,"142":0.16624,"143":0.02877,"144":0.04476,"145":0.03517,"146":0.08952,"147":0.09911,"148":0.08952,"149":0.08312,"150":0.31331,"151":1.28519,"152":7.17407,"153":5.3262,"154":1.18609,"155":0.02558,"156":0.0032,_:"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 42 43 44 45 46 47 48 49 51 52 54 55 56 57 60 61 62 63 85 89 90 92 96 97 99 100 157"},F:{"36":0.0032,"42":0.0032,"46":0.0032,"51":0.0032,"79":0.00639,"90":0.0032,"91":0.0032,"95":0.01599,"99":0.0032,"100":0.01279,"101":0.02877,"102":0.0032,"105":0.0032,"106":0.00959,"107":0.0032,"113":0.0032,"115":0.0032,"121":0.0032,"131":0.0032,"133":0.00959,"134":0.06394,"135":0.7513,_:"9 11 12 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 37 38 39 40 41 43 44 45 47 48 49 50 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 80 81 82 83 84 85 86 87 88 89 92 93 94 96 97 98 103 104 108 109 110 111 112 114 116 117 118 119 120 122 123 124 125 126 127 132 9.5-9.6 10.0-10.1 10.5 10.6 11.1 11.5 11.6 12.1"},B:{"14":0.00959,"15":0.0032,"16":0.00639,"17":0.0032,"18":0.06074,"89":0.00639,"90":0.01599,"92":0.03517,"100":0.00639,"109":0.00639,"111":0.0032,"112":0.0032,"114":0.01599,"119":0.07033,"120":0.08312,"122":0.01279,"131":0.0032,"132":0.0032,"133":0.0032,"136":0.0032,"138":0.00639,"139":0.0032,"140":0.01279,"141":0.01918,"142":0.0032,"143":0.00959,"144":0.0032,"145":0.00959,"146":0.02238,"147":0.00959,"148":0.01918,"149":0.02238,"150":0.04476,"151":0.17903,"152":0.9559,"153":0.94312,"154":0.20781,_:"12 13 79 80 81 83 84 85 86 87 88 91 93 94 95 96 97 98 99 101 102 103 104 105 106 107 108 110 113 115 116 117 118 121 123 124 125 126 127 128 129 130 134 135 137"},E:{"12":0.0032,"14":0.0032,"27":0.02238,_:"4 5 6 7 8 9 10 11 13 15 3.1 3.2 5.1 6.1 7.1 9.1 10.1 15.1 15.2-15.3 15.5 16.0 16.1 16.2 16.3 17.0 17.2 17.5 18.0 18.1 18.2 18.3 18.4 26.1 27.1 27.2 TP","11.1":0.0032,"12.1":0.00639,"13.1":0.01279,"14.1":0.05435,"15.4":0.0032,"15.6":0.03836,"16.4":0.0032,"16.5":0.01279,"16.6":0.01918,"17.1":0.0032,"17.3":0.0032,"17.4":0.0032,"17.6":0.03836,"18.5-18.7":0.0032,"26.0":0.0032,"26.2":0.00639,"26.3":0.01599,"26.4":0.00639,"26.5":0.04156,"26.6":0.08312},G:{"8":0,"3.2":0,"4.0-4.1":0,"4.2-4.3":0.00035,"5.0-5.1":0.00035,"6.0-6.1":0,"7.0-7.1":0.00069,"8.1-8.4":0,"9.0-9.2":0,"9.3":0,"10.0-10.2":0,"10.3":0.00346,"11.0-11.2":0.00035,"11.3-11.4":0.00069,"12.0-12.1":0,"12.2-12.5":0.009,"13.0-13.1":0,"13.2":0.00173,"13.3":0,"13.4-13.7":0.00035,"14.0-14.4":0.00139,"14.5-14.8":0.00208,"15.0-15.1":0.00208,"15.2-15.3":0.00139,"15.4":0.00173,"15.5":0.00208,"15.6-15.8":0.04502,"16.0":0.00346,"16.1":0.00623,"16.2":0.00346,"16.3":0.00762,"16.4":0.00173,"16.5":0.00277,"16.6-16.7":0.06268,"17.0":0.00242,"17.1":0.00346,"17.2":0.00346,"17.3":0.00519,"17.4":0.00727,"17.5":0.0142,"17.6-17.7":0.0367,"18.0":0.00762,"18.1":0.01524,"18.2":0.02078,"18.3":0.03601,"18.4":0.02251,"18.5-18.7":0.46504,"26.0":0.02251,"26.1":0.02285,"26.2":0.05956,"26.3":0.06441,"26.4":0.04709Line truncated
@@ -0,0 +1,26 @@
/**
* @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 Unplug = createLucideIcon("Unplug", [
["path", { d: "m19 5 3-3", key: "yk6iyv" }],
["path", { d: "m2 22 3-3", key: "19mgm9" }],
[
"path",
{ d: "M6.3 20.3a2.4 2.4 0 0 0 3.4 0L12 18l-6-6-2.3 2.3a2.4 2.4 0 0 0 0 3.4Z", key: "goz73y" }
],
["path", { d: "M7.5 13.5 10 11", key: "7xgeeb" }],
["path", { d: "M10.5 16.5 13 14", key: "10btkg" }],
[
"path",
{ d: "m12 6 6 6 2.3-2.3a2.4 2.4 0 0 0 0-3.4l-2.6-2.6a2.4 2.4 0 0 0-3.4 0Z", key: "1snsnr" }
]
]);
export { Unplug as default };
//# sourceMappingURL=unplug.js.map
@@ -0,0 +1,495 @@
"use strict";
var _core = require("./core.js");
var _utils = require("./utils.js");
const defineType = (0, _utils.defineAliasedType)("Flow");
const defineInterfaceishType = name => {
const isDeclareClass = name === "DeclareClass";
defineType(name, {
builder: ["id", "typeParameters", "extends", "body"],
visitor: ["id", "typeParameters", "extends", ...(isDeclareClass ? ["mixins", "implements"] : []), "body"],
aliases: ["FlowDeclaration", "Statement", "Declaration"],
fields: Object.assign({
id: (0, _utils.validateType)("Identifier"),
typeParameters: (0, _utils.validateOptionalType)("TypeParameterDeclaration"),
extends: (0, _utils.validateOptional)((0, _utils.arrayOfType)("InterfaceExtends"))
}, isDeclareClass ? {
mixins: (0, _utils.validateOptional)((0, _utils.arrayOfType)("InterfaceExtends")),
implements: (0, _utils.validateOptional)((0, _utils.arrayOfType)("ClassImplements"))
} : {}, {
body: (0, _utils.validateType)("ObjectTypeAnnotation")
})
});
};
defineType("AnyTypeAnnotation", {
aliases: ["FlowType", "FlowBaseAnnotation"]
});
defineType("ArrayTypeAnnotation", {
visitor: ["elementType"],
aliases: ["FlowType"],
fields: {
elementType: (0, _utils.validateType)("FlowType")
}
});
defineType("BooleanTypeAnnotation", {
aliases: ["FlowType", "FlowBaseAnnotation"]
});
defineType("BooleanLiteralTypeAnnotation", {
builder: ["value"],
aliases: ["FlowType"],
fields: {
value: (0, _utils.validate)((0, _utils.assertValueType)("boolean"))
}
});
defineType("NullLiteralTypeAnnotation", {
aliases: ["FlowType", "FlowBaseAnnotation"]
});
defineType("ClassImplements", {
visitor: ["id", "typeParameters"],
fields: {
id: (0, _utils.validateType)("Identifier"),
typeParameters: (0, _utils.validateOptionalType)("TypeParameterInstantiation")
}
});
defineInterfaceishType("DeclareClass");
defineType("DeclareFunction", {
builder: ["id"],
visitor: ["id", "predicate"],
aliases: ["FlowDeclaration", "Statement", "Declaration"],
fields: {
id: (0, _utils.validateType)("Identifier"),
predicate: (0, _utils.validateOptionalType)("DeclaredPredicate")
}
});
defineInterfaceishType("DeclareInterface");
defineType("DeclareModule", {
builder: ["id", "body", "kind"],
visitor: ["id", "body"],
aliases: ["FlowDeclaration", "Statement", "Declaration"],
fields: {
id: (0, _utils.validateType)("Identifier", "StringLiteral"),
body: (0, _utils.validateType)("BlockStatement"),
kind: (0, _utils.validateOptional)((0, _utils.assertOneOf)("CommonJS", "ES"))
}
});
defineType("DeclareModuleExports", {
visitor: ["typeAnnotation"],
aliases: ["FlowDeclaration", "Statement", "Declaration"],
fields: {
typeAnnotation: (0, _utils.validateType)("TypeAnnotation")
}
});
defineType("DeclareTypeAlias", {
visitor: ["id", "typeParameters", "right"],
aliases: ["FlowDeclaration", "Statement", "Declaration"],
fields: {
id: (0, _utils.validateType)("Identifier"),
typeParameters: (0, _utils.validateOptionalType)("TypeParameterDeclaration"),
right: (0, _utils.validateType)("FlowType")
}
});
defineType("DeclareOpaqueType", {
visitor: ["id", "typeParameters", "supertype"],
aliases: ["FlowDeclaration", "Statement", "Declaration"],
fields: {
id: (0, _utils.validateType)("Identifier"),
typeParameters: (0, _utils.validateOptionalType)("TypeParameterDeclaration"),
supertype: (0, _utils.validateOptionalType)("FlowType"),
impltype: (0, _utils.validateOptionalType)("FlowType")
}
});
defineType("DeclareVariable", {
visitor: ["id"],
aliases: ["FlowDeclaration", "Statement", "Declaration"],
fields: {
id: (0, _utils.validateType)("Identifier")
}
});
defineType("DeclareExportDeclaration", {
visitor: ["declaration", "specifiers", "source", "attributes"],
aliases: ["FlowDeclaration", "Statement", "Declaration"],
fields: Object.assign({
declaration: (0, _utils.validateOptionalType)("Flow"),
specifiers: (0, _utils.validateOptional)((0, _utils.arrayOfType)("ExportSpecifier", "ExportNamespaceSpecifier")),
source: (0, _utils.validateOptionalType)("StringLiteral"),
default: (0, _utils.validateOptional)((0, _utils.assertValueType)("boolean"))
}, _core.importAttributes)
});
defineType("DeclareExportAllDeclaration", {
visitor: ["source", "attributes"],
aliases: ["FlowDeclaration", "Statement", "Declaration"],
fields: Object.assign({
source: (0, _utils.validateType)("StringLiteral"),
exportKind: (0, _utils.validateOptional)((0, _utils.assertOneOf)("type", "value"))
}, _core.importAttributes)
});
defineType("DeclaredPredicate", {
visitor: ["value"],
aliases: ["FlowPredicate"],
fields: {
value: (0, _utils.validateType)("Flow")
}
});
defineType("ExistsTypeAnnotation", {
aliases: ["FlowType"]
});
defineType("FunctionTypeAnnotation", {
builder: ["typeParameters", "params", "rest", "returnType"],
visitor: ["typeParameters", "this", "params", "rest", "returnType"],
aliases: ["FlowType"],
fields: {
typeParameters: (0, _utils.validateOptionalType)("TypeParameterDeclaration"),
params: (0, _utils.validateArrayOfType)("FunctionTypeParam"),
rest: (0, _utils.validateOptionalType)("FunctionTypeParam"),
this: (0, _utils.validateOptionalType)("FunctionTypeParam"),
returnType: (0, _utils.validateType)("FlowType")
}
});
defineType("FunctionTypeParam", {
visitor: ["name", "typeAnnotation"],
fields: {
name: (0, _utils.validateOptionalType)("Identifier"),
typeAnnotation: (0, _utils.validateType)("FlowType"),
optional: (0, _utils.validateOptional)((0, _utils.assertValueType)("boolean"))
}
});
defineType("GenericTypeAnnotation", {
visitor: ["id", "typeParameters"],
aliases: ["FlowType"],
fields: {
id: (0, _utils.validateType)("Identifier", "QualifiedTypeIdentifier"),
typeParameters: (0, _utils.validateOptionalType)("TypeParameterInstantiation")
}
});
defineType("InferredPredicate", {
aliases: ["FlowPredicate"]
});
defineType("InterfaceExtends", {
visitor: ["id", "typeParameters"],
fields: {
id: (0, _utils.validateType)("Identifier", "QualifiedTypeIdentifier"),
typeParameters: (0, _utils.validateOptionalType)("TypeParameterInstantiation")
}
});
defineInterfaceishType("InterfaceDeclaration");
defineType("InterfaceTypeAnnotation", {
visitor: ["extends", "body"],
aliases: ["FlowType"],
fields: {
extends: (0, _utils.validateOptional)((0, _utils.arrayOfType)("InterfaceExtends")),
body: (0, _utils.validateType)("ObjectTypeAnnotation")
}
});
defineType("IntersectionTypeAnnotation", {
visitor: ["types"],
aliases: ["FlowType"],
fields: {
types: (0, _utils.validate)((0, _utils.arrayOfType)("FlowType"))
}
});
defineType("MixedTypeAnnotation", {
aliases: ["FlowType", "FlowBaseAnnotation"]
});
defineType("EmptyTypeAnnotation", {
aliases: ["FlowType", "FlowBaseAnnotation"]
});
defineType("NullableTypeAnnotation", {
visitor: ["typeAnnotation"],
aliases: ["FlowType"],
fields: {
typeAnnotation: (0, _utils.validateType)("FlowType")
}
});
defineType("NumberLiteralTypeAnnotation", {
builder: ["value"],
aliases: ["FlowType"],
fields: {
value: (0, _utils.validate)((0, _utils.assertValueType)("number"))
}
});
defineType("NumberTypeAnnotation", {
aliases: ["FlowType", "FlowBaseAnnotation"]
});
defineType("ObjectTypeAnnotation", {
visitor: ["properties", "indexers", "callProperties", "internalSlots"],
aliases: ["FlowType"],
builder: ["properties", "indexers", "callProperties", "internalSlots", "exact"],
fields: {
properties: (0, _utils.validate)((0, _utils.arrayOfType)("ObjectTypeProperty", "ObjectTypeSpreadProperty")),
indexers: {
validate: (0, _utils.arrayOfType)("ObjectTypeIndexer"),
optional: true,
default: []
},
callProperties: {
validate: (0, _utils.arrayOfType)("ObjectTypeCallProperty"),
optional: true,
default: []
},
internalSlots: {
validate: (0, _utils.arrayOfType)("ObjectTypeInternalSlot"),
optional: true,
default: []
},
exact: {
validate: (0, _utils.assertValueType)("boolean"),
default: false
},
inexact: (0, _utils.validateOptional)((0, _utils.assertValueType)("boolean"))
}
});
defineType("ObjectTypeInternalSlot", {
visitor: ["id", "value"],
builder: ["id", "value", "optional", "static", "method"],
aliases: ["UserWhitespacable"],
fields: {
id: (0, _utils.validateType)("Identifier"),
value: (0, _utils.validateType)("FlowType"),
optional: (0, _utils.validate)((0, _utils.assertValueType)("boolean")),
static: (0, _utils.validate)((0, _utils.assertValueType)("boolean")),
method: (0, _utils.validate)((0, _utils.assertValueType)("boolean"))
}
});
defineType("ObjectTypeCallProperty", {
visitor: ["value"],
aliases: ["UserWhitespacable"],
fields: {
value: (0, _utils.validateType)("FlowType"),
static: (0, _utils.validate)((0, _utils.assertValueType)("boolean"))
}
});
defineType("ObjectTypeIndexer", {
visitor: ["variance", "id", "key", "value"],
builder: ["id", "key", "value", "variance"],
aliases: ["UserWhitespacable"],
fields: {
id: (0, _utils.validateOptionalType)("Identifier"),
key: (0, _utils.validateType)("FlowType"),
value: (0, _utils.validateType)("FlowType"),
static: (0, _utils.validate)((0, _utils.assertValueType)("boolean")),
variance: (0, _utils.validateOptionalType)("Variance")
}
});
defineType("ObjectTypeProperty", {
visitor: ["key", "value", "variance"],
aliases: ["UserWhitespacable"],
fields: {
key: (0, _utils.validateType)("Identifier", "StringLiteral"),
value: (0, _utils.validateType)("FlowType"),
kind: (0, _utils.validate)((0, _utils.assertOneOf)("init", "get", "set")),
static: (0, _utils.validate)((0, _utils.assertValueType)("boolean")),
proto: (0, _utils.validate)((0, _utils.assertValueType)("boolean")),
optional: (0, _utils.validate)((0, _utils.assertValueType)("boolean")),
variance: (0, _utils.validateOptionalType)("Variance"),
method: (0, _utils.validate)((0, _utils.assertValueType)("boolean"))
}
});
defineType("ObjectTypeSpreadProperty", {
visitor: ["argument"],
aliases: ["UserWhitespacable"],
fields: {
argument: (0, _utils.validateType)("FlowType")
}
});
defineType("OpaqueType", {
visitor: ["id", "typeParameters", "supertype", "impltype"],
aliases: ["FlowDeclaration", "Statement", "Declaration"],
fields: {
id: (0, _utils.validateType)("Identifier"),
typeParameters: (0, _utils.validateOptionalType)("TypeParameterDeclaration"),
supertype: (0, _utils.validateOptionalType)("FlowType"),
impltype: (0, _utils.validateType)("FlowType")
}
});
defineType("QualifiedTypeIdentifier", {
visitor: ["qualification", "id"],
builder: ["id", "qualification"],
fields: {
id: (0, _utils.validateType)("Identifier"),
qualification: (0, _utils.validateType)("Identifier", "QualifiedTypeIdentifier")
}
});
defineType("StringLiteralTypeAnnotation", {
builder: ["value"],
aliases: ["FlowType"],
fields: {
value: (0, _utils.validate)((0, _utils.assertValueType)("string"))
}
});
defineType("StringTypeAnnotation", {
aliases: ["FlowType", "FlowBaseAnnotation"]
});
defineType("SymbolTypeAnnotation", {
aliases: ["FlowType", "FlowBaseAnnotation"]
});
defineType("ThisTypeAnnotation", {
aliases: ["FlowType", "FlowBaseAnnotation"]
});
defineType("TupleTypeAnnotation", {
visitor: ["types"],
aliases: ["FlowType"],
fields: {
types: (0, _utils.validate)((0, _utils.arrayOfType)("FlowType"))
}
});
defineType("TypeofTypeAnnotation", {
visitor: ["argument"],
aliases: ["FlowType"],
fields: {
argument: (0, _utils.validateType)("FlowType")
}
});
defineType("TypeAlias", {
visitor: ["id", "typeParameters", "right"],
aliases: ["FlowDeclaration", "Statement", "Declaration"],
fields: {
id: (0, _utils.validateType)("Identifier"),
typeParameters: (0, _utils.validateOptionalType)("TypeParameterDeclaration"),
right: (0, _utils.validateType)("FlowType")
}
});
defineType("TypeAnnotation", {
visitor: ["typeAnnotation"],
fields: {
typeAnnotation: (0, _utils.validateType)("FlowType")
}
});
defineType("TypeCastExpression", {
visitor: ["expression", "typeAnnotation"],
aliases: ["ExpressionWrapper", "Expression"],
fields: {
expression: (0, _utils.validateType)("Expression"),
typeAnnotation: (0, _utils.validateType)("TypeAnnotation")
}
});
defineType("TypeParameter", {
visitor: ["bound", "default", "variance"],
fields: {
name: (0, _utils.validate)((0, _utils.assertValueType)("string")),
bound: (0, _utils.validateOptionalType)("TypeAnnotation"),
default: (0, _utils.validateOptionalType)("FlowType"),
variance: (0, _utils.validateOptionalType)("Variance")
}
});
defineType("TypeParameterDeclaration", {
visitor: ["params"],
fields: {
params: (0, _utils.validate)((0, _utils.arrayOfType)("TypeParameter"))
}
});
defineType("TypeParameterInstantiation", {
visitor: ["params"],
fields: {
params: (0, _utils.validate)((0, _utils.arrayOfType)("FlowType"))
}
});
defineType("UnionTypeAnnotation", {
visitor: ["types"],
aliases: ["FlowType"],
fields: {
types: (0, _utils.validate)((0, _utils.arrayOfType)("FlowType"))
}
});
defineType("Variance", {
builder: ["kind"],
fields: {
kind: (0, _utils.validate)((0, _utils.assertOneOf)("minus", "plus"))
}
});
defineType("VoidTypeAnnotation", {
aliases: ["FlowType", "FlowBaseAnnotation"]
});
defineType("EnumDeclaration", {
aliases: ["Statement", "Declaration"],
visitor: ["id", "body"],
fields: {
id: (0, _utils.validateType)("Identifier"),
body: (0, _utils.validateType)("EnumBooleanBody", "EnumNumberBody", "EnumStringBody", "EnumSymbolBody")
}
});
defineType("EnumBooleanBody", {
aliases: ["EnumBody"],
visitor: ["members"],
fields: {
explicitType: (0, _utils.validate)((0, _utils.assertValueType)("boolean")),
members: (0, _utils.validateArrayOfType)("EnumBooleanMember"),
hasUnknownMembers: (0, _utils.validate)((0, _utils.assertValueType)("boolean"))
}
});
defineType("EnumNumberBody", {
aliases: ["EnumBody"],
visitor: ["members"],
fields: {
explicitType: (0, _utils.validate)((0, _utils.assertValueType)("boolean")),
members: (0, _utils.validateArrayOfType)("EnumNumberMember"),
hasUnknownMembers: (0, _utils.validate)((0, _utils.assertValueType)("boolean"))
}
});
defineType("EnumStringBody", {
aliases: ["EnumBody"],
visitor: ["members"],
fields: {
explicitType: (0, _utils.validate)((0, _utils.assertValueType)("boolean")),
members: (0, _utils.validateArrayOfType)("EnumStringMember", "EnumDefaultedMember"),
hasUnknownMembers: (0, _utils.validate)((0, _utils.assertValueType)("boolean"))
}
});
defineType("EnumSymbolBody", {
aliases: ["EnumBody"],
visitor: ["members"],
fields: {
members: (0, _utils.validateArrayOfType)("EnumDefaultedMember"),
hasUnknownMembers: (0, _utils.validate)((0, _utils.assertValueType)("boolean"))
}
});
defineType("EnumBooleanMember", {
aliases: ["EnumMember"],
builder: ["id"],
visitor: ["id", "init"],
fields: {
id: (0, _utils.validateType)("Identifier"),
init: (0, _utils.validateType)("BooleanLiteral")
}
});
defineType("EnumNumberMember", {
aliases: ["EnumMember"],
visitor: ["id", "init"],
fields: {
id: (0, _utils.validateType)("Identifier"),
init: (0, _utils.validateType)("NumericLiteral")
}
});
defineType("EnumStringMember", {
aliases: ["EnumMember"],
visitor: ["id", "init"],
fields: {
id: (0, _utils.validateType)("Identifier"),
init: (0, _utils.validateType)("StringLiteral")
}
});
defineType("EnumDefaultedMember", {
aliases: ["EnumMember"],
visitor: ["id"],
fields: {
id: (0, _utils.validateType)("Identifier")
}
});
defineType("IndexedAccessType", {
visitor: ["objectType", "indexType"],
aliases: ["FlowType"],
fields: {
objectType: (0, _utils.validateType)("FlowType"),
indexType: (0, _utils.validateType)("FlowType")
}
});
defineType("OptionalIndexedAccessType", {
visitor: ["objectType", "indexType"],
aliases: ["FlowType"],
fields: {
objectType: (0, _utils.validateType)("FlowType"),
indexType: (0, _utils.validateType)("FlowType"),
optional: (0, _utils.validate)((0, _utils.assertValueType)("boolean"))
}
});
//# sourceMappingURL=flow.js.map
@@ -0,0 +1,13 @@
import type {CodeKeywordDefinition} from "../../types"
import type {KeywordCxt} from "../../compile/validate"
import {checkStrictMode} from "../../compile/util"
const def: CodeKeywordDefinition = {
keyword: ["then", "else"],
schemaType: ["object", "boolean"],
code({keyword, parentSchema, it}: KeywordCxt) {
if (parentSchema.if === undefined) checkStrictMode(it, `"${keyword}" without "if" is ignored`)
},
}
export default def
@@ -0,0 +1,351 @@
import { expect, expectTypeOf, test } from "vitest";
import * as z from "zod/v4";
test("preprocess", () => {
const schema = z.preprocess((data) => [data], z.string().array());
const value = schema.parse("asdf");
expect(value).toEqual(["asdf"]);
expectTypeOf<(typeof schema)["_input"]>().toEqualTypeOf<unknown>();
});
test("async preprocess", async () => {
const schema = z.preprocess(async (data) => {
return [data];
}, z.string().array());
const value = await schema.safeParseAsync("asdf");
expect(value.data).toEqual(["asdf"]);
expect(value).toMatchInlineSnapshot(`
{
"data": [
"asdf",
],
"success": true,
}
`);
});
test("ctx.addIssue accepts string", () => {
const schema = z.preprocess((_, ctx) => {
ctx.addIssue("bad stuff");
}, z.string());
const result = schema.safeParse("asdf");
expect(result.error!.issues).toHaveLength(1);
expect(result).toMatchInlineSnapshot(`
{
"error": [ZodError: [
{
"message": "bad stuff",
"code": "custom",
"path": []
}
]],
"success": false,
}
`);
});
test("preprocess ctx.addIssue with parse", () => {
const a = z.preprocess((data, ctx) => {
ctx.addIssue({
input: data,
code: "custom",
message: `${data} is not one of our allowed strings`,
});
return data;
}, z.string());
const result = a.safeParse("asdf");
// expect(result.error!.toJSON()).toContain("not one of our allowed strings");
expect(result.error!.issues).toHaveLength(1);
expect(result).toMatchInlineSnapshot(`
{
"error": [ZodError: [
{
"code": "custom",
"message": "asdf is not one of our allowed strings",
"path": []
}
]],
"success": false,
}
`);
});
test("preprocess ctx.addIssue fatal by default", () => {
const schema = z.preprocess((data, ctx) => {
ctx.addIssue({
code: "custom",
message: `custom error`,
});
return data;
}, z.string());
const result = schema.safeParse(1234);
expect(result.error!.issues).toHaveLength(1);
expect(result).toMatchInlineSnapshot(`
{
"error": [ZodError: [
{
"code": "custom",
"message": "custom error",
"path": []
}
]],
"success": false,
}
`);
});
test("preprocess ctx.addIssue fatal true", () => {
const schema = z.preprocess((data, ctx) => {
ctx.addIssue({
input: data,
code: "custom",
origin: "custom",
message: `custom error`,
fatal: true,
});
return data;
}, z.string());
const result = schema.safeParse(1234);
expect(result.error!.issues).toHaveLength(1);
expect(result).toMatchInlineSnapshot(`
{
"error": [ZodError: [
{
"code": "custom",
"origin": "custom",
"message": "custom error",
"fatal": true,
"path": []
}
]],
"success": false,
}
`);
});
test("async preprocess ctx.addIssue with parseAsync", async () => {
const schema = z.preprocess(async (data, ctx) => {
ctx.addIssue({
input: data,
code: "custom",
message: `${data} is not one of our allowed strings`,
});
return data;
}, z.string());
const result = await schema.safeParseAsync("asdf");
expect(result.error!.issues).toHaveLength(1);
expect(result).toMatchInlineSnapshot(`
{
"error": [ZodError: [
{
"code": "custom",
"message": "asdf is not one of our allowed strings",
"path": []
}
]],
"success": false,
}
`);
});
test("z.NEVER in preprocess", () => {
const foo = z.preprocess((val, ctx) => {
if (!val) {
ctx.addIssue({ input: val, code: "custom", message: "bad" });
return z.NEVER;
}
return val;
}, z.number());
type foo = z.infer<typeof foo>;
expectTypeOf<foo>().toEqualTypeOf<number>();
const result = foo.safeParse(undefined);
expect(result.error!.issues).toHaveLength(1);
expect(result).toMatchInlineSnapshot(`
{
"error": [ZodError: [
{
"code": "custom",
"message": "bad",
"path": []
}
]],
"success": false,
}
`);
});
test("preprocess as the second property of object", () => {
const schema = z.object({
nonEmptyStr: z.string().min(1),
positiveNum: z.preprocess((v) => Number(v), z.number().positive()),
});
const result = schema.safeParse({
nonEmptyStr: "",
positiveNum: "",
});
expect(result.error!.issues).toHaveLength(2);
expect(result).toMatchInlineSnapshot(`
{
"error": [ZodError: [
{
"origin": "string",
"code": "too_small",
"minimum": 1,
"inclusive": true,
"path": [
"nonEmptyStr"
],
"message": "Too small: expected string to have >=1 characters"
},
{
"origin": "number",
"code": "too_small",
"minimum": 0,
"inclusive": false,
"path": [
"positiveNum"
],
"message": "Too small: expected number to be >0"
}
]],
"success": false,
}
`);
});
test("preprocess validates with sibling errors", () => {
const schema = z.object({
missing: z.string().refine(() => false),
preprocess: z.preprocess((data: any) => data?.trim(), z.string().regex(/ asdf/)),
});
const result = schema.safeParse({ preprocess: " asdf" });
expect(result.error!.issues).toHaveLength(2);
expect(result).toMatchInlineSnapshot(`
{
"error": [ZodError: [
{
"expected": "string",
"code": "invalid_type",
"path": [
"missing"
],
"message": "Invalid input: expected string, received undefined"
},
{
"origin": "string",
"code": "invalid_format",
"format": "regex",
"pattern": "/ asdf/",
"path": [
"preprocess"
],
"message": "Invalid string: must match pattern / asdf/"
}
]],
"success": false,
}
`);
});
test("perform transform with non-fatal issues", () => {
const A = z
.string()
.refine((_) => false)
.min(4)
.transform((val) => val.length)
.pipe(z.number())
.refine((_) => false);
expect(A.safeParse("asdfasdf").error!.issues).toHaveLength(1);
expect(A.safeParse("asdfasdf").error).toMatchInlineSnapshot(`
[ZodError: [
{
"code": "custom",
"path": [],
"message": "Invalid input"
}
]]
`);
});
test("preprocess accepts absent object keys (4.3 parity)", () => {
const schema = z.object({ a: z.preprocess((v) => v ?? "X", z.string()) });
expect(schema.parse({})).toEqual({ a: "X" });
expect(schema.parse({ a: "hi" })).toEqual({ a: "hi" });
expect(schema.parse({ a: undefined })).toEqual({ a: "X" });
// Outer optional clobbers preprocess output on undefined input
expect(
z
.preprocess((v) => v ?? "X", z.string())
.optional()
.parse(undefined)
).toBeUndefined();
expect(
z
.preprocess((v) => v ?? "X", z.string())
.optional()
.parse("hi")
).toBe("hi");
expect(z.object({ a: z.preprocess((v) => v ?? "X", z.string()).optional() }).parse({})).toEqual({});
// Top-level direct call unchanged
expect(z.preprocess((v) => v ?? "X", z.string()).parse(undefined)).toBe("X");
});
// https://github.com/colinhacks/zod/issues/5917
test("optional propagates through preprocess inside object", () => {
const outer = z.object({ x: z.preprocess((v) => v, z.number()).optional() });
const inner = z.object({ x: z.preprocess((v) => v, z.number().optional()) });
expect(outer.safeParse({}).success).toBe(true);
expect(inner.safeParse({}).success).toBe(true);
expect(outer.safeParse({ x: 1 })).toEqual({ success: true, data: { x: 1 } });
expect(inner.safeParse({ x: 1 })).toEqual({ success: true, data: { x: 1 } });
expect(inner._zod.def.shape.x._zod.optin).toBe("optional");
expect(inner._zod.def.shape.x._zod.optout).toBe("optional");
});
test("preprocess is a structural subtype of ZodPipe", () => {
const schema = z.preprocess((v) => v, z.string());
expect(schema).toBeInstanceOf(z.ZodPipe);
expect(schema).toBeInstanceOf(z.ZodPreprocess);
expect(schema._zod.def.type).toBe("pipe");
});
test("preprocess does not propagate values/propValues from inner schema", () => {
const inner = z.preprocess((v) => v, z.literal("test"));
expect(inner._zod.values).toBeUndefined();
expect(inner._zod.propValues).toBeUndefined();
});
test("preprocess as discriminator throws at construction (no propValues to inherit)", () => {
const schema = z.discriminatedUnion("kind", [
z.object({ kind: z.preprocess((v: any) => String(v).toUpperCase(), z.literal("A")), a: z.string() }),
z.object({ kind: z.preprocess((v: any) => String(v).toUpperCase(), z.literal("B")), b: z.number() }),
]);
expect(() => schema.parse({ kind: "a", a: "x" })).toThrow(/Invalid discriminated union option/);
});
test("preprocess as record key does not restrict accepted keys", () => {
const schema = z.record(
z.preprocess((v: any) => String(v).toLowerCase(), z.enum(["a", "b"])),
z.string()
);
expect(schema.safeParse({ A: "x", B: "y" })).toEqual({ success: true, data: { a: "x", b: "y" } });
});
@@ -0,0 +1 @@
{"version":3,"file":"signal-medium.js","sources":["../../../src/icons/signal-medium.ts"],"sourcesContent":["import createLucideIcon from '../createLucideIcon';\n\n/**\n * @component @name SignalMedium\n * @description Lucide SVG icon component, renders SVG Element with children.\n *\n * @preview ![img](data:image/svg+xml;base64,PHN2ZyAgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIgogIHdpZHRoPSIyNCIKICBoZWlnaHQ9IjI0IgogIHZpZXdCb3g9IjAgMCAyNCAyNCIKICBmaWxsPSJub25lIgogIHN0cm9rZT0iIzAwMCIgc3R5bGU9ImJhY2tncm91bmQtY29sb3I6ICNmZmY7IGJvcmRlci1yYWRpdXM6IDJweCIKICBzdHJva2Utd2lkdGg9IjIiCiAgc3Ryb2tlLWxpbmVjYXA9InJvdW5kIgogIHN0cm9rZS1saW5lam9pbj0icm91bmQiCj4KICA8cGF0aCBkPSJNMiAyMGguMDEiIC8+CiAgPHBhdGggZD0iTTcgMjB2LTQiIC8+CiAgPHBhdGggZD0iTTEyIDIwdi04IiAvPgo8L3N2Zz4K) - https://lucide.dev/icons/signal-medium\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 SignalMedium = createLucideIcon('SignalMedium', [\n ['path', { d: 'M2 20h.01', key: '4haj6o' }],\n ['path', { d: 'M7 20v-4', key: 'j294jx' }],\n ['path', { d: 'M12 20v-8', key: 'i3yub9' }],\n]);\n\nexport default SignalMedium;\n"],"names":[],"mappings":";;;;;;;;;AAaM,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAe,iBAAiB,cAAgB,CAAA,CAAA,CAAA;AAAA,CAAA,CACpD,CAAC,CAAA,CAAA,CAAA,CAAA,CAAA,CAAQ,CAAA,CAAA,CAAA,CAAE,GAAG,CAAa,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAK,UAAU,CAAA,CAAA;AAAA,CAAA,CAC1C,CAAC,CAAA,CAAA,CAAA,CAAA,CAAA,CAAQ,CAAA,CAAA,CAAA,CAAE,GAAG,CAAY,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAK,UAAU,CAAA,CAAA;AAAA,CAAA,CACzC,CAAC,CAAA,CAAA,CAAA,CAAA,CAAA,CAAQ,CAAA,CAAA,CAAA,CAAE,GAAG,CAAa,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAK,UAAU,CAAA;AAC5C,CAAC,CAAA,CAAA;;"}
@@ -0,0 +1,99 @@
/**
* Internal Merkle-Damgard hash utils.
* @module
*/
import { type Hash, type TArg, type TRet } from './utils.ts';
/**
* Shared 32-bit conditional boolean primitive reused by SHA-256, SHA-1, and MD5 `F`.
* Returns bits from `b` when `a` is set, otherwise from `c`.
* The XOR form is equivalent to MD5's `F(X,Y,Z) = XY v not(X)Z` because the masked terms never
* set the same bit.
* @param a - selector word
* @param b - word chosen when selector bit is set
* @param c - word chosen when selector bit is clear
* @returns Mixed 32-bit word.
* @example
* Combine three words with the shared 32-bit choice primitive.
* ```ts
* Chi(0xffffffff, 0x12345678, 0x87654321);
* ```
*/
export declare function Chi(a: number, b: number, c: number): number;
/**
* Shared 32-bit majority primitive reused by SHA-256 and SHA-1.
* Returns bits shared by at least two inputs.
* @param a - first input word
* @param b - second input word
* @param c - third input word
* @returns Mixed 32-bit word.
* @example
* Combine three words with the shared 32-bit majority primitive.
* ```ts
* Maj(0xffffffff, 0x12345678, 0x87654321);
* ```
*/
export declare function Maj(a: number, b: number, c: number): number;
/**
* Merkle-Damgard hash construction base class.
* Could be used to create MD5, RIPEMD, SHA1, SHA2.
* Accepts only byte-aligned `Uint8Array` input, even when the underlying spec describes bit
* strings with partial-byte tails.
* @param blockLen - internal block size in bytes
* @param outputLen - digest size in bytes
* @param padOffset - trailing length field size in bytes
* @param isLE - whether length and state words are encoded in little-endian
* @example
* Use a concrete subclass to get the shared Merkle-Damgard update/digest flow.
* ```ts
* import { _SHA1 } from '@noble/hashes/legacy.js';
* const hash = new _SHA1();
* hash.update(new Uint8Array([97, 98, 99]));
* hash.digest();
* ```
*/
export declare abstract class HashMD<T extends HashMD<T>> implements Hash<T> {
protected abstract process(buf: DataView, offset: number): void;
protected abstract get(): number[];
protected abstract set(...args: number[]): void;
abstract destroy(): void;
protected abstract roundClean(): void;
readonly blockLen: number;
readonly outputLen: number;
readonly canXOF = false;
readonly padOffset: number;
readonly isLE: boolean;
protected buffer: Uint8Array;
protected view: DataView;
protected finished: boolean;
protected length: number;
protected pos: number;
protected destroyed: boolean;
constructor(blockLen: number, outputLen: number, padOffset: number, isLE: boolean);
update(data: TArg<Uint8Array>): this;
digestInto(out: TArg<Uint8Array>): void;
digest(): TRet<Uint8Array>;
_cloneInto(to?: T): T;
clone(): T;
}
/**
* Initial SHA-2 state: fractional parts of square roots of first 16 primes 2..53.
* Check out `test/misc/sha2-gen-iv.js` for recomputation guide.
*/
/** Initial SHA256 state from RFC 6234 §6.1: the first 32 bits of the fractional parts of the
* square roots of the first eight prime numbers. Exported as a shared table; callers must treat
* it as read-only because constructors copy words from it by index. */
export declare const SHA256_IV: TRet<Uint32Array>;
/** Initial SHA224 state `H(0)` from RFC 6234 §6.1. Exported as a shared table; callers must
* treat it as read-only because constructors copy words from it by index. */
export declare const SHA224_IV: TRet<Uint32Array>;
/** Initial SHA384 state from RFC 6234 §6.3: eight RFC 64-bit `H(0)` words stored as sixteen
* big-endian 32-bit halves. Derived from the fractional parts of the square roots of the ninth
* through sixteenth prime numbers. Exported as a shared table; callers must treat it as read-only
* because constructors copy halves from it by index. */
export declare const SHA384_IV: TRet<Uint32Array>;
/** Initial SHA512 state from RFC 6234 §6.3: eight RFC 64-bit `H(0)` words stored as sixteen
* big-endian 32-bit halves. Derived from the fractional parts of the square roots of the first
* eight prime numbers. Exported as a shared table; callers must treat it as read-only because
* constructors copy halves from it by index. */
export declare const SHA512_IV: TRet<Uint32Array>;
//# sourceMappingURL=_md.d.ts.map
@@ -0,0 +1 @@
module.exports={A:{A:{"2":"_E"},B:{"1":"_NI","2":"_2F"},C:{"1":"_AQ _uB","2":"_zC _EI _L"},D:{"1":"_3R","2":"_DO"},E:{"1":"_PC","2":"_3C"},F:{"1":"_dR","2":"_IP"},G:{"1":"_NC","2":"_0C"},H:{"2":"1D"},I:{"1":"I","2":"_G"},J:{"2":"_B"},K:{"1":"H","2":"_D"},L:{"1":"I"},M:{"1":"YC"},N:{"2":"_A"},O:{"1":"bC"},P:{"1":"_yB","2":"_pC"},Q:{"1":"JE"},R:{"1":"KE"},S:{"1":"ME","2":"LE"}},B:6,C:"Promise.prototype.finally",D:true};
@@ -0,0 +1,522 @@
flf2a$ 5 5 12 0 11 0 0 0
Author : myflix and Mikechat
Date : 2006/4/9 14:37:04
Version: 1.0
-------------------------------------------------
-------------------------------------------------
This font has been created using JavE's FIGlet font export assistant.
Have a look at: http://www.jave.de
Permission is hereby given to modify this font, as long as the
modifier's name is placed on a comment line.
_ #
_( )__ #
_| _|#
(_ _ (_ #
|_( )__|##
_ #
_( )__ #
_| _|#
(_ ! _ (_ #
|_( )__|##
_ #
_( )__ #
_| _|#
(_ " _ (_ #
|_( )__|##
##
#
#
#
##
$#
#
#
#
##
%#
#
#
#
##
&#
#
#
#
##
'#
#
#
#
##
(#
#
#
#
##
)#
#
#
#
##
*#
#
#
#
##
_ #
_( )__ #
_| _|#
(_ + _ (_ #
|_( )__|##
,#
#
#
#
##
_ #
_( )__ #
_| _|#
(_ - _ (_ #
|_( )__|##
.#
#
#
#
##
/#
#
#
#
##
_ #
_( )__ #
_| _|#
(_ 0 _ (_ #
|_( )__|##
_ #
_( )__ #
_| _|#
(_ 1 _ (_ #
|_( )__|##
_ #
_( )__ #
_| _|#
(_ 2 _ (_ #
|_( )__|##
_ #
_( )__ #
_| _|#
(_ 3 _ (_ #
|_( )__|##
_ #
_( )__ #
_| _|#
(_ 4 _ (_ #
|_( )__|##
_ #
_( )__ #
_| _|#
(_ 5 _ (_ #
|_( )__|##
_ #
_( )__ #
_| _|#
(_ 6 _ (_ #
|_( )__|##
_ #
_( )__ #
_| _|#
(_ 7 _ (_ #
|_( )__|##
_ #
_( )__ #
_| _|#
(_ 8 _ (_ #
|_( )__|##
_ #
_( )__ #
_| _|#
(_ 9 _ (_ #
|_( )__|##
_ #
_( )__ #
_| _|#
(_ : _ (_ #
|_( )__|##
_ #
_( )__ #
_| _|#
(_ ; _ (_ #
|_( )__|##
<#
#
#
#
##
_ #
_( )__ #
_| _|#
(_ = _ (_ #
|_( )__|##
>#
#
#
#
##
_ #
_( )__ #
_| _|#
(_ ? _ (_ #
|_( )__|##
@#
#
#
#
##
_ #
_( )__ #
_| _|#
(_ A _ (_ #
|_( )__|##
_ #
_( )__ #
_| _|#
(_ B _ (_ #
|_( )__|##
_ #
_( )__ #
_| _|#
(_ C _ (_ #
|_( )__|##
_ #
_( )__ #
_| _|#
(_ D _ (_ #
|_( )__|##
_ #
_( )__ #
_| _|#
(_ E _ (_ #
|_( )__|##
_ #
_( )__ #
_| _|#
(_ F _ (_ #
|_( )__|##
_ #
_( )__ #
_| _|#
(_ G _ (_ #
|_( )__|##
_ #
_( )__ #
_| _|#
(_ H _ (_ #
|_( )__|##
_ #
_( )__ #
_| _|#
(_ I _ (_ #
|_( )__|##
_ #
_( )__ #
_| _|#
(_ J _ (_ #
|_( )__|##
_ #
_( )__ #
_| _|#
(_ K _ (_ #
|_( )__|##
_ #
_( )__ #
_| _|#
(_ L _ (_ #
|_( )__|##
_ #
_( )__ #
_| _|#
(_ M _ (_ #
|_( )__|##
_ #
_( )__ #
_| _|#
(_ N _ (_ #
|_( )__|##
_ #
_( )__ #
_| _|#
(_ O _ (_ #
|_( )__|##
_ #
_( )__ #
_| _|#
(_ P _ (_ #
|_( )__|##
_ #
_( )__ #
_| _|#
(_ Q _ (_ #
|_( )__|##
_ #
_( )__ #
_| _|#
(_ R _ (_ #
|_( )__|##
_ #
_( )__ #
_| _|#
(_ S _ (_ #
|_( )__|##
_ #
_( )__ #
_| _|#
(_ T _ (_ #
|_( )__|##
_ #
_( )__ #
_| _|#
(_ U _ (_ #
|_( )__|##
_ #
_( )__ #
_| _|#
(_ V _ (_ #
|_( )__|##
_ #
_( )__ #
_| _|#
(_ W _ (_ #
|_( )__|##
_ #
_( )__ #
_| _|#
(_ X _ (_ #
|_( )__|##
_ #
_( )__ #
_| _|#
(_ Y _ (_ #
|_( )__|##
_ #
_( )__ #
_| _|#
(_ Z _ (_ #
|_( )__|##
[#
#
#
#
##
\#
#
#
#
##
]#
#
#
#
##
_ #
_( )__ #
_| _|#
(_ ^ _ (_ #
|_( )__|##
_ #
_( )__ #
_| _|#
(_ _ _ (_ #
|_( )__|##
`#
#
#
#
##
_ #
_( )__ #
_| _|#
(_ A _ (_ #
|_( )__|##
_ #
_( )__ #
_| _|#
(_ B _ (_ #
|_( )__|##
_ #
_( )__ #
_| _|#
(_ C _ (_ #
|_( )__|##
_ #
_( )__ #
_| _|#
(_ D _ (_ #
|_( )__|##
_ #
_( )__ #
_| _|#
(_ E _ (_ #
|_( )__|##
_ #
_( )__ #
_| _|#
(_ F _ (_ #
|_( )__|##
_ #
_( )__ #
_| _|#
(_ G _ (_ #
|_( )__|##
_ #
_( )__ #
_| _|#
(_ H _ (_ #
|_( )__|##
_ #
_( )__ #
_| _|#
(_ I _ (_ #
|_( )__|##
_ #
_( )__ #
_| _|#
(_ J _ (_ #
|_( )__|##
_ #
_( )__ #
_| _|#
(_ K _ (_ #
|_( )__|##
_ #
_( )__ #
_| _|#
(_ L _ (_ #
|_( )__|##
_ #
_( )__ #
_| _|#
(_ M _ (_ #
|_( )__|##
_ #
_( )__ #
_| _|#
(_ N _ (_ #
|_( )__|##
_ #
_( )__ #
_| _|#
(_ O _ (_ #
|_( )__|##
_ #
_( )__ #
_| _|#
(_ P _ (_ #
|_( )__|##
_ #
_( )__ #
_| _|#
(_ Q _ (_ #
|_( )__|##
_ #
_( )__ #
_| _|#
(_ R _ (_ #
|_( )__|##
_ #
_( )__ #
_| _|#
(_ S _ (_ #
|_( )__|##
_ #
_( )__ #
_| _|#
(_ T _ (_ #
|_( )__|##
_ #
_( )__ #
_| _|#
(_ U _ (_ #
|_( )__|##
_ #
_( )__ #
_| _|#
(_ V _ (_ #
|_( )__|##
_ #
_( )__ #
_| _|#
(_ W _ (_ #
|_( )__|##
_ #
_( )__ #
_| _|#
(_ X _ (_ #
|_( )__|##
_ #
_( )__ #
_| _|#
(_ Y _ (_ #
|_( )__|##
_ #
_( )__ #
_| _|#
(_ Z _ (_ #
|_( )__|##
{#
#
#
#
##
|#
#
#
#
##
}#
#
#
#
##
~#
#
#
#
##
_ #
_( )__ #
_| _|#
(_ A _ (_ #
|_( )__|##
_ #
_( )__ #
_| _|#
(_ O _ (_ #
|_( )__|##
_ #
_( )__ #
_| _|#
(_ U _ (_ #
|_( )__|##
_ #
_( )__ #
_| _|#
(_ A _ (_ #
|_( )__|##
_ #
_( )__ #
_| _|#
(_ O _ (_ #
|_( )__|##
_ #
_( )__ #
_| _|#
(_ U _ (_ #
|_( )__|##
_ #
_( )__ #
_| _|#
(_ _ (_ #
|_( )__|##
@@ -0,0 +1,148 @@
# 🍪 cookie-es
<!-- automd:badges bundlejs packagephobia codecov -->
[![npm version](https://img.shields.io/npm/v/cookie-es)](https://npmjs.com/package/cookie-es)
[![npm downloads](https://img.shields.io/npm/dm/cookie-es)](https://npm.chart.dev/cookie-es)
[![bundle size](https://img.shields.io/bundlejs/size/cookie-es)](https://bundlejs.com/?q=cookie-es)
[![install size](https://badgen.net/packagephobia/install/cookie-es)](https://packagephobia.com/result?p=cookie-es)
[![codecov](https://img.shields.io/codecov/c/gh/unjs/cookie-es)](https://codecov.io/gh/unjs/cookie-es)
<!-- /automd -->
ESM-ready [`Cookie`](https://developer.mozilla.org/en-US/docs/Web/HTTP/Headers/Cookie) and [`Set-Cookie`](https://developer.mozilla.org/en-US/docs/Web/HTTP/Headers/Set-Cookie) parser and serializer based on [cookie](https://github.com/jshttp/cookie) and [set-cookie-parser](https://github.com/nfriedly/set-cookie-parser) with built-in TypeScript types. Compliant with [RFC 6265bis](https://httpwg.org/http-extensions/draft-ietf-httpbis-rfc6265bis.html).
## Install
```sh
# ✨ Auto-detect (npm, yarn, pnpm, bun, deno)
npx nypm install cookie-es
```
## Import
```js
import {
parseCookie,
parseSetCookie,
serializeCookie,
stringifyCookie,
splitSetCookieString,
} from "cookie-es";
```
## API
### `parseCookie(str, options?)`
Parse a `Cookie` header string into an object. First occurrence wins for duplicate names.
```js
parseCookie("foo=bar; equation=E%3Dmc%5E2");
// { foo: "bar", equation: "E=mc^2" }
// Custom decoder
parseCookie("foo=bar", { decode: (v) => v });
// Only parse specific keys
parseCookie("a=1; b=2; c=3", { filter: (key) => key !== "b" });
// { a: "1", c: "3" }
```
### `parseSetCookie(str, options?)`
Parse a `Set-Cookie` header string into an object with all cookie attributes.
```js
parseSetCookie(
"id=abc; Domain=example.com; Path=/; HttpOnly; Secure; SameSite=Lax; Max-Age=3600; Partitioned; Priority=High",
);
// {
// name: "id",
// value: "abc",
// domain: "example.com",
// path: "/",
// httpOnly: true,
// secure: true,
// sameSite: "lax",
// maxAge: 3600,
// partitioned: true,
// priority: "high",
// }
```
Supports `decode` option (custom function or `false` to skip decoding). Returns `undefined` for cookies with forbidden names (prototype pollution protection) or when both name and value are empty ([RFC 6265bis](https://httpwg.org/http-extensions/draft-ietf-httpbis-rfc6265bis.html) sec 5.7).
### `serializeCookie(name, value, options?)`
Serialize a cookie name-value pair into a `Set-Cookie` header string.
```js
serializeCookie("foo", "bar", { httpOnly: true, secure: true, maxAge: 3600 });
// "foo=bar; Max-Age=3600; HttpOnly; Secure"
// Also accepts a cookie object
serializeCookie({
name: "foo",
value: "bar",
domain: "example.com",
path: "/",
sameSite: "lax",
});
// "foo=bar; Domain=example.com; Path=/; SameSite=Lax"
```
Non-string values are coerced to strings (`null` and `undefined` become empty string).
Supported attributes: `maxAge`, `expires`, `domain`, `path`, `httpOnly`, `secure`, `sameSite`, `priority`, `partitioned`. Use `encode` option for custom value encoding (default: `encodeURIComponent`).
> [!NOTE]
> `parse` and `serialize` are available as shorter aliases for `parseCookie` and `serializeCookie`.
### `stringifyCookie(cookies, options?)`
Stringify a cookies object into an HTTP `Cookie` header string.
```js
stringifyCookie({ foo: "bar", baz: "qux" });
// "foo=bar; baz=qux"
```
### `splitSetCookieString(input)`
Split comma-joined `Set-Cookie` headers into individual strings. Correctly handles commas within cookie attributes like `Expires` dates.
```js
splitSetCookieString(
"foo=bar; Expires=Thu, 01 Jan 2026 00:00:00 GMT, baz=qux",
);
// ["foo=bar; Expires=Thu, 01 Jan 2026 00:00:00 GMT", "baz=qux"]
// Also accepts an array
splitSetCookieString(["a=1, b=2", "c=3"]);
// ["a=1", "b=2", "c=3"]
```
## Parsing Options
### `allowMultiple`
By default, when a cookie name appears more than once, only the first value is kept. Set `allowMultiple: true` to collect all values into an array:
```js
import { parseCookie } from "cookie-es";
// Default: first value wins
parseCookie("foo=a;bar=b;foo=c");
// => { foo: "a", bar: "b" }
// With allowMultiple: duplicates return arrays
parseCookie("foo=a;bar=b;foo=c", { allowMultiple: true });
// => { foo: ["a", "c"], bar: "b" }
```
## License
[MIT](./LICENSE)
Based on [jshttp/cookie](https://github.com/jshttp/cookie) (Roman Shtylman and Douglas Christopher Wilson) and [nfriedly/set-cookie-parser](https://github.com/nfriedly/set-cookie-parser) (Nathan Friedly).
@@ -0,0 +1,20 @@
The MIT License (MIT)
Copyright 2014 Andrey Sitnik <andrey@sitnik.es> and other contributors
Permission is hereby granted, free of charge, to any person obtaining a copy of
this software and associated documentation files (the "Software"), to deal in
the Software without restriction, including without limitation the rights to
use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of
the Software, and to permit persons to whom the Software is furnished to do so,
subject to the following conditions:
The above copyright notice and this permission notice shall be included in all
copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS
FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR
COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER
IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
@@ -0,0 +1,290 @@
/**
* OAuth provider extensions for specialized authentication flows.
*
* This module provides ready-to-use OAuthClientProvider implementations
* for common machine-to-machine authentication scenarios.
*/
/**
* Helper to produce a private_key_jwt client authentication function.
*
* Usage:
* const addClientAuth = createPrivateKeyJwtAuth({ issuer, subject, privateKey, alg, audience? });
* // pass addClientAuth as provider.addClientAuthentication implementation
*/
export function createPrivateKeyJwtAuth(options) {
return async (_headers, params, url, metadata) => {
// Lazy import to avoid heavy dependency unless used
if (typeof globalThis.crypto === 'undefined') {
throw new TypeError('crypto is not available, please ensure you add have Web Crypto API support for older Node.js versions (see https://github.com/modelcontextprotocol/typescript-sdk#nodejs-web-crypto-globalthiscrypto-compatibility)');
}
const jose = await import('jose');
const audience = String(options.audience ?? metadata?.issuer ?? url);
const lifetimeSeconds = options.lifetimeSeconds ?? 300;
const now = Math.floor(Date.now() / 1000);
const jti = `${Date.now()}-${Math.random().toString(36).slice(2)}`;
const baseClaims = {
iss: options.issuer,
sub: options.subject,
aud: audience,
exp: now + lifetimeSeconds,
iat: now,
jti
};
const claims = options.claims ? { ...baseClaims, ...options.claims } : baseClaims;
// Import key for the requested algorithm
const alg = options.alg;
let key;
if (typeof options.privateKey === 'string') {
if (alg.startsWith('RS') || alg.startsWith('ES') || alg.startsWith('PS')) {
key = await jose.importPKCS8(options.privateKey, alg);
}
else if (alg.startsWith('HS')) {
key = new TextEncoder().encode(options.privateKey);
}
else {
throw new Error(`Unsupported algorithm ${alg}`);
}
}
else if (options.privateKey instanceof Uint8Array) {
if (alg.startsWith('HS')) {
key = options.privateKey;
}
else {
// Assume PKCS#8 DER in Uint8Array for asymmetric algorithms
key = await jose.importPKCS8(new TextDecoder().decode(options.privateKey), alg);
}
}
else {
// Treat as JWK
key = await jose.importJWK(options.privateKey, alg);
}
// Sign JWT
const assertion = await new jose.SignJWT(claims)
.setProtectedHeader({ alg, typ: 'JWT' })
.setIssuer(options.issuer)
.setSubject(options.subject)
.setAudience(audience)
.setIssuedAt(now)
.setExpirationTime(now + lifetimeSeconds)
.setJti(jti)
.sign(key);
params.set('client_assertion', assertion);
params.set('client_assertion_type', 'urn:ietf:params:oauth:client-assertion-type:jwt-bearer');
};
}
/**
* The `issuer` stamp for constructor-supplied client information. Omitting `expectedIssuer` is
* deprecated: nothing else says which authorization server such credentials belong to.
*/
function checkedExpectedIssuer(expectedIssuer) {
if (expectedIssuer === undefined) {
// eslint-disable-next-line no-console
console.warn('[mcp-sdk] Omitting `expectedIssuer` is deprecated. Without it, the MCP server decides which authorization ' +
"server receives this client's credentials; pass your authorization server's issuer URL as " +
'`expectedIssuer` so they are only sent there.');
}
else if (typeof expectedIssuer !== 'string' || !expectedIssuer) {
throw new Error("expectedIssuer must be the authorization server's issuer URL");
}
return expectedIssuer;
}
/**
* OAuth provider for client_credentials grant with client_secret_basic authentication.
*
* This provider is designed for machine-to-machine authentication where
* the client authenticates using a client_id and client_secret.
*
* @example
* const provider = new ClientCredentialsProvider({
* clientId: 'my-client',
* clientSecret: 'my-secret',
* expectedIssuer: 'https://auth.example.com'
* });
*
* const transport = new StreamableHTTPClientTransport(serverUrl, {
* authProvider: provider
* });
*/
export class ClientCredentialsProvider {
constructor(options) {
this._clientInfo = {
client_id: options.clientId,
client_secret: options.clientSecret,
issuer: checkedExpectedIssuer(options.expectedIssuer)
};
this._clientMetadata = {
client_name: options.clientName ?? 'client-credentials-client',
redirect_uris: [],
grant_types: ['client_credentials'],
token_endpoint_auth_method: 'client_secret_basic',
scope: options.scope
};
}
get redirectUrl() {
return undefined;
}
get clientMetadata() {
return this._clientMetadata;
}
clientInformation() {
return this._clientInfo;
}
saveClientInformation(info) {
this._clientInfo = info;
}
tokens() {
return this._tokens;
}
saveTokens(tokens) {
this._tokens = tokens;
}
redirectToAuthorization() {
throw new Error('redirectToAuthorization is not used for client_credentials flow');
}
saveCodeVerifier() {
// Not used for client_credentials
}
codeVerifier() {
throw new Error('codeVerifier is not used for client_credentials flow');
}
prepareTokenRequest(scope) {
const params = new URLSearchParams({ grant_type: 'client_credentials' });
if (scope)
params.set('scope', scope);
return params;
}
}
/**
* OAuth provider for client_credentials grant with private_key_jwt authentication.
*
* This provider is designed for machine-to-machine authentication where
* the client authenticates using a signed JWT assertion (RFC 7523 Section 2.2).
*
* @example
* const provider = new PrivateKeyJwtProvider({
* clientId: 'my-client',
* privateKey: pemEncodedPrivateKey,
* algorithm: 'RS256',
* expectedIssuer: 'https://auth.example.com'
* });
*
* const transport = new StreamableHTTPClientTransport(serverUrl, {
* authProvider: provider
* });
*/
export class PrivateKeyJwtProvider {
constructor(options) {
this._clientInfo = {
client_id: options.clientId,
issuer: checkedExpectedIssuer(options.expectedIssuer)
};
this._clientMetadata = {
client_name: options.clientName ?? 'private-key-jwt-client',
redirect_uris: [],
grant_types: ['client_credentials'],
token_endpoint_auth_method: 'private_key_jwt',
scope: options.scope
};
this.addClientAuthentication = createPrivateKeyJwtAuth({
issuer: options.clientId,
subject: options.clientId,
privateKey: options.privateKey,
alg: options.algorithm,
lifetimeSeconds: options.jwtLifetimeSeconds
});
}
get redirectUrl() {
return undefined;
}
get clientMetadata() {
return this._clientMetadata;
}
clientInformation() {
return this._clientInfo;
}
saveClientInformation(info) {
this._clientInfo = info;
}
tokens() {
return this._tokens;
}
saveTokens(tokens) {
this._tokens = tokens;
}
redirectToAuthorization() {
throw new Error('redirectToAuthorization is not used for client_credentials flow');
}
saveCodeVerifier() {
// Not used for client_credentials
}
codeVerifier() {
throw new Error('codeVerifier is not used for client_credentials flow');
}
prepareTokenRequest(scope) {
const params = new URLSearchParams({ grant_type: 'client_credentials' });
if (scope)
params.set('scope', scope);
return params;
}
}
/**
* OAuth provider for client_credentials grant with a static private_key_jwt assertion.
*
* This provider mirrors {@link PrivateKeyJwtProvider} but instead of constructing and
* signing a JWT on each request, it accepts a pre-built JWT assertion string and
* uses it directly for authentication.
*/
export class StaticPrivateKeyJwtProvider {
constructor(options) {
this._clientInfo = {
client_id: options.clientId,
issuer: checkedExpectedIssuer(options.expectedIssuer)
};
this._clientMetadata = {
client_name: options.clientName ?? 'static-private-key-jwt-client',
redirect_uris: [],
grant_types: ['client_credentials'],
token_endpoint_auth_method: 'private_key_jwt',
scope: options.scope
};
const assertion = options.jwtBearerAssertion;
this.addClientAuthentication = async (_headers, params) => {
params.set('client_assertion', assertion);
params.set('client_assertion_type', 'urn:ietf:params:oauth:client-assertion-type:jwt-bearer');
};
}
get redirectUrl() {
return undefined;
}
get clientMetadata() {
return this._clientMetadata;
}
clientInformation() {
return this._clientInfo;
}
saveClientInformation(info) {
this._clientInfo = info;
}
tokens() {
return this._tokens;
}
saveTokens(tokens) {
this._tokens = tokens;
}
redirectToAuthorization() {
throw new Error('redirectToAuthorization is not used for client_credentials flow');
}
saveCodeVerifier() {
// Not used for client_credentials
}
codeVerifier() {
throw new Error('codeVerifier is not used for client_credentials flow');
}
prepareTokenRequest(scope) {
const params = new URLSearchParams({ grant_type: 'client_credentials' });
if (scope)
params.set('scope', scope);
return params;
}
}
//# sourceMappingURL=auth-extensions.js.map
@@ -0,0 +1 @@
{"version":3,"file":"shimsWorkerd.mjs","names":[],"sources":["../src/shimsWorkerd.ts"],"sourcesContent":["/**\n * Cloudflare Workers runtime shims for server package\n *\n * This file is selected via package.json export conditions when running in workerd.\n */\nimport { preloadSchemas } from '@modelcontextprotocol/core-internal';\n\nexport { CfWorkerJsonSchemaValidator as DefaultJsonSchemaValidator } from '@modelcontextprotocol/core-internal/validators/cfWorker';\n\n// Platform asymmetry: isolate platforms like workerd evaluate module scope\n// during deployment/isolate warm-up, outside any request's billed CPU, while\n// lazy construction would land inside the first request each fresh isolate\n// serves. The Node and browser shims stay lazy — there, module evaluation is\n// process/page startup and boot latency is the cost that matters.\npreloadSchemas();\n\n/**\n * Stub process object for non-Node.js environments.\n * StdioServerTransport is not supported in Cloudflare Workers/browser environments.\n */\nfunction notSupported(): never {\n throw new Error('StdioServerTransport is not supported in this environment. Use StreamableHTTPServerTransport instead.');\n}\n\nexport const process = {\n get stdin(): never {\n return notSupported();\n },\n get stdout(): never {\n return notSupported();\n }\n};\n"],"mappings":";;;;;;;;;AAcA,gBAAgB;;;;;AAMhB,SAAS,eAAsB;AAC3B,OAAM,IAAI,MAAM,wGAAwG;;AAG5H,MAAa,UAAU;CACnB,IAAI,QAAe;AACf,SAAO,cAAc;;CAEzB,IAAI,SAAgB;AAChB,SAAO,cAAc;;CAE5B"}
@@ -0,0 +1 @@
{"version":3,"file":"index.js","sources":[],"sourcesContent":[],"names":[],"mappings":";;"}
@@ -0,0 +1,22 @@
/*! *****************************************************************************
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="es2023" />
/// <reference lib="dom" />
/// <reference lib="webworker.importscripts" />
/// <reference lib="scripthost" />
/// <reference lib="dom.iterable" />
/// <reference lib="dom.asynciterable" />
@@ -0,0 +1 @@
module.exports={C:{"4":0.11115,"115":0.0247,"120":1.00035,"121":1.99453,"123":0.01853,"124":0.01853,"125":0.01235,"127":0.01235,"129":0.00618,"130":0.00618,"132":0.00618,"136":0.00618,"140":0.0247,"142":0.00618,"146":0.00618,"147":0.00618,"149":0.00618,"150":0.01235,"151":0.0247,"152":0.01853,"153":0.01853,"154":0.06793,"155":0.25318,"156":0.27788,"157":0.01235,_:"2 3 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 126 128 131 133 134 135 137 138 139 141 143 144 145 148 158 159 160 3.5 3.6"},D:{"47":0.00618,"60":0.00618,"65":0.00618,"66":0.00618,"68":0.00618,"69":0.00618,"70":0.00618,"71":0.00618,"72":0.00618,"75":0.00618,"76":0.00618,"77":0.00618,"79":0.00618,"87":0.01853,"92":0.00618,"93":0.03705,"97":0.01235,"101":0.00618,"103":0.741,"104":0.69778,"105":0.6916,"106":0.6916,"107":0.67925,"108":0.68543,"109":0.99418,"110":0.67308,"111":0.7163,"112":0.68543,"113":0.00618,"114":0.03088,"116":1.3585,"117":0.67925,"118":1.6302,"119":1.98218,"120":2.70465,"121":0.01235,"122":0.01853,"123":0.0494,"124":0.70395,"125":0.00618,"126":0.0247,"128":0.04323,"129":0.00618,"130":0.01235,"131":1.37085,"132":0.00618,"133":1.5067,"134":0.16673,"135":0.16673,"136":0.247,"137":0.18525,"138":0.32728,"139":0.1729,"140":0.20378,"141":0.1976,"142":0.62368,"143":0.01853,"144":0.19143,"145":0.21613,"146":0.90155,"147":0.05558,"148":0.30875,"149":0.50018,"150":0.53105,"151":5.40313,"152":7.05185,"153":5.25493,"154":1.15473,"155":0.01853,_:"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 48 49 50 51 52 53 54 55 56 57 58 59 61 62 63 64 67 73 74 78 80 81 83 84 85 86 88 89 90 91 94 95 96 98 99 100 102 115 127 156 157"},F:{"53":0.00618,"54":0.00618,"55":0.00618,"56":0.00618,"57":0.00618,"89":0.00618,"95":0.00618,"99":0.00618,"101":0.00618,"102":0.00618,"105":0.00618,"106":0.0247,"107":0.00618,"115":0.00618,"116":0.00618,"119":0.00618,"121":0.00618,"122":0.00618,"131":0.00618,"133":0.00618,"134":0.1729,"135":0.67925,_:"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 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 90 91 92 93 94 96 97 98 100 103 104 108 109 110 111 112 113 114 117 118 120 123 124 125 126 127 132 9.5-9.6 10.0-10.1 10.5 10.6 11.1 11.5 11.6 12.1"},B:{"18":0.00618,"92":0.0247,"100":0.00618,"109":0.01235,"119":0.97565,"120":0.9633,"122":0.01853,"123":0.00618,"124":0.01235,"132":0.00618,"133":0.00618,"135":0.00618,"136":0.00618,"138":0.01235,"139":0.00618,"140":0.01235,"141":0.00618,"142":0.01853,"143":0.00618,"144":0.0247,"145":0.0247,"146":0.00618,"147":0.01853,"148":0.0247,"149":0.0247,"150":0.16055,"151":0.23465,"152":2.11185,"153":2.42678,"154":0.60515,_:"12 13 14 15 16 17 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 111 112 113 114 115 116 117 118 121 125 126 127 128 129 130 131 134 137"},E:{"13":0.00618,"27":0.0988,_:"4 5 6 7 8 9 10 11 12 14 15 3.1 3.2 5.1 6.1 7.1 9.1 10.1 11.1 12.1 15.1 15.2-15.3 15.4 15.5 16.0 16.1 16.2 16.3 16.4 16.5 17.0 18.2 18.4 27.1 27.2 TP","13.1":0.01235,"14.1":0.00618,"15.6":0.03088,"16.6":0.03088,"17.1":0.0247,"17.2":0.00618,"17.3":0.00618,"17.4":0.00618,"17.5":0.00618,"17.6":0.0494,"18.0":0.0247,"18.1":0.00618,"18.3":0.03705,"18.5-18.7":0.03088,"26.0":0.05558,"26.1":0.00618,"26.2":0.0247,"26.3":0.0247,"26.4":0.03088,"26.5":0.14203,"26.6":0.71013},G:{"8":0,"3.2":0,"4.0-4.1":0,"4.2-4.3":0.00139,"5.0-5.1":0.00139,"6.0-6.1":0,"7.0-7.1":0.00278,"8.1-8.4":0,"9.0-9.2":0,"9.3":0,"10.0-10.2":0,"10.3":0.0139,"11.0-11.2":0.00139,"11.3-11.4":0.00278,"12.0-12.1":0,"12.2-12.5":0.03614,"13.0-13.1":0,"13.2":0.00695,"13.3":0,"13.4-13.7":0.00139,"14.0-14.4":0.00556,"14.5-14.8":0.00834,"15.0-15.1":0.00834,"15.2-15.3":0.00556,"15.4":0.00695,"15.5":0.00834,"15.6-15.8":0.1807,"16.0":0.0139,"16.1":0.02502,"16.2":0.0139,"16.3":0.03058,"16.4":0.00695,"16.5":0.01112,"16.6-16.7":0.25159,"17.0":0.00973,"17.1":0.0139,"17.2":0.0139,"17.3":0.02085,"17.4":0.02919,"17.5":0.05699,"17.6-17.7":0.14734,"18.0":0.03058,"18.1":0.06116,"18.2":0.0834,"18.3":0.14456,"18.4":0.09035,"18.5-18.7":1.86678,"26.0":0.09035,"26.1":0.09174,"26.2":0.23908,"26.3":0.25854,"26.4":0.18904,"26.5":1.26629,"26.6":7.81322,"27.0":0.59909,"27.1":0,"27.2":0.01529},P:{"24":0.00959,"26":0.00959,"27":0.01918,"28":0.03836,"29":0.02877,"30":0.54664,_:"4 20 21 22 23 25 5.0-5.4 6.2-6.4 8.2 9.2 10.1 11.1-11.2 12.0 13.0 14.0 15.0 16.0 17.0 18.0 19.0","7.2-7.4":0.00959},I:{"0":0.03822,"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.00002},K:{"0":0.19508,_:"10 11 12 11.1 11.5 12.1"},A:{"9":0.00618,Line truncated
@@ -0,0 +1,59 @@
import type {CodeKeywordDefinition, AnySchema, AnySchemaObject} from "../../types"
import type {KeywordCxt} from "../../compile/validate"
import {_} from "../../compile/codegen"
import {alwaysValidSchema, mergeEvaluated, checkStrictMode} from "../../compile/util"
import {validateArray} from "../code"
const def: CodeKeywordDefinition = {
keyword: "items",
type: "array",
schemaType: ["object", "array", "boolean"],
before: "uniqueItems",
code(cxt: KeywordCxt) {
const {schema, it} = cxt
if (Array.isArray(schema)) return validateTuple(cxt, "additionalItems", schema)
it.items = true
if (alwaysValidSchema(it, schema)) return
cxt.ok(validateArray(cxt))
},
}
export function validateTuple(
cxt: KeywordCxt,
extraItems: string,
schArr: AnySchema[] = cxt.schema
): void {
const {gen, parentSchema, data, keyword, it} = cxt
checkStrictTuple(parentSchema)
if (it.opts.unevaluated && schArr.length && it.items !== true) {
it.items = mergeEvaluated.items(gen, schArr.length, it.items)
}
const valid = gen.name("valid")
const len = gen.const("len", _`${data}.length`)
schArr.forEach((sch: AnySchema, i: number) => {
if (alwaysValidSchema(it, sch)) return
gen.if(_`${len} > ${i}`, () =>
cxt.subschema(
{
keyword,
schemaProp: i,
dataProp: i,
},
valid
)
)
cxt.ok(valid)
})
function checkStrictTuple(sch: AnySchemaObject): void {
const {opts, errSchemaPath} = it
const l = schArr.length
const fullTuple = l === sch.minItems && (l === sch.maxItems || sch[extraItems] === false)
if (opts.strictTuples && !fullTuple) {
const msg = `"${keyword}" is ${l}-tuple, but minItems or maxItems/${extraItems} are not specified or different at path "${errSchemaPath}"`
checkStrictMode(it, msg, opts.strictTuples)
}
}
}
export default def
@@ -0,0 +1,307 @@
"use strict"
var Buffer = require("safer-buffer").Buffer
// == UTF32-LE/BE codec. ==========================================================
exports._utf32 = Utf32Codec
function Utf32Codec (codecOptions, iconv) {
this.iconv = iconv
this.bomAware = true
this.isLE = codecOptions.isLE
}
exports.utf32le = { type: "_utf32", isLE: true }
exports.utf32be = { type: "_utf32", isLE: false }
// Aliases
exports.ucs4le = "utf32le"
exports.ucs4be = "utf32be"
Utf32Codec.prototype.encoder = Utf32Encoder
Utf32Codec.prototype.decoder = Utf32Decoder
// -- Encoding
function Utf32Encoder (options, codec) {
this.isLE = codec.isLE
this.highSurrogate = 0
}
Utf32Encoder.prototype.write = function (str) {
var src = Buffer.from(str, "ucs2")
var dst = Buffer.alloc(src.length * 2)
var write32 = this.isLE ? dst.writeUInt32LE : dst.writeUInt32BE
var offset = 0
for (var i = 0; i < src.length; i += 2) {
var code = src.readUInt16LE(i)
var isHighSurrogate = (code >= 0xD800 && code < 0xDC00)
var isLowSurrogate = (code >= 0xDC00 && code < 0xE000)
if (this.highSurrogate) {
if (isHighSurrogate || !isLowSurrogate) {
// There shouldn't be two high surrogates in a row, nor a high surrogate which isn't followed by a low
// surrogate. If this happens, keep the pending high surrogate as a stand-alone semi-invalid character
// (technically wrong, but expected by some applications, like Windows file names).
write32.call(dst, this.highSurrogate, offset)
offset += 4
} else {
// Create 32-bit value from high and low surrogates;
var codepoint = (((this.highSurrogate - 0xD800) << 10) | (code - 0xDC00)) + 0x10000
write32.call(dst, codepoint, offset)
offset += 4
this.highSurrogate = 0
continue
}
}
if (isHighSurrogate) { this.highSurrogate = code } else {
// Even if the current character is a low surrogate, with no previous high surrogate, we'll
// encode it as a semi-invalid stand-alone character for the same reasons expressed above for
// unpaired high surrogates.
write32.call(dst, code, offset)
offset += 4
this.highSurrogate = 0
}
}
if (offset < dst.length) { dst = dst.slice(0, offset) }
return dst
}
Utf32Encoder.prototype.end = function () {
// Treat any leftover high surrogate as a semi-valid independent character.
if (!this.highSurrogate) { return }
var buf = Buffer.alloc(4)
if (this.isLE) { buf.writeUInt32LE(this.highSurrogate, 0) } else { buf.writeUInt32BE(this.highSurrogate, 0) }
this.highSurrogate = 0
return buf
}
// -- Decoding
function Utf32Decoder (options, codec) {
this.isLE = codec.isLE
this.badChar = codec.iconv.defaultCharUnicode.charCodeAt(0)
this.overflow = []
}
Utf32Decoder.prototype.write = function (src) {
if (src.length === 0) { return "" }
var i = 0
var codepoint = 0
var dst = Buffer.alloc(src.length + 4)
var offset = 0
var isLE = this.isLE
var overflow = this.overflow
var badChar = this.badChar
if (overflow.length > 0) {
for (; i < src.length && overflow.length < 4; i++) { overflow.push(src[i]) }
if (overflow.length === 4) {
// NOTE: codepoint is a signed int32 and can be negative.
// NOTE: We copied this block from below to help V8 optimize it (it works with array, not buffer).
if (isLE) {
codepoint = overflow[i] | (overflow[i + 1] << 8) | (overflow[i + 2] << 16) | (overflow[i + 3] << 24)
} else {
codepoint = overflow[i + 3] | (overflow[i + 2] << 8) | (overflow[i + 1] << 16) | (overflow[i] << 24)
}
overflow.length = 0
offset = _writeCodepoint(dst, offset, codepoint, badChar)
}
}
// Main loop. Should be as optimized as possible.
for (; i < src.length - 3; i += 4) {
// NOTE: codepoint is a signed int32 and can be negative.
if (isLE) {
codepoint = src[i] | (src[i + 1] << 8) | (src[i + 2] << 16) | (src[i + 3] << 24)
} else {
codepoint = src[i + 3] | (src[i + 2] << 8) | (src[i + 1] << 16) | (src[i] << 24)
}
offset = _writeCodepoint(dst, offset, codepoint, badChar)
}
// Keep overflowing bytes.
for (; i < src.length; i++) {
overflow.push(src[i])
}
return dst.slice(0, offset).toString("ucs2")
}
function _writeCodepoint (dst, offset, codepoint, badChar) {
// NOTE: codepoint is signed int32 and can be negative. We keep it that way to help V8 with optimizations.
if (codepoint < 0 || codepoint > 0x10FFFF) {
// Not a valid Unicode codepoint
codepoint = badChar
}
// Ephemeral Planes: Write high surrogate.
if (codepoint >= 0x10000) {
codepoint -= 0x10000
var high = 0xD800 | (codepoint >> 10)
dst[offset++] = high & 0xff
dst[offset++] = high >> 8
// Low surrogate is written below.
var codepoint = 0xDC00 | (codepoint & 0x3FF)
}
// Write BMP char or low surrogate.
dst[offset++] = codepoint & 0xff
dst[offset++] = codepoint >> 8
return offset
};
Utf32Decoder.prototype.end = function () {
this.overflow.length = 0
}
// == UTF-32 Auto codec =============================================================
// Decoder chooses automatically from UTF-32LE and UTF-32BE using BOM and space-based heuristic.
// Defaults to UTF-32LE. http://en.wikipedia.org/wiki/UTF-32
// Encoder/decoder default can be changed: iconv.decode(buf, 'utf32', {defaultEncoding: 'utf-32be'});
// Encoder prepends BOM (which can be overridden with (addBOM: false}).
exports.utf32 = Utf32AutoCodec
exports.ucs4 = "utf32"
function Utf32AutoCodec (options, iconv) {
this.iconv = iconv
}
Utf32AutoCodec.prototype.encoder = Utf32AutoEncoder
Utf32AutoCodec.prototype.decoder = Utf32AutoDecoder
// -- Encoding
function Utf32AutoEncoder (options, codec) {
options = options || {}
if (options.addBOM === undefined) {
options.addBOM = true
}
this.encoder = codec.iconv.getEncoder(options.defaultEncoding || "utf-32le", options)
}
Utf32AutoEncoder.prototype.write = function (str) {
return this.encoder.write(str)
}
Utf32AutoEncoder.prototype.end = function () {
return this.encoder.end()
}
// -- Decoding
function Utf32AutoDecoder (options, codec) {
this.decoder = null
this.initialBufs = []
this.initialBufsLen = 0
this.options = options || {}
this.iconv = codec.iconv
}
Utf32AutoDecoder.prototype.write = function (buf) {
if (!this.decoder) {
// Codec is not chosen yet. Accumulate initial bytes.
this.initialBufs.push(buf)
this.initialBufsLen += buf.length
if (this.initialBufsLen < 32) // We need more bytes to use space heuristic (see below)
{ return "" }
// We have enough bytes -> detect endianness.
var encoding = detectEncoding(this.initialBufs, this.options.defaultEncoding)
this.decoder = this.iconv.getDecoder(encoding, this.options)
var resStr = ""
for (var i = 0; i < this.initialBufs.length; i++) { resStr += this.decoder.write(this.initialBufs[i]) }
this.initialBufs.length = this.initialBufsLen = 0
return resStr
}
return this.decoder.write(buf)
}
Utf32AutoDecoder.prototype.end = function () {
if (!this.decoder) {
var encoding = detectEncoding(this.initialBufs, this.options.defaultEncoding)
this.decoder = this.iconv.getDecoder(encoding, this.options)
var resStr = ""
for (var i = 0; i < this.initialBufs.length; i++) { resStr += this.decoder.write(this.initialBufs[i]) }
var trail = this.decoder.end()
if (trail) { resStr += trail }
this.initialBufs.length = this.initialBufsLen = 0
return resStr
}
return this.decoder.end()
}
function detectEncoding (bufs, defaultEncoding) {
var b = []
var charsProcessed = 0
var invalidLE = 0; var invalidBE = 0 // Number of invalid chars when decoded as LE or BE.
var bmpCharsLE = 0; var bmpCharsBE = 0 // Number of BMP chars when decoded as LE or BE.
outerLoop:
for (var i = 0; i < bufs.length; i++) {
var buf = bufs[i]
for (var j = 0; j < buf.length; j++) {
b.push(buf[j])
if (b.length === 4) {
if (charsProcessed === 0) {
// Check BOM first.
if (b[0] === 0xFF && b[1] === 0xFE && b[2] === 0 && b[3] === 0) {
return "utf-32le"
}
if (b[0] === 0 && b[1] === 0 && b[2] === 0xFE && b[3] === 0xFF) {
return "utf-32be"
}
}
if (b[0] !== 0 || b[1] > 0x10) invalidBE++
if (b[3] !== 0 || b[2] > 0x10) invalidLE++
if (b[0] === 0 && b[1] === 0 && (b[2] !== 0 || b[3] !== 0)) bmpCharsBE++
if ((b[0] !== 0 || b[1] !== 0) && b[2] === 0 && b[3] === 0) bmpCharsLE++
b.length = 0
charsProcessed++
if (charsProcessed >= 100) {
break outerLoop
}
}
}
}
// Make decisions.
if (bmpCharsBE - invalidBE > bmpCharsLE - invalidLE) return "utf-32be"
if (bmpCharsBE - invalidBE < bmpCharsLE - invalidLE) return "utf-32le"
// Couldn't decide (likely all zeros or not enough data).
return defaultEncoding || "utf-32le"
}
@@ -0,0 +1,3 @@
declare function isNegativeZero(x: unknown): boolean;
export = isNegativeZero;
@@ -0,0 +1,24 @@
//#region src/utils/jwt/jwa.ts
/**
* @module
* JSON Web Algorithms (JWA)
* https://datatracker.ietf.org/doc/html/rfc7518
*/
let AlgorithmTypes = /* @__PURE__ */ function(AlgorithmTypes) {
AlgorithmTypes["HS256"] = "HS256";
AlgorithmTypes["HS384"] = "HS384";
AlgorithmTypes["HS512"] = "HS512";
AlgorithmTypes["RS256"] = "RS256";
AlgorithmTypes["RS384"] = "RS384";
AlgorithmTypes["RS512"] = "RS512";
AlgorithmTypes["PS256"] = "PS256";
AlgorithmTypes["PS384"] = "PS384";
AlgorithmTypes["PS512"] = "PS512";
AlgorithmTypes["ES256"] = "ES256";
AlgorithmTypes["ES384"] = "ES384";
AlgorithmTypes["ES512"] = "ES512";
AlgorithmTypes["EdDSA"] = "EdDSA";
return AlgorithmTypes;
}({});
//#endregion
export { AlgorithmTypes };
@@ -0,0 +1,77 @@
#include <string>
// weird error on linux
#ifdef __THROW
#undef __THROW
#endif
#define __THROW
#ifdef _LIBC
# include <include/sys/stat.h>
#else
# include <sys/stat.h>
#endif
#include <dirent.h>
#include <unistd.h>
#include <fcntl.h>
#include "../DirTree.hh"
#include "../shared/BruteForceBackend.hh"
#define CONVERT_TIME(ts) ((uint64_t)ts.tv_sec * 1000000000 + ts.tv_nsec)
#if __APPLE__
#define st_mtim st_mtimespec
#endif
#define ISDOT(a) (a[0] == '.' && (!a[1] || (a[1] == '.' && !a[2])))
void iterateDir(WatcherRef watcher, const std::shared_ptr <DirTree> tree, const char *relative, int parent_fd, const std::string &dirname) {
int open_flags = (O_RDONLY | O_CLOEXEC | O_DIRECTORY | O_NOCTTY | O_NONBLOCK | O_NOFOLLOW);
int new_fd = openat(parent_fd, relative, open_flags);
if (new_fd == -1) {
if (errno == EACCES) {
return; // ignore insufficient permissions
}
throw WatcherError(strerror(errno), watcher);
}
struct stat rootAttributes;
fstatat(new_fd, ".", &rootAttributes, AT_SYMLINK_NOFOLLOW);
tree->add(dirname, CONVERT_TIME(rootAttributes.st_mtim), true);
if (DIR *dir = fdopendir(new_fd)) {
while (struct dirent *ent = (errno = 0, readdir(dir))) {
if (ISDOT(ent->d_name)) continue;
std::string fullPath = dirname + "/" + ent->d_name;
if (!watcher->isIgnored(fullPath)) {
struct stat attrib;
fstatat(new_fd, ent->d_name, &attrib, AT_SYMLINK_NOFOLLOW);
bool isDir = ent->d_type == DT_DIR;
if (isDir) {
iterateDir(watcher, tree, ent->d_name, new_fd, fullPath);
} else {
tree->add(fullPath, CONVERT_TIME(attrib.st_mtim), isDir);
}
}
}
closedir(dir);
} else {
close(new_fd);
}
if (errno) {
throw WatcherError(strerror(errno), watcher);
}
}
void BruteForceBackend::readTree(WatcherRef watcher, std::shared_ptr <DirTree> tree) {
int fd = open(watcher->mDir.c_str(), O_RDONLY);
if (fd) {
iterateDir(watcher, tree, ".", fd, watcher->mDir);
close(fd);
}
}
@@ -0,0 +1,113 @@
import type {CodeKeywordDefinition, AnySchemaObject, KeywordErrorDefinition} from "../../types"
import type {KeywordCxt} from "../../compile/validate"
import {_, getProperty, Name} from "../../compile/codegen"
import {DiscrError, DiscrErrorObj} from "../discriminator/types"
import {resolveRef, SchemaEnv} from "../../compile"
import MissingRefError from "../../compile/ref_error"
import {schemaHasRulesButRef} from "../../compile/util"
export type DiscriminatorError = DiscrErrorObj<DiscrError.Tag> | DiscrErrorObj<DiscrError.Mapping>
const error: KeywordErrorDefinition = {
message: ({params: {discrError, tagName}}) =>
discrError === DiscrError.Tag
? `tag "${tagName}" must be string`
: `value of tag "${tagName}" must be in oneOf`,
params: ({params: {discrError, tag, tagName}}) =>
_`{error: ${discrError}, tag: ${tagName}, tagValue: ${tag}}`,
}
const def: CodeKeywordDefinition = {
keyword: "discriminator",
type: "object",
schemaType: "object",
error,
code(cxt: KeywordCxt) {
const {gen, data, schema, parentSchema, it} = cxt
const {oneOf} = parentSchema
if (!it.opts.discriminator) {
throw new Error("discriminator: requires discriminator option")
}
const tagName = schema.propertyName
if (typeof tagName != "string") throw new Error("discriminator: requires propertyName")
if (schema.mapping) throw new Error("discriminator: mapping is not supported")
if (!oneOf) throw new Error("discriminator: requires oneOf keyword")
const valid = gen.let("valid", false)
const tag = gen.const("tag", _`${data}${getProperty(tagName)}`)
gen.if(
_`typeof ${tag} == "string"`,
() => validateMapping(),
() => cxt.error(false, {discrError: DiscrError.Tag, tag, tagName})
)
cxt.ok(valid)
function validateMapping(): void {
const mapping = getMapping()
gen.if(false)
for (const tagValue in mapping) {
gen.elseIf(_`${tag} === ${tagValue}`)
gen.assign(valid, applyTagSchema(mapping[tagValue]))
}
gen.else()
cxt.error(false, {discrError: DiscrError.Mapping, tag, tagName})
gen.endIf()
}
function applyTagSchema(schemaProp?: number): Name {
const _valid = gen.name("valid")
const schCxt = cxt.subschema({keyword: "oneOf", schemaProp}, _valid)
cxt.mergeEvaluated(schCxt, Name)
return _valid
}
function getMapping(): {[T in string]?: number} {
const oneOfMapping: {[T in string]?: number} = {}
const topRequired = hasRequired(parentSchema)
let tagRequired = true
for (let i = 0; i < oneOf.length; i++) {
let sch = oneOf[i]
if (sch?.$ref && !schemaHasRulesButRef(sch, it.self.RULES)) {
const ref = sch.$ref
sch = resolveRef.call(it.self, it.schemaEnv.root, it.baseId, ref)
if (sch instanceof SchemaEnv) sch = sch.schema
if (sch === undefined) throw new MissingRefError(it.opts.uriResolver, it.baseId, ref)
}
const propSch = sch?.properties?.[tagName]
if (typeof propSch != "object") {
throw new Error(
`discriminator: oneOf subschemas (or referenced schemas) must have "properties/${tagName}"`
)
}
tagRequired = tagRequired && (topRequired || hasRequired(sch))
addMappings(propSch, i)
}
if (!tagRequired) throw new Error(`discriminator: "${tagName}" must be required`)
return oneOfMapping
function hasRequired({required}: AnySchemaObject): boolean {
return Array.isArray(required) && required.includes(tagName)
}
function addMappings(sch: AnySchemaObject, i: number): void {
if (sch.const) {
addMapping(sch.const, i)
} else if (sch.enum) {
for (const tagValue of sch.enum) {
addMapping(tagValue, i)
}
} else {
throw new Error(`discriminator: "properties/${tagName}" must have "const" or "enum"`)
}
}
function addMapping(tagValue: unknown, i: number): void {
if (typeof tagValue != "string" || tagValue in oneOfMapping) {
throw new Error(`discriminator: "${tagName}" values must be unique strings`)
}
oneOfMapping[tagValue] = i
}
}
},
}
export default def
@@ -0,0 +1 @@
{"version":3,"file":"pax.js","sourceRoot":"","sources":["../../src/pax.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,QAAQ,EAAE,MAAM,WAAW,CAAA;AAEpC,OAAO,EAAE,MAAM,EAAE,MAAM,aAAa,CAAA;AAEpC,MAAM,OAAO,GAAG;IACd,KAAK,CAAO;IACZ,KAAK,CAAO;IACZ,KAAK,CAAO;IAEZ,OAAO,CAAS;IAChB,OAAO,CAAS;IAEhB,GAAG,CAAS;IACZ,GAAG,CAAS;IAEZ,KAAK,CAAS;IACd,KAAK,CAAS;IACd,QAAQ,CAAS;IACjB,GAAG,CAAS;IACZ,GAAG,CAAS;IACZ,KAAK,CAAS;IACd,IAAI,CAAS;IACb,IAAI,CAAS;IACb,IAAI,CAAS;IAEb,MAAM,CAAS;IAEf,YAAY,GAAe,EAAE,SAAkB,KAAK;QAClD,IAAI,CAAC,KAAK,GAAG,GAAG,CAAC,KAAK,CAAA;QACtB,IAAI,CAAC,OAAO,GAAG,GAAG,CAAC,OAAO,CAAA;QAC1B,IAAI,CAAC,OAAO,GAAG,GAAG,CAAC,OAAO,CAAA;QAC1B,IAAI,CAAC,KAAK,GAAG,GAAG,CAAC,KAAK,CAAA;QACtB,IAAI,CAAC,GAAG,GAAG,GAAG,CAAC,GAAG,CAAA;QAClB,IAAI,CAAC,GAAG,GAAG,GAAG,CAAC,GAAG,CAAA;QAClB,IAAI,CAAC,MAAM,GAAG,MAAM,CAAA;QACpB,IAAI,CAAC,KAAK,GAAG,GAAG,CAAC,KAAK,CAAA;QACtB,IAAI,CAAC,GAAG,GAAG,GAAG,CAAC,GAAG,CAAA;QAClB,IAAI,CAAC,QAAQ,GAAG,GAAG,CAAC,QAAQ,CAAA;QAC5B,IAAI,CAAC,KAAK,GAAG,GAAG,CAAC,KAAK,CAAA;QACtB,IAAI,CAAC,KAAK,GAAG,GAAG,CAAC,KAAK,CAAA;QACtB,IAAI,CAAC,IAAI,GAAG,GAAG,CAAC,IAAI,CAAA;QACpB,IAAI,CAAC,IAAI,GAAG,GAAG,CAAC,IAAI,CAAA;QACpB,IAAI,CAAC,GAAG,GAAG,GAAG,CAAC,GAAG,CAAA;QAClB,IAAI,CAAC,KAAK,GAAG,GAAG,CAAC,KAAK,CAAA;IACxB,CAAC;IAED,MAAM;QACJ,MAAM,IAAI,GAAG,IAAI,CAAC,UAAU,EAAE,CAAA;QAC9B,IAAI,IAAI,KAAK,EAAE,EAAE,CAAC;YAChB,OAAO,MAAM,CAAC,WAAW,CAAC,CAAC,CAAC,CAAA;QAC9B,CAAC;QAED,MAAM,OAAO,GAAG,MAAM,CAAC,UAAU,CAAC,IAAI,CAAC,CAAA;QACvC,wBAAwB;QACxB,qBAAqB;QACrB,MAAM,MAAM,GAAG,GAAG,GAAG,IAAI,CAAC,IAAI,CAAC,CAAC,GAAG,OAAO,GAAG,GAAG,CAAC,CAAA;QACjD,MAAM,GAAG,GAAG,MAAM,CAAC,WAAW,CAAC,MAAM,CAAC,CAAA;QAEtC,0DAA0D;QAC1D,KAAK,IAAI,CAAC,GAAG,CAAC,EAAE,CAAC,GAAG,GAAG,EAAE,CAAC,EAAE,EAAE,CAAC;YAC7B,GAAG,CAAC,CAAC,CAAC,GAAG,CAAC,CAAA;QACZ,CAAC;QAED,IAAI,MAAM,CAAC;YACT,qBAAqB;YACrB,kEAAkE;YAClE,2BAA2B;YAC3B,qBAAqB;YACrB,IAAI,EAAE,CAAC,YAAY,GAAG,QAAQ,CAAC,IAAI,CAAC,IAAI,IAAI,EAAE,CAAC,CAAC,CAAC,KAAK,CAAC,CAAC,EAAE,EAAE,CAAC;YAC7D,oBAAoB;YACpB,IAAI,EAAE,IAAI,CAAC,IAAI,IAAI,KAAK;YACxB,GAAG,EAAE,IAAI,CAAC,GAAG;YACb,GAAG,EAAE,IAAI,CAAC,GAAG;YACb,IAAI,EAAE,OAAO;YACb,KAAK,EAAE,IAAI,CAAC,KAAK;YACjB,IAAI,EAAE,IAAI,CAAC,MAAM,CAAC,CAAC,CAAC,sBAAsB,CAAC,CAAC,CAAC,gBAAgB;YAC7D,QAAQ,EAAE,EAAE;YACZ,KAAK,EAAE,IAAI,CAAC,KAAK,IAAI,EAAE;YACvB,KAAK,EAAE,IAAI,CAAC,KAAK,IAAI,EAAE;YACvB,MAAM,EAAE,CAAC;YACT,MAAM,EAAE,CAAC;YACT,KAAK,EAAE,IAAI,CAAC,KAAK;YACjB,KAAK,EAAE,IAAI,CAAC,KAAK;SAClB,CAAC,CAAC,MAAM,CAAC,GAAG,CAAC,CAAA;QAEd,GAAG,CAAC,KAAK,CAAC,IAAI,EAAE,GAAG,EAAE,OAAO,EAAE,MAAM,CAAC,CAAA;QAErC,0BAA0B;QAC1B,KAAK,IAAI,CAAC,GAAG,OAAO,GAAG,GAAG,EAAE,CAAC,GAAG,GAAG,CAAC,MAAM,EAAE,CAAC,EAAE,EAAE,CAAC;YAChD,GAAG,CAAC,CAAC,CAAC,GAAG,CAAC,CAAA;QACZ,CAAC;QAED,OAAO,GAAG,CAAA;IACZ,CAAC;IAED,UAAU;QACR,OAAO,CACL,IAAI,CAAC,WAAW,CAAC,MAAM,CAAC;YACxB,IAAI,CAAC,WAAW,CAAC,OAAO,CAAC;YACzB,IAAI,CAAC,WAAW,CAAC,OAAO,CAAC;YACzB,IAAI,CAAC,WAAW,CAAC,KAAK,CAAC;YACvB,IAAI,CAAC,WAAW,CAAC,KAAK,CAAC;YACvB,IAAI,CAAC,WAAW,CAAC,OAAO,CAAC;YACzB,IAAI,CAAC,WAAW,CAAC,SAAS,CAAC;YAC3B,IAAI,CAAC,WAAW,CAAC,SAAS,CAAC;YAC3B,IAAI,CAAC,WAAW,CAAC,KAAK,CAAC;YACvB,IAAI,CAAC,WAAW,CAAC,OAAO,CAAC;YACzB,IAAI,CAAC,WAAW,CAAC,UAAU,CAAC;YAC5B,IAAI,CAAC,WAAW,CAAC,OAAO,CAAC;YACzB,IAAI,CAAC,WAAW,CAAC,MAAM,CAAC;YACxB,IAAI,CAAC,WAAW,CAAC,KAAK,CAAC;YACvB,IAAI,CAAC,WAAW,CAAC,OAAO,CAAC,CAC1B,CAAA;IACH,CAAC;IAED,WAAW,CAAC,KAAgB;QAC1B,IAAI,IAAI,CAAC,KAAK,CAAC,KAAK,SAAS,EAAE,CAAC;YAC9B,OAAO,EAAE,CAAA;QACX,CAAC;QACD,MAAM,CAAC,GAAG,IAAI,CAAC,KAAK,CAAC,CAAA;QACrB,MAAM,CAAC,GAAG,CAAC,YAAY,IAAI,CAAC,CAAC,CAAC,CAAC,CAAC,OAAO,EAAE,GAAG,IAAI,CAAC,CAAC,CAAC,CAAC,CAAA;QACpD,MAAM,CAAC,GACL,GAAG;YACH,CAAC,KAAK,KAAK,KAAK,IAAI,KAAK,KAAK,KAAK,IAAI,KAAK,KAAK,OAAO,CAAC,CAAC;gBACxD,SAAS;gBACX,CAAC,CAAC,EAAE,CAAC;YACL,KAAK;YACL,GAAG;YACH,CAAC;YACD,IAAI,CAAA;QACN,MAAM,OAAO,GAAG,MAAM,CAAC,UAAU,CAAC,CAAC,CAAC,CAAA;QACpC,gEAAgE;QAChE,+DAA+D;QAC/D,2BAA2B;QAC3B,IAAI,MAAM,GAAG,IAAI,CAAC,KAAK,CAAC,IAAI,CAAC,GAAG,CAAC,OAAO,CAAC,GAAG,IAAI,CAAC,GAAG,CAAC,EAAE,CAAC,CAAC,GAAG,CAAC,CAAA;QAC7D,IAAI,OAAO,GAAG,MAAM,IAAI,IAAI,CAAC,GAAG,CAAC,EAAE,EAAE,MAAM,CAAC,EAAE,CAAC;YAC7C,MAAM,IAAI,CAAC,CAAA;QACb,CAAC;QACD,MAAM,GAAG,GAAG,MAAM,GAAG,OAAO,CAAA;QAC5B,OAAO,GAAG,GAAG,CAAC,CAAA;IAChB,CAAC;IAED,MAAM,CAAC,KAAK,CAAC,GAAW,EAAE,EAAe,EAAE,IAAa,KAAK;QAC3D,OAAO,IAAI,GAAG,CAAC,KAAK,CAAC,OAAO,CAAC,GAAG,CAAC,EAAE,EAAE,CAAC,EAAE,CAAC,CAAC,CAAA;IAC5C,CAAC;CACF;AAED,MAAM,KAAK,GAAG,CAAC,CAAa,EAAE,CAAc,EAAE,EAAE,CAC9C,CAAC,CAAC,CAAC,CAAC,MAAM,CAAC,MAAM,CAAC,EAAE,EAAE,CAAC,EAAE,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAA;AAEjC,MAAM,OAAO,GAAG,CAAC,GAAW,EAAE,EAAE,CAC9B,GAAG;KACA,OAAO,CAAC,KAAK,EAAE,EAAE,CAAC;KAClB,KAAK,CAAC,IAAI,CAAC;KACX,MAAM,CAAC,WAAW,EAAE,MAAM,CAAC,MAAM,CAAC,IAAI,CAAC,CAAC,CAAA;AAE7C,MAAM,WAAW,GAAG,CAClB,GAA2C,EAC3C,IAAY,EACZ,EAAE;IACF,MAAM,CAAC,GAAG,QAAQ,CAAC,IAAI,EAAE,EAAE,CAAC,CAAA;IAE5B,6CAA6C;IAC7C,iDAAiD;IACjD,IAAI,CAAC,KAAK,MAAM,CAAC,UAAU,CAAC,IAAI,CAAC,GAAG,CAAC,EAAE,CAAC;QACtC,OAAO,GAAG,CAAA;IACZ,CAAC;IAED,IAAI,GAAG,IAAI,CAAC,KAAK,CAAC,CAAC,CAAC,GAAG,GAAG,CAAC,CAAC,MAAM,CAAC,CAAA;IACnC,MAAM,EAAE,GAAG,IAAI,CAAC,KAAK,CAAC,GAAG,CAAC,CAAA;IAC1B,MAAM,CAAC,GAAG,EAAE,CAAC,KALine truncated
@@ -0,0 +1 @@
{"version":3,"file":"file-minus.js","sources":["../../../src/icons/file-minus.ts"],"sourcesContent":["import createLucideIcon from '../createLucideIcon';\n\n/**\n * @component @name FileMinus\n * @description Lucide SVG icon component, renders SVG Element with children.\n *\n * @preview ![img](data:image/svg+xml;base64,PHN2ZyAgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIgogIHdpZHRoPSIyNCIKICBoZWlnaHQ9IjI0IgogIHZpZXdCb3g9IjAgMCAyNCAyNCIKICBmaWxsPSJub25lIgogIHN0cm9rZT0iIzAwMCIgc3R5bGU9ImJhY2tncm91bmQtY29sb3I6ICNmZmY7IGJvcmRlci1yYWRpdXM6IDJweCIKICBzdHJva2Utd2lkdGg9IjIiCiAgc3Ryb2tlLWxpbmVjYXA9InJvdW5kIgogIHN0cm9rZS1saW5lam9pbj0icm91bmQiCj4KICA8cGF0aCBkPSJNMTUgMkg2YTIgMiAwIDAgMC0yIDJ2MTZhMiAyIDAgMCAwIDIgMmgxMmEyIDIgMCAwIDAgMi0yVjdaIiAvPgogIDxwYXRoIGQ9Ik0xNCAydjRhMiAyIDAgMCAwIDIgMmg0IiAvPgogIDxwYXRoIGQ9Ik05IDE1aDYiIC8+Cjwvc3ZnPgo=) - https://lucide.dev/icons/file-minus\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 FileMinus = createLucideIcon('FileMinus', [\n ['path', { d: 'M15 2H6a2 2 0 0 0-2 2v16a2 2 0 0 0 2 2h12a2 2 0 0 0 2-2V7Z', key: '1rqfz7' }],\n ['path', { d: 'M14 2v4a2 2 0 0 0 2 2h4', key: 'tnqrlb' }],\n ['path', { d: 'M9 15h6', key: 'cctwl0' }],\n]);\n\nexport default FileMinus;\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,CAA8D,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAK,UAAU,CAAA,CAAA;AAAA,CAAA,CAC3F,CAAC,CAAA,CAAA,CAAA,CAAA,CAAA,CAAQ,CAAA,CAAA,CAAA,CAAE,GAAG,CAA2B,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAK,UAAU,CAAA,CAAA;AAAA,CAAA,CACxD,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,423 @@
// src/vlq.ts
var comma = ",".charCodeAt(0);
var semicolon = ";".charCodeAt(0);
var chars = "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/";
var intToChar = new Uint8Array(64);
var charToInt = new Uint8Array(128);
for (let i = 0; i < chars.length; i++) {
const c = chars.charCodeAt(i);
intToChar[i] = c;
charToInt[c] = i;
}
function decodeInteger(reader, relative) {
let value = 0;
let shift = 0;
let integer = 0;
do {
const c = reader.next();
integer = charToInt[c];
value |= (integer & 31) << shift;
shift += 5;
} while (integer & 32);
const shouldNegate = value & 1;
value >>>= 1;
if (shouldNegate) {
value = -2147483648 | -value;
}
return relative + value;
}
function encodeInteger(builder, num, relative) {
let delta = num - relative;
delta = delta < 0 ? -delta << 1 | 1 : delta << 1;
do {
let clamped = delta & 31;
delta >>>= 5;
if (delta > 0) clamped |= 32;
builder.write(intToChar[clamped]);
} while (delta > 0);
return num;
}
function hasMoreVlq(reader, max) {
if (reader.pos >= max) return false;
return reader.peek() !== comma;
}
// src/strings.ts
var bufLength = 1024 * 16;
var td = typeof TextDecoder !== "undefined" ? /* @__PURE__ */ new TextDecoder() : typeof Buffer !== "undefined" ? {
decode(buf) {
const out = Buffer.from(buf.buffer, buf.byteOffset, buf.byteLength);
return out.toString();
}
} : {
decode(buf) {
let out = "";
for (let i = 0; i < buf.length; i++) {
out += String.fromCharCode(buf[i]);
}
return out;
}
};
var StringWriter = class {
constructor() {
this.pos = 0;
this.out = "";
this.buffer = new Uint8Array(bufLength);
}
write(v) {
const { buffer } = this;
buffer[this.pos++] = v;
if (this.pos === bufLength) {
this.out += td.decode(buffer);
this.pos = 0;
}
}
flush() {
const { buffer, out, pos } = this;
return pos > 0 ? out + td.decode(buffer.subarray(0, pos)) : out;
}
};
var StringReader = class {
constructor(buffer) {
this.pos = 0;
this.buffer = buffer;
}
next() {
return this.buffer.charCodeAt(this.pos++);
}
peek() {
return this.buffer.charCodeAt(this.pos);
}
indexOf(char) {
const { buffer, pos } = this;
const idx = buffer.indexOf(char, pos);
return idx === -1 ? buffer.length : idx;
}
};
// src/scopes.ts
var EMPTY = [];
function decodeOriginalScopes(input) {
const { length } = input;
const reader = new StringReader(input);
const scopes = [];
const stack = [];
let line = 0;
for (; reader.pos < length; reader.pos++) {
line = decodeInteger(reader, line);
const column = decodeInteger(reader, 0);
if (!hasMoreVlq(reader, length)) {
const last = stack.pop();
last[2] = line;
last[3] = column;
continue;
}
const kind = decodeInteger(reader, 0);
const fields = decodeInteger(reader, 0);
const hasName = fields & 1;
const scope = hasName ? [line, column, 0, 0, kind, decodeInteger(reader, 0)] : [line, column, 0, 0, kind];
let vars = EMPTY;
if (hasMoreVlq(reader, length)) {
vars = [];
do {
const varsIndex = decodeInteger(reader, 0);
vars.push(varsIndex);
} while (hasMoreVlq(reader, length));
}
scope.vars = vars;
scopes.push(scope);
stack.push(scope);
}
return scopes;
}
function encodeOriginalScopes(scopes) {
const writer = new StringWriter();
for (let i = 0; i < scopes.length; ) {
i = _encodeOriginalScopes(scopes, i, writer, [0]);
}
return writer.flush();
}
function _encodeOriginalScopes(scopes, index, writer, state) {
const scope = scopes[index];
const { 0: startLine, 1: startColumn, 2: endLine, 3: endColumn, 4: kind, vars } = scope;
if (index > 0) writer.write(comma);
state[0] = encodeInteger(writer, startLine, state[0]);
encodeInteger(writer, startColumn, 0);
encodeInteger(writer, kind, 0);
const fields = scope.length === 6 ? 1 : 0;
encodeInteger(writer, fields, 0);
if (scope.length === 6) encodeInteger(writer, scope[5], 0);
for (const v of vars) {
encodeInteger(writer, v, 0);
}
for (index++; index < scopes.length; ) {
const next = scopes[index];
const { 0: l, 1: c } = next;
if (l > endLine || l === endLine && c >= endColumn) {
break;
}
index = _encodeOriginalScopes(scopes, index, writer, state);
}
writer.write(comma);
state[0] = encodeInteger(writer, endLine, state[0]);
encodeInteger(writer, endColumn, 0);
return index;
}
function decodeGeneratedRanges(input) {
const { length } = input;
const reader = new StringReader(input);
const ranges = [];
const stack = [];
let genLine = 0;
let definitionSourcesIndex = 0;
let definitionScopeIndex = 0;
let callsiteSourcesIndex = 0;
let callsiteLine = 0;
let callsiteColumn = 0;
let bindingLine = 0;
let bindingColumn = 0;
do {
const semi = reader.indexOf(";");
let genColumn = 0;
for (; reader.pos < semi; reader.pos++) {
genColumn = decodeInteger(reader, genColumn);
if (!hasMoreVlq(reader, semi)) {
const last = stack.pop();
last[2] = genLine;
last[3] = genColumn;
continue;
}
const fields = decodeInteger(reader, 0);
const hasDefinition = fields & 1;
const hasCallsite = fields & 2;
const hasScope = fields & 4;
let callsite = null;
let bindings = EMPTY;
let range;
if (hasDefinition) {
const defSourcesIndex = decodeInteger(reader, definitionSourcesIndex);
definitionScopeIndex = decodeInteger(
reader,
definitionSourcesIndex === defSourcesIndex ? definitionScopeIndex : 0
);
definitionSourcesIndex = defSourcesIndex;
range = [genLine, genColumn, 0, 0, defSourcesIndex, definitionScopeIndex];
} else {
range = [genLine, genColumn, 0, 0];
}
range.isScope = !!hasScope;
if (hasCallsite) {
const prevCsi = callsiteSourcesIndex;
const prevLine = callsiteLine;
callsiteSourcesIndex = decodeInteger(reader, callsiteSourcesIndex);
const sameSource = prevCsi === callsiteSourcesIndex;
callsiteLine = decodeInteger(reader, sameSource ? callsiteLine : 0);
callsiteColumn = decodeInteger(
reader,
sameSource && prevLine === callsiteLine ? callsiteColumn : 0
);
callsite = [callsiteSourcesIndex, callsiteLine, callsiteColumn];
}
range.callsite = callsite;
if (hasMoreVlq(reader, semi)) {
bindings = [];
do {
bindingLine = genLine;
bindingColumn = genColumn;
const expressionsCount = decodeInteger(reader, 0);
let expressionRanges;
if (expressionsCount < -1) {
expressionRanges = [[decodeInteger(reader, 0)]];
for (let i = -1; i > expressionsCount; i--) {
const prevBl = bindingLine;
bindingLine = decodeInteger(reader, bindingLine);
bindingColumn = decodeInteger(reader, bindingLine === prevBl ? bindingColumn : 0);
const expression = decodeInteger(reader, 0);
expressionRanges.push([expression, bindingLine, bindingColumn]);
}
} else {
expressionRanges = [[expressionsCount]];
}
bindings.push(expressionRanges);
} while (hasMoreVlq(reader, semi));
}
range.bindings = bindings;
ranges.push(range);
stack.push(range);
}
genLine++;
reader.pos = semi + 1;
} while (reader.pos < length);
return ranges;
}
function encodeGeneratedRanges(ranges) {
if (ranges.length === 0) return "";
const writer = new StringWriter();
for (let i = 0; i < ranges.length; ) {
i = _encodeGeneratedRanges(ranges, i, writer, [0, 0, 0, 0, 0, 0, 0]);
}
return writer.flush();
}
function _encodeGeneratedRanges(ranges, index, writer, state) {
const range = ranges[index];
const {
0: startLine,
1: startColumn,
2: endLine,
3: endColumn,
isScope,
callsite,
bindings
} = range;
if (state[0] < startLine) {
catchupLine(writer, state[0], startLine);
state[0] = startLine;
state[1] = 0;
} else if (index > 0) {
writer.write(comma);
}
state[1] = encodeInteger(writer, range[1], state[1]);
const fields = (range.length === 6 ? 1 : 0) | (callsite ? 2 : 0) | (isScope ? 4 : 0);
encodeInteger(writer, fields, 0);
if (range.length === 6) {
const { 4: sourcesIndex, 5: scopesIndex } = range;
if (sourcesIndex !== state[2]) {
state[3] = 0;
}
state[2] = encodeInteger(writer, sourcesIndex, state[2]);
state[3] = encodeInteger(writer, scopesIndex, state[3]);
}
if (callsite) {
const { 0: sourcesIndex, 1: callLine, 2: callColumn } = range.callsite;
if (sourcesIndex !== state[4]) {
state[5] = 0;
state[6] = 0;
} else if (callLine !== state[5]) {
state[6] = 0;
}
state[4] = encodeInteger(writer, sourcesIndex, state[4]);
state[5] = encodeInteger(writer, callLine, state[5]);
state[6] = encodeInteger(writer, callColumn, state[6]);
}
if (bindings) {
for (const binding of bindings) {
if (binding.length > 1) encodeInteger(writer, -binding.length, 0);
const expression = binding[0][0];
encodeInteger(writer, expression, 0);
let bindingStartLine = startLine;
let bindingStartColumn = startColumn;
for (let i = 1; i < binding.length; i++) {
const expRange = binding[i];
bindingStartLine = encodeInteger(writer, expRange[1], bindingStartLine);
bindingStartColumn = encodeInteger(writer, expRange[2], bindingStartColumn);
encodeInteger(writer, expRange[0], 0);
}
}
}
for (index++; index < ranges.length; ) {
const next = ranges[index];
const { 0: l, 1: c } = next;
if (l > endLine || l === endLine && c >= endColumn) {
break;
}
index = _encodeGeneratedRanges(ranges, index, writer, state);
}
if (state[0] < endLine) {
catchupLine(writer, state[0], endLine);
state[0] = endLine;
state[1] = 0;
} else {
writer.write(comma);
}
state[1] = encodeInteger(writer, endColumn, state[1]);
return index;
}
function catchupLine(writer, lastLine, line) {
do {
writer.write(semicolon);
} while (++lastLine < line);
}
// src/sourcemap-codec.ts
function decode(mappings) {
const { length } = mappings;
const reader = new StringReader(mappings);
const decoded = [];
let genColumn = 0;
let sourcesIndex = 0;
let sourceLine = 0;
let sourceColumn = 0;
let namesIndex = 0;
do {
const semi = reader.indexOf(";");
const line = [];
let sorted = true;
let lastCol = 0;
genColumn = 0;
while (reader.pos < semi) {
let seg;
genColumn = decodeInteger(reader, genColumn);
if (genColumn < lastCol) sorted = false;
lastCol = genColumn;
if (hasMoreVlq(reader, semi)) {
sourcesIndex = decodeInteger(reader, sourcesIndex);
sourceLine = decodeInteger(reader, sourceLine);
sourceColumn = decodeInteger(reader, sourceColumn);
if (hasMoreVlq(reader, semi)) {
namesIndex = decodeInteger(reader, namesIndex);
seg = [genColumn, sourcesIndex, sourceLine, sourceColumn, namesIndex];
} else {
seg = [genColumn, sourcesIndex, sourceLine, sourceColumn];
}
} else {
seg = [genColumn];
}
line.push(seg);
reader.pos++;
}
if (!sorted) sort(line);
decoded.push(line);
reader.pos = semi + 1;
} while (reader.pos <= length);
return decoded;
}
function sort(line) {
line.sort(sortComparator);
}
function sortComparator(a, b) {
return a[0] - b[0];
}
function encode(decoded) {
const writer = new StringWriter();
let sourcesIndex = 0;
let sourceLine = 0;
let sourceColumn = 0;
let namesIndex = 0;
for (let i = 0; i < decoded.length; i++) {
const line = decoded[i];
if (i > 0) writer.write(semicolon);
if (line.length === 0) continue;
let genColumn = 0;
for (let j = 0; j < line.length; j++) {
const segment = line[j];
if (j > 0) writer.write(comma);
genColumn = encodeInteger(writer, segment[0], genColumn);
if (segment.length === 1) continue;
sourcesIndex = encodeInteger(writer, segment[1], sourcesIndex);
sourceLine = encodeInteger(writer, segment[2], sourceLine);
sourceColumn = encodeInteger(writer, segment[3], sourceColumn);
if (segment.length === 4) continue;
namesIndex = encodeInteger(writer, segment[4], namesIndex);
}
}
return writer.flush();
}
export {
decode,
decodeGeneratedRanges,
decodeOriginalScopes,
encode,
encodeGeneratedRanges,
encodeOriginalScopes
};
//# sourceMappingURL=sourcemap-codec.mjs.map
@@ -0,0 +1,114 @@
import * as util from "../core/util.js";
const error = () => {
const Sizable = {
string: { unit: "harf", verb: "olmalıdır" },
file: { unit: "bayt", verb: "olmalıdır" },
array: { unit: "unsur", verb: "olmalıdır" },
set: { unit: "unsur", verb: "olmalıdır" },
map: { unit: "unsur", verb: "olmalıdır" },
};
function getSizing(origin) {
return Sizable[origin] ?? null;
}
const FormatDictionary = {
regex: "giren",
email: "epostagâh",
url: "URL",
emoji: "emoji",
uuid: "UUID",
uuidv4: "UUIDv4",
uuidv6: "UUIDv6",
nanoid: "nanoid",
guid: "GUID",
cuid: "cuid",
cuid2: "cuid2",
ulid: "ULID",
xid: "XID",
ksuid: "KSUID",
datetime: "ISO hengâmı",
date: "ISO tarihi",
time: "ISO zamanı",
duration: "ISO müddeti",
ipv4: "IPv4 nişânı",
ipv6: "IPv6 nişânı",
mac: "MAC nişânı",
cidrv4: "IPv4 menzili",
cidrv6: "IPv6 menzili",
base64: "base64-şifreli metin",
base64url: "base64url-şifreli metin",
json_string: "JSON metin",
e164: "E.164 sayısı",
credit_card: "i'tibâr kartı numarası",
currency_code: "para birimi kodu",
iban: "IBAN",
jwt: "JWT",
template_literal: "giren",
};
const TypeDictionary = {
nan: "NaN",
number: "numara",
array: "saf",
null: "gayb",
};
return (issue) => {
switch (issue.code) {
case "invalid_type": {
const expected = TypeDictionary[issue.expected] ?? issue.expected;
const receivedType = util.parsedType(issue.input);
const received = TypeDictionary[receivedType] ?? receivedType;
if (/^[A-Z]/.test(issue.expected)) {
return `Fâsit giren: umulan instanceof ${issue.expected}, alınan ${received}`;
}
return `Fâsit giren: umulan ${expected}, alınan ${received}`;
}
case "invalid_value":
if (issue.values.length === 1)
return `Fâsit giren: umulan ${util.stringifyPrimitive(issue.values[0])}`;
return `Fâsit tercih: mûteberler ${util.joinValues(issue.values, "|")}`;
case "too_big": {
const adj = issue.inclusive ? "<=" : "<";
const sizing = getSizing(issue.origin);
if (sizing)
return `Fazla büyük: ${issue.origin ?? "value"}, ${adj}${issue.maximum.toString()} ${sizing.unit ?? "elements"} sahip olmalıydı.`;
return `Fazla büyük: ${issue.origin ?? "value"}, ${adj}${issue.maximum.toString()} olmalıydı.`;
}
case "too_small": {
const adj = issue.inclusive ? ">=" : ">";
const sizing = getSizing(issue.origin);
if (sizing) {
return `Fazla küçük: ${issue.origin}, ${adj}${issue.minimum.toString()} ${sizing.unit} sahip olmalıydı.`;
}
return `Fazla küçük: ${issue.origin}, ${adj}${issue.minimum.toString()} olmalıydı.`;
}
case "invalid_format": {
const _issue = issue;
if (_issue.format === "starts_with")
return `Fâsit metin: "${_issue.prefix}" ile başlamalı.`;
if (_issue.format === "ends_with")
return `Fâsit metin: "${_issue.suffix}" ile bitmeli.`;
if (_issue.format === "includes")
return `Fâsit metin: "${_issue.includes}" ihtivâ etmeli.`;
if (_issue.format === "regex")
return `Fâsit metin: ${_issue.pattern} nakşına uymalı.`;
return `Fâsit ${FormatDictionary[_issue.format] ?? issue.format}`;
}
case "not_multiple_of":
return `Fâsit sayı: ${issue.divisor} katı olmalıydı.`;
case "unrecognized_keys":
return `Tanınmayan anahtar ${issue.keys.length > 1 ? "s" : ""}: ${util.joinValues(issue.keys, ", ")}`;
case "invalid_key":
return `${issue.origin} için tanınmayan anahtar var.`;
case "invalid_union":
return "Giren tanınamadı.";
case "invalid_element":
return `${issue.origin} için tanınmayan kıymet var.`;
default:
return `Kıymet tanınamadı.`;
}
};
};
export default function () {
return {
localeError: error(),
};
}
@@ -0,0 +1,174 @@
export { Format, FormatDefinition, AsyncFormatDefinition, KeywordDefinition, KeywordErrorDefinition, CodeKeywordDefinition, MacroKeywordDefinition, FuncKeywordDefinition, Vocabulary, Schema, SchemaObject, AnySchemaObject, AsyncSchema, AnySchema, ValidateFunction, AsyncValidateFunction, AnyValidateFunction, ErrorObject, ErrorNoParams, } from "./types";
export { SchemaCxt, SchemaObjCxt } from "./compile";
export interface Plugin<Opts> {
(ajv: Ajv, options?: Opts): Ajv;
[prop: string]: any;
}
export { KeywordCxt } from "./compile/validate";
export { DefinedError } from "./vocabularies/errors";
export { JSONType } from "./compile/rules";
export { JSONSchemaType } from "./types/json-schema";
export { JTDSchemaType, SomeJTDSchemaType, JTDDataType } from "./types/jtd-schema";
export { _, str, stringify, nil, Name, Code, CodeGen, CodeGenOptions } from "./compile/codegen";
import type { Schema, AnySchema, AnySchemaObject, SchemaObject, AsyncSchema, Vocabulary, KeywordDefinition, AddedKeywordDefinition, AnyValidateFunction, ValidateFunction, AsyncValidateFunction, ErrorObject, Format, AddedFormat, RegExpEngine, UriResolver } from "./types";
import type { JSONSchemaType } from "./types/json-schema";
import type { JTDSchemaType, SomeJTDSchemaType, JTDDataType } from "./types/jtd-schema";
import ValidationError from "./runtime/validation_error";
import MissingRefError from "./compile/ref_error";
import { ValidationRules } from "./compile/rules";
import { SchemaEnv } from "./compile";
import { Code, ValueScope } from "./compile/codegen";
export type Options = CurrentOptions & DeprecatedOptions;
export interface CurrentOptions {
strict?: boolean | "log";
strictSchema?: boolean | "log";
strictNumbers?: boolean | "log";
strictTypes?: boolean | "log";
strictTuples?: boolean | "log";
strictRequired?: boolean | "log";
allowMatchingProperties?: boolean;
allowUnionTypes?: boolean;
validateFormats?: boolean;
$data?: boolean;
allErrors?: boolean;
verbose?: boolean;
discriminator?: boolean;
unicodeRegExp?: boolean;
timestamp?: "string" | "date";
parseDate?: boolean;
allowDate?: boolean;
specialNumbers?: "fast" | "null";
$comment?: true | ((comment: string, schemaPath?: string, rootSchema?: AnySchemaObject) => unknown);
formats?: {
[Name in string]?: Format;
};
keywords?: Vocabulary;
schemas?: AnySchema[] | {
[Key in string]?: AnySchema;
};
logger?: Logger | false;
loadSchema?: (uri: string) => Promise<AnySchemaObject>;
removeAdditional?: boolean | "all" | "failing";
useDefaults?: boolean | "empty";
coerceTypes?: boolean | "array";
next?: boolean;
unevaluated?: boolean;
dynamicRef?: boolean;
schemaId?: "id" | "$id";
jtd?: boolean;
meta?: SchemaObject | boolean;
defaultMeta?: string | AnySchemaObject;
validateSchema?: boolean | "log";
addUsedSchema?: boolean;
inlineRefs?: boolean | number;
passContext?: boolean;
loopRequired?: number;
loopEnum?: number;
ownProperties?: boolean;
multipleOfPrecision?: number;
int32range?: boolean;
messages?: boolean;
code?: CodeOptions;
uriResolver?: UriResolver;
}
export interface CodeOptions {
es5?: boolean;
esm?: boolean;
lines?: boolean;
optimize?: boolean | number;
formats?: Code;
source?: boolean;
process?: (code: string, schema?: SchemaEnv) => string;
regExp?: RegExpEngine;
}
interface InstanceCodeOptions extends CodeOptions {
regExp: RegExpEngine;
optimize: number;
}
interface DeprecatedOptions {
/** @deprecated */
ignoreKeywordsWithRef?: boolean;
/** @deprecated */
jsPropertySyntax?: boolean;
/** @deprecated */
unicode?: boolean;
}
type RequiredInstanceOptions = {
[K in "strictSchema" | "strictNumbers" | "strictTypes" | "strictTuples" | "strictRequired" | "inlineRefs" | "loopRequired" | "loopEnum" | "meta" | "messages" | "schemaId" | "addUsedSchema" | "validateSchema" | "validateFormats" | "int32range" | "unicodeRegExp" | "uriResolver"]: NonNullable<Options[K]>;
} & {
code: InstanceCodeOptions;
};
export type InstanceOptions = Options & RequiredInstanceOptions;
export interface Logger {
log(...args: unknown[]): unknown;
warn(...args: unknown[]): unknown;
error(...args: unknown[]): unknown;
}
export default class Ajv {
opts: InstanceOptions;
errors?: ErrorObject[] | null;
logger: Logger;
readonly scope: ValueScope;
readonly schemas: {
[Key in string]?: SchemaEnv;
};
readonly refs: {
[Ref in string]?: SchemaEnv | string;
};
readonly formats: {
[Name in string]?: AddedFormat;
};
readonly RULES: ValidationRules;
readonly _compilations: Set<SchemaEnv>;
private readonly _loading;
private readonly _cache;
private readonly _metaOpts;
static ValidationError: typeof ValidationError;
static MissingRefError: typeof MissingRefError;
constructor(opts?: Options);
_addVocabularies(): void;
_addDefaultMetaSchema(): void;
defaultMeta(): string | AnySchemaObject | undefined;
validate(schema: Schema | string, data: unknown): boolean;
validate(schemaKeyRef: AnySchema | string, data: unknown): boolean | Promise<unknown>;
validate<T>(schema: Schema | JSONSchemaType<T> | string, data: unknown): data is T;
validate<T>(schema: JTDSchemaType<T>, data: unknown): data is T;
validate<N extends never, T extends SomeJTDSchemaType>(schema: T, data: unknown): data is JTDDataType<T>;
validate<T>(schema: AsyncSchema, data: unknown | T): Promise<T>;
validate<T>(schemaKeyRef: AnySchema | string, data: unknown): data is T | Promise<T>;
compile<T = unknown>(schema: Schema | JSONSchemaType<T>, _meta?: boolean): ValidateFunction<T>;
compile<T = unknown>(schema: JTDSchemaType<T>, _meta?: boolean): ValidateFunction<T>;
compile<N extends never, T extends SomeJTDSchemaType>(schema: T, _meta?: boolean): ValidateFunction<JTDDataType<T>>;
compile<T = unknown>(schema: AsyncSchema, _meta?: boolean): AsyncValidateFunction<T>;
compile<T = unknown>(schema: AnySchema, _meta?: boolean): AnyValidateFunction<T>;
compileAsync<T = unknown>(schema: SchemaObject | JSONSchemaType<T>, _meta?: boolean): Promise<ValidateFunction<T>>;
compileAsync<T = unknown>(schema: JTDSchemaType<T>, _meta?: boolean): Promise<ValidateFunction<T>>;
compileAsync<T = unknown>(schema: AsyncSchema, meta?: boolean): Promise<AsyncValidateFunction<T>>;
compileAsync<T = unknown>(schema: AnySchemaObject, meta?: boolean): Promise<AnyValidateFunction<T>>;
addSchema(schema: AnySchema | AnySchema[], // If array is passed, `key` will be ignored
key?: string, // Optional schema key. Can be passed to `validate` method instead of schema object or id/ref. One schema per instance can have empty `id` and `key`.
_meta?: boolean, // true if schema is a meta-schema. Used internally, addMetaSchema should be used instead.
_validateSchema?: boolean | "log"): Ajv;
addMetaSchema(schema: AnySchemaObject, key?: string, // schema key
_validateSchema?: boolean | "log"): Ajv;
validateSchema(schema: AnySchema, throwOrLogError?: boolean): boolean | Promise<unknown>;
getSchema<T = unknown>(keyRef: string): AnyValidateFunction<T> | undefined;
removeSchema(schemaKeyRef?: AnySchema | string | RegExp): Ajv;
addVocabulary(definitions: Vocabulary): Ajv;
addKeyword(kwdOrDef: string | KeywordDefinition, def?: KeywordDefinition): Ajv;
getKeyword(keyword: string): AddedKeywordDefinition | boolean;
removeKeyword(keyword: string): Ajv;
addFormat(name: string, format: Format): Ajv;
errorsText(errors?: ErrorObject[] | null | undefined, // optional array of validation errors
{ separator, dataVar }?: ErrorsTextOptions): string;
$dataMetaSchema(metaSchema: AnySchemaObject, keywordsJsonPointers: string[]): AnySchemaObject;
private _removeAllSchemas;
_addSchema(schema: AnySchema, meta?: boolean, baseId?: string, validateSchema?: boolean | "log", addSchema?: boolean): SchemaEnv;
private _checkUnique;
private _compileSchemaEnv;
private _compileMetaSchema;
}
export interface ErrorsTextOptions {
separator?: string;
dataVar?: string;
}
@@ -0,0 +1,5 @@
import { _ as _default } from './colors-C__qRT83.js';
export { _default as default };
@@ -0,0 +1,110 @@
{
"name": "lightningcss",
"version": "1.32.0",
"license": "MPL-2.0",
"description": "A CSS parser, transformer, and minifier written in Rust",
"main": "node/index.js",
"types": "node/index.d.ts",
"exports": {
"types": "./node/index.d.ts",
"import": "./node/index.mjs",
"require": "./node/index.js"
},
"browserslist": "last 2 versions, not dead",
"targets": {
"main": false,
"types": false
},
"publishConfig": {
"access": "public"
},
"funding": {
"type": "opencollective",
"url": "https://opencollective.com/parcel"
},
"repository": {
"type": "git",
"url": "https://github.com/parcel-bundler/lightningcss.git"
},
"engines": {
"node": ">= 12.0.0"
},
"napi": {
"name": "lightningcss"
},
"files": [
"node/*.js",
"node/*.mjs",
"node/*.d.ts",
"node/*.flow"
],
"dependencies": {
"detect-libc": "^2.0.3"
},
"devDependencies": {
"@babel/parser": "7.21.4",
"@babel/traverse": "7.21.4",
"@codemirror/lang-css": "^6.0.1",
"@codemirror/lang-javascript": "^6.1.2",
"@codemirror/lint": "^6.1.0",
"@codemirror/theme-one-dark": "^6.1.0",
"@mdn/browser-compat-data": "~7.3.6",
"@napi-rs/cli": "^2.14.0",
"autoprefixer": "^10.4.27",
"caniuse-lite": "^1.0.30001777",
"codemirror": "^6.0.1",
"cssnano": "^7.0.6",
"esbuild": "^0.19.8",
"flowgen": "^1.21.0",
"jest-diff": "^27.4.2",
"json-schema-to-typescript": "^11.0.2",
"markdown-it-anchor": "^8.6.6",
"markdown-it-prism": "^2.3.0",
"markdown-it-table-of-contents": "^0.6.0",
"napi-wasm": "^1.0.1",
"node-fetch": "^3.1.0",
"parcel": "^2.8.2",
"patch-package": "^6.5.0",
"path-browserify": "^1.0.1",
"postcss": "^8.3.11",
"posthtml-include": "^1.7.4",
"posthtml-markdownit": "^1.3.1",
"posthtml-prism": "^1.0.4",
"process": "^0.11.10",
"puppeteer": "^12.0.1",
"recast": "^0.22.0",
"sharp": "^0.33.5",
"typescript": "^5.7.2",
"util": "^0.12.4",
"uvu": "^0.5.6"
},
"resolutions": {
"lightningcss": "link:."
},
"scripts": {
"prepare": "patch-package",
"build": "node scripts/build.js && node scripts/build-flow.js",
"build-release": "node scripts/build.js --release && node scripts/build-flow.js",
"prepublishOnly": "node scripts/build-flow.js",
"wasm:build": "cargo build --target wasm32-unknown-unknown -p lightningcss_node && wasm-opt target/wasm32-unknown-unknown/debug/lightningcss_node.wasm --asyncify --pass-arg=asyncify-imports@env.await_promise_sync -Oz -o wasm/lightningcss_node.wasm && node scripts/build-wasm.js",
"wasm:build-release": "cargo build --target wasm32-unknown-unknown -p lightningcss_node --release && wasm-opt target/wasm32-unknown-unknown/release/lightningcss_node.wasm --asyncify --pass-arg=asyncify-imports@env.await_promise_sync -Oz -o wasm/lightningcss_node.wasm && node scripts/build-wasm.js",
"website:start": "parcel 'website/*.html' website/playground/index.html",
"website:build": "yarn wasm:build-release && parcel build 'website/*.html' website/playground/index.html",
"build-ast": "cargo run --example schema --features jsonschema && node scripts/build-ast.js",
"tsc": "tsc -p node/tsconfig.json",
"test": "uvu node/test"
},
"optionalDependencies": {
"lightningcss-darwin-x64": "1.32.0",
"lightningcss-linux-x64-gnu": "1.32.0",
"lightningcss-win32-x64-msvc": "1.32.0",
"lightningcss-win32-arm64-msvc": "1.32.0",
"lightningcss-darwin-arm64": "1.32.0",
"lightningcss-linux-arm64-gnu": "1.32.0",
"lightningcss-linux-arm-gnueabihf": "1.32.0",
"lightningcss-linux-arm64-musl": "1.32.0",
"lightningcss-linux-x64-musl": "1.32.0",
"lightningcss-freebsd-x64": "1.32.0",
"lightningcss-android-arm64": "1.32.0"
}
}
@@ -0,0 +1,19 @@
import Level from "./Level.mjs";
function normalizeLevel(level) {
if (typeof level === "string") {
level = Level[level.toUpperCase()];
if (level === void 0) {
return;
}
return level;
}
if (typeof level === "number") {
if (Level[level] === void 0) {
return;
}
return level;
}
}
export {
normalizeLevel as default
};
@@ -0,0 +1,36 @@
// @ts-ignore TS6133
import { expect, test } from "vitest";
import * as z from "zod/v3";
const literalTuna = z.literal("tuna");
const literalFortyTwo = z.literal(42);
const literalTrue = z.literal(true);
const terrificSymbol = Symbol("terrific");
const literalTerrificSymbol = z.literal(terrificSymbol);
test("passing validations", () => {
literalTuna.parse("tuna");
literalFortyTwo.parse(42);
literalTrue.parse(true);
literalTerrificSymbol.parse(terrificSymbol);
});
test("failing validations", () => {
expect(() => literalTuna.parse("shark")).toThrow();
expect(() => literalFortyTwo.parse(43)).toThrow();
expect(() => literalTrue.parse(false)).toThrow();
expect(() => literalTerrificSymbol.parse(Symbol("terrific"))).toThrow();
});
test("invalid_literal should have `received` field with data", () => {
const data = "shark";
const result = literalTuna.safeParse(data);
if (!result.success) {
const issue = result.error.issues[0];
if (issue.code === "invalid_literal") {
expect(issue.received).toBe(data);
}
}
});
@@ -0,0 +1,6 @@
function mixImmediate(a, b) {
return (p) => (p > 0 ? b : a);
}
export { mixImmediate };
//# sourceMappingURL=immediate.mjs.map
@@ -0,0 +1,168 @@
Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
const require_http_exception = require("../../http-exception.js");
const require_utils_ipaddr = require("../../utils/ipaddr.js");
//#region src/middleware/ip-restriction/index.ts
const IS_CIDR_NOTATION_REGEX = /\/[^/]*$/;
const parseCidrPrefix = (rule, prefix, max) => {
if (!/^[0-9]{1,3}$/.test(prefix)) throw new TypeError(`Invalid rule: ${rule}`);
const parsedPrefix = parseInt(prefix);
if (parsedPrefix > max) throw new TypeError(`Invalid rule: ${rule}`);
return parsedPrefix;
};
const buildMatcher = (rules) => {
const functionRules = [];
const staticRules = /* @__PURE__ */ new Set();
const staticIPv4Rules = /* @__PURE__ */ new Set();
const staticIPv6Rules = /* @__PURE__ */ new Set();
const cidrRules = [];
const registerStaticRule = (rule) => {
const type = require_utils_ipaddr.distinctRemoteAddr(rule);
if (type === void 0) throw new TypeError(`Invalid rule: ${rule}`);
if (type === "IPv4") {
const ipv4binary = require_utils_ipaddr.convertIPv4ToBinary(rule);
staticRules.add(rule);
staticRules.add(`::ffff:${rule}`);
staticIPv4Rules.add(ipv4binary);
staticIPv6Rules.add(65535n << 32n | ipv4binary);
} else {
const ipv6binary = require_utils_ipaddr.convertIPv6ToBinary(rule);
const ipv6Addr = require_utils_ipaddr.convertIPv6BinaryToString(ipv6binary);
staticRules.add(ipv6Addr);
staticIPv6Rules.add(ipv6binary);
if (require_utils_ipaddr.isIPv4MappedIPv6(ipv6binary)) {
staticRules.add(ipv6Addr.substring(7));
staticIPv4Rules.add(require_utils_ipaddr.convertIPv4MappedIPv6ToIPv4(ipv6binary));
}
}
};
for (let rule of rules) if (rule === "*") return () => true;
else if (typeof rule === "function") functionRules.push(rule);
else {
if (IS_CIDR_NOTATION_REGEX.test(rule)) {
const separatedRule = rule.split("/");
const addrStr = separatedRule[0];
const type = require_utils_ipaddr.distinctRemoteAddr(addrStr);
if (type === void 0) throw new TypeError(`Invalid rule: ${rule}`);
let isIPv4 = type === "IPv4";
let prefix = parseCidrPrefix(rule, separatedRule[1], isIPv4 ? 32 : 128);
if (isIPv4 ? prefix === 32 : prefix === 128) rule = addrStr;
else {
let addr = (isIPv4 ? require_utils_ipaddr.convertIPv4ToBinary : require_utils_ipaddr.convertIPv6ToBinary)(addrStr);
if (type === "IPv6" && require_utils_ipaddr.isIPv4MappedIPv6(addr) && prefix >= 96) {
isIPv4 = true;
addr = require_utils_ipaddr.convertIPv4MappedIPv6ToIPv4(addr);
prefix -= 96;
}
const mask = (1n << BigInt(prefix)) - 1n << BigInt((isIPv4 ? 32 : 128) - prefix);
cidrRules.push([
isIPv4,
addr & mask,
mask
]);
continue;
}
}
registerStaticRule(rule);
}
return (remote) => {
if (staticRules.has(remote.addr)) return true;
const remoteAddr = remote.binaryAddr ||= (remote.isIPv4 ? require_utils_ipaddr.convertIPv4ToBinary : require_utils_ipaddr.convertIPv6ToBinary)(remote.addr);
const remoteIPv4Addr = remote.isIPv4 || require_utils_ipaddr.isIPv4MappedIPv6(remoteAddr) ? remote.isIPv4 ? remoteAddr : require_utils_ipaddr.convertIPv4MappedIPv6ToIPv4(remoteAddr) : void 0;
if ((remote.isIPv4 ? staticIPv4Rules : staticIPv6Rules).has(remoteAddr)) return true;
for (const [isIPv4, addr, mask] of cidrRules) {
if (isIPv4) {
if (remoteIPv4Addr === void 0) continue;
if ((remoteIPv4Addr & mask) === addr) return true;
continue;
}
if (remote.isIPv4) continue;
if ((remoteAddr & mask) === addr) return true;
}
for (const rule of functionRules) if (rule({
addr: remote.addr,
type: remote.type
})) return true;
return false;
};
};
/**
* IP Restriction Middleware for Hono.
*
* @see {@link https://hono.dev/docs/middleware/builtin/ip-restriction}
*
* @param {GetConnInfo | ((c: Context) => string)} getIP - A function to retrieve the client IP address. Use `getConnInfo` from the appropriate runtime adapter.
* @param {IPRestrictionRules} rules - An object with optional `denyList` and `allowList` arrays of IP rules. Each rule can be a static IP, a CIDR range, or a custom function.
* @param {(remote: { addr: string; type: AddressType }, c: Context) => Response | Promise<Response>} [onError] - Optional custom handler invoked when a request is blocked. Defaults to returning a 403 Forbidden response.
* @returns {MiddlewareHandler} The middleware handler function.
*
* @example
* ```ts
* import { Hono } from 'hono'
* import { ipRestriction } from 'hono/ip-restriction'
* import { getConnInfo } from 'hono/cloudflare-workers'
*
* const app = new Hono()
*
* app.use(
* '*',
* ipRestriction(getConnInfo, {
* // Block a specific IP and an entire subnet
* denyList: ['192.168.0.5', '10.0.0.0/8'],
* // Only allow requests from localhost and a private range
* allowList: ['127.0.0.1', '::1', '192.168.1.0/24'],
* })
* )
*
* // With a custom error handler
* app.use(
* '/admin/*',
* ipRestriction(
* getConnInfo,
* { allowList: ['203.0.113.0/24'] },
* (remote, c) => c.text(`Access denied for ${remote.addr}`, 403)
* )
* )
*
* app.get('/', (c) => c.text('Hello!'))
* ```
*/
const ipRestriction = (getIP, { denyList = [], allowList = [] }, onError) => {
const allowLength = allowList.length;
const denyMatcher = buildMatcher(denyList);
const allowMatcher = buildMatcher(allowList);
const blockError = (c) => new require_http_exception.HTTPException(403, { res: c.text("Forbidden", { status: 403 }) });
return async function ipRestriction(c, next) {
const connInfo = getIP(c);
const addr = typeof connInfo === "string" ? connInfo : connInfo.remote.address;
if (!addr) throw blockError(c);
const type = typeof connInfo !== "string" && connInfo.remote.addressType || require_utils_ipaddr.distinctRemoteAddr(addr);
const remoteData = {
addr,
type,
isIPv4: type === "IPv4"
};
try {
if (denyMatcher(remoteData)) {
if (onError) return onError({
addr,
type
}, c);
throw blockError(c);
}
if (allowMatcher(remoteData)) return await next();
} catch (e) {
if (e instanceof TypeError && e.code === "ERR_INVALID_IP_ADDRESS") throw blockError(c);
throw e;
}
if (allowLength === 0) return await next();
else {
if (onError) return await onError({
addr,
type
}, c);
throw blockError(c);
}
};
};
//#endregion
exports.ipRestriction = ipRestriction;
@@ -0,0 +1,7 @@
import { Readable } from '@tanstack/react-store';
import { GetStoreConfig } from '@tanstack/router-core';
declare module '@tanstack/router-core' {
interface RouterReadableStore<TValue> extends Readable<TValue> {
}
}
export declare const getStoreFactory: GetStoreConfig;
@@ -0,0 +1,9 @@
/**
* @license lucide-react v0.469.0 - ISC
*
* This source code is licensed under the ISC license.
* See the LICENSE file in the root directory of this source tree.
*/
export { default } from './lock-open.js';
//# sourceMappingURL=unlock.js.map
@@ -0,0 +1 @@
{"version":3,"file":"use-velocity.mjs","sources":["../../../src/value/use-velocity.ts"],"sourcesContent":["\"use client\"\n\nimport { frame, MotionValue } from \"motion-dom\"\nimport { useMotionValueEvent } from \"../utils/use-motion-value-event\"\nimport { useMotionValue } from \"./use-motion-value\"\n/**\n * Creates a `MotionValue` that updates when the velocity of the provided `MotionValue` changes.\n *\n * ```javascript\n * const x = useMotionValue(0)\n * const xVelocity = useVelocity(x)\n * const xAcceleration = useVelocity(xVelocity)\n * ```\n *\n * @public\n */\nexport function useVelocity(value: MotionValue<number>): MotionValue<number> {\n const velocity = useMotionValue(value.getVelocity())\n\n const updateVelocity = () => {\n const latest = value.getVelocity()\n velocity.set(latest)\n\n /**\n * If we still have velocity, schedule an update for the next frame\n * to keep checking until it is zero.\n */\n if (latest) frame.update(updateVelocity)\n }\n\n useMotionValueEvent(value, \"change\", () => {\n // Schedule an update to this value at the end of the current frame.\n frame.update(updateVelocity, false, true)\n })\n\n return velocity\n}\n"],"names":[],"mappings":";;;;;AAKA;;;;;;;;;;AAUG;AACG;;;AAIE;AACA;AAEA;;;AAGG;AACH;AAAY;AAChB;AAEA;;;AAGA;AAEA;AACJ;;"}
@@ -0,0 +1,80 @@
Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
//#region src/utils/mime.ts
/**
* @module
* MIME utility.
*/
const getMimeType = (filename, mimes = baseMimes) => {
const match = filename.match(/\.([a-zA-Z0-9]+?)$/);
if (!match) return;
return mimes[match[1].toLowerCase()];
};
const getExtension = (mimeType) => {
const baseType = mimeType.split(";", 1)[0].trim();
for (const ext in baseMimes) {
const stored = baseMimes[ext];
if (stored === mimeType || stored.split(";", 1)[0].trim() === baseType) return ext;
}
};
const baseMimes = {
aac: "audio/aac",
avi: "video/x-msvideo",
avif: "image/avif",
av1: "video/av1",
bin: "application/octet-stream",
bmp: "image/bmp",
css: "text/css; charset=utf-8",
csv: "text/csv; charset=utf-8",
eot: "application/vnd.ms-fontobject",
epub: "application/epub+zip",
gif: "image/gif",
gz: "application/gzip",
htm: "text/html; charset=utf-8",
html: "text/html; charset=utf-8",
ico: "image/x-icon",
ics: "text/calendar; charset=utf-8",
jpeg: "image/jpeg",
jpg: "image/jpeg",
js: "text/javascript; charset=utf-8",
json: "application/json",
jsonld: "application/ld+json",
map: "application/json",
mid: "audio/x-midi",
midi: "audio/x-midi",
mjs: "text/javascript; charset=utf-8",
mp3: "audio/mpeg",
mp4: "video/mp4",
mpeg: "video/mpeg",
oga: "audio/ogg",
ogv: "video/ogg",
ogx: "application/ogg",
opus: "audio/opus",
otf: "font/otf",
pdf: "application/pdf",
png: "image/png",
rtf: "application/rtf",
svg: "image/svg+xml; charset=utf-8",
tif: "image/tiff",
tiff: "image/tiff",
ts: "video/mp2t",
ttf: "font/ttf",
txt: "text/plain; charset=utf-8",
wasm: "application/wasm",
webm: "video/webm",
weba: "audio/webm",
webmanifest: "application/manifest+json",
webp: "image/webp",
woff: "font/woff",
woff2: "font/woff2",
xhtml: "application/xhtml+xml; charset=utf-8",
xml: "application/xml; charset=utf-8",
zip: "application/zip",
"3gp": "video/3gpp",
"3g2": "video/3gpp2",
gltf: "model/gltf+json",
glb: "model/gltf-binary"
};
//#endregion
exports.getExtension = getExtension;
exports.getMimeType = getMimeType;
exports.mimes = baseMimes;
@@ -0,0 +1 @@
{"version":3,"file":"auth.d.ts","sourceRoot":"","sources":["../../../src/shared/auth.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,CAAC,MAAM,QAAQ,CAAC;AAE5B;;GAEG;AACH,eAAO,MAAM,aAAa,UAmBrB,CAAC;AAEN;;GAEG;AACH,eAAO,MAAM,oCAAoC;;;;;;;;;;;;;;;iBAe/C,CAAC;AAEH;;GAEG;AACH,eAAO,MAAM,mBAAmB;;;;;;;;;;;;;;;;;;;;iBAoB9B,CAAC;AAEH;;;GAGG;AACH,eAAO,MAAM,4BAA4B;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;iBAqCvC,CAAC;AAEH;;;;GAIG;AACH,eAAO,MAAM,qCAAqC;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;iBAKhD,CAAC;AAEH;;GAEG;AACH,eAAO,MAAM,iBAAiB;;;;;;;;iBAclB,CAAC;AAEb;;GAEG;AACH,eAAO,MAAM,wBAAwB;;;;iBAInC,CAAC;AAEH;;GAEG;AACH,eAAO,MAAM,qBAAqB,mGAAwE,CAAC;AAE3G;;GAEG;AACH,eAAO,MAAM,yBAAyB;;;;;;;;;;;;;;;;;iBAmB1B,CAAC;AAEb;;GAEG;AACH,eAAO,MAAM,4BAA4B;;;;;;iBAY7B,CAAC;AAEb;;GAEG;AACH,eAAO,MAAM,gCAAgC;;;;;;;;;;;;;;;;;;;;;;iBAAgE,CAAC;AAE9G;;GAEG;AACH,eAAO,MAAM,kCAAkC;;;iBAKnC,CAAC;AAEb;;GAEG;AACH,eAAO,MAAM,iCAAiC;;;iBAKlC,CAAC;AAEb,MAAM,MAAM,aAAa,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,mBAAmB,CAAC,CAAC;AAChE,MAAM,MAAM,sBAAsB,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,4BAA4B,CAAC,CAAC;AAClF,MAAM,MAAM,+BAA+B,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,qCAAqC,CAAC,CAAC;AAEpG,MAAM,MAAM,WAAW,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,iBAAiB,CAAC,CAAC;AAC5D,MAAM,MAAM,kBAAkB,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,wBAAwB,CAAC,CAAC;AAC1E,MAAM,MAAM,mBAAmB,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,yBAAyB,CAAC,CAAC;AAC5E,MAAM,MAAM,sBAAsB,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,4BAA4B,CAAC,CAAC;AAClF,MAAM,MAAM,0BAA0B,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,gCAAgC,CAAC,CAAC;AAC1F,MAAM,MAAM,2BAA2B,GAAG,sBAAsB,GAAG,0BAA0B,CAAC;AAC9F,MAAM,MAAM,4BAA4B,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,kCAAkC,CAAC,CAAC;AAC9F,MAAM,MAAM,2BAA2B,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,iCAAiC,CAAC,CAAC;AAC5F,MAAM,MAAM,8BAA8B,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,oCAAoC,CAAC,CAAC;AAGlG,MAAM,MAAM,2BAA2B,GAAG,aAAa,GAAG,+BAA+B,CAAC"}
@@ -0,0 +1 @@
{"version":3,"file":"shovel.js","sources":["../../../src/icons/shovel.ts"],"sourcesContent":["import createLucideIcon from '../createLucideIcon';\n\n/**\n * @component @name Shovel\n * @description Lucide SVG icon component, renders SVG Element with children.\n *\n * @preview ![img](data:image/svg+xml;base64,PHN2ZyAgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIgogIHdpZHRoPSIyNCIKICBoZWlnaHQ9IjI0IgogIHZpZXdCb3g9IjAgMCAyNCAyNCIKICBmaWxsPSJub25lIgogIHN0cm9rZT0iIzAwMCIgc3R5bGU9ImJhY2tncm91bmQtY29sb3I6ICNmZmY7IGJvcmRlci1yYWRpdXM6IDJweCIKICBzdHJva2Utd2lkdGg9IjIiCiAgc3Ryb2tlLWxpbmVjYXA9InJvdW5kIgogIHN0cm9rZS1saW5lam9pbj0icm91bmQiCj4KICA8cGF0aCBkPSJNMiAyMnYtNWw1LTUgNSA1LTUgNXoiIC8+CiAgPHBhdGggZD0iTTkuNSAxNC41IDE2IDgiIC8+CiAgPHBhdGggZD0ibTE3IDIgNSA1LS41LjVhMy41MyAzLjUzIDAgMCAxLTUgMHMwIDAgMCAwYTMuNTMgMy41MyAwIDAgMSAwLTVMMTcgMiIgLz4KPC9zdmc+Cg==) - https://lucide.dev/icons/shovel\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 Shovel = createLucideIcon('Shovel', [\n ['path', { d: 'M2 22v-5l5-5 5 5-5 5z', key: '1fh25c' }],\n ['path', { d: 'M9.5 14.5 16 8', key: '1smz5x' }],\n [\n 'path',\n { d: 'm17 2 5 5-.5.5a3.53 3.53 0 0 1-5 0s0 0 0 0a3.53 3.53 0 0 1 0-5L17 2', key: '1q8uv5' },\n ],\n]);\n\nexport default Shovel;\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,CAAA,CACxC,CAAC,CAAA,CAAA,CAAA,CAAA,CAAA,CAAQ,CAAA,CAAA,CAAA,CAAE,GAAG,CAAyB,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAK,UAAU,CAAA,CAAA;AAAA,CAAA,CACtD,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,CAC/C,CAAA,CAAA;AAAA,CAAA,CAAA,CAAA,CACE,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA;AAAA,CACA,CAAA,CAAA,CAAA,CAAA,CAAE,CAAA,CAAG,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAuE,EAAA,CAAA,CAAA,CAAA,CAAA,CAAK,QAAS,CAAA,CAAA;AAAA,CAC5F,CAAA,CAAA;AACF,CAAC,CAAA,CAAA;;"}
@@ -0,0 +1 @@
{"version":3,"file":"audio-waveform.js","sources":["../../../src/icons/audio-waveform.ts"],"sourcesContent":["import createLucideIcon from '../createLucideIcon';\n\n/**\n * @component @name AudioWaveform\n * @description Lucide SVG icon component, renders SVG Element with children.\n *\n * @preview ![img](data:image/svg+xml;base64,PHN2ZyAgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIgogIHdpZHRoPSIyNCIKICBoZWlnaHQ9IjI0IgogIHZpZXdCb3g9IjAgMCAyNCAyNCIKICBmaWxsPSJub25lIgogIHN0cm9rZT0iIzAwMCIgc3R5bGU9ImJhY2tncm91bmQtY29sb3I6ICNmZmY7IGJvcmRlci1yYWRpdXM6IDJweCIKICBzdHJva2Utd2lkdGg9IjIiCiAgc3Ryb2tlLWxpbmVjYXA9InJvdW5kIgogIHN0cm9rZS1saW5lam9pbj0icm91bmQiCj4KICA8cGF0aCBkPSJNMiAxM2EyIDIgMCAwIDAgMi0yVjdhMiAyIDAgMCAxIDQgMHYxM2EyIDIgMCAwIDAgNCAwVjRhMiAyIDAgMCAxIDQgMHYxM2EyIDIgMCAwIDAgNCAwdi00YTIgMiAwIDAgMSAyLTIiIC8+Cjwvc3ZnPgo=) - https://lucide.dev/icons/audio-waveform\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 AudioWaveform = createLucideIcon('AudioWaveform', [\n [\n 'path',\n {\n d: 'M2 13a2 2 0 0 0 2-2V7a2 2 0 0 1 4 0v13a2 2 0 0 0 4 0V4a2 2 0 0 1 4 0v13a2 2 0 0 0 4 0v-4a2 2 0 0 1 2-2',\n key: '57tc96',\n },\n ],\n]);\n\nexport default AudioWaveform;\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,CACtD,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;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,80 @@
import { parseDef } from "../parseDef.js";
export const primitiveMappings = {
ZodString: "string",
ZodNumber: "number",
ZodBigInt: "integer",
ZodBoolean: "boolean",
ZodNull: "null",
};
export function parseUnionDef(def, refs) {
if (refs.target === "openApi3")
return asAnyOf(def, refs);
const options = def.options instanceof Map ? Array.from(def.options.values()) : def.options;
// This blocks tries to look ahead a bit to produce nicer looking schemas with type array instead of anyOf.
if (options.every((x) => x._def.typeName in primitiveMappings &&
(!x._def.checks || !x._def.checks.length))) {
// all types in union are primitive and lack checks, so might as well squash into {type: [...]}
const types = options.reduce((types, x) => {
const type = primitiveMappings[x._def.typeName]; //Can be safely casted due to row 43
return type && !types.includes(type) ? [...types, type] : types;
}, []);
return {
type: types.length > 1 ? types : types[0],
};
}
else if (options.every((x) => x._def.typeName === "ZodLiteral" && !x.description)) {
// all options literals
const types = options.reduce((acc, x) => {
const type = typeof x._def.value;
switch (type) {
case "string":
case "number":
case "boolean":
return [...acc, type];
case "bigint":
return [...acc, "integer"];
case "object":
if (x._def.value === null)
return [...acc, "null"];
case "symbol":
case "undefined":
case "function":
default:
return acc;
}
}, []);
if (types.length === options.length) {
// all the literals are primitive, as far as null can be considered primitive
const uniqueTypes = types.filter((x, i, a) => a.indexOf(x) === i);
return {
type: uniqueTypes.length > 1 ? uniqueTypes : uniqueTypes[0],
enum: options.reduce((acc, x) => {
return acc.includes(x._def.value) ? acc : [...acc, x._def.value];
}, []),
};
}
}
else if (options.every((x) => x._def.typeName === "ZodEnum")) {
return {
type: "string",
enum: options.reduce((acc, x) => [
...acc,
...x._def.values.filter((x) => !acc.includes(x)),
], []),
};
}
return asAnyOf(def, refs);
}
const asAnyOf = (def, refs) => {
const anyOf = (def.options instanceof Map
? Array.from(def.options.values())
: def.options)
.map((x, i) => parseDef(x._def, {
...refs,
currentPath: [...refs.currentPath, "anyOf", `${i}`],
}))
.filter((x) => !!x &&
(!refs.strictUnions ||
(typeof x === "object" && Object.keys(x).length > 0)));
return anyOf.length ? { anyOf } : undefined;
};
@@ -0,0 +1,6 @@
/*
* Load this dynamically so that it
* doesn't appear in the rollup bundle.
*/
module.exports.features = require('../../data/features')
@@ -0,0 +1 @@
{"version":3,"file":"path.cjs","names":[],"sources":["../../src/path.ts"],"sourcesContent":["import { isServer } from '@tanstack/router-core/isServer'\nimport { last } from './utils'\nimport {\n SEGMENT_TYPE_OPTIONAL_PARAM,\n SEGMENT_TYPE_PARAM,\n SEGMENT_TYPE_PATHNAME,\n SEGMENT_TYPE_WILDCARD,\n parseSegment,\n} from './new-process-route-tree'\nimport type { LRUCache } from './lru-cache'\n\n/** Join path segments, cleaning duplicate slashes between parts. */\nexport function joinPaths(paths: Array<string | undefined>) {\n return cleanPath(\n paths\n .filter((val) => {\n return val !== undefined\n })\n .join('/'),\n )\n}\n\n/** Remove repeated slashes from a path string. */\nexport function cleanPath(path: string) {\n // remove double slashes\n return path.replace(/\\/{2,}/g, '/')\n}\n\n/** Trim leading slashes (except preserving root '/'). */\nexport function trimPathLeft(path: string) {\n return path === '/' ? path : path.replace(/^\\/{1,}/, '')\n}\n\n/** Trim trailing slashes (except preserving root '/'). */\nexport function trimPathRight(path: string) {\n const len = path.length\n return len > 1 && path[len - 1] === '/' ? path.replace(/\\/{1,}$/, '') : path\n}\n\n/** Trim both leading and trailing slashes. */\nexport function trimPath(path: string) {\n return trimPathRight(trimPathLeft(path))\n}\n\n/** Remove a trailing slash from value when appropriate for comparisons. */\nexport function removeTrailingSlash(value: string, basepath: string): string {\n if (value?.endsWith('/') && value !== '/' && value !== `${basepath}/`) {\n return value.slice(0, -1)\n }\n return value\n}\n\n// intended to only compare path name\n// see the usage in the isActive under useLinkProps\n// /sample/path1 = /sample/path1/\n// /sample/path1/some <> /sample/path1\n/**\n * Compare two pathnames for exact equality after normalizing trailing slashes\n * relative to the provided `basepath`.\n */\nexport function exactPathTest(\n pathName1: string,\n pathName2: string,\n basepath: string,\n): boolean {\n return (\n removeTrailingSlash(pathName1, basepath) ===\n removeTrailingSlash(pathName2, basepath)\n )\n}\n\n// When resolving relative paths, we treat all paths as if they are trailing slash\n// documents. All trailing slashes are removed after the path is resolved.\n// Here are a few examples:\n//\n// /a/b/c + ./d = /a/b/c/d\n// /a/b/c + ../d = /a/b/d\n// /a/b/c + ./d/ = /a/b/c/d\n// /a/b/c + ../d/ = /a/b/d\n// /a/b/c + ./ = /a/b/c\n//\n// Absolute paths that start with `/` short circuit the resolution process to the root\n// path.\n//\n// Here are some examples:\n//\n// /a/b/c + /d = /d\n// /a/b/c + /d/ = /d\n// /a/b/c + / = /\n//\n// Non-.-prefixed paths are still treated as relative paths, resolved like `./`\n//\n// Here are some examples:\n//\n// /a/b/c + d = /a/b/c/d\n// /a/b/c + d/ = /a/b/c/d\n// /a/b/c + d/e = /a/b/c/d/e\ninterface ResolvePathOptions {\n base: string\n to: string\n trailingSlash?: 'always' | 'never' | 'preserve'\n cache?: LRUCache<string, string>\n}\n\n/**\n * Resolve a destination path against a base, honoring trailing-slash policy\n * and supporting relative segments (`.`/`..`) and absolute `to` values.\n */\nexport function resolvePath({\n base,\n to,\n trailingSlash = 'never',\n cache,\n}: ResolvePathOptions) {\n const isAbsolute = to.startsWith('/')\n const isBase = !isAbsolute && to === '.'\n\n let key\n if (cache) {\n // `trailingSlash` is static per router, so it doesn't need to be part of the cache key\n key = isAbsolute ? to : isBase ? base : base + '\\0' + to\n const cached = cache.get(key)\n if (cached) return cached\n }\n\n let baseSegments: Array<string>\n if (isBase) {\n baseSegments = base.split('/')\n } else if (isAbsolute) {\n baseSegments = to.split('/')\n } else {\n baseSegments = base.split('/')\n while (baseSegments.length > 1 && last(baseSegments) === '') {\n baseSegments.pop()\n }\n\n const toSegments = to.split('/')\n for (let index = 0, length = toSegments.length; index < length; index++) {\n const value = toSegments[index]!\n if (value === '') {\n if (!index) {\n // Leading slash\n baseSegments = [value]\n } else if (index === length - 1) {\n // Trailing Slash\n baseSegments.push(value)\n } else {\n // ignore inter-slashes\n }\n } else if (value === '..') {\n baseSegments.pop()\n } else if (value === '.') {\n // ignore\n } else {\n baseSegments.push(value)\n }\n }\n }\n\n if (baseSegments.length > 1) {\n if (last(baseSegments) === '') {\n if (trailingSlash === 'never') {\n baseSegments.pop()\n }\n } else if (trailingSlash === 'always') {\n baseSegments.push('')\n }\n }\n\n const result = cleanPath(baseSegments.join('/')) || '/'\n if (key && cache) cache.set(key, result)\n return result\n}\n\n/**\n * Create a pLine truncated
@@ -0,0 +1 @@
module.exports={A:{A:{"2":"_E"},B:{"2":"_XH _ZT _i","513":"_FB _7K"},C:{"1":"_8M _LD _HO","2":"_PL _YH _9S _p _L","322":"_TC _KD _oC w x"},D:{"2":"_H _9E _ZT _l","130":"_lI","513":"_aC _mL _1E","578":"_BG p"},E:{"1":"_YE","2":"_7J"},F:{"2":"_mU _gU","513":"_H xB zB _kD"},G:{"1":"sD _TD","2":"_IF qD rD"},H:{"2":"1D"},I:{"2":"_P"},J:{"2":"_B"},K:{"2":"_N"},L:{"2":"I"},M:{"1":"YC"},N:{"2":"_A"},O:{"2":"bC"},P:{"2":"_F"},Q:{"2":"JE"},R:{"2":"KE"},S:{"1":"ME","322":"LE"}},B:7,C:"FIDO U2F API",D:true};
@@ -0,0 +1,142 @@
"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;
};
Object.defineProperty(exports, "__esModule", { value: true });
exports.default = default_1;
const util = __importStar(require("../core/util.cjs"));
const error = () => {
const Sizable = {
string: { unit: "tekens", verb: "heeft" },
file: { unit: "bytes", verb: "heeft" },
array: { unit: "elementen", verb: "heeft" },
set: { unit: "elementen", verb: "heeft" },
map: { unit: "elementen", verb: "heeft" },
};
function getSizing(origin) {
return Sizable[origin] ?? null;
}
const FormatDictionary = {
regex: "invoer",
email: "emailadres",
url: "URL",
emoji: "emoji",
uuid: "UUID",
uuidv4: "UUIDv4",
uuidv6: "UUIDv6",
nanoid: "nanoid",
guid: "GUID",
cuid: "cuid",
cuid2: "cuid2",
ulid: "ULID",
xid: "XID",
ksuid: "KSUID",
datetime: "ISO datum en tijd",
date: "ISO datum",
time: "ISO tijd",
duration: "ISO duur",
ipv4: "IPv4-adres",
ipv6: "IPv6-adres",
mac: "MAC-adres",
cidrv4: "IPv4-bereik",
cidrv6: "IPv6-bereik",
base64: "base64-gecodeerde tekst",
base64url: "base64 URL-gecodeerde tekst",
json_string: "JSON string",
e164: "E.164-nummer",
credit_card: "creditcardnummer",
currency_code: "valutacode",
iban: "IBAN",
jwt: "JWT",
template_literal: "invoer",
};
const TypeDictionary = {
nan: "NaN",
number: "getal",
};
return (issue) => {
switch (issue.code) {
case "invalid_type": {
const expected = TypeDictionary[issue.expected] ?? issue.expected;
const receivedType = util.parsedType(issue.input);
const received = TypeDictionary[receivedType] ?? receivedType;
if (/^[A-Z]/.test(issue.expected)) {
return `Ongeldige invoer: verwacht instanceof ${issue.expected}, ontving ${received}`;
}
return `Ongeldige invoer: verwacht ${expected}, ontving ${received}`;
}
case "invalid_value":
if (issue.values.length === 1)
return `Ongeldige invoer: verwacht ${util.stringifyPrimitive(issue.values[0])}`;
return `Ongeldige optie: verwacht één van ${util.joinValues(issue.values, "|")}`;
case "too_big": {
const adj = issue.inclusive ? "<=" : "<";
const sizing = getSizing(issue.origin);
const longName = issue.origin === "date" ? "laat" : issue.origin === "string" ? "lang" : "groot";
if (sizing)
return `Te ${longName}: verwacht dat ${issue.origin ?? "waarde"} ${adj}${issue.maximum.toString()} ${sizing.unit ?? "elementen"} ${sizing.verb}`;
return `Te ${longName}: verwacht dat ${issue.origin ?? "waarde"} ${adj}${issue.maximum.toString()} is`;
}
case "too_small": {
const adj = issue.inclusive ? ">=" : ">";
const sizing = getSizing(issue.origin);
const shortName = issue.origin === "date" ? "vroeg" : issue.origin === "string" ? "kort" : "klein";
if (sizing) {
return `Te ${shortName}: verwacht dat ${issue.origin} ${adj}${issue.minimum.toString()} ${sizing.unit} ${sizing.verb}`;
}
return `Te ${shortName}: verwacht dat ${issue.origin} ${adj}${issue.minimum.toString()} is`;
}
case "invalid_format": {
const _issue = issue;
if (_issue.format === "starts_with") {
return `Ongeldige tekst: moet met "${_issue.prefix}" beginnen`;
}
if (_issue.format === "ends_with")
return `Ongeldige tekst: moet op "${_issue.suffix}" eindigen`;
if (_issue.format === "includes")
return `Ongeldige tekst: moet "${_issue.includes}" bevatten`;
if (_issue.format === "regex")
return `Ongeldige tekst: moet overeenkomen met patroon ${_issue.pattern}`;
return `Ongeldig: ${FormatDictionary[_issue.format] ?? issue.format}`;
}
case "not_multiple_of":
return `Ongeldig getal: moet een veelvoud van ${issue.divisor} zijn`;
case "unrecognized_keys":
return `Onbekende key${issue.keys.length > 1 ? "s" : ""}: ${util.joinValues(issue.keys, ", ")}`;
case "invalid_key":
return `Ongeldige key in ${issue.origin}`;
case "invalid_union":
return "Ongeldige invoer";
case "invalid_element":
return `Ongeldige waarde in ${issue.origin}`;
default:
return `Ongeldige invoer`;
}
};
};
function default_1() {
return {
localeError: error(),
};
}
module.exports = exports.default;
@@ -0,0 +1 @@
{"version":3,"file":"grab.js","sources":["../../../src/icons/grab.ts"],"sourcesContent":["import createLucideIcon from '../createLucideIcon';\n\n/**\n * @component @name Grab\n * @description Lucide SVG icon component, renders SVG Element with children.\n *\n * @preview ![img](data:image/svg+xml;base64,PHN2ZyAgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIgogIHdpZHRoPSIyNCIKICBoZWlnaHQ9IjI0IgogIHZpZXdCb3g9IjAgMCAyNCAyNCIKICBmaWxsPSJub25lIgogIHN0cm9rZT0iIzAwMCIgc3R5bGU9ImJhY2tncm91bmQtY29sb3I6ICNmZmY7IGJvcmRlci1yYWRpdXM6IDJweCIKICBzdHJva2Utd2lkdGg9IjIiCiAgc3Ryb2tlLWxpbmVjYXA9InJvdW5kIgogIHN0cm9rZS1saW5lam9pbj0icm91bmQiCj4KICA8cGF0aCBkPSJNMTggMTEuNVY5YTIgMiAwIDAgMC0yLTJhMiAyIDAgMCAwLTIgMnYxLjQiIC8+CiAgPHBhdGggZD0iTTE0IDEwVjhhMiAyIDAgMCAwLTItMmEyIDIgMCAwIDAtMiAydjIiIC8+CiAgPHBhdGggZD0iTTEwIDkuOVY5YTIgMiAwIDAgMC0yLTJhMiAyIDAgMCAwLTIgMnY1IiAvPgogIDxwYXRoIGQ9Ik02IDE0YTIgMiAwIDAgMC0yLTJhMiAyIDAgMCAwLTIgMiIgLz4KICA8cGF0aCBkPSJNMTggMTFhMiAyIDAgMSAxIDQgMHYzYTggOCAwIDAgMS04IDhoLTRhOCA4IDAgMCAxLTgtOCAyIDIgMCAxIDEgNCAwIiAvPgo8L3N2Zz4K) - https://lucide.dev/icons/grab\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 Grab = createLucideIcon('Grab', [\n ['path', { d: 'M18 11.5V9a2 2 0 0 0-2-2a2 2 0 0 0-2 2v1.4', key: 'edstyy' }],\n ['path', { d: 'M14 10V8a2 2 0 0 0-2-2a2 2 0 0 0-2 2v2', key: '19wdwo' }],\n ['path', { d: 'M10 9.9V9a2 2 0 0 0-2-2a2 2 0 0 0-2 2v5', key: '1lugqo' }],\n ['path', { d: 'M6 14a2 2 0 0 0-2-2a2 2 0 0 0-2 2', key: '1hbeus' }],\n [\n 'path',\n { d: 'M18 11a2 2 0 1 1 4 0v3a8 8 0 0 1-8 8h-4a8 8 0 0 1-8-8 2 2 0 1 1 4 0', key: '1etffm' },\n ],\n]);\n\nexport default Grab;\n"],"names":[],"mappings":";;;;;;;;;AAaM,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAO,iBAAiB,MAAQ,CAAA,CAAA,CAAA;AAAA,CAAA,CACpC,CAAC,CAAA,CAAA,CAAA,CAAA,CAAA,CAAQ,CAAA,CAAA,CAAA,CAAE,GAAG,CAA8C,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAK,UAAU,CAAA,CAAA;AAAA,CAAA,CAC3E,CAAC,CAAA,CAAA,CAAA,CAAA,CAAA,CAAQ,CAAA,CAAA,CAAA,CAAE,GAAG,CAA0C,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAK,UAAU,CAAA,CAAA;AAAA,CAAA,CACvE,CAAC,CAAA,CAAA,CAAA,CAAA,CAAA,CAAQ,CAAA,CAAA,CAAA,CAAE,GAAG,CAA2C,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAK,UAAU,CAAA,CAAA;AAAA,CAAA,CACxE,CAAC,CAAA,CAAA,CAAA,CAAA,CAAA,CAAQ,CAAA,CAAA,CAAA,CAAE,GAAG,CAAqC,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,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,CAClE,CAAA,CAAA;AAAA,CAAA,CAAA,CAAA,CACE,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA;AAAA,CACA,CAAA,CAAA,CAAA,CAAA,CAAE,CAAA,CAAG,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAuE,EAAA,CAAA,CAAA,CAAA,CAAA,CAAK,QAAS,CAAA,CAAA;AAAA,CAC5F,CAAA,CAAA;AACF,CAAC,CAAA,CAAA;;"}
@@ -0,0 +1,9 @@
/**
* @license lucide-react v0.469.0 - ISC
*
* This source code is licensed under the ISC license.
* See the LICENSE file in the root directory of this source tree.
*/
export { default } from './arrow-up-0-1.js';
//# sourceMappingURL=arrow-up-01.js.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 UserRoundCheck = createLucideIcon("UserRoundCheck", [
["path", { d: "M2 21a8 8 0 0 1 13.292-6", key: "bjp14o" }],
["circle", { cx: "10", cy: "8", r: "5", key: "o932ke" }],
["path", { d: "m16 19 2 2 4-4", key: "1b14m6" }]
]);
export { UserRoundCheck as default };
//# sourceMappingURL=user-round-check.js.map
@@ -0,0 +1 @@
{"version":3,"file":"hard-drive-download.js","sources":["../../../src/icons/hard-drive-download.ts"],"sourcesContent":["import createLucideIcon from '../createLucideIcon';\n\n/**\n * @component @name HardDriveDownload\n * @description Lucide SVG icon component, renders SVG Element with children.\n *\n * @preview ![img](data:image/svg+xml;base64,PHN2ZyAgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIgogIHdpZHRoPSIyNCIKICBoZWlnaHQ9IjI0IgogIHZpZXdCb3g9IjAgMCAyNCAyNCIKICBmaWxsPSJub25lIgogIHN0cm9rZT0iIzAwMCIgc3R5bGU9ImJhY2tncm91bmQtY29sb3I6ICNmZmY7IGJvcmRlci1yYWRpdXM6IDJweCIKICBzdHJva2Utd2lkdGg9IjIiCiAgc3Ryb2tlLWxpbmVjYXA9InJvdW5kIgogIHN0cm9rZS1saW5lam9pbj0icm91bmQiCj4KICA8cGF0aCBkPSJNMTIgMnY4IiAvPgogIDxwYXRoIGQ9Im0xNiA2LTQgNC00LTQiIC8+CiAgPHJlY3Qgd2lkdGg9IjIwIiBoZWlnaHQ9IjgiIHg9IjIiIHk9IjE0IiByeD0iMiIgLz4KICA8cGF0aCBkPSJNNiAxOGguMDEiIC8+CiAgPHBhdGggZD0iTTEwIDE4aC4wMSIgLz4KPC9zdmc+Cg==) - https://lucide.dev/icons/hard-drive-download\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 HardDriveDownload = createLucideIcon('HardDriveDownload', [\n ['path', { d: 'M12 2v8', key: '1q4o3n' }],\n ['path', { d: 'm16 6-4 4-4-4', key: '6wukr' }],\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 HardDriveDownload;\n"],"names":[],"mappings":";;;;;;;;;AAaM,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAoB,iBAAiB,mBAAqB,CAAA,CAAA,CAAA;AAAA,CAAA,CAC9D,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,CAAA;AAAA,CAAA,CACxC,CAAC,CAAA,CAAA,CAAA,CAAA,CAAA,CAAQ,CAAA,CAAA,CAAA,CAAE,GAAG,CAAiB,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAK,SAAS,CAAA,CAAA;AAAA,CAAA,CAC7C,CAAC,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAQ,CAAA,CAAA,CAAE,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAO,MAAM,CAAQ,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAK,CAAG,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAK,GAAG,CAAM,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAI,CAAK,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAK,UAAU,CAAA,CAAA;AAAA,CAAA,CAC9E,CAAC,CAAA,CAAA,CAAA,CAAA,CAAA,CAAQ,CAAA,CAAA,CAAA,CAAE,GAAG,CAAa,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAK,UAAU,CAAA,CAAA;AAAA,CAAA,CAC1C,CAAC,CAAA,CAAA,CAAA,CAAA,CAAA,CAAQ,CAAA,CAAA,CAAA,CAAE,GAAG,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,32 @@
/**
* @typedef {import('estree').Node} Node
* @typedef {import('./sync.js').SyncHandler} SyncHandler
* @typedef {import('./async.js').AsyncHandler} AsyncHandler
*/
/**
* @param {Node} ast
* @param {{
* enter?: SyncHandler
* leave?: SyncHandler
* }} walker
* @returns {Node | null}
*/
export function walk(ast: Node, { enter, leave }: {
enter?: SyncHandler;
leave?: SyncHandler;
}): Node | null;
/**
* @param {Node} ast
* @param {{
* enter?: AsyncHandler
* leave?: AsyncHandler
* }} walker
* @returns {Promise<Node | null>}
*/
export function asyncWalk(ast: Node, { enter, leave }: {
enter?: AsyncHandler;
leave?: AsyncHandler;
}): Promise<Node | null>;
export type Node = import('estree').Node;
export type SyncHandler = import('./sync.js').SyncHandler;
export type AsyncHandler = import('./async.js').AsyncHandler;