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,9 @@
/**
* @license lucide-react v0.469.0 - ISC
*
* This source code is licensed under the ISC license.
* See the LICENSE file in the root directory of this source tree.
*/
export { default } from './square-pen.js';
//# sourceMappingURL=pen-square.js.map
@@ -0,0 +1,73 @@
//#region src/utils/mime.d.ts
/**
* @module
* MIME utility.
*/
export declare const getMimeType: (filename: string, mimes?: Record<string, string>) => string | undefined;
export declare const getExtension: (mimeType: string) => string | undefined;
/**
* Union types for BaseMime
*/
export type BaseMime = (typeof _baseMimes)[keyof typeof _baseMimes];
declare const _baseMimes: {
readonly aac: "audio/aac";
readonly avi: "video/x-msvideo";
readonly avif: "image/avif";
readonly av1: "video/av1";
readonly bin: "application/octet-stream";
readonly bmp: "image/bmp";
readonly css: "text/css; charset=utf-8";
readonly csv: "text/csv; charset=utf-8";
readonly eot: "application/vnd.ms-fontobject";
readonly epub: "application/epub+zip";
readonly gif: "image/gif";
readonly gz: "application/gzip";
readonly htm: "text/html; charset=utf-8";
readonly html: "text/html; charset=utf-8";
readonly ico: "image/x-icon";
readonly ics: "text/calendar; charset=utf-8";
readonly jpeg: "image/jpeg";
readonly jpg: "image/jpeg";
readonly js: "text/javascript; charset=utf-8";
readonly json: "application/json";
readonly jsonld: "application/ld+json";
readonly map: "application/json";
readonly mid: "audio/x-midi";
readonly midi: "audio/x-midi";
readonly mjs: "text/javascript; charset=utf-8";
readonly mp3: "audio/mpeg";
readonly mp4: "video/mp4";
readonly mpeg: "video/mpeg";
readonly oga: "audio/ogg";
readonly ogv: "video/ogg";
readonly ogx: "application/ogg";
readonly opus: "audio/opus";
readonly otf: "font/otf";
readonly pdf: "application/pdf";
readonly png: "image/png";
readonly rtf: "application/rtf";
readonly svg: "image/svg+xml; charset=utf-8";
readonly tif: "image/tiff";
readonly tiff: "image/tiff";
readonly ts: "video/mp2t";
readonly ttf: "font/ttf";
readonly txt: "text/plain; charset=utf-8";
readonly wasm: "application/wasm";
readonly webm: "video/webm";
readonly weba: "audio/webm";
readonly webmanifest: "application/manifest+json";
readonly webp: "image/webp";
readonly woff: "font/woff";
readonly woff2: "font/woff2";
readonly xhtml: "application/xhtml+xml; charset=utf-8";
readonly xml: "application/xml; charset=utf-8";
readonly zip: "application/zip";
readonly '3gp': "video/3gpp";
readonly '3g2': "video/3gpp2";
readonly gltf: "model/gltf+json";
readonly glb: "model/gltf-binary";
};
declare const baseMimes: Record<string, BaseMime>;
//#endregion
export { baseMimes as mimes };
export {};
@@ -0,0 +1 @@
module.exports={A:{A:{"2":"FD","8":"_SC"},B:{"1":"_K","8":"_I"},C:{"1":"_QO","2":"GD","8":"fC _qG _L"},D:{"1":"_lO","2":"_6E","8":"N _cC"},E:{"1":"_dB","2":"_e","8":"_1Q"},F:{"1":"_a","2":"_QD","8":"_PQ"},G:{"1":"_8C","2":"lC","8":"_FG eD"},H:{"2":"1D"},I:{"1":"_X","8":"_W"},J:{"1":"A","8":"D"},K:{"1":"H","2":"_A","8":"_EL"},L:{"1":"I"},M:{"1":"YC"},N:{"8":"_A"},O:{"1":"bC"},P:{"1":"_F"},Q:{"1":"JE"},R:{"1":"KE"},S:{"1":"_C"}},B:1,C:"srcdoc attribute for iframes",D:true};
@@ -0,0 +1 @@
module.exports={C:{"4":0.00502,"113":0.00251,"115":0.04265,"120":0.60969,"121":1.24948,"123":0.01004,"124":0.01756,"125":0.00753,"126":0.00251,"127":0.00251,"128":0.00251,"130":0.00251,"131":0.00251,"132":0.00251,"133":0.00251,"134":0.00251,"135":0.00251,"136":0.00251,"137":0.00251,"138":0.00251,"140":0.01756,"141":0.00251,"142":0.00251,"143":0.00251,"144":0.00251,"146":0.00251,"147":0.00251,"148":0.02007,"150":0.01004,"151":0.01004,"152":0.00502,"153":0.01255,"154":0.06273,"155":0.19821,"156":0.1957,"157":0.01004,"158":0.00251,_:"2 3 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 114 116 117 118 119 122 129 139 145 149 159 160 3.5 3.6"},D:{"41":0.00502,"55":0.00251,"60":0.00251,"62":0.00502,"63":0.00251,"64":0.00251,"65":0.00251,"66":0.00251,"67":0.00251,"68":0.00251,"69":0.00251,"70":0.00502,"71":0.00251,"72":0.00251,"73":0.00251,"75":0.00251,"79":0.01756,"81":0.00251,"86":0.00251,"87":0.01756,"97":0.00753,"101":0.00251,"103":0.17563,"104":0.17563,"105":0.17563,"106":0.17814,"107":0.17312,"108":0.18065,"109":0.65234,"110":0.17312,"111":0.19068,"112":0.17312,"113":0.00502,"114":0.00251,"116":0.34875,"117":0.17061,"118":0.85306,"119":1.2269,"120":1.42009,"121":0.00502,"122":0.01756,"123":0.01505,"124":0.18567,"125":0.00753,"126":0.00251,"127":0.00251,"128":0.00753,"129":0.01004,"130":0.01004,"131":0.35879,"132":0.00502,"133":0.47169,"134":0.14301,"135":0.15054,"136":0.14552,"137":0.15054,"138":0.16058,"139":0.14552,"140":0.1681,"141":0.16559,"142":0.51936,"143":0.00753,"144":0.05269,"145":0.138,"146":0.29355,"147":0.02509,"148":0.22079,"149":0.18567,"150":0.12043,"151":1.18174,"152":3.36206,"153":2.16778,"154":0.50431,"155":0.00251,_:"4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 42 43 44 45 46 47 48 49 50 51 52 53 54 56 57 58 59 61 74 76 77 78 80 83 84 85 88 89 90 91 92 93 94 95 96 98 99 100 102 115 156 157"},F:{"52":0.00251,"53":0.00251,"54":0.00251,"55":0.00251,"56":0.00251,"57":0.00251,"72":0.00251,"74":0.00251,"76":0.00251,"89":0.00251,"90":0.00251,"95":0.01756,"96":0.00251,"99":0.00251,"101":0.00502,"105":0.00753,"106":0.01255,"107":0.01004,"110":0.00251,"113":0.00251,"115":0.00251,"116":0.00502,"119":0.00251,"120":0.00502,"121":0.00502,"122":0.00251,"125":0.01004,"133":0.00251,"134":0.10287,"135":0.34875,_:"9 11 12 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 58 60 62 63 64 65 66 67 68 69 70 71 73 75 77 78 79 80 81 82 83 84 85 86 87 88 91 92 93 94 97 98 100 102 103 104 108 109 111 112 114 117 118 123 124 126 127 131 132 9.5-9.6 10.0-10.1 10.5 10.6 11.1 11.5 11.6 12.1"},B:{"17":0.00251,"18":0.00251,"92":0.00502,"109":0.01004,"114":0.00251,"119":0.6122,"120":0.61721,"122":0.01756,"123":0.00251,"124":0.00251,"128":0.00251,"131":0.00502,"132":0.00753,"133":0.00251,"134":0.00251,"135":0.00251,"137":0.00251,"138":0.00251,"139":0.00502,"140":0.00753,"141":0.00251,"142":0.00251,"144":0.00502,"145":0.00753,"146":0.00753,"147":0.01255,"148":0.01255,"149":0.01004,"150":0.04265,"151":0.05269,"152":0.56703,"153":0.6398,"154":0.18316,_:"12 13 14 15 16 79 80 81 83 84 85 86 87 88 89 90 91 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 110 111 112 113 115 116 117 118 121 125 126 127 129 130 136 143"},E:{"27":0.00753,_:"4 5 6 7 8 9 10 11 12 13 14 15 3.1 3.2 5.1 6.1 7.1 9.1 10.1 11.1 12.1 13.1 14.1 15.1 15.2-15.3 15.4 15.5 16.0 16.1 16.2 16.3 16.4 16.5 17.0 17.2 18.0 18.1 18.2 18.4 18.5-18.7 26.1 27.1 27.2 TP","15.6":0.00502,"16.6":0.01255,"17.1":0.00502,"17.3":0.00251,"17.4":0.00251,"17.5":0.00251,"17.6":0.00502,"18.3":0.00251,"26.0":0.00251,"26.2":0.00251,"26.3":0.00251,"26.4":0.00251,"26.5":0.03262,"26.6":0.08782},G:{"8":0,"3.2":0,"4.0-4.1":0,"4.2-4.3":0.00021,"5.0-5.1":0.00021,"6.0-6.1":0,"7.0-7.1":0.00042,"8.1-8.4":0,"9.0-9.2":0,"9.3":0,"10.0-10.2":0,"10.3":0.00208,"11.0-11.2":0.00021,"11.3-11.4":0.00042,"12.0-12.1":0,"12.2-12.5":0.0054,"13.0-13.1":0,"13.2":0.00104,"13.3":0,"13.4-13.7":0.00021,"14.0-14.4":0.00083,"14.5-14.8":0.00125,"15.0-15.1":0.00125,"15.2-15.3":0.00083,"15.4":0.00104,"15.5":0.00125,"15.6-15.8":0.02698,"16.0":0.00208,"16.1":0.00374,"16.2":0.00208,"16.3":0.00457,"16.4":0.00104,"16.5":0.00166,"16.6-16.7":0.03756,"17.0":0.00145,"17.1":0.00208,"17.2":0.00208,"17.3":0.00311,"17.4":0.00436,"17.5":0.00851,"17.6-17.7":0.022,"18.0":0.00457,"18.1":0.00913,"18.2":0.01245,"18.3":0.02158,"18.4":0.01349,"18.5-18.7":0.27871,"26.0":0.01349,"26.1":0.0137,"26.2":0.03569,"26.3":0.0386,"26.4":0.02822,"26.5":0.18906,"26.6":1.16652,"27.0":0.08944,"27.1":0,"27.2":0.00228},P:{"20":0.00997,"21":0.00997,"22":0.01995,"23":0.01995,"24":0.02992,"25":0.01995,"26":0.13962,"27":0.04986,"28":0.14959,"29":0.17951,"3Line truncated
@@ -0,0 +1,361 @@
/* eslint-disable */
// Adapted from Alien Signals
// https://github.com/stackblitz/alien-signals/
import { ReactiveFlags, createReactiveSystem } from './alien'
import type { ReactiveNode } from './alien'
export { ReactiveFlags, createReactiveSystem } from './alien'
export type { Link, ReactiveNode } from './alien'
interface EffectNode extends ReactiveNode {
fn(): void
}
interface ComputedNode<T = any> extends ReactiveNode {
value: T | undefined
getter: (previousValue?: T) => T
}
interface SignalNode<T = any> extends ReactiveNode {
currentValue: T
pendingValue: T
}
let cycle = 0
let batchDepth = 0
let notifyIndex = 0
let queuedLength = 0
let activeSub: ReactiveNode | undefined
const queued: (EffectNode | undefined)[] = []
const { link, unlink, propagate, checkDirty, shallowPropagate } =
/* @__PURE__ */ createReactiveSystem({
update(node: SignalNode | ComputedNode): boolean {
if (node.depsTail !== undefined) {
return updateComputed(node as ComputedNode)
} else {
return updateSignal(node as SignalNode)
}
},
notify(effect: EffectNode) {
let insertIndex = queuedLength
let firstInsertedIndex = insertIndex
do {
queued[insertIndex++] = effect
effect.flags &= ~ReactiveFlags.Watching
effect = effect.subs?.sub as EffectNode
if (effect === undefined || !(effect.flags & ReactiveFlags.Watching)) {
break
}
} while (true)
queuedLength = insertIndex
while (firstInsertedIndex < --insertIndex) {
const left = queued[firstInsertedIndex]
queued[firstInsertedIndex++] = queued[insertIndex]
queued[insertIndex] = left
}
},
unwatched(node) {
if (!(node.flags & ReactiveFlags.Mutable)) {
effectScopeOper.call(node)
} else if (node.depsTail !== undefined) {
node.depsTail = undefined
node.flags = ReactiveFlags.Mutable | ReactiveFlags.Dirty
purgeDeps(node)
}
},
})
export function getActiveSub(): ReactiveNode | undefined {
return activeSub
}
export function setActiveSub(sub?: ReactiveNode) {
const prevSub = activeSub
activeSub = sub
return prevSub
}
export function getBatchDepth(): number {
return batchDepth
}
export function startBatch() {
++batchDepth
}
export function endBatch() {
if (!--batchDepth) {
flush()
}
}
export function isSignal(fn: () => void): boolean {
return fn.name === 'bound ' + signalOper.name
}
export function isComputed(fn: () => void): boolean {
return fn.name === 'bound ' + computedOper.name
}
export function isEffect(fn: () => void): boolean {
return fn.name === 'bound ' + effectOper.name
}
export function isEffectScope(fn: () => void): boolean {
return fn.name === 'bound ' + effectScopeOper.name
}
export function signal<T>(): {
(): T | undefined
(value: T | undefined): void
}
export function signal<T>(initialValue: T): {
(): T
(value: T): void
}
export function signal<T>(initialValue?: T): {
(): T | undefined
(value: T | undefined): void
} {
return signalOper.bind({
currentValue: initialValue,
pendingValue: initialValue,
subs: undefined,
subsTail: undefined,
flags: ReactiveFlags.Mutable,
}) as () => T | undefined
}
export function computed<T>(getter: (previousValue?: T) => T): () => T {
return computedOper.bind({
value: undefined,
subs: undefined,
subsTail: undefined,
deps: undefined,
depsTail: undefined,
flags: ReactiveFlags.None,
getter: getter as (previousValue?: unknown) => unknown,
}) as () => T
}
export function effect(fn: () => void): () => void {
const e: EffectNode = {
fn,
subs: undefined,
subsTail: undefined,
deps: undefined,
depsTail: undefined,
flags: ReactiveFlags.Watching | ReactiveFlags.RecursedCheck,
}
const prevSub = setActiveSub(e)
if (prevSub !== undefined) {
link(e, prevSub, 0)
}
try {
e.fn()
} finally {
activeSub = prevSub
e.flags &= ~ReactiveFlags.RecursedCheck
}
return effectOper.bind(e)
}
export function effectScope(fn: () => void): () => void {
const e: ReactiveNode = {
deps: undefined,
depsTail: undefined,
subs: undefined,
subsTail: undefined,
flags: ReactiveFlags.None,
}
const prevSub = setActiveSub(e)
if (prevSub !== undefined) {
link(e, prevSub, 0)
}
try {
fn()
} finally {
activeSub = prevSub
}
return effectScopeOper.bind(e)
}
export function trigger(fn: () => void) {
const sub: ReactiveNode = {
deps: undefined,
depsTail: undefined,
flags: ReactiveFlags.Watching,
}
const prevSub = setActiveSub(sub)
try {
fn()
} finally {
activeSub = prevSub
let link = sub.deps
while (link !== undefined) {
const dep = link.dep
link = unlink(link, sub)
const subs = dep.subs
if (subs !== undefined) {
sub.flags = ReactiveFlags.None
propagate(subs)
shallowPropagate(subs)
}
}
if (!batchDepth) {
flush()
}
}
}
function updateComputed(c: ComputedNode): boolean {
++cycle
c.depsTail = undefined
c.flags = ReactiveFlags.Mutable | ReactiveFlags.RecursedCheck
const prevSub = setActiveSub(c)
try {
const oldValue = c.value
return oldValue !== (c.value = c.getter(oldValue))
} finally {
activeSub = prevSub
c.flags &= ~ReactiveFlags.RecursedCheck
purgeDeps(c)
}
}
function updateSignal(s: SignalNode): boolean {
s.flags = ReactiveFlags.Mutable
return s.currentValue !== (s.currentValue = s.pendingValue)
}
function run(e: EffectNode): void {
const flags = e.flags
if (
flags & ReactiveFlags.Dirty ||
(flags & ReactiveFlags.Pending && checkDirty(e.deps!, e))
) {
++cycle
e.depsTail = undefined
e.flags = ReactiveFlags.Watching | ReactiveFlags.RecursedCheck
const prevSub = setActiveSub(e)
try {
;(e as EffectNode).fn()
} finally {
activeSub = prevSub
e.flags &= ~ReactiveFlags.RecursedCheck
purgeDeps(e)
}
} else {
e.flags = ReactiveFlags.Watching
}
}
function flush(): void {
try {
while (notifyIndex < queuedLength) {
const effect = queued[notifyIndex]!
queued[notifyIndex++] = undefined
run(effect)
}
} finally {
while (notifyIndex < queuedLength) {
const effect = queued[notifyIndex]!
queued[notifyIndex++] = undefined
effect.flags |= ReactiveFlags.Watching | ReactiveFlags.Recursed
}
notifyIndex = 0
queuedLength = 0
}
}
function computedOper<T>(this: ComputedNode<T>): T {
const flags = this.flags
if (
flags & ReactiveFlags.Dirty ||
(flags & ReactiveFlags.Pending &&
(checkDirty(this.deps!, this) ||
((this.flags = flags & ~ReactiveFlags.Pending), false)))
) {
if (updateComputed(this)) {
const subs = this.subs
if (subs !== undefined) {
shallowPropagate(subs)
}
}
} else if (!flags) {
this.flags = ReactiveFlags.Mutable | ReactiveFlags.RecursedCheck
const prevSub = setActiveSub(this)
try {
this.value = this.getter()
} finally {
activeSub = prevSub
this.flags &= ~ReactiveFlags.RecursedCheck
}
}
const sub = activeSub
if (sub !== undefined) {
link(this, sub, cycle)
}
return this.value!
}
function signalOper<T>(this: SignalNode<T>, ...value: [T]): T | void {
if (value.length) {
if (this.pendingValue !== (this.pendingValue = value[0])) {
this.flags = ReactiveFlags.Mutable | ReactiveFlags.Dirty
const subs = this.subs
if (subs !== undefined) {
propagate(subs)
if (!batchDepth) {
flush()
}
}
}
} else {
if (this.flags & ReactiveFlags.Dirty) {
if (updateSignal(this)) {
const subs = this.subs
if (subs !== undefined) {
shallowPropagate(subs)
}
}
}
let sub = activeSub
while (sub !== undefined) {
if (sub.flags & (ReactiveFlags.Mutable | ReactiveFlags.Watching)) {
link(this, sub, cycle)
break
}
sub = sub.subs?.sub
}
return this.currentValue
}
}
function effectOper(this: EffectNode): void {
effectScopeOper.call(this)
}
function effectScopeOper(this: ReactiveNode): void {
this.depsTail = undefined
this.flags = ReactiveFlags.None
purgeDeps(this)
const sub = this.subs
if (sub !== undefined) {
unlink(sub)
}
}
function purgeDeps(sub: ReactiveNode) {
const depsTail = sub.depsTail
let dep = depsTail !== undefined ? depsTail.nextDep : sub.deps
while (dep !== undefined) {
dep = unlink(dep, sub)
}
}
@@ -0,0 +1 @@
{"version":3,"names":["_index","require","_t","_context","_hub","VISITOR_KEYS","TraversalContext","constructor","scope","opts","state","parentPath","queue","priorityQueue","shouldVisit","node","enter","exit","type","keys","length","key","create","container","listKey","hub","Hub","undefined","NodePath","get","parent","maybeQueue","path","notPriority","push","visitMultiple","visitQueue","visitSingle","visited","WeakSet","stop","visitIndex","resync","call","contexts","pushContext","has","add","visit","i","popContext","nodes","Array","isArray","exports","default"],"sources":["../src/context.ts"],"sourcesContent":["import NodePath from \"./path/index.ts\";\nimport { VISITOR_KEYS } from \"@babel/types\";\nimport type Scope from \"./scope/index.ts\";\nimport type { ExplodedTraverseOptions } from \"./index.ts\";\nimport type * as t from \"@babel/types\";\nimport type { Visitor } from \"./types.ts\";\nimport { popContext, pushContext, resync } from \"./path/context.ts\";\nimport Hub from \"./hub.ts\";\n\nexport default class TraversalContext<S = unknown> {\n constructor(\n scope: Scope | null | undefined,\n opts: ExplodedTraverseOptions<S>,\n state: S,\n parentPath: NodePath | undefined,\n ) {\n this.parentPath = parentPath;\n this.scope = scope;\n this.state = state;\n this.opts = opts;\n }\n\n declare parentPath: NodePath | undefined;\n declare scope: Scope | null | undefined;\n declare state: S;\n declare opts: ExplodedTraverseOptions<S>;\n queue: NodePath[] | null = null;\n priorityQueue: NodePath[] | null = null;\n\n /**\n * This method does a simple check to determine whether or not we really need to attempt\n * visit a node. This will prevent us from constructing a NodePath.\n */\n\n shouldVisit(node: t.Node): boolean {\n const opts = this.opts as Visitor;\n if (opts.enter || opts.exit) return true;\n\n // check if we have a visitor for this node\n if (opts[node.type]) return true;\n\n // check if we're going to traverse into this node\n const keys: string[] | undefined = VISITOR_KEYS[node.type];\n if (!keys?.length) return false;\n\n // we need to traverse into this node so ensure that it has children to traverse into!\n for (const key of keys) {\n if (\n // @ts-expect-error key is from visitor keys\n node[key]\n ) {\n return true;\n }\n }\n\n return false;\n }\n\n create(\n node: t.Node,\n container: t.Node | t.Node[],\n key: string | number,\n listKey?: string,\n ): NodePath {\n const { parentPath } = this;\n const hub =\n parentPath == null\n ? node.type === \"Program\" || node.type === \"File\"\n ? new Hub()\n : undefined\n : parentPath.hub;\n\n // We don't need to `.setContext()` here, since `.visitQueue()` already\n // calls `.pushContext`.\n return NodePath.get({\n parentPath,\n parent: node,\n container,\n key: key,\n listKey,\n hub,\n });\n }\n\n maybeQueue(path: NodePath, notPriority?: boolean) {\n if (this.queue) {\n if (notPriority) {\n this.queue.push(path);\n } else {\n this.priorityQueue!.push(path);\n }\n }\n }\n\n visitMultiple(container: t.Node[], parent: t.Node, listKey: string) {\n // nothing to traverse!\n if (container.length === 0) return false;\n\n const queue = [];\n\n // build up initial queue\n for (let key = 0; key < container.length; key++) {\n const node = container[key];\n if (node && this.shouldVisit(node)) {\n queue.push(this.create(parent, container, key, listKey));\n }\n }\n\n return this.visitQueue(queue);\n }\n\n visitSingle(node: t.Node, key: string): boolean {\n if (\n this.shouldVisit(\n // @ts-expect-error key may not index node\n node[key],\n )\n ) {\n return this.visitQueue([this.create(node, node, key)]);\n } else {\n return false;\n }\n }\n\n visitQueue(queue: NodePath[]): boolean {\n // set queue\n this.queue = queue;\n this.priorityQueue = [];\n\n const visited = new WeakSet();\n let stop = false;\n let visitIndex = 0;\n\n // visit the queue\n for (; visitIndex < queue.length; ) {\n const path = queue[visitIndex];\n visitIndex++;\n resync.call(path);\n\n // this path no longer belongs to the tree\n if (process.env.BABEL_8_BREAKING && path.key === null) continue;\n\n if (\n path.contexts.length === 0 ||\n path.contexts[path.contexts.length - 1] !== this\n ) {\n // The context might already have been pushed when this path was inserted and queued.\n // If we always re-pushed here, we could get duplicates and risk leaving contexts\n // on the stack after the traversal has completed, which could break things.\n pushContext.call(path, this);\n }\n\n // this path no longer belongs to the tree\n if (!process.env.BABEL_8Line truncated
@@ -0,0 +1,22 @@
/**
* @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 Github = createLucideIcon("Github", [
[
"path",
{
d: "M15 22v-4a4.8 4.8 0 0 0-1-3.5c3 0 6-2 6-5.5.08-1.25-.27-2.48-1-3.5.28-1.15.28-2.35 0-3.5 0 0-1 0-3 1.5-2.64-.5-5.36-.5-8 0C6 2 5 2 5 2c-.3 1.15-.3 2.35 0 3.5A5.403 5.403 0 0 0 4 9c0 3.5 3 5.5 6 5.5-.39.49-.68 1.05-.85 1.65-.17.6-.22 1.23-.15 1.85v4",
key: "tonef"
}
],
["path", { d: "M9 18c-4.51 2-5-2-7-2", key: "9comsn" }]
]);
export { Github as default };
//# sourceMappingURL=github.js.map
@@ -0,0 +1,2 @@
import { accepts } from "./accepts.js";
export { accepts };
@@ -0,0 +1 @@
{"version":3,"file":"zap.js","sources":["../../../src/icons/zap.ts"],"sourcesContent":["import createLucideIcon from '../createLucideIcon';\n\n/**\n * @component @name Zap\n * @description Lucide SVG icon component, renders SVG Element with children.\n *\n * @preview ![img](data:image/svg+xml;base64,PHN2ZyAgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIgogIHdpZHRoPSIyNCIKICBoZWlnaHQ9IjI0IgogIHZpZXdCb3g9IjAgMCAyNCAyNCIKICBmaWxsPSJub25lIgogIHN0cm9rZT0iIzAwMCIgc3R5bGU9ImJhY2tncm91bmQtY29sb3I6ICNmZmY7IGJvcmRlci1yYWRpdXM6IDJweCIKICBzdHJva2Utd2lkdGg9IjIiCiAgc3Ryb2tlLWxpbmVjYXA9InJvdW5kIgogIHN0cm9rZS1saW5lam9pbj0icm91bmQiCj4KICA8cGF0aCBkPSJNNCAxNGExIDEgMCAwIDEtLjc4LTEuNjNsOS45LTEwLjJhLjUuNSAwIDAgMSAuODYuNDZsLTEuOTIgNi4wMkExIDEgMCAwIDAgMTMgMTBoN2ExIDEgMCAwIDEgLjc4IDEuNjNsLTkuOSAxMC4yYS41LjUgMCAwIDEtLjg2LS40NmwxLjkyLTYuMDJBMSAxIDAgMCAwIDExIDE0eiIgLz4KPC9zdmc+Cg==) - https://lucide.dev/icons/zap\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 Zap = createLucideIcon('Zap', [\n [\n 'path',\n {\n d: 'M4 14a1 1 0 0 1-.78-1.63l9.9-10.2a.5.5 0 0 1 .86.46l-1.92 6.02A1 1 0 0 0 13 10h7a1 1 0 0 1 .78 1.63l-9.9 10.2a.5.5 0 0 1-.86-.46l1.92-6.02A1 1 0 0 0 11 14z',\n key: '1xq2db',\n },\n ],\n]);\n\nexport default Zap;\n"],"names":[],"mappings":";;;;;;;;;AAaM,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAM,iBAAiB,KAAO,CAAA,CAAA,CAAA;AAAA,CAClC,CAAA,CAAA;AAAA,CAAA,CAAA,CAAA,CACE,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA;AAAA,CACA,CAAA,CAAA,CAAA,CAAA;AAAA,CACE,CAAA,CAAA,CAAA,CAAA,CAAA,CAAG,EAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA;AAAA,CACH,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAK,EAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA;AAAA,CACP,CAAA,CAAA,CAAA,CAAA;AAAA,CACF,CAAA,CAAA;AACF,CAAC,CAAA,CAAA;;"}
@@ -0,0 +1,190 @@
import TrieNode from './TrieNode'
interface GetAllSubCombosHelperOptions {
substr: string
limit: number
trieRoot: TrieNode
}
export interface PasswordChanges {
letter: string
substitution: string
}
export type IndexedPasswordChanges = PasswordChanges & { i: number }
export interface PasswordWithSubs {
password: string
changes: IndexedPasswordChanges[]
isFullSubstitution: boolean
}
interface HelperOptions {
onlyFullSub: boolean
isFullSub: boolean
index: number
subIndex: number
changes: IndexedPasswordChanges[]
lastSubLetter?: string
consecutiveSubCount: number
}
class CleanPasswords {
private substr: string
private buffer: string[] = []
private limit: number
private trieRoot: TrieNode
private finalPasswords: PasswordWithSubs[] = []
constructor({ substr, limit, trieRoot }: GetAllSubCombosHelperOptions) {
this.substr = substr
this.limit = limit
this.trieRoot = trieRoot
}
private getAllPossibleSubsAtIndex(index: number) {
const nodes: TrieNode[] = []
let cur = this.trieRoot
for (let i = index; i < this.substr.length; i += 1) {
const character = this.substr.charAt(i)
cur = cur.getChild(character)!
if (!cur) {
break
}
nodes.push(cur)
}
return nodes
}
// eslint-disable-next-line complexity,max-statements
private helper({
onlyFullSub,
isFullSub,
index,
subIndex,
changes,
lastSubLetter,
consecutiveSubCount,
}: HelperOptions): void {
if (this.finalPasswords.length >= this.limit) {
return
}
if (index === this.substr.length) {
if (onlyFullSub === isFullSub) {
this.finalPasswords.push({
password: this.buffer.join(''),
changes,
isFullSubstitution: onlyFullSub,
})
}
return
}
// first, exhaust all possible substitutions at this index
const nodes: TrieNode[] = [...this.getAllPossibleSubsAtIndex(index)]
let hasSubs = false
// iterate backward to get wider substitutions first
for (let i = index + nodes.length - 1; i >= index; i -= 1) {
const cur = nodes[i - index]
const sub = cur.parents.join('')
if (cur.isTerminal()) {
// Skip if this would be a 4th or more consecutive substitution of the same letter
// this should work in all language as there shouldn't be the same letter more than four times in a row
// So we can ignore the rest to save calculation time
if (lastSubLetter === sub && consecutiveSubCount >= 3) {
continue
}
hasSubs = true
const letters = cur.subs!
for (const letter of letters) {
this.buffer.push(letter)
const newSubs = changes.concat({
i: subIndex,
letter,
substitution: sub,
})
// recursively build the rest of the string
this.helper({
onlyFullSub,
isFullSub,
index: index + sub.length,
subIndex: subIndex + letter.length,
changes: newSubs,
lastSubLetter: sub,
consecutiveSubCount:
lastSubLetter === sub ? consecutiveSubCount + 1 : 1,
})
// backtrack by ignoring the added postfix
this.buffer.pop()
if (this.finalPasswords.length >= this.limit) {
return
}
}
}
}
// next, generate all combos without doing a substitution at this index
// if a partial substitution is requested or there are no substitutions at this index
if (!onlyFullSub || !hasSubs) {
const firstChar = this.substr.charAt(index)
this.buffer.push(firstChar)
this.helper({
onlyFullSub,
isFullSub: isFullSub && !hasSubs,
index: index + 1,
subIndex: subIndex + 1,
changes,
lastSubLetter,
consecutiveSubCount,
})
this.buffer.pop()
}
}
getAll() {
// only full substitution
this.helper({
onlyFullSub: true,
isFullSub: true,
index: 0,
subIndex: 0,
changes: [],
lastSubLetter: undefined,
consecutiveSubCount: 0,
})
// only partial substitution
this.helper({
onlyFullSub: false,
isFullSub: true,
index: 0,
subIndex: 0,
changes: [],
lastSubLetter: undefined,
consecutiveSubCount: 0,
})
return this.finalPasswords
}
}
const getCleanPasswords = (
password: string,
limit: number,
trieRoot: TrieNode,
): PasswordWithSubs[] => {
const helper = new CleanPasswords({
substr: password,
limit,
trieRoot,
})
return helper.getAll()
}
export default getCleanPasswords
@@ -0,0 +1 @@
{"version":3,"file":"save-off.js","sources":["../../../src/icons/save-off.ts"],"sourcesContent":["import createLucideIcon from '../createLucideIcon';\n\n/**\n * @component @name SaveOff\n * @description Lucide SVG icon component, renders SVG Element with children.\n *\n * @preview ![img](data:image/svg+xml;base64,PHN2ZyAgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIgogIHdpZHRoPSIyNCIKICBoZWlnaHQ9IjI0IgogIHZpZXdCb3g9IjAgMCAyNCAyNCIKICBmaWxsPSJub25lIgogIHN0cm9rZT0iIzAwMCIgc3R5bGU9ImJhY2tncm91bmQtY29sb3I6ICNmZmY7IGJvcmRlci1yYWRpdXM6IDJweCIKICBzdHJva2Utd2lkdGg9IjIiCiAgc3Ryb2tlLWxpbmVjYXA9InJvdW5kIgogIHN0cm9rZS1saW5lam9pbj0icm91bmQiCj4KICA8cGF0aCBkPSJNMTMgMTNIOGExIDEgMCAwIDAtMSAxdjciIC8+CiAgPHBhdGggZD0iTTE0IDhoMSIgLz4KICA8cGF0aCBkPSJNMTcgMjF2LTQiIC8+CiAgPHBhdGggZD0ibTIgMiAyMCAyMCIgLz4KICA8cGF0aCBkPSJNMjAuNDEgMjAuNDFBMiAyIDAgMCAxIDE5IDIxSDVhMiAyIDAgMCAxLTItMlY1YTIgMiAwIDAgMSAuNTktMS40MSIgLz4KICA8cGF0aCBkPSJNMjkuNSAxMS41czUgNSA0IDUiIC8+CiAgPHBhdGggZD0iTTkgM2g2LjJhMiAyIDAgMCAxIDEuNC42bDMuOCAzLjhhMiAyIDAgMCAxIC42IDEuNFYxNSIgLz4KPC9zdmc+Cg==) - https://lucide.dev/icons/save-off\n * @see https://lucide.dev/guide/packages/lucide-react - Documentation\n *\n * @param {Object} props - Lucide icons props and any valid SVG attribute\n * @returns {JSX.Element} JSX Element\n *\n */\nconst SaveOff = createLucideIcon('SaveOff', [\n ['path', { d: 'M13 13H8a1 1 0 0 0-1 1v7', key: 'h8g396' }],\n ['path', { d: 'M14 8h1', key: '1lfen6' }],\n ['path', { d: 'M17 21v-4', key: '1yknxs' }],\n ['path', { d: 'm2 2 20 20', key: '1ooewy' }],\n [\n 'path',\n { d: 'M20.41 20.41A2 2 0 0 1 19 21H5a2 2 0 0 1-2-2V5a2 2 0 0 1 .59-1.41', key: '1t4vdl' },\n ],\n ['path', { d: 'M29.5 11.5s5 5 4 5', key: 'zzn4i6' }],\n ['path', { d: 'M9 3h6.2a2 2 0 0 1 1.4.6l3.8 3.8a2 2 0 0 1 .6 1.4V15', key: '24cby9' }],\n]);\n\nexport default SaveOff;\n"],"names":[],"mappings":";;;;;;;;;AAaM,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAU,iBAAiB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BAAqB;YAC3B,OAAO,EAAE,OAAO;SACnB,EACD,EAAE,YAAY,EAAE,EAAE,EAAE,CACvB,CAAC;QACF,OAAO,CAAC,GAAG,CAAC,mBAAmB,CAAC,CAAC;QAEjC,OAAO,CAAC,GAAG,CAAC,2BAA2B,CAAC,CAAC;QAEzC,MAAM,IAAI,CAAC,iBAAiB,CAAC,aAAa,CAAC,CAAC;QAE5C,yBAAyB;QACzB,MAAM,IAAI,CAAC,eAAe,EAAE,CAAC;IACjC,CAAC;IAED;;OAEG;IACH,KAAK,CAAC,eAAe;QACjB,OAAO,CAAC,GAAG,CAAC,wCAAwC,CAAC,CAAC;QACtD,OAAO,CAAC,GAAG,CAAC,WAAW,CAAC,CAAC;QACzB,OAAO,CAAC,GAAG,CAAC,+BAA+B,CAAC,CAAC;QAC7C,OAAO,CAAC,GAAG,CAAC,yCAAyC,CAAC,CAAC;QACvD,OAAO,CAAC,GAAG,CAAC,8EAA8E,CAAC,CAAC;QAC5F,OAAO,CAAC,GAAG,CAAC,0BAA0B,CAAC,CAAC;QACxC,OAAO,CAAC,GAAG,EAAE,CAAC;QAEd,OAAO,IAAI,EAAE,CAAC;YACV,IAAI,CAAC;gBACD,MAAM,OAAO,GAAG,MAAM,IAAI,CAAC,QAAQ,CAAC,OAAO,CAAC,CAAC;gBAE7C,IAAI,CAAC,OAAO,CAAC,Line truncated
@@ -0,0 +1,36 @@
/* eslint-disable react-hooks/rules-of-hooks */
import { useLayoutEffect } from '@radix-ui/react-use-layout-effect';
import * as React from 'react';
type AnyFunction = (...args: any[]) => any;
// See https://github.com/webpack/webpack/issues/14814
const useReactEffectEvent = (React as any)[' useEffectEvent '.trim().toString()];
const useReactInsertionEffect = (React as any)[' useInsertionEffect '.trim().toString()];
/**
* Designed to approximate the behavior on `experimental_useEffectEvent` as best
* as possible until its stable release, and back-fill it as a shim as needed.
*/
export function useEffectEvent<T extends AnyFunction>(callback?: T): T {
if (typeof useReactEffectEvent === 'function') {
return useReactEffectEvent(callback);
}
const ref = React.useRef<AnyFunction | undefined>(() => {
throw new Error('Cannot call an event handler while rendering.');
});
// See https://github.com/webpack/webpack/issues/14814
if (typeof useReactInsertionEffect === 'function') {
useReactInsertionEffect(() => {
ref.current = callback;
});
} else {
useLayoutEffect(() => {
ref.current = callback;
});
}
// https://github.com/facebook/react/issues/19240
return React.useMemo(() => ((...args) => ref.current?.(...args)) as T, []);
}
@@ -0,0 +1,21 @@
import { expect, expectTypeOf, test } from "vitest";
import * as z from "zod/v4";
const schema = z.nan();
test("passing validations", () => {
schema.parse(Number.NaN);
schema.parse(Number("Not a number"));
expectTypeOf<typeof schema._output>().toEqualTypeOf<number>();
});
test("failing validations", () => {
expect(() => schema.parse(5)).toThrow();
expect(() => schema.parse("John")).toThrow();
expect(() => schema.parse(true)).toThrow();
expect(() => schema.parse(null)).toThrow();
expect(() => schema.parse(undefined)).toThrow();
expect(() => schema.parse({})).toThrow();
expect(() => schema.parse([])).toThrow();
});
@@ -0,0 +1,87 @@
/**
* AJV-based JSON Schema validator provider
*/
import Ajv from 'ajv';
import _addFormats from 'ajv-formats';
function createDefaultAjvInstance() {
const ajv = new Ajv({
strict: false,
validateFormats: true,
validateSchema: false,
allErrors: true
});
const addFormats = _addFormats;
addFormats(ajv);
return ajv;
}
/**
* @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 class AjvJsonSchemaValidator {
/**
* 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) {
this._ajv = ajv ?? createDefaultAjvInstance();
}
/**
* 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(schema) {
// Check if schema has $id and is already compiled/cached
const ajvValidator = '$id' in schema && typeof schema.$id === 'string'
? (this._ajv.getSchema(schema.$id) ?? this._ajv.compile(schema))
: this._ajv.compile(schema);
return (input) => {
const valid = ajvValidator(input);
if (valid) {
return {
valid: true,
data: input,
errorMessage: undefined
};
}
else {
return {
valid: false,
data: undefined,
errorMessage: this._ajv.errorsText(ajvValidator.errors)
};
}
};
}
}
//# sourceMappingURL=ajv-provider.js.map
@@ -0,0 +1,18 @@
const createAxisDelta = () => ({
translate: 0,
scale: 1,
origin: 0,
originPoint: 0,
});
const createDelta = () => ({
x: createAxisDelta(),
y: createAxisDelta(),
});
const createAxis = () => ({ min: 0, max: 0 });
const createBox = () => ({
x: createAxis(),
y: createAxis(),
});
export { createAxis, createAxisDelta, createBox, createDelta };
//# sourceMappingURL=models.mjs.map
@@ -0,0 +1,89 @@
Object.defineProperties(exports, {
__esModule: { value: true },
[Symbol.toStringTag]: { value: "Module" }
});
const require_jsx_context = require("./context.js");
const require_jsx_children = require("./children.js");
const require_jsx_base = require("./base.js");
const require_jsx_hooks_index = require("./hooks/index.js");
const require_jsx_dom_hooks_index = require("./dom/hooks/index.js");
const require_jsx_streaming = require("./streaming.js");
const require_jsx_components = require("./components.js");
//#region src/jsx/index.ts
/**
* @module
* JSX for Hono.
*/
var jsx_default = {
version: require_jsx_base.reactAPICompatVersion,
memo: require_jsx_base.memo,
Fragment: require_jsx_base.Fragment,
StrictMode: require_jsx_base.Fragment,
isValidElement: require_jsx_base.isValidElement,
createElement: require_jsx_base.jsx,
cloneElement: require_jsx_base.cloneElement,
ErrorBoundary: require_jsx_components.ErrorBoundary,
createContext: require_jsx_context.createContext,
useContext: require_jsx_context.useContext,
useState: require_jsx_hooks_index.useState,
useEffect: require_jsx_hooks_index.useEffect,
useRef: require_jsx_hooks_index.useRef,
useCallback: require_jsx_hooks_index.useCallback,
useReducer: require_jsx_hooks_index.useReducer,
useId: require_jsx_hooks_index.useId,
useDebugValue: require_jsx_hooks_index.useDebugValue,
use: require_jsx_hooks_index.use,
startTransition: require_jsx_hooks_index.startTransition,
useTransition: require_jsx_hooks_index.useTransition,
useDeferredValue: require_jsx_hooks_index.useDeferredValue,
startViewTransition: require_jsx_hooks_index.startViewTransition,
useViewTransition: require_jsx_hooks_index.useViewTransition,
useMemo: require_jsx_hooks_index.useMemo,
useLayoutEffect: require_jsx_hooks_index.useLayoutEffect,
useInsertionEffect: require_jsx_hooks_index.useInsertionEffect,
createRef: require_jsx_hooks_index.createRef,
forwardRef: require_jsx_hooks_index.forwardRef,
useImperativeHandle: require_jsx_hooks_index.useImperativeHandle,
useSyncExternalStore: require_jsx_hooks_index.useSyncExternalStore,
useActionState: require_jsx_dom_hooks_index.useActionState,
useOptimistic: require_jsx_dom_hooks_index.useOptimistic,
Suspense: require_jsx_streaming.Suspense,
Children: require_jsx_children.Children
};
//#endregion
exports.Children = require_jsx_children.Children;
exports.ErrorBoundary = require_jsx_components.ErrorBoundary;
exports.Fragment = require_jsx_base.Fragment;
exports.StrictMode = require_jsx_base.Fragment;
exports.Suspense = require_jsx_streaming.Suspense;
exports.cloneElement = require_jsx_base.cloneElement;
exports.createContext = require_jsx_context.createContext;
exports.createElement = require_jsx_base.jsx;
exports.jsx = require_jsx_base.jsx;
exports.createRef = require_jsx_hooks_index.createRef;
exports.default = jsx_default;
exports.forwardRef = require_jsx_hooks_index.forwardRef;
exports.isValidElement = require_jsx_base.isValidElement;
exports.memo = require_jsx_base.memo;
exports.startTransition = require_jsx_hooks_index.startTransition;
exports.startViewTransition = require_jsx_hooks_index.startViewTransition;
exports.use = require_jsx_hooks_index.use;
exports.useActionState = require_jsx_dom_hooks_index.useActionState;
exports.useCallback = require_jsx_hooks_index.useCallback;
exports.useContext = require_jsx_context.useContext;
exports.useDebugValue = require_jsx_hooks_index.useDebugValue;
exports.useDeferredValue = require_jsx_hooks_index.useDeferredValue;
exports.useEffect = require_jsx_hooks_index.useEffect;
exports.useId = require_jsx_hooks_index.useId;
exports.useImperativeHandle = require_jsx_hooks_index.useImperativeHandle;
exports.useInsertionEffect = require_jsx_hooks_index.useInsertionEffect;
exports.useLayoutEffect = require_jsx_hooks_index.useLayoutEffect;
exports.useMemo = require_jsx_hooks_index.useMemo;
exports.useOptimistic = require_jsx_dom_hooks_index.useOptimistic;
exports.useReducer = require_jsx_hooks_index.useReducer;
exports.useRef = require_jsx_hooks_index.useRef;
exports.useState = require_jsx_hooks_index.useState;
exports.useSyncExternalStore = require_jsx_hooks_index.useSyncExternalStore;
exports.useTransition = require_jsx_hooks_index.useTransition;
exports.useViewTransition = require_jsx_hooks_index.useViewTransition;
exports.version = require_jsx_base.reactAPICompatVersion;
@@ -0,0 +1 @@
{"version":3,"file":"index.js","sourceRoot":"https://raw.githubusercontent.com/fb55/entities/61afd4701eaa736978b13c7351cd3de9a96b04bc/src/","sources":["index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,SAAS,EAAE,UAAU,EAAE,YAAY,EAAE,MAAM,aAAa,CAAC;AAClE,OAAO,EAAE,UAAU,EAAE,kBAAkB,EAAE,MAAM,aAAa,CAAC;AAC7D,OAAO,EACH,SAAS,EACT,UAAU,EACV,eAAe,EACf,UAAU,GACb,MAAM,aAAa,CAAC;AAErB,wCAAwC;AACxC,MAAM,CAAN,IAAY,WAKX;AALD,WAAY,WAAW;IACnB,iCAAiC;IACjC,2CAAO,CAAA;IACP,mEAAmE;IACnE,6CAAQ,CAAA;AACZ,CAAC,EALW,WAAW,KAAX,WAAW,QAKtB;AAED,MA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AY,EAAE,EAAC,KAAK,EAAE,IAAI,EAAC,CAAC,CAAA;AAE3D,kBAAe,OAAO,CAAA;AAyBtB,+CAA6C;AAArC,sGAAA,UAAU,OAAA;AAIlB,6CAA6F;AAArF,4FAAA,CAAC,OAAA;AAAE,8FAAA,GAAG,OAAA;AAAE,oGAAA,SAAS,OAAA;AAAE,8FAAA,GAAG,OAAA;AAAE,+FAAA,IAAI,OAAA;AAAQ,kGAAA,OAAO,OAAA;AACnD,+DAAqE;AAA7D,mHAAA,OAAO,OAAmB;AAClC,iDAA8D;AAAtD,4GAAA,OAAO,OAAmB"}
@@ -0,0 +1 @@
{"version":3,"file":"bus.js","sources":["../../../src/icons/bus.ts"],"sourcesContent":["import createLucideIcon from '../createLucideIcon';\n\n/**\n * @component @name Bus\n * @description Lucide SVG icon component, renders SVG Element with children.\n *\n * @preview ![img](data:image/svg+xml;base64,PHN2ZyAgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIgogIHdpZHRoPSIyNCIKICBoZWlnaHQ9IjI0IgogIHZpZXdCb3g9IjAgMCAyNCAyNCIKICBmaWxsPSJub25lIgogIHN0cm9rZT0iIzAwMCIgc3R5bGU9ImJhY2tncm91bmQtY29sb3I6ICNmZmY7IGJvcmRlci1yYWRpdXM6IDJweCIKICBzdHJva2Utd2lkdGg9IjIiCiAgc3Ryb2tlLWxpbmVjYXA9InJvdW5kIgogIHN0cm9rZS1saW5lam9pbj0icm91bmQiCj4KICA8cGF0aCBkPSJNOCA2djYiIC8+CiAgPHBhdGggZD0iTTE1IDZ2NiIgLz4KICA8cGF0aCBkPSJNMiAxMmgxOS42IiAvPgogIDxwYXRoIGQ9Ik0xOCAxOGgzcy41LTEuNy44LTIuOGMuMS0uNC4yLS44LjItMS4yIDAtLjQtLjEtLjgtLjItMS4ybC0xLjQtNUMyMC4xIDYuOCAxOS4xIDYgMTggNkg0YTIgMiAwIDAgMC0yIDJ2MTBoMyIgLz4KICA8Y2lyY2xlIGN4PSI3IiBjeT0iMTgiIHI9IjIiIC8+CiAgPHBhdGggZD0iTTkgMThoNSIgLz4KICA8Y2lyY2xlIGN4PSIxNiIgY3k9IjE4IiByPSIyIiAvPgo8L3N2Zz4K) - https://lucide.dev/icons/bus\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 Bus = createLucideIcon('Bus', [\n ['path', { d: 'M8 6v6', key: '18i7km' }],\n ['path', { d: 'M15 6v6', key: '1sg6z9' }],\n ['path', { d: 'M2 12h19.6', key: 'de5uta' }],\n [\n 'path',\n {\n d: 'M18 18h3s.5-1.7.8-2.8c.1-.4.2-.8.2-1.2 0-.4-.1-.8-.2-1.2l-1.4-5C20.1 6.8 19.1 6 18 6H4a2 2 0 0 0-2 2v10h3',\n key: '1wwztk',\n },\n ],\n ['circle', { cx: '7', cy: '18', r: '2', key: '19iecd' }],\n ['path', { d: 'M9 18h5', key: 'lrx6i' }],\n ['circle', { cx: '16', cy: '18', r: '2', key: '1v4tcr' }],\n]);\n\nexport default Bus;\n"],"names":[],"mappings":";;;;;;;;;AAaM,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAM,iBAAiB,KAAO,CAAA,CAAA,CAAA;AAAA,CAAA,CAClC,CAAC,CAAA,CAAA,CAAA,CAAA,CAAA,CAAQ,CAAA,CAAA,CAAA,CAAE,GAAG,CAAU,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAK,UAAU,CAAA,CAAA;AAAA,CAAA,CACvC,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,C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,CAAA,CAAA;AAAA,CACA,CAAA,CAAC,QAAU,CAAA,CAAA,CAAA,CAAE,EAAI,CAAA,CAAA,CAAA,CAAA,CAAA,EAAK,CAAI,CAAA,CAAA,CAAA,IAAA,CAAM,CAAA,CAAG,EAAA,CAAA,CAAA,CAAA,CAAA,CAAK,GAAK,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,EAAU,CAAA,CAAA;AAAA,CAAA,CACvD,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,SAAS,CAAA,CAAA;AAAA,CACvC,CAAA,CAAC,QAAU,CAAA,CAAA,CAAA,CAAE,EAAI,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,EAAM,CAAI,CAAA,CAAA,CAAA,IAAA,CAAM,CAAA,CAAG,EAAA,CAAA,CAAA,CAAA,CAAA,CAAK,GAAK,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,EAAU,CAAA;AAC1D,CAAC,CAAA,CAAA;;"}
@@ -0,0 +1,122 @@
"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
exports.JSONSchemaGenerator = void 0;
const json_schema_processors_js_1 = require("./json-schema-processors.cjs");
const to_json_schema_js_1 = require("./to-json-schema.cjs");
/**
* Legacy class-based interface for JSON Schema generation.
* This class wraps the new functional implementation to provide backward compatibility.
*
* @deprecated Use the `toJSONSchema` function instead for new code.
*
* @example
* ```typescript
* // Legacy usage (still supported)
* const gen = new JSONSchemaGenerator({ target: "draft-07" });
* gen.process(schema);
* const result = gen.emit(schema);
*
* // Preferred modern usage
* const result = toJSONSchema(schema, { target: "draft-07" });
* ```
*/
class JSONSchemaGenerator {
/** @deprecated Access via ctx instead */
get metadataRegistry() {
return this.ctx.metadataRegistry;
}
/** @deprecated Access via ctx instead */
get target() {
return this.ctx.target;
}
// annotated so the .d.cts emits an indexed access rather than an inline `import()` of an ESM path
/** @deprecated Access via ctx instead */
get unrepresentable() {
return this.ctx.unrepresentable;
}
/** @deprecated Access via ctx instead */
get override() {
return this.ctx.override;
}
/** @deprecated Access via ctx instead */
get io() {
return this.ctx.io;
}
/** @deprecated Access via ctx instead */
get counter() {
return this.ctx.counter;
}
set counter(value) {
this.ctx.counter = value;
}
/** @deprecated Access via ctx instead */
get seen() {
return this.ctx.seen;
}
constructor(params) {
// Normalize target for internal context
let normalizedTarget = params?.target ?? "draft-2020-12";
if (normalizedTarget === "draft-4")
normalizedTarget = "draft-04";
if (normalizedTarget === "draft-7")
normalizedTarget = "draft-07";
this.ctx = (0, to_json_schema_js_1.initializeContext)({
processors: json_schema_processors_js_1.allProcessors,
target: normalizedTarget,
...(params?.metadata && { metadata: params.metadata }),
...(params?.unrepresentable && { unrepresentable: params.unrepresentable }),
...(params?.override && { override: params.override }),
...(params?.io && { io: params.io }),
});
}
/**
* Process a schema to prepare it for JSON Schema generation.
* This must be called before emit().
*/
process(schema, _params = { path: [], schemaPath: [] }) {
return (0, to_json_schema_js_1.processSchema)(schema, this.ctx, _params);
}
/**
* Emit the final JSON Schema after processing.
* Must call process() first.
*/
emit(schema, _params) {
// Apply emit params to the context
if (_params) {
if (_params.cycles)
this.ctx.cycles = _params.cycles;
if (_params.reused)
this.ctx.reused = _params.reused;
if (_params.external)
this.ctx.external = _params.external;
}
// extractDefs/finalize skip their whole-map passes when they have already run for this `external`, but they also branch on `cycles`, `reused`, `seen.count` and the metadata registry — any of which can change between emits, including with no params at all. Drop the guards so the passes re-run. The registry conversion calls extractDefs/finalize directly and never routes through here, so it keeps skipping them.
this.ctx.sharedDefsExtractedFor = undefined;
this.ctx.sharedEmitDoneFor = undefined;
(0, to_json_schema_js_1.extractDefs)(this.ctx, schema);
const result = (0, to_json_schema_js_1.finalize)(this.ctx, schema);
// Strip ~standard property to match old implementation's return type
const { "~standard": _, ...plainResult } = result;
return plainResult;
}
}
exports.JSONSchemaGenerator = JSONSchemaGenerator;
// seal-cjs-exports
(function () {
var keys = Object.getOwnPropertyNames(exports);
for (var i = 0; i < keys.length; i++) {
var desc = Object.getOwnPropertyDescriptor(exports, keys[i]);
if (!desc || !desc.get || !desc.configurable) continue;
var value;
try {
value = desc.get();
} catch (e) {
continue;
}
// a circular require may not have settled this one yet, so leave it live
if (value === undefined) continue;
Object.defineProperty(exports, keys[i], { value: value, writable: false, enumerable: desc.enumerable, configurable: false });
}
Object.freeze(exports);
})();
@@ -0,0 +1,45 @@
import * as React from 'react';
import { assignRef } from './assignRef';
import { useCallbackRef } from './useRef';
var useIsomorphicLayoutEffect = typeof window !== 'undefined' ? React.useLayoutEffect : React.useEffect;
var currentValues = new WeakMap();
/**
* Merges two or more refs together providing a single interface to set their value
* @param {RefObject|Ref} refs
* @returns {MutableRefObject} - a new ref, which translates all changes to {refs}
*
* @see {@link mergeRefs} a version without buit-in memoization
* @see https://github.com/theKashey/use-callback-ref#usemergerefs
* @example
* const Component = React.forwardRef((props, ref) => {
* const ownRef = useRef();
* const domRef = useMergeRefs([ref, ownRef]); // 👈 merge together
* return <div ref={domRef}>...</div>
* }
*/
export function useMergeRefs(refs, defaultValue) {
var callbackRef = useCallbackRef(defaultValue || null, function (newValue) {
return refs.forEach(function (ref) { return assignRef(ref, newValue); });
});
// handle refs changes - added or removed
useIsomorphicLayoutEffect(function () {
var oldValue = currentValues.get(callbackRef);
if (oldValue) {
var prevRefs_1 = new Set(oldValue);
var nextRefs_1 = new Set(refs);
var current_1 = callbackRef.current;
prevRefs_1.forEach(function (ref) {
if (!nextRefs_1.has(ref)) {
assignRef(ref, null);
}
});
nextRefs_1.forEach(function (ref) {
if (!prevRefs_1.has(ref)) {
assignRef(ref, current_1);
}
});
}
currentValues.set(callbackRef, refs);
}, [refs]);
return callbackRef;
}
@@ -0,0 +1 @@
{"version":3,"file":"scroll-text.js","sources":["../../../src/icons/scroll-text.ts"],"sourcesContent":["import createLucideIcon from '../createLucideIcon';\n\n/**\n * @component @name ScrollText\n * @description Lucide SVG icon component, renders SVG Element with children.\n *\n * @preview ![img](data:image/svg+xml;base64,PHN2ZyAgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIgogIHdpZHRoPSIyNCIKICBoZWlnaHQ9IjI0IgogIHZpZXdCb3g9IjAgMCAyNCAyNCIKICBmaWxsPSJub25lIgogIHN0cm9rZT0iIzAwMCIgc3R5bGU9ImJhY2tncm91bmQtY29sb3I6ICNmZmY7IGJvcmRlci1yYWRpdXM6IDJweCIKICBzdHJva2Utd2lkdGg9IjIiCiAgc3Ryb2tlLWxpbmVjYXA9InJvdW5kIgogIHN0cm9rZS1saW5lam9pbj0icm91bmQiCj4KICA8cGF0aCBkPSJNMTUgMTJoLTUiIC8+CiAgPHBhdGggZD0iTTE1IDhoLTUiIC8+CiAgPHBhdGggZD0iTTE5IDE3VjVhMiAyIDAgMCAwLTItMkg0IiAvPgogIDxwYXRoIGQ9Ik04IDIxaDEyYTIgMiAwIDAgMCAyLTJ2LTFhMSAxIDAgMCAwLTEtMUgxMWExIDEgMCAwIDAtMSAxdjFhMiAyIDAgMSAxLTQgMFY1YTIgMiAwIDEgMC00IDB2MmExIDEgMCAwIDAgMSAxaDMiIC8+Cjwvc3ZnPgo=) - https://lucide.dev/icons/scroll-text\n * @see https://lucide.dev/guide/packages/lucide-react - Documentation\n *\n * @param {Object} props - Lucide icons props and any valid SVG attribute\n * @returns {JSX.Element} JSX Element\n *\n */\nconst ScrollText = createLucideIcon('ScrollText', [\n ['path', { d: 'M15 12h-5', key: 'r7krc0' }],\n ['path', { d: 'M15 8h-5', key: '1khuty' }],\n ['path', { d: 'M19 17V5a2 2 0 0 0-2-2H4', key: 'zz82l3' }],\n [\n 'path',\n {\n d: 'M8 21h12a2 2 0 0 0 2-2v-1a1 1 0 0 0-1-1H11a1 1 0 0 0-1 1v1a2 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CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA;AAAA,CACH,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAK,EAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA;AAAA,CACP,CAAA,CAAA,CAAA,CAAA;AAAA,CACF,CAAA,CAAA;AACF,CAAC,CAAA,CAAA;;"}
@@ -0,0 +1,58 @@
1.3.3 / 2019-04-15
==================
* Fix Node.js 0.8 return value inconsistencies
1.3.2 / 2017-09-09
==================
* perf: reduce overhead for full URLs
* perf: unroll the "fast-path" `RegExp`
1.3.1 / 2016-01-17
==================
* perf: enable strict mode
1.3.0 / 2014-08-09
==================
* Add `parseurl.original` for parsing `req.originalUrl` with fallback
* Return `undefined` if `req.url` is `undefined`
1.2.0 / 2014-07-21
==================
* Cache URLs based on original value
* Remove no-longer-needed URL mis-parse work-around
* Simplify the "fast-path" `RegExp`
1.1.3 / 2014-07-08
==================
* Fix typo
1.1.2 / 2014-07-08
==================
* Seriously fix Node.js 0.8 compatibility
1.1.1 / 2014-07-08
==================
* Fix Node.js 0.8 compatibility
1.1.0 / 2014-07-08
==================
* Incorporate URL href-only parse fast-path
1.0.1 / 2014-03-08
==================
* Add missing `require`
1.0.0 / 2014-03-08
==================
* Genesis from `connect`
@@ -0,0 +1,13 @@
"use strict";
// THIS CODE WAS AUTOMATICALLY GENERATED
// DO NOT EDIT THIS CODE BY HAND
// RUN THE FOLLOWING COMMAND FROM THE WORKSPACE ROOT TO REGENERATE:
// npx nx generate-lib repo
Object.defineProperty(exports, "__esModule", { value: true });
exports.esnext_date = void 0;
const base_config_1 = require("./base-config");
const esnext_temporal_1 = require("./esnext.temporal");
exports.esnext_date = {
libs: [esnext_temporal_1.esnext_temporal],
variables: [['Date', base_config_1.TYPE]],
};
@@ -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 SquareUser = createLucideIcon("SquareUser", [
["rect", { width: "18", height: "18", x: "3", y: "3", rx: "2", key: "afitv7" }],
["circle", { cx: "12", cy: "10", r: "3", key: "ilqhr7" }],
["path", { d: "M7 21v-2a2 2 0 0 1 2-2h6a2 2 0 0 1 2 2v2", key: "1m6ac2" }]
]);
export { SquareUser as default };
//# sourceMappingURL=square-user.js.map
@@ -0,0 +1,411 @@
import type Ajv from "../../core"
import type {SchemaObject} from "../../types"
import {jtdForms, JTDForm, SchemaObjectMap} from "./types"
import {SchemaEnv, getCompilingSchema} from ".."
import {_, str, and, or, nil, not, CodeGen, Code, Name, SafeExpr} from "../codegen"
import MissingRefError from "../ref_error"
import N from "../names"
import {hasPropFunc} from "../../vocabularies/code"
import {hasRef} from "../../vocabularies/jtd/ref"
import {intRange, IntType} from "../../vocabularies/jtd/type"
import {parseJson, parseJsonNumber, parseJsonString} from "../../runtime/parseJson"
import {useFunc} from "../util"
import validTimestamp from "../../runtime/timestamp"
type GenParse = (cxt: ParseCxt) => void
const genParse: {[F in JTDForm]: GenParse} = {
elements: parseElements,
values: parseValues,
discriminator: parseDiscriminator,
properties: parseProperties,
optionalProperties: parseProperties,
enum: parseEnum,
type: parseType,
ref: parseRef,
}
interface ParseCxt {
readonly gen: CodeGen
readonly self: Ajv // current Ajv instance
readonly schemaEnv: SchemaEnv
readonly definitions: SchemaObjectMap
schema: SchemaObject
data: Code
parseName: Name
char: Name
}
export default function compileParser(
this: Ajv,
sch: SchemaEnv,
definitions: SchemaObjectMap
): SchemaEnv {
const _sch = getCompilingSchema.call(this, sch)
if (_sch) return _sch
const {es5, lines} = this.opts.code
const {ownProperties} = this.opts
const gen = new CodeGen(this.scope, {es5, lines, ownProperties})
const parseName = gen.scopeName("parse")
const cxt: ParseCxt = {
self: this,
gen,
schema: sch.schema as SchemaObject,
schemaEnv: sch,
definitions,
data: N.data,
parseName,
char: gen.name("c"),
}
let sourceCode: string | undefined
try {
this._compilations.add(sch)
sch.parseName = parseName
parserFunction(cxt)
gen.optimize(this.opts.code.optimize)
const parseFuncCode = gen.toString()
sourceCode = `${gen.scopeRefs(N.scope)}return ${parseFuncCode}`
const makeParse = new Function(`${N.scope}`, sourceCode)
const parse: (json: string) => unknown = makeParse(this.scope.get())
this.scope.value(parseName, {ref: parse})
sch.parse = parse
} catch (e) {
if (sourceCode) this.logger.error("Error compiling parser, function code:", sourceCode)
delete sch.parse
delete sch.parseName
throw e
} finally {
this._compilations.delete(sch)
}
return sch
}
const undef = _`undefined`
function parserFunction(cxt: ParseCxt): void {
const {gen, parseName, char} = cxt
gen.func(parseName, _`${N.json}, ${N.jsonPos}, ${N.jsonPart}`, false, () => {
gen.let(N.data)
gen.let(char)
gen.assign(_`${parseName}.message`, undef)
gen.assign(_`${parseName}.position`, undef)
gen.assign(N.jsonPos, _`${N.jsonPos} || 0`)
gen.const(N.jsonLen, _`${N.json}.length`)
parseCode(cxt)
skipWhitespace(cxt)
gen.if(N.jsonPart, () => {
gen.assign(_`${parseName}.position`, N.jsonPos)
gen.return(N.data)
})
gen.if(_`${N.jsonPos} === ${N.jsonLen}`, () => gen.return(N.data))
jsonSyntaxError(cxt)
})
}
function parseCode(cxt: ParseCxt): void {
let form: JTDForm | undefined
for (const key of jtdForms) {
if (key in cxt.schema) {
form = key
break
}
}
if (form) parseNullable(cxt, genParse[form])
else parseEmpty(cxt)
}
const parseBoolean = parseBooleanToken(true, parseBooleanToken(false, jsonSyntaxError))
function parseNullable(cxt: ParseCxt, parseForm: GenParse): void {
const {gen, schema, data} = cxt
if (!schema.nullable) return parseForm(cxt)
tryParseToken(cxt, "null", parseForm, () => gen.assign(data, null))
}
function parseElements(cxt: ParseCxt): void {
const {gen, schema, data} = cxt
parseToken(cxt, "[")
const ix = gen.let("i", 0)
gen.assign(data, _`[]`)
parseItems(cxt, "]", () => {
const el = gen.let("el")
parseCode({...cxt, schema: schema.elements, data: el})
gen.assign(_`${data}[${ix}++]`, el)
})
}
function parseValues(cxt: ParseCxt): void {
const {gen, schema, data} = cxt
parseToken(cxt, "{")
gen.assign(data, _`{}`)
parseItems(cxt, "}", () => parseKeyValue(cxt, schema.values))
}
function parseItems(cxt: ParseCxt, endToken: string, block: () => void): void {
tryParseItems(cxt, endToken, block)
parseToken(cxt, endToken)
}
function tryParseItems(cxt: ParseCxt, endToken: string, block: () => void): void {
const {gen} = cxt
gen.for(_`;${N.jsonPos}<${N.jsonLen} && ${jsonSlice(1)}!==${endToken};`, () => {
block()
tryParseToken(cxt, ",", () => gen.break(), hasItem)
})
function hasItem(): void {
tryParseToken(cxt, endToken, () => {}, jsonSyntaxError)
}
}
function parseKeyValue(cxt: ParseCxt, schema: SchemaObject): void {
const {gen} = cxt
const key = gen.let("key")
parseString({...cxt, data: key})
parseToken(cxt, ":")
parsePropertyValue(cxt, key, schema)
}
function parseDiscriminator(cxt: ParseCxt): void {
const {gen, data, schema} = cxt
const {discriminator, mapping} = schema
parseToken(cxt, "{")
gen.assign(data, _`{}`)
const startPos = gen.const("pos", N.jsonPos)
const value = gen.let("value")
const tag = gen.let("tag")
tryParseItems(cxt, "}", () => {
const key = gen.let("key")
parseString({...cxt, data: key})
parseToken(cxt, ":")
gen.if(
_`${key} === ${discriminator}`,
() => {
parseString({...cxt, data: tag})
gen.assign(_`${data}[${key}]`, tag)
gen.break()
},
() => parseEmpty({...cxt, data: value}) // can be discarded/skipped
)
})
gen.assign(N.jsonPos, startPos)
gen.if(_`${tag} === undefined`)
parsingError(cxt, str`discriminator tag not found`)
for (const tagValue in mapping) {
gen.elseIf(_`${tag} === ${tagValue}`)
parseSchemaProperties({...cxt, schema: mapping[tagValue]}, discriminator)
}
gen.else()
parsingError(cxt, str`discriminator value not in schema`)
gen.endIf()
}
function parseProperties(cxt: ParseCxt): void {
const {gen, data} = cxt
parseToken(cxt, "{")
gen.assign(data, _`{}`)
parseSchemaProperties(cxt)
}
function parseSchemaProperties(cxt: ParseCxt, discriminator?: string): void {
const {gen, schema, data} = cxt
const {properties, optionalProperties, additionalProperties} = schema
parseItems(cxt, "}", () => {
const key = gen.let("key")
parseString({...cxt, data: key})
parseToken(cxt, ":")
gen.if(false)
parseDefinedProperty(cxt, key, properties)
parseDefinedProperty(cxt, key, optionalProperties)
if (discriminator) {
gen.elseIf(_`${key} === ${discriminator}`)
const tag = gen.let("tag")
parseString({...cxt, data: tag}) // can be discarded, it is already assigned
}
gen.else()
if (additionalProperties) {
parseEmpty({...cxt, data: _`${data}[${key}]`})
} else {
parsingError(cxt, str`property ${key} not allowed`)
}
gen.endIf()
})
if (properties) {
const hasProp = hasPropFunc(gen)
const allProps: Code = and(
...Object.keys(properties).map((p): Code => _`${hasProp}.call(${data}, ${p})`)
)
gen.if(not(allProps), () => parsingError(cxt, str`missing required properties`))
}
}
function parseDefinedProperty(cxt: ParseCxt, key: Name, schemas: SchemaObjectMap = {}): void {
const {gen} = cxt
for (const prop in schemas) {
gen.elseIf(_`${key} === ${prop}`)
parsePropertyValue(cxt, key, schemas[prop] as SchemaObject)
}
}
function parsePropertyValue(cxt: ParseCxt, key: Name, schema: SchemaObject): void {
parseCode({...cxt, schema, data: _`${cxt.data}[${key}]`})
}
function parseType(cxt: ParseCxt): void {
const {gen, schema, data, self} = cxt
switch (schema.type) {
case "boolean":
parseBoolean(cxt)
break
case "string":
parseString(cxt)
break
case "timestamp": {
parseString(cxt)
const vts = useFunc(gen, validTimestamp)
const {allowDate, parseDate} = self.opts
const notValid = allowDate ? _`!${vts}(${data}, true)` : _`!${vts}(${data})`
const fail: Code = parseDate
? or(notValid, _`(${data} = new Date(${data}), false)`, _`isNaN(${data}.valueOf())`)
: notValid
gen.if(fail, () => parsingError(cxt, str`invalid timestamp`))
break
}
case "float32":
case "float64":
parseNumber(cxt)
break
default: {
const t = schema.type as IntType
if (!self.opts.int32range && (t === "int32" || t === "uint32")) {
parseNumber(cxt, 16) // 2 ** 53 - max safe integer
if (t === "uint32") {
gen.if(_`${data} < 0`, () => parsingError(cxt, str`integer out of range`))
}
} else {
const [min, max, maxDigits] = intRange[t]
parseNumber(cxt, maxDigits)
gen.if(_`${data} < ${min} || ${data} > ${max}`, () =>
parsingError(cxt, str`integer out of range`)
)
}
}
}
}
function parseString(cxt: ParseCxt): void {
parseToken(cxt, '"')
parseWith(cxt, parseJsonString)
}
function parseEnum(cxt: ParseCxt): void {
const {gen, data, schema} = cxt
const enumSch = schema.enum
parseToken(cxt, '"')
// TODO loopEnum
gen.if(false)
for (const value of enumSch) {
const valueStr = JSON.stringify(value).slice(1) // remove starting quote
gen.elseIf(_`${jsonSlice(valueStr.length)} === ${valueStr}`)
gen.assign(data, str`${value}`)
gen.add(N.jsonPos, valueStr.length)
}
gen.else()
jsonSyntaxError(cxt)
gen.endIf()
}
function parseNumber(cxt: ParseCxt, maxDigits?: number): void {
const {gen} = cxt
skipWhitespace(cxt)
gen.if(
_`"-0123456789".indexOf(${jsonSlice(1)}) < 0`,
() => jsonSyntaxError(cxt),
() => parseWith(cxt, parseJsonNumber, maxDigits)
)
}
function parseBooleanToken(bool: boolean, fail: GenParse): GenParse {
return (cxt) => {
const {gen, data} = cxt
tryParseToken(
cxt,
`${bool}`,
() => fail(cxt),
() => gen.assign(data, bool)
)
}
}
function parseRef(cxt: ParseCxt): void {
const {gen, self, definitions, schema, schemaEnv} = cxt
const {ref} = schema
const refSchema = definitions[ref]
if (!refSchema) throw new MissingRefError(self.opts.uriResolver, "", ref, `No definition ${ref}`)
if (!hasRef(refSchema)) return parseCode({...cxt, schema: refSchema})
const {root} = schemaEnv
const sch = compileParser.call(self, new SchemaEnv({schema: refSchema, root}), definitions)
partialParse(cxt, getParser(gen, sch), true)
}
function getParser(gen: CodeGen, sch: SchemaEnv): Code {
return sch.parse
? gen.scopeValue("parse", {ref: sch.parse})
: _`${gen.scopeValue("wrapper", {ref: sch})}.parse`
}
function parseEmpty(cxt: ParseCxt): void {
parseWith(cxt, parseJson)
}
function parseWith(cxt: ParseCxt, parseFunc: {code: string}, args?: SafeExpr): void {
partialParse(cxt, useFunc(cxt.gen, parseFunc), args)
}
function partialParse(cxt: ParseCxt, parseFunc: Name, args?: SafeExpr): void {
const {gen, data} = cxt
gen.assign(data, _`${parseFunc}(${N.json}, ${N.jsonPos}${args ? _`, ${args}` : nil})`)
gen.assign(N.jsonPos, _`${parseFunc}.position`)
gen.if(_`${data} === undefined`, () => parsingError(cxt, _`${parseFunc}.message`))
}
function parseToken(cxt: ParseCxt, tok: string): void {
tryParseToken(cxt, tok, jsonSyntaxError)
}
function tryParseToken(cxt: ParseCxt, tok: string, fail: GenParse, success?: GenParse): void {
const {gen} = cxt
const n = tok.length
skipWhitespace(cxt)
gen.if(
_`${jsonSlice(n)} === ${tok}`,
() => {
gen.add(N.jsonPos, n)
success?.(cxt)
},
() => fail(cxt)
)
}
function skipWhitespace({gen, char: c}: ParseCxt): void {
gen.code(
_`while((${c}=${N.json}[${N.jsonPos}],${c}===" "||${c}==="\\n"||${c}==="\\r"||${c}==="\\t"))${N.jsonPos}++;`
)
}
function jsonSlice(len: number | Name): Code {
return len === 1
? _`${N.json}[${N.jsonPos}]`
: _`${N.json}.slice(${N.jsonPos}, ${N.jsonPos}+${len})`
}
function jsonSyntaxError(cxt: ParseCxt): void {
parsingError(cxt, _`"unexpected token " + ${N.json}[${N.jsonPos}]`)
}
function parsingError({gen, parseName}: ParseCxt, msg: Code): void {
gen.assign(_`${parseName}.message`, msg)
gen.assign(_`${parseName}.position`, N.jsonPos)
gen.return(undef)
}
@@ -0,0 +1,83 @@
// import type { StandardSchemaV1 } from "@standard-schema/spec";
// @ts-ignore TS6133
import { expect, test } from "vitest";
import * as z from "zod/v3";
import { util } from "../helpers/util.js";
import type { StandardSchemaV1 } from "../standard-schema.js";
test("assignability", () => {
const _s1: StandardSchemaV1 = z.string();
const _s2: StandardSchemaV1<string> = z.string();
const _s3: StandardSchemaV1<string, string> = z.string();
const _s4: StandardSchemaV1<unknown, string> = z.string();
[_s1, _s2, _s3, _s4];
});
test("type inference", () => {
const stringToNumber = z.string().transform((x) => x.length);
type input = StandardSchemaV1.InferInput<typeof stringToNumber>;
util.assertEqual<input, string>(true);
type output = StandardSchemaV1.InferOutput<typeof stringToNumber>;
util.assertEqual<output, number>(true);
});
test("valid parse", () => {
const schema = z.string();
const result = schema["~standard"].validate("hello");
if (result instanceof Promise) {
throw new Error("Expected sync result");
}
expect(result.issues).toEqual(undefined);
if (result.issues) {
throw new Error("Expected no issues");
} else {
expect(result.value).toEqual("hello");
}
});
test("invalid parse", () => {
const schema = z.string();
const result = schema["~standard"].validate(1234);
if (result instanceof Promise) {
throw new Error("Expected sync result");
}
expect(result.issues).toBeDefined();
if (!result.issues) {
throw new Error("Expected issues");
}
expect(result.issues.length).toEqual(1);
expect(result.issues[0].path).toEqual([]);
});
test("valid parse async", async () => {
const schema = z.string().refine(async () => true);
const _result = schema["~standard"].validate("hello");
if (_result instanceof Promise) {
const result = await _result;
expect(result.issues).toEqual(undefined);
if (result.issues) {
throw new Error("Expected no issues");
} else {
expect(result.value).toEqual("hello");
}
} else {
throw new Error("Expected async result");
}
});
test("invalid parse async", async () => {
const schema = z.string().refine(async () => false);
const _result = schema["~standard"].validate("hello");
if (_result instanceof Promise) {
const result = await _result;
expect(result.issues).toBeDefined();
if (!result.issues) {
throw new Error("Expected issues");
}
expect(result.issues.length).toEqual(1);
expect(result.issues[0].path).toEqual([]);
} else {
throw new Error("Expected async result");
}
});
@@ -0,0 +1 @@
{"version":3,"file":"scale-3-d.js","sources":[],"sourcesContent":[],"names":[],"mappings":";;;;;;;"}
@@ -0,0 +1,365 @@
/**
* @fileoverview disallow assignments that can lead to race conditions due to usage of `await` or `yield`
* @author Teddy Katz
* @author Toru Nagashima
*/
"use strict";
/**
* Make the map from identifiers to each reference.
* @param {escope.Scope} scope The scope to get references.
* @param {Map<Identifier, escope.Reference>} [outReferenceMap] The map from identifier nodes to each reference object.
* @returns {Map<Identifier, escope.Reference>} `referenceMap`.
*/
function createReferenceMap(scope, outReferenceMap = new Map()) {
for (const reference of scope.references) {
if (reference.resolved === null) {
continue;
}
outReferenceMap.set(reference.identifier, reference);
}
for (const childScope of scope.childScopes) {
if (childScope.type !== "function") {
createReferenceMap(childScope, outReferenceMap);
}
}
return outReferenceMap;
}
/**
* Get `reference.writeExpr` of a given reference.
* If it's the read reference of MemberExpression in LHS, returns RHS in order to address `a.b = await a`
* @param {escope.Reference} reference The reference to get.
* @returns {Expression|null} The `reference.writeExpr`.
*/
function getWriteExpr(reference) {
if (reference.writeExpr) {
return reference.writeExpr;
}
let node = reference.identifier;
while (node) {
const t = node.parent.type;
if (t === "AssignmentExpression" && node.parent.left === node) {
return node.parent.right;
}
if (t === "MemberExpression" && node.parent.object === node) {
node = node.parent;
continue;
}
break;
}
return null;
}
/**
* Checks if an expression is a variable that can only be observed within the given function.
* @param {Variable|null} variable The variable to check
* @param {boolean} isMemberAccess If `true` then this is a member access.
* @returns {boolean} `true` if the variable is local to the given function, and is never referenced in a closure.
*/
function isLocalVariableWithoutEscape(variable, isMemberAccess) {
if (!variable) {
return false; // A global variable which was not defined.
}
// If the reference is a property access and the variable is a parameter, it handles the variable is not local.
if (isMemberAccess && variable.defs.some(d => d.type === "Parameter")) {
return false;
}
const functionScope = variable.scope.variableScope;
return variable.references.every(
reference => reference.from.variableScope === functionScope,
);
}
/**
* Represents segment information.
*/
class SegmentInfo {
constructor() {
this.info = new WeakMap();
}
/**
* Initialize the segment information.
* @param {PathSegment} segment The segment to initialize.
* @returns {void}
*/
initialize(segment) {
const outdatedReadVariables = new Set();
const freshReadVariables = new Set();
for (const prevSegment of segment.prevSegments) {
const info = this.info.get(prevSegment);
if (info) {
info.outdatedReadVariables.forEach(
Set.prototype.add,
outdatedReadVariables,
);
info.freshReadVariables.forEach(
Set.prototype.add,
freshReadVariables,
);
}
}
this.info.set(segment, { outdatedReadVariables, freshReadVariables });
}
/**
* Mark a given variable as read on given segments.
* @param {PathSegment[]} segments The segments that it read the variable on.
* @param {Variable} variable The variable to be read.
* @returns {void}
*/
markAsRead(segments, variable) {
for (const segment of segments) {
const info = this.info.get(segment);
if (info) {
info.freshReadVariables.add(variable);
// If a variable is freshly read again, then it's no more out-dated.
info.outdatedReadVariables.delete(variable);
}
}
}
/**
* Move `freshReadVariables` to `outdatedReadVariables`.
* @param {PathSegment[]} segments The segments to process.
* @returns {void}
*/
makeOutdated(segments) {
for (const segment of segments) {
const info = this.info.get(segment);
if (info) {
info.freshReadVariables.forEach(
Set.prototype.add,
info.outdatedReadVariables,
);
info.freshReadVariables.clear();
}
}
}
/**
* Check if a given variable is outdated on the current segments.
* @param {PathSegment[]} segments The current segments.
* @param {Variable} variable The variable to check.
* @returns {boolean} `true` if the variable is outdated on the segments.
*/
isOutdated(segments, variable) {
for (const segment of segments) {
const info = this.info.get(segment);
if (info && info.outdatedReadVariables.has(variable)) {
return true;
}
}
return false;
}
}
//------------------------------------------------------------------------------
// Rule Definition
//------------------------------------------------------------------------------
/** @type {import('../types').Rule.RuleModule} */
module.exports = {
meta: {
type: "problem",
defaultOptions: [
{
allowProperties: false,
},
],
docs: {
description:
"Disallow assignments that can lead to race conditions due to usage of `await` or `yield`",
recommended: false,
url: "https://eslint.org/docs/latest/rules/require-atomic-updates",
},
fixable: null,
schema: [
{
type: "object",
properties: {
allowProperties: {
type: "boolean",
},
},
additionalProperties: false,
},
],
messages: {
nonAtomicUpdate:
"Possible race condition: `{{value}}` might be reassigned based on an outdated value of `{{value}}`.",
nonAtomicObjectUpdate:
"Possible race condition: `{{value}}` might be assigned based on an outdated state of `{{object}}`.",
},
},
create(context) {
const [{ allowProperties }] = context.options;
const sourceCode = context.sourceCode;
const assignmentReferences = new Map();
const segmentInfo = new SegmentInfo();
let stack = null;
return {
onCodePathStart(codePath, node) {
const scope = sourceCode.getScope(node);
const shouldVerify =
scope.type === "function" &&
(scope.block.async || scope.block.generator);
stack = {
upper: stack,
codePath,
referenceMap: shouldVerify
? createReferenceMap(scope)
: null,
currentSegments: new Set(),
};
},
onCodePathEnd() {
stack = stack.upper;
},
// Initialize the segment information.
onCodePathSegmentStart(segment) {
segmentInfo.initialize(segment);
stack.currentSegments.add(segment);
},
onUnreachableCodePathSegmentStart(segment) {
stack.currentSegments.add(segment);
},
onUnreachableCodePathSegmentEnd(segment) {
stack.currentSegments.delete(segment);
},
onCodePathSegmentEnd(segment) {
stack.currentSegments.delete(segment);
},
// Handle references to prepare verification.
Identifier(node) {
const { referenceMap } = stack;
const reference = referenceMap && referenceMap.get(node);
// Ignore if this is not a valid variable reference.
if (!reference) {
return;
}
const variable = reference.resolved;
const writeExpr = getWriteExpr(reference);
const isMemberAccess =
reference.identifier.parent.type === "MemberExpression";
// Add a fresh read variable.
if (
reference.isRead() &&
!(writeExpr && writeExpr.parent.operator === "=")
) {
segmentInfo.markAsRead(stack.currentSegments, variable);
}
/*
* Register the variable to verify after ESLint traversed the `writeExpr` node
* if this reference is an assignment to a variable which is referred from other closure.
*/
if (
writeExpr &&
writeExpr.parent.right === writeExpr && // ← exclude variable declarations.
!isLocalVariableWithoutEscape(variable, isMemberAccess)
) {
let refs = assignmentReferences.get(writeExpr);
if (!refs) {
refs = [];
assignmentReferences.set(writeExpr, refs);
}
refs.push(reference);
}
},
/*
* Verify assignments.
* If the reference exists in `outdatedReadVariables` list, report it.
*/
":expression:exit"(node) {
// referenceMap exists if this is in a resumable function scope.
if (!stack.referenceMap) {
return;
}
// Mark the read variables on this code path as outdated.
if (
node.type === "AwaitExpression" ||
node.type === "YieldExpression"
) {
segmentInfo.makeOutdated(stack.currentSegments);
}
// Verify.
const references = assignmentReferences.get(node);
if (references) {
assignmentReferences.delete(node);
for (const reference of references) {
const variable = reference.resolved;
if (
segmentInfo.isOutdated(
stack.currentSegments,
variable,
)
) {
if (node.parent.left === reference.identifier) {
context.report({
node: node.parent,
messageId: "nonAtomicUpdate",
data: {
value: variable.name,
},
});
} else if (!allowProperties) {
context.report({
node: node.parent,
messageId: "nonAtomicObjectUpdate",
data: {
value: sourceCode.getText(
node.parent.left,
),
object: variable.name,
},
});
}
}
}
}
},
};
},
};
@@ -0,0 +1 @@
{"version":3,"file":"panels-left-bottom.js","sources":["../../../src/icons/panels-left-bottom.ts"],"sourcesContent":["import createLucideIcon from '../createLucideIcon';\n\n/**\n * @component @name PanelsLeftBottom\n * @description Lucide SVG icon component, renders SVG Element with children.\n *\n * @preview ![img](data:image/svg+xml;base64,PHN2ZyAgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIgogIHdpZHRoPSIyNCIKICBoZWlnaHQ9IjI0IgogIHZpZXdCb3g9IjAgMCAyNCAyNCIKICBmaWxsPSJub25lIgogIHN0cm9rZT0iIzAwMCIgc3R5bGU9ImJhY2tncm91bmQtY29sb3I6ICNmZmY7IGJvcmRlci1yYWRpdXM6IDJweCIKICBzdHJva2Utd2lkdGg9IjIiCiAgc3Ryb2tlLWxpbmVjYXA9InJvdW5kIgogIHN0cm9rZS1saW5lam9pbj0icm91bmQiCj4KICA8cmVjdCB3aWR0aD0iMTgiIGhlaWdodD0iMTgiIHg9IjMiIHk9IjMiIHJ4PSIyIiAvPgogIDxwYXRoIGQ9Ik05IDN2MTgiIC8+CiAgPHBhdGggZD0iTTkgMTVoMTIiIC8+Cjwvc3ZnPgo=) - https://lucide.dev/icons/panels-left-bottom\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 PanelsLeftBottom = createLucideIcon('PanelsLeftBottom', [\n ['rect', { width: '18', height: '18', x: '3', y: '3', rx: '2', key: 'afitv7' }],\n ['path', { d: 'M9 3v18', key: 'fh3hqa' }],\n ['path', { d: 'M9 15h12', key: '5ijen5' }],\n]);\n\nexport default PanelsLeftBottom;\n"],"names":[],"mappings":";;;;;;;;;AAaM,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAmB,iBAAiB,kBAAoB,CAAA,CAAA,CAAA;AAAA,CAAA,CAC5D,CAAC,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAQ,CAAA,CAAA,CAAE,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAO,MAAM,CAAQ,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAM,CAAG,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAK,GAAG,CAAK,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAI,CAAK,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAK,UAAU,CAAA,CAAA;AAAA,CAAA,CAC9E,CAAC,CAAA,CAAA,CAAA,CAAA,CAAA,CAAQ,CAAA,CAAA,CAAA,CAAE,GAAG,CAAW,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAK,UAAU,CAAA,CAAA;AAAA,CAAA,CACxC,CAAC,CAAA,CAAA,CAAA,CAAA,CAAA,CAAQ,CAAA,CAAA,CAAA,CAAE,GAAG,CAAY,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAK,UAAU,CAAA;AAC3C,CAAC,CAAA,CAAA;;"}
@@ -0,0 +1,19 @@
Copyright (c) 2017-2018 Fredrik Nicol
Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:
The above copyright notice and this permission notice shall be included in all
copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
SOFTWARE.
@@ -0,0 +1 @@
{"version":3,"file":"copy-minus.js","sources":["../../../src/icons/copy-minus.ts"],"sourcesContent":["import createLucideIcon from '../createLucideIcon';\n\n/**\n * @component @name CopyMinus\n * @description Lucide SVG icon component, renders SVG Element with children.\n *\n * @preview ![img](data:image/svg+xml;base64,PHN2ZyAgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIgogIHdpZHRoPSIyNCIKICBoZWlnaHQ9IjI0IgogIHZpZXdCb3g9IjAgMCAyNCAyNCIKICBmaWxsPSJub25lIgogIHN0cm9rZT0iIzAwMCIgc3R5bGU9ImJhY2tncm91bmQtY29sb3I6ICNmZmY7IGJvcmRlci1yYWRpdXM6IDJweCIKICBzdHJva2Utd2lkdGg9IjIiCiAgc3Ryb2tlLWxpbmVjYXA9InJvdW5kIgogIHN0cm9rZS1saW5lam9pbj0icm91bmQiCj4KICA8bGluZSB4MT0iMTIiIHgyPSIxOCIgeTE9IjE1IiB5Mj0iMTUiIC8+CiAgPHJlY3Qgd2lkdGg9IjE0IiBoZWlnaHQ9IjE0IiB4PSI4IiB5PSI4IiByeD0iMiIgcnk9IjIiIC8+CiAgPHBhdGggZD0iTTQgMTZjLTEuMSAwLTItLjktMi0yVjRjMC0xLjEuOS0yIDItMmgxMGMxLjEgMCAyIC45IDIgMiIgLz4KPC9zdmc+Cg==) - https://lucide.dev/icons/copy-minus\n * @see https://lucide.dev/guide/packages/lucide-react - Documentation\n *\n * @param {Object} props - Lucide icons props and any valid SVG attribute\n * @returns {JSX.Element} JSX Element\n *\n */\nconst CopyMinus = createLucideIcon('CopyMinus', [\n ['line', { x1: '12', x2: '18', y1: '15', y2: '15', key: '1nscbv' }],\n ['rect', { width: '14', height: '14', x: '8', y: '8', rx: '2', ry: '2', key: '17jyea' }],\n ['path', { d: 'M4 16c-1.1 0-2-.9-2-2V4c0-1.1.9-2 2-2h10c1.1 0 2 .9 2 2', key: 'zix9uf' }],\n]);\n\nexport default CopyMinus;\n"],"names":[],"mappings":";;;;;;;;;AAaM,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAY,iBAAiB,WAAa,CAAA,CAAA,CAAA;AAAA,CAC9C,CAAA,CAAC,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAQ,CAAE,CAAA,CAAA,CAAA,EAAI,CAAM,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAI,CAAM,CAAA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undary = require("./CatchBoundary.cjs");
const require_useRouter = require("./useRouter.cjs");
let _tanstack_router_core = require("@tanstack/router-core");
let react = require("react");
react = require_runtime.__toESM(react);
let react_jsx_runtime = require("react/jsx-runtime");
let _tanstack_react_store = require("@tanstack/react-store");
let _tanstack_router_core_isServer = require("@tanstack/router-core/isServer");
//#region src/not-found.tsx
function CatchNotFound(props) {
const router = require_useRouter.useRouter();
if (_tanstack_router_core_isServer.isServer ?? router.isServer) {
const resetKey = `not-found-${router.stores.location.get().pathname}-${router.stores.status.get()}`;
return /* @__PURE__ */ (0, react_jsx_runtime.jsx)(require_CatchBoundary.CatchBoundary, {
getResetKey: () => resetKey,
onCatch: (error, errorInfo) => {
if ((0, _tanstack_router_core.isNotFound)(error)) props.onCatch?.(error, errorInfo);
else throw error;
},
errorComponent: ({ error }) => {
if ((0, _tanstack_router_core.isNotFound)(error)) return props.fallback?.(error);
else throw error;
},
children: props.children
});
}
const resetKey = `not-found-${(0, _tanstack_react_store.useStore)(router.stores.location, (location) => location.pathname)}-${(0, _tanstack_react_store.useStore)(router.stores.status, (status) => status)}`;
return /* @__PURE__ */ (0, react_jsx_runtime.jsx)(require_CatchBoundary.CatchBoundary, {
getResetKey: () => resetKey,
onCatch: (error, errorInfo) => {
if ((0, _tanstack_router_core.isNotFound)(error)) props.onCatch?.(error, errorInfo);
else throw error;
},
errorComponent: ({ error }) => {
if ((0, _tanstack_router_core.isNotFound)(error)) return props.fallback?.(error);
else throw error;
},
children: props.children
});
}
function DefaultGlobalNotFound() {
return /* @__PURE__ */ (0, react_jsx_runtime.jsx)("p", { children: "Not Found" });
}
//#endregion
exports.CatchNotFound = CatchNotFound;
exports.DefaultGlobalNotFound = DefaultGlobalNotFound;
//# sourceMappingURL=not-found.cjs.map
@@ -0,0 +1,5 @@
export type MessageIds = 'preferExpectErrorComment';
declare const _default: import("@typescript-eslint/utils/ts-eslint").RuleModule<"preferExpectErrorComment", [], import("../../rules").ESLintPluginDocs, import("@typescript-eslint/utils/ts-eslint").RuleListener> & {
name: string;
};
export default _default;
@@ -0,0 +1,18 @@
[
{
"name": "html",
"description": "Outputs results to HTML. The `html` formatter is useful for visual presentation in the browser."
},
{
"name": "json-with-metadata",
"description": "Outputs JSON-serialized results. The `json-with-metadata` provides the same linting results as the [`json`](#json) formatter with additional metadata about the rules applied. The linting results are included in the `results` property and the rules metadata is included in the `metadata` property.\n\nAlternatively, you can use the [ESLint Node.js API](../../integrate/nodejs-api) to programmatically use ESLint."
},
{
"name": "json",
"description": "Outputs JSON-serialized results. The `json` formatter is useful when you want to programmatically work with the CLI's linting results.\n\nAlternatively, you can use the [ESLint Node.js API](../../integrate/nodejs-api) to programmatically use ESLint."
},
{
"name": "stylish",
"description": "Human-readable output format. This is the default formatter."
}
]
@@ -0,0 +1 @@
{"version":3,"file":"wrap.mjs","sources":["../../src/wrap.ts"],"sourcesContent":["export const wrap = (min: number, max: number, v: number) => {\n const rangeSize = max - min\n return ((((v - min) % rangeSize) + rangeSize) % rangeSize) + min\n}\n"],"names":[],"mappings":"AAAO,MAAM,IAAI,GAAG,CAAC,GAAW,EAAE,GAAW,EAAE,CAAS,KAAI;AACxD,IAAA,MAAM,SAAS,GAAG,GAAG,GAAG,GAAG;AAC3B,IAAA,OAAO,CAAC,CAAC,CAAC,CAAC,CAAC,GAAG,GAAG,IAAI,SAAS,IAAI,SAAS,IAAI,SAAS,IAAI,GAAG;AACpE;;;;"}
@@ -0,0 +1,25 @@
/**
* @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 ClipboardPenLine = createLucideIcon("ClipboardPenLine", [
["rect", { width: "8", height: "4", x: "8", y: "2", rx: "1", key: "1oijnt" }],
["path", { d: "M8 4H6a2 2 0 0 0-2 2v14a2 2 0 0 0 2 2h12a2 2 0 0 0 2-2v-.5", key: "1but9f" }],
["path", { d: "M16 4h2a2 2 0 0 1 1.73 1", key: "1p8n7l" }],
["path", { d: "M8 18h1", key: "13wk12" }],
[
"path",
{
d: "M21.378 12.626a1 1 0 0 0-3.004-3.004l-4.01 4.012a2 2 0 0 0-.506.854l-.837 2.87a.5.5 0 0 0 .62.62l2.87-.837a2 2 0 0 0 .854-.506z",
key: "2t3380"
}
]
]);
export { ClipboardPenLine as default };
//# sourceMappingURL=clipboard-pen-line.js.map
@@ -0,0 +1 @@
{"version":3,"file":"square-radical.js","sources":["../../../src/icons/square-radical.ts"],"sourcesContent":["import createLucideIcon from '../createLucideIcon';\n\n/**\n * @component @name SquareRadical\n * @description Lucide SVG icon component, renders SVG Element with children.\n *\n * @preview ![img](data:image/svg+xml;base64,PHN2ZyAgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIgogIHdpZHRoPSIyNCIKICBoZWlnaHQ9IjI0IgogIHZpZXdCb3g9IjAgMCAyNCAyNCIKICBmaWxsPSJub25lIgogIHN0cm9rZT0iIzAwMCIgc3R5bGU9ImJhY2tncm91bmQtY29sb3I6ICNmZmY7IGJvcmRlci1yYWRpdXM6IDJweCIKICBzdHJva2Utd2lkdGg9IjIiCiAgc3Ryb2tlLWxpbmVjYXA9InJvdW5kIgogIHN0cm9rZS1saW5lam9pbj0icm91bmQiCj4KICA8cGF0aCBkPSJNNyAxMmgybDIgNSAyLTEwaDQiIC8+CiAgPHJlY3QgeD0iMyIgeT0iMyIgd2lkdGg9IjE4IiBoZWlnaHQ9IjE4IiByeD0iMiIgLz4KPC9zdmc+Cg==) - https://lucide.dev/icons/square-radical\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 SquareRadical = createLucideIcon('SquareRadical', [\n ['path', { d: 'M7 12h2l2 5 2-10h4', key: '1fxv6h' }],\n ['rect', { x: '3', y: '3', width: '18', height: '18', rx: '2', key: 'h1oib' }],\n]);\n\nexport default SquareRadical;\n"],"names":[],"mappings":";;;;;;;;;AAaM,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAgB,iBAAiB,eAAiB,CAAA,CAAA,CAAA;AAAA,CAAA,CACtD,CAAC,CAAA,CAAA,CAAA,CAAA,CAAA,CAAQ,CAAA,CAAA,CAAA,CAAE,GAAG,CAAsB,CAAA,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,CACnD,CAAC,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAQ,CAAA,CAAA,CAAE,CAAA,CAAA,CAAG,KAAK,CAAG,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAK,CAAO,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAM,QAAQ,CAAM,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAI,CAAK,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAK,SAAS,CAAA;AAC/E,CAAC,CAAA,CAAA;;"}
@@ -0,0 +1,2 @@
export declare const xmlDecodeTree: Uint16Array;
//# sourceMappingURL=decode-data-xml.d.ts.map
@@ -0,0 +1,352 @@
Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
const require_utils_encode = require("../../utils/encode.js");
let node_stream_promises = require("node:stream/promises");
//#region src/adapter/aws-lambda/handler.ts
function sanitizeHeaderValue(value) {
if (!/[^\x00-\x7F]/.test(value)) return value;
return encodeURIComponent(value);
}
const getRequestContext = (event) => {
return event.requestContext;
};
async function* readWebStream(reader) {
let readResult = await reader.read();
while (!readResult.done) {
yield readResult.value;
readResult = await reader.read();
}
}
const streamToNodeStream = (reader, writer) => (0, node_stream_promises.pipeline)(readWebStream(reader), writer);
/**
* @deprecated `hono/aws-lambda` will be removed in v5. Install `@hono/aws-lambda` and import from there instead.
*/
const streamHandle = (app) => {
return awslambda.streamifyResponse(async (event, responseStream, context) => {
const processor = getProcessor(event);
try {
const req = processor.createRequest(event);
const requestContext = getRequestContext(event);
const res = await app.fetch(req, {
event,
requestContext,
context
});
const headers = {};
const cookies = [];
res.headers.forEach((value, name) => {
if (name === "set-cookie") cookies.push(value);
else headers[name] = value;
});
const httpResponseMetadata = {
statusCode: res.status,
headers,
cookies
};
responseStream = awslambda.HttpResponseStream.from(responseStream, httpResponseMetadata);
if (res.body) await streamToNodeStream(res.body.getReader(), responseStream);
else responseStream.write("");
} catch (error) {
console.error("Error processing request:", error);
responseStream.write("Internal Server Error");
} finally {
responseStream.end();
}
});
};
/**
* Converts a Hono application to an AWS Lambda handler.
*
* Accepts events from API Gateway (v1 and v2), Application Load Balancer (ALB),
* and Lambda Function URLs.
*
* @param app - The Hono application instance
* @param options - Optional configuration
* @param options.isContentTypeBinary - A function to determine if the content type is binary.
* If not provided, the default function will be used.
* @returns Lambda handler function
*
* @example
* ```js
* import { Hono } from 'hono'
* import { handle } from 'hono/aws-lambda'
*
* const app = new Hono()
*
* app.get('/', (c) => c.text('Hello from Lambda'))
* app.get('/json', (c) => c.json({ message: 'Hello JSON' }))
*
* export const handler = handle(app)
* ```
*
* @example
* ```js
* // With custom binary content type detection
* import { handle, defaultIsContentTypeBinary } from 'hono/aws-lambda'
* export const handler = handle(app, {
* isContentTypeBinary: (contentType) => {
* if (defaultIsContentTypeBinary(contentType)) {
* // default logic same as prior to v4.8.4
* return true
* }
* return contentType.startsWith('image/') || contentType === 'application/pdf'
* }
* })
* ```
* @deprecated `hono/aws-lambda` will be removed in v5. Install `@hono/aws-lambda` and import from there instead.
*/
const handle = (app, { isContentTypeBinary } = { isContentTypeBinary: void 0 }) => {
return async (event, lambdaContext) => {
const processor = getProcessor(event);
let req, requestContext;
try {
req = processor.createRequest(event);
requestContext = getRequestContext(event);
} catch (error) {
console.error("Error processing request:", error);
const errorResponse = error instanceof TypeError ? new Response("Invalid request", { status: 400 }) : new Response("Internal Server Error", { status: 500 });
return processor.createResult(event, errorResponse, { isContentTypeBinary });
}
const res = await app.fetch(req, {
event,
requestContext,
lambdaContext
});
return processor.createResult(event, res, { isContentTypeBinary });
};
};
/**
* @deprecated `hono/aws-lambda` will be removed in v5. Install `@hono/aws-lambda` and import from there instead.
*/
var EventProcessor = class {
getHeaderValue(headers, key) {
return headers ? Array.isArray(headers[key]) ? headers[key][0] : headers[key] : void 0;
}
getDomainName(event) {
if (event.requestContext && "domainName" in event.requestContext) return event.requestContext.domainName;
const hostFromHeaders = this.getHeaderValue(event.headers, "host");
if (hostFromHeaders) return hostFromHeaders;
const multiValueHeaders = "multiValueHeaders" in event ? event.multiValueHeaders : {};
return this.getHeaderValue(multiValueHeaders, "host");
}
createRequest(event) {
const queryString = this.getQueryString(event);
const urlPath = `https://${this.getDomainName(event)}${this.getPath(event)}`;
const url = queryString ? `${urlPath}?${queryString}` : urlPath;
const headers = this.getHeaders(event);
const requestInit = {
headers,
method: this.getMethod(event)
};
if (event.body) {
const body = event.isBase64Encoded ? require_utils_encode.decodeBase64(event.body) : new TextEncoder().encode(event.body);
requestInit.body = body;
headers.set("content-length", body.length.toString());
}
return new Request(url, requestInit);
}
async createResult(event, res, options) {
const contentType = res.headers.get("content-type");
const isContentTypeBinary = options.isContentTypeBinary ?? defaultIsContentTypeBinary;
let isBase64Encoded = contentType && isContentTypeBinary(contentType) ? true : false;
if (!isBase64Encoded) {
const contentEncoding = res.headers.get("content-encoding");
isBase64Encoded = isContentEncodingBinary(contentEncoding);
}
const result = {
body: isBase64Encoded ? require_utils_encode.encodeBase64(await res.arrayBuffer()) : await res.text(),
statusCode: res.status,
isBase64Encoded,
..."multiValueHeaders" in event && event.multiValueHeaders ? { multiValueHeaders: {} } : { headers: {} }
};
this.setCookies(event, res, result);
if (result.multiValueHeaders) res.headers.forEach((value, key) => {
result.multiValueHeaders[key] = [value];
});
else res.headers.forEach((value, key) => {
result.headers[key] = value;
});
return result;
}
setCookies(_event, res, result) {
if (res.headers.has("set-cookie")) {
const cookies = res.headers.getSetCookie ? res.headers.getSetCookie() : Array.from(res.headers.entries()).filter(([k]) => k === "set-cookie").map(([, v]) => v);
if (Array.isArray(cookies)) {
this.setCookiesToResult(result, cookies);
res.headers.delete("set-cookie");
}
}
}
};
/**
* @deprecated `hono/aws-lambda` will be removed in v5. Install `@hono/aws-lambda` and import from there instead.
*/
var EventV2Processor = class extends EventProcessor {
getPath(event) {
return event.rawPath;
}
getMethod(event) {
return event.requestContext.http.method;
}
getQueryString(event) {
return event.rawQueryString;
}
getCookies(event, headers) {
if (Array.isArray(event.cookies)) headers.set("Cookie", event.cookies.join("; "));
}
setCookiesToResult(result, cookies) {
result.cookies = cookies;
}
getHeaders(event) {
const headers = new Headers();
this.getCookies(event, headers);
if (event.headers) {
for (const [k, v] of Object.entries(event.headers)) if (v) headers.set(k, v);
}
return headers;
}
};
const v2Processor = new EventV2Processor();
/**
* @deprecated `hono/aws-lambda` will be removed in v5. Install `@hono/aws-lambda` and import from there instead.
*/
var EventV1Processor = class extends EventProcessor {
getPath(event) {
return event.path;
}
getMethod(event) {
return event.httpMethod;
}
getQueryString(event) {
if (event.multiValueQueryStringParameters) return Object.entries(event.multiValueQueryStringParameters || {}).filter(([, value]) => value).map(([key, values]) => values.map((value) => `${encodeURIComponent(key)}=${encodeURIComponent(value)}`).join("&")).join("&");
else return Object.entries(event.queryStringParameters || {}).filter(([, value]) => value !== void 0).map(([key, value]) => `${encodeURIComponent(key)}=${encodeURIComponent(value || "")}`).join("&");
}
getCookies(_event, _headers) {}
getHeaders(event) {
const headers = new Headers();
this.getCookies(event, headers);
if (event.multiValueHeaders) {
for (const [k, values] of Object.entries(event.multiValueHeaders)) if (values) values.forEach((v) => headers.append(k, sanitizeHeaderValue(v)));
}
if (event.headers) {
for (const [k, v] of Object.entries(event.headers)) if (v && !headers.has(k)) headers.set(k, sanitizeHeaderValue(v));
}
return headers;
}
setCookiesToResult(result, cookies) {
result.multiValueHeaders = { "set-cookie": cookies };
}
};
const v1Processor = new EventV1Processor();
/**
* @deprecated `hono/aws-lambda` will be removed in v5. Install `@hono/aws-lambda` and import from there instead.
*/
var ALBProcessor = class extends EventProcessor {
getHeaders(event) {
const headers = new Headers();
if (event.multiValueHeaders) {
for (const [key, values] of Object.entries(event.multiValueHeaders)) if (values && Array.isArray(values)) {
const sanitizedValue = sanitizeHeaderValue(values.join("; "));
headers.set(key, sanitizedValue);
}
} else for (const [key, value] of Object.entries(event.headers ?? {})) if (value) headers.set(key, sanitizeHeaderValue(value));
return headers;
}
getPath(event) {
return event.path;
}
getMethod(event) {
return event.httpMethod;
}
getQueryString(event) {
if (event.multiValueQueryStringParameters) return Object.entries(event.multiValueQueryStringParameters || {}).filter(([, value]) => value).map(([key, value]) => `${key}=${value.join(`&${key}=`)}`).join("&");
else return Object.entries(event.queryStringParameters || {}).filter(([, value]) => value !== void 0).map(([key, value]) => `${key}=${value}`).join("&");
}
getCookies(event, headers) {
let cookie;
if (event.multiValueHeaders) cookie = event.multiValueHeaders["cookie"]?.join("; ");
else cookie = event.headers ? event.headers["cookie"] : void 0;
if (cookie) headers.append("Cookie", cookie);
}
setCookiesToResult(result, cookies) {
if (result.multiValueHeaders) result.multiValueHeaders["set-cookie"] = cookies;
else result.headers["set-cookie"] = cookies[0];
}
};
const albProcessor = new ALBProcessor();
/**
* @deprecated `hono/aws-lambda` will be removed in v5. Install `@hono/aws-lambda` and import from there instead.
*/
var LatticeV2Processor = class extends EventProcessor {
getPath(event) {
return event.path;
}
getMethod(event) {
return event.method;
}
getQueryString() {
return "";
}
getHeaders(event) {
const headers = new Headers();
if (event.headers) {
for (const [k, values] of Object.entries(event.headers)) if (values) values.forEach((v) => headers.append(k, sanitizeHeaderValue(v)));
}
return headers;
}
getCookies() {}
setCookiesToResult(result, cookies) {
result.headers = {
...result.headers,
"set-cookie": cookies
};
}
};
const latticeV2Processor = new LatticeV2Processor();
/**
* @deprecated `hono/aws-lambda` will be removed in v5. Install `@hono/aws-lambda` and import from there instead.
*/
const getProcessor = (event) => {
if (isProxyEventALB(event)) return albProcessor;
if (isProxyEventV2(event)) return v2Processor;
if (isLatticeEventV2(event)) return latticeV2Processor;
return v1Processor;
};
const isProxyEventALB = (event) => {
if (event.requestContext) return Object.hasOwn(event.requestContext, "elb");
return false;
};
const isProxyEventV2 = (event) => {
return Object.hasOwn(event, "rawPath") && Object.hasOwn(event.requestContext ?? {}, "http");
};
const isLatticeEventV2 = (event) => {
if (event.requestContext) return Object.hasOwn(event.requestContext, "serviceArn");
return false;
};
/**
* Check if the given content type is binary.
* This is a default function and may be overwritten by the user via `isContentTypeBinary` option in handler().
* @param contentType The content type to check.
* @returns True if the content type is binary, false otherwise.
* @deprecated `hono/aws-lambda` will be removed in v5. Install `@hono/aws-lambda` and import from there instead.
*/
const defaultIsContentTypeBinary = (contentType) => {
if (/^application\/vnd\.(?:apple\.installer|mozilla\.xul)\+xml\s*(?:;|$)/i.test(contentType)) return true;
return !/^text\/(?:plain|html|css|javascript|csv)|(?:\/|\+)(?:json|xml)\s*(?:;|$)/i.test(contentType);
};
/**
* @deprecated `hono/aws-lambda` will be removed in v5. Install `@hono/aws-lambda` and import from there instead.
*/
const isContentEncodingBinary = (contentEncoding) => {
return !!contentEncoding && !/^identity$/i.test(contentEncoding);
};
//#endregion
exports.ALBProcessor = ALBProcessor;
exports.EventProcessor = EventProcessor;
exports.EventV1Processor = EventV1Processor;
exports.EventV2Processor = EventV2Processor;
exports.LatticeV2Processor = LatticeV2Processor;
exports.defaultIsContentTypeBinary = defaultIsContentTypeBinary;
exports.getProcessor = getProcessor;
exports.handle = handle;
exports.isContentEncodingBinary = isContentEncodingBinary;
exports.streamHandle = streamHandle;
@@ -0,0 +1,26 @@
/**
* @license lucide-react v0.469.0 - ISC
*
* This source code is licensed under the ISC license.
* See the LICENSE file in the root directory of this source tree.
*/
import createLucideIcon from '../createLucideIcon.js';
const NotebookPen = createLucideIcon("NotebookPen", [
["path", { d: "M13.4 2H6a2 2 0 0 0-2 2v16a2 2 0 0 0 2 2h12a2 2 0 0 0 2-2v-7.4", key: "re6nr2" }],
["path", { d: "M2 6h4", key: "aawbzj" }],
["path", { d: "M2 10h4", key: "l0bgd4" }],
["path", { d: "M2 14h4", key: "1gsvsf" }],
["path", { d: "M2 18h4", key: "1bu2t1" }],
[
"path",
{
d: "M21.378 5.626a1 1 0 1 0-3.004-3.004l-5.01 5.012a2 2 0 0 0-.506.854l-.837 2.87a.5.5 0 0 0 .62.62l2.87-.837a2 2 0 0 0 .854-.506z",
key: "pqwjuv"
}
]
]);
export { NotebookPen as default };
//# sourceMappingURL=notebook-pen.js.map
@@ -0,0 +1,262 @@
// This file is auto-generated! Do not modify it directly.
// Run `yarn gulp bundle-dts` to re-generate it.
/* eslint-disable @typescript-eslint/consistent-type-imports, @typescript-eslint/no-redundant-type-constituents */
import { File, Expression } from '@babel/types';
declare class Position {
line: number;
column: number;
index: number;
constructor(line: number, col: number, index: number);
}
type SyntaxPlugin = "flow" | "typescript" | "jsx" | "pipelineOperator" | "placeholders";
type ParseErrorCode = "BABEL_PARSER_SYNTAX_ERROR" | "BABEL_PARSER_SOURCETYPE_MODULE_REQUIRED";
interface ParseErrorSpecification<ErrorDetails> {
code: ParseErrorCode;
reasonCode: string;
syntaxPlugin?: SyntaxPlugin;
missingPlugin?: string | string[];
loc: Position;
details: ErrorDetails;
pos: number;
}
type ParseError$1<ErrorDetails> = SyntaxError & ParseErrorSpecification<ErrorDetails>;
type BABEL_8_BREAKING = false;
type IF_BABEL_7<V> = false extends BABEL_8_BREAKING ? V : never;
type Plugin$1 =
| "asyncDoExpressions"
| IF_BABEL_7<"asyncGenerators">
| IF_BABEL_7<"bigInt">
| IF_BABEL_7<"classPrivateMethods">
| IF_BABEL_7<"classPrivateProperties">
| IF_BABEL_7<"classProperties">
| IF_BABEL_7<"classStaticBlock">
| IF_BABEL_7<"decimal">
| "decorators-legacy"
| "deferredImportEvaluation"
| "decoratorAutoAccessors"
| "destructuringPrivate"
| IF_BABEL_7<"deprecatedImportAssert">
| "doExpressions"
| IF_BABEL_7<"dynamicImport">
| IF_BABEL_7<"explicitResourceManagement">
| "exportDefaultFrom"
| IF_BABEL_7<"exportNamespaceFrom">
| "flow"
| "flowComments"
| "functionBind"
| "functionSent"
| "importMeta"
| "jsx"
| IF_BABEL_7<"jsonStrings">
| IF_BABEL_7<"logicalAssignment">
| IF_BABEL_7<"importAssertions">
| IF_BABEL_7<"importReflection">
| "moduleBlocks"
| IF_BABEL_7<"moduleStringNames">
| IF_BABEL_7<"nullishCoalescingOperator">
| IF_BABEL_7<"numericSeparator">
| IF_BABEL_7<"objectRestSpread">
| IF_BABEL_7<"optionalCatchBinding">
| IF_BABEL_7<"optionalChaining">
| "partialApplication"
| "placeholders"
| IF_BABEL_7<"privateIn">
| IF_BABEL_7<"regexpUnicodeSets">
| "sourcePhaseImports"
| "throwExpressions"
| IF_BABEL_7<"topLevelAwait">
| "v8intrinsic"
| ParserPluginWithOptions[0];
type ParserPluginWithOptions =
| ["decorators", DecoratorsPluginOptions]
| ["discardBinding", { syntaxType: "void" }]
| ["estree", { classFeatures?: boolean }]
| IF_BABEL_7<["importAttributes", { deprecatedAssertSyntax: boolean }]>
| IF_BABEL_7<["moduleAttributes", { version: "may-2020" }]>
| ["optionalChainingAssign", { version: "2023-07" }]
| ["pipelineOperator", PipelineOperatorPluginOptions]
| ["recordAndTuple", RecordAndTuplePluginOptions]
| ["flow", FlowPluginOptions]
| ["typescript", TypeScriptPluginOptions];
type PluginConfig = Plugin$1 | ParserPluginWithOptions;
interface DecoratorsPluginOptions {
decoratorsBeforeExport?: boolean;
allowCallParenthesized?: boolean;
}
interface PipelineOperatorPluginOptions {
proposal: BABEL_8_BREAKING extends false
? "minimal" | "fsharp" | "hack" | "smart"
: "fsharp" | "hack";
topicToken?: "%" | "#" | "@@" | "^^" | "^";
}
interface RecordAndTuplePluginOptions {
syntaxType: "bar" | "hash";
}
type FlowPluginOptions = BABEL_8_BREAKING extends true
? {
all?: boolean;
enums?: boolean;
}
: {
all?: boolean;
};
interface TypeScriptPluginOptions {
dts?: boolean;
disallowAmbiguousJSXLike?: boolean;
}
type Plugin = PluginConfig;
type SourceType = "script" | "commonjs" | "module" | "unambiguous";
interface Options {
/**
* By default, import and export declarations can only appear at a program's top level.
* Setting this option to true allows them anywhere where a statement is allowed.
*/
allowImportExportEverywhere?: boolean;
/**
* By default, await use is not allowed outside of an async function.
* Set this to true to accept such code.
*/
allowAwaitOutsideFunction?: boolean;
/**
* By default, a return statement at the top level raises an error.
* Set this to true to accept such code.
*/
allowReturnOutsideFunction?: boolean;
/**
* By default, new.target use is not allowed outside of a function or class.
* Set this to true to accept such code.
*/
allowNewTargetOutsideFunction?: boolean;
/**
* By default, super calls are not allowed outside of a method.
* Set this to true to accept such code.
*/
allowSuperOutsideMethod?: boolean;
/**
* By default, exported identifiers must refer to a declared variable.
* Set this to true to allow export statements to reference undeclared variables.
*/
allowUndeclaredExports?: boolean;
/**
* By default, yield use is not allowed outside of a generator function.
* Set this to true to accept such code.
*/
allowYieldOutsideFunction?: boolean;
/**
* By default, Babel parser JavaScript code according to Annex B syntax.
* Set this to `false` to disable such behavior.
*/
annexB?: boolean;
/**
* By default, Babel attaches comments to adjacent AST nodes.
* When this option is set to false, comments are not attached.
* It can provide up to 30% performance improvement when the input code has many comments.
* @babel/eslint-parser will set it for you.
* It is not recommended to use attachComment: false with Babel transform,
* as doing so removes all the comments in output code, and renders annotations such as
* /* istanbul ignore next *\/ nonfunctional.
*/
attachComment?: boolean;
/**
* By default, Babel always throws an error when it finds some invalid code.
* When this option is set to true, it will store the parsing error and
* try to continue parsing the invalid input file.
*/
errorRecovery?: boolean;
/**
* Indicate the mode the code should be parsed in.
* Can be one of "script", "commonjs", "module", or "unambiguous". Defaults to "script".
* "unambiguous" will make @babel/parser attempt to guess, based on the presence
* of ES6 import or export statements.
* Files with ES6 imports and exports are considered "module" and are otherwise "script".
*
* Use "commonjs" to parse code that is intended to be run in a CommonJS environment such as Node.js.
*/
sourceType?: SourceType;
/**
* Correlate output AST nodes with their source filename.
* Useful when generating code and source maps from the ASTs of multiple input files.
*/
sourceFilename?: string;
/**
* By default, all source indexes start from 0.
* You can provide a start index to alternatively start with.
* Useful for integration with other source tools.
*/
startIndex?: number;
/**
* By default, the first line of code parsed is treated as line 1.
* You can provide a line number to alternatively start with.
* Useful for integration with other source tools.
*/
startLine?: number;
/**
* By default, the parsed code is treated as if it starts from line 1, column 0.
* You can provide a column number to alternatively start with.
* Useful for integration with other source tools.
*/
startColumn?: number;
/**
* Array containing the plugins that you want to enable.
*/
plugins?: Plugin[];
/**
* Should the parser work in strict mode.
* Defaults to true if sourceType === 'module'. Otherwise, false.
*/
strictMode?: boolean;
/**
* Adds a ranges property to each node: [node.start, node.end]
*/
ranges?: boolean;
/**
* Adds all parsed tokens to a tokens property on the File node.
*/
tokens?: boolean;
/**
* By default, the parser adds information about parentheses by setting
* `extra.parenthesized` to `true` as needed.
* When this option is `true` the parser creates `ParenthesizedExpression`
* AST nodes instead of using the `extra` property.
*/
createParenthesizedExpressions?: boolean;
/**
* The default is false in Babel 7 and true in Babel 8
* Set this to true to parse it as an `ImportExpression` node.
* Otherwise `import(foo)` is parsed as `CallExpression(Import, [Identifier(foo)])`.
*/
createImportExpressions?: boolean;
}
type ParserOptions = Partial<Options>;
type ParseError = ParseError$1<object>;
type ParseResult<Result extends File | Expression = File> = Result & {
comments: File["comments"];
errors: null | ParseError[];
tokens?: File["tokens"];
};
/**
* Parse the provided code as an entire ECMAScript program.
*/
declare function parse(input: string, options?: ParserOptions): ParseResult<File>;
declare function parseExpression(input: string, options?: ParserOptions): ParseResult<Expression>;
declare const tokTypes: {
// todo(flow->ts) real token type
[name: string]: any;
};
export { DecoratorsPluginOptions, FlowPluginOptions, ParseError, ParseResult, ParserOptions, PluginConfig as ParserPlugin, ParserPluginWithOptions, PipelineOperatorPluginOptions, RecordAndTuplePluginOptions, TypeScriptPluginOptions, parse, parseExpression, tokTypes };
@@ -0,0 +1,6 @@
{
"private": true,
"types": "../dist/react-client.d.ts",
"main": "../dist/cjs/react-client.js",
"module": "../dist/es/react-client.mjs"
}
@@ -0,0 +1,4 @@
var tempAdjacencyGraphs = {"azerty":{"0":["ç9",null,null,")°","pP","oO"],"1":["²~",null,null,"é2","aA",null],"2":["&1",null,null,"\"3","zZ","aA"],"3":["é2",null,null,"'4","eE","zZ"],"4":["\"3",null,null,"(5","rR","eE"],"5":["'4",null,null,"-6","tT","rR"],"6":["(5",null,null,"è7","yY","tT"],"7":["-6",null,null,"_8","uU","yY"],"8":["è7",null,null,"ç9","iI","uU"],"9":["_8",null,null,"à0","oO","iI"],"²":[null,null,null,"&1",null,null],"~":[null,null,null,"&1",null,null],"&":["²~",null,null,"é2","aA",null],"é":["&1",null,null,"\"3","zZ","aA"],"\"":["pP",")°","+=","$£","ù%","mM"],"'":["\"3",null,null,"(5","rR","eE"],"(":["'4",null,null,"-6","tT","rR"],"-":["(5",null,null,"è7","yY","tT"],"è":["-6",null,null,"_8","uU","yY"],"_":["è7",null,null,"ç9","iI","uU"],"ç":["_8",null,null,"à0","oO","iI"],"à":["ç9",null,null,")°","pP","oO"],")":["à0",null,null,"+=","^\"","pP"],"°":["à0",null,null,"+=","^\"","pP"],"+":[")°",null,null,null,"$£","^\""],"=":[")°",null,null,null,"$£","^\""],"a":[null,"&1","é2","zZ","qQ",null],"A":[null,"&1","é2","zZ","qQ",null],"z":["aA","é2","\"3","eE","sS","qQ"],"Z":["aA","é2","\"3","eE","sS","qQ"],"e":["zZ","\"3","'4","rR","dD","sS"],"E":["zZ","\"3","'4","rR","dD","sS"],"r":["eE","'4","(5","tT","fF","dD"],"R":["eE","'4","(5","tT","fF","dD"],"t":["rR","(5","-6","yY","gG","fF"],"T":["rR","(5","-6","yY","gG","fF"],"y":["tT","-6","è7","uU","hH","gG"],"Y":["tT","-6","è7","uU","hH","gG"],"u":["yY","è7","_8","iI","jJ","hH"],"U":["yY","è7","_8","iI","jJ","hH"],"i":["uU","_8","ç9","oO","kK","jJ"],"I":["uU","_8","ç9","oO","kK","jJ"],"o":["iI","ç9","à0","pP","lL","kK"],"O":["iI","ç9","à0","pP","lL","kK"],"p":["oO","à0",")°","^\"","mM","lL"],"P":["oO","à0",")°","^\"","mM","lL"],"^":["pP",")°","+=","$£","ù%","mM"],"$":["^\"","+=",null,null,"*µ","ù%"],"£":["^\"","+=",null,null,"*µ","ù%"],"q":[null,"aA","zZ","sS","wW","<>"],"Q":[null,"aA","zZ","sS","wW","<>"],"s":["qQ","zZ","eE","dD","xX","wW"],"S":["qQ","zZ","eE","dD","xX","wW"],"d":["sS","eE","rR","fF","cC","xX"],"D":["sS","eE","rR","fF","cC","xX"],"f":["dD","rR","tT","gG","vV","cC"],"F":["dD","rR","tT","gG","vV","cC"],"g":["fF","tT","yY","hH","bB","vV"],"G":["fF","tT","yY","hH","bB","vV"],"h":["gG","yY","uU","jJ","nN","bB"],"H":["gG","yY","uU","jJ","nN","bB"],"j":["hH","uU","iI","kK",",?","nN"],"J":["hH","uU","iI","kK",",?","nN"],"k":["jJ","iI","oO","lL",";.",",?"],"K":["jJ","iI","oO","lL",";.",",?"],"l":["kK","oO","pP","mM",":/",";."],"L":["kK","oO","pP","mM",":/",";."],"m":["lL","pP","^\"","ù%","!§",":/"],"M":["lL","pP","^\"","ù%","!§",":/"],"ù":["mM","^\"","$£","*µ",null,"!§"],"%":["mM","^\"","$£","*µ",null,"!§"],"*":["ù%","$£",null,null,null,null],"µ":["ù%","$£",null,null,null,null],"<":[null,null,"qQ","wW",null,null],">":[null,null,"qQ","wW",null,null],"w":["<>","qQ","sS","xX",null,null],"W":["<>","qQ","sS","xX",null,null],"x":["wW","sS","dD","cC",null,null],"X":["wW","sS","dD","cC",null,null],"c":["xX","dD","fF","vV",null,null],"C":["xX","dD","fF","vV",null,null],"v":["cC","fF","gG","bB",null,null],"V":["cC","fF","gG","bB",null,null],"b":["vV","gG","hH","nN",null,null],"B":["vV","gG","hH","nN",null,null],"n":["bB","hH","jJ",",?",null,null],"N":["bB","hH","jJ",",?",null,null],",":["nN","jJ","kK",";.",null,null],"?":["nN","jJ","kK",";.",null,null],";":[",?","kK","lL",":/",null,null],".":[",?","kK","lL",":/",null,null],":":[";.","lL","mM","!§",null,null],"/":[";.","lL","mM","!§",null,null],"!":[":/","mM","ù%",null,null,null],"§":[":/","mM","ù%",null,null,null]},"dvorak":{"0":["9(",null,null,"[{","lL","rR"],"1":["`~",null,null,"2@","'\"",null],"2":["1!",null,null,"3#",",<","'\""],"3":["2@",null,null,"4$",".>",",<"],"4":["3#",null,null,"5%","pP",".>"],"5":["4$",null,null,"6^","yY","pP"],"6":["5%",null,null,"7&","fF","yY"],"7":["6^",null,null,"8*","gG","fF"],"8":["7&",null,null,"9(","cC","gG"],"9":["8*",null,null,"0)","rR","cC"],"`":[null,null,null,"1!",null,null],"~":[null,null,null,"1!",null,null],"!":["`~",null,null,"2@","'\"",null],"@":["1!",null,null,"3#",",<","'\""],"#":["2@",null,null,"4$",".>",",<"],"$":["3#",null,null,"5%","pP",".>"],"%":["4$",null,null,"6^","yY","pP"],"^":["5%",null,null,"7&","fF","yY"],"&":["6^",null,null,"8*","gG","fF"],"*":["7&",null,null,"9(","cC","gG"],"(":["8*",null,null,"0)","rR","cC"],")":["9(",null,null,"[{","lL","rR"],"[":["0)",null,null,"]}","/?","lL"],"{":["0)",null,null,"]}","/?","lL"],"]":["[{",null,null,null,"=+","/?"],"}":["[{",null,null,null,"=+","/?"],"'":[null,"1!","2@",",<","aA",null],"\"":[null,"1!","2@",",<","aA",null],",":["'\"","2@","3#",".>","oO","aA"],"<":["'\"","2@","3#",".>","oO","aA"],".":[",<","3#","4$","pP","eE","oO"],">":[",<","3#","4$","pP","eE","oO"],"p":[".>","4$","5%","yY","uU","eE"],"P":[".>","4$","5%","yY","uU","eE"],"y":["pP","5%","6^","fF","iI","uU"],"Y":["pP","5%","6^","fF","iI","uU"],"f":["yY","6^","7&","gG","dD","iI"],"F":["yY","6^","7&","gG","dD","iI"],"g":["fF","7&","8*","cC","hH","dD"],"G":["fF","7&","8*",Line truncated
export { tempAdjacencyGraphs as default };
//# sourceMappingURL=adjacencyGraphs.json.mjs.map
@@ -0,0 +1,49 @@
"use strict";
Object.defineProperty(exports, "__esModule", {
value: true
});
exports.default = AsyncIterator;
var _OverloadYield = require("./OverloadYield.js");
var _regeneratorDefine = require("./regeneratorDefine.js");
function AsyncIterator(generator, PromiseImpl) {
if (!this.next) {
(0, _regeneratorDefine.default)(AsyncIterator.prototype);
(0, _regeneratorDefine.default)(AsyncIterator.prototype, typeof Symbol === "function" && Symbol.asyncIterator || "@asyncIterator", function () {
return this;
});
}
function invoke(method, arg, resolve, reject) {
try {
var result = generator[method](arg);
var value = result.value;
if (value instanceof _OverloadYield.default) {
return PromiseImpl.resolve(value.v).then(function (value) {
invoke("next", value, resolve, reject);
}, function (err) {
invoke("throw", err, resolve, reject);
});
}
return PromiseImpl.resolve(value).then(function (unwrapped) {
result.value = unwrapped;
resolve(result);
}, function (error) {
return invoke("throw", error, resolve, reject);
});
} catch (error) {
reject(error);
}
}
var previousPromise;
function enqueue(method, i, arg) {
function callInvokeWithMethodAndArg() {
return new PromiseImpl(function (resolve, reject) {
invoke(method, arg, resolve, reject);
});
}
return previousPromise = previousPromise ? previousPromise.then(callInvokeWithMethodAndArg, callInvokeWithMethodAndArg) : callInvokeWithMethodAndArg();
}
(0, _regeneratorDefine.default)(this, "_invoke", enqueue, true);
}
//# sourceMappingURL=regeneratorAsyncIterator.js.map
@@ -0,0 +1,81 @@
"use strict";
Object.defineProperty(exports, "__esModule", {
value: true
});
exports.TokenContext = void 0;
exports.isLastChild = isLastChild;
exports.parentNeedsParens = parentNeedsParens;
var parens = require("./parentheses.js");
var _t = require("@babel/types");
var _nodes = require("../nodes.js");
const {
VISITOR_KEYS
} = _t;
const TokenContext = exports.TokenContext = {
normal: 0,
expressionStatement: 1,
arrowBody: 2,
exportDefault: 4,
arrowFlowReturnType: 8,
forInitHead: 16,
forInHead: 32,
forOfHead: 64,
forInOrInitHeadAccumulate: 128,
forInOrInitHeadAccumulatePassThroughMask: 128
};
for (const type of Object.keys(parens)) {
const func = parens[type];
if (_nodes.generatorInfosMap.has(type)) {
_nodes.generatorInfosMap.get(type)[2] = func;
}
}
function isOrHasCallExpression(node) {
switch (node.type) {
case "CallExpression":
return true;
case "MemberExpression":
return isOrHasCallExpression(node.object);
}
return false;
}
function parentNeedsParens(node, parent, parentId) {
switch (parentId) {
case 112:
if (parent.callee === node) {
if (isOrHasCallExpression(node)) return true;
}
break;
case 42:
return !isDecoratorMemberExpression(node) && !(node.type === "CallExpression" && isDecoratorMemberExpression(node.callee)) && node.type !== "ParenthesizedExpression";
}
return false;
}
function isDecoratorMemberExpression(node) {
switch (node.type) {
case "Identifier":
return true;
case "MemberExpression":
return !node.computed && node.property.type === "Identifier" && isDecoratorMemberExpression(node.object);
default:
return false;
}
}
function isLastChild(parent, child) {
const visitorKeys = VISITOR_KEYS[parent.type];
for (let i = visitorKeys.length - 1; i >= 0; i--) {
const val = parent[visitorKeys[i]];
if (val === child) {
return true;
} else if (Array.isArray(val)) {
let j = val.length - 1;
while (j >= 0 && val[j] === null) j--;
return j >= 0 && val[j] === child;
} else if (val) {
return false;
}
}
return false;
}
//# sourceMappingURL=index.js.map
@@ -0,0 +1,497 @@
import { htmlDecodeTree } from "./generated/decode-data-html.js";
import { xmlDecodeTree } from "./generated/decode-data-xml.js";
import { replaceCodePoint, fromCodePoint } from "./decode-codepoint.js";
var CharCodes;
(function (CharCodes) {
CharCodes[CharCodes["NUM"] = 35] = "NUM";
CharCodes[CharCodes["SEMI"] = 59] = "SEMI";
CharCodes[CharCodes["EQUALS"] = 61] = "EQUALS";
CharCodes[CharCodes["ZERO"] = 48] = "ZERO";
CharCodes[CharCodes["NINE"] = 57] = "NINE";
CharCodes[CharCodes["LOWER_A"] = 97] = "LOWER_A";
CharCodes[CharCodes["LOWER_F"] = 102] = "LOWER_F";
CharCodes[CharCodes["LOWER_X"] = 120] = "LOWER_X";
CharCodes[CharCodes["LOWER_Z"] = 122] = "LOWER_Z";
CharCodes[CharCodes["UPPER_A"] = 65] = "UPPER_A";
CharCodes[CharCodes["UPPER_F"] = 70] = "UPPER_F";
CharCodes[CharCodes["UPPER_Z"] = 90] = "UPPER_Z";
})(CharCodes || (CharCodes = {}));
/** Bit that needs to be set to convert an upper case ASCII character to lower case */
const TO_LOWER_BIT = 32;
export var BinTrieFlags;
(function (BinTrieFlags) {
BinTrieFlags[BinTrieFlags["VALUE_LENGTH"] = 49152] = "VALUE_LENGTH";
BinTrieFlags[BinTrieFlags["BRANCH_LENGTH"] = 16256] = "BRANCH_LENGTH";
BinTrieFlags[BinTrieFlags["JUMP_TABLE"] = 127] = "JUMP_TABLE";
})(BinTrieFlags || (BinTrieFlags = {}));
function isNumber(code) {
return code >= CharCodes.ZERO && code <= CharCodes.NINE;
}
function isHexadecimalCharacter(code) {
return ((code >= CharCodes.UPPER_A && code <= CharCodes.UPPER_F) ||
(code >= CharCodes.LOWER_A && code <= CharCodes.LOWER_F));
}
function isAsciiAlphaNumeric(code) {
return ((code >= CharCodes.UPPER_A && code <= CharCodes.UPPER_Z) ||
(code >= CharCodes.LOWER_A && code <= CharCodes.LOWER_Z) ||
isNumber(code));
}
/**
* Checks if the given character is a valid end character for an entity in an attribute.
*
* Attribute values that aren't terminated properly aren't parsed, and shouldn't lead to a parser error.
* See the example in https://html.spec.whatwg.org/multipage/parsing.html#named-character-reference-state
*/
function isEntityInAttributeInvalidEnd(code) {
return code === CharCodes.EQUALS || isAsciiAlphaNumeric(code);
}
var EntityDecoderState;
(function (EntityDecoderState) {
EntityDecoderState[EntityDecoderState["EntityStart"] = 0] = "EntityStart";
EntityDecoderState[EntityDecoderState["NumericStart"] = 1] = "NumericStart";
EntityDecoderState[EntityDecoderState["NumericDecimal"] = 2] = "NumericDecimal";
EntityDecoderState[EntityDecoderState["NumericHex"] = 3] = "NumericHex";
EntityDecoderState[EntityDecoderState["NamedEntity"] = 4] = "NamedEntity";
})(EntityDecoderState || (EntityDecoderState = {}));
export var DecodingMode;
(function (DecodingMode) {
/** Entities in text nodes that can end with any character. */
DecodingMode[DecodingMode["Legacy"] = 0] = "Legacy";
/** Only allow entities terminated with a semicolon. */
DecodingMode[DecodingMode["Strict"] = 1] = "Strict";
/** Entities in attributes have limitations on ending characters. */
DecodingMode[DecodingMode["Attribute"] = 2] = "Attribute";
})(DecodingMode || (DecodingMode = {}));
/**
* Token decoder with support of writing partial entities.
*/
export class EntityDecoder {
constructor(
/** The tree used to decode entities. */
decodeTree,
/**
* The function that is called when a codepoint is decoded.
*
* For multi-byte named entities, this will be called multiple times,
* with the second codepoint, and the same `consumed` value.
*
* @param codepoint The decoded codepoint.
* @param consumed The number of bytes consumed by the decoder.
*/
emitCodePoint,
/** An object that is used to produce errors. */
errors) {
this.decodeTree = decodeTree;
this.emitCodePoint = emitCodePoint;
this.errors = errors;
/** The current state of the decoder. */
this.state = EntityDecoderState.EntityStart;
/** Characters that were consumed while parsing an entity. */
this.consumed = 1;
/**
* The result of the entity.
*
* Either the result index of a numeric entity, or the codepoint of a
* numeric entity.
*/
this.result = 0;
/** The current index in the decode tree. */
this.treeIndex = 0;
/** The number of characters that were consumed in excess. */
this.excess = 1;
/** The mode in which the decoder is operating. */
this.decodeMode = DecodingMode.Strict;
}
/** Resets the instance to make it reusable. */
startEntity(decodeMode) {
this.decodeMode = decodeMode;
this.state = EntityDecoderState.EntityStart;
this.result = 0;
this.treeIndex = 0;
this.excess = 1;
this.consumed = 1;
}
/**
* Write an entity to the decoder. This can be called multiple times with partial entities.
* If the entity is incomplete, the decoder will return -1.
*
* Mirrors the implementation of `getDecoder`, but with the ability to stop decoding if the
* entity is incomplete, and resume when the next string is written.
*
* @param input The string containing the entity (or a continuation of the entity).
* @param offset The offset at which the entity begins. Should be 0 if this is not the first call.
* @returns The number of characters that were consumed, or -1 if the entity is incomplete.
*/
write(input, offset) {
switch (this.state) {
case EntityDecoderState.EntityStart: {
if (input.charCodeAt(offset) === CharCodes.NUM) {
this.state = EntityDecoderState.NumericStart;
this.consumed += 1;
return this.stateNumericStart(input, offset + 1);
}
this.state = EntityDecoderState.NamedEntity;
return this.stateNamedEntity(input, offset);
}
case EntityDecoderState.NumericStart: {
return this.stateNumericStart(input, offset);
}
case EntityDecoderState.NumericDecimal: {
return this.stateNumericDecimal(input, offset);
}
case EntityDecoderState.NumericHex: {
return this.stateNumericHex(input, offset);
}
case EntityDecoderState.NamedEntity: {
return this.stateNamedEntity(input, offset);
}
}
}
/**
* Switches between the numeric decimal and hexadecimal states.
*
* Equivalent to the `Numeric character reference state` in the HTML spec.
*
* @param input The string containing the entity (or a continuation of the entity).
* @param offset The current offset.
* @returns The number of characters that were consumed, or -1 if the entity is incomplete.
*/
stateNumericStart(input, offset) {
if (offset >= input.length) {
return -1;
}
if ((input.charCodeAt(offset) | TO_LOWER_BIT) === CharCodes.LOWER_X) {
this.state = EntityDecoderState.NumericHex;
this.consumed += 1;
return this.stateNumericHex(input, offset + 1);
}
this.state = EntityDecoderState.NumericDecimal;
return this.stateNumericDecimal(input, offset);
}
addToNumericResult(input, start, end, base) {
if (start !== end) {
const digitCount = end - start;
this.result =
this.result * Math.pow(base, digitCount) +
Number.parseInt(input.substr(start, digitCount), base);
this.consumed += digitCount;
}
}
/**
* Parses a hexadecimal numeric entity.
*
* Equivalent to the `Hexademical character reference state` in the HTML spec.
*
* @param input The string containing the entity (or a continuation of the entity).
* @param offset The current offset.
* @returns The number of characters that were consumed, or -1 if the entity is incomplete.
*/
stateNumericHex(input, offset) {
const startIndex = offset;
while (offset < input.length) {
const char = input.charCodeAt(offset);
if (isNumber(char) || isHexadecimalCharacter(char)) {
offset += 1;
}
else {
this.addToNumericResult(input, startIndex, offset, 16);
return this.emitNumericEntity(char, 3);
}
}
this.addToNumericResult(input, startIndex, offset, 16);
return -1;
}
/**
* Parses a decimal numeric entity.
*
* Equivalent to the `Decimal character reference state` in the HTML spec.
*
* @param input The string containing the entity (or a continuation of the entity).
* @param offset The current offset.
* @returns The number of characters that were consumed, or -1 if the entity is incomplete.
*/
stateNumericDecimal(input, offset) {
const startIndex = offset;
while (offset < input.length) {
const char = input.charCodeAt(offset);
if (isNumber(char)) {
offset += 1;
}
else {
this.addToNumericResult(input, startIndex, offset, 10);
return this.emitNumericEntity(char, 2);
}
}
this.addToNumericResult(input, startIndex, offset, 10);
return -1;
}
/**
* Validate and emit a numeric entity.
*
* Implements the logic from the `Hexademical character reference start
* state` and `Numeric character reference end state` in the HTML spec.
*
* @param lastCp The last code point of the entity. Used to see if the
* entity was terminated with a semicolon.
* @param expectedLength The minimum number of characters that should be
* consumed. Used to validate that at least one digit
* was consumed.
* @returns The number of characters that were consumed.
*/
emitNumericEntity(lastCp, expectedLength) {
var _a;
// Ensure we consumed at least one digit.
if (this.consumed <= expectedLength) {
(_a = this.errors) === null || _a === void 0 ? void 0 : _a.absenceOfDigitsInNumericCharacterReference(this.consumed);
return 0;
}
// Figure out if this is a legit end of the entity
if (lastCp === CharCodes.SEMI) {
this.consumed += 1;
}
else if (this.decodeMode === DecodingMode.Strict) {
return 0;
}
this.emitCodePoint(replaceCodePoint(this.result), this.consumed);
if (this.errors) {
if (lastCp !== CharCodes.SEMI) {
this.errors.missingSemicolonAfterCharacterReference();
}
this.errors.validateNumericCharacterReference(this.result);
}
return this.consumed;
}
/**
* Parses a named entity.
*
* Equivalent to the `Named character reference state` in the HTML spec.
*
* @param input The string containing the entity (or a continuation of the entity).
* @param offset The current offset.
* @returns The number of characters that were consumed, or -1 if the entity is incomplete.
*/
stateNamedEntity(input, offset) {
const { decodeTree } = this;
let current = decodeTree[this.treeIndex];
// The mask is the number of bytes of the value, including the current byte.
let valueLength = (current & BinTrieFlags.VALUE_LENGTH) >> 14;
for (; offset < input.length; offset++, this.excess++) {
const char = input.charCodeAt(offset);
this.treeIndex = determineBranch(decodeTree, current, this.treeIndex + Math.max(1, valueLength), char);
if (this.treeIndex < 0) {
return this.result === 0 ||
// If we are parsing an attribute
(this.decodeMode === DecodingMode.Attribute &&
// We shouldn't have consumed any characters after the entity,
(valueLength === 0 ||
// And there should be no invalid characters.
isEntityInAttributeInvalidEnd(char)))
? 0
: this.emitNotTerminatedNamedEntity();
}
current = decodeTree[this.treeIndex];
valueLength = (current & BinTrieFlags.VALUE_LENGTH) >> 14;
// If the branch is a value, store it and continue
if (valueLength !== 0) {
// If the entity is terminated by a semicolon, we are done.
if (char === CharCodes.SEMI) {
return this.emitNamedEntityData(this.treeIndex, valueLength, this.consumed + this.excess);
}
// If we encounter a non-terminated (legacy) entity while parsing strictly, then ignore it.
if (this.decodeMode !== DecodingMode.Strict) {
this.result = this.treeIndex;
this.consumed += this.excess;
this.excess = 0;
}
}
}
return -1;
}
/**
* Emit a named entity that was not terminated with a semicolon.
*
* @returns The number of characters consumed.
*/
emitNotTerminatedNamedEntity() {
var _a;
const { result, decodeTree } = this;
const valueLength = (decodeTree[result] & BinTrieFlags.VALUE_LENGTH) >> 14;
this.emitNamedEntityData(result, valueLength, this.consumed);
(_a = this.errors) === null || _a === void 0 ? void 0 : _a.missingSemicolonAfterCharacterReference();
return this.consumed;
}
/**
* Emit a named entity.
*
* @param result The index of the entity in the decode tree.
* @param valueLength The number of bytes in the entity.
* @param consumed The number of characters consumed.
*
* @returns The number of characters consumed.
*/
emitNamedEntityData(result, valueLength, consumed) {
const { decodeTree } = this;
this.emitCodePoint(valueLength === 1
? decodeTree[result] & ~BinTrieFlags.VALUE_LENGTH
: decodeTree[result + 1], consumed);
if (valueLength === 3) {
// For multi-byte values, we need to emit the second byte.
this.emitCodePoint(decodeTree[result + 2], consumed);
}
return consumed;
}
/**
* Signal to the parser that the end of the input was reached.
*
* Remaining data will be emitted and relevant errors will be produced.
*
* @returns The number of characters consumed.
*/
end() {
var _a;
switch (this.state) {
case EntityDecoderState.NamedEntity: {
// Emit a named entity if we have one.
return this.result !== 0 &&
(this.decodeMode !== DecodingMode.Attribute ||
this.result === this.treeIndex)
? this.emitNotTerminatedNamedEntity()
: 0;
}
// Otherwise, emit a numeric entity if we have one.
case EntityDecoderState.NumericDecimal: {
return this.emitNumericEntity(0, 2);
}
case EntityDecoderState.NumericHex: {
return this.emitNumericEntity(0, 3);
}
case EntityDecoderState.NumericStart: {
(_a = this.errors) === null || _a === void 0 ? void 0 : _a.absenceOfDigitsInNumericCharacterReference(this.consumed);
return 0;
}
case EntityDecoderState.EntityStart: {
// Return 0 if we have no entity.
return 0;
}
}
}
}
/**
* Creates a function that decodes entities in a string.
*
* @param decodeTree The decode tree.
* @returns A function that decodes entities in a string.
*/
function getDecoder(decodeTree) {
let returnValue = "";
const decoder = new EntityDecoder(decodeTree, (data) => (returnValue += fromCodePoint(data)));
return function decodeWithTrie(input, decodeMode) {
let lastIndex = 0;
let offset = 0;
while ((offset = input.indexOf("&", offset)) >= 0) {
returnValue += input.slice(lastIndex, offset);
decoder.startEntity(decodeMode);
const length = decoder.write(input,
// Skip the "&"
offset + 1);
if (length < 0) {
lastIndex = offset + decoder.end();
break;
}
lastIndex = offset + length;
// If `length` is 0, skip the current `&` and continue.
offset = length === 0 ? lastIndex + 1 : lastIndex;
}
const result = returnValue + input.slice(lastIndex);
// Make sure we don't keep a reference to the final string.
returnValue = "";
return result;
};
}
/**
* Determines the branch of the current node that is taken given the current
* character. This function is used to traverse the trie.
*
* @param decodeTree The trie.
* @param current The current node.
* @param nodeIdx The index right after the current node and its value.
* @param char The current character.
* @returns The index of the next node, or -1 if no branch is taken.
*/
export function determineBranch(decodeTree, current, nodeIndex, char) {
const branchCount = (current & BinTrieFlags.BRANCH_LENGTH) >> 7;
const jumpOffset = current & BinTrieFlags.JUMP_TABLE;
// Case 1: Single branch encoded in jump offset
if (branchCount === 0) {
return jumpOffset !== 0 && char === jumpOffset ? nodeIndex : -1;
}
// Case 2: Multiple branches encoded in jump table
if (jumpOffset) {
const value = char - jumpOffset;
return value < 0 || value >= branchCount
? -1
: decodeTree[nodeIndex + value] - 1;
}
// Case 3: Multiple branches encoded in dictionary
// Binary search for the character.
let lo = nodeIndex;
let hi = lo + branchCount - 1;
while (lo <= hi) {
const mid = (lo + hi) >>> 1;
const midValue = decodeTree[mid];
if (midValue < char) {
lo = mid + 1;
}
else if (midValue > char) {
hi = mid - 1;
}
else {
return decodeTree[mid + branchCount];
}
}
return -1;
}
const htmlDecoder = /* #__PURE__ */ getDecoder(htmlDecodeTree);
const xmlDecoder = /* #__PURE__ */ getDecoder(xmlDecodeTree);
/**
* Decodes an HTML string.
*
* @param htmlString The string to decode.
* @param mode The decoding mode.
* @returns The decoded string.
*/
export function decodeHTML(htmlString, mode = DecodingMode.Legacy) {
return htmlDecoder(htmlString, mode);
}
/**
* Decodes an HTML string in an attribute.
*
* @param htmlAttribute The string to decode.
* @returns The decoded string.
*/
export function decodeHTMLAttribute(htmlAttribute) {
return htmlDecoder(htmlAttribute, DecodingMode.Attribute);
}
/**
* Decodes an HTML string, requiring all entities to be terminated by a semicolon.
*
* @param htmlString The string to decode.
* @returns The decoded string.
*/
export function decodeHTMLStrict(htmlString) {
return htmlDecoder(htmlString, DecodingMode.Strict);
}
/**
* Decodes an XML string, requiring all entities to be terminated by a semicolon.
*
* @param xmlString The string to decode.
* @returns The decoded string.
*/
export function decodeXML(xmlString) {
return xmlDecoder(xmlString, DecodingMode.Strict);
}
// Re-export for use by eg. htmlparser2
export { htmlDecodeTree } from "./generated/decode-data-html.js";
export { xmlDecodeTree } from "./generated/decode-data-xml.js";
export { decodeCodePoint, replaceCodePoint, fromCodePoint, } from "./decode-codepoint.js";
//# sourceMappingURL=decode.js.map
@@ -0,0 +1,24 @@
# Changelog
All notable changes to this project will be documented in this file.
The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/)
and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).
## [v1.0.1](https://github.com/es-shims/dunder-proto/compare/v1.0.0...v1.0.1) - 2024-12-16
### Commits
- [Fix] do not crash when `--disable-proto=throw` [`6c367d9`](https://github.com/es-shims/dunder-proto/commit/6c367d919bc1604778689a297bbdbfea65752847)
- [Tests] ensure noproto tests only use the current version of dunder-proto [`b02365b`](https://github.com/es-shims/dunder-proto/commit/b02365b9cf889c4a2cac7be0c3cfc90a789af36c)
- [Dev Deps] update `@arethetypeswrong/cli`, `@types/tape` [`e3c5c3b`](https://github.com/es-shims/dunder-proto/commit/e3c5c3bd81cf8cef7dff2eca19e558f0e307f666)
- [Deps] update `call-bind-apply-helpers` [`19f1da0`](https://github.com/es-shims/dunder-proto/commit/19f1da028b8dd0d05c85bfd8f7eed2819b686450)
## v1.0.0 - 2024-12-06
### Commits
- Initial implementation, tests, readme, types [`a5b74b0`](https://github.com/es-shims/dunder-proto/commit/a5b74b0082f5270cb0905cd9a2e533cee7498373)
- Initial commit [`73fb5a3`](https://github.com/es-shims/dunder-proto/commit/73fb5a353b51ac2ab00c9fdeb0114daffd4c07a8)
- npm init [`80152dc`](https://github.com/es-shims/dunder-proto/commit/80152dc98155da4eb046d9f67a87ed96e8280a1d)
- Only apps should have lockfiles [`03e6660`](https://github.com/es-shims/dunder-proto/commit/03e6660a1d70dc401f3e217a031475ec537243dd)
@@ -0,0 +1,23 @@
/**
* @license lucide-react v0.469.0 - ISC
*
* This source code is licensed under the ISC license.
* See the LICENSE file in the root directory of this source tree.
*/
import createLucideIcon from '../createLucideIcon.js';
const Cuboid = createLucideIcon("Cuboid", [
[
"path",
{
d: "m21.12 6.4-6.05-4.06a2 2 0 0 0-2.17-.05L2.95 8.41a2 2 0 0 0-.95 1.7v5.82a2 2 0 0 0 .88 1.66l6.05 4.07a2 2 0 0 0 2.17.05l9.95-6.12a2 2 0 0 0 .95-1.7V8.06a2 2 0 0 0-.88-1.66Z",
key: "1u2ovd"
}
],
["path", { d: "M10 22v-8L2.25 9.15", key: "11pn4q" }],
["path", { d: "m10 14 11.77-6.87", key: "1kt1wh" }]
]);
export { Cuboid as default };
//# sourceMappingURL=cuboid.js.map
@@ -0,0 +1 @@
{"version":3,"file":"bring-to-front.js","sources":["../../../src/icons/bring-to-front.ts"],"sourcesContent":["import createLucideIcon from '../createLucideIcon';\n\n/**\n * @component @name BringToFront\n * @description Lucide SVG icon component, renders SVG Element with children.\n *\n * @preview ![img](data:image/svg+xml;base64,PHN2ZyAgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIgogIHdpZHRoPSIyNCIKICBoZWlnaHQ9IjI0IgogIHZpZXdCb3g9IjAgMCAyNCAyNCIKICBmaWxsPSJub25lIgogIHN0cm9rZT0iIzAwMCIgc3R5bGU9ImJhY2tncm91bmQtY29sb3I6ICNmZmY7IGJvcmRlci1yYWRpdXM6IDJweCIKICBzdHJva2Utd2lkdGg9IjIiCiAgc3Ryb2tlLWxpbmVjYXA9InJvdW5kIgogIHN0cm9rZS1saW5lam9pbj0icm91bmQiCj4KICA8cmVjdCB4PSI4IiB5PSI4IiB3aWR0aD0iOCIgaGVpZ2h0PSI4IiByeD0iMiIgLz4KICA8cGF0aCBkPSJNNCAxMGEyIDIgMCAwIDEtMi0yVjRhMiAyIDAgMCAxIDItMmg0YTIgMiAwIDAgMSAyIDIiIC8+CiAgPHBhdGggZD0iTTE0IDIwYTIgMiAwIDAgMCAyIDJoNGEyIDIgMCAwIDAgMi0ydi00YTIgMiAwIDAgMC0yLTIiIC8+Cjwvc3ZnPgo=) - https://lucide.dev/icons/bring-to-front\n * @see https://lucide.dev/guide/packages/lucide-react - Documentation\n *\n * @param {Object} props - Lucide icons props and any valid SVG attribute\n * @returns {JSX.Element} JSX Element\n *\n */\nconst BringToFront = createLucideIcon('BringToFront', [\n ['rect', { x: '8', y: '8', width: '8', height: '8', rx: '2', key: 'yj20xf' }],\n ['path', { d: 'M4 10a2 2 0 0 1-2-2V4a2 2 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CAAA,CAAA,CAAQ,CAAA,CAAA,CAAA,CAAE,GAAG,CAAyD,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,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;AACxF,CAAC,CAAA,CAAA;;"}
@@ -0,0 +1,23 @@
"use client";
import { frame, cancelFrame } from 'motion-dom';
import { useRef, useContext, useEffect } from 'react';
import { MotionConfigContext } from '../context/MotionConfigContext.mjs';
function useAnimationFrame(callback) {
const initialTimestamp = useRef(0);
const { isStatic } = useContext(MotionConfigContext);
useEffect(() => {
if (isStatic)
return;
const provideTimeSinceStart = ({ timestamp, delta }) => {
if (!initialTimestamp.current)
initialTimestamp.current = timestamp;
callback(timestamp - initialTimestamp.current, delta);
};
frame.update(provideTimeSinceStart, true);
return () => cancelFrame(provideTimeSinceStart);
}, [callback]);
}
export { useAnimationFrame };
//# sourceMappingURL=use-animation-frame.mjs.map
@@ -0,0 +1,70 @@
import { expect, test } from "vitest";
import * as z from "zod/v3";
const crazySchema = z.object({
tuple: z.tuple([
z.string().nullable().optional(),
z.number().nullable().optional(),
z.boolean().nullable().optional(),
z.null().nullable().optional(),
z.undefined().nullable().optional(),
z.literal("1234").nullable().optional(),
]),
merged: z
.object({
k1: z.string().optional(),
})
.merge(z.object({ k1: z.string().nullable(), k2: z.number() })),
union: z.array(z.union([z.literal("asdf"), z.literal(12)])).nonempty(),
array: z.array(z.number()),
// sumTransformer: z.transformer(z.array(z.number()), z.number(), (arg) => {
// return arg.reduce((a, b) => a + b, 0);
// }),
sumMinLength: z.array(z.number()).refine((arg) => arg.length > 5),
intersection: z.intersection(z.object({ p1: z.string().optional() }), z.object({ p1: z.number().optional() })),
enum: z.intersection(z.enum(["zero", "one"]), z.enum(["one", "two"])),
nonstrict: z.object({ points: z.number() }).nonstrict(),
numProm: z.promise(z.number()),
lenfun: z.function(z.tuple([z.string()]), z.boolean()),
});
// const asyncCrazySchema = crazySchema.extend({
// // async_transform: z.transformer(
// // z.array(z.number()),
// // z.number(),
// // async (arg) => {
// // return arg.reduce((a, b) => a + b, 0);
// // }
// // ),
// async_refine: z.array(z.number()).refine(async (arg) => arg.length > 5),
// });
test("parse", () => {
const input = {
tuple: ["asdf", 1234, true, null, undefined, "1234"],
merged: { k1: "asdf", k2: 12 },
union: ["asdf", 12, "asdf", 12, "asdf", 12],
array: [12, 15, 16],
// sumTransformer: [12, 15, 16],
sumMinLength: [12, 15, 16, 98, 24, 63],
intersection: {},
enum: "one",
nonstrict: { points: 1234 },
numProm: Promise.resolve(12),
lenfun: (x: string) => x.length,
};
const result = crazySchema.parse(input);
// Verify the parsed result structure
expect(result.tuple).toEqual(input.tuple);
expect(result.merged).toEqual(input.merged);
expect(result.union).toEqual(input.union);
expect(result.array).toEqual(input.array);
expect(result.sumMinLength).toEqual(input.sumMinLength);
expect(result.intersection).toEqual(input.intersection);
expect(result.enum).toEqual(input.enum);
expect(result.nonstrict).toEqual(input.nonstrict);
expect(result.numProm).toBeInstanceOf(Promise);
expect(typeof result.lenfun).toBe("function");
});
@@ -0,0 +1,74 @@
import type { SerovalNode } from 'seroval';
import { createPlugin } from 'seroval';
type ImageDataNode = {
data: SerovalNode;
width: SerovalNode;
height: SerovalNode;
options: SerovalNode;
};
const ImageDataPlugin = /* @__PURE__ */ createPlugin<ImageData, ImageDataNode>({
tag: 'seroval-plugins/web/ImageData',
test(value) {
if (typeof ImageData === 'undefined') {
return false;
}
return value instanceof ImageData;
},
parse: {
sync(value, ctx) {
return {
data: ctx.parse(value.data),
width: ctx.parse(value.width),
height: ctx.parse(value.height),
options: ctx.parse({
colorSpace: value.colorSpace,
}),
};
},
async async(value, ctx) {
return {
data: await ctx.parse(value.data),
width: await ctx.parse(value.width),
height: await ctx.parse(value.height),
options: await ctx.parse({
colorSpace: value.colorSpace,
}),
};
},
stream(value, ctx) {
return {
data: ctx.parse(value.data),
width: ctx.parse(value.width),
height: ctx.parse(value.height),
options: ctx.parse({
colorSpace: value.colorSpace,
}),
};
},
},
serialize(node, ctx) {
return (
'new ImageData(' +
ctx.serialize(node.data) +
',' +
ctx.serialize(node.width) +
',' +
ctx.serialize(node.height) +
',' +
ctx.serialize(node.options) +
')'
);
},
deserialize(node, ctx) {
return new ImageData(
ctx.deserialize(node.data) as Uint8ClampedArray<ArrayBuffer>,
ctx.deserialize(node.width) as number,
ctx.deserialize(node.height) as number,
ctx.deserialize(node.options) as ImageDataSettings,
);
},
});
export default ImageDataPlugin;
@@ -0,0 +1 @@
module.exports={A:{A:{"2":"_E"},B:{"1":"_K","2":"_I"},C:{"1":"_pF","2":"_TK","194":"zB _bC","450":"_NB _8G yB","2242":"_LG"},D:{"1":"_KK","2":"_LE","578":"_AE _SE"},E:{"1":"_dE","2":"_RB","1090":"_BL _NE SD"},F:{"1":"_QL","2":"_jR"},G:{"1":"_cE","2":"_JI","1090":"oD _pI vD"},H:{"2":"1D"},I:{"1":"I","2":"_G"},J:{"2":"_B"},K:{"1":"H","2":"_D"},L:{"1":"I"},M:{"1":"YC"},N:{"2":"_A"},O:{"1":"bC"},P:{"1":"_xB","2":"_3B"},Q:{"1":"JE"},R:{"1":"KE"},S:{"1":"ME","2242":"LE"}},B:6,C:"WebGL 2.0",D:true};
@@ -0,0 +1,8 @@
import { r as rangeOfUnits } from "./constants-BuFquuHl.mjs";
const units = rangeOfUnits.reduce((acc, unit) => {
acc[unit.toUpperCase()] = unit;
return acc;
}, {});
export {
units as default
};
@@ -0,0 +1 @@
module.exports={A:{A:{"2":"_E"},B:{"2":"_uJ","322":"_xN _i","450":"_VP Z"},C:{"2":"_S"},D:{"2":"_ER","194":"_UJ _iQ","322":"_nG _gH","450":"V"},E:{"2":"_R"},F:{"2":"_1F","194":"_8K","322":"_bJ"},G:{"2":"_M"},H:{"2":"1D"},I:{"2":"_P"},J:{"2":"_B"},K:{"2":"_N"},L:{"450":"I"},M:{"2":"YC"},N:{"2":"_A"},O:{"2":"bC"},P:{"2":"_F"},Q:{"2":"JE"},R:{"2":"KE"},S:{"2":"_C"}},B:7,C:"Portals",D:true};
@@ -0,0 +1,651 @@
// this[BUFFER] is the remainder of a chunk if we're waiting for
// the full 512 bytes of a header to come in. We will Buffer.concat()
// it to the next write(), which is a mem copy, but a small one.
//
// this[QUEUE] is a list of entries that haven't been emitted
// yet this can only get filled up if the user keeps write()ing after
// a write() returns false, or does a write() with more than one entry
//
// We don't buffer chunks, we always parse them and either create an
// entry, or push it into the active entry. The ReadEntry class knows
// to throw data away if .ignore=true
//
// Shift entry off the buffer when it emits 'end', and emit 'entry' for
// the next one in the list.
//
// At any time, we're pushing body chunks into the entry at WRITEENTRY,
// and waiting for 'end' on the entry at READENTRY
//
// ignored entries get .resume() called on them straight away
import { EventEmitter as EE } from 'events';
import { BrotliDecompress, Unzip, ZstdDecompress } from 'minizlib';
import { Header } from './header.js';
import { Pax } from './pax.js';
import { ReadEntry } from './read-entry.js';
import { warnMethod } from './warn-method.js';
const maxMetaEntrySize = 1024 * 1024;
const gzipHeader = Buffer.from([0x1f, 0x8b]);
const zstdHeader = Buffer.from([0x28, 0xb5, 0x2f, 0xfd]);
const ZIP_HEADER_LEN = Math.max(gzipHeader.length, zstdHeader.length);
const STATE = Symbol('state');
const WRITEENTRY = Symbol('writeEntry');
const READENTRY = Symbol('readEntry');
const NEXTENTRY = Symbol('nextEntry');
const PROCESSENTRY = Symbol('processEntry');
const EX = Symbol('extendedHeader');
const GEX = Symbol('globalExtendedHeader');
const META = Symbol('meta');
const EMITMETA = Symbol('emitMeta');
const BUFFER = Symbol('buffer');
const QUEUE = Symbol('queue');
const ENDED = Symbol('ended');
const EMITTEDEND = Symbol('emittedEnd');
const EMIT = Symbol('emit');
const UNZIP = Symbol('unzip');
const CONSUMECHUNK = Symbol('consumeChunk');
const CONSUMECHUNKSUB = Symbol('consumeChunkSub');
const CONSUMEBODY = Symbol('consumeBody');
const CONSUMEMETA = Symbol('consumeMeta');
const CONSUMEHEADER = Symbol('consumeHeader');
const CONSUMING = Symbol('consuming');
const BUFFERCONCAT = Symbol('bufferConcat');
const MAYBEEND = Symbol('maybeEnd');
const WRITING = Symbol('writing');
const ABORTED = Symbol('aborted');
const DONE = Symbol('onDone');
const SAW_VALID_ENTRY = Symbol('sawValidEntry');
const SAW_NULL_BLOCK = Symbol('sawNullBlock');
const SAW_EOF = Symbol('sawEOF');
const CLOSESTREAM = Symbol('closeStream');
const MAX_DECOMPRESSION_RATIO = 1000;
const COMPRESSEDBYTESREAD = Symbol('compressedBytesRead');
const DECOMPRESSEDBYTESREAD = Symbol('decompressedBytesRead');
const CHECKDECOMPRESSIONRATIO = Symbol('checkDecompressionRatio');
const noop = () => true;
export class Parser extends EE {
file;
strict;
maxMetaEntrySize;
filter;
brotli;
zstd;
maxDecompressionRatio;
writable = true;
readable = false;
[QUEUE] = [];
[BUFFER];
[READENTRY];
[WRITEENTRY];
[STATE] = 'begin';
[META] = '';
[EX];
[GEX];
[ENDED] = false;
[UNZIP];
[ABORTED] = false;
[SAW_VALID_ENTRY];
[SAW_NULL_BLOCK] = false;
[SAW_EOF] = false;
[WRITING] = false;
[CONSUMING] = false;
[EMITTEDEND] = false;
[COMPRESSEDBYTESREAD] = 0;
[DECOMPRESSEDBYTESREAD] = 0;
constructor(opt = {}) {
super();
this.file = opt.file || '';
// these BADARCHIVE errors can't be detected early. listen on DONE.
this.on(DONE, () => {
if (this[STATE] === 'begin' || this[SAW_VALID_ENTRY] === false) {
// either less than 1 block of data, or all entries were invalid.
// Either way, probably not even a tarball.
this.warn('TAR_BAD_ARCHIVE', 'Unrecognized archive format');
}
});
if (opt.ondone) {
this.on(DONE, opt.ondone);
}
else {
this.on(DONE, () => {
this.emit('prefinish');
this.emit('finish');
this.emit('end');
});
}
this.strict = !!opt.strict;
this.maxDecompressionRatio =
typeof opt.maxDecompressionRatio === 'number' ?
opt.maxDecompressionRatio
: MAX_DECOMPRESSION_RATIO;
this.maxMetaEntrySize = opt.maxMetaEntrySize || maxMetaEntrySize;
this.filter = typeof opt.filter === 'function' ? opt.filter : noop;
// Unlike gzip, brotli doesn't have any magic bytes to identify it
// Users need to explicitly tell us they're extracting a brotli file
// Or we infer from the file extension
const isTBR = opt.file &&
(opt.file.endsWith('.tar.br') || opt.file.endsWith('.tbr'));
// if it's a tbr file it MIGHT be brotli, but we don't know until
// we look at it and verify it's not a valid tar file.
this.brotli =
!(opt.gzip || opt.zstd) && opt.brotli !== undefined ? opt.brotli
: isTBR ? undefined
: false;
// zstd has magic bytes to identify it, but we also support explicit options
// and file extension detection
const isTZST = opt.file &&
(opt.file.endsWith('.tar.zst') || opt.file.endsWith('.tzst'));
this.zstd =
!(opt.gzip || opt.brotli) && opt.zstd !== undefined ? opt.zstd
: isTZST ? true
: undefined;
// have to set this so that streams are ok piping into it
this.on('end', () => this[CLOSESTREAM]());
if (typeof opt.onwarn === 'function') {
this.on('warn', opt.onwarn);
}
if (typeof opt.onReadEntry === 'function') {
this.on('entry', opt.onReadEntry);
}
}
warn(code, message, data = {}) {
warnMethod(this, code, message, data);
}
[CONSUMEHEADER](chunk, position) {
if (this[SAW_VALID_ENTRY] === undefined) {
this[SAW_VALID_ENTRY] = false;
}
let header;
try {
header = new Header(chunk, position, this[EX], this[GEX]);
}
catch (er) {
return this.warn('TAR_ENTRY_INVALID', er);
}
if (header.nullBlock) {
if (this[SAW_NULL_BLOCK]) {
this[SAW_EOF] = true;
// ending an archive with no entries. pointless, but legal.
if (this[STATE] === 'begin') {
this[STATE] = 'header';
}
this[EMIT]('eof');
}
else {
this[SAW_NULL_BLOCK] = true;
this[EMIT]('nullBlock');
}
}
else {
this[SAW_NULL_BLOCK] = false;
if (!header.cksumValid) {
this.warn('TAR_ENTRY_INVALID', 'checksum failure', { header });
}
else if (!header.path) {
this.warn('TAR_ENTRY_INVALID', 'path is required', { header });
}
else {
const type = header.type;
if (/^(Symbolic)?Link$/.test(type) && !header.linkpath) {
this.warn('TAR_ENTRY_INVALID', 'linkpath required', {
header,
});
}
else if (!/^(Symbolic)?Link$/.test(type) &&
!/^(Global)?ExtendedHeader$/.test(type) &&
header.linkpath) {
this.warn('TAR_ENTRY_INVALID', 'linkpath forbidden', {
header,
});
}
else {
const entry = (this[WRITEENTRY] = new ReadEntry(header, this[EX], this[GEX]));
// we do this for meta & ignored entries as well, because they
// are still valid tar, or else we wouldn't know to ignore them
if (!this[SAW_VALID_ENTRY]) {
if (entry.remain) {
// this might be the one!
const onend = () => {
if (!entry.invalid) {
this[SAW_VALID_ENTRY] = true;
}
};
entry.on('end', onend);
}
else {
this[SAW_VALID_ENTRY] = true;
}
}
if (entry.meta) {
if (entry.size > this.maxMetaEntrySize) {
entry.ignore = true;
this[EMIT]('ignoredEntry', entry);
this[STATE] = 'ignore';
entry.resume();
}
else if (entry.size > 0) {
this[META] = '';
entry.on('data', c => (this[META] += c));
this[STATE] = 'meta';
}
}
else {
this[EX] = undefined;
entry.ignore = entry.ignore || !this.filter(entry.path, entry);
if (entry.ignore) {
// probably valid, just not something we care about
this[EMIT]('ignoredEntry', entry);
this[STATE] = entry.remain ? 'ignore' : 'header';
entry.resume();
}
else {
if (entry.remain) {
this[STATE] = 'body';
}
else {
this[STATE] = 'header';
entry.end();
}
if (!this[READENTRY]) {
this[QUEUE].push(entry);
this[NEXTENTRY]();
}
else {
this[QUEUE].push(entry);
}
}
}
}
}
}
}
[CLOSESTREAM]() {
queueMicrotask(() => this.emit('close'));
}
[PROCESSENTRY](entry) {
let go = true;
if (!entry) {
this[READENTRY] = undefined;
go = false;
}
else if (Array.isArray(entry)) {
const [ev, ...args] = entry;
this.emit(ev, ...args);
}
else {
this[READENTRY] = entry;
this.emit('entry', entry);
if (!entry.emittedEnd) {
entry.on('end', () => this[NEXTENTRY]());
go = false;
}
}
return go;
}
[NEXTENTRY]() {
do { } while (this[PROCESSENTRY](this[QUEUE].shift()));
if (this[QUEUE].length === 0) {
// At this point, there's nothing in the queue, but we may have an
// entry which is being consumed (readEntry).
// If we don't, then we definitely can handle more data.
// If we do, and either it's flowing, or it has never had any data
// written to it, then it needs more.
// The only other possibility is that it has returned false from a
// write() call, so we wait for the next drain to continue.
const re = this[READENTRY];
const drainNow = !re || re.flowing || re.size === re.remain;
if (drainNow) {
if (!this[WRITING]) {
this.emit('drain');
}
}
else {
re.once('drain', () => this.emit('drain'));
}
}
}
[CONSUMEBODY](chunk, position) {
// write up to but no more than writeEntry.blockRemain
const entry = this[WRITEENTRY];
/* c8 ignore start */
if (!entry) {
throw new Error('attempt to consume body without entry??');
}
const br = entry.blockRemain ?? 0;
/* c8 ignore stop */
const c = br >= chunk.length && position === 0 ?
chunk
: chunk.subarray(position, position + br);
entry.write(c);
if (!entry.blockRemain) {
this[STATE] = 'header';
this[WRITEENTRY] = undefined;
entry.end();
}
return c.length;
}
[CONSUMEMETA](chunk, position) {
const entry = this[WRITEENTRY];
const ret = this[CONSUMEBODY](chunk, position);
// if we finished, then the entry is reset
if (!this[WRITEENTRY] && entry) {
this[EMITMETA](entry);
}
return ret;
}
[EMIT](ev, data, extra) {
if (this[QUEUE].length === 0 && !this[READENTRY]) {
this.emit(ev, data, extra);
}
else {
this[QUEUE].push([ev, data, extra]);
}
}
[EMITMETA](entry) {
this[EMIT]('meta', this[META]);
switch (entry.type) {
case 'ExtendedHeader':
case 'OldExtendedHeader':
this[EX] = Pax.parse(this[META], this[EX], false);
break;
case 'GlobalExtendedHeader':
this[GEX] = Pax.parse(this[META], this[GEX], true);
break;
case 'NextFileHasLongPath':
case 'OldGnuLongPath': {
const ex = this[EX] ?? Object.create(null);
this[EX] = ex;
ex.path = this[META].replace(/\0.*/, '');
break;
}
case 'NextFileHasLongLinkpath': {
const ex = this[EX] || Object.create(null);
this[EX] = ex;
ex.linkpath = this[META].replace(/\0.*/, '');
break;
}
/* c8 ignore start */
default:
throw new Error('unknown meta: ' + entry.type);
/* c8 ignore stop */
}
}
abort(error) {
if (this[ABORTED]) {
return;
}
if (this[UNZIP]) {
// fully nerf the decompressor and close its underlying binding
const u = this[UNZIP];
/* c8 ignore start */
u.write = () => true;
u.end = () => u;
u.emit = () => false;
/* c8 ignore stop */
u.destroy?.();
}
this[ABORTED] = true;
this.emit('abort', error);
// always throws, even in non-strict mode
this.warn('TAR_ABORT', error, { recoverable: false });
}
[CHECKDECOMPRESSIONRATIO](chunk) {
this[DECOMPRESSEDBYTESREAD] += chunk.length;
const ratio = this[DECOMPRESSEDBYTESREAD] / this[COMPRESSEDBYTESREAD];
if (ratio > this.maxDecompressionRatio) {
this.abort(new Error(`max decompression ratio exceeded: ${ratio.toFixed(2)} > ${this.maxDecompressionRatio}`));
return false;
}
return true;
}
write(chunk, encoding, cb) {
if (typeof encoding === 'function') {
cb = encoding;
encoding = undefined;
}
if (typeof chunk === 'string') {
chunk = Buffer.from(chunk,
/* c8 ignore next */
typeof encoding === 'string' ? encoding : 'utf8');
}
if (this[ABORTED]) {
/* c8 ignore next */
cb?.();
return false;
}
// first write, might be gzipped, zstd, or brotli compressed
const needSniff = this[UNZIP] === undefined ||
(this.brotli === undefined && this[UNZIP] === false);
if (needSniff && chunk) {
if (this[BUFFER]) {
chunk = Buffer.concat([this[BUFFER], chunk]);
this[BUFFER] = undefined;
}
if (chunk.length < ZIP_HEADER_LEN) {
this[BUFFER] = chunk;
/* c8 ignore next */
cb?.();
return true;
}
// look for gzip header
for (let i = 0; this[UNZIP] === undefined && i < gzipHeader.length; i++) {
if (chunk[i] !== gzipHeader[i]) {
this[UNZIP] = false;
}
}
// look for zstd header if gzip header not found
let isZstd = false;
if (this[UNZIP] === false && this.zstd !== false) {
isZstd = true;
for (let i = 0; i < zstdHeader.length; i++) {
if (chunk[i] !== zstdHeader[i]) {
isZstd = false;
break;
}
}
}
const maybeBrotli = this.brotli === undefined && !isZstd;
if (this[UNZIP] === false && maybeBrotli) {
// read the first header to see if it's a valid tar file. If so,
// we can safely assume that it's not actually brotli, despite the
// .tbr or .tar.br file extension.
// if we ended before getting a full chunk, yes, def brotli
if (chunk.length < 512) {
if (this[ENDED]) {
this.brotli = true;
}
else {
this[BUFFER] = chunk;
/* c8 ignore next */
cb?.();
return true;
}
}
else {
// if it's tar, it's pretty reliably not brotli, chances of
// that happening are astronomical.
try {
new Header(chunk.subarray(0, 512));
this.brotli = false;
}
catch (_) {
this.brotli = true;
}
}
}
if (this[UNZIP] === undefined ||
(this[UNZIP] === false && (this.brotli || isZstd))) {
const ended = this[ENDED];
this[ENDED] = false;
this[UNZIP] =
this[UNZIP] === undefined ? new Unzip({})
: isZstd ? new ZstdDecompress({})
: new BrotliDecompress({});
this[UNZIP].on('data', chunk => {
if (this[CHECKDECOMPRESSIONRATIO](chunk)) {
this[CONSUMECHUNK](chunk);
}
});
this[UNZIP].on('error', er => {
if (!this[ABORTED]) {
this.abort(er);
}
});
this[UNZIP].on('end', () => {
this[ENDED] = true;
this[CONSUMECHUNK]();
});
this[WRITING] = true;
this[COMPRESSEDBYTESREAD] += chunk.length;
const ret = !!this[UNZIP][ended ? 'end' : 'write'](chunk);
this[WRITING] = false;
cb?.();
return ret;
}
}
this[WRITING] = true;
if (this[UNZIP]) {
this[COMPRESSEDBYTESREAD] += chunk.length;
this[UNZIP].write(chunk);
}
else {
this[CONSUMECHUNK](chunk);
}
this[WRITING] = false;
// return false if there's a queue, or if the current entry isn't flowing
const ret = this[QUEUE].length > 0 ? false
: this[READENTRY] ? this[READENTRY].flowing
: true;
// if we have no queue, then that means a clogged READENTRY
if (!ret && this[QUEUE].length === 0) {
this[READENTRY]?.once('drain', () => this.emit('drain'));
}
/* c8 ignore next */
cb?.();
return ret;
}
[BUFFERCONCAT](c) {
if (c && !this[ABORTED]) {
this[BUFFER] = this[BUFFER] ? Buffer.concat([this[BUFFER], c]) : c;
}
}
[MAYBEEND]() {
if (this[ENDED] &&
!this[EMITTEDEND] &&
!this[ABORTED] &&
!this[CONSUMING]) {
this[EMITTEDEND] = true;
const entry = this[WRITEENTRY];
if (entry?.blockRemain) {
// truncated, likely a damaged file
const have = this[BUFFER] ? this[BUFFER].length : 0;
this.warn('TAR_BAD_ARCHIVE', `Truncated input (needed ${entry.blockRemain} more bytes, only ${have} available)`, { entry });
if (this[BUFFER]) {
entry.write(this[BUFFER]);
}
entry.end();
}
this[EMIT](DONE);
}
}
[CONSUMECHUNK](chunk) {
if (this[CONSUMING] && chunk) {
this[BUFFERCONCAT](chunk);
}
else if (!chunk && !this[BUFFER]) {
this[MAYBEEND]();
}
else if (chunk) {
this[CONSUMING] = true;
if (this[BUFFER]) {
this[BUFFERCONCAT](chunk);
const c = this[BUFFER];
this[BUFFER] = undefined;
this[CONSUMECHUNKSUB](c);
}
else {
this[CONSUMECHUNKSUB](chunk);
}
while (this[BUFFER] &&
this[BUFFER]?.length >= 512 &&
!this[ABORTED] &&
!this[SAW_EOF]) {
const c = this[BUFFER];
this[BUFFER] = undefined;
this[CONSUMECHUNKSUB](c);
}
this[CONSUMING] = false;
}
if (!this[BUFFER] || this[ENDED]) {
this[MAYBEEND]();
}
}
[CONSUMECHUNKSUB](chunk) {
// we know that we are in CONSUMING mode, so anything written goes into
// the buffer. Advance the position and put any remainder in the buffer.
let position = 0;
const length = chunk.length;
while (position + 512 <= length && !this[ABORTED] && !this[SAW_EOF]) {
switch (this[STATE]) {
case 'begin':
case 'header':
this[CONSUMEHEADER](chunk, position);
position += 512;
break;
case 'ignore':
case 'body':
position += this[CONSUMEBODY](chunk, position);
break;
case 'meta':
position += this[CONSUMEMETA](chunk, position);
break;
/* c8 ignore start */
default:
throw new Error('invalid state: ' + this[STATE]);
/* c8 ignore stop */
}
}
if (position < length) {
this[BUFFER] =
this[BUFFER] ?
Buffer.concat([chunk.subarray(position), this[BUFFER]])
: chunk.subarray(position);
}
}
end(chunk, encoding, cb) {
if (typeof chunk === 'function') {
cb = chunk;
encoding = undefined;
chunk = undefined;
}
if (typeof encoding === 'function') {
cb = encoding;
encoding = undefined;
}
if (typeof chunk === 'string') {
chunk = Buffer.from(chunk, encoding);
}
if (cb)
this.once('finish', cb);
if (!this[ABORTED]) {
if (this[UNZIP]) {
/* c8 ignore start */
if (chunk) {
this[COMPRESSEDBYTESREAD] += chunk.length;
this[UNZIP].write(chunk);
}
/* c8 ignore stop */
this[UNZIP].end();
}
else {
this[ENDED] = true;
if (this.brotli === undefined || this.zstd === undefined)
chunk = chunk || Buffer.alloc(0);
if (chunk)
this.write(chunk);
this[MAYBEEND]();
}
}
return this;
}
}
//# sourceMappingURL=parse.js.map
@@ -0,0 +1,163 @@
'use strict';
module.exports = function generate__limit(it, $keyword, $ruleType) {
var out = ' ';
var $lvl = it.level;
var $dataLvl = it.dataLevel;
var $schema = it.schema[$keyword];
var $schemaPath = it.schemaPath + it.util.getProperty($keyword);
var $errSchemaPath = it.errSchemaPath + '/' + $keyword;
var $breakOnError = !it.opts.allErrors;
var $errorKeyword;
var $data = 'data' + ($dataLvl || '');
var $isData = it.opts.$data && $schema && $schema.$data,
$schemaValue;
if ($isData) {
out += ' var schema' + ($lvl) + ' = ' + (it.util.getData($schema.$data, $dataLvl, it.dataPathArr)) + '; ';
$schemaValue = 'schema' + $lvl;
} else {
$schemaValue = $schema;
}
var $isMax = $keyword == 'maximum',
$exclusiveKeyword = $isMax ? 'exclusiveMaximum' : 'exclusiveMinimum',
$schemaExcl = it.schema[$exclusiveKeyword],
$isDataExcl = it.opts.$data && $schemaExcl && $schemaExcl.$data,
$op = $isMax ? '<' : '>',
$notOp = $isMax ? '>' : '<',
$errorKeyword = undefined;
if (!($isData || typeof $schema == 'number' || $schema === undefined)) {
throw new Error($keyword + ' must be number');
}
if (!($isDataExcl || $schemaExcl === undefined || typeof $schemaExcl == 'number' || typeof $schemaExcl == 'boolean')) {
throw new Error($exclusiveKeyword + ' must be number or boolean');
}
if ($isDataExcl) {
var $schemaValueExcl = it.util.getData($schemaExcl.$data, $dataLvl, it.dataPathArr),
$exclusive = 'exclusive' + $lvl,
$exclType = 'exclType' + $lvl,
$exclIsNumber = 'exclIsNumber' + $lvl,
$opExpr = 'op' + $lvl,
$opStr = '\' + ' + $opExpr + ' + \'';
out += ' var schemaExcl' + ($lvl) + ' = ' + ($schemaValueExcl) + '; ';
$schemaValueExcl = 'schemaExcl' + $lvl;
out += ' var ' + ($exclusive) + '; var ' + ($exclType) + ' = typeof ' + ($schemaValueExcl) + '; if (' + ($exclType) + ' != \'boolean\' && ' + ($exclType) + ' != \'undefined\' && ' + ($exclType) + ' != \'number\') { ';
var $errorKeyword = $exclusiveKeyword;
var $$outStack = $$outStack || [];
$$outStack.push(out);
out = ''; /* istanbul ignore else */
if (it.createErrors !== false) {
out += ' { keyword: \'' + ($errorKeyword || '_exclusiveLimit') + '\' , dataPath: (dataPath || \'\') + ' + (it.errorPath) + ' , schemaPath: ' + (it.util.toQuotedString($errSchemaPath)) + ' , params: {} ';
if (it.opts.messages !== false) {
out += ' , message: \'' + ($exclusiveKeyword) + ' should be boolean\' ';
}
if (it.opts.verbose) {
out += ' , schema: validate.schema' + ($schemaPath) + ' , parentSchema: validate.schema' + (it.schemaPath) + ' , data: ' + ($data) + ' ';
}
out += ' } ';
} else {
out += ' {} ';
}
var __err = out;
out = $$outStack.pop();
if (!it.compositeRule && $breakOnError) {
/* istanbul ignore if */
if (it.async) {
out += ' throw new ValidationError([' + (__err) + ']); ';
} else {
out += ' validate.errors = [' + (__err) + ']; return false; ';
}
} else {
out += ' var err = ' + (__err) + '; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; ';
}
out += ' } else if ( ';
if ($isData) {
out += ' (' + ($schemaValue) + ' !== undefined && typeof ' + ($schemaValue) + ' != \'number\') || ';
}
out += ' ' + ($exclType) + ' == \'number\' ? ( (' + ($exclusive) + ' = ' + ($schemaValue) + ' === undefined || ' + ($schemaValueExcl) + ' ' + ($op) + '= ' + ($schemaValue) + ') ? ' + ($data) + ' ' + ($notOp) + '= ' + ($schemaValueExcl) + ' : ' + ($data) + ' ' + ($notOp) + ' ' + ($schemaValue) + ' ) : ( (' + ($exclusive) + ' = ' + ($schemaValueExcl) + ' === true) ? ' + ($data) + ' ' + ($notOp) + '= ' + ($schemaValue) + ' : ' + ($data) + ' ' + ($notOp) + ' ' + ($schemaValue) + ' ) || ' + ($data) + ' !== ' + ($data) + ') { var op' + ($lvl) + ' = ' + ($exclusive) + ' ? \'' + ($op) + '\' : \'' + ($op) + '=\'; ';
if ($schema === undefined) {
$errorKeyword = $exclusiveKeyword;
$errSchemaPath = it.errSchemaPath + '/' + $exclusiveKeyword;
$schemaValue = $schemaValueExcl;
$isData = $isDataExcl;
}
} else {
var $exclIsNumber = typeof $schemaExcl == 'number',
$opStr = $op;
if ($exclIsNumber && $isData) {
var $opExpr = '\'' + $opStr + '\'';
out += ' if ( ';
if ($isData) {
out += ' (' + ($schemaValue) + ' !== undefined && typeof ' + ($schemaValue) + ' != \'number\') || ';
}
out += ' ( ' + ($schemaValue) + ' === undefined || ' + ($schemaExcl) + ' ' + ($op) + '= ' + ($schemaValue) + ' ? ' + ($data) + ' ' + ($notOp) + '= ' + ($schemaExcl) + ' : ' + ($data) + ' ' + ($notOp) + ' ' + ($schemaValue) + ' ) || ' + ($data) + ' !== ' + ($data) + ') { ';
} else {
if ($exclIsNumber && $schema === undefined) {
$exclusive = true;
$errorKeyword = $exclusiveKeyword;
$errSchemaPath = it.errSchemaPath + '/' + $exclusiveKeyword;
$schemaValue = $schemaExcl;
$notOp += '=';
} else {
if ($exclIsNumber) $schemaValue = Math[$isMax ? 'min' : 'max']($schemaExcl, $schema);
if ($schemaExcl === ($exclIsNumber ? $schemaValue : true)) {
$exclusive = true;
$errorKeyword = $exclusiveKeyword;
$errSchemaPath = it.errSchemaPath + '/' + $exclusiveKeyword;
$notOp += '=';
} else {
$exclusive = false;
$opStr += '=';
}
}
var $opExpr = '\'' + $opStr + '\'';
out += ' if ( ';
if ($isData) {
out += ' (' + ($schemaValue) + ' !== undefined && typeof ' + ($schemaValue) + ' != \'number\') || ';
}
out += ' ' + ($data) + ' ' + ($notOp) + ' ' + ($schemaValue) + ' || ' + ($data) + ' !== ' + ($data) + ') { ';
}
}
$errorKeyword = $errorKeyword || $keyword;
var $$outStack = $$outStack || [];
$$outStack.push(out);
out = ''; /* istanbul ignore else */
if (it.createErrors !== false) {
out += ' { keyword: \'' + ($errorKeyword || '_limit') + '\' , dataPath: (dataPath || \'\') + ' + (it.errorPath) + ' , schemaPath: ' + (it.util.toQuotedString($errSchemaPath)) + ' , params: { comparison: ' + ($opExpr) + ', limit: ' + ($schemaValue) + ', exclusive: ' + ($exclusive) + ' } ';
if (it.opts.messages !== false) {
out += ' , message: \'should be ' + ($opStr) + ' ';
if ($isData) {
out += '\' + ' + ($schemaValue);
} else {
out += '' + ($schemaValue) + '\'';
}
}
if (it.opts.verbose) {
out += ' , schema: ';
if ($isData) {
out += 'validate.schema' + ($schemaPath);
} else {
out += '' + ($schema);
}
out += ' , parentSchema: validate.schema' + (it.schemaPath) + ' , data: ' + ($data) + ' ';
}
out += ' } ';
} else {
out += ' {} ';
}
var __err = out;
out = $$outStack.pop();
if (!it.compositeRule && $breakOnError) {
/* istanbul ignore if */
if (it.async) {
out += ' throw new ValidationError([' + (__err) + ']); ';
} else {
out += ' validate.errors = [' + (__err) + ']; return false; ';
}
} else {
out += ' var err = ' + (__err) + '; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; ';
}
out += ' } ';
if ($breakOnError) {
out += ' else { ';
}
return out;
}
@@ -0,0 +1,6 @@
/**
* @fileoverview typings for "eslint/universal" module
* @author 唯然<weiran.zsd@outlook.com>
*/
export { Linter } from "./index";
@@ -0,0 +1,32 @@
import{s as qe,g as Ge}from"./shared/confbox.9388d834.mjs";/*! js-yaml 4.1.0 https://github.com/nodeca/js-yaml @license MIT */function oe(e){return typeof e>"u"||e===null}function We(e){return typeof e=="object"&&e!==null}function $e(e){return Array.isArray(e)?e:oe(e)?[]:[e]}function Qe(e,n){var i,l,r,u;if(n)for(u=Object.keys(n),i=0,l=u.length;i<l;i+=1)r=u[i],e[r]=n[r];return e}function Ve(e,n){var i="",l;for(l=0;l<n;l+=1)i+=e;return i}function Xe(e){return e===0&&Number.NEGATIVE_INFINITY===1/e}var Ze=oe,ze=We,Je=$e,en=Ve,nn=Xe,rn=Qe,y={isNothing:Ze,isObject:ze,toArray:Je,repeat:en,isNegativeZero:nn,extend:rn};function ue(e,n){var i="",l=e.reason||"(unknown reason)";return e.mark?(e.mark.name&&(i+='in "'+e.mark.name+'" '),i+="("+(e.mark.line+1)+":"+(e.mark.column+1)+")",!n&&e.mark.snippet&&(i+=`
`+e.mark.snippet),l+" "+i):l}function M(e,n){Error.call(this),this.name="YAMLException",this.reason=e,this.mark=n,this.message=ue(this,!1),Error.captureStackTrace?Error.captureStackTrace(this,this.constructor):this.stack=new Error().stack||""}M.prototype=Object.create(Error.prototype),M.prototype.constructor=M,M.prototype.toString=function(n){return this.name+": "+ue(this,n)};var w=M;function $(e,n,i,l,r){var u="",o="",f=Math.floor(r/2)-1;return l-n>f&&(u=" ... ",n=l-f+u.length),i-l>f&&(o=" ...",i=l+f-o.length),{str:u+e.slice(n,i).replace(/\t/g,"\u2192")+o,pos:l-n+u.length}}function Q(e,n){return y.repeat(" ",n-e.length)+e}function ln(e,n){if(n=Object.create(n||null),!e.buffer)return null;n.maxLength||(n.maxLength=79),typeof n.indent!="number"&&(n.indent=1),typeof n.linesBefore!="number"&&(n.linesBefore=3),typeof n.linesAfter!="number"&&(n.linesAfter=2);for(var i=/\r?\n|\r|\0/g,l=[0],r=[],u,o=-1;u=i.exec(e.buffer);)r.push(u.index),l.push(u.index+u[0].length),e.position<=u.index&&o<0&&(o=l.length-2);o<0&&(o=l.length-1);var f="",c,a,t=Math.min(e.line+n.linesAfter,r.length).toString().length,p=n.maxLength-(n.indent+t+3);for(c=1;c<=n.linesBefore&&!(o-c<0);c++)a=$(e.buffer,l[o-c],r[o-c],e.position-(l[o]-l[o-c]),p),f=y.repeat(" ",n.indent)+Q((e.line-c+1).toString(),t)+" | "+a.str+`
`+f;for(a=$(e.buffer,l[o],r[o],e.position,p),f+=y.repeat(" ",n.indent)+Q((e.line+1).toString(),t)+" | "+a.str+`
`,f+=y.repeat("-",n.indent+t+3+a.pos)+`^
`,c=1;c<=n.linesAfter&&!(o+c>=r.length);c++)a=$(e.buffer,l[o+c],r[o+c],e.position-(l[o]-l[o+c]),p),f+=y.repeat(" ",n.indent)+Q((e.line+c+1).toString(),t)+" | "+a.str+`
`;return f.replace(/\n$/,"")}var on=ln,un=["kind","multi","resolve","construct","instanceOf","predicate","represent","representName","defaultStyle","styleAliases"],fn=["scalar","sequence","mapping"];function cn(e){var n={};return e!==null&&Object.keys(e).forEach(function(i){e[i].forEach(function(l){n[String(l)]=i})}),n}function an(e,n){if(n=n||{},Object.keys(n).forEach(function(i){if(un.indexOf(i)===-1)throw new w('Unknown option "'+i+'" is met in definition of "'+e+'" YAML type.')}),this.options=n,this.tag=e,this.kind=n.kind||null,this.resolve=n.resolve||function(){return!0},this.construct=n.construct||function(i){return i},this.instanceOf=n.instanceOf||null,this.predicate=n.predicate||null,this.represent=n.represent||null,this.representName=n.representName||null,this.defaultStyle=n.defaultStyle||null,this.multi=n.multi||!1,this.styleAliases=cn(n.styleAliases||null),fn.indexOf(this.kind)===-1)throw new w('Unknown kind "'+this.kind+'" is specified for "'+e+'" YAML type.')}var C=an;function fe(e,n){var i=[];return e[n].forEach(function(l){var r=i.length;i.forEach(function(u,o){u.tag===l.tag&&u.kind===l.kind&&u.multi===l.multi&&(r=o)}),i[r]=l}),i}function pn(){var e={scalar:{},sequence:{},mapping:{},fallback:{},multi:{scalar:[],sequence:[],mapping:[],fallback:[]}},n,i;function l(r){r.multi?(e.multi[r.kind].push(r),e.multi.fallback.push(r)):e[r.kind][r.tag]=e.fallback[r.tag]=r}for(n=0,i=arguments.length;n<i;n+=1)arguments[n].forEach(l);return e}function V(e){return this.extend(e)}V.prototype.extend=function(n){var i=[],l=[];if(n instanceof C)l.push(n);else if(Array.isArray(n))l=l.concat(n);else if(n&&(Array.isArray(n.implicit)||Array.isArray(n.explicit)))n.implicit&&(i=i.concat(n.implicit)),n.explicit&&(l=l.concat(n.explicit));else throw new w("Schema.extend argument should be a Type, [ Type ], or a schema definition ({ implicit: [...], explicit: [...] })");i.forEach(function(u){if(!(u instanceof C))throw new w("Specified list of YAML types (or a single Type object) contains a non-Type object.");if(u.loadKind&&u.loadKind!=="scalar")throw new w("There is a non-scalar type in the implicit list of a schema. Implicit resolving of such types is not supported.");if(u.multi)throw new w("There is a multi type in the implicit list of a schema. Multi tags can only be listed as explicit.")}),l.forEach(function(u){if(!(u instanceof C))throw new w("Specified list of YAML types (or a single Type object) contains a non-Type object.")});var r=Object.create(V.prototype);return r.implicit=(this.implicit||[]).concat(i),r.explicit=(this.explicit||[]).concat(l),r.compiledImplicit=fe(r,"implicit"),r.compiledExplicit=fe(r,"explicit"),r.compiledTypeMap=pn(r.compiledImplicit,r.compiledExplicit),r};var tn=V,hn=new C("tag:yaml.org,2002:str",{kind:"scalar",construct:function(e){return e!==null?e:""}}),dn=new C("tag:yaml.org,2002:seq",{kind:"sequence",construct:function(e){return e!==null?e:[]}}),sn=new C("tag:yaml.org,2002:map",{kind:"mapping",construct:function(e){return e!==null?e:{}}}),xn=new tn({explicit:[hn,dn,sn]});function mn(e){if(e===null)return!0;var n=e.length;return n===1&&e==="~"||n===4&&(e==="null"||e==="Null"||e==="NULL")}function gn(){return null}function An(e){return e===null}var vn=new C("tag:yaml.org,2002:null",{kind:"scalar",resolve:mn,construct:gn,predicate:An,represent:{canonical:function(){return"~"},lowercase:function(){return"null"},uppercase:function(){return"NULL"},camelcase:function(){return"Null"},empty:function(){return""}},defaultStyle:"lowercase"});function yn(e){if(e===null)return!1;var n=e.length;return n===4&&(e==="true"||e==="True"||e==="TRUE")||n===5&&(e==="false"||e==="False"||e==="FALSE")}function Cn(e){return e==="true"||e==="True"||e==="TRUE"}function _n(e){return Object.prototype.toString.call(e)==="[object Boolean]"}var wn=new C("tag:yaml.org,2002:bool",{kind:"scalar",resolve:yn,construct:Cn,predicate:_n,represent:{lowercase:function(e){return e?"true":"false"},uppercase:function(e){return e?"TRUE":"FALSE"},camelcase:function(e){return e?"True":"False"}},defaultStyle:"lowercase"});function bn(e){return 48<=e&&e<=57||65<=e&&e<=70||97<=e&&e<=102}function Fn(e){return 48<=e&&e<=55}function Sn(e){return 48<=e&&e<=57}function En(e){if(e===null)return!1;var n=e.length,i=0,l=!1,r;if(!n)return!1;if(r=e[i],(r==="-"||r==="+")&&(r=e[++i]),r==="0"){if(i+1===n)return!0;if(r=e[++i],r==="b"){for(i++;i<n;i++)if(r=e[i],r!=="_"){if(r!=="0"&&r!=="1")return!1;l=!0}return l&&r!=="_"}if(r==="x"){for(i++;i<n;i++)if(r=e[i],r!=="_"){if(!bn(e.charCodeAt(i)))return!1;l=!0}return l&&r!=="_"}if(r==="o"){for(i++;i<n;i++)if(r=e[i],r!=="_"){if(!Fn(e.charCodeAt(i)))return!1;l=!0}return l&&r!=="_"}}if(r==="_")return!1;for(;i<n;i++)if(r=e[i],r!=="_"){if(!Sn(e.charCodeAt(i)))return!1;l=!0}return!(!l||r==="_")}function Tn(e){var n=e,i=1,l;if(n.indexOf("_")!==-1&&(n=n.replace(/_/g,"")),l=n[0],(l==="-"||l==="+")&&(l==="-"&&(i=-1),n=n.slice(1),l=n[0]),n==="0")return 0;if(l==="0"){if(n[1]==="b")return i*parseInt(n.slice(2),2);if(n[1]=Line truncated
\r`;function Wn(e){if(e===null)return!1;var n,i,l=0,r=e.length,u=X;for(i=0;i<r;i++)if(n=u.indexOf(e.charAt(i)),!(n>64)){if(n<0)return!1;l+=6}return l%8===0}function $n(e){var n,i,l=e.replace(/[\r\n=]/g,""),r=l.length,u=X,o=0,f=[];for(n=0;n<r;n++)n%4===0&&n&&(f.push(o>>16&255),f.push(o>>8&255),f.push(o&255)),o=o<<6|u.indexOf(l.charAt(n));return i=r%4*6,i===0?(f.push(o>>16&255),f.push(o>>8&255),f.push(o&255)):i===18?(f.push(o>>10&255),f.push(o>>2&255)):i===12&&f.push(o>>4&255),new Uint8Array(f)}function Qn(e){var n="",i=0,l,r,u=e.length,o=X;for(l=0;l<u;l++)l%3===0&&l&&(n+=o[i>>18&63],n+=o[i>>12&63],n+=o[i>>6&63],n+=o[i&63]),i=(i<<8)+e[l];return r=u%3,r===0?(n+=o[i>>18&63],n+=o[i>>12&63],n+=o[i>>6&63],n+=o[i&63]):r===2?(n+=o[i>>10&63],n+=o[i>>4&63],n+=o[i<<2&63],n+=o[64]):r===1&&(n+=o[i>>2&63],n+=o[i<<4&63],n+=o[64],n+=o[64]),n}function Vn(e){return Object.prototype.toString.call(e)==="[object Uint8Array]"}var Xn=new C("tag:yaml.org,2002:binary",{kind:"scalar",resolve:Wn,construct:$n,predicate:Vn,represent:Qn}),Zn=Object.prototype.hasOwnProperty,zn=Object.prototype.toString;function Jn(e){if(e===null)return!0;var n=[],i,l,r,u,o,f=e;for(i=0,l=f.length;i<l;i+=1){if(r=f[i],o=!1,zn.call(r)!=="[object Object]")return!1;for(u in r)if(Zn.call(r,u))if(!o)o=!0;else return!1;if(!o)return!1;if(n.indexOf(u)===-1)n.push(u);else return!1}return!0}function ei(e){return e!==null?e:[]}var ni=new C("tag:yaml.org,2002:omap",{kind:"sequence",resolve:Jn,construct:ei}),ii=Object.prototype.toString;function ri(e){if(e===null)return!0;var n,i,l,r,u,o=e;for(u=new Array(o.length),n=0,i=o.length;n<i;n+=1){if(l=o[n],ii.call(l)!=="[object Object]"||(r=Object.keys(l),r.length!==1))return!1;u[n]=[r[0],l[r[0]]]}return!0}function li(e){if(e===null)return[];var n,i,l,r,u,o=e;for(u=new Array(o.length),n=0,i=o.length;n<i;n+=1)l=o[n],r=Object.keys(l),u[n]=[r[0],l[r[0]]];return u}var oi=new C("tag:yaml.org,2002:pairs",{kind:"sequence",resolve:ri,construct:li}),ui=Object.prototype.hasOwnProperty;function fi(e){if(e===null)return!0;var n,i=e;for(n in i)if(ui.call(i,n)&&i[n]!==null)return!1;return!0}function ci(e){return e!==null?e:{}}var ai=new C("tag:yaml.org,2002:set",{kind:"mapping",resolve:fi,construct:ci}),pe=Pn.extend({implicit:[Kn,Gn],explicit:[Xn,ni,oi,ai]}),T=Object.prototype.hasOwnProperty,H=1,te=2,he=3,U=4,Z=1,pi=2,de=3,ti=/[\x00-\x08\x0B\x0C\x0E-\x1F\x7F-\x84\x86-\x9F\uFFFE\uFFFF]|[\uD800-\uDBFF](?![\uDC00-\uDFFF])|(?:[^\uD800-\uDBFF]|^)[\uDC00-\uDFFF]/,hi=/[\x85\u2028\u2029]/,di=/[,\[\]\{\}]/,se=/^(?:!|!!|![a-z\-]+!)$/i,xe=/^(?:!|[^,\[\]\{\}])(?:%[0-9a-f]{2}|[0-9a-z\-#;\/\?:@&=\+\$,_\.!~\*'\(\)\[\]])*$/i;function me(e){return Object.prototype.toString.call(e)}function S(e){return e===10||e===13}function I(e){return e===9||e===32}function b(e){return e===9||e===32||e===10||e===13}function k(e){return e===44||e===91||e===93||e===123||e===125}function si(e){var n;return 48<=e&&e<=57?e-48:(n=e|32,97<=n&&n<=102?n-97+10:-1)}function xi(e){return e===120?2:e===117?4:e===85?8:0}function mi(e){return 48<=e&&e<=57?e-48:-1}function ge(e){return e===48?"\0":e===97?"\x07":e===98?"\b":e===116||e===9?" ":e===110?`
`:e===118?"\v":e===102?"\f":e===114?"\r":e===101?"\x1B":e===32?" ":e===34?'"':e===47?"/":e===92?"\\":e===78?"\x85":e===95?"\xA0":e===76?"\u2028":e===80?"\u2029":""}function gi(e){return e<=65535?String.fromCharCode(e):String.fromCharCode((e-65536>>10)+55296,(e-65536&1023)+56320)}for(var Ae=new Array(256),ve=new Array(256),L=0;L<256;L++)Ae[L]=ge(L)?1:0,ve[L]=ge(L);function Ai(e,n){this.input=e,this.filename=n.filename||null,this.schema=n.schema||pe,this.onWarning=n.onWarning||null,this.legacy=n.legacy||!1,this.json=n.json||!1,this.listener=n.listener||null,this.implicitTypes=this.schema.compiledImplicit,this.typeMap=this.schema.compiledTypeMap,this.length=e.length,this.position=0,this.line=0,this.lineStart=0,this.lineIndent=0,this.firstTabInLine=-1,this.documents=[]}function ye(e,n){var i={name:e.filename,buffer:e.input.slice(0,-1),position:e.position,line:e.line,column:e.position-e.lineStart};return i.snippet=on(i),new w(n,i)}function h(e,n){throw ye(e,n)}function K(e,n){e.onWarning&&e.onWarning.call(null,ye(e,n))}var Ce={YAML:function(n,i,l){var r,u,o;n.version!==null&&h(n,"duplication of %YAML directive"),l.length!==1&&h(n,"YAML directive accepts exactly one argument"),r=/^([0-9]+)\.([0-9]+)$/.exec(l[0]),r===null&&h(n,"ill-formed argument of the YAML directive"),u=parseInt(r[1],10),o=parseInt(r[2],10),u!==1&&h(n,"unacceptable YAML version of the document"),n.version=l[0],n.checkLineBreaks=o<2,o!==1&&o!==2&&K(n,"unsupported YAML version of the document")},TAG:function(n,i,l){var r,u;l.length!==2&&h(n,"TAG directive accepts exactly two arguments"),r=l[0],u=l[1],se.test(r)||h(n,"ill-formed tag handle (first argument) of the TAG directive"),T.call(n.tagMap,r)&&h(n,'there is a previously declared suffix for "'+r+'" tag handle'),xe.test(u)||h(n,"ill-formed tag prefix (second argument) of the TAG directive");try{u=decodeURIComponent(u)}catch{h(n,"tag prefix is malformed: "+u)}n.tagMap[r]=u}};function O(e,n,i,l){var r,u,o,f;if(n<i){if(f=e.input.slice(n,i),l)for(r=0,u=f.length;r<u;r+=1)o=f.charCodeAt(r),o===9||32<=o&&o<=1114111||h(e,"expected valid JSON character");else ti.test(f)&&h(e,"the stream contains non-printable characters");e.result+=f}}function _e(e,n,i,l){var r,u,o,f;for(y.isObject(i)||h(e,"cannot merge mappings; the provided source object is unacceptable"),r=Object.keys(i),o=0,f=r.length;o<f;o+=1)u=r[o],T.call(n,u)||(n[u]=i[u],l[u]=!0)}function N(e,n,i,l,r,u,o,f,c){var a,t;if(Array.isArray(r))for(r=Array.prototype.slice.call(r),a=0,t=r.length;a<t;a+=1)Array.isArray(r[a])&&h(e,"nested arrays are not supported inside keys"),typeof r=="object"&&me(r[a])==="[object Object]"&&(r[a]="[object Object]");if(typeof r=="object"&&me(r)==="[object Object]"&&(r="[object Object]"),r=String(r),n===null&&(n={}),l==="tag:yaml.org,2002:merge")if(Array.isArray(u))for(a=0,t=u.length;a<t;a+=1)_e(e,n,u[a],i);else _e(e,n,u,i);else!e.json&&!T.call(i,r)&&T.call(n,r)&&(e.line=o||e.line,e.lineStart=f||e.lineStart,e.position=c||e.position,h(e,"duplicated mapping key")),r==="__proto__"?Object.defineProperty(n,r,{configurable:!0,enumerable:!0,writable:!0,value:u}):n[r]=u,delete i[r];return n}function z(e){var n;n=e.input.charCodeAt(e.position),n===10?e.position++:n===13?(e.position++,e.input.charCodeAt(e.position)===10&&e.position++):h(e,"a line break is expected"),e.line+=1,e.lineStart=e.position,e.firstTabInLine=-1}function v(e,n,i){for(var l=0,r=e.input.charCodeAt(e.position);r!==0;){for(;I(r);)r===9&&e.firstTabInLine===-1&&(e.firstTabInLine=e.position),r=e.input.charCodeAt(++e.position);if(n&&r===35)do r=e.input.charCodeAt(++e.position);while(r!==10&&r!==13&&r!==0);if(S(r))for(z(e),r=e.input.charCodeAt(e.position),l++,e.lineIndent=0;r===32;)e.lineIndent++,r=e.input.charCodeAt(++e.position);else break}return i!==-1&&l!==0&&e.lineIndent<i&&K(e,"deficient indentation"),l}function q(e){var n=e.position,i;return i=e.input.charCodeAt(n),!!((i===45||i===46)&&i===e.input.charCodeAt(n+1)&&i===e.input.charCodeAt(n+2)&&(n+=3,i=e.input.charCodeAt(n),i===0||b(i)))}function J(e,n){n===1?e.result+=" ":n>1&&(e.result+=y.repeat(`
`,n-1))}function vi(e,n,i){var l,r,u,o,f,c,a,t,p=e.kind,d=e.result,s;if(s=e.input.charCodeAt(e.position),b(s)||k(s)||s===35||s===38||s===42||s===33||s===124||s===62||s===39||s===34||s===37||s===64||s===96||(s===63||s===45)&&(r=e.input.charCodeAt(e.position+1),b(r)||i&&k(r)))return!1;for(e.kind="scalar",e.result="",u=o=e.position,f=!1;s!==0;){if(s===58){if(r=e.input.charCodeAt(e.position+1),b(r)||i&&k(r))break}else if(s===35){if(l=e.input.charCodeAt(e.position-1),b(l))break}else{if(e.position===e.lineStart&&q(e)||i&&k(s))break;if(S(s))if(c=e.line,a=e.lineStart,t=e.lineIndent,v(e,!1,-1),e.lineIndent>=n){f=!0,s=e.input.charCodeAt(e.position);continue}else{e.position=o,e.line=c,e.lineStart=a,e.lineIndent=t;break}}f&&(O(e,u,o,!1),J(e,e.line-c),u=o=e.position,f=!1),I(s)||(o=e.position+1),s=e.input.charCodeAt(++e.position)}return O(e,u,o,!1),e.result?!0:(e.kind=p,e.result=d,!1)}function yi(e,n){var i,l,r;if(i=e.input.charCodeAt(e.position),i!==39)return!1;for(e.kind="scalar",e.result="",e.position++,l=r=e.position;(i=e.input.charCodeAt(e.position))!==0;)if(i===39)if(O(e,l,e.position,!0),i=e.input.charCodeAt(++e.position),i===39)l=e.position,e.position++,r=e.position;else return!0;else S(i)?(O(e,l,r,!0),J(e,v(e,!1,n)),l=r=e.position):e.position===e.lineStart&&q(e)?h(e,"unexpected end of the document within a single quoted scalar"):(e.position++,r=e.position);h(e,"unexpected end of the stream within a single quoted scalar")}function Ci(e,n){var i,l,r,u,o,f;if(f=e.input.charCodeAt(e.position),f!==34)return!1;for(e.kind="scalar",e.result="",e.position++,i=l=e.position;(f=e.input.charCodeAt(e.position))!==0;){if(f===34)return O(e,i,e.position,!0),e.position++,!0;if(f===92){if(O(e,i,e.position,!0),f=e.input.charCodeAt(++e.position),S(f))v(e,!1,n);else if(f<256&&Ae[f])e.result+=ve[f],e.position++;else if((o=xi(f))>0){for(r=o,u=0;r>0;r--)f=e.input.charCodeAt(++e.position),(o=si(f))>=0?u=(u<<4)+o:h(e,"expected hexadecimal character");e.result+=gi(u),e.position++}else h(e,"unknown escape sequence");i=l=e.position}else S(f)?(O(e,i,l,!0),J(e,v(e,!1,n)),i=l=e.position):e.position===e.lineStart&&q(e)?h(e,"unexpected end of the document within a double quoted scalar"):(e.position++,l=e.position)}h(e,"unexpected end of the stream within a double quoted scalar")}function _i(e,n){var i=!0,l,r,u,o=e.tag,f,c=e.anchor,a,t,p,d,s,x=Object.create(null),g,A,F,m;if(m=e.input.charCodeAt(e.position),m===91)t=93,s=!1,f=[];else if(m===123)t=125,s=!0,f={};else return!1;for(e.anchor!==null&&(e.anchorMap[e.anchor]=f),m=e.input.charCodeAt(++e.position);m!==0;){if(v(e,!0,n),m=e.input.charCodeAt(e.position),m===t)return e.position++,e.tag=o,e.anchor=c,e.kind=s?"mapping":"sequence",e.result=f,!0;i?m===44&&h(e,"expected the node content, but found ','"):h(e,"missed comma between flow collection entries"),A=g=F=null,p=d=!1,m===63&&(a=e.input.charCodeAt(e.position+1),b(a)&&(p=d=!0,e.position++,v(e,!0,n))),l=e.line,r=e.lineStart,u=e.position,R(e,n,H,!1,!0),A=e.tag,g=e.result,v(e,!0,n),m=e.input.charCodeAt(e.position),(d||e.line===l)&&m===58&&(p=!0,m=e.input.charCodeAt(++e.position),v(e,!0,n),R(e,n,H,!1,!0),F=e.result),s?N(e,f,x,A,g,F,l,r,u):p?f.push(N(e,null,x,A,g,F,l,r,u)):f.push(g),v(e,!0,n),m=e.input.charCodeAt(e.position),m===44?(i=!0,m=e.input.charCodeAt(++e.position)):i=!1}h(e,"unexpected end of the stream within a flow collection")}function wi(e,n){var i,l,r=Z,u=!1,o=!1,f=n,c=0,a=!1,t,p;if(p=e.input.charCodeAt(e.position),p===124)l=!1;else if(p===62)l=!0;else return!1;for(e.kind="scalar",e.result="";p!==0;)if(p=e.input.charCodeAt(++e.position),p===43||p===45)Z===r?r=p===43?de:pi:h(e,"repeat of a chomping mode identifier");else if((t=mi(p))>=0)t===0?h(e,"bad explicit indentation width of a block scalar; it cannot be less than one"):o?h(e,"repeat of an indentation width identifier"):(f=n+t-1,o=!0);else break;if(I(p)){do p=e.input.charCodeAt(++e.position);while(I(p));if(p===35)do p=e.input.charCodeAt(++e.position);while(!S(p)&&p!==0)}for(;p!==0;){for(z(e),e.lineIndent=0,p=e.input.charCodeAt(e.position);(!o||e.lineIndent<f)&&p===32;)e.lineIndent++,p=e.input.charCodeAt(++e.position);if(!o&&e.lineIndent>f&&(f=e.lineIndent),S(p)){c++;continue}if(e.lineIndent<f){r===de?e.result+=y.repeat(`
`,u?1+c:c):r===Z&&u&&(e.result+=`
`);break}for(l?I(p)?(a=!0,e.result+=y.repeat(`
`,u?1+c:c)):a?(a=!1,e.result+=y.repeat(`
`,c+1)):c===0?u&&(e.result+=" "):e.result+=y.repeat(`
`,c):e.result+=y.repeat(`
`,u?1+c:c),u=!0,o=!0,c=0,i=e.position;!S(p)&&p!==0;)p=e.input.charCodeAt(++e.position);O(e,i,e.position,!1)}return!0}function we(e,n){var i,l=e.tag,r=e.anchor,u=[],o,f=!1,c;if(e.firstTabInLine!==-1)return!1;for(e.anchor!==null&&(e.anchorMap[e.anchor]=u),c=e.input.charCodeAt(e.position);c!==0&&(e.firstTabInLine!==-1&&(e.position=e.firstTabInLine,h(e,"tab characters must not be used in indentation")),!(c!==45||(o=e.input.charCodeAt(e.position+1),!b(o))));){if(f=!0,e.position++,v(e,!0,-1)&&e.lineIndent<=n){u.push(null),c=e.input.charCodeAt(e.position);continue}if(i=e.line,R(e,n,he,!1,!0),u.push(e.result),v(e,!0,-1),c=e.input.charCodeAt(e.position),(e.line===i||e.lineIndent>n)&&c!==0)h(e,"bad indentation of a sequence entry");else if(e.lineIndent<n)break}return f?(e.tag=l,e.anchor=r,e.kind="sequence",e.result=u,!0):!1}function bi(e,n,i){var l,r,u,o,f,c,a=e.tag,t=e.anchor,p={},d=Object.create(null),s=null,x=null,g=null,A=!1,F=!1,m;if(e.firstTabInLine!==-1)return!1;for(e.anchor!==null&&(e.anchorMap[e.anchor]=p),m=e.input.charCodeAt(e.position);m!==0;){if(!A&&e.firstTabInLine!==-1&&(e.position=e.firstTabInLine,h(e,"tab characters must not be used in indentation")),l=e.input.charCodeAt(e.position+1),u=e.line,(m===63||m===58)&&b(l))m===63?(A&&(N(e,p,d,s,x,null,o,f,c),s=x=g=null),F=!0,A=!0,r=!0):A?(A=!1,r=!0):h(e,"incomplete explicit mapping pair; a key node is missed; or followed by a non-tabulated empty line"),e.position+=1,m=l;else{if(o=e.line,f=e.lineStart,c=e.position,!R(e,i,te,!1,!0))break;if(e.line===u){for(m=e.input.charCodeAt(e.position);I(m);)m=e.input.charCodeAt(++e.position);if(m===58)m=e.input.charCodeAt(++e.position),b(m)||h(e,"a whitespace character is expected after the key-value separator within a block mapping"),A&&(N(e,p,d,s,x,null,o,f,c),s=x=g=null),F=!0,A=!1,r=!1,s=e.tag,x=e.result;else if(F)h(e,"can not read an implicit mapping pair; a colon is missed");else return e.tag=a,e.anchor=t,!0}else if(F)h(e,"can not read a block mapping entry; a multiline key may not be an implicit key");else return e.tag=a,e.anchor=t,!0}if((e.line===u||e.lineIndent>n)&&(A&&(o=e.line,f=e.lineStart,c=e.position),R(e,n,U,!0,r)&&(A?x=e.result:g=e.result),A||(N(e,p,d,s,x,g,o,f,c),s=x=g=null),v(e,!0,-1),m=e.input.charCodeAt(e.position)),(e.line===u||e.lineIndent>n)&&m!==0)h(e,"bad indentation of a mapping entry");else if(e.lineIndent<n)break}return A&&N(e,p,d,s,x,null,o,f,c),F&&(e.tag=a,e.anchor=t,e.kind="mapping",e.result=p),F}function Fi(e){var n,i=!1,l=!1,r,u,o;if(o=e.input.charCodeAt(e.position),o!==33)return!1;if(e.tag!==null&&h(e,"duplication of a tag property"),o=e.input.charCodeAt(++e.position),o===60?(i=!0,o=e.input.charCodeAt(++e.position)):o===33?(l=!0,r="!!",o=e.input.charCodeAt(++e.position)):r="!",n=e.position,i){do o=e.input.charCodeAt(++e.position);while(o!==0&&o!==62);e.position<e.length?(u=e.input.slice(n,e.position),o=e.input.charCodeAt(++e.position)):h(e,"unexpected end of the stream within a verbatim tag")}else{for(;o!==0&&!b(o);)o===33&&(l?h(e,"tag suffix cannot contain exclamation marks"):(r=e.input.slice(n-1,e.position+1),se.test(r)||h(e,"named tag handle cannot contain such characters"),l=!0,n=e.position+1)),o=e.input.charCodeAt(++e.position);u=e.input.slice(n,e.position),di.test(u)&&h(e,"tag suffix cannot contain flow indicator characters")}u&&!xe.test(u)&&h(e,"tag name cannot contain such characters: "+u);try{u=decodeURIComponent(u)}catch{h(e,"tag name is malformed: "+u)}return i?e.tag=u:T.call(e.tagMap,r)?e.tag=e.tagMap[r]+u:r==="!"?e.tag="!"+u:r==="!!"?e.tag="tag:yaml.org,2002:"+u:h(e,'undeclared tag handle "'+r+'"'),!0}function Si(e){var n,i;if(i=e.input.charCodeAt(e.position),i!==38)return!1;for(e.anchor!==null&&h(e,"duplication of an anchor property"),i=e.input.charCodeAt(++e.position),n=e.position;i!==0&&!b(i)&&!k(i);)i=e.input.charCodeAt(++e.position);return e.position===n&&h(e,"name of an anchor node must contain at least one character"),e.anchor=e.input.slice(n,e.position),!0}function Ei(e){var n,i,l;if(l=e.input.charCodeAt(e.position),l!==42)return!1;for(l=e.input.charCodeAt(++e.position),n=e.position;l!==0&&!b(l)&&!k(l);)l=e.input.charCodeAt(++e.position);return e.position===n&&h(e,"name of an alias node must contain at least one character"),i=e.input.slice(n,e.position),T.call(e.anchorMap,i)||h(e,'unidentified alias "'+i+'"'),e.result=e.anchorMap[i],v(e,!0,-1),!0}function R(e,n,i,l,r){var u,o,f,c=1,a=!1,t=!1,p,d,s,x,g,A;if(e.listener!==null&&e.listener("open",e),e.tag=null,e.anchor=null,e.kind=null,e.result=null,u=o=f=U===i||he===i,l&&v(e,!0,-1)&&(a=!0,e.lineIndent>n?c=1:e.lineIndent===n?c=0:e.lineIndent<n&&(c=-1)),c===1)for(;Fi(e)||Si(e);)v(e,!0,-1)?(a=!0,f=u,e.lineIndent>n?c=1:e.lineIndent===n?c=0:e.lineIndent<n&&(c=-1)):f=!1;if(f&&(f=a||r),(c===1||U===i)&&(H===i||te===i?g=n:g=n+1,A=e.position-e.lineStart,c===1?f&&(we(e,A)||bi(e,A,g))||_i(e,g)?t=!0:(o&&wi(e,g)||yi(e,g)||Ci(e,g)?t=!0:Ei(e)?(t=!0,(e.tag!==null||e.anchor!==null)&&h(e,"alias node should not have any properties")):vi(e,gLine truncated
`),e.charCodeAt(0)===65279&&(e=e.slice(1)));var i=new Ai(e,n),l=e.indexOf("\0");for(l!==-1&&(i.position=l,h(i,"null byte is not allowed in input")),i.input+="\0";i.input.charCodeAt(i.position)===32;)i.lineIndent+=1,i.position+=1;for(;i.position<i.length-1;)Ti(i);return i.documents}function Oi(e,n,i){n!==null&&typeof n=="object"&&typeof i>"u"&&(i=n,n=null);var l=be(e,i);if(typeof n!="function")return l;for(var r=0,u=l.length;r<u;r+=1)n(l[r])}function Ii(e,n){var i=be(e,n);if(i.length!==0){if(i.length===1)return i[0];throw new w("expected a single document in the stream, but found more")}}var ki=Oi,Li=Ii,Ni={loadAll:ki,load:Li},Fe=Object.prototype.toString,Se=Object.prototype.hasOwnProperty,ee=65279,Ri=9,Y=10,Di=13,Mi=32,Yi=33,Bi=34,ne=35,Pi=37,ji=38,Hi=39,Ui=42,Ee=44,Ki=45,G=58,qi=61,Gi=62,Wi=63,$i=64,Te=91,Oe=93,Qi=96,Ie=123,Vi=124,ke=125,_={};_[0]="\\0",_[7]="\\a",_[8]="\\b",_[9]="\\t",_[10]="\\n",_[11]="\\v",_[12]="\\f",_[13]="\\r",_[27]="\\e",_[34]='\\"',_[92]="\\\\",_[133]="\\N",_[160]="\\_",_[8232]="\\L",_[8233]="\\P";var Xi=["y","Y","yes","Yes","YES","on","On","ON","n","N","no","No","NO","off","Off","OFF"],Zi=/^[-+]?[0-9_]+(?::[0-9_]+)+(?:\.[0-9_]*)?$/;function zi(e,n){var i,l,r,u,o,f,c;if(n===null)return{};for(i={},l=Object.keys(n),r=0,u=l.length;r<u;r+=1)o=l[r],f=String(n[o]),o.slice(0,2)==="!!"&&(o="tag:yaml.org,2002:"+o.slice(2)),c=e.compiledTypeMap.fallback[o],c&&Se.call(c.styleAliases,f)&&(f=c.styleAliases[f]),i[o]=f;return i}function Ji(e){var n,i,l;if(n=e.toString(16).toUpperCase(),e<=255)i="x",l=2;else if(e<=65535)i="u",l=4;else if(e<=4294967295)i="U",l=8;else throw new w("code point within a string may not be greater than 0xFFFFFFFF");return"\\"+i+y.repeat("0",l-n.length)+n}var er=1,B=2;function nr(e){this.schema=e.schema||pe,this.indent=Math.max(1,e.indent||2),this.noArrayIndent=e.noArrayIndent||!1,this.skipInvalid=e.skipInvalid||!1,this.flowLevel=y.isNothing(e.flowLevel)?-1:e.flowLevel,this.styleMap=zi(this.schema,e.styles||null),this.sortKeys=e.sortKeys||!1,this.lineWidth=e.lineWidth||80,this.noRefs=e.noRefs||!1,this.noCompatMode=e.noCompatMode||!1,this.condenseFlow=e.condenseFlow||!1,this.quotingType=e.quotingType==='"'?B:er,this.forceQuotes=e.forceQuotes||!1,this.replacer=typeof e.replacer=="function"?e.replacer:null,this.implicitTypes=this.schema.compiledImplicit,this.explicitTypes=this.schema.compiledExplicit,this.tag=null,this.result="",this.duplicates=[],this.usedDuplicates=null}function Le(e,n){for(var i=y.repeat(" ",n),l=0,r=-1,u="",o,f=e.length;l<f;)r=e.indexOf(`
`,l),r===-1?(o=e.slice(l),l=f):(o=e.slice(l,r+1),l=r+1),o.length&&o!==`
`&&(u+=i),u+=o;return u}function ie(e,n){return`
`+y.repeat(" ",e.indent*n)}function ir(e,n){var i,l,r;for(i=0,l=e.implicitTypes.length;i<l;i+=1)if(r=e.implicitTypes[i],r.resolve(n))return!0;return!1}function W(e){return e===Mi||e===Ri}function P(e){return 32<=e&&e<=126||161<=e&&e<=55295&&e!==8232&&e!==8233||57344<=e&&e<=65533&&e!==ee||65536<=e&&e<=1114111}function Ne(e){return P(e)&&e!==ee&&e!==Di&&e!==Y}function Re(e,n,i){var l=Ne(e),r=l&&!W(e);return(i?l:l&&e!==Ee&&e!==Te&&e!==Oe&&e!==Ie&&e!==ke)&&e!==ne&&!(n===G&&!r)||Ne(n)&&!W(n)&&e===ne||n===G&&r}function rr(e){return P(e)&&e!==ee&&!W(e)&&e!==Ki&&e!==Wi&&e!==G&&e!==Ee&&e!==Te&&e!==Oe&&e!==Ie&&e!==ke&&e!==ne&&e!==ji&&e!==Ui&&e!==Yi&&e!==Vi&&e!==qi&&e!==Gi&&e!==Hi&&e!==Bi&&e!==Pi&&e!==$i&&e!==Qi}function lr(e){return!W(e)&&e!==G}function j(e,n){var i=e.charCodeAt(n),l;return i>=55296&&i<=56319&&n+1<e.length&&(l=e.charCodeAt(n+1),l>=56320&&l<=57343)?(i-55296)*1024+l-56320+65536:i}function De(e){var n=/^\n* /;return n.test(e)}var Me=1,re=2,Ye=3,Be=4,D=5;function or(e,n,i,l,r,u,o,f){var c,a=0,t=null,p=!1,d=!1,s=l!==-1,x=-1,g=rr(j(e,0))&&lr(j(e,e.length-1));if(n||o)for(c=0;c<e.length;a>=65536?c+=2:c++){if(a=j(e,c),!P(a))return D;g=g&&Re(a,t,f),t=a}else{for(c=0;c<e.length;a>=65536?c+=2:c++){if(a=j(e,c),a===Y)p=!0,s&&(d=d||c-x-1>l&&e[x+1]!==" ",x=c);else if(!P(a))return D;g=g&&Re(a,t,f),t=a}d=d||s&&c-x-1>l&&e[x+1]!==" "}return!p&&!d?g&&!o&&!r(e)?Me:u===B?D:re:i>9&&De(e)?D:o?u===B?D:re:d?Be:Ye}function ur(e,n,i,l,r){e.dump=function(){if(n.length===0)return e.quotingType===B?'""':"''";if(!e.noCompatMode&&(Xi.indexOf(n)!==-1||Zi.test(n)))return e.quotingType===B?'"'+n+'"':"'"+n+"'";var u=e.indent*Math.max(1,i),o=e.lineWidth===-1?-1:Math.max(Math.min(e.lineWidth,40),e.lineWidth-u),f=l||e.flowLevel>-1&&i>=e.flowLevel;function c(a){return ir(e,a)}switch(or(n,f,e.indent,o,c,e.quotingType,e.forceQuotes&&!l,r)){case Me:return n;case re:return"'"+n.replace(/'/g,"''")+"'";case Ye:return"|"+Pe(n,e.indent)+je(Le(n,u));case Be:return">"+Pe(n,e.indent)+je(Le(fr(n,o),u));case D:return'"'+cr(n)+'"';default:throw new w("impossible error: invalid scalar style")}}()}function Pe(e,n){var i=De(e)?String(n):"",l=e[e.length-1]===`
`,r=l&&(e[e.length-2]===`
`||e===`
`),u=r?"+":l?"":"-";return i+u+`
`}function je(e){return e[e.length-1]===`
`?e.slice(0,-1):e}function fr(e,n){for(var i=/(\n+)([^\n]*)/g,l=function(){var a=e.indexOf(`
`);return a=a!==-1?a:e.length,i.lastIndex=a,He(e.slice(0,a),n)}(),r=e[0]===`
`||e[0]===" ",u,o;o=i.exec(e);){var f=o[1],c=o[2];u=c[0]===" ",l+=f+(!r&&!u&&c!==""?`
`:"")+He(c,n),r=u}return l}function He(e,n){if(e===""||e[0]===" ")return e;for(var i=/ [^ ]/g,l,r=0,u,o=0,f=0,c="";l=i.exec(e);)f=l.index,f-r>n&&(u=o>r?o:f,c+=`
`+e.slice(r,u),r=u+1),o=f;return c+=`
`,e.length-r>n&&o>r?c+=e.slice(r,o)+`
`+e.slice(o+1):c+=e.slice(r),c.slice(1)}function cr(e){for(var n="",i=0,l,r=0;r<e.length;i>=65536?r+=2:r++)i=j(e,r),l=_[i],!l&&P(i)?(n+=e[r],i>=65536&&(n+=e[r+1])):n+=l||Ji(i);return n}function ar(e,n,i){var l="",r=e.tag,u,o,f;for(u=0,o=i.length;u<o;u+=1)f=i[u],e.replacer&&(f=e.replacer.call(i,String(u),f)),(E(e,n,f,!1,!1)||typeof f>"u"&&E(e,n,null,!1,!1))&&(l!==""&&(l+=","+(e.condenseFlow?"":" ")),l+=e.dump);e.tag=r,e.dump="["+l+"]"}function Ue(e,n,i,l){var r="",u=e.tag,o,f,c;for(o=0,f=i.length;o<f;o+=1)c=i[o],e.replacer&&(c=e.replacer.call(i,String(o),c)),(E(e,n+1,c,!0,!0,!1,!0)||typeof c>"u"&&E(e,n+1,null,!0,!0,!1,!0))&&((!l||r!=="")&&(r+=ie(e,n)),e.dump&&Y===e.dump.charCodeAt(0)?r+="-":r+="- ",r+=e.dump);e.tag=u,e.dump=r||"[]"}function pr(e,n,i){var l="",r=e.tag,u=Object.keys(i),o,f,c,a,t;for(o=0,f=u.length;o<f;o+=1)t="",l!==""&&(t+=", "),e.condenseFlow&&(t+='"'),c=u[o],a=i[c],e.replacer&&(a=e.replacer.call(i,c,a)),E(e,n,c,!1,!1)&&(e.dump.length>1024&&(t+="? "),t+=e.dump+(e.condenseFlow?'"':"")+":"+(e.condenseFlow?"":" "),E(e,n,a,!1,!1)&&(t+=e.dump,l+=t));e.tag=r,e.dump="{"+l+"}"}function tr(e,n,i,l){var r="",u=e.tag,o=Object.keys(i),f,c,a,t,p,d;if(e.sortKeys===!0)o.sort();else if(typeof e.sortKeys=="function")o.sort(e.sortKeys);else if(e.sortKeys)throw new w("sortKeys must be a boolean or a function");for(f=0,c=o.length;f<c;f+=1)d="",(!l||r!=="")&&(d+=ie(e,n)),a=o[f],t=i[a],e.replacer&&(t=e.replacer.call(i,a,t)),E(e,n+1,a,!0,!0,!0)&&(p=e.tag!==null&&e.tag!=="?"||e.dump&&e.dump.length>1024,p&&(e.dump&&Y===e.dump.charCodeAt(0)?d+="?":d+="? "),d+=e.dump,p&&(d+=ie(e,n)),E(e,n+1,t,!0,p)&&(e.dump&&Y===e.dump.charCodeAt(0)?d+=":":d+=": ",d+=e.dump,r+=d));e.tag=u,e.dump=r||"{}"}function Ke(e,n,i){var l,r,u,o,f,c;for(r=i?e.explicitTypes:e.implicitTypes,u=0,o=r.length;u<o;u+=1)if(f=r[u],(f.instanceOf||f.predicate)&&(!f.instanceOf||typeof n=="object"&&n instanceof f.instanceOf)&&(!f.predicate||f.predicate(n))){if(i?f.multi&&f.representName?e.tag=f.representName(n):e.tag=f.tag:e.tag="?",f.represent){if(c=e.styleMap[f.tag]||f.defaultStyle,Fe.call(f.represent)==="[object Function]")l=f.represent(n,c);else if(Se.call(f.represent,c))l=f.represent[c](n,c);else throw new w("!<"+f.tag+'> tag resolver accepts not "'+c+'" style');e.dump=l}return!0}return!1}function E(e,n,i,l,r,u,o){e.tag=null,e.dump=i,Ke(e,i,!1)||Ke(e,i,!0);var f=Fe.call(e.dump),c=l,a;l&&(l=e.flowLevel<0||e.flowLevel>n);var t=f==="[object Object]"||f==="[object Array]",p,d;if(t&&(p=e.duplicates.indexOf(i),d=p!==-1),(e.tag!==null&&e.tag!=="?"||d||e.indent!==2&&n>0)&&(r=!1),d&&e.usedDuplicates[p])e.dump="*ref_"+p;else{if(t&&d&&!e.usedDuplicates[p]&&(e.usedDuplicates[p]=!0),f==="[object Object]")l&&Object.keys(e.dump).length!==0?(tr(e,n,e.dump,r),d&&(e.dump="&ref_"+p+e.dump)):(pr(e,n,e.dump),d&&(e.dump="&ref_"+p+" "+e.dump));else if(f==="[object Array]")l&&e.dump.length!==0?(e.noArrayIndent&&!o&&n>0?Ue(e,n-1,e.dump,r):Ue(e,n,e.dump,r),d&&(e.dump="&ref_"+p+e.dump)):(ar(e,n,e.dump),d&&(e.dump="&ref_"+p+" "+e.dump));else if(f==="[object String]")e.tag!=="?"&&ur(e,e.dump,n,u,c);else{if(f==="[object Undefined]")return!1;if(e.skipInvalid)return!1;throw new w("unacceptable kind of an object to dump "+f)}e.tag!==null&&e.tag!=="?"&&(a=encodeURI(e.tag[0]==="!"?e.tag.slice(1):e.tag).replace(/!/g,"%21"),e.tag[0]==="!"?a="!"+a:a.slice(0,18)==="tag:yaml.org,2002:"?a="!!"+a.slice(18):a="!<"+a+">",e.dump=a+" "+e.dump)}return!0}function hr(e,n){var i=[],l=[],r,u;for(le(e,i,l),r=0,u=l.length;r<u;r+=1)n.duplicates.push(i[l[r]]);n.usedDuplicates=new Array(u)}function le(e,n,i){var l,r,u;if(e!==null&&typeof e=="object")if(r=n.indexOf(e),r!==-1)i.indexOf(r)===-1&&i.push(r);else if(n.push(e),Array.isArray(e))for(r=0,u=e.length;r<u;r+=1)le(e[r],n,i);else for(l=Object.keys(e),r=0,u=l.length;r<u;r+=1)le(e[l[r]],n,i)}function dr(e,n){n=n||{};var i=new nr(n);i.noRefs||hr(e,i);var l=e;return i.replacer&&(l=i.replacer.call({"":l},"",l)),E(i,0,l,!0,!0)?i.dump+`
`:""}var sr=dr,xr={dump:sr},mr=Ni.load,gr=xr.dump;function Ar(e,n){const i=mr(e,n);return qe(e,i,n),i}function vr(e,n){const i=Ge(e,{preserveIndentation:!1}),l=typeof i.indent=="string"?i.indent.length:i.indent,r=gr(e,{indent:l,...n});return i.whitespace.start+r.trim()+i.whitespace.end}export{Ar as parseYAML,vr as stringifyYAML};
@@ -0,0 +1,122 @@
import type { $ZodStringFormats } from "../core/checks.js";
import type * as errors from "../core/errors.js";
import * as util from "../core/util.js";
const error: () => errors.$ZodErrorMap = () => {
const Sizable: Record<string, { unit: string; verb: string }> = {
string: { unit: "harf", verb: "olmalıdır" },
file: { unit: "bayt", verb: "olmalıdır" },
array: { unit: "unsur", verb: "olmalıdır" },
set: { unit: "unsur", verb: "olmalıdır" },
map: { unit: "unsur", verb: "olmalıdır" },
};
function getSizing(origin: string): { unit: string; verb: string } | null {
return Sizable[origin] ?? null;
}
const FormatDictionary: {
[k in $ZodStringFormats | (string & {})]?: string;
} = {
regex: "giren",
email: "epostagâh",
url: "URL",
emoji: "emoji",
uuid: "UUID",
uuidv4: "UUIDv4",
uuidv6: "UUIDv6",
nanoid: "nanoid",
guid: "GUID",
cuid: "cuid",
cuid2: "cuid2",
ulid: "ULID",
xid: "XID",
ksuid: "KSUID",
datetime: "ISO hengâmı",
date: "ISO tarihi",
time: "ISO zamanı",
duration: "ISO müddeti",
ipv4: "IPv4 nişânı",
ipv6: "IPv6 nişânı",
mac: "MAC nişânı",
cidrv4: "IPv4 menzili",
cidrv6: "IPv6 menzili",
base64: "base64-şifreli metin",
base64url: "base64url-şifreli metin",
json_string: "JSON metin",
e164: "E.164 sayısı",
credit_card: "i'tibâr kartı numarası",
currency_code: "para birimi kodu",
iban: "IBAN",
jwt: "JWT",
template_literal: "giren",
};
const TypeDictionary: {
[k in errors.$ZodInvalidTypeExpected | (string & {})]?: string;
} = {
nan: "NaN",
number: "numara",
array: "saf",
null: "gayb",
};
return (issue) => {
switch (issue.code) {
case "invalid_type": {
const expected = TypeDictionary[issue.expected] ?? issue.expected;
const receivedType = util.parsedType(issue.input);
const received = TypeDictionary[receivedType] ?? receivedType;
if (/^[A-Z]/.test(issue.expected)) {
return `Fâsit giren: umulan instanceof ${issue.expected}, alınan ${received}`;
}
return `Fâsit giren: umulan ${expected}, alınan ${received}`;
}
case "invalid_value":
if (issue.values.length === 1) return `Fâsit giren: umulan ${util.stringifyPrimitive(issue.values[0])}`;
return `Fâsit tercih: mûteberler ${util.joinValues(issue.values, "|")}`;
case "too_big": {
const adj = issue.inclusive ? "<=" : "<";
const sizing = getSizing(issue.origin);
if (sizing)
return `Fazla büyük: ${issue.origin ?? "value"}, ${adj}${issue.maximum.toString()} ${sizing.unit ?? "elements"} sahip olmalıydı.`;
return `Fazla büyük: ${issue.origin ?? "value"}, ${adj}${issue.maximum.toString()} olmalıydı.`;
}
case "too_small": {
const adj = issue.inclusive ? ">=" : ">";
const sizing = getSizing(issue.origin);
if (sizing) {
return `Fazla küçük: ${issue.origin}, ${adj}${issue.minimum.toString()} ${sizing.unit} sahip olmalıydı.`;
}
return `Fazla küçük: ${issue.origin}, ${adj}${issue.minimum.toString()} olmalıydı.`;
}
case "invalid_format": {
const _issue = issue as errors.$ZodStringFormatIssues;
if (_issue.format === "starts_with") return `Fâsit metin: "${_issue.prefix}" ile başlamalı.`;
if (_issue.format === "ends_with") return `Fâsit metin: "${_issue.suffix}" ile bitmeli.`;
if (_issue.format === "includes") return `Fâsit metin: "${_issue.includes}" ihtivâ etmeli.`;
if (_issue.format === "regex") return `Fâsit metin: ${_issue.pattern} nakşına uymalı.`;
return `Fâsit ${FormatDictionary[_issue.format] ?? issue.format}`;
}
case "not_multiple_of":
return `Fâsit sayı: ${issue.divisor} katı olmalıydı.`;
case "unrecognized_keys":
return `Tanınmayan anahtar ${issue.keys.length > 1 ? "s" : ""}: ${util.joinValues(issue.keys, ", ")}`;
case "invalid_key":
return `${issue.origin} için tanınmayan anahtar var.`;
case "invalid_union":
return "Giren tanınamadı.";
case "invalid_element":
return `${issue.origin} için tanınmayan kıymet var.`;
default:
return `Kıymet tanınamadı.`;
}
};
};
export default function (): { localeError: errors.$ZodErrorMap } {
return {
localeError: error(),
};
}
@@ -0,0 +1,45 @@
#!/usr/bin/env python3
# Copyright (c) 2009 Google Inc. All rights reserved.
# Use of this source code is governed by a BSD-style license that can be
# found in the LICENSE file.
import os
import subprocess
import sys
def IsCygwin():
# Function copied from pylib/gyp/common.py
try:
out = subprocess.Popen(
"uname", stdout=subprocess.PIPE, stderr=subprocess.STDOUT
)
stdout, _ = out.communicate()
return "CYGWIN" in stdout.decode("utf-8")
except Exception:
return False
def UnixifyPath(path):
try:
if not IsCygwin():
return path
out = subprocess.Popen(
["cygpath", "-u", path], stdout=subprocess.PIPE, stderr=subprocess.STDOUT
)
stdout, _ = out.communicate()
return stdout.decode("utf-8")
except Exception:
return path
# Make sure we're using the version of pylib in this repo, not one installed
# elsewhere on the system. Also convert to Unix style path on Cygwin systems,
# else the 'gyp' library will not be found
path = UnixifyPath(sys.argv[0])
sys.path.insert(0, os.path.join(os.path.dirname(path), "pylib"))
import gyp # noqa: E402
if __name__ == "__main__":
sys.exit(gyp.script_main())
@@ -0,0 +1 @@
{"version":3,"file":"router.js","sourceRoot":"","sources":["../../../../src/server/auth/router.ts"],"names":[],"mappings":"AAAA,OAAO,OAA2B,MAAM,SAAS,CAAC;AAClD,OAAO,EAAE,yBAAy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AI,CAAC,CAAC;IAClC,MAAM,MAAM,GAAG,CAAC,CAAC,QAAQ,IAAI,CAAC,CAAC,QAAQ,KAAK,GAAG,CAAC,CAAC,CAAC,CAAC,CAAC,QAAQ,CAAC,CAAC,CAAC,EAAE,CAAC;IAClE,OAAO,IAAI,GAAG,CAAC,wCAAwC,MAAM,EAAE,EAAE,CAAC,CAAC,CAAC,IAAI,CAAC;AAC7E,CAAC"}
@@ -0,0 +1,7 @@
import type { StringReader, StringWriter } from './strings.mts';
export declare const comma: number;
export declare const semicolon: number;
export declare function decodeInteger(reader: StringReader, relative: number): number;
export declare function encodeInteger(builder: StringWriter, num: number, relative: number): number;
export declare function hasMoreVlq(reader: StringReader, max: number): boolean;
//# sourceMappingURL=vlq.d.ts.map
@@ -0,0 +1,89 @@
# cross-spawn
[![NPM version][npm-image]][npm-url] [![Downloads][downloads-image]][npm-url] [![Build Status][ci-image]][ci-url] [![Build status][appveyor-image]][appveyor-url]
[npm-url]:https://npmjs.org/package/cross-spawn
[downloads-image]:https://img.shields.io/npm/dm/cross-spawn.svg
[npm-image]:https://img.shields.io/npm/v/cross-spawn.svg
[ci-url]:https://github.com/moxystudio/node-cross-spawn/actions/workflows/ci.yaml
[ci-image]:https://github.com/moxystudio/node-cross-spawn/actions/workflows/ci.yaml/badge.svg
[appveyor-url]:https://ci.appveyor.com/project/satazor/node-cross-spawn
[appveyor-image]:https://img.shields.io/appveyor/ci/satazor/node-cross-spawn/master.svg
A cross platform solution to node's spawn and spawnSync.
## Installation
Node.js version 8 and up:
`$ npm install cross-spawn`
Node.js version 7 and under:
`$ npm install cross-spawn@6`
## Why
Node has issues when using spawn on Windows:
- It ignores [PATHEXT](https://github.com/joyent/node/issues/2318)
- It does not support [shebangs](https://en.wikipedia.org/wiki/Shebang_(Unix))
- Has problems running commands with [spaces](https://github.com/nodejs/node/issues/7367)
- Has problems running commands with posix relative paths (e.g.: `./my-folder/my-executable`)
- Has an [issue](https://github.com/moxystudio/node-cross-spawn/issues/82) with command shims (files in `node_modules/.bin/`), where arguments with quotes and parenthesis would result in [invalid syntax error](https://github.com/moxystudio/node-cross-spawn/blob/e77b8f22a416db46b6196767bcd35601d7e11d54/test/index.test.js#L149)
- No `options.shell` support on node `<v4.8`
All these issues are handled correctly by `cross-spawn`.
There are some known modules, such as [win-spawn](https://github.com/ForbesLindesay/win-spawn), that try to solve this but they are either broken or provide faulty escaping of shell arguments.
## Usage
Exactly the same way as node's [`spawn`](https://nodejs.org/api/child_process.html#child_process_child_process_spawn_command_args_options) or [`spawnSync`](https://nodejs.org/api/child_process.html#child_process_child_process_spawnsync_command_args_options), so it's a drop in replacement.
```js
const spawn = require('cross-spawn');
// Spawn NPM asynchronously
const child = spawn('npm', ['list', '-g', '-depth', '0'], { stdio: 'inherit' });
// Spawn NPM synchronously
const result = spawn.sync('npm', ['list', '-g', '-depth', '0'], { stdio: 'inherit' });
```
## Caveats
### Using `options.shell` as an alternative to `cross-spawn`
Starting from node `v4.8`, `spawn` has a `shell` option that allows you run commands from within a shell. This new option solves
the [PATHEXT](https://github.com/joyent/node/issues/2318) issue but:
- It's not supported in node `<v4.8`
- You must manually escape the command and arguments which is very error prone, specially when passing user input
- There are a lot of other unresolved issues from the [Why](#why) section that you must take into account
If you are using the `shell` option to spawn a command in a cross platform way, consider using `cross-spawn` instead. You have been warned.
### `options.shell` support
While `cross-spawn` adds support for `options.shell` in node `<v4.8`, all of its enhancements are disabled.
This mimics the Node.js behavior. More specifically, the command and its arguments will not be automatically escaped nor shebang support will be offered. This is by design because if you are using `options.shell` you are probably targeting a specific platform anyway and you don't want things to get into your way.
### Shebangs support
While `cross-spawn` handles shebangs on Windows, its support is limited. More specifically, it just supports `#!/usr/bin/env <program>` where `<program>` must not contain any arguments.
If you would like to have the shebang support improved, feel free to contribute via a pull-request.
Remember to always test your code on Windows!
## Tests
`$ npm test`
`$ npm test -- --watch` during development
## License
Released under the [MIT License](https://www.opensource.org/licenses/mit-license.php).
@@ -0,0 +1,74 @@
"use strict";Object.defineProperty(exports, "__esModule", {value: true}); function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }var _linesandcolumns = require('lines-and-columns'); var _linesandcolumns2 = _interopRequireDefault(_linesandcolumns);
var _types = require('../parser/tokenizer/types');
function formatTokens(code, tokens) {
if (tokens.length === 0) {
return "";
}
const tokenKeys = Object.keys(tokens[0]).filter(
(k) => k !== "type" && k !== "value" && k !== "start" && k !== "end" && k !== "loc",
);
const typeKeys = Object.keys(tokens[0].type).filter((k) => k !== "label" && k !== "keyword");
const headings = ["Location", "Label", "Raw", ...tokenKeys, ...typeKeys];
const lines = new (0, _linesandcolumns2.default)(code);
const rows = [headings, ...tokens.map(getTokenComponents)];
const padding = headings.map(() => 0);
for (const components of rows) {
for (let i = 0; i < components.length; i++) {
padding[i] = Math.max(padding[i], components[i].length);
}
}
return rows
.map((components) => components.map((component, i) => component.padEnd(padding[i])).join(" "))
.join("\n");
function getTokenComponents(token) {
const raw = code.slice(token.start, token.end);
return [
formatRange(token.start, token.end),
_types.formatTokenType.call(void 0, token.type),
truncate(String(raw), 14),
// @ts-ignore: Intentional dynamic access by key.
...tokenKeys.map((key) => formatValue(token[key], key)),
// @ts-ignore: Intentional dynamic access by key.
...typeKeys.map((key) => formatValue(token.type[key], key)),
];
}
// eslint-disable-next-line @typescript-eslint/no-explicit-any
function formatValue(value, key) {
if (value === true) {
return key;
} else if (value === false || value === null) {
return "";
} else {
return String(value);
}
}
function formatRange(start, end) {
return `${formatPos(start)}-${formatPos(end)}`;
}
function formatPos(pos) {
const location = lines.locationForIndex(pos);
if (!location) {
return "Unknown";
} else {
return `${location.line + 1}:${location.column + 1}`;
}
}
} exports.default = formatTokens;
function truncate(s, length) {
if (s.length > length) {
return `${s.slice(0, length - 3)}...`;
} else {
return s;
}
}
@@ -0,0 +1,23 @@
/**
* @license lucide-react v0.469.0 - ISC
*
* This source code is licensed under the ISC license.
* See the LICENSE file in the root directory of this source tree.
*/
import createLucideIcon from '../createLucideIcon.js';
const Linkedin = createLucideIcon("Linkedin", [
[
"path",
{
d: "M16 8a6 6 0 0 1 6 6v7h-4v-7a2 2 0 0 0-2-2 2 2 0 0 0-2 2v7h-4v-7a6 6 0 0 1 6-6z",
key: "c2jq9f"
}
],
["rect", { width: "4", height: "12", x: "2", y: "9", key: "mk3on5" }],
["circle", { cx: "4", cy: "4", r: "2", key: "bt5ra8" }]
]);
export { Linkedin as default };
//# sourceMappingURL=linkedin.js.map
@@ -0,0 +1,7 @@
import type { FlatConfig } from '@typescript-eslint/utils/ts-eslint';
/**
* A version of `strict` that only contains type-checked rules and disables of any corresponding core ESLint rules.
* @see {@link https://typescript-eslint.io/users/configs#strict-type-checked-only}
*/
declare const _default: (plugin: FlatConfig.Plugin, parser: FlatConfig.Parser) => FlatConfig.ConfigArray;
export default _default;
@@ -0,0 +1 @@
{"version":3,"file":"flashlight-off.js","sources":["../../../src/icons/flashlight-off.ts"],"sourcesContent":["import createLucideIcon from '../createLucideIcon';\n\n/**\n * @component @name FlashlightOff\n * @description Lucide SVG icon component, renders SVG Element with children.\n *\n * @preview ![img](data:image/svg+xml;base64,PHN2ZyAgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIgogIHdpZHRoPSIyNCIKICBoZWlnaHQ9IjI0IgogIHZpZXdCb3g9IjAgMCAyNCAyNCIKICBmaWxsPSJub25lIgogIHN0cm9rZT0iIzAwMCIgc3R5bGU9ImJhY2tncm91bmQtY29sb3I6ICNmZmY7IGJvcmRlci1yYWRpdXM6IDJweCIKICBzdHJva2Utd2lkdGg9IjIiCiAgc3Ryb2tlLWxpbmVjYXA9InJvdW5kIgogIHN0cm9rZS1saW5lam9pbj0icm91bmQiCj4KICA8cGF0aCBkPSJNMTYgMTZ2NGEyIDIgMCAwIDEtMiAyaC00YTIgMiAwIDAgMS0yLTJWMTBjMC0yLTItMi0yLTQiIC8+CiAgPHBhdGggZD0iTTcgMmgxMXY0YzAgMi0yIDItMiA0djEiIC8+CiAgPGxpbmUgeDE9IjExIiB4Mj0iMTgiIHkxPSI2IiB5Mj0iNiIgLz4KICA8bGluZSB4MT0iMiIgeDI9IjIyIiB5MT0iMiIgeTI9IjIyIiAvPgo8L3N2Zz4K) - https://lucide.dev/icons/flashlight-off\n * @see https://lucide.dev/guide/packages/lucide-react - Documentation\n *\n * @param {Object} props - Lucide icons props and any valid SVG attribute\n * @returns {JSX.Element} JSX Element\n *\n */\nconst FlashlightOff = createLucideIcon('FlashlightOff', [\n ['path', { d: 'M16 16v4a2 2 0 0 1-2 2h-4a2 2 0 0 1-2-2V10c0-2-2-2-2-4', key: '1r120k' }],\n ['path', { d: 'M7 2h11v4c0 2-2 2-2 4v1', key: 'dz1920' }],\n ['line', { x1: '11', x2: '18', y1: '6', y2: '6', key: 'bi1vpe' }],\n ['line', { x1: '2', x2: '22', y1: '2', y2: '22', key: 'a6p6uj' }],\n]);\n\nexport default FlashlightOff;\n"],"names":[],"mappings":";;;;;;;;;AAaM,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAgB,iBAAiB,eAAiB,CAAA,CAAA,CAAA;AAAA,CAAA,CACtD,CAAC,CAAA,CAAA,CAAA,CAAA,CAAA,CAAQ,CAAA,CAAA,CAAA,CAAE,GAAG,CAA0D,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,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,CACvF,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,CACxD,CAAA,CAAC,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAQ,CAAE,CAAA,CAAA,CAAA,EAAI,CAAM,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAI,CAAM,CAAA,CAAA,CAAA,CAAA,CAAA,EAAA,CAAI,CAAA,CAAA,CAAA,CAAK,CAAA,CAAA,CAAA,CAAA,CAAI,CAAA,CAAA,CAAA,CAAK,EAAA,CAAA,CAAA,CAAA,CAAA,CAAK,UAAU,CAAA,CAAA;AAAA,CAChE,CAAA,CAAC,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAQ,CAAE,CAAA,CAAA,CAAA,EAAI,CAAK,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAI,CAAM,CAAA,CAAA,CAAA,CAAA,CAAA,EAAA,CAAI,CAAA,CAAA,CAAA,CAAK,CAAA,CAAA,CAAA,CAAA,CAAI,CAAA,CAAA,CAAA,CAAA,CAAM,EAAA,CAAA,CAAA,CAAA,CAAA,CAAK,UAAU,CAAA;AAClE,CAAC,CAAA,CAAA;;"}
@@ -0,0 +1 @@
{"version":3,"file":"cassette-tape.js","sources":["../../../src/icons/cassette-tape.ts"],"sourcesContent":["import createLucideIcon from '../createLucideIcon';\n\n/**\n * @component @name CassetteTape\n * @description Lucide SVG icon component, renders SVG Element with children.\n *\n * @preview ![img](data:image/svg+xml;base64,PHN2ZyAgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIgogIHdpZHRoPSIyNCIKICBoZWlnaHQ9IjI0IgogIHZpZXdCb3g9IjAgMCAyNCAyNCIKICBmaWxsPSJub25lIgogIHN0cm9rZT0iIzAwMCIgc3R5bGU9ImJhY2tncm91bmQtY29sb3I6ICNmZmY7IGJvcmRlci1yYWRpdXM6IDJweCIKICBzdHJva2Utd2lkdGg9IjIiCiAgc3Ryb2tlLWxpbmVjYXA9InJvdW5kIgogIHN0cm9rZS1saW5lam9pbj0icm91bmQiCj4KICA8cmVjdCB3aWR0aD0iMjAiIGhlaWdodD0iMTYiIHg9IjIiIHk9IjQiIHJ4PSIyIiAvPgogIDxjaXJjbGUgY3g9IjgiIGN5PSIxMCIgcj0iMiIgLz4KICA8cGF0aCBkPSJNOCAxMmg4IiAvPgogIDxjaXJjbGUgY3g9IjE2IiBjeT0iMTAiIHI9IjIiIC8+CiAgPHBhdGggZD0ibTYgMjAgLjctMi45QTEuNCAxLjQgMCAwIDEgOC4xIDE2aDcuOGExLjQgMS40IDAgMCAxIDEuNCAxbC43IDMiIC8+Cjwvc3ZnPgo=) - https://lucide.dev/icons/cassette-tape\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 CassetteTape = createLucideIcon('CassetteTape', [\n ['rect', { width: '20', height: '16', x: '2', y: '4', rx: '2', key: '18n3k1' }],\n ['circle', { cx: '8', cy: '10', r: '2', key: '1xl4ub' }],\n ['path', { d: 'M8 12h8', key: '1wcyev' }],\n ['circle', { cx: '16', cy: '10', r: '2', key: 'r14t7q' }],\n ['path', { d: 'm6 20 .7-2.9A1.4 1.4 0 0 1 8.1 16h7.8a1.4 1.4 0 0 1 1.4 1l.7 3', key: 'l01ucn' }],\n]);\n\nexport default CassetteTape;\n"],"names":[],"mappings":";;;;;;;;;AAaM,CAA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CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,EAAU,CAAA,CAAA;AAAA,CAAA,CACxD,CAAC,CAAA,CAAA,CAAA,CAAA,CAAA,CAAQ,CAAA,CAAA,CAAA,CAAE,GAAG,CAAkE,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAK,UAAU,CAAA;AACjG,CAAC,CAAA,CAAA;;"}
@@ -0,0 +1,22 @@
/**
* @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 ChartArea = createLucideIcon("ChartArea", [
["path", { d: "M3 3v16a2 2 0 0 0 2 2h16", key: "c24i48" }],
[
"path",
{
d: "M7 11.207a.5.5 0 0 1 .146-.353l2-2a.5.5 0 0 1 .708 0l3.292 3.292a.5.5 0 0 0 .708 0l4.292-4.292a.5.5 0 0 1 .854.353V16a1 1 0 0 1-1 1H8a1 1 0 0 1-1-1z",
key: "q0gr47"
}
]
]);
export { ChartArea as default };
//# sourceMappingURL=chart-area.js.map
@@ -0,0 +1,45 @@
import {
AnyNode,
AtRule,
Builder,
Comment,
Container,
Declaration,
Document,
Root,
Rule
} from './postcss.js'
declare namespace Stringifier {
export { Stringifier_ as default }
}
declare class Stringifier_ {
builder: Builder
constructor(builder: Builder)
atrule(node: AtRule, semicolon?: boolean): void
beforeAfter(node: AnyNode, detect: 'after' | 'before'): string
block(node: AnyNode, start: string): void
body(node: Container): void
comment(node: Comment): void
decl(node: Declaration, semicolon?: boolean): void
document(node: Document): void
raw(node: AnyNode, own: null | string, detect?: string): boolean | string
rawBeforeClose(root: Root): string | undefined
rawBeforeComment(root: Root, node: Comment): string | undefined
rawBeforeDecl(root: Root, node: Declaration): string | undefined
rawBeforeOpen(root: Root): string | undefined
rawBeforeRule(root: Root): string | undefined
rawColon(root: Root): string | undefined
rawEmptyBody(root: Root): string | undefined
rawIndent(root: Root): string | undefined
rawSemicolon(root: Root): boolean | undefined
rawValue(node: AnyNode, prop: string): number | string
root(node: Root): void
rule(node: Rule): void
stringify(node: AnyNode, semicolon?: boolean): void
}
declare class Stringifier extends Stringifier_ {}
export = Stringifier
@@ -0,0 +1,19 @@
"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
exports.referenceContainsTypeQuery = referenceContainsTypeQuery;
const utils_1 = require("@typescript-eslint/utils");
/**
* Recursively checks whether a given reference has a type query declaration among its parents
*/
function referenceContainsTypeQuery(node) {
switch (node.type) {
case utils_1.AST_NODE_TYPES.TSTypeQuery:
return true;
case utils_1.AST_NODE_TYPES.TSQualifiedName:
case utils_1.AST_NODE_TYPES.Identifier:
return referenceContainsTypeQuery(node.parent);
default:
// if we find a different node, there's no chance that we're in a TSTypeQuery
return false;
}
}
@@ -0,0 +1,30 @@
"use strict";
/**
* JSON Schema validation
*
* This module provides configurable JSON Schema validation for the MCP SDK.
* Choose a validator based on your runtime environment:
*
* - AjvJsonSchemaValidator: Best for Node.js (default, fastest)
* Import from: @modelcontextprotocol/sdk/validation/ajv
* Requires peer dependencies: ajv, ajv-formats
*
* - CfWorkerJsonSchemaValidator: Best for edge runtimes
* Import from: @modelcontextprotocol/sdk/validation/cfworker
* Requires peer dependency: @cfworker/json-schema
*
* @example
* ```typescript
* // For Node.js with AJV
* import { AjvJsonSchemaValidator } from '@modelcontextprotocol/sdk/validation/ajv';
* const validator = new AjvJsonSchemaValidator();
*
* // For Cloudflare Workers
* import { CfWorkerJsonSchemaValidator } from '@modelcontextprotocol/sdk/validation/cfworker';
* const validator = new CfWorkerJsonSchemaValidator();
* ```
*
* @module validation
*/
Object.defineProperty(exports, "__esModule", { value: true });
//# sourceMappingURL=index.js.map
@@ -0,0 +1,153 @@
### Estraverse [![Build Status](https://secure.travis-ci.org/estools/estraverse.svg)](http://travis-ci.org/estools/estraverse)
Estraverse ([estraverse](http://github.com/estools/estraverse)) is
[ECMAScript](http://www.ecma-international.org/publications/standards/Ecma-262.htm)
traversal functions from [esmangle project](http://github.com/estools/esmangle).
### Documentation
You can find usage docs at [wiki page](https://github.com/estools/estraverse/wiki/Usage).
### Example Usage
The following code will output all variables declared at the root of a file.
```javascript
estraverse.traverse(ast, {
enter: function (node, parent) {
if (node.type == 'FunctionExpression' || node.type == 'FunctionDeclaration')
return estraverse.VisitorOption.Skip;
},
leave: function (node, parent) {
if (node.type == 'VariableDeclarator')
console.log(node.id.name);
}
});
```
We can use `this.skip`, `this.remove` and `this.break` functions instead of using Skip, Remove and Break.
```javascript
estraverse.traverse(ast, {
enter: function (node) {
this.break();
}
});
```
And estraverse provides `estraverse.replace` function. When returning node from `enter`/`leave`, current node is replaced with it.
```javascript
result = estraverse.replace(tree, {
enter: function (node) {
// Replace it with replaced.
if (node.type === 'Literal')
return replaced;
}
});
```
By passing `visitor.keys` mapping, we can extend estraverse traversing functionality.
```javascript
// This tree contains a user-defined `TestExpression` node.
var tree = {
type: 'TestExpression',
// This 'argument' is the property containing the other **node**.
argument: {
type: 'Literal',
value: 20
},
// This 'extended' is the property not containing the other **node**.
extended: true
};
estraverse.traverse(tree, {
enter: function (node) { },
// Extending the existing traversing rules.
keys: {
// TargetNodeName: [ 'keys', 'containing', 'the', 'other', '**node**' ]
TestExpression: ['argument']
}
});
```
By passing `visitor.fallback` option, we can control the behavior when encountering unknown nodes.
```javascript
// This tree contains a user-defined `TestExpression` node.
var tree = {
type: 'TestExpression',
// This 'argument' is the property containing the other **node**.
argument: {
type: 'Literal',
value: 20
},
// This 'extended' is the property not containing the other **node**.
extended: true
};
estraverse.traverse(tree, {
enter: function (node) { },
// Iterating the child **nodes** of unknown nodes.
fallback: 'iteration'
});
```
When `visitor.fallback` is a function, we can determine which keys to visit on each node.
```javascript
// This tree contains a user-defined `TestExpression` node.
var tree = {
type: 'TestExpression',
// This 'argument' is the property containing the other **node**.
argument: {
type: 'Literal',
value: 20
},
// This 'extended' is the property not containing the other **node**.
extended: true
};
estraverse.traverse(tree, {
enter: function (node) { },
// Skip the `argument` property of each node
fallback: function(node) {
return Object.keys(node).filter(function(key) {
return key !== 'argument';
});
}
});
```
### License
Copyright (C) 2012-2016 [Yusuke Suzuki](http://github.com/Constellation)
(twitter: [@Constellation](http://twitter.com/Constellation)) and other contributors.
Redistribution and use in source and binary forms, with or without
modification, are permitted provided that the following conditions are met:
* Redistributions of source code must retain the above copyright
notice, this list of conditions and the following disclaimer.
* Redistributions in binary form must reproduce the above copyright
notice, this list of conditions and the following disclaimer in the
documentation and/or other materials provided with the distribution.
THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
ARE DISCLAIMED. IN NO EVENT SHALL <COPYRIGHT HOLDER> BE LIABLE FOR ANY
DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
(INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
@@ -0,0 +1,29 @@
export var zeroGap = {
left: 0,
top: 0,
right: 0,
gap: 0,
};
var parse = function (x) { return parseInt(x || '', 10) || 0; };
var getOffset = function (gapMode) {
var cs = window.getComputedStyle(document.body);
var left = cs[gapMode === 'padding' ? 'paddingLeft' : 'marginLeft'];
var top = cs[gapMode === 'padding' ? 'paddingTop' : 'marginTop'];
var right = cs[gapMode === 'padding' ? 'paddingRight' : 'marginRight'];
return [parse(left), parse(top), parse(right)];
};
export var getGapWidth = function (gapMode) {
if (gapMode === void 0) { gapMode = 'margin'; }
if (typeof window === 'undefined') {
return zeroGap;
}
var offsets = getOffset(gapMode);
var documentWidth = document.documentElement.clientWidth;
var windowWidth = window.innerWidth;
return {
left: offsets[0],
top: offsets[1],
right: offsets[2],
gap: Math.max(0, windowWidth - documentWidth + offsets[2] - offsets[0]),
};
};