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,62 @@
/**
* @fileoverview Rule to flag when using constructor for wrapper objects
* @author Ilya Volodin
*/
"use strict";
//------------------------------------------------------------------------------
// Requirements
//------------------------------------------------------------------------------
const { getVariableByName } = require("./utils/ast-utils");
//------------------------------------------------------------------------------
// Rule Definition
//------------------------------------------------------------------------------
/** @type {import('../types').Rule.RuleModule} */
module.exports = {
meta: {
type: "suggestion",
docs: {
description:
"Disallow `new` operators with the `String`, `Number`, and `Boolean` objects",
recommended: false,
url: "https://eslint.org/docs/latest/rules/no-new-wrappers",
},
schema: [],
messages: {
noConstructor: "Do not use {{fn}} as a constructor.",
},
},
create(context) {
const { sourceCode } = context;
return {
NewExpression(node) {
const wrapperObjects = ["String", "Number", "Boolean"];
const { name } = node.callee;
if (wrapperObjects.includes(name)) {
const variable = getVariableByName(
sourceCode.getScope(node),
name,
);
if (variable && variable.identifiers.length === 0) {
context.report({
node,
messageId: "noConstructor",
data: { fn: name },
});
}
}
},
};
},
};
@@ -0,0 +1 @@
{"version":3,"file":"workflow.js","sources":["../../../src/icons/workflow.ts"],"sourcesContent":["import createLucideIcon from '../createLucideIcon';\n\n/**\n * @component @name Workflow\n * @description Lucide SVG icon component, renders SVG Element with children.\n *\n * @preview ![img](data:image/svg+xml;base64,PHN2ZyAgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIgogIHdpZHRoPSIyNCIKICBoZWlnaHQ9IjI0IgogIHZpZXdCb3g9IjAgMCAyNCAyNCIKICBmaWxsPSJub25lIgogIHN0cm9rZT0iIzAwMCIgc3R5bGU9ImJhY2tncm91bmQtY29sb3I6ICNmZmY7IGJvcmRlci1yYWRpdXM6IDJweCIKICBzdHJva2Utd2lkdGg9IjIiCiAgc3Ryb2tlLWxpbmVjYXA9InJvdW5kIgogIHN0cm9rZS1saW5lam9pbj0icm91bmQiCj4KICA8cmVjdCB3aWR0aD0iOCIgaGVpZ2h0PSI4IiB4PSIzIiB5PSIzIiByeD0iMiIgLz4KICA8cGF0aCBkPSJNNyAxMXY0YTIgMiAwIDAgMCAyIDJoNCIgLz4KICA8cmVjdCB3aWR0aD0iOCIgaGVpZ2h0PSI4IiB4PSIxMyIgeT0iMTMiIHJ4PSIyIiAvPgo8L3N2Zz4K) - https://lucide.dev/icons/workflow\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 Workflow = createLucideIcon('Workflow', [\n ['rect', { width: '8', height: '8', x: '3', y: '3', rx: '2', key: 'by2w9f' }],\n ['path', { d: 'M7 11v4a2 2 0 0 0 2 2h4', key: 'xkn7yn' }],\n ['rect', { width: '8', height: '8', x: '13', y: '13', rx: '2', key: '1cgmvn' }],\n]);\n\nexport default Workflow;\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,CAAA,CAAQ,CAAA,CAAA,CAAE,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAO,KAAK,CAAQ,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAK,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,CAC5E,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,CAAA,CAAQ,CAAA,CAAA,CAAE,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAO,KAAK,CAAQ,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAK,CAAG,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAM,GAAG,CAAM,CAAA,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":"audio-lines.js","sources":["../../../src/icons/audio-lines.ts"],"sourcesContent":["import createLucideIcon from '../createLucideIcon';\n\n/**\n * @component @name AudioLines\n * @description Lucide SVG icon component, renders SVG Element with children.\n *\n * @preview ![img](data:image/svg+xml;base64,PHN2ZyAgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIgogIHdpZHRoPSIyNCIKICBoZWlnaHQ9IjI0IgogIHZpZXdCb3g9IjAgMCAyNCAyNCIKICBmaWxsPSJub25lIgogIHN0cm9rZT0iIzAwMCIgc3R5bGU9ImJhY2tncm91bmQtY29sb3I6ICNmZmY7IGJvcmRlci1yYWRpdXM6IDJweCIKICBzdHJva2Utd2lkdGg9IjIiCiAgc3Ryb2tlLWxpbmVjYXA9InJvdW5kIgogIHN0cm9rZS1saW5lam9pbj0icm91bmQiCj4KICA8cGF0aCBkPSJNMiAxMHYzIiAvPgogIDxwYXRoIGQ9Ik02IDZ2MTEiIC8+CiAgPHBhdGggZD0iTTEwIDN2MTgiIC8+CiAgPHBhdGggZD0iTTE0IDh2NyIgLz4KICA8cGF0aCBkPSJNMTggNXYxMyIgLz4KICA8cGF0aCBkPSJNMjIgMTB2MyIgLz4KPC9zdmc+Cg==) - https://lucide.dev/icons/audio-lines\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 AudioLines = createLucideIcon('AudioLines', [\n ['path', { d: 'M2 10v3', key: '1fnikh' }],\n ['path', { d: 'M6 6v11', key: '11sgs0' }],\n ['path', { d: 'M10 3v18', key: 'yhl04a' }],\n ['path', { d: 'M14 8v7', key: '3a1oy3' }],\n ['path', { d: 'M18 5v13', key: '123xd1' }],\n ['path', { d: 'M22 10v3', key: '154ddg' }],\n]);\n\nexport default AudioLines;\n"],"names":[],"mappings":";;;;;;;;;AAaM,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAa,iBAAiB,YAAc,CAAA,CAAA,CAAA;AAAA,CAAA,CAChD,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,CAAW,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAK,UAAU,CAAA,CAAA;AAAA,CAAA,CACxC,CAAC,CAAA,CAAA,CAAA,CAAA,CAAA,CAAQ,CAAA,CAAA,CAAA,CAAE,GAAG,CAAY,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAK,UAAU,CAAA,CAAA;AAAA,CAAA,CACzC,CAAC,CAAA,CAAA,CAAA,CAAA,CAAA,CAAQ,CAAA,CAAA,CAAA,CAAE,GAAG,CAAW,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAK,UAAU,CAAA,CAAA;AAAA,CAAA,CACxC,CAAC,CAAA,CAAA,CAAA,CAAA,CAAA,CAAQ,CAAA,CAAA,CAAA,CAAE,GAAG,CAAY,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAK,UAAU,CAAA,CAAA;AAAA,CAAA,CACzC,CAAC,CAAA,CAAA,CAAA,CAAA,CAAA,CAAQ,CAAA,CAAA,CAAA,CAAE,GAAG,CAAY,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAK,UAAU,CAAA;AAC3C,CAAC,CAAA,CAAA;;"}
@@ -0,0 +1,23 @@
const MS_IN_SECOND = 1e3;
const MS_IN_MINUTE = 6e4;
const MS_IN_HOUR = 36e5;
const MS_IN_DAY = 864e5;
const rangeOfUnits = [
"time",
"year",
"month",
"date",
"day",
"hour",
"minute",
"second",
"millisecond",
"utcOffset"
];
export {
MS_IN_DAY as M,
MS_IN_HOUR as a,
MS_IN_MINUTE as b,
MS_IN_SECOND as c,
rangeOfUnits as r
};
@@ -0,0 +1 @@
const t=(t,e,s)=>s>e?e:s<t?t:s;function e(t,e){return e?`${t}. For more information and steps for solving, visit https://motion.dev/troubleshooting/${e}`:t}let s=()=>{},n=()=>{};"undefined"!=typeof process&&"production"!==process.env?.NODE_ENV&&(s=(t,s,n)=>{t||"undefined"==typeof console||console.warn(e(s,n))},n=(t,s,n)=>{if(!t)throw new Error(e(s,n))});const i={},r=t=>/^-?(?:\d+(?:\.\d+)?|\.\d+)$/u.test(t),a=t=>/^0[^.\s]+$/u.test(t);function o(t){let e;return()=>(void 0===e&&(e=t()),e)}const h=t=>t;class l{constructor(){this.subscriptions=[]}add(t){var e,s;return e=this.subscriptions,s=t,-1===e.indexOf(s)&&e.push(s),()=>function(t,e){const s=t.indexOf(e);s>-1&&t.splice(s,1)}(this.subscriptions,t)}notify(t,e,s){const n=this.subscriptions.length;if(n)if(1===n)this.subscriptions[0](t,e,s);else for(let i=0;i<n;i++){const n=this.subscriptions[i];n&&n(t,e,s)}}getSize(){return this.subscriptions.length}clear(){this.subscriptions.length=0}}const u=t=>1e3*t,c=t=>t/1e3;function d(t,e){return e?t*(1e3/e):0}const p=t=>Array.isArray(t)&&"number"==typeof t[0],f=["setup","read","resolveKeyframes","preUpdate","update","preRender","render","postRender"];function m(t,e){let s=!1,n=!0;const r={delta:0,timestamp:0,isProcessing:!1},a=()=>s=!0,o=f.reduce((t,e)=>(t[e]=function(t){let e=new Set,s=new Set,n=!1,i=!1;const r=new WeakSet;let a={delta:0,timestamp:0,isProcessing:!1};function o(e){r.has(e)&&(h.schedule(e),t()),e(a)}const h={schedule:(t,i=!1,a=!1)=>{const o=a&&n?e:s;return i&&r.add(t),o.add(t),t},cancel:t=>{s.delete(t),r.delete(t)},process:t=>{if(a=t,n)return void(i=!0);n=!0;const r=e;e=s,s=r,e.forEach(o),e.clear(),n=!1,i&&(i=!1,h.process(t))}};return h}(a),t),{}),{setup:h,read:l,resolveKeyframes:u,preUpdate:c,update:d,preRender:p,render:m,postRender:g}=o,v=()=>{const a=i.useManualTiming,o=a?r.timestamp:performance.now();s=!1,a||(r.delta=n?1e3/60:Math.max(Math.min(o-r.timestamp,40),1)),r.timestamp=o,r.isProcessing=!0,h.process(r),l.process(r),u.process(r),c.process(r),d.process(r),p.process(r),m.process(r),g.process(r),r.isProcessing=!1,s&&e&&(n=!1,t(v))};return{schedule:f.reduce((e,i)=>{const a=o[i];return e[i]=(e,i=!1,o=!1)=>(s||(s=!0,n=!0,r.isProcessing||t(v)),a.schedule(e,i,o)),e},{}),cancel:t=>{for(let e=0;e<f.length;e++)o[f[e]].cancel(t)},state:r,steps:o}}const{schedule:g,cancel:v,state:y}=m("undefined"!=typeof requestAnimationFrame?requestAnimationFrame:h,!0);let b;function w(){b=void 0}const V={now:()=>(void 0===b&&V.set(y.isProcessing||i.useManualTiming?y.timestamp:performance.now()),b),set:t=>{b=t,queueMicrotask(w)}},S=t=>e=>"string"==typeof e&&e.startsWith(t),M=S("--"),T=S("var(--"),A=t=>!!T(t)&&x.test(t.split("/*")[0].trim()),x=/var\(--(?:[\w-]+\s*|[\w-]+\s*,(?:\s*[^)(\s]|\s*\((?:[^)(]|\([^)(]*\))*\))+\s*)\)$/iu;function C(t){return"string"==typeof t&&t.split("/*")[0].includes("var(--")}const k={test:t=>"number"==typeof t,parse:parseFloat,transform:t=>t},F={...k,transform:e=>t(0,1,e)},E={...k,default:1},B=t=>Math.round(1e5*t)/1e5,P=/-?(?:\d+(?:\.\d+)?|\.\d+)/gu;const R=/^(?:#[\da-f]{3,8}|(?:rgb|hsl)a?\((?:-?[\d.]+%?[,\s]+){2}-?[\d.]+%?\s*(?:[,/]\s*)?(?:\b\d+(?:\.\d+)?|\.\d+)?%?\))$/iu,I=(t,e)=>s=>Boolean("string"==typeof s&&R.test(s)&&s.startsWith(t)||e&&!function(t){return null==t}(s)&&Object.prototype.hasOwnProperty.call(s,e)),N=(t,e,s)=>n=>{if("string"!=typeof n)return n;const[i,r,a,o]=n.match(P);return{[t]:parseFloat(i),[e]:parseFloat(r),[s]:parseFloat(a),alpha:void 0!==o?parseFloat(o):1}},O={...k,transform:e=>Math.round((e=>t(0,255,e))(e))},$={test:I("rgb","red"),parse:N("red","green","blue"),transform:({red:t,green:e,blue:s,alpha:n=1})=>"rgba("+O.transform(t)+", "+O.transform(e)+", "+O.transform(s)+", "+B(F.transform(n))+")"};const L={test:I("#"),parse:function(t){let e="",s="",n="",i="";return t.length>5?(e=t.substring(1,3),s=t.substring(3,5),n=t.substring(5,7),i=t.substring(7,9)):(e=t.substring(1,2),s=t.substring(2,3),n=t.substring(3,4),i=t.substring(4,5),e+=e,s+=s,n+=n,i+=i),{red:parseInt(e,16),green:parseInt(s,16),blue:parseInt(n,16),alpha:i?parseInt(i,16)/255:1}},transform:$.transform},Y=t=>({test:e=>"string"==typeof e&&e.endsWith(t)&&1===e.split(" ").length,parse:parseFloat,transform:e=>`${e}${t}`}),W=Y("deg"),X=Y("%"),j=Y("px"),z=Y("vh"),K=Y("vw"),U=(()=>({...X,parse:t=>X.parse(t)/100,transform:t=>X.transform(100*t)}))(),Z={test:I("hsl","hue"),parse:N("hue","saturation","lightness"),transform:({hue:t,saturation:e,lightness:s,alpha:n=1})=>"hsla("+Math.round(t)+", "+X.transform(B(e))+", "+X.transform(B(s))+", "+B(F.transform(n))+")"},D={test:t=>$.test(t)||L.test(t)||Z.test(t),parse:t=>$.test(t)?$.parse(t):Z.test(t)?Z.parse(t):L.parse(t),transform:t=>"string"==typeof t?t:t.hasOwnProperty("red")?$.transform(t):Z.transform(t),getAnimatableNone:t=>{const e=D.parse(t);return e.alpha=0,D.transform(e)}},q=/(?:#[\da-f]{3,8}|(?:rgb|hsl)a?\((?:-?[\d.]+%?[,\s]+){2}-?[\d.]+%?\s*(?:[,/]\s*)?(?:\b\d+(?:\.\d+)?|\.\d+)?%?\))/giu;const H="number",_="color",G=/var\s*\(\s*--(?:[\w-]+\s*|[\w-]+\s*,(?:\s*[^)(\s]|\s*\(Line truncated
@@ -0,0 +1 @@
{"version":3,"file":"manipulation.js","sourceRoot":"https://raw.githubusercontent.com/fb55/dom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C,IAAI,EAAE,CAAC;QACZ,IAAI,CAAC,IAAI,CAAC,IAAI,GAAG,IAAI,CAAC;IAC1B,CAAC;IAED,IAAI,CAAC,MAAM,GAAG,MAAM,CAAC;IACrB,IAAI,CAAC,IAAI,GAAG,IAAI,CAAC,IAAI,CAAC;IACtB,IAAI,CAAC,IAAI,GAAG,IAAI,CAAC;IACjB,IAAI,CAAC,IAAI,GAAG,IAAI,CAAC;AACrB,CAAC"}
@@ -0,0 +1,166 @@
/*
React projects that don't include the DOM library need these interfaces to compile.
React Native applications use React, but there is no DOM available. The JavaScript runtime
is ES6/ES2015 only. These definitions allow such projects to compile with only `--lib ES6`.
Warning: all of these interfaces are empty. If you want type definitions for various properties
(such as HTMLInputElement.prototype.value), you need to add `--lib DOM` (via command line or tsconfig.json).
*/
interface Event {}
interface AnimationEvent extends Event {}
interface ClipboardEvent extends Event {}
interface CompositionEvent extends Event {}
interface DragEvent extends Event {}
interface FocusEvent extends Event {}
interface InputEvent extends Event {}
interface KeyboardEvent extends Event {}
interface MouseEvent extends Event {}
interface TouchEvent extends Event {}
interface PointerEvent extends Event {}
interface SubmitEvent extends Event {}
interface ToggleEvent extends Event {}
interface TransitionEvent extends Event {}
interface UIEvent extends Event {}
interface WheelEvent extends Event {}
interface EventTarget {}
interface Document {}
interface DataTransfer {}
interface StyleMedia {}
interface Element {}
interface DocumentFragment {}
interface HTMLElement extends Element {}
interface HTMLAnchorElement extends HTMLElement {}
interface HTMLAreaElement extends HTMLElement {}
interface HTMLAudioElement extends HTMLElement {}
interface HTMLBaseElement extends HTMLElement {}
interface HTMLBodyElement extends HTMLElement {}
interface HTMLBRElement extends HTMLElement {}
interface HTMLButtonElement extends HTMLElement {}
interface HTMLCanvasElement extends HTMLElement {}
interface HTMLDataElement extends HTMLElement {}
interface HTMLDataListElement extends HTMLElement {}
interface HTMLDetailsElement extends HTMLElement {}
interface HTMLDialogElement extends HTMLElement {}
interface HTMLDivElement extends HTMLElement {}
interface HTMLDListElement extends HTMLElement {}
interface HTMLEmbedElement extends HTMLElement {}
interface HTMLFieldSetElement extends HTMLElement {}
interface HTMLFormElement extends HTMLElement {}
interface HTMLHeadingElement extends HTMLElement {}
interface HTMLHeadElement extends HTMLElement {}
interface HTMLHRElement extends HTMLElement {}
interface HTMLHtmlElement extends HTMLElement {}
interface HTMLIFrameElement extends HTMLElement {}
interface HTMLImageElement extends HTMLElement {}
interface HTMLInputElement extends HTMLElement {}
interface HTMLModElement extends HTMLElement {}
interface HTMLLabelElement extends HTMLElement {}
interface HTMLLegendElement extends HTMLElement {}
interface HTMLLIElement extends HTMLElement {}
interface HTMLLinkElement extends HTMLElement {}
interface HTMLMapElement extends HTMLElement {}
interface HTMLMetaElement extends HTMLElement {}
interface HTMLMeterElement extends HTMLElement {}
interface HTMLObjectElement extends HTMLElement {}
interface HTMLOListElement extends HTMLElement {}
interface HTMLOptGroupElement extends HTMLElement {}
interface HTMLOptionElement extends HTMLElement {}
interface HTMLOutputElement extends HTMLElement {}
interface HTMLParagraphElement extends HTMLElement {}
interface HTMLParamElement extends HTMLElement {}
interface HTMLPreElement extends HTMLElement {}
interface HTMLProgressElement extends HTMLElement {}
interface HTMLQuoteElement extends HTMLElement {}
interface HTMLSlotElement extends HTMLElement {}
interface HTMLScriptElement extends HTMLElement {}
interface HTMLSelectElement extends HTMLElement {}
interface HTMLSourceElement extends HTMLElement {}
interface HTMLSpanElement extends HTMLElement {}
interface HTMLStyleElement extends HTMLElement {}
interface HTMLTableElement extends HTMLElement {}
interface HTMLTableColElement extends HTMLElement {}
interface HTMLTableDataCellElement extends HTMLElement {}
interface HTMLTableHeaderCellElement extends HTMLElement {}
interface HTMLTableRowElement extends HTMLElement {}
interface HTMLTableSectionElement extends HTMLElement {}
interface HTMLTemplateElement extends HTMLElement {}
interface HTMLTextAreaElement extends HTMLElement {}
interface HTMLTimeElement extends HTMLElement {}
interface HTMLTitleElement extends HTMLElement {}
interface HTMLTrackElement extends HTMLElement {}
interface HTMLUListElement extends HTMLElement {}
interface HTMLVideoElement extends HTMLElement {}
interface HTMLWebViewElement extends HTMLElement {}
interface SVGElement extends Element {}
interface SVGSVGElement extends SVGElement {}
interface SVGCircleElement extends SVGElement {}
interface SVGClipPathElement extends SVGElement {}
interface SVGDefsElement extends SVGElement {}
interface SVGDescElement extends SVGElement {}
interface SVGEllipseElement extends SVGElement {}
interface SVGFEBlendElement extends SVGElement {}
interface SVGFEColorMatrixElement extends SVGElement {}
interface SVGFEComponentTransferElement extends SVGElement {}
interface SVGFECompositeElement extends SVGElement {}
interface SVGFEConvolveMatrixElement extends SVGElement {}
interface SVGFEDiffuseLightingElement extends SVGElement {}
interface SVGFEDisplacementMapElement extends SVGElement {}
interface SVGFEDistantLightElement extends SVGElement {}
interface SVGFEDropShadowElement extends SVGElement {}
interface SVGFEFloodElement extends SVGElement {}
interface SVGFEFuncAElement extends SVGElement {}
interface SVGFEFuncBElement extends SVGElement {}
interface SVGFEFuncGElement extends SVGElement {}
interface SVGFEFuncRElement extends SVGElement {}
interface SVGFEGaussianBlurElement extends SVGElement {}
interface SVGFEImageElement extends SVGElement {}
interface SVGFEMergeElement extends SVGElement {}
interface SVGFEMergeNodeElement extends SVGElement {}
interface SVGFEMorphologyElement extends SVGElement {}
interface SVGFEOffsetElement extends SVGElement {}
interface SVGFEPointLightElement extends SVGElement {}
interface SVGFESpecularLightingElement extends SVGElement {}
interface SVGFESpotLightElement extends SVGElement {}
interface SVGFETileElement extends SVGElement {}
interface SVGFETurbulenceElement extends SVGElement {}
interface SVGFilterElement extends SVGElement {}
interface SVGForeignObjectElement extends SVGElement {}
interface SVGGElement extends SVGElement {}
interface SVGImageElement extends SVGElement {}
interface SVGLineElement extends SVGElement {}
interface SVGLinearGradientElement extends SVGElement {}
interface SVGMarkerElement extends SVGElement {}
interface SVGMaskElement extends SVGElement {}
interface SVGMetadataElement extends SVGElement {}
interface SVGPathElement extends SVGElement {}
interface SVGPatternElement extends SVGElement {}
interface SVGPolygonElement extends SVGElement {}
interface SVGPolylineElement extends SVGElement {}
interface SVGRadialGradientElement extends SVGElement {}
interface SVGRectElement extends SVGElement {}
interface SVGSetElement extends SVGElement {}
interface SVGStopElement extends SVGElement {}
interface SVGSwitchElement extends SVGElement {}
interface SVGSymbolElement extends SVGElement {}
interface SVGTextElement extends SVGElement {}
interface SVGTextPathElement extends SVGElement {}
interface SVGTSpanElement extends SVGElement {}
interface SVGUseElement extends SVGElement {}
interface SVGViewElement extends SVGElement {}
interface FormData {}
interface Text {}
interface TouchList {}
interface WebGLRenderingContext {}
interface WebGL2RenderingContext {}
interface TrustedHTML {}
interface Blob {}
interface MediaStream {}
interface MediaSource {}
@@ -0,0 +1,32 @@
import { motionValue } from '../../value/index.mjs';
import { resolveVariant } from './resolve-dynamic-variants.mjs';
import { isKeyframesTarget } from './is-keyframes-target.mjs';
/**
* Set VisualElement's MotionValue, creating a new MotionValue for it if
* it doesn't exist.
*/
function setMotionValue(visualElement, key, value) {
if (visualElement.hasValue(key)) {
visualElement.getValue(key).set(value);
}
else {
visualElement.addValue(key, motionValue(value));
}
}
function resolveFinalValueInKeyframes(v) {
// TODO maybe throw if v.length - 1 is placeholder token?
return isKeyframesTarget(v) ? v[v.length - 1] || 0 : v;
}
function setTarget(visualElement, definition) {
const resolved = resolveVariant(visualElement, definition);
let { transitionEnd = {}, transition = {}, ...target } = resolved || {};
target = { ...target, ...transitionEnd };
for (const key in target) {
const value = resolveFinalValueInKeyframes(target[key]);
setMotionValue(visualElement, key, value);
}
}
export { setTarget };
//# sourceMappingURL=setters.mjs.map
@@ -0,0 +1 @@
{"version":3,"file":"route.js","names":[],"sources":["../../src/route.tsx"],"sourcesContent":["import {\n BaseRootRoute,\n BaseRoute,\n BaseRouteApi,\n notFound,\n} from '@tanstack/router-core'\nimport React from 'react'\nimport { useLoaderData } from './useLoaderData'\nimport { useLoaderDeps } from './useLoaderDeps'\nimport { useParams } from './useParams'\nimport { useSearch } from './useSearch'\nimport { useNavigate } from './useNavigate'\nimport { useMatch } from './useMatch'\nimport { useRouteContext } from './useRouteContext'\nimport { useRouter } from './useRouter'\nimport { Link } from './link'\nimport type {\n AnyContext,\n AnyRoute,\n AnyRouter,\n ConstrainLiteral,\n ErrorComponentProps,\n NotFoundError,\n NotFoundRouteProps,\n Register,\n RegisteredRouter,\n ResolveFullPath,\n ResolveId,\n ResolveParams,\n RootRoute as RootRouteCore,\n RootRouteId,\n RootRouteOptions,\n RouteConstraints,\n Route as RouteCore,\n RouteIds,\n RouteMask,\n RouteOptions,\n RouteTypesById,\n RouterCore,\n ToMaskOptions,\n UseNavigateResult,\n} from '@tanstack/router-core'\nimport type { UseLoaderDataRoute } from './useLoaderData'\nimport type { UseMatchRoute } from './useMatch'\nimport type { UseLoaderDepsRoute } from './useLoaderDeps'\nimport type { UseParamsRoute } from './useParams'\nimport type { UseSearchRoute } from './useSearch'\nimport type { UseRouteContextRoute } from './useRouteContext'\nimport type { LinkComponentRoute } from './link'\n\ndeclare module '@tanstack/router-core' {\n export interface UpdatableRouteOptionsExtensions {\n component?: RouteComponent\n errorComponent?: false | null | undefined | ErrorRouteComponent\n notFoundComponent?: NotFoundRouteComponent\n pendingComponent?: RouteComponent\n }\n\n export interface RootRouteOptionsExtensions {\n shellComponent?: ({\n children,\n }: {\n children: React.ReactNode\n }) => React.ReactNode\n }\n\n export interface RouteExtensions<\n in out TId extends string,\n in out TFullPath extends string,\n > {\n useMatch: UseMatchRoute<TId>\n useRouteContext: UseRouteContextRoute<TId>\n useSearch: UseSearchRoute<TId>\n useParams: UseParamsRoute<TId>\n useLoaderDeps: UseLoaderDepsRoute<TId>\n useLoaderData: UseLoaderDataRoute<TId>\n useNavigate: () => UseNavigateResult<TFullPath>\n Link: LinkComponentRoute<TFullPath>\n }\n}\n\n/**\n * Returns a route-specific API that exposes type-safe hooks pre-bound\n * to a single route ID. Useful for consuming a route's APIs from files\n * where the route object isn't directly imported (e.g. code-split files).\n *\n * @param id Route ID string literal for the target route.\n * @returns A `RouteApi` instance bound to the given route ID.\n * @link https://tanstack.com/router/latest/docs/framework/react/api/router/getRouteApiFunction\n */\nexport function getRouteApi<\n const TId,\n TRouter extends AnyRouter = RegisteredRouter,\n>(id: ConstrainLiteral<TId, RouteIds<TRouter['routeTree']>>) {\n return new RouteApi<TId, TRouter>({ id })\n}\n\nexport class RouteApi<\n TId,\n TRouter extends AnyRouter = RegisteredRouter,\n> extends BaseRouteApi<TId, TRouter> {\n /**\n * @deprecated Use the `getRouteApi` function instead.\n */\n constructor({ id }: { id: TId }) {\n super({ id })\n }\n\n useMatch: UseMatchRoute<TId> = (opts) => {\n return useMatch({\n select: opts?.select,\n from: this.id,\n structuralSharing: opts?.structuralSharing,\n } as any) as any\n }\n\n useRouteContext: UseRouteContextRoute<TId> = (opts) => {\n return useRouteContext({ ...(opts as any), from: this.id as any })\n }\n\n useSearch: UseSearchRoute<TId> = (opts) => {\n // eslint-disable-next-line @typescript-eslint/no-unnecessary-type-assertion\n return useSearch({\n select: opts?.select,\n structuralSharing: opts?.structuralSharing,\n from: this.id,\n } as any) as any\n }\n\n useParams: UseParamsRoute<TId> = (opts) => {\n // eslint-disable-next-line @typescript-eslint/no-unnecessary-type-assertion\n return useParams({\n select: opts?.select,\n structuralSharing: opts?.structuralSharing,\n from: this.id,\n } as any) as any\n }\n\n useLoaderDeps: UseLoaderDepsRoute<TId> = (opts) => {\n return useLoaderDeps({ ...opts, from: this.id, strict: false } as any)\n }\n\n useLoaderData: UseLoaderDataRoute<TId> = (opts) => {\n return useLoaderData({ ...opts, from: this.id, strict: false } as any)\n }\n\n useNavigate = (): UseNavigateResult<\n RouteTypesById<TRouter, TId>['fullPath']\n > => {\n const router = useRouter()\n return useNavigate({ from: router.routesById[this.id as string].fullPath })\n }\n\n notFound = (opts?: NotFoundError) => {\n return notFound({ routeId: this.id as string, ...opts })\n }\n\n Link: LinkComponentRoute<RouteTypesById<TRouter, TId>['fullPath']> =\n React.forwardRef((props, ref: React.ForwardedRef<HTMLAnchorElement>) => {\n Line truncated
@@ -0,0 +1,825 @@
export default `flf2a$ 8 7 20 -1 7
COINSTAK by Ron Fritz 8/94
Figlet Release 2/0
---
Font modified June 17, 2007 by patorjk
This was to widen the space character.
$ $@
$ $@
$ $@
$ $@
$ $@
$ $@
$ $@
$ $@@
O))@
O))@
O))@
O) @
O) @
@
O))@
@@
O) O)@
O) O)@
@
@
@
@
@
@@
@
O)) O)) @
O)))))) O))))@
O)) O)) @
O)) O)) @
O)))))) O))))@
O)) O)) @
@@
O)) @
O) O))@
O)) @
O)) @
O)) @
O)) O))@
O)) @
@@
@
O)) O)) @
O)) @
O)) @
O)) @
O)) @
O)) O)) @
@@
O) @
O)) O))@
O)) @
O))) @
O)) @
O)) O))@
O) @
@@
O))@
O)@
@
@
@
@
@
@@
O))@
O)) @
O)) @
O)) @
O)) @
O)) @
O))@
@@
O)) @
O)) @
O))@
O))@
O))@
O)) @
O)) @
@@
O)) @
O)) O)) O))@
O) O) O)) @
O)))) O)))))))@
O) O) O)) @
O)) O)) O))@
O)) @
@@
@
O)) @
O)) @
O))) O)))))@
O)) @
O)) @
@
@@
@
@
@
@
@
@
O))@
O)@@
@
@
@
O)))))@
@
@
@
@@
@
@
@
@
@
@
O))@
@@
O))@
O)) @
O)) @
O)) @
O)) @
O)) @
O)) @
@@
@
O)) @
O)) O)) @
O)) O)) @
O)) O))@
O)) O)) @
O))) @
@@
@
O)) @
O)) @
O)) @
O)) @
O)) @
O))))@
@@
@
O) O)) @
O) O))@
O)) @
O)) @
O)) @
O))))))))@
@@
@
O)) O)) @
O)) @
O)) @
O)) @
O))@
O))))) @
@@
@
O)) @
O O)) @
O) O)) @
O)) O)) @
O)))) O) O))@
O)) @
@@
@
O)) O))) @
O)) @
O))) @
O)) @
O))@
O))) O)) @
@@
@
O)) @
O)) @
O)) @
O) O)) @
O)) O))@
O)) O)) @
@@
@
O))))) O))@
O)) @
O)) @
O)) @
O)) @
O)) @
@@
@
O) @
O)) O)) @
O)) O)@
O)) O) @
O)) O)@
O)))) @
@@
@
O) O)) @
O)) O))@
O) O))@
O)) O)) @
O)) @
O)) @
@@
@
@
@
@
O))@
@
O))@
@@
@
@
@
@
O))@
@
O))@
O)@@
O))@
O)) @
O)) @
O)) @
O)) @
O)) @
O))@
@@
@
@
O))))))@
@
O))))))@
@
@
@@
O)) @
O)) @
O)) @
O))@
O)) @
O)) @
O)) @
@@
O))) @
O)) @
O))@
O)) @
O)) @
@
O)) @
@@
@
O))) @
O) O)) @
O) O)) O))@
O)) O))O O))@
O)) \`\`\` @
O)) @
@@
O) @
O) )) @
O) O)) @
O)) O)) @
O)))))) O)) @
O)) O)) @
O)) O))@
@@
O)) O)) @
O) O)) @
O) O))@
O))) O) @
O) O))@
O) O)@
O)))) O)) @
@@
O)) @
O)) O))@
O)) @
O)) @
O)) @
O)) O))@
O)))) @
@@
O))))) @
O)) O)) @
O)) O))@
O)) O))@
O)) O))@
O)) O)) @
O))))) @
@@
O))))))))@
O)) @
O)) @
O)))))) @
O)) @
O)) @
O))))))))@
@@
O))))))))@
O)) @
O)) @
O)))))) @
O)) @
O)) @
O)) @
@@
O)))) @
O) O)) @
O)) @
O)) @
O)) O))))@
O)) O) @
O))))) @
@@
O)) O))@
O)) O))@
O)) O))@
O)))))) O))@
O)) O))@
O)) O))@
O)) O))@
@@
O))@
O))@
O))@
O))@
O))@
O))@
O))@
@@
O))@
O))@
O))@
O))@
O))@
O) O))@
O)))) @
@@
O)) O)) @
O)) O)) @
O)) O)) @
O) O) @
O)) O)) @
O)) O)) @
O)) O))@
@@
O)) @
O)) @
O)) @
O)) @
O)) @
O)) @
O))))))))@
@@
O)) O))@
O) O)) O)))@
O)) O)) O O))@
O)) O)) O))@
O)) O) O))@
O)) O))@
O)) O))@
@@
O))) O))@
O) O)) O))@
O)) O)) O))@
O)) O)) O))@
O)) O) O))@
O)) O) ))@
O)) O))@
@@
O)))) @
O)) O)) @
O)) O))@
O)) O))@
O)) O))@
O)) O)) @
O)))) @
@@
O))))))) @
O)) O))@
O)) O))@
O))))))) @
O)) @
O)) @
O)) @
@@
O)))) @
O)) O)) @
O)) O))@
O)) O))@
O)) O))@
O)) O) O)) @
O)) )) @
O) @@
O))))))) @
O)) O)) @
O)) O)) @
O) O)) @
O)) O)) @
O)) O)) @
O)) O))@
@@
O)) O) @
O)) O))@
O)) @
O)) @
O)) @
O)) O))@
O)) O) @
@@
O))) O))))))@
O)) @
O)) @
O)) @
O)) @
O)) @
O)) @
@@
O)) O))@
O)) O))@
O)) O))@
O)) O))@
O)) O))@
O)) O))@
O))))) @
@@
O)) O))@
O)) O)) @
O)) O)) @
O)) O)) @
O)) O)) @
O)))) @
O)) @
@@
O)) O))@
O)) O))@
O)) O) O))@
O)) O)) O))@
O)) O) O)) O))@
O) O) O))))@
O)) O))@
@@
O)) O))@
O)) O)) @
O)) O)) @
O)) @
O)) O)) @
O)) O)) @
O)) O))@
@@
O)) O))@
O)) O)) @
O)) O)) @
O)) @
O)) @
O)) @
O)) @
@@
O))))))) O))@
O)) @
O)) @
O)) @
O)) @
O)) @
O)))))))))))@
@@
O))))@
O)) @
O)) @
O)) @
O)) @
O)) @
O))))@
@@
O)) @
O)) @
O)) @
O)) @
O)) @
O)) @
O))@
@@
O))))@
O))@
O))@
O))@
O))@
O))@
O))))@
@@
O)) @
O)) O)) @
O)) O))@
@
@
@
@
@@
@
@
@
@
@
@
@
O)))))@@
O))@
O) @
@
@
@
@
@
@@
@
@
O)) @
O)) O)) @
O)) O)) @
O)) O)) @
O)) O)))@
@@
O)) @
O)) @
O)) @
O)) O)) @
O)) O))@
O)) O))@
O)) O)) @
@@
@
@
O)))@
O)) @
O)) @
O)) @
O)))@
@@
O))@
O))@
O))@
O)) O))@
O) O))@
O) O))@
O)) O))@
@@
@
@
O)) @
O) O)) @
O))))) O))@
O) @
O)))) @
@@
O))@
O) @
O)O) O)@
O)) @
O)) @
O)) @
O)) @
@@
@
@
O)) @
O)) O))@
O)) O))@
O)) O))@
O)) @
O)) @@
@
O)) @
O)) @
O) O) @
O)) O))@
O) O))@
O)) O))@
@@
@
O)@
@
O))@
O))@
O))@
O))@
@@
@
O))@
@
O))@
O))@
O))@
O))@
O))) @@
O)) @
O)) @
O)) O))@
O)) O)) @
O)O)) @
O)) O)) @
O)) O))@
@@
O))@
O))@
O))@
O))@
O))@
O))@
O)))@
@@
@
@
O))) O)) O)) @
O)) O) O))@
O)) O) O))@
O)) O) O))@
O))) O) O))@
@@
@
@
O)) O)) @
O)) O))@
O)) O))@
O)) O))@
O))) O))@
@@
@
@
O)) @
O)) O)) @
O)) O))@
O)) O)) @
O)) @
@@
@
@
O) O)) @
O) O)) @
O) O))@
O)) O)) @
O)) @
O)) @@
@
@
O)) @
O) O)) @
O) O)) @
O))O)) @
O)) @
O)))@@
@
@
O) O)))@
O)) @
O)) @
O)) @
O))) @
@@
@
@
O)))) @
O)) @
O))) @
O))@
O)) O))@
@@
O)) @
O)) @
O)O) O)@
O)) @
O)) @
O)) @
O)) @
@@
@
@
O)) O))@
O)) O))@
O)) O))@
O)) O))@
O))O))@
@@
@
@
O)) O))@
O)) O)) @
O)) O)) @
O)O)) @
O)) @
@@
@
@
O)) O)))@
O)) ) O))@
O)) O) O))@
O) O) O)O))@
O))) O)))@
@@
@
@
O)) O))@
O) O)) @
O) @
O) O)) @
O)) O))@
@@
@
@
O)) O))@
O)) O)) @
O))) @
O)) @
O)) @
O)) @@
@
@
O)))) O))@
O)) @
O)) @
O)) @
O))))))))@
@@
O))@
O)) @
O)) @
O)) @
O)) @
O)) @
O))@
@@
O)@
O)@
O)@
@
O)@
O)@
O)@
@@
O)) @
O)) @
O)) @
O))@
O)) @
O)) @
O)) @
@@
O)) O) @
O) O))@
@
@
@
@
@
@@
@
@
@
@
@
@
@
@@
@
@
@
@
@
@
@
@@
@
@
@
@
@
@
@
@@
@
@
@
@
@
@
@
@@
@
@
@
@
@
@
@
@@
@
@
@
@
@
@
@
@@
@
@
@
@
@
@
@
@@
`
@@ -0,0 +1 @@
{"version":3,"file":"find.mjs","sources":["../../../../../src/value/types/utils/find.ts"],"sourcesContent":["import { color } from \"../color\"\nimport { complex } from \"../complex\"\nimport { dimensionValueTypes } from \"../dimensions\"\nimport { testValueType } from \"../test\"\n\n/**\n * A list of all ValueTypes\n */\nconst valueTypes = [...dimensionValueTypes, color, complex]\n\n/**\n * Tests a value against the list of ValueTypes\n */\nexport const findValueType = (v: any) => valueTypes.find(testValueType(v))\n"],"names":[],"mappings":";;;;;AAKA;;AAEG;AACH,MAAM,UAAU,GAAG,CAAC,GAAG,mBAAmB,EAAE,KAAK,EAAE,OAAO,CAAC;AAE3D;;AAEG;AACI,MAAM,aAAa,GAAG,CAAC,CAAM,KAAK,UAAU,CAAC,IAAI,CAAC,aAAa,CAAC,CAAC,CAAC;;;;"}
@@ -0,0 +1,37 @@
{
"name": "@zxcvbn-ts/language-common",
"version": "4.1.3",
"main": "dist/index.cjs",
"module": "dist/index.mjs",
"types": "dist/index.d.ts",
"sideEffects": false,
"description": "The common language package for zxcvbn-ts",
"license": "MIT",
"homepage": "https://github.com/zxcvbn-ts/zxcvbn",
"repository": {
"type": "git",
"url": "https://github.com/zxcvbn-ts/zxcvbn.git"
},
"author": "zxcvbn-ts",
"files": [
"dist",
"src",
"CHANGELOG.md"
],
"publishConfig": {
"access": "public"
},
"keywords": [
"zxcvbn",
"language",
"translation",
"common"
],
"scripts": {
"build": "rollup -c ../../../scripts/rollup.config.mjs"
},
"dependencies": {
"@zxcvbn-ts/dictionary-compression": "^3.0.1"
},
"gitHead": "c938c0b2df389c481cf15c103ca640c17d4e978f"
}
@@ -0,0 +1,18 @@
/* eslint-disable @typescript-eslint/ban-ts-comment */
// @ts-ignore `lightningcss` may not be installed
import type Lightningcss from 'lightningcss'
/* eslint-enable @typescript-eslint/ban-ts-comment */
export type LightningCSSOptions = Omit<
Lightningcss.BundleAsyncOptions<Lightningcss.CustomAtRules>,
| 'filename'
| 'resolver'
| 'minify'
| 'sourceMap'
| 'analyzeDependencies'
// properties not overridden by Vite, but does not make sense to set by end users
| 'inputSourceMap'
| 'projectRoot'
>
@@ -0,0 +1 @@
{"version":3,"file":"allowedMethods.d.ts","sourceRoot":"","sources":["../../../../../src/server/auth/middleware/allowedMethods.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,cAAc,EAAE,MAAM,SAAS,CAAC;AAGzC;;;;;GAKG;AACH,wBAAgB,cAAc,CAAC,cAAc,EAAE,MAAM,EAAE,GAAG,cAAc,CAUvE"}
@@ -0,0 +1,54 @@
import { UpgradeWebSocket, WSContext, WSEvents } from "../../helper/websocket/index.js";
//#region src/adapter/bun/websocket.d.ts
/**
* @internal
* @deprecated `hono/bun` will be removed in v5. Install `@hono/bun` and import from there instead.
*/
export interface BunServerWebSocket<T> {
send(data: string | ArrayBuffer | Uint8Array, compress?: boolean): void;
close(code?: number, reason?: string): void;
data: T;
readyState: 0 | 1 | 2 | 3;
}
/**
* @deprecated `hono/bun` will be removed in v5. Install `@hono/bun` and import from there instead.
*/
export interface BunWebSocketHandler<T> {
open(ws: BunServerWebSocket<T>): void;
close(ws: BunServerWebSocket<T>, code?: number, reason?: string): void;
message(ws: BunServerWebSocket<T>, message: string | {
buffer: ArrayBufferLike;
}): void;
}
interface CreateWebSocket<T> {
upgradeWebSocket: UpgradeWebSocket<T>;
websocket: BunWebSocketHandler<BunWebSocketData>;
}
/**
* @deprecated `hono/bun` will be removed in v5. Install `@hono/bun` and import from there instead.
*/
export interface BunWebSocketData {
events: WSEvents;
url: URL;
protocol: string;
}
/**
* @internal
* @deprecated `hono/bun` will be removed in v5. Install `@hono/bun` and import from there instead.
*/
export declare const createWSContext: (ws: BunServerWebSocket<BunWebSocketData>) => WSContext;
/**
* @deprecated `hono/bun` will be removed in v5. Install `@hono/bun` and import from there instead.
*/
export declare const upgradeWebSocket: UpgradeWebSocket<any>;
/**
* @deprecated `hono/bun` will be removed in v5. Install `@hono/bun` and import from there instead.
*/
export declare const websocket: BunWebSocketHandler<BunWebSocketData>;
/**
* @deprecated Import `upgradeWebSocket` and `websocket` directly from `hono/bun` instead.
* @returns A function to create a Bun WebSocket handler.
*/
export declare const createBunWebSocket: <T>() => CreateWebSocket<T>;
//#endregion
export {};
@@ -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 './circle-help.js';
//# sourceMappingURL=help-circle.js.map
@@ -0,0 +1,7 @@
var DE=Object.create;var Mg=Object.defineProperty;var eE=Object.getOwnPropertyDescriptor;var wE=Object.getOwnPropertyNames;var aE=Object.getPrototypeOf,tE=Object.prototype.hasOwnProperty;var h=(A,g)=>()=>{try{return g||A((g={exports:{}}).exports,g),g.exports}catch(I){throw g=0,I}},AB=(A,g)=>{for(var I in g)Mg(A,I,{get:g[I],enumerable:!0})},sE=(A,g,I,B)=>{if(g&&typeof g=="object"||typeof g=="function")for(let C of wE(g))!tE.call(A,C)&&C!==I&&Mg(A,C,{get:()=>g[C],enumerable:!(B=eE(g,C))||B.enumerable});return A};var yE=(A,g,I)=>(I=A!=null?DE(aE(A)):{},sE(g||!A||!A.__esModule?Mg(I,"default",{value:A,enumerable:!0}):I,A));var BB=h(gg=>{"use strict";gg.byteLength=NE;gg.toByteArray=rE;gg.fromByteArray=KE;var QA=[],$=[],GE=typeof Uint8Array<"u"?Uint8Array:Array,ng="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/";for(cA=0,gB=ng.length;cA<gB;++cA)QA[cA]=ng[cA],$[ng.charCodeAt(cA)]=cA;var cA,gB;$[45]=62;$[95]=63;function IB(A){var g=A.length;if(g%4>0)throw new Error("Invalid string. Length must be a multiple of 4");var I=A.indexOf("=");I===-1&&(I=g);var B=I===g?0:4-I%4;return[I,B]}function NE(A){var g=IB(A),I=g[0],B=g[1];return(I+B)*3/4-B}function kE(A,g,I){return(g+I)*3/4-I}function rE(A){var g,I=IB(A),B=I[0],C=I[1],Q=new GE(kE(A,B,C)),i=0,o=C>0?B-4:B,e;for(e=0;e<o;e+=4)g=$[A.charCodeAt(e)]<<18|$[A.charCodeAt(e+1)]<<12|$[A.charCodeAt(e+2)]<<6|$[A.charCodeAt(e+3)],Q[i++]=g>>16&255,Q[i++]=g>>8&255,Q[i++]=g&255;return C===2&&(g=$[A.charCodeAt(e)]<<2|$[A.charCodeAt(e+1)]>>4,Q[i++]=g&255),C===1&&(g=$[A.charCodeAt(e)]<<10|$[A.charCodeAt(e+1)]<<4|$[A.charCodeAt(e+2)]>>2,Q[i++]=g>>8&255,Q[i++]=g&255),Q}function cE(A){return QA[A>>18&63]+QA[A>>12&63]+QA[A>>6&63]+QA[A&63]}function hE(A,g,I){for(var B,C=[],Q=g;Q<I;Q+=3)B=(A[Q]<<16&16711680)+(A[Q+1]<<8&65280)+(A[Q+2]&255),C.push(cE(B));return C.join("")}function KE(A){for(var g,I=A.length,B=I%3,C=[],Q=16383,i=0,o=I-B;i<o;i+=Q)C.push(hE(A,i,i+Q>o?o:i+Q));return B===1?(g=A[I-1],C.push(QA[g>>2]+QA[g<<4&63]+"==")):B===2&&(g=(A[I-2]<<8)+A[I-1],C.push(QA[g>>10]+QA[g>>4&63]+QA[g<<2&63]+"=")),C.join("")}});var CB=h(Yg=>{Yg.read=function(A,g,I,B,C){var Q,i,o=C*8-B-1,e=(1<<o)-1,t=e>>1,s=-7,G=I?C-1:0,r=I?-1:1,F=A[g+G];for(G+=r,Q=F&(1<<-s)-1,F>>=-s,s+=o;s>0;Q=Q*256+A[g+G],G+=r,s-=8);for(i=Q&(1<<-s)-1,Q>>=-s,s+=B;s>0;i=i*256+A[g+G],G+=r,s-=8);if(Q===0)Q=1-t;else{if(Q===e)return i?NaN:(F?-1:1)*(1/0);i=i+Math.pow(2,B),Q=Q-t}return(F?-1:1)*i*Math.pow(2,Q-B)};Yg.write=function(A,g,I,B,C,Q){var i,o,e,t=Q*8-C-1,s=(1<<t)-1,G=s>>1,r=C===23?Math.pow(2,-24)-Math.pow(2,-77):0,F=B?0:Q-1,K=B?1:-1,R=g<0||g===0&&1/g<0?1:0;for(g=Math.abs(g),isNaN(g)||g===1/0?(o=isNaN(g)?1:0,i=s):(i=Math.floor(Math.log(g)/Math.LN2),g*(e=Math.pow(2,-i))<1&&(i--,e*=2),i+G>=1?g+=r/e:g+=r*Math.pow(2,1-G),g*e>=2&&(i++,e/=2),i+G>=s?(o=0,i=s):i+G>=1?(o=(g*e-1)*Math.pow(2,C),i=i+G):(o=g*Math.pow(2,G-1)*Math.pow(2,C),i=0));C>=8;A[I+F]=o&255,F+=K,o/=256,C-=8);for(i=i<<C|o,t+=C;t>0;A[I+F]=i&255,F+=K,i/=256,t-=8);A[I+F-K]|=R*128}});var ug=h(RA=>{"use strict";var Ug=BB(),LA=CB(),QB=typeof Symbol=="function"&&typeof Symbol.for=="function"?Symbol.for("nodejs.util.inspect.custom"):null;RA.Buffer=a;RA.SlowBuffer=UE;RA.INSPECT_MAX_BYTES=50;var Ig=2147483647;RA.kMaxLength=Ig;a.TYPED_ARRAY_SUPPORT=FE();!a.TYPED_ARRAY_SUPPORT&&typeof console<"u"&&typeof console.error=="function"&&console.error("This browser lacks typed array (Uint8Array) support which is required by `buffer` v5.x. Use `buffer` v4.x if you require old browser support.");function FE(){try{let A=new Uint8Array(1),g={foo:function(){return 42}};return Object.setPrototypeOf(g,Uint8Array.prototype),Object.setPrototypeOf(A,g),A.foo()===42}catch{return!1}}Object.defineProperty(a.prototype,"parent",{enumerable:!0,get:function(){if(a.isBuffer(this))return this.buffer}});Object.defineProperty(a.prototype,"offset",{enumerable:!0,get:function(){if(a.isBuffer(this))return this.byteOffset}});function DA(A){if(A>Ig)throw new RangeError('The value "'+A+'" is invalid for option "size"');let g=new Uint8Array(A);return Object.setPrototypeOf(g,a.prototype),g}function a(A,g,I){if(typeof A=="number"){if(typeof g=="string")throw new TypeError('The "string" argument must be of type string. Received type number');return Rg(A)}return DB(A,g,I)}a.poolSize=8192;function DB(A,g,I){if(typeof A=="string")return ME(A,g);if(ArrayBuffer.isView(A))return nE(A);if(A==null)throw new TypeError("The first argument must be one of type string, Buffer, ArrayBuffer, Array, or Array-like Object. Received type "+typeof A);if(EA(A,ArrayBuffer)||A&&EA(A.buffer,ArrayBuffer)||typeof SharedArrayBuffer<"u"&&(EA(A,SharedArrayBuffer)||A&&EA(A.buffer,SharedArrayBuffer)))return Lg(A,g,I);if(typeof A=="number")throw new TypeError('The "value" argument must not be of type number. Received type number');let B=A.valueOf&&A.valueOf();if(B!=null&&B!==A)return a.from(B,g,I);let C=YE(A);if(C)return C;if(typeof Symbol<"u"&&Symbol.toPrimitive!=null&&typeof A[Symbol.toPrimitive]=="function")return a.from(A[Symbol.toPrimitive]Line truncated
`).map(C=>C.trimStart().replace(/^\* ?/,"").trim()).filter(C=>C.startsWith("@")),I=Object.create(null);for(let C of g){var B;let Q=$E.exec(C);if(Q==null)continue;let i=Q[1],o=((B=Q[2])!=null?B:"").trim();I[i]?I[i].push(o):I[i]=[o]}return I}function Ai(A){let g=(()=>{if(A.type!=="Program")return null;let I=A;if(I.comments.length===0)return null;let B=(()=>{let C=I.comments[0];if(C.type==="Block")return C;if(I.comments.length===1)return null;let Q=I.comments[1];return C.type==="Line"&&C.range[0]===0&&Q.type==="Block"?Q:null})();return B==null||I.body.length>0&&I.body[0].range[0]<B.range[0]?null:B})();return g==null?null:{directives:LB(g.value),comment:g}}});var WB=h(Pg=>{var RB=globalThis.Buffer??ug().Buffer;Object.defineProperty(Pg,"__esModule",{value:!0});Pg.parse=Qi;var gi=HB(MB()),Ii=HB(JB()),Bi=pB();function HB(A){return A&&A.__esModule?A:{default:A}}var f,lB,uB,dB,mB,fB,TB,PB,xB,OB;function Ci(){f==null&&(f=(0,Ii.default)({quit(A,g){throw g}}),lB=f.cwrap("hermesParse","number",["number","number","number","number","number","number","number","number","number","number","number","number","number","number","number","number"]),uB=f.cwrap("hermesParseResult_free","void",["number"]),dB=f.cwrap("hermesParseResult_getError","string",["number"]),mB=f.cwrap("hermesParseResult_getErrorLine","number",["number"]),fB=f.cwrap("hermesParseResult_getErrorColumn","number",["number"]),TB=f.cwrap("hermesParseResult_getProgramBuffer","number",["number"]),PB=f.cwrap("hermesParseResult_getPositionBuffer","number",["number"]),xB=f.cwrap("hermesParseResult_getPositionBufferSize","number",["number"]),OB=f.cwrap("hermesParseResult_getStringBuffer","number",["number"]))}function qB(A,g){f.HEAP8.set(A,g),f.HEAP8[g+A.length]=0}function eA(A){return A===!0?1:0}function Qi(A,g){Ci();let I=RB.from(A,"utf8"),B=typeof g.sourceFilename=="string"?g.sourceFilename:"",C=B.length>0?RB.from(B,"utf8"):null,Q=0,i=0,o=0,e=0;try{let Z=function(q){if(q==null||typeof q!="object")return;let H=q;if(!U.has(H)){if(U.add(H),H.loc!=null){let j=H.loc,W=d.get(j);if(W==null){let _=j.rangeStart,oA=j.rangeEnd;if(_==null||oA==null)throw new Error("Expected serialized source range");j.source=R,W=[_,oA],d.set(j,W),delete j.rangeStart,delete j.rangeEnd}H.range=W}for(let j of Object.keys(H)){let W=H[j];if(Array.isArray(W))for(let _ of W)Z(_);else Z(W)}}};var t=Z;if(Q=f._malloc(I.length+1),!Q)throw new Error("Parser out of memory");if(C!=null){if(i=f._malloc(C.length+1),!i)throw new Error("Parser out of memory");qB(C,i),o=C.length+1}qB(I,Q);let s=g.enableTypes===!1?0:1,G=g.sourceType==="script"?1:g.sourceType==="module"?2:0;e=lB(Q,I.length+1,i,o,eA(g.enableExperimentalComponentSyntax),eA(g.enableExperimentalFlowMatchSyntax),eA(g.enableExperimentalDecorators),eA(g.tokens),eA(g.allowReturnOutsideFunction),eA(g.assertOperator),eA(g.enableEnums),eA(g.enableRecords),s,G,eA(g.enableTypesPragmaDetection),0);let r=TB(e);if(!r){let q=dB(e),H=new SyntaxError(q||"unknown parse error");throw H.loc={line:mB(e),column:fB(e)},H}let K=new gi.default(r,PB(e),xB(e),OB(e),f,g).deserialize();if(K.type!=="Program")throw new Error(`Expected Program, got ${K.type}`);let R=typeof g.sourceFilename=="string"?g.sourceFilename:null,U=new WeakSet,d=new WeakMap;if(Z(K),g.throwOnParseErrors!==!1){let q=K.errors;if(q!=null&&q.length>0){let H=q[0],j=H.loc.start;if(j==null)throw new Error("Expected serialized parser error start location");let W=j.line,_=j.column,oA=new SyntaxError(`${H.message} (${W}:${_})`);throw oA.loc={line:W,column:_},oA}}return g.sourceType==="script"||g.sourceType==="module"?K.sourceType=g.sourceType:K.sourceType=Ei(K),K.docblock=(0,Bi.getModuleDocblock)(K),K}finally{e!==0&&uB(e),Q!==0&&f._free(Q),i!==0&&f._free(i)}}function Ei(A){if(!Array.isArray(A.body))return"script";for(let g of A.body)if(g!=null)switch(g.type){case"ImportDeclaration":if(g.importKind==="value"||g.importKind==null)return"module";break;case"ExportDefaultDeclaration":return"module";case"ExportNamedDeclaration":case"ExportAllDeclaration":if(g.exportKind==="value"||g.exportKind==null)return"module";break}return"script"}});var Eg=h((sG,jB)=>{"use strict";jB.exports={AbstractMethodDefinition:["key","value"],AbstractPropertyDefinition:["key","value","variance"],AnyTypeAnnotation:[],ArrayExpression:["elements"],ArrayPattern:["elements","typeAnnotation"],ArrayTypeAnnotation:["elementType"],ArrowFunctionExpression:["params","body","typeParameters","returnType","predicate"],AsConstExpression:["expression"],AsExpression:["expression","typeAnnotation"],AssignmentExpression:["left","right"],AssignmentPattern:["left","right"],AwaitExpression:["argument"],BigIntLiteralTypeAnnotation:[],BigIntTypeAnnotation:[],BinaryExpression:["left","right"],BlockStatement:["body"],BooleanLiteralTypeAnnotation:[],BooleanTypeAnnotation:[],BreakStatement:["label"],CallExpression:["callee","typeArguments","arguments"],CatchClause:["param","body"],ChainExpression:["expression"],ClassBody:["body"],ClassDeclaration:["id","typeParameters","superLine truncated
`))return[];let g=[];for(let I of`*${A.value}*`.split(`
`)){if(I=I.trimStart(),!I.startsWith("*"))return[];g.push(I)}return g}var zC=new WeakMap;function cy(A){return TA(zC,A,ry)}function VC(A){zC.delete(A)}function UI(A){return cy(A).length>0}function vC(A){if(A.length<2)return;let g;for(let I=A.length-1;I>=0;I--){let B=A[I];if(g&&P(B)===T(g)&&UI(B)&&UI(g)&&(A.splice(I+1,1),B.value+="*//*"+g.value,B.range=[T(B),P(g)],VC(B)),!WC(B)&&!fA(B))throw new TypeError(`Unknown comment type: "${B.type}".`);g=B}}function hy(A){return A!==null&&typeof A=="object"}var XC=hy;var vA=null;function XA(A){if(vA!==null&&typeof vA.property){let g=vA;return vA=XA.prototype=null,g}return vA=XA.prototype=A??Object.create(null),new XA}var Ky=10;for(let A=0;A<=Ky;A++)XA();function JI(A){return XA(A)}function Fy(A,g="type"){JI(A);function I(B){let C=B[g],Q=A[C];if(!Array.isArray(Q))throw Object.assign(new Error(`Missing visitor keys for '${C}'.`),{node:B});return Q}return I}var _C=Fy;var D=[["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"]],$C={ArrayExpression:D[0],AssignmentExpression:D[1],BinaryExpression:D[1],InterpreterDirective:[],Directive:D[2],DirectiveLiteral:[],BlockStatement:D[3],BreakStatement:D[4],CallExpression:D[5],CatchClause:["param","body"],ConditionalExpression:D[6],ContinueStatement:D[4],DebuggerStatement:[],DoWhileStatement:D[7],EmptyStatement:[],ExpressionStatement:D[8],File:["program"],ForInStatement:D[9],ForStatement:["init","test","update","body"],FunctionDeclaration:D[10],FunctionExpression:D[10],Identifier:["typeAnnotation","decorators"],IfStatement:D[6],LabeledStatement:["label","body"],StringLiteral:[],NumericLiteral:[],NullLiteral:[],BooleanLiteral:[],RegExpLiteral:[],LogicalExpression:D[1],MemberExpression:D[11],NewExpression:D[5],Program:D[3],ObjectExpression:D[12],ObjectMethod:D[13],ObjectProperty:D[14],RestElement:["argument","typeAnnotation","decorators"],ReturnStatement:D[15],SequenceExpression:D[16],ParenthesizedExpression:D[8],SwitchCase:["test","consequent"],SwitchStatement:["discriminant","cases"],ThisExpression:[],ThrowStatement:D[15],TryStatement:["block","handler","finalizer"],UnaryExpression:D[15],UpdateExpression:D[15],VariableDeclaration:["declarations"],VariableDeclarator:D[17],WhileStatement:D[7],WithStatement:["object","body"],AssignmentPattern:["left","right","decorators","typeAnnotation"],ArrayPattern:["elements","typeAnnotation","decorators"],ArrowFunctionExpression:["typeParameters","params","predicate","returnType","body"],ClassBody:D[18],ClassExpression:D[19],ClassDeclaration:D[19],ExportAllDeclaration:["source","attributes","exported"],ExportDefaultDeclaration:["declaration"],ExportNamedDeclaration:D[20],ExportSpecifier:["local","exported"],ForOfStatement:D[9],ImportDeclaration:["specifiers","source","attributes"],ImportDefaultSpecifier:D[21],ImportNamespaceSpecifier:D[21],ImportSpecifier:["imported","local"],MetaProperty:["meta","property"],ClassMethod:D[13],ObjectPattern:["decorators","properties","typeAnnotation"],SpreadElement:D[15],Super:[],TaggedTemplateExpression:["tag","typeArguments","quasi"],TemplateElement:[],TemplateLiteral:["quasis","expressions"],YieldExpression:D[15],AwaitExpression:D[15],ImportExpression:["source","options"],BigIntLiteral:[],ExportNamespaceSpecifier:D[22],OptionalMemberExpression:D[11],OptionalCallExpression:D[5],ClassProperty:D[23],ClassPrivateProperty:D[23],ClassPrivateMethod:D[13],PrivateName:D[24],StaticBlock:D[18],ImportAttribute:D[25],AnyTypeAnnotation:[],ArrayTypeAnnotation:D[26],BooleanTypeAnnotation:[],BooleanLiteralTypeAnnotation:[],NullLiteralTypeAnnotation:[],ClassImplements:D[27],DeclareClass:["id","typePaLine truncated
$1 $2
`);A=A.replace(CQ,"").trimEnd();let B=Object.create(null),C=nA(0,A,QQ,"").replace(CQ,"").trimEnd(),Q;for(;Q=QQ.exec(A);){let i=nA(0,Q[2],py,"");if(typeof B[Q[1]]=="string"||Array.isArray(B[Q[1]])){let o=B[Q[1]];B[Q[1]]=[...Hy,...Array.isArray(o)?o:[o],i]}else B[Q[1]]=i}return{comments:C,pragmas:B}}var oQ=["noformat","noprettier"],DQ=["format","prettier"];function ly(A){if(!A.startsWith("#!"))return"";let g=A.indexOf(`
`);return g===-1?A:A.slice(0,g)}var eQ=ly;function wQ(A){let g=eQ(A);g&&(A=A.slice(g.length+1));let I=EQ(A),{pragmas:B,comments:C}=iQ(I);return{shebang:g,text:A,pragmas:B,comments:C}}function aQ(A){let{pragmas:g}=wQ(A);return DQ.some(I=>pI(g,I))}function tQ(A){let{pragmas:g}=wQ(A);return oQ.some(I=>pI(g,I))}function uy(A){return A=typeof A=="function"?{parse:A}:A,{astFormat:"estree",hasPragma:aQ,hasIgnorePragma:tQ,locStart:T,locEnd:P,...A}}var sQ=uy;var dy={flow:"all",babel:!1,tokens:!1,allowReturnOutsideFunction:!0,enableEnums:!0,enableExperimentalFlowMatchSyntax:!0,enableExperimentalComponentSyntax:!0,enableExperimentalDecorators:!0,enableExperimentalFlowRecordSyntax:!0};function my(A){let{message:g,loc:I}=A;if(!I)return A;let{line:B,column:C}=I,Q=` (${B}:${C})`;return g.endsWith(Q)&&(g=g.slice(0,-Q.length)),fC(g,{loc:{start:{line:B,column:C+1}},cause:A})}function fy(A,g){let I=g?.filepath,B=typeof I=="string"?I:"prettier.js.flow",C;try{C=(0,yQ.parse)(A,{sourceFilename:B,...dy})}catch(Q){throw my(Q)}return BQ(C,{text:A,astType:"flow"})}var Ty=sQ(fy);export{GQ as default,RI as parsers};
@@ -0,0 +1,15 @@
# Installation
> `npm install --save @types/estree`
# Summary
This package contains type definitions for estree (https://github.com/estree/estree).
# Details
Files were exported from https://github.com/DefinitelyTyped/DefinitelyTyped/tree/master/types/estree.
### Additional Details
* Last updated: Fri, 06 Jun 2025 00:04:33 GMT
* Dependencies: none
# Credits
These definitions were written by [RReverser](https://github.com/RReverser).
@@ -0,0 +1,8 @@
import type { KeywordCxt } from ".";
import type { AddedKeywordDefinition, MacroKeywordDefinition, FuncKeywordDefinition } from "../../types";
import type { SchemaObjCxt } from "..";
import type { JSONType } from "../rules";
export declare function macroKeywordCode(cxt: KeywordCxt, def: MacroKeywordDefinition): void;
export declare function funcKeywordCode(cxt: KeywordCxt, def: FuncKeywordDefinition): void;
export declare function validSchemaType(schema: unknown, schemaType: JSONType[], allowUndefined?: boolean): boolean;
export declare function validateKeywordUsage({ schema, opts, self, errSchemaPath }: SchemaObjCxt, def: AddedKeywordDefinition, keyword: string): void;
@@ -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 MoveHorizontal = createLucideIcon("MoveHorizontal", [
["path", { d: "m18 8 4 4-4 4", key: "1ak13k" }],
["path", { d: "M2 12h20", key: "9i4pu4" }],
["path", { d: "m6 8-4 4 4 4", key: "15zrgr" }]
]);
export { MoveHorizontal as default };
//# sourceMappingURL=move-horizontal.js.map
@@ -0,0 +1 @@
{"version":3,"file":"util.js","sourceRoot":"","sources":["../../lib/compile/util.ts"],"names":[],"mappings":";;;AAEA,uCAA6D;AAC7D,yCAAoC;AAGpC,2BAA2B;AAC3B,SAAgB,MAAM,CAA4B,GAAQ;IACxD,MAAM,IAAI,GAAsB,EAA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AE,GAAG,EAAE,EAAC,CAAC;QACpE,YAAY,EAAE,oBAAoB;KACnC,CAAC;IACF,KAAK,EAAE,kBAAkB,CAAC;QACxB,UAAU,EAAE,CAAC,GAAG,EAAE,IAAI,EAAE,EAAE,EAAE,EAAE,CAC5B,GAAG,CAAC,EAAE,CAAC,IAAA,WAAC,EAAA,GAAG,EAAE,gBAAgB,IAAI,gBAAgB,EAAE,GAAG,EAAE,CACtD,GAAG,CAAC,MAAM,CAAC,EAAE,EAAE,IAAA,WAAC,EAAA,GAAG,IAAI,sBAAsB,EAAE,MAAM,IAAI,MAAM,EAAE,MAAM,IAAI,EAAE,CAAC,CAC/E;QACH,WAAW,EAAE,CAAC,GAAG,EAAE,IAAI,EAAE,EAAE,EAAE,EAAE,CAC7B,GAAG,CAAC,EAAE,CAAC,IAAA,WAAC,EAAA,GAAG,EAAE,WAAW,EAAE,GAAG,EAAE,CAC7B,GAAG,CAAC,MAAM,CAAC,EAAE,EAAE,IAAI,KAAK,IAAI,CAAC,CAAC,CAAC,IAAI,CAAC,CAAC,CAAC,IAAA,WAAC,EAAA,GAAG,EAAE,MAAM,IAAI,MAAM,EAAE,MAAM,IAAI,EAAE,CAAC,CAC5E;QACH,WAAW,ELine truncated
@@ -0,0 +1,804 @@
<p align="center">
<img alt="qs" src="./logos/banner_default.png" width="800" />
</p>
# qs <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]
[![CII Best Practices](https://bestpractices.coreinfrastructure.org/projects/9058/badge)](https://bestpractices.coreinfrastructure.org/projects/9058)
[![npm badge][npm-badge-png]][package-url]
A querystring parsing and stringifying library with some added security.
Lead Maintainer: [Jordan Harband](https://github.com/ljharb)
The **qs** module was originally created and maintained by [TJ Holowaychuk](https://github.com/visionmedia/node-querystring).
## Usage
```javascript
var qs = require('qs');
var assert = require('assert');
var obj = qs.parse('a=c');
assert.deepEqual(obj, { a: 'c' });
var str = qs.stringify(obj);
assert.equal(str, 'a=c');
```
### Parsing Objects
[](#preventEval)
```javascript
qs.parse(string, [options]);
```
**qs** allows you to create nested objects within your query strings, by surrounding the name of sub-keys with square brackets `[]`.
For example, the string `'foo[bar]=baz'` converts to:
```javascript
assert.deepEqual(qs.parse('foo[bar]=baz'), {
foo: {
bar: 'baz'
}
});
```
When using the `plainObjects` option the parsed value is returned as a null object, created via `{ __proto__: null }` and as such you should be aware that prototype methods will not exist on it and a user may set those names to whatever value they like:
```javascript
var nullObject = qs.parse('a[hasOwnProperty]=b', { plainObjects: true });
assert.deepEqual(nullObject, { a: { hasOwnProperty: 'b' } });
```
By default parameters that would overwrite properties on the object prototype are ignored, if you wish to keep the data from those fields either use `plainObjects` as mentioned above, or set `allowPrototypes` to `true` which will allow user input to overwrite those properties.
*WARNING* It is generally a bad idea to enable this option as it can cause problems when attempting to use the properties that have been overwritten.
Always be careful with this option.
```javascript
var protoObject = qs.parse('a[hasOwnProperty]=b', { allowPrototypes: true });
assert.deepEqual(protoObject, { a: { hasOwnProperty: 'b' } });
```
URI encoded strings work too:
```javascript
assert.deepEqual(qs.parse('a%5Bb%5D=c'), {
a: { b: 'c' }
});
```
You can also nest your objects, like `'foo[bar][baz]=foobarbaz'`:
```javascript
assert.deepEqual(qs.parse('foo[bar][baz]=foobarbaz'), {
foo: {
bar: {
baz: 'foobarbaz'
}
}
});
```
Since v6.14.1 and v6.15.2, `parse` interprets nested bracket groups more consistently. Query strings with unbalanced `[`/`]` can produce different results than in 6.15.1; see [#558](https://github.com/ljharb/qs/issues/558).
Because of that bracket grammar,
**qs** does not agree with `URLSearchParams`,
`node:querystring`, or any other flat parser about what the "name" of a parameter is,
and it never has.
`URLSearchParams` reads `'foo[bar]=baz'` as one flat name `foo[bar]`;
**qs** reads it as the path `foo.bar`.
Text that **qs**'s grammar cannot place,
such as the `extra` in `'foo[bar]extra=baz'`,
is currently dropped, so several distinct flat names can resolve to the same **qs** path
(see [#619](https://github.com/ljharb/qs/issues/619)).
So validating, authorizing, filtering,
or signing a query string with one parser and then consuming it with another is unsafe: a deny list or signature computed over `URLSearchParams` names does not constrain what **qs** will produce from the same string.
Parse the input once, with **qs**, and apply your checks to the resulting object.
By default, when nesting objects **qs** will only parse up to 5 children deep.
This means if you attempt to parse a string like `'a[b][c][d][e][f][g][h][i]=j'` your resulting object will be:
```javascript
var expected = {
a: {
b: {
c: {
d: {
e: {
f: {
'[g][h][i]': 'j'
}
}
}
}
}
}
};
var string = 'a[b][c][d][e][f][g][h][i]=j';
assert.deepEqual(qs.parse(string), expected);
```
This depth can be overridden by passing a `depth` option to `qs.parse(string, [options])`:
```javascript
var deep = qs.parse('a[b][c][d][e][f][g][h][i]=j', { depth: 1 });
assert.deepEqual(deep, { a: { b: { '[c][d][e][f][g][h][i]': 'j' } } });
```
You can configure **qs** to throw an error when parsing nested input beyond this depth using the `strictDepth` option (defaulted to false):
```javascript
try {
qs.parse('a[b][c][d][e][f][g][h][i]=j', { depth: 1, strictDepth: true });
} catch (err) {
assert(err instanceof RangeError);
assert.strictEqual(err.message, 'Input depth exceeded depth option of 1 and strictDepth is true');
}
```
The depth limit helps mitigate abuse when **qs** is used to parse user input, and it is recommended to keep it a reasonably small number. The strictDepth option adds a layer of protection by throwing an error when the limit is exceeded, allowing you to catch and handle such cases.
For similar reasons, by default **qs** will only parse up to 1000 parameters. This can be overridden by passing a `parameterLimit` option:
```javascript
var limited = qs.parse('a=b&c=d', { parameterLimit: 1 });
assert.deepEqual(limited, { a: 'b' });
```
If you want an error to be thrown whenever a limit is exceeded (eg, `parameterLimit`, `arrayLimit`), set the `throwOnLimitExceeded` option to `true`. This option will generate a descriptive error if the query string exceeds a configured limit.
```javascript
try {
qs.parse('a=1&b=2&c=3&d=4', { parameterLimit: 3, throwOnLimitExceeded: true });
} catch (err) {
assert(err instanceof Error);
assert.strictEqual(err.message, 'Parameter limit exceeded. Only 3 parameters allowed.');
}
```
When `throwOnLimitExceeded` is set to `false` (default), **qs** will parse up to the specified `parameterLimit` and ignore the rest without throwing an error.
Note that `parameterLimit` only bounds the number of `&`-delimited parameters; it does not limit how many values a single parameter expands into. In particular, when `comma: true` is enabled, a single parameter's value is split on commas into arbitrarily many elements, which `parameterLimit` does not constrain. Setting `throwOnLimitExceeded: true` (see `arrayLimit` below) makes **qs** reject a query string with more than `parameterLimit` parameters, one that uses an array index of `arrayLimit` or greater, or one that would produce any array longer than `arrayLimit`, including an array produced by comma splitting. `arrayLimit` applies to each array separately, including each parameter's comma-split value, so the total number of values across all parameters can still reach `parameterLimit` times `arrayLimit`, which is 20,000 at the default limits; always bound the input size at the transport layer as well (e.g. an HTTP body-size limit).
To bypass the leading question mark, use `ignoreQueryPrefix`:
```javascript
var prefixed = qs.parse('?a=b&c=d', { ignoreQueryPrefix: true });
assert.deepEqual(prefixed, { a: 'b', c: 'd' });
```
An optional delimiter can also be passed:
```javascript
var delimited = qs.parse('a=b;c=d', { delimiter: ';' });
assert.deepEqual(delimited, { a: 'b', c: 'd' });
```
Delimiters can be a regular expression too:
```javascript
var regexed = qs.parse('a=b;c=d,e=f', { delimiter: /[;,]/ });
assert.deepEqual(regexed, { a: 'b', c: 'd', e: 'f' });
```
Option `allowDots` can be used to enable dot notation:
```javascript
var withDots = qs.parse('a.b=c', { allowDots: true });
assert.deepEqual(withDots, { a: { b: 'c' } });
```
Option `decodeDotInKeys` can be used to decode dots in keys
Note: it implies `allowDots`, so `parse` will error if you set `decodeDotInKeys` to `true`, and `allowDots` to `false`.
```javascript
var withDots = qs.parse('name%252Eobj.first=John&name%252Eobj.last=Doe', { decodeDotInKeys: true });
assert.deepEqual(withDots, { 'name.obj': { first: 'John', last: 'Doe' }});
```
Option `allowEmptyArrays` can be used to allow empty array values in an object
```javascript
var withEmptyArrays = qs.parse('foo[]&bar=baz', { allowEmptyArrays: true });
assert.deepEqual(withEmptyArrays, { foo: [], bar: 'baz' });
```
Option `duplicates` can be used to change the behavior when duplicate keys are encountered
```javascript
assert.deepEqual(qs.parse('foo=bar&foo=baz'), { foo: ['bar', 'baz'] });
assert.deepEqual(qs.parse('foo=bar&foo=baz', { duplicates: 'combine' }), { foo: ['bar', 'baz'] });
assert.deepEqual(qs.parse('foo=bar&foo=baz', { duplicates: 'first' }), { foo: 'bar' });
assert.deepEqual(qs.parse('foo=bar&foo=baz', { duplicates: 'last' }), { foo: 'baz' });
```
Note that keys with bracket notation (`[]`) always combine into arrays, regardless of the `duplicates` setting:
```javascript
assert.deepEqual(qs.parse('a=1&a=2&b[]=1&b[]=2', { duplicates: 'last' }), { a: '2', b: ['1', '2'] });
```
If you have to deal with legacy browsers or services, there's also support for decoding percent-encoded octets as iso-8859-1:
```javascript
var oldCharset = qs.parse('a=%A7', { charset: 'iso-8859-1' });
assert.deepEqual(oldCharset, { a: '§' });
```
Some services add an initial `utf8=✓` value to forms so that old Internet Explorer versions are more likely to submit the form as utf-8.
Additionally, the server can check the value against wrong encodings of the checkmark character and detect that a query string or `application/x-www-form-urlencoded` body was *not* sent as utf-8, eg. if the form had an `accept-charset` parameter or the containing page had a different character set.
**qs** supports this mechanism via the `charsetSentinel` option.
If specified, the `utf8` parameter will be omitted from the returned object.
It will be used to switch to `iso-8859-1`/`utf-8` mode depending on how the checkmark is encoded.
**Important**: When you specify both the `charset` option and the `charsetSentinel` option, the `charset` will be overridden when the request contains a `utf8` parameter from which the actual charset can be deduced.
In that sense the `charset` will behave as the default charset rather than the authoritative charset.
```javascript
var detectedAsUtf8 = qs.parse('utf8=%E2%9C%93&a=%C3%B8', {
charset: 'iso-8859-1',
charsetSentinel: true
});
assert.deepEqual(detectedAsUtf8, { a: 'ø' });
// Browsers encode the checkmark as &#10003; when submitting as iso-8859-1:
var detectedAsIso8859_1 = qs.parse('utf8=%26%2310003%3B&a=%F8', {
charset: 'utf-8',
charsetSentinel: true
});
assert.deepEqual(detectedAsIso8859_1, { a: 'ø' });
```
If you want to decode the `&#...;` syntax to the actual character, you can specify the `interpretNumericEntities` option as well:
```javascript
var detectedAsIso8859_1 = qs.parse('a=%26%239786%3B', {
charset: 'iso-8859-1',
interpretNumericEntities: true
});
assert.deepEqual(detectedAsIso8859_1, { a: '☺' });
```
It also works when the charset has been detected in `charsetSentinel` mode.
### Parsing Arrays
**qs** can also parse arrays using a similar `[]` notation:
```javascript
var withArray = qs.parse('a[]=b&a[]=c');
assert.deepEqual(withArray, { a: ['b', 'c'] });
```
You may specify an index as well:
```javascript
var withIndexes = qs.parse('a[1]=c&a[0]=b');
assert.deepEqual(withIndexes, { a: ['b', 'c'] });
```
Note that the only difference between an index in an array and a key in an object is that the value between the brackets must be a number to create an array.
When creating arrays with specific indices, **qs** will compact a sparse array to only the existing values preserving their order:
```javascript
var noSparse = qs.parse('a[1]=b&a[15]=c');
assert.deepEqual(noSparse, { a: ['b', 'c'] });
```
You may also use `allowSparse` option to parse sparse arrays:
```javascript
var sparseArray = qs.parse('a[1]=2&a[3]=5', { allowSparse: true });
assert.deepEqual(sparseArray, { a: [, '2', , '5'] });
```
Note that an empty string is also a value, and will be preserved:
```javascript
var withEmptyString = qs.parse('a[]=&a[]=b');
assert.deepEqual(withEmptyString, { a: ['', 'b'] });
var withIndexedEmptyString = qs.parse('a[0]=b&a[1]=&a[2]=c');
assert.deepEqual(withIndexedEmptyString, { a: ['b', '', 'c'] });
```
**qs** will also limit arrays to a maximum of `20` elements.
Any array members with an index of `20` or greater will instead be converted to an object with the index as the key.
This is needed to handle cases when someone sent, for example, `a[999999999]` and it will take significant time to iterate over this huge array.
Since v6.14.1 and v6.15.2, the arrayLimit now applies to arrays specified using both the `[]` and `[0]` syntaxes.
```javascript
var withMaxIndex = qs.parse('a[100]=b');
assert.deepEqual(withMaxIndex, { a: { '100': 'b' } });
```
This limit can be overridden by passing an `arrayLimit` option:
```javascript
var withArrayLimit = qs.parse('a[1]=b', { arrayLimit: 0 });
assert.deepEqual(withArrayLimit, { a: { '1': 'b' } });
```
If you want to throw an error whenever the array limit is exceeded, set the `throwOnLimitExceeded` option to `true`. This option will generate a descriptive error if the query string exceeds a configured limit.
```javascript
try {
qs.parse('a[1]=b', { arrayLimit: 0, throwOnLimitExceeded: true });
} catch (err) {
assert(err instanceof Error);
assert.strictEqual(err.message, 'Array limit exceeded. Only 0 elements allowed in an array.');
}
```
When `throwOnLimitExceeded` is set to `false` (default), **qs** will parse up to the specified `arrayLimit` and if the limit is exceeded, the array will instead be converted to an object with the index as the key.
Note that `arrayLimit` is a *representation* threshold that controls when a numerically-indexed collection switches from an array to an object; it is **not** a hard cap on the total number of elements parsed. With the default `throwOnLimitExceeded: false`, exceeding `arrayLimit` never rejects or truncates input; it only changes the container type, and the resulting object still holds every element (so its size stays proportional to the input). This conversion is itself a safeguard: it avoids allocating a huge sparse array for input like `a[999999999]`. If you need a hard limit that rejects oversized arrays in untrusted query strings, set `throwOnLimitExceeded: true`. `throwOnLimitExceeded` still limits each array separately, not the total: with `comma: true`, each comma-separated group under `a[]=` counts as one element of the outer array, and can itself hold up to `arrayLimit` elements.
To prevent array syntax (`a[]`, `a[0]`) from being parsed as arrays, set `parseArrays` to `false`.
Note that duplicate keys (e.g. `a=b&a=c`) may still produce arrays when `duplicates` is `'combine'` (the default).
```javascript
var noParsingArrays = qs.parse('a[]=b', { parseArrays: false });
assert.deepEqual(noParsingArrays, { a: { '0': 'b' } });
```
If you mix notations, **qs** will merge the two items into an object:
```javascript
var mixedNotation = qs.parse('a[0]=b&a[b]=c');
assert.deepEqual(mixedNotation, { a: { '0': 'b', b: 'c' } });
```
When a key appears as both a plain value and an object, **qs** will by default wrap the conflicting values in an array (`strictMerge` defaults to `true`):
```javascript
assert.deepEqual(qs.parse('a[b]=c&a=d'), { a: [{ b: 'c' }, 'd'] });
assert.deepEqual(qs.parse('a=d&a[b]=c'), { a: ['d', { b: 'c' }] });
```
To restore the legacy behavior (where the primitive is used as a key with value `true`), set `strictMerge` to `false`:
```javascript
assert.deepEqual(qs.parse('a[b]=c&a=d', { strictMerge: false }), { a: { b: 'c', d: true } });
```
You can also create arrays of objects:
```javascript
var arraysOfObjects = qs.parse('a[][b]=c');
assert.deepEqual(arraysOfObjects, { a: [{ b: 'c' }] });
```
Some people use comma to join array, **qs** can parse it:
```javascript
var arraysOfObjects = qs.parse('a=b,c', { comma: true })
assert.deepEqual(arraysOfObjects, { a: ['b', 'c'] })
```
(_this cannot convert nested objects, such as `a={b:1},{c:d}`_)
With `[]` or index notation, the values from each comma-separated group stay together as one element of the array, while repeated plain keys flatten into one array:
```javascript
var nestedGroups = qs.parse('a[]=b,c&a[]=d', { comma: true });
assert.deepEqual(nestedGroups, { a: [['b', 'c'], 'd'] });
var flatGroups = qs.parse('a=b,c&a=d', { comma: true });
assert.deepEqual(flatGroups, { a: ['b', 'c', 'd'] });
```
### Parsing primitive/scalar values (numbers, booleans, null, etc)
By default, all values are parsed as strings.
This behavior will not change and is explained in [issue #91](https://github.com/ljharb/qs/issues/91).
```javascript
var primitiveValues = qs.parse('a=15&b=true&c=null');
assert.deepEqual(primitiveValues, { a: '15', b: 'true', c: 'null' });
```
If you wish to auto-convert values which look like numbers, booleans, and other values into their primitive counterparts, you can use the [query-types Express JS middleware](https://github.com/xpepermint/query-types) which will auto-convert all request query parameters.
### Stringifying
[](#preventEval)
```javascript
qs.stringify(object, [options]);
```
When stringifying, **qs** by default URI encodes output. Objects are stringified as you would expect:
```javascript
assert.equal(qs.stringify({ a: 'b' }), 'a=b');
assert.equal(qs.stringify({ a: { b: 'c' } }), 'a%5Bb%5D=c');
```
This encoding can be disabled by setting the `encode` option to `false`:
```javascript
var unencoded = qs.stringify({ a: { b: 'c' } }, { encode: false });
assert.equal(unencoded, 'a[b]=c');
```
Encoding can be disabled for keys by setting the `encodeValuesOnly` option to `true`:
```javascript
var encodedValues = qs.stringify(
{ a: 'b', c: ['d', 'e=f'], f: [['g'], ['h']] },
{ encodeValuesOnly: true }
);
assert.equal(encodedValues,'a=b&c[0]=d&c[1]=e%3Df&f[0][0]=g&f[1][0]=h');
```
This encoding can also be replaced by a custom encoding method set as `encoder` option:
```javascript
var encoded = qs.stringify({ a: { b: 'c' } }, { encoder: function (str) {
// Passed in values `a`, `b`, `c`
return // Return encoded string
}})
```
_(Note: the `encoder` option does not apply if `encode` is `false`)_
By default, `qs.stringify` serializes an object of any nesting depth.
For backwards compatibility, and because its input is the caller's own object rather than a query string parsed by **qs**, this is unbounded.
If you serialize objects whose nesting can be influenced by untrusted input, bound it with the numeric `depth` option (default `Infinity`);
exceeding it throws a catchable `RangeError` instead of eventually overflowing the call stack:
```javascript
try {
qs.stringify({ a: { b: { c: { d: 'e' } } } }, { depth: 2 });
} catch (err) {
assert(err instanceof RangeError);
assert.strictEqual(err.message, 'Input depth exceeded depth option of 2');
}
```
Analogue to the `encoder` there is a `decoder` option for `parse` to override decoding of properties and values:
```javascript
var decoded = qs.parse('x=z', { decoder: function (str) {
// Passed in values `x`, `z`
return // Return decoded string
}})
```
You can encode keys and values using different logic by using the type argument provided to the encoder:
```javascript
var encoded = qs.stringify({ a: { b: 'c' } }, { encoder: function (str, defaultEncoder, charset, type) {
if (type === 'key') {
return // Encoded key
} else if (type === 'value') {
return // Encoded value
}
}})
```
The type argument is also provided to the decoder:
```javascript
var decoded = qs.parse('x=z', { decoder: function (str, defaultDecoder, charset, type) {
if (type === 'key') {
return // Decoded key
} else if (type === 'value') {
return // Decoded value
}
}})
```
Examples beyond this point will be shown as though the output is not URI encoded for clarity.
Please note that the return values in these cases *will* be URI encoded during real usage.
When arrays are stringified, they follow the `arrayFormat` option, which defaults to `indices`:
```javascript
qs.stringify({ a: ['b', 'c', 'd'] });
// 'a[0]=b&a[1]=c&a[2]=d'
```
You may override this by setting the `indices` option to `false`, or to be more explicit, the `arrayFormat` option to `repeat`:
```javascript
qs.stringify({ a: ['b', 'c', 'd'] }, { indices: false });
// 'a=b&a=c&a=d'
```
You may use the `arrayFormat` option to specify the format of the output array:
```javascript
qs.stringify({ a: ['b', 'c'] }, { arrayFormat: 'indices' })
// 'a[0]=b&a[1]=c'
qs.stringify({ a: ['b', 'c'] }, { arrayFormat: 'brackets' })
// 'a[]=b&a[]=c'
qs.stringify({ a: ['b', 'c'] }, { arrayFormat: 'repeat' })
// 'a=b&a=c'
qs.stringify({ a: ['b', 'c'] }, { arrayFormat: 'comma' })
// 'a=b,c'
```
Note: when using `arrayFormat` set to `'comma'`, you can also pass the `commaRoundTrip` option set to `true` or `false`, to append `[]` on single-item arrays, so that they can round trip through a parse.
When objects are stringified, by default they use bracket notation:
```javascript
qs.stringify({ a: { b: { c: 'd', e: 'f' } } });
// 'a[b][c]=d&a[b][e]=f'
```
You may override this to use dot notation by setting the `allowDots` option to `true`:
```javascript
qs.stringify({ a: { b: { c: 'd', e: 'f' } } }, { allowDots: true });
// 'a.b.c=d&a.b.e=f'
```
You may encode the dot notation in the keys of object with option `encodeDotInKeys` by setting it to `true`:
Note: it implies `allowDots`, so `stringify` will error if you set `decodeDotInKeys` to `true`, and `allowDots` to `false`.
Caveat: when `encodeValuesOnly` is `true` as well as `encodeDotInKeys`, only dots in keys and nothing else will be encoded.
```javascript
qs.stringify({ "name.obj": { "first": "John", "last": "Doe" } }, { allowDots: true, encodeDotInKeys: true })
// 'name%252Eobj.first=John&name%252Eobj.last=Doe'
```
You may allow empty array values by setting the `allowEmptyArrays` option to `true`:
```javascript
qs.stringify({ foo: [], bar: 'baz' }, { allowEmptyArrays: true });
// 'foo[]&bar=baz'
```
Empty strings and null values will omit the value, but the equals sign (=) remains in place:
```javascript
assert.equal(qs.stringify({ a: '' }), 'a=');
```
Key with no values (such as an empty object or array) will return nothing:
```javascript
assert.equal(qs.stringify({ a: [] }), '');
assert.equal(qs.stringify({ a: {} }), '');
assert.equal(qs.stringify({ a: [{}] }), '');
assert.equal(qs.stringify({ a: { b: []} }), '');
assert.equal(qs.stringify({ a: { b: {}} }), '');
```
Properties that are set to `undefined` will be omitted entirely:
```javascript
assert.equal(qs.stringify({ a: null, b: undefined }), 'a=');
```
The query string may optionally be prepended with a question mark:
```javascript
assert.equal(qs.stringify({ a: 'b', c: 'd' }, { addQueryPrefix: true }), '?a=b&c=d');
```
Note that when the output is an empty string, the prefix will not be added:
```javascript
assert.equal(qs.stringify({}, { addQueryPrefix: true }), '');
```
The delimiter may be overridden with stringify as well:
```javascript
assert.equal(qs.stringify({ a: 'b', c: 'd' }, { delimiter: ';' }), 'a=b;c=d');
```
If you only want to override the serialization of `Date` objects, you can provide a `serializeDate` option:
```javascript
var date = new Date(7);
assert.equal(qs.stringify({ a: date }), 'a=1970-01-01T00:00:00.007Z'.replace(/:/g, '%3A'));
assert.equal(
qs.stringify({ a: date }, { serializeDate: function (d) { return d.getTime(); } }),
'a=7'
);
```
You may use the `sort` option to affect the order of parameter keys:
```javascript
function alphabeticalSort(a, b) {
return a.localeCompare(b);
}
assert.equal(qs.stringify({ a: 'c', z: 'y', b : 'f' }, { sort: alphabeticalSort }), 'a=c&b=f&z=y');
```
Finally, you can use the `filter` option to restrict which keys will be included in the stringified output.
If you pass a function, it will be called for each key to obtain the replacement value.
Otherwise, if you pass an array, it will be used to select properties and array indices for stringification:
```javascript
function filterFunc(prefix, value) {
if (prefix == 'b') {
// Return an `undefined` value to omit a property.
return;
}
if (prefix == 'e[f]') {
return value.getTime();
}
if (prefix == 'e[g][0]') {
return value * 2;
}
return value;
}
qs.stringify({ a: 'b', c: 'd', e: { f: new Date(123), g: [2] } }, { filter: filterFunc });
// 'a=b&c=d&e[f]=123&e[g][0]=4'
qs.stringify({ a: 'b', c: 'd', e: 'f' }, { filter: ['a', 'e'] });
// 'a=b&e=f'
qs.stringify({ a: ['b', 'c', 'd'], e: 'f' }, { filter: ['a', 0, 2] });
// 'a[0]=b&a[2]=d'
```
You could also use `filter` to inject custom serialization for user defined types.
Consider you're working with some api that expects query strings of the format for ranges:
```
https://domain.com/endpoint?range=30...70
```
For which you model as:
```javascript
class Range {
constructor(from, to) {
this.from = from;
this.to = to;
}
}
```
You could _inject_ a custom serializer to handle values of this type:
```javascript
qs.stringify(
{
range: new Range(30, 70),
},
{
filter: (prefix, value) => {
if (value instanceof Range) {
return `${value.from}...${value.to}`;
}
// serialize the usual way
return value;
},
}
);
// range=30...70
```
### Handling of `null` values
By default, `null` values are treated like empty strings:
```javascript
var withNull = qs.stringify({ a: null, b: '' });
assert.equal(withNull, 'a=&b=');
```
Parsing does not distinguish between parameters with and without equal signs.
Both are converted to empty strings.
```javascript
var equalsInsensitive = qs.parse('a&b=');
assert.deepEqual(equalsInsensitive, { a: '', b: '' });
```
To distinguish between `null` values and empty strings use the `strictNullHandling` flag. In the result string the `null`
values have no `=` sign:
```javascript
var strictNull = qs.stringify({ a: null, b: '' }, { strictNullHandling: true });
assert.equal(strictNull, 'a&b=');
```
To parse values without `=` back to `null` use the `strictNullHandling` flag:
```javascript
var parsedStrictNull = qs.parse('a&b=', { strictNullHandling: true });
assert.deepEqual(parsedStrictNull, { a: null, b: '' });
```
To completely skip rendering keys with `null` values, use the `skipNulls` flag:
```javascript
var nullsSkipped = qs.stringify({ a: 'b', c: null}, { skipNulls: true });
assert.equal(nullsSkipped, 'a=b');
```
If you're communicating with legacy systems, you can switch to `iso-8859-1` using the `charset` option:
```javascript
var iso = qs.stringify({ æ: 'æ' }, { charset: 'iso-8859-1' });
assert.equal(iso, '%E6=%E6');
```
Characters that don't exist in `iso-8859-1` will be converted to numeric entities, similar to what browsers do:
```javascript
var numeric = qs.stringify({ a: '☺' }, { charset: 'iso-8859-1' });
assert.equal(numeric, 'a=%26%239786%3B');
```
You can use the `charsetSentinel` option to announce the character by including an `utf8=✓` parameter with the proper encoding if the checkmark, similar to what Ruby on Rails and others do when submitting forms.
```javascript
var sentinel = qs.stringify({ a: '☺' }, { charsetSentinel: true });
assert.equal(sentinel, 'utf8=%E2%9C%93&a=%E2%98%BA');
var isoSentinel = qs.stringify({ a: 'æ' }, { charsetSentinel: true, charset: 'iso-8859-1' });
assert.equal(isoSentinel, 'utf8=%26%2310003%3B&a=%E6');
```
### Dealing with special character sets
By default the encoding and decoding of characters is done in `utf-8`, and `iso-8859-1` support is also built in via the `charset` parameter.
If you wish to encode querystrings to a different character set (i.e.
[Shift JIS](https://en.wikipedia.org/wiki/Shift_JIS)) you can use the
[`qs-iconv`](https://github.com/martinheidegger/qs-iconv) library:
```javascript
var encoder = require('qs-iconv/encoder')('shift_jis');
var shiftJISEncoded = qs.stringify({ a: 'こんにちは!' }, { encoder: encoder });
assert.equal(shiftJISEncoded, 'a=%82%B1%82%F1%82%C9%82%BF%82%CD%81I');
```
This also works for decoding of query strings:
```javascript
var decoder = require('qs-iconv/decoder')('shift_jis');
var obj = qs.parse('a=%82%B1%82%F1%82%C9%82%BF%82%CD%81I', { decoder: decoder });
assert.deepEqual(obj, { a: 'こんにちは!' });
```
### RFC 3986 and RFC 1738 space encoding
RFC3986 used as default option and encodes ' ' to *%20* which is backward compatible.
In the same time, output can be stringified as per RFC1738 with ' ' equal to '+'.
```
assert.equal(qs.stringify({ a: 'b c' }), 'a=b%20c');
assert.equal(qs.stringify({ a: 'b c' }, { format : 'RFC3986' }), 'a=b%20c');
assert.equal(qs.stringify({ a: 'b c' }, { format : 'RFC1738' }), 'a=b+c');
```
## Security
Please email [@ljharb](https://github.com/ljharb) or see https://tidelift.com/security if you have a potential security vulnerability to report.
## qs for enterprise
Available as part of the Tidelift Subscription
The maintainers of qs and thousands of other packages are working with Tidelift to deliver commercial support and maintenance for the open source dependencies you use to build your applications.
Save time, reduce risk, and improve code health, while paying the maintainers of the exact dependencies you use.
[Learn more.](https://tidelift.com/subscription/pkg/npm-qs?utm_source=npm-qs&utm_medium=referral&utm_campaign=enterprise&utm_term=repo)
[package-url]: https://npmjs.org/package/qs
[npm-version-svg]: https://versionbadg.es/ljharb/qs.svg
[deps-svg]: https://david-dm.org/ljharb/qs.svg
[deps-url]: https://david-dm.org/ljharb/qs
[dev-deps-svg]: https://david-dm.org/ljharb/qs/dev-status.svg
[dev-deps-url]: https://david-dm.org/ljharb/qs#info=devDependencies
[npm-badge-png]: https://nodei.co/npm/qs.png?downloads=true&stars=true
[license-image]: https://img.shields.io/npm/l/qs.svg
[license-url]: LICENSE
[downloads-image]: https://img.shields.io/npm/dm/qs.svg
[downloads-url]: https://npm-stat.com/charts.html?package=qs
[codecov-image]: https://codecov.io/gh/ljharb/qs/branch/main/graphs/badge.svg
[codecov-url]: https://app.codecov.io/gh/ljharb/qs/
[actions-image]: https://img.shields.io/github/check-runs/ljharb/qs/main
[actions-url]: https://github.com/ljharb/qs/actions
## Acknowledgements
qs logo by [NUMI](https://github.com/numi-hq/open-design):
[<img src="https://raw.githubusercontent.com/numi-hq/open-design/main/assets/numi-lockup.png" alt="NUMI Logo" style="width: 200px;"/>](https://numi.tech/?ref=qs)
@@ -0,0 +1,48 @@
// @ts-ignore TS6133
import { expect, test } from "vitest";
import * as z from "zod/v3";
import { util } from "../helpers/util.js";
test("generics", () => {
async function stripOuter<TData extends z.ZodTypeAny>(schema: TData, data: unknown) {
return z
.object({
nested: schema, // as z.ZodTypeAny,
})
.transform((data) => {
return data.nested!;
})
.parse({ nested: data });
}
const result = stripOuter(z.object({ a: z.string() }), { a: "asdf" });
util.assertEqual<typeof result, Promise<{ a: string }>>(true);
});
// test("assignability", () => {
// const createSchemaAndParse = <K extends string, VS extends z.ZodString>(
// key: K,
// valueSchema: VS,
// data: unknown
// ) => {
// const schema = z.object({
// [key]: valueSchema,
// } as { [k in K]: VS });
// return { [key]: valueSchema };
// const parsed = schema.parse(data);
// return parsed;
// // const inferred: z.infer<z.ZodObject<{ [k in K]: VS }>> = parsed;
// // return inferred;
// };
// const parsed = createSchemaAndParse("foo", z.string(), { foo: "" });
// util.assertEqual<typeof parsed, { foo: string }>(true);
// });
test("nested no undefined", () => {
const inner = z.string().or(z.array(z.string()));
const outer = z.object({ inner });
type outerSchema = z.infer<typeof outer>;
z.util.assertEqual<outerSchema, { inner: string | string[] }>(true);
expect(outer.safeParse({ inner: undefined }).success).toEqual(false);
});
@@ -0,0 +1 @@
module.exports={A:{A:{"2":"_b","260":"_V"},B:{"1":"_K","260":"_I"},C:{"1":"_7F","2":"_q _2B _L","132":"_GH _CG"},D:{"1":"_yH","2":"_IC"},E:{"1":"_JB","2":"_RB"},F:{"1":"_1L aC","2":"_yM _MD _FJ","16":"C"},G:{"1":"_9","2":"_iB"},H:{"1":"1D"},I:{"1":"I","2":"_G"},J:{"2":"_B"},K:{"1":"_ZB","2":"_gB","16":"C"},L:{"1":"I"},M:{"1":"YC"},N:{"260":"_A"},O:{"1":"bC"},P:{"1":"_U","2":"J"},Q:{"1":"JE"},R:{"1":"KE"},S:{"1":"_C"}},B:5,C:"KeyboardEvent.key",D:true};
@@ -0,0 +1 @@
{"version":3,"file":"delay.interface.js","sourceRoot":"","sources":["../../src/delay/delay.interface.ts"],"names":[],"mappings":""}
@@ -0,0 +1,83 @@
{
"name": "@typescript-eslint/parser",
"version": "8.58.2",
"description": "An ESLint custom parser which leverages TypeScript ESTree",
"files": [
"dist",
"!**/*.tsbuildinfo",
"README.md",
"LICENSE"
],
"type": "commonjs",
"exports": {
".": {
"types": "./dist/index.d.ts",
"default": "./dist/index.js"
},
"./package.json": "./package.json"
},
"engines": {
"node": "^18.18.0 || ^20.9.0 || >=21.1.0"
},
"repository": {
"type": "git",
"url": "https://github.com/typescript-eslint/typescript-eslint.git",
"directory": "packages/parser"
},
"bugs": {
"url": "https://github.com/typescript-eslint/typescript-eslint/issues"
},
"homepage": "https://typescript-eslint.io/packages/parser",
"license": "MIT",
"keywords": [
"ast",
"ecmascript",
"javascript",
"typescript",
"parser",
"syntax",
"eslint"
],
"peerDependencies": {
"eslint": "^8.57.0 || ^9.0.0 || ^10.0.0",
"typescript": ">=4.8.4 <6.1.0"
},
"dependencies": {
"debug": "^4.4.3",
"@typescript-eslint/types": "8.58.2",
"@typescript-eslint/visitor-keys": "8.58.2",
"@typescript-eslint/typescript-estree": "8.58.2",
"@typescript-eslint/scope-manager": "8.58.2"
},
"devDependencies": {
"@vitest/coverage-v8": "^4.0.18",
"eslint": "^10.0.0",
"glob": "^11.1.0",
"rimraf": "^5.0.10",
"typescript": ">=4.8.4 <6.1.0",
"vitest": "^4.0.18"
},
"funding": {
"type": "opencollective",
"url": "https://opencollective.com/typescript-eslint"
},
"nx": {
"name": "parser",
"includedScripts": [
"clean"
],
"targets": {
"lint": {
"command": "eslint"
}
}
},
"scripts": {
"build": "pnpm exec nx build",
"clean": "rimraf dist/ coverage/",
"format": "pnpm -w run format",
"lint": "pnpm -w exec nx lint",
"test": "pnpm -w exec nx test",
"typecheck": "pnpm -w exec nx typecheck"
}
}
@@ -0,0 +1 @@
{"version":3,"file":"siren.js","sources":["../../../src/icons/siren.ts"],"sourcesContent":["import createLucideIcon from '../createLucideIcon';\n\n/**\n * @component @name Siren\n * @description Lucide SVG icon component, renders SVG Element with children.\n *\n * @preview ![img](data:image/svg+xml;base64,PHN2ZyAgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIgogIHdpZHRoPSIyNCIKICBoZWlnaHQ9IjI0IgogIHZpZXdCb3g9IjAgMCAyNCAyNCIKICBmaWxsPSJub25lIgogIHN0cm9rZT0iIzAwMCIgc3R5bGU9ImJhY2tncm91bmQtY29sb3I6ICNmZmY7IGJvcmRlci1yYWRpdXM6IDJweCIKICBzdHJva2Utd2lkdGg9IjIiCiAgc3Ryb2tlLWxpbmVjYXA9InJvdW5kIgogIHN0cm9rZS1saW5lam9pbj0icm91bmQiCj4KICA8cGF0aCBkPSJNNyAxOHYtNmE1IDUgMCAxIDEgMTAgMHY2IiAvPgogIDxwYXRoIGQ9Ik01IDIxYTEgMSAwIDAgMCAxIDFoMTJhMSAxIDAgMCAwIDEtMXYtMWEyIDIgMCAwIDAtMi0ySDdhMiAyIDAgMCAwLTIgMnoiIC8+CiAgPHBhdGggZD0iTTIxIDEyaDEiIC8+CiAgPHBhdGggZD0iTTE4LjUgNC41IDE4IDUiIC8+CiAgPHBhdGggZD0iTTIgMTJoMSIgLz4KICA8cGF0aCBkPSJNMTIgMnYxIiAvPgogIDxwYXRoIGQ9Im00LjkyOSA0LjkyOS43MDcuNzA3IiAvPgogIDxwYXRoIGQ9Ik0xMiAxMnY2IiAvPgo8L3N2Zz4K) - https://lucide.dev/icons/siren\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 Siren = createLucideIcon('Siren', [\n ['path', { d: 'M7 18v-6a5 5 0 1 1 10 0v6', key: 'pcx96s' }],\n [\n 'path',\n { d: 'M5 21a1 1 0 0 0 1 1h12a1 1 0 0 0 1-1v-1a2 2 0 0 0-2-2H7a2 2 0 0 0-2 2z', key: '1b4s83' },\n ],\n ['path', { d: 'M21 12h1', key: 'jtio3y' }],\n ['path', { d: 'M18.5 4.5 18 5', key: 'g5sp9y' }],\n ['path', { d: 'M2 12h1', key: '1uaihz' }],\n ['path', { d: 'M12 2v1', key: '11qlp1' }],\n ['path', { d: 'm4.929 4.929.707.707', key: '1i51kw' }],\n ['path', { d: 'M12 12v6', key: '3ahymv' }],\n]);\n\nexport default Siren;\n"],"names":[],"mappings":";;;;;;;;;AAaM,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAQ,iBAAiB,OAAS,CAAA,CAAA,CAAA;AAAA,CAAA,CACtC,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,CAC1D,CAAA,CAAA;AAAA,CAAA,CAAA,CAAA,CACE,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAA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AU,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,CAAwB,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAK,UAAU,CAAA,CAAA;AAAA,CAAA,CACrD,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,316 @@
export default `flf2a$ 3 2 8 -1 8
Short and sweet by Sub-Zero (bodom@ugly.ucs.indiana.edu)
Completed and ported to figlet by Juan Car (jc@juguete.quim.ucm.es)
Improved again by Sub-Zero
---
Font modified June 17, 2007 by patorjk
This was to widen the space character.
$$@
$$@
$$@@
|@
.@
@@
''@
@
@@
||@
||@
@@
(|\`@
_|)@
@@
o/@
/o@
@@
()@
(X@
@@
,@
@
@@
/@
\\@
@@
\\@
/@
@@
\\|/@
/|\\@
@@
_|_@
| @
@@
@
,@
@@
__@
@
@@
@
.@
@@
/@
/ @
@@
/\\@
\\/@
@@
'| @
_|_@
@@
')@
/_@
@@
')@
.)@
@@
/| @
~|~@
@@
|~@
_)@
@@
/ @
(_)@
@@
~/@
/ @
@@
(~)@
(_)@
@@
(~)@
/ @
@@
.@
.@
@@
.@
/@
@@
/@
\\@
@@
_@
-@
@@
\\@
/@
@@
~)@
| @
@@
_ @
(\\)@
~~@@
/|@
/-|@
@@
|)@
|)@
@@
/\`@
\\,@
@@
|\\@
|/@
@@
[~@
[_@
@@
[~@
| @
@@
/~ @
\\_|@
@@
|_|@
| |@
@@
|@
|@
@@
|@
_|@
@@
|/@
|\\@
@@
| @
|_@
@@
|\\/|@
| |@
@@
|\\ |@
| \\|@
@@
/\\@
\\/@
@@
|)@
| @
@@
/\\@
\\X@
@@
|)@
|\\@
@@
(\`@
_)@
@@
~|~@
| @
@@
| |@
|_|@
@@
| /@
|/ @
@@
| | |@
\\|\\|@
@@
\\/@
/\\@
@@
\\ /@
| @
@@
~/@
/_@
@@
|~@
|_@
@@
\\ @
\\@
@@
~|@
_|@
@@
/\\@
@
@@
@
__@
@@
\\@
@
@@
@
(|@
@@
| @
|)@
@@
_@
(_@
@@
|@
(|@
@@
_ @
(/_@
@@
[\`@
|$@
@@
@
(|@
_|@@
|_@
||@
@@
.@
|@
@@
.@
|@
_|@@
| @
|<@
@@
|@
|@
@@
,_ @
|||@
@@
,_@
||@
@@
@
()@
@@
@
|)@
| @@
@
(|@
|@@
@
|\`@
@@
_@
_\\@
@@
|-@
|_@
@@
@
L|@
@@
@
\\/@
@@
@
LL|@
@@
@
><@
@@
@
\\/@
/ @@
_ @
/_@
@@
|~@
< @
|_@@
|@
|@
@@
~|@
>@
_|@@
nu@
@
@@
..@
(|@
@@
..@
()@
@@
..@
L|@
@@
..@
(|@
@@
..@
()@
@@
..@
L|@
@@
|)@
;)@
@@
`
@@ -0,0 +1,4 @@
const compareByDepth = (a, b) => a.depth - b.depth;
export { compareByDepth };
//# sourceMappingURL=compare-by-depth.mjs.map
@@ -0,0 +1,18 @@
import { Env, Schema } from "../../types.js";
import { Hono } from "../../hono.js";
import { FetchEvent } from "./types.js";
//#region src/adapter/service-worker/handler.d.ts
type Handler = (evt: FetchEvent) => void;
/**
* @deprecated `hono/service-worker` will be removed in v5. Install `@hono/service-worker` and import from there instead.
*/
export type HandleOptions = {
fetch?: typeof fetch;
};
/**
* Adapter for Service Worker
* @deprecated `hono/service-worker` will be removed in v5. Install `@hono/service-worker` and import from there instead.
*/
export declare const handle: <E extends Env, S extends Schema, BasePath extends string>(app: Hono<E, S, BasePath>, opts?: HandleOptions) => Handler;
//#endregion
export {};
@@ -0,0 +1 @@
{"version":3,"file":"lamp-desk.js","sources":["../../../src/icons/lamp-desk.ts"],"sourcesContent":["import createLucideIcon from '../createLucideIcon';\n\n/**\n * @component @name LampDesk\n * @description Lucide SVG icon component, renders SVG Element with children.\n *\n * @preview ![img](data:image/svg+xml;base64,PHN2ZyAgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIgogIHdpZHRoPSIyNCIKICBoZWlnaHQ9IjI0IgogIHZpZXdCb3g9IjAgMCAyNCAyNCIKICBmaWxsPSJub25lIgogIHN0cm9rZT0iIzAwMCIgc3R5bGU9ImJhY2tncm91bmQtY29sb3I6ICNmZmY7IGJvcmRlci1yYWRpdXM6IDJweCIKICBzdHJva2Utd2lkdGg9IjIiCiAgc3Ryb2tlLWxpbmVjYXA9InJvdW5kIgogIHN0cm9rZS1saW5lam9pbj0icm91bmQiCj4KICA8cGF0aCBkPSJtMTQgNS0zIDMgMiA3IDgtOC03LTJaIiAvPgogIDxwYXRoIGQ9Im0xNCA1LTMgMy0zLTMgMy0zIDMgM1oiIC8+CiAgPHBhdGggZD0iTTkuNSA2LjUgNCAxMmwzIDYiIC8+CiAgPHBhdGggZD0iTTMgMjJ2LTJjMC0xLjEuOS0yIDItMmg0YTIgMiAwIDAgMSAyIDJ2MkgzWiIgLz4KPC9zdmc+Cg==) - https://lucide.dev/icons/lamp-desk\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 LampDesk = create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A,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,CAA+C,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAK,UAAU,CAAA;AAC9E,CAAC,CAAA,CAAA;;"}
@@ -0,0 +1,233 @@
#ifndef NODE_SQLITE3_SRC_MACROS_H
#define NODE_SQLITE3_SRC_MACROS_H
#include <string>
std::string sqlite_code_string(int code);
const char* sqlite_authorizer_string(int type);
#include <vector>
#include <napi.h>
// A Napi substitute IsInt32()
inline bool OtherIsInt(Napi::Number source) {
double orig_val = source.DoubleValue();
double int_val = static_cast<double>(source.Int32Value());
if (orig_val == int_val) {
return true;
} else {
return false;
}
}
#define IS_FUNCTION(cb) \
!cb.IsUndefined() && cb.IsFunction()
#define REQUIRE_ARGUMENTS(n) \
if (info.Length() < (n)) { \
Napi::TypeError::New(env, "Expected " #n "arguments").ThrowAsJavaScriptException(); \
return env.Null(); \
}
#define REQUIRE_ARGUMENT_EXTERNAL(i, var) \
if (info.Length() <= (i) || !info[i].IsExternal()) { \
Napi::TypeError::New(env, "Argument " #i " invalid").ThrowAsJavaScriptException(); \
return env.Null(); \
} \
Napi::External var = info[i].As<Napi::External>();
#define REQUIRE_ARGUMENT_FUNCTION(i, var) \
if (info.Length() <= (i) || !info[i].IsFunction()) { \
Napi::TypeError::New(env, "Argument " #i " must be a function").ThrowAsJavaScriptException(); \
return env.Null(); \
} \
Napi::Function var = info[i].As<Napi::Function>();
#define REQUIRE_ARGUMENT_STRING(i, var) \
if (info.Length() <= (i) || !info[i].IsString()) { \
Napi::TypeError::New(env, "Argument " #i " must be a string").ThrowAsJavaScriptException(); \
return env.Null(); \
} \
std::string var = info[i].As<Napi::String>();
#define REQUIRE_ARGUMENT_INTEGER(i, var) \
if (info.Length() <= (i) || !info[i].IsNumber()) { \
Napi::TypeError::New(env, "Argument " #i " must be an integer").ThrowAsJavaScriptException(); \
return env.Null(); \
} \
int var(info[i].As<Napi::Number>().Int32Value());
#define OPTIONAL_ARGUMENT_FUNCTION(i, var) \
Napi::Function var; \
if (info.Length() > i && !info[i].IsUndefined()) { \
if (!info[i].IsFunction()) { \
Napi::TypeError::New(env, "Argument " #i " must be a function").ThrowAsJavaScriptException(); \
return env.Null(); \
} \
var = info[i].As<Napi::Function>(); \
}
#define OPTIONAL_ARGUMENT_INTEGER(i, var, default) \
int var; \
if (info.Length() <= (i)) { \
var = (default); \
} \
else if (info[i].IsNumber()) { \
if (OtherIsInt(info[i].As<Number>())) { \
var = info[i].As<Napi::Number>().Int32Value(); \
} \
} \
else { \
Napi::TypeError::New(env, "Argument " #i " must be an integer").ThrowAsJavaScriptException(); \
return env.Null(); \
}
#define DEFINE_CONSTANT_INTEGER(target, constant, name) \
Napi::PropertyDescriptor::Value(#name, Napi::Number::New(env, constant), \
static_cast<napi_property_attributes>(napi_enumerable | napi_configurable)),
#define DEFINE_CONSTANT_STRING(target, constant, name) \
Napi::PropertyDescriptor::Value(#name, Napi::String::New(env, constant), \
static_cast<napi_property_attributes>(napi_enumerable | napi_configurable)),
// Builds the SqliteError value. `msg` is a UTF-8 const char*/std::string:
// composing the message in C++ avoids the old three-pass UTF-8
// round-trip through Napi::String (encode-decode-decode-encode) that
// StringConcat used to force on every error construction.
#define EXCEPTION(msg, errno, name) \
Napi::Value name = Napi::Error::New(env, \
std::string(sqlite_code_string(errno)) + ": " + (msg)).Value(); \
Napi::Object name ##_obj = name.As<Napi::Object>(); \
(name ##_obj).Set( Napi::String::New(env, "errno"), Napi::Number::New(env, errno)); \
(name ##_obj).Set( Napi::String::New(env, "code"), \
Napi::String::New(env, sqlite_code_string(errno))); \
(name ##_obj).Set( Napi::String::New(env, "primaryCode"), \
Napi::String::New(env, sqlite_code_string((errno) & 0xff)));
#define EMIT_EVENT(obj, argc, argv) \
TRY_CATCH_CALL((obj), \
(obj).Get("emit").As<Napi::Function>(),\
argc, argv \
);
// argc is a literal at every call site, so the argument buffer is a plain
// fixed-size stack array (no heap allocation); the static_assert enforces
// that assumption. Napi::Value converts implicitly to napi_value.
#define TRY_CATCH_CALL_MAX_ARGS 8
#define TRY_CATCH_CALL(context, callback, argc, argv, ...) \
static_assert((argc) >= 0 && (argc) <= TRY_CATCH_CALL_MAX_ARGS, \
"TRY_CATCH_CALL argc must be a literal in [0, 8]"); \
napi_value TRY_CATCH_CALL_args[TRY_CATCH_CALL_MAX_ARGS]; \
/* via a pointer so that argc == 0 may pass a NULL argv */ \
const Napi::Value* TRY_CATCH_CALL_src = (argv); \
for (int TRY_CATCH_CALL_i = 0; TRY_CATCH_CALL_i < (argc); \
TRY_CATCH_CALL_i++) { \
TRY_CATCH_CALL_args[TRY_CATCH_CALL_i] = \
TRY_CATCH_CALL_src[TRY_CATCH_CALL_i]; \
} \
Napi::Value res = (callback).Call(Napi::Value(context), \
static_cast<size_t>(argc), TRY_CATCH_CALL_args); \
if (res.IsEmpty()) return __VA_ARGS__;
#define WORK_DEFINITION(name) \
Napi::Value name(const Napi::CallbackInfo& info); \
static void Work_Begin##name(Baton* baton); \
static void Work_##name(napi_env env, void* data); \
static void Work_After##name(napi_env env, napi_status status, void* data);
#ifdef DEBUG
#define ASSERT_STATUS() assert(status == 0);
#else
#define ASSERT_STATUS() (void)status;
#endif
#define CREATE_WORK(name, workerFn, afterFn) \
int status = napi_create_async_work(env, NULL, Napi::String::New(env, name),\
workerFn, afterFn, baton, &baton->request); \
\
ASSERT_STATUS(); \
napi_queue_async_work(env, baton->request);
#define STATEMENT_BEGIN(type) \
assert(baton); \
assert(baton->stmt); \
assert(!baton->stmt->locked); \
assert(!baton->stmt->finalized); \
assert(baton->stmt->prepared); \
baton->stmt->locked = true; \
baton->stmt->db->pending++; \
auto env = baton->stmt->Env(); \
CREATE_WORK("sqlite3.Statement."#type, Work_##type, Work_After##type);
#define STATEMENT_INIT(type) \
type* baton = static_cast<type*>(data); \
Statement* stmt = baton->stmt;
#define STATEMENT_MUTEX(name) \
if (!stmt->db->_handle) { \
stmt->status = SQLITE_MISUSE; \
stmt->message = "Database handle is closed"; \
return; \
} \
sqlite3_mutex* name = sqlite3_db_mutex(stmt->db->_handle);
// Declares the guard that performs the end-of-call bookkeeping on every
// exit path from a Work_After* handler, including TRY_CATCH_CALL's early
// return when a JS callback throws. See Statement::CallGuard.
#define STATEMENT_END() \
Statement::CallGuard statement_call_guard__(stmt);
#define BACKUP_BEGIN(type) \
assert(baton); \
assert(baton->backup); \
assert(!baton->backup->locked); \
assert(!baton->backup->finished); \
assert(baton->backup->inited); \
baton->backup->locked = true; \
baton->backup->db->pending++; \
auto env = baton->backup->Env(); \
CREATE_WORK("sqlite3.Backup."#type, Work_##type, Work_After##type);
#define BACKUP_INIT(type) \
type* baton = static_cast<type*>(data); \
Backup* backup = baton->backup;
// Declares the guard that performs the end-of-call bookkeeping on every
// exit path from a Work_After* handler, including TRY_CATCH_CALL's early
// return when a JS callback throws. See Backup::CallGuard. Declared at
// the top of the handler, like STATEMENT_END().
#define BACKUP_END() \
Backup::CallGuard backup_call_guard__(backup);
// Async-completion teardown guard (Deliverable 09). A terminated worker
// has its remaining async-work completions delivered while the isolate
// unwinds; there every JS-entering napi call — including
// node-addon-api's checked error path — is fatal. Reference management
// (delete/unref) still succeeds, so the baton is destroyed normally by
// the unique_ptr this macro returns through; only the JS delivery is
// skipped. `false` because an async completion enters with no exception
// pending on a healthy env, so a refused probe here means the isolate is
// terminating (see Database::EnvCannotRunJs). Placed after the baton's
// unique_ptr so the early return still frees it.
//
// This is an entry check, so it does not cover a termination that lands
// *inside* a handler — a completion already converting rows can still
// take the process down. Measured, five runs each way: one query in
// flight at terminate() aborts with 134 without this guard and exits 0
// with it; several queued completions still abort, exactly as they did
// before the guard existed. Closing that residue needs status-checked
// napi calls throughout the handlers rather than node-addon-api's
// checked helpers, whose failure path is itself a JS call — which is why
// the failure escalates to FATAL instead of raising an exception.
#define AFTER_WORK_TEARDOWN_GUARD(baton) \
if (Database::EnvCannotRunJs(e, false)) { \
return; \
}
#endif
@@ -0,0 +1 @@
{"version":3,"file":"regexps-uri.js","sourceRoot":"","sources":["../../src/regexps-uri.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,KAAK,EAAE,MAAM,EAAE,MAAM,QAAQ,CAAC;AAEvC,MAAM,oBAAoB,KAAa;IACtC,MACC,OAAO,GAAG,UAAU,EACpB,GAAG,GAAG,SAAS,EACf,OAAO,GAAG,OAAO,EACjB,QAAQ,GAAG,SAAS,EACpB,QAAQ,GAAG,KAAK,CAAC,OAAO,EAAE,UAAU,CAAC,EAAG,kBAAkB;IAC1D,IAAI,GAAG,SAAS,EAChB,IAAI,GAAG,SAAS,EAChB,YAAY,GAAG,MAAM,CAAC,MAAM,CAAC,SAAS,GAAG,QAAQ,GAAG,GAAG,GAAG,QAAQ,GAAG,QAAQ,GAAG,GAAG,GAAG,QAAQ,GAAG,QAAQ,CAAC,GAAG,GAAG,GAAG,MAAM,CAAC,aAAa,GAAG,QAAQ,GAAG,GAAG,GAAG,QAAQ,GAAG,QAAQ,CAAC,GAAG,GAAG,GAAG,MAAM,CAAC,GAAG,GAAG,QAAQ,GAAG,QAAQ,CAAC,CAAC,EAAG,UAAU;IACvO,YAAY,GAAG,yBAAyB,EACxC,YAAY,GAAG,qCAAqC,EACpD,UAAU,GAAG,KAAK,CAAC,YAAY,EAAE,YAAY,CAAC,EAC9C,SAAS,GAAG,KAAK,CAAC,CAAC,CAAC,6EAA6E,CAAC,CAAC,CA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C,EAC3E,SAAS,GAAG,MAAM,CAAC,MAAM,CAAC,MAAM,GAAG,WAAW,CAAC,GAAG,GAAG,CAAC,EACtD,UAAU,GAAG,MAAM,CAALine truncated
@@ -0,0 +1 @@
{"version":3,"file":"create.mjs","sources":["../../../../src/animation/sequence/create.ts"],"sourcesContent":["import {\n AnimationScope,\n createGeneratorEasing,\n defaultOffset,\n DOMKeyframesDefinition,\n AnimationOptions as DynamicAnimationOptions,\n fillOffset,\n GeneratorFactory,\n isGenerator,\n isMotionValue,\n Transition,\n UnresolvedValueKeyframe,\n type AnyResolvedKeyframe,\n type MotionValue,\n} from \"motion-dom\"\nimport {\n Easing,\n getEasingForSegment,\n invariant,\n progress,\n secondsToMilliseconds,\n} from \"motion-utils\"\nimport { resolveSubjects } from \"../animate/resolve-subjects\"\nimport {\n AnimationSequence,\n At,\n ResolvedAnimationDefinitions,\n SequenceMap,\n SequenceOptions,\n ValueSequence,\n} from \"./types\"\nimport { calculateRepeatDuration } from \"./utils/calc-repeat-duration\"\nimport { calcNextTime } from \"./utils/calc-time\"\nimport { addKeyframes } from \"./utils/edit\"\nimport { normalizeTimes } from \"./utils/normalize-times\"\nimport { compareByTime } from \"./utils/sort\"\n\nconst defaultSegmentEasing = \"easeInOut\"\n\nconst MAX_REPEAT = 20\n\nexport function createAnimationsFromSequence(\n sequence: AnimationSequence,\n { defaultTransition = {}, ...sequenceTransition }: SequenceOptions = {},\n scope?: AnimationScope,\n generators?: { [key: string]: GeneratorFactory }\n): ResolvedAnimationDefinitions {\n const defaultDuration = defaultTransition.duration || 0.3\n const animationDefinitions: ResolvedAnimationDefinitions = new Map()\n const sequences = new Map<Element | MotionValue, SequenceMap>()\n const elementCache = {}\n const timeLabels = new Map<string, number>()\n\n let prevTime = 0\n let currentTime = 0\n let totalDuration = 0\n\n /**\n * Build the timeline by mapping over the sequence array and converting\n * the definitions into keyframes and offsets with absolute time values.\n * These will later get converted into relative offsets in a second pass.\n */\n for (let i = 0; i < sequence.length; i++) {\n const segment = sequence[i]\n\n /**\n * If this is a timeline label, mark it and skip the rest of this iteration.\n */\n if (typeof segment === \"string\") {\n timeLabels.set(segment, currentTime)\n continue\n } else if (!Array.isArray(segment)) {\n timeLabels.set(\n segment.name,\n calcNextTime(currentTime, segment.at, prevTime, timeLabels)\n )\n continue\n }\n\n let [subject, keyframes, transition = {}] = segment\n\n /**\n * If a relative or absolute time value has been specified we need to resolve\n * it in relation to the currentTime.\n */\n if (transition.at !== undefined) {\n currentTime = calcNextTime(\n currentTime,\n transition.at,\n prevTime,\n timeLabels\n )\n }\n\n /**\n * Keep track of the maximum duration in this definition. This will be\n * applied to currentTime once the definition has been parsed.\n */\n let maxDuration = 0\n\n const resolveValueSequence = (\n valueKeyframes: UnresolvedValueKeyframe | UnresolvedValueKeyframe[],\n valueTransition: Transition | DynamicAnimationOptions,\n valueSequence: ValueSequence,\n elementIndex = 0,\n numSubjects = 0\n ) => {\n const valueKeyframesAsList = keyframesAsList(valueKeyframes)\n const {\n delay = 0,\n times = defaultOffset(valueKeyframesAsList),\n type = defaultTransition.type || \"keyframes\",\n repeat,\n repeatType,\n repeatDelay = 0,\n ...remainingTransition\n } = valueTransition\n let { ease = defaultTransition.ease || \"easeOut\", duration } =\n valueTransition\n\n /**\n * Resolve stagger() if defined.\n */\n const calculatedDelay =\n typeof delay === \"function\"\n ? delay(elementIndex, numSubjects)\n : delay\n\n /**\n * If this animation should and can use a spring, generate a spring easing function.\n */\n const numKeyframes = valueKeyframesAsList.length\n const createGenerator = isGenerator(type)\n ? type\n : generators?.[type || \"keyframes\"]\n\n if (numKeyframes <= 2 && createGenerator) {\n /**\n * As we're creating an easing function from a spring,\n * ideally we want to generate it using the real distance\n * between the two keyframes. However this isn't always\nLine truncated
@@ -0,0 +1,10 @@
/**
* ValueType for "auto"
*/
const auto = {
test: (v) => v === "auto",
parse: (v) => v,
};
export { auto };
//# sourceMappingURL=auto.mjs.map
@@ -0,0 +1,21 @@
#!/bin/bash
pkgs=(
"com.apple.pkg.DeveloperToolsCLILeo" # standalone
"com.apple.pkg.DeveloperToolsCLI" # from XCode
"com.apple.pkg.CLTools_Executables" # Mavericks
)
for pkg in "${pkgs[@]}"; do
output=$(/usr/sbin/pkgutil --pkg-info "$pkg" 2>/dev/null)
if [ "$output" ]; then
version=$(echo "$output" | grep 'version' | cut -d' ' -f2)
break
fi
done
if [ "$version" ]; then
echo "Command Line Tools version: $version"
else
echo >&2 'Command Line Tools not found'
fi
@@ -0,0 +1,53 @@
/**
* AJV-based JSON Schema validator provider
*/
import Ajv from 'ajv';
import type { JsonSchemaType, JsonSchemaValidator, jsonSchemaValidator } from './types.js';
/**
* @example
* ```typescript
* // Use with default AJV instance (recommended)
* import { AjvJsonSchemaValidator } from '@modelcontextprotocol/sdk/validation/ajv';
* const validator = new AjvJsonSchemaValidator();
*
* // Use with custom AJV instance
* import { Ajv } from 'ajv';
* const ajv = new Ajv({ strict: true, allErrors: true });
* const validator = new AjvJsonSchemaValidator(ajv);
* ```
*/
export declare class AjvJsonSchemaValidator implements jsonSchemaValidator {
private _ajv;
/**
* Create an AJV validator
*
* @param ajv - Optional pre-configured AJV instance. If not provided, a default instance will be created.
*
* @example
* ```typescript
* // Use default configuration (recommended for most cases)
* import { AjvJsonSchemaValidator } from '@modelcontextprotocol/sdk/validation/ajv';
* const validator = new AjvJsonSchemaValidator();
*
* // Or provide custom AJV instance for advanced configuration
* import { Ajv } from 'ajv';
* import addFormats from 'ajv-formats';
*
* const ajv = new Ajv({ validateFormats: true });
* addFormats(ajv);
* const validator = new AjvJsonSchemaValidator(ajv);
* ```
*/
constructor(ajv?: Ajv);
/**
* Create a validator for the given JSON Schema
*
* The validator is compiled once and can be reused multiple times.
* If the schema has an $id, it will be cached by AJV automatically.
*
* @param schema - Standard JSON Schema object
* @returns A validator function that validates input data
*/
getValidator<T>(schema: JsonSchemaType): JsonSchemaValidator<T>;
}
//# sourceMappingURL=ajv-provider.d.ts.map
@@ -0,0 +1,2 @@
// Only Node.JS has a process variable that is of [[Class]] process
export const isNode = Object.prototype.toString.call(typeof process !== 'undefined' ? process : 0) === '[object process]';
@@ -0,0 +1,698 @@
/**
* MCP Apps Protocol Types (spec.types.ts)
*
* This file contains pure TypeScript interface definitions for the MCP Apps protocol.
* These types are the source of truth and are used to generate Zod schemas via `ts-to-zod`.
*
* - Use `@description` JSDoc tags to generate `.describe()` calls on schemas
* - Run `npm run generate:schemas` to regenerate schemas from these types
*
* @see https://github.com/modelcontextprotocol/ext-apps/blob/main/specification/2026-01-26/apps.mdx
*/
import type { CallToolResult, ContentBlock, EmbeddedResource, Implementation, RequestId, ResourceLink, Tool } from "@modelcontextprotocol/client";
/**
* Current protocol version supported by this SDK.
*
* The SDK automatically handles version negotiation during initialization.
* Apps and hosts don't need to manage protocol versions manually.
*/
export declare const LATEST_PROTOCOL_VERSION = "2026-01-26";
/**
* @description Color theme preference for the host environment.
*/
export type McpUiTheme = "light" | "dark";
/**
* @description Display mode for UI presentation.
*/
export type McpUiDisplayMode = "inline" | "fullscreen" | "pip";
/**
* @description CSS variable keys available to MCP apps for theming.
*/
export type McpUiStyleVariableKey = "--color-background-primary" | "--color-background-secondary" | "--color-background-tertiary" | "--color-background-inverse" | "--color-background-ghost" | "--color-background-info" | "--color-background-danger" | "--color-background-success" | "--color-background-warning" | "--color-background-disabled" | "--color-text-primary" | "--color-text-secondary" | "--color-text-tertiary" | "--color-text-inverse" | "--color-text-ghost" | "--color-text-info" | "--color-text-danger" | "--color-text-success" | "--color-text-warning" | "--color-text-disabled" | "--color-border-primary" | "--color-border-secondary" | "--color-border-tertiary" | "--color-border-inverse" | "--color-border-ghost" | "--color-border-info" | "--color-border-danger" | "--color-border-success" | "--color-border-warning" | "--color-border-disabled" | "--color-ring-primary" | "--color-ring-secondary" | "--color-ring-inverse" | "--color-ring-info" | "--color-ring-danger" | "--color-ring-success" | "--color-ring-warning" | "--font-sans" | "--font-mono" | "--font-weight-normal" | "--font-weight-medium" | "--font-weight-semibold" | "--font-weight-bold" | "--font-text-xs-size" | "--font-text-sm-size" | "--font-text-md-size" | "--font-text-lg-size" | "--font-heading-xs-size" | "--font-heading-sm-size" | "--font-heading-md-size" | "--font-heading-lg-size" | "--font-heading-xl-size" | "--font-heading-2xl-size" | "--font-heading-3xl-size" | "--font-text-xs-line-height" | "--font-text-sm-line-height" | "--font-text-md-line-height" | "--font-text-lg-line-height" | "--font-heading-xs-line-height" | "--font-heading-sm-line-height" | "--font-heading-md-line-height" | "--font-heading-lg-line-height" | "--font-heading-xl-line-height" | "--font-heading-2xl-line-height" | "--font-heading-3xl-line-height" | "--border-radius-xs" | "--border-radius-sm" | "--border-radius-md" | "--border-radius-lg" | "--border-radius-xl" | "--border-radius-full" | "--border-width-regular" | "--shadow-hairline" | "--shadow-sm" | "--shadow-md" | "--shadow-lg";
/**
* @description Style variables for theming MCP apps.
*
* Individual style keys are optional - hosts may provide any subset of these values.
* Values are strings containing CSS values (colors, sizes, font stacks, etc.).
*
* Note: This type uses `Record<K, string | undefined>` rather than `Partial<Record<K, string>>`
* for compatibility with Zod schema generation. Both are functionally equivalent for validation.
*/
export type McpUiStyles = Record<McpUiStyleVariableKey, string | undefined>;
/**
* @description Request to open an external URL in the host's default browser.
* @see {@link app!App.openLink `App.openLink`} for the method that sends this request
*/
export interface McpUiOpenLinkRequest {
method: "ui/open-link";
params: {
/** @description URL to open in the host's browser */
url: string;
};
}
/**
* @description Result from opening a URL.
* @see {@link McpUiOpenLinkRequest `McpUiOpenLinkRequest`}
*/
export interface McpUiOpenLinkResult {
/** @description True if the host failed to open the URL (e.g., due to security policy). */
isError?: boolean;
/**
* Additional result properties are preserved for protocol extensibility.
* The generated schema uses passthrough() to allow them.
*/
[key: string]: unknown;
}
/**
* @description Request to download a file through the host.
*
* Sent from the View to the Host when the app wants to trigger a file download.
* Since MCP Apps run in sandboxed iframes where direct downloads are blocked,
* this provides a host-mediated mechanism for file exports.
* The host SHOULD show a confirmation dialog before initiating the download.
*
* @see {@link app!App.downloadFile `App.downloadFile`} for the method that sends this request
*/
export interface McpUiDownloadFileRequest {
method: "ui/download-file";
params: {
/** @description Resource contents to download — embedded (inline data) or linked (host fetches). Uses standard MCP resource types. */
contents: (EmbeddedResource | ResourceLink)[];
};
}
/**
* @description Result from a file download request.
* @see {@link McpUiDownloadFileRequest `McpUiDownloadFileRequest`}
*/
export interface McpUiDownloadFileResult {
/** @description True if the download failed (e.g., user cancelled or host denied). */
isError?: boolean;
/**
* Additional result properties are preserved for protocol extensibility.
* The generated schema uses passthrough() to allow them.
*/
[key: string]: unknown;
}
/**
* @description Request to send a message to the host's chat interface.
* @see {@link app!App.sendMessage `App.sendMessage`} for the method that sends this request
*/
export interface McpUiMessageRequest {
method: "ui/message";
params: {
/** @description Message role, currently only "user" is supported. */
role: "user";
/** @description Message content blocks (text, image, etc.). */
content: ContentBlock[];
};
}
/**
* @description Result from sending a message.
* @see {@link McpUiMessageRequest `McpUiMessageRequest`}
*/
export interface McpUiMessageResult {
/** @description True if the host rejected or failed to deliver the message. */
isError?: boolean;
/**
* Additional result properties are preserved for protocol extensibility.
* The generated schema uses passthrough() to allow them.
*/
[key: string]: unknown;
}
/**
* @description Notification that the sandbox proxy iframe is ready to receive content.
* @internal
* @see https://github.com/modelcontextprotocol/ext-apps/blob/main/specification/2026-01-26/apps.mdx#sandbox-proxy
*/
export interface McpUiSandboxProxyReadyNotification {
method: "ui/notifications/sandbox-proxy-ready";
params: {};
}
/**
* @description Notification containing HTML resource for the sandbox proxy to load.
* @internal
* @see https://github.com/modelcontextprotocol/ext-apps/blob/main/specification/2026-01-26/apps.mdx#sandbox-proxy
*/
export interface McpUiSandboxResourceReadyNotification {
method: "ui/notifications/sandbox-resource-ready";
params: {
/** @description HTML content to load into the inner iframe. */
html: string;
/** @description Optional override for the inner iframe's sandbox attribute. */
sandbox?: string;
/** @description CSP configuration from resource metadata. */
csp?: McpUiResourceCsp;
/** @description Sandbox permissions from resource metadata. */
permissions?: McpUiResourcePermissions;
};
}
/**
* @description Notification of UI size changes (View -> Host).
* @see {@link app!App.sendSizeChanged `App.sendSizeChanged`} for the method to send this from View
*/
export interface McpUiSizeChangedNotification {
method: "ui/notifications/size-changed";
params: {
/** @description New width in pixels. */
width?: number;
/** @description New height in pixels. */
height?: number;
};
}
/**
* @description Notification containing complete tool arguments (Host -> View).
*/
export interface McpUiToolInputNotification {
method: "ui/notifications/tool-input";
params: {
/** @description Complete tool call arguments as key-value pairs. */
arguments?: Record<string, unknown>;
};
}
/**
* @description Notification containing partial/streaming tool arguments (Host -> View).
*/
export interface McpUiToolInputPartialNotification {
method: "ui/notifications/tool-input-partial";
params: {
/** @description Partial tool call arguments (incomplete, may change). */
arguments?: Record<string, unknown>;
};
}
/**
* @description Notification containing tool execution result (Host -> View).
*/
export interface McpUiToolResultNotification {
method: "ui/notifications/tool-result";
/** @description Standard MCP tool execution result. */
params: CallToolResult;
}
/**
* @description Notification that tool execution was cancelled (Host -> View).
* Host MUST send this if tool execution was cancelled for any reason (user action,
* sampling error, classifier intervention, etc.).
*/
export interface McpUiToolCancelledNotification {
method: "ui/notifications/tool-cancelled";
params: {
/** @description Optional reason for the cancellation (e.g., "user action", "timeout"). */
reason?: string;
};
}
/**
* @description CSS blocks that can be injected by apps.
*/
export interface McpUiHostCss {
/** @description CSS for font loading (`@font-face` rules or `@import` statements). Apps must apply using {@link applyHostFonts `applyHostFonts`}. */
fonts?: string;
}
/**
* @description Style configuration for theming MCP apps.
*/
export interface McpUiHostStyles {
/** @description CSS variables for theming the app. */
variables?: McpUiStyles;
/** @description CSS blocks that apps can inject. */
css?: McpUiHostCss;
}
/**
* @description Rich context about the host environment provided to views.
*/
export interface McpUiHostContext {
/** @description Allow additional properties for forward compatibility. */
[key: string]: unknown;
/** @description Metadata of the tool call that instantiated this App. */
toolInfo?: {
/** @description JSON-RPC id of the tools/call request. */
id?: RequestId;
/** @description Tool definition including name, inputSchema, etc. */
tool: Tool;
};
/** @description Current color theme preference. */
theme?: McpUiTheme;
/** @description Style configuration for theming the app. */
styles?: McpUiHostStyles;
/** @description How the UI is currently displayed. */
displayMode?: McpUiDisplayMode;
/** @description Display modes the host supports. */
availableDisplayModes?: McpUiDisplayMode[];
/**
* @description Container dimensions. Represents the dimensions of the iframe or other
* container holding the app. Specify either width or maxWidth, and either height or maxHeight.
*/
containerDimensions?: ({
/** @description Fixed container height in pixels. */
height: number;
} | {
/** @description Maximum container height in pixels. */
maxHeight?: number | undefined;
}) & ({
/** @description Fixed container width in pixels. */
width: number;
} | {
/** @description Maximum container width in pixels. */
maxWidth?: number | undefined;
});
/** @description User's language and region preference in BCP 47 format. */
locale?: string;
/** @description User's timezone in IANA format. */
timeZone?: string;
/** @description Host application identifier. */
userAgent?: string;
/** @description Platform type for responsive design decisions. */
platform?: "web" | "desktop" | "mobile";
/** @description Device input capabilities. */
deviceCapabilities?: {
/** @description Whether the device supports touch input. */
touch?: boolean;
/** @description Whether the device supports hover interactions. */
hover?: boolean;
};
/** @description Mobile safe area boundaries in pixels. */
safeAreaInsets?: {
/** @description Top safe area inset in pixels. */
top: number;
/** @description Right safe area inset in pixels. */
right: number;
/** @description Bottom safe area inset in pixels. */
bottom: number;
/** @description Left safe area inset in pixels. */
left: number;
};
}
/**
* @description Notification that host context has changed (Host -> View).
* @see {@link McpUiHostContext `McpUiHostContext`} for the full context structure
*/
export interface McpUiHostContextChangedNotification {
method: "ui/notifications/host-context-changed";
/** @description Partial context update containing only changed fields. */
params: McpUiHostContext;
}
/**
* @description Request to update the agent's context without requiring a follow-up action (View -> Host).
*
* Unlike `notifications/message` which is for debugging/logging, this request is intended
* to update the Host's model context. Each request overwrites the previous context sent by the View.
* Unlike messages, context updates do not trigger follow-ups.
*
* The host will typically defer sending the context to the model until the next user message
* (including `ui/message`), and will only send the last update received.
*
* @see {@link app.App.updateModelContext `App.updateModelContext`} for the method that sends this request
*/
export interface McpUiUpdateModelContextRequest {
method: "ui/update-model-context";
params: {
/** @description Context content blocks (text, image, etc.). */
content?: ContentBlock[];
/** @description Structured content for machine-readable context data. */
structuredContent?: Record<string, unknown>;
};
}
/**
* @description Request for graceful shutdown of the View (Host -> View).
* @see {@link app-bridge!AppBridge.teardownResource `AppBridge.teardownResource`} for the host method that sends this
*/
export interface McpUiResourceTeardownRequest {
method: "ui/resource-teardown";
params: {};
}
/**
* @description Result from graceful shutdown request.
* @see {@link McpUiResourceTeardownRequest `McpUiResourceTeardownRequest`}
*/
export interface McpUiResourceTeardownResult {
/**
* Additional result properties are preserved for protocol extensibility.
*/
[key: string]: unknown;
}
export interface McpUiSupportedContentBlockModalities {
/** @description Host supports text content blocks. */
text?: {};
/** @description Host supports image content blocks. */
image?: {};
/** @description Host supports audio content blocks. */
audio?: {};
/** @description Host supports resource content blocks. */
resource?: {};
/** @description Host supports resource link content blocks. */
resourceLink?: {};
/** @description Host supports structured content. */
structuredContent?: {};
}
/**
* @description Notification for app-initiated teardown request (View -> Host).
* Views send this to request that the host tear them down. The host decides
* whether to proceed - if approved, the host will send
* `ui/resource-teardown` to allow the view to perform cleanup before being
* unmounted.
* @see {@link app.App.requestTeardown} for the app method that sends this
*/
export interface McpUiRequestTeardownNotification {
method: "ui/notifications/request-teardown";
params?: {};
}
/**
* @description Capabilities supported by the host application.
* @see {@link McpUiInitializeResult `McpUiInitializeResult`} for the initialization result that includes these capabilities
*/
export interface McpUiHostCapabilities {
/** @description Experimental features keyed by identifier. */
experimental?: Record<string, object>;
/** @description Host supports opening external URLs. */
openLinks?: {};
/** @description Host supports file downloads via ui/download-file. */
downloadFile?: {};
/** @description Host can proxy tool calls to the MCP server. */
serverTools?: {
/** @description Host supports tools/list_changed notifications. */
listChanged?: boolean;
};
/** @description Host can proxy resource reads to the MCP server. */
serverResources?: {
/** @description Host supports resources/list_changed notifications. */
listChanged?: boolean;
};
/** @description Host accepts log messages. */
logging?: {};
/** @description Sandbox configuration applied by the host. */
sandbox?: {
/** @description Permissions granted by the host (camera, microphone, geolocation). */
permissions?: McpUiResourcePermissions;
/** @description CSP domains approved by the host. */
csp?: McpUiResourceCsp;
};
/** @description Host accepts context updates (ui/update-model-context) to be included in the model's context for future turns. */
updateModelContext?: McpUiSupportedContentBlockModalities;
/** @description Host supports receiving content messages (ui/message) from the view. */
message?: McpUiSupportedContentBlockModalities;
/**
* @description Host supports LLM sampling (sampling/createMessage) from the view.
* Mirrors the MCP `ClientCapabilities.sampling` shape so hosts can pass it through.
*/
sampling?: {
/** @description Host supports tool use via `tools` and `toolChoice` parameters. */
tools?: {};
};
}
/**
* @description Capabilities provided by the View ({@link app!App `App`}).
* @see {@link McpUiInitializeRequest `McpUiInitializeRequest`} for the initialization request that includes these capabilities
*/
export interface McpUiAppCapabilities {
/** @description Experimental features keyed by identifier. */
experimental?: Record<string, object>;
/** @description App exposes MCP-style tools that the host can call. */
tools?: {
/** @description App supports tools/list_changed notifications. */
listChanged?: boolean;
};
/** @description Display modes the app supports. */
availableDisplayModes?: McpUiDisplayMode[];
}
/**
* @description Initialization request sent from View to Host.
* @see {@link app!App.connect `App.connect`} for the method that sends this request
*/
export interface McpUiInitializeRequest {
method: "ui/initialize";
params: {
/** @description App identification (name and version). */
appInfo: Implementation;
/** @description Features and capabilities this app provides. */
appCapabilities: McpUiAppCapabilities;
/** @description Protocol version this app supports. */
protocolVersion: string;
};
}
/**
* @description Initialization result returned from Host to View.
* @see {@link McpUiInitializeRequest `McpUiInitializeRequest`}
*/
export interface McpUiInitializeResult {
/** @description Negotiated protocol version string (e.g., "2025-11-21"). */
protocolVersion: string;
/** @description Host application identification and version. */
hostInfo: Implementation;
/** @description Features and capabilities provided by the host. */
hostCapabilities: McpUiHostCapabilities;
/** @description Rich context about the host environment. */
hostContext: McpUiHostContext;
/**
* Additional result properties are preserved for protocol extensibility.
* The generated schema uses passthrough() to allow them.
*/
[key: string]: unknown;
}
/**
* @description Notification that View has completed initialization (View -> Host).
* @see {@link app!App.connect `App.connect`} for the method that sends this notification
*/
export interface McpUiInitializedNotification {
method: "ui/notifications/initialized";
params?: {};
}
/**
* @description Content Security Policy configuration for UI resources.
*
* Servers declare which origins their UI requires. Hosts use this to enforce appropriate CSP headers.
*
* > [!IMPORTANT]
* > MCP App HTML runs in a sandboxed iframe with no same-origin server.
* > **All** origins must be declared—including where your bundled JS/CSS is
* > served from (`localhost` in dev, your CDN in production).
*/
export interface McpUiResourceCsp {
/**
* @description Origins for network requests (fetch/XHR/WebSocket).
*
* - Maps to CSP `connect-src` directive
* - Empty or omitted → no network connections (secure default)
*
* @example
* ```ts
* ["https://api.weather.com", "wss://realtime.service.com"]
* ```
*/
connectDomains?: string[];
/**
* @description Origins for static resources (images, scripts, stylesheets, fonts, media).
*
* - Maps to CSP `img-src`, `script-src`, `style-src`, `font-src`, `media-src` directives
* - Wildcard subdomains supported: `https://*.example.com`
* - Empty or omitted → no network resources (secure default)
*
* @example
* ```ts
* ["https://cdn.jsdelivr.net", "https://*.cloudflare.com"]
* ```
*/
resourceDomains?: string[];
/**
* @description Origins for nested iframes.
*
* - Maps to CSP `frame-src` directive
* - Empty or omitted → no nested iframes allowed (`frame-src 'none'`)
*
* @example
* ```ts
* ["https://www.youtube.com", "https://player.vimeo.com"]
* ```
*/
frameDomains?: string[];
/**
* @description Allowed base URIs for the document.
*
* - Maps to CSP `base-uri` directive
* - Empty or omitted → only same origin allowed (`base-uri 'self'`)
*
* @example
* ```ts
* ["https://cdn.example.com"]
* ```
*/
baseUriDomains?: string[];
}
/**
* @description Sandbox permissions requested by the UI resource.
*
* Servers declare which browser capabilities their UI needs.
* Hosts MAY honor these by setting appropriate iframe `allow` attributes.
* Apps SHOULD NOT assume permissions are granted; use JS feature detection as fallback.
*/
export interface McpUiResourcePermissions {
/**
* @description Request camera access.
*
* Maps to Permission Policy `camera` feature.
*/
camera?: {};
/**
* @description Request microphone access.
*
* Maps to Permission Policy `microphone` feature.
*/
microphone?: {};
/**
* @description Request geolocation access.
*
* Maps to Permission Policy `geolocation` feature.
*/
geolocation?: {};
/**
* @description Request clipboard write access.
*
* Maps to Permission Policy `clipboard-write` feature.
*/
clipboardWrite?: {};
}
/**
* @description UI Resource metadata for security and rendering configuration.
*/
export interface McpUiResourceMeta {
/** @description Content Security Policy configuration for UI resources. */
csp?: McpUiResourceCsp;
/** @description Sandbox permissions requested by the UI resource. */
permissions?: McpUiResourcePermissions;
/**
* @description Dedicated origin for view sandbox.
*
* Useful when views need stable, dedicated origins for OAuth callbacks, CORS policies, or API key allowlists.
*
* **Host-dependent:** The format and validation rules for this field are determined by each host. Servers MUST consult host-specific documentation for the expected domain format. Common patterns include:
* - Hash-based subdomains (e.g., `{hash}.claudemcpcontent.com`)
* - URL-derived subdomains (e.g., `www-example-com.oaiusercontent.com`)
*
* If omitted, host uses default sandbox origin (typically per-conversation).
*
* @example
* ```ts
* "a904794854a047f6.claudemcpcontent.com"
* ```
*
* @example
* ```ts
* "www-example-com.oaiusercontent.com"
* ```
*/
domain?: string;
/**
* @description Visual boundary preference - true if view prefers a visible border.
*
* Boolean requesting whether a visible border and background is provided by the host. Specifying an explicit value for this is recommended because hosts' defaults may vary.
*
* - `true`: request visible border + background
* - `false`: request no visible border + background
* - omitted: host decides border
*/
prefersBorder?: boolean;
}
/**
* @description Request to change the display mode of the UI.
* The host will respond with the actual display mode that was set,
* which may differ from the requested mode if not supported.
* @see {@link app!App.requestDisplayMode `App.requestDisplayMode`} for the method that sends this request
*/
export interface McpUiRequestDisplayModeRequest {
method: "ui/request-display-mode";
params: {
/** @description The display mode being requested. */
mode: McpUiDisplayMode;
};
}
/**
* @description Result from requesting a display mode change.
* @see {@link McpUiRequestDisplayModeRequest `McpUiRequestDisplayModeRequest`}
*/
export interface McpUiRequestDisplayModeResult {
/** @description The display mode that was actually set. May differ from requested if not supported. */
mode: McpUiDisplayMode;
/**
* Additional result properties are preserved for protocol extensibility.
* Note: The generated schema uses passthrough() to allow additional properties.
*/
[key: string]: unknown;
}
/**
* @description Tool visibility scope - who can access the tool.
*/
export type McpUiToolVisibility = "model" | "app";
/**
* @description UI-related metadata for tools.
*/
export interface McpUiToolMeta {
/**
* URI of the UI resource to display for this tool, if any.
*
* @example
* ```ts
* "ui://weather/view.html"
* ```
*/
resourceUri?: string;
/**
* @description Who can access this tool. Default: ["model", "app"]
* - "model": Tool visible to and callable by the agent
* - "app": Tool callable by the app from this server only
*/
visibility?: McpUiToolVisibility[];
/**
* `csp` belongs on the UI **resource** (see {@link McpUiResourceMeta}),
* not the tool. Hosts read it from the `resources/read` content item
* (with `resources/list` entry as fallback) and ignore it here.
*/
csp?: never;
/**
* `permissions` belongs on the UI **resource** (see {@link McpUiResourceMeta}),
* not the tool. Hosts ignore it here.
*/
permissions?: never;
}
/**
* Method string constants for MCP Apps protocol messages.
*
* These constants provide a type-safe way to check message methods without
* accessing internal Zod schema properties. External libraries should use
* these constants instead of accessing `schema.shape.method._def.values[0]`.
*
* @example
* ```typescript
* import { SANDBOX_PROXY_READY_METHOD } from '@modelcontextprotocol/ext-apps';
*
* if (event.data.method === SANDBOX_PROXY_READY_METHOD) {
* // Handle sandbox proxy ready notification
* }
* ```
*/
export declare const OPEN_LINK_METHOD: McpUiOpenLinkRequest["method"];
export declare const DOWNLOAD_FILE_METHOD: McpUiDownloadFileRequest["method"];
export declare const MESSAGE_METHOD: McpUiMessageRequest["method"];
export declare const SANDBOX_PROXY_READY_METHOD: McpUiSandboxProxyReadyNotification["method"];
export declare const SANDBOX_RESOURCE_READY_METHOD: McpUiSandboxResourceReadyNotification["method"];
export declare const SIZE_CHANGED_METHOD: McpUiSizeChangedNotification["method"];
export declare const TOOL_INPUT_METHOD: McpUiToolInputNotification["method"];
export declare const TOOL_INPUT_PARTIAL_METHOD: McpUiToolInputPartialNotification["method"];
export declare const TOOL_RESULT_METHOD: McpUiToolResultNotification["method"];
export declare const TOOL_CANCELLED_METHOD: McpUiToolCancelledNotification["method"];
export declare const HOST_CONTEXT_CHANGED_METHOD: McpUiHostContextChangedNotification["method"];
export declare const REQUEST_TEARDOWN_METHOD: McpUiRequestTeardownNotification["method"];
export declare const RESOURCE_TEARDOWN_METHOD: McpUiResourceTeardownRequest["method"];
export declare const INITIALIZE_METHOD: McpUiInitializeRequest["method"];
export declare const INITIALIZED_METHOD: McpUiInitializedNotification["method"];
export declare const REQUEST_DISPLAY_MODE_METHOD: McpUiRequestDisplayModeRequest["method"];
/**
* @description MCP Apps capability settings advertised by clients to servers.
*
* Clients advertise these capabilities via the `extensions` field in their
* capabilities during MCP initialization. Servers can check for MCP Apps
* support using {@link server-helpers!getUiCapability}.
*/
export interface McpUiClientCapabilities {
/**
* @description Array of supported MIME types for UI resources.
* Must include `"text/html;profile=mcp-app"` for MCP Apps support.
*/
mimeTypes?: string[];
}
@@ -0,0 +1,15 @@
import { ReactRef } from './types';
/**
* Assigns a value for a given ref, no matter of the ref format
* @param {RefObject} ref - a callback function or ref object
* @param value - a new value
*
* @see https://github.com/theKashey/use-callback-ref#assignref
* @example
* const refObject = useRef();
* const refFn = (ref) => {....}
*
* assignRef(refObject, "refValue");
* assignRef(refFn, "refValue");
*/
export declare function assignRef<T>(ref: ReactRef<T>, value: T | null): ReactRef<T>;
@@ -0,0 +1 @@
{"version":3,"file":"book-type.js","sources":["../../../src/icons/book-type.ts"],"sourcesContent":["import createLucideIcon from '../createLucideIcon';\n\n/**\n * @component @name BookType\n * @description Lucide SVG icon component, renders SVG Element with children.\n *\n * @preview ![img](data:image/svg+xml;base64,PHN2ZyAgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIgogIHdpZHRoPSIyNCIKICBoZWlnaHQ9IjI0IgogIHZpZXdCb3g9IjAgMCAyNCAyNCIKICBmaWxsPSJub25lIgogIHN0cm9rZT0iIzAwMCIgc3R5bGU9ImJhY2tncm91bmQtY29sb3I6ICNmZmY7IGJvcmRlci1yYWRpdXM6IDJweCIKICBzdHJva2Utd2lkdGg9IjIiCiAgc3Ryb2tlLWxpbmVjYXA9InJvdW5kIgogIHN0cm9rZS1saW5lam9pbj0icm91bmQiCj4KICA8cGF0aCBkPSJNMTAgMTNoNCIgLz4KICA8cGF0aCBkPSJNMTIgNnY3IiAvPgogIDxwYXRoIGQ9Ik0xNiA4VjZIOHYyIiAvPgogIDxwYXRoIGQ9Ik00IDE5LjV2LTE1QTIuNSAyLjUgMCAwIDEgNi41IDJIMTlhMSAxIDAgMCAxIDEgMXYxOGExIDEgMCAwIDEtMSAxSDYuNWExIDEgMCAwIDEgMC01SDIwIiAvPgo8L3N2Zz4K) - https://lucide.dev/icons/book-type\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 BookType = createLucideIcon('BookType', [\n ['path', { d: 'M10 13h4', key: 'ytezjc' }],\n ['path', { d: 'M12 6v7', key: '1f6ttz' }],\n ['path', { d: 'M16 8V6H8v2', key: 'x8j6u4' }],\n [\n 'path',\n {\n d: 'M4 19.5v-15A2.5 2.5 0 0 1 6.5 2H19a1 1 0 0 1 1 1v18a1 1 0 0 1-1 1H6.5a1 1 0 0 1 0-5H20',\n key: 'k3hazp',\n },\n ],\n]);\n\nexport default BookType;\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,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,CAA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0,0 +1,14 @@
import Options from '../../Options'
import { MatchEstimated } from '../../types'
export default (options: Options, match: MatchEstimated) => {
let warning = options.translations.warnings.extendedRepeat
if (match.baseToken.length === 1) {
warning = options.translations.warnings.simpleRepeat
}
return {
warning,
suggestions: [options.translations.suggestions.repeated],
}
}
@@ -0,0 +1,406 @@
/**
* @license React
* scheduler-unstable_mock.production.js
*
* Copyright (c) Meta Platforms, Inc. and affiliates.
*
* This source code is licensed under the MIT license found in the
* LICENSE file in the root directory of this source tree.
*/
"use strict";
function push(heap, node) {
var index = heap.length;
heap.push(node);
a: for (; 0 < index; ) {
var parentIndex = (index - 1) >>> 1,
parent = heap[parentIndex];
if (0 < compare(parent, node))
(heap[parentIndex] = node), (heap[index] = parent), (index = parentIndex);
else break a;
}
}
function peek(heap) {
return 0 === heap.length ? null : heap[0];
}
function pop(heap) {
if (0 === heap.length) return null;
var first = heap[0],
last = heap.pop();
if (last !== first) {
heap[0] = last;
a: for (
var index = 0, length = heap.length, halfLength = length >>> 1;
index < halfLength;
) {
var leftIndex = 2 * (index + 1) - 1,
left = heap[leftIndex],
rightIndex = leftIndex + 1,
right = heap[rightIndex];
if (0 > compare(left, last))
rightIndex < length && 0 > compare(right, left)
? ((heap[index] = right),
(heap[rightIndex] = last),
(index = rightIndex))
: ((heap[index] = left),
(heap[leftIndex] = last),
(index = leftIndex));
else if (rightIndex < length && 0 > compare(right, last))
(heap[index] = right), (heap[rightIndex] = last), (index = rightIndex);
else break a;
}
}
return first;
}
function compare(a, b) {
var diff = a.sortIndex - b.sortIndex;
return 0 !== diff ? diff : a.id - b.id;
}
var taskQueue = [],
timerQueue = [],
taskIdCounter = 1,
currentTask = null,
currentPriorityLevel = 3,
isPerformingWork = !1,
isHostCallbackScheduled = !1,
isHostTimeoutScheduled = !1,
currentMockTime = 0,
scheduledCallback = null,
scheduledTimeout = null,
timeoutTime = -1,
yieldedValues = null,
expectedNumberOfYields = -1,
didStop = !1,
isFlushing = !1,
needsPaint = !1,
shouldYieldForPaint = !1,
disableYieldValue = !1;
function advanceTimers(currentTime) {
for (var timer = peek(timerQueue); null !== timer; ) {
if (null === timer.callback) pop(timerQueue);
else if (timer.startTime <= currentTime)
pop(timerQueue),
(timer.sortIndex = timer.expirationTime),
push(taskQueue, timer);
else break;
timer = peek(timerQueue);
}
}
function handleTimeout(currentTime) {
isHostTimeoutScheduled = !1;
advanceTimers(currentTime);
if (!isHostCallbackScheduled)
if (null !== peek(taskQueue))
(isHostCallbackScheduled = !0), (scheduledCallback = flushWork);
else {
var firstTimer = peek(timerQueue);
null !== firstTimer &&
((currentTime = firstTimer.startTime - currentTime),
(scheduledTimeout = handleTimeout),
(timeoutTime = currentMockTime + currentTime));
}
}
function flushWork(hasTimeRemaining, initialTime) {
isHostCallbackScheduled = !1;
isHostTimeoutScheduled &&
((isHostTimeoutScheduled = !1),
(scheduledTimeout = null),
(timeoutTime = -1));
isPerformingWork = !0;
var previousPriorityLevel = currentPriorityLevel;
try {
a: {
advanceTimers(initialTime);
for (
currentTask = peek(taskQueue);
null !== currentTask &&
(!(currentTask.expirationTime > initialTime) ||
(hasTimeRemaining && !shouldYieldToHost()));
) {
var callback = currentTask.callback;
if ("function" === typeof callback) {
currentTask.callback = null;
currentPriorityLevel = currentTask.priorityLevel;
var continuationCallback = callback(
currentTask.expirationTime <= initialTime
);
initialTime = currentMockTime;
if ("function" === typeof continuationCallback) {
if (
((currentTask.callback = continuationCallback),
advanceTimers(initialTime),
shouldYieldForPaint)
) {
var JSCompiler_inline_result = (needsPaint = !0);
break a;
}
} else
currentTask === peek(taskQueue) && pop(taskQueue),
advanceTimers(initialTime);
} else pop(taskQueue);
currentTask = peek(taskQueue);
}
if (null !== currentTask) JSCompiler_inline_result = !0;
else {
var firstTimer = peek(timerQueue);
if (null !== firstTimer) {
var ms = firstTimer.startTime - initialTime;
scheduledTimeout = handleTimeout;
timeoutTime = currentMockTime + ms;
}
JSCompiler_inline_result = !1;
}
}
return JSCompiler_inline_result;
} finally {
(currentTask = null),
(currentPriorityLevel = previousPriorityLevel),
(isPerformingWork = !1);
}
}
function shouldYieldToHost() {
return (0 === expectedNumberOfYields && null === yieldedValues) ||
(-1 !== expectedNumberOfYields &&
null !== yieldedValues &&
yieldedValues.length >= expectedNumberOfYields) ||
(shouldYieldForPaint && needsPaint)
? (didStop = !0)
: !1;
}
function unstable_flushAllWithoutAsserting() {
if (isFlushing) throw Error("Already flushing work.");
if (null !== scheduledCallback) {
var cb = scheduledCallback;
isFlushing = !0;
try {
var hasMoreWork = !0;
do hasMoreWork = cb(!0, currentMockTime);
while (hasMoreWork);
hasMoreWork || (scheduledCallback = null);
return !0;
} finally {
isFlushing = !1;
}
} else return !1;
}
exports.log = function (value) {
"disabledLog" === console.log.name ||
disableYieldValue ||
(null === yieldedValues
? (yieldedValues = [value])
: yieldedValues.push(value));
};
exports.reset = function () {
if (isFlushing) throw Error("Cannot reset while already flushing work.");
currentMockTime = 0;
scheduledTimeout = scheduledCallback = null;
timeoutTime = -1;
yieldedValues = null;
expectedNumberOfYields = -1;
needsPaint = isFlushing = didStop = !1;
};
exports.unstable_IdlePriority = 5;
exports.unstable_ImmediatePriority = 1;
exports.unstable_LowPriority = 4;
exports.unstable_NormalPriority = 3;
exports.unstable_Profiling = null;
exports.unstable_UserBlockingPriority = 2;
exports.unstable_advanceTime = function (ms) {
"disabledLog" === console.log.name ||
disableYieldValue ||
((currentMockTime += ms),
null !== scheduledTimeout &&
timeoutTime <= currentMockTime &&
(scheduledTimeout(currentMockTime),
(timeoutTime = -1),
(scheduledTimeout = null)));
};
exports.unstable_cancelCallback = function (task) {
task.callback = null;
};
exports.unstable_clearLog = function () {
if (null === yieldedValues) return [];
var values = yieldedValues;
yieldedValues = null;
return values;
};
exports.unstable_flushAll = function () {
if (null !== yieldedValues)
throw Error(
"Log is not empty. Assert on the log of yielded values before flushing additional work."
);
unstable_flushAllWithoutAsserting();
if (null !== yieldedValues)
throw Error(
"While flushing work, something yielded a value. Use an assertion helper to assert on the log of yielded values, e.g. expect(Scheduler).toFlushAndYield([...])"
);
};
exports.unstable_flushAllWithoutAsserting = unstable_flushAllWithoutAsserting;
exports.unstable_flushExpired = function () {
if (isFlushing) throw Error("Already flushing work.");
if (null !== scheduledCallback) {
isFlushing = !0;
try {
scheduledCallback(!1, currentMockTime) || (scheduledCallback = null);
} finally {
isFlushing = !1;
}
}
};
exports.unstable_flushNumberOfYields = function (count) {
if (isFlushing) throw Error("Already flushing work.");
if (null !== scheduledCallback) {
var cb = scheduledCallback;
expectedNumberOfYields = count;
isFlushing = !0;
try {
count = !0;
do count = cb(!0, currentMockTime);
while (count && !didStop);
count || (scheduledCallback = null);
} finally {
(expectedNumberOfYields = -1), (isFlushing = didStop = !1);
}
}
};
exports.unstable_flushUntilNextPaint = function () {
if (isFlushing) throw Error("Already flushing work.");
if (null !== scheduledCallback) {
var cb = scheduledCallback;
shouldYieldForPaint = !0;
needsPaint = !1;
isFlushing = !0;
try {
var hasMoreWork = !0;
do hasMoreWork = cb(!0, currentMockTime);
while (hasMoreWork && !didStop);
hasMoreWork || (scheduledCallback = null);
} finally {
isFlushing = didStop = shouldYieldForPaint = !1;
}
}
return !1;
};
exports.unstable_forceFrameRate = function () {};
exports.unstable_getCurrentPriorityLevel = function () {
return currentPriorityLevel;
};
exports.unstable_hasPendingWork = function () {
return null !== scheduledCallback;
};
exports.unstable_next = function (eventHandler) {
switch (currentPriorityLevel) {
case 1:
case 2:
case 3:
var priorityLevel = 3;
break;
default:
priorityLevel = currentPriorityLevel;
}
var previousPriorityLevel = currentPriorityLevel;
currentPriorityLevel = priorityLevel;
try {
return eventHandler();
} finally {
currentPriorityLevel = previousPriorityLevel;
}
};
exports.unstable_now = function () {
return currentMockTime;
};
exports.unstable_requestPaint = function () {
needsPaint = !0;
};
exports.unstable_runWithPriority = function (priorityLevel, eventHandler) {
switch (priorityLevel) {
case 1:
case 2:
case 3:
case 4:
case 5:
break;
default:
priorityLevel = 3;
}
var previousPriorityLevel = currentPriorityLevel;
currentPriorityLevel = priorityLevel;
try {
return eventHandler();
} finally {
currentPriorityLevel = previousPriorityLevel;
}
};
exports.unstable_scheduleCallback = function (
priorityLevel,
callback,
options
) {
var currentTime = currentMockTime;
"object" === typeof options && null !== options
? ((options = options.delay),
(options =
"number" === typeof options && 0 < options
? currentTime + options
: currentTime))
: (options = currentTime);
switch (priorityLevel) {
case 1:
var timeout = -1;
break;
case 2:
timeout = 250;
break;
case 5:
timeout = 1073741823;
break;
case 4:
timeout = 1e4;
break;
default:
timeout = 5e3;
}
timeout = options + timeout;
priorityLevel = {
id: taskIdCounter++,
callback: callback,
priorityLevel: priorityLevel,
startTime: options,
expirationTime: timeout,
sortIndex: -1
};
options > currentTime
? ((priorityLevel.sortIndex = options),
push(timerQueue, priorityLevel),
null === peek(taskQueue) &&
priorityLevel === peek(timerQueue) &&
(isHostTimeoutScheduled
? ((scheduledTimeout = null), (timeoutTime = -1))
: (isHostTimeoutScheduled = !0),
(scheduledTimeout = handleTimeout),
(timeoutTime = currentMockTime + (options - currentTime))))
: ((priorityLevel.sortIndex = timeout),
push(taskQueue, priorityLevel),
isHostCallbackScheduled ||
isPerformingWork ||
((isHostCallbackScheduled = !0), (scheduledCallback = flushWork)));
return priorityLevel;
};
exports.unstable_setDisableYieldValue = function (newValue) {
disableYieldValue = newValue;
};
exports.unstable_shouldYield = shouldYieldToHost;
exports.unstable_wrapCallback = function (callback) {
var parentPriorityLevel = currentPriorityLevel;
return function () {
var previousPriorityLevel = currentPriorityLevel;
currentPriorityLevel = parentPriorityLevel;
try {
return callback.apply(this, arguments);
} finally {
currentPriorityLevel = previousPriorityLevel;
}
};
};
@@ -0,0 +1,54 @@
{
"name": "domelementtype",
"version": "2.3.0",
"description": "all the types of nodes in htmlparser2's dom",
"author": "Felix Boehm <me@feedic.com>",
"license": "BSD-2-Clause",
"funding": [
{
"type": "github",
"url": "https://github.com/sponsors/fb55"
}
],
"sideEffects": false,
"main": "lib/index.js",
"types": "lib/index.d.ts",
"module": "lib/esm/index.js",
"exports": {
"require": "./lib/index.js",
"import": "./lib/esm/index.js"
},
"files": [
"lib/**/*"
],
"repository": {
"type": "git",
"url": "git://github.com/fb55/domelementtype.git"
},
"keywords": [
"dom",
"element",
"types",
"htmlparser2"
],
"scripts": {
"test": "npm run lint && prettier --check **/*.{ts,json,md}",
"lint": "eslint src",
"format": "prettier --write **/*.{ts,json,md}",
"build": "npm run build:cjs && npm run build:esm",
"build:cjs": "tsc",
"build:esm": "tsc --module esnext --target es2019 --outDir lib/esm && echo '{\"type\":\"module\"}' > lib/esm/package.json",
"prepare": "npm run build"
},
"prettier": {
"tabWidth": 4
},
"devDependencies": {
"@typescript-eslint/eslint-plugin": "^5.18.0",
"@typescript-eslint/parser": "^5.18.0",
"eslint": "^8.12.0",
"eslint-config-prettier": "^8.5.0",
"prettier": "^2.6.2",
"typescript": "^4.6.3"
}
}
@@ -0,0 +1,65 @@
import { noop } from 'motion-utils';
import { addToQueue } from './queue.mjs';
class ViewTransitionBuilder {
constructor(update, options = {}) {
this.currentSubject = "root";
this.targets = new Map();
this.notifyReady = noop;
this.readyPromise = new Promise((resolve) => {
this.notifyReady = resolve;
});
this.update = update;
this.options = {
interrupt: "wait",
...options,
};
addToQueue(this);
}
get(subject) {
this.currentSubject = subject;
return this;
}
layout(keyframes, options) {
this.updateTarget("layout", keyframes, options);
return this;
}
new(keyframes, options) {
this.updateTarget("new", keyframes, options);
return this;
}
old(keyframes, options) {
this.updateTarget("old", keyframes, options);
return this;
}
enter(keyframes, options) {
this.updateTarget("enter", keyframes, options);
return this;
}
exit(keyframes, options) {
this.updateTarget("exit", keyframes, options);
return this;
}
crossfade(options) {
this.updateTarget("enter", { opacity: 1 }, options);
this.updateTarget("exit", { opacity: 0 }, options);
return this;
}
updateTarget(target, keyframes, options = {}) {
const { currentSubject, targets } = this;
if (!targets.has(currentSubject)) {
targets.set(currentSubject, {});
}
const targetData = targets.get(currentSubject);
targetData[target] = { keyframes, options };
}
then(resolve, reject) {
return this.readyPromise.then(resolve, reject);
}
}
function animateView(update, defaultOptions = {}) {
return new ViewTransitionBuilder(update, defaultOptions);
}
export { ViewTransitionBuilder, animateView };
//# sourceMappingURL=index.mjs.map
@@ -0,0 +1,71 @@
"use strict";
var __create = Object.create;
var __defProp = Object.defineProperty;
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
var __getOwnPropNames = Object.getOwnPropertyNames;
var __getProtoOf = Object.getPrototypeOf;
var __hasOwnProp = Object.prototype.hasOwnProperty;
var __export = (target, all) => {
for (var name in all)
__defProp(target, name, { get: all[name], enumerable: true });
};
var __copyProps = (to, from, except, desc) => {
if (from && typeof from === "object" || typeof from === "function") {
for (let key of __getOwnPropNames(from))
if (!__hasOwnProp.call(to, key) && key !== except)
__defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
}
return to;
};
var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__getProtoOf(mod)) : {}, __copyProps(
// If the importer is in node compatibility mode or this is not an ESM
// file that has been converted to a CommonJS file using a Babel-
// compatible transform (i.e. "__esModule" has not been set), then set
// "default" to the CommonJS "module.exports" for node compatibility.
isNodeMode || !mod || !mod.__esModule ? __defProp(target, "default", { value: mod, enumerable: true }) : target,
mod
));
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
// src/index.ts
var index_exports = {};
__export(index_exports, {
Root: () => Root,
VISUALLY_HIDDEN_STYLES: () => VISUALLY_HIDDEN_STYLES,
VisuallyHidden: () => VisuallyHidden
});
module.exports = __toCommonJS(index_exports);
// src/visually-hidden.tsx
var React = __toESM(require("react"));
var import_react_primitive = require("@radix-ui/react-primitive");
var import_jsx_runtime = require("react/jsx-runtime");
var VISUALLY_HIDDEN_STYLES = Object.freeze({
// See: https://github.com/twbs/bootstrap/blob/main/scss/mixins/_visually-hidden.scss
position: "absolute",
border: 0,
width: 1,
height: 1,
padding: 0,
margin: -1,
overflow: "hidden",
clip: "rect(0, 0, 0, 0)",
whiteSpace: "nowrap",
wordWrap: "normal"
});
var NAME = "VisuallyHidden";
var VisuallyHidden = React.forwardRef(
(props, forwardedRef) => {
return /* @__PURE__ */ (0, import_jsx_runtime.jsx)(
import_react_primitive.Primitive.span,
{
...props,
ref: forwardedRef,
style: { ...VISUALLY_HIDDEN_STYLES, ...props.style }
}
);
}
);
VisuallyHidden.displayName = NAME;
var Root = VisuallyHidden;
//# sourceMappingURL=index.js.map
@@ -0,0 +1,66 @@
# thenify-all
[![NPM version][npm-image]][npm-url]
[![Build status][travis-image]][travis-url]
[![Test coverage][coveralls-image]][coveralls-url]
[![Dependency Status][david-image]][david-url]
[![License][license-image]][license-url]
[![Downloads][downloads-image]][downloads-url]
[![Gittip][gittip-image]][gittip-url]
Promisifies all the selected functions in an object.
```js
var thenifyAll = require('thenify-all');
var fs = thenifyAll(require('fs'), {}, [
'readFile',
'writeFile',
]);
fs.readFile(__filename).then(function (buffer) {
console.log(buffer.toString());
});
```
## API
### var obj = thenifyAll(source, [obj], [methods])
Promisifies all the selected functions in an object.
- `source` - the source object for the async functions
- `obj` - the destination to set all the promisified methods
- `methods` - an array of method names of `source`
### var obj = thenifyAll.withCallback(source, [obj], [methods])
Promisifies all the selected functions in an object and backward compatible with callback.
- `source` - the source object for the async functions
- `obj` - the destination to set all the promisified methods
- `methods` - an array of method names of `source`
### thenifyAll.thenify
Exports [thenify](https://github.com/thenables/thenify) this package uses.
[gitter-image]: https://badges.gitter.im/thenables/thenify-all.png
[gitter-url]: https://gitter.im/thenables/thenify-all
[npm-image]: https://img.shields.io/npm/v/thenify-all.svg?style=flat-square
[npm-url]: https://npmjs.org/package/thenify-all
[github-tag]: http://img.shields.io/github/tag/thenables/thenify-all.svg?style=flat-square
[github-url]: https://github.com/thenables/thenify-all/tags
[travis-image]: https://img.shields.io/travis/thenables/thenify-all.svg?style=flat-square
[travis-url]: https://travis-ci.org/thenables/thenify-all
[coveralls-image]: https://img.shields.io/coveralls/thenables/thenify-all.svg?style=flat-square
[coveralls-url]: https://coveralls.io/r/thenables/thenify-all
[david-image]: http://img.shields.io/david/thenables/thenify-all.svg?style=flat-square
[david-url]: https://david-dm.org/thenables/thenify-all
[license-image]: http://img.shields.io/npm/l/thenify-all.svg?style=flat-square
[license-url]: LICENSE
[downloads-image]: http://img.shields.io/npm/dm/thenify-all.svg?style=flat-square
[downloads-url]: https://npmjs.org/package/thenify-all
[gittip-image]: https://img.shields.io/gratipay/jonathanong.svg?style=flat-square
[gittip-url]: https://gratipay.com/jonathanong/
@@ -0,0 +1 @@
{"version":3,"file":"stdio.mjs","names":["env: Record<string, string>"],"sources":["../src/client/stdio.ts"],"sourcesContent":["import type { ChildProcess, IOType } from 'node:child_process';\nimport process from 'node:process';\nimport type { Stream } from 'node:stream';\nimport { PassThrough } from 'node:stream';\n\nimport type { JSONRPCMessage, Transport } from '@modelcontextprotocol/core-internal';\nimport { ReadBuffer, SdkError, SdkErrorCode, serializeMessage } from '@modelcontextprotocol/core-internal';\nimport spawn from 'cross-spawn';\n\nexport type StdioServerParameters = {\n /**\n * The executable to run to start the server.\n */\n command: string;\n\n /**\n * Command line arguments to pass to the executable.\n */\n args?: string[];\n\n /**\n * The environment to use when spawning the process.\n *\n * If not specified, the result of {@linkcode getDefaultEnvironment} will be used.\n */\n env?: Record<string, string>;\n\n /**\n * How to handle stderr of the child process. This matches the semantics of Node's `child_process.spawn`.\n *\n * The default is `\"inherit\"`, meaning messages to stderr will be printed to the parent process's stderr.\n */\n stderr?: IOType | Stream | number;\n\n /**\n * The working directory to use when spawning the process.\n *\n * If not specified, the current working directory will be inherited.\n */\n cwd?: string;\n\n /**\n * Maximum size of the read buffer in bytes. If a single message exceeds\n * this size the transport will emit an error and close.\n *\n * Defaults to 10 MB.\n */\n maxBufferSize?: number;\n};\n\n/**\n * Environment variables to inherit by default, if an environment is not explicitly given.\n */\nexport const DEFAULT_INHERITED_ENV_VARS =\n process.platform === 'win32'\n ? [\n 'APPDATA',\n 'COMSPEC',\n 'HOMEDRIVE',\n 'HOMEPATH',\n 'LOCALAPPDATA',\n 'PATH',\n 'PATHEXT',\n 'PROCESSOR_ARCHITECTURE',\n 'PROGRAMDATA',\n 'PROGRAMFILES',\n 'PROGRAMFILES(X86)',\n 'PROGRAMW6432',\n 'SYSTEMDRIVE',\n 'SYSTEMROOT',\n 'TEMP',\n 'USERNAME',\n 'USERPROFILE',\n 'WINDIR'\n ]\n : /* list inspired by the default env inheritance of sudo */\n ['HOME', 'LOGNAME', 'PATH', 'SHELL', 'TERM', 'USER'];\n\n/**\n * Returns a default environment object including only environment variables deemed safe to inherit.\n */\nexport function getDefaultEnvironment(): Record<string, string> {\n const env: Record<string, string> = {};\n\n for (const key of DEFAULT_INHERITED_ENV_VARS) {\n const value = process.env[key];\n if (value === undefined) {\n continue;\n }\n\n if (value.startsWith('()')) {\n // Skip functions, which are a security risk.\n continue;\n }\n\n env[key] = value;\n }\n\n return env;\n}\n\n/**\n * Client transport for stdio: this will connect to a server by spawning a process and communicating with it over stdin/stdout.\n *\n * This transport is only available in Node.js environments.\n */\nexport class StdioClientTransport implements Transport {\n private _process?: ChildProcess;\n private _readBuffer: ReadBuffer;\n private _serverParams: StdioServerParameters;\n private _stderrStream: PassThrough | null = null;\n\n onclose?: () => void;\n onerror?: (error: Error) => void;\n onmessage?: (message: JSONRPCMessage) => void;\n\n constructor(server: StdioServerParameters) {\n this._serverParams = server;\n this._readBuffer = new ReadBuffer({ maxBufferSize: server.maxBufferSize });\n if (server.stderr === 'pipe' || server.stderr === 'overlapped') {\n this._stderrStream = new PassThrough();\n }\n }\n\n /**\n * Starts the server process and prepares to communicate with it.\n */\n async start(): Promise<void> {\n if (this._process) {\n throw new Error(\n 'StdioClientTransport already started! If using Client class, note that connect() calls start() automatically.'\n );\n }\n\n return new Promise((resolve, reject) => {\n this._process = spawn(this._serverParams.command, this._serverParams.args ?? [], {\n // merge default env with server env because mcp server needs some env vars\n env: {\n ...getDefaultEnvironment(),\n ...this._serverParams.env\n },\n stdio: ['pipe', 'pipe', this._serverParams.stderr ?? 'inherit'],\n shell: false,\n windowsHide: process.platform === 'win32',\n cwd: this._serverParams.cwd\n });\n\n Line truncated
@@ -0,0 +1 @@
{"version":3,"file":"index.js","sources":["src/get-innermost-scope.mjs","src/find-variable.mjs","src/token-predicate.mjs","src/get-function-head-location.mjs","src/get-static-value.mjs","src/get-string-if-constant.mjs","src/get-property-name.mjs","src/get-function-name-with-kind.mjs","src/has-side-effect.mjs","src/is-parenthesized.mjs","src/pattern-matcher.mjs","src/reference-tracker.mjs","src/index.mjs"],"sourcesContent":["/** @typedef {import(\"eslint\").Scope.Scope} Scope */\n/** @typedef {import(\"estree\").Node} Node */\n\n/**\n * Get the innermost scope which contains a given location.\n * @param {Scope} initialScope The initial scope to search.\n * @param {Node} node The location to search.\n * @returns {Scope} The innermost scope.\n */\nexport function getInnermostScope(initialScope, node) {\n const location = /** @type {[number, number]} */ (node.range)[0]\n\n let scope = initialScope\n let found = false\n do {\n found = false\n for (const childScope of scope.childScopes) {\n const range = /** @type {[number, number]} */ (\n childScope.block.range\n )\n\n if (range[0] <= location && location < range[1]) {\n scope = childScope\n found = true\n break\n }\n }\n } while (found)\n\n return scope\n}\n","import { getInnermostScope } from \"./get-innermost-scope.mjs\"\n/** @typedef {import(\"eslint\").Scope.Scope} Scope */\n/** @typedef {import(\"eslint\").Scope.Variable} Variable */\n/** @typedef {import(\"estree\").Identifier} Identifier */\n\n/**\n * Find the variable of a given name.\n * @param {Scope} initialScope The scope to start finding.\n * @param {string|Identifier} nameOrNode The variable name to find. If this is a Node object then it should be an Identifier node.\n * @returns {Variable|null} The found variable or null.\n */\nexport function findVariable(initialScope, nameOrNode) {\n let name = \"\"\n /** @type {Scope|null} */\n let scope = initialScope\n\n if (typeof nameOrNode === \"string\") {\n name = nameOrNode\n } else {\n name = nameOrNode.name\n scope = getInnermostScope(scope, nameOrNode)\n }\n\n while (scope != null) {\n const variable = scope.set.get(name)\n if (variable != null) {\n return variable\n }\n scope = scope.upper\n }\n\n return null\n}\n","/** @typedef {import(\"eslint\").AST.Token} Token */\n/** @typedef {import(\"estree\").Comment} Comment */\n/** @typedef {import(\"./types.mjs\").ArrowToken} ArrowToken */\n/** @typedef {import(\"./types.mjs\").CommaToken} CommaToken */\n/** @typedef {import(\"./types.mjs\").SemicolonToken} SemicolonToken */\n/** @typedef {import(\"./types.mjs\").ColonToken} ColonToken */\n/** @typedef {import(\"./types.mjs\").OpeningParenToken} OpeningParenToken */\n/** @typedef {import(\"./types.mjs\").ClosingParenToken} ClosingParenToken */\n/** @typedef {import(\"./types.mjs\").OpeningBracketToken} OpeningBracketToken */\n/** @typedef {import(\"./types.mjs\").ClosingBracketToken} ClosingBracketToken */\n/** @typedef {import(\"./types.mjs\").OpeningBraceToken} OpeningBraceToken */\n/** @typedef {import(\"./types.mjs\").ClosingBraceToken} ClosingBraceToken */\n/**\n * @template {string} Value\n * @typedef {import(\"./types.mjs\").PunctuatorToken<Value>} PunctuatorToken\n */\n\n/** @typedef {Comment | Token} CommentOrToken */\n\n/**\n * Creates the negate function of the given function.\n * @param {function(CommentOrToken):boolean} f - The function to negate.\n * @returns {function(CommentOrToken):boolean} Negated function.\n */\nfunction negate(f) {\n return (token) => !f(token)\n}\n\n/**\n * Checks if the given token is a PunctuatorToken with the given value\n * @template {string} Value\n * @param {CommentOrToken} token - The token to check.\n * @param {Value} value - The value to check.\n * @returns {token is PunctuatorToken<Value>} `true` if the token is a PunctuatorToken with the given value.\n */\nfunction isPunctuatorTokenWithValue(token, value) {\n return token.type === \"Punctuator\" && token.value === value\n}\n\n/**\n * Checks if the given token is an arrow token or not.\n * @param {CommentOrToken} token - The token to check.\n * @returns {token is ArrowToken} `true` if the token is an arrow token.\n */\nexport function isArrowToken(token) {\n return isPunctuatorTokenWithValue(token, \"=>\")\n}\n\n/**\n * Checks if the given token is a comma token or not.\n * @param {CommentOrToken} token - The token to check.\n * @returns {token is CommaToken} `true` if the token is a comma token.\n */\nexport function isCommaToken(token) {\n return isPunctuatorTokenWithValue(token, \",\")\n}\n\n/**\n * Checks if the given token is a semicolon token or not.\n * @param {CommentOrToken} token - The token to check.\n * @returns {token is SemicolonToken} `true` if the token is a semicolon token.\n */\nexport function isSemLine truncated
@@ -0,0 +1,582 @@
"use strict";
Object.defineProperty(exports, "__esModule", {
value: true
});
var _exportNames = {
react: true,
assertNode: true,
createTypeAnnotationBasedOnTypeof: true,
createUnionTypeAnnotation: true,
createFlowUnionType: true,
createTSUnionType: true,
cloneNode: true,
clone: true,
cloneDeep: true,
cloneDeepWithoutLoc: true,
cloneWithoutLoc: true,
addComment: true,
addComments: true,
inheritInnerComments: true,
inheritLeadingComments: true,
inheritsComments: true,
inheritTrailingComments: true,
removeComments: true,
ensureBlock: true,
toBindingIdentifierName: true,
toBlock: true,
toComputedKey: true,
toExpression: true,
toIdentifier: true,
toKeyAlias: true,
toStatement: true,
valueToNode: true,
appendToMemberExpression: true,
inherits: true,
prependToMemberExpression: true,
removeProperties: true,
removePropertiesDeep: true,
removeTypeDuplicates: true,
getAssignmentIdentifiers: true,
getBindingIdentifiers: true,
getOuterBindingIdentifiers: true,
getFunctionName: true,
traverse: true,
traverseFast: true,
shallowEqual: true,
is: true,
isBinding: true,
isBlockScoped: true,
isImmutable: true,
isLet: true,
isNode: true,
isNodesEquivalent: true,
isPlaceholderType: true,
isReferenced: true,
isScope: true,
isSpecifierDefault: true,
isType: true,
isValidES3Identifier: true,
isValidIdentifier: true,
isVar: true,
matchesPattern: true,
validate: true,
buildMatchMemberExpression: true,
__internal__deprecationWarning: true
};
Object.defineProperty(exports, "__internal__deprecationWarning", {
enumerable: true,
get: function () {
return _deprecationWarning.default;
}
});
Object.defineProperty(exports, "addComment", {
enumerable: true,
get: function () {
return _addComment.default;
}
});
Object.defineProperty(exports, "addComments", {
enumerable: true,
get: function () {
return _addComments.default;
}
});
Object.defineProperty(exports, "appendToMemberExpression", {
enumerable: true,
get: function () {
return _appendToMemberExpression.default;
}
});
Object.defineProperty(exports, "assertNode", {
enumerable: true,
get: function () {
return _assertNode.default;
}
});
Object.defineProperty(exports, "buildMatchMemberExpression", {
enumerable: true,
get: function () {
return _buildMatchMemberExpression.default;
}
});
Object.defineProperty(exports, "clone", {
enumerable: true,
get: function () {
return _clone.default;
}
});
Object.defineProperty(exports, "cloneDeep", {
enumerable: true,
get: function () {
return _cloneDeep.default;
}
});
Object.defineProperty(exports, "cloneDeepWithoutLoc", {
enumerable: true,
get: function () {
return _cloneDeepWithoutLoc.default;
}
});
Object.defineProperty(exports, "cloneNode", {
enumerable: true,
get: function () {
return _cloneNode.default;
}
});
Object.defineProperty(exports, "cloneWithoutLoc", {
enumerable: true,
get: function () {
return _cloneWithoutLoc.default;
}
});
Object.defineProperty(exports, "createFlowUnionType", {
enumerable: true,
get: function () {
return _createFlowUnionType.default;
}
});
Object.defineProperty(exports, "createTSUnionType", {
enumerable: true,
get: function () {
return _createTSUnionType.default;
}
});
Object.defineProperty(exports, "createTypeAnnotationBasedOnTypeof", {
enumerable: true,
get: function () {
return _createTypeAnnotationBasedOnTypeof.default;
}
});
Object.defineProperty(exports, "createUnionTypeAnnotation", {
enumerable: true,
get: function () {
return _createFlowUnionType.default;
}
});
Object.defineProperty(exports, "ensureBlock", {
enumerable: true,
get: function () {
return _ensureBlock.default;
}
});
Object.defineProperty(exports, "getAssignmentIdentifiers", {
enumerable: true,
get: function () {
return _getAssignmentIdentifiers.default;
}
});
Object.defineProperty(exports, "getBindingIdentifiers", {
enumerable: true,
get: function () {
return _getBindingIdentifiers.default;
}
});
Object.defineProperty(exports, "getFunctionName", {
enumerable: true,
get: function () {
return _getFunctionName.default;
}
});
Object.defineProperty(exports, "getOuterBindingIdentifiers", {
enumerable: true,
get: function () {
return _getOuterBindingIdentifiers.default;
}
});
Object.defineProperty(exports, "inheritInnerComments", {
enumerable: true,
get: function () {
return _inheritInnerComments.default;
}
});
Object.defineProperty(exports, "inheritLeadingComments", {
enumerable: true,
get: function () {
return _inheritLeadingComments.default;
}
});
Object.defineProperty(exports, "inheritTrailingComments", {
enumerable: true,
get: function () {
return _inheritTrailingComments.default;
}
});
Object.defineProperty(exports, "inherits", {
enumerable: true,
get: function () {
return _inherits.default;
}
});
Object.defineProperty(exports, "inheritsComments", {
enumerable: true,
get: function () {
return _inheritsComments.default;
}
});
Object.defineProperty(exports, "is", {
enumerable: true,
get: function () {
return _is.default;
}
});
Object.defineProperty(exports, "isBinding", {
enumerable: true,
get: function () {
return _isBinding.default;
}
});
Object.defineProperty(exports, "isBlockScoped", {
enumerable: true,
get: function () {
return _isBlockScoped.default;
}
});
Object.defineProperty(exports, "isImmutable", {
enumerable: true,
get: function () {
return _isImmutable.default;
}
});
Object.defineProperty(exports, "isLet", {
enumerable: true,
get: function () {
return _isLet.default;
}
});
Object.defineProperty(exports, "isNode", {
enumerable: true,
get: function () {
return _isNode.default;
}
});
Object.defineProperty(exports, "isNodesEquivalent", {
enumerable: true,
get: function () {
return _isNodesEquivalent.default;
}
});
Object.defineProperty(exports, "isPlaceholderType", {
enumerable: true,
get: function () {
return _isPlaceholderType.default;
}
});
Object.defineProperty(exports, "isReferenced", {
enumerable: true,
get: function () {
return _isReferenced.default;
}
});
Object.defineProperty(exports, "isScope", {
enumerable: true,
get: function () {
return _isScope.default;
}
});
Object.defineProperty(exports, "isSpecifierDefault", {
enumerable: true,
get: function () {
return _isSpecifierDefault.default;
}
});
Object.defineProperty(exports, "isType", {
enumerable: true,
get: function () {
return _isType.default;
}
});
Object.defineProperty(exports, "isValidES3Identifier", {
enumerable: true,
get: function () {
return _isValidES3Identifier.default;
}
});
Object.defineProperty(exports, "isValidIdentifier", {
enumerable: true,
get: function () {
return _isValidIdentifier.default;
}
});
Object.defineProperty(exports, "isVar", {
enumerable: true,
get: function () {
return _isVar.default;
}
});
Object.defineProperty(exports, "matchesPattern", {
enumerable: true,
get: function () {
return _matchesPattern.default;
}
});
Object.defineProperty(exports, "prependToMemberExpression", {
enumerable: true,
get: function () {
return _prependToMemberExpression.default;
}
});
exports.react = void 0;
Object.defineProperty(exports, "removeComments", {
enumerable: true,
get: function () {
return _removeComments.default;
}
});
Object.defineProperty(exports, "removeProperties", {
enumerable: true,
get: function () {
return _removeProperties.default;
}
});
Object.defineProperty(exports, "removePropertiesDeep", {
enumerable: true,
get: function () {
return _removePropertiesDeep.default;
}
});
Object.defineProperty(exports, "removeTypeDuplicates", {
enumerable: true,
get: function () {
return _removeTypeDuplicates.default;
}
});
Object.defineProperty(exports, "shallowEqual", {
enumerable: true,
get: function () {
return _shallowEqual.default;
}
});
Object.defineProperty(exports, "toBindingIdentifierName", {
enumerable: true,
get: function () {
return _toBindingIdentifierName.default;
}
});
Object.defineProperty(exports, "toBlock", {
enumerable: true,
get: function () {
return _toBlock.default;
}
});
Object.defineProperty(exports, "toComputedKey", {
enumerable: true,
get: function () {
return _toComputedKey.default;
}
});
Object.defineProperty(exports, "toExpression", {
enumerable: true,
get: function () {
return _toExpression.default;
}
});
Object.defineProperty(exports, "toIdentifier", {
enumerable: true,
get: function () {
return _toIdentifier.default;
}
});
Object.defineProperty(exports, "toKeyAlias", {
enumerable: true,
get: function () {
return _toKeyAlias.default;
}
});
Object.defineProperty(exports, "toStatement", {
enumerable: true,
get: function () {
return _toStatement.default;
}
});
Object.defineProperty(exports, "traverse", {
enumerable: true,
get: function () {
return _traverse.default;
}
});
Object.defineProperty(exports, "traverseFast", {
enumerable: true,
get: function () {
return _traverseFast.default;
}
});
Object.defineProperty(exports, "validate", {
enumerable: true,
get: function () {
return _validate.default;
}
});
Object.defineProperty(exports, "valueToNode", {
enumerable: true,
get: function () {
return _valueToNode.default;
}
});
var _isReactComponent = require("./validators/react/isReactComponent.js");
var _isCompatTag = require("./validators/react/isCompatTag.js");
var _buildChildren = require("./builders/react/buildChildren.js");
var _assertNode = require("./asserts/assertNode.js");
var _index = require("./asserts/generated/index.js");
Object.keys(_index).forEach(function (key) {
if (key === "default" || key === "__esModule") return;
if (Object.prototype.hasOwnProperty.call(_exportNames, key)) return;
if (key in exports && exports[key] === _index[key]) return;
Object.defineProperty(exports, key, {
enumerable: true,
get: function () {
return _index[key];
}
});
});
var _createTypeAnnotationBasedOnTypeof = require("./builders/flow/createTypeAnnotationBasedOnTypeof.js");
var _createFlowUnionType = require("./builders/flow/createFlowUnionType.js");
var _createTSUnionType = require("./builders/typescript/createTSUnionType.js");
var _productions = require("./builders/productions.js");
Object.keys(_productions).forEach(function (key) {
if (key === "default" || key === "__esModule") return;
if (Object.prototype.hasOwnProperty.call(_exportNames, key)) return;
if (key in exports && exports[key] === _productions[key]) return;
Object.defineProperty(exports, key, {
enumerable: true,
get: function () {
return _productions[key];
}
});
});
var _index2 = require("./builders/generated/index.js");
Object.keys(_index2).forEach(function (key) {
if (key === "default" || key === "__esModule") return;
if (Object.prototype.hasOwnProperty.call(_exportNames, key)) return;
if (key in exports && exports[key] === _index2[key]) return;
Object.defineProperty(exports, key, {
enumerable: true,
get: function () {
return _index2[key];
}
});
});
var _cloneNode = require("./clone/cloneNode.js");
var _clone = require("./clone/clone.js");
var _cloneDeep = require("./clone/cloneDeep.js");
var _cloneDeepWithoutLoc = require("./clone/cloneDeepWithoutLoc.js");
var _cloneWithoutLoc = require("./clone/cloneWithoutLoc.js");
var _addComment = require("./comments/addComment.js");
var _addComments = require("./comments/addComments.js");
var _inheritInnerComments = require("./comments/inheritInnerComments.js");
var _inheritLeadingComments = require("./comments/inheritLeadingComments.js");
var _inheritsComments = require("./comments/inheritsComments.js");
var _inheritTrailingComments = require("./comments/inheritTrailingComments.js");
var _removeComments = require("./comments/removeComments.js");
var _index3 = require("./constants/generated/index.js");
Object.keys(_index3).forEach(function (key) {
if (key === "default" || key === "__esModule") return;
if (Object.prototype.hasOwnProperty.call(_exportNames, key)) return;
if (key in exports && exports[key] === _index3[key]) return;
Object.defineProperty(exports, key, {
enumerable: true,
get: function () {
return _index3[key];
}
});
});
var _index4 = require("./constants/index.js");
Object.keys(_index4).forEach(function (key) {
if (key === "default" || key === "__esModule") return;
if (Object.prototype.hasOwnProperty.call(_exportNames, key)) return;
if (key in exports && exports[key] === _index4[key]) return;
Object.defineProperty(exports, key, {
enumerable: true,
get: function () {
return _index4[key];
}
});
});
var _ensureBlock = require("./converters/ensureBlock.js");
var _toBindingIdentifierName = require("./converters/toBindingIdentifierName.js");
var _toBlock = require("./converters/toBlock.js");
var _toComputedKey = require("./converters/toComputedKey.js");
var _toExpression = require("./converters/toExpression.js");
var _toIdentifier = require("./converters/toIdentifier.js");
var _toKeyAlias = require("./converters/toKeyAlias.js");
var _toStatement = require("./converters/toStatement.js");
var _valueToNode = require("./converters/valueToNode.js");
var _index5 = require("./definitions/index.js");
Object.keys(_index5).forEach(function (key) {
if (key === "default" || key === "__esModule") return;
if (Object.prototype.hasOwnProperty.call(_exportNames, key)) return;
if (key in exports && exports[key] === _index5[key]) return;
Object.defineProperty(exports, key, {
enumerable: true,
get: function () {
return _index5[key];
}
});
});
var _appendToMemberExpression = require("./modifications/appendToMemberExpression.js");
var _inherits = require("./modifications/inherits.js");
var _prependToMemberExpression = require("./modifications/prependToMemberExpression.js");
var _removeProperties = require("./modifications/removeProperties.js");
var _removePropertiesDeep = require("./modifications/removePropertiesDeep.js");
var _removeTypeDuplicates = require("./modifications/flow/removeTypeDuplicates.js");
var _getAssignmentIdentifiers = require("./retrievers/getAssignmentIdentifiers.js");
var _getBindingIdentifiers = require("./retrievers/getBindingIdentifiers.js");
var _getOuterBindingIdentifiers = require("./retrievers/getOuterBindingIdentifiers.js");
var _getFunctionName = require("./retrievers/getFunctionName.js");
var _traverse = require("./traverse/traverse.js");
Object.keys(_traverse).forEach(function (key) {
if (key === "default" || key === "__esModule") return;
if (Object.prototype.hasOwnProperty.call(_exportNames, key)) return;
if (key in exports && exports[key] === _traverse[key]) return;
Object.defineProperty(exports, key, {
enumerable: true,
get: function () {
return _traverse[key];
}
});
});
var _traverseFast = require("./traverse/traverseFast.js");
var _shallowEqual = require("./utils/shallowEqual.js");
var _is = require("./validators/is.js");
var _isBinding = require("./validators/isBinding.js");
var _isBlockScoped = require("./validators/isBlockScoped.js");
var _isImmutable = require("./validators/isImmutable.js");
var _isLet = require("./validators/isLet.js");
var _isNode = require("./validators/isNode.js");
var _isNodesEquivalent = require("./validators/isNodesEquivalent.js");
var _isPlaceholderType = require("./validators/isPlaceholderType.js");
var _isReferenced = require("./validators/isReferenced.js");
var _isScope = require("./validators/isScope.js");
var _isSpecifierDefault = require("./validators/isSpecifierDefault.js");
var _isType = require("./validators/isType.js");
var _isValidES3Identifier = require("./validators/isValidES3Identifier.js");
var _isValidIdentifier = require("./validators/isValidIdentifier.js");
var _isVar = require("./validators/isVar.js");
var _matchesPattern = require("./validators/matchesPattern.js");
var _validate = require("./validators/validate.js");
var _buildMatchMemberExpression = require("./validators/buildMatchMemberExpression.js");
var _index6 = require("./validators/generated/index.js");
Object.keys(_index6).forEach(function (key) {
if (key === "default" || key === "__esModule") return;
if (Object.prototype.hasOwnProperty.call(_exportNames, key)) return;
if (key in exports && exports[key] === _index6[key]) return;
Object.defineProperty(exports, key, {
enumerable: true,
get: function () {
return _index6[key];
}
});
});
var _deprecationWarning = require("./utils/deprecationWarning.js");
var _toSequenceExpression = require("./converters/toSequenceExpression.js");
const react = exports.react = {
isReactComponent: _isReactComponent.default,
isCompatTag: _isCompatTag.default,
buildChildren: _buildChildren.default
};
exports.toSequenceExpression = _toSequenceExpression.default;
if (process.env.BABEL_TYPES_8_BREAKING) {
console.warn("BABEL_TYPES_8_BREAKING is not supported anymore. Use the latest Babel 8.0.0 pre-release instead!");
}
//# sourceMappingURL=index.js.map
@@ -0,0 +1,13 @@
{
"root": true,
"extends": "@ljharb",
"rules": {
"new-cap": [2, {
"capIsNewExceptions": [
"GetIntrinsic",
],
}],
},
}
@@ -0,0 +1,18 @@
Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
const require_client_client = require("../../client/client.js");
//#region src/helper/testing/index.ts
/**
* @module
* Testing Helper for Hono.
*/
const testClient = (app, Env, executionCtx, options) => {
const customFetch = (input, init) => {
return app.request(input, init, Env, executionCtx);
};
return require_client_client.hc("http://localhost", {
...options,
fetch: customFetch
});
};
//#endregion
exports.testClient = testClient;
@@ -0,0 +1 @@
module.exports={A:{A:{"1":"_LC","2":"_IB"},B:{"1":"_J"},C:{"1":"_S"},D:{"1":"_Q"},E:{"1":"_R"},F:{"1":"_c"},G:{"1":"_M"},H:{"1":"1D"},I:{"1":"_P"},J:{"1":"_B"},K:{"1":"_N"},L:{"1":"I"},M:{"1":"YC"},N:{"1":"_A"},O:{"1":"bC"},P:{"1":"_F"},Q:{"1":"JE"},R:{"1":"KE"},S:{"1":"_C"}},B:2,C:"CSS Counters",D:true};
@@ -0,0 +1 @@
{"version":3,"file":"rewrite.js","names":[],"sources":["../../src/rewrite.ts"],"sourcesContent":["import { joinPaths, trimPath } from './path'\nimport type { LocationRewrite } from './router'\n\n/** Compose multiple rewrite pairs into a single in/out rewrite. */\n/** Compose multiple rewrite pairs into a single in/out rewrite. */\nexport function composeRewrites(rewrites: Array<LocationRewrite>) {\n return {\n input: ({ url }) => {\n for (const rewrite of rewrites) {\n url = executeRewriteInput(rewrite, url)\n }\n return url\n },\n output: ({ url }) => {\n for (let i = rewrites.length - 1; i >= 0; i--) {\n url = executeRewriteOutput(rewrites[i], url)\n }\n return url\n },\n } satisfies LocationRewrite\n}\n\n/** Create a rewrite pair that strips/adds a basepath on input/output. */\n/** Create a rewrite pair that strips/adds a basepath on input/output. */\nexport function rewriteBasepath(opts: {\n basepath: string\n caseSensitive?: boolean\n}) {\n const trimmedBasepath = trimPath(opts.basepath)\n const normalizedBasepath = `/${trimmedBasepath}`\n const normalizedBasepathWithSlash = `${normalizedBasepath}/`\n const checkBasepath = opts.caseSensitive\n ? normalizedBasepath\n : normalizedBasepath.toLowerCase()\n const checkBasepathWithSlash = opts.caseSensitive\n ? normalizedBasepathWithSlash\n : normalizedBasepathWithSlash.toLowerCase()\n\n return {\n input: ({ url }) => {\n const pathname = opts.caseSensitive\n ? url.pathname\n : url.pathname.toLowerCase()\n\n // Handle exact basepath match (e.g., /my-app -> /)\n if (pathname === checkBasepath) {\n url.pathname = '/'\n } else if (pathname.startsWith(checkBasepathWithSlash)) {\n // Handle basepath with trailing content (e.g., /my-app/users -> /users)\n url.pathname = url.pathname.slice(normalizedBasepath.length)\n }\n return url\n },\n output: ({ url }) => {\n url.pathname = joinPaths(['/', trimmedBasepath, url.pathname])\n return url\n },\n } satisfies LocationRewrite\n}\n\n/** Execute a location input rewrite if provided. */\n/** Execute a location input rewrite if provided. */\nexport function executeRewriteInput(\n rewrite: LocationRewrite | undefined,\n url: URL,\n): URL {\n const res = rewrite?.input?.({ url })\n if (res) {\n if (typeof res === 'string') {\n return new URL(res)\n } else if (res instanceof URL) {\n return res\n }\n }\n return url\n}\n\n/** Execute a location output rewrite if provided. */\n/** Execute a location output rewrite if provided. */\nexport function executeRewriteOutput(\n rewrite: LocationRewrite | undefined,\n url: URL,\n): URL {\n const res = rewrite?.output?.({ url })\n if (res) {\n if (typeof res === 'string') {\n return new URL(res)\n } else if (res instanceof URL) {\n return res\n }\n }\n return url\n}\n"],"mappings":";;;;AAKA,SAAgB,gBAAgB,UAAkC;AAChE,QAAO;EACL,QAAQ,EAAE,UAAU;AAClB,QAAK,MAAM,WAAW,SACpB,OAAM,oBAAoB,SAAS,IAAI;AAEzC,UAAO;;EAET,SAAS,EAAE,UAAU;AACnB,QAAK,IAAI,IAAI,SAAS,SAAS,GAAG,KAAK,GAAG,IACxC,OAAM,qBAAqB,SAAS,IAAI,IAAI;AAE9C,UAAO;;EAEV;;;;AAKH,SAAgB,gBAAgB,MAG7B;CACD,MAAM,kBAAkB,SAAS,KAAK,SAAS;CAC/C,MAAM,qBAAqB,IAAI;CAC/B,MAAM,8BAA8B,GAAG,mBAAmB;CAC1D,MAAM,gBAAgB,KAAK,gBACvB,qBACA,mBAAmB,aAAa;CACpC,MAAM,yBAAyB,KAAK,gBAChC,8BACA,4BAA4B,aAAa;AAE7C,QAAO;EACL,QAAQ,EAAE,UAAU;GAClB,MAAM,WAAW,KAAK,gBAClB,IAAI,WACJ,IAAI,SAAS,aAAa;AAG9B,OAAI,aAAa,cACf,KAAI,WAAW;YACN,SAAS,WAAW,uBAAuB,CAEpD,KAAI,WAAW,IAAI,SAAS,MAAM,mBAAmB,OAAO;AAE9D,UAAO;;EAET,SAAS,EAAE,UAAU;AACnB,OAAI,WAAW,UAAU;IAAC;IAAK;IAAiB,IAAI;IAAS,CAAC;AAC9D,UAAO;;EAEV;;;;AAKH,SAAgB,oBACd,SACA,KACK;CACL,MAAM,MAAM,SAAS,QAAQ,EAAE,KAAK,CAAC;AACrC,KAAI;MACE,OAAO,QAAQ,SACjB,QAAO,IAAI,IAAI,IAAI;WACV,eAAe,IACxB,QAAO;;AAGX,QAAO;;;;AAKT,SAAgB,qBACd,SACA,KACK;CACL,MAAM,MAAM,SAAS,SAAS,EAAE,KAAK,CAAC;AACtC,KAAI;MACE,OAAO,QAAQ,SACjB,QAAO,IAAI,IAAI,IAAI;WACV,eAAe,IACxB,QAAO;;AAGX,QAAO"}
@@ -0,0 +1,6 @@
import decompress from '@zxcvbn-ts/dictionary-compression/decompress';
var firstnames = decompress("AaarenDikaBbagaelFilCbeEyDiEeDyEeCigaelFilFleCraBdaDhDlineDnDraCdaDiEaEeDyCelEaFidaHeEeEheidEiceFnaGdGeElaFeDnaDyCiDanaDnaCoraEeFeEneCreaDiaFensFnGaGeGnaHeEenaGneBerielGaGlBftonBgCaceDtaEhaFeCgiEeDyCnaDellaEsFeFseEtaDolaCrethaBidaEnCgneisClaDeEeFnEneEyDiEnaEsDsunDynCmeEeDilCndreaDsleeGyFieBjayBlaineDmedaDnaFhEeEnaDyneCbertaGinaIeDinaCeciaDdaDeceEnDjandraIinaDnaEeDssandraDtaEheaDxEaFndraIinaEiFaFnaGeFsCfiEeDredaDyCiDaDcaEeFaEiaDdaEiaDeDkaEeeDnaEeDsEaEhaEonEsaEunDxDzaClaDeenEgraEneDiEanoraEeEnaEsFonFsaExDsunDxDyEceEnEsFonCmaDedaEriaEtaDiraFeCoiseFiaDysiaCtaDheaCveraFtaDinaFiaEraCyceDdaDsEaEeEiaEonEsFaBmabelGleDleaFeFtaEiaFeFtaEleDndaFiGeFyDraEgoDtaCberFlyDurCeDliaFeFnaGeFtaCiDeDiDlDtieEyCmamariaCyDeBnaDbalEelGlaHeDlieseFseEleseFiseDstasiaIeHsiaDtolaCdeeFeEreaDiEeDraEeaGnaFeFiEiaGnaFetteEomacheDyCestassiaDtEtFaFeCgeElFaFeFiaGcaGkaGnaHeGqueGtaFleDieElDyCiaDcaDssaDtaEraCjanetteDelaCnD-marieDaE-dianaJeFmariaEbalFelHaHlIaIeEdianaIeEleeFieseGseEmariaIeDeE-corinneFmarieEcorinneElieseGseEmarieEttaGeDiEceEeEsFsaDmariaHeDnoraDoraDyCselmaDleyDticeCtheFaEiaGthiaDoinetteEnellaGttaFiaGeHttaGnaCyaBppoloniaCrilFetteBraDbelGaGeGlaHeCdaEthDeenEliaGsFlaGeEnFeFiaDineEsFjEthDraDyceEsEthCethaCiadneEnaDdathaDelFaFlaGeClanaDeeFnEnFaFeEtaFteEyneDieFneEnaFdaFeDueneDyEnFeCynBshelyDiaEenElDlaFnEeeFighFnFyEiFeEyCiaCtraEidFxBtalantaChenaFeClantaGeBubertaDineDreeFtteFyEieEyCdiEeDraEeFyEieEyFeDyCgustaGeGinaIeCndreaCraDeaElFeaFiaGeDiaEeEliaDlieDooraEraFeCstinGaGeBvaCelineDrilEylCieDsDvaFhCrilEtBynAbabDaraDbEetteEieDetteDitaDsCmbiFeEyCrbEabraFraH-anneHanneEeFeFtteFyEiFeEraEyDiDrieEyCsiaCthshebaDshevaBeaDtriceGsaGxGzCbeCccaDkaEiFeEyCeCilulDtrisCkkiClDiaEciaEndaEtaDlEaFncaEeEinaDvaEiaCnditeDedettaFictaGktaEttaDitaDniFeEyDoiteCreniceEtDgetDnaFdeneHtteGinaIeFrdinaJeEelleFteGtaHeEiFceFeFtaEyDriFeEyDtEaEeEhaFeEiFeFnaGeEyDylFeCssEieEyCthEanneGyEenaEinaDseyEyDtaEeF-annFannIeEiFnaGeEyFeCulahCvDerieFleeHyGieGyDvyBiancaEkaCbbieEyFeDiCddieEyDgetCliDlEiFeEyFeCnniFeEyCrdEieDgitGtaBlairFeDkeFleeHyDncaFhGaGeCinniGeFyDssFeDtheCondellIeFieFyCytheBobbeFeFtteEiFeEyFeDetteDinaFeGtteCnitaDneeEiFbelleFeEyBranaEdaisFeGaFiGceGeGseFyCeanneErDeEnaDnEaEdaEnFaDttCiaEnaFnaGeDdeEgetHteEieDerEttaDgidGaFtGtaHeDnaEeyEnFaEyDtEaEneyFiEtFaGnHeyHiHyFeGnyFneHyGiCookFeFsCunhildaIeCyanaDnEaEnFaFeBuffyCnniFeEyAcaciliaGeChraCiristionaDtlinErinClDidaDlaEeyEiFdaFeEyDypsoCmDalaDelFlaGiaDiElaFeFlaGeDmiFeEyCndaceEiFceFdaGeFeFsEraEyCpriceCraElieDenFaEsaFsaGeEyDiEaEeElFynEnFaFeEottaEssaEtaFtaDlaEeeGnFnGeFyEieFnGaGeFtaEotaGtaEyFeFnGnHeDmaEelGaGiaHnaHtaGlaHeFnGcitaEinaGeFtaEonDoElF-jeanFaGnHnFeGeFinHaHeFjeanFynHeHnEnDreeEiFeFssaEollEyDyElEnCsandraDeyDiEeDsEandraIeIyFundraEeyEiFeEondraEyCtarinaDeErinaDhaFrinaIeEeFeFrinIaIeEiFeEleenGneErinHeFynEyFleenDiEeEnaDlainaEeeEinDrinaFonaDyCyeDlaBeceliaDilFeGyFiaFlaFyCilCleEneEstaGeGiaHnaIeGynIaDiaEeEnaFdaFeFkaEsseDkaDleCsyaBhadDndaGlFraEnaEtalHleDrilFnFsGsaHeFtaGyElaFeanGenGnaHeFineFotHtaIeEmainIeGneFianGneGonEoEylDstityCelsaeFeaGyFieFyDrEeFyEiFanneFceFdaFeFlynInFnFseGhElynEriGtaFyEyFeFlDslieCiarraDckieFyDquiaGtaCloEeFtteErisCrisFsieGyFtaHbelKlaHlIleHnGeanHlHnGiHanJaJeHeHnIaIeGyHeHnaDysaFlerFtalGeHlBicelyDilyCelClkaCndaEeeFlynFrellaEiFeEraEyDnamonCssieeEyBlairFeDraFbelleEeFstaFtaGtaHeFyEiFbelFceFeFndaGeFssaHeFtaEyDudeGlleGttaIeFiaGeGnaHeCeaDmEenceGtiaInaJeEmieFyDoEpatraDrissaCioCoDeDrisDtildaDvisBodeeDiEeDyCleenEneEttaGeDleenFnFteGteEieFneEyCnDcettinaEhitaEordiaDniFeEyDsolataEtanceIiaIyHtaIiaJnaKeEuelaHoCokieCraEbelHlaIeElFieGneFynDdeliaHeFyEiFeEulaEyDeenEllaEndaFeEttaGeEyDiEeEllaEnaFeFnaGeEssGaDlissEyDnelaGiaGleEieEyDrenaFyEiFanneFeFnaGeGneEyDtneyDyCsettaGeDtanzaCurtenayFnayGeyBrinDsEsieFyEtaGbelGlFenFiGeGnHaHeGonnaFyCystaGlFieBthrineBybDilFlCmbreCndeEiFaFeEyDtheaFiaGeFyAdaceyDiaEeDyCelCffiFeEyCgmarChliaCileDseyEiFeEyCleEnnaDiaElaDlasDorisCmaraFisDitaCnaDellGaEtteDiEaEcaFeEelaGeGlaHeEkaElaEtFaDnaEiFeEyFeDyaEelleFtteCpheneEnaFeCraDbEieEyDceeFyEiFeEyDdaDeenEllGeDiEaEceDlaEeenFneEineEleenDonDrelleEylDseyEieDyaElEnCshaDiEeDyaCthaCuneCveenEtaDidaEnaFeEtaCwnEaCyleDnaBdeneBeCanaEeEnaFeCbDbiFeEyDeeEraDiDorFaGhDraCdeDieDraCeD deeDannGeDdeeDnaDrdreDynChliaCidreDnaDrdreClDaDcinaGeDiaElaGhEndaDlEaEyDoraFesFiaGsDphineHiaCmeterFraGiaHsCnaDiEceEseDnaEiFeEyDyEsFeConneCsdemonaDiraeFeeFiCvaEnDiEnFaFneDonFdraFnaGeEraBiCahannDnEaEdraEeF-marieFmarieEnFaFeFneCdiDoCenaDrdreCnaEhDnieEyConEeEisEneCtaCxDieBnirenBodeDiEeDyCeCllEeyEiFeEyDoresFitaIsCmenigaDingaFiGcaGqueCnaDellaGeEttaDiaEcaEelleDnaFmarieEiFeEyCraEliaGnFynHnIeDeEenEliaFlaGeEnaFeEttaGeEyDiEaFnEceEeEneEsFaFeEtaDoEliceGsaEteaGyaFheaHeGyDreeEiFeFsEyDtheaFyDyCsiCtDiDtiFeEyBreDddyEiConaCuDciFeFllEyDsiFeFllaEyBulceFaEiFaGnaFeFneHaEyDseaCstyByanEaEeEnFaFeCnaEhAeachelleCdaDieEthClasaidCrthaCsterBbaCbaConeeEyBdaCdiEeDyCeDeDlineDnCiDeDnDtaEhFaFeDvaCnaCwinaCyDthFeBffieBileenDisCmileCrenaBkaterinaBlainaFeDnaEeDyneCbertaGinaIeCeanorHaHeDctraDenDnaEeEiEoreDonoraHeCfieDredaEidaFedaCgaCianoraHeDciaDeDnorGeDsaFbetIhItaEeEhaEsaDtaDzaFbetIhCkaDeClaEdineDeEnFeEtteDiEeEssaDyEnFnCmiraCnaDoraFeCoisaFeDnoreDraCsLine truncated
export { firstnames as default };
//# sourceMappingURL=firstnames.json.mjs.map