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,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 CirclePlay = createLucideIcon("CirclePlay", [
["circle", { cx: "12", cy: "12", r: "10", key: "1mglay" }],
["polygon", { points: "10 8 16 12 10 16 10 8", key: "1cimsy" }]
]);
export { CirclePlay as default };
//# sourceMappingURL=circle-play.js.map
@@ -0,0 +1,24 @@
let urlAlphabet =
'useandom-26T198340PX75pxJACKVERYMINDBUSHWOLF_GQZbfghjklqvwyzrict'
let customAlphabet = (alphabet, defaultSize = 21) => {
return (size = defaultSize) => {
let id = ''
let i = size | 0
while (i-- > 0) {
id += alphabet[(Math.random() * alphabet.length) | 0]
}
return id
}
}
let nanoid = (size = 21) => {
let id = ''
let i = size | 0
while (i-- > 0) {
id += urlAlphabet[(Math.random() * 64) | 0]
}
return id
}
export { nanoid, customAlphabet }
@@ -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 Pilcrow = createLucideIcon("Pilcrow", [
["path", { d: "M13 4v16", key: "8vvj80" }],
["path", { d: "M17 4v16", key: "7dpous" }],
["path", { d: "M19 4H9.5a4.5 4.5 0 0 0 0 9H13", key: "sh4n9v" }]
]);
export { Pilcrow as default };
//# sourceMappingURL=pilcrow.js.map
@@ -0,0 +1,2 @@
import type { LibDefinition } from '../variable';
export declare const es2018_asyncgenerator: LibDefinition;
@@ -0,0 +1,54 @@
import utils from '../../../../scoring/utils'
import {
START_UPPER,
END_UPPER,
ALL_UPPER_INVERTED,
ALL_LOWER_INVERTED,
ONE_LOWER,
ONE_UPPER,
ALPHA_INVERTED,
} from '../../../../data/const'
const getVariations = (cleanedWord: string) => {
const wordArray = cleanedWord.split('')
const upperCaseCount = wordArray.filter((char) =>
char.match(ONE_UPPER),
).length
const lowerCaseCount = wordArray.filter((char) =>
char.match(ONE_LOWER),
).length
let variations = 0
const variationLength = Math.min(upperCaseCount, lowerCaseCount)
for (let i = 1; i <= variationLength; i += 1) {
variations += utils.nCk(upperCaseCount + lowerCaseCount, i)
}
return variations
}
export default (word: string) => {
// clean words of non alpha characters to remove the reward effekt to capitalize the first letter https://github.com/dropbox/zxcvbn/issues/232
const cleanedWord = word.replace(ALPHA_INVERTED, '')
if (
cleanedWord.match(ALL_LOWER_INVERTED) ||
cleanedWord.toLowerCase() === cleanedWord
) {
return 1
}
// a capitalized word is the most common capitalization scheme,
// so it only doubles the search space (uncapitalized + capitalized).
// all caps and end-capitalized are common enough too, underestimate as 2x factor to be safe.
const commonCases = [START_UPPER, END_UPPER, ALL_UPPER_INVERTED]
const commonCasesLength = commonCases.length
for (let i = 0; i < commonCasesLength; i += 1) {
const regex = commonCases[i]
if (cleanedWord.match(regex)) {
return 2
}
}
// otherwise calculate the number of ways to capitalize U+L uppercase+lowercase letters
// with U uppercase letters or less. or, if there's more uppercase than lower (for eg. PASSwORD),
// the number of ways to lowercase U+L letters with L lowercase letters or less.
return getVariations(cleanedWord)
}
@@ -0,0 +1,91 @@
/**
* @fileoverview A rule to suggest using of the spread operator instead of `.apply()`.
* @author Toru Nagashima
*/
"use strict";
const astUtils = require("./utils/ast-utils");
//------------------------------------------------------------------------------
// Helpers
//------------------------------------------------------------------------------
/**
* Checks whether or not a node is a `.apply()` for variadic.
* @param {ASTNode} node A CallExpression node to check.
* @returns {boolean} Whether or not the node is a `.apply()` for variadic.
*/
function isVariadicApplyCalling(node) {
return (
astUtils.isSpecificMemberAccess(node.callee, null, "apply") &&
node.arguments.length === 2 &&
node.arguments[1].type !== "ArrayExpression" &&
node.arguments[1].type !== "SpreadElement"
);
}
/**
* Checks whether or not `thisArg` is not changed by `.apply()`.
* @param {ASTNode|null} expectedThis The node that is the owner of the applied function.
* @param {ASTNode} thisArg The node that is given to the first argument of the `.apply()`.
* @param {RuleContext} context The ESLint rule context object.
* @returns {boolean} Whether or not `thisArg` is not changed by `.apply()`.
*/
function isValidThisArg(expectedThis, thisArg, context) {
if (!expectedThis) {
return astUtils.isNullOrUndefined(thisArg);
}
return astUtils.equalTokens(expectedThis, thisArg, context);
}
//------------------------------------------------------------------------------
// Rule Definition
//------------------------------------------------------------------------------
/** @type {import('../types').Rule.RuleModule} */
module.exports = {
meta: {
type: "suggestion",
docs: {
description: "Require spread operators instead of `.apply()`",
recommended: false,
frozen: true,
url: "https://eslint.org/docs/latest/rules/prefer-spread",
},
schema: [],
fixable: null,
messages: {
preferSpread: "Use the spread operator instead of '.apply()'.",
},
},
create(context) {
const sourceCode = context.sourceCode;
return {
CallExpression(node) {
if (!isVariadicApplyCalling(node)) {
return;
}
const applied = astUtils.skipChainExpression(
astUtils.skipChainExpression(node.callee).object,
);
const expectedThis =
applied.type === "MemberExpression" ? applied.object : null;
const thisArg = node.arguments[0];
if (isValidThisArg(expectedThis, thisArg, sourceCode)) {
context.report({
node,
messageId: "preferSpread",
});
}
},
};
},
};
@@ -0,0 +1,20 @@
/**
* @license lucide-react v0.469.0 - ISC
*
* This source code is licensed under the ISC license.
* See the LICENSE file in the root directory of this source tree.
*/
import createLucideIcon from '../createLucideIcon.js';
const CaptionsOff = createLucideIcon("CaptionsOff", [
["path", { d: "M10.5 5H19a2 2 0 0 1 2 2v8.5", key: "jqtk4d" }],
["path", { d: "M17 11h-.5", key: "1961ue" }],
["path", { d: "M19 19H5a2 2 0 0 1-2-2V7a2 2 0 0 1 2-2", key: "1keqsi" }],
["path", { d: "m2 2 20 20", key: "1ooewy" }],
["path", { d: "M7 11h4", key: "1o1z6v" }],
["path", { d: "M7 15h2.5", key: "1ina1g" }]
]);
export { CaptionsOff as default };
//# sourceMappingURL=captions-off.js.map
@@ -0,0 +1,93 @@
'use strict'
/** @typedef {`node:${string}`} NodeModuleName */
/** @type {Record<NodeModuleName, () => any>} */
const lazyLoaders = {
__proto__: null,
'node:crypto': () => require('node:crypto'),
'node:sqlite': () => require('node:sqlite')
}
/**
* @param {NodeModuleName} moduleName
* @returns {boolean}
*/
function detectRuntimeFeatureByNodeModule (moduleName) {
try {
lazyLoaders[moduleName]()
return true
} catch (err) {
if (err.code !== 'ERR_UNKNOWN_BUILTIN_MODULE' && err.code !== 'ERR_NO_CRYPTO') {
throw err
}
return false
}
}
const runtimeFeaturesAsNodeModule = /** @type {const} */ (['crypto', 'sqlite'])
/** @typedef {typeof runtimeFeaturesAsNodeModule[number]} RuntimeFeatureByNodeModule */
/** @typedef {RuntimeFeatureByNodeModule} Feature */
/**
* @param {Feature} feature
* @returns {boolean}
*/
function detectRuntimeFeature (feature) {
if (runtimeFeaturesAsNodeModule.includes(/** @type {RuntimeFeatureByNodeModule} */ (feature))) {
return detectRuntimeFeatureByNodeModule(`node:${feature}`)
}
throw new TypeError(`unknown feature: ${feature}`)
}
/**
* @class
* @name RuntimeFeatures
*/
class RuntimeFeatures {
/** @type {Map<Feature, boolean>} */
#map = new Map()
/**
* Clears all cached feature detections.
*/
clear () {
this.#map.clear()
}
/**
* @param {Feature} feature
* @returns {boolean}
*/
has (feature) {
return (
this.#map.get(feature) ?? this.#detectRuntimeFeature(feature)
)
}
/**
* @param {Feature} feature
* @param {boolean} value
*/
set (feature, value) {
if (runtimeFeaturesAsNodeModule.includes(feature) === false) {
throw new TypeError(`unknown feature: ${feature}`)
}
this.#map.set(feature, value)
}
/**
* @param {Feature} feature
* @returns {boolean}
*/
#detectRuntimeFeature (feature) {
const result = detectRuntimeFeature(feature)
this.#map.set(feature, result)
return result
}
}
const instance = new RuntimeFeatures()
module.exports.runtimeFeatures = instance
module.exports.default = instance
@@ -0,0 +1,39 @@
/**
* @fileoverview Expose out ESLint and CLI to require.
* @author Ian Christian Myers
*/
"use strict";
//-----------------------------------------------------------------------------
// Requirements
//-----------------------------------------------------------------------------
const { ESLint } = require("./eslint/eslint");
const { Linter } = require("./linter");
const { RuleTester } = require("./rule-tester");
const { SourceCode } = require("./languages/js/source-code");
//-----------------------------------------------------------------------------
// Functions
//-----------------------------------------------------------------------------
/**
* Loads the correct `ESLint` constructor.
* @returns {Promise<ESLint>} The ESLint constructor.
*/
async function loadESLint() {
return ESLint;
}
//-----------------------------------------------------------------------------
// Exports
//-----------------------------------------------------------------------------
module.exports = {
Linter,
loadESLint,
ESLint,
RuleTester,
SourceCode,
};
@@ -0,0 +1 @@
{"version":3,"file":"a-arrow-up.js","sources":["../../../src/icons/a-arrow-up.ts"],"sourcesContent":["import createLucideIcon from '../createLucideIcon';\n\n/**\n * @component @name AArrowUp\n * @description Lucide SVG icon component, renders SVG Element with children.\n *\n * @preview ![img](data:image/svg+xml;base64,PHN2ZyAgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIgogIHdpZHRoPSIyNCIKICBoZWlnaHQ9IjI0IgogIHZpZXdCb3g9IjAgMCAyNCAyNCIKICBmaWxsPSJub25lIgogIHN0cm9rZT0iIzAwMCIgc3R5bGU9ImJhY2tncm91bmQtY29sb3I6ICNmZmY7IGJvcmRlci1yYWRpdXM6IDJweCIKICBzdHJva2Utd2lkdGg9IjIiCiAgc3Ryb2tlLWxpbmVjYXA9InJvdW5kIgogIHN0cm9rZS1saW5lam9pbj0icm91bmQiCj4KICA8cGF0aCBkPSJNMy41IDEzaDYiIC8+CiAgPHBhdGggZD0ibTIgMTYgNC41LTkgNC41IDkiIC8+CiAgPHBhdGggZD0iTTE4IDE2VjciIC8+CiAgPHBhdGggZD0ibTE0IDExIDQtNCA0IDQiIC8+Cjwvc3ZnPg==) - https://lucide.dev/icons/a-arrow-up\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 AArrowUp = createLucideIcon('AArrowUp', [\n ['path', { d: 'M3.5 13h6', key: 'p1my2r' }],\n ['path', { d: 'm2 16 4.5-9 4.5 9', key: 'ndf0b3' }],\n ['path', { d: 'M18 16V7', key: 'ty0viw' }],\n ['path', { d: 'm14 11 4-4 4 4', key: '1pu57t' }],\n]);\n\nexport default AArrowUp;\n"],"names":[],"mappings":";;;;;;;;;AAaM,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAW,iBAAiB,UAAY,CAAA,CAAA,CAAA;AAAA,CAAA,CAC5C,CAAC,CAAA,CAAA,CAAA,CAAA,CAAA,CAAQ,CAAA,CAAA,CAAA,CAAE,GAAG,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,CAAqB,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,CAClD,CAAC,CAAA,CAAA,CAAA,CAAA,CAAA,CAAQ,CAAA,CAAA,CAAA,CAAE,GAAG,CAAY,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAK,UAAU,CAAA,CAAA;AAAA,CAAA,CACzC,CAAC,CAAA,CAAA,CAAA,CAAA,CAAA,CAAQ,CAAA,CAAA,CAAA,CAAE,GAAG,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;AACjD,CAAC,CAAA,CAAA;;"}
@@ -0,0 +1 @@
{"version":3,"file":"searchParams.js","names":[],"sources":["../../src/searchParams.ts"],"sourcesContent":["import { decode, encode } from './qss'\nimport type { AnySchema } from './validators'\n\n/** Default `parseSearch` that strips leading '?' and JSON-parses values. */\nexport const defaultParseSearch = parseSearchWith(JSON.parse)\n/** Default `stringifySearch` using JSON.stringify for complex values. */\nexport const defaultStringifySearch = stringifySearchWith(\n JSON.stringify,\n JSON.parse,\n)\n\n/**\n * Build a `parseSearch` function using a provided JSON-like parser.\n *\n * The returned function strips a leading `?`, decodes values, and attempts to\n * JSON-parse string values using the given `parser`.\n *\n * @param parser Function to parse a string value (e.g. `JSON.parse`).\n * @returns A `parseSearch` function compatible with `Router` options.\n * @link https://tanstack.com/router/latest/docs/framework/react/guide/custom-search-param-serialization\n */\nexport function parseSearchWith(parser: (str: string) => any) {\n return (searchStr: string): AnySchema => {\n if (searchStr[0] === '?') {\n searchStr = searchStr.substring(1)\n }\n\n const query: Record<string, unknown> = decode(searchStr)\n\n // Try to parse any query params that might be json\n for (const key in query) {\n const value = query[key]\n if (typeof value === 'string') {\n try {\n query[key] = parser(value)\n } catch (_err) {\n // silent\n }\n }\n }\n\n return query\n }\n}\n\n/**\n * Build a `stringifySearch` function using a provided serializer.\n *\n * Non-primitive values are serialized with `stringify`. If a `parser` is\n * supplied, string values that are parseable are re-serialized to ensure\n * symmetry with `parseSearch`.\n *\n * @param stringify Function to serialize a value (e.g. `JSON.stringify`).\n * @param parser Optional parser to detect parseable strings.\n * @returns A `stringifySearch` function compatible with `Router` options.\n * @link https://tanstack.com/router/latest/docs/framework/react/guide/custom-search-param-serialization\n */\nexport function stringifySearchWith(\n stringify: (search: any) => string,\n parser?: (str: string) => any,\n) {\n const hasParser = typeof parser === 'function'\n function stringifyValue(val: any) {\n if (typeof val === 'object' && val !== null) {\n try {\n return stringify(val)\n } catch (_err) {\n // silent\n }\n } else if (hasParser && typeof val === 'string') {\n try {\n // Check if it's a valid parseable string.\n // If it is, then stringify it again.\n parser(val)\n return stringify(val)\n } catch (_err) {\n // silent\n }\n }\n return val\n }\n\n return (search: Record<string, any>) => {\n const searchStr = encode(search, stringifyValue)\n return searchStr ? `?${searchStr}` : ''\n }\n}\n\nexport type SearchSerializer = (searchObj: Record<string, any>) => string\nexport type SearchParser = (searchStr: string) => Record<string, any>\n"],"mappings":";;;AAIA,MAAa,qBAAqB,gBAAgB,KAAK,MAAM;;AAE7D,MAAa,yBAAyB,oBACpC,KAAK,WACL,KAAK,MACN;;;;;;;;;;;AAYD,SAAgB,gBAAgB,QAA8B;AAC5D,SAAQ,cAAiC;AACvC,MAAI,UAAU,OAAO,IACnB,aAAY,UAAU,UAAU,EAAE;EAGpC,MAAM,QAAiC,OAAO,UAAU;AAGxD,OAAK,MAAM,OAAO,OAAO;GACvB,MAAM,QAAQ,MAAM;AACpB,OAAI,OAAO,UAAU,SACnB,KAAI;AACF,UAAM,OAAO,OAAO,MAAM;YACnB,MAAM;;AAMnB,SAAO;;;;;;;;;;;;;;;AAgBX,SAAgB,oBACd,WACA,QACA;CACA,MAAM,YAAY,OAAO,WAAW;CACpC,SAAS,eAAe,KAAU;AAChC,MAAI,OAAO,QAAQ,YAAY,QAAQ,KACrC,KAAI;AACF,UAAO,UAAU,IAAI;WACd,MAAM;WAGN,aAAa,OAAO,QAAQ,SACrC,KAAI;AAGF,UAAO,IAAI;AACX,UAAO,UAAU,IAAI;WACd,MAAM;AAIjB,SAAO;;AAGT,SAAQ,WAAgC;EACtC,MAAM,YAAY,OAAO,QAAQ,eAAe;AAChD,SAAO,YAAY,IAAI,cAAc"}
@@ -0,0 +1 @@
{"version":3,"file":"trash-2.js","sources":["../../../src/icons/trash-2.ts"],"sourcesContent":["import createLucideIcon from '../createLucideIcon';\n\n/**\n * @component @name Trash2\n * @description Lucide SVG icon component, renders SVG Element with children.\n *\n * @preview ![img](data:image/svg+xml;base64,PHN2ZyAgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIgogIHdpZHRoPSIyNCIKICBoZWlnaHQ9IjI0IgogIHZpZXdCb3g9IjAgMCAyNCAyNCIKICBmaWxsPSJub25lIgogIHN0cm9rZT0iIzAwMCIgc3R5bGU9ImJhY2tncm91bmQtY29sb3I6ICNmZmY7IGJvcmRlci1yYWRpdXM6IDJweCIKICBzdHJva2Utd2lkdGg9IjIiCiAgc3Ryb2tlLWxpbmVjYXA9InJvdW5kIgogIHN0cm9rZS1saW5lam9pbj0icm91bmQiCj4KICA8cGF0aCBkPSJNMyA2aDE4IiAvPgogIDxwYXRoIGQ9Ik0xOSA2djE0YzAgMS0xIDItMiAySDdjLTEgMC0yLTEtMi0yVjYiIC8+CiAgPHBhdGggZD0iTTggNlY0YzAtMSAxLTIgMi0yaDRjMSAwIDIgMSAyIDJ2MiIgLz4KICA8bGluZSB4MT0iMTAiIHgyPSIxMCIgeTE9IjExIiB5Mj0iMTciIC8+CiAgPGxpbmUgeDE9IjE0IiB4Mj0iMTQiIHkxPSIxMSIgeTI9IjE3IiAvPgo8L3N2Zz4K) - https://lucide.dev/icons/trash-2\n * @see https://lucide.dev/guide/packages/lucide-react - Documentation\n *\n * @param {Object} props - Lucide icons props and any valid SVG attribute\n * @returns {JSX.Element} JSX Element\n *\n */\nconst Trash2 = createLucideIcon('Trash2', [\n ['path', { d: 'M3 6h18', key: 'd0wm0j' }],\n ['path', { d: 'M19 6v14c0 1-1 2-2 2H7c-1 0-2-1-2-2V6', key: '4alrt4' }],\n ['path', { d: 'M8 6V4c0-1 1-2 2-2h4c1 0 2 1 2 2v2', key: 'v07s0e' }],\n ['line', { x1: '10', x2: '10', y1: '11', y2: '17', key: '1uufr5' }],\n ['line', { x1: '14', x2: '14', y1: '11', y2: '17', key: 'xtxkd' }],\n]);\n\nexport default Trash2;\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,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,CAAyC,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,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,CACtE,CAAC,CAAA,CAAA,CAAA,CAAA,CAAA,CAAQ,CAAA,CAAA,CAAA,CAAE,GAAG,CAAsC,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,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,CACnE,CAAA,CAAC,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAQ,CAAE,CAAA,CAAA,CAAA,EAAI,CAAM,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAI,CAAM,CAAA,CAAA,CAAA,CAAA,CAAA,EAAA,CAAI,CAAA,CAAA,CAAA,CAAA,CAAM,CAAA,CAAA,CAAA,CAAA,CAAI,CAAA,CAAA,CAAA,CAAA,CAAM,EAAA,CAAA,CAAA,CAAA,CAAA,CAAK,UAAU,CAAA,CAAA;AAAA,CAClE,CAAA,CAAC,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAQ,CAAE,CAAA,CAAA,CAAA,EAAI,CAAM,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAI,CAAM,CAAA,CAAA,CAAA,CAAA,CAAA,EAAA,CAAI,CAAA,CAAA,CAAA,CAAA,CAAM,CAAA,CAAA,CAAA,CAAA,CAAI,CAAA,CAAA,CAAA,CAAA,CAAM,EAAA,CAAA,CAAA,CAAA,CAAA,CAAK,SAAS,CAAA;AACnE,CAAC,CAAA,CAAA;;"}
@@ -0,0 +1,6 @@
//#region src/scroll-restoration-inline.ts?script-string
var scroll_restoration_inline_default = "function(t){let s;try{s=JSON.parse(sessionStorage.getItem(t.storageKey)||\"{}\")}catch(e){console.error(e);return}const c=t.key||window.history.state?.__TSR_key,r=c?s[c]:void 0;if(t.shouldScrollRestoration&&r&&typeof r==\"object\"&&Object.keys(r).length>0){for(const e in r){const o=r[e];if(!o||typeof o!=\"object\")continue;const l=o.scrollX,i=o.scrollY;if(!(!Number.isFinite(l)||!Number.isFinite(i))){if(e===\"window\")window.scrollTo({top:i,left:l,behavior:t.behavior});else if(e){let n;try{n=document.querySelector(e)}catch{continue}n&&(n.scrollLeft=l,n.scrollTop=i)}}}return}const a=window.location.hash.split(\"#\",2)[1];if(a){const e=window.history.state?.__hashScrollIntoViewOptions??!0;if(e){const o=document.getElementById(a);o&&o.scrollIntoView(e)}return}window.scrollTo({top:0,left:0,behavior:t.behavior})}";
//#endregion
exports.default = scroll_restoration_inline_default;
//# sourceMappingURL=scroll-restoration-inline.cjs.map
@@ -0,0 +1,86 @@
"use strict";
// These validator functions answer the question “Is the config valid?” – return
// `false` if the options DO conflict with Prettier, and `true` if they don’t.
module.exports = {
"curly"({ options }) {
if (options.length === 0) {
return true;
}
const firstOption = options[0];
return firstOption !== "multi-line" && firstOption !== "multi-or-nest";
},
"lines-around-comment"({ options }) {
if (options.length === 0) {
return false;
}
const firstOption = options[0];
return Boolean(
firstOption &&
firstOption.allowBlockStart &&
firstOption.allowBlockEnd &&
firstOption.allowObjectStart &&
firstOption.allowObjectEnd &&
firstOption.allowArrayStart &&
firstOption.allowArrayEnd
);
},
"no-confusing-arrow"({ options }) {
if (options.length === 0) {
return false;
}
const firstOption = options[0];
return firstOption ? firstOption.allowParens === false : false;
},
"no-tabs"({ options }) {
if (options.length === 0) {
return false;
}
const firstOption = options[0];
return Boolean(firstOption && firstOption.allowIndentationTabs);
},
"unicorn/template-indent"({ options }) {
if (options.length === 0) {
return false;
}
const { comments = [], tags = [] } = options[0] || {};
return (
Array.isArray(comments) &&
Array.isArray(tags) &&
!(
comments.includes("GraphQL") ||
comments.includes("HTML") ||
tags.includes("css") ||
tags.includes("graphql") ||
tags.includes("gql") ||
tags.includes("html") ||
tags.includes("markdown") ||
tags.includes("md")
)
);
},
"vue/html-self-closing"({ options }) {
if (options.length === 0) {
return false;
}
const firstOption = options[0];
return Boolean(
firstOption && firstOption.html && firstOption.html.void === "any"
// Enable when Prettier supports SVG: https://github.com/prettier/prettier/issues/5322
// && firstOption.svg === "any"
);
},
};
@@ -0,0 +1,7 @@
import addHours from "./addHours.mjs";
function subHours(date, hours) {
return addHours(date, -hours);
}
export {
subHours as default
};
@@ -0,0 +1 @@
{"version":3,"file":"jsonResponseStreamableHttp.d.ts","sourceRoot":"","sources":["../../../../src/examples/server/jsonResponseStreamableHttp.ts"],"names":[],"mappings":""}
@@ -0,0 +1,95 @@
"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.ADDRESS_BOUNDARY = void 0;
exports.groupPossibilities = groupPossibilities;
exports.padGroup = padGroup;
exports.simpleRegularExpression = simpleRegularExpression;
exports.possibleElisions = possibleElisions;
const v6 = __importStar(require("./constants"));
function groupPossibilities(possibilities) {
return `(${possibilities.join('|')})`;
}
function padGroup(group) {
if (group.length < 4) {
return `0{0,${4 - group.length}}${group}`;
}
return group;
}
exports.ADDRESS_BOUNDARY = '[^A-Fa-f0-9:]';
function simpleRegularExpression(groups) {
const zeroIndexes = [];
groups.forEach((group, i) => {
const groupInteger = parseInt(group, 16);
if (groupInteger === 0) {
zeroIndexes.push(i);
}
});
// You can technically elide a single 0, this creates the regular expressions
// to match that eventuality
const possibilities = zeroIndexes.map((zeroIndex) => groups
.map((group, i) => {
if (i === zeroIndex) {
const elision = i === 0 || i === v6.GROUPS - 1 ? ':' : '';
return groupPossibilities([padGroup(group), elision]);
}
return padGroup(group);
})
.join(':'));
// The simplest case
possibilities.push(groups.map(padGroup).join(':'));
return groupPossibilities(possibilities);
}
function possibleElisions(elidedGroups, moreLeft, moreRight) {
const left = moreLeft ? '' : ':';
const right = moreRight ? '' : ':';
const possibilities = [];
// 1. elision of everything (::)
if (!moreLeft && !moreRight) {
possibilities.push('::');
}
// 2. complete elision of the middle
if (moreLeft && moreRight) {
possibilities.push('');
}
if ((moreRight && !moreLeft) || (!moreRight && moreLeft)) {
// 3. complete elision of one side
possibilities.push(':');
}
// 4. elision from the left side
possibilities.push(`${left}(:0{1,4}){1,${elidedGroups - 1}}`);
// 5. elision from the right side
possibilities.push(`(0{1,4}:){1,${elidedGroups - 1}}${right}`);
// 6. no elision
possibilities.push(`(0{1,4}:){${elidedGroups - 1}}0{1,4}`);
// 7. elision (including sloppy elision) from the middle
for (let groups = 1; groups < elidedGroups - 1; groups++) {
for (let position = 1; position < elidedGroups - groups; position++) {
possibilities.push(`(0{1,4}:){${position}}:(0{1,4}:){${elidedGroups - position - groups - 1}}0{1,4}`);
}
}
return groupPossibilities(possibilities);
}
//# sourceMappingURL=regular-expressions.js.map
@@ -0,0 +1 @@
{"version":3,"file":"tram-front.js","sources":["../../../src/icons/tram-front.ts"],"sourcesContent":["import createLucideIcon from '../createLucideIcon';\n\n/**\n * @component @name TramFront\n * @description Lucide SVG icon component, renders SVG Element with children.\n *\n * @preview ![img](data:image/svg+xml;base64,PHN2ZyAgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIgogIHdpZHRoPSIyNCIKICBoZWlnaHQ9IjI0IgogIHZpZXdCb3g9IjAgMCAyNCAyNCIKICBmaWxsPSJub25lIgogIHN0cm9rZT0iIzAwMCIgc3R5bGU9ImJhY2tncm91bmQtY29sb3I6ICNmZmY7IGJvcmRlci1yYWRpdXM6IDJweCIKICBzdHJva2Utd2lkdGg9IjIiCiAgc3Ryb2tlLWxpbmVjYXA9InJvdW5kIgogIHN0cm9rZS1saW5lam9pbj0icm91bmQiCj4KICA8cmVjdCB3aWR0aD0iMTYiIGhlaWdodD0iMTYiIHg9IjQiIHk9IjMiIHJ4PSIyIiAvPgogIDxwYXRoIGQ9Ik00IDExaDE2IiAvPgogIDxwYXRoIGQ9Ik0xMiAzdjgiIC8+CiAgPHBhdGggZD0ibTggMTktMiAzIiAvPgogIDxwYXRoIGQ9Im0xOCAyMi0yLTMiIC8+CiAgPHBhdGggZD0iTTggMTVoLjAxIiAvPgogIDxwYXRoIGQ9Ik0xNiAxNWguMDEiIC8+Cjwvc3ZnPgo=) - https://lucide.dev/icons/tram-front\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 TramFront = createLucideIcon('TramFront', [\n ['rect', { width: '16', height: '16', x: '4', y: '3', rx: '2', key: '1wxw4b' }],\n ['path', { d: 'M4 11h16', key: 'mpoxn0' }],\n ['path', { d: 'M12 3v8', key: '1h2ygw' }],\n ['path', { d: 'm8 19-2 3', key: '13i0xs' }],\n ['path', { d: 'm18 22-2-3', key: '1p0ohu' }],\n ['path', { d: 'M8 15h.01', key: 'a7atzg' }],\n ['path', { d: 'M16 15h.01', key: 'rnfrdf' }],\n]);\n\nexport default TramFront;\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,CAAA,CAAQ,CAAA,CAAA,CAAE,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAO,MAAM,CAAQ,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAM,CAAG,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAK,GAAG,CAAK,CAAA,CAAA,CAAA,CAAA,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,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,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,CAAa,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAK,UAAU,CAAA,CAAA;AAAA,CAAA,CAC1C,CAAC,CAAA,CAAA,CAAA,CAAA,CAAA,CAAQ,CAAA,CAAA,CAAA,CAAE,GAAG,CAAc,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAK,UAAU,CAAA,CAAA;AAAA,CAAA,CAC3C,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,UAAU,CAAA;AAC7C,CAAC,CAAA,CAAA;;"}
@@ -0,0 +1,152 @@
import { createStreamBody } from "./utils/stream.mjs";
import { getMimeType } from "hono/utils/mime";
import { createReadStream, existsSync, statSync } from "node:fs";
import { join } from "node:path";
//#region src/serve-static.ts
const COMPRESSIBLE_CONTENT_TYPE_REGEX = /^\s*(?:text\/[^;\s]+|application\/(?:javascript|json|xml|xml-dtd|ecmascript|dart|postscript|rtf|tar|toml|vnd\.dart|vnd\.ms-fontobject|vnd\.ms-opentype|wasm|x-httpd-php|x-javascript|x-ns-proxy-autoconfig|x-sh|x-tar|x-virtualbox-hdd|x-virtualbox-ova|x-virtualbox-ovf|x-virtualbox-vbox|x-virtualbox-vdi|x-virtualbox-vhd|x-virtualbox-vmdk|x-www-form-urlencoded)|font\/(?:otf|ttf)|image\/(?:bmp|vnd\.adobe\.photoshop|vnd\.microsoft\.icon|vnd\.ms-dds|x-icon|x-ms-bmp)|message\/rfc822|model\/gltf-binary|x-shader\/x-fragment|x-shader\/x-vertex|[^;\s]+?\+(?:json|text|xml|yaml))(?:[;\s]|$)/i;
const ENCODINGS = {
br: ".br",
zstd: ".zst",
gzip: ".gz"
};
const ENCODINGS_ORDERED_KEYS = Object.keys(ENCODINGS);
const getStats = (path) => {
let stats;
try {
stats = statSync(path);
} catch {}
return stats;
};
const BYTE_RANGE_PATTERN = /^(?:bytes=)?(?!-$)(\d*)-(\d*)$/;
const parseByteRange = (range) => {
const match = range.match(BYTE_RANGE_PATTERN);
if (!match) return;
const [, start, end] = match;
if (start === "") return {
type: "suffix",
length: Number(end)
};
if (end === "") return {
type: "open-ended",
start: Number(start)
};
return {
type: "bounded",
start: Number(start),
end: Number(end)
};
};
const resolveByteRange = (spec, size) => {
if (size === 0) return;
if (spec.type === "suffix") {
if (spec.length === 0) return;
return {
start: Math.max(size - spec.length, 0),
end: size - 1
};
}
const end = spec.type === "bounded" ? Math.min(spec.end, size - 1) : size - 1;
if (spec.start >= size || spec.start > end) return;
return {
start: spec.start,
end
};
};
const tryDecode = (str, decoder) => {
try {
return decoder(str);
} catch {
return str.replace(/(?:%[0-9A-Fa-f]{2})+/g, (match) => {
try {
return decoder(match);
} catch {
return match;
}
});
}
};
const tryDecodeURI = (str) => tryDecode(str, decodeURI);
const serveStatic = (options = { root: "" }) => {
const root = options.root || "";
const optionPath = options.path;
if (root !== "" && !existsSync(root)) console.error(`serveStatic: root path '${root}' is not found, are you sure it's correct?`);
return async (c, next) => {
if (c.finalized) return next();
if (c.req.method !== "GET" && c.req.method !== "HEAD") return next();
let filename;
if (optionPath) filename = optionPath;
else try {
if (!options.allowPercentInPath && c.req.path.includes("%")) throw new Error();
filename = tryDecodeURI(c.req.path);
if (/(?:^|[\/\\])\.{1,2}(?:$|[\/\\])|[\/\\]{2,}|\\/.test(filename)) throw new Error();
} catch {
await options.onNotFound?.(c.req.path, c);
return next();
}
let path = join(root, !optionPath && options.rewriteRequestPath ? options.rewriteRequestPath(filename, c) : filename);
let stats = getStats(path);
if (stats && stats.isDirectory()) {
const indexFile = options.index ?? "index.html";
path = join(path, indexFile);
stats = getStats(path);
}
if (!stats) {
await options.onNotFound?.(path, c);
return next();
}
const mimeType = getMimeType(path);
c.header("Content-Type", mimeType || "application/octet-stream");
if (options.precompressed && (!mimeType || mimeType === "application/octet-stream" || COMPRESSIBLE_CONTENT_TYPE_REGEX.test(mimeType))) {
const acceptEncodingSet = new Set(c.req.header("Accept-Encoding")?.split(",").map((encoding) => encoding.trim()));
for (const encoding of ENCODINGS_ORDERED_KEYS) {
if (!acceptEncodingSet.has(encoding)) continue;
const precompressedStats = getStats(path + ENCODINGS[encoding]);
if (precompressedStats) {
c.header("Content-Encoding", encoding);
c.header("Vary", "Accept-Encoding", { append: true });
stats = precompressedStats;
path = path + ENCODINGS[encoding];
break;
}
}
}
let result;
const size = stats.size;
const range = c.req.header("range") || "";
c.header("Last-Modified", stats.mtime.toUTCString());
if (c.req.method === "HEAD") {
c.header("Content-Length", size.toString());
c.status(200);
result = c.body(null);
} else if (!range) {
c.header("Content-Length", size.toString());
result = c.body(createStreamBody(createReadStream(path)), 200);
} else {
c.header("Accept-Ranges", "bytes");
const resolvedRange = resolveByteRange(parseByteRange(range) ?? {
type: "open-ended",
start: 0
}, size);
if (!resolvedRange) {
c.header("Content-Range", `bytes */${size}`);
result = c.body(null, 416);
} else {
const { start, end } = resolvedRange;
const chunkSize = end - start + 1;
const stream = createReadStream(path, {
start,
end
});
c.header("Content-Length", chunkSize.toString());
c.header("Content-Range", `bytes ${start}-${end}/${size}`);
result = c.body(createStreamBody(stream), 206);
}
}
await options.onFound?.(path, c);
return result;
};
};
//#endregion
export { serveStatic };
@@ -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 Type = createLucideIcon("Type", [
["polyline", { points: "4 7 4 4 20 4 20 7", key: "1nosan" }],
["line", { x1: "9", x2: "15", y1: "20", y2: "20", key: "swin9y" }],
["line", { x1: "12", x2: "12", y1: "4", y2: "20", key: "1tx1rr" }]
]);
export { Type as default };
//# sourceMappingURL=type.js.map
@@ -0,0 +1,198 @@
# Connector
<!--introduced_in=v4.3.0-->
<!--type=module-->
<!-- source_link=lib/core/connect.js -->
> Stability: 2 - Stable
undici opens the underlying socket for every request through a *connector*. By
default this is handled internally, so most applications never interact with the
connector directly. When a request needs additional control over the socket —
for example to inspect a TLS certificate, pin a CA fingerprint, or tunnel the
connection — a custom connector can be supplied through the `connect` option of
a [`Dispatcher`][].
Use the `buildConnector` helper to construct a connector with sensible defaults
and then wrap it:
```mjs
import { buildConnector } from 'undici'
const connector = buildConnector({ rejectUnauthorized: false })
```
`buildConnector` accepts the same TLS options as
[`tls.connect()`][tls.connect] in addition to the undici-specific options listed
below, and returns a [`connector`](#connectoroptions-callback) function that
undici invokes for each new connection.
## `buildConnector([options])`
<!-- YAML
added: v5.23.4
-->
* `options` {buildConnector.BuildOptions} (optional) Connection options. In
addition to every [`tls.connect()`][tls.connect] option, the following fields
are supported:
* `allowH2` {boolean} Whether to offer HTTP/2 (`h2`) during TLS ALPN
negotiation. **Default:** `true`.
* `preferH2` {boolean} Only effective together with `allowH2`. When `true`,
ALPN is offered as `['h2', 'http/1.1']` (HTTP/2 first) instead of the default
`['http/1.1', 'h2']`. Use this when the server selects the ALPN protocol by
*client* preference (for example, some load balancers) so that HTTP/2 is
negotiated whenever the server supports it. If the server does not support
HTTP/2, ALPN transparently falls back to `http/1.1`. **Default:** `false`.
* `maxCachedSessions` {number|null} Maximum number of TLS sessions to cache for
reuse. Use `0` to disable TLS session caching. Must be a non-negative
integer. **Default:** `100`.
* `socketPath` {string|null} An IPC endpoint, either a Unix domain socket or a
Windows named pipe. **Default:** `null`.
* `timeout` {number|null} The connection timeout in milliseconds. A
[`ConnectTimeoutError`][] is raised when the socket fails to connect within
this period. **Default:** `10e3`.
* `port` {number} The port to connect to when one is not provided to the
connector. Defaults to `443` for `https:` and `80` otherwise.
* `keepAlive` {boolean|null} Whether to enable TCP keep-alive on the socket.
**Default:** `true`.
* `keepAliveInitialDelay` {number|null} The delay in milliseconds before the
first TCP keep-alive probe is sent on an idle socket. **Default:** `60e3`.
* `typeOfService` {number|null} The IP Type of Service (ToS) value to set on
the socket. **Default:** `null`.
* Returns: {buildConnector.connector} A
[`connector`](#connectoroptions-callback) function bound to the supplied
options.
Builds a connector function. `maxCachedSessions` must be a non-negative integer
or an [`InvalidArgumentError`][] is thrown.
The returned function may be passed directly as the `connect` option of a
[`Dispatcher`][], or wrapped to perform extra validation on each socket before it
is handed back to undici.
```mjs
import { Client, buildConnector } from 'undici'
const connector = buildConnector({ rejectUnauthorized: false })
const client = new Client('https://localhost:3000', {
connect (opts, cb) {
connector(opts, (err, socket) => {
if (err) {
cb(err)
} else if (/* assertion */ false) {
socket.destroy()
cb(new Error('kaboom'))
} else {
cb(null, socket)
}
})
}
})
```
## `connector(options, callback)`
<!-- YAML
added: v4.3.0
-->
* `options` {Object} Per-connection options provided by undici.
* `hostname` {string} The host to connect to.
* `host` {string} (optional) The value of the request `Host` header, used to
derive the TLS `servername` when one is not supplied.
* `protocol` {string} The request protocol, for example `'https:'` or
`'http:'`. A value of `'https:'` establishes a TLS connection.
* `port` {string} The port to connect to. Defaults to `443` for `https:` and
`80` otherwise.
* `servername` {string} (optional) The TLS Server Name Indication (SNI) value.
Derived from `host` when omitted.
* `localAddress` {string|null} (optional) The local address the socket should
connect from.
* `httpSocket` {Socket} (optional) An existing socket on which to establish the
secure connection rather than creating a new one. May only be supplied for a
TLS upgrade (`protocol` of `'https:'`).
* `callback` {Function} Called once the socket has connected or failed.
* `err` {Error|null} The connection error, or `null` on success.
* `socket` {Socket|TLSSocket|null} The connected socket, or `null` on failure.
* Returns: {Socket|TLSSocket} The socket being established.
The function returned by [`buildConnector()`](#buildconnectoroptions). undici
calls it for every new connection. It opens a [`net.Socket`][] for `http:`
targets or a [`tls.TLSSocket`][] for `https:` targets, applies TCP keep-alive and
the connect timeout, and invokes `callback` once the socket connects or errors.
The socket is also returned synchronously.
When connecting over TLS, established sessions are cached (subject to
`maxCachedSessions`) and reused for subsequent connections to the same
`servername` or `hostname`.
### Example: validate the CA fingerprint
A custom connector is a convenient place to verify the server certificate before
any request is sent over the socket.
```mjs
import { Client, buildConnector } from 'undici'
const caFingerprint = 'FO:OB:AR'
const connector = buildConnector({ rejectUnauthorized: false })
const client = new Client('https://localhost:3000', {
connect (opts, cb) {
connector(opts, (err, socket) => {
if (err) {
cb(err)
} else if (getIssuerCertificate(socket).fingerprint256 !== caFingerprint) {
socket.destroy()
cb(new Error('Fingerprint does not match or malformed certificate'))
} else {
cb(null, socket)
}
})
}
})
client.request({
path: '/',
method: 'GET'
}, (err, data) => {
if (err) throw err
const bufs = []
data.body.on('data', (buf) => {
bufs.push(buf)
})
data.body.on('end', () => {
console.log(Buffer.concat(bufs).toString('utf8'))
client.close()
})
})
function getIssuerCertificate (socket) {
let certificate = socket.getPeerCertificate(true)
while (certificate && Object.keys(certificate).length > 0) {
// Invalid certificate.
if (certificate.issuerCertificate == null) {
return null
}
// We have reached the root certificate. In case of self-signed
// certificates, `issuerCertificate` may be a circular reference.
if (certificate.fingerprint256 === certificate.issuerCertificate.fingerprint256) {
break
}
certificate = certificate.issuerCertificate
}
return certificate
}
```
[`ConnectTimeoutError`]: Errors.md#class-connecttimeouterror
[`Dispatcher`]: Dispatcher.md#class-dispatcher
[`InvalidArgumentError`]: Errors.md#class-invalidargumenterror
[`net.Socket`]: https://nodejs.org/api/net.html#class-netsocket
[`tls.TLSSocket`]: https://nodejs.org/api/tls.html#class-tlstlssocket
[tls.connect]: https://nodejs.org/api/tls.html#tlsconnectoptions-callback
@@ -0,0 +1 @@
{"version":3,"file":"scroll-restoration.cjs","names":[],"sources":["../../src/scroll-restoration.ts"],"sourcesContent":["import { isServer } from '@tanstack/router-core/isServer'\nimport { functionalUpdate, isPlainObject } from './utils'\nimport type { AnyRouter } from './router'\nimport type { ParsedLocation } from './location'\nimport type { NonNullableUpdater } from './utils'\n\nexport type ScrollRestorationEntry = { scrollX: number; scrollY: number }\n\ntype ScrollRestorationByElement = Record<string, ScrollRestorationEntry>\n\ntype ScrollRestorationByKey = Record<string, ScrollRestorationByElement>\n\ntype ScrollRestorationCache = {\n readonly state: ScrollRestorationByKey\n set: (updater: NonNullableUpdater<ScrollRestorationByKey>) => void\n persist: () => void\n}\n\nexport type ScrollRestorationOptions = {\n getKey?: (location: ParsedLocation) => string\n scrollBehavior?: ScrollToOptions['behavior']\n}\n\nfunction getSafeSessionStorage() {\n try {\n return typeof window !== 'undefined' &&\n typeof window.sessionStorage === 'object'\n ? window.sessionStorage\n : undefined\n } catch {\n // silent\n return undefined\n }\n}\n\n// SessionStorage key used to store scroll positions across navigations.\nexport const storageKey = 'tsr-scroll-restoration-v1_3'\n\nfunction createScrollRestorationCache(): ScrollRestorationCache | null {\n const safeSessionStorage = getSafeSessionStorage()\n if (!safeSessionStorage) {\n return null\n }\n\n let state: ScrollRestorationByKey = {}\n\n try {\n const parsed = JSON.parse(safeSessionStorage.getItem(storageKey) || '{}')\n if (isPlainObject(parsed)) {\n state = parsed as ScrollRestorationByKey\n }\n } catch {\n // ignore invalid session storage payloads\n }\n\n const persist = () => {\n try {\n safeSessionStorage.setItem(storageKey, JSON.stringify(state))\n } catch {\n if (process.env.NODE_ENV !== 'production') {\n console.warn(\n '[ts-router] Could not persist scroll restoration state to sessionStorage.',\n )\n }\n }\n }\n\n return {\n get state() {\n return state\n },\n set: (updater) => {\n state = functionalUpdate(updater, state) || state\n },\n persist,\n }\n}\n\nexport const scrollRestorationCache = createScrollRestorationCache()\n\n/**\n * The default `getKey` function for `useScrollRestoration`.\n * It returns the `key` from the location state or the `href` of the location.\n *\n * The `location.href` is used as a fallback to support the use case where the location state is not available like the initial render.\n */\nexport const defaultGetScrollRestorationKey = (location: ParsedLocation) => {\n return location.state.__TSR_key! || location.href\n}\n\nfunction getCssSelector(el: any): string {\n const path = []\n let parent: HTMLElement\n while ((parent = el.parentNode)) {\n path.push(\n `${el.tagName}:nth-child(${Array.prototype.indexOf.call(parent.children, el) + 1})`,\n )\n el = parent\n }\n return `${path.reverse().join(' > ')}`.toLowerCase()\n}\n\nexport function getElementScrollRestorationEntry(\n router: AnyRouter,\n options: (\n | {\n id: string\n getElement?: () => Window | Element | undefined | null\n }\n | {\n id?: string\n getElement: () => Window | Element | undefined | null\n }\n ) & {\n getKey?: (location: ParsedLocation) => string\n },\n): ScrollRestorationEntry | undefined {\n const getKey = options.getKey || defaultGetScrollRestorationKey\n const restoreKey = getKey(router.latestLocation)\n\n if (options.id) {\n return scrollRestorationCache?.state[restoreKey]?.[\n `[${scrollRestorationIdAttribute}=\"${options.id}\"]`\n ]\n }\n\n const element = options.getElement?.()\n if (!element) {\n return\n }\n\n return scrollRestorationCache?.state[restoreKey]?.[\n element instanceof Window ? windowScrollTarget : getCssSelector(element)\n ]\n}\n\nlet ignoreScroll = false\nconst windowScrollTarget = 'window'\nconst scrollRestorationIdAttribute = 'data-scroll-restoration-id'\ntype ScrollTarget = typeof windowScrollTarget | Element\n\nexport function setupScrollRestoration(router: AnyRouter, force?: boolean) {\n if (!scrollRestorationCache && !(isServer ?? router.isServer)) {\n return\n }\n\n const cache = scrollRestorationCache\n\n const shouldScrollRestoration =\n force ?? router.options.scrollRestoration ?? false\n\n if (shouldScrollRestoration) {\n router.isScrollRestoring = true\n }\n\n if (\n (isServer ?? router.isServer) ||\n router.isScrollRestorationSetup ||\n !cache\n ) {\n return\n }\n\n router.isScrollRestorationSetup = true\n ignoreScroll = false\n\n const getKey =\n router.options.getScrollRestorationKey || defaultGetScrollRestorationKey\n const trackedScrollEntries = new Map<ScrollTarget, ScrollRestorationEntry>()\n\n window.history.scrollRestoration = 'manual'\n\n const onScroLine truncated
@@ -0,0 +1,40 @@
"use strict";
Object.defineProperty(exports, "__esModule", {
value: true
});
exports.default = cleanJSXElementLiteralChild;
var _index = require("../../builders/generated/index.js");
var _index2 = require("../../index.js");
function cleanJSXElementLiteralChild(child, args) {
const lines = child.value.split(/\r\n|\n|\r/);
let lastNonEmptyLine = 0;
for (let i = 0; i < lines.length; i++) {
if (/[^ \t]/.exec(lines[i])) {
lastNonEmptyLine = i;
}
}
let str = "";
for (let i = 0; i < lines.length; i++) {
const line = lines[i];
const isFirstLine = i === 0;
const isLastLine = i === lines.length - 1;
const isLastNonEmptyLine = i === lastNonEmptyLine;
let trimmedLine = line.replace(/\t/g, " ");
if (!isFirstLine) {
trimmedLine = trimmedLine.replace(/^ +/, "");
}
if (!isLastLine) {
trimmedLine = trimmedLine.replace(/ +$/, "");
}
if (trimmedLine) {
if (!isLastNonEmptyLine) {
trimmedLine += " ";
}
str += trimmedLine;
}
}
if (str) args.push((0, _index2.inherits)((0, _index.stringLiteral)(str), child));
}
//# sourceMappingURL=cleanJSXElementLiteralChild.js.map
@@ -0,0 +1,18 @@
/**
* @license lucide-react v0.469.0 - ISC
*
* This source code is licensed under the ISC license.
* See the LICENSE file in the root directory of this source tree.
*/
import createLucideIcon from '../createLucideIcon.js';
const BookLock = createLucideIcon("BookLock", [
["path", { d: "M18 6V4a2 2 0 1 0-4 0v2", key: "1aquzs" }],
["path", { d: "M20 15v6a1 1 0 0 1-1 1H6.5a1 1 0 0 1 0-5H20", key: "1rkj32" }],
["path", { d: "M4 19.5v-15A2.5 2.5 0 0 1 6.5 2H10", key: "18wgow" }],
["rect", { x: "12", y: "6", width: "8", height: "5", rx: "1", key: "73l30o" }]
]);
export { BookLock as default };
//# sourceMappingURL=book-lock.js.map
@@ -0,0 +1 @@
{"version":3,"file":"arrow-down-left-from-circle.js","sources":[],"sourcesContent":[],"names":[],"mappings":";;;;;;;"}
@@ -0,0 +1,17 @@
let { execSync } = require('child_process')
let pico = require('picocolors')
try {
let version = parseInt(execSync('npm -v'))
if (version <= 6) {
process.stderr.write(
pico.red(
'Update npm or call ' +
pico.yellow('npx browserslist@latest --update-db') +
'\n'
)
)
process.exit(1)
}
// eslint-disable-next-line no-unused-vars
} catch (e) {}
@@ -0,0 +1,153 @@
/**
* @fileoverview Stylish reporter
* @author Sindre Sorhus
*/
"use strict";
const util = require("node:util"),
table = require("../../shared/text-table");
//------------------------------------------------------------------------------
// Helpers
//------------------------------------------------------------------------------
/**
* Returns a styling function based on the color option.
* @param {boolean|undefined} color Indicates whether to use colors.
* @returns {Function} A function that styles text.
*/
function getStyleText(color) {
if (typeof color === "undefined") {
return (format, text) =>
util.styleText(format, text, { validateStream: true });
}
if (color) {
return (format, text) =>
util.styleText(format, text, { validateStream: false });
}
return (_, text) => text;
}
/**
* Given a word and a count, append an s if count is not one.
* @param {string} word A word in its singular form.
* @param {number} count A number controlling whether word should be pluralized.
* @returns {string} The original word with an s on the end if count is not one.
*/
function pluralize(word, count) {
return count === 1 ? word : `${word}s`;
}
//------------------------------------------------------------------------------
// Public Interface
//------------------------------------------------------------------------------
module.exports = function (results, data) {
const styleText = getStyleText(data?.color);
let output = "\n",
errorCount = 0,
warningCount = 0,
fixableErrorCount = 0,
fixableWarningCount = 0,
summaryColor = "yellow";
results.forEach(result => {
const messages = result.messages;
if (messages.length === 0) {
return;
}
errorCount += result.errorCount;
warningCount += result.warningCount;
fixableErrorCount += result.fixableErrorCount;
fixableWarningCount += result.fixableWarningCount;
output += `${styleText("underline", result.filePath)}\n`;
output += `${table(
messages.map(message => {
let messageType;
if (message.fatal || message.severity === 2) {
messageType = styleText("red", "error");
summaryColor = "red";
} else {
messageType = styleText("yellow", "warning");
}
return [
"",
String(message.line || 0),
String(message.column || 0),
messageType,
message.message.replace(/([^ ])\.$/u, "$1"),
message.ruleId ? styleText("dim", message.ruleId) : "",
];
}),
{
align: ["", "r", "l"],
stringLength(str) {
return util.stripVTControlCharacters(str).length;
},
},
)
.split("\n")
.map(el =>
el.replace(/(\d+)\s+(\d+)/u, (m, p1, p2) =>
styleText("dim", `${p1}:${p2}`),
),
)
.join("\n")}\n\n`;
});
const total = errorCount + warningCount;
/*
* We can't use a single `styleText` call like `styleText([summaryColor, "bold"], text)` here.
* This is a bug in `util.styleText` in Node.js versions earlier than v22.15.0 (https://github.com/nodejs/node/issues/56717).
* As a workaround, we use nested `styleText` calls.
*/
if (total > 0) {
output += `${styleText(
summaryColor,
styleText(
"bold",
[
"\u2716 ",
total,
pluralize(" problem", total),
" (",
errorCount,
pluralize(" error", errorCount),
", ",
warningCount,
pluralize(" warning", warningCount),
")",
].join(""),
),
)}\n`;
if (fixableErrorCount > 0 || fixableWarningCount > 0) {
output += `${styleText(
summaryColor,
styleText(
"bold",
[
" ",
fixableErrorCount,
pluralize(" error", fixableErrorCount),
" and ",
fixableWarningCount,
pluralize(" warning", fixableWarningCount),
" potentially fixable with the `--fix` option.",
].join(""),
),
)}\n`;
}
}
// Resets output color, for prevent change on top level
return total > 0 ? styleText("reset", output) : "";
};
@@ -0,0 +1,3 @@
import { MatchEstimated, MatchExtended } from '../../types';
declare const _default: ({ regexName, regexMatch, token, }: MatchExtended | MatchEstimated) => number;
export default _default;
@@ -0,0 +1,374 @@
export default `flf2a$ 1 1 11 -1 12 0
octal.flf by Karlton Wirsing based on
binary.flf (C) 1994 by Victor Parada (vparada@inf.utfsm.cl) 94/12/05
figlet 2.1 font, includes ISO Latin-1, excludes "-D" option chars.
Spaces are not shown as binary. If this is required, change "$@" below
to "20 @". Change to "@" to remove the hardspace between words.
Note that figlet always removes spaces when it moves words to a new line.
Try option "-m 0" to remove the space between letters (octets).
$@
041 @
042 @
043 @
044 @
045 @
046 @
047 @
050 @
051 @
052 @
053 @
054 @
055 @
056 @
057 @
060 @
061 @
062 @
063 @
064 @
065 @
066 @
067 @
070 @
071 @
072 @
073 @
074 @
075 @
076 @
077 @
100 @
101 @
102 @
103 @
104 @
105 @
106 @
107 @
110 @
111 @
112 @
113 @
114 @
115 @
116 @
117 @
120 @
121 @
122 @
123 @
124 @
125 @
126 @
127 @
130 @
131 @
132 @
133 @
134 @
135 @
136 @
137 @
140 @
141 @
142 @
143 @
144 @
145 @
146 @
147 @
150 @
151 @
152 @
153 @
154 @
155 @
156 @
157 @
160 @
161 @
162 @
163 @
164 @
165 @
166 @
167 @
170 @
171 @
172 @
173 @
174 @
175 @
176 @
@
@
@
@
@
@
@
127
177 @
128
200 @
129
201 @
130
202 @
131
203 @
132
204 @
133
205 @
134
206 @
135
207 @
136
210 @
137
211 @
138
212 @
139
213 @
140
214 @
141
215 @
142
216 @
143
217 @
144
220 @
145
221 @
146
222 @
147
223 @
148
224 @
149
225 @
150
226 @
151
227 @
152
230 @
153
231 @
154
232 @
155
233 @
156
234 @
157
235 @
158
236 @
159
237 @
160
240 @
161
241 @
162
242 @
163
243 @
164
244 @
165
245 @
166
246 @
167
247 @
168
250 @
169
251 @
170
252 @
171
253 @
172
254 @
173
255 @
174
256 @
175
257 @
176
260 @
177
261 @
178
262 @
179
263 @
180
264 @
181
265 @
182
266 @
183
267 @
184
270 @
185
271 @
186
272 @
187
273 @
188
274 @
189
275 @
190
276 @
191
277 @
192
300 @
193
301 @
194
302 @
195
303 @
196
304 @
197
305 @
198
306 @
199
307 @
200
310 @
201
311 @
202
312 @
203
313 @
204
314 @
205
315 @
206
316 @
207
317 @
208
320 @
209
321 @
210
322 @
211
323 @
212
324 @
213
325 @
214
326 @
215
327 @
216
330 @
217
331 @
218
332 @
219
333 @
220
334 @
221
335 @
222
336 @
223
337 @
224
340 @
225
341 @
226
342 @
227
343 @
228
344 @
229
345 @
230
346 @
231
347 @
232
350 @
233
351 @
234
352 @
235
353 @
236
354 @
237
355 @
238
356 @
239
357 @
240
360 @
241
361 @
242
362 @
243
363 @
244
364 @
245
365 @
246
366 @
247
367 @
248
370 @
249
371 @
250
372 @
251
373 @
252
374 @
253
375 @
254
376 @
255
377 @
`
@@ -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 Stamp = createLucideIcon("Stamp", [
["path", { d: "M5 22h14", key: "ehvnwv" }],
[
"path",
{
d: "M19.27 13.73A2.5 2.5 0 0 0 17.5 13h-11A2.5 2.5 0 0 0 4 15.5V17a1 1 0 0 0 1 1h14a1 1 0 0 0 1-1v-1.5c0-.66-.26-1.3-.73-1.77Z",
key: "1sy9ra"
}
],
[
"path",
{ d: "M14 13V8.5C14 7 15 7 15 5a3 3 0 0 0-3-3c-1.66 0-3 1-3 3s1 2 1 3.5V13", key: "cnxgux" }
]
]);
export { Stamp as default };
//# sourceMappingURL=stamp.js.map
@@ -0,0 +1,7 @@
'use strict';
if (process.env.NODE_ENV === 'production') {
module.exports = require('../cjs/use-sync-external-store-shim/with-selector.production.js');
} else {
module.exports = require('../cjs/use-sync-external-store-shim/with-selector.development.js');
}
@@ -0,0 +1,335 @@
import * as checks from "./checks.js";
import type * as core from "./core.js";
import type * as errors from "./errors.js";
import * as registries from "./registries.js";
import * as schemas from "./schemas.js";
import * as util from "./util.js";
export type Params<T extends schemas.$ZodType | checks.$ZodCheck, IssueTypes extends errors.$ZodIssueBase, OmitKeys extends keyof T["_zod"]["def"] = never> = util.Flatten<Partial<util.EmptyToNever<Omit<T["_zod"]["def"], OmitKeys> & ([IssueTypes] extends [never] ? {} : {
error?: string | errors.$ZodErrorMap<IssueTypes> | undefined;
/** @deprecated This parameter is deprecated. Use `error` instead. */
message?: string | undefined;
})>>>;
export type TypeParams<T extends schemas.$ZodType = schemas.$ZodType & {
_isst: never;
}, AlsoOmit extends Exclude<keyof T["_zod"]["def"], "type" | "checks" | "error"> = never> = Params<T, NonNullable<T["_zod"]["isst"]>, "type" | "checks" | "error" | AlsoOmit>;
export type CheckParams<T extends checks.$ZodCheck = checks.$ZodCheck, // & { _issc: never },
AlsoOmit extends Exclude<keyof T["_zod"]["def"], "check" | "error"> = never> = Params<T, NonNullable<T["_zod"]["issc"]>, "check" | "error" | AlsoOmit>;
export type StringFormatParams<T extends schemas.$ZodStringFormat = schemas.$ZodStringFormat, AlsoOmit extends Exclude<keyof T["_zod"]["def"], "type" | "coerce" | "checks" | "error" | "check" | "format"> = never> = Params<T, NonNullable<T["_zod"]["isst"] | T["_zod"]["issc"]>, "type" | "coerce" | "checks" | "error" | "check" | "format" | AlsoOmit>;
export type CheckStringFormatParams<T extends schemas.$ZodStringFormat = schemas.$ZodStringFormat, AlsoOmit extends Exclude<keyof T["_zod"]["def"], "type" | "coerce" | "checks" | "error" | "check" | "format"> = never> = Params<T, NonNullable<T["_zod"]["issc"]>, "type" | "coerce" | "checks" | "error" | "check" | "format" | AlsoOmit>;
export type CheckTypeParams<T extends schemas.$ZodType & checks.$ZodCheck = schemas.$ZodType & checks.$ZodCheck, AlsoOmit extends Exclude<keyof T["_zod"]["def"], "type" | "checks" | "error" | "check"> = never> = Params<T, NonNullable<T["_zod"]["isst"] | T["_zod"]["issc"]>, "type" | "checks" | "error" | "check" | AlsoOmit>;
export type $ZodStringParams = TypeParams<schemas.$ZodString<string>, "coerce"> & {
checks?: readonly checks.$ZodCheck<string>[];
};
export declare function _string<T extends schemas.$ZodString>(Class: util.SchemaClass<T>, params?: string | $ZodStringParams): T;
export declare function _coercedString<T extends schemas.$ZodString>(Class: util.SchemaClass<T>, params?: string | $ZodStringParams): T;
export type $ZodStringFormatParams = CheckTypeParams<schemas.$ZodStringFormat, "format" | "coerce" | "when" | "pattern">;
export type $ZodCheckStringFormatParams = CheckParams<checks.$ZodCheckStringFormat, "format">;
export type $ZodEmailParams = StringFormatParams<schemas.$ZodEmail, "when">;
export type $ZodCheckEmailParams = CheckStringFormatParams<schemas.$ZodEmail, "when">;
export declare function _email<T extends schemas.$ZodEmail>(Class: util.SchemaClass<T>, params?: string | $ZodEmailParams | $ZodCheckEmailParams): T;
export type $ZodGUIDParams = StringFormatParams<schemas.$ZodGUID, "pattern" | "when">;
export type $ZodCheckGUIDParams = CheckStringFormatParams<schemas.$ZodGUID, "pattern" | "when">;
export declare function _guid<T extends schemas.$ZodGUID>(Class: util.SchemaClass<T>, params?: string | $ZodGUIDParams | $ZodCheckGUIDParams): T;
export type $ZodUUIDParams = StringFormatParams<schemas.$ZodUUID, "pattern" | "when">;
export type $ZodCheckUUIDParams = CheckStringFormatParams<schemas.$ZodUUID, "pattern" | "when">;
export declare function _uuid<T extends schemas.$ZodUUID>(Class: util.SchemaClass<T>, params?: string | $ZodUUIDParams | $ZodCheckUUIDParams): T;
export type $ZodUUIDv4Params = StringFormatParams<schemas.$ZodUUID, "pattern" | "when">;
export type $ZodCheckUUIDv4Params = CheckStringFormatParams<schemas.$ZodUUID, "pattern" | "when">;
export declare function _uuidv4<T extends schemas.$ZodUUID>(Class: util.SchemaClass<T>, params?: string | $ZodUUIDv4Params | $ZodCheckUUIDv4Params): T;
export type $ZodUUIDv6Params = StringFormatParams<schemas.$ZodUUID, "pattern" | "when">;
export type $ZodCheckUUIDv6Params = CheckStringFormatParams<schemas.$ZodUUID, "pattern" | "when">;
export declare function _uuidv6<T extends schemas.$ZodUUID>(Class: util.SchemaClass<T>, params?: string | $ZodUUIDv6Params | $ZodCheckUUIDv6Params): T;
export type $ZodUUIDv7Params = StringFormatParams<schemas.$ZodUUID, "pattern" | "when">;
export type $ZodCheckUUIDv7Params = CheckStringFormatParams<schemas.$ZodUUID, "pattern" | "when">;
export declare function _uuidv7<T extends schemas.$ZodUUID>(Class: util.SchemaClass<T>, params?: string | $ZodUUIDv7Params | $ZodCheckUUIDv7Params): T;
export type $ZodURLParams = StringFormatParams<schemas.$ZodURL, "when">;
export type $ZodCheckURLParams = CheckStringFormatParams<schemas.$ZodURL, "when">;
export declare function _url<T extends schemas.$ZodURL>(Class: util.SchemaClass<T>, params?: string | $ZodURLParams | $ZodCheckURLParams): T;
export type $ZodEmojiParams = StringFormatParams<schemas.$ZodEmoji, "when">;
export type $ZodCheckEmojiParams = CheckStringFormatParams<schemas.$ZodEmoji, "when">;
export declare function _emoji<T extends schemas.$ZodEmoji>(Class: util.SchemaClass<T>, params?: string | $ZodEmojiParams | $ZodCheckEmojiParams): T;
export type $ZodNanoIDParams = StringFormatParams<schemas.$ZodNanoID, "when" | "pattern">;
export type $ZodCheckNanoIDParams = CheckStringFormatParams<schemas.$ZodNanoID, "when" | "pattern">;
export declare function _nanoid<T extends schemas.$ZodNanoID>(Class: util.SchemaClass<T>, params?: string | $ZodNanoIDParams | $ZodCheckNanoIDParams): T;
/**
* @deprecated CUID v1 is deprecated by its authors due to information leakage
* (timestamps embedded in the id). Use {@link _cuid2} instead.
* See https://github.com/paralleldrive/cuid.
*/
export type $ZodCUIDParams = StringFormatParams<schemas.$ZodCUID, "when">;
/**
* @deprecated CUID v1 is deprecated by its authors due to information leakage
* (timestamps embedded in the id). Use {@link _cuid2} instead.
* See https://github.com/paralleldrive/cuid.
*/
export type $ZodCheckCUIDParams = CheckStringFormatParams<schemas.$ZodCUID, "when">;
/**
* @deprecated CUID v1 is deprecated by its authors due to information leakage
* (timestamps embedded in the id). Use {@link _cuid2} instead.
* See https://github.com/paralleldrive/cuid.
*/
export declare function _cuid<T extends schemas.$ZodCUID>(Class: util.SchemaClass<T>, params?: string | $ZodCUIDParams | $ZodCheckCUIDParams): T;
export type $ZodCUID2Params = StringFormatParams<schemas.$ZodCUID2, "when">;
export type $ZodCheckCUID2Params = CheckStringFormatParams<schemas.$ZodCUID2, "when">;
export declare function _cuid2<T extends schemas.$ZodCUID2>(Class: util.SchemaClass<T>, params?: string | $ZodCUID2Params | $ZodCheckCUID2Params): T;
export type $ZodULIDParams = StringFormatParams<schemas.$ZodULID, "when">;
export type $ZodCheckULIDParams = CheckStringFormatParams<schemas.$ZodULID, "when">;
export declare function _ulid<T extends schemas.$ZodULID>(Class: util.SchemaClass<T>, params?: string | $ZodULIDParams | $ZodCheckULIDParams): T;
export type $ZodXIDParams = StringFormatParams<schemas.$ZodXID, "when">;
export type $ZodCheckXIDParams = CheckStringFormatParams<schemas.$ZodXID, "when">;
export declare function _xid<T extends schemas.$ZodXID>(Class: util.SchemaClass<T>, params?: string | $ZodXIDParams | $ZodCheckXIDParams): T;
export type $ZodKSUIDParams = StringFormatParams<schemas.$ZodKSUID, "when">;
export type $ZodCheckKSUIDParams = CheckStringFormatParams<schemas.$ZodKSUID, "when">;
export declare function _ksuid<T extends schemas.$ZodKSUID>(Class: util.SchemaClass<T>, params?: string | $ZodKSUIDParams | $ZodCheckKSUIDParams): T;
export type $ZodIPv4Params = StringFormatParams<schemas.$ZodIPv4, "pattern" | "when" | "version">;
export type $ZodCheckIPv4Params = CheckStringFormatParams<schemas.$ZodIPv4, "pattern" | "when" | "version">;
export declare function _ipv4<T extends schemas.$ZodIPv4>(Class: util.SchemaClass<T>, params?: string | $ZodIPv4Params | $ZodCheckIPv4Params): T;
export type $ZodIPv6Params = StringFormatParams<schemas.$ZodIPv6, "pattern" | "when" | "version">;
export type $ZodCheckIPv6Params = CheckStringFormatParams<schemas.$ZodIPv6, "pattern" | "when" | "version">;
export declare function _ipv6<T extends schemas.$ZodIPv6>(Class: util.SchemaClass<T>, params?: string | $ZodIPv6Params | $ZodCheckIPv6Params): T;
export type $ZodMACParams = StringFormatParams<schemas.$ZodMAC, "pattern" | "when">;
export type $ZodCheckMACParams = CheckStringFormatParams<schemas.$ZodMAC, "pattern" | "when">;
export declare function _mac<T extends schemas.$ZodMAC>(Class: util.SchemaClass<T>, params?: string | $ZodMACParams | $ZodCheckMACParams): T;
export type $ZodCIDRv4Params = StringFormatParams<schemas.$ZodCIDRv4, "pattern" | "when">;
export type $ZodCheckCIDRv4Params = CheckStringFormatParams<schemas.$ZodCIDRv4, "pattern" | "when">;
export declare function _cidrv4<T extends schemas.$ZodCIDRv4>(Class: util.SchemaClass<T>, params?: string | $ZodCIDRv4Params | $ZodCheckCIDRv4Params): T;
export type $ZodCIDRv6Params = StringFormatParams<schemas.$ZodCIDRv6, "pattern" | "when">;
export type $ZodCheckCIDRv6Params = CheckStringFormatParams<schemas.$ZodCIDRv6, "pattern" | "when">;
export declare function _cidrv6<T extends schemas.$ZodCIDRv6>(Class: util.SchemaClass<T>, params?: string | $ZodCIDRv6Params | $ZodCheckCIDRv6Params): T;
export type $ZodBase64Params = StringFormatParams<schemas.$ZodBase64, "pattern" | "when">;
export type $ZodCheckBase64Params = CheckStringFormatParams<schemas.$ZodBase64, "pattern" | "when">;
export declare function _base64<T extends schemas.$ZodBase64>(Class: util.SchemaClass<T>, params?: string | $ZodBase64Params | $ZodCheckBase64Params): T;
export type $ZodBase64URLParams = StringFormatParams<schemas.$ZodBase64URL, "pattern" | "when">;
export type $ZodCheckBase64URLParams = CheckStringFormatParams<schemas.$ZodBase64URL, "pattern" | "when">;
export declare function _base64url<T extends schemas.$ZodBase64URL>(Class: util.SchemaClass<T>, params?: string | $ZodBase64URLParams | $ZodCheckBase64URLParams): T;
export type $ZodE164Params = StringFormatParams<schemas.$ZodE164, "when">;
export type $ZodCheckE164Params = CheckStringFormatParams<schemas.$ZodE164, "when">;
export declare function _e164<T extends schemas.$ZodE164>(Class: util.SchemaClass<T>, params?: string | $ZodE164Params | $ZodCheckE164Params): T;
export type $ZodCreditCardParams = StringFormatParams<schemas.$ZodCreditCard, "pattern" | "when">;
export type $ZodCheckCreditCardParams = CheckStringFormatParams<schemas.$ZodCreditCard, "pattern" | "when">;
export declare function _creditCard<T extends schemas.$ZodCreditCard>(Class: util.SchemaClass<T>, params?: string | $ZodCreditCardParams | $ZodCheckCreditCardParams): T;
export type $ZodIBANParams = StringFormatParams<schemas.$ZodIBAN, "pattern" | "when">;
export type $ZodCheckIBANParams = CheckStringFormatParams<schemas.$ZodIBAN, "pattern" | "when">;
export declare function _iban<T extends schemas.$ZodIBAN>(Class: util.SchemaClass<T>, params?: string | $ZodIBANParams | $ZodCheckIBANParams): T;
export type $ZodJWTParams = StringFormatParams<schemas.$ZodJWT, "pattern" | "when">;
export type $ZodCheckJWTParams = CheckStringFormatParams<schemas.$ZodJWT, "pattern" | "when">;
export declare function _jwt<T extends schemas.$ZodJWT>(Class: util.SchemaClass<T>, params?: string | $ZodJWTParams | $ZodCheckJWTParams): T;
export declare const TimePrecision: {
readonly Any: null;
readonly Minute: -1;
readonly Second: 0;
readonly Millisecond: 3;
readonly Microsecond: 6;
};
export type $ZodISODateTimeParams = StringFormatParams<schemas.$ZodISODateTime, "pattern" | "when">;
export type $ZodCheckISODateTimeParams = CheckStringFormatParams<schemas.$ZodISODateTime, "pattern" | "when">;
export declare function _isoDateTime<T extends schemas.$ZodISODateTime>(Class: util.SchemaClass<T>, params?: string | $ZodISODateTimeParams | $ZodCheckISODateTimeParams): T;
export type $ZodISODateParams = StringFormatParams<schemas.$ZodISODate, "pattern" | "when">;
export type $ZodCheckISODateParams = CheckStringFormatParams<schemas.$ZodISODate, "pattern" | "when">;
export declare function _isoDate<T extends schemas.$ZodISODate>(Class: util.SchemaClass<T>, params?: string | $ZodISODateParams | $ZodCheckISODateParams): T;
export type $ZodISOTimeParams = StringFormatParams<schemas.$ZodISOTime, "pattern" | "when">;
export type $ZodCheckISOTimeParams = CheckStringFormatParams<schemas.$ZodISOTime, "pattern" | "when">;
export declare function _isoTime<T extends schemas.$ZodISOTime>(Class: util.SchemaClass<T>, params?: string | $ZodISOTimeParams | $ZodCheckISOTimeParams): T;
export type $ZodISODurationParams = StringFormatParams<schemas.$ZodISODuration, "when">;
export type $ZodCheckISODurationParams = CheckStringFormatParams<schemas.$ZodISODuration, "when">;
export declare function _isoDuration<T extends schemas.$ZodISODuration>(Class: util.SchemaClass<T>, params?: string | $ZodISODurationParams | $ZodCheckISODurationParams): T;
export type $ZodNumberParams = TypeParams<schemas.$ZodNumber<number>, "coerce"> & {
checks?: readonly checks.$ZodCheck<number>[];
};
export type $ZodNumberFormatParams = CheckTypeParams<schemas.$ZodNumberFormat, "format" | "coerce">;
export type $ZodCheckNumberFormatParams = CheckParams<checks.$ZodCheckNumberFormat, "format" | "when">;
export declare function _number<T extends schemas.$ZodNumber>(Class: util.SchemaClass<T>, params?: string | $ZodNumberParams): T;
export declare function _coercedNumber<T extends schemas.$ZodNumber>(Class: util.SchemaClass<T>, params?: string | $ZodNumberParams): T;
export declare function _int<T extends schemas.$ZodNumberFormat>(Class: util.SchemaClass<T>, params?: string | $ZodCheckNumberFormatParams): T;
export declare function _float32<T extends schemas.$ZodNumberFormat>(Class: util.SchemaClass<T>, params?: string | $ZodCheckNumberFormatParams): T;
export declare function _float64<T extends schemas.$ZodNumberFormat>(Class: util.SchemaClass<T>, params?: string | $ZodCheckNumberFormatParams): T;
export declare function _int32<T extends schemas.$ZodNumberFormat>(Class: util.SchemaClass<T>, params?: string | $ZodCheckNumberFormatParams): T;
export declare function _uint32<T extends schemas.$ZodNumberFormat>(Class: util.SchemaClass<T>, params?: string | $ZodCheckNumberFormatParams): T;
export type $ZodBooleanParams = TypeParams<schemas.$ZodBoolean<boolean>, "coerce">;
export declare function _boolean<T extends schemas.$ZodBoolean>(Class: util.SchemaClass<T>, params?: string | $ZodBooleanParams): T;
export declare function _coercedBoolean<T extends schemas.$ZodBoolean>(Class: util.SchemaClass<T>, params?: string | $ZodBooleanParams): T;
export type $ZodBigIntParams = TypeParams<schemas.$ZodBigInt<bigint>>;
export type $ZodBigIntFormatParams = CheckTypeParams<schemas.$ZodBigIntFormat, "format" | "coerce">;
export type $ZodCheckBigIntFormatParams = CheckParams<checks.$ZodCheckBigIntFormat, "format" | "when">;
export declare function _bigint<T extends schemas.$ZodBigInt>(Class: util.SchemaClass<T>, params?: string | $ZodBigIntParams): T;
export declare function _coercedBigint<T extends schemas.$ZodBigInt>(Class: util.SchemaClass<T>, params?: string | $ZodBigIntParams): T;
export declare function _int64<T extends schemas.$ZodBigIntFormat>(Class: util.SchemaClass<T>, params?: string | $ZodBigIntFormatParams): T;
export declare function _uint64<T extends schemas.$ZodBigIntFormat>(Class: util.SchemaClass<T>, params?: string | $ZodBigIntFormatParams): T;
export type $ZodSymbolParams = TypeParams<schemas.$ZodSymbol>;
export declare function _symbol<T extends schemas.$ZodSymbol>(Class: util.SchemaClass<T>, params?: string | $ZodSymbolParams): T;
export type $ZodUndefinedParams = TypeParams<schemas.$ZodUndefined>;
export declare function _undefined<T extends schemas.$ZodUndefined>(Class: util.SchemaClass<T>, params?: string | $ZodUndefinedParams): T;
export type $ZodNullParams = TypeParams<schemas.$ZodNull>;
export declare function _null<T extends schemas.$ZodNull>(Class: util.SchemaClass<T>, params?: string | $ZodNullParams): T;
export type $ZodAnyParams = TypeParams<schemas.$ZodAny>;
export declare function _any<T extends schemas.$ZodAny>(Class: util.SchemaClass<T>): T;
export type $ZodUnknownParams = TypeParams<schemas.$ZodUnknown>;
export declare function _unknown<T extends schemas.$ZodUnknown>(Class: util.SchemaClass<T>): T;
export type $ZodNeverParams = TypeParams<schemas.$ZodNever>;
export declare function _never<T extends schemas.$ZodNever>(Class: util.SchemaClass<T>, params?: string | $ZodNeverParams): T;
export type $ZodVoidParams = TypeParams<schemas.$ZodVoid>;
export declare function _void<T extends schemas.$ZodVoid>(Class: util.SchemaClass<T>, params?: string | $ZodVoidParams): T;
export type $ZodDateParams = TypeParams<schemas.$ZodDate, "coerce">;
export declare function _date<T extends schemas.$ZodDate>(Class: util.SchemaClass<T>, params?: string | $ZodDateParams): T;
export declare function _coercedDate<T extends schemas.$ZodDate>(Class: util.SchemaClass<T>, params?: string | $ZodDateParams): T;
export type $ZodNaNParams = TypeParams<schemas.$ZodNaN>;
export declare function _nan<T extends schemas.$ZodNaN>(Class: util.SchemaClass<T>, params?: string | $ZodNaNParams): T;
export type $ZodCheckLessThanParams = CheckParams<checks.$ZodCheckLessThan, "inclusive" | "value" | "when">;
export declare function _lt(value: util.Numeric, params?: string | $ZodCheckLessThanParams): checks.$ZodCheckLessThan<util.Numeric>;
export declare function _lte(value: util.Numeric, params?: string | $ZodCheckLessThanParams): checks.$ZodCheckLessThan<util.Numeric>;
export {
/** @deprecated Use `z.lte()` instead. */
_lte as _max, };
export type $ZodCheckGreaterThanParams = CheckParams<checks.$ZodCheckGreaterThan, "inclusive" | "value" | "when">;
export declare function _gt(value: util.Numeric, params?: string | $ZodCheckGreaterThanParams): checks.$ZodCheckGreaterThan;
export declare function _gte(value: util.Numeric, params?: string | $ZodCheckGreaterThanParams): checks.$ZodCheckGreaterThan;
export {
/** @deprecated Use `z.gte()` instead. */
_gte as _min, };
export declare function _positive(params?: string | $ZodCheckGreaterThanParams): checks.$ZodCheckGreaterThan;
export declare function _negative(params?: string | $ZodCheckLessThanParams): checks.$ZodCheckLessThan;
export declare function _nonpositive(params?: string | $ZodCheckLessThanParams): checks.$ZodCheckLessThan;
export declare function _nonnegative(params?: string | $ZodCheckGreaterThanParams): checks.$ZodCheckGreaterThan;
export type $ZodCheckMultipleOfParams = CheckParams<checks.$ZodCheckMultipleOf, "value" | "when">;
export declare function _multipleOf(value: number | bigint, params?: string | $ZodCheckMultipleOfParams): checks.$ZodCheckMultipleOf;
export type $ZodCheckMaxSizeParams = CheckParams<checks.$ZodCheckMaxSize, "maximum" | "when">;
export declare function _maxSize(maximum: number, params?: string | $ZodCheckMaxSizeParams): checks.$ZodCheckMaxSize<util.HasSize>;
export type $ZodCheckMinSizeParams = CheckParams<checks.$ZodCheckMinSize, "minimum" | "when">;
export declare function _minSize(minimum: number, params?: string | $ZodCheckMinSizeParams): checks.$ZodCheckMinSize<util.HasSize>;
export type $ZodCheckSizeEqualsParams = CheckParams<checks.$ZodCheckSizeEquals, "size" | "when">;
export declare function _size(size: number, params?: string | $ZodCheckSizeEqualsParams): checks.$ZodCheckSizeEquals<util.HasSize>;
export type $ZodCheckMaxLengthParams = CheckParams<checks.$ZodCheckMaxLength, "maximum" | "when">;
export declare function _maxLength(maximum: number, params?: string | $ZodCheckMaxLengthParams): checks.$ZodCheckMaxLength<util.HasLength>;
export type $ZodCheckMinLengthParams = CheckParams<checks.$ZodCheckMinLength, "minimum" | "when">;
export declare function _minLength(minimum: number, params?: string | $ZodCheckMinLengthParams): checks.$ZodCheckMinLength<util.HasLength>;
export type $ZodCheckLengthEqualsParams = CheckParams<checks.$ZodCheckLengthEquals, "length" | "when">;
export declare function _length(length: number, params?: string | $ZodCheckLengthEqualsParams): checks.$ZodCheckLengthEquals<util.HasLength>;
export type $ZodCheckRegexParams = CheckParams<checks.$ZodCheckRegex, "format" | "pattern" | "when">;
export declare function _regex(pattern: RegExp, params?: string | $ZodCheckRegexParams): checks.$ZodCheckRegex;
export type $ZodCheckLowerCaseParams = CheckParams<checks.$ZodCheckLowerCase, "format" | "when">;
export declare function _lowercase(params?: string | $ZodCheckLowerCaseParams): checks.$ZodCheckLowerCase;
export type $ZodCheckUpperCaseParams = CheckParams<checks.$ZodCheckUpperCase, "format" | "when">;
export declare function _uppercase(params?: string | $ZodCheckUpperCaseParams): checks.$ZodCheckUpperCase;
export type $ZodCheckIncludesParams = CheckParams<checks.$ZodCheckIncludes, "includes" | "format" | "when" | "pattern">;
export declare function _includes(includes: string, params?: string | $ZodCheckIncludesParams): checks.$ZodCheckIncludes;
export type $ZodCheckStartsWithParams = CheckParams<checks.$ZodCheckStartsWith, "prefix" | "format" | "when" | "pattern">;
export declare function _startsWith(prefix: string, params?: string | $ZodCheckStartsWithParams): checks.$ZodCheckStartsWith;
export type $ZodCheckEndsWithParams = CheckParams<checks.$ZodCheckEndsWith, "suffix" | "format" | "pattern" | "when">;
export declare function _endsWith(suffix: string, params?: string | $ZodCheckEndsWithParams): checks.$ZodCheckEndsWith;
export type $ZodCheckPropertyParams = CheckParams<checks.$ZodCheckProperty, "property" | "schema" | "when">;
export declare function _property<K extends string, T extends schemas.$ZodType>(property: K, schema: T, params?: string | $ZodCheckPropertyParams): checks.$ZodCheckProperty<{
[k in K]: util.Widen<core.input<T>>;
}>;
export type $ZodCheckPropertiesParams = CheckParams<checks.$ZodCheckProperties, "shape" | "when">;
export declare function _properties<Shape extends schemas.$ZodShape>(shape: Shape, params?: string | $ZodCheckPropertiesParams): checks.$ZodCheckProperties<Shape>;
export type $ZodCheckMimeTypeParams = CheckParams<checks.$ZodCheckMimeType, "mime" | "when">;
export declare function _mime(types: util.MimeTypes[], params?: string | $ZodCheckMimeTypeParams): checks.$ZodCheckMimeType;
export declare function _overwrite<T>(tx: (input: T) => T): checks.$ZodCheckOverwrite<T>;
export declare function _normalize(form?: "NFC" | "NFD" | "NFKC" | "NFKD" | (string & {})): checks.$ZodCheckOverwrite<string>;
export declare function _trim(): checks.$ZodCheckOverwrite<string>;
export declare function _toLowerCase(): checks.$ZodCheckOverwrite<string>;
export declare function _toUpperCase(): checks.$ZodCheckOverwrite<string>;
export declare function _slugify(): checks.$ZodCheckOverwrite<string>;
export type $ZodArrayParams = TypeParams<schemas.$ZodArray, "element">;
export declare function _array<T extends schemas.$ZodType>(Class: util.SchemaClass<schemas.$ZodArray>, element: T, params?: string | $ZodArrayParams): schemas.$ZodArray<T>;
export type $ZodObjectParams = TypeParams<schemas.$ZodObject, "shape" | "catchall">;
export type $ZodUnionParams = TypeParams<schemas.$ZodUnion, "options">;
export declare function _union<const T extends readonly schemas.$ZodObject[]>(Class: util.SchemaClass<schemas.$ZodUnion>, options: T, params?: string | $ZodUnionParams): schemas.$ZodUnion<T>;
export type $ZodXorParams = TypeParams<schemas.$ZodXor, "options">;
export declare function _xor<const T extends readonly schemas.$ZodObject[]>(Class: util.SchemaClass<schemas.$ZodXor>, options: T, params?: string | $ZodXorParams): schemas.$ZodXor<T>;
export interface $ZodTypeDiscriminableInternals<_Disc extends string = string> extends schemas._$ZodTypeInternals {
propValues: util.PropValues;
}
export interface $ZodTypeDiscriminable<_Disc extends string = string> extends schemas.SomeType {
_zod: $ZodTypeDiscriminableInternals;
}
export type $ZodDiscriminatedUnionParams = TypeParams<schemas.$ZodDiscriminatedUnion, "options" | "discriminator">;
export declare function _discriminatedUnion<Types extends [$ZodTypeDiscriminable, ...$ZodTypeDiscriminable[]], Disc extends string>(Class: util.SchemaClass<schemas.$ZodDiscriminatedUnion>, discriminator: Disc, options: Types, params?: string | $ZodDiscriminatedUnionParams): schemas.$ZodDiscriminatedUnion<Types, Disc>;
export type $ZodIntersectionParams = TypeParams<schemas.$ZodIntersection, "left" | "right">;
export declare function _intersection<T extends schemas.$ZodObject, U extends schemas.$ZodObject>(Class: util.SchemaClass<schemas.$ZodIntersection>, left: T, right: U): schemas.$ZodIntersection<T, U>;
export type $ZodTupleParams = TypeParams<schemas.$ZodTuple, "items" | "rest">;
export declare function _tuple<T extends readonly [schemas.$ZodType, ...schemas.$ZodType[]]>(Class: util.SchemaClass<schemas.$ZodTuple>, items: T, params?: string | $ZodTupleParams): schemas.$ZodTuple<T, null>;
export declare function _tuple<T extends readonly [schemas.$ZodType, ...schemas.$ZodType[]], Rest extends schemas.$ZodType>(Class: util.SchemaClass<schemas.$ZodTuple>, items: T, rest: Rest, params?: string | $ZodTupleParams): schemas.$ZodTuple<T, Rest>;
export type $ZodRecordParams = TypeParams<schemas.$ZodRecord, "keyType" | "valueType" | "partial">;
export declare function _record<Key extends schemas.$ZodRecordKey, Value extends schemas.$ZodObject>(Class: util.SchemaClass<schemas.$ZodRecord>, keyType: Key, valueType: Value, params?: string | $ZodRecordParams): schemas.$ZodRecord<Key, Value>;
export type $ZodMapParams = TypeParams<schemas.$ZodMap, "keyType" | "valueType">;
export declare function _map<Key extends schemas.$ZodObject, Value extends schemas.$ZodObject>(Class: util.SchemaClass<schemas.$ZodMap>, keyType: Key, valueType: Value, params?: string | $ZodMapParams): schemas.$ZodMap<Key, Value>;
export type $ZodSetParams = TypeParams<schemas.$ZodSet, "valueType">;
export declare function _set<Value extends schemas.$ZodObject>(Class: util.SchemaClass<schemas.$ZodSet>, valueType: Value, params?: string | $ZodSetParams): schemas.$ZodSet<Value>;
export type $ZodEnumParams = TypeParams<schemas.$ZodEnum, "entries">;
export declare function _enum<const T extends string[]>(Class: util.SchemaClass<schemas.$ZodEnum>, values: T, params?: string | $ZodEnumParams): schemas.$ZodEnum<util.ToEnum<T[number]>>;
export declare function _enum<T extends util.EnumLike>(Class: util.SchemaClass<schemas.$ZodEnum>, entries: T, params?: string | $ZodEnumParams): schemas.$ZodEnum<T>;
/** @deprecated This API has been merged into `z.enum()`. Use `z.enum()` instead.
*
* ```ts
* enum Colors { red, green, blue }
* z.enum(Colors);
* ```
*/
export declare function _nativeEnum<T extends util.EnumLike>(Class: util.SchemaClass<schemas.$ZodEnum>, entries: T, params?: string | $ZodEnumParams): schemas.$ZodEnum<T>;
export type $ZodLiteralParams = TypeParams<schemas.$ZodLiteral, "values">;
export declare function _literal<const T extends Array<util.Literal>>(Class: util.SchemaClass<schemas.$ZodLiteral>, value: T, params?: string | $ZodLiteralParams): schemas.$ZodLiteral<T[number]>;
export declare function _literal<const T extends util.Literal>(Class: util.SchemaClass<schemas.$ZodLiteral>, value: T, params?: string | $ZodLiteralParams): schemas.$ZodLiteral<T>;
export type $ZodFileParams = TypeParams<schemas.$ZodFile>;
export declare function _file(Class: util.SchemaClass<schemas.$ZodFile>, params?: string | $ZodFileParams): schemas.$ZodFile;
export type $ZodTransformParams = TypeParams<schemas.$ZodTransform, "transform">;
export declare function _transform<I = unknown, O = I>(Class: util.SchemaClass<schemas.$ZodTransform>, fn: (input: I, ctx?: schemas.ParsePayload) => O): schemas.$ZodTransform<Awaited<O>, I>;
export type $ZodOptionalParams = TypeParams<schemas.$ZodOptional, "innerType">;
export declare function _optional<T extends schemas.$ZodObject>(Class: util.SchemaClass<schemas.$ZodOptional>, innerType: T): schemas.$ZodOptional<T>;
export type $ZodNullableParams = TypeParams<schemas.$ZodNullable, "innerType">;
export declare function _nullable<T extends schemas.$ZodObject>(Class: util.SchemaClass<schemas.$ZodNullable>, innerType: T): schemas.$ZodNullable<T>;
export type $ZodDefaultParams = TypeParams<schemas.$ZodDefault, "innerType" | "defaultValue">;
export declare function _default<T extends schemas.$ZodObject>(Class: util.SchemaClass<schemas.$ZodDefault>, innerType: T, defaultValue: util.NoUndefined<core.output<T>> | (() => util.NoUndefined<core.output<T>>)): schemas.$ZodDefault<T>;
export type $ZodNonOptionalParams = TypeParams<schemas.$ZodNonOptional, "innerType">;
export declare function _nonoptional<T extends schemas.$ZodObject>(Class: util.SchemaClass<schemas.$ZodNonOptional>, innerType: T, params?: string | $ZodNonOptionalParams): schemas.$ZodNonOptional<T>;
export type $ZodSuccessParams = TypeParams<schemas.$ZodSuccess, "innerType">;
export declare function _success<T extends schemas.$ZodObject>(Class: util.SchemaClass<schemas.$ZodSuccess>, innerType: T): schemas.$ZodSuccess<T>;
export type $ZodCatchParams = TypeParams<schemas.$ZodCatch, "innerType" | "catchValue">;
export declare function _catch<T extends schemas.$ZodObject>(Class: util.SchemaClass<schemas.$ZodCatch>, innerType: T, catchValue: core.output<T> | ((ctx: schemas.$ZodCatchCtx) => core.output<T>)): schemas.$ZodCatch<T>;
export type $ZodPipeParams = TypeParams<schemas.$ZodPipe, "in" | "out">;
export declare function _pipe<const A extends schemas.$ZodType, B extends schemas.$ZodType<unknown, core.output<A>> = schemas.$ZodType<unknown, core.output<A>>>(Class: util.SchemaClass<schemas.$ZodPipe>, in_: A, out: B | schemas.$ZodType<unknown, core.output<A>>): schemas.$ZodPipe<A, B>;
export type $ZodReadonlyParams = TypeParams<schemas.$ZodReadonly, "innerType">;
export declare function _readonly<T extends schemas.$ZodObject>(Class: util.SchemaClass<schemas.$ZodReadonly>, innerType: T): schemas.$ZodReadonly<T>;
export type $ZodTemplateLiteralParams = TypeParams<schemas.$ZodTemplateLiteral, "parts">;
export declare function _templateLiteral<const Parts extends schemas.$ZodTemplateLiteralPart[]>(Class: util.SchemaClass<schemas.$ZodTemplateLiteral>, parts: Parts, params?: string | $ZodTemplateLiteralParams): schemas.$ZodTemplateLiteral<schemas.$PartsToTemplateLiteral<Parts>>;
export type $ZodLazyParams = TypeParams<schemas.$ZodLazy, "getter">;
export declare function _lazy<T extends schemas.$ZodType>(Class: util.SchemaClass<schemas.$ZodLazy>, getter: () => T): schemas.$ZodLazy<T>;
export type $ZodPromiseParams = TypeParams<schemas.$ZodPromise, "innerType">;
export declare function _promise<T extends schemas.$ZodObject>(Class: util.SchemaClass<schemas.$ZodPromise>, innerType: T): schemas.$ZodPromise<T>;
export type $ZodCustomParams = CheckTypeParams<schemas.$ZodCustom, "fn">;
export declare function _custom<O = unknown, I = O>(Class: util.SchemaClass<schemas.$ZodCustom>, fn: (data: O) => unknown, _params: string | $ZodCustomParams | undefined): schemas.$ZodCustom<O, I>;
export declare function _refine<O = unknown, I = O>(Class: util.SchemaClass<schemas.$ZodCustom>, fn: (data: O) => unknown, _params: string | $ZodCustomParams | undefined): schemas.$ZodCustom<O, I>;
export type $ZodSuperRefineIssue<T extends errors.$ZodIssueBase = errors.$ZodIssue> = T extends any ? RawIssue<T> : never;
type RawIssue<T extends errors.$ZodIssueBase> = T extends any ? util.Flatten<util.MakePartial<T, "message" | "path"> & {
/** The schema or check that originated this issue. */
readonly inst?: schemas.$ZodType | checks.$ZodCheck;
/** If `true`, Zod will execute subsequent checks/refinements instead of immediately aborting */
readonly continue?: boolean | undefined;
} & Record<string, unknown>> : never;
export interface $RefinementCtx<T = unknown> extends schemas.ParsePayload<T> {
addIssue(arg: string | $ZodSuperRefineIssue): void;
}
export interface $ZodSuperRefineParams {
/** If provided, the refinement runs only when this returns `true`. By default, it is skipped if prior parsing produced aborting issues. */
when?: ((payload: schemas.ParsePayload) => boolean) | undefined;
}
export declare function _superRefine<T>(fn: (arg: T, payload: $RefinementCtx<T>) => void | Promise<void>, params?: $ZodSuperRefineParams): checks.$ZodCheck<T>;
export declare function _check<O = unknown>(fn: schemas.CheckFn<O>, params?: string | $ZodCustomParams): checks.$ZodCheck<O>;
export declare function describe<T>(description: string): checks.$ZodCheck<T>;
export declare function meta<T>(metadata: registries.GlobalMeta): checks.$ZodCheck<T>;
export interface $ZodStringBoolParams extends TypeParams {
truthy?: string[];
falsy?: string[];
/**
* Options: `"sensitive"`, `"insensitive"`
*
* @default `"insensitive"`
*/
case?: "sensitive" | "insensitive" | undefined;
}
export declare function _stringbool(Classes: {
Codec?: typeof schemas.$ZodCodec;
Boolean?: typeof schemas.$ZodBoolean;
String?: typeof schemas.$ZodString;
}, _params?: string | $ZodStringBoolParams): schemas.$ZodCodec<schemas.$ZodString, schemas.$ZodBoolean>;
export declare function _stringFormat<Format extends string>(Class: typeof schemas.$ZodCustomStringFormat, format: Format, fnOrRegex: ((arg: string) => util.MaybeAsync<unknown>) | RegExp, _params?: string | $ZodStringFormatParams): schemas.$ZodCustomStringFormat<Format>;
@@ -0,0 +1,70 @@
MIT License
Copyright (c) Pooya Parsa <pooya@pi0.io> - Daniel Roe <daniel@roe.dev>
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.
---
Copyright Joyent, Inc. and other Node 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.
---
Bundled zeptomatch (https://github.com/fabiospampinato/zeptomatch)
The MIT License (MIT)
Copyright (c) 2023-present Fabio Spampinato
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,159 @@
import {flowParseAssignableListItemTypes} from "../plugins/flow";
import {tsParseAssignableListItemTypes, tsParseModifiers} from "../plugins/typescript";
import {
eat,
IdentifierRole,
match,
next,
popTypeContext,
pushTypeContext,
} from "../tokenizer/index";
import {ContextualKeyword} from "../tokenizer/keywords";
import {TokenType, TokenType as tt} from "../tokenizer/types";
import {isFlowEnabled, isTypeScriptEnabled, state} from "./base";
import {parseIdentifier, parseMaybeAssign, parseObj} from "./expression";
import {expect, unexpected} from "./util";
export function parseSpread() {
next();
parseMaybeAssign(false);
}
export function parseRest(isBlockScope) {
next();
parseBindingAtom(isBlockScope);
}
export function parseBindingIdentifier(isBlockScope) {
parseIdentifier();
markPriorBindingIdentifier(isBlockScope);
}
export function parseImportedIdentifier() {
parseIdentifier();
state.tokens[state.tokens.length - 1].identifierRole = IdentifierRole.ImportDeclaration;
}
export function markPriorBindingIdentifier(isBlockScope) {
let identifierRole;
if (state.scopeDepth === 0) {
identifierRole = IdentifierRole.TopLevelDeclaration;
} else if (isBlockScope) {
identifierRole = IdentifierRole.BlockScopedDeclaration;
} else {
identifierRole = IdentifierRole.FunctionScopedDeclaration;
}
state.tokens[state.tokens.length - 1].identifierRole = identifierRole;
}
// Parses lvalue (assignable) atom.
export function parseBindingAtom(isBlockScope) {
switch (state.type) {
case tt._this: {
// In TypeScript, "this" may be the name of a parameter, so allow it.
const oldIsType = pushTypeContext(0);
next();
popTypeContext(oldIsType);
return;
}
case tt._yield:
case tt.name: {
state.type = tt.name;
parseBindingIdentifier(isBlockScope);
return;
}
case tt.bracketL: {
next();
parseBindingList(tt.bracketR, isBlockScope, true /* allowEmpty */);
return;
}
case tt.braceL:
parseObj(true, isBlockScope);
return;
default:
unexpected();
}
}
export function parseBindingList(
close,
isBlockScope,
allowEmpty = false,
allowModifiers = false,
contextId = 0,
) {
let first = true;
let hasRemovedComma = false;
const firstItemTokenIndex = state.tokens.length;
while (!eat(close) && !state.error) {
if (first) {
first = false;
} else {
expect(tt.comma);
state.tokens[state.tokens.length - 1].contextId = contextId;
// After a "this" type in TypeScript, we need to set the following comma (if any) to also be
// a type token so that it will be removed.
if (!hasRemovedComma && state.tokens[firstItemTokenIndex].isType) {
state.tokens[state.tokens.length - 1].isType = true;
hasRemovedComma = true;
}
}
if (allowEmpty && match(tt.comma)) {
// Empty item; nothing further to parse for this item.
} else if (eat(close)) {
break;
} else if (match(tt.ellipsis)) {
parseRest(isBlockScope);
parseAssignableListItemTypes();
// Support rest element trailing commas allowed by TypeScript <2.9.
eat(TokenType.comma);
expect(close);
break;
} else {
parseAssignableListItem(allowModifiers, isBlockScope);
}
}
}
function parseAssignableListItem(allowModifiers, isBlockScope) {
if (allowModifiers) {
tsParseModifiers([
ContextualKeyword._public,
ContextualKeyword._protected,
ContextualKeyword._private,
ContextualKeyword._readonly,
ContextualKeyword._override,
]);
}
parseMaybeDefault(isBlockScope);
parseAssignableListItemTypes();
parseMaybeDefault(isBlockScope, true /* leftAlreadyParsed */);
}
function parseAssignableListItemTypes() {
if (isFlowEnabled) {
flowParseAssignableListItemTypes();
} else if (isTypeScriptEnabled) {
tsParseAssignableListItemTypes();
}
}
// Parses assignment pattern around given atom if possible.
export function parseMaybeDefault(isBlockScope, leftAlreadyParsed = false) {
if (!leftAlreadyParsed) {
parseBindingAtom(isBlockScope);
}
if (!eat(tt.eq)) {
return;
}
const eqIndex = state.tokens.length - 1;
parseMaybeAssign();
state.tokens[eqIndex].rhsEndIndex = state.tokens.length;
}
@@ -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 PencilLine = createLucideIcon("PencilLine", [
["path", { d: "M12 20h9", key: "t2du7b" }],
[
"path",
{
d: "M16.376 3.622a1 1 0 0 1 3.002 3.002L7.368 18.635a2 2 0 0 1-.855.506l-2.872.838a.5.5 0 0 1-.62-.62l.838-2.872a2 2 0 0 1 .506-.854z",
key: "1ykcvy"
}
],
["path", { d: "m15 5 3 3", key: "1w25hb" }]
]);
export { PencilLine as default };
//# sourceMappingURL=pencil-line.js.map
@@ -0,0 +1,78 @@
// Zod 3 compat layer
import * as core from "../core/index.js";
import type { ZodType } from "./schemas.js";
/** @deprecated Use `z.output<T>` instead. */
export type TypeOf<T> = core.output<T>;
/** @deprecated Use `z.output<T>` instead. */
export type Infer<T> = core.output<T>;
/** @deprecated Use `z.core.$ZodTypes` instead */
export type ZodFirstPartySchemaTypes = core.$ZodTypes;
/** @deprecated Use the raw string literal codes instead, e.g. "invalid_type". */
export const ZodIssueCode = {
invalid_type: "invalid_type",
too_big: "too_big",
too_small: "too_small",
invalid_format: "invalid_format",
not_multiple_of: "not_multiple_of",
unrecognized_keys: "unrecognized_keys",
invalid_union: "invalid_union",
invalid_key: "invalid_key",
invalid_element: "invalid_element",
invalid_value: "invalid_value",
custom: "custom",
} as const;
/** @deprecated Use `z.core.$ZodFlattenedError<z.output<T>>` instead; it takes an inferred type, not a schema. */
export type inferFlattenedErrors<T extends core.$ZodType, U = string> = core.$ZodFlattenedError<core.output<T>, U>;
/** @deprecated Use `z.core.$ZodFormattedError<z.output<T>>` instead; it takes an inferred type, not a schema. */
export type inferFormattedError<T extends core.$ZodType<any, any>, U = string> = core.$ZodFormattedError<
core.output<T>,
U
>;
/** Use `z.$brand` instead */
export type BRAND<T extends string | number | symbol = string | number | symbol> = {
[core.$brand]: { [k in T]: true };
};
export { $brand, config } from "../core/index.js";
/** @deprecated Use `z.config(params)` instead. */
export function setErrorMap(map: core.$ZodErrorMap): void {
core.config({
customError: map,
});
}
/** @deprecated Use `z.config()` instead. */
export function getErrorMap(): core.$ZodErrorMap<core.$ZodIssue> | undefined {
return core.config().customError;
}
/** @deprecated Use z.ZodType (without generics) instead. */
export type ZodTypeAny<
Output = unknown,
Input = unknown,
Internals extends core.$ZodTypeInternals<Output, Input> = core.$ZodTypeInternals<Output, Input>,
> = ZodType<Output, Input, Internals>;
/** @deprecated Use `z.ZodType` */
export type ZodSchema<
Output = unknown,
Input = unknown,
Internals extends core.$ZodTypeInternals<Output, Input> = core.$ZodTypeInternals<Output, Input>,
> = ZodType<Output, Input, Internals>;
/** @deprecated Use `z.ZodType` */
export type Schema<
Output = unknown,
Input = unknown,
Internals extends core.$ZodTypeInternals<Output, Input> = core.$ZodTypeInternals<Output, Input>,
> = ZodType<Output, Input, Internals>;
/** Included for Zod 3 compatibility */
export type ZodRawShape = core.$ZodShape;
/** @deprecated Do not use. Stub definition, only included for zod-to-json-schema compatibility. */
export enum ZodFirstPartyTypeKind {}
@@ -0,0 +1,70 @@
import { ChildProcess, SpawnOptions } from 'node:child_process';
import { Readable } from 'node:stream';
declare class NonZeroExitError extends Error {
readonly result: Result;
readonly output?: Output;
get exitCode(): number | undefined;
constructor(result: Result, output?: Output);
}
interface Output {
stderr: string;
stdout: string;
exitCode: number | undefined;
}
interface PipeOptions extends Options {
}
type KillSignal = Parameters<ChildProcess['kill']>[0];
interface OutputApi extends AsyncIterable<string> {
pipe(command: string, args?: string[], options?: Partial<PipeOptions>): Result;
process: ChildProcess | undefined;
kill(signal?: KillSignal): boolean;
get pid(): number | undefined;
get aborted(): boolean;
get killed(): boolean;
get exitCode(): number | undefined;
}
type Result = PromiseLike<Output> & OutputApi;
interface Options {
signal: AbortSignal;
nodeOptions: SpawnOptions;
timeout: number;
persist: boolean;
stdin: ExecProcess;
throwOnError: boolean;
}
interface TinyExec {
(command: string, args?: string[], options?: Partial<Options>): Result;
}
declare class ExecProcess implements Result {
protected _process?: ChildProcess;
protected _aborted: boolean;
protected _options: Partial<Options>;
protected _command: string;
protected _args: string[];
protected _resolveClose?: () => void;
protected _processClosed: Promise<void>;
protected _thrownError?: Error;
get process(): ChildProcess | undefined;
get pid(): number | undefined;
get exitCode(): number | undefined;
constructor(command: string, args?: string[], options?: Partial<Options>);
kill(signal?: KillSignal): boolean;
get aborted(): boolean;
get killed(): boolean;
pipe(command: string, args?: string[], options?: Partial<PipeOptions>): Result;
[Symbol.asyncIterator](): AsyncIterator<string>;
protected _waitForOutput(): Promise<Output>;
then<TResult1 = Output, TResult2 = never>(onfulfilled?: ((value: Output) => TResult1 | PromiseLike<TResult1>) | null, onrejected?: ((reason: unknown) => TResult2 | PromiseLike<TResult2>) | null): Promise<TResult1 | TResult2>;
protected _streamOut?: Readable;
protected _streamErr?: Readable;
spawn(): void;
protected _resetState(): void;
protected _onError: (err: Error) => void;
protected _onClose: () => void;
}
declare const x: TinyExec;
declare const exec: TinyExec;
export { ExecProcess, type KillSignal, NonZeroExitError, type Options, type Output, type OutputApi, type PipeOptions, type Result, type TinyExec, exec, x };
@@ -0,0 +1 @@
{"version":3,"names":["getAssignmentIdentifiers","node","search","concat","ids","Object","create","length","id","pop","type","push","elements","left","properties","value","argument","operator","name"],"sources":["../../src/retrievers/getAssignmentIdentifiers.ts"],"sourcesContent":["import type * as t from \"../index.ts\";\n\n/**\n * For the given node, generate a map from assignment id names to the identifier node.\n * Unlike getBindingIdentifiers, this function does not handle declarations and imports.\n * @param node the assignment expression or forXstatement\n * @returns an object map\n * @see getBindingIdentifiers\n */\nexport default function getAssignmentIdentifiers(\n node: t.Node | t.Node[],\n): Record<string, t.Identifier> {\n // null represents holes in an array pattern\n const search: (t.Node | null)[] = [].concat(node);\n const ids = Object.create(null);\n\n while (search.length) {\n const id = search.pop();\n if (!id) continue;\n\n switch (id.type) {\n case \"ArrayPattern\":\n search.push(...id.elements);\n break;\n\n case \"AssignmentExpression\":\n case \"AssignmentPattern\":\n case \"ForInStatement\":\n case \"ForOfStatement\":\n search.push(id.left);\n break;\n\n case \"ObjectPattern\":\n search.push(...id.properties);\n break;\n\n case \"ObjectProperty\":\n search.push(id.value);\n break;\n\n case \"RestElement\":\n case \"UpdateExpression\":\n search.push(id.argument);\n break;\n\n case \"UnaryExpression\":\n if (id.operator === \"delete\") {\n search.push(id.argument);\n }\n break;\n\n case \"Identifier\":\n ids[id.name] = id;\n break;\n\n default:\n break;\n }\n }\n\n return ids;\n}\n"],"mappings":";;;;;;AASe,SAASA,wBAAwBA,CAC9CC,IAAuB,EACO;EAE9B,MAAMC,MAAyB,GAAG,EAAE,CAACC,MAAM,CAACF,IAAI,CAAC;EACjD,MAAMG,GAAG,GAAGC,MAAM,CAACC,MAAM,CAAC,IAAI,CAAC;EAE/B,OAAOJ,MAAM,CAACK,MAAM,EAAE;IACpB,MAAMC,EAAE,GAAGN,MAAM,CAACO,GAAG,CAAC,CAAC;IACvB,IAAI,CAACD,EAAE,EAAE;IAET,QAAQA,EAAE,CAACE,IAAI;MACb,KAAK,cAAc;QACjBR,MAAM,CAACS,IAAI,CAAC,GAAGH,EAAE,CAACI,QAAQ,CAAC;QAC3B;MAEF,KAAK,sBAAsB;MAC3B,KAAK,mBAAmB;MACxB,KAAK,gBAAgB;MACrB,KAAK,gBAAgB;QACnBV,MAAM,CAACS,IAAI,CAACH,EAAE,CAACK,IAAI,CAAC;QACpB;MAEF,KAAK,eAAe;QAClBX,MAAM,CAACS,IAAI,CAAC,GAAGH,EAAE,CAACM,UAAU,CAAC;QAC7B;MAEF,KAAK,gBAAgB;QACnBZ,MAAM,CAACS,IAAI,CAACH,EAAE,CAACO,KAAK,CAAC;QACrB;MAEF,KAAK,aAAa;MAClB,KAAK,kBAAkB;QACrBb,MAAM,CAACS,IAAI,CAACH,EAAE,CAACQ,QAAQ,CAAC;QACxB;MAEF,KAAK,iBAAiB;QACpB,IAAIR,EAAE,CAACS,QAAQ,KAAK,QAAQ,EAAE;UAC5Bf,MAAM,CAACS,IAAI,CAACH,EAAE,CAACQ,QAAQ,CAAC;QAC1B;QACA;MAEF,KAAK,YAAY;QACfZ,GAAG,CAACI,EAAE,CAACU,IAAI,CAAC,GAAGV,EAAE;QACjB;MAEF;QACE;IACJ;EACF;EAEA,OAAOJ,GAAG;AACZ","ignoreList":[]}
@@ -0,0 +1,16 @@
(function(f){function e(){var i=f();return i.default||i}if(typeof exports=="object"&&typeof module=="object")module.exports=e();else if(typeof define=="function"&&define.amd)define(e);else{var t=typeof globalThis<"u"?globalThis:typeof global<"u"?global:typeof self<"u"?self:this||{};t.prettierPlugins=t.prettierPlugins||{},t.prettierPlugins.babel=e()}})(function(){"use strict";var qt=Object.defineProperty;var si=Object.getOwnPropertyDescriptor;var ii=Object.getOwnPropertyNames;var ri=Object.prototype.hasOwnProperty;var $t=(a,e)=>{for(var t in e)qt(a,t,{get:e[t],enumerable:!0})},ai=(a,e,t,s)=>{if(e&&typeof e=="object"||typeof e=="function")for(let i of ii(e))!ri.call(a,i)&&i!==t&&qt(a,i,{get:()=>e[i],enumerable:!(s=si(e,i))||s.enumerable});return a};var ni=a=>ai(qt({},"__esModule",{value:!0}),a);var Ia={};$t(Ia,{parsers:()=>wa});var Me={};$t(Me,{__babel_estree:()=>ga,__js_expression:()=>xa,__ts_expression:()=>Pa,__vue_event_binding:()=>ma,__vue_expression:()=>xa,__vue_ts_event_binding:()=>ya,__vue_ts_expression:()=>Pa,babel:()=>ma,"babel-flow":()=>ti,"babel-ts":()=>ya});var X=(a,e)=>(t,s,...i)=>t|1&&s==null?void 0:(e.call(s)??s[a]).apply(s,i);var oi=String.prototype.replaceAll??function(a,e){return a.global?this.replace(a,e):this.split(a).join(e)},hi=X("replaceAll",function(){if(typeof this=="string")return oi}),U=hi;var ci=Object.hasOwn??Function.prototype.call.bind(Object.prototype.hasOwnProperty),lt=ci;var L=class{constructor(e,t,s){this.line=void 0,this.column=void 0,s!==void 0&&(this.index=void 0),this.line=e,this.column=t,s!==void 0&&(this.index=s)}},st=class{start;end;filename;identifierName;constructor(e,t){this.start=e,this.end=t}};function O(a,e){let{line:t,column:s,index:i}=a;return new L(t,s+e,i+e)}var Be="BABEL_PARSER_SOURCETYPE_MODULE_REQUIRED",li={ImportMetaOutsideModule:{message:`import.meta may appear only with 'sourceType: "module"'`,code:Be},ImportOutsideModule:{message:`'import' and 'export' may appear only with 'sourceType: "module"'`,code:Be}},Re={ArrayPattern:"array destructuring pattern",AssignmentExpression:"assignment expression",AssignmentPattern:"assignment expression",ArrowFunctionExpression:"arrow function expression",ConditionalExpression:"conditional expression",CatchClause:"catch clause",ForOfStatement:"for-of statement",ForInStatement:"for-in statement",ForStatement:"for-loop",FormalParameters:"function parameter list",Identifier:"identifier",ImportSpecifier:"import specifier",ImportDefaultSpecifier:"import default specifier",ImportNamespaceSpecifier:"import namespace specifier",ObjectPattern:"object destructuring pattern",ParenthesizedExpression:"parenthesized expression",RestElement:"rest element",UpdateExpression:{true:"prefix operation",false:"postfix operation"},VariableDeclarator:"variable declaration",YieldExpression:"yield expression"},wt=a=>a.type==="UpdateExpression"?Re.UpdateExpression[`${a.prefix}`]:Re[a.type],pi={AccessorIsGenerator:({kind:a})=>`A ${a}ter cannot be a generator.`,ArgumentsInClass:"'arguments' is only allowed in functions and class methods.",AsyncFunctionInSingleStatementContext:"Async functions can only be declared at the top level or inside a block.",AwaitBindingIdentifier:"Can not use 'await' as identifier inside an async function.",AwaitBindingIdentifierInStaticBlock:"Can not use 'await' as identifier inside a static block.",AwaitExpressionFormalParameter:"'await' is not allowed in async function parameters.",AwaitUsingNotInAsyncContext:"'await using' is only allowed within async functions and at the top levels of modules.",AwaitNotInAsyncContext:"'await' is only allowed within async functions and at the top levels of modules.",BadGetterArity:"A 'get' accessor must not have any formal parameters.",BadSetterArity:"A 'set' accessor must have exactly one formal parameter.",BadSetterRestParameter:"A 'set' accessor function argument must not be a rest parameter.",ConstructorClassField:"Classes may not have a field named 'constructor'.",ConstructorClassPrivateField:"Classes may not have a private field named '#constructor'.",ConstructorIsAccessor:"Class constructor may not be an accessor.",ConstructorIsAsync:"Constructor can't be an async function.",ConstructorIsGenerator:"Constructor can't be a generator.",DeclarationMissingInitializer:({kind:a})=>`Missing initializer in ${a} declaration.`,DecoratorArgumentsOutsideParentheses:"Decorator arguments must be moved inside parentheses: use '@(decorator(args))' instead of '@(decorator)(args)'.",DecoratorsBeforeAfterExport:"Decorators can be placed *either* before or after the 'export' keyword, but not in both locations at the same time.",DecoratorConstructor:"Decorators can't be used with a constructor. Did you mean '@dec class { ... }'?",DecoratorSemicolon:"Decorators must not be followed by a semicolon.",DecoratorStaticBlock:"Decorators can't be used with a static block.",DeferImportRequiresNamespace:'Only `import defer * as x from "./module"` is valid.',DeletePrivateField:"Deleting a private field is noLine truncated
- Did you mean \`export { '${a}' as '${e}' } from 'some-module'\`?`,ExportDefaultFromAsIdentifier:"'from' is not allowed as an identifier after 'export default'.",ForInOfLoopInitializer:({type:a})=>`'${a==="ForInStatement"?"for-in":"for-of"}' loop variable declaration may not have an initializer.`,ForInUsing:"For-in loop may not start with 'using' declaration.",ForOfAsync:"The left-hand side of a for-of loop may not be 'async'.",ForOfLet:"The left-hand side of a for-of loop may not start with 'let'.",GeneratorInSingleStatementContext:"Generators can only be declared at the top level or inside a block.",IllegalBreakContinue:({type:a})=>`Unsyntactic ${a==="BreakStatement"?"break":"continue"}.`,IllegalLanguageModeDirective:"Illegal 'use strict' directive in function with non-simple parameter list.",IllegalReturn:"'return' outside of function.",ImportBindingIsString:({importName:a})=>`A string literal cannot be used as an imported binding.
- Did you mean \`import { "${a}" as foo }\`?`,ImportCallArity:({phase:a})=>`\`import${a?`.${a}`:""}()\` requires exactly one or two arguments.`,ImportCallNotNewExpression:({phase:a})=>`Cannot use new with import${a?`.${a}`:""}().`,ImportCallSpreadArgument:({phase:a})=>`\`...\` is not allowed in \`import${a?`.${a}`:""}()\`.`,IncompatibleRegExpUVFlags:"The 'u' and 'v' regular expression flags cannot be enabled at the same time.",InvalidBigIntLiteral:"Invalid BigIntLiteral.",InvalidCodePoint:"Code point out of bounds.",InvalidCoverDiscardElement:"'void' must be followed by an expression when not used in a binding position.",InvalidCoverInitializedName:"Invalid shorthand property initializer.",InvalidDigit:({radix:a})=>`Expected number in radix ${a}.`,InvalidEscapeSequence:"Bad character escape sequence.",InvalidEscapeSequenceTemplate:"Invalid escape sequence in template.",InvalidEscapedReservedWord:({reservedWord:a})=>`Escape sequence in keyword ${a}.`,InvalidIdentifier:({identifierName:a})=>`Invalid identifier ${a}.`,InvalidLhs:({ancestor:a})=>`Invalid left-hand side in ${wt(a)}.`,InvalidLhsBinding:({ancestor:a})=>`Binding invalid left-hand side in ${wt(a)}.`,InvalidLhsOptionalChaining:({ancestor:a})=>`Invalid optional chaining in the left-hand side of ${wt(a)}.`,InvalidNumber:"Invalid number.",InvalidOrMissingExponent:"Floating-point numbers require a valid exponent after the 'e'.",InvalidOrUnexpectedToken:({unexpected:a})=>`Unexpected character '${a}'.`,InvalidParenthesizedAssignment:"Invalid parenthesized assignment pattern.",InvalidPrivateFieldResolution:({identifierName:a})=>`Private name #${a} is not defined.`,InvalidPropertyBindingPattern:"Binding member expression.",InvalidRestAssignmentPattern:"Invalid rest operator's argument.",LabelRedeclaration:({labelName:a})=>`Label '${a}' is already declared.`,LetInLexicalBinding:"'let' is disallowed as a lexically bound name.",LineTerminatorBeforeArrow:"No line break is allowed before '=>'.",MalformedRegExpFlags:"Invalid regular expression flag.",MissingClassName:"A class name is required.",MissingEqInAssignment:"Only '=' operator can be used for specifying default value.",MissingSemicolon:"Missing semicolon.",MissingPlugin:({missingPlugin:a})=>`This experimental syntax requires enabling the parser plugin: ${a.map(e=>JSON.stringify(e)).join(", ")}.`,MissingOneOfPlugins:({missingPlugin:a})=>`This experimental syntax requires enabling one of the following parser plugin(s): ${a.map(e=>JSON.stringify(e)).join(", ")}.`,MissingUnicodeEscape:"Expecting Unicode escape sequence \\uXXXX.",MixingCoalesceWithLogical:"Nullish coalescing operator(??) requires parens when mixing with logical operators.",ModuleAttributeInvalidValue:"Only string literals are allowed as module attribute values.",ModuleAttributesWithDuplicateKeys:({key:a})=>`Duplicate key "${a}" is not allowed in module attributes.`,ModuleExportNameHasLoneSurrogate:({surrogateCharCode:a})=>`An export name cannot include a lone surrogate, found '\\u${a.toString(16)}'.`,ModuleExportUndefined:({localName:a})=>`Export '${a}' is not defined.`,MultipleDefaultsInSwitch:"Multiple default clauses.",NewlineAfterThrow:"Illegal newline after throw.",NoCatchOrFinally:"Missing catch or finally clause.",NumberIdentifier:"Identifier directly after number.",NumericSeparatorInEscapeSequence:"Numeric separators are not allowed inside unicode escape sequences or hex escape sequences.",ObsoleteAwaitStar:"'await*' has been removed from the async functions proposal. Use Promise.all() instead.",OptionalChainingNoNew:"Constructors in/after an Optional Chain are not allowed.",OptionalChainingNoTemplate:"Tagged Template Literals are not allowed in optionalChain.",OverrideOnConstructor:"'override' modifier cannot appear on a constructor declaration.",ParamDupe:"Argument name clash.",PatternHasAccessor:"Object pattern can't contain getter or setter.",PatternHasMethod:"Object pattern can't contain methods.",PrivateInExpectedIn:({identifierName:a})=>`Private names are only allowed in property accesses (\`obj.#${a}\`) or in \`in\` expressions (\`#${a} in obj\`).`,PrivateNameRedeclaration:({identifierName:a})=>`Duplicate private name #${a}.`,RestTrailingComma:"Unexpected trailing comma after rest element.",SloppyFunction:"In non-strict mode code, functions can only be declared at top level or inside a block.",SloppyFunctionAnnexB:"In non-strict mode code, functions can only be declared at top level, inside a block, or as the body of an if statement.",SourcePhaseImportRequiresDefault:'Only `import source x from "./module"` is valid.',StaticPrototype:"Classes may not have static property named prototype.",SuperCallNotNewExpression:"Cannot use new with super(...).",SuperNotAllowed:"`super()` is only valid inside a class constructor of a subclass. Maybe a typo in the method name ('constructor') or not extending another class?",SuperPrivateField:"Private fields can't be accessed on super.",TrailingDecorator:"Decorators must be attached to a class eLine truncated
`:`\r
`):i=String.fromCharCode(s),++this.state.curLine,this.state.lineStart=this.state.pos,i}jsxReadString(t){let s="",i=++this.state.pos;for(;;){if(this.state.pos>=this.length)throw this.raise(l.UnterminatedString,this.state.startLoc);let r=this.input.charCodeAt(this.state.pos);if(r===t)break;r===38?(s+=this.input.slice(i,this.state.pos),s+=this.jsxReadEntity(),i=this.state.pos):tt(r)?(s+=this.input.slice(i,this.state.pos),s+=this.jsxReadNewLine(!1),i=this.state.pos):++this.state.pos}s+=this.input.slice(i,this.state.pos++),this.finishToken(130,s)}jsxReadEntity(){let t=++this.state.pos;if(this.codePointAtPos(this.state.pos)===35){++this.state.pos;let s=10;this.codePointAtPos(this.state.pos)===120&&(s=16,++this.state.pos);let i=this.readInt(s,void 0,!1,"bail");if(i!==null&&this.codePointAtPos(this.state.pos)===59)return++this.state.pos,String.fromCodePoint(i)}else{let s=0,i=!1;for(;s++<10&&this.state.pos<this.length&&!(i=this.codePointAtPos(this.state.pos)===59);)++this.state.pos;if(i){let r=this.input.slice(t,this.state.pos),n=void 0;if(++this.state.pos,n)return n}}return this.state.pos=t,"&"}jsxReadWord(){let t,s=this.state.pos;do t=this.input.charCodeAt(++this.state.pos);while(W(t)||t===45);this.finishToken(136,this.input.slice(s,this.state.pos))}jsxParseIdentifier(){let t=this.startNode();return this.match(136)?t.name=this.state.value:we(this.state.type)?t.name=z(this.state.type):this.unexpected(),this.next(),this.finishNode(t,"JSXIdentifier")}jsxParseNamespacedName(){let t=this.state.startLoc,s=this.jsxParseIdentifier();if(!this.eat(10))return s;let i=this.startNodeAt(t);return i.namespace=s,i.name=this.jsxParseIdentifier(),this.finishNode(i,"JSXNamespacedName")}jsxParseElementName(){let t=this.state.startLoc,s=this.jsxParseNamespacedName();if(s.type==="JSXNamespacedName")return s;for(;this.eat(12);){let i=this.startNodeAt(t);i.object=s,i.property=this.jsxParseIdentifier(),s=this.finishNode(i,"JSXMemberExpression")}return s}jsxParseAttributeValue(){let t;switch(this.state.type){case 2:return t=this.startNode(),this.setContext(w.brace),this.next(),t=this.jsxParseExpressionContainer(t,w.j_oTag),t.expression.type==="JSXEmptyExpression"&&this.raise(_.AttributeIsEmpty,t),t;case 138:case 130:return this.parseExprAtom();default:throw this.raise(_.UnsupportedJsxValue,this.state.startLoc)}}jsxParseEmptyExpression(){let t=this.startNodeAt(this.state.lastTokEndLoc);return this.finishNodeAt(t,"JSXEmptyExpression",this.state.startLoc)}jsxParseSpreadChild(t){return this.next(),t.expression=this.parseExpression(),this.setContext(w.j_expr),this.state.canStartJSXElement=!0,this.expect(4),this.finishNode(t,"JSXSpreadChild")}jsxParseExpressionContainer(t,s){if(this.match(4))t.expression=this.jsxParseEmptyExpression();else{let i=this.parseExpression();i.type==="SequenceExpression"&&!i.extra?.parenthesized&&this.raise(_.UnexpectedSequenceExpression,i.expressions[1]),t.expression=i}return this.setContext(s),this.state.canStartJSXElement=!0,this.expect(4),this.finishNode(t,"JSXExpressionContainer")}jsxParseAttribute(){if(this.match(2)){let s=this.startNode();return this.setContext(w.brace),this.next(),this.expect(17),s.argument=this.parseMaybeAssignAllowIn(),this.setContext(w.j_oTag),this.state.canStartJSXElement=!0,this.expect(4),this.finishNode(s,"JSXSpreadAttribute")}let t=this.startNode();return t.name=this.jsxParseNamespacedName(),t.value=this.eat(25)?this.jsxParseAttributeValue():null,this.finishNode(t,"JSXAttribute")}jsxParseOpeningElementAt(t){if(this.eat(139)){let i=this.startNodeAt(t);return this.finishNode(i,"JSXOpeningFragment")}let s=this.startNodeAt(t);return s.name=this.jsxParseElementName(),this.jsxParseOpeningElementAfterName(s)}jsxParseOpeningElementAfterName(t){let s=[];for(;!this.match(52)&&!this.match(139);)s.push(this.jsxParseAttribute());return t.attributes=s,t.selfClosing=this.eat(52),this.expect(139),this.finishNode(t,"JSXOpeningElement")}jsxParseClosingElementAt(t){if(this.eat(139)){let i=this.startNodeAt(t);return this.finishNode(i,"JSXClosingFragment")}let s=this.startNodeAt(t);return s.name=this.jsxParseElementName(),this.expect(139),this.finishNode(s,"JSXClosingElement")}jsxParseElementAt(t){let s=this.startNodeAt(t),i=[],r=this.jsxParseOpeningElementAt(t),n=null;if(!r.selfClosing){t:for(;;)switch(this.state.type){case 138:if(t=this.state.startLoc,this.next(),this.eat(52)){this.setLoc(t),n=this.jsxParseClosingElementAt(t);break t}i.push(this.jsxParseElementAt(t));break;case 137:i.push(this.parseLiteral(this.state.value,"JSXText"));break;case 2:{let o=this.startNode();this.setContext(w.brace),this.next(),this.match(17)?i.push(this.jsxParseSpreadChild(o)):i.push(this.jsxParseExpressionContainer(o,w.j_expr));break}default:this.unexpected()}q(r)&&!q(n)&&n!==null?this.raise(_.MissingClosingTagFragment,n):!q(r)&&q(n)?this.raise(_.MissingClosingTagElement,n,{openingTagName:Z(r.name)}):!q(r)&&!q(n)&&Z(n.name)!==Z(r.name)&&this.raise(_.MissingClosingTagElement,n,{openingTagName:Z(r.name)})}if(q(r)?(s.openingFrLine truncated
`,++t,x===13&&e.charCodeAt(t)===10&&++t,++i,f=s=t):r.unterminated(n,o,h):++t}return{pos:t,str:c,firstInvalidLoc:p,lineStart:s,curLine:i}}function sr(a,e,t,s){return a==="template"?e===96||e===36&&t.charCodeAt(s+1)===123:e===(a==="double"?34:39)}function ir(a,e,t,s,i,r){let n=!i;e++;let o=c=>({pos:e,ch:c,lineStart:t,curLine:s}),h=a.charCodeAt(e++);switch(h){case 110:return o(`
`);case 114:return o("\r");case 120:{let c;return{code:c,pos:e}=ae(a,e,t,s,2,!1,n,r),o(c===null?null:String.fromCharCode(c))}case 117:{let c;return{code:c,pos:e}=hs(a,e,t,s,n,r),o(c===null?null:String.fromCodePoint(c))}case 116:return o(" ");case 98:return o("\b");case 118:return o("\v");case 102:return o("\f");case 13:a.charCodeAt(e)===10&&++e;case 10:t=e,++s;case 8232:case 8233:return o("");case 56:case 57:if(i)return o(null);r.strictNumericEscape(e-1,t,s);default:if(h>=48&&h<=55){let c=e-1,f=/^[0-7]+/.exec(a.slice(c,e+2))[0],d=parseInt(f,8);d>255&&(f=f.slice(0,-1),d=parseInt(f,8)),e+=f.length-1;let x=a.charCodeAt(e);if(f!=="0"||x===56||x===57){if(i)return o(null);r.strictNumericEscape(c,t,s)}return o(String.fromCharCode(d))}return o(String.fromCharCode(h))}}function ae(a,e,t,s,i,r,n,o){let h=e,c;return{n:c,pos:e}=os(a,e,t,s,16,i,r,!1,o,!n),c===null&&(n?o.invalidEscapeSequence(h,t,s):e=h-1),{code:c,pos:e}}function os(a,e,t,s,i,r,n,o,h,c){let p=e,f=i===16?$e.hex:$e.decBinOct,d=i===16?Ct.hex:i===10?Ct.dec:i===8?Ct.oct:Ct.bin,x=!1,T=0;for(let D=0,v=r??1/0;D<v;++D){let E=a.charCodeAt(e),I;if(E===95&&o!=="bail"){let At=a.charCodeAt(e-1),ct=a.charCodeAt(e+1);if(o){if(Number.isNaN(ct)||!d(ct)||f.has(At)||f.has(ct)){if(c)return{n:null,pos:e};h.unexpectedNumericSeparator(e,t,s)}}else{if(c)return{n:null,pos:e};h.numericSeparatorInEscapeSequence(e,t,s)}++e;continue}if(E>=97?I=E-97+10:E>=65?I=E-65+10:er(E)?I=E-48:I=1/0,I>=i){if(I<=9&&c)return{n:null,pos:e};if(I<=9&&h.invalidDigit(e,t,s,i))I=0;else if(n)I=0,x=!0;else break}++e,T=T*i+I}return e===p||r!=null&&e-p!==r||x?{n:null,pos:e}:{n:T,pos:e}}function hs(a,e,t,s,i,r){let n=a.charCodeAt(e),o;if(n===123){if(++e,{code:o,pos:e}=ae(a,e,t,s,a.indexOf("}",e)-e,!0,i,r),++e,o!==null&&o>1114111)if(i)r.invalidCodePoint(e,t,s);else return{code:null,pos:e}}else({code:o,pos:e}=ae(a,e,t,s,4,!1,i,r));return{code:o,pos:e}}function ut(a,e,t){return new L(t,a-e,a)}var rr=new Set([103,109,115,105,121,117,100,118]),ne=class{constructor(e){let t=e.startIndex||0;this.type=e.type,this.value=e.value,this.start=t+e.start,this.end=t+e.end,this.loc=new st(e.startLoc,e.endLoc)}},Et,oe=class extends ie{isLookahead;tokens=[];constructor(e,t){super(),this.state=new re,this.state.init(e),this.input=t,this.length=t.length,this.comments=[],this.isLookahead=!1,(!Et||Et.length<(this.length+1)*2)&&(Et=new Uint32Array((this.length+1)*2)),this.locData=Et}setLoc(e){let t=this.offsetToSourcePos(e.index);this.locData[t*2]=e.line,this.locData[t*2+1]=e.column}getLoc(e){let t=this.offsetToSourcePos(e);return new L(this.locData[t*2],this.locData[t*2+1],e)}pushToken(e){this.tokens.length=this.state.tokensLength,this.tokens.push(e),++this.state.tokensLength}next(){this.checkKeywordEscapes(),this.optionFlags&512&&this.pushToken(new ne(this.state)),this.state.lastTokEndLoc=this.state.endLoc,this.state.lastTokStartLoc=this.state.startLoc,this.nextToken()}eat(e){return this.match(e)?(this.next(),!0):!1}match(e){return this.state.type===e}createLookaheadState(e){return{pos:e.pos,value:null,type:e.type,start:e.start,end:e.end,context:[this.curContext()],inType:e.inType,startLoc:e.startLoc,lastTokEndLoc:e.lastTokEndLoc,curLine:e.curLine,lineStart:e.lineStart,curPosition:e.curPosition}}lookahead(){let e=this.state;this.state=this.createLookaheadState(e),this.isLookahead=!0,this.nextToken(),this.isLookahead=!1;let t=this.state;return this.state=e,t}nextTokenStart(){return this.nextTokenStartSince(this.state.pos)}nextTokenStartSince(e){return Ht.lastIndex=e,Ht.test(this.input)?Ht.lastIndex:e}lookaheadCharCode(){return this.lookaheadCharCodeSince(this.state.pos)}lookaheadCharCodeSince(e){return this.input.charCodeAt(this.nextTokenStartSince(e))}nextTokenInLineStart(){return this.nextTokenInLineStartSince(this.state.pos)}nextTokenInLineStartSince(e){return Kt.lastIndex=e,Kt.test(this.input)?Kt.lastIndex:e}lookaheadInLineCharCode(){return this.input.charCodeAt(this.nextTokenInLineStart())}codePointAtPos(e){let t=this.input.charCodeAt(e);if((t&64512)===55296&&++e<this.input.length){let s=this.input.charCodeAt(e);(s&64512)===56320&&(t=65536+((t&1023)<<10)+(s&1023))}return t}setStrict(e){this.state.strict=e,e&&(this.state.strictErrors.forEach(([t,s])=>this.raise(t,s)),this.state.strictErrors.clear())}curContext(){return this.state.context[this.state.context.length-1]}nextToken(){if(this.skipSpace(),this.state.start=this.state.pos,this.isLookahead||(this.state.startLoc=this.state.curPosition()),this.state.pos>=this.length){this.finishToken(135);return}this.getTokenFromCode(this.codePointAtPos(this.state.pos))}skipBlockComment(e){let t;this.isLookahead||(t=this.state.curPosition());let s=this.state.pos,i=this.input.indexOf(e,s+2);if(i===-1)throw this.raise(l.UnterminatedComment,this.state.curPosition());for(this.state.pos=i+e.length,St.lastIndex=s+2;St.test(this.input)&&St.lastIndex<=i;)++this.state.curLine,this.state.lineStart=St.lastIndex;if(this.isLookahead)return;let r={type:"CommentBlock",value:this.input.slice(s+2,i),start:tLine truncated
`),cooked:r===null?null:r.slice(1,c)},o.tail=h,this.next();let f=this.finishNode(o,"TemplateElement");return this.resetEndLocation(f,O(this.state.lastTokEndLoc,c)),f}parseTemplate(e){let t=this.startNode(),s=this.parseTemplateElement(e),i=[s],r=[];for(;!s.tail;)r.push(this.parseTemplateSubstitution()),this.readTemplateContinuation(),i.push(s=this.parseTemplateElement(e));return t.expressions=r,t.quasis=i,this.finishNode(t,"TemplateLiteral")}parseTemplateSubstitution(){return this.parseExpression()}parseObjectLike(e,t,s){let i=!1,r=!0,n=this.startNode();for(n.properties=[],this.next();!this.match(e);){if(r)r=!1;else if(this.expect(8),this.match(e)){this.addTrailingCommaExtraToNode(n);break}let h;t?h=this.parseBindingProperty():(h=this.parsePropertyDefinition(s),i=this.checkProto(h,i,s)),n.properties.push(h)}this.next();let o=t?"ObjectPattern":"ObjectExpression";return this.finishNode(n,o)}addTrailingCommaExtraToNode(e){this.addExtra(e,"trailingComma",this.state.lastTokStartLoc.index),this.addExtra(e,"trailingCommaLoc",this.state.lastTokStartLoc,!1)}maybeAsyncOrAccessorProp(e){return!e.computed&&e.key.type==="Identifier"&&(this.isLiteralPropertyName()||this.match(0)||this.match(51))}parsePropertyDefinition(e){let t=[];if(this.match(22))for(this.hasPlugin("decorators")&&this.raise(l.UnsupportedPropertyDecorator,this.state.startLoc);this.match(22);)t.push(this.parseDecorator());let s=this.startNode(),i=!1,r=!1,n;if(this.match(17))return t.length&&this.unexpected(),this.parseSpread();t.length&&(s.decorators=t),s.method=!1,e&&(n=this.state.startLoc);let o=this.eat(51);this.parsePropertyNamePrefixOperator(s);let h=this.state.containsEsc;if(this.parsePropertyName(s,e),!o&&!h&&this.maybeAsyncOrAccessorProp(s)){let{key:c}=s,p=c.name;p==="async"&&!this.hasPrecedingLineBreak()&&(i=!0,this.resetPreviousNodeTrailingComments(c),o=this.eat(51),this.parsePropertyName(s)),(p==="get"||p==="set")&&(r=!0,this.resetPreviousNodeTrailingComments(c),s.kind=p,this.match(51)&&(o=!0,this.raise(l.AccessorIsGenerator,this.state.curPosition(),{kind:p}),this.next()),this.parsePropertyName(s))}return this.parseObjPropValue(s,n,o,i,!1,r,e)}getGetterSetterExpectedParamCount(e){return e.kind==="get"?0:1}getObjectOrClassMethodParams(e){return e.params}checkGetterSetterParams(e){let t=this.getGetterSetterExpectedParamCount(e),s=this.getObjectOrClassMethodParams(e);s.length!==t&&this.raise(e.kind==="get"?l.BadGetterArity:l.BadSetterArity,e),e.kind==="set"&&s[s.length-1]?.type==="RestElement"&&this.raise(l.BadSetterRestParameter,e)}parseObjectMethod(e,t,s,i,r){if(r){let n=this.parseMethod(e,t,!1,!1,!1,"ObjectMethod");return this.checkGetterSetterParams(n),n}if(s||t||this.match(6))return i&&this.unexpected(),e.kind="method",e.method=!0,this.parseMethod(e,t,s,!1,!1,"ObjectMethod")}parseObjectProperty(e,t,s,i){if(e.shorthand=!1,this.eat(10))return e.value=s?this.parseMaybeDefault(this.state.startLoc):this.parseMaybeAssignAllowInOrVoidPattern(4,i),this.finishObjectProperty(e);if(!e.computed&&e.key.type==="Identifier"){if(this.checkReservedWord(e.key.name,e.key.start,!0,!1),s)e.value=this.parseMaybeDefault(t,this.cloneIdentifier(e.key));else if(this.match(25)){let r=this.state.startLoc;i!=null?i.shorthandAssignLoc===null&&(i.shorthandAssignLoc=r):this.raise(l.InvalidCoverInitializedName,r),e.value=this.parseMaybeDefault(t,this.cloneIdentifier(e.key))}else e.value=this.cloneIdentifier(e.key);return e.shorthand=!0,this.finishObjectProperty(e)}}finishObjectProperty(e){return this.finishNode(e,"ObjectProperty")}parseObjPropValue(e,t,s,i,r,n,o){let h=this.parseObjectMethod(e,s,i,r,n)||this.parseObjectProperty(e,t,r,o);return h||this.unexpected(),h}parsePropertyName(e,t){if(this.eat(0))e.computed=!0,e.key=this.parseMaybeAssignAllowIn(),this.expect(1);else{let{type:s,value:i}=this.state,r;if(B(s))r=this.parseIdentifier(!0);else switch(s){case 131:r=this.parseNumericLiteral(i);break;case 130:r=this.parseStringLiteral(i);break;case 132:r=this.parseBigIntLiteral(i);break;case 134:{let n=this.state.startLoc;t!=null?t.privateKeyLoc===null&&(t.privateKeyLoc=n):this.raise(l.UnexpectedPrivateField,n),r=this.parsePrivateName();break}default:this.unexpected()}e.key=r,s!==134&&(e.computed=!1)}}initFunction(e,t){e.id=null,e.generator=!1,e.async=t}parseMethod(e,t,s,i,r,n,o=!1){this.initFunction(e,s),e.generator=t,this.scope.enter(530|(o?576:0)|(r?32:0)),this.prodParam.enter(Nt(s,e.generator)),this.parseFunctionParams(e,i);let h=this.parseFunctionBodyAndFinish(e,n,!0);return this.prodParam.exit(),this.scope.exit(),h}parseArrayLike(e,t){let s=this.startNode();return this.next(),s.elements=this.parseExprList(e,!0,t,s),this.finishNode(s,"ArrayExpression")}parseArrowExpression(e,t,s,i){this.scope.enter(518);let r=Nt(s,!1);return this.match(2)||(r|=this.prodParam.currentFlags()&24),this.prodParam.enter(r),this.initFunction(e,s),t&&this.setArrowFunctionParameters(e,t,i),this.parseFunctionBody(e,!0),this.prodParam.exit(),this.scope.exit(),this.finishNode(e,"ArrowFunctionExpressLine truncated
`||a==="\r"||a==="\u2028"||a==="\u2029";function wr(a,e,t){if(e===!1)return!1;let s=!!t?.backwards,i=a.charAt(e);if(s){if(a.charAt(e-1)==="\r"&&i===`
`)return e-2;if(xs(i))return e-1}else{if(i==="\r"&&a.charAt(e+1)===`
`)return e+2;if(xs(i))return e+1}return e}var Ps=wr;function Ir(a,e){return e===!1?!1:a.charAt(e)==="/"&&a.charAt(e+1)==="/"?ms(a,e):e}var gs=Ir;function Nr(a,e){let t=null,s=e;for(;s!==t;)t=s,s=ds(a,s),s=ys(a,s),s=gs(a,s),s=Ps(a,s);return s}var Ts=Nr;function bs(a){let e=[];for(let t of a)try{return t()}catch(s){e.push(s)}throw Object.assign(new Error("All combinations failed"),{errors:e})}function kr(a){if(!a.startsWith("#!"))return"";let e=a.indexOf(`
`);return e===-1?a:a.slice(0,e)}var Ft=kr;var vr=Array.prototype.findLast??function(a){for(let e=this.length-1;e>=0;e--){let t=this[e];if(a(t,e,this))return t}},Lr=X("findLast",function(){if(Array.isArray(this))return vr}),As=Lr;var Bt=Symbol.for("comments");function Dr(a){return this[a<0?this.length+a:a]}var Mr=X("at",function(){if(Array.isArray(this)||typeof this=="string")return Dr}),Ss=Mr;function J(a){let e=new Set(a);return t=>e.has(t?.type)}function rt(a){return a.range?.[1]??a.end}function N(a){let e=a.range?.[0]??a.start,t=(a.declaration?.decorators??a.decorators)?.[0];return t?Math.min(N(t),e):e}var Or=5,Fr=8,Br=8,Cs=a=>e=>e.label?k(e.label):N(e)+a,Rr=a=>a.__contentEnd??rt(a),Es=["ExpressionStatement","Directive","ImportDeclaration","ExportDefaultDeclaration","ExportNamedDeclaration","ExportAllDeclaration","ReturnStatement","ThrowStatement","DoWhileStatement"],Ur=new Map([["BreakStatement",Cs(Or)],["ContinueStatement",Cs(Fr)],["DebuggerStatement",a=>N(a)+Br],["VariableDeclaration",a=>k(Ss(0,a.declarations,-1))],...Es.map(a=>[a,Rr])]),Ne=J(Es);function k(a){let{type:e}=a;return e==="IfStatement"?k(a.alternate??a.consequent):e==="ForInStatement"||e==="ForOfStatement"||e==="ForStatement"||e==="LabeledStatement"||e==="WithStatement"||e==="WhileStatement"?k(a.body):Ur.get(e)?.(a)??rt(a)}var at=J(["Block","CommentBlock","MultiLine"]),ws=J(["Line","CommentLine","SingleLine","HashbangComment","HTMLOpen","HTMLClose","Hashbang","InterpreterDirective"]);function nt(a,e,t){if(!a.has(e)){let s=t(e);a.set(e,s)}return a.get(e)}var _r=new WeakMap;function Is(a){return nt(_r,a,e=>at(e)&&e.value[0]==="*"&&/@(?:type|satisfies)\b/.test(e.value))}function jr(a){return U(0,a,/[^\n]/g," ")}var Ns=jr;function Vr(a,e){for(let t of e){let s=N(t),i=k(t);a=a.slice(0,s)+Ns(a.slice(s,i))+a.slice(i)}return a}var qr=new WeakMap;function ks(a){let e=a[Bt];return nt(qr,e,t=>Vr(a.originalText,t))}function $r(a){if(!at(a))return[];if(!a.value.includes(`
`))return[];let e=[];for(let t of`*${a.value}*`.split(`
`)){if(t=t.trimStart(),!t.startsWith("*"))return[];e.push(t)}return e}var vs=new WeakMap;function zr(a){return nt(vs,a,$r)}function Ls(a){vs.delete(a)}function ke(a){return zr(a).length>0}function Ds(a){if(a.length<2)return;let e;for(let t=a.length-1;t>=0;t--){let s=a[t];if(e&&k(s)===N(e)&&ke(s)&&ke(e)&&(a.splice(t+1,1),s.value+="*//*"+e.value,s.range=[N(s),k(e)],Ls(s)),!ws(s)&&!at(s))throw new TypeError(`Unknown comment type: "${s.type}".`);e=s}}function Hr(a){return a!==null&&typeof a=="object"}var Ms=Hr;var gt=null;function Tt(a){if(gt!==null&&typeof gt.property){let e=gt;return gt=Tt.prototype=null,e}return gt=Tt.prototype=a??Object.create(null),new Tt}var Kr=10;for(let a=0;a<=Kr;a++)Tt();function ve(a){return Tt(a)}function Wr(a,e="type"){ve(a);function t(s){let i=s[e],r=a[i];if(!Array.isArray(r))throw Object.assign(new Error(`Missing visitor keys for '${i}'.`),{node:s});return r}return t}var Os=Wr;var u=[["elements"],["left","right"],["value"],["directives","body"],["label"],["callee","typeArguments","arguments"],["test","consequent","alternate"],["body","test"],["expression"],["left","right","body"],["id","typeParameters","params","predicate","returnType","body"],["object","property"],["properties"],["decorators","key","typeParameters","params","returnType","body"],["decorators","key","value"],["argument"],["expressions"],["id","init"],["body"],["decorators","id","typeParameters","superClass","superTypeArguments","mixins","implements","body"],["declaration","specifiers","source","attributes"],["local"],["exported"],["decorators","variance","key","typeAnnotation","value"],["id"],["key","value"],["elementType"],["id","typeParameters"],["id","typeParameters","extends","body"],["id","body"],["typeAnnotation"],["id","typeParameters","right"],["name","typeAnnotation"],["types"],["qualification","id"],["elementTypes"],["expression","typeAnnotation"],["params"],["members"],["objectType","indexType"],["decorators","key","typeAnnotation","value"],["id","typeParameters","params","returnType","body"],["key","typeParameters","params","returnType"],["typeParameters","params","returnType"],["parameterName","typeAnnotation"],["checkType","extendsType","trueType","falseType"],["typeParameter"],["literal"],["expression","typeArguments"],["decorators","key","typeAnnotation"],["argument","cases"],["pattern","body","guard"],["properties","rest"],["node"]],Fs={ArrayExpression:u[0],AssignmentExpression:u[1],BinaryExpression:u[1],InterpreterDirective:[],Directive:u[2],DirectiveLiteral:[],BlockStatement:u[3],BreakStatement:u[4],CallExpression:u[5],CatchClause:["param","body"],ConditionalExpression:u[6],ContinueStatement:u[4],DebuggerStatement:[],DoWhileStatement:u[7],EmptyStatement:[],ExpressionStatement:u[8],File:["program"],ForInStatement:u[9],ForStatement:["init","test","update","body"],FunctionDeclaration:u[10],FunctionExpression:u[10],Identifier:["typeAnnotation","decorators"],IfStatement:u[6],LabeledStatement:["label","body"],StringLiteral:[],NumericLiteral:[],NullLiteral:[],BooleanLiteral:[],RegExpLiteral:[],LogicalExpression:u[1],MemberExpression:u[11],NewExpression:u[5],Program:u[3],ObjectExpression:u[12],ObjectMethod:u[13],ObjectProperty:u[14],RestElement:["argument","typeAnnotation","decorators"],ReturnStatement:u[15],SequenceExpression:u[16],ParenthesizedExpression:u[8],SwitchCase:["test","consequent"],SwitchStatement:["discriminant","cases"],ThisExpression:[],ThrowStatement:u[15],TryStatement:["block","handler","finalizer"],UnaryExpression:u[15],UpdateExpression:u[15],VariableDeclaration:["declarations"],VariableDeclarator:u[17],WhileStatement:u[7],WithStatement:["object","body"],AssignmentPattern:["left","right","decorators","typeAnnotation"],ArrayPattern:["elements","typeAnnotation","decorators"],ArrowFunctionExpression:["typeParameters","params","predicate","returnType","body"],ClassBody:u[18],ClassExpression:u[19],ClassDeclaration:u[19],ExportAllDeclaration:["source","attributes","exported"],ExportDefaultDeclaration:["declaration"],ExportNamedDeclaration:u[20],ExportSpecifier:["local","exported"],ForOfStatement:u[9],ImportDeclaration:["specifiers","source","attributes"],ImportDefaultSpecifier:u[21],ImportNamespaceSpecifier:u[21],ImportSpecifier:["imported","local"],MetaProperty:["meta","property"],ClassMethod:u[13],ObjectPattern:["decorators","properties","typeAnnotation"],SpreadElement:u[15],Super:[],TaggedTemplateExpression:["tag","typeArguments","quasi"],TemplateElement:[],TemplateLiteral:["quasis","expressions"],YieldExpression:u[15],AwaitExpression:u[15],ImportExpression:["source","options"],BigIntLiteral:[],ExportNamespaceSpecifier:u[22],OptionalMemberExpression:u[11],OptionalCallExpression:u[5],ClassProperty:u[23],ClassPrivateProperty:u[23],ClassPrivateMethod:u[13],PrivateName:u[24],StaticBlock:u[18],ImportAttribute:u[25],AnyTypeAnnotation:[],ArrayTypeAnnotation:u[26],BooleanTypeAnnotation:[],BooleanLiteralTypeAnnotation:[],NullLiteralTypeAnnotation:[],ClassImplements:u[27],DeclareClass:["id","typePaLine truncated
$1 $2
`);a=a.replace(Vs,"").trimEnd();let s=Object.create(null),i=U(0,a,qs,"").replace(Vs,"").trimEnd(),r;for(;r=qs.exec(a);){let n=U(0,r[2],sa,"");if(typeof s[r[1]]=="string"||Array.isArray(s[r[1]])){let o=s[r[1]];s[r[1]]=[...aa,...Array.isArray(o)?o:[o],n]}else s[r[1]]=n}return{comments:i,pragmas:s}}var Hs=["noformat","noprettier"],Ks=["format","prettier"];function Ws(a){let e=Ft(a);e&&(a=a.slice(e.length+1));let t=$s(a),{pragmas:s,comments:i}=zs(t);return{shebang:e,text:a,pragmas:s,comments:i}}function Js(a){let{pragmas:e}=Ws(a);return Ks.some(t=>lt(e,t))}function Gs(a){let{pragmas:e}=Ws(a);return Hs.some(t=>lt(e,t))}function na(a){return a=typeof a=="function"?{parse:a}:a,{astFormat:"estree",hasPragma:Js,hasIgnorePragma:Gs,locStart:N,locEnd:k,...a}}var G=na;var jt="module",De="commonjs";function Xs(a){if(typeof a=="string"){if(a=a.toLowerCase(),/\.(?:mjs|mts)$/i.test(a))return jt;if(/\.(?:cjs|cts)$/i.test(a))return De}}function oa(a){let{type:e="JsExpressionRoot",expression:t,comments:s=t?.comments??[],text:i,rootMarker:r}=a,n={type:e,comments:s,range:[0,i.length],rootMarker:r};return t&&(delete t.comments,n.node=t),n}var Vt=oa;var ot=a=>G(ua(a)),ha={sourceType:jt,allowImportExportEverywhere:!0,allowReturnOutsideFunction:!0,allowNewTargetOutsideFunction:!0,allowSuperOutsideMethod:!0,allowUndeclaredExports:!0,errorRecovery:!0,createParenthesizedExpressions:!0,attachComment:!1,plugins:["doExpressions","exportDefaultFrom","functionBind","functionSent","throwExpressions",["partialApplication",{version:"2018-07"}],"decorators","moduleBlocks","asyncDoExpressions","destructuringPrivate","decoratorAutoAccessors","sourcePhaseImports","deferredImportEvaluation",["optionalChainingAssign",{version:"2023-07"}],["discardBinding",{syntaxType:"void"}]],tokens:!1,ranges:!1},Ys="v8intrinsic",Qs=[["pipelineOperator",{proposal:"hack",topicToken:"%"}],["pipelineOperator",{proposal:"fsharp"}]],j=(a,e=ha)=>({...e,plugins:[...e.plugins,...a]}),ca=/@(?:no)?flow\b/;function la(a,e){if(e?.endsWith(".js.flow"))return!0;let t=Ft(a);t&&(a=a.slice(t.length));let s=Ts(a,0);return s!==!1&&(a=a.slice(0,s)),ca.test(a)}function pa(a,e,t){let s=a(e,t),i=s.errors.find(r=>!da.has(r.reasonCode));if(i)throw i;return s}function ua({isExpression:a=!1,optionsCombinations:e}){return(t,s={})=>{let{filepath:i}=s;if(typeof i!="string"&&(i=void 0),(s.parser==="babel"||s.parser==="__babel_estree")&&la(t,i))return s.parser="babel-flow",ti.parse(t,s);let r=e,n=s.__babelSourceType??Xs(i);n&&n!==jt&&(r=r.map(p=>({...p,sourceType:n,...n===De?{allowReturnOutsideFunction:void 0,allowNewTargetOutsideFunction:void 0}:void 0})));let o=/%[A-Z]/.test(t);t.includes("|>")?r=(o?[...Qs,Ys]:Qs).flatMap(f=>r.map(d=>j([f],d))):o&&(r=r.map(p=>j([Ys],p)));let h=a?Mt:Dt,c;try{c=bs(r.map(p=>()=>pa(h,t,p)))}catch({errors:[p]}){throw _t(p)}return a&&(c=Vt({expression:c,text:t,rootMarker:s.rootMarker})),_s(c,{text:t})}}var fa=["StrictNumericEscape","StrictWith","StrictOctalLiteral","StrictDelete","StrictEvalArguments","StrictEvalArgumentsBinding","StrictFunction","ForInOfLoopInitializer","ParamDupe","RestTrailingComma","UnsupportedParameterDecorator","UnterminatedJsxContent","UnexpectedReservedWord","ModuleAttributesWithDuplicateKeys","InvalidEscapeSequenceTemplate","NonAbstractClassHasAbstractMethod","PatternIsOptional","VarRedeclaration","InvalidPrivateFieldResolution","DuplicateExport","DeclarationMissingInitializer","DecoratorAbstractMethod"],da=new Set(fa),Zs=[j(["jsx"])],ma=ot({optionsCombinations:Zs}),ya=ot({optionsCombinations:[j(["jsx","typescript"]),j(["typescript"])]}),xa=ot({isExpression:!0,optionsCombinations:[j(["jsx"])]}),Pa=ot({isExpression:!0,optionsCombinations:[j(["typescript"])]}),ti=ot({optionsCombinations:[j(["jsx",["flow",{all:!0}],"flowComments"])]}),ga=ot({optionsCombinations:Zs.map(a=>j(["estree"],a))});var Fe={};$t(Fe,{json:()=>Aa,"json-stringify":()=>Ea,json5:()=>Sa,jsonc:()=>Ca});function Ta(a){return Array.isArray(a)&&a.length>0}var Oe=Ta;var ei={tokens:!1,ranges:!1,attachComment:!1,createParenthesizedExpressions:!0};function ba(a){let e=Dt(a,ei),{program:t}=e;if(t.body.length===0&&t.directives.length===0&&!t.interpreter)return{comments:e.comments}}function bt(a,e={}){let{allowComments:t=!0,allowEmpty:s=!1}=e,i,r;try{i=Mt(a,ei),r=i.comments}catch(n){if(s&&n.code==="BABEL_PARSER_SYNTAX_ERROR"&&n.reasonCode==="ParseExpressionEmptyInput")try{({comments:r}=ba(a))}catch{}if(!r)throw _t(n)}if(!t&&Oe(r))throw H(r[0],"Comment");return(!s||i)&&ht(i),i=Vt({type:"JsonRoot",expression:i,comments:r,text:a}),i}function H(a,e){let[t,s]=[a.loc.start,a.loc.end].map(({line:i,column:r})=>({line:i,column:r+1}));return Ut(`${e} is not allowed in JSON.`,{loc:{start:t,end:s}})}function ht(a){switch(a.type){case"ArrayExpression":for(let e of a.elements)e!==null&&ht(e);return;case"ObjectExpression":for(let e of a.properties)ht(e);return;case"ObjectProperty":if(a.computed)throw H(a.key,"Computed key");if(a.shorthand)throw H(a.key,"Shorthand property");a.key.type!=="Identifier"&&Line truncated
@@ -0,0 +1,15 @@
export type Options = [
{
allowAny?: boolean;
allowedPromiseNames?: string[];
checkArrowFunctions?: boolean;
checkFunctionDeclarations?: boolean;
checkFunctionExpressions?: boolean;
checkMethodDeclarations?: boolean;
}
];
export type MessageIds = 'missingAsync' | 'missingAsyncHybridReturn';
declare const _default: import("@typescript-eslint/utils/ts-eslint").RuleModule<MessageIds, Options, import("../../rules").ESLintPluginDocs, import("@typescript-eslint/utils/ts-eslint").RuleListener> & {
name: string;
};
export default _default;
@@ -0,0 +1,18 @@
import { Env } from "../../types.js";
import { Hono } from "../../hono.js";
//#region src/helper/ssg/utils.d.ts
/**
* Get dirname
* @param path File Path
* @returns Parent dir path
*/
export declare const dirname: (path: string) => string;
export declare const joinPaths: (...paths: string[]) => string;
interface FilterStaticGenerateRouteData {
path: string;
}
export declare const filterStaticGenerateRoutes: <E extends Env>(hono: Hono<E>) => FilterStaticGenerateRouteData[];
export declare const isDynamicRoute: (path: string) => boolean;
export declare const ensureWithinOutDir: (outDir: string, filePath: string) => void;
//#endregion
export {};
@@ -0,0 +1,7 @@
.git*
test/
test-browser/
build/
.travis.yml
*.swp
Makefile
@@ -0,0 +1,55 @@
# es-errors <sup>[![Version Badge][npm-version-svg]][package-url]</sup>
[![github actions][actions-image]][actions-url]
[![coverage][codecov-image]][codecov-url]
[![License][license-image]][license-url]
[![Downloads][downloads-image]][downloads-url]
[![npm badge][npm-badge-png]][package-url]
A simple cache for a few of the JS Error constructors.
## Example
```js
const assert = require('assert');
const Base = require('es-errors');
const Eval = require('es-errors/eval');
const Range = require('es-errors/range');
const Ref = require('es-errors/ref');
const Syntax = require('es-errors/syntax');
const Type = require('es-errors/type');
const URI = require('es-errors/uri');
assert.equal(Base, Error);
assert.equal(Eval, EvalError);
assert.equal(Range, RangeError);
assert.equal(Ref, ReferenceError);
assert.equal(Syntax, SyntaxError);
assert.equal(Type, TypeError);
assert.equal(URI, URIError);
```
## Tests
Simply clone the repo, `npm install`, and run `npm test`
## Security
Please email [@ljharb](https://github.com/ljharb) or see https://tidelift.com/security if you have a potential security vulnerability to report.
[package-url]: https://npmjs.org/package/es-errors
[npm-version-svg]: https://versionbadg.es/ljharb/es-errors.svg
[deps-svg]: https://david-dm.org/ljharb/es-errors.svg
[deps-url]: https://david-dm.org/ljharb/es-errors
[dev-deps-svg]: https://david-dm.org/ljharb/es-errors/dev-status.svg
[dev-deps-url]: https://david-dm.org/ljharb/es-errors#info=devDependencies
[npm-badge-png]: https://nodei.co/npm/es-errors.png?downloads=true&stars=true
[license-image]: https://img.shields.io/npm/l/es-errors.svg
[license-url]: LICENSE
[downloads-image]: https://img.shields.io/npm/dm/es-errors.svg
[downloads-url]: https://npm-stat.com/charts.html?package=es-errors
[codecov-image]: https://codecov.io/gh/ljharb/es-errors/branch/main/graphs/badge.svg
[codecov-url]: https://app.codecov.io/gh/ljharb/es-errors/
[actions-image]: https://img.shields.io/endpoint?url=https://github-actions-badge-u3jn4tfpocch.runkit.sh/ljharb/es-errors
[actions-url]: https://github.com/ljharb/es-errors/actions
@@ -0,0 +1,391 @@
'use strict';
const utils = require('./utils');
const {
CHAR_ASTERISK, /* * */
CHAR_AT, /* @ */
CHAR_BACKWARD_SLASH, /* \ */
CHAR_COMMA, /* , */
CHAR_DOT, /* . */
CHAR_EXCLAMATION_MARK, /* ! */
CHAR_FORWARD_SLASH, /* / */
CHAR_LEFT_CURLY_BRACE, /* { */
CHAR_LEFT_PARENTHESES, /* ( */
CHAR_LEFT_SQUARE_BRACKET, /* [ */
CHAR_PLUS, /* + */
CHAR_QUESTION_MARK, /* ? */
CHAR_RIGHT_CURLY_BRACE, /* } */
CHAR_RIGHT_PARENTHESES, /* ) */
CHAR_RIGHT_SQUARE_BRACKET /* ] */
} = require('./constants');
const isPathSeparator = code => {
return code === CHAR_FORWARD_SLASH || code === CHAR_BACKWARD_SLASH;
};
const depth = token => {
if (token.isPrefix !== true) {
token.depth = token.isGlobstar ? Infinity : 1;
}
};
/**
* Quickly scans a glob pattern and returns an object with a handful of
* useful properties, like `isGlob`, `path` (the leading non-glob, if it exists),
* `glob` (the actual pattern), `negated` (true if the path starts with `!` but not
* with `!(`) and `negatedExtglob` (true if the path starts with `!(`).
*
* ```js
* const pm = require('picomatch');
* console.log(pm.scan('foo/bar/*.js'));
* { isGlob: true, input: 'foo/bar/*.js', base: 'foo/bar', glob: '*.js' }
* ```
* @param {String} `str`
* @param {Object} `options`
* @return {Object} Returns an object with tokens and regex source string.
* @api public
*/
const scan = (input, options) => {
const opts = options || {};
const length = input.length - 1;
const scanToEnd = opts.parts === true || opts.scanToEnd === true;
const slashes = [];
const tokens = [];
const parts = [];
let str = input;
let index = -1;
let start = 0;
let lastIndex = 0;
let isBrace = false;
let isBracket = false;
let isGlob = false;
let isExtglob = false;
let isGlobstar = false;
let braceEscaped = false;
let backslashes = false;
let negated = false;
let negatedExtglob = false;
let finished = false;
let braces = 0;
let prev;
let code;
let token = { value: '', depth: 0, isGlob: false };
const eos = () => index >= length;
const peek = () => str.charCodeAt(index + 1);
const advance = () => {
prev = code;
return str.charCodeAt(++index);
};
while (index < length) {
code = advance();
let next;
if (code === CHAR_BACKWARD_SLASH) {
backslashes = token.backslashes = true;
code = advance();
if (code === CHAR_LEFT_CURLY_BRACE) {
braceEscaped = true;
}
continue;
}
if (braceEscaped === true || code === CHAR_LEFT_CURLY_BRACE) {
braces++;
while (eos() !== true && (code = advance())) {
if (code === CHAR_BACKWARD_SLASH) {
backslashes = token.backslashes = true;
advance();
continue;
}
if (code === CHAR_LEFT_CURLY_BRACE) {
braces++;
continue;
}
if (braceEscaped !== true && code === CHAR_DOT && (code = advance()) === CHAR_DOT) {
isBrace = token.isBrace = true;
isGlob = token.isGlob = true;
finished = true;
if (scanToEnd === true) {
continue;
}
break;
}
if (braceEscaped !== true && code === CHAR_COMMA) {
isBrace = token.isBrace = true;
isGlob = token.isGlob = true;
finished = true;
if (scanToEnd === true) {
continue;
}
break;
}
if (code === CHAR_RIGHT_CURLY_BRACE) {
braces--;
if (braces === 0) {
braceEscaped = false;
isBrace = token.isBrace = true;
finished = true;
break;
}
}
}
if (scanToEnd === true) {
continue;
}
break;
}
if (code === CHAR_FORWARD_SLASH) {
slashes.push(index);
tokens.push(token);
token = { value: '', depth: 0, isGlob: false };
if (finished === true) continue;
if (prev === CHAR_DOT && index === (start + 1)) {
start += 2;
continue;
}
lastIndex = index + 1;
continue;
}
if (opts.noext !== true) {
const isExtglobChar = code === CHAR_PLUS
|| code === CHAR_AT
|| code === CHAR_ASTERISK
|| code === CHAR_QUESTION_MARK
|| code === CHAR_EXCLAMATION_MARK;
if (isExtglobChar === true && peek() === CHAR_LEFT_PARENTHESES) {
isGlob = token.isGlob = true;
isExtglob = token.isExtglob = true;
finished = true;
if (code === CHAR_EXCLAMATION_MARK && index === start) {
negatedExtglob = true;
}
if (scanToEnd === true) {
while (eos() !== true && (code = advance())) {
if (code === CHAR_BACKWARD_SLASH) {
backslashes = token.backslashes = true;
code = advance();
continue;
}
if (code === CHAR_RIGHT_PARENTHESES) {
isGlob = token.isGlob = true;
finished = true;
break;
}
}
continue;
}
break;
}
}
if (code === CHAR_ASTERISK) {
if (prev === CHAR_ASTERISK) isGlobstar = token.isGlobstar = true;
isGlob = token.isGlob = true;
finished = true;
if (scanToEnd === true) {
continue;
}
break;
}
if (code === CHAR_QUESTION_MARK) {
isGlob = token.isGlob = true;
finished = true;
if (scanToEnd === true) {
continue;
}
break;
}
if (code === CHAR_LEFT_SQUARE_BRACKET) {
while (eos() !== true && (next = advance())) {
if (next === CHAR_BACKWARD_SLASH) {
backslashes = token.backslashes = true;
advance();
continue;
}
if (next === CHAR_RIGHT_SQUARE_BRACKET) {
isBracket = token.isBracket = true;
isGlob = token.isGlob = true;
finished = true;
break;
}
}
if (scanToEnd === true) {
continue;
}
break;
}
if (opts.nonegate !== true && code === CHAR_EXCLAMATION_MARK && index === start) {
negated = token.negated = true;
start++;
continue;
}
if (opts.noparen !== true && code === CHAR_LEFT_PARENTHESES) {
isGlob = token.isGlob = true;
if (scanToEnd === true) {
while (eos() !== true && (code = advance())) {
if (code === CHAR_LEFT_PARENTHESES) {
backslashes = token.backslashes = true;
code = advance();
continue;
}
if (code === CHAR_RIGHT_PARENTHESES) {
finished = true;
break;
}
}
continue;
}
break;
}
if (isGlob === true) {
finished = true;
if (scanToEnd === true) {
continue;
}
break;
}
}
if (opts.noext === true) {
isExtglob = false;
isGlob = false;
}
let base = str;
let prefix = '';
let glob = '';
if (start > 0) {
prefix = str.slice(0, start);
str = str.slice(start);
lastIndex -= start;
}
if (base && isGlob === true && lastIndex > 0) {
base = str.slice(0, lastIndex);
glob = str.slice(lastIndex);
} else if (isGlob === true) {
base = '';
glob = str;
} else {
base = str;
}
if (base && base !== '' && base !== '/' && base !== str) {
if (isPathSeparator(base.charCodeAt(base.length - 1))) {
base = base.slice(0, -1);
}
}
if (opts.unescape === true) {
if (glob) glob = utils.removeBackslashes(glob);
if (base && backslashes === true) {
base = utils.removeBackslashes(base);
}
}
const state = {
prefix,
input,
start,
base,
glob,
isBrace,
isBracket,
isGlob,
isExtglob,
isGlobstar,
negated,
negatedExtglob
};
if (opts.tokens === true) {
state.maxDepth = 0;
if (!isPathSeparator(code)) {
tokens.push(token);
}
state.tokens = tokens;
}
if (opts.parts === true || opts.tokens === true) {
let prevIndex;
for (let idx = 0; idx < slashes.length; idx++) {
const n = prevIndex ? prevIndex + 1 : start;
const i = slashes[idx];
const value = input.slice(n, i);
if (opts.tokens) {
if (idx === 0 && start !== 0) {
tokens[idx].isPrefix = true;
tokens[idx].value = prefix;
} else {
tokens[idx].value = value;
}
depth(tokens[idx]);
state.maxDepth += tokens[idx].depth;
}
if (idx !== 0 || value !== '') {
parts.push(value);
}
prevIndex = i;
}
if (prevIndex && prevIndex + 1 < input.length) {
const value = input.slice(prevIndex + 1);
parts.push(value);
if (opts.tokens) {
tokens[tokens.length - 1].value = value;
depth(tokens[tokens.length - 1]);
state.maxDepth += tokens[tokens.length - 1].depth;
}
}
state.slashes = slashes;
state.parts = parts;
}
return state;
};
module.exports = scan;
@@ -0,0 +1 @@
{"version":3,"file":"armchair.js","sources":["../../../src/icons/armchair.ts"],"sourcesContent":["import createLucideIcon from '../createLucideIcon';\n\n/**\n * @component @name Armchair\n * @description Lucide SVG icon component, renders SVG Element with children.\n *\n * @preview ![img](data:image/svg+xml;base64,PHN2ZyAgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIgogIHdpZHRoPSIyNCIKICBoZWlnaHQ9IjI0IgogIHZpZXdCb3g9IjAgMCAyNCAyNCIKICBmaWxsPSJub25lIgogIHN0cm9rZT0iIzAwMCIgc3R5bGU9ImJhY2tncm91bmQtY29sb3I6ICNmZmY7IGJvcmRlci1yYWRpdXM6IDJweCIKICBzdHJva2Utd2lkdGg9IjIiCiAgc3Ryb2tlLWxpbmVjYXA9InJvdW5kIgogIHN0cm9rZS1saW5lam9pbj0icm91bmQiCj4KICA8cGF0aCBkPSJNMTkgOVY2YTIgMiAwIDAgMC0yLTJIN2EyIDIgMCAwIDAtMiAydjMiIC8+CiAgPHBhdGggZD0iTTMgMTZhMiAyIDAgMCAwIDIgMmgxNGEyIDIgMCAwIDAgMi0ydi01YTIgMiAwIDAgMC00IDB2MS41YS41LjUgMCAwIDEtLjUuNWgtOWEuNS41IDAgMCAxLS41LS41VjExYTIgMiAwIDAgMC00IDB6IiAvPgogIDxwYXRoIGQ9Ik01IDE4djIiIC8+CiAgPHBhdGggZD0iTTE5IDE4djIiIC8+Cjwvc3ZnPgo=) - https://lucide.dev/icons/armchair\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 Armchair = createLucideIcon('Armchair', [\n ['path', { d: 'M19 9V6a2 2 0 0 0-2-2H7a2 2 0 0 0-2 2v3', key: 'irtipd' }],\n [\n 'path',\n {\n d: 'M3 16a2 2 0 0 0 2 2h14a2 2 0 0 0 2-2v-5a2 2 0 0 0-4 0v1.5a.5.5 0 0 1-.5.5h-9a.5.5 0 0 1-.5-.5V11a2 2 0 0 0-4 0z',\n key: '1qyhux',\n },\n ],\n ['path', { d: 'M5 18v2', key: 'ppbyun' }],\n ['path', { d: 'M19 18v2', key: 'gy7782' }],\n]);\n\nexport default Armchair;\n"],"names":[],"mappings":";;;;;;;;;AAaM,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAW,iBAAiB,UAAY,CAAA,CAAA,CAAA;AAAA,CAAA,CAC5C,CAAC,CAAA,CAAA,CAAA,CAAA,CAAA,CAAQ,CAAA,CAAA,CAAA,CAAE,GAAG,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,CACxE,CAAA,CAAA;AAAA,CAAA,CAAA,CAAA,CACE,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA;AAAA,CACA,CAAA,CAAA,CAAA,CAAA;AAAA,CACE,CAAA,CAAA,CAAA,CAAA,CAAA,CAAG,EAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,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,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;AAC3C,CAAC,CAAA,CAAA;;"}
@@ -0,0 +1 @@
module.exports={A:{A:{"2":"FD","8":"_SC"},B:{"1":"_K","8":"_I"},C:{"1":"_w","8":"_f"},D:{"1":"_7D","4":"J"},E:{"1":"_dB","8":"_e","132":"_1Q"},F:{"1":"_c"},G:{"1":"_8C","132":"_1"},H:{"2":"1D"},I:{"1":"_8B","2":"_n"},J:{"1":"_B"},K:{"1":"_N"},L:{"1":"I"},M:{"1":"YC"},N:{"8":"_A"},O:{"1":"bC"},P:{"1":"_F"},Q:{"1":"JE"},R:{"1":"KE"},S:{"1":"_C"}},B:2,C:"SVG SMIL animation",D:true};
@@ -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 './square-slash.js';
//# sourceMappingURL=slash-square.js.map
@@ -0,0 +1,2 @@
import type { LibDefinition } from '../variable';
export declare const es2021: LibDefinition;
@@ -0,0 +1,3 @@
declare const URIError: URIErrorConstructor;
export = URIError;
@@ -0,0 +1,64 @@
/*
@license
Rollup.js v4.60.4
Thu, 14 May 2026 17:52:21 GMT - commit d311a84b0bb4d4a6f50d19ffd2c29cca28660c88
https://github.com/rollup/rollup
Released under the MIT License.
*/
const getLogFilter = filters => {
if (filters.length === 0)
return () => true;
const normalizedFilters = filters.map(filter => filter.split('&').map(subFilter => {
const inverted = subFilter[0] === '!';
if (inverted)
subFilter = subFilter.slice(1);
const [key, ...value] = subFilter.split(':');
return { inverted, key: key.split('.'), parts: value.join(':').split('*') };
}));
return (log) => {
nextIntersectedFilter: for (const intersectedFilters of normalizedFilters) {
for (const { inverted, key, parts } of intersectedFilters) {
const isFilterSatisfied = testFilter(log, key, parts);
if (inverted ? isFilterSatisfied : !isFilterSatisfied) {
continue nextIntersectedFilter;
}
}
return true;
}
return false;
};
};
const testFilter = (log, key, parts) => {
let rawValue = log;
for (let index = 0; index < key.length; index++) {
if (!rawValue) {
return false;
}
const part = key[index];
if (!(part in rawValue)) {
return false;
}
rawValue = rawValue[part];
}
let value = typeof rawValue === 'object' ? JSON.stringify(rawValue) : String(rawValue);
if (parts.length === 1) {
return value === parts[0];
}
if (!value.startsWith(parts[0])) {
return false;
}
const lastPartIndex = parts.length - 1;
for (let index = 1; index < lastPartIndex; index++) {
const part = parts[index];
const position = value.indexOf(part);
if (position === -1) {
return false;
}
value = value.slice(position + part.length);
}
return value.endsWith(parts[lastPartIndex]);
};
export { getLogFilter };
@@ -0,0 +1,47 @@
"use strict";
Object.defineProperty(exports, "__esModule", {
value: true
});
exports.default = _createRawReactElement;
var REACT_ELEMENT_TYPE;
function _createRawReactElement(type, props, key, children) {
if (!REACT_ELEMENT_TYPE) {
REACT_ELEMENT_TYPE = typeof Symbol === "function" && Symbol["for"] && Symbol["for"]("react.element") || 0xeac7;
}
var defaultProps = type && type.defaultProps;
var childrenLength = arguments.length - 3;
if (!props && childrenLength !== 0) {
props = {
children: void 0
};
}
if (childrenLength === 1) {
props.children = children;
} else if (childrenLength > 1) {
var childArray = new Array(childrenLength);
for (var i = 0; i < childrenLength; i++) {
childArray[i] = arguments[i + 3];
}
props.children = childArray;
}
if (props && defaultProps) {
for (var propName in defaultProps) {
if (props[propName] === void 0) {
props[propName] = defaultProps[propName];
}
}
} else if (!props) {
props = defaultProps || {};
}
return {
$$typeof: REACT_ELEMENT_TYPE,
type: type,
key: key === undefined ? null : "" + key,
ref: null,
props: props,
_owner: null
};
}
//# sourceMappingURL=jsx.js.map
@@ -0,0 +1 @@
module.exports={C:{"115":0.02579,"120":0.42287,"121":0.87669,"122":0.00516,"123":0.01031,"124":0.03094,"125":0.01547,"131":0.00516,"132":0.00516,"133":0.00516,"134":0.00516,"135":0.00516,"136":0.01031,"137":0.00516,"138":0.00516,"140":0.01031,"141":0.00516,"142":0.00516,"143":0.00516,"144":0.00516,"147":0.00516,"150":0.00516,"151":0.00516,"152":0.01031,"153":0.00516,"154":0.09283,"155":0.39193,"156":0.61368,"157":0.02063,_:"2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 116 117 118 119 126 127 128 129 130 139 145 146 148 149 158 159 160 3.5 3.6"},D:{"49":0.00516,"53":0.00516,"63":0.00516,"69":0.00516,"70":0.00516,"75":0.00516,"76":0.00516,"84":0.00516,"87":0.00516,"91":0.00516,"93":0.06188,"98":0.0722,"101":0.00516,"103":0.5879,"104":0.51054,"105":0.5157,"106":0.52086,"107":0.5157,"108":0.5157,"109":0.71167,"110":0.5157,"111":0.50539,"112":0.50539,"114":0.00516,"115":0.00516,"116":1.1397,"117":0.52086,"118":0.73745,"119":0.83028,"120":1.4388,"121":0.02063,"122":0.0361,"123":0.01547,"124":0.53117,"125":0.00516,"126":0.02579,"128":0.31973,"130":0.00516,"131":1.04687,"132":0.01547,"133":1.08813,"134":0.11345,"135":0.08767,"136":0.09283,"137":0.1083,"138":0.1805,"139":0.20628,"140":0.11345,"141":0.10314,"142":0.38162,"143":0.01031,"144":0.30942,"145":0.30942,"146":0.09283,"147":0.02579,"148":0.53633,"149":0.61368,"150":3.0581,"151":2.61976,"152":6.81755,"153":5.94602,"154":1.10876,"155":0.02063,_:"4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 50 51 52 54 55 56 57 58 59 60 61 62 64 65 66 67 68 71 72 73 74 77 78 79 80 81 83 85 86 88 89 90 92 94 95 96 97 99 100 102 113 127 129 156 157"},F:{"73":0.00516,"89":0.01031,"90":0.00516,"95":0.01031,"101":0.03094,"105":0.01547,"106":0.02579,"107":0.01547,"111":0.00516,"115":0.00516,"116":0.01031,"119":0.00516,"120":0.01031,"122":0.00516,"133":0.01031,"134":0.26301,"135":0.57758,_:"9 11 12 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 60 62 63 64 65 66 67 68 69 70 71 72 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 91 92 93 94 96 97 98 99 100 102 103 104 108 109 110 112 113 114 117 118 121 123 124 125 126 127 131 132 9.5-9.6 10.0-10.1 10.5 10.6 11.1 11.5 11.6 12.1"},B:{"109":0.02063,"114":0.01031,"115":0.00516,"119":0.41772,"120":0.44866,"122":0.02063,"123":0.00516,"124":0.00516,"132":0.01031,"133":0.00516,"136":0.00516,"138":0.01031,"139":0.04126,"140":0.04641,"141":0.00516,"142":0.00516,"144":0.01031,"145":0.02063,"146":0.00516,"147":0.01031,"148":0.02579,"149":0.01547,"150":0.04641,"151":0.28879,"152":2.08859,"153":2.10921,"154":0.5157,_:"12 13 14 15 16 17 18 79 80 81 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 110 111 112 113 116 117 118 121 125 126 127 128 129 130 131 134 135 137 143"},E:{"27":0.0361,_:"4 5 6 7 8 9 10 11 12 13 14 15 3.1 3.2 5.1 6.1 7.1 9.1 10.1 11.1 12.1 15.1 15.2-15.3 15.5 16.0 16.2 16.4 16.5 17.2 18.2 18.4 26.0 27.1 27.2 TP","13.1":0.01031,"14.1":0.00516,"15.4":0.01547,"15.6":0.03094,"16.1":0.01031,"16.3":0.00516,"16.6":0.06188,"17.0":0.00516,"17.1":0.04126,"17.3":0.00516,"17.4":0.00516,"17.5":0.01031,"17.6":0.05157,"18.0":0.01547,"18.1":0.01547,"18.3":0.01031,"18.5-18.7":0.02063,"26.1":0.00516,"26.2":0.04126,"26.3":0.04126,"26.4":0.09798,"26.5":0.26301,"26.6":0.97983},G:{"8":0,"3.2":0,"4.0-4.1":0,"4.2-4.3":0.00117,"5.0-5.1":0.00117,"6.0-6.1":0,"7.0-7.1":0.00234,"8.1-8.4":0,"9.0-9.2":0,"9.3":0,"10.0-10.2":0,"10.3":0.01168,"11.0-11.2":0.00117,"11.3-11.4":0.00234,"12.0-12.1":0,"12.2-12.5":0.03036,"13.0-13.1":0,"13.2":0.00584,"13.3":0,"13.4-13.7":0.00117,"14.0-14.4":0.00467,"14.5-14.8":0.00701,"15.0-15.1":0.00701,"15.2-15.3":0.00467,"15.4":0.00584,"15.5":0.00701,"15.6-15.8":0.15179,"16.0":0.01168,"16.1":0.02102,"16.2":0.01168,"16.3":0.02569,"16.4":0.00584,"16.5":0.00934,"16.6-16.7":0.21134,"17.0":0.00817,"17.1":0.01168,"17.2":0.01168,"17.3":0.01751,"17.4":0.02452,"17.5":0.04787,"17.6-17.7":0.12377,"18.0":0.02569,"18.1":0.05138,"18.2":0.07006,"18.3":0.12144,"18.4":0.0759,"18.5-18.7":1.56815,"26.0":0.0759,"26.1":0.07706,"26.2":0.20084,"26.3":0.21718,"26.4":0.1588,"26.5":1.06373,"26.6":6.56335,"27.0":0.50326,"27.1":0,"27.2":0.01284},P:{"4":0.0194,"23":0.0194,"24":0.0194,"25":0.0097,"26":0.0291,"27":0.0097,"28":0.03881,"29":0.06791,"30":2.80373,_:"20 21 22 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","7.2-7.4":0.0097,"19.0":0.0097},I:{"0":0.01936,"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.00001},K:{"0":0.32448,_:"10 11 12 11.1 11.5 12.1"},A:{_:"6 7 8 9 10 11 5.5"},S:{_:"2.5 3.0-3.1"},J:{_:"Line truncated
@@ -0,0 +1 @@
{"version":3,"names":["_traverse","data","require","_plugin","LOADED_PLUGIN","blockHoistPlugin","name","visitor","Block","exit","node","body","performHoisting","SwitchCase","consequent","max","Math","pow","hasChange","i","length","n","p","priority","stableSort","slice","loadBlockHoistPlugin","Plugin","Object","assign","traverse","explode","bodyNode","_blockHoist","buckets","create","bucket","push","keys","map","k","sort","a","b","index","key"],"sources":["../../src/transformation/block-hoist-plugin.ts"],"sourcesContent":["import traverse from \"@babel/traverse\";\nimport type { Statement } from \"@babel/types\";\nimport type { PluginObject } from \"../config/index.ts\";\nimport Plugin from \"../config/plugin.ts\";\n\nlet LOADED_PLUGIN: Plugin | void;\n\nconst blockHoistPlugin: PluginObject = {\n /**\n * [Please add a description.]\n *\n * Priority:\n *\n * - 0 We want this to be at the **very** bottom\n * - 1 Default node position\n * - 2 Priority over normal nodes\n * - 3 We want this to be at the **very** top\n * - 4 Reserved for the helpers used to implement module imports.\n */\n\n name: \"internal.blockHoist\",\n\n visitor: {\n Block: {\n exit({ node }) {\n node.body = performHoisting(node.body);\n },\n },\n SwitchCase: {\n exit({ node }) {\n // In case statements, hoisting is difficult to perform correctly due to\n // functions that are declared and referenced in different blocks.\n // Nevertheless, hoisting the statements *inside* of each case should at\n // least mitigate the failure cases.\n node.consequent = performHoisting(node.consequent);\n },\n },\n },\n};\n\nfunction performHoisting(body: Statement[]): Statement[] {\n // Largest SMI\n let max = 2 ** 30 - 1;\n let hasChange = false;\n for (let i = 0; i < body.length; i++) {\n const n = body[i];\n const p = priority(n);\n if (p > max) {\n hasChange = true;\n break;\n }\n max = p;\n }\n if (!hasChange) return body;\n\n // My kingdom for a stable sort!\n return stableSort(body.slice());\n}\n\nexport default function loadBlockHoistPlugin(): Plugin {\n if (!LOADED_PLUGIN) {\n // cache the loaded blockHoist plugin plugin\n LOADED_PLUGIN = new Plugin(\n {\n ...blockHoistPlugin,\n visitor: traverse.explode(blockHoistPlugin.visitor),\n },\n {},\n );\n }\n\n return LOADED_PLUGIN;\n}\n\nfunction priority(bodyNode: Statement & { _blockHoist?: number | true }) {\n const priority = bodyNode?._blockHoist;\n if (priority == null) return 1;\n if (priority === true) return 2;\n return priority;\n}\n\nfunction stableSort(body: Statement[]) {\n // By default, we use priorities of 0-4.\n const buckets = Object.create(null);\n\n // By collecting into buckets, we can guarantee a stable sort.\n for (let i = 0; i < body.length; i++) {\n const n = body[i];\n const p = priority(n);\n\n // In case some plugin is setting an unexpected priority.\n const bucket = buckets[p] || (buckets[p] = []);\n bucket.push(n);\n }\n\n // Sort our keys in descending order. Keys are unique, so we don't have to\n // worry about stability.\n const keys = Object.keys(buckets)\n .map(k => +k)\n .sort((a, b) => b - a);\n\n let index = 0;\n for (const key of keys) {\n const bucket = buckets[key];\n for (const n of bucket) {\n body[index++] = n;\n }\n }\n return body;\n}\n"],"mappings":";;;;;;AAAA,SAAAA,UAAA;EAAA,MAAAC,IAAA,GAAAC,OAAA;EAAAF,SAAA,YAAAA,CAAA;IAAA,OAAAC,IAAA;EAAA;EAAA,OAAAA,IAAA;AAAA;AAGA,IAAAE,OAAA,GAAAD,OAAA;AAEA,IAAIE,aAA4B;AAEhC,MAAMC,gBAA8B,GAAG;EAarCC,IAAI,EAAE,qBAAqB;EAE3BC,OAAO,EAAE;IACPC,KAAK,EAAE;MACLC,IAAIA,CAAC;QAAEC;MAAK,CAAC,EAAE;QACbA,IAAI,CAACC,IAAI,GAAGC,eAAe,CAACF,IAAI,CAACC,IAAI,CAAC;MACxC;IACF,CAAC;IACDE,UAAU,EAAE;MACVJ,IAAIA,CAAC;QAAEC;MAAK,CAAC,EAAE;QAKbA,IAAI,CAACI,UAAU,GAAGF,eAAe,CAACF,IAAI,CAACI,UAAU,CAAC;MACpD;IACF;EACF;AACF,CAAC;AAED,SAASF,eAAeA,CAACD,IAAiB,EAAe;EAEvD,IAAII,GAAG,GAAGC,IAAA,CAAAC,GAAA,EAAC,EAAI,EAAE,IAAG,CAAC;EACrB,IAAIC,SAAS,GAAG,KAAK;EACrB,KAAK,IAAIC,CAAC,GAAG,CAAC,EAAEA,CAAC,GAAGR,IAAI,CAACS,MAAM,EAAED,CAAC,EAAE,EAAE;IACpC,MAAME,CAAC,GAAGV,IAAI,CAACQ,CAAC,CAAC;IACjB,MAAMG,CAAC,GAAGC,QAAQ,CAACF,CAAC,CAAC;IACrB,IAAIC,CAAC,GAAGP,GAAG,EAAE;MACXG,SAAS,GAAG,IAAI;MAChB;IACF;IACAH,GAAG,GAAGO,CAAC;EACT;EACA,IAAI,CAACJ,SAAS,EAAE,OAAOP,IAAI;EAG3B,OAAOa,UAAU,CAACb,IAAI,CAACc,KAAK,CAAC,CAAC,CAAC;AACjC;AAEe,SAASC,oBAAoBA,CAAA,EAAW;EACrD,IAAI,CAACtB,aAAa,EAAE;IAElBA,aAAa,GAAG,IAAIuB,eAAM,CAAAC,MAAA,CAAAC,MAAA,KAEnBxB,gBAAgB;MACnBE,OAAO,EAAEuB,mBAAQ,CAACC,OAAO,CAAC1B,gBAAgB,CAACE,OAAO;IAAC,IAErD,CAAC,CACH,CAAC;EACH;EAEA,OAAOH,aAAa;AACtB;AAEA,SAASmB,QAAQA,CAACS,QAAqD,EAAE;EACvE,MAAMT,QAAQ,GAAGS,QAAQ,oBAARA,QAAQ,CAAEC,WAAW;EACtC,IAAIV,QAAQ,IAAI,IAAI,EAAE,OAAO,CAAC;EAC9B,IAAIA,QAAQ,KAAK,IAAI,EAAE,OAAO,CAAC;EAC/B,OAAOA,QAAQ;AACjB;AAEA,SAASC,UAAUA,CAACb,IAAiB,EAAE;EAErC,MAAMuB,OAAO,GAAGN,MAAM,CAACO,MAAM,CAAC,IAAI,CAAC;EAGnC,KAAK,IAAILine truncated
@@ -0,0 +1 @@
{"version":3,"file":"printer.js","sources":["../../../src/icons/printer.ts"],"sourcesContent":["import createLucideIcon from '../createLucideIcon';\n\n/**\n * @component @name Printer\n * @description Lucide SVG icon component, renders SVG Element with children.\n *\n * @preview ![img](data:image/svg+xml;base64,PHN2ZyAgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIgogIHdpZHRoPSIyNCIKICBoZWlnaHQ9IjI0IgogIHZpZXdCb3g9IjAgMCAyNCAyNCIKICBmaWxsPSJub25lIgogIHN0cm9rZT0iIzAwMCIgc3R5bGU9ImJhY2tncm91bmQtY29sb3I6ICNmZmY7IGJvcmRlci1yYWRpdXM6IDJweCIKICBzdHJva2Utd2lkdGg9IjIiCiAgc3Ryb2tlLWxpbmVjYXA9InJvdW5kIgogIHN0cm9rZS1saW5lam9pbj0icm91bmQiCj4KICA8cGF0aCBkPSJNNiAxOEg0YTIgMiAwIDAgMS0yLTJ2LTVhMiAyIDAgMCAxIDItMmgxNmEyIDIgMCAwIDEgMiAydjVhMiAyIDAgMCAxLTIgMmgtMiIgLz4KICA8cGF0aCBkPSJNNiA5VjNhMSAxIDAgMCAxIDEtMWgxMGExIDEgMCAwIDEgMSAxdjYiIC8+CiAgPHJlY3QgeD0iNiIgeT0iMTQiIHdpZHRoPSIxMiIgaGVpZ2h0PSI4IiByeD0iMSIgLz4KPC9zdmc+Cg==) - https://lucide.dev/icons/printer\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 Printer = createLucideIcon('Printer', [\n [\n 'path',\n {\n d: 'M6 18H4a2 2 0 0 1-2-2v-5a2 2 0 0 1 2-2h16a2 2 0 0 1 2 2v5a2 2 0 0 1-2 2h-2',\n key: '143wyd',\n },\n ],\n ['path', { d: 'M6 9V3a1 1 0 0 1 1-1h10a1 1 0 0 1 1 1v6', key: '1itne7' }],\n ['rect', { x: '6', y: '14', width: '12', height: '8', rx: '1', key: '1ue0tg' }],\n]);\n\nexport default Printer;\n"],"names":[],"mappings":";;;;;;;;;AAaM,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAU,iBAAiB,SAAW,CAAA,CAAA,CAAA;AAAA,CAC1C,CAAA,CAAA;AAAA,CAAA,CAAA,CAAA,CACE,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA;AAAA,CACA,CAAA,CAAA,CAAA,CAAA;AAAA,CACE,CAAA,CAAA,CAAA,CAAA,CAAA,CAAG,EAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA;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,CAAA;AAAA,CAAA,CACA,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,CAAA,CAAQ,CAAA,CAAA,CAAE,CAAA,CAAA,CAAG,KAAK,CAAG,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAM,CAAO,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAM,QAAQ,CAAK,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAI,CAAK,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAK,UAAU,CAAA;AAChF,CAAC,CAAA,CAAA;;"}
@@ -0,0 +1 @@
{"version":3,"file":"toolWithSampleServer.js","sourceRoot":"","sources":["../../../../src/examples/server/toolWithSampleServer.ts"],"names":[],"mappings":";AAAA,gEAAgE;;;;;;;;;;;;;;;;;;;;;;;;;AAEhE,gDAAgD;AAChD,oDAA6D;AAC7D,0CAA4B;AAE5B,MAAM,SAAS,GAAG,IAAI,kBAAS,CAAC;IAC5B,IAAI,EAAE,0BAA0B;IAChC,OAAO,EAAE,OAAO;CACnB,CAAC,CAAC;AAEH,oDAAoD;AACpD,SAAS,CAAC,YAAY,CAClB,WAAW,EACX;IACI,WAAW,EAAE,iCAAiC;IAC9C,WAAW,EAAE;QACT,IAAI,EAAE,CAAC,CAAC,MAAM,EAAE,CAAC,QAAQ,CAAC,mBAAmB,CAAC;KACjD;CACJ,EACD,KAAK,EAAE,EAAE,IAAI,EAAE,EAAE,EAAE;IACf,oCAAoC;IACpC,MAAM,QAAQ,GAAG,MAAM,SAAS,CAAC,MAAM,CAAC,aAAa,CAAC;QAClD,QAAQ,EAAE;YACN;gBACI,IAAI,EAAE,MAAM;gBACZ,OAAO,EAAE;oBACL,IAAI,EAAE,MAAM;oBACZ,IAAI,EAAE,qDAAqD,IAAI,EAAE;iBACpE;aACJ;SACJ;QACD,SAAS,EAAE,GAAG;KACjB,CAAC,CAAC;IAEH,2FAA2F;IAC3F,OAAO;QACH,OAAO,EAAE;YACL;gBACI,IAAI,EAAE,MAAM;gBACZ,IAAI,EAAE,QAAQ,CAAC,OAAO,CAAC,IAAI,KAAK,MAAM,CAAC,CAAC,CAAC,QAAQ,CAAC,OAAO,CAAC,IAAI,CAAC,CAAC,CAAC,4BAA4B;aAChG;SACJ;KACJ,CAAC;AACN,CAAC,CACJ,CAAC;AAEF,KAAK,UAAU,IAAI;IACf,MAAM,SAAS,GAAG,IAAI,+BAAoB,EAAE,CAAC;IAC7C,MAAM,SAAS,CAAC,OAAO,CAAC,SAAS,CAAC,CAAC;IACnC,OAAO,CAAC,GAAG,CAAC,0BAA0B,CAAC,CAAC;AAC5C,CAAC;AAED,IAAI,EAAE,CAAC,KAAK,CAAC,KAAK,CAAC,EAAE;IACjB,OAAO,CAAC,KAAK,CAAC,eAAe,EAAE,KAAK,CAAC,CAAC;IACtC,OAAO,CAAC,IAAI,CAAC,CAAC,CAAC,CAAC;AACpB,CAAC,CAAC,CAAC"}
@@ -0,0 +1,18 @@
/**
* @license lucide-react v0.469.0 - ISC
*
* This source code is licensed under the ISC license.
* See the LICENSE file in the root directory of this source tree.
*/
import createLucideIcon from '../createLucideIcon.js';
const Podcast = createLucideIcon("Podcast", [
["path", { d: "M16.85 18.58a9 9 0 1 0-9.7 0", key: "d71mpg" }],
["path", { d: "M8 14a5 5 0 1 1 8 0", key: "fc81rn" }],
["circle", { cx: "12", cy: "11", r: "1", key: "1gvufo" }],
["path", { d: "M13 17a1 1 0 1 0-2 0l.5 4.5a.5.5 0 1 0 1 0Z", key: "za5kbj" }]
]);
export { Podcast as default };
//# sourceMappingURL=podcast.js.map
@@ -0,0 +1,35 @@
"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
exports.FunctionScope = void 0;
const types_1 = require("@typescript-eslint/types");
const ScopeBase_1 = require("./ScopeBase");
const ScopeType_1 = require("./ScopeType");
class FunctionScope extends ScopeBase_1.ScopeBase {
constructor(scopeManager, upperScope, block, isMethodDefinition) {
super(scopeManager, ScopeType_1.ScopeType.function, upperScope, block, isMethodDefinition);
// section 9.2.13, FunctionDeclarationInstantiation.
// NOTE Arrow functions never have an arguments objects.
if (this.block.type !== types_1.AST_NODE_TYPES.ArrowFunctionExpression) {
this.defineVariable('arguments', this.set, this.variables, null, null);
}
}
// References in default parameters isn't resolved to variables which are in their function body.
// const x = 1
// function f(a = x) { // This `x` is resolved to the `x` in the outer scope.
// const x = 2
// console.log(a)
// }
isValidResolution(ref, variable) {
// If `options.globalReturn` is true, `this.block` becomes a Program node.
if (this.block.type === types_1.AST_NODE_TYPES.Program) {
return true;
}
const bodyStart = this.block.body?.range[0] ?? -1;
// It's invalid resolution in the following case:
return !((variable.scope === this &&
ref.identifier.range[0] < bodyStart && // the reference is in the parameter part.
variable.defs.every(d => d.name.range[0] >= bodyStart)) // the variable is in the body.
);
}
}
exports.FunctionScope = FunctionScope;
@@ -0,0 +1 @@
{"version":3,"file":"map-pin-minus-inside.js","sources":["../../../src/icons/map-pin-minus-inside.ts"],"sourcesContent":["import createLucideIcon from '../createLucideIcon';\n\n/**\n * @component @name MapPinMinusInside\n * @description Lucide SVG icon component, renders SVG Element with children.\n *\n * @preview ![img](data:image/svg+xml;base64,PHN2ZyAgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIgogIHdpZHRoPSIyNCIKICBoZWlnaHQ9IjI0IgogIHZpZXdCb3g9IjAgMCAyNCAyNCIKICBmaWxsPSJub25lIgogIHN0cm9rZT0iIzAwMCIgc3R5bGU9ImJhY2tncm91bmQtY29sb3I6ICNmZmY7IGJvcmRlci1yYWRpdXM6IDJweCIKICBzdHJva2Utd2lkdGg9IjIiCiAgc3Ryb2tlLWxpbmVjYXA9InJvdW5kIgogIHN0cm9rZS1saW5lam9pbj0icm91bmQiCj4KICA8cGF0aCBkPSJNMjAgMTBjMCA0Ljk5My01LjUzOSAxMC4xOTMtNy4zOTkgMTEuNzk5YTEgMSAwIDAgMS0xLjIwMiAwQzkuNTM5IDIwLjE5MyA0IDE0Ljk5MyA0IDEwYTggOCAwIDAgMSAxNiAwIiAvPgogIDxwYXRoIGQ9Ik05IDEwaDYiIC8+Cjwvc3ZnPgo=) - https://lucide.dev/icons/map-pin-minus-inside\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 MapPinMinusInside = createLucideIcon('MapPinMinusInside', [\n [\n 'path',\n {\n d: 'M20 10c0 4.993-5.539 10.193-7.399 11.799a1 1 0 0 1-1.202 0C9.539 20.193 4 14.993 4 10a8 8 0 0 1 16 0',\n key: '1r0f0z',\n },\n ],\n ['path', { d: 'M9 10h6', key: '9gxzsh' }],\n]);\n\nexport default MapPinMinusInside;\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,CAC9D,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;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,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;AAC1C,CAAC,CAAA,CAAA;;"}
@@ -0,0 +1,15 @@
import { JsonSchema7TypeUnion } from "./parseTypes.js";
import { Refs } from "./Refs.js";
export type ErrorMessages<T extends JsonSchema7TypeUnion | {
format: string;
} | {
pattern: string;
}, OmitProperties extends string = ""> = Partial<Omit<{
[key in keyof T]: string;
}, OmitProperties | "type" | "errorMessages">>;
export declare function addErrorMessage<T extends {
errorMessage?: ErrorMessages<any>;
}>(res: T, key: keyof T, errorMessage: string | undefined, refs: Refs): void;
export declare function setResponseValueAndErrors<Json7Type extends JsonSchema7TypeUnion & {
errorMessage?: ErrorMessages<Json7Type>;
}, Key extends keyof Omit<Json7Type, "errorMessage">>(res: Json7Type, key: Key, value: Json7Type[Key], errorMessage: string | undefined, refs: Refs): void;
@@ -0,0 +1 @@
{"version":3,"names":["_interopRequireWildcard","obj","nodeInterop","WeakMap","cacheBabelInterop","cacheNodeInterop","exports","default","__esModule","_","newObj","__proto__","desc","has","get","set","key","hasOwnProperty","call","Object","defineProperty","getOwnPropertyDescriptor"],"sources":["../../src/helpers/interopRequireWildcard.ts"],"sourcesContent":["/* @minVersion 7.14.0 */\n\nexport default function _interopRequireWildcard(\n obj: any,\n nodeInterop: boolean,\n) {\n if (typeof WeakMap === \"function\") {\n var cacheBabelInterop = new WeakMap();\n var cacheNodeInterop = new WeakMap();\n }\n\n // @ts-expect-error: assign to function\n return (_interopRequireWildcard = function (obj: any, nodeInterop: boolean) {\n if (!nodeInterop && obj && obj.__esModule) {\n return obj;\n }\n // Temporary variable for output size\n var _;\n var newObj: Record<string, any> = { __proto__: null, default: obj };\n var desc: PropertyDescriptor | undefined;\n\n if (\n obj === null ||\n (typeof obj !== \"object\" && typeof obj !== \"function\")\n ) {\n return newObj;\n }\n\n _ = nodeInterop ? cacheNodeInterop : cacheBabelInterop;\n if (_) {\n if (_.has(obj)) return _.get(obj);\n _.set(obj, newObj);\n }\n\n for (const key in obj) {\n if (key !== \"default\" && {}.hasOwnProperty.call(obj, key)) {\n desc =\n (_ = Object.defineProperty) &&\n Object.getOwnPropertyDescriptor(obj, key);\n if (desc && (desc.get || desc.set)) {\n _(newObj, key, desc);\n } else {\n newObj[key] = obj[key];\n }\n }\n }\n return newObj;\n })(obj, nodeInterop);\n}\n"],"mappings":";;;;;;AAEe,SAASA,uBAAuBA,CAC7CC,GAAQ,EACRC,WAAoB,EACpB;EACA,IAAI,OAAOC,OAAO,KAAK,UAAU,EAAE;IACjC,IAAIC,iBAAiB,GAAG,IAAID,OAAO,CAAC,CAAC;IACrC,IAAIE,gBAAgB,GAAG,IAAIF,OAAO,CAAC,CAAC;EACtC;EAGA,OAAO,CAAAG,OAAA,CAAAC,OAAA,GAACP,uBAAuB,GAAG,SAAAA,CAAUC,GAAQ,EAAEC,WAAoB,EAAE;IAC1E,IAAI,CAACA,WAAW,IAAID,GAAG,IAAIA,GAAG,CAACO,UAAU,EAAE;MACzC,OAAOP,GAAG;IACZ;IAEA,IAAIQ,CAAC;IACL,IAAIC,MAA2B,GAAG;MAAEC,SAAS,EAAE,IAAI;MAAEJ,OAAO,EAAEN;IAAI,CAAC;IACnE,IAAIW,IAAoC;IAExC,IACEX,GAAG,KAAK,IAAI,IACX,OAAOA,GAAG,KAAK,QAAQ,IAAI,OAAOA,GAAG,KAAK,UAAW,EACtD;MACA,OAAOS,MAAM;IACf;IAEAD,CAAC,GAAGP,WAAW,GAAGG,gBAAgB,GAAGD,iBAAiB;IACtD,IAAIK,CAAC,EAAE;MACL,IAAIA,CAAC,CAACI,GAAG,CAACZ,GAAG,CAAC,EAAE,OAAOQ,CAAC,CAACK,GAAG,CAACb,GAAG,CAAC;MACjCQ,CAAC,CAACM,GAAG,CAACd,GAAG,EAAES,MAAM,CAAC;IACpB;IAEA,KAAK,MAAMM,GAAG,IAAIf,GAAG,EAAE;MACrB,IAAIe,GAAG,KAAK,SAAS,IAAI,CAAC,CAAC,CAACC,cAAc,CAACC,IAAI,CAACjB,GAAG,EAAEe,GAAG,CAAC,EAAE;QACzDJ,IAAI,GACF,CAACH,CAAC,GAAGU,MAAM,CAACC,cAAc,KAC1BD,MAAM,CAACE,wBAAwB,CAACpB,GAAG,EAAEe,GAAG,CAAC;QAC3C,IAAIJ,IAAI,KAAKA,IAAI,CAACE,GAAG,IAAIF,IAAI,CAACG,GAAG,CAAC,EAAE;UAClCN,CAAC,CAACC,MAAM,EAAEM,GAAG,EAAEJ,IAAI,CAAC;QACtB,CAAC,MAAM;UACLF,MAAM,CAACM,GAAG,CAAC,GAAGf,GAAG,CAACe,GAAG,CAAC;QACxB;MACF;IACF;IACA,OAAON,MAAM;EACf,CAAC,EAAET,GAAG,EAAEC,WAAW,CAAC;AACtB","ignoreList":[]}
@@ -0,0 +1,29 @@
/**
* @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 Drill = createLucideIcon("Drill", [
[
"path",
{ d: "M10 18a1 1 0 0 1 1 1v2a1 1 0 0 1-1 1H5a3 3 0 0 1-3-3 1 1 0 0 1 1-1z", key: "ioqxb1" }
],
[
"path",
{
d: "M13 10H4a2 2 0 0 1-2-2V4a2 2 0 0 1 2-2h9a1 1 0 0 1 1 1v6a1 1 0 0 1-1 1l-.81 3.242a1 1 0 0 1-.97.758H8",
key: "1rs59n"
}
],
["path", { d: "M14 4h3a1 1 0 0 1 1 1v2a1 1 0 0 1-1 1h-3", key: "105ega" }],
["path", { d: "M18 6h4", key: "66u95g" }],
["path", { d: "m5 10-2 8", key: "xt2lic" }],
["path", { d: "m7 18 2-8", key: "1bzku2" }]
]);
export { Drill as default };
//# sourceMappingURL=drill.js.map
@@ -0,0 +1,7 @@
import type { CodeKeywordDefinition, ErrorObject, AnySchema } from "../../types";
export type ContainsError = ErrorObject<"contains", {
minContains: number;
maxContains?: number;
}, AnySchema>;
declare const def: CodeKeywordDefinition;
export default def;
@@ -0,0 +1,62 @@
{
'variables': {
'sqlite_version%':'3530400',
"toolset%":'',
},
'target_defaults': {
'default_configuration': 'Release',
'conditions': [
[ 'toolset!=""', {
'msbuild_toolset':'<(toolset)'
}]
],
'configurations': {
'Debug': {
'defines!': [
'NDEBUG'
],
'cflags_cc!': [
'-O3',
'-Os',
'-DNDEBUG'
],
'xcode_settings': {
'OTHER_CPLUSPLUSFLAGS!': [
'-O3',
'-Os',
'-DDEBUG'
],
'GCC_OPTIMIZATION_LEVEL': '0',
'GCC_GENERATE_DEBUGGING_SYMBOLS': 'YES'
},
'msvs_settings': {
'VCCLCompilerTool': {
'ExceptionHandling': 1, # /EHsc
}
}
},
'Release': {
'defines': [
'NDEBUG'
],
'xcode_settings': {
'OTHER_CPLUSPLUSFLAGS!': [
'-Os',
'-O2'
],
'GCC_OPTIMIZATION_LEVEL': '3',
'LLVM_LTO': 'YES',
'GCC_SYMBOLS_PRIVATE_EXTERN': 'YES',
'GCC_GENERATE_DEBUGGING_SYMBOLS': 'NO',
'DEAD_CODE_STRIPPING': 'YES',
'GCC_INLINES_ARE_PRIVATE_EXTERN': 'YES'
},
'msvs_settings': {
'VCCLCompilerTool': {
'ExceptionHandling': 1, # /EHsc
}
}
}
}
}
}
@@ -0,0 +1,8 @@
import { MatcherBaseClass, MatchOptions, SeparatorMatch } from '../../types';
type SeparatorMatchOptions = Pick<MatchOptions, 'password'>;
declare class MatchSeparator extends MatcherBaseClass {
static getMostUsedSeparatorChar(password: string): string | undefined;
static getSeparatorRegex(separator: string): RegExp;
match({ password }: SeparatorMatchOptions): SeparatorMatch[];
}
export default MatchSeparator;
@@ -0,0 +1,2 @@
import type { LibDefinition } from '../variable';
export declare const es2022_intl: LibDefinition;
@@ -0,0 +1,50 @@
import { createContext, useContext } from "./context.js";
import { Children } from "./children.js";
import { Fragment, cloneElement, isValidElement, jsx, memo, reactAPICompatVersion } from "./base.js";
import { createRef, forwardRef, startTransition, startViewTransition, use, useCallback, useDebugValue, useDeferredValue, useEffect, useId, useImperativeHandle, useInsertionEffect, useLayoutEffect, useMemo, useReducer, useRef, useState, useSyncExternalStore, useTransition, useViewTransition } from "./hooks/index.js";
import { useActionState, useOptimistic } from "./dom/hooks/index.js";
import { Suspense } from "./streaming.js";
import { ErrorBoundary } from "./components.js";
//#region src/jsx/index.ts
/**
* @module
* JSX for Hono.
*/
var jsx_default = {
version: reactAPICompatVersion,
memo,
Fragment,
StrictMode: Fragment,
isValidElement,
createElement: jsx,
cloneElement,
ErrorBoundary,
createContext,
useContext,
useState,
useEffect,
useRef,
useCallback,
useReducer,
useId,
useDebugValue,
use,
startTransition,
useTransition,
useDeferredValue,
startViewTransition,
useViewTransition,
useMemo,
useLayoutEffect,
useInsertionEffect,
createRef,
forwardRef,
useImperativeHandle,
useSyncExternalStore,
useActionState,
useOptimistic,
Suspense,
Children
};
//#endregion
export { Children, ErrorBoundary, Fragment, Fragment as StrictMode, Suspense, cloneElement, createContext, jsx as createElement, jsx, createRef, jsx_default as default, forwardRef, isValidElement, memo, startTransition, startViewTransition, use, useActionState, useCallback, useContext, useDebugValue, useDeferredValue, useEffect, useId, useImperativeHandle, useInsertionEffect, useLayoutEffect, useMemo, useOptimistic, useReducer, useRef, useState, useSyncExternalStore, useTransition, useViewTransition, reactAPICompatVersion as version };
@@ -0,0 +1 @@
{"version":3,"file":"scan.js","sources":["../../../src/icons/scan.ts"],"sourcesContent":["import createLucideIcon from '../createLucideIcon';\n\n/**\n * @component @name Scan\n * @description Lucide SVG icon component, renders SVG Element with children.\n *\n * @preview ![img](data:image/svg+xml;base64,PHN2ZyAgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIgogIHdpZHRoPSIyNCIKICBoZWlnaHQ9IjI0IgogIHZpZXdCb3g9IjAgMCAyNCAyNCIKICBmaWxsPSJub25lIgogIHN0cm9rZT0iIzAwMCIgc3R5bGU9ImJhY2tncm91bmQtY29sb3I6ICNmZmY7IGJvcmRlci1yYWRpdXM6IDJweCIKICBzdHJva2Utd2lkdGg9IjIiCiAgc3Ryb2tlLWxpbmVjYXA9InJvdW5kIgogIHN0cm9rZS1saW5lam9pbj0icm91bmQiCj4KICA8cGF0aCBkPSJNMyA3VjVhMiAyIDAgMCAxIDItMmgyIiAvPgogIDxwYXRoIGQ9Ik0xNyAzaDJhMiAyIDAgMCAxIDIgMnYyIiAvPgogIDxwYXRoIGQ9Ik0yMSAxN3YyYTIgMiAwIDAgMS0yIDJoLTIiIC8+CiAgPHBhdGggZD0iTTcgMjFINWEyIDIgMCAwIDEtMi0ydi0yIiAvPgo8L3N2Zz4K) - https://lucide.dev/icons/scan\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 Scan = createLucideIcon('Scan', [\n ['path', { d: 'M3 7V5a2 2 0 0 1 2-2h2', key: 'aa7l1z' }],\n ['path', { d: 'M17 3h2a2 2 0 0 1 2 2v2', key: '4qcy5o' }],\n ['path', { d: 'M21 17v2a2 2 0 0 1-2 2h-2', key: '6vwrx8' }],\n ['path', { d: 'M7 21H5a2 2 0 0 1-2-2v-2', key: 'ioqczr' }],\n]);\n\nexport default Scan;\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,CAA0B,CAAA,CAAA,CAAA,CAAA,CAAA,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,CACvD,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,CAA6B,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,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,CAC1D,CAAC,CAAA,CAAA,CAAA,CAAA,CAAA,CAAQ,CAAA,CAAA,CAAA,CAAE,GAAG,CAA4B,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,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;AAC3D,CAAC,CAAA,CAAA;;"}
@@ -0,0 +1,45 @@
/*
MIT License http://www.opensource.org/licenses/mit-license.php
Author Tobias Koppers @sokra
*/
"use strict";
/**
* @param {string} path path
* @returns {{ paths: string[], segments: string[] }}} paths and segments
*/
module.exports = function getPaths(path) {
if (path === "/") return { paths: ["/"], segments: [""] };
const parts = path.split(/(.*?[\\/]+)/);
const paths = [path];
const segments = [parts[parts.length - 1]];
let part = parts[parts.length - 1];
path = path.slice(0, Math.max(0, path.length - part.length - 1));
for (let i = parts.length - 2; i > 2; i -= 2) {
paths.push(path);
part = parts[i];
path = path.slice(0, Math.max(0, path.length - part.length)) || "/";
segments.push(part.slice(0, -1));
}
[, part] = parts;
segments.push(part);
paths.push(part);
return {
paths,
segments,
};
};
/**
* @param {string} path path
* @returns {string | null} basename or null
*/
module.exports.basename = function basename(path) {
const i = path.lastIndexOf("/");
const j = path.lastIndexOf("\\");
const resolvedPath = i < 0 ? j : j < 0 ? i : i < j ? j : i;
if (resolvedPath < 0) return null;
const basename = path.slice(resolvedPath + 1);
return basename;
};
@@ -0,0 +1,122 @@
Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
const require_http_exception = require("../../http-exception.js");
const require_helper_cookie_index = require("../../helper/cookie/index.js");
const require_utils_jwt_index = require("../../utils/jwt/index.js");
//#region src/middleware/jwk/jwk.ts
/**
* JWK Auth Middleware for Hono.
*
* @see {@link https://hono.dev/docs/middleware/builtin/jwk}
*
* @param {object} options - The options for the JWK middleware.
* @param {HonoJsonWebKey[] | ((ctx: Context) => Promise<HonoJsonWebKey[]> | HonoJsonWebKey[])} [options.keys] - The public keys used for JWK verification, or a function that returns them.
* @param {string | ((ctx: Context) => Promise<string> | string)} [options.jwks_uri] - If set to a URI string or a function that returns a URI string, attempt to fetch JWKs from it. The response must be a JSON object containing a `keys` array, which will be merged with the `keys` option.
* @param {boolean} [options.allow_anon] - If set to `true`, the middleware allows requests without a token to proceed without authentication.
* @param {string} [options.cookie] - If set, the middleware attempts to retrieve the token from a cookie with these options (optionally signed) only if no token is found in the header.
* @param {string} [options.headerName='Authorization'] - The name of the header to look for the JWT token. Default is 'Authorization'.
* @param {string} [options.realm] - The protection space described by the `realm` parameter of the returned `WWW-Authenticate` challenge header. Defaults to the request URL.
* @param {AsymmetricAlgorithm[]} options.alg - An array of allowed asymmetric algorithms for JWT verification. Only tokens signed with these algorithms will be accepted.
* @param {RequestInit} [init] - Optional init options for the `fetch` request when retrieving JWKS from a URI.
* @param {VerifyOptions} [options.verification] - Additional options for JWK payload verification.
* @returns {MiddlewareHandler} The middleware handler function.
*
* @example
* ```ts
* const app = new Hono()
*
* app.use("/auth/*", jwk({
* jwks_uri: (c) => `https://${c.env.authServer}/.well-known/jwks.json`,
* headerName: 'x-custom-auth-header', // Optional, default is 'Authorization'
* }))
*
* app.get('/auth/page', (c) => {
* return c.text('You are authorized')
* })
* ```
*/
const jwk = (options, init) => {
const verifyOpts = options.verification || {};
if (!options || !(options.keys || options.jwks_uri)) throw new Error("JWK auth middleware requires options for either \"keys\" or \"jwks_uri\" or both");
if (!crypto.subtle || !crypto.subtle.importKey) throw new Error("`crypto.subtle.importKey` is undefined. JWK auth middleware requires it.");
return async function jwk(ctx, next) {
const headerName = options.headerName || "Authorization";
const credentials = ctx.req.raw.headers.get(headerName);
let token;
if (credentials) {
const parts = credentials.split(/\s+/);
if (parts.length !== 2 || parts[0].toLowerCase() !== "bearer") {
const errDescription = "invalid credentials structure";
throw new require_http_exception.HTTPException(401, {
message: errDescription,
res: unauthorizedResponse({
ctx,
error: "invalid_request",
errDescription,
realm: options.realm
})
});
} else token = parts[1];
} else if (options.cookie) {
if (typeof options.cookie == "string") token = require_helper_cookie_index.getCookie(ctx, options.cookie);
else if (options.cookie.secret) {
if (options.cookie.prefixOptions) token = await require_helper_cookie_index.getSignedCookie(ctx, options.cookie.secret, options.cookie.key, options.cookie.prefixOptions);
else token = await require_helper_cookie_index.getSignedCookie(ctx, options.cookie.secret, options.cookie.key);
} else if (options.cookie.prefixOptions) token = require_helper_cookie_index.getCookie(ctx, options.cookie.key, options.cookie.prefixOptions);
else token = require_helper_cookie_index.getCookie(ctx, options.cookie.key);
}
if (!token) {
if (options.allow_anon) return next();
const errDescription = "no authorization included in request";
throw new require_http_exception.HTTPException(401, {
message: errDescription,
res: unauthorizedResponse({
ctx,
error: "invalid_request",
errDescription,
realm: options.realm
})
});
}
let payload;
let cause;
try {
const keys = typeof options.keys === "function" ? await options.keys(ctx) : options.keys;
const jwks_uri = typeof options.jwks_uri === "function" ? await options.jwks_uri(ctx) : options.jwks_uri;
payload = await require_utils_jwt_index.Jwt.verifyWithJwks(token, {
keys,
jwks_uri,
verification: verifyOpts,
allowedAlgorithms: options.alg
}, init);
} catch (e) {
cause = e;
}
if (!payload) {
if (cause instanceof Error && cause.constructor === Error) throw cause;
throw new require_http_exception.HTTPException(401, {
message: "Unauthorized",
res: unauthorizedResponse({
ctx,
error: "invalid_token",
statusText: "Unauthorized",
errDescription: "token verification failure",
realm: options.realm
}),
cause
});
}
ctx.set("jwtPayload", payload);
await next();
};
};
function unauthorizedResponse(opts) {
const realm = (opts.realm ?? opts.ctx.req.url).replace(/"/g, "\\\"");
const errDescription = opts.errDescription.replace(/"/g, "\\\"");
return new Response("Unauthorized", {
status: 401,
statusText: opts.statusText,
headers: { "WWW-Authenticate": `Bearer realm="${realm}",error="${opts.error}",error_description="${errDescription}"` }
});
}
//#endregion
exports.jwk = jwk;
@@ -0,0 +1 @@
module.exports={A:{A:{"2":"_E"},B:{"1":"_FB _jF","2":"_I","130":"_zR"},C:{"2":"_S"},D:{"1":"_UF _eC _jF","16":"_Y","130":"_0R"},E:{"1":"_KG _UD _ID","16":"_e","130":"_BI"},F:{"1":"_MC _dH","2":"_T","130":"_OS"},G:{"1":"_YR _CP","16":"lC","130":"_WJ"},H:{"2":"1D"},I:{"1":"_G","130":"I"},J:{"16":"_B"},K:{"1":"H","2":"_D"},L:{"130":"I"},M:{"2":"YC"},N:{"2":"_A"},O:{"1":"bC"},P:{"1":"_F"},Q:{"1":"JE"},R:{"1":"KE"},S:{"2":"_C"}},B:7,C:"CSS overflow: overlay",D:true};
@@ -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 CircleEqual = createLucideIcon("CircleEqual", [
["path", { d: "M7 10h10", key: "1101jm" }],
["path", { d: "M7 14h10", key: "1mhdw3" }],
["circle", { cx: "12", cy: "12", r: "10", key: "1mglay" }]
]);
export { CircleEqual as default };
//# sourceMappingURL=circle-equal.js.map
@@ -0,0 +1,66 @@
"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
const codegen_1 = require("../../compile/codegen");
const util_1 = require("../../compile/util");
const error = {
message: ({ params }) => (0, codegen_1.str) `must match "${params.ifClause}" schema`,
params: ({ params }) => (0, codegen_1._) `{failingKeyword: ${params.ifClause}}`,
};
const def = {
keyword: "if",
schemaType: ["object", "boolean"],
trackErrors: true,
error,
code(cxt) {
const { gen, parentSchema, it } = cxt;
if (parentSchema.then === undefined && parentSchema.else === undefined) {
(0, util_1.checkStrictMode)(it, '"if" without "then" and "else" is ignored');
}
const hasThen = hasSchema(it, "then");
const hasElse = hasSchema(it, "else");
if (!hasThen && !hasElse)
return;
const valid = gen.let("valid", true);
const schValid = gen.name("_valid");
validateIf();
cxt.reset();
if (hasThen && hasElse) {
const ifClause = gen.let("ifClause");
cxt.setParams({ ifClause });
gen.if(schValid, validateClause("then", ifClause), validateClause("else", ifClause));
}
else if (hasThen) {
gen.if(schValid, validateClause("then"));
}
else {
gen.if((0, codegen_1.not)(schValid), validateClause("else"));
}
cxt.pass(valid, () => cxt.error(true));
function validateIf() {
const schCxt = cxt.subschema({
keyword: "if",
compositeRule: true,
createErrors: false,
allErrors: false,
}, schValid);
cxt.mergeEvaluated(schCxt);
}
function validateClause(keyword, ifClause) {
return () => {
const schCxt = cxt.subschema({ keyword }, schValid);
gen.assign(valid, schValid);
cxt.mergeValidEvaluated(schCxt, valid);
if (ifClause)
gen.assign(ifClause, (0, codegen_1._) `${keyword}`);
else
cxt.setParams({ ifClause: keyword });
};
}
},
};
function hasSchema(it, keyword) {
const schema = it.schema[keyword];
return schema !== undefined && !(0, util_1.alwaysValidSchema)(it, schema);
}
exports.default = def;
//# sourceMappingURL=if.js.map
@@ -0,0 +1,8 @@
import type { TSESTree } from '@typescript-eslint/types';
import { DefinitionBase } from './DefinitionBase';
import { DefinitionType } from './DefinitionType';
export declare class ClassNameDefinition extends DefinitionBase<DefinitionType.ClassName, TSESTree.ClassDeclaration | TSESTree.ClassExpression, null, TSESTree.Identifier> {
readonly isTypeDefinition = true;
readonly isVariableDefinition = true;
constructor(name: TSESTree.Identifier, node: ClassNameDefinition['node']);
}
@@ -0,0 +1,227 @@
"use strict";
var __importDefault = (this && this.__importDefault) || function (mod) {
return (mod && mod.__esModule) ? mod : { "default": mod };
};
Object.defineProperty(exports, "__esModule", { value: true });
exports.replace = void 0;
// tar -r
const fs_minipass_1 = require("@isaacs/fs-minipass");
const node_fs_1 = __importDefault(require("node:fs"));
const node_path_1 = __importDefault(require("node:path"));
const header_js_1 = require("./header.js");
const list_js_1 = require("./list.js");
const make_command_js_1 = require("./make-command.js");
const options_js_1 = require("./options.js");
const pack_js_1 = require("./pack.js");
// starting at the head of the file, read a Header
// If the checksum is invalid, that's our position to start writing
// If it is, jump forward by the specified size (round up to 512)
// and try again.
// Write the new Pack stream starting there.
const replaceSync = (opt, files) => {
const p = new pack_js_1.PackSync(opt);
let threw = true;
let fd;
let position;
try {
try {
fd = node_fs_1.default.openSync(opt.file, 'r+');
}
catch (er) {
if (er?.code === 'ENOENT') {
fd = node_fs_1.default.openSync(opt.file, 'w+');
}
else {
throw er;
}
}
const st = node_fs_1.default.fstatSync(fd);
const headBuf = Buffer.alloc(512);
POSITION: for (position = 0; position < st.size; position += 512) {
for (let bufPos = 0, bytes = 0; bufPos < 512; bufPos += bytes) {
bytes = node_fs_1.default.readSync(fd, headBuf, bufPos, headBuf.length - bufPos, position + bufPos);
if (position === 0 && headBuf[0] === 0x1f && headBuf[1] === 0x8b) {
throw new Error('cannot append to compressed archives');
}
if (!bytes) {
break POSITION;
}
}
const h = new header_js_1.Header(headBuf);
if (!h.cksumValid) {
break;
}
const entryBlockSize = 512 * Math.ceil((h.size || 0) / 512);
if (position + entryBlockSize + 512 > st.size) {
break;
}
// the 512 for the header we just parsed will be added as well
// also jump ahead all the blocks for the body
position += entryBlockSize;
if (opt.mtimeCache && h.mtime) {
opt.mtimeCache.set(String(h.path), h.mtime);
}
}
threw = false;
streamSync(opt, p, position, fd, files);
}
finally {
if (threw) {
try {
node_fs_1.default.closeSync(fd);
}
catch { }
}
}
};
const streamSync = (opt, p, position, fd, files) => {
const stream = new fs_minipass_1.WriteStreamSync(opt.file, {
fd: fd,
start: position,
});
p.pipe(stream);
addFilesSync(p, files);
};
const replaceAsync = (opt, files) => {
files = Array.from(files);
const p = new pack_js_1.Pack(opt);
const getPos = (fd, size, cb_) => {
const cb = (er, pos) => {
if (er) {
node_fs_1.default.close(fd, _ => cb_(er));
}
else {
cb_(null, pos);
}
};
let position = 0;
if (size === 0) {
return cb(null, 0);
}
let bufPos = 0;
const headBuf = Buffer.alloc(512);
const onread = (er, bytes) => {
if (er || bytes === undefined) {
return cb(er);
}
bufPos += bytes;
if (bufPos < 512 && bytes) {
return node_fs_1.default.read(fd, headBuf, bufPos, headBuf.length - bufPos, position + bufPos, onread);
}
if (position === 0 && headBuf[0] === 0x1f && headBuf[1] === 0x8b) {
return cb(new Error('cannot append to compressed archives'));
}
// truncated header
if (bufPos < 512) {
return cb(null, position);
}
const h = new header_js_1.Header(headBuf);
if (!h.cksumValid) {
return cb(null, position);
}
/* c8 ignore next */
const entryBlockSize = 512 * Math.ceil((h.size ?? 0) / 512);
if (position + entryBlockSize + 512 > size) {
return cb(null, position);
}
position += entryBlockSize + 512;
if (position >= size) {
return cb(null, position);
}
if (opt.mtimeCache && h.mtime) {
opt.mtimeCache.set(String(h.path), h.mtime);
}
bufPos = 0;
node_fs_1.default.read(fd, headBuf, 0, 512, position, onread);
};
node_fs_1.default.read(fd, headBuf, 0, 512, position, onread);
};
const promise = new Promise((resolve, reject) => {
p.on('error', reject);
let flag = 'r+';
const onopen = (er, fd) => {
if (er && er.code === 'ENOENT' && flag === 'r+') {
flag = 'w+';
return node_fs_1.default.open(opt.file, flag, onopen);
}
if (er || !fd) {
return reject(er);
}
node_fs_1.default.fstat(fd, (er, st) => {
if (er) {
return node_fs_1.default.close(fd, () => reject(er));
}
getPos(fd, st.size, (er, position) => {
if (er) {
return reject(er);
}
const stream = new fs_minipass_1.WriteStream(opt.file, {
fd: fd,
start: position,
});
p.pipe(stream);
stream.on('error', reject);
stream.on('close', resolve);
addFilesAsync(p, files);
});
});
};
node_fs_1.default.open(opt.file, flag, onopen);
});
return promise;
};
const addFilesSync = (p, files) => {
files.forEach(file => {
if (file.charAt(0) === '@') {
(0, list_js_1.list)({
file: node_path_1.default.resolve(p.cwd, file.slice(1)),
sync: true,
noResume: true,
onReadEntry: entry => p.add(entry),
});
}
else {
p.add(file);
}
});
p.end();
};
const addFilesAsync = async (p, files) => {
for (const file of files) {
if (file.charAt(0) === '@') {
await (0, list_js_1.list)({
file: node_path_1.default.resolve(String(p.cwd), file.slice(1)),
noResume: true,
onReadEntry: entry => p.add(entry),
});
}
else {
p.add(file);
}
}
p.end();
};
exports.replace = (0, make_command_js_1.makeCommand)(replaceSync, replaceAsync,
/* c8 ignore start */
() => {
throw new TypeError('file is required');
}, () => {
throw new TypeError('file is required');
},
/* c8 ignore stop */
(opt, entries) => {
if (!(0, options_js_1.isFile)(opt)) {
throw new TypeError('file is required');
}
if (opt.gzip ||
opt.brotli ||
opt.zstd ||
opt.file.endsWith('.br') ||
opt.file.endsWith('.tbr')) {
throw new TypeError('cannot append to compressed archives');
}
if (!entries?.length) {
throw new TypeError('no paths specified to add/replace');
}
});
//# sourceMappingURL=replace.js.map