diff --git a/node_modules/@types/supercluster/LICENSE b/node_modules/@types/supercluster/LICENSE
new file mode 100644
index 0000000000000000000000000000000000000000..9e841e7a26e4eb057b24511e7b92d42b257a80e5
--- /dev/null
+++ b/node_modules/@types/supercluster/LICENSE
@@ -0,0 +1,21 @@
+ MIT License
+
+ Copyright (c) Microsoft Corporation.
+
+ 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
diff --git a/node_modules/@types/supercluster/README.md b/node_modules/@types/supercluster/README.md
new file mode 100644
index 0000000000000000000000000000000000000000..9c99c80d3eef22456fcb047a60c6750bfb57c4ed
--- /dev/null
+++ b/node_modules/@types/supercluster/README.md
@@ -0,0 +1,15 @@
+# Installation
+> `npm install --save @types/supercluster`
+
+# Summary
+This package contains type definitions for supercluster (https://github.com/mapbox/supercluster).
+
+# Details
+Files were exported from https://github.com/DefinitelyTyped/DefinitelyTyped/tree/master/types/supercluster.
+
+### Additional Details
+ * Last updated: Tue, 07 Nov 2023 15:11:36 GMT
+ * Dependencies: [@types/geojson](https://npmjs.com/package/@types/geojson)
+
+# Credits
+These definitions were written by [Denis Carriere](https://github.com/DenisCarriere), and [Nick Zahn](https://github.com/Manc).
diff --git a/node_modules/@types/supercluster/index.d.ts b/node_modules/@types/supercluster/index.d.ts
new file mode 100644
index 0000000000000000000000000000000000000000..5d076c9521649f27d5d8df6d86f1db848f8c02b4
--- /dev/null
+++ b/node_modules/@types/supercluster/index.d.ts
@@ -0,0 +1,185 @@
+import * as GeoJSON from "geojson";
+
+export as namespace supercluster;
+
+declare namespace Supercluster {
+ interface Options
{
+ /**
+ * Minimum zoom level at which clusters are generated.
+ *
+ * @default 0
+ */
+ minZoom?: number | undefined;
+
+ /**
+ * Maximum zoom level at which clusters are generated.
+ *
+ * @default 16
+ */
+ maxZoom?: number | undefined;
+
+ /**
+ * Minimum number of points to form a cluster.
+ *
+ * @default 2
+ */
+ minPoints?: number | undefined;
+
+ /**
+ * Cluster radius, in pixels.
+ *
+ * @default 40
+ */
+ radius?: number | undefined;
+
+ /**
+ * (Tiles) Tile extent. Radius is calculated relative to this value.
+ *
+ * @default 512
+ */
+ extent?: number | undefined;
+
+ /**
+ * Size of the KD-tree leaf node. Affects performance.
+ *
+ * @default 64
+ */
+ nodeSize?: number | undefined;
+
+ /**
+ * Whether timing info should be logged.
+ *
+ * @default false
+ */
+ log?: boolean | undefined;
+
+ /**
+ * Whether to generate ids for input features in vector tiles.
+ *
+ * @default false
+ */
+ generateId?: boolean | undefined;
+
+ /**
+ * A function that returns cluster properties corresponding to a single point.
+ *
+ * @example
+ * (props) => ({sum: props.myValue})
+ */
+ map?: ((props: P) => C) | undefined;
+
+ /**
+ * A reduce function that merges properties of two clusters into one.
+ *
+ * @example
+ * (accumulated, props) => { accumulated.sum += props.sum; }
+ */
+ reduce?: ((accumulated: C, props: Readonly) => void) | undefined;
+ }
+
+ /**
+ * Default properties type, allowing any properties.
+ * Try to avoid this for better typesafety by using proper types.
+ */
+ interface AnyProps {
+ [name: string]: any;
+ }
+
+ /**
+ * [GeoJSON Feature](https://tools.ietf.org/html/rfc7946#section-3.2),
+ * with the geometry being a
+ * [GeoJSON Point](https://tools.ietf.org/html/rfc7946#section-3.1.2).
+ */
+ type PointFeature = GeoJSON.Feature;
+
+ interface ClusterProperties {
+ /**
+ * Always `true` to indicate that the Feature is a Cluster and not
+ * an individual point.
+ */
+ cluster: true;
+ /** Cluster ID */
+ cluster_id: number;
+ /** Number of points in the cluster. */
+ point_count: number;
+ /**
+ * Abbreviated number of points in the cluster as string if the number
+ * is 1000 or greater (e.g. `1.3k` if the number is 1298).
+ *
+ * For less than 1000 points it is the same value as `point_count`.
+ */
+ point_count_abbreviated: string | number;
+ }
+
+ type ClusterFeature = PointFeature;
+
+ interface TileFeature {
+ type: 1;
+ geometry: Array<[number, number]>;
+ tags: (ClusterProperties & C) | P;
+ }
+
+ interface Tile {
+ features: Array>;
+ }
+}
+
+/**
+ * A very fast geospatial point clustering library for browsers and Node.
+ */
+declare class Supercluster<
+ P extends GeoJSON.GeoJsonProperties = Supercluster.AnyProps,
+ C extends GeoJSON.GeoJsonProperties = Supercluster.AnyProps,
+> {
+ constructor(options?: Supercluster.Options);
+
+ /**
+ * Loads an array of GeoJSON Feature objects. Each feature's geometry
+ * must be a GeoJSON Point. Once loaded, index is immutable.
+ *
+ * @param points Array of GeoJSON Features, the geometries being GeoJSON Points.
+ */
+ load(points: Array>): Supercluster;
+
+ /**
+ * Returns an array of clusters and points as `GeoJSON.Feature` objects
+ * for the given bounding box (`bbox`) and zoom level (`zoom`).
+ *
+ * @param bbox Bounding box (`[westLng, southLat, eastLng, northLat]`).
+ * @param zoom Zoom level.
+ */
+ getClusters(bbox: GeoJSON.BBox, zoom: number): Array | Supercluster.PointFeature>;
+
+ /**
+ * For a given zoom and x/y coordinates, returns a
+ * [geojson-vt](https://github.com/mapbox/geojson-vt)-compatible JSON
+ * tile object with cluster any point features.
+ */
+ getTile(zoom: number, x: number, y: number): Supercluster.Tile | null;
+
+ /**
+ * Returns the children of a cluster (on the next zoom level).
+ *
+ * @param clusterId Cluster ID (`cluster_id` value from feature properties).
+ * @throws {Error} If `clusterId` does not exist.
+ */
+ getChildren(clusterId: number): Array | Supercluster.PointFeature>;
+
+ /**
+ * Returns all the points of a cluster (with pagination support).
+ *
+ * @param clusterId Cluster ID (`cluster_id` value from feature properties).
+ * @param limit The number of points to return (set to `Infinity` for all points).
+ * @param offset The amount of points to skip (for pagination).
+ */
+ getLeaves(clusterId: number, limit?: number, offset?: number): Array>;
+
+ /**
+ * Returns the zoom level on which the cluster expands into several
+ * children (useful for "click to zoom" feature).
+ *
+ * @param clusterId Cluster ID (`cluster_id` value from feature properties).
+ */
+ getClusterExpansionZoom(clusterId: number): number;
+}
+export = Supercluster;
diff --git a/node_modules/@types/supercluster/package.json b/node_modules/@types/supercluster/package.json
new file mode 100644
index 0000000000000000000000000000000000000000..cc6559fcb2cb7b12320d5b9cd37f2141aa92744f
--- /dev/null
+++ b/node_modules/@types/supercluster/package.json
@@ -0,0 +1,32 @@
+{
+ "name": "@types/supercluster",
+ "version": "7.1.3",
+ "description": "TypeScript definitions for supercluster",
+ "homepage": "https://github.com/DefinitelyTyped/DefinitelyTyped/tree/master/types/supercluster",
+ "license": "MIT",
+ "contributors": [
+ {
+ "name": "Denis Carriere",
+ "githubUsername": "DenisCarriere",
+ "url": "https://github.com/DenisCarriere"
+ },
+ {
+ "name": "Nick Zahn",
+ "githubUsername": "Manc",
+ "url": "https://github.com/Manc"
+ }
+ ],
+ "main": "",
+ "types": "index.d.ts",
+ "repository": {
+ "type": "git",
+ "url": "https://github.com/DefinitelyTyped/DefinitelyTyped.git",
+ "directory": "types/supercluster"
+ },
+ "scripts": {},
+ "dependencies": {
+ "@types/geojson": "*"
+ },
+ "typesPublisherContentHash": "883fb7311fcd4f97d0f1472bc6b1c31899cd1888f8ba52ccc2a2e4022ca85d22",
+ "typeScriptVersion": "4.5"
+}
\ No newline at end of file
diff --git a/node_modules/@types/supertest/LICENSE b/node_modules/@types/supertest/LICENSE
new file mode 100644
index 0000000000000000000000000000000000000000..9e841e7a26e4eb057b24511e7b92d42b257a80e5
--- /dev/null
+++ b/node_modules/@types/supertest/LICENSE
@@ -0,0 +1,21 @@
+ MIT License
+
+ Copyright (c) Microsoft Corporation.
+
+ 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
diff --git a/node_modules/@types/supertest/README.md b/node_modules/@types/supertest/README.md
new file mode 100644
index 0000000000000000000000000000000000000000..39daba899118891610ca3eb767b0b0fb1c5dec8a
--- /dev/null
+++ b/node_modules/@types/supertest/README.md
@@ -0,0 +1,15 @@
+# Installation
+> `npm install --save @types/supertest`
+
+# Summary
+This package contains type definitions for supertest (https://github.com/visionmedia/supertest).
+
+# Details
+Files were exported from https://github.com/DefinitelyTyped/DefinitelyTyped/tree/master/types/supertest.
+
+### Additional Details
+ * Last updated: Mon, 24 Mar 2025 14:36:45 GMT
+ * Dependencies: [@types/methods](https://npmjs.com/package/@types/methods), [@types/superagent](https://npmjs.com/package/@types/superagent)
+
+# Credits
+These definitions were written by [Alex Varju](https://github.com/varju), [Petteri Parkkila](https://github.com/pietu), and [David Tanner](https://github.com/DavidTanner).
diff --git a/node_modules/@types/supertest/index.d.ts b/node_modules/@types/supertest/index.d.ts
new file mode 100644
index 0000000000000000000000000000000000000000..dc4991ae48ccb58a61a79eee606575d321c5ff32
--- /dev/null
+++ b/node_modules/@types/supertest/index.d.ts
@@ -0,0 +1,38 @@
+import superagent = require("superagent");
+import stAgent = require("./lib/agent");
+import STest = require("./lib/test");
+import { AgentOptions as STAgentOptions, App } from "./types";
+
+declare const supertest: supertest.SuperTestStatic;
+
+declare namespace supertest {
+ type Response = superagent.Response;
+
+ type Request = superagent.SuperAgentRequest;
+
+ type CallbackHandler = superagent.CallbackHandler;
+
+ // eslint-disable-next-line @typescript-eslint/no-empty-interface
+ interface Test extends STest {}
+
+ // eslint-disable-next-line @typescript-eslint/no-empty-interface
+ interface Agent extends stAgent {}
+
+ interface Options {
+ http2?: boolean;
+ }
+
+ type AgentOptions = STAgentOptions;
+
+ type SuperTest = superagent.SuperAgent;
+
+ type SuperAgentTest = SuperTest;
+
+ interface SuperTestStatic {
+ (app: App, options?: STAgentOptions): stAgent;
+ Test: typeof STest;
+ agent: typeof stAgent & ((app?: App, options?: STAgentOptions) => InstanceType);
+ }
+}
+
+export = supertest;
diff --git a/node_modules/@types/supertest/lib/agent.d.ts b/node_modules/@types/supertest/lib/agent.d.ts
new file mode 100644
index 0000000000000000000000000000000000000000..12edf4dfeb3c0983b44487386b8e7ac4f7b3f4c3
--- /dev/null
+++ b/node_modules/@types/supertest/lib/agent.d.ts
@@ -0,0 +1,152 @@
+import superagent = require("superagent");
+import { Test } from "../index";
+import { AgentOptions, App } from "../types";
+
+declare class TestAgent extends superagent.agent {
+ constructor(
+ app?: App,
+ options?: AgentOptions,
+ );
+
+ host(host: string): this;
+
+ "M-SEARCH"(url: string): Req;
+
+ "m-search"(url: string): Req;
+
+ ACL(url: string): Req;
+
+ BIND(url: string): Req;
+
+ CHECKOUT(url: string): Req;
+
+ CONNECT(url: string): Req;
+
+ COPY(url: string): Req;
+
+ DELETE(url: string): Req;
+
+ GET(url: string): Req;
+
+ HEAD(url: string): Req;
+
+ LINK(url: string): Req;
+
+ LOCK(url: string): Req;
+
+ MERGE(url: string): Req;
+
+ MKACTIVITY(url: string): Req;
+
+ MKCALENDAR(url: string): Req;
+
+ MKCOL(url: string): Req;
+
+ MOVE(url: string): Req;
+
+ NOTIFY(url: string): Req;
+
+ OPTIONS(url: string): Req;
+
+ PATCH(url: string): Req;
+
+ POST(url: string): Req;
+
+ PROPFIND(url: string): Req;
+
+ PROPPATCH(url: string): Req;
+
+ PURGE(url: string): Req;
+
+ PUT(url: string): Req;
+
+ REBIND(url: string): Req;
+
+ REPORT(url: string): Req;
+
+ SEARCH(url: string): Req;
+
+ SOURCE(url: string): Req;
+
+ SUBSCRIBE(url: string): Req;
+
+ TRACE(url: string): Req;
+
+ UNBIND(url: string): Req;
+
+ UNLINK(url: string): Req;
+
+ UNLOCK(url: string): Req;
+
+ UNSUBSCRIBE(url: string): Req;
+
+ acl(url: string): Req;
+
+ bind(url: string): Req;
+
+ checkout(url: string): Req;
+
+ connect(url: string): Req;
+
+ copy(url: string): Req;
+
+ del(url: string): Req;
+
+ delete(url: string): Req;
+
+ get(url: string): Req;
+
+ head(url: string): Req;
+
+ link(url: string): Req;
+
+ lock(url: string): Req;
+
+ merge(url: string): Req;
+
+ mkactivity(url: string): Req;
+
+ mkcalendar(url: string): Req;
+
+ mkcol(url: string): Req;
+
+ move(url: string): Req;
+
+ notify(url: string): Req;
+
+ options(url: string): Req;
+
+ patch(url: string): Req;
+
+ post(url: string): Req;
+
+ propfind(url: string): Req;
+
+ proppatch(url: string): Req;
+
+ purge(url: string): Req;
+
+ put(url: string): Req;
+
+ rebind(url: string): Req;
+
+ report(url: string): Req;
+
+ search(url: string): Req;
+
+ source(url: string): Req;
+
+ subscribe(url: string): Req;
+
+ trace(url: string): Req;
+
+ unbind(url: string): Req;
+
+ unlink(url: string): Req;
+
+ unlock(url: string): Req;
+
+ unsubscribe(url: string): Req;
+}
+
+export = TestAgent;
diff --git a/node_modules/@types/supertest/lib/test.d.ts b/node_modules/@types/supertest/lib/test.d.ts
new file mode 100644
index 0000000000000000000000000000000000000000..123cd27568f1fd81aa27adb77fc552b8ef38e491
--- /dev/null
+++ b/node_modules/@types/supertest/lib/test.d.ts
@@ -0,0 +1,22 @@
+import { CallbackHandler, Request, Response } from "superagent";
+import { App } from "../types";
+
+declare class Test extends Request {
+ constructor(app: App, method: string, path: string);
+ app: App;
+ url: string;
+
+ serverAddress(app: App, path: string): string;
+
+ expect(status: number, callback?: CallbackHandler): this;
+ expect(status: number, body: any, callback?: CallbackHandler): this;
+ expect(checker: (res: Response) => any, callback?: CallbackHandler): this;
+ expect(body: string, callback?: CallbackHandler): this;
+ expect(body: RegExp, callback?: CallbackHandler): this;
+ expect(body: object, callback?: CallbackHandler): this;
+ expect(field: string, val: string, callback?: CallbackHandler): this;
+ expect(field: string, val: RegExp, callback?: CallbackHandler): this;
+ end(callback?: CallbackHandler): this;
+}
+
+export = Test;
diff --git a/node_modules/@types/supertest/package.json b/node_modules/@types/supertest/package.json
new file mode 100644
index 0000000000000000000000000000000000000000..53da44415fcc873acf34635fc9c96109dbb7de69
--- /dev/null
+++ b/node_modules/@types/supertest/package.json
@@ -0,0 +1,39 @@
+{
+ "name": "@types/supertest",
+ "version": "6.0.3",
+ "description": "TypeScript definitions for supertest",
+ "homepage": "https://github.com/DefinitelyTyped/DefinitelyTyped/tree/master/types/supertest",
+ "license": "MIT",
+ "contributors": [
+ {
+ "name": "Alex Varju",
+ "githubUsername": "varju",
+ "url": "https://github.com/varju"
+ },
+ {
+ "name": "Petteri Parkkila",
+ "githubUsername": "pietu",
+ "url": "https://github.com/pietu"
+ },
+ {
+ "name": "David Tanner",
+ "githubUsername": "DavidTanner",
+ "url": "https://github.com/DavidTanner"
+ }
+ ],
+ "main": "",
+ "types": "index.d.ts",
+ "repository": {
+ "type": "git",
+ "url": "https://github.com/DefinitelyTyped/DefinitelyTyped.git",
+ "directory": "types/supertest"
+ },
+ "scripts": {},
+ "dependencies": {
+ "@types/methods": "^1.1.4",
+ "@types/superagent": "^8.1.0"
+ },
+ "peerDependencies": {},
+ "typesPublisherContentHash": "af2a0cb3057b367259b4ef29c5307e259132de91fa0cd17d5d2910051690bdc4",
+ "typeScriptVersion": "5.0"
+}
\ No newline at end of file
diff --git a/node_modules/@types/supertest/types.d.ts b/node_modules/@types/supertest/types.d.ts
new file mode 100644
index 0000000000000000000000000000000000000000..927fc6ccb37ea53736cac959b11cd45ad4d638c0
--- /dev/null
+++ b/node_modules/@types/supertest/types.d.ts
@@ -0,0 +1,17 @@
+import { AgentOptions as SAgentOptions } from "superagent";
+import methods = require("methods");
+import { IncomingMessage, RequestListener, ServerResponse } from "http";
+import { Http2ServerRequest, Http2ServerResponse } from "http2";
+import { Server } from "net";
+
+export type App =
+ | Server
+ | RequestListener
+ | ((request: Http2ServerRequest, response: Http2ServerResponse) => void | Promise)
+ | string;
+
+export interface AgentOptions extends SAgentOptions {
+ http2?: boolean;
+}
+
+export type AllMethods = typeof methods[number] | "del";
diff --git a/node_modules/@types/trusted-types/LICENSE b/node_modules/@types/trusted-types/LICENSE
new file mode 100644
index 0000000000000000000000000000000000000000..9e841e7a26e4eb057b24511e7b92d42b257a80e5
--- /dev/null
+++ b/node_modules/@types/trusted-types/LICENSE
@@ -0,0 +1,21 @@
+ MIT License
+
+ Copyright (c) Microsoft Corporation.
+
+ 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
diff --git a/node_modules/@types/trusted-types/README.md b/node_modules/@types/trusted-types/README.md
new file mode 100644
index 0000000000000000000000000000000000000000..fb376e79031191dad8148ce0e692f83cab2f8687
--- /dev/null
+++ b/node_modules/@types/trusted-types/README.md
@@ -0,0 +1,15 @@
+# Installation
+> `npm install --save @types/trusted-types`
+
+# Summary
+This package contains type definitions for trusted-types (https://github.com/WICG/trusted-types).
+
+# Details
+Files were exported from https://github.com/DefinitelyTyped/DefinitelyTyped/tree/master/types/trusted-types.
+
+### Additional Details
+ * Last updated: Mon, 20 Nov 2023 23:36:24 GMT
+ * Dependencies: none
+
+# Credits
+These definitions were written by [Jakub Vrana](https://github.com/vrana), [Damien Engels](https://github.com/engelsdamien), [Emanuel Tesar](https://github.com/siegrift), [Bjarki](https://github.com/bjarkler), and [Sebastian Silbermann](https://github.com/eps1lon).
diff --git a/node_modules/@types/trusted-types/index.d.ts b/node_modules/@types/trusted-types/index.d.ts
new file mode 100644
index 0000000000000000000000000000000000000000..18ab043a3eea44395798ce7c6cbcfcebb7183665
--- /dev/null
+++ b/node_modules/@types/trusted-types/index.d.ts
@@ -0,0 +1,53 @@
+import * as lib from "./lib";
+
+// Re-export the type definitions globally.
+declare global {
+ // eslint-disable-next-line @typescript-eslint/no-empty-interface -- interface to allow module augmentation
+ interface TrustedHTML extends lib.TrustedHTML {}
+ // eslint-disable-next-line @typescript-eslint/no-empty-interface -- interface to allow module augmentation
+ interface TrustedScript extends lib.TrustedScript {}
+ // eslint-disable-next-line @typescript-eslint/no-empty-interface -- interface to allow module augmentation
+ interface TrustedScriptURL extends lib.TrustedScriptURL {}
+
+ // eslint-disable-next-line @typescript-eslint/no-empty-interface -- interface to allow module augmentation
+ interface TrustedTypePolicy extends lib.TrustedTypePolicy {}
+
+ // eslint-disable-next-line @typescript-eslint/no-empty-interface -- interface to allow module augmentation
+ interface TrustedTypePolicyFactory extends lib.TrustedTypePolicyFactory {}
+
+ // eslint-disable-next-line @typescript-eslint/no-empty-interface -- interface to allow module augmentation
+ interface TrustedTypePolicyOptions extends lib.TrustedTypePolicyOptions {}
+
+ // Attach the relevant Trusted Types properties to the Window object.
+ // eslint-disable-next-line @typescript-eslint/no-empty-interface -- interface to allow module augmentation
+ interface Window extends lib.TrustedTypesWindow {}
+}
+
+// These are the available exports when using the polyfill as npm package (e.g. in nodejs)
+interface InternalTrustedTypePolicyFactory extends lib.TrustedTypePolicyFactory {
+ TrustedHTML: typeof lib.TrustedHTML;
+ TrustedScript: typeof lib.TrustedScript;
+ TrustedScriptURL: typeof lib.TrustedScriptURL;
+}
+
+declare const trustedTypes: InternalTrustedTypePolicyFactory;
+
+declare class TrustedTypesEnforcer {
+ constructor(config: TrustedTypeConfig);
+ install: () => void;
+ uninstall: () => void;
+}
+
+// tslint:disable-next-line no-unnecessary-class
+declare class TrustedTypeConfig {
+ constructor(
+ isLoggingEnabled: boolean,
+ isEnforcementEnabled: boolean,
+ allowedPolicyNames: string[],
+ allowDuplicates: boolean,
+ cspString?: string | null,
+ windowObject?: Window,
+ );
+}
+
+export { TrustedTypeConfig, TrustedTypePolicy, TrustedTypePolicyFactory, trustedTypes, TrustedTypesEnforcer };
diff --git a/node_modules/@types/trusted-types/lib/index.d.ts b/node_modules/@types/trusted-types/lib/index.d.ts
new file mode 100644
index 0000000000000000000000000000000000000000..2c7ccd4b8063129830ff54851b0084de8826fab9
--- /dev/null
+++ b/node_modules/@types/trusted-types/lib/index.d.ts
@@ -0,0 +1,64 @@
+// The main type definitions. Packages that do not want to pollute the global
+// scope with Trusted Types (e.g. libraries whose users may not be using Trusted
+// Types) can import the types directly from 'trusted-types/lib'.
+
+export type FnNames = keyof TrustedTypePolicyOptions;
+export type Args = Parameters>;
+
+export class TrustedHTML {
+ private constructor(); // To prevent instantiting with 'new'.
+ private brand: true; // To prevent structural typing.
+}
+
+export class TrustedScript {
+ private constructor(); // To prevent instantiting with 'new'.
+ private brand: true; // To prevent structural typing.
+}
+
+export class TrustedScriptURL {
+ private constructor(); // To prevent instantiting with 'new'.
+ private brand: true; // To prevent structural typing.
+}
+
+export abstract class TrustedTypePolicyFactory {
+ createPolicy(
+ policyName: string,
+ policyOptions?: Options,
+ ): Pick, "name" | Extract>;
+ isHTML(value: unknown): value is TrustedHTML;
+ isScript(value: unknown): value is TrustedScript;
+ isScriptURL(value: unknown): value is TrustedScriptURL;
+ readonly emptyHTML: TrustedHTML;
+ readonly emptyScript: TrustedScript;
+ getAttributeType(tagName: string, attribute: string, elementNs?: string, attrNs?: string): string | null;
+ getPropertyType(tagName: string, property: string, elementNs?: string): string | null;
+ readonly defaultPolicy: TrustedTypePolicy | null;
+}
+
+export abstract class TrustedTypePolicy {
+ readonly name: string;
+ createHTML(...args: Args): TrustedHTML;
+ createScript(...args: Args): TrustedScript;
+ createScriptURL(...args: Args): TrustedScriptURL;
+}
+
+export interface TrustedTypePolicyOptions {
+ createHTML?: ((input: string, ...arguments: any[]) => string) | undefined;
+ createScript?: ((input: string, ...arguments: any[]) => string) | undefined;
+ createScriptURL?: ((input: string, ...arguments: any[]) => string) | undefined;
+}
+
+// The Window object is augmented with the following properties in browsers that
+// support Trusted Types. Users of the 'trusted-types/lib' entrypoint can cast
+// window as TrustedTypesWindow to access these properties.
+export interface TrustedTypesWindow {
+ // `trustedTypes` is left intentionally optional to make sure that
+ // people handle the case when their code is running in a browser not
+ // supporting trustedTypes.
+ trustedTypes?: TrustedTypePolicyFactory | undefined;
+ TrustedHTML: typeof TrustedHTML;
+ TrustedScript: typeof TrustedScript;
+ TrustedScriptURL: typeof TrustedScriptURL;
+ TrustedTypePolicyFactory: typeof TrustedTypePolicyFactory;
+ TrustedTypePolicy: typeof TrustedTypePolicy;
+}
diff --git a/node_modules/@types/trusted-types/package.json b/node_modules/@types/trusted-types/package.json
new file mode 100644
index 0000000000000000000000000000000000000000..eda8c7302771afb2cf181ea1574fff448ebfb8f0
--- /dev/null
+++ b/node_modules/@types/trusted-types/package.json
@@ -0,0 +1,45 @@
+{
+ "name": "@types/trusted-types",
+ "version": "2.0.7",
+ "description": "TypeScript definitions for trusted-types",
+ "homepage": "https://github.com/DefinitelyTyped/DefinitelyTyped/tree/master/types/trusted-types",
+ "license": "MIT",
+ "contributors": [
+ {
+ "name": "Jakub Vrana",
+ "githubUsername": "vrana",
+ "url": "https://github.com/vrana"
+ },
+ {
+ "name": "Damien Engels",
+ "githubUsername": "engelsdamien",
+ "url": "https://github.com/engelsdamien"
+ },
+ {
+ "name": "Emanuel Tesar",
+ "githubUsername": "siegrift",
+ "url": "https://github.com/siegrift"
+ },
+ {
+ "name": "Bjarki",
+ "githubUsername": "bjarkler",
+ "url": "https://github.com/bjarkler"
+ },
+ {
+ "name": "Sebastian Silbermann",
+ "githubUsername": "eps1lon",
+ "url": "https://github.com/eps1lon"
+ }
+ ],
+ "main": "",
+ "types": "index.d.ts",
+ "repository": {
+ "type": "git",
+ "url": "https://github.com/DefinitelyTyped/DefinitelyTyped.git",
+ "directory": "types/trusted-types"
+ },
+ "scripts": {},
+ "dependencies": {},
+ "typesPublisherContentHash": "20982c5e0452e662515e29b41f7be5a3c69e5918a9228929a563d9f1dfdfbbc5",
+ "typeScriptVersion": "4.5"
+}
\ No newline at end of file
diff --git a/node_modules/@types/unist/LICENSE b/node_modules/@types/unist/LICENSE
new file mode 100644
index 0000000000000000000000000000000000000000..9e841e7a26e4eb057b24511e7b92d42b257a80e5
--- /dev/null
+++ b/node_modules/@types/unist/LICENSE
@@ -0,0 +1,21 @@
+ MIT License
+
+ Copyright (c) Microsoft Corporation.
+
+ 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
diff --git a/node_modules/@types/unist/README.md b/node_modules/@types/unist/README.md
new file mode 100644
index 0000000000000000000000000000000000000000..b84e51bfb836f999b47b6d8e233b64cb372e48df
--- /dev/null
+++ b/node_modules/@types/unist/README.md
@@ -0,0 +1,15 @@
+# Installation
+> `npm install --save @types/unist`
+
+# Summary
+This package contains type definitions for unist (https://github.com/syntax-tree/unist).
+
+# Details
+Files were exported from https://github.com/DefinitelyTyped/DefinitelyTyped/tree/master/types/unist.
+
+### Additional Details
+ * Last updated: Thu, 15 Aug 2024 02:18:53 GMT
+ * Dependencies: none
+
+# Credits
+These definitions were written by [bizen241](https://github.com/bizen241), [Jun Lu](https://github.com/lujun2), [Hernan Rajchert](https://github.com/hrajchert), [Titus Wormer](https://github.com/wooorm), [Junyoung Choi](https://github.com/rokt33r), [Ben Moon](https://github.com/GuiltyDolphin), [JounQin](https://github.com/JounQin), and [Remco Haszing](https://github.com/remcohaszing).
diff --git a/node_modules/@types/unist/index.d.ts b/node_modules/@types/unist/index.d.ts
new file mode 100644
index 0000000000000000000000000000000000000000..513ddee5e9e2acb1e5c88c26da384212e52ed90b
--- /dev/null
+++ b/node_modules/@types/unist/index.d.ts
@@ -0,0 +1,119 @@
+// ## Interfaces
+
+/**
+ * Info associated with nodes by the ecosystem.
+ *
+ * This space is guaranteed to never be specified by unist or specifications
+ * implementing unist.
+ * But you can use it in utilities and plugins to store data.
+ *
+ * This type can be augmented to register custom data.
+ * For example:
+ *
+ * ```ts
+ * declare module 'unist' {
+ * interface Data {
+ * // `someNode.data.myId` is typed as `number | undefined`
+ * myId?: number | undefined
+ * }
+ * }
+ * ```
+ */
+export interface Data {}
+
+/**
+ * One place in a source file.
+ */
+export interface Point {
+ /**
+ * Line in a source file (1-indexed integer).
+ */
+ line: number;
+
+ /**
+ * Column in a source file (1-indexed integer).
+ */
+ column: number;
+ /**
+ * Character in a source file (0-indexed integer).
+ */
+ offset?: number | undefined;
+}
+
+/**
+ * Position of a node in a source document.
+ *
+ * A position is a range between two points.
+ */
+export interface Position {
+ /**
+ * Place of the first character of the parsed source region.
+ */
+ start: Point;
+
+ /**
+ * Place of the first character after the parsed source region.
+ */
+ end: Point;
+}
+
+// ## Abstract nodes
+
+/**
+ * Abstract unist node that contains the smallest possible value.
+ *
+ * This interface is supposed to be extended.
+ *
+ * For example, in HTML, a `text` node is a leaf that contains text.
+ */
+export interface Literal extends Node {
+ /**
+ * Plain value.
+ */
+ value: unknown;
+}
+
+/**
+ * Abstract unist node.
+ *
+ * The syntactic unit in unist syntax trees are called nodes.
+ *
+ * This interface is supposed to be extended.
+ * If you can use {@link Literal} or {@link Parent}, you should.
+ * But for example in markdown, a `thematicBreak` (`***`), is neither literal
+ * nor parent, but still a node.
+ */
+export interface Node {
+ /**
+ * Node type.
+ */
+ type: string;
+
+ /**
+ * Info from the ecosystem.
+ */
+ data?: Data | undefined;
+
+ /**
+ * Position of a node in a source document.
+ *
+ * Nodes that are generated (not in the original source document) must not
+ * have a position.
+ */
+ position?: Position | undefined;
+}
+
+/**
+ * Abstract unist node that contains other nodes (*children*).
+ *
+ * This interface is supposed to be extended.
+ *
+ * For example, in XML, an element is a parent of different things, such as
+ * comments, text, and further elements.
+ */
+export interface Parent extends Node {
+ /**
+ * List of children.
+ */
+ children: Node[];
+}
diff --git a/node_modules/@types/unist/package.json b/node_modules/@types/unist/package.json
new file mode 100644
index 0000000000000000000000000000000000000000..d2092dba8f2208817af3e1811569d90b6358ad8f
--- /dev/null
+++ b/node_modules/@types/unist/package.json
@@ -0,0 +1,60 @@
+{
+ "name": "@types/unist",
+ "version": "3.0.3",
+ "description": "TypeScript definitions for unist",
+ "homepage": "https://github.com/DefinitelyTyped/DefinitelyTyped/tree/master/types/unist",
+ "license": "MIT",
+ "contributors": [
+ {
+ "name": "bizen241",
+ "githubUsername": "bizen241",
+ "url": "https://github.com/bizen241"
+ },
+ {
+ "name": "Jun Lu",
+ "githubUsername": "lujun2",
+ "url": "https://github.com/lujun2"
+ },
+ {
+ "name": "Hernan Rajchert",
+ "githubUsername": "hrajchert",
+ "url": "https://github.com/hrajchert"
+ },
+ {
+ "name": "Titus Wormer",
+ "githubUsername": "wooorm",
+ "url": "https://github.com/wooorm"
+ },
+ {
+ "name": "Junyoung Choi",
+ "githubUsername": "rokt33r",
+ "url": "https://github.com/rokt33r"
+ },
+ {
+ "name": "Ben Moon",
+ "githubUsername": "GuiltyDolphin",
+ "url": "https://github.com/GuiltyDolphin"
+ },
+ {
+ "name": "JounQin",
+ "githubUsername": "JounQin",
+ "url": "https://github.com/JounQin"
+ },
+ {
+ "name": "Remco Haszing",
+ "githubUsername": "remcohaszing",
+ "url": "https://github.com/remcohaszing"
+ }
+ ],
+ "main": "",
+ "types": "index.d.ts",
+ "repository": {
+ "type": "git",
+ "url": "https://github.com/DefinitelyTyped/DefinitelyTyped.git",
+ "directory": "types/unist"
+ },
+ "scripts": {},
+ "dependencies": {},
+ "typesPublisherContentHash": "7f3d5ce8d56003f3583a5317f98d444bdc99910c7b486c6b10af4f38694e61fe",
+ "typeScriptVersion": "4.8"
+}
\ No newline at end of file
diff --git a/node_modules/@types/unzipper/LICENSE b/node_modules/@types/unzipper/LICENSE
new file mode 100644
index 0000000000000000000000000000000000000000..9e841e7a26e4eb057b24511e7b92d42b257a80e5
--- /dev/null
+++ b/node_modules/@types/unzipper/LICENSE
@@ -0,0 +1,21 @@
+ MIT License
+
+ Copyright (c) Microsoft Corporation.
+
+ 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
diff --git a/node_modules/@types/unzipper/README.md b/node_modules/@types/unzipper/README.md
new file mode 100644
index 0000000000000000000000000000000000000000..4a822305f311d6430e9c97ad6d80f818058772dd
--- /dev/null
+++ b/node_modules/@types/unzipper/README.md
@@ -0,0 +1,15 @@
+# Installation
+> `npm install --save @types/unzipper`
+
+# Summary
+This package contains type definitions for unzipper (https://github.com/ZJONSSON/node-unzipper#readme).
+
+# Details
+Files were exported from https://github.com/DefinitelyTyped/DefinitelyTyped/tree/master/types/unzipper.
+
+### Additional Details
+ * Last updated: Fri, 28 Feb 2025 17:33:47 GMT
+ * Dependencies: [@types/node](https://npmjs.com/package/@types/node)
+
+# Credits
+These definitions were written by [s73obrien](https://github.com/s73obrien), [Bart](https://github.com/bartje321), and [Ken Human](https://github.com/kenhuman).
diff --git a/node_modules/@types/unzipper/index.d.ts b/node_modules/@types/unzipper/index.d.ts
new file mode 100644
index 0000000000000000000000000000000000000000..07324501143a393a954d89c964834ef6cf9d8578
--- /dev/null
+++ b/node_modules/@types/unzipper/index.d.ts
@@ -0,0 +1,128 @@
+///
+
+import { ClientRequest, RequestOptions } from "http";
+import { Duplex, PassThrough, Readable, Stream, Transform } from "stream";
+
+export interface PullStream extends Duplex {
+ stream(eof: number | string, includeEof: boolean): PassThrough;
+ pull(eof: number | string, includeEof: boolean): Promise;
+}
+
+export interface Entry extends PassThrough {
+ autodrain(): Transform & {
+ promise(): Promise;
+ };
+ buffer(): Promise;
+ path: string;
+
+ props: {
+ path: string;
+ };
+
+ type: string;
+ vars: {
+ signature?: number | undefined;
+ versionsNeededToExtract: number;
+ flags: number;
+ compressionMethod: number;
+ lastModifiedTime: number;
+ crc32: number;
+ compressedSize: number;
+ fileNameLength: number;
+ extraFieldLength: number;
+ };
+
+ extra: {
+ signature: number;
+ partsize: number;
+ uncompressedSize: number;
+ compressedSize: number;
+ offset: number;
+ disknum: number;
+ };
+}
+
+export function unzip(
+ source: {
+ stream: Readable;
+ size: () => Promise;
+ },
+ offset: number,
+ _password: string,
+): Entry;
+
+export namespace Open {
+ function buffer(data: Buffer): Promise;
+ function file(filename: string): Promise;
+ function url(
+ request: ClientRequest,
+ opt: string | RequestOptions,
+ ): Promise;
+ function s3(client: any, params: any): Promise;
+ function s3_v3(client: any, params: any): Promise;
+ function custom(
+ source: {
+ size: () => Promise;
+ stream: (offset: number, length: number) => Readable;
+ },
+ ): Promise;
+}
+
+export function BufferStream(entry: Entry): Promise;
+
+export interface CentralDirectory {
+ signature: number;
+ diskNumber: number;
+ diskStart: number;
+ numberOfRecordsOnDisk: number;
+ numberOfRecords: number;
+ sizeOfCentralDirectory: number;
+ offsetToStartOfCentralDirectory: number;
+ commentLength: number;
+ files: File[];
+ extract: (opts: ParseOptions) => Promise;
+}
+
+export interface File {
+ signature: number;
+ versionMadeBy: number;
+ versionsNeededToExtract: number;
+ flags: number;
+ compressionMethod: number;
+ lastModifiedTime: number;
+ lastModifiedDate: number;
+ lastModifiedDateTime: Date;
+ crc32: number;
+ compressedSize: number;
+ uncompressedSize: number;
+ fileNameLength: number;
+ extraFieldLength: number;
+ fileCommentLength: number;
+ diskNumber: number;
+ internalFileAttributes: number;
+ externalFileAttributes: number;
+ offsetToLocalFileHeader: number;
+ pathBuffer: Buffer;
+ path: string;
+ isUnicode: number;
+ extra: any;
+ type: "Directory" | "File";
+ comment: string;
+ stream: (password?: string) => Entry;
+ buffer: (password?: string) => Promise;
+}
+
+export interface ParseOptions {
+ verbose?: boolean | undefined;
+ path?: string | undefined;
+ concurrency?: number | undefined;
+ forceStream?: boolean | undefined;
+}
+
+export type ParseStream = PullStream & {
+ promise(): Promise;
+};
+
+export function Parse(opts?: ParseOptions): ParseStream;
+export function ParseOne(match?: RegExp, opts?: ParseOptions): Duplex;
+export function Extract(opts?: ParseOptions): ParseStream;
diff --git a/node_modules/@types/unzipper/package.json b/node_modules/@types/unzipper/package.json
new file mode 100644
index 0000000000000000000000000000000000000000..3c5e1aeb2357b6d8256ae656fe9327bdef916cd2
--- /dev/null
+++ b/node_modules/@types/unzipper/package.json
@@ -0,0 +1,38 @@
+{
+ "name": "@types/unzipper",
+ "version": "0.10.11",
+ "description": "TypeScript definitions for unzipper",
+ "homepage": "https://github.com/DefinitelyTyped/DefinitelyTyped/tree/master/types/unzipper",
+ "license": "MIT",
+ "contributors": [
+ {
+ "name": "s73obrien",
+ "githubUsername": "s73obrien",
+ "url": "https://github.com/s73obrien"
+ },
+ {
+ "name": "Bart",
+ "githubUsername": "bartje321",
+ "url": "https://github.com/bartje321"
+ },
+ {
+ "name": "Ken Human",
+ "githubUsername": "kenhuman",
+ "url": "https://github.com/kenhuman"
+ }
+ ],
+ "main": "",
+ "types": "index.d.ts",
+ "repository": {
+ "type": "git",
+ "url": "https://github.com/DefinitelyTyped/DefinitelyTyped.git",
+ "directory": "types/unzipper"
+ },
+ "scripts": {},
+ "dependencies": {
+ "@types/node": "*"
+ },
+ "peerDependencies": {},
+ "typesPublisherContentHash": "7412f33ee3fbe532f1ae06c8958ef493820d6cde131f124c0e0484f57b3fb6e0",
+ "typeScriptVersion": "5.0"
+}
\ No newline at end of file
diff --git a/node_modules/@types/uuid/LICENSE b/node_modules/@types/uuid/LICENSE
new file mode 100644
index 0000000000000000000000000000000000000000..9e841e7a26e4eb057b24511e7b92d42b257a80e5
--- /dev/null
+++ b/node_modules/@types/uuid/LICENSE
@@ -0,0 +1,21 @@
+ MIT License
+
+ Copyright (c) Microsoft Corporation.
+
+ 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
diff --git a/node_modules/@types/uuid/README.md b/node_modules/@types/uuid/README.md
new file mode 100644
index 0000000000000000000000000000000000000000..946ff9931106c1b9921435c41ae91426a0664232
--- /dev/null
+++ b/node_modules/@types/uuid/README.md
@@ -0,0 +1,15 @@
+# Installation
+> `npm install --save @types/uuid`
+
+# Summary
+This package contains type definitions for uuid (https://github.com/uuidjs/uuid).
+
+# Details
+Files were exported from https://github.com/DefinitelyTyped/DefinitelyTyped/tree/master/types/uuid.
+
+### Additional Details
+ * Last updated: Thu, 20 Jun 2024 21:07:25 GMT
+ * Dependencies: none
+
+# Credits
+These definitions were written by [Oliver Hoffmann](https://github.com/iamolivinius), [Felipe Ochoa](https://github.com/felipeochoa), [Chris Barth](https://github.com/cjbarth), [Linus Unnebäck](https://github.com/LinusU), and [Christoph Tavan](https://github.com/ctavan).
diff --git a/node_modules/@types/uuid/index.d.mts b/node_modules/@types/uuid/index.d.mts
new file mode 100644
index 0000000000000000000000000000000000000000..84bc5bd8d279b06b6947c741648ae872deeda184
--- /dev/null
+++ b/node_modules/@types/uuid/index.d.mts
@@ -0,0 +1,19 @@
+import uuid from "./index.js";
+export import v1 = uuid.v1;
+export import v1ToV6 = uuid.v1ToV6;
+export import v3 = uuid.v3;
+export import v4 = uuid.v4;
+export import v5 = uuid.v5;
+export import v6 = uuid.v6;
+export import v6ToV1 = uuid.v6ToV1;
+export import v7 = uuid.v7;
+export import NIL = uuid.NIL;
+export import MAX = uuid.MAX;
+export import version = uuid.version;
+export import validate = uuid.validate;
+export import stringify = uuid.stringify;
+export import parse = uuid.parse;
+export import V1Options = uuid.V1Options;
+export import V4Options = uuid.V4Options;
+export import V6Options = uuid.V6Options;
+export import V7Options = uuid.V7Options;
diff --git a/node_modules/@types/uuid/index.d.ts b/node_modules/@types/uuid/index.d.ts
new file mode 100644
index 0000000000000000000000000000000000000000..4a2edac06fe37b7f1de13d65a8f9b492d9b0c3ab
--- /dev/null
+++ b/node_modules/@types/uuid/index.d.ts
@@ -0,0 +1,113 @@
+// disable automatic export
+export {};
+
+// Uses ArrayLike to admit Uint8 and co.
+type OutputBuffer = ArrayLike;
+type InputBuffer = ArrayLike;
+
+interface RandomOptions {
+ /** `Array` of 16 random bytes (0-255) */
+ random?: InputBuffer | undefined;
+}
+interface RngOptions {
+ /** Alternative to `options.random`, a `Function` that returns an `Array` of 16 random bytes (0-255) */
+ rng?: (() => InputBuffer) | undefined;
+}
+
+interface V1BaseOptions {
+ /** RFC "node" field as an `Array[6]` of byte values (per 4.1.6) */
+ node?: InputBuffer | undefined;
+ /** RFC "clock sequence" as a `Number` between 0 - 0x3fff */
+ clockseq?: number | undefined;
+ /** RFC "timestamp" field (`Number` of milliseconds, unix epoch) */
+ msecs?: number | Date | undefined;
+ /** RFC "timestamp" field (`Number` of nanoseconds to add to msecs, should be 0-10,000) */
+ nsecs?: number | undefined;
+}
+interface V1RandomOptions extends V1BaseOptions, RandomOptions {}
+interface V1RngOptions extends V1BaseOptions, RngOptions {}
+
+export type V1Options = V1RandomOptions | V1RngOptions;
+export type V4Options = RandomOptions | RngOptions;
+export type V6Options = V1Options;
+
+interface V7BaseOptions {
+ msecs?: number | Date | undefined;
+ seq?: number;
+}
+export type V7Options = (RandomOptions | RngOptions) & V7BaseOptions;
+
+type VToV = ((uuid: string) => string) & ((uuid: OutputBuffer) => Uint8Array);
+
+type v1String = (options?: V1Options) => string;
+type v1Buffer = (options: V1Options | null | undefined, buffer: T, offset?: number) => T;
+type v1 = v1Buffer & v1String;
+
+type v1ToV6 = VToV;
+
+type v4String = (options?: V4Options) => string;
+type v4Buffer = (options: V4Options | null | undefined, buffer: T, offset?: number) => T;
+type v4 = v4Buffer & v4String;
+
+type v3String = (name: string | InputBuffer, namespace: string | InputBuffer) => string;
+type v3Buffer = (
+ name: string | InputBuffer,
+ namespace: string | InputBuffer,
+ buffer: T,
+ offset?: number,
+) => T;
+interface v3Static {
+ // https://github.com/uuidjs/uuid/blob/master/src/v35.js#L16
+ DNS: string;
+ // https://github.com/uuidjs/uuid/blob/master/src/v35.js#L17
+ URL: string;
+}
+type v3 = v3Buffer & v3String & v3Static;
+
+type v5String = (name: string | InputBuffer, namespace: string | InputBuffer) => string;
+type v5Buffer = (
+ name: string | InputBuffer,
+ namespace: string | InputBuffer,
+ buffer: T,
+ offset?: number,
+) => T;
+interface v5Static {
+ // https://github.com/uuidjs/uuid/blob/master/src/v35.js#L16
+ DNS: string;
+ // https://github.com/uuidjs/uuid/blob/master/src/v35.js#L17
+ URL: string;
+}
+type v5 = v5Buffer & v5String & v5Static;
+
+type v6String = (options?: V6Options) => string;
+type v6Buffer = (options: V6Options | null | undefined, buffer: T, offset?: number) => T;
+type v6 = v6Buffer & v6String;
+
+type v6ToV1 = VToV;
+
+type v7String = (options?: V7Options) => string;
+type v7Buffer = (options: V7Options | null | undefined, buffer: T, offset?: number) => T;
+type v7 = v7Buffer & v7String;
+
+type NIL = string;
+type MAX = string;
+
+type parse = (uuid: string) => Uint8Array;
+type stringify = (buffer: InputBuffer, offset?: number) => string;
+type validate = (uuid: string) => boolean;
+type version = (uuid: string) => number;
+
+export const NIL: NIL;
+export const MAX: MAX;
+export const parse: parse;
+export const stringify: stringify;
+export const v1: v1;
+export const v1ToV6: v1ToV6;
+export const v3: v3;
+export const v4: v4;
+export const v5: v5;
+export const v6: v6;
+export const v6ToV1: v6ToV1;
+export const v7: v7;
+export const validate: validate;
+export const version: version;
diff --git a/node_modules/@types/uuid/package.json b/node_modules/@types/uuid/package.json
new file mode 100644
index 0000000000000000000000000000000000000000..56acf25cce09f49dfa755b7068c11546cfdce713
--- /dev/null
+++ b/node_modules/@types/uuid/package.json
@@ -0,0 +1,54 @@
+{
+ "name": "@types/uuid",
+ "version": "10.0.0",
+ "description": "TypeScript definitions for uuid",
+ "homepage": "https://github.com/DefinitelyTyped/DefinitelyTyped/tree/master/types/uuid",
+ "license": "MIT",
+ "contributors": [
+ {
+ "name": "Oliver Hoffmann",
+ "githubUsername": "iamolivinius",
+ "url": "https://github.com/iamolivinius"
+ },
+ {
+ "name": "Felipe Ochoa",
+ "githubUsername": "felipeochoa",
+ "url": "https://github.com/felipeochoa"
+ },
+ {
+ "name": "Chris Barth",
+ "githubUsername": "cjbarth",
+ "url": "https://github.com/cjbarth"
+ },
+ {
+ "name": "Linus Unnebäck",
+ "githubUsername": "LinusU",
+ "url": "https://github.com/LinusU"
+ },
+ {
+ "name": "Christoph Tavan",
+ "githubUsername": "ctavan",
+ "url": "https://github.com/ctavan"
+ }
+ ],
+ "main": "",
+ "types": "index.d.ts",
+ "exports": {
+ "./package.json": "./package.json",
+ ".": {
+ "types": {
+ "import": "./index.d.mts",
+ "default": "./index.d.ts"
+ }
+ }
+ },
+ "repository": {
+ "type": "git",
+ "url": "https://github.com/DefinitelyTyped/DefinitelyTyped.git",
+ "directory": "types/uuid"
+ },
+ "scripts": {},
+ "dependencies": {},
+ "typesPublisherContentHash": "08fbc5ff7d23aaac1e81b5acf98181d2544ce6ffd5578e9879e2a75f0c087d54",
+ "typeScriptVersion": "4.7"
+}
\ No newline at end of file
diff --git a/node_modules/@types/ws/LICENSE b/node_modules/@types/ws/LICENSE
new file mode 100644
index 0000000000000000000000000000000000000000..9e841e7a26e4eb057b24511e7b92d42b257a80e5
--- /dev/null
+++ b/node_modules/@types/ws/LICENSE
@@ -0,0 +1,21 @@
+ MIT License
+
+ Copyright (c) Microsoft Corporation.
+
+ 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
diff --git a/node_modules/@types/ws/README.md b/node_modules/@types/ws/README.md
new file mode 100644
index 0000000000000000000000000000000000000000..d5a4a1cb9fcc5bfdd906ab03e3a30a2ab07128c0
--- /dev/null
+++ b/node_modules/@types/ws/README.md
@@ -0,0 +1,15 @@
+# Installation
+> `npm install --save @types/ws`
+
+# Summary
+This package contains type definitions for ws (https://github.com/websockets/ws).
+
+# Details
+Files were exported from https://github.com/DefinitelyTyped/DefinitelyTyped/tree/master/types/ws.
+
+### Additional Details
+ * Last updated: Tue, 01 Apr 2025 02:59:53 GMT
+ * Dependencies: [@types/node](https://npmjs.com/package/@types/node)
+
+# Credits
+These definitions were written by [Paul Loyd](https://github.com/loyd), [Margus Lamp](https://github.com/mlamp), [Philippe D'Alva](https://github.com/TitaneBoy), [reduckted](https://github.com/reduckted), [teidesu](https://github.com/teidesu), [Bartosz Wojtkowiak](https://github.com/wojtkowiak), [Kyle Hensel](https://github.com/k-yle), and [Samuel Skeen](https://github.com/cwadrupldijjit).
diff --git a/node_modules/@types/ws/index.d.mts b/node_modules/@types/ws/index.d.mts
new file mode 100644
index 0000000000000000000000000000000000000000..8c5dffb560582aaebe7602c9110d4bdb89401097
--- /dev/null
+++ b/node_modules/@types/ws/index.d.mts
@@ -0,0 +1,451 @@
+///
+
+import { EventEmitter } from "events";
+import {
+ Agent,
+ ClientRequest,
+ ClientRequestArgs,
+ IncomingMessage,
+ OutgoingHttpHeaders,
+ Server as HTTPServer,
+} from "http";
+import { Server as HTTPSServer } from "https";
+import { createConnection } from "net";
+import { Duplex, DuplexOptions } from "stream";
+import { SecureContextOptions } from "tls";
+import { URL } from "url";
+import { ZlibOptions } from "zlib";
+
+// can not get all overload of BufferConstructor['from'], need to copy all it's first arguments here
+// https://github.com/microsoft/TypeScript/issues/32164
+type BufferLike =
+ | string
+ | Buffer
+ | DataView
+ | number
+ | ArrayBufferView
+ | Uint8Array
+ | ArrayBuffer
+ | SharedArrayBuffer
+ | Blob
+ | readonly any[]
+ | readonly number[]
+ | { valueOf(): ArrayBuffer }
+ | { valueOf(): SharedArrayBuffer }
+ | { valueOf(): Uint8Array }
+ | { valueOf(): readonly number[] }
+ | { valueOf(): string }
+ | { [Symbol.toPrimitive](hint: string): string };
+
+// WebSocket socket.
+declare class WebSocket extends EventEmitter {
+ /** The connection is not yet open. */
+ static readonly CONNECTING: 0;
+ /** The connection is open and ready to communicate. */
+ static readonly OPEN: 1;
+ /** The connection is in the process of closing. */
+ static readonly CLOSING: 2;
+ /** The connection is closed. */
+ static readonly CLOSED: 3;
+
+ binaryType: "nodebuffer" | "arraybuffer" | "fragments";
+ readonly bufferedAmount: number;
+ readonly extensions: string;
+ /** Indicates whether the websocket is paused */
+ readonly isPaused: boolean;
+ readonly protocol: string;
+ /** The current state of the connection */
+ readonly readyState:
+ | typeof WebSocket.CONNECTING
+ | typeof WebSocket.OPEN
+ | typeof WebSocket.CLOSING
+ | typeof WebSocket.CLOSED;
+ readonly url: string;
+
+ /** The connection is not yet open. */
+ readonly CONNECTING: 0;
+ /** The connection is open and ready to communicate. */
+ readonly OPEN: 1;
+ /** The connection is in the process of closing. */
+ readonly CLOSING: 2;
+ /** The connection is closed. */
+ readonly CLOSED: 3;
+
+ onopen: ((event: WebSocket.Event) => void) | null;
+ onerror: ((event: WebSocket.ErrorEvent) => void) | null;
+ onclose: ((event: WebSocket.CloseEvent) => void) | null;
+ onmessage: ((event: WebSocket.MessageEvent) => void) | null;
+
+ constructor(address: null);
+ constructor(address: string | URL, options?: WebSocket.ClientOptions | ClientRequestArgs);
+ constructor(
+ address: string | URL,
+ protocols?: string | string[],
+ options?: WebSocket.ClientOptions | ClientRequestArgs,
+ );
+
+ close(code?: number, data?: string | Buffer): void;
+ ping(data?: any, mask?: boolean, cb?: (err: Error) => void): void;
+ pong(data?: any, mask?: boolean, cb?: (err: Error) => void): void;
+ // https://github.com/websockets/ws/issues/2076#issuecomment-1250354722
+ send(data: BufferLike, cb?: (err?: Error) => void): void;
+ send(
+ data: BufferLike,
+ options: {
+ mask?: boolean | undefined;
+ binary?: boolean | undefined;
+ compress?: boolean | undefined;
+ fin?: boolean | undefined;
+ },
+ cb?: (err?: Error) => void,
+ ): void;
+ terminate(): void;
+
+ /**
+ * Pause the websocket causing it to stop emitting events. Some events can still be
+ * emitted after this is called, until all buffered data is consumed. This method
+ * is a noop if the ready state is `CONNECTING` or `CLOSED`.
+ */
+ pause(): void;
+ /**
+ * Make a paused socket resume emitting events. This method is a noop if the ready
+ * state is `CONNECTING` or `CLOSED`.
+ */
+ resume(): void;
+
+ // HTML5 WebSocket events
+ addEventListener(
+ type: K,
+ listener:
+ | ((event: WebSocket.WebSocketEventMap[K]) => void)
+ | { handleEvent(event: WebSocket.WebSocketEventMap[K]): void },
+ options?: WebSocket.EventListenerOptions,
+ ): void;
+ removeEventListener(
+ type: K,
+ listener:
+ | ((event: WebSocket.WebSocketEventMap[K]) => void)
+ | { handleEvent(event: WebSocket.WebSocketEventMap[K]): void },
+ ): void;
+
+ // Events
+ on(event: "close", listener: (this: WebSocket, code: number, reason: Buffer) => void): this;
+ on(event: "error", listener: (this: WebSocket, error: Error) => void): this;
+ on(event: "upgrade", listener: (this: WebSocket, request: IncomingMessage) => void): this;
+ on(event: "message", listener: (this: WebSocket, data: WebSocket.RawData, isBinary: boolean) => void): this;
+ on(event: "open", listener: (this: WebSocket) => void): this;
+ on(event: "ping" | "pong", listener: (this: WebSocket, data: Buffer) => void): this;
+ on(event: "redirect", listener: (this: WebSocket, url: string, request: ClientRequest) => void): this;
+ on(
+ event: "unexpected-response",
+ listener: (this: WebSocket, request: ClientRequest, response: IncomingMessage) => void,
+ ): this;
+ on(event: string | symbol, listener: (this: WebSocket, ...args: any[]) => void): this;
+
+ once(event: "close", listener: (this: WebSocket, code: number, reason: Buffer) => void): this;
+ once(event: "error", listener: (this: WebSocket, error: Error) => void): this;
+ once(event: "upgrade", listener: (this: WebSocket, request: IncomingMessage) => void): this;
+ once(event: "message", listener: (this: WebSocket, data: WebSocket.RawData, isBinary: boolean) => void): this;
+ once(event: "open", listener: (this: WebSocket) => void): this;
+ once(event: "ping" | "pong", listener: (this: WebSocket, data: Buffer) => void): this;
+ once(event: "redirect", listener: (this: WebSocket, url: string, request: ClientRequest) => void): this;
+ once(
+ event: "unexpected-response",
+ listener: (this: WebSocket, request: ClientRequest, response: IncomingMessage) => void,
+ ): this;
+ once(event: string | symbol, listener: (this: WebSocket, ...args: any[]) => void): this;
+
+ off(event: "close", listener: (this: WebSocket, code: number, reason: Buffer) => void): this;
+ off(event: "error", listener: (this: WebSocket, error: Error) => void): this;
+ off(event: "upgrade", listener: (this: WebSocket, request: IncomingMessage) => void): this;
+ off(event: "message", listener: (this: WebSocket, data: WebSocket.RawData, isBinary: boolean) => void): this;
+ off(event: "open", listener: (this: WebSocket) => void): this;
+ off(event: "ping" | "pong", listener: (this: WebSocket, data: Buffer) => void): this;
+ off(event: "redirect", listener: (this: WebSocket, url: string, request: ClientRequest) => void): this;
+ off(
+ event: "unexpected-response",
+ listener: (this: WebSocket, request: ClientRequest, response: IncomingMessage) => void,
+ ): this;
+ off(event: string | symbol, listener: (this: WebSocket, ...args: any[]) => void): this;
+
+ addListener(event: "close", listener: (code: number, reason: Buffer) => void): this;
+ addListener(event: "error", listener: (error: Error) => void): this;
+ addListener(event: "upgrade", listener: (request: IncomingMessage) => void): this;
+ addListener(event: "message", listener: (data: WebSocket.RawData, isBinary: boolean) => void): this;
+ addListener(event: "open", listener: () => void): this;
+ addListener(event: "ping" | "pong", listener: (data: Buffer) => void): this;
+ addListener(event: "redirect", listener: (url: string, request: ClientRequest) => void): this;
+ addListener(
+ event: "unexpected-response",
+ listener: (request: ClientRequest, response: IncomingMessage) => void,
+ ): this;
+ addListener(event: string | symbol, listener: (...args: any[]) => void): this;
+
+ removeListener(event: "close", listener: (code: number, reason: Buffer) => void): this;
+ removeListener(event: "error", listener: (error: Error) => void): this;
+ removeListener(event: "upgrade", listener: (request: IncomingMessage) => void): this;
+ removeListener(event: "message", listener: (data: WebSocket.RawData, isBinary: boolean) => void): this;
+ removeListener(event: "open", listener: () => void): this;
+ removeListener(event: "ping" | "pong", listener: (data: Buffer) => void): this;
+ removeListener(event: "redirect", listener: (url: string, request: ClientRequest) => void): this;
+ removeListener(
+ event: "unexpected-response",
+ listener: (request: ClientRequest, response: IncomingMessage) => void,
+ ): this;
+ removeListener(event: string | symbol, listener: (...args: any[]) => void): this;
+}
+
+declare namespace WebSocket {
+ /**
+ * Data represents the raw message payload received over the WebSocket.
+ */
+ type RawData = Buffer | ArrayBuffer | Buffer[];
+
+ /**
+ * Data represents the message payload received over the WebSocket.
+ */
+ type Data = string | Buffer | ArrayBuffer | Buffer[];
+
+ /**
+ * CertMeta represents the accepted types for certificate & key data.
+ */
+ type CertMeta = string | string[] | Buffer | Buffer[];
+
+ /**
+ * VerifyClientCallbackSync is a synchronous callback used to inspect the
+ * incoming message. The return value (boolean) of the function determines
+ * whether or not to accept the handshake.
+ */
+ type VerifyClientCallbackSync = (info: {
+ origin: string;
+ secure: boolean;
+ req: Request;
+ }) => boolean;
+
+ /**
+ * VerifyClientCallbackAsync is an asynchronous callback used to inspect the
+ * incoming message. The return value (boolean) of the function determines
+ * whether or not to accept the handshake.
+ */
+ type VerifyClientCallbackAsync = (
+ info: { origin: string; secure: boolean; req: Request },
+ callback: (res: boolean, code?: number, message?: string, headers?: OutgoingHttpHeaders) => void,
+ ) => void;
+
+ /**
+ * FinishRequestCallback is a callback for last minute customization of the
+ * headers. If finishRequest is set, then it has the responsibility to call
+ * request.end() once it is done setting request headers.
+ */
+ type FinishRequestCallback = (request: ClientRequest, websocket: WebSocket) => void;
+
+ interface ClientOptions extends SecureContextOptions {
+ protocol?: string | undefined;
+ followRedirects?: boolean | undefined;
+ generateMask?(mask: Buffer): void;
+ handshakeTimeout?: number | undefined;
+ maxRedirects?: number | undefined;
+ perMessageDeflate?: boolean | PerMessageDeflateOptions | undefined;
+ localAddress?: string | undefined;
+ protocolVersion?: number | undefined;
+ headers?: { [key: string]: string } | undefined;
+ origin?: string | undefined;
+ agent?: Agent | undefined;
+ host?: string | undefined;
+ family?: number | undefined;
+ checkServerIdentity?(servername: string, cert: CertMeta): boolean;
+ rejectUnauthorized?: boolean | undefined;
+ allowSynchronousEvents?: boolean | undefined;
+ autoPong?: boolean | undefined;
+ maxPayload?: number | undefined;
+ skipUTF8Validation?: boolean | undefined;
+ createConnection?: typeof createConnection | undefined;
+ finishRequest?: FinishRequestCallback | undefined;
+ }
+
+ interface PerMessageDeflateOptions {
+ serverNoContextTakeover?: boolean | undefined;
+ clientNoContextTakeover?: boolean | undefined;
+ serverMaxWindowBits?: number | undefined;
+ clientMaxWindowBits?: number | undefined;
+ zlibDeflateOptions?:
+ | {
+ flush?: number | undefined;
+ finishFlush?: number | undefined;
+ chunkSize?: number | undefined;
+ windowBits?: number | undefined;
+ level?: number | undefined;
+ memLevel?: number | undefined;
+ strategy?: number | undefined;
+ dictionary?: Buffer | Buffer[] | DataView | undefined;
+ info?: boolean | undefined;
+ }
+ | undefined;
+ zlibInflateOptions?: ZlibOptions | undefined;
+ threshold?: number | undefined;
+ concurrencyLimit?: number | undefined;
+ }
+
+ interface Event {
+ type: string;
+ target: WebSocket;
+ }
+
+ interface ErrorEvent {
+ error: any;
+ message: string;
+ type: string;
+ target: WebSocket;
+ }
+
+ interface CloseEvent {
+ wasClean: boolean;
+ code: number;
+ reason: string;
+ type: string;
+ target: WebSocket;
+ }
+
+ interface MessageEvent {
+ data: Data;
+ type: string;
+ target: WebSocket;
+ }
+
+ interface WebSocketEventMap {
+ open: Event;
+ error: ErrorEvent;
+ close: CloseEvent;
+ message: MessageEvent;
+ }
+
+ interface EventListenerOptions {
+ once?: boolean | undefined;
+ }
+
+ interface ServerOptions<
+ U extends typeof WebSocket = typeof WebSocket,
+ V extends typeof IncomingMessage = typeof IncomingMessage,
+ > {
+ host?: string | undefined;
+ port?: number | undefined;
+ backlog?: number | undefined;
+ server?: HTTPServer | HTTPSServer | undefined;
+ verifyClient?:
+ | VerifyClientCallbackAsync>
+ | VerifyClientCallbackSync>
+ | undefined;
+ handleProtocols?: (protocols: Set, request: InstanceType) => string | false;
+ path?: string | undefined;
+ noServer?: boolean | undefined;
+ allowSynchronousEvents?: boolean | undefined;
+ autoPong?: boolean | undefined;
+ clientTracking?: boolean | undefined;
+ perMessageDeflate?: boolean | PerMessageDeflateOptions | undefined;
+ maxPayload?: number | undefined;
+ skipUTF8Validation?: boolean | undefined;
+ WebSocket?: U | undefined;
+ }
+
+ interface AddressInfo {
+ address: string;
+ family: string;
+ port: number;
+ }
+}
+
+export import AddressInfo = WebSocket.AddressInfo;
+export import CertMeta = WebSocket.CertMeta;
+export import ClientOptions = WebSocket.ClientOptions;
+export import CloseEvent = WebSocket.CloseEvent;
+export import Data = WebSocket.Data;
+export import ErrorEvent = WebSocket.ErrorEvent;
+export import Event = WebSocket.Event;
+export import EventListenerOptions = WebSocket.EventListenerOptions;
+export import FinishRequestCallback = WebSocket.FinishRequestCallback;
+export import MessageEvent = WebSocket.MessageEvent;
+export import PerMessageDeflateOptions = WebSocket.PerMessageDeflateOptions;
+export import RawData = WebSocket.RawData;
+export import ServerOptions = WebSocket.ServerOptions;
+export import VerifyClientCallbackAsync = WebSocket.VerifyClientCallbackAsync;
+export import VerifyClientCallbackSync = WebSocket.VerifyClientCallbackSync;
+
+// WebSocket Server
+declare class Server<
+ T extends typeof WebSocket = typeof WebSocket,
+ U extends typeof IncomingMessage = typeof IncomingMessage,
+> extends EventEmitter {
+ options: WebSocket.ServerOptions;
+ path: string;
+ clients: Set>;
+
+ constructor(options?: WebSocket.ServerOptions, callback?: () => void);
+
+ address(): WebSocket.AddressInfo | string | null;
+ close(cb?: (err?: Error) => void): void;
+ handleUpgrade(
+ request: InstanceType,
+ socket: Duplex,
+ upgradeHead: Buffer,
+ callback: (client: InstanceType, request: InstanceType) => void,
+ ): void;
+ shouldHandle(request: InstanceType): boolean | Promise;
+
+ // Events
+ on(event: "connection", cb: (this: Server, websocket: InstanceType, request: InstanceType) => void): this;
+ on(event: "error", cb: (this: Server, error: Error) => void): this;
+ on(event: "headers", cb: (this: Server, headers: string[], request: InstanceType) => void): this;
+ on(event: "close" | "listening", cb: (this: Server) => void): this;
+ on(
+ event: "wsClientError",
+ cb: (this: Server, error: Error, socket: Duplex, request: InstanceType) => void,
+ ): this;
+ on(event: string | symbol, listener: (this: Server, ...args: any[]) => void): this;
+
+ once(
+ event: "connection",
+ cb: (this: Server, websocket: InstanceType, request: InstanceType) => void,
+ ): this;
+ once(event: "error", cb: (this: Server, error: Error) => void): this;
+ once(event: "headers", cb: (this: Server, headers: string[], request: InstanceType) => void): this;
+ once(event: "close" | "listening", cb: (this: Server) => void): this;
+ once(
+ event: "wsClientError",
+ cb: (this: Server, error: Error, socket: Duplex, request: InstanceType) => void,
+ ): this;
+ once(event: string | symbol, listener: (this: Server, ...args: any[]) => void): this;
+
+ off(event: "connection", cb: (this: Server, websocket: InstanceType, request: InstanceType) => void): this;
+ off(event: "error", cb: (this: Server, error: Error) => void): this;
+ off(event: "headers", cb: (this: Server, headers: string[], request: InstanceType) => void): this;
+ off(event: "close" | "listening", cb: (this: Server) => void): this;
+ off(
+ event: "wsClientError",
+ cb: (this: Server, error: Error, socket: Duplex, request: InstanceType) => void,
+ ): this;
+ off(event: string | symbol, listener: (this: Server, ...args: any[]) => void): this;
+
+ addListener(event: "connection", cb: (websocket: InstanceType, request: InstanceType) => void): this;
+ addListener(event: "error", cb: (error: Error) => void): this;
+ addListener(event: "headers", cb: (headers: string[], request: InstanceType) => void): this;
+ addListener(event: "close" | "listening", cb: () => void): this;
+ addListener(event: "wsClientError", cb: (error: Error, socket: Duplex, request: InstanceType) => void): this;
+ addListener(event: string | symbol, listener: (...args: any[]) => void): this;
+
+ removeListener(event: "connection", cb: (websocket: InstanceType, request: InstanceType) => void): this;
+ removeListener(event: "error", cb: (error: Error) => void): this;
+ removeListener(event: "headers", cb: (headers: string[], request: InstanceType) => void): this;
+ removeListener(event: "close" | "listening", cb: () => void): this;
+ removeListener(event: "wsClientError", cb: (error: Error, socket: Duplex, request: InstanceType) => void): this;
+ removeListener(event: string | symbol, listener: (...args: any[]) => void): this;
+}
+export { type Server };
+
+export const WebSocketServer: typeof Server;
+export interface WebSocketServer extends Server {} // eslint-disable-line @typescript-eslint/no-empty-interface
+
+// WebSocket stream
+export function createWebSocketStream(websocket: WebSocket, options?: DuplexOptions): Duplex;
+
+export default WebSocket;
+export { WebSocket };
diff --git a/node_modules/@types/ws/index.d.ts b/node_modules/@types/ws/index.d.ts
new file mode 100644
index 0000000000000000000000000000000000000000..6d08adc155873e948d2ffebf40622fe405159bc0
--- /dev/null
+++ b/node_modules/@types/ws/index.d.ts
@@ -0,0 +1,445 @@
+///
+
+import { EventEmitter } from "events";
+import {
+ Agent,
+ ClientRequest,
+ ClientRequestArgs,
+ IncomingMessage,
+ OutgoingHttpHeaders,
+ Server as HTTPServer,
+} from "http";
+import { Server as HTTPSServer } from "https";
+import { createConnection } from "net";
+import { Duplex, DuplexOptions } from "stream";
+import { SecureContextOptions } from "tls";
+import { URL } from "url";
+import { ZlibOptions } from "zlib";
+
+// can not get all overload of BufferConstructor['from'], need to copy all it's first arguments here
+// https://github.com/microsoft/TypeScript/issues/32164
+type BufferLike =
+ | string
+ | Buffer
+ | DataView
+ | number
+ | ArrayBufferView
+ | Uint8Array
+ | ArrayBuffer
+ | SharedArrayBuffer
+ | Blob
+ | readonly any[]
+ | readonly number[]
+ | { valueOf(): ArrayBuffer }
+ | { valueOf(): SharedArrayBuffer }
+ | { valueOf(): Uint8Array }
+ | { valueOf(): readonly number[] }
+ | { valueOf(): string }
+ | { [Symbol.toPrimitive](hint: string): string };
+
+// WebSocket socket.
+declare class WebSocket extends EventEmitter {
+ /** The connection is not yet open. */
+ static readonly CONNECTING: 0;
+ /** The connection is open and ready to communicate. */
+ static readonly OPEN: 1;
+ /** The connection is in the process of closing. */
+ static readonly CLOSING: 2;
+ /** The connection is closed. */
+ static readonly CLOSED: 3;
+
+ binaryType: "nodebuffer" | "arraybuffer" | "fragments";
+ readonly bufferedAmount: number;
+ readonly extensions: string;
+ /** Indicates whether the websocket is paused */
+ readonly isPaused: boolean;
+ readonly protocol: string;
+ /** The current state of the connection */
+ readonly readyState:
+ | typeof WebSocket.CONNECTING
+ | typeof WebSocket.OPEN
+ | typeof WebSocket.CLOSING
+ | typeof WebSocket.CLOSED;
+ readonly url: string;
+
+ /** The connection is not yet open. */
+ readonly CONNECTING: 0;
+ /** The connection is open and ready to communicate. */
+ readonly OPEN: 1;
+ /** The connection is in the process of closing. */
+ readonly CLOSING: 2;
+ /** The connection is closed. */
+ readonly CLOSED: 3;
+
+ onopen: ((event: WebSocket.Event) => void) | null;
+ onerror: ((event: WebSocket.ErrorEvent) => void) | null;
+ onclose: ((event: WebSocket.CloseEvent) => void) | null;
+ onmessage: ((event: WebSocket.MessageEvent) => void) | null;
+
+ constructor(address: null);
+ constructor(address: string | URL, options?: WebSocket.ClientOptions | ClientRequestArgs);
+ constructor(
+ address: string | URL,
+ protocols?: string | string[],
+ options?: WebSocket.ClientOptions | ClientRequestArgs,
+ );
+
+ close(code?: number, data?: string | Buffer): void;
+ ping(data?: any, mask?: boolean, cb?: (err: Error) => void): void;
+ pong(data?: any, mask?: boolean, cb?: (err: Error) => void): void;
+ // https://github.com/websockets/ws/issues/2076#issuecomment-1250354722
+ send(data: BufferLike, cb?: (err?: Error) => void): void;
+ send(
+ data: BufferLike,
+ options: {
+ mask?: boolean | undefined;
+ binary?: boolean | undefined;
+ compress?: boolean | undefined;
+ fin?: boolean | undefined;
+ },
+ cb?: (err?: Error) => void,
+ ): void;
+ terminate(): void;
+
+ /**
+ * Pause the websocket causing it to stop emitting events. Some events can still be
+ * emitted after this is called, until all buffered data is consumed. This method
+ * is a noop if the ready state is `CONNECTING` or `CLOSED`.
+ */
+ pause(): void;
+ /**
+ * Make a paused socket resume emitting events. This method is a noop if the ready
+ * state is `CONNECTING` or `CLOSED`.
+ */
+ resume(): void;
+
+ // HTML5 WebSocket events
+ addEventListener(
+ type: K,
+ listener:
+ | ((event: WebSocket.WebSocketEventMap[K]) => void)
+ | { handleEvent(event: WebSocket.WebSocketEventMap[K]): void },
+ options?: WebSocket.EventListenerOptions,
+ ): void;
+ removeEventListener(
+ type: K,
+ listener:
+ | ((event: WebSocket.WebSocketEventMap[K]) => void)
+ | { handleEvent(event: WebSocket.WebSocketEventMap[K]): void },
+ ): void;
+
+ // Events
+ on(event: "close", listener: (this: WebSocket, code: number, reason: Buffer) => void): this;
+ on(event: "error", listener: (this: WebSocket, error: Error) => void): this;
+ on(event: "upgrade", listener: (this: WebSocket, request: IncomingMessage) => void): this;
+ on(event: "message", listener: (this: WebSocket, data: WebSocket.RawData, isBinary: boolean) => void): this;
+ on(event: "open", listener: (this: WebSocket) => void): this;
+ on(event: "ping" | "pong", listener: (this: WebSocket, data: Buffer) => void): this;
+ on(event: "redirect", listener: (this: WebSocket, url: string, request: ClientRequest) => void): this;
+ on(
+ event: "unexpected-response",
+ listener: (this: WebSocket, request: ClientRequest, response: IncomingMessage) => void,
+ ): this;
+ on(event: string | symbol, listener: (this: WebSocket, ...args: any[]) => void): this;
+
+ once(event: "close", listener: (this: WebSocket, code: number, reason: Buffer) => void): this;
+ once(event: "error", listener: (this: WebSocket, error: Error) => void): this;
+ once(event: "upgrade", listener: (this: WebSocket, request: IncomingMessage) => void): this;
+ once(event: "message", listener: (this: WebSocket, data: WebSocket.RawData, isBinary: boolean) => void): this;
+ once(event: "open", listener: (this: WebSocket) => void): this;
+ once(event: "ping" | "pong", listener: (this: WebSocket, data: Buffer) => void): this;
+ once(event: "redirect", listener: (this: WebSocket, url: string, request: ClientRequest) => void): this;
+ once(
+ event: "unexpected-response",
+ listener: (this: WebSocket, request: ClientRequest, response: IncomingMessage) => void,
+ ): this;
+ once(event: string | symbol, listener: (this: WebSocket, ...args: any[]) => void): this;
+
+ off(event: "close", listener: (this: WebSocket, code: number, reason: Buffer) => void): this;
+ off(event: "error", listener: (this: WebSocket, error: Error) => void): this;
+ off(event: "upgrade", listener: (this: WebSocket, request: IncomingMessage) => void): this;
+ off(event: "message", listener: (this: WebSocket, data: WebSocket.RawData, isBinary: boolean) => void): this;
+ off(event: "open", listener: (this: WebSocket) => void): this;
+ off(event: "ping" | "pong", listener: (this: WebSocket, data: Buffer) => void): this;
+ off(event: "redirect", listener: (this: WebSocket, url: string, request: ClientRequest) => void): this;
+ off(
+ event: "unexpected-response",
+ listener: (this: WebSocket, request: ClientRequest, response: IncomingMessage) => void,
+ ): this;
+ off(event: string | symbol, listener: (this: WebSocket, ...args: any[]) => void): this;
+
+ addListener(event: "close", listener: (code: number, reason: Buffer) => void): this;
+ addListener(event: "error", listener: (error: Error) => void): this;
+ addListener(event: "upgrade", listener: (request: IncomingMessage) => void): this;
+ addListener(event: "message", listener: (data: WebSocket.RawData, isBinary: boolean) => void): this;
+ addListener(event: "open", listener: () => void): this;
+ addListener(event: "ping" | "pong", listener: (data: Buffer) => void): this;
+ addListener(event: "redirect", listener: (url: string, request: ClientRequest) => void): this;
+ addListener(
+ event: "unexpected-response",
+ listener: (request: ClientRequest, response: IncomingMessage) => void,
+ ): this;
+ addListener(event: string | symbol, listener: (...args: any[]) => void): this;
+
+ removeListener(event: "close", listener: (code: number, reason: Buffer) => void): this;
+ removeListener(event: "error", listener: (error: Error) => void): this;
+ removeListener(event: "upgrade", listener: (request: IncomingMessage) => void): this;
+ removeListener(event: "message", listener: (data: WebSocket.RawData, isBinary: boolean) => void): this;
+ removeListener(event: "open", listener: () => void): this;
+ removeListener(event: "ping" | "pong", listener: (data: Buffer) => void): this;
+ removeListener(event: "redirect", listener: (url: string, request: ClientRequest) => void): this;
+ removeListener(
+ event: "unexpected-response",
+ listener: (request: ClientRequest, response: IncomingMessage) => void,
+ ): this;
+ removeListener(event: string | symbol, listener: (...args: any[]) => void): this;
+}
+
+declare const WebSocketAlias: typeof WebSocket;
+interface WebSocketAlias extends WebSocket {} // eslint-disable-line @typescript-eslint/no-empty-interface
+
+declare namespace WebSocket {
+ /**
+ * Data represents the raw message payload received over the WebSocket.
+ */
+ type RawData = Buffer | ArrayBuffer | Buffer[];
+
+ /**
+ * Data represents the message payload received over the WebSocket.
+ */
+ type Data = string | Buffer | ArrayBuffer | Buffer[];
+
+ /**
+ * CertMeta represents the accepted types for certificate & key data.
+ */
+ type CertMeta = string | string[] | Buffer | Buffer[];
+
+ /**
+ * VerifyClientCallbackSync is a synchronous callback used to inspect the
+ * incoming message. The return value (boolean) of the function determines
+ * whether or not to accept the handshake.
+ */
+ type VerifyClientCallbackSync = (info: {
+ origin: string;
+ secure: boolean;
+ req: Request;
+ }) => boolean;
+
+ /**
+ * VerifyClientCallbackAsync is an asynchronous callback used to inspect the
+ * incoming message. The return value (boolean) of the function determines
+ * whether or not to accept the handshake.
+ */
+ type VerifyClientCallbackAsync = (
+ info: { origin: string; secure: boolean; req: Request },
+ callback: (res: boolean, code?: number, message?: string, headers?: OutgoingHttpHeaders) => void,
+ ) => void;
+
+ /**
+ * FinishRequestCallback is a callback for last minute customization of the
+ * headers. If finishRequest is set, then it has the responsibility to call
+ * request.end() once it is done setting request headers.
+ */
+ type FinishRequestCallback = (request: ClientRequest, websocket: WebSocket) => void;
+
+ interface ClientOptions extends SecureContextOptions {
+ protocol?: string | undefined;
+ followRedirects?: boolean | undefined;
+ generateMask?(mask: Buffer): void;
+ handshakeTimeout?: number | undefined;
+ maxRedirects?: number | undefined;
+ perMessageDeflate?: boolean | PerMessageDeflateOptions | undefined;
+ localAddress?: string | undefined;
+ protocolVersion?: number | undefined;
+ headers?: { [key: string]: string } | undefined;
+ origin?: string | undefined;
+ agent?: Agent | undefined;
+ host?: string | undefined;
+ family?: number | undefined;
+ checkServerIdentity?(servername: string, cert: CertMeta): boolean;
+ rejectUnauthorized?: boolean | undefined;
+ allowSynchronousEvents?: boolean | undefined;
+ autoPong?: boolean | undefined;
+ maxPayload?: number | undefined;
+ skipUTF8Validation?: boolean | undefined;
+ createConnection?: typeof createConnection | undefined;
+ finishRequest?: FinishRequestCallback | undefined;
+ }
+
+ interface PerMessageDeflateOptions {
+ serverNoContextTakeover?: boolean | undefined;
+ clientNoContextTakeover?: boolean | undefined;
+ serverMaxWindowBits?: number | undefined;
+ clientMaxWindowBits?: number | undefined;
+ zlibDeflateOptions?: {
+ flush?: number | undefined;
+ finishFlush?: number | undefined;
+ chunkSize?: number | undefined;
+ windowBits?: number | undefined;
+ level?: number | undefined;
+ memLevel?: number | undefined;
+ strategy?: number | undefined;
+ dictionary?: Buffer | Buffer[] | DataView | undefined;
+ info?: boolean | undefined;
+ } | undefined;
+ zlibInflateOptions?: ZlibOptions | undefined;
+ threshold?: number | undefined;
+ concurrencyLimit?: number | undefined;
+ }
+
+ interface Event {
+ type: string;
+ target: WebSocket;
+ }
+
+ interface ErrorEvent {
+ error: any;
+ message: string;
+ type: string;
+ target: WebSocket;
+ }
+
+ interface CloseEvent {
+ wasClean: boolean;
+ code: number;
+ reason: string;
+ type: string;
+ target: WebSocket;
+ }
+
+ interface MessageEvent {
+ data: Data;
+ type: string;
+ target: WebSocket;
+ }
+
+ interface WebSocketEventMap {
+ open: Event;
+ error: ErrorEvent;
+ close: CloseEvent;
+ message: MessageEvent;
+ }
+
+ interface EventListenerOptions {
+ once?: boolean | undefined;
+ }
+
+ interface ServerOptions<
+ U extends typeof WebSocket.WebSocket = typeof WebSocket.WebSocket,
+ V extends typeof IncomingMessage = typeof IncomingMessage,
+ > {
+ host?: string | undefined;
+ port?: number | undefined;
+ backlog?: number | undefined;
+ server?: HTTPServer | HTTPSServer | undefined;
+ verifyClient?:
+ | VerifyClientCallbackAsync>
+ | VerifyClientCallbackSync>
+ | undefined;
+ handleProtocols?: (protocols: Set, request: InstanceType) => string | false;
+ path?: string | undefined;
+ noServer?: boolean | undefined;
+ allowSynchronousEvents?: boolean | undefined;
+ autoPong?: boolean | undefined;
+ clientTracking?: boolean | undefined;
+ perMessageDeflate?: boolean | PerMessageDeflateOptions | undefined;
+ maxPayload?: number | undefined;
+ skipUTF8Validation?: boolean | undefined;
+ WebSocket?: U | undefined;
+ }
+
+ interface AddressInfo {
+ address: string;
+ family: string;
+ port: number;
+ }
+
+ // WebSocket Server
+ class Server<
+ T extends typeof WebSocket.WebSocket = typeof WebSocket.WebSocket,
+ U extends typeof IncomingMessage = typeof IncomingMessage,
+ > extends EventEmitter {
+ options: ServerOptions;
+ path: string;
+ clients: Set>;
+
+ constructor(options?: ServerOptions, callback?: () => void);
+
+ address(): AddressInfo | string | null;
+ close(cb?: (err?: Error) => void): void;
+ handleUpgrade(
+ request: InstanceType,
+ socket: Duplex,
+ upgradeHead: Buffer,
+ callback: (client: InstanceType, request: InstanceType) => void,
+ ): void;
+ shouldHandle(request: InstanceType): boolean | Promise;
+
+ // Events
+ on(
+ event: "connection",
+ cb: (this: Server, websocket: InstanceType, request: InstanceType) => void,
+ ): this;
+ on(event: "error", cb: (this: Server, error: Error) => void): this;
+ on(event: "headers", cb: (this: Server, headers: string[], request: InstanceType) => void): this;
+ on(event: "close" | "listening", cb: (this: Server) => void): this;
+ on(
+ event: "wsClientError",
+ cb: (this: Server, error: Error, socket: Duplex, request: InstanceType) => void,
+ ): this;
+ on(event: string | symbol, listener: (this: Server, ...args: any[]) => void): this;
+
+ once(
+ event: "connection",
+ cb: (this: Server, websocket: InstanceType, request: InstanceType) => void,
+ ): this;
+ once(event: "error", cb: (this: Server, error: Error) => void): this;
+ once(event: "headers", cb: (this: Server, headers: string[], request: InstanceType) => void): this;
+ once(event: "close" | "listening", cb: (this: Server) => void): this;
+ once(
+ event: "wsClientError",
+ cb: (this: Server, error: Error, socket: Duplex, request: InstanceType) => void,
+ ): this;
+ once(event: string | symbol, listener: (this: Server, ...args: any[]) => void): this;
+
+ off(
+ event: "connection",
+ cb: (this: Server, socket: InstanceType, request: InstanceType) => void,
+ ): this;
+ off(event: "error", cb: (this: Server, error: Error) => void): this;
+ off(event: "headers", cb: (this: Server, headers: string[], request: InstanceType) => void): this;
+ off(event: "close" | "listening", cb: (this: Server) => void): this;
+ off(
+ event: "wsClientError",
+ cb: (this: Server, error: Error, socket: Duplex, request: InstanceType) => void,
+ ): this;
+ off(event: string | symbol, listener: (this: Server, ...args: any[]) => void): this;
+
+ addListener(event: "connection", cb: (websocket: InstanceType, request: InstanceType) => void): this;
+ addListener(event: "error", cb: (error: Error) => void): this;
+ addListener(event: "headers", cb: (headers: string[], request: InstanceType) => void): this;
+ addListener(event: "close" | "listening", cb: () => void): this;
+ addListener(event: "wsClientError", cb: (error: Error, socket: Duplex, request: InstanceType) => void): this;
+ addListener(event: string | symbol, listener: (...args: any[]) => void): this;
+
+ removeListener(event: "connection", cb: (websocket: InstanceType, request: InstanceType) => void): this;
+ removeListener(event: "error", cb: (error: Error) => void): this;
+ removeListener(event: "headers", cb: (headers: string[], request: InstanceType) => void): this;
+ removeListener(event: "close" | "listening", cb: () => void): this;
+ removeListener(
+ event: "wsClientError",
+ cb: (error: Error, socket: Duplex, request: InstanceType) => void,
+ ): this;
+ removeListener(event: string | symbol, listener: (...args: any[]) => void): this;
+ }
+
+ const WebSocketServer: typeof Server;
+ interface WebSocketServer extends Server {} // eslint-disable-line @typescript-eslint/no-empty-interface
+ const WebSocket: typeof WebSocketAlias;
+ interface WebSocket extends WebSocketAlias {} // eslint-disable-line @typescript-eslint/no-empty-interface
+
+ // WebSocket stream
+ function createWebSocketStream(websocket: WebSocket, options?: DuplexOptions): Duplex;
+}
+
+export = WebSocket;
diff --git a/node_modules/@types/ws/package.json b/node_modules/@types/ws/package.json
new file mode 100644
index 0000000000000000000000000000000000000000..030a47f399f57a9c47278f1c75493e1820437d6f
--- /dev/null
+++ b/node_modules/@types/ws/package.json
@@ -0,0 +1,72 @@
+{
+ "name": "@types/ws",
+ "version": "8.18.1",
+ "description": "TypeScript definitions for ws",
+ "homepage": "https://github.com/DefinitelyTyped/DefinitelyTyped/tree/master/types/ws",
+ "license": "MIT",
+ "contributors": [
+ {
+ "name": "Paul Loyd",
+ "githubUsername": "loyd",
+ "url": "https://github.com/loyd"
+ },
+ {
+ "name": "Margus Lamp",
+ "githubUsername": "mlamp",
+ "url": "https://github.com/mlamp"
+ },
+ {
+ "name": "Philippe D'Alva",
+ "githubUsername": "TitaneBoy",
+ "url": "https://github.com/TitaneBoy"
+ },
+ {
+ "name": "reduckted",
+ "githubUsername": "reduckted",
+ "url": "https://github.com/reduckted"
+ },
+ {
+ "name": "teidesu",
+ "githubUsername": "teidesu",
+ "url": "https://github.com/teidesu"
+ },
+ {
+ "name": "Bartosz Wojtkowiak",
+ "githubUsername": "wojtkowiak",
+ "url": "https://github.com/wojtkowiak"
+ },
+ {
+ "name": "Kyle Hensel",
+ "githubUsername": "k-yle",
+ "url": "https://github.com/k-yle"
+ },
+ {
+ "name": "Samuel Skeen",
+ "githubUsername": "cwadrupldijjit",
+ "url": "https://github.com/cwadrupldijjit"
+ }
+ ],
+ "main": "",
+ "types": "index.d.ts",
+ "exports": {
+ ".": {
+ "types": {
+ "import": "./index.d.mts",
+ "default": "./index.d.ts"
+ }
+ },
+ "./package.json": "./package.json"
+ },
+ "repository": {
+ "type": "git",
+ "url": "https://github.com/DefinitelyTyped/DefinitelyTyped.git",
+ "directory": "types/ws"
+ },
+ "scripts": {},
+ "dependencies": {
+ "@types/node": "*"
+ },
+ "peerDependencies": {},
+ "typesPublisherContentHash": "043c83a4bb92503ab01243879ee715fb6db391090d10883c5a2eb72099d22724",
+ "typeScriptVersion": "5.1"
+}
\ No newline at end of file
diff --git a/node_modules/@typescript-eslint/eslint-plugin/LICENSE b/node_modules/@typescript-eslint/eslint-plugin/LICENSE
new file mode 100644
index 0000000000000000000000000000000000000000..a1164108d4d6037cb976384c16e5493917d87157
--- /dev/null
+++ b/node_modules/@typescript-eslint/eslint-plugin/LICENSE
@@ -0,0 +1,21 @@
+MIT License
+
+Copyright (c) 2019 typescript-eslint and other contributors
+
+Permission is hereby granted, free of charge, to any person obtaining a copy
+of this software and associated documentation files (the "Software"), to deal
+in the Software without restriction, including without limitation the rights
+to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
+copies of the Software, and to permit persons to whom the Software is
+furnished to do so, subject to the following conditions:
+
+The above copyright notice and this permission notice shall be included in all
+copies or substantial portions of the Software.
+
+THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
+AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
+LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
+OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
+SOFTWARE.
diff --git a/node_modules/@typescript-eslint/eslint-plugin/README.md b/node_modules/@typescript-eslint/eslint-plugin/README.md
new file mode 100644
index 0000000000000000000000000000000000000000..3f894c883444b85166f4b0dd627b241aa8301160
--- /dev/null
+++ b/node_modules/@typescript-eslint/eslint-plugin/README.md
@@ -0,0 +1,12 @@
+# `@typescript-eslint/eslint-plugin`
+
+An ESLint plugin which provides lint rules for TypeScript codebases.
+
+[](https://www.npmjs.com/package/@typescript-eslint/eslint-plugin)
+[](https://www.npmjs.com/package/@typescript-eslint/eslint-plugin)
+
+👉 See **https://typescript-eslint.io/getting-started** for our Getting Started docs.
+
+> See https://typescript-eslint.io for general documentation on typescript-eslint, the tooling that allows you to run ESLint and Prettier on TypeScript code.
+
+
diff --git a/node_modules/@typescript-eslint/eslint-plugin/index.d.ts b/node_modules/@typescript-eslint/eslint-plugin/index.d.ts
new file mode 100644
index 0000000000000000000000000000000000000000..756a025eb97d7d2819e3688bb16f5118432f7921
--- /dev/null
+++ b/node_modules/@typescript-eslint/eslint-plugin/index.d.ts
@@ -0,0 +1,13 @@
+import type {
+ ClassicConfig,
+ FlatConfig,
+} from '@typescript-eslint/utils/ts-eslint';
+
+import type rules from './rules';
+
+declare const cjsExport: {
+ configs: Record;
+ meta: FlatConfig.PluginMeta;
+ rules: typeof rules;
+};
+export = cjsExport;
diff --git a/node_modules/@typescript-eslint/eslint-plugin/package.json b/node_modules/@typescript-eslint/eslint-plugin/package.json
new file mode 100644
index 0000000000000000000000000000000000000000..075b530c7e099419ab73d0199708b84e25b94f95
--- /dev/null
+++ b/node_modules/@typescript-eslint/eslint-plugin/package.json
@@ -0,0 +1,126 @@
+{
+ "name": "@typescript-eslint/eslint-plugin",
+ "version": "8.61.1",
+ "description": "TypeScript plugin for ESLint",
+ "files": [
+ "dist",
+ "!**/*.tsbuildinfo",
+ "index.d.ts",
+ "raw-plugin.d.ts",
+ "rules.d.ts",
+ "package.json",
+ "./README.md",
+ "LICENSE"
+ ],
+ "type": "commonjs",
+ "exports": {
+ ".": {
+ "types": "./index.d.ts",
+ "default": "./dist/index.js"
+ },
+ "./package.json": "./package.json",
+ "./use-at-your-own-risk/rules": {
+ "types": "./rules.d.ts",
+ "default": "./dist/rules/index.js"
+ },
+ "./use-at-your-own-risk/raw-plugin": {
+ "types": "./raw-plugin.d.ts",
+ "default": "./dist/raw-plugin.js"
+ }
+ },
+ "engines": {
+ "node": "^18.18.0 || ^20.9.0 || >=21.1.0"
+ },
+ "repository": {
+ "type": "git",
+ "url": "https://github.com/typescript-eslint/typescript-eslint.git",
+ "directory": "packages/eslint-plugin"
+ },
+ "bugs": {
+ "url": "https://github.com/typescript-eslint/typescript-eslint/issues"
+ },
+ "homepage": "https://typescript-eslint.io/packages/eslint-plugin",
+ "license": "MIT",
+ "keywords": [
+ "eslint",
+ "eslintplugin",
+ "eslint-plugin",
+ "typescript"
+ ],
+ "dependencies": {
+ "@eslint-community/regexpp": "^4.12.2",
+ "ignore": "^7.0.5",
+ "natural-compare": "^1.4.0",
+ "ts-api-utils": "^2.5.0",
+ "@typescript-eslint/scope-manager": "8.61.1",
+ "@typescript-eslint/type-utils": "8.61.1",
+ "@typescript-eslint/utils": "8.61.1",
+ "@typescript-eslint/visitor-keys": "8.61.1"
+ },
+ "devDependencies": {
+ "@types/json-schema": "^7.0.15",
+ "@types/mdast": "^4.0.4",
+ "@types/natural-compare": "^1.4.3",
+ "@types/react": "^18.3.21",
+ "@typescript/native-preview": "7.0.0-dev.20260518.1",
+ "@vitest/coverage-v8": "^4.0.18",
+ "ajv": "^6.12.6",
+ "eslint": "^10.0.0",
+ "json-schema": "^0.4.0",
+ "markdown-table": "^3.0.4",
+ "marked": "^15.0.12",
+ "mdast-util-from-markdown": "^2.0.2",
+ "mdast-util-mdx": "^3.0.0",
+ "micromark-extension-mdxjs": "^3.0.0",
+ "prettier": "3.8.0",
+ "rimraf": "^5.0.10",
+ "title-case": "^4.3.2",
+ "tsx": "^4.7.2",
+ "typescript": ">=4.8.4 <6.1.0",
+ "unist-util-visit": "^5.0.0",
+ "vitest": "^4.0.18",
+ "@typescript-eslint/rule-tester": "8.61.1",
+ "@typescript-eslint/rule-schema-to-typescript-types": "8.61.1"
+ },
+ "peerDependencies": {
+ "eslint": "^8.57.0 || ^9.0.0 || ^10.0.0",
+ "typescript": ">=4.8.4 <6.1.0",
+ "@typescript-eslint/parser": "^8.61.1"
+ },
+ "funding": {
+ "type": "opencollective",
+ "url": "https://opencollective.com/typescript-eslint"
+ },
+ "nx": {
+ "name": "eslint-plugin",
+ "includedScripts": [
+ "clean"
+ ],
+ "targets": {
+ "generate-breaking-changes": {
+ "command": "tsx tools/generate-breaking-changes.mts",
+ "options": {
+ "cwd": "{projectRoot}"
+ },
+ "dependsOn": [
+ "type-utils:build"
+ ]
+ },
+ "lint": {
+ "command": "eslint"
+ },
+ "typecheck:tsgo": {}
+ }
+ },
+ "scripts": {
+ "build": "pnpm -w exec nx build",
+ "clean": "rimraf dist/ coverage/",
+ "format": "pnpm -w run format",
+ "generate-breaking-changes": "tsx tools/generate-breaking-changes.mts",
+ "generate-configs": "pnpm -w run generate-configs",
+ "lint": "pnpm -w exec nx lint",
+ "test": "pnpm -w exec nx test",
+ "typecheck": "pnpm -w exec nx typecheck",
+ "typecheck:tsgo": "pnpm -w exec nx typecheck:tsgo"
+ }
+}
\ No newline at end of file
diff --git a/node_modules/@typescript-eslint/eslint-plugin/raw-plugin.d.ts b/node_modules/@typescript-eslint/eslint-plugin/raw-plugin.d.ts
new file mode 100644
index 0000000000000000000000000000000000000000..25a093aba9023301f6597aef604abce93c085400
--- /dev/null
+++ b/node_modules/@typescript-eslint/eslint-plugin/raw-plugin.d.ts
@@ -0,0 +1,25 @@
+import type { FlatConfig } from '@typescript-eslint/utils/ts-eslint';
+
+import type plugin from './index';
+
+declare const cjsExport: {
+ flatConfigs: {
+ 'flat/all': FlatConfig.ConfigArray;
+ 'flat/base': FlatConfig.Config;
+ 'flat/disable-type-checked': FlatConfig.Config;
+ 'flat/eslint-recommended': FlatConfig.Config;
+ 'flat/recommended': FlatConfig.ConfigArray;
+ 'flat/recommended-type-checked': FlatConfig.ConfigArray;
+ 'flat/recommended-type-checked-only': FlatConfig.ConfigArray;
+ 'flat/strict': FlatConfig.ConfigArray;
+ 'flat/strict-type-checked': FlatConfig.ConfigArray;
+ 'flat/strict-type-checked-only': FlatConfig.ConfigArray;
+ 'flat/stylistic': FlatConfig.ConfigArray;
+ 'flat/stylistic-type-checked': FlatConfig.ConfigArray;
+ 'flat/stylistic-type-checked-only': FlatConfig.ConfigArray;
+ };
+ parser: FlatConfig.Parser;
+ plugin: typeof plugin;
+};
+
+export = cjsExport;
diff --git a/node_modules/@typescript-eslint/eslint-plugin/rules.d.ts b/node_modules/@typescript-eslint/eslint-plugin/rules.d.ts
new file mode 100644
index 0000000000000000000000000000000000000000..db19c5d6959145481eba9866db6d665c624bb0e1
--- /dev/null
+++ b/node_modules/@typescript-eslint/eslint-plugin/rules.d.ts
@@ -0,0 +1,87 @@
+/*
+We purposely don't generate types for our plugin because TL;DR:
+1) there's no real reason that anyone should do a typed import of our rules,
+2) it would require us to change our code so there aren't as many inferred types
+
+This type declaration exists as a hacky way to add a type to the export for our
+internal packages that require it.
+
+*** Long reason ***
+
+When you turn on declaration files, TS requires all types to be "fully resolvable"
+without changes to the code.
+All of our lint rules `export default createRule(...)`, which means they all
+implicitly reference the `TSESLint.Rule` type for the export.
+
+TS wants to transpile each rule file to this `.d.ts` file:
+
+```ts
+import type { TSESLint } from '@typescript-eslint/utils';
+declare const _default: TSESLint.RuleModule;
+export default _default;
+```
+
+Because we don't import `TSESLint` in most files, it means that TS would have to
+insert a new import during the declaration emit to make this work.
+However TS wants to avoid adding new imports to the file because a new module
+could have type side-effects (like global augmentation) which could cause weird
+type side-effects in the decl file that wouldn't exist in source TS file.
+
+So TS errors on most of our rules with the following error:
+```
+The inferred type of 'default' cannot be named without a reference to
+'../../../../node_modules/@typescript-eslint/utils/src/ts-eslint/Rule'.
+This is likely not portable. A type annotation is necessary. ts(2742)
+```
+*/
+/* eslint-disable no-restricted-syntax */
+
+import type {
+ RuleModuleWithMetaDocs,
+ RuleRecommendation,
+ RuleRecommendationAcrossConfigs,
+} from '@typescript-eslint/utils/ts-eslint';
+
+interface ESLintPluginDocs {
+ /**
+ * Does the rule extend (or is it based off of) an ESLint code rule?
+ * Alternately accepts the name of the base rule, in case the rule has been renamed.
+ * This is only used for documentation purposes.
+ */
+ extendsBaseRule?: boolean | string;
+
+ /**
+ * If a string config name, which starting config this rule is enabled in.
+ * If an object, which settings it has enabled in each of those configs.
+ */
+ recommended?: RuleRecommendation | RuleRecommendationAcrossConfigs;
+
+ /**
+ * Does the rule require us to create a full TypeScript Program in order for it
+ * to type-check code. This is only used for documentation purposes.
+ */
+ requiresTypeChecking?: boolean;
+}
+
+type ESLintPluginRuleModule = RuleModuleWithMetaDocs<
+ string,
+ readonly unknown[],
+ ESLintPluginDocs
+>;
+
+type TypeScriptESLintRules = Record<
+ string,
+ RuleModuleWithMetaDocs
+>;
+
+declare const rules: TypeScriptESLintRules;
+
+declare namespace rules {
+ export type {
+ ESLintPluginDocs,
+ ESLintPluginRuleModule,
+ TypeScriptESLintRules,
+ };
+}
+
+export = rules;
diff --git a/node_modules/@typescript-eslint/parser/LICENSE b/node_modules/@typescript-eslint/parser/LICENSE
new file mode 100644
index 0000000000000000000000000000000000000000..a1164108d4d6037cb976384c16e5493917d87157
--- /dev/null
+++ b/node_modules/@typescript-eslint/parser/LICENSE
@@ -0,0 +1,21 @@
+MIT License
+
+Copyright (c) 2019 typescript-eslint and other contributors
+
+Permission is hereby granted, free of charge, to any person obtaining a copy
+of this software and associated documentation files (the "Software"), to deal
+in the Software without restriction, including without limitation the rights
+to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
+copies of the Software, and to permit persons to whom the Software is
+furnished to do so, subject to the following conditions:
+
+The above copyright notice and this permission notice shall be included in all
+copies or substantial portions of the Software.
+
+THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
+AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
+LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
+OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
+SOFTWARE.
diff --git a/node_modules/@typescript-eslint/parser/README.md b/node_modules/@typescript-eslint/parser/README.md
new file mode 100644
index 0000000000000000000000000000000000000000..56ee655a56b09c65599bfc06b5d711a65a3c2858
--- /dev/null
+++ b/node_modules/@typescript-eslint/parser/README.md
@@ -0,0 +1,12 @@
+# `@typescript-eslint/parser`
+
+> An ESLint parser which leverages TypeScript ESTree to allow for ESLint to lint TypeScript source code.
+
+[](https://www.npmjs.com/package/@typescript-eslint/parser)
+[](https://www.npmjs.com/package/@typescript-eslint/parser)
+
+👉 See **https://typescript-eslint.io/packages/parser** for documentation on this package.
+
+> See https://typescript-eslint.io for general documentation on typescript-eslint, the tooling that allows you to run ESLint and Prettier on TypeScript code.
+
+
diff --git a/node_modules/@typescript-eslint/parser/package.json b/node_modules/@typescript-eslint/parser/package.json
new file mode 100644
index 0000000000000000000000000000000000000000..34beb91ffeb7740f6376545939cc3584b2ea5867
--- /dev/null
+++ b/node_modules/@typescript-eslint/parser/package.json
@@ -0,0 +1,86 @@
+{
+ "name": "@typescript-eslint/parser",
+ "version": "8.61.1",
+ "description": "An ESLint custom parser which leverages TypeScript ESTree",
+ "files": [
+ "dist",
+ "!**/*.tsbuildinfo",
+ "README.md",
+ "LICENSE"
+ ],
+ "type": "commonjs",
+ "exports": {
+ ".": {
+ "types": "./dist/index.d.ts",
+ "default": "./dist/index.js"
+ },
+ "./package.json": "./package.json"
+ },
+ "engines": {
+ "node": "^18.18.0 || ^20.9.0 || >=21.1.0"
+ },
+ "repository": {
+ "type": "git",
+ "url": "https://github.com/typescript-eslint/typescript-eslint.git",
+ "directory": "packages/parser"
+ },
+ "bugs": {
+ "url": "https://github.com/typescript-eslint/typescript-eslint/issues"
+ },
+ "homepage": "https://typescript-eslint.io/packages/parser",
+ "license": "MIT",
+ "keywords": [
+ "ast",
+ "ecmascript",
+ "javascript",
+ "typescript",
+ "parser",
+ "syntax",
+ "eslint"
+ ],
+ "peerDependencies": {
+ "eslint": "^8.57.0 || ^9.0.0 || ^10.0.0",
+ "typescript": ">=4.8.4 <6.1.0"
+ },
+ "dependencies": {
+ "debug": "^4.4.3",
+ "@typescript-eslint/scope-manager": "8.61.1",
+ "@typescript-eslint/types": "8.61.1",
+ "@typescript-eslint/typescript-estree": "8.61.1",
+ "@typescript-eslint/visitor-keys": "8.61.1"
+ },
+ "devDependencies": {
+ "@typescript/native-preview": "7.0.0-dev.20260518.1",
+ "@vitest/coverage-v8": "^4.0.18",
+ "eslint": "^10.0.0",
+ "glob": "^11.1.0",
+ "rimraf": "^5.0.10",
+ "typescript": ">=4.8.4 <6.1.0",
+ "vitest": "^4.0.18"
+ },
+ "funding": {
+ "type": "opencollective",
+ "url": "https://opencollective.com/typescript-eslint"
+ },
+ "nx": {
+ "name": "parser",
+ "includedScripts": [
+ "clean"
+ ],
+ "targets": {
+ "lint": {
+ "command": "eslint"
+ },
+ "typecheck:tsgo": {}
+ }
+ },
+ "scripts": {
+ "build": "pnpm exec nx build",
+ "clean": "rimraf dist/ coverage/",
+ "format": "pnpm -w run format",
+ "lint": "pnpm -w exec nx lint",
+ "test": "pnpm -w exec nx test",
+ "typecheck": "pnpm -w exec nx typecheck",
+ "typecheck:tsgo": "pnpm -w exec nx typecheck:tsgo"
+ }
+}
\ No newline at end of file
diff --git a/node_modules/@typescript-eslint/project-service/LICENSE b/node_modules/@typescript-eslint/project-service/LICENSE
new file mode 100644
index 0000000000000000000000000000000000000000..310a18f8a6cbbe878d7c2874d6e3323827709b99
--- /dev/null
+++ b/node_modules/@typescript-eslint/project-service/LICENSE
@@ -0,0 +1,21 @@
+MIT License
+
+Copyright (c) 2025 typescript-eslint and other contributors
+
+Permission is hereby granted, free of charge, to any person obtaining a copy
+of this software and associated documentation files (the "Software"), to deal
+in the Software without restriction, including without limitation the rights
+to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
+copies of the Software, and to permit persons to whom the Software is
+furnished to do so, subject to the following conditions:
+
+The above copyright notice and this permission notice shall be included in all
+copies or substantial portions of the Software.
+
+THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
+AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
+LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
+OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
+SOFTWARE.
diff --git a/node_modules/@typescript-eslint/project-service/README.md b/node_modules/@typescript-eslint/project-service/README.md
new file mode 100644
index 0000000000000000000000000000000000000000..cf1a671681d63076a2ffc04b25ab3f8a86cd7f07
--- /dev/null
+++ b/node_modules/@typescript-eslint/project-service/README.md
@@ -0,0 +1,12 @@
+# `@typescript-eslint/project-service`
+
+> Standalone TypeScript project service wrapper for linting.
+
+[](https://www.npmjs.com/package/@typescript-eslint/project-service)
+[](https://www.npmjs.com/package/@typescript-eslint/project-service)
+
+A standalone export of the "Project Service" that powers typed linting for typescript-eslint.
+
+> See https://typescript-eslint.io for general documentation on typescript-eslint, the tooling that allows you to run ESLint and Prettier on TypeScript code.
+
+
diff --git a/node_modules/@typescript-eslint/project-service/package.json b/node_modules/@typescript-eslint/project-service/package.json
new file mode 100644
index 0000000000000000000000000000000000000000..d4513167e0e21e5f15f63521e4dcaa8d97834b70
--- /dev/null
+++ b/node_modules/@typescript-eslint/project-service/package.json
@@ -0,0 +1,83 @@
+{
+ "name": "@typescript-eslint/project-service",
+ "version": "8.61.1",
+ "description": "Standalone TypeScript project service wrapper for linting.",
+ "files": [
+ "dist",
+ "!**/*.tsbuildinfo",
+ "package.json",
+ "README.md",
+ "LICENSE"
+ ],
+ "type": "commonjs",
+ "exports": {
+ ".": {
+ "types": "./dist/index.d.ts",
+ "default": "./dist/index.js"
+ },
+ "./package.json": "./package.json"
+ },
+ "types": "./dist/index.d.ts",
+ "engines": {
+ "node": "^18.18.0 || ^20.9.0 || >=21.1.0"
+ },
+ "repository": {
+ "type": "git",
+ "url": "https://github.com/typescript-eslint/typescript-eslint.git",
+ "directory": "packages/project-service"
+ },
+ "bugs": {
+ "url": "https://github.com/typescript-eslint/typescript-eslint/issues"
+ },
+ "homepage": "https://typescript-eslint.io",
+ "license": "MIT",
+ "keywords": [
+ "eslint",
+ "typescript",
+ "estree"
+ ],
+ "peerDependencies": {
+ "typescript": ">=4.8.4 <6.1.0"
+ },
+ "dependencies": {
+ "debug": "^4.4.3",
+ "@typescript-eslint/tsconfig-utils": "^8.61.1",
+ "@typescript-eslint/types": "^8.61.1"
+ },
+ "devDependencies": {
+ "@typescript/native-preview": "7.0.0-dev.20260518.1",
+ "@vitest/coverage-v8": "^4.0.18",
+ "rimraf": "^5.0.10",
+ "typescript": ">=4.8.4 <6.1.0",
+ "vitest": "^4.0.18"
+ },
+ "funding": {
+ "type": "opencollective",
+ "url": "https://opencollective.com/typescript-eslint"
+ },
+ "publishConfig": {
+ "access": "public"
+ },
+ "nx": {
+ "name": "project-service",
+ "includedScripts": [
+ "clean"
+ ],
+ "targets": {
+ "lint": {
+ "command": "eslint"
+ },
+ "typecheck:tsgo": {}
+ }
+ },
+ "scripts": {
+ "//": "These package scripts are mostly here for convenience. Task running is handled by Nx at the root level.",
+ "build": "pnpm exec nx build",
+ "clean": "rimraf dist/ coverage/",
+ "format": "pnpm -w run format",
+ "lint": "pnpm -w exec nx lint",
+ "test": "pnpm -w exec nx test",
+ "typecheck": "pnpm -w exec nx typecheck",
+ "typecheck:tsgo": "pnpm -w exec nx typecheck:tsgo"
+ }
+}
\ No newline at end of file
diff --git a/node_modules/@typescript-eslint/scope-manager/LICENSE b/node_modules/@typescript-eslint/scope-manager/LICENSE
new file mode 100644
index 0000000000000000000000000000000000000000..a1164108d4d6037cb976384c16e5493917d87157
--- /dev/null
+++ b/node_modules/@typescript-eslint/scope-manager/LICENSE
@@ -0,0 +1,21 @@
+MIT License
+
+Copyright (c) 2019 typescript-eslint and other contributors
+
+Permission is hereby granted, free of charge, to any person obtaining a copy
+of this software and associated documentation files (the "Software"), to deal
+in the Software without restriction, including without limitation the rights
+to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
+copies of the Software, and to permit persons to whom the Software is
+furnished to do so, subject to the following conditions:
+
+The above copyright notice and this permission notice shall be included in all
+copies or substantial portions of the Software.
+
+THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
+AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
+LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
+OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
+SOFTWARE.
diff --git a/node_modules/@typescript-eslint/scope-manager/README.md b/node_modules/@typescript-eslint/scope-manager/README.md
new file mode 100644
index 0000000000000000000000000000000000000000..b730e9d83a99b3c3422018d0a3f2b4289aaeb5d8
--- /dev/null
+++ b/node_modules/@typescript-eslint/scope-manager/README.md
@@ -0,0 +1,10 @@
+# `@typescript-eslint/scope-manager`
+
+[](https://www.npmjs.com/package/@typescript-eslint/scope-manager)
+[](https://www.npmjs.com/package/@typescript-eslint/scope-manager)
+
+👉 See **https://typescript-eslint.io/packages/scope-manager** for documentation on this package.
+
+> See https://typescript-eslint.io for general documentation on typescript-eslint, the tooling that allows you to run ESLint and Prettier on TypeScript code.
+
+
diff --git a/node_modules/@typescript-eslint/scope-manager/package.json b/node_modules/@typescript-eslint/scope-manager/package.json
new file mode 100644
index 0000000000000000000000000000000000000000..cea4ea8d3350f64bef03032921ca52e6350864b9
--- /dev/null
+++ b/node_modules/@typescript-eslint/scope-manager/package.json
@@ -0,0 +1,82 @@
+{
+ "name": "@typescript-eslint/scope-manager",
+ "version": "8.61.1",
+ "description": "TypeScript scope analyser for ESLint",
+ "files": [
+ "dist",
+ "!**/*.tsbuildinfo",
+ "package.json",
+ "README.md",
+ "LICENSE"
+ ],
+ "type": "commonjs",
+ "exports": {
+ ".": {
+ "types": "./dist/index.d.ts",
+ "default": "./dist/index.js"
+ },
+ "./package.json": "./package.json"
+ },
+ "types": "./dist/index.d.ts",
+ "engines": {
+ "node": "^18.18.0 || ^20.9.0 || >=21.1.0"
+ },
+ "repository": {
+ "type": "git",
+ "url": "https://github.com/typescript-eslint/typescript-eslint.git",
+ "directory": "packages/scope-manager"
+ },
+ "bugs": {
+ "url": "https://github.com/typescript-eslint/typescript-eslint/issues"
+ },
+ "homepage": "https://typescript-eslint.io/packages/scope-manager",
+ "license": "MIT",
+ "keywords": [
+ "eslint",
+ "typescript",
+ "estree"
+ ],
+ "dependencies": {
+ "@typescript-eslint/types": "8.61.1",
+ "@typescript-eslint/visitor-keys": "8.61.1"
+ },
+ "devDependencies": {
+ "@typescript/native-preview": "7.0.0-dev.20260518.1",
+ "@vitest/coverage-v8": "^4.0.18",
+ "@vitest/pretty-format": "^4.0.18",
+ "eslint": "^10.0.0",
+ "glob": "^11.1.0",
+ "rimraf": "^5.0.10",
+ "typescript": ">=4.8.4 <6.1.0",
+ "vitest": "^4.0.18",
+ "@typescript-eslint/typescript-estree": "8.61.1"
+ },
+ "funding": {
+ "type": "opencollective",
+ "url": "https://opencollective.com/typescript-eslint"
+ },
+ "nx": {
+ "name": "scope-manager",
+ "includedScripts": [
+ "clean",
+ "clean-fixtures"
+ ],
+ "targets": {
+ "lint": {
+ "command": "eslint"
+ },
+ "typecheck:tsgo": {}
+ }
+ },
+ "scripts": {
+ "build": "pnpm exec nx build",
+ "clean": "rimraf dist/ coverage/",
+ "clean-fixtures": "rimraf -g \"./src/**/fixtures/**/snapshots\"",
+ "format": "pnpm -w run format",
+ "generate-lib": "pnpm -w exec nx generate-lib repo",
+ "lint": "pnpm -w exec nx lint",
+ "test": "pnpm -w exec nx test",
+ "typecheck": "pnpm -w exec nx typecheck",
+ "typecheck:tsgo": "pnpm -w exec nx typecheck:tsgo"
+ }
+}
\ No newline at end of file
diff --git a/node_modules/@typescript-eslint/tsconfig-utils/LICENSE b/node_modules/@typescript-eslint/tsconfig-utils/LICENSE
new file mode 100644
index 0000000000000000000000000000000000000000..310a18f8a6cbbe878d7c2874d6e3323827709b99
--- /dev/null
+++ b/node_modules/@typescript-eslint/tsconfig-utils/LICENSE
@@ -0,0 +1,21 @@
+MIT License
+
+Copyright (c) 2025 typescript-eslint and other contributors
+
+Permission is hereby granted, free of charge, to any person obtaining a copy
+of this software and associated documentation files (the "Software"), to deal
+in the Software without restriction, including without limitation the rights
+to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
+copies of the Software, and to permit persons to whom the Software is
+furnished to do so, subject to the following conditions:
+
+The above copyright notice and this permission notice shall be included in all
+copies or substantial portions of the Software.
+
+THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
+AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
+LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
+OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
+SOFTWARE.
diff --git a/node_modules/@typescript-eslint/tsconfig-utils/README.md b/node_modules/@typescript-eslint/tsconfig-utils/README.md
new file mode 100644
index 0000000000000000000000000000000000000000..075c3fbb7315c3d273368a14531e56af1697cea0
--- /dev/null
+++ b/node_modules/@typescript-eslint/tsconfig-utils/README.md
@@ -0,0 +1,12 @@
+# `@typescript-eslint/tsconfig-utils`
+
+> Utilities for collecting TSConfigs for linting scenarios.
+
+[](https://www.npmjs.com/package/@typescript-eslint/tsconfig-utils)
+[](https://www.npmjs.com/package/@typescript-eslint/tsconfig-utils)
+
+The utilities in this package are separated from `@typescript-eslint/utils` so that they do not have a dependency on `eslint` or `@typescript-eslint/typescript-estree`.
+
+> See https://typescript-eslint.io for general documentation on typescript-eslint, the tooling that allows you to run ESLint and Prettier on TypeScript code.
+
+
diff --git a/node_modules/@typescript-eslint/tsconfig-utils/package.json b/node_modules/@typescript-eslint/tsconfig-utils/package.json
new file mode 100644
index 0000000000000000000000000000000000000000..1dd234354fca8ed9fe491ccf84a88a14dec3714a
--- /dev/null
+++ b/node_modules/@typescript-eslint/tsconfig-utils/package.json
@@ -0,0 +1,74 @@
+{
+ "name": "@typescript-eslint/tsconfig-utils",
+ "version": "8.61.1",
+ "description": "Utilities for collecting TSConfigs for linting scenarios.",
+ "files": [
+ "dist",
+ "!**/*.tsbuildinfo",
+ "package.json",
+ "README.md",
+ "LICENSE"
+ ],
+ "type": "commonjs",
+ "exports": {
+ ".": {
+ "types": "./dist/index.d.ts",
+ "default": "./dist/index.js"
+ },
+ "./package.json": "./package.json"
+ },
+ "engines": {
+ "node": "^18.18.0 || ^20.9.0 || >=21.1.0"
+ },
+ "repository": {
+ "type": "git",
+ "url": "https://github.com/typescript-eslint/typescript-eslint.git",
+ "directory": "packages/tsconfig-utils"
+ },
+ "bugs": {
+ "url": "https://github.com/typescript-eslint/typescript-eslint/issues"
+ },
+ "homepage": "https://typescript-eslint.io",
+ "license": "MIT",
+ "keywords": [
+ "eslint",
+ "typescript",
+ "estree"
+ ],
+ "peerDependencies": {
+ "typescript": ">=4.8.4 <6.1.0"
+ },
+ "devDependencies": {
+ "@typescript/native-preview": "7.0.0-dev.20260518.1",
+ "@vitest/coverage-v8": "^4.0.18",
+ "rimraf": "^5.0.10",
+ "typescript": ">=4.8.4 <6.1.0",
+ "vitest": "^4.0.18"
+ },
+ "funding": {
+ "type": "opencollective",
+ "url": "https://opencollective.com/typescript-eslint"
+ },
+ "publishConfig": {
+ "access": "public"
+ },
+ "nx": {
+ "name": "tsconfig-utils",
+ "includedScripts": [
+ "clean"
+ ],
+ "targets": {
+ "typecheck:tsgo": {}
+ }
+ },
+ "scripts": {
+ "//": "These package scripts are mostly here for convenience. Task running is handled by Nx at the root level.",
+ "build": "pnpm exec nx build",
+ "clean": "rimraf dist/ coverage/",
+ "format": "pnpm -w exec format",
+ "lint": "pnpm -w exec nx lint",
+ "test": "pnpm -w exec nx test",
+ "typecheck": "pnpm -w exec nx typecheck",
+ "typecheck:tsgo": "pnpm -w exec nx typecheck:tsgo"
+ }
+}
\ No newline at end of file
diff --git a/node_modules/@typescript-eslint/type-utils/LICENSE b/node_modules/@typescript-eslint/type-utils/LICENSE
new file mode 100644
index 0000000000000000000000000000000000000000..dabd464af3a207c5f55cd5250caf63f05fc3b9fc
--- /dev/null
+++ b/node_modules/@typescript-eslint/type-utils/LICENSE
@@ -0,0 +1,21 @@
+MIT License
+
+Copyright (c) 2021 typescript-eslint and other contributors
+
+Permission is hereby granted, free of charge, to any person obtaining a copy
+of this software and associated documentation files (the "Software"), to deal
+in the Software without restriction, including without limitation the rights
+to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
+copies of the Software, and to permit persons to whom the Software is
+furnished to do so, subject to the following conditions:
+
+The above copyright notice and this permission notice shall be included in all
+copies or substantial portions of the Software.
+
+THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
+AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
+LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
+OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
+SOFTWARE.
diff --git a/node_modules/@typescript-eslint/type-utils/README.md b/node_modules/@typescript-eslint/type-utils/README.md
new file mode 100644
index 0000000000000000000000000000000000000000..c5d32797dcf082fd71f00c2a76f8718564ee2afd
--- /dev/null
+++ b/node_modules/@typescript-eslint/type-utils/README.md
@@ -0,0 +1,12 @@
+# `@typescript-eslint/type-utils`
+
+> Type utilities for working with TypeScript within ESLint rules.
+
+[](https://www.npmjs.com/package/@typescript-eslint/utils)
+[](https://www.npmjs.com/package/@typescript-eslint/utils)
+
+The utilities in this package are separated from `@typescript-eslint/utils` so that that package does not require a dependency on `typescript`.
+
+> See https://typescript-eslint.io for general documentation on typescript-eslint, the tooling that allows you to run ESLint and Prettier on TypeScript code.
+
+
diff --git a/node_modules/@typescript-eslint/type-utils/package.json b/node_modules/@typescript-eslint/type-utils/package.json
new file mode 100644
index 0000000000000000000000000000000000000000..fac2fd6c3d41c5ce9aedaf4fd047742c4e68bda7
--- /dev/null
+++ b/node_modules/@typescript-eslint/type-utils/package.json
@@ -0,0 +1,85 @@
+{
+ "name": "@typescript-eslint/type-utils",
+ "version": "8.61.1",
+ "description": "Type utilities for working with TypeScript + ESLint together",
+ "files": [
+ "dist",
+ "!**/*.tsbuildinfo",
+ "package.json",
+ "README.md",
+ "LICENSE"
+ ],
+ "type": "commonjs",
+ "exports": {
+ ".": {
+ "types": "./dist/index.d.ts",
+ "default": "./dist/index.js"
+ },
+ "./package.json": "./package.json"
+ },
+ "engines": {
+ "node": "^18.18.0 || ^20.9.0 || >=21.1.0"
+ },
+ "repository": {
+ "type": "git",
+ "url": "https://github.com/typescript-eslint/typescript-eslint.git",
+ "directory": "packages/type-utils"
+ },
+ "bugs": {
+ "url": "https://github.com/typescript-eslint/typescript-eslint/issues"
+ },
+ "homepage": "https://typescript-eslint.io",
+ "license": "MIT",
+ "keywords": [
+ "eslint",
+ "typescript",
+ "estree"
+ ],
+ "dependencies": {
+ "debug": "^4.4.3",
+ "ts-api-utils": "^2.5.0",
+ "@typescript-eslint/types": "8.61.1",
+ "@typescript-eslint/typescript-estree": "8.61.1",
+ "@typescript-eslint/utils": "8.61.1"
+ },
+ "peerDependencies": {
+ "eslint": "^8.57.0 || ^9.0.0 || ^10.0.0",
+ "typescript": ">=4.8.4 <6.1.0"
+ },
+ "devDependencies": {
+ "@types/babel__code-frame": "^7.0.6",
+ "@typescript/native-preview": "7.0.0-dev.20260518.1",
+ "@vitest/coverage-v8": "^4.0.18",
+ "ajv": "^6.12.6",
+ "eslint": "^10.0.0",
+ "rimraf": "^5.0.10",
+ "typescript": ">=4.8.4 <6.1.0",
+ "vitest": "^4.0.18",
+ "@typescript-eslint/parser": "8.61.1"
+ },
+ "funding": {
+ "type": "opencollective",
+ "url": "https://opencollective.com/typescript-eslint"
+ },
+ "nx": {
+ "name": "type-utils",
+ "includedScripts": [
+ "clean"
+ ],
+ "targets": {
+ "lint": {
+ "command": "eslint"
+ },
+ "typecheck:tsgo": {}
+ }
+ },
+ "scripts": {
+ "build": "pnpm exec nx build",
+ "clean": "rimraf dist/ coverage/",
+ "format": "pnpm -w run format",
+ "lint": "pnpm -w exec nx lint",
+ "test": "pnpm -w exec nx test",
+ "typecheck": "pnpm -w exec nx typecheck",
+ "typecheck:tsgo": "pnpm -w exec nx typecheck:tsgo"
+ }
+}
\ No newline at end of file
diff --git a/node_modules/@typescript-eslint/types/LICENSE b/node_modules/@typescript-eslint/types/LICENSE
new file mode 100644
index 0000000000000000000000000000000000000000..a1164108d4d6037cb976384c16e5493917d87157
--- /dev/null
+++ b/node_modules/@typescript-eslint/types/LICENSE
@@ -0,0 +1,21 @@
+MIT License
+
+Copyright (c) 2019 typescript-eslint and other contributors
+
+Permission is hereby granted, free of charge, to any person obtaining a copy
+of this software and associated documentation files (the "Software"), to deal
+in the Software without restriction, including without limitation the rights
+to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
+copies of the Software, and to permit persons to whom the Software is
+furnished to do so, subject to the following conditions:
+
+The above copyright notice and this permission notice shall be included in all
+copies or substantial portions of the Software.
+
+THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
+AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
+LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
+OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
+SOFTWARE.
diff --git a/node_modules/@typescript-eslint/types/README.md b/node_modules/@typescript-eslint/types/README.md
new file mode 100644
index 0000000000000000000000000000000000000000..7a3008bb982abdf588b84c49a662f79e01957342
--- /dev/null
+++ b/node_modules/@typescript-eslint/types/README.md
@@ -0,0 +1,12 @@
+# `@typescript-eslint/types`
+
+> Types for the TypeScript-ESTree AST spec
+
+This package exists to help us reduce cycles and provide lighter-weight packages at runtime.
+
+## ✋ Internal Package
+
+This is an _internal package_ to the [typescript-eslint monorepo](https://github.com/typescript-eslint/typescript-eslint).
+You likely don't want to use it directly.
+
+👉 See **https://typescript-eslint.io** for docs on typescript-eslint.
diff --git a/node_modules/@typescript-eslint/types/package.json b/node_modules/@typescript-eslint/types/package.json
new file mode 100644
index 0000000000000000000000000000000000000000..c9b8f3fc1659463f67eda61693ed2fdf87dafd79
--- /dev/null
+++ b/node_modules/@typescript-eslint/types/package.json
@@ -0,0 +1,103 @@
+{
+ "name": "@typescript-eslint/types",
+ "version": "8.61.1",
+ "description": "Types for the TypeScript-ESTree AST spec",
+ "files": [
+ "dist",
+ "!**/*.tsbuildinfo",
+ "package.json",
+ "README.md",
+ "LICENSE"
+ ],
+ "type": "commonjs",
+ "exports": {
+ ".": {
+ "types": "./dist/index.d.ts",
+ "default": "./dist/index.js"
+ },
+ "./package.json": "./package.json"
+ },
+ "types": "./dist/index.d.ts",
+ "engines": {
+ "node": "^18.18.0 || ^20.9.0 || >=21.1.0"
+ },
+ "repository": {
+ "type": "git",
+ "url": "https://github.com/typescript-eslint/typescript-eslint.git",
+ "directory": "packages/types"
+ },
+ "bugs": {
+ "url": "https://github.com/typescript-eslint/typescript-eslint/issues"
+ },
+ "homepage": "https://typescript-eslint.io",
+ "license": "MIT",
+ "keywords": [
+ "eslint",
+ "typescript",
+ "estree"
+ ],
+ "devDependencies": {
+ "@typescript/native-preview": "7.0.0-dev.20260518.1",
+ "@vitest/coverage-v8": "^4.0.18",
+ "eslint": "^10.0.0",
+ "rimraf": "^5.0.10",
+ "tsx": "^4.7.2",
+ "typescript": ">=4.8.4 <6.1.0",
+ "vitest": "^4.0.18"
+ },
+ "funding": {
+ "type": "opencollective",
+ "url": "https://opencollective.com/typescript-eslint"
+ },
+ "nx": {
+ "name": "types",
+ "implicitDependencies": [
+ "ast-spec"
+ ],
+ "includedScripts": [
+ "clean"
+ ],
+ "targets": {
+ "build": {
+ "dependsOn": [
+ "copy-ast-spec"
+ ],
+ "inputs": [
+ "{projectRoot}/src/generated/**/*"
+ ]
+ },
+ "copy-ast-spec": {
+ "cache": false,
+ "command": "tsx tools/copy-ast-spec.mts",
+ "dependsOn": [
+ "ast-spec:build"
+ ],
+ "options": {
+ "cwd": "{projectRoot}"
+ },
+ "outputs": [
+ "{projectRoot}/src/generated"
+ ]
+ },
+ "lint": {
+ "command": "eslint",
+ "dependsOn": [
+ "typescript-eslint:build",
+ "eslint-plugin-internal:build"
+ ]
+ },
+ "typecheck:tsgo": {}
+ }
+ },
+ "scripts": {
+ "build": "pnpm exec nx build",
+ "clean": "rimraf dist/ src/generated/ coverage/",
+ "copy-ast-spec": "tsx ./tools/copy-ast-spec.mts",
+ "format": "pnpm -w run format",
+ "generate-lib": "pnpm -w exec nx run scope-manager:generate-lib",
+ "lint": "pnpm -w exec nx lint",
+ "test": "pnpm -w exec nx test",
+ "typecheck": "pnpm -w exec nx typecheck",
+ "typecheck:tsgo": "pnpm -w exec nx typecheck:tsgo"
+ }
+}
\ No newline at end of file
diff --git a/node_modules/@typescript-eslint/typescript-estree/LICENSE b/node_modules/@typescript-eslint/typescript-estree/LICENSE
new file mode 100644
index 0000000000000000000000000000000000000000..a1164108d4d6037cb976384c16e5493917d87157
--- /dev/null
+++ b/node_modules/@typescript-eslint/typescript-estree/LICENSE
@@ -0,0 +1,21 @@
+MIT License
+
+Copyright (c) 2019 typescript-eslint and other contributors
+
+Permission is hereby granted, free of charge, to any person obtaining a copy
+of this software and associated documentation files (the "Software"), to deal
+in the Software without restriction, including without limitation the rights
+to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
+copies of the Software, and to permit persons to whom the Software is
+furnished to do so, subject to the following conditions:
+
+The above copyright notice and this permission notice shall be included in all
+copies or substantial portions of the Software.
+
+THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
+AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
+LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
+OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
+SOFTWARE.
diff --git a/node_modules/@typescript-eslint/typescript-estree/README.md b/node_modules/@typescript-eslint/typescript-estree/README.md
new file mode 100644
index 0000000000000000000000000000000000000000..c98838dad403029865246da7fd08274e983ee39b
--- /dev/null
+++ b/node_modules/@typescript-eslint/typescript-estree/README.md
@@ -0,0 +1,14 @@
+# `@typescript-eslint/typescript-estree`
+
+> A parser that produces an ESTree-compatible AST for TypeScript code.
+
+[](https://www.npmjs.com/package/@typescript-eslint/utils)
+[](https://www.npmjs.com/package/@typescript-eslint/utils)
+
+## Contributing
+
+👉 See **https://typescript-eslint.io/packages/typescript-estree** for documentation on this package.
+
+> See https://typescript-eslint.io for general documentation on typescript-eslint, the tooling that allows you to run ESLint and Prettier on TypeScript code.
+
+
diff --git a/node_modules/@typescript-eslint/typescript-estree/package.json b/node_modules/@typescript-eslint/typescript-estree/package.json
new file mode 100644
index 0000000000000000000000000000000000000000..0597464f19dee25121536b1fb85831c28ea7e8f2
--- /dev/null
+++ b/node_modules/@typescript-eslint/typescript-estree/package.json
@@ -0,0 +1,95 @@
+{
+ "name": "@typescript-eslint/typescript-estree",
+ "version": "8.61.1",
+ "description": "A parser that converts TypeScript source code into an ESTree compatible form",
+ "files": [
+ "dist",
+ "!**/*.tsbuildinfo",
+ "README.md",
+ "LICENSE"
+ ],
+ "type": "commonjs",
+ "exports": {
+ ".": {
+ "types": "./dist/index.d.ts",
+ "default": "./dist/index.js"
+ },
+ "./package.json": "./package.json",
+ "./use-at-your-own-risk": {
+ "types": "./dist/use-at-your-own-risk.d.ts",
+ "default": "./dist/use-at-your-own-risk.js"
+ }
+ },
+ "types": "./dist/index.d.ts",
+ "engines": {
+ "node": "^18.18.0 || ^20.9.0 || >=21.1.0"
+ },
+ "repository": {
+ "type": "git",
+ "url": "https://github.com/typescript-eslint/typescript-eslint.git",
+ "directory": "packages/typescript-estree"
+ },
+ "bugs": {
+ "url": "https://github.com/typescript-eslint/typescript-eslint/issues"
+ },
+ "homepage": "https://typescript-eslint.io/packages/typescript-estree",
+ "license": "MIT",
+ "keywords": [
+ "ast",
+ "estree",
+ "ecmascript",
+ "javascript",
+ "typescript",
+ "parser",
+ "syntax"
+ ],
+ "dependencies": {
+ "debug": "^4.4.3",
+ "minimatch": "^10.2.2",
+ "semver": "^7.7.3",
+ "tinyglobby": "^0.2.15",
+ "ts-api-utils": "^2.5.0",
+ "@typescript-eslint/tsconfig-utils": "8.61.1",
+ "@typescript-eslint/project-service": "8.61.1",
+ "@typescript-eslint/visitor-keys": "8.61.1",
+ "@typescript-eslint/types": "8.61.1"
+ },
+ "devDependencies": {
+ "@typescript/native-preview": "7.0.0-dev.20260518.1",
+ "@vitest/coverage-v8": "^4.0.18",
+ "eslint": "^10.0.0",
+ "glob": "^11.1.0",
+ "rimraf": "^5.0.10",
+ "typescript": ">=4.8.4 <6.1.0",
+ "vitest": "^4.0.18",
+ "yaml": "^2.8.2"
+ },
+ "peerDependencies": {
+ "typescript": ">=4.8.4 <6.1.0"
+ },
+ "funding": {
+ "type": "opencollective",
+ "url": "https://opencollective.com/typescript-eslint"
+ },
+ "nx": {
+ "name": "typescript-estree",
+ "includedScripts": [
+ "clean"
+ ],
+ "targets": {
+ "lint": {
+ "command": "eslint"
+ },
+ "typecheck:tsgo": {}
+ }
+ },
+ "scripts": {
+ "build": "pnpm exec nx build",
+ "clean": "rimraf dist/ coverage/",
+ "format": "pnpm -w run format",
+ "lint": "pnpm -w exec nx lint",
+ "test": "pnpm -w exec nx test",
+ "typecheck": "pnpm -w exec nx typecheck",
+ "typecheck:tsgo": "pnpm -w exec nx typecheck:tsgo"
+ }
+}
\ No newline at end of file
diff --git a/node_modules/@typescript-eslint/utils/LICENSE b/node_modules/@typescript-eslint/utils/LICENSE
new file mode 100644
index 0000000000000000000000000000000000000000..a1164108d4d6037cb976384c16e5493917d87157
--- /dev/null
+++ b/node_modules/@typescript-eslint/utils/LICENSE
@@ -0,0 +1,21 @@
+MIT License
+
+Copyright (c) 2019 typescript-eslint and other contributors
+
+Permission is hereby granted, free of charge, to any person obtaining a copy
+of this software and associated documentation files (the "Software"), to deal
+in the Software without restriction, including without limitation the rights
+to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
+copies of the Software, and to permit persons to whom the Software is
+furnished to do so, subject to the following conditions:
+
+The above copyright notice and this permission notice shall be included in all
+copies or substantial portions of the Software.
+
+THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
+AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
+LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
+OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
+SOFTWARE.
diff --git a/node_modules/@typescript-eslint/utils/README.md b/node_modules/@typescript-eslint/utils/README.md
new file mode 100644
index 0000000000000000000000000000000000000000..7ba750090e9bce0db5eac316be4808f087b09582
--- /dev/null
+++ b/node_modules/@typescript-eslint/utils/README.md
@@ -0,0 +1,12 @@
+# `@typescript-eslint/utils`
+
+> Utilities for working with TypeScript + ESLint together.
+
+[](https://www.npmjs.com/package/@typescript-eslint/utils)
+[](https://www.npmjs.com/package/@typescript-eslint/utils)
+
+👉 See **https://typescript-eslint.io/packages/utils** for documentation on this package.
+
+> See https://typescript-eslint.io for general documentation on typescript-eslint, the tooling that allows you to run ESLint and Prettier on TypeScript code.
+
+
diff --git a/node_modules/@typescript-eslint/utils/package.json b/node_modules/@typescript-eslint/utils/package.json
new file mode 100644
index 0000000000000000000000000000000000000000..c702a3ba85d79862f370c19c6e0fa3b7fd96a506
--- /dev/null
+++ b/node_modules/@typescript-eslint/utils/package.json
@@ -0,0 +1,115 @@
+{
+ "name": "@typescript-eslint/utils",
+ "version": "8.61.1",
+ "description": "Utilities for working with TypeScript + ESLint together",
+ "files": [
+ "dist",
+ "!**/*.tsbuildinfo",
+ "package.json",
+ "README.md",
+ "LICENSE"
+ ],
+ "type": "commonjs",
+ "exports": {
+ ".": {
+ "types": "./dist/index.d.ts",
+ "default": "./dist/index.js"
+ },
+ "./ast-utils": {
+ "types": "./dist/ast-utils/index.d.ts",
+ "default": "./dist/ast-utils/index.js"
+ },
+ "./eslint-utils": {
+ "types": "./dist/eslint-utils/index.d.ts",
+ "default": "./dist/eslint-utils/index.js"
+ },
+ "./json-schema": {
+ "types": "./dist/json-schema.d.ts",
+ "default": "./dist/json-schema.js"
+ },
+ "./ts-eslint": {
+ "types": "./dist/ts-eslint/index.d.ts",
+ "default": "./dist/ts-eslint/index.js"
+ },
+ "./package.json": "./package.json"
+ },
+ "types": "./dist/index.d.ts",
+ "engines": {
+ "node": "^18.18.0 || ^20.9.0 || >=21.1.0"
+ },
+ "repository": {
+ "type": "git",
+ "url": "https://github.com/typescript-eslint/typescript-eslint.git",
+ "directory": "packages/utils"
+ },
+ "bugs": {
+ "url": "https://github.com/typescript-eslint/typescript-eslint/issues"
+ },
+ "homepage": "https://typescript-eslint.io/packages/utils",
+ "license": "MIT",
+ "keywords": [
+ "eslint",
+ "typescript",
+ "estree"
+ ],
+ "dependencies": {
+ "@eslint-community/eslint-utils": "^4.9.1",
+ "@typescript-eslint/types": "8.61.1",
+ "@typescript-eslint/typescript-estree": "8.61.1",
+ "@typescript-eslint/scope-manager": "8.61.1"
+ },
+ "peerDependencies": {
+ "eslint": "^8.57.0 || ^9.0.0 || ^10.0.0",
+ "typescript": ">=4.8.4 <6.1.0"
+ },
+ "devDependencies": {
+ "@typescript/native-preview": "7.0.0-dev.20260518.1",
+ "@vitest/coverage-v8": "^4.0.18",
+ "eslint": "^10.0.0",
+ "rimraf": "^5.0.10",
+ "typescript": ">=4.8.4 <6.1.0",
+ "vitest": "^4.0.18"
+ },
+ "funding": {
+ "type": "opencollective",
+ "url": "https://opencollective.com/typescript-eslint"
+ },
+ "nx": {
+ "name": "utils",
+ "includedScripts": [
+ "clean"
+ ],
+ "targets": {
+ "lint": {
+ "command": "eslint"
+ },
+ "typecheck": {
+ "outputs": [
+ "{workspaceRoot}/dist",
+ "{projectRoot}/dist"
+ ]
+ },
+ "typecheck:tsgo": {
+ "outputs": [
+ "{workspaceRoot}/dist",
+ "{projectRoot}/dist"
+ ]
+ },
+ "test": {
+ "dependsOn": [
+ "^build",
+ "typecheck"
+ ]
+ }
+ }
+ },
+ "scripts": {
+ "build": "pnpm exec nx build",
+ "clean": "rimraf dist/ coverage/",
+ "format": "pnpm -w run format",
+ "lint": "pnpm -w exec nx lint",
+ "test": "pnpm -w exec nx test",
+ "typecheck": "pnpm -w exec nx typecheck",
+ "typecheck:tsgo": "pnpm -w exec nx typecheck:tsgo"
+ }
+}
\ No newline at end of file
diff --git a/node_modules/@typescript-eslint/visitor-keys/LICENSE b/node_modules/@typescript-eslint/visitor-keys/LICENSE
new file mode 100644
index 0000000000000000000000000000000000000000..a1164108d4d6037cb976384c16e5493917d87157
--- /dev/null
+++ b/node_modules/@typescript-eslint/visitor-keys/LICENSE
@@ -0,0 +1,21 @@
+MIT License
+
+Copyright (c) 2019 typescript-eslint and other contributors
+
+Permission is hereby granted, free of charge, to any person obtaining a copy
+of this software and associated documentation files (the "Software"), to deal
+in the Software without restriction, including without limitation the rights
+to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
+copies of the Software, and to permit persons to whom the Software is
+furnished to do so, subject to the following conditions:
+
+The above copyright notice and this permission notice shall be included in all
+copies or substantial portions of the Software.
+
+THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
+AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
+LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
+OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
+SOFTWARE.
diff --git a/node_modules/@typescript-eslint/visitor-keys/README.md b/node_modules/@typescript-eslint/visitor-keys/README.md
new file mode 100644
index 0000000000000000000000000000000000000000..1745172a6f20c5d2b170a561d50c4c46966796bd
--- /dev/null
+++ b/node_modules/@typescript-eslint/visitor-keys/README.md
@@ -0,0 +1,10 @@
+# `@typescript-eslint/visitor-keys`
+
+> Visitor keys used to help traverse the TypeScript-ESTree AST.
+
+## ✋ Internal Package
+
+This is an _internal package_ to the [typescript-eslint monorepo](https://github.com/typescript-eslint/typescript-eslint).
+You likely don't want to use it directly.
+
+👉 See **https://typescript-eslint.io** for docs on typescript-eslint.
diff --git a/node_modules/@typescript-eslint/visitor-keys/package.json b/node_modules/@typescript-eslint/visitor-keys/package.json
new file mode 100644
index 0000000000000000000000000000000000000000..7ebc6668db3864f1267e29422022930d63c017cf
--- /dev/null
+++ b/node_modules/@typescript-eslint/visitor-keys/package.json
@@ -0,0 +1,76 @@
+{
+ "name": "@typescript-eslint/visitor-keys",
+ "version": "8.61.1",
+ "description": "Visitor keys used to help traverse the TypeScript-ESTree AST",
+ "files": [
+ "dist",
+ "!**/*.tsbuildinfo",
+ "package.json",
+ "README.md",
+ "LICENSE"
+ ],
+ "type": "commonjs",
+ "exports": {
+ ".": {
+ "types": "./dist/index.d.ts",
+ "default": "./dist/index.js"
+ },
+ "./package.json": "./package.json"
+ },
+ "types": "./dist/index.d.ts",
+ "engines": {
+ "node": "^18.18.0 || ^20.9.0 || >=21.1.0"
+ },
+ "repository": {
+ "type": "git",
+ "url": "https://github.com/typescript-eslint/typescript-eslint.git",
+ "directory": "packages/visitor-keys"
+ },
+ "bugs": {
+ "url": "https://github.com/typescript-eslint/typescript-eslint/issues"
+ },
+ "homepage": "https://typescript-eslint.io",
+ "license": "MIT",
+ "keywords": [
+ "eslint",
+ "typescript",
+ "estree"
+ ],
+ "dependencies": {
+ "eslint-visitor-keys": "^5.0.0",
+ "@typescript-eslint/types": "8.61.1"
+ },
+ "devDependencies": {
+ "@typescript/native-preview": "7.0.0-dev.20260518.1",
+ "@vitest/coverage-v8": "^4.0.18",
+ "eslint": "^10.0.0",
+ "rimraf": "^5.0.10",
+ "typescript": ">=4.8.4 <6.1.0",
+ "vitest": "^4.0.18"
+ },
+ "funding": {
+ "type": "opencollective",
+ "url": "https://opencollective.com/typescript-eslint"
+ },
+ "nx": {
+ "name": "visitor-keys",
+ "includedScripts": [
+ "clean"
+ ],
+ "targets": {
+ "lint": {
+ "command": "eslint"
+ },
+ "typecheck:tsgo": {}
+ }
+ },
+ "scripts": {
+ "build": "pnpm exec nx build",
+ "clean": "rimraf dist/ coverage/",
+ "format": "pnpm -w run format",
+ "lint": "pnpm -w exec nx lint",
+ "test": "pnpm -w exec nx test",
+ "typecheck": "pnpm -w exec nx typecheck",
+ "typecheck:tsgo": "pnpm -w exec nx typecheck:tsgo"
+ }
+}
\ No newline at end of file
diff --git a/node_modules/@ungap/structured-clone/.github/workflows/node.js.yml b/node_modules/@ungap/structured-clone/.github/workflows/node.js.yml
new file mode 100644
index 0000000000000000000000000000000000000000..73cf8d65218202c9eccdd6de6c29482fefae3e60
--- /dev/null
+++ b/node_modules/@ungap/structured-clone/.github/workflows/node.js.yml
@@ -0,0 +1,31 @@
+# This workflow will do a clean install of node dependencies, cache/restore them, build the source code and run tests across different versions of node
+# For more information see: https://help.github.com/actions/language-and-framework-guides/using-nodejs-with-github-actions
+
+name: build
+
+on: [push, pull_request]
+
+jobs:
+ build:
+
+ runs-on: ubuntu-latest
+
+ strategy:
+ matrix:
+ node-version: [16]
+
+ steps:
+ - uses: actions/checkout@v2
+ - name: Use Node.js ${{ matrix.node-version }}
+ uses: actions/setup-node@v2
+ with:
+ node-version: ${{ matrix.node-version }}
+ cache: 'npm'
+ - run: npm ci
+ - run: npm run build --if-present
+ - run: npm test
+ - run: npm run coverage --if-present
+ - name: Coveralls
+ uses: coverallsapp/github-action@master
+ with:
+ github-token: ${{ secrets.GITHUB_TOKEN }}
diff --git a/node_modules/@ungap/structured-clone/LICENSE b/node_modules/@ungap/structured-clone/LICENSE
new file mode 100644
index 0000000000000000000000000000000000000000..48afbe52afb5895b682e9b877bae10f96049a446
--- /dev/null
+++ b/node_modules/@ungap/structured-clone/LICENSE
@@ -0,0 +1,15 @@
+ISC License
+
+Copyright (c) 2021, Andrea Giammarchi, @WebReflection
+
+Permission to use, copy, modify, and/or distribute this software for any
+purpose with or without fee is hereby granted, provided that the above
+copyright notice and this permission notice appear in all copies.
+
+THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES WITH
+REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY
+AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT,
+INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM
+LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE
+OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
+PERFORMANCE OF THIS SOFTWARE.
diff --git a/node_modules/@ungap/structured-clone/README.md b/node_modules/@ungap/structured-clone/README.md
new file mode 100644
index 0000000000000000000000000000000000000000..07d15a25f4646bab1792f28012305823ed675570
--- /dev/null
+++ b/node_modules/@ungap/structured-clone/README.md
@@ -0,0 +1,95 @@
+# structuredClone polyfill
+
+[](https://www.npmjs.com/package/@ungap/structured-clone) [](https://github.com/ungap/structured-clone/actions) [](https://coveralls.io/github/ungap/structured-clone?branch=main)
+
+An env agnostic serializer and deserializer with recursion ability and types beyond *JSON* from the *HTML* standard itself.
+
+ * [Supported Types](https://developer.mozilla.org/en-US/docs/Web/API/Web_Workers_API/Structured_clone_algorithm#supported_types)
+ * *not supported yet*: Blob, File, FileList, ImageBitmap, ImageData or others non *JS* types but typed arrays are supported without major issues, but u/int8, u/int16, and u/int32 are the only safely suppored (right now).
+ * *not possible to implement*: the `{transfer: []}` option can be passed but it's completely ignored.
+ * [MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/structuredClone)
+ * [Serializer](https://html.spec.whatwg.org/multipage/structured-data.html#structuredserializeinternal)
+ * [Deserializer](https://html.spec.whatwg.org/multipage/structured-data.html#structureddeserialize)
+
+Serialized values can be safely stringified as *JSON* too, and deserialization resurrect all values, even recursive, or more complex than what *JSON* allows.
+
+
+### Examples
+
+Check the [100% test coverage](./test/index.js) to know even more.
+
+```js
+// as default export
+import structuredClone from '@ungap/structured-clone';
+const cloned = structuredClone({any: 'serializable'});
+
+// as independent serializer/deserializer
+import {serialize, deserialize} from '@ungap/structured-clone';
+
+// the result can be stringified as JSON without issues
+// even if there is recursive data, bigint values,
+// typed arrays, and so on
+const serialized = serialize({any: 'serializable'});
+
+// the result will be a replica of the original object
+const deserialized = deserialize(serialized);
+```
+
+#### Global Polyfill
+Note: Only monkey patch the global if needed. This polyfill works just fine as an explicit import: `import structuredClone from "@ungap/structured-clone"`
+```js
+// Attach the polyfill as a Global function
+import structuredClone from "@ungap/structured-clone";
+if (!("structuredClone" in globalThis)) {
+ globalThis.structuredClone = structuredClone;
+}
+
+// Or don't monkey patch
+import structuredClone from "@ungap/structured-clone"
+// Just use it in the file
+structuredClone()
+```
+
+**Note**: Do not attach this module's default export directly to the global scope, whithout a conditional guard to detect a native implementation. In environments where there is a native global implementation of `structuredClone()` already, assignment to the global object will result in an infinite loop when `globalThis.structuredClone()` is called. See the example above for a safe way to provide the polyfill globally in your project.
+
+### Extra Features
+
+There is no middle-ground between the structured clone algorithm and JSON:
+
+ * JSON is more relaxed about incompatible values: it just ignores these
+ * Structured clone is inflexible regarding incompatible values, yet it makes specialized instances impossible to reconstruct, plus it doesn't offer any helper, such as `toJSON()`, to make serialization possible, or better, with specific cases
+
+This module specialized `serialize` export offers, within the optional extra argument, a **lossy** property to avoid throwing when incompatible types are found down the road (function, symbol, ...), so that it is possible to send with less worrying about thrown errors.
+
+```js
+// as default export
+import structuredClone from '@ungap/structured-clone';
+const cloned = structuredClone(
+ {
+ method() {
+ // ignored, won't be cloned
+ },
+ special: Symbol('also ignored')
+ },
+ {
+ // avoid throwing
+ lossy: true,
+ // avoid throwing *and* looks for toJSON
+ json: true
+ }
+);
+```
+
+The behavior is the same found in *JSON* when it comes to *Array*, so that unsupported values will result as `null` placeholders instead.
+
+#### toJSON
+
+If `lossy` option is not enough, `json` will actually enforce `lossy` and also check for `toJSON` method when objects are parsed.
+
+Alternative, the `json` exports combines all features:
+
+```js
+import {stringify, parse} from '@ungap/structured-clone/json';
+
+parse(stringify({any: 'serializable'}));
+```
diff --git a/node_modules/@ungap/structured-clone/cjs/deserialize.js b/node_modules/@ungap/structured-clone/cjs/deserialize.js
new file mode 100644
index 0000000000000000000000000000000000000000..6ce37b076a7f09b731d0e7e440831cec2acbcd58
--- /dev/null
+++ b/node_modules/@ungap/structured-clone/cjs/deserialize.js
@@ -0,0 +1,97 @@
+'use strict';
+const {
+ VOID, PRIMITIVE, ARRAY, OBJECT, DATE, REGEXP, MAP, SET, ERROR, BIGINT
+} = require('./types.js');
+
+const env = typeof self === 'object' ? self : globalThis;
+
+const guard = (name, init) => {
+ switch (name) {
+ case 'Function':
+ case 'SharedWorker':
+ case 'Worker':
+ case 'eval':
+ case 'setInterval':
+ case 'setTimeout':
+ throw new TypeError('unable to deserialize ' + name);
+ }
+ return new env[name](init);
+};
+
+const deserializer = ($, _) => {
+ const as = (out, index) => {
+ $.set(index, out);
+ return out;
+ };
+
+ const unpair = index => {
+ if ($.has(index))
+ return $.get(index);
+
+ const [type, value] = _[index];
+ switch (type) {
+ case PRIMITIVE:
+ case VOID:
+ return as(value, index);
+ case ARRAY: {
+ const arr = as([], index);
+ for (const index of value)
+ arr.push(unpair(index));
+ return arr;
+ }
+ case OBJECT: {
+ const object = as({}, index);
+ for (const [key, index] of value)
+ object[unpair(key)] = unpair(index);
+ return object;
+ }
+ case DATE:
+ return as(new Date(value), index);
+ case REGEXP: {
+ const {source, flags} = value;
+ return as(new RegExp(source, flags), index);
+ }
+ case MAP: {
+ const map = as(new Map, index);
+ for (const [key, index] of value)
+ map.set(unpair(key), unpair(index));
+ return map;
+ }
+ case SET: {
+ const set = as(new Set, index);
+ for (const index of value)
+ set.add(unpair(index));
+ return set;
+ }
+ case ERROR: {
+ const {name, message} = value;
+ return as(guard(name, message), index);
+ }
+ case BIGINT:
+ return as(BigInt(value), index);
+ case 'BigInt':
+ return as(Object(BigInt(value)), index);
+ case 'ArrayBuffer':
+ return as(new Uint8Array(value).buffer, value);
+ case 'DataView': {
+ const { buffer } = new Uint8Array(value);
+ return as(new DataView(buffer), value);
+ }
+ }
+ return as(guard(type, value), index);
+ };
+
+ return unpair;
+};
+
+/**
+ * @typedef {Array} Record a type representation
+ */
+
+/**
+ * Returns a deserialized value from a serialized array of Records.
+ * @param {Record[]} serialized a previously serialized value.
+ * @returns {any}
+ */
+const deserialize = serialized => deserializer(new Map, serialized)(0);
+exports.deserialize = deserialize;
diff --git a/node_modules/@ungap/structured-clone/cjs/index.js b/node_modules/@ungap/structured-clone/cjs/index.js
new file mode 100644
index 0000000000000000000000000000000000000000..13d747c5937db606221cf597d3345dba76a26aec
--- /dev/null
+++ b/node_modules/@ungap/structured-clone/cjs/index.js
@@ -0,0 +1,27 @@
+'use strict';
+const {deserialize} = require('./deserialize.js');
+const {serialize} = require('./serialize.js');
+
+/**
+ * @typedef {Array} Record a type representation
+ */
+
+/**
+ * Returns an array of serialized Records.
+ * @param {any} any a serializable value.
+ * @param {{transfer?: any[], json?: boolean, lossy?: boolean}?} options an object with
+ * a transfer option (ignored when polyfilled) and/or non standard fields that
+ * fallback to the polyfill if present.
+ * @returns {Record[]}
+ */
+Object.defineProperty(exports, '__esModule', {value: true}).default = typeof structuredClone === "function" ?
+ /* c8 ignore start */
+ (any, options) => (
+ options && ('json' in options || 'lossy' in options) ?
+ deserialize(serialize(any, options)) : structuredClone(any)
+ ) :
+ (any, options) => deserialize(serialize(any, options));
+ /* c8 ignore stop */
+
+exports.deserialize = deserialize;
+exports.serialize = serialize;
diff --git a/node_modules/@ungap/structured-clone/cjs/json.js b/node_modules/@ungap/structured-clone/cjs/json.js
new file mode 100644
index 0000000000000000000000000000000000000000..0038dcf9ca530fe4506c0b3adec60f99d9d260c0
--- /dev/null
+++ b/node_modules/@ungap/structured-clone/cjs/json.js
@@ -0,0 +1,24 @@
+'use strict';
+/*! (c) Andrea Giammarchi - ISC */
+
+const {deserialize} = require('./deserialize.js');
+const {serialize} = require('./serialize.js');
+
+const {parse: $parse, stringify: $stringify} = JSON;
+const options = {json: true, lossy: true};
+
+/**
+ * Revive a previously stringified structured clone.
+ * @param {string} str previously stringified data as string.
+ * @returns {any} whatever was previously stringified as clone.
+ */
+const parse = str => deserialize($parse(str));
+exports.parse = parse;
+
+/**
+ * Represent a structured clone value as string.
+ * @param {any} any some clone-able value to stringify.
+ * @returns {string} the value stringified.
+ */
+const stringify = any => $stringify(serialize(any, options));
+exports.stringify = stringify;
diff --git a/node_modules/@ungap/structured-clone/cjs/package.json b/node_modules/@ungap/structured-clone/cjs/package.json
new file mode 100644
index 0000000000000000000000000000000000000000..0292b9956f2e40d6eb3d0f3998e710d973113aaa
--- /dev/null
+++ b/node_modules/@ungap/structured-clone/cjs/package.json
@@ -0,0 +1 @@
+{"type":"commonjs"}
\ No newline at end of file
diff --git a/node_modules/@ungap/structured-clone/cjs/serialize.js b/node_modules/@ungap/structured-clone/cjs/serialize.js
new file mode 100644
index 0000000000000000000000000000000000000000..59b2d38371c6c656b9a8e7d7657922b1af359a62
--- /dev/null
+++ b/node_modules/@ungap/structured-clone/cjs/serialize.js
@@ -0,0 +1,170 @@
+'use strict';
+const {
+ VOID, PRIMITIVE, ARRAY, OBJECT, DATE, REGEXP, MAP, SET, ERROR, BIGINT
+} = require('./types.js');
+
+const EMPTY = '';
+
+const {toString} = {};
+const {keys} = Object;
+
+const typeOf = value => {
+ const type = typeof value;
+ if (type !== 'object' || !value)
+ return [PRIMITIVE, type];
+
+ const asString = toString.call(value).slice(8, -1);
+ switch (asString) {
+ case 'Array':
+ return [ARRAY, EMPTY];
+ case 'Object':
+ return [OBJECT, EMPTY];
+ case 'Date':
+ return [DATE, EMPTY];
+ case 'RegExp':
+ return [REGEXP, EMPTY];
+ case 'Map':
+ return [MAP, EMPTY];
+ case 'Set':
+ return [SET, EMPTY];
+ case 'DataView':
+ return [ARRAY, asString];
+ }
+
+ if (asString.includes('Array'))
+ return [ARRAY, asString];
+
+ if (asString.includes('Error'))
+ return [ERROR, asString];
+
+ return [OBJECT, asString];
+};
+
+const shouldSkip = ([TYPE, type]) => (
+ TYPE === PRIMITIVE &&
+ (type === 'function' || type === 'symbol')
+);
+
+const serializer = (strict, json, $, _) => {
+
+ const as = (out, value) => {
+ const index = _.push(out) - 1;
+ $.set(value, index);
+ return index;
+ };
+
+ const pair = value => {
+ if ($.has(value))
+ return $.get(value);
+
+ let [TYPE, type] = typeOf(value);
+ switch (TYPE) {
+ case PRIMITIVE: {
+ let entry = value;
+ switch (type) {
+ case 'bigint':
+ TYPE = BIGINT;
+ entry = value.toString();
+ break;
+ case 'function':
+ case 'symbol':
+ if (strict)
+ throw new TypeError('unable to serialize ' + type);
+ entry = null;
+ break;
+ case 'undefined':
+ return as([VOID], value);
+ }
+ return as([TYPE, entry], value);
+ }
+ case ARRAY: {
+ if (type) {
+ let spread = value;
+ if (type === 'DataView') {
+ spread = new Uint8Array(value.buffer);
+ }
+ else if (type === 'ArrayBuffer') {
+ spread = new Uint8Array(value);
+ }
+ return as([type, [...spread]], value);
+ }
+
+ const arr = [];
+ const index = as([TYPE, arr], value);
+ for (const entry of value)
+ arr.push(pair(entry));
+ return index;
+ }
+ case OBJECT: {
+ if (type) {
+ switch (type) {
+ case 'BigInt':
+ return as([type, value.toString()], value);
+ case 'Boolean':
+ case 'Number':
+ case 'String':
+ return as([type, value.valueOf()], value);
+ }
+ }
+
+ if (json && ('toJSON' in value))
+ return pair(value.toJSON());
+
+ const entries = [];
+ const index = as([TYPE, entries], value);
+ for (const key of keys(value)) {
+ if (strict || !shouldSkip(typeOf(value[key])))
+ entries.push([pair(key), pair(value[key])]);
+ }
+ return index;
+ }
+ case DATE:
+ return as([TYPE, value.toISOString()], value);
+ case REGEXP: {
+ const {source, flags} = value;
+ return as([TYPE, {source, flags}], value);
+ }
+ case MAP: {
+ const entries = [];
+ const index = as([TYPE, entries], value);
+ for (const [key, entry] of value) {
+ if (strict || !(shouldSkip(typeOf(key)) || shouldSkip(typeOf(entry))))
+ entries.push([pair(key), pair(entry)]);
+ }
+ return index;
+ }
+ case SET: {
+ const entries = [];
+ const index = as([TYPE, entries], value);
+ for (const entry of value) {
+ if (strict || !shouldSkip(typeOf(entry)))
+ entries.push(pair(entry));
+ }
+ return index;
+ }
+ }
+
+ const {message} = value;
+ return as([TYPE, {name: type, message}], value);
+ };
+
+ return pair;
+};
+
+/**
+ * @typedef {Array} Record a type representation
+ */
+
+/**
+ * Returns an array of serialized Records.
+ * @param {any} value a serializable value.
+ * @param {{json?: boolean, lossy?: boolean}?} options an object with a `lossy` or `json` property that,
+ * if `true`, will not throw errors on incompatible types, and behave more
+ * like JSON stringify would behave. Symbol and Function will be discarded.
+ * @returns {Record[]}
+ */
+ const serialize = (value, {json, lossy} = {}) => {
+ const _ = [];
+ return serializer(!(json || lossy), !!json, new Map, _)(value), _;
+};
+exports.serialize = serialize;
diff --git a/node_modules/@ungap/structured-clone/cjs/types.js b/node_modules/@ungap/structured-clone/cjs/types.js
new file mode 100644
index 0000000000000000000000000000000000000000..8284be3d69a407829b84aea17965338d0b8efde3
--- /dev/null
+++ b/node_modules/@ungap/structured-clone/cjs/types.js
@@ -0,0 +1,22 @@
+'use strict';
+const VOID = -1;
+exports.VOID = VOID;
+const PRIMITIVE = 0;
+exports.PRIMITIVE = PRIMITIVE;
+const ARRAY = 1;
+exports.ARRAY = ARRAY;
+const OBJECT = 2;
+exports.OBJECT = OBJECT;
+const DATE = 3;
+exports.DATE = DATE;
+const REGEXP = 4;
+exports.REGEXP = REGEXP;
+const MAP = 5;
+exports.MAP = MAP;
+const SET = 6;
+exports.SET = SET;
+const ERROR = 7;
+exports.ERROR = ERROR;
+const BIGINT = 8;
+exports.BIGINT = BIGINT;
+// export const SYMBOL = 9;
diff --git a/node_modules/@ungap/structured-clone/esm/deserialize.js b/node_modules/@ungap/structured-clone/esm/deserialize.js
new file mode 100644
index 0000000000000000000000000000000000000000..440fb30152f1226c7295f37ee0c97deef9ff4884
--- /dev/null
+++ b/node_modules/@ungap/structured-clone/esm/deserialize.js
@@ -0,0 +1,98 @@
+import {
+ VOID, PRIMITIVE,
+ ARRAY, OBJECT,
+ DATE, REGEXP, MAP, SET,
+ ERROR, BIGINT
+} from './types.js';
+
+const env = typeof self === 'object' ? self : globalThis;
+
+const guard = (name, init) => {
+ switch (name) {
+ case 'Function':
+ case 'SharedWorker':
+ case 'Worker':
+ case 'eval':
+ case 'setInterval':
+ case 'setTimeout':
+ throw new TypeError('unable to deserialize ' + name);
+ }
+ return new env[name](init);
+};
+
+const deserializer = ($, _) => {
+ const as = (out, index) => {
+ $.set(index, out);
+ return out;
+ };
+
+ const unpair = index => {
+ if ($.has(index))
+ return $.get(index);
+
+ const [type, value] = _[index];
+ switch (type) {
+ case PRIMITIVE:
+ case VOID:
+ return as(value, index);
+ case ARRAY: {
+ const arr = as([], index);
+ for (const index of value)
+ arr.push(unpair(index));
+ return arr;
+ }
+ case OBJECT: {
+ const object = as({}, index);
+ for (const [key, index] of value)
+ object[unpair(key)] = unpair(index);
+ return object;
+ }
+ case DATE:
+ return as(new Date(value), index);
+ case REGEXP: {
+ const {source, flags} = value;
+ return as(new RegExp(source, flags), index);
+ }
+ case MAP: {
+ const map = as(new Map, index);
+ for (const [key, index] of value)
+ map.set(unpair(key), unpair(index));
+ return map;
+ }
+ case SET: {
+ const set = as(new Set, index);
+ for (const index of value)
+ set.add(unpair(index));
+ return set;
+ }
+ case ERROR: {
+ const {name, message} = value;
+ return as(guard(name, message), index);
+ }
+ case BIGINT:
+ return as(BigInt(value), index);
+ case 'BigInt':
+ return as(Object(BigInt(value)), index);
+ case 'ArrayBuffer':
+ return as(new Uint8Array(value).buffer, value);
+ case 'DataView': {
+ const { buffer } = new Uint8Array(value);
+ return as(new DataView(buffer), value);
+ }
+ }
+ return as(guard(type, value), index);
+ };
+
+ return unpair;
+};
+
+/**
+ * @typedef {Array} Record a type representation
+ */
+
+/**
+ * Returns a deserialized value from a serialized array of Records.
+ * @param {Record[]} serialized a previously serialized value.
+ * @returns {any}
+ */
+export const deserialize = serialized => deserializer(new Map, serialized)(0);
diff --git a/node_modules/@ungap/structured-clone/esm/index.js b/node_modules/@ungap/structured-clone/esm/index.js
new file mode 100644
index 0000000000000000000000000000000000000000..d3b47479adfc55679022b9098fa0b968fed8d818
--- /dev/null
+++ b/node_modules/@ungap/structured-clone/esm/index.js
@@ -0,0 +1,25 @@
+import {deserialize} from './deserialize.js';
+import {serialize} from './serialize.js';
+
+/**
+ * @typedef {Array} Record a type representation
+ */
+
+/**
+ * Returns an array of serialized Records.
+ * @param {any} any a serializable value.
+ * @param {{transfer?: any[], json?: boolean, lossy?: boolean}?} options an object with
+ * a transfer option (ignored when polyfilled) and/or non standard fields that
+ * fallback to the polyfill if present.
+ * @returns {Record[]}
+ */
+export default typeof structuredClone === "function" ?
+ /* c8 ignore start */
+ (any, options) => (
+ options && ('json' in options || 'lossy' in options) ?
+ deserialize(serialize(any, options)) : structuredClone(any)
+ ) :
+ (any, options) => deserialize(serialize(any, options));
+ /* c8 ignore stop */
+
+export {deserialize, serialize};
diff --git a/node_modules/@ungap/structured-clone/esm/json.js b/node_modules/@ungap/structured-clone/esm/json.js
new file mode 100644
index 0000000000000000000000000000000000000000..23eb95222d1a318faba1bffcd907b5038405ae38
--- /dev/null
+++ b/node_modules/@ungap/structured-clone/esm/json.js
@@ -0,0 +1,21 @@
+/*! (c) Andrea Giammarchi - ISC */
+
+import {deserialize} from './deserialize.js';
+import {serialize} from './serialize.js';
+
+const {parse: $parse, stringify: $stringify} = JSON;
+const options = {json: true, lossy: true};
+
+/**
+ * Revive a previously stringified structured clone.
+ * @param {string} str previously stringified data as string.
+ * @returns {any} whatever was previously stringified as clone.
+ */
+export const parse = str => deserialize($parse(str));
+
+/**
+ * Represent a structured clone value as string.
+ * @param {any} any some clone-able value to stringify.
+ * @returns {string} the value stringified.
+ */
+export const stringify = any => $stringify(serialize(any, options));
diff --git a/node_modules/@ungap/structured-clone/esm/serialize.js b/node_modules/@ungap/structured-clone/esm/serialize.js
new file mode 100644
index 0000000000000000000000000000000000000000..6286047a841fffa4019daaa8967d3a9db5725610
--- /dev/null
+++ b/node_modules/@ungap/structured-clone/esm/serialize.js
@@ -0,0 +1,171 @@
+import {
+ VOID, PRIMITIVE,
+ ARRAY, OBJECT,
+ DATE, REGEXP, MAP, SET,
+ ERROR, BIGINT
+} from './types.js';
+
+const EMPTY = '';
+
+const {toString} = {};
+const {keys} = Object;
+
+const typeOf = value => {
+ const type = typeof value;
+ if (type !== 'object' || !value)
+ return [PRIMITIVE, type];
+
+ const asString = toString.call(value).slice(8, -1);
+ switch (asString) {
+ case 'Array':
+ return [ARRAY, EMPTY];
+ case 'Object':
+ return [OBJECT, EMPTY];
+ case 'Date':
+ return [DATE, EMPTY];
+ case 'RegExp':
+ return [REGEXP, EMPTY];
+ case 'Map':
+ return [MAP, EMPTY];
+ case 'Set':
+ return [SET, EMPTY];
+ case 'DataView':
+ return [ARRAY, asString];
+ }
+
+ if (asString.includes('Array'))
+ return [ARRAY, asString];
+
+ if (asString.includes('Error'))
+ return [ERROR, asString];
+
+ return [OBJECT, asString];
+};
+
+const shouldSkip = ([TYPE, type]) => (
+ TYPE === PRIMITIVE &&
+ (type === 'function' || type === 'symbol')
+);
+
+const serializer = (strict, json, $, _) => {
+
+ const as = (out, value) => {
+ const index = _.push(out) - 1;
+ $.set(value, index);
+ return index;
+ };
+
+ const pair = value => {
+ if ($.has(value))
+ return $.get(value);
+
+ let [TYPE, type] = typeOf(value);
+ switch (TYPE) {
+ case PRIMITIVE: {
+ let entry = value;
+ switch (type) {
+ case 'bigint':
+ TYPE = BIGINT;
+ entry = value.toString();
+ break;
+ case 'function':
+ case 'symbol':
+ if (strict)
+ throw new TypeError('unable to serialize ' + type);
+ entry = null;
+ break;
+ case 'undefined':
+ return as([VOID], value);
+ }
+ return as([TYPE, entry], value);
+ }
+ case ARRAY: {
+ if (type) {
+ let spread = value;
+ if (type === 'DataView') {
+ spread = new Uint8Array(value.buffer);
+ }
+ else if (type === 'ArrayBuffer') {
+ spread = new Uint8Array(value);
+ }
+ return as([type, [...spread]], value);
+ }
+
+ const arr = [];
+ const index = as([TYPE, arr], value);
+ for (const entry of value)
+ arr.push(pair(entry));
+ return index;
+ }
+ case OBJECT: {
+ if (type) {
+ switch (type) {
+ case 'BigInt':
+ return as([type, value.toString()], value);
+ case 'Boolean':
+ case 'Number':
+ case 'String':
+ return as([type, value.valueOf()], value);
+ }
+ }
+
+ if (json && ('toJSON' in value))
+ return pair(value.toJSON());
+
+ const entries = [];
+ const index = as([TYPE, entries], value);
+ for (const key of keys(value)) {
+ if (strict || !shouldSkip(typeOf(value[key])))
+ entries.push([pair(key), pair(value[key])]);
+ }
+ return index;
+ }
+ case DATE:
+ return as([TYPE, value.toISOString()], value);
+ case REGEXP: {
+ const {source, flags} = value;
+ return as([TYPE, {source, flags}], value);
+ }
+ case MAP: {
+ const entries = [];
+ const index = as([TYPE, entries], value);
+ for (const [key, entry] of value) {
+ if (strict || !(shouldSkip(typeOf(key)) || shouldSkip(typeOf(entry))))
+ entries.push([pair(key), pair(entry)]);
+ }
+ return index;
+ }
+ case SET: {
+ const entries = [];
+ const index = as([TYPE, entries], value);
+ for (const entry of value) {
+ if (strict || !shouldSkip(typeOf(entry)))
+ entries.push(pair(entry));
+ }
+ return index;
+ }
+ }
+
+ const {message} = value;
+ return as([TYPE, {name: type, message}], value);
+ };
+
+ return pair;
+};
+
+/**
+ * @typedef {Array} Record a type representation
+ */
+
+/**
+ * Returns an array of serialized Records.
+ * @param {any} value a serializable value.
+ * @param {{json?: boolean, lossy?: boolean}?} options an object with a `lossy` or `json` property that,
+ * if `true`, will not throw errors on incompatible types, and behave more
+ * like JSON stringify would behave. Symbol and Function will be discarded.
+ * @returns {Record[]}
+ */
+ export const serialize = (value, {json, lossy} = {}) => {
+ const _ = [];
+ return serializer(!(json || lossy), !!json, new Map, _)(value), _;
+};
diff --git a/node_modules/@ungap/structured-clone/esm/types.js b/node_modules/@ungap/structured-clone/esm/types.js
new file mode 100644
index 0000000000000000000000000000000000000000..50e60ca067667f4df09393a3898137f0c933604e
--- /dev/null
+++ b/node_modules/@ungap/structured-clone/esm/types.js
@@ -0,0 +1,11 @@
+export const VOID = -1;
+export const PRIMITIVE = 0;
+export const ARRAY = 1;
+export const OBJECT = 2;
+export const DATE = 3;
+export const REGEXP = 4;
+export const MAP = 5;
+export const SET = 6;
+export const ERROR = 7;
+export const BIGINT = 8;
+// export const SYMBOL = 9;
diff --git a/node_modules/@ungap/structured-clone/package.json b/node_modules/@ungap/structured-clone/package.json
new file mode 100644
index 0000000000000000000000000000000000000000..3adc31103dafff9d76867959dd226062fca27a9e
--- /dev/null
+++ b/node_modules/@ungap/structured-clone/package.json
@@ -0,0 +1,54 @@
+{
+ "name": "@ungap/structured-clone",
+ "version": "1.3.1",
+ "description": "A structuredClone polyfill",
+ "main": "./cjs/index.js",
+ "scripts": {
+ "build": "npm run cjs && npm run rollup:json && npm run test",
+ "cjs": "ascjs esm cjs",
+ "coverage": "c8 report --reporter=text-lcov > ./coverage/lcov.info",
+ "rollup:json": "rollup --config rollup/json.config.js",
+ "test": "c8 node test/index.js"
+ },
+ "keywords": [
+ "recursion",
+ "structured",
+ "clone",
+ "algorithm"
+ ],
+ "author": "Andrea Giammarchi",
+ "license": "ISC",
+ "devDependencies": {
+ "@rollup/plugin-node-resolve": "^16.0.3",
+ "@rollup/plugin-terser": "^1.0.0",
+ "ascjs": "^6.0.3",
+ "c8": "^11.0.0",
+ "coveralls": "^3.1.1",
+ "rollup": "^4.60.3"
+ },
+ "module": "./esm/index.js",
+ "type": "module",
+ "sideEffects": false,
+ "exports": {
+ ".": {
+ "import": "./esm/index.js",
+ "default": "./cjs/index.js"
+ },
+ "./json": {
+ "import": "./esm/json.js",
+ "default": "./cjs/json.js"
+ },
+ "./package.json": "./package.json"
+ },
+ "directories": {
+ "test": "test"
+ },
+ "repository": {
+ "type": "git",
+ "url": "git+https://github.com/ungap/structured-clone.git"
+ },
+ "bugs": {
+ "url": "https://github.com/ungap/structured-clone/issues"
+ },
+ "homepage": "https://github.com/ungap/structured-clone#readme"
+}
diff --git a/node_modules/@ungap/structured-clone/structured-json.js b/node_modules/@ungap/structured-clone/structured-json.js
new file mode 100644
index 0000000000000000000000000000000000000000..81373cf4a595d659a4fb2cf299374e618068a8c7
--- /dev/null
+++ b/node_modules/@ungap/structured-clone/structured-json.js
@@ -0,0 +1 @@
+var StructuredJSON=function(e){"use strict";const r="object"==typeof self?self:globalThis,t=(e,t)=>{switch(e){case"Function":case"SharedWorker":case"Worker":case"eval":case"setInterval":case"setTimeout":throw new TypeError("unable to deserialize "+e)}return new r[e](t)},n=e=>((e,r)=>{const n=(r,t)=>(e.set(t,r),r),s=c=>{if(e.has(c))return e.get(c);const[a,o]=r[c];switch(a){case 0:case-1:return n(o,c);case 1:{const e=n([],c);for(const r of o)e.push(s(r));return e}case 2:{const e=n({},c);for(const[r,t]of o)e[s(r)]=s(t);return e}case 3:return n(new Date(o),c);case 4:{const{source:e,flags:r}=o;return n(new RegExp(e,r),c)}case 5:{const e=n(new Map,c);for(const[r,t]of o)e.set(s(r),s(t));return e}case 6:{const e=n(new Set,c);for(const r of o)e.add(s(r));return e}case 7:{const{name:e,message:r}=o;return n(t(e,r),c)}case 8:return n(BigInt(o),c);case"BigInt":return n(Object(BigInt(o)),c);case"ArrayBuffer":return n(new Uint8Array(o).buffer,o);case"DataView":{const{buffer:e}=new Uint8Array(o);return n(new DataView(e),o)}}return n(t(a,o),c)};return s})(new Map,e)(0),s="",{toString:c}={},{keys:a}=Object,o=e=>{const r=typeof e;if("object"!==r||!e)return[0,r];const t=c.call(e).slice(8,-1);switch(t){case"Array":return[1,s];case"Object":return[2,s];case"Date":return[3,s];case"RegExp":return[4,s];case"Map":return[5,s];case"Set":return[6,s];case"DataView":return[1,t]}return t.includes("Array")?[1,t]:t.includes("Error")?[7,t]:[2,t]},u=([e,r])=>0===e&&("function"===r||"symbol"===r),i=(e,{json:r,lossy:t}={})=>{const n=[];return((e,r,t,n)=>{const s=(e,r)=>{const s=n.push(e)-1;return t.set(r,s),s},c=n=>{if(t.has(n))return t.get(n);let[i,f]=o(n);switch(i){case 0:{let r=n;switch(f){case"bigint":i=8,r=n.toString();break;case"function":case"symbol":if(e)throw new TypeError("unable to serialize "+f);r=null;break;case"undefined":return s([-1],n)}return s([i,r],n)}case 1:{if(f){let e=n;return"DataView"===f?e=new Uint8Array(n.buffer):"ArrayBuffer"===f&&(e=new Uint8Array(n)),s([f,[...e]],n)}const e=[],r=s([i,e],n);for(const r of n)e.push(c(r));return r}case 2:{if(f)switch(f){case"BigInt":return s([f,n.toString()],n);case"Boolean":case"Number":case"String":return s([f,n.valueOf()],n)}if(r&&"toJSON"in n)return c(n.toJSON());const t=[],l=s([i,t],n);for(const r of a(n))!e&&u(o(n[r]))||t.push([c(r),c(n[r])]);return l}case 3:return s([i,n.toISOString()],n);case 4:{const{source:e,flags:r}=n;return s([i,{source:e,flags:r}],n)}case 5:{const r=[],t=s([i,r],n);for(const[t,s]of n)(e||!u(o(t))&&!u(o(s)))&&r.push([c(t),c(s)]);return t}case 6:{const r=[],t=s([i,r],n);for(const t of n)!e&&u(o(t))||r.push(c(t));return t}}const{message:l}=n;return s([i,{name:f,message:l}],n)};return c})(!(r||t),!!r,new Map,n)(e),n},{parse:f,stringify:l}=JSON,w={json:!0,lossy:!0};return e.parse=e=>n(f(e)),e.stringify=e=>l(i(e,w)),e}({});
diff --git a/node_modules/@vitejs/plugin-react/LICENSE b/node_modules/@vitejs/plugin-react/LICENSE
new file mode 100644
index 0000000000000000000000000000000000000000..9c1b313d7b18166024d52473b2ed645f5b4e64dd
--- /dev/null
+++ b/node_modules/@vitejs/plugin-react/LICENSE
@@ -0,0 +1,21 @@
+MIT License
+
+Copyright (c) 2019-present, Yuxi (Evan) You and Vite contributors
+
+Permission is hereby granted, free of charge, to any person obtaining a copy
+of this software and associated documentation files (the "Software"), to deal
+in the Software without restriction, including without limitation the rights
+to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
+copies of the Software, and to permit persons to whom the Software is
+furnished to do so, subject to the following conditions:
+
+The above copyright notice and this permission notice shall be included in all
+copies or substantial portions of the Software.
+
+THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
+AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
+LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
+OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
+SOFTWARE.
diff --git a/node_modules/@vitejs/plugin-react/README.md b/node_modules/@vitejs/plugin-react/README.md
new file mode 100644
index 0000000000000000000000000000000000000000..8556cace7610f68c2852209b8977158a820421af
--- /dev/null
+++ b/node_modules/@vitejs/plugin-react/README.md
@@ -0,0 +1,169 @@
+# @vitejs/plugin-react [](https://npmjs.com/package/@vitejs/plugin-react)
+
+The default Vite plugin for React projects.
+
+- enable [Fast Refresh](https://www.npmjs.com/package/react-refresh) in development (requires react >= 16.9)
+- use the [automatic JSX runtime](https://legacy.reactjs.org/blog/2020/09/22/introducing-the-new-jsx-transform.html)
+- small installation size
+
+```js
+// vite.config.js
+import { defineConfig } from 'vite'
+import react from '@vitejs/plugin-react'
+
+export default defineConfig({
+ plugins: [react()],
+})
+```
+
+## Options
+
+### include
+
+Includes `.js`, `.jsx`, `.ts` & `.tsx` by default. This option can be used to add fast refresh to `.mdx` files:
+
+```js
+import { defineConfig } from 'vite'
+import react from '@vitejs/plugin-react'
+import mdx from '@mdx-js/rollup'
+
+export default defineConfig({
+ plugins: [
+ { enforce: 'pre', ...mdx() },
+ react({ include: /\.(mdx|js|jsx|ts|tsx)$/ }),
+ ],
+})
+```
+
+### exclude
+
+The default value is `/node_modules/`. You may use it to exclude JSX/TSX files that runs in a worker or are not React files.
+Except if explicitly desired, you should keep `node_modules` in the exclude list:
+
+```js
+import { defineConfig } from 'vite'
+import react from '@vitejs/plugin-react'
+
+export default defineConfig({
+ plugins: [
+ react({ exclude: [/\/pdf\//, /\.solid\.tsx$/, /\/node_modules\//] }),
+ ],
+})
+```
+
+### jsxImportSource
+
+Control where the JSX factory is imported from. By default, this is inferred from `jsxImportSource` from corresponding a tsconfig file for a transformed file.
+
+```js
+react({ jsxImportSource: '@emotion/react' })
+```
+
+### jsxRuntime
+
+By default, the plugin uses the [automatic JSX runtime](https://legacy.reactjs.org/blog/2020/09/22/introducing-the-new-jsx-transform.html). However, if you encounter any issues, you may opt out using the `jsxRuntime` option.
+
+```js
+react({ jsxRuntime: 'classic' })
+```
+
+### reactRefreshHost
+
+The `reactRefreshHost` option is only necessary in a module federation context. It enables HMR to work between a remote & host application. In your remote Vite config, you would add your host origin:
+
+```js
+react({ reactRefreshHost: 'http://localhost:3000' })
+```
+
+Under the hood, this simply updates the React Fash Refresh runtime URL from `/@react-refresh` to `http://localhost:3000/@react-refresh` to ensure there is only one Refresh runtime across the whole application. Note that if you define `base` option in the host application, you need to include it in the option, like: `http://localhost:3000/{base}`.
+
+## React Compiler
+
+[React Compiler](https://react.dev/learn/react-compiler) support is available via the exported `reactCompilerPreset` helper, which requires [`@rolldown/plugin-babel`](https://npmx.dev/package/@rolldown/plugin-babel) and [`babel-plugin-react-compiler`](https://npmx.dev/package/babel-plugin-react-compiler) and [`@babel/core`](https://npmx.dev/package/@babel/core) as peer dependencies:
+
+```sh
+npm install -D @rolldown/plugin-babel @babel/core babel-plugin-react-compiler
+```
+
+If you are using TypeScript, you will also need to install [`@types/babel__core`](https://npmx.dev/package/@types/babel__core):
+
+```sh
+npm install -D @types/babel__core
+```
+
+```js
+// vite.config.js
+import { defineConfig } from 'vite'
+import react, { reactCompilerPreset } from '@vitejs/plugin-react'
+import babel from '@rolldown/plugin-babel'
+
+export default defineConfig({
+ plugins: [react(), babel({ presets: [reactCompilerPreset()] })],
+})
+```
+
+The `reactCompilerPreset` accepts an optional options object with the following properties:
+
+- `compilationMode` — Set to `'annotation'` to only compile components annotated with `"use memo"`.
+- `target` — Set to `'17'` or `'18'` to target older React versions (uses `react-compiler-runtime` instead of `react/compiler-runtime`).
+
+Additional options can be found in the [documentation](https://react.dev/reference/react-compiler/configuration).
+
+```js
+babel({
+ presets: [reactCompilerPreset({ compilationMode: 'annotation' })],
+})
+```
+
+> [!TIP]
+>
+> `reactCompilerPreset` is only a convenient helper with a preconfigured filter. You can configure override the filters to fit your project structure or code. For example, if you know a large portion of your files are never React/hook-related or won't benefit from the React Compiler, you can aggressively exclude them via `rolldown.filter`:
+>
+> ```js
+> const myPreset = reactCompilerPreset()
+> myPreset.rolldown.filter.id.exclude = ['src/legacy/**', 'src/utils/**']
+>
+> babel({
+> presets: [myPreset],
+> })
+> ```
+
+## `@vitejs/plugin-react/preamble`
+
+The package provides `@vitejs/plugin-react/preamble` to initialize HMR runtime from client entrypoint for SSR applications which don't use [`transformIndexHtml` API](https://vite.dev/guide/api-javascript.html#vitedevserver). For example:
+
+```js
+// [entry.client.js]
+import '@vitejs/plugin-react/preamble'
+```
+
+Alternatively, you can manually call `transformIndexHtml` during SSR, which sets up equivalent initialization code. Here's an example for an Express server:
+
+```js
+app.get('/', async (req, res, next) => {
+ try {
+ let html = fs.readFileSync(path.resolve(root, 'index.html'), 'utf-8')
+
+ // Transform HTML using Vite plugins.
+ html = await viteServer.transformIndexHtml(req.url, html)
+
+ res.send(html)
+ } catch (e) {
+ return next(e)
+ }
+})
+```
+
+Otherwise, you'll get the following error:
+
+```
+Uncaught Error: @vitejs/plugin-react can't detect preamble. Something is wrong.
+```
+
+## Consistent components exports
+
+For React refresh to work correctly, your file should only export React components. You can find a good explanation in the [Gatsby docs](https://www.gatsbyjs.com/docs/reference/local-development/fast-refresh/#how-it-works).
+
+If an incompatible change in exports is found, the module will be invalidated and HMR will propagate. To make it easier to export simple constants alongside your component, the module is only invalidated when their value changes.
+
+You can catch mistakes and get more detailed warnings with this [ESLint rule](https://github.com/ArnaudBarre/eslint-plugin-react-refresh), or the equivalent [Oxlint rule](https://oxc.rs/docs/guide/usage/linter/rules/react/only-export-components.html).
diff --git a/node_modules/@vitejs/plugin-react/package.json b/node_modules/@vitejs/plugin-react/package.json
new file mode 100644
index 0000000000000000000000000000000000000000..ed7f7d68a86b8028371d34a411d601a592711c4d
--- /dev/null
+++ b/node_modules/@vitejs/plugin-react/package.json
@@ -0,0 +1,87 @@
+{
+ "name": "@vitejs/plugin-react",
+ "version": "6.0.2",
+ "description": "The default Vite plugin for React projects",
+ "keywords": [
+ "fast refresh",
+ "react",
+ "react-refresh",
+ "vite",
+ "vite-plugin"
+ ],
+ "homepage": "https://github.com/vitejs/vite-plugin-react/tree/main/packages/plugin-react#readme",
+ "bugs": {
+ "url": "https://github.com/vitejs/vite-plugin-react/issues"
+ },
+ "license": "MIT",
+ "author": "Evan You",
+ "contributors": [
+ "Alec Larson",
+ "Arnaud Barré"
+ ],
+ "repository": {
+ "type": "git",
+ "url": "git+https://github.com/vitejs/vite-plugin-react.git",
+ "directory": "packages/plugin-react"
+ },
+ "files": [
+ "dist",
+ "types"
+ ],
+ "type": "module",
+ "imports": {
+ "#optionalTypes": "./types/optionalTypes.d.ts"
+ },
+ "exports": {
+ ".": "./dist/index.js",
+ "./preamble": "./types/preamble.d.ts"
+ },
+ "scripts": {
+ "dev": "tsdown --watch ./src --watch ../common",
+ "build": "tsdown",
+ "prepublishOnly": "npm run build",
+ "test-unit": "vitest run"
+ },
+ "dependencies": {
+ "@rolldown/pluginutils": "^1.0.0"
+ },
+ "devDependencies": {
+ "@babel/core": "8.0.0-rc.4",
+ "@rolldown/plugin-babel": "^0.2.3",
+ "@vitejs/react-common": "workspace:*",
+ "babel-plugin-react-compiler": "^1.0.0",
+ "react": "^19.2.6",
+ "react-dom": "^19.2.6",
+ "rolldown": "^1.0.0",
+ "tsdown": "^0.22.0",
+ "vite": "^8.0.11"
+ },
+ "peerDependencies": {
+ "@rolldown/plugin-babel": "^0.1.7 || ^0.2.0",
+ "babel-plugin-react-compiler": "^1.0.0",
+ "vite": "^8.0.0"
+ },
+ "peerDependenciesMeta": {
+ "@rolldown/plugin-babel": {
+ "optional": true
+ },
+ "babel-plugin-react-compiler": {
+ "optional": true
+ }
+ },
+ "engines": {
+ "node": "^20.19.0 || >=22.12.0"
+ },
+ "compatiblePackages": {
+ "schemaVersion": 1,
+ "rolldown": {
+ "type": "compatible",
+ "versions": "^1.0.0",
+ "note": "You can use Rolldown's built-in feature directly."
+ },
+ "rollup": {
+ "type": "incompatible",
+ "reason": "Uses Rolldown-specific APIs or Vite-specific APIs"
+ }
+ }
+}
diff --git a/node_modules/@vitejs/plugin-react/types/optionalTypes.d.ts b/node_modules/@vitejs/plugin-react/types/optionalTypes.d.ts
new file mode 100644
index 0000000000000000000000000000000000000000..f780e933f9c9204038c5dc4ed2664c672097fd92
--- /dev/null
+++ b/node_modules/@vitejs/plugin-react/types/optionalTypes.d.ts
@@ -0,0 +1,12 @@
+/* eslint-disable @typescript-eslint/ban-ts-comment */
+
+// @ts-ignore --- `@rolldown/plugin-babel` is an optional peer dependency, so this may cause an error
+import type * as pluginBabel from '@rolldown/plugin-babel'
+// @ts-ignore --- `babel-plugin-react-compiler` is an optional peer dependency, so this may cause an error
+import type * as babelPluginReactCompiler from 'babel-plugin-react-compiler'
+
+// @ts-ignore --- `@rolldown/plugin-babel` is an optional peer dependency, so this may cause an error
+export type RolldownBabelPreset = pluginBabel.RolldownBabelPreset
+// @ts-ignore --- `babel-plugin-react-compiler` is an optional peer dependency, so this may cause an error
+export type ReactCompilerBabelPluginOptions =
+ babelPluginReactCompiler.PluginOptions
diff --git a/node_modules/@vitejs/plugin-react/types/preamble.d.ts b/node_modules/@vitejs/plugin-react/types/preamble.d.ts
new file mode 100644
index 0000000000000000000000000000000000000000..336ce12bb9106afdf843063ee67c0c1970f70d37
--- /dev/null
+++ b/node_modules/@vitejs/plugin-react/types/preamble.d.ts
@@ -0,0 +1 @@
+export {}
diff --git a/node_modules/@vitest/coverage-istanbul/LICENSE b/node_modules/@vitest/coverage-istanbul/LICENSE
new file mode 100644
index 0000000000000000000000000000000000000000..0e5771dddf4e96ebc77c349f53fc763b910e63c0
--- /dev/null
+++ b/node_modules/@vitest/coverage-istanbul/LICENSE
@@ -0,0 +1,21 @@
+MIT License
+
+Copyright (c) 2021-Present VoidZero Inc. and Vitest contributors
+
+Permission is hereby granted, free of charge, to any person obtaining a copy
+of this software and associated documentation files (the "Software"), to deal
+in the Software without restriction, including without limitation the rights
+to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
+copies of the Software, and to permit persons to whom the Software is
+furnished to do so, subject to the following conditions:
+
+The above copyright notice and this permission notice shall be included in all
+copies or substantial portions of the Software.
+
+THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
+AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
+LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
+OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
+SOFTWARE.
diff --git a/node_modules/@vitest/coverage-istanbul/README.md b/node_modules/@vitest/coverage-istanbul/README.md
new file mode 100644
index 0000000000000000000000000000000000000000..92720622039737e23d9feb89fadfdb0e9349a3a0
--- /dev/null
+++ b/node_modules/@vitest/coverage-istanbul/README.md
@@ -0,0 +1,30 @@
+# @vitest/coverage-istanbul
+
+[](https://npmx.dev/package/@vitest/coverage-istanbul)
+
+Vitest coverage provider that instruments code coverage via [istanbul](https://istanbul.js.org/).
+
+## Installation
+
+After installing the package, specify `istanbul` in the `coverage.provider` field of your Vitest configuration:
+
+```ts
+// vitest.config.ts
+import { defineConfig } from 'vitest/config'
+
+export default defineConfig({
+ test: {
+ coverage: {
+ provider: 'istanbul',
+ },
+ },
+})
+```
+
+Then run Vitest with coverage:
+
+```sh
+npx vitest --coverage
+```
+
+[GitHub](https://github.com/vitest-dev/vitest/tree/main/packages/coverage-istanbul) | [Documentation](https://vitest.dev/guide/coverage)
diff --git a/node_modules/@vitest/coverage-istanbul/package.json b/node_modules/@vitest/coverage-istanbul/package.json
new file mode 100644
index 0000000000000000000000000000000000000000..8ae6c6fe803babd7dfbd628748bfe9816f638544
--- /dev/null
+++ b/node_modules/@vitest/coverage-istanbul/package.json
@@ -0,0 +1,69 @@
+{
+ "name": "@vitest/coverage-istanbul",
+ "type": "module",
+ "version": "4.1.9",
+ "description": "Istanbul coverage provider for Vitest",
+ "author": "Anthony Fu ",
+ "license": "MIT",
+ "funding": "https://opencollective.com/vitest",
+ "homepage": "https://vitest.dev/guide/coverage",
+ "repository": {
+ "type": "git",
+ "url": "git+https://github.com/vitest-dev/vitest.git",
+ "directory": "packages/coverage-istanbul"
+ },
+ "bugs": {
+ "url": "https://github.com/vitest-dev/vitest/issues"
+ },
+ "keywords": [
+ "vite",
+ "vitest",
+ "test",
+ "coverage",
+ "istanbul"
+ ],
+ "sideEffects": false,
+ "exports": {
+ ".": {
+ "types": "./dist/index.d.ts",
+ "default": "./dist/index.js"
+ },
+ "./*": "./*"
+ },
+ "main": "./dist/index.js",
+ "module": "./dist/index.js",
+ "types": "./dist/index.d.ts",
+ "files": [
+ "dist"
+ ],
+ "peerDependencies": {
+ "vitest": "4.1.9"
+ },
+ "dependencies": {
+ "@babel/core": "^7.29.0",
+ "@istanbuljs/schema": "^0.1.3",
+ "@jridgewell/gen-mapping": "^0.3.13",
+ "@jridgewell/trace-mapping": "0.3.31",
+ "istanbul-lib-coverage": "^3.2.2",
+ "istanbul-lib-report": "^3.0.1",
+ "istanbul-reports": "^3.2.0",
+ "magicast": "^0.5.2",
+ "obug": "^2.1.1",
+ "tinyrainbow": "^3.1.0"
+ },
+ "devDependencies": {
+ "@types/istanbul-lib-coverage": "^2.0.6",
+ "@types/istanbul-lib-instrument": "^1.7.8",
+ "@types/istanbul-lib-report": "^3.0.3",
+ "@types/istanbul-lib-source-maps": "^4.0.4",
+ "@types/istanbul-reports": "^3.0.4",
+ "istanbul-lib-instrument": "^6.0.3",
+ "istanbul-lib-source-maps": "^5.0.6",
+ "pathe": "^2.0.3",
+ "vitest": "4.1.9"
+ },
+ "scripts": {
+ "build": "premove dist && rollup -c",
+ "dev": "rollup -c --watch --watch.include 'src/**'"
+ }
+}
\ No newline at end of file
diff --git a/node_modules/@vitest/coverage-v8/LICENSE b/node_modules/@vitest/coverage-v8/LICENSE
new file mode 100644
index 0000000000000000000000000000000000000000..0e5771dddf4e96ebc77c349f53fc763b910e63c0
--- /dev/null
+++ b/node_modules/@vitest/coverage-v8/LICENSE
@@ -0,0 +1,21 @@
+MIT License
+
+Copyright (c) 2021-Present VoidZero Inc. and Vitest contributors
+
+Permission is hereby granted, free of charge, to any person obtaining a copy
+of this software and associated documentation files (the "Software"), to deal
+in the Software without restriction, including without limitation the rights
+to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
+copies of the Software, and to permit persons to whom the Software is
+furnished to do so, subject to the following conditions:
+
+The above copyright notice and this permission notice shall be included in all
+copies or substantial portions of the Software.
+
+THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
+AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
+LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
+OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
+SOFTWARE.
diff --git a/node_modules/@vitest/coverage-v8/README.md b/node_modules/@vitest/coverage-v8/README.md
new file mode 100644
index 0000000000000000000000000000000000000000..452c7fc1e0d245776f4f1fceb48014110091433b
--- /dev/null
+++ b/node_modules/@vitest/coverage-v8/README.md
@@ -0,0 +1,30 @@
+# @vitest/coverage-v8
+
+[](https://npmx.dev/package/@vitest/coverage-v8)
+
+Vitest coverage provider that supports native code coverage via [v8](https://v8.dev/blog/javascript-code-coverage).
+
+## Installation
+
+After installing the package, specify `v8` in the `coverage.provider` field of your Vitest configuration (or leave it empty as it is the default provider):
+
+```ts
+// vitest.config.ts
+import { defineConfig } from 'vitest/config'
+
+export default defineConfig({
+ test: {
+ coverage: {
+ provider: 'v8',
+ },
+ },
+})
+```
+
+Then run Vitest with coverage:
+
+```sh
+npx vitest --coverage
+```
+
+[GitHub](https://github.com/vitest-dev/vitest/tree/main/packages/coverage-v8) | [Documentation](https://vitest.dev/guide/coverage)
diff --git a/node_modules/@vitest/coverage-v8/package.json b/node_modules/@vitest/coverage-v8/package.json
new file mode 100644
index 0000000000000000000000000000000000000000..332f3692bd5c3dd68eb0ed51b9329aca0956d527
--- /dev/null
+++ b/node_modules/@vitest/coverage-v8/package.json
@@ -0,0 +1,77 @@
+{
+ "name": "@vitest/coverage-v8",
+ "type": "module",
+ "version": "4.1.9",
+ "description": "V8 coverage provider for Vitest",
+ "author": "Anthony Fu ",
+ "license": "MIT",
+ "funding": "https://opencollective.com/vitest",
+ "homepage": "https://vitest.dev/guide/coverage",
+ "repository": {
+ "type": "git",
+ "url": "git+https://github.com/vitest-dev/vitest.git",
+ "directory": "packages/coverage-v8"
+ },
+ "bugs": {
+ "url": "https://github.com/vitest-dev/vitest/issues"
+ },
+ "keywords": [
+ "vite",
+ "vitest",
+ "test",
+ "coverage",
+ "v8"
+ ],
+ "sideEffects": false,
+ "exports": {
+ ".": {
+ "types": "./dist/index.d.ts",
+ "default": "./dist/index.js"
+ },
+ "./browser": {
+ "types": "./dist/browser.d.ts",
+ "default": "./dist/browser.js"
+ },
+ "./*": "./*"
+ },
+ "main": "./dist/index.js",
+ "module": "./dist/index.js",
+ "types": "./dist/index.d.ts",
+ "files": [
+ "dist"
+ ],
+ "peerDependencies": {
+ "@vitest/browser": "4.1.9",
+ "vitest": "4.1.9"
+ },
+ "peerDependenciesMeta": {
+ "@vitest/browser": {
+ "optional": true
+ }
+ },
+ "dependencies": {
+ "@bcoe/v8-coverage": "^1.0.2",
+ "ast-v8-to-istanbul": "^1.0.0",
+ "istanbul-lib-coverage": "^3.2.2",
+ "istanbul-lib-report": "^3.0.1",
+ "istanbul-reports": "^3.2.0",
+ "magicast": "^0.5.2",
+ "obug": "^2.1.1",
+ "std-env": "^4.0.0-rc.1",
+ "tinyrainbow": "^3.1.0",
+ "@vitest/utils": "4.1.9"
+ },
+ "devDependencies": {
+ "@types/istanbul-lib-coverage": "^2.0.6",
+ "@types/istanbul-lib-report": "^3.0.3",
+ "@types/istanbul-reports": "^3.0.4",
+ "pathe": "^2.0.3",
+ "@vitest/browser-playwright": "4.1.9",
+ "@vitest/browser": "4.1.9",
+ "vitest": "4.1.9"
+ },
+ "scripts": {
+ "build": "premove dist && rollup -c",
+ "dev": "rollup -c --watch --watch.include 'src/**'"
+ }
+}
\ No newline at end of file
diff --git a/node_modules/@vitest/expect/LICENSE b/node_modules/@vitest/expect/LICENSE
new file mode 100644
index 0000000000000000000000000000000000000000..0e5771dddf4e96ebc77c349f53fc763b910e63c0
--- /dev/null
+++ b/node_modules/@vitest/expect/LICENSE
@@ -0,0 +1,21 @@
+MIT License
+
+Copyright (c) 2021-Present VoidZero Inc. and Vitest contributors
+
+Permission is hereby granted, free of charge, to any person obtaining a copy
+of this software and associated documentation files (the "Software"), to deal
+in the Software without restriction, including without limitation the rights
+to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
+copies of the Software, and to permit persons to whom the Software is
+furnished to do so, subject to the following conditions:
+
+The above copyright notice and this permission notice shall be included in all
+copies or substantial portions of the Software.
+
+THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
+AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
+LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
+OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
+SOFTWARE.
diff --git a/node_modules/@vitest/expect/README.md b/node_modules/@vitest/expect/README.md
new file mode 100644
index 0000000000000000000000000000000000000000..d3c72567dfa1801afc71d2118d76c7b8e521b88a
--- /dev/null
+++ b/node_modules/@vitest/expect/README.md
@@ -0,0 +1,25 @@
+# @vitest/expect
+
+[](https://npmx.dev/package/@vitest/runner)
+
+Jest's expect matchers as a Chai plugin.
+
+## Usage
+
+```js
+import {
+ JestAsymmetricMatchers,
+ JestChaiExpect,
+ JestExtend,
+} from '@vitest/expect'
+import * as chai from 'chai'
+
+// allows using expect.extend instead of chai.use to extend plugins
+chai.use(JestExtend)
+// adds all jest matchers to expect
+chai.use(JestChaiExpect)
+// adds asymmetric matchers like stringContaining, objectContaining
+chai.use(JestAsymmetricMatchers)
+```
+
+[GitHub](https://github.com/vitest-dev/vitest/tree/main/packages/expect) | [Documentation](https://vitest.dev/api/expect)
diff --git a/node_modules/@vitest/expect/package.json b/node_modules/@vitest/expect/package.json
new file mode 100644
index 0000000000000000000000000000000000000000..23b9f107b1e3b86fbc22b92d12a5fd24f8bfcc9b
--- /dev/null
+++ b/node_modules/@vitest/expect/package.json
@@ -0,0 +1,52 @@
+{
+ "name": "@vitest/expect",
+ "type": "module",
+ "version": "4.1.9",
+ "description": "Jest's expect matchers as a Chai plugin",
+ "license": "MIT",
+ "funding": "https://opencollective.com/vitest",
+ "homepage": "https://vitest.dev/api/expect",
+ "repository": {
+ "type": "git",
+ "url": "git+https://github.com/vitest-dev/vitest.git",
+ "directory": "packages/expect"
+ },
+ "bugs": {
+ "url": "https://github.com/vitest-dev/vitest/issues"
+ },
+ "keywords": [
+ "vitest",
+ "test",
+ "chai",
+ "assertion"
+ ],
+ "sideEffects": false,
+ "exports": {
+ ".": {
+ "types": "./dist/index.d.ts",
+ "default": "./dist/index.js"
+ },
+ "./*": "./*"
+ },
+ "main": "./dist/index.js",
+ "module": "./dist/index.js",
+ "types": "./dist/index.d.ts",
+ "files": [
+ "dist"
+ ],
+ "dependencies": {
+ "@standard-schema/spec": "^1.1.0",
+ "@types/chai": "^5.2.2",
+ "chai": "^6.2.2",
+ "tinyrainbow": "^3.1.0",
+ "@vitest/spy": "4.1.9",
+ "@vitest/utils": "4.1.9"
+ },
+ "devDependencies": {
+ "@vitest/runner": "4.1.9"
+ },
+ "scripts": {
+ "build": "premove dist && rollup -c",
+ "dev": "rollup -c --watch"
+ }
+}
\ No newline at end of file
diff --git a/node_modules/@vitest/mocker/LICENSE b/node_modules/@vitest/mocker/LICENSE
new file mode 100644
index 0000000000000000000000000000000000000000..0e5771dddf4e96ebc77c349f53fc763b910e63c0
--- /dev/null
+++ b/node_modules/@vitest/mocker/LICENSE
@@ -0,0 +1,21 @@
+MIT License
+
+Copyright (c) 2021-Present VoidZero Inc. and Vitest contributors
+
+Permission is hereby granted, free of charge, to any person obtaining a copy
+of this software and associated documentation files (the "Software"), to deal
+in the Software without restriction, including without limitation the rights
+to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
+copies of the Software, and to permit persons to whom the Software is
+furnished to do so, subject to the following conditions:
+
+The above copyright notice and this permission notice shall be included in all
+copies or substantial portions of the Software.
+
+THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
+AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
+LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
+OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
+SOFTWARE.
diff --git a/node_modules/@vitest/mocker/README.md b/node_modules/@vitest/mocker/README.md
new file mode 100644
index 0000000000000000000000000000000000000000..dae8292f63da0913249fd1866f1479a26c30218f
--- /dev/null
+++ b/node_modules/@vitest/mocker/README.md
@@ -0,0 +1,7 @@
+# @vitest/mocker
+
+[](https://npmx.dev/package/@vitest/mocker)
+
+Vitest's module mocker implementation.
+
+[GitHub](https://github.com/vitest-dev/vitest/blob/main/packages/mocker/) | [Documentation](https://github.com/vitest-dev/vitest/blob/main/packages/mocker/EXPORTS.md)
diff --git a/node_modules/@vitest/mocker/package.json b/node_modules/@vitest/mocker/package.json
new file mode 100644
index 0000000000000000000000000000000000000000..fd26338b101e20d37cdca62c612fb6585ce3c19b
--- /dev/null
+++ b/node_modules/@vitest/mocker/package.json
@@ -0,0 +1,97 @@
+{
+ "name": "@vitest/mocker",
+ "type": "module",
+ "version": "4.1.9",
+ "description": "Vitest module mocker implementation",
+ "license": "MIT",
+ "funding": "https://opencollective.com/vitest",
+ "homepage": "https://github.com/vitest-dev/vitest/tree/main/packages/mocker",
+ "repository": {
+ "type": "git",
+ "url": "git+https://github.com/vitest-dev/vitest.git",
+ "directory": "packages/mocker"
+ },
+ "bugs": {
+ "url": "https://github.com/vitest-dev/vitest/issues"
+ },
+ "keywords": [
+ "vitest",
+ "test",
+ "mock"
+ ],
+ "sideEffects": false,
+ "exports": {
+ ".": {
+ "types": "./dist/index.d.ts",
+ "default": "./dist/index.js"
+ },
+ "./node": {
+ "types": "./dist/node.d.ts",
+ "default": "./dist/node.js"
+ },
+ "./browser": {
+ "types": "./dist/browser.d.ts",
+ "default": "./dist/browser.js"
+ },
+ "./redirect": {
+ "types": "./dist/redirect.d.ts",
+ "default": "./dist/redirect.js"
+ },
+ "./automock": {
+ "types": "./dist/automock.d.ts",
+ "default": "./dist/automock.js"
+ },
+ "./register": {
+ "types": "./dist/register.d.ts",
+ "default": "./dist/register.js"
+ },
+ "./auto-register": {
+ "types": "./dist/register.d.ts",
+ "default": "./dist/register.js"
+ },
+ "./transforms": {
+ "types": "./dist/transforms.d.ts",
+ "default": "./dist/transforms.js"
+ },
+ "./package.json": "./package.json"
+ },
+ "main": "./dist/index.js",
+ "module": "./dist/index.js",
+ "types": "./dist/index.d.ts",
+ "files": [
+ "*.d.ts",
+ "dist"
+ ],
+ "peerDependencies": {
+ "msw": "^2.4.9",
+ "vite": "^6.0.0 || ^7.0.0 || ^8.0.0"
+ },
+ "peerDependenciesMeta": {
+ "msw": {
+ "optional": true
+ },
+ "vite": {
+ "optional": true
+ }
+ },
+ "dependencies": {
+ "estree-walker": "^3.0.3",
+ "magic-string": "^0.30.21",
+ "@vitest/spy": "4.1.9"
+ },
+ "devDependencies": {
+ "@types/estree": "^1.0.8",
+ "acorn-walk": "^8.3.5",
+ "cjs-module-lexer": "^2.2.0",
+ "es-module-lexer": "^2.0.0",
+ "msw": "^2.12.10",
+ "pathe": "^2.0.3",
+ "vite": "^6.3.5",
+ "@vitest/spy": "4.1.9",
+ "@vitest/utils": "4.1.9"
+ },
+ "scripts": {
+ "build": "premove dist && rollup -c",
+ "dev": "rollup -c --watch"
+ }
+}
\ No newline at end of file
diff --git a/node_modules/@vitest/pretty-format/LICENSE b/node_modules/@vitest/pretty-format/LICENSE
new file mode 100644
index 0000000000000000000000000000000000000000..0e5771dddf4e96ebc77c349f53fc763b910e63c0
--- /dev/null
+++ b/node_modules/@vitest/pretty-format/LICENSE
@@ -0,0 +1,21 @@
+MIT License
+
+Copyright (c) 2021-Present VoidZero Inc. and Vitest contributors
+
+Permission is hereby granted, free of charge, to any person obtaining a copy
+of this software and associated documentation files (the "Software"), to deal
+in the Software without restriction, including without limitation the rights
+to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
+copies of the Software, and to permit persons to whom the Software is
+furnished to do so, subject to the following conditions:
+
+The above copyright notice and this permission notice shall be included in all
+copies or substantial portions of the Software.
+
+THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
+AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
+LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
+OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
+SOFTWARE.
diff --git a/node_modules/@vitest/pretty-format/README.md b/node_modules/@vitest/pretty-format/README.md
new file mode 100644
index 0000000000000000000000000000000000000000..d36596330431f168ca4bebf351df868eaac5d9e8
--- /dev/null
+++ b/node_modules/@vitest/pretty-format/README.md
@@ -0,0 +1,7 @@
+# @vitest/pretty-format
+
+[](https://npmx.dev/package/@vitest/pretty-format)
+
+Vitest's fork of Jest's [`pretty-format`](https://npmx.dev/package/pretty-format).
+
+[GitHub](https://github.com/vitest-dev/vitest/tree/main/packages/pretty-format) | [Documentation](https://github.com/vitest-dev/vitest/blob/main/packages/pretty-format/USAGE.md)
diff --git a/node_modules/@vitest/pretty-format/package.json b/node_modules/@vitest/pretty-format/package.json
new file mode 100644
index 0000000000000000000000000000000000000000..84aa445fbc0167723cceae8509f51ae1c7c8b0b7
--- /dev/null
+++ b/node_modules/@vitest/pretty-format/package.json
@@ -0,0 +1,50 @@
+{
+ "name": "@vitest/pretty-format",
+ "type": "module",
+ "version": "4.1.9",
+ "description": "Fork of pretty-format with support for ESM",
+ "license": "MIT",
+ "funding": "https://opencollective.com/vitest",
+ "homepage": "https://github.com/vitest-dev/vitest/tree/main/packages/pretty-format",
+ "repository": {
+ "type": "git",
+ "url": "git+https://github.com/vitest-dev/vitest.git",
+ "directory": "packages/pretty-format"
+ },
+ "bugs": {
+ "url": "https://github.com/vitest-dev/vitest/issues"
+ },
+ "keywords": [
+ "vitest",
+ "test",
+ "pretty",
+ "pretty-format"
+ ],
+ "sideEffects": false,
+ "exports": {
+ ".": {
+ "types": "./dist/index.d.ts",
+ "default": "./dist/index.js"
+ },
+ "./*": "./*"
+ },
+ "main": "./dist/index.js",
+ "module": "./dist/index.js",
+ "types": "./dist/index.d.ts",
+ "files": [
+ "*.d.ts",
+ "dist"
+ ],
+ "dependencies": {
+ "tinyrainbow": "^3.1.0"
+ },
+ "devDependencies": {
+ "@types/react-is": "^19.2.0",
+ "react-is": "^19.2.4",
+ "react-is-18": "npm:react-is@18.3.1"
+ },
+ "scripts": {
+ "build": "premove dist && rollup -c",
+ "dev": "rollup -c --watch"
+ }
+}
\ No newline at end of file
diff --git a/node_modules/@vitest/runner/LICENSE b/node_modules/@vitest/runner/LICENSE
new file mode 100644
index 0000000000000000000000000000000000000000..0e5771dddf4e96ebc77c349f53fc763b910e63c0
--- /dev/null
+++ b/node_modules/@vitest/runner/LICENSE
@@ -0,0 +1,21 @@
+MIT License
+
+Copyright (c) 2021-Present VoidZero Inc. and Vitest contributors
+
+Permission is hereby granted, free of charge, to any person obtaining a copy
+of this software and associated documentation files (the "Software"), to deal
+in the Software without restriction, including without limitation the rights
+to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
+copies of the Software, and to permit persons to whom the Software is
+furnished to do so, subject to the following conditions:
+
+The above copyright notice and this permission notice shall be included in all
+copies or substantial portions of the Software.
+
+THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
+AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
+LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
+OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
+SOFTWARE.
diff --git a/node_modules/@vitest/runner/README.md b/node_modules/@vitest/runner/README.md
new file mode 100644
index 0000000000000000000000000000000000000000..2f6884dd57c13d664ebda99761ebbd813098c3e2
--- /dev/null
+++ b/node_modules/@vitest/runner/README.md
@@ -0,0 +1,7 @@
+# @vitest/runner
+
+[](https://npmx.dev/package/@vitest/runner)
+
+Vitest mechanism to collect and run tests.
+
+[GitHub](https://github.com/vitest-dev/vitest/tree/main/packages/runner) | [Documentation](https://vitest.dev/api/advanced/runner)
diff --git a/node_modules/@vitest/runner/package.json b/node_modules/@vitest/runner/package.json
new file mode 100644
index 0000000000000000000000000000000000000000..de06fd6a9b939c7ba2b8cd487db254553ed75640
--- /dev/null
+++ b/node_modules/@vitest/runner/package.json
@@ -0,0 +1,53 @@
+{
+ "name": "@vitest/runner",
+ "type": "module",
+ "version": "4.1.9",
+ "description": "Vitest test runner",
+ "license": "MIT",
+ "funding": "https://opencollective.com/vitest",
+ "homepage": "https://vitest.dev/api/advanced/runner",
+ "repository": {
+ "type": "git",
+ "url": "git+https://github.com/vitest-dev/vitest.git",
+ "directory": "packages/runner"
+ },
+ "bugs": {
+ "url": "https://github.com/vitest-dev/vitest/issues"
+ },
+ "keywords": [
+ "vitest",
+ "test",
+ "test-runner"
+ ],
+ "sideEffects": true,
+ "exports": {
+ ".": {
+ "types": "./dist/index.d.ts",
+ "default": "./dist/index.js"
+ },
+ "./utils": {
+ "types": "./dist/utils.d.ts",
+ "default": "./dist/utils.js"
+ },
+ "./types": {
+ "types": "./dist/types.d.ts",
+ "default": "./dist/types.js"
+ },
+ "./*": "./*"
+ },
+ "main": "./dist/index.js",
+ "module": "./dist/index.js",
+ "types": "./dist/index.d.ts",
+ "files": [
+ "*.d.ts",
+ "dist"
+ ],
+ "dependencies": {
+ "pathe": "^2.0.3",
+ "@vitest/utils": "4.1.9"
+ },
+ "scripts": {
+ "build": "premove dist && rollup -c",
+ "dev": "rollup -c --watch"
+ }
+}
\ No newline at end of file
diff --git a/node_modules/@vitest/runner/types.d.ts b/node_modules/@vitest/runner/types.d.ts
new file mode 100644
index 0000000000000000000000000000000000000000..26a125423d414fa445c87ab4621e8e3286a7875b
--- /dev/null
+++ b/node_modules/@vitest/runner/types.d.ts
@@ -0,0 +1 @@
+export * from './dist/types.js'
diff --git a/node_modules/@vitest/runner/utils.d.ts b/node_modules/@vitest/runner/utils.d.ts
new file mode 100644
index 0000000000000000000000000000000000000000..e3f344e48a8d345df0c9350f51033c85f0e3a3a1
--- /dev/null
+++ b/node_modules/@vitest/runner/utils.d.ts
@@ -0,0 +1 @@
+export * from './dist/utils.js'
diff --git a/node_modules/@vitest/snapshot/LICENSE b/node_modules/@vitest/snapshot/LICENSE
new file mode 100644
index 0000000000000000000000000000000000000000..0e5771dddf4e96ebc77c349f53fc763b910e63c0
--- /dev/null
+++ b/node_modules/@vitest/snapshot/LICENSE
@@ -0,0 +1,21 @@
+MIT License
+
+Copyright (c) 2021-Present VoidZero Inc. and Vitest contributors
+
+Permission is hereby granted, free of charge, to any person obtaining a copy
+of this software and associated documentation files (the "Software"), to deal
+in the Software without restriction, including without limitation the rights
+to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
+copies of the Software, and to permit persons to whom the Software is
+furnished to do so, subject to the following conditions:
+
+The above copyright notice and this permission notice shall be included in all
+copies or substantial portions of the Software.
+
+THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
+AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
+LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
+OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
+SOFTWARE.
diff --git a/node_modules/@vitest/snapshot/README.md b/node_modules/@vitest/snapshot/README.md
new file mode 100644
index 0000000000000000000000000000000000000000..db0e4f81e457be4425783f5c9cf1c7804ce86dd9
--- /dev/null
+++ b/node_modules/@vitest/snapshot/README.md
@@ -0,0 +1,88 @@
+# @vitest/snapshot
+
+[](https://npmx.dev/package/@vitest/snapshot)
+
+Lightweight implementation of Jest's snapshots.
+
+## Usage
+
+```js
+import { SnapshotClient } from '@vitest/snapshot'
+import { NodeSnapshotEnvironment } from '@vitest/snapshot/environment'
+import { SnapshotManager } from '@vitest/snapshot/manager'
+
+const client = new SnapshotClient({
+ // you need to provide your own equality check implementation if you use it
+ // this function is called when `.toMatchSnapshot({ property: 1 })` is called
+ isEqual: (received, expected) =>
+ equals(received, expected, [iterableEquality, subsetEquality]),
+})
+
+// class that implements snapshot saving and reading
+// by default uses fs module, but you can provide your own implementation depending on the environment
+const environment = new NodeSnapshotEnvironment()
+
+// you need to implement this yourselves,
+// this depends on your runner
+function getCurrentFilepath() {
+ return '/file.spec.js'
+}
+function getCurrentTestName() {
+ return 'test1'
+}
+
+// example for inline snapshots, nothing is required to support regular snapshots,
+// just call `assert` with `isInline: false`
+function wrapper(received) {
+ function __INLINE_SNAPSHOT__(inlineSnapshot, message) {
+ client.assert({
+ received,
+ message,
+ isInline: true,
+ inlineSnapshot,
+ filepath: getCurrentFilepath(),
+ name: getCurrentTestName(),
+ })
+ }
+ return {
+ // the name is hard-coded, it should be inside another function, so Vitest can find the actual test file where it was called (parses call stack trace + 2)
+ // you can override this behaviour in SnapshotState's `_inferInlineSnapshotStack` method by providing your own SnapshotState to SnapshotClient constructor
+ toMatchInlineSnapshot: (...args) => __INLINE_SNAPSHOT__(...args),
+ }
+}
+
+const options = {
+ updateSnapshot: 'new',
+ snapshotEnvironment: environment,
+}
+
+await client.startCurrentRun(
+ getCurrentFilepath(),
+ getCurrentTestName(),
+ options
+)
+
+// this will save snapshot to a file which is returned by "snapshotEnvironment.resolvePath"
+client.assert({
+ received: 'some text',
+ isInline: false,
+})
+
+// uses "pretty-format", so it requires quotes
+// also naming is hard-coded when parsing test files
+wrapper('text 1').toMatchInlineSnapshot()
+wrapper('text 2').toMatchInlineSnapshot('"text 2"')
+
+const result = await client.finishCurrentRun() // this saves files and returns SnapshotResult
+
+// you can use manager to manage several clients
+const manager = new SnapshotManager(options)
+manager.add(result)
+
+// do something
+// and then read the summary
+
+console.log(manager.summary)
+```
+
+[GitHub](https://github.com/vitest-dev/vitest/tree/main/packages/snapshot) | [Documentation](https://vitest.dev/guide/snapshot)
diff --git a/node_modules/@vitest/snapshot/environment.d.ts b/node_modules/@vitest/snapshot/environment.d.ts
new file mode 100644
index 0000000000000000000000000000000000000000..855f0d10a8c55b2a80dc264d1b3b3677b3ee9094
--- /dev/null
+++ b/node_modules/@vitest/snapshot/environment.d.ts
@@ -0,0 +1 @@
+export * from './dist/environment.js'
diff --git a/node_modules/@vitest/snapshot/manager.d.ts b/node_modules/@vitest/snapshot/manager.d.ts
new file mode 100644
index 0000000000000000000000000000000000000000..f3e80774b831684b8bfb08e7239407a84dceb955
--- /dev/null
+++ b/node_modules/@vitest/snapshot/manager.d.ts
@@ -0,0 +1 @@
+export * from './dist/manager.js'
diff --git a/node_modules/@vitest/snapshot/package.json b/node_modules/@vitest/snapshot/package.json
new file mode 100644
index 0000000000000000000000000000000000000000..b6b91f0802f7702671fd225d9a9d0cc1d3c68e51
--- /dev/null
+++ b/node_modules/@vitest/snapshot/package.json
@@ -0,0 +1,59 @@
+{
+ "name": "@vitest/snapshot",
+ "type": "module",
+ "version": "4.1.9",
+ "description": "Vitest snapshot manager",
+ "license": "MIT",
+ "funding": "https://opencollective.com/vitest",
+ "homepage": "https://vitest.dev/guide/snapshot",
+ "repository": {
+ "type": "git",
+ "url": "git+https://github.com/vitest-dev/vitest.git",
+ "directory": "packages/snapshot"
+ },
+ "bugs": {
+ "url": "https://github.com/vitest-dev/vitest/issues"
+ },
+ "keywords": [
+ "vitest",
+ "test",
+ "snapshot"
+ ],
+ "sideEffects": false,
+ "exports": {
+ ".": {
+ "types": "./dist/index.d.ts",
+ "default": "./dist/index.js"
+ },
+ "./environment": {
+ "types": "./dist/environment.d.ts",
+ "default": "./dist/environment.js"
+ },
+ "./manager": {
+ "types": "./dist/manager.d.ts",
+ "default": "./dist/manager.js"
+ },
+ "./*": "./*"
+ },
+ "main": "./dist/index.js",
+ "module": "./dist/index.js",
+ "types": "./dist/index.d.ts",
+ "files": [
+ "*.d.ts",
+ "dist"
+ ],
+ "dependencies": {
+ "magic-string": "^0.30.21",
+ "pathe": "^2.0.3",
+ "@vitest/pretty-format": "4.1.9",
+ "@vitest/utils": "4.1.9"
+ },
+ "devDependencies": {
+ "@types/natural-compare": "^1.4.3",
+ "natural-compare": "^1.4.0"
+ },
+ "scripts": {
+ "build": "premove dist && rollup -c",
+ "dev": "rollup -c --watch"
+ }
+}
\ No newline at end of file
diff --git a/node_modules/@vitest/spy/LICENSE b/node_modules/@vitest/spy/LICENSE
new file mode 100644
index 0000000000000000000000000000000000000000..0e5771dddf4e96ebc77c349f53fc763b910e63c0
--- /dev/null
+++ b/node_modules/@vitest/spy/LICENSE
@@ -0,0 +1,21 @@
+MIT License
+
+Copyright (c) 2021-Present VoidZero Inc. and Vitest contributors
+
+Permission is hereby granted, free of charge, to any person obtaining a copy
+of this software and associated documentation files (the "Software"), to deal
+in the Software without restriction, including without limitation the rights
+to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
+copies of the Software, and to permit persons to whom the Software is
+furnished to do so, subject to the following conditions:
+
+The above copyright notice and this permission notice shall be included in all
+copies or substantial portions of the Software.
+
+THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
+AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
+LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
+OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
+SOFTWARE.
diff --git a/node_modules/@vitest/spy/README.md b/node_modules/@vitest/spy/README.md
new file mode 100644
index 0000000000000000000000000000000000000000..97129c5ea73dee8deddc16ce9109719df0146bba
--- /dev/null
+++ b/node_modules/@vitest/spy/README.md
@@ -0,0 +1,7 @@
+# @vitest/spy
+
+[](https://npmx.dev/package/@vitest/spy)
+
+Lightweight Jest-compatible mocking implementation.
+
+[GitHub](https://github.com/vitest-dev/vitest/tree/main/packages/spy) | [Documentation](https://vitest.dev/api/mock)
diff --git a/node_modules/@vitest/spy/optional-types.d.ts b/node_modules/@vitest/spy/optional-types.d.ts
new file mode 100644
index 0000000000000000000000000000000000000000..ba94336682fd1539c342061fd7e6490c5c4fbb1a
--- /dev/null
+++ b/node_modules/@vitest/spy/optional-types.d.ts
@@ -0,0 +1,6 @@
+/* eslint-disable ts/ban-ts-comment */
+
+export interface Disposable {
+ // @ts-ignore -- Symbol.dispose might not be in user types
+ [Symbol.dispose]: () => void
+}
diff --git a/node_modules/@vitest/spy/package.json b/node_modules/@vitest/spy/package.json
new file mode 100644
index 0000000000000000000000000000000000000000..0c6e07dc5f92f0e4f7644a3eb2cd6a409655e1ae
--- /dev/null
+++ b/node_modules/@vitest/spy/package.json
@@ -0,0 +1,46 @@
+{
+ "name": "@vitest/spy",
+ "type": "module",
+ "version": "4.1.9",
+ "description": "Lightweight Jest compatible spy implementation",
+ "license": "MIT",
+ "funding": "https://opencollective.com/vitest",
+ "homepage": "https://vitest.dev/api/mock",
+ "repository": {
+ "type": "git",
+ "url": "git+https://github.com/vitest-dev/vitest.git",
+ "directory": "packages/spy"
+ },
+ "bugs": {
+ "url": "https://github.com/vitest-dev/vitest/issues"
+ },
+ "keywords": [
+ "vitest",
+ "test",
+ "mock",
+ "spy",
+ "intercept"
+ ],
+ "sideEffects": false,
+ "exports": {
+ ".": {
+ "types": "./dist/index.d.ts",
+ "default": "./dist/index.js"
+ },
+ "./optional-types.js": {
+ "types": "./optional-types.d.ts"
+ },
+ "./*": "./*"
+ },
+ "main": "./dist/index.js",
+ "module": "./dist/index.js",
+ "types": "./dist/index.d.ts",
+ "files": [
+ "dist",
+ "optional-types.d.ts"
+ ],
+ "scripts": {
+ "build": "premove dist && rollup -c",
+ "dev": "rollup -c --watch"
+ }
+}
\ No newline at end of file
diff --git a/node_modules/@vitest/utils/LICENSE b/node_modules/@vitest/utils/LICENSE
new file mode 100644
index 0000000000000000000000000000000000000000..0e5771dddf4e96ebc77c349f53fc763b910e63c0
--- /dev/null
+++ b/node_modules/@vitest/utils/LICENSE
@@ -0,0 +1,21 @@
+MIT License
+
+Copyright (c) 2021-Present VoidZero Inc. and Vitest contributors
+
+Permission is hereby granted, free of charge, to any person obtaining a copy
+of this software and associated documentation files (the "Software"), to deal
+in the Software without restriction, including without limitation the rights
+to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
+copies of the Software, and to permit persons to whom the Software is
+furnished to do so, subject to the following conditions:
+
+The above copyright notice and this permission notice shall be included in all
+copies or substantial portions of the Software.
+
+THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
+AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
+LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
+OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
+SOFTWARE.
diff --git a/node_modules/@vitest/utils/README.md b/node_modules/@vitest/utils/README.md
new file mode 100644
index 0000000000000000000000000000000000000000..ee3b768a0d61255c913806140a8d57956594ff21
--- /dev/null
+++ b/node_modules/@vitest/utils/README.md
@@ -0,0 +1,7 @@
+# @vitest/utils
+
+[](https://npmx.dev/package/@vitest/utils)
+
+Internal shared utilities used by other Vitest packages.
+
+[GitHub](https://github.com/vitest-dev/vitest/tree/main/packages/utils) | [Documentation](https://vitest.dev/)
diff --git a/node_modules/@vitest/utils/diff.d.ts b/node_modules/@vitest/utils/diff.d.ts
new file mode 100644
index 0000000000000000000000000000000000000000..0a66b86595c065228ede7e5adad789331f3efce0
--- /dev/null
+++ b/node_modules/@vitest/utils/diff.d.ts
@@ -0,0 +1 @@
+export * from './dist/diff.js'
diff --git a/node_modules/@vitest/utils/error.d.ts b/node_modules/@vitest/utils/error.d.ts
new file mode 100644
index 0000000000000000000000000000000000000000..9329baa87d94cc608a51d289e80c88bcbb5e0b99
--- /dev/null
+++ b/node_modules/@vitest/utils/error.d.ts
@@ -0,0 +1 @@
+export * from './dist/error.js'
diff --git a/node_modules/@vitest/utils/helpers.d.ts b/node_modules/@vitest/utils/helpers.d.ts
new file mode 100644
index 0000000000000000000000000000000000000000..0add1d0f2bd1444960da3a46d4525117a9b2f1ea
--- /dev/null
+++ b/node_modules/@vitest/utils/helpers.d.ts
@@ -0,0 +1 @@
+export * from './dist/helpers.js'
diff --git a/node_modules/@vitest/utils/package.json b/node_modules/@vitest/utils/package.json
new file mode 100644
index 0000000000000000000000000000000000000000..d352d6bcf7307911a05ff54b28fd55b0c01127c8
--- /dev/null
+++ b/node_modules/@vitest/utils/package.json
@@ -0,0 +1,102 @@
+{
+ "name": "@vitest/utils",
+ "type": "module",
+ "version": "4.1.9",
+ "description": "Shared Vitest utility functions",
+ "license": "MIT",
+ "funding": "https://opencollective.com/vitest",
+ "homepage": "https://github.com/vitest-dev/vitest/tree/main/packages/utils",
+ "repository": {
+ "type": "git",
+ "url": "git+https://github.com/vitest-dev/vitest.git",
+ "directory": "packages/utils"
+ },
+ "bugs": {
+ "url": "https://github.com/vitest-dev/vitest/issues"
+ },
+ "sideEffects": false,
+ "exports": {
+ ".": {
+ "types": "./dist/index.d.ts",
+ "default": "./dist/index.js"
+ },
+ "./diff": {
+ "types": "./dist/diff.d.ts",
+ "default": "./dist/diff.js"
+ },
+ "./resolver": {
+ "types": "./dist/resolver.d.ts",
+ "default": "./dist/resolver.js"
+ },
+ "./error": {
+ "types": "./dist/error.d.ts",
+ "default": "./dist/error.js"
+ },
+ "./helpers": {
+ "types": "./dist/helpers.d.ts",
+ "default": "./dist/helpers.js"
+ },
+ "./offset": {
+ "types": "./dist/offset.d.ts",
+ "default": "./dist/offset.js"
+ },
+ "./constants": {
+ "types": "./dist/constants.d.ts",
+ "default": "./dist/constants.js"
+ },
+ "./timers": {
+ "types": "./dist/timers.d.ts",
+ "default": "./dist/timers.js"
+ },
+ "./display": {
+ "types": "./dist/display.d.ts",
+ "default": "./dist/display.js"
+ },
+ "./source-map": {
+ "types": "./dist/source-map.d.ts",
+ "default": "./dist/source-map.js"
+ },
+ "./source-map/node": {
+ "types": "./dist/source-map/node.d.ts",
+ "default": "./dist/source-map/node.js"
+ },
+ "./serialize": {
+ "types": "./dist/serialize.d.ts",
+ "default": "./dist/serialize.js"
+ },
+ "./*": "./*"
+ },
+ "main": "./dist/index.js",
+ "module": "./dist/index.js",
+ "types": "./dist/index.d.ts",
+ "typesVersions": {
+ "*": {
+ "source-map": [
+ "dist/source-map.d.ts"
+ ],
+ "source-map/node": [
+ "dist/source-map/node.d.ts"
+ ]
+ }
+ },
+ "files": [
+ "*.d.ts",
+ "dist"
+ ],
+ "dependencies": {
+ "convert-source-map": "^2.0.0",
+ "tinyrainbow": "^3.1.0",
+ "@vitest/pretty-format": "4.1.9"
+ },
+ "devDependencies": {
+ "@jridgewell/trace-mapping": "0.3.31",
+ "@types/convert-source-map": "^2.0.3",
+ "@types/estree": "^1.0.8",
+ "diff-sequences": "^29.6.3",
+ "loupe": "^3.2.1"
+ },
+ "scripts": {
+ "build": "premove dist && rollup -c",
+ "dev": "rollup -c --watch"
+ }
+}
\ No newline at end of file
diff --git a/node_modules/abs-svg-path/Readme.md b/node_modules/abs-svg-path/Readme.md
new file mode 100644
index 0000000000000000000000000000000000000000..0f1a6ee4e1b73e82f65677d8592770f2cb3e2bea
--- /dev/null
+++ b/node_modules/abs-svg-path/Readme.md
@@ -0,0 +1,35 @@
+
+# abs-svg-path
+
+ redefine an svg path with absolute coordinates
+
+## Installation
+
+_With [packin](//github.com/jkroso/packin) or [component](//github.com/component/component)_
+
+ $ packin add jkroso/abs-svg-path
+
+then in your app:
+
+```js
+var abs = require('abs-svg-path')
+```
+
+## API
+
+### abs(path)
+
+ redefine `path` with absolute coordinates
+
+```js
+abs([['l',10,20],['l',30,40]]) // => [['L',10,20],['L',40,60]]
+abs([
+ ['q', 1,2, 33,44],
+ ['L', 50,60],
+ ['c', 1,2, 3,4, 33,44]
+]) // => [['Q',1,2,33,44],['L', 50, 60],['C',51,62, 53,64, 83,104]]
+```
+
+## Running the tests
+
+Just run `make test`
diff --git a/node_modules/abs-svg-path/index.js b/node_modules/abs-svg-path/index.js
new file mode 100644
index 0000000000000000000000000000000000000000..fd5543715797b4450cf7b572ca20af5f41cc4f93
--- /dev/null
+++ b/node_modules/abs-svg-path/index.js
@@ -0,0 +1,67 @@
+
+module.exports = absolutize
+
+/**
+ * redefine `path` with absolute coordinates
+ *
+ * @param {Array} path
+ * @return {Array}
+ */
+
+function absolutize(path){
+ var startX = 0
+ var startY = 0
+ var x = 0
+ var y = 0
+
+ return path.map(function(seg){
+ seg = seg.slice()
+ var type = seg[0]
+ var command = type.toUpperCase()
+
+ // is relative
+ if (type != command) {
+ seg[0] = command
+ switch (type) {
+ case 'a':
+ seg[6] += x
+ seg[7] += y
+ break
+ case 'v':
+ seg[1] += y
+ break
+ case 'h':
+ seg[1] += x
+ break
+ default:
+ for (var i = 1; i < seg.length;) {
+ seg[i++] += x
+ seg[i++] += y
+ }
+ }
+ }
+
+ // update cursor state
+ switch (command) {
+ case 'Z':
+ x = startX
+ y = startY
+ break
+ case 'H':
+ x = seg[1]
+ break
+ case 'V':
+ y = seg[1]
+ break
+ case 'M':
+ x = startX = seg[1]
+ y = startY = seg[2]
+ break
+ default:
+ x = seg[seg.length - 2]
+ y = seg[seg.length - 1]
+ }
+
+ return seg
+ })
+}
diff --git a/node_modules/abs-svg-path/package.json b/node_modules/abs-svg-path/package.json
new file mode 100644
index 0000000000000000000000000000000000000000..8616c7c6edb0dc7253d3f72476e5dc4b43122819
--- /dev/null
+++ b/node_modules/abs-svg-path/package.json
@@ -0,0 +1,19 @@
+{
+ "name": "abs-svg-path",
+ "version": "0.1.1",
+ "description": "redefine an svg path with absolute coordinates",
+ "keywords": ["absolute","svg","path"],
+ "dependencies": {},
+ "devDependencies": {
+ "serve": "jkroso/serve",
+ "parse-svg-path": "*",
+ "mocha": "*",
+ "chai": "*",
+ "jsmd": "*"
+ },
+ "repository": "git://github.com/jkroso/abs-svg-path.git",
+ "bugs": "https://github.com/jkroso/abs-svg-path/issues",
+ "author": "Jake Rosoman",
+ "files": ["index.js"],
+ "license": "MIT"
+}
\ No newline at end of file
diff --git a/node_modules/accepts/HISTORY.md b/node_modules/accepts/HISTORY.md
new file mode 100644
index 0000000000000000000000000000000000000000..cb5990c7c3620f4936a3ac42b3bf335c95eef7e8
--- /dev/null
+++ b/node_modules/accepts/HISTORY.md
@@ -0,0 +1,243 @@
+1.3.8 / 2022-02-02
+==================
+
+ * deps: mime-types@~2.1.34
+ - deps: mime-db@~1.51.0
+ * deps: negotiator@0.6.3
+
+1.3.7 / 2019-04-29
+==================
+
+ * deps: negotiator@0.6.2
+ - Fix sorting charset, encoding, and language with extra parameters
+
+1.3.6 / 2019-04-28
+==================
+
+ * deps: mime-types@~2.1.24
+ - deps: mime-db@~1.40.0
+
+1.3.5 / 2018-02-28
+==================
+
+ * deps: mime-types@~2.1.18
+ - deps: mime-db@~1.33.0
+
+1.3.4 / 2017-08-22
+==================
+
+ * deps: mime-types@~2.1.16
+ - deps: mime-db@~1.29.0
+
+1.3.3 / 2016-05-02
+==================
+
+ * deps: mime-types@~2.1.11
+ - deps: mime-db@~1.23.0
+ * deps: negotiator@0.6.1
+ - perf: improve `Accept` parsing speed
+ - perf: improve `Accept-Charset` parsing speed
+ - perf: improve `Accept-Encoding` parsing speed
+ - perf: improve `Accept-Language` parsing speed
+
+1.3.2 / 2016-03-08
+==================
+
+ * deps: mime-types@~2.1.10
+ - Fix extension of `application/dash+xml`
+ - Update primary extension for `audio/mp4`
+ - deps: mime-db@~1.22.0
+
+1.3.1 / 2016-01-19
+==================
+
+ * deps: mime-types@~2.1.9
+ - deps: mime-db@~1.21.0
+
+1.3.0 / 2015-09-29
+==================
+
+ * deps: mime-types@~2.1.7
+ - deps: mime-db@~1.19.0
+ * deps: negotiator@0.6.0
+ - Fix including type extensions in parameters in `Accept` parsing
+ - Fix parsing `Accept` parameters with quoted equals
+ - Fix parsing `Accept` parameters with quoted semicolons
+ - Lazy-load modules from main entry point
+ - perf: delay type concatenation until needed
+ - perf: enable strict mode
+ - perf: hoist regular expressions
+ - perf: remove closures getting spec properties
+ - perf: remove a closure from media type parsing
+ - perf: remove property delete from media type parsing
+
+1.2.13 / 2015-09-06
+===================
+
+ * deps: mime-types@~2.1.6
+ - deps: mime-db@~1.18.0
+
+1.2.12 / 2015-07-30
+===================
+
+ * deps: mime-types@~2.1.4
+ - deps: mime-db@~1.16.0
+
+1.2.11 / 2015-07-16
+===================
+
+ * deps: mime-types@~2.1.3
+ - deps: mime-db@~1.15.0
+
+1.2.10 / 2015-07-01
+===================
+
+ * deps: mime-types@~2.1.2
+ - deps: mime-db@~1.14.0
+
+1.2.9 / 2015-06-08
+==================
+
+ * deps: mime-types@~2.1.1
+ - perf: fix deopt during mapping
+
+1.2.8 / 2015-06-07
+==================
+
+ * deps: mime-types@~2.1.0
+ - deps: mime-db@~1.13.0
+ * perf: avoid argument reassignment & argument slice
+ * perf: avoid negotiator recursive construction
+ * perf: enable strict mode
+ * perf: remove unnecessary bitwise operator
+
+1.2.7 / 2015-05-10
+==================
+
+ * deps: negotiator@0.5.3
+ - Fix media type parameter matching to be case-insensitive
+
+1.2.6 / 2015-05-07
+==================
+
+ * deps: mime-types@~2.0.11
+ - deps: mime-db@~1.9.1
+ * deps: negotiator@0.5.2
+ - Fix comparing media types with quoted values
+ - Fix splitting media types with quoted commas
+
+1.2.5 / 2015-03-13
+==================
+
+ * deps: mime-types@~2.0.10
+ - deps: mime-db@~1.8.0
+
+1.2.4 / 2015-02-14
+==================
+
+ * Support Node.js 0.6
+ * deps: mime-types@~2.0.9
+ - deps: mime-db@~1.7.0
+ * deps: negotiator@0.5.1
+ - Fix preference sorting to be stable for long acceptable lists
+
+1.2.3 / 2015-01-31
+==================
+
+ * deps: mime-types@~2.0.8
+ - deps: mime-db@~1.6.0
+
+1.2.2 / 2014-12-30
+==================
+
+ * deps: mime-types@~2.0.7
+ - deps: mime-db@~1.5.0
+
+1.2.1 / 2014-12-30
+==================
+
+ * deps: mime-types@~2.0.5
+ - deps: mime-db@~1.3.1
+
+1.2.0 / 2014-12-19
+==================
+
+ * deps: negotiator@0.5.0
+ - Fix list return order when large accepted list
+ - Fix missing identity encoding when q=0 exists
+ - Remove dynamic building of Negotiator class
+
+1.1.4 / 2014-12-10
+==================
+
+ * deps: mime-types@~2.0.4
+ - deps: mime-db@~1.3.0
+
+1.1.3 / 2014-11-09
+==================
+
+ * deps: mime-types@~2.0.3
+ - deps: mime-db@~1.2.0
+
+1.1.2 / 2014-10-14
+==================
+
+ * deps: negotiator@0.4.9
+ - Fix error when media type has invalid parameter
+
+1.1.1 / 2014-09-28
+==================
+
+ * deps: mime-types@~2.0.2
+ - deps: mime-db@~1.1.0
+ * deps: negotiator@0.4.8
+ - Fix all negotiations to be case-insensitive
+ - Stable sort preferences of same quality according to client order
+
+1.1.0 / 2014-09-02
+==================
+
+ * update `mime-types`
+
+1.0.7 / 2014-07-04
+==================
+
+ * Fix wrong type returned from `type` when match after unknown extension
+
+1.0.6 / 2014-06-24
+==================
+
+ * deps: negotiator@0.4.7
+
+1.0.5 / 2014-06-20
+==================
+
+ * fix crash when unknown extension given
+
+1.0.4 / 2014-06-19
+==================
+
+ * use `mime-types`
+
+1.0.3 / 2014-06-11
+==================
+
+ * deps: negotiator@0.4.6
+ - Order by specificity when quality is the same
+
+1.0.2 / 2014-05-29
+==================
+
+ * Fix interpretation when header not in request
+ * deps: pin negotiator@0.4.5
+
+1.0.1 / 2014-01-18
+==================
+
+ * Identity encoding isn't always acceptable
+ * deps: negotiator@~0.4.0
+
+1.0.0 / 2013-12-27
+==================
+
+ * Genesis
diff --git a/node_modules/accepts/LICENSE b/node_modules/accepts/LICENSE
new file mode 100644
index 0000000000000000000000000000000000000000..06166077be4d1f620d89b9eb33c76d89e75857da
--- /dev/null
+++ b/node_modules/accepts/LICENSE
@@ -0,0 +1,23 @@
+(The MIT License)
+
+Copyright (c) 2014 Jonathan Ong
+Copyright (c) 2015 Douglas Christopher Wilson
+
+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.
diff --git a/node_modules/accepts/README.md b/node_modules/accepts/README.md
new file mode 100644
index 0000000000000000000000000000000000000000..82680c530c3886540f630f643990e2ec707319d1
--- /dev/null
+++ b/node_modules/accepts/README.md
@@ -0,0 +1,140 @@
+# accepts
+
+[![NPM Version][npm-version-image]][npm-url]
+[![NPM Downloads][npm-downloads-image]][npm-url]
+[![Node.js Version][node-version-image]][node-version-url]
+[![Build Status][github-actions-ci-image]][github-actions-ci-url]
+[![Test Coverage][coveralls-image]][coveralls-url]
+
+Higher level content negotiation based on [negotiator](https://www.npmjs.com/package/negotiator).
+Extracted from [koa](https://www.npmjs.com/package/koa) for general use.
+
+In addition to negotiator, it allows:
+
+- Allows types as an array or arguments list, ie `(['text/html', 'application/json'])`
+ as well as `('text/html', 'application/json')`.
+- Allows type shorthands such as `json`.
+- Returns `false` when no types match
+- Treats non-existent headers as `*`
+
+## Installation
+
+This is a [Node.js](https://nodejs.org/en/) module available through the
+[npm registry](https://www.npmjs.com/). Installation is done using the
+[`npm install` command](https://docs.npmjs.com/getting-started/installing-npm-packages-locally):
+
+```sh
+$ npm install accepts
+```
+
+## API
+
+```js
+var accepts = require('accepts')
+```
+
+### accepts(req)
+
+Create a new `Accepts` object for the given `req`.
+
+#### .charset(charsets)
+
+Return the first accepted charset. If nothing in `charsets` is accepted,
+then `false` is returned.
+
+#### .charsets()
+
+Return the charsets that the request accepts, in the order of the client's
+preference (most preferred first).
+
+#### .encoding(encodings)
+
+Return the first accepted encoding. If nothing in `encodings` is accepted,
+then `false` is returned.
+
+#### .encodings()
+
+Return the encodings that the request accepts, in the order of the client's
+preference (most preferred first).
+
+#### .language(languages)
+
+Return the first accepted language. If nothing in `languages` is accepted,
+then `false` is returned.
+
+#### .languages()
+
+Return the languages that the request accepts, in the order of the client's
+preference (most preferred first).
+
+#### .type(types)
+
+Return the first accepted type (and it is returned as the same text as what
+appears in the `types` array). If nothing in `types` is accepted, then `false`
+is returned.
+
+The `types` array can contain full MIME types or file extensions. Any value
+that is not a full MIME types is passed to `require('mime-types').lookup`.
+
+#### .types()
+
+Return the types that the request accepts, in the order of the client's
+preference (most preferred first).
+
+## Examples
+
+### Simple type negotiation
+
+This simple example shows how to use `accepts` to return a different typed
+respond body based on what the client wants to accept. The server lists it's
+preferences in order and will get back the best match between the client and
+server.
+
+```js
+var accepts = require('accepts')
+var http = require('http')
+
+function app (req, res) {
+ var accept = accepts(req)
+
+ // the order of this list is significant; should be server preferred order
+ switch (accept.type(['json', 'html'])) {
+ case 'json':
+ res.setHeader('Content-Type', 'application/json')
+ res.write('{"hello":"world!"}')
+ break
+ case 'html':
+ res.setHeader('Content-Type', 'text/html')
+ res.write('hello, world!')
+ break
+ default:
+ // the fallback is text/plain, so no need to specify it above
+ res.setHeader('Content-Type', 'text/plain')
+ res.write('hello, world!')
+ break
+ }
+
+ res.end()
+}
+
+http.createServer(app).listen(3000)
+```
+
+You can test this out with the cURL program:
+```sh
+curl -I -H'Accept: text/html' http://localhost:3000/
+```
+
+## License
+
+[MIT](LICENSE)
+
+[coveralls-image]: https://badgen.net/coveralls/c/github/jshttp/accepts/master
+[coveralls-url]: https://coveralls.io/r/jshttp/accepts?branch=master
+[github-actions-ci-image]: https://badgen.net/github/checks/jshttp/accepts/master?label=ci
+[github-actions-ci-url]: https://github.com/jshttp/accepts/actions/workflows/ci.yml
+[node-version-image]: https://badgen.net/npm/node/accepts
+[node-version-url]: https://nodejs.org/en/download
+[npm-downloads-image]: https://badgen.net/npm/dm/accepts
+[npm-url]: https://npmjs.org/package/accepts
+[npm-version-image]: https://badgen.net/npm/v/accepts
diff --git a/node_modules/accepts/index.js b/node_modules/accepts/index.js
new file mode 100644
index 0000000000000000000000000000000000000000..e9b2f63fb16f8ecdeb16c8eced302612794ccf65
--- /dev/null
+++ b/node_modules/accepts/index.js
@@ -0,0 +1,238 @@
+/*!
+ * accepts
+ * Copyright(c) 2014 Jonathan Ong
+ * Copyright(c) 2015 Douglas Christopher Wilson
+ * MIT Licensed
+ */
+
+'use strict'
+
+/**
+ * Module dependencies.
+ * @private
+ */
+
+var Negotiator = require('negotiator')
+var mime = require('mime-types')
+
+/**
+ * Module exports.
+ * @public
+ */
+
+module.exports = Accepts
+
+/**
+ * Create a new Accepts object for the given req.
+ *
+ * @param {object} req
+ * @public
+ */
+
+function Accepts (req) {
+ if (!(this instanceof Accepts)) {
+ return new Accepts(req)
+ }
+
+ this.headers = req.headers
+ this.negotiator = new Negotiator(req)
+}
+
+/**
+ * Check if the given `type(s)` is acceptable, returning
+ * the best match when true, otherwise `undefined`, in which
+ * case you should respond with 406 "Not Acceptable".
+ *
+ * The `type` value may be a single mime type string
+ * such as "application/json", the extension name
+ * such as "json" or an array `["json", "html", "text/plain"]`. When a list
+ * or array is given the _best_ match, if any is returned.
+ *
+ * Examples:
+ *
+ * // Accept: text/html
+ * this.types('html');
+ * // => "html"
+ *
+ * // Accept: text/*, application/json
+ * this.types('html');
+ * // => "html"
+ * this.types('text/html');
+ * // => "text/html"
+ * this.types('json', 'text');
+ * // => "json"
+ * this.types('application/json');
+ * // => "application/json"
+ *
+ * // Accept: text/*, application/json
+ * this.types('image/png');
+ * this.types('png');
+ * // => undefined
+ *
+ * // Accept: text/*;q=.5, application/json
+ * this.types(['html', 'json']);
+ * this.types('html', 'json');
+ * // => "json"
+ *
+ * @param {String|Array} types...
+ * @return {String|Array|Boolean}
+ * @public
+ */
+
+Accepts.prototype.type =
+Accepts.prototype.types = function (types_) {
+ var types = types_
+
+ // support flattened arguments
+ if (types && !Array.isArray(types)) {
+ types = new Array(arguments.length)
+ for (var i = 0; i < types.length; i++) {
+ types[i] = arguments[i]
+ }
+ }
+
+ // no types, return all requested types
+ if (!types || types.length === 0) {
+ return this.negotiator.mediaTypes()
+ }
+
+ // no accept header, return first given type
+ if (!this.headers.accept) {
+ return types[0]
+ }
+
+ var mimes = types.map(extToMime)
+ var accepts = this.negotiator.mediaTypes(mimes.filter(validMime))
+ var first = accepts[0]
+
+ return first
+ ? types[mimes.indexOf(first)]
+ : false
+}
+
+/**
+ * Return accepted encodings or best fit based on `encodings`.
+ *
+ * Given `Accept-Encoding: gzip, deflate`
+ * an array sorted by quality is returned:
+ *
+ * ['gzip', 'deflate']
+ *
+ * @param {String|Array} encodings...
+ * @return {String|Array}
+ * @public
+ */
+
+Accepts.prototype.encoding =
+Accepts.prototype.encodings = function (encodings_) {
+ var encodings = encodings_
+
+ // support flattened arguments
+ if (encodings && !Array.isArray(encodings)) {
+ encodings = new Array(arguments.length)
+ for (var i = 0; i < encodings.length; i++) {
+ encodings[i] = arguments[i]
+ }
+ }
+
+ // no encodings, return all requested encodings
+ if (!encodings || encodings.length === 0) {
+ return this.negotiator.encodings()
+ }
+
+ return this.negotiator.encodings(encodings)[0] || false
+}
+
+/**
+ * Return accepted charsets or best fit based on `charsets`.
+ *
+ * Given `Accept-Charset: utf-8, iso-8859-1;q=0.2, utf-7;q=0.5`
+ * an array sorted by quality is returned:
+ *
+ * ['utf-8', 'utf-7', 'iso-8859-1']
+ *
+ * @param {String|Array} charsets...
+ * @return {String|Array}
+ * @public
+ */
+
+Accepts.prototype.charset =
+Accepts.prototype.charsets = function (charsets_) {
+ var charsets = charsets_
+
+ // support flattened arguments
+ if (charsets && !Array.isArray(charsets)) {
+ charsets = new Array(arguments.length)
+ for (var i = 0; i < charsets.length; i++) {
+ charsets[i] = arguments[i]
+ }
+ }
+
+ // no charsets, return all requested charsets
+ if (!charsets || charsets.length === 0) {
+ return this.negotiator.charsets()
+ }
+
+ return this.negotiator.charsets(charsets)[0] || false
+}
+
+/**
+ * Return accepted languages or best fit based on `langs`.
+ *
+ * Given `Accept-Language: en;q=0.8, es, pt`
+ * an array sorted by quality is returned:
+ *
+ * ['es', 'pt', 'en']
+ *
+ * @param {String|Array} langs...
+ * @return {Array|String}
+ * @public
+ */
+
+Accepts.prototype.lang =
+Accepts.prototype.langs =
+Accepts.prototype.language =
+Accepts.prototype.languages = function (languages_) {
+ var languages = languages_
+
+ // support flattened arguments
+ if (languages && !Array.isArray(languages)) {
+ languages = new Array(arguments.length)
+ for (var i = 0; i < languages.length; i++) {
+ languages[i] = arguments[i]
+ }
+ }
+
+ // no languages, return all requested languages
+ if (!languages || languages.length === 0) {
+ return this.negotiator.languages()
+ }
+
+ return this.negotiator.languages(languages)[0] || false
+}
+
+/**
+ * Convert extnames to mime.
+ *
+ * @param {String} type
+ * @return {String}
+ * @private
+ */
+
+function extToMime (type) {
+ return type.indexOf('/') === -1
+ ? mime.lookup(type)
+ : type
+}
+
+/**
+ * Check if mime is valid.
+ *
+ * @param {String} type
+ * @return {String}
+ * @private
+ */
+
+function validMime (type) {
+ return typeof type === 'string'
+}
diff --git a/node_modules/accepts/package.json b/node_modules/accepts/package.json
new file mode 100644
index 0000000000000000000000000000000000000000..0f2d15da92b29d328f4da484f494c5442c711b4d
--- /dev/null
+++ b/node_modules/accepts/package.json
@@ -0,0 +1,47 @@
+{
+ "name": "accepts",
+ "description": "Higher-level content negotiation",
+ "version": "1.3.8",
+ "contributors": [
+ "Douglas Christopher Wilson ",
+ "Jonathan Ong (http://jongleberry.com)"
+ ],
+ "license": "MIT",
+ "repository": "jshttp/accepts",
+ "dependencies": {
+ "mime-types": "~2.1.34",
+ "negotiator": "0.6.3"
+ },
+ "devDependencies": {
+ "deep-equal": "1.0.1",
+ "eslint": "7.32.0",
+ "eslint-config-standard": "14.1.1",
+ "eslint-plugin-import": "2.25.4",
+ "eslint-plugin-markdown": "2.2.1",
+ "eslint-plugin-node": "11.1.0",
+ "eslint-plugin-promise": "4.3.1",
+ "eslint-plugin-standard": "4.1.0",
+ "mocha": "9.2.0",
+ "nyc": "15.1.0"
+ },
+ "files": [
+ "LICENSE",
+ "HISTORY.md",
+ "index.js"
+ ],
+ "engines": {
+ "node": ">= 0.6"
+ },
+ "scripts": {
+ "lint": "eslint .",
+ "test": "mocha --reporter spec --check-leaks --bail test/",
+ "test-ci": "nyc --reporter=lcov --reporter=text npm test",
+ "test-cov": "nyc --reporter=html --reporter=text npm test"
+ },
+ "keywords": [
+ "content",
+ "negotiation",
+ "accept",
+ "accepts"
+ ]
+}
diff --git a/node_modules/acorn-jsx/LICENSE b/node_modules/acorn-jsx/LICENSE
new file mode 100644
index 0000000000000000000000000000000000000000..695d4b93082bee2494e7a1519c3b6b88b33a1568
--- /dev/null
+++ b/node_modules/acorn-jsx/LICENSE
@@ -0,0 +1,19 @@
+Copyright (C) 2012-2017 by Ingvar Stepanyan
+
+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.
diff --git a/node_modules/acorn-jsx/README.md b/node_modules/acorn-jsx/README.md
new file mode 100644
index 0000000000000000000000000000000000000000..317c3ac4a5534ecda2c0087e7de1fa883b9ccc8f
--- /dev/null
+++ b/node_modules/acorn-jsx/README.md
@@ -0,0 +1,40 @@
+# Acorn-JSX
+
+[](https://travis-ci.org/acornjs/acorn-jsx)
+[](https://www.npmjs.org/package/acorn-jsx)
+
+This is plugin for [Acorn](http://marijnhaverbeke.nl/acorn/) - a tiny, fast JavaScript parser, written completely in JavaScript.
+
+It was created as an experimental alternative, faster [React.js JSX](http://facebook.github.io/react/docs/jsx-in-depth.html) parser. Later, it replaced the [official parser](https://github.com/facebookarchive/esprima) and these days is used by many prominent development tools.
+
+## Transpiler
+
+Please note that this tool only parses source code to JSX AST, which is useful for various language tools and services. If you want to transpile your code to regular ES5-compliant JavaScript with source map, check out [Babel](https://babeljs.io/) and [Buble](https://buble.surge.sh/) transpilers which use `acorn-jsx` under the hood.
+
+## Usage
+
+Requiring this module provides you with an Acorn plugin that you can use like this:
+
+```javascript
+var acorn = require("acorn");
+var jsx = require("acorn-jsx");
+acorn.Parser.extend(jsx()).parse("my(, 'code');");
+```
+
+Note that official spec doesn't support mix of XML namespaces and object-style access in tag names (#27) like in ``, so it was deprecated in `acorn-jsx@3.0`. If you still want to opt-in to support of such constructions, you can pass the following option:
+
+```javascript
+acorn.Parser.extend(jsx({ allowNamespacedObjects: true }))
+```
+
+Also, since most apps use pure React transformer, a new option was introduced that allows to prohibit namespaces completely:
+
+```javascript
+acorn.Parser.extend(jsx({ allowNamespaces: false }))
+```
+
+Note that by default `allowNamespaces` is enabled for spec compliancy.
+
+## License
+
+This plugin is issued under the [MIT license](./LICENSE).
diff --git a/node_modules/acorn-jsx/index.d.ts b/node_modules/acorn-jsx/index.d.ts
new file mode 100644
index 0000000000000000000000000000000000000000..f37b1df4c77c500b68aafa876072448758046f69
--- /dev/null
+++ b/node_modules/acorn-jsx/index.d.ts
@@ -0,0 +1,12 @@
+import { Parser } from 'acorn'
+
+declare const jsx: (options?: jsx.Options) => (BaseParser: typeof Parser) => typeof Parser;
+
+declare namespace jsx {
+ interface Options {
+ allowNamespacedObjects?: boolean;
+ allowNamespaces?: boolean;
+ }
+}
+
+export = jsx;
diff --git a/node_modules/acorn-jsx/index.js b/node_modules/acorn-jsx/index.js
new file mode 100644
index 0000000000000000000000000000000000000000..004e0809024006335916314d605090629b73575f
--- /dev/null
+++ b/node_modules/acorn-jsx/index.js
@@ -0,0 +1,488 @@
+'use strict';
+
+const XHTMLEntities = require('./xhtml');
+
+const hexNumber = /^[\da-fA-F]+$/;
+const decimalNumber = /^\d+$/;
+
+// The map to `acorn-jsx` tokens from `acorn` namespace objects.
+const acornJsxMap = new WeakMap();
+
+// Get the original tokens for the given `acorn` namespace object.
+function getJsxTokens(acorn) {
+ acorn = acorn.Parser.acorn || acorn;
+ let acornJsx = acornJsxMap.get(acorn);
+ if (!acornJsx) {
+ const tt = acorn.tokTypes;
+ const TokContext = acorn.TokContext;
+ const TokenType = acorn.TokenType;
+ const tc_oTag = new TokContext('...', true, true);
+ const tokContexts = {
+ tc_oTag: tc_oTag,
+ tc_cTag: tc_cTag,
+ tc_expr: tc_expr
+ };
+ const tokTypes = {
+ jsxName: new TokenType('jsxName'),
+ jsxText: new TokenType('jsxText', {beforeExpr: true}),
+ jsxTagStart: new TokenType('jsxTagStart', {startsExpr: true}),
+ jsxTagEnd: new TokenType('jsxTagEnd')
+ };
+
+ tokTypes.jsxTagStart.updateContext = function() {
+ this.context.push(tc_expr); // treat as beginning of JSX expression
+ this.context.push(tc_oTag); // start opening tag context
+ this.exprAllowed = false;
+ };
+ tokTypes.jsxTagEnd.updateContext = function(prevType) {
+ let out = this.context.pop();
+ if (out === tc_oTag && prevType === tt.slash || out === tc_cTag) {
+ this.context.pop();
+ this.exprAllowed = this.curContext() === tc_expr;
+ } else {
+ this.exprAllowed = true;
+ }
+ };
+
+ acornJsx = { tokContexts: tokContexts, tokTypes: tokTypes };
+ acornJsxMap.set(acorn, acornJsx);
+ }
+
+ return acornJsx;
+}
+
+// Transforms JSX element name to string.
+
+function getQualifiedJSXName(object) {
+ if (!object)
+ return object;
+
+ if (object.type === 'JSXIdentifier')
+ return object.name;
+
+ if (object.type === 'JSXNamespacedName')
+ return object.namespace.name + ':' + object.name.name;
+
+ if (object.type === 'JSXMemberExpression')
+ return getQualifiedJSXName(object.object) + '.' +
+ getQualifiedJSXName(object.property);
+}
+
+module.exports = function(options) {
+ options = options || {};
+ return function(Parser) {
+ return plugin({
+ allowNamespaces: options.allowNamespaces !== false,
+ allowNamespacedObjects: !!options.allowNamespacedObjects
+ }, Parser);
+ };
+};
+
+// This is `tokTypes` of the peer dep.
+// This can be different instances from the actual `tokTypes` this plugin uses.
+Object.defineProperty(module.exports, "tokTypes", {
+ get: function get_tokTypes() {
+ return getJsxTokens(require("acorn")).tokTypes;
+ },
+ configurable: true,
+ enumerable: true
+});
+
+function plugin(options, Parser) {
+ const acorn = Parser.acorn || require("acorn");
+ const acornJsx = getJsxTokens(acorn);
+ const tt = acorn.tokTypes;
+ const tok = acornJsx.tokTypes;
+ const tokContexts = acorn.tokContexts;
+ const tc_oTag = acornJsx.tokContexts.tc_oTag;
+ const tc_cTag = acornJsx.tokContexts.tc_cTag;
+ const tc_expr = acornJsx.tokContexts.tc_expr;
+ const isNewLine = acorn.isNewLine;
+ const isIdentifierStart = acorn.isIdentifierStart;
+ const isIdentifierChar = acorn.isIdentifierChar;
+
+ return class extends Parser {
+ // Expose actual `tokTypes` and `tokContexts` to other plugins.
+ static get acornJsx() {
+ return acornJsx;
+ }
+
+ // Reads inline JSX contents token.
+ jsx_readToken() {
+ let out = '', chunkStart = this.pos;
+ for (;;) {
+ if (this.pos >= this.input.length)
+ this.raise(this.start, 'Unterminated JSX contents');
+ let ch = this.input.charCodeAt(this.pos);
+
+ switch (ch) {
+ case 60: // '<'
+ case 123: // '{'
+ if (this.pos === this.start) {
+ if (ch === 60 && this.exprAllowed) {
+ ++this.pos;
+ return this.finishToken(tok.jsxTagStart);
+ }
+ return this.getTokenFromCode(ch);
+ }
+ out += this.input.slice(chunkStart, this.pos);
+ return this.finishToken(tok.jsxText, out);
+
+ case 38: // '&'
+ out += this.input.slice(chunkStart, this.pos);
+ out += this.jsx_readEntity();
+ chunkStart = this.pos;
+ break;
+
+ case 62: // '>'
+ case 125: // '}'
+ this.raise(
+ this.pos,
+ "Unexpected token `" + this.input[this.pos] + "`. Did you mean `" +
+ (ch === 62 ? ">" : "}") + "` or " + "`{\"" + this.input[this.pos] + "\"}" + "`?"
+ );
+
+ default:
+ if (isNewLine(ch)) {
+ out += this.input.slice(chunkStart, this.pos);
+ out += this.jsx_readNewLine(true);
+ chunkStart = this.pos;
+ } else {
+ ++this.pos;
+ }
+ }
+ }
+ }
+
+ jsx_readNewLine(normalizeCRLF) {
+ let ch = this.input.charCodeAt(this.pos);
+ let out;
+ ++this.pos;
+ if (ch === 13 && this.input.charCodeAt(this.pos) === 10) {
+ ++this.pos;
+ out = normalizeCRLF ? '\n' : '\r\n';
+ } else {
+ out = String.fromCharCode(ch);
+ }
+ if (this.options.locations) {
+ ++this.curLine;
+ this.lineStart = this.pos;
+ }
+
+ return out;
+ }
+
+ jsx_readString(quote) {
+ let out = '', chunkStart = ++this.pos;
+ for (;;) {
+ if (this.pos >= this.input.length)
+ this.raise(this.start, 'Unterminated string constant');
+ let ch = this.input.charCodeAt(this.pos);
+ if (ch === quote) break;
+ if (ch === 38) { // '&'
+ out += this.input.slice(chunkStart, this.pos);
+ out += this.jsx_readEntity();
+ chunkStart = this.pos;
+ } else if (isNewLine(ch)) {
+ out += this.input.slice(chunkStart, this.pos);
+ out += this.jsx_readNewLine(false);
+ chunkStart = this.pos;
+ } else {
+ ++this.pos;
+ }
+ }
+ out += this.input.slice(chunkStart, this.pos++);
+ return this.finishToken(tt.string, out);
+ }
+
+ jsx_readEntity() {
+ let str = '', count = 0, entity;
+ let ch = this.input[this.pos];
+ if (ch !== '&')
+ this.raise(this.pos, 'Entity must start with an ampersand');
+ let startPos = ++this.pos;
+ while (this.pos < this.input.length && count++ < 10) {
+ ch = this.input[this.pos++];
+ if (ch === ';') {
+ if (str[0] === '#') {
+ if (str[1] === 'x') {
+ str = str.substr(2);
+ if (hexNumber.test(str))
+ entity = String.fromCharCode(parseInt(str, 16));
+ } else {
+ str = str.substr(1);
+ if (decimalNumber.test(str))
+ entity = String.fromCharCode(parseInt(str, 10));
+ }
+ } else {
+ entity = XHTMLEntities[str];
+ }
+ break;
+ }
+ str += ch;
+ }
+ if (!entity) {
+ this.pos = startPos;
+ return '&';
+ }
+ return entity;
+ }
+
+ // Read a JSX identifier (valid tag or attribute name).
+ //
+ // Optimized version since JSX identifiers can't contain
+ // escape characters and so can be read as single slice.
+ // Also assumes that first character was already checked
+ // by isIdentifierStart in readToken.
+
+ jsx_readWord() {
+ let ch, start = this.pos;
+ do {
+ ch = this.input.charCodeAt(++this.pos);
+ } while (isIdentifierChar(ch) || ch === 45); // '-'
+ return this.finishToken(tok.jsxName, this.input.slice(start, this.pos));
+ }
+
+ // Parse next token as JSX identifier
+
+ jsx_parseIdentifier() {
+ let node = this.startNode();
+ if (this.type === tok.jsxName)
+ node.name = this.value;
+ else if (this.type.keyword)
+ node.name = this.type.keyword;
+ else
+ this.unexpected();
+ this.next();
+ return this.finishNode(node, 'JSXIdentifier');
+ }
+
+ // Parse namespaced identifier.
+
+ jsx_parseNamespacedName() {
+ let startPos = this.start, startLoc = this.startLoc;
+ let name = this.jsx_parseIdentifier();
+ if (!options.allowNamespaces || !this.eat(tt.colon)) return name;
+ var node = this.startNodeAt(startPos, startLoc);
+ node.namespace = name;
+ node.name = this.jsx_parseIdentifier();
+ return this.finishNode(node, 'JSXNamespacedName');
+ }
+
+ // Parses element name in any form - namespaced, member
+ // or single identifier.
+
+ jsx_parseElementName() {
+ if (this.type === tok.jsxTagEnd) return '';
+ let startPos = this.start, startLoc = this.startLoc;
+ let node = this.jsx_parseNamespacedName();
+ if (this.type === tt.dot && node.type === 'JSXNamespacedName' && !options.allowNamespacedObjects) {
+ this.unexpected();
+ }
+ while (this.eat(tt.dot)) {
+ let newNode = this.startNodeAt(startPos, startLoc);
+ newNode.object = node;
+ newNode.property = this.jsx_parseIdentifier();
+ node = this.finishNode(newNode, 'JSXMemberExpression');
+ }
+ return node;
+ }
+
+ // Parses any type of JSX attribute value.
+
+ jsx_parseAttributeValue() {
+ switch (this.type) {
+ case tt.braceL:
+ let node = this.jsx_parseExpressionContainer();
+ if (node.expression.type === 'JSXEmptyExpression')
+ this.raise(node.start, 'JSX attributes must only be assigned a non-empty expression');
+ return node;
+
+ case tok.jsxTagStart:
+ case tt.string:
+ return this.parseExprAtom();
+
+ default:
+ this.raise(this.start, 'JSX value should be either an expression or a quoted JSX text');
+ }
+ }
+
+ // JSXEmptyExpression is unique type since it doesn't actually parse anything,
+ // and so it should start at the end of last read token (left brace) and finish
+ // at the beginning of the next one (right brace).
+
+ jsx_parseEmptyExpression() {
+ let node = this.startNodeAt(this.lastTokEnd, this.lastTokEndLoc);
+ return this.finishNodeAt(node, 'JSXEmptyExpression', this.start, this.startLoc);
+ }
+
+ // Parses JSX expression enclosed into curly brackets.
+
+ jsx_parseExpressionContainer() {
+ let node = this.startNode();
+ this.next();
+ node.expression = this.type === tt.braceR
+ ? this.jsx_parseEmptyExpression()
+ : this.parseExpression();
+ this.expect(tt.braceR);
+ return this.finishNode(node, 'JSXExpressionContainer');
+ }
+
+ // Parses following JSX attribute name-value pair.
+
+ jsx_parseAttribute() {
+ let node = this.startNode();
+ if (this.eat(tt.braceL)) {
+ this.expect(tt.ellipsis);
+ node.argument = this.parseMaybeAssign();
+ this.expect(tt.braceR);
+ return this.finishNode(node, 'JSXSpreadAttribute');
+ }
+ node.name = this.jsx_parseNamespacedName();
+ node.value = this.eat(tt.eq) ? this.jsx_parseAttributeValue() : null;
+ return this.finishNode(node, 'JSXAttribute');
+ }
+
+ // Parses JSX opening tag starting after '<'.
+
+ jsx_parseOpeningElementAt(startPos, startLoc) {
+ let node = this.startNodeAt(startPos, startLoc);
+ node.attributes = [];
+ let nodeName = this.jsx_parseElementName();
+ if (nodeName) node.name = nodeName;
+ while (this.type !== tt.slash && this.type !== tok.jsxTagEnd)
+ node.attributes.push(this.jsx_parseAttribute());
+ node.selfClosing = this.eat(tt.slash);
+ this.expect(tok.jsxTagEnd);
+ return this.finishNode(node, nodeName ? 'JSXOpeningElement' : 'JSXOpeningFragment');
+ }
+
+ // Parses JSX closing tag starting after ''.
+
+ jsx_parseClosingElementAt(startPos, startLoc) {
+ let node = this.startNodeAt(startPos, startLoc);
+ let nodeName = this.jsx_parseElementName();
+ if (nodeName) node.name = nodeName;
+ this.expect(tok.jsxTagEnd);
+ return this.finishNode(node, nodeName ? 'JSXClosingElement' : 'JSXClosingFragment');
+ }
+
+ // Parses entire JSX element, including it's opening tag
+ // (starting after '<'), attributes, contents and closing tag.
+
+ jsx_parseElementAt(startPos, startLoc) {
+ let node = this.startNodeAt(startPos, startLoc);
+ let children = [];
+ let openingElement = this.jsx_parseOpeningElementAt(startPos, startLoc);
+ let closingElement = null;
+
+ if (!openingElement.selfClosing) {
+ contents: for (;;) {
+ switch (this.type) {
+ case tok.jsxTagStart:
+ startPos = this.start; startLoc = this.startLoc;
+ this.next();
+ if (this.eat(tt.slash)) {
+ closingElement = this.jsx_parseClosingElementAt(startPos, startLoc);
+ break contents;
+ }
+ children.push(this.jsx_parseElementAt(startPos, startLoc));
+ break;
+
+ case tok.jsxText:
+ children.push(this.parseExprAtom());
+ break;
+
+ case tt.braceL:
+ children.push(this.jsx_parseExpressionContainer());
+ break;
+
+ default:
+ this.unexpected();
+ }
+ }
+ if (getQualifiedJSXName(closingElement.name) !== getQualifiedJSXName(openingElement.name)) {
+ this.raise(
+ closingElement.start,
+ 'Expected corresponding JSX closing tag for <' + getQualifiedJSXName(openingElement.name) + '>');
+ }
+ }
+ let fragmentOrElement = openingElement.name ? 'Element' : 'Fragment';
+
+ node['opening' + fragmentOrElement] = openingElement;
+ node['closing' + fragmentOrElement] = closingElement;
+ node.children = children;
+ if (this.type === tt.relational && this.value === "<") {
+ this.raise(this.start, "Adjacent JSX elements must be wrapped in an enclosing tag");
+ }
+ return this.finishNode(node, 'JSX' + fragmentOrElement);
+ }
+
+ // Parse JSX text
+
+ jsx_parseText() {
+ let node = this.parseLiteral(this.value);
+ node.type = "JSXText";
+ return node;
+ }
+
+ // Parses entire JSX element from current position.
+
+ jsx_parseElement() {
+ let startPos = this.start, startLoc = this.startLoc;
+ this.next();
+ return this.jsx_parseElementAt(startPos, startLoc);
+ }
+
+ parseExprAtom(refShortHandDefaultPos) {
+ if (this.type === tok.jsxText)
+ return this.jsx_parseText();
+ else if (this.type === tok.jsxTagStart)
+ return this.jsx_parseElement();
+ else
+ return super.parseExprAtom(refShortHandDefaultPos);
+ }
+
+ readToken(code) {
+ let context = this.curContext();
+
+ if (context === tc_expr) return this.jsx_readToken();
+
+ if (context === tc_oTag || context === tc_cTag) {
+ if (isIdentifierStart(code)) return this.jsx_readWord();
+
+ if (code == 62) {
+ ++this.pos;
+ return this.finishToken(tok.jsxTagEnd);
+ }
+
+ if ((code === 34 || code === 39) && context == tc_oTag)
+ return this.jsx_readString(code);
+ }
+
+ if (code === 60 && this.exprAllowed && this.input.charCodeAt(this.pos + 1) !== 33) {
+ ++this.pos;
+ return this.finishToken(tok.jsxTagStart);
+ }
+ return super.readToken(code);
+ }
+
+ updateContext(prevType) {
+ if (this.type == tt.braceL) {
+ var curContext = this.curContext();
+ if (curContext == tc_oTag) this.context.push(tokContexts.b_expr);
+ else if (curContext == tc_expr) this.context.push(tokContexts.b_tmpl);
+ else super.updateContext(prevType);
+ this.exprAllowed = true;
+ } else if (this.type === tt.slash && prevType === tok.jsxTagStart) {
+ this.context.length -= 2; // do not consider JSX expr -> JSX open tag -> ... anymore
+ this.context.push(tc_cTag); // reconsider as closing tag context
+ this.exprAllowed = false;
+ } else {
+ return super.updateContext(prevType);
+ }
+ }
+ };
+}
diff --git a/node_modules/acorn-jsx/package.json b/node_modules/acorn-jsx/package.json
new file mode 100644
index 0000000000000000000000000000000000000000..6debde9caa30ba90f7c4ad48c3fd1b070cd7095b
--- /dev/null
+++ b/node_modules/acorn-jsx/package.json
@@ -0,0 +1,27 @@
+{
+ "name": "acorn-jsx",
+ "description": "Modern, fast React.js JSX parser",
+ "homepage": "https://github.com/acornjs/acorn-jsx",
+ "version": "5.3.2",
+ "maintainers": [
+ {
+ "name": "Ingvar Stepanyan",
+ "email": "me@rreverser.com",
+ "web": "http://rreverser.com/"
+ }
+ ],
+ "repository": {
+ "type": "git",
+ "url": "https://github.com/acornjs/acorn-jsx"
+ },
+ "license": "MIT",
+ "scripts": {
+ "test": "node test/run.js"
+ },
+ "peerDependencies": {
+ "acorn": "^6.0.0 || ^7.0.0 || ^8.0.0"
+ },
+ "devDependencies": {
+ "acorn": "^8.0.1"
+ }
+}
diff --git a/node_modules/acorn-jsx/xhtml.js b/node_modules/acorn-jsx/xhtml.js
new file mode 100644
index 0000000000000000000000000000000000000000..c1520092f8e31ed589d21605ede2ebd27386b218
--- /dev/null
+++ b/node_modules/acorn-jsx/xhtml.js
@@ -0,0 +1,255 @@
+module.exports = {
+ quot: '\u0022',
+ amp: '&',
+ apos: '\u0027',
+ lt: '<',
+ gt: '>',
+ nbsp: '\u00A0',
+ iexcl: '\u00A1',
+ cent: '\u00A2',
+ pound: '\u00A3',
+ curren: '\u00A4',
+ yen: '\u00A5',
+ brvbar: '\u00A6',
+ sect: '\u00A7',
+ uml: '\u00A8',
+ copy: '\u00A9',
+ ordf: '\u00AA',
+ laquo: '\u00AB',
+ not: '\u00AC',
+ shy: '\u00AD',
+ reg: '\u00AE',
+ macr: '\u00AF',
+ deg: '\u00B0',
+ plusmn: '\u00B1',
+ sup2: '\u00B2',
+ sup3: '\u00B3',
+ acute: '\u00B4',
+ micro: '\u00B5',
+ para: '\u00B6',
+ middot: '\u00B7',
+ cedil: '\u00B8',
+ sup1: '\u00B9',
+ ordm: '\u00BA',
+ raquo: '\u00BB',
+ frac14: '\u00BC',
+ frac12: '\u00BD',
+ frac34: '\u00BE',
+ iquest: '\u00BF',
+ Agrave: '\u00C0',
+ Aacute: '\u00C1',
+ Acirc: '\u00C2',
+ Atilde: '\u00C3',
+ Auml: '\u00C4',
+ Aring: '\u00C5',
+ AElig: '\u00C6',
+ Ccedil: '\u00C7',
+ Egrave: '\u00C8',
+ Eacute: '\u00C9',
+ Ecirc: '\u00CA',
+ Euml: '\u00CB',
+ Igrave: '\u00CC',
+ Iacute: '\u00CD',
+ Icirc: '\u00CE',
+ Iuml: '\u00CF',
+ ETH: '\u00D0',
+ Ntilde: '\u00D1',
+ Ograve: '\u00D2',
+ Oacute: '\u00D3',
+ Ocirc: '\u00D4',
+ Otilde: '\u00D5',
+ Ouml: '\u00D6',
+ times: '\u00D7',
+ Oslash: '\u00D8',
+ Ugrave: '\u00D9',
+ Uacute: '\u00DA',
+ Ucirc: '\u00DB',
+ Uuml: '\u00DC',
+ Yacute: '\u00DD',
+ THORN: '\u00DE',
+ szlig: '\u00DF',
+ agrave: '\u00E0',
+ aacute: '\u00E1',
+ acirc: '\u00E2',
+ atilde: '\u00E3',
+ auml: '\u00E4',
+ aring: '\u00E5',
+ aelig: '\u00E6',
+ ccedil: '\u00E7',
+ egrave: '\u00E8',
+ eacute: '\u00E9',
+ ecirc: '\u00EA',
+ euml: '\u00EB',
+ igrave: '\u00EC',
+ iacute: '\u00ED',
+ icirc: '\u00EE',
+ iuml: '\u00EF',
+ eth: '\u00F0',
+ ntilde: '\u00F1',
+ ograve: '\u00F2',
+ oacute: '\u00F3',
+ ocirc: '\u00F4',
+ otilde: '\u00F5',
+ ouml: '\u00F6',
+ divide: '\u00F7',
+ oslash: '\u00F8',
+ ugrave: '\u00F9',
+ uacute: '\u00FA',
+ ucirc: '\u00FB',
+ uuml: '\u00FC',
+ yacute: '\u00FD',
+ thorn: '\u00FE',
+ yuml: '\u00FF',
+ OElig: '\u0152',
+ oelig: '\u0153',
+ Scaron: '\u0160',
+ scaron: '\u0161',
+ Yuml: '\u0178',
+ fnof: '\u0192',
+ circ: '\u02C6',
+ tilde: '\u02DC',
+ Alpha: '\u0391',
+ Beta: '\u0392',
+ Gamma: '\u0393',
+ Delta: '\u0394',
+ Epsilon: '\u0395',
+ Zeta: '\u0396',
+ Eta: '\u0397',
+ Theta: '\u0398',
+ Iota: '\u0399',
+ Kappa: '\u039A',
+ Lambda: '\u039B',
+ Mu: '\u039C',
+ Nu: '\u039D',
+ Xi: '\u039E',
+ Omicron: '\u039F',
+ Pi: '\u03A0',
+ Rho: '\u03A1',
+ Sigma: '\u03A3',
+ Tau: '\u03A4',
+ Upsilon: '\u03A5',
+ Phi: '\u03A6',
+ Chi: '\u03A7',
+ Psi: '\u03A8',
+ Omega: '\u03A9',
+ alpha: '\u03B1',
+ beta: '\u03B2',
+ gamma: '\u03B3',
+ delta: '\u03B4',
+ epsilon: '\u03B5',
+ zeta: '\u03B6',
+ eta: '\u03B7',
+ theta: '\u03B8',
+ iota: '\u03B9',
+ kappa: '\u03BA',
+ lambda: '\u03BB',
+ mu: '\u03BC',
+ nu: '\u03BD',
+ xi: '\u03BE',
+ omicron: '\u03BF',
+ pi: '\u03C0',
+ rho: '\u03C1',
+ sigmaf: '\u03C2',
+ sigma: '\u03C3',
+ tau: '\u03C4',
+ upsilon: '\u03C5',
+ phi: '\u03C6',
+ chi: '\u03C7',
+ psi: '\u03C8',
+ omega: '\u03C9',
+ thetasym: '\u03D1',
+ upsih: '\u03D2',
+ piv: '\u03D6',
+ ensp: '\u2002',
+ emsp: '\u2003',
+ thinsp: '\u2009',
+ zwnj: '\u200C',
+ zwj: '\u200D',
+ lrm: '\u200E',
+ rlm: '\u200F',
+ ndash: '\u2013',
+ mdash: '\u2014',
+ lsquo: '\u2018',
+ rsquo: '\u2019',
+ sbquo: '\u201A',
+ ldquo: '\u201C',
+ rdquo: '\u201D',
+ bdquo: '\u201E',
+ dagger: '\u2020',
+ Dagger: '\u2021',
+ bull: '\u2022',
+ hellip: '\u2026',
+ permil: '\u2030',
+ prime: '\u2032',
+ Prime: '\u2033',
+ lsaquo: '\u2039',
+ rsaquo: '\u203A',
+ oline: '\u203E',
+ frasl: '\u2044',
+ euro: '\u20AC',
+ image: '\u2111',
+ weierp: '\u2118',
+ real: '\u211C',
+ trade: '\u2122',
+ alefsym: '\u2135',
+ larr: '\u2190',
+ uarr: '\u2191',
+ rarr: '\u2192',
+ darr: '\u2193',
+ harr: '\u2194',
+ crarr: '\u21B5',
+ lArr: '\u21D0',
+ uArr: '\u21D1',
+ rArr: '\u21D2',
+ dArr: '\u21D3',
+ hArr: '\u21D4',
+ forall: '\u2200',
+ part: '\u2202',
+ exist: '\u2203',
+ empty: '\u2205',
+ nabla: '\u2207',
+ isin: '\u2208',
+ notin: '\u2209',
+ ni: '\u220B',
+ prod: '\u220F',
+ sum: '\u2211',
+ minus: '\u2212',
+ lowast: '\u2217',
+ radic: '\u221A',
+ prop: '\u221D',
+ infin: '\u221E',
+ ang: '\u2220',
+ and: '\u2227',
+ or: '\u2228',
+ cap: '\u2229',
+ cup: '\u222A',
+ 'int': '\u222B',
+ there4: '\u2234',
+ sim: '\u223C',
+ cong: '\u2245',
+ asymp: '\u2248',
+ ne: '\u2260',
+ equiv: '\u2261',
+ le: '\u2264',
+ ge: '\u2265',
+ sub: '\u2282',
+ sup: '\u2283',
+ nsub: '\u2284',
+ sube: '\u2286',
+ supe: '\u2287',
+ oplus: '\u2295',
+ otimes: '\u2297',
+ perp: '\u22A5',
+ sdot: '\u22C5',
+ lceil: '\u2308',
+ rceil: '\u2309',
+ lfloor: '\u230A',
+ rfloor: '\u230B',
+ lang: '\u2329',
+ rang: '\u232A',
+ loz: '\u25CA',
+ spades: '\u2660',
+ clubs: '\u2663',
+ hearts: '\u2665',
+ diams: '\u2666'
+};
diff --git a/node_modules/acorn/CHANGELOG.md b/node_modules/acorn/CHANGELOG.md
new file mode 100644
index 0000000000000000000000000000000000000000..6efbc332df56bb278c83ceefd7f59b6234ca282e
--- /dev/null
+++ b/node_modules/acorn/CHANGELOG.md
@@ -0,0 +1,986 @@
+## 8.17.0 (2026-06-11)
+
+### New features
+
+The new `strict` option can be used to start script sources in strict mode.
+
+### Bug fixes
+
+Fix a number of corner case bugs when `using` or `await using` appear in `for` loop specs.
+
+Disallow `new super()` expressions.
+
+Don't allow the conditional in a ternary expression to be a (naked) arrow function.
+
+## 8.16.0 (2026-02-19)
+
+### New features
+
+The `sourceType` option can now be set to `"commonjs"` to have the parser treat the top level scope as a function scope.
+
+Add support for Unicode 17.
+
+### Bug fixes
+
+Don't recognize `await using` as contextual keywords when followed directly by a backslash.
+
+Fix an issue where the parser would allow `return` statements in `static` blocks when `allowReturnOutsideFunction` was enabled.
+
+Properly reject `using` declarations that appear directly in `switch` or `for` head scopes.
+
+Fix some corner case issues in the recognition of `using` syntax.
+
+## 8.15.0 (2025-06-08)
+
+### New features
+
+Support `using` and `await using` syntax.
+
+The `AnyNode` type is now defined in such a way that plugins can extend it.
+
+### Bug fixes
+
+Fix an issue where the `bigint` property of literal nodes for non-decimal bigints had the wrong format.
+
+The `acorn` CLI tool no longer crashes when emitting a tree that contains a bigint.
+
+## 8.14.1 (2025-03-05)
+
+### Bug fixes
+
+Fix an issue where `await` expressions in class field initializers were inappropriately allowed.
+
+Properly allow await inside an async arrow function inside a class field initializer.
+
+Mention the source file name in syntax error messages when given.
+
+Properly add an empty `attributes` property to every form of `ExportNamedDeclaration`.
+
+## 8.14.0 (2024-10-27)
+
+### New features
+
+Support ES2025 import attributes.
+
+Support ES2025 RegExp modifiers.
+
+### Bug fixes
+
+Support some missing Unicode properties.
+
+## 8.13.0 (2024-10-16)
+
+### New features
+
+Upgrade to Unicode 16.0.
+
+## 8.12.1 (2024-07-03)
+
+### Bug fixes
+
+Fix a regression that caused Acorn to no longer run on Node versions <8.10.
+
+## 8.12.0 (2024-06-14)
+
+### New features
+
+Support ES2025 duplicate capture group names in regular expressions.
+
+### Bug fixes
+
+Include `VariableDeclarator` in the `AnyNode` type so that walker objects can refer to it without getting a type error.
+
+Properly raise a parse error for invalid `for`/`of` statements using `async` as binding name.
+
+Properly recognize \"use strict\" when preceded by a string with an escaped newline.
+
+Mark the `Parser` constructor as protected, not private, so plugins can extend it without type errors.
+
+Fix a bug where some invalid `delete` expressions were let through when the operand was parenthesized and `preserveParens` was enabled.
+
+Properly normalize line endings in raw strings of invalid template tokens.
+
+Properly track line numbers for escaped newlines in strings.
+
+Fix a bug that broke line number accounting after a template literal with invalid escape sequences.
+
+## 8.11.3 (2023-12-29)
+
+### Bug fixes
+
+Add `Function` and `Class` to the `AggregateType` type, so that they can be used in walkers without raising a type error.
+
+Make sure `onToken` get an `import` keyword token when parsing `import.meta`.
+
+Fix a bug where `.loc.start` could be undefined for `new.target` `meta` nodes.
+
+## 8.11.2 (2023-10-27)
+
+### Bug fixes
+
+Fix a bug that caused regular expressions after colon tokens to not be properly tokenized in some circumstances.
+
+## 8.11.1 (2023-10-26)
+
+### Bug fixes
+
+Fix a regression where `onToken` would receive 'name' tokens for 'new' keyword tokens.
+
+## 8.11.0 (2023-10-26)
+
+### Bug fixes
+
+Fix an issue where tokenizing (without parsing) an object literal with a property named `class` or `function` could, in some circumstance, put the tokenizer into an invalid state.
+
+Fix an issue where a slash after a call to a propery named the same as some keywords would be tokenized as a regular expression.
+
+### New features
+
+Upgrade to Unicode 15.1.
+
+Use a set of new, much more precise, TypeScript types.
+
+## 8.10.0 (2023-07-05)
+
+### New features
+
+Add a `checkPrivateFields` option that disables strict checking of private property use.
+
+## 8.9.0 (2023-06-16)
+
+### Bug fixes
+
+Forbid dynamic import after `new`, even when part of a member expression.
+
+### New features
+
+Add Unicode properties for ES2023.
+
+Add support for the `v` flag to regular expressions.
+
+## 8.8.2 (2023-01-23)
+
+### Bug fixes
+
+Fix a bug that caused `allowHashBang` to be set to false when not provided, even with `ecmaVersion >= 14`.
+
+Fix an exception when passing no option object to `parse` or `new Parser`.
+
+Fix incorrect parse error on `if (0) let\n[astral identifier char]`.
+
+## 8.8.1 (2022-10-24)
+
+### Bug fixes
+
+Make type for `Comment` compatible with estree types.
+
+## 8.8.0 (2022-07-21)
+
+### Bug fixes
+
+Allow parentheses around spread args in destructuring object assignment.
+
+Fix an issue where the tree contained `directive` properties in when parsing with a language version that doesn't support them.
+
+### New features
+
+Support hashbang comments by default in ECMAScript 2023 and later.
+
+## 8.7.1 (2021-04-26)
+
+### Bug fixes
+
+Stop handling `"use strict"` directives in ECMAScript versions before 5.
+
+Fix an issue where duplicate quoted export names in `export *` syntax were incorrectly checked.
+
+Add missing type for `tokTypes`.
+
+## 8.7.0 (2021-12-27)
+
+### New features
+
+Support quoted export names.
+
+Upgrade to Unicode 14.
+
+Add support for Unicode 13 properties in regular expressions.
+
+### Bug fixes
+
+Use a loop to find line breaks, because the existing regexp search would overrun the end of the searched range and waste a lot of time in minified code.
+
+## 8.6.0 (2021-11-18)
+
+### Bug fixes
+
+Fix a bug where an object literal with multiple `__proto__` properties would incorrectly be accepted if a later property value held an assigment.
+
+### New features
+
+Support class private fields with the `in` operator.
+
+## 8.5.0 (2021-09-06)
+
+### Bug fixes
+
+Improve context-dependent tokenization in a number of corner cases.
+
+Fix location tracking after a 0x2028 or 0x2029 character in a string literal (which before did not increase the line number).
+
+Fix an issue where arrow function bodies in for loop context would inappropriately consume `in` operators.
+
+Fix wrong end locations stored on SequenceExpression nodes.
+
+Implement restriction that `for`/`of` loop LHS can't start with `let`.
+
+### New features
+
+Add support for ES2022 class static blocks.
+
+Allow multiple input files to be passed to the CLI tool.
+
+## 8.4.1 (2021-06-24)
+
+### Bug fixes
+
+Fix a bug where `allowAwaitOutsideFunction` would allow `await` in class field initializers, and setting `ecmaVersion` to 13 or higher would allow top-level await in non-module sources.
+
+## 8.4.0 (2021-06-11)
+
+### New features
+
+A new option, `allowSuperOutsideMethod`, can be used to suppress the error when `super` is used in the wrong context.
+
+## 8.3.0 (2021-05-31)
+
+### New features
+
+Default `allowAwaitOutsideFunction` to true for ECMAScript 2022 an higher.
+
+Add support for the `d` ([indices](https://github.com/tc39/proposal-regexp-match-indices)) regexp flag.
+
+## 8.2.4 (2021-05-04)
+
+### Bug fixes
+
+Fix spec conformity in corner case 'for await (async of ...)'.
+
+## 8.2.3 (2021-05-04)
+
+### Bug fixes
+
+Fix an issue where the library couldn't parse 'for (async of ...)'.
+
+Fix a bug in UTF-16 decoding that would read characters incorrectly in some circumstances.
+
+## 8.2.2 (2021-04-29)
+
+### Bug fixes
+
+Fix a bug where a class field initialized to an async arrow function wouldn't allow await inside it. Same issue existed for generator arrow functions with yield.
+
+## 8.2.1 (2021-04-24)
+
+### Bug fixes
+
+Fix a regression introduced in 8.2.0 where static or async class methods with keyword names fail to parse.
+
+## 8.2.0 (2021-04-24)
+
+### New features
+
+Add support for ES2022 class fields and private methods.
+
+## 8.1.1 (2021-04-12)
+
+### Various
+
+Stop shipping source maps in the NPM package.
+
+## 8.1.0 (2021-03-09)
+
+### Bug fixes
+
+Fix a spurious error in nested destructuring arrays.
+
+### New features
+
+Expose `allowAwaitOutsideFunction` in CLI interface.
+
+Make `allowImportExportAnywhere` also apply to `import.meta`.
+
+## 8.0.5 (2021-01-25)
+
+### Bug fixes
+
+Adjust package.json to work with Node 12.16.0 and 13.0-13.6.
+
+## 8.0.4 (2020-10-05)
+
+### Bug fixes
+
+Make `await x ** y` an error, following the spec.
+
+Fix potentially exponential regular expression.
+
+## 8.0.3 (2020-10-02)
+
+### Bug fixes
+
+Fix a wasteful loop during `Parser` creation when setting `ecmaVersion` to `"latest"`.
+
+## 8.0.2 (2020-09-30)
+
+### Bug fixes
+
+Make the TypeScript types reflect the current allowed values for `ecmaVersion`.
+
+Fix another regexp/division tokenizer issue.
+
+## 8.0.1 (2020-08-12)
+
+### Bug fixes
+
+Provide the correct value in the `version` export.
+
+## 8.0.0 (2020-08-12)
+
+### Bug fixes
+
+Disallow expressions like `(a = b) = c`.
+
+Make non-octal escape sequences a syntax error in strict mode.
+
+### New features
+
+The package can now be loaded directly as an ECMAScript module in node 13+.
+
+Update to the set of Unicode properties from ES2021.
+
+### Breaking changes
+
+The `ecmaVersion` option is now required. For the moment, omitting it will still work with a warning, but that will change in a future release.
+
+Some changes to method signatures that may be used by plugins.
+
+## 7.4.0 (2020-08-03)
+
+### New features
+
+Add support for logical assignment operators.
+
+Add support for numeric separators.
+
+## 7.3.1 (2020-06-11)
+
+### Bug fixes
+
+Make the string in the `version` export match the actual library version.
+
+## 7.3.0 (2020-06-11)
+
+### Bug fixes
+
+Fix a bug that caused parsing of object patterns with a property named `set` that had a default value to fail.
+
+### New features
+
+Add support for optional chaining (`?.`).
+
+## 7.2.0 (2020-05-09)
+
+### Bug fixes
+
+Fix precedence issue in parsing of async arrow functions.
+
+### New features
+
+Add support for nullish coalescing.
+
+Add support for `import.meta`.
+
+Support `export * as ...` syntax.
+
+Upgrade to Unicode 13.
+
+## 6.4.1 (2020-03-09)
+
+### Bug fixes
+
+More carefully check for valid UTF16 surrogate pairs in regexp validator.
+
+## 7.1.1 (2020-03-01)
+
+### Bug fixes
+
+Treat `\8` and `\9` as invalid escapes in template strings.
+
+Allow unicode escapes in property names that are keywords.
+
+Don't error on an exponential operator expression as argument to `await`.
+
+More carefully check for valid UTF16 surrogate pairs in regexp validator.
+
+## 7.1.0 (2019-09-24)
+
+### Bug fixes
+
+Disallow trailing object literal commas when ecmaVersion is less than 5.
+
+### New features
+
+Add a static `acorn` property to the `Parser` class that contains the entire module interface, to allow plugins to access the instance of the library that they are acting on.
+
+## 7.0.0 (2019-08-13)
+
+### Breaking changes
+
+Changes the node format for dynamic imports to use the `ImportExpression` node type, as defined in [ESTree](https://github.com/estree/estree/blob/master/es2020.md#importexpression).
+
+Makes 10 (ES2019) the default value for the `ecmaVersion` option.
+
+## 6.3.0 (2019-08-12)
+
+### New features
+
+`sourceType: "module"` can now be used even when `ecmaVersion` is less than 6, to parse module-style code that otherwise conforms to an older standard.
+
+## 6.2.1 (2019-07-21)
+
+### Bug fixes
+
+Fix bug causing Acorn to treat some characters as identifier characters that shouldn't be treated as such.
+
+Fix issue where setting the `allowReserved` option to `"never"` allowed reserved words in some circumstances.
+
+## 6.2.0 (2019-07-04)
+
+### Bug fixes
+
+Improve valid assignment checking in `for`/`in` and `for`/`of` loops.
+
+Disallow binding `let` in patterns.
+
+### New features
+
+Support bigint syntax with `ecmaVersion` >= 11.
+
+Support dynamic `import` syntax with `ecmaVersion` >= 11.
+
+Upgrade to Unicode version 12.
+
+## 6.1.1 (2019-02-27)
+
+### Bug fixes
+
+Fix bug that caused parsing default exports of with names to fail.
+
+## 6.1.0 (2019-02-08)
+
+### Bug fixes
+
+Fix scope checking when redefining a `var` as a lexical binding.
+
+### New features
+
+Split up `parseSubscripts` to use an internal `parseSubscript` method to make it easier to extend with plugins.
+
+## 6.0.7 (2019-02-04)
+
+### Bug fixes
+
+Check that exported bindings are defined.
+
+Don't treat `\u180e` as a whitespace character.
+
+Check for duplicate parameter names in methods.
+
+Don't allow shorthand properties when they are generators or async methods.
+
+Forbid binding `await` in async arrow function's parameter list.
+
+## 6.0.6 (2019-01-30)
+
+### Bug fixes
+
+The content of class declarations and expressions is now always parsed in strict mode.
+
+Don't allow `let` or `const` to bind the variable name `let`.
+
+Treat class declarations as lexical.
+
+Don't allow a generator function declaration as the sole body of an `if` or `else`.
+
+Ignore `"use strict"` when after an empty statement.
+
+Allow string line continuations with special line terminator characters.
+
+Treat `for` bodies as part of the `for` scope when checking for conflicting bindings.
+
+Fix bug with parsing `yield` in a `for` loop initializer.
+
+Implement special cases around scope checking for functions.
+
+## 6.0.5 (2019-01-02)
+
+### Bug fixes
+
+Fix TypeScript type for `Parser.extend` and add `allowAwaitOutsideFunction` to options type.
+
+Don't treat `let` as a keyword when the next token is `{` on the next line.
+
+Fix bug that broke checking for parentheses around an object pattern in a destructuring assignment when `preserveParens` was on.
+
+## 6.0.4 (2018-11-05)
+
+### Bug fixes
+
+Further improvements to tokenizing regular expressions in corner cases.
+
+## 6.0.3 (2018-11-04)
+
+### Bug fixes
+
+Fix bug in tokenizing an expression-less return followed by a function followed by a regular expression.
+
+Remove stray symlink in the package tarball.
+
+## 6.0.2 (2018-09-26)
+
+### Bug fixes
+
+Fix bug where default expressions could fail to parse inside an object destructuring assignment expression.
+
+## 6.0.1 (2018-09-14)
+
+### Bug fixes
+
+Fix wrong value in `version` export.
+
+## 6.0.0 (2018-09-14)
+
+### Bug fixes
+
+Better handle variable-redefinition checks for catch bindings and functions directly under if statements.
+
+Forbid `new.target` in top-level arrow functions.
+
+Fix issue with parsing a regexp after `yield` in some contexts.
+
+### New features
+
+The package now comes with TypeScript definitions.
+
+### Breaking changes
+
+The default value of the `ecmaVersion` option is now 9 (2018).
+
+Plugins work differently, and will have to be rewritten to work with this version.
+
+The loose parser and walker have been moved into separate packages (`acorn-loose` and `acorn-walk`).
+
+## 5.7.3 (2018-09-10)
+
+### Bug fixes
+
+Fix failure to tokenize regexps after expressions like `x.of`.
+
+Better error message for unterminated template literals.
+
+## 5.7.2 (2018-08-24)
+
+### Bug fixes
+
+Properly handle `allowAwaitOutsideFunction` in for statements.
+
+Treat function declarations at the top level of modules like let bindings.
+
+Don't allow async function declarations as the only statement under a label.
+
+## 5.7.0 (2018-06-15)
+
+### New features
+
+Upgraded to Unicode 11.
+
+## 5.6.0 (2018-05-31)
+
+### New features
+
+Allow U+2028 and U+2029 in string when ECMAVersion >= 10.
+
+Allow binding-less catch statements when ECMAVersion >= 10.
+
+Add `allowAwaitOutsideFunction` option for parsing top-level `await`.
+
+## 5.5.3 (2018-03-08)
+
+### Bug fixes
+
+A _second_ republish of the code in 5.5.1, this time with yarn, to hopefully get valid timestamps.
+
+## 5.5.2 (2018-03-08)
+
+### Bug fixes
+
+A republish of the code in 5.5.1 in an attempt to solve an issue with the file timestamps in the npm package being 0.
+
+## 5.5.1 (2018-03-06)
+
+### Bug fixes
+
+Fix misleading error message for octal escapes in template strings.
+
+## 5.5.0 (2018-02-27)
+
+### New features
+
+The identifier character categorization is now based on Unicode version 10.
+
+Acorn will now validate the content of regular expressions, including new ES9 features.
+
+## 5.4.0 (2018-02-01)
+
+### Bug fixes
+
+Disallow duplicate or escaped flags on regular expressions.
+
+Disallow octal escapes in strings in strict mode.
+
+### New features
+
+Add support for async iteration.
+
+Add support for object spread and rest.
+
+## 5.3.0 (2017-12-28)
+
+### Bug fixes
+
+Fix parsing of floating point literals with leading zeroes in loose mode.
+
+Allow duplicate property names in object patterns.
+
+Don't allow static class methods named `prototype`.
+
+Disallow async functions directly under `if` or `else`.
+
+Parse right-hand-side of `for`/`of` as an assignment expression.
+
+Stricter parsing of `for`/`in`.
+
+Don't allow unicode escapes in contextual keywords.
+
+### New features
+
+Parsing class members was factored into smaller methods to allow plugins to hook into it.
+
+## 5.2.1 (2017-10-30)
+
+### Bug fixes
+
+Fix a token context corruption bug.
+
+## 5.2.0 (2017-10-30)
+
+### Bug fixes
+
+Fix token context tracking for `class` and `function` in property-name position.
+
+Make sure `%*` isn't parsed as a valid operator.
+
+Allow shorthand properties `get` and `set` to be followed by default values.
+
+Disallow `super` when not in callee or object position.
+
+### New features
+
+Support [`directive` property](https://github.com/estree/estree/compare/b3de58c9997504d6fba04b72f76e6dd1619ee4eb...1da8e603237144f44710360f8feb7a9977e905e0) on directive expression statements.
+
+## 5.1.2 (2017-09-04)
+
+### Bug fixes
+
+Disable parsing of legacy HTML-style comments in modules.
+
+Fix parsing of async methods whose names are keywords.
+
+## 5.1.1 (2017-07-06)
+
+### Bug fixes
+
+Fix problem with disambiguating regexp and division after a class.
+
+## 5.1.0 (2017-07-05)
+
+### Bug fixes
+
+Fix tokenizing of regexps in an object-desctructuring `for`/`of` loop and after `yield`.
+
+Parse zero-prefixed numbers with non-octal digits as decimal.
+
+Allow object/array patterns in rest parameters.
+
+Don't error when `yield` is used as a property name.
+
+Allow `async` as a shorthand object property.
+
+### New features
+
+Implement the [template literal revision proposal](https://github.com/tc39/proposal-template-literal-revision) for ES9.
+
+## 5.0.3 (2017-04-01)
+
+### Bug fixes
+
+Fix spurious duplicate variable definition errors for named functions.
+
+## 5.0.2 (2017-03-30)
+
+### Bug fixes
+
+A binary operator after a parenthesized arrow expression is no longer incorrectly treated as an error.
+
+## 5.0.0 (2017-03-28)
+
+### Bug fixes
+
+Raise an error for duplicated lexical bindings.
+
+Fix spurious error when an assignement expression occurred after a spread expression.
+
+Accept regular expressions after `of` (in `for`/`of`), `yield` (in a generator), and braced arrow functions.
+
+Allow labels in front or `var` declarations, even in strict mode.
+
+### Breaking changes
+
+Parse declarations following `export default` as declaration nodes, not expressions. This means that class and function declarations nodes can now have `null` as their `id`.
+
+## 4.0.11 (2017-02-07)
+
+### Bug fixes
+
+Allow all forms of member expressions to be parenthesized as lvalue.
+
+## 4.0.10 (2017-02-07)
+
+### Bug fixes
+
+Don't expect semicolons after default-exported functions or classes, even when they are expressions.
+
+Check for use of `'use strict'` directives in non-simple parameter functions, even when already in strict mode.
+
+## 4.0.9 (2017-02-06)
+
+### Bug fixes
+
+Fix incorrect error raised for parenthesized simple assignment targets, so that `(x) = 1` parses again.
+
+## 4.0.8 (2017-02-03)
+
+### Bug fixes
+
+Solve spurious parenthesized pattern errors by temporarily erring on the side of accepting programs that our delayed errors don't handle correctly yet.
+
+## 4.0.7 (2017-02-02)
+
+### Bug fixes
+
+Accept invalidly rejected code like `(x).y = 2` again.
+
+Don't raise an error when a function _inside_ strict code has a non-simple parameter list.
+
+## 4.0.6 (2017-02-02)
+
+### Bug fixes
+
+Fix exponential behavior (manifesting itself as a complete hang for even relatively small source files) introduced by the new 'use strict' check.
+
+## 4.0.5 (2017-02-02)
+
+### Bug fixes
+
+Disallow parenthesized pattern expressions.
+
+Allow keywords as export names.
+
+Don't allow the `async` keyword to be parenthesized.
+
+Properly raise an error when a keyword contains a character escape.
+
+Allow `"use strict"` to appear after other string literal expressions.
+
+Disallow labeled declarations.
+
+## 4.0.4 (2016-12-19)
+
+### Bug fixes
+
+Fix crash when `export` was followed by a keyword that can't be
+exported.
+
+## 4.0.3 (2016-08-16)
+
+### Bug fixes
+
+Allow regular function declarations inside single-statement `if` branches in loose mode. Forbid them entirely in strict mode.
+
+Properly parse properties named `async` in ES2017 mode.
+
+Fix bug where reserved words were broken in ES2017 mode.
+
+## 4.0.2 (2016-08-11)
+
+### Bug fixes
+
+Don't ignore period or 'e' characters after octal numbers.
+
+Fix broken parsing for call expressions in default parameter values of arrow functions.
+
+## 4.0.1 (2016-08-08)
+
+### Bug fixes
+
+Fix false positives in duplicated export name errors.
+
+## 4.0.0 (2016-08-07)
+
+### Breaking changes
+
+The default `ecmaVersion` option value is now 7.
+
+A number of internal method signatures changed, so plugins might need to be updated.
+
+### Bug fixes
+
+The parser now raises errors on duplicated export names.
+
+`arguments` and `eval` can now be used in shorthand properties.
+
+Duplicate parameter names in non-simple argument lists now always produce an error.
+
+### New features
+
+The `ecmaVersion` option now also accepts year-style version numbers
+(2015, etc).
+
+Support for `async`/`await` syntax when `ecmaVersion` is >= 8.
+
+Support for trailing commas in call expressions when `ecmaVersion` is >= 8.
+
+## 3.3.0 (2016-07-25)
+
+### Bug fixes
+
+Fix bug in tokenizing of regexp operator after a function declaration.
+
+Fix parser crash when parsing an array pattern with a hole.
+
+### New features
+
+Implement check against complex argument lists in functions that enable strict mode in ES7.
+
+## 3.2.0 (2016-06-07)
+
+### Bug fixes
+
+Improve handling of lack of unicode regexp support in host
+environment.
+
+Properly reject shorthand properties whose name is a keyword.
+
+### New features
+
+Visitors created with `visit.make` now have their base as _prototype_, rather than copying properties into a fresh object.
+
+## 3.1.0 (2016-04-18)
+
+### Bug fixes
+
+Properly tokenize the division operator directly after a function expression.
+
+Allow trailing comma in destructuring arrays.
+
+## 3.0.4 (2016-02-25)
+
+### Fixes
+
+Allow update expressions as left-hand-side of the ES7 exponential operator.
+
+## 3.0.2 (2016-02-10)
+
+### Fixes
+
+Fix bug that accidentally made `undefined` a reserved word when parsing ES7.
+
+## 3.0.0 (2016-02-10)
+
+### Breaking changes
+
+The default value of the `ecmaVersion` option is now 6 (used to be 5).
+
+Support for comprehension syntax (which was dropped from the draft spec) has been removed.
+
+### Fixes
+
+`let` and `yield` are now “contextual keywords”, meaning you can mostly use them as identifiers in ES5 non-strict code.
+
+A parenthesized class or function expression after `export default` is now parsed correctly.
+
+### New features
+
+When `ecmaVersion` is set to 7, Acorn will parse the exponentiation operator (`**`).
+
+The identifier character ranges are now based on Unicode 8.0.0.
+
+Plugins can now override the `raiseRecoverable` method to override the way non-critical errors are handled.
+
+## 2.7.0 (2016-01-04)
+
+### Fixes
+
+Stop allowing rest parameters in setters.
+
+Disallow `y` rexexp flag in ES5.
+
+Disallow `\00` and `\000` escapes in strict mode.
+
+Raise an error when an import name is a reserved word.
+
+## 2.6.2 (2015-11-10)
+
+### Fixes
+
+Don't crash when no options object is passed.
+
+## 2.6.0 (2015-11-09)
+
+### Fixes
+
+Add `await` as a reserved word in module sources.
+
+Disallow `yield` in a parameter default value for a generator.
+
+Forbid using a comma after a rest pattern in an array destructuring.
+
+### New features
+
+Support parsing stdin in command-line tool.
+
+## 2.5.0 (2015-10-27)
+
+### Fixes
+
+Fix tokenizer support in the command-line tool.
+
+Stop allowing `new.target` outside of functions.
+
+Remove legacy `guard` and `guardedHandler` properties from try nodes.
+
+Stop allowing multiple `__proto__` properties on an object literal in strict mode.
+
+Don't allow rest parameters to be non-identifier patterns.
+
+Check for duplicate paramter names in arrow functions.
diff --git a/node_modules/acorn/LICENSE b/node_modules/acorn/LICENSE
new file mode 100644
index 0000000000000000000000000000000000000000..9d71cc63a35e7d878787e5159b5b163739486220
--- /dev/null
+++ b/node_modules/acorn/LICENSE
@@ -0,0 +1,21 @@
+MIT License
+
+Copyright (C) 2012-2022 by various contributors (see AUTHORS)
+
+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.
diff --git a/node_modules/acorn/README.md b/node_modules/acorn/README.md
new file mode 100644
index 0000000000000000000000000000000000000000..313acd65c2cf7ac290fa623211d81965b0f12f7f
--- /dev/null
+++ b/node_modules/acorn/README.md
@@ -0,0 +1,304 @@
+# Acorn
+
+A tiny, fast JavaScript parser written in JavaScript.
+
+## Community
+
+Acorn is open source software released under an
+[MIT license](https://github.com/acornjs/acorn/blob/master/acorn/LICENSE).
+
+You are welcome to
+[report bugs](https://github.com/acornjs/acorn/issues) or create pull
+requests on [github](https://github.com/acornjs/acorn).
+
+## Installation
+
+The easiest way to install acorn is from [`npm`](https://www.npmjs.com/):
+
+```sh
+npm install acorn
+```
+
+Alternately, you can download the source and build acorn yourself:
+
+```sh
+git clone https://github.com/acornjs/acorn.git
+cd acorn
+npm install
+```
+## Importing acorn
+
+ESM as well as CommonJS is supported for all 3: `acorn`, `acorn-walk` and `acorn-loose`.
+
+ESM example for `acorn`:
+
+```js
+import * as acorn from "acorn"
+```
+
+CommonJS example for `acorn`:
+
+```js
+let acorn = require("acorn")
+```
+
+ESM is preferred, as it allows better editor auto-completions by offering TypeScript support.
+For this reason, following examples will use ESM imports.
+
+## Interface
+
+**parse**`(input, options)` is the main interface to the library. The
+`input` parameter is a string, `options` must be an object setting
+some of the options listed below. The return value will be an abstract
+syntax tree object as specified by the [ESTree
+spec](https://github.com/estree/estree).
+
+```javascript
+import * as acorn from "acorn"
+console.log(acorn.parse("1 + 1", {ecmaVersion: 2020}))
+```
+
+When encountering a syntax error, the parser will raise a
+`SyntaxError` object with a meaningful message. The error object will
+have a `pos` property that indicates the string offset at which the
+error occurred, and a `loc` object that contains a `{line, column}`
+object referring to that same position.
+
+Options are provided by in a second argument, which should be an
+object containing any of these fields (only `ecmaVersion` is
+required):
+
+- **ecmaVersion**: Indicates the ECMAScript version to parse. Can be a
+ number, either in year (`2022`) or plain version number (`6`) form,
+ or `"latest"` (the latest the library supports). This influences
+ support for strict mode, the set of reserved words, and support for
+ new syntax features.
+
+ **NOTE**: Only 'stage 4' (finalized) ECMAScript features are being
+ implemented by Acorn. Other proposed new features must be
+ implemented through plugins.
+
+- **sourceType**: Indicate the mode the code should be parsed in. Can be
+ either `"script"`, `"module"` or `"commonjs"`. This influences global strict mode
+ and parsing of `import` and `export` declarations.
+
+ **NOTE**: If set to `"module"`, then static `import` / `export` syntax
+ will be valid, even if `ecmaVersion` is less than 6. If set to `"commonjs"`,
+ it is the same as `"script"` except that the top-level scope behaves like a function.
+
+- **strict**: When set to true, enable strict parsing mode even if
+ `sourceType` is `"script"`.
+
+- **onInsertedSemicolon**: If given a callback, that callback will be
+ called whenever a missing semicolon is inserted by the parser. The
+ callback will be given the character offset of the point where the
+ semicolon is inserted as argument, and if `locations` is on, also a
+ `{line, column}` object representing this position.
+
+- **onTrailingComma**: Like `onInsertedSemicolon`, but for trailing
+ commas.
+
+- **allowReserved**: If `false`, using a reserved word will generate
+ an error. Defaults to `true` for `ecmaVersion` 3, `false` for higher
+ versions. When given the value `"never"`, reserved words and
+ keywords can also not be used as property names (as in Internet
+ Explorer's old parser).
+
+- **allowReturnOutsideFunction**: By default, a return statement at
+ the top level raises an error. Set this to `true` to accept such
+ code.
+
+- **allowImportExportEverywhere**: 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,
+ and also allows `import.meta` expressions to appear in scripts
+ (when `sourceType` is not `"module"`).
+
+- **allowAwaitOutsideFunction**: If `false`, `await` expressions can
+ only appear inside `async` functions. Defaults to `true` in modules
+ for `ecmaVersion` 2022 and later, `false` for lower versions.
+ Setting this option to `true` allows to have top-level `await`
+ expressions. They are still not allowed in non-`async` functions,
+ though. Setting this option to `true` is not allowed when `sourceType: "commonjs"`.
+
+- **allowSuperOutsideMethod**: By default, `super` outside a method
+ raises an error. Set this to `true` to accept such code.
+
+- **allowHashBang**: When this is enabled, if the code starts with the
+ characters `#!` (as in a shellscript), the first line will be
+ treated as a comment. Defaults to true when `ecmaVersion` >= 2023.
+
+- **checkPrivateFields**: By default, the parser will verify that
+ private properties are only used in places where they are valid and
+ have been declared. Set this to false to turn such checks off.
+
+- **locations**: When `true`, each node has a `loc` object attached
+ with `start` and `end` subobjects, each of which contains the
+ one-based line and zero-based column numbers in `{line, column}`
+ form. Default is `false`.
+
+- **onToken**: If a function is passed for this option, each found
+ token will be passed in same format as tokens returned from
+ `tokenizer().getToken()`.
+
+ If array is passed, each found token is pushed to it.
+
+ Note that you are not allowed to call the parser from the
+ callback—that will corrupt its internal state.
+
+- **onComment**: If a function is passed for this option, whenever a
+ comment is encountered the function will be called with the
+ following parameters:
+
+ - `block`: `true` if the comment is a block comment, false if it
+ is a line comment.
+ - `text`: The content of the comment.
+ - `start`: Character offset of the start of the comment.
+ - `end`: Character offset of the end of the comment.
+
+ When the `locations` options is on, the `{line, column}` locations
+ of the comment’s start and end are passed as two additional
+ parameters.
+
+ If array is passed for this option, each found comment is pushed
+ to it as object in Esprima format:
+
+ ```javascript
+ {
+ "type": "Line" | "Block",
+ "value": "comment text",
+ "start": Number,
+ "end": Number,
+ // If `locations` option is on:
+ "loc": {
+ "start": {line: Number, column: Number}
+ "end": {line: Number, column: Number}
+ },
+ // If `ranges` option is on:
+ "range": [Number, Number]
+ }
+ ```
+
+ Note that you are not allowed to call the parser from the
+ callback—that will corrupt its internal state.
+
+- **ranges**: Nodes have their start and end characters offsets
+ recorded in `start` and `end` properties (directly on the node,
+ rather than the `loc` object, which holds line/column data. To also
+ add a
+ [semi-standardized](https://bugzilla.mozilla.org/show_bug.cgi?id=745678)
+ `range` property holding a `[start, end]` array with the same
+ numbers, set the `ranges` option to `true`.
+
+- **program**: It is possible to parse multiple files into a single
+ AST by passing the tree produced by parsing the first file as the
+ `program` option in subsequent parses. This will add the toplevel
+ forms of the parsed file to the "Program" (top) node of an existing
+ parse tree.
+
+- **sourceFile**: When the `locations` option is `true`, you can pass
+ this option to add a `source` attribute in every node’s `loc`
+ object. Note that the contents of this option are not examined or
+ processed in any way; you are free to use whatever format you
+ choose.
+
+- **directSourceFile**: Like `sourceFile`, but a `sourceFile` property
+ will be added (regardless of the `location` option) directly to the
+ nodes, rather than the `loc` object.
+
+- **preserveParens**: If this option is `true`, parenthesized expressions
+ are represented by (non-standard) `ParenthesizedExpression` nodes
+ that have a single `expression` property containing the expression
+ inside parentheses.
+
+**parseExpressionAt**`(input, offset, options)` will parse a single
+expression in a string, and return its AST. It will not complain if
+there is more of the string left after the expression.
+
+**tokenizer**`(input, options)` returns an object with a `getToken`
+method that can be called repeatedly to get the next token, a `{start,
+end, type, value}` object (with added `loc` property when the
+`locations` option is enabled and `range` property when the `ranges`
+option is enabled). When the token's type is `tokTypes.eof`, you
+should stop calling the method, since it will keep returning that same
+token forever.
+
+Note that tokenizing JavaScript without parsing it is, in modern
+versions of the language, not really possible due to the way syntax is
+overloaded in ways that can only be disambiguated by the parse
+context. This package applies a bunch of heuristics to try and do a
+reasonable job, but you are advised to use `parse` with the `onToken`
+option instead of this.
+
+In ES6 environment, returned result can be used as any other
+protocol-compliant iterable:
+
+```javascript
+for (let token of acorn.tokenizer(str)) {
+ // iterate over the tokens
+}
+
+// transform code to array of tokens:
+var tokens = [...acorn.tokenizer(str)]
+```
+
+**tokTypes** holds an object mapping names to the token type objects
+that end up in the `type` properties of tokens.
+
+**getLineInfo**`(input, offset)` can be used to get a `{line,
+column}` object for a given program string and offset.
+
+### The `Parser` class
+
+Instances of the **`Parser`** class contain all the state and logic
+that drives a parse. It has static methods `parse`,
+`parseExpressionAt`, and `tokenizer` that match the top-level
+functions by the same name.
+
+When extending the parser with plugins, you need to call these methods
+on the extended version of the class. To extend a parser with plugins,
+you can use its static `extend` method.
+
+```javascript
+var acorn = require("acorn")
+var jsx = require("acorn-jsx")
+var JSXParser = acorn.Parser.extend(jsx())
+JSXParser.parse("foo()", {ecmaVersion: 2020})
+```
+
+The `extend` method takes any number of plugin values, and returns a
+new `Parser` class that includes the extra parser logic provided by
+the plugins.
+
+## Command line interface
+
+The `bin/acorn` utility can be used to parse a file from the command
+line. It accepts as arguments its input file and the following
+options:
+
+- `--ecma3|--ecma5|--ecma6|--ecma7|--ecma8|--ecma9|--ecma10`: Sets the ECMAScript version
+ to parse. Default is version 9.
+
+- `--module`: Sets the parsing mode to `"module"`. Is set to `"script"` otherwise.
+
+- `--locations`: Attaches a "loc" object to each node with "start" and
+ "end" subobjects, each of which contains the one-based line and
+ zero-based column numbers in `{line, column}` form.
+
+- `--allow-hash-bang`: If the code starts with the characters #! (as
+ in a shellscript), the first line will be treated as a comment.
+
+- `--allow-await-outside-function`: Allows top-level `await` expressions.
+ See the `allowAwaitOutsideFunction` option for more information.
+
+- `--compact`: No whitespace is used in the AST output.
+
+- `--silent`: Do not output the AST, just return the exit status.
+
+- `--help`: Print the usage information and quit.
+
+The utility spits out the syntax tree as JSON data.
+
+## Existing plugins
+
+ - [`acorn-jsx`](https://github.com/RReverser/acorn-jsx): Parse [Facebook JSX syntax extensions](https://github.com/facebook/jsx)
diff --git a/node_modules/acorn/bin/acorn b/node_modules/acorn/bin/acorn
new file mode 100644
index 0000000000000000000000000000000000000000..3ef3c124b08bd4fb0f27cd13301dfeeae4a6464c
--- /dev/null
+++ b/node_modules/acorn/bin/acorn
@@ -0,0 +1,4 @@
+#!/usr/bin/env node
+"use strict"
+
+require("../dist/bin.js")
diff --git a/node_modules/acorn/package.json b/node_modules/acorn/package.json
new file mode 100644
index 0000000000000000000000000000000000000000..79846140ed3d9614146769c5310b91763b07e11d
--- /dev/null
+++ b/node_modules/acorn/package.json
@@ -0,0 +1,50 @@
+{
+ "name": "acorn",
+ "description": "ECMAScript parser",
+ "homepage": "https://github.com/acornjs/acorn",
+ "main": "dist/acorn.js",
+ "types": "dist/acorn.d.ts",
+ "module": "dist/acorn.mjs",
+ "exports": {
+ ".": [
+ {
+ "import": "./dist/acorn.mjs",
+ "require": "./dist/acorn.js",
+ "default": "./dist/acorn.js"
+ },
+ "./dist/acorn.js"
+ ],
+ "./package.json": "./package.json"
+ },
+ "version": "8.17.0",
+ "engines": {
+ "node": ">=0.4.0"
+ },
+ "maintainers": [
+ {
+ "name": "Marijn Haverbeke",
+ "email": "marijn@haverbeke.berlin",
+ "web": "https://marijnhaverbeke.nl"
+ },
+ {
+ "name": "Ingvar Stepanyan",
+ "email": "me@rreverser.com",
+ "web": "https://rreverser.com/"
+ },
+ {
+ "name": "Adrian Heine",
+ "web": "http://adrianheine.de"
+ }
+ ],
+ "repository": {
+ "type": "git",
+ "url": "git+https://github.com/acornjs/acorn.git"
+ },
+ "license": "MIT",
+ "scripts": {
+ "prepare": "cd ..; npm run build:main"
+ },
+ "bin": {
+ "acorn": "bin/acorn"
+ }
+}
diff --git a/node_modules/agent-base/README.md b/node_modules/agent-base/README.md
new file mode 100644
index 0000000000000000000000000000000000000000..256f1f32196c60a970bd2b0bd75f669b135112bf
--- /dev/null
+++ b/node_modules/agent-base/README.md
@@ -0,0 +1,145 @@
+agent-base
+==========
+### Turn a function into an [`http.Agent`][http.Agent] instance
+[](https://github.com/TooTallNate/node-agent-base/actions?workflow=Node+CI)
+
+This module provides an `http.Agent` generator. That is, you pass it an async
+callback function, and it returns a new `http.Agent` instance that will invoke the
+given callback function when sending outbound HTTP requests.
+
+#### Some subclasses:
+
+Here's some more interesting uses of `agent-base`.
+Send a pull request to list yours!
+
+ * [`http-proxy-agent`][http-proxy-agent]: An HTTP(s) proxy `http.Agent` implementation for HTTP endpoints
+ * [`https-proxy-agent`][https-proxy-agent]: An HTTP(s) proxy `http.Agent` implementation for HTTPS endpoints
+ * [`pac-proxy-agent`][pac-proxy-agent]: A PAC file proxy `http.Agent` implementation for HTTP and HTTPS
+ * [`socks-proxy-agent`][socks-proxy-agent]: A SOCKS proxy `http.Agent` implementation for HTTP and HTTPS
+
+
+Installation
+------------
+
+Install with `npm`:
+
+``` bash
+$ npm install agent-base
+```
+
+
+Example
+-------
+
+Here's a minimal example that creates a new `net.Socket` connection to the server
+for every HTTP request (i.e. the equivalent of `agent: false` option):
+
+```js
+var net = require('net');
+var tls = require('tls');
+var url = require('url');
+var http = require('http');
+var agent = require('agent-base');
+
+var endpoint = 'http://nodejs.org/api/';
+var parsed = url.parse(endpoint);
+
+// This is the important part!
+parsed.agent = agent(function (req, opts) {
+ var socket;
+ // `secureEndpoint` is true when using the https module
+ if (opts.secureEndpoint) {
+ socket = tls.connect(opts);
+ } else {
+ socket = net.connect(opts);
+ }
+ return socket;
+});
+
+// Everything else works just like normal...
+http.get(parsed, function (res) {
+ console.log('"response" event!', res.headers);
+ res.pipe(process.stdout);
+});
+```
+
+Returning a Promise or using an `async` function is also supported:
+
+```js
+agent(async function (req, opts) {
+ await sleep(1000);
+ // etc…
+});
+```
+
+Return another `http.Agent` instance to "pass through" the responsibility
+for that HTTP request to that agent:
+
+```js
+agent(function (req, opts) {
+ return opts.secureEndpoint ? https.globalAgent : http.globalAgent;
+});
+```
+
+
+API
+---
+
+## Agent(Function callback[, Object options]) → [http.Agent][]
+
+Creates a base `http.Agent` that will execute the callback function `callback`
+for every HTTP request that it is used as the `agent` for. The callback function
+is responsible for creating a `stream.Duplex` instance of some kind that will be
+used as the underlying socket in the HTTP request.
+
+The `options` object accepts the following properties:
+
+ * `timeout` - Number - Timeout for the `callback()` function in milliseconds. Defaults to Infinity (optional).
+
+The callback function should have the following signature:
+
+### callback(http.ClientRequest req, Object options, Function cb) → undefined
+
+The ClientRequest `req` can be accessed to read request headers and
+and the path, etc. The `options` object contains the options passed
+to the `http.request()`/`https.request()` function call, and is formatted
+to be directly passed to `net.connect()`/`tls.connect()`, or however
+else you want a Socket to be created. Pass the created socket to
+the callback function `cb` once created, and the HTTP request will
+continue to proceed.
+
+If the `https` module is used to invoke the HTTP request, then the
+`secureEndpoint` property on `options` _will be set to `true`_.
+
+
+License
+-------
+
+(The MIT License)
+
+Copyright (c) 2013 Nathan Rajlich <nathan@tootallnate.net>
+
+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.
+
+[http-proxy-agent]: https://github.com/TooTallNate/node-http-proxy-agent
+[https-proxy-agent]: https://github.com/TooTallNate/node-https-proxy-agent
+[pac-proxy-agent]: https://github.com/TooTallNate/node-pac-proxy-agent
+[socks-proxy-agent]: https://github.com/TooTallNate/node-socks-proxy-agent
+[http.Agent]: https://nodejs.org/api/http.html#http_class_http_agent
diff --git a/node_modules/agent-base/package.json b/node_modules/agent-base/package.json
new file mode 100644
index 0000000000000000000000000000000000000000..fadce3ad99f22df16cf1e9be85c8598f812339c9
--- /dev/null
+++ b/node_modules/agent-base/package.json
@@ -0,0 +1,64 @@
+{
+ "name": "agent-base",
+ "version": "6.0.2",
+ "description": "Turn a function into an `http.Agent` instance",
+ "main": "dist/src/index",
+ "typings": "dist/src/index",
+ "files": [
+ "dist/src",
+ "src"
+ ],
+ "scripts": {
+ "prebuild": "rimraf dist",
+ "build": "tsc",
+ "postbuild": "cpy --parents src test '!**/*.ts' dist",
+ "test": "mocha --reporter spec dist/test/*.js",
+ "test-lint": "eslint src --ext .js,.ts",
+ "prepublishOnly": "npm run build"
+ },
+ "repository": {
+ "type": "git",
+ "url": "git://github.com/TooTallNate/node-agent-base.git"
+ },
+ "keywords": [
+ "http",
+ "agent",
+ "base",
+ "barebones",
+ "https"
+ ],
+ "author": "Nathan Rajlich (http://n8.io/)",
+ "license": "MIT",
+ "bugs": {
+ "url": "https://github.com/TooTallNate/node-agent-base/issues"
+ },
+ "dependencies": {
+ "debug": "4"
+ },
+ "devDependencies": {
+ "@types/debug": "4",
+ "@types/mocha": "^5.2.7",
+ "@types/node": "^14.0.20",
+ "@types/semver": "^7.1.0",
+ "@types/ws": "^6.0.3",
+ "@typescript-eslint/eslint-plugin": "1.6.0",
+ "@typescript-eslint/parser": "1.1.0",
+ "async-listen": "^1.2.0",
+ "cpy-cli": "^2.0.0",
+ "eslint": "5.16.0",
+ "eslint-config-airbnb": "17.1.0",
+ "eslint-config-prettier": "4.1.0",
+ "eslint-import-resolver-typescript": "1.1.1",
+ "eslint-plugin-import": "2.16.0",
+ "eslint-plugin-jsx-a11y": "6.2.1",
+ "eslint-plugin-react": "7.12.4",
+ "mocha": "^6.2.0",
+ "rimraf": "^3.0.0",
+ "semver": "^7.1.2",
+ "typescript": "^3.5.3",
+ "ws": "^3.0.0"
+ },
+ "engines": {
+ "node": ">= 6.0.0"
+ }
+}
diff --git a/node_modules/agent-base/src/index.ts b/node_modules/agent-base/src/index.ts
new file mode 100644
index 0000000000000000000000000000000000000000..a47ccd493f90a82794ba0f5b28f5063f889d6a29
--- /dev/null
+++ b/node_modules/agent-base/src/index.ts
@@ -0,0 +1,345 @@
+import net from 'net';
+import http from 'http';
+import https from 'https';
+import { Duplex } from 'stream';
+import { EventEmitter } from 'events';
+import createDebug from 'debug';
+import promisify from './promisify';
+
+const debug = createDebug('agent-base');
+
+function isAgent(v: any): v is createAgent.AgentLike {
+ return Boolean(v) && typeof v.addRequest === 'function';
+}
+
+function isSecureEndpoint(): boolean {
+ const { stack } = new Error();
+ if (typeof stack !== 'string') return false;
+ return stack.split('\n').some(l => l.indexOf('(https.js:') !== -1 || l.indexOf('node:https:') !== -1);
+}
+
+function createAgent(opts?: createAgent.AgentOptions): createAgent.Agent;
+function createAgent(
+ callback: createAgent.AgentCallback,
+ opts?: createAgent.AgentOptions
+): createAgent.Agent;
+function createAgent(
+ callback?: createAgent.AgentCallback | createAgent.AgentOptions,
+ opts?: createAgent.AgentOptions
+) {
+ return new createAgent.Agent(callback, opts);
+}
+
+namespace createAgent {
+ export interface ClientRequest extends http.ClientRequest {
+ _last?: boolean;
+ _hadError?: boolean;
+ method: string;
+ }
+
+ export interface AgentRequestOptions {
+ host?: string;
+ path?: string;
+ // `port` on `http.RequestOptions` can be a string or undefined,
+ // but `net.TcpNetConnectOpts` expects only a number
+ port: number;
+ }
+
+ export interface HttpRequestOptions
+ extends AgentRequestOptions,
+ Omit {
+ secureEndpoint: false;
+ }
+
+ export interface HttpsRequestOptions
+ extends AgentRequestOptions,
+ Omit {
+ secureEndpoint: true;
+ }
+
+ export type RequestOptions = HttpRequestOptions | HttpsRequestOptions;
+
+ export type AgentLike = Pick | http.Agent;
+
+ export type AgentCallbackReturn = Duplex | AgentLike;
+
+ export type AgentCallbackCallback = (
+ err?: Error | null,
+ socket?: createAgent.AgentCallbackReturn
+ ) => void;
+
+ export type AgentCallbackPromise = (
+ req: createAgent.ClientRequest,
+ opts: createAgent.RequestOptions
+ ) =>
+ | createAgent.AgentCallbackReturn
+ | Promise;
+
+ export type AgentCallback = typeof Agent.prototype.callback;
+
+ export type AgentOptions = {
+ timeout?: number;
+ };
+
+ /**
+ * Base `http.Agent` implementation.
+ * No pooling/keep-alive is implemented by default.
+ *
+ * @param {Function} callback
+ * @api public
+ */
+ export class Agent extends EventEmitter {
+ public timeout: number | null;
+ public maxFreeSockets: number;
+ public maxTotalSockets: number;
+ public maxSockets: number;
+ public sockets: {
+ [key: string]: net.Socket[];
+ };
+ public freeSockets: {
+ [key: string]: net.Socket[];
+ };
+ public requests: {
+ [key: string]: http.IncomingMessage[];
+ };
+ public options: https.AgentOptions;
+ private promisifiedCallback?: createAgent.AgentCallbackPromise;
+ private explicitDefaultPort?: number;
+ private explicitProtocol?: string;
+
+ constructor(
+ callback?: createAgent.AgentCallback | createAgent.AgentOptions,
+ _opts?: createAgent.AgentOptions
+ ) {
+ super();
+
+ let opts = _opts;
+ if (typeof callback === 'function') {
+ this.callback = callback;
+ } else if (callback) {
+ opts = callback;
+ }
+
+ // Timeout for the socket to be returned from the callback
+ this.timeout = null;
+ if (opts && typeof opts.timeout === 'number') {
+ this.timeout = opts.timeout;
+ }
+
+ // These aren't actually used by `agent-base`, but are required
+ // for the TypeScript definition files in `@types/node` :/
+ this.maxFreeSockets = 1;
+ this.maxSockets = 1;
+ this.maxTotalSockets = Infinity;
+ this.sockets = {};
+ this.freeSockets = {};
+ this.requests = {};
+ this.options = {};
+ }
+
+ get defaultPort(): number {
+ if (typeof this.explicitDefaultPort === 'number') {
+ return this.explicitDefaultPort;
+ }
+ return isSecureEndpoint() ? 443 : 80;
+ }
+
+ set defaultPort(v: number) {
+ this.explicitDefaultPort = v;
+ }
+
+ get protocol(): string {
+ if (typeof this.explicitProtocol === 'string') {
+ return this.explicitProtocol;
+ }
+ return isSecureEndpoint() ? 'https:' : 'http:';
+ }
+
+ set protocol(v: string) {
+ this.explicitProtocol = v;
+ }
+
+ callback(
+ req: createAgent.ClientRequest,
+ opts: createAgent.RequestOptions,
+ fn: createAgent.AgentCallbackCallback
+ ): void;
+ callback(
+ req: createAgent.ClientRequest,
+ opts: createAgent.RequestOptions
+ ):
+ | createAgent.AgentCallbackReturn
+ | Promise;
+ callback(
+ req: createAgent.ClientRequest,
+ opts: createAgent.AgentOptions,
+ fn?: createAgent.AgentCallbackCallback
+ ):
+ | createAgent.AgentCallbackReturn
+ | Promise
+ | void {
+ throw new Error(
+ '"agent-base" has no default implementation, you must subclass and override `callback()`'
+ );
+ }
+
+ /**
+ * Called by node-core's "_http_client.js" module when creating
+ * a new HTTP request with this Agent instance.
+ *
+ * @api public
+ */
+ addRequest(req: ClientRequest, _opts: RequestOptions): void {
+ const opts: RequestOptions = { ..._opts };
+
+ if (typeof opts.secureEndpoint !== 'boolean') {
+ opts.secureEndpoint = isSecureEndpoint();
+ }
+
+ if (opts.host == null) {
+ opts.host = 'localhost';
+ }
+
+ if (opts.port == null) {
+ opts.port = opts.secureEndpoint ? 443 : 80;
+ }
+
+ if (opts.protocol == null) {
+ opts.protocol = opts.secureEndpoint ? 'https:' : 'http:';
+ }
+
+ if (opts.host && opts.path) {
+ // If both a `host` and `path` are specified then it's most
+ // likely the result of a `url.parse()` call... we need to
+ // remove the `path` portion so that `net.connect()` doesn't
+ // attempt to open that as a unix socket file.
+ delete opts.path;
+ }
+
+ delete opts.agent;
+ delete opts.hostname;
+ delete opts._defaultAgent;
+ delete opts.defaultPort;
+ delete opts.createConnection;
+
+ // Hint to use "Connection: close"
+ // XXX: non-documented `http` module API :(
+ req._last = true;
+ req.shouldKeepAlive = false;
+
+ let timedOut = false;
+ let timeoutId: ReturnType | null = null;
+ const timeoutMs = opts.timeout || this.timeout;
+
+ const onerror = (err: NodeJS.ErrnoException) => {
+ if (req._hadError) return;
+ req.emit('error', err);
+ // For Safety. Some additional errors might fire later on
+ // and we need to make sure we don't double-fire the error event.
+ req._hadError = true;
+ };
+
+ const ontimeout = () => {
+ timeoutId = null;
+ timedOut = true;
+ const err: NodeJS.ErrnoException = new Error(
+ `A "socket" was not created for HTTP request before ${timeoutMs}ms`
+ );
+ err.code = 'ETIMEOUT';
+ onerror(err);
+ };
+
+ const callbackError = (err: NodeJS.ErrnoException) => {
+ if (timedOut) return;
+ if (timeoutId !== null) {
+ clearTimeout(timeoutId);
+ timeoutId = null;
+ }
+ onerror(err);
+ };
+
+ const onsocket = (socket: AgentCallbackReturn) => {
+ if (timedOut) return;
+ if (timeoutId != null) {
+ clearTimeout(timeoutId);
+ timeoutId = null;
+ }
+
+ if (isAgent(socket)) {
+ // `socket` is actually an `http.Agent` instance, so
+ // relinquish responsibility for this `req` to the Agent
+ // from here on
+ debug(
+ 'Callback returned another Agent instance %o',
+ socket.constructor.name
+ );
+ (socket as createAgent.Agent).addRequest(req, opts);
+ return;
+ }
+
+ if (socket) {
+ socket.once('free', () => {
+ this.freeSocket(socket as net.Socket, opts);
+ });
+ req.onSocket(socket as net.Socket);
+ return;
+ }
+
+ const err = new Error(
+ `no Duplex stream was returned to agent-base for \`${req.method} ${req.path}\``
+ );
+ onerror(err);
+ };
+
+ if (typeof this.callback !== 'function') {
+ onerror(new Error('`callback` is not defined'));
+ return;
+ }
+
+ if (!this.promisifiedCallback) {
+ if (this.callback.length >= 3) {
+ debug('Converting legacy callback function to promise');
+ this.promisifiedCallback = promisify(this.callback);
+ } else {
+ this.promisifiedCallback = this.callback;
+ }
+ }
+
+ if (typeof timeoutMs === 'number' && timeoutMs > 0) {
+ timeoutId = setTimeout(ontimeout, timeoutMs);
+ }
+
+ if ('port' in opts && typeof opts.port !== 'number') {
+ opts.port = Number(opts.port);
+ }
+
+ try {
+ debug(
+ 'Resolving socket for %o request: %o',
+ opts.protocol,
+ `${req.method} ${req.path}`
+ );
+ Promise.resolve(this.promisifiedCallback(req, opts)).then(
+ onsocket,
+ callbackError
+ );
+ } catch (err) {
+ Promise.reject(err).catch(callbackError);
+ }
+ }
+
+ freeSocket(socket: net.Socket, opts: AgentOptions) {
+ debug('Freeing socket %o %o', socket.constructor.name, opts);
+ socket.destroy();
+ }
+
+ destroy() {
+ debug('Destroying agent %o', this.constructor.name);
+ }
+ }
+
+ // So that `instanceof` works correctly
+ createAgent.prototype = createAgent.Agent.prototype;
+}
+
+export = createAgent;
diff --git a/node_modules/agent-base/src/promisify.ts b/node_modules/agent-base/src/promisify.ts
new file mode 100644
index 0000000000000000000000000000000000000000..60cc6627100b8142677d0f109c84cbb99f97d2a1
--- /dev/null
+++ b/node_modules/agent-base/src/promisify.ts
@@ -0,0 +1,33 @@
+import {
+ Agent,
+ ClientRequest,
+ RequestOptions,
+ AgentCallbackCallback,
+ AgentCallbackPromise,
+ AgentCallbackReturn
+} from './index';
+
+type LegacyCallback = (
+ req: ClientRequest,
+ opts: RequestOptions,
+ fn: AgentCallbackCallback
+) => void;
+
+export default function promisify(fn: LegacyCallback): AgentCallbackPromise {
+ return function(this: Agent, req: ClientRequest, opts: RequestOptions) {
+ return new Promise((resolve, reject) => {
+ fn.call(
+ this,
+ req,
+ opts,
+ (err: Error | null | undefined, rtn?: AgentCallbackReturn) => {
+ if (err) {
+ reject(err);
+ } else {
+ resolve(rtn);
+ }
+ }
+ );
+ });
+ };
+}
diff --git a/node_modules/ajv-formats/LICENSE b/node_modules/ajv-formats/LICENSE
new file mode 100644
index 0000000000000000000000000000000000000000..a3f8ba0278836d0d02b845aec548a21db114e984
--- /dev/null
+++ b/node_modules/ajv-formats/LICENSE
@@ -0,0 +1,21 @@
+MIT License
+
+Copyright (c) 2020 Evgeny Poberezkin
+
+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.
diff --git a/node_modules/ajv-formats/README.md b/node_modules/ajv-formats/README.md
new file mode 100644
index 0000000000000000000000000000000000000000..b4264cd6f86fdd2f34c28de82ebec5756955c18d
--- /dev/null
+++ b/node_modules/ajv-formats/README.md
@@ -0,0 +1,125 @@
+# ajv-formats
+
+JSON Schema formats for Ajv
+
+[](https://travis-ci.org/ajv-validator/ajv-formats)
+[](https://www.npmjs.com/package/ajv-formats)
+[](https://gitter.im/ajv-validator/ajv)
+[](https://github.com/sponsors/epoberezkin)
+
+## Usage
+
+```javascript
+// ESM/TypeScript import
+import Ajv from "ajv"
+import addFormats from "ajv-formats"
+// Node.js require:
+const Ajv = require("ajv")
+const addFormats = require("ajv-formats")
+
+const ajv = new Ajv()
+addFormats(ajv)
+```
+
+## Formats
+
+The package defines these formats:
+
+- _date_: full-date according to [RFC3339](http://tools.ietf.org/html/rfc3339#section-5.6).
+- _time_: time (time-zone is mandatory).
+- _date-time_: date-time (time-zone is mandatory).
+- _iso-time_: time with optional time-zone.
+- _iso-date-time_: date-time with optional time-zone.
+- _duration_: duration from [RFC3339](https://tools.ietf.org/html/rfc3339#appendix-A)
+- _uri_: full URI.
+- _uri-reference_: URI reference, including full and relative URIs.
+- _uri-template_: URI template according to [RFC6570](https://tools.ietf.org/html/rfc6570)
+- _url_ (deprecated): [URL record](https://url.spec.whatwg.org/#concept-url).
+- _email_: email address.
+- _hostname_: host name according to [RFC1034](http://tools.ietf.org/html/rfc1034#section-3.5).
+- _ipv4_: IP address v4.
+- _ipv6_: IP address v6.
+- _regex_: tests whether a string is a valid regular expression by passing it to RegExp constructor.
+- _uuid_: Universally Unique IDentifier according to [RFC4122](http://tools.ietf.org/html/rfc4122).
+- _json-pointer_: JSON-pointer according to [RFC6901](https://tools.ietf.org/html/rfc6901).
+- _relative-json-pointer_: relative JSON-pointer according to [this draft](http://tools.ietf.org/html/draft-luff-relative-json-pointer-00).
+- _byte_: base64 encoded data according to the [openApi 3.0.0 specification](https://spec.openapis.org/oas/v3.0.0#data-types)
+- _int32_: signed 32 bits integer according to the [openApi 3.0.0 specification](https://spec.openapis.org/oas/v3.0.0#data-types)
+- _int64_: signed 64 bits according to the [openApi 3.0.0 specification](https://spec.openapis.org/oas/v3.0.0#data-types)
+- _float_: float according to the [openApi 3.0.0 specification](https://spec.openapis.org/oas/v3.0.0#data-types)
+- _double_: double according to the [openApi 3.0.0 specification](https://spec.openapis.org/oas/v3.0.0#data-types)
+- _password_: password string according to the [openApi 3.0.0 specification](https://spec.openapis.org/oas/v3.0.0#data-types)
+- _binary_: binary string according to the [openApi 3.0.0 specification](https://spec.openapis.org/oas/v3.0.0#data-types)
+
+See regular expressions used for format validation and the sources that were used in [formats.ts](https://github.com/ajv-validator/ajv-formats/blob/master/src/formats.ts).
+
+**Please note**: JSON Schema draft-07 also defines formats `iri`, `iri-reference`, `idn-hostname` and `idn-email` for URLs, hostnames and emails with international characters. These formats are available in [ajv-formats-draft2019](https://github.com/luzlab/ajv-formats-draft2019) plugin.
+
+## Keywords to compare values: `formatMaximum` / `formatMinimum` and `formatExclusiveMaximum` / `formatExclusiveMinimum`
+
+These keywords allow to define minimum/maximum constraints when the format keyword defines ordering (`compare` function in format definition).
+
+These keywords are added to ajv instance when ajv-formats is used without options or with option `keywords: true`.
+
+These keywords apply only to strings. If the data is not a string, the validation succeeds.
+
+The value of keywords `formatMaximum`/`formatMinimum` and `formatExclusiveMaximum`/`formatExclusiveMinimum` should be a string or [\$data reference](https://github.com/ajv-validator/ajv/blob/master/docs/validation.md#data-reference). This value is the maximum (minimum) allowed value for the data to be valid as determined by `format` keyword. If `format` keyword is not present schema compilation will throw exception.
+
+When these keyword are added, they also add comparison functions to formats `"date"`, `"time"` and `"date-time"`. User-defined formats also can have comparison functions. See [addFormat](https://github.com/ajv-validator/ajv/blob/master/docs/api.md#api-addformat) method.
+
+```javascript
+require("ajv-formats")(ajv)
+
+const schema = {
+ type: "string",
+ format: "date",
+ formatMinimum: "2016-02-06",
+ formatExclusiveMaximum: "2016-12-27",
+}
+
+const validDataList = ["2016-02-06", "2016-12-26"]
+
+const invalidDataList = ["2016-02-05", "2016-12-27", "abc"]
+```
+
+## Options
+
+Options can be passed via the second parameter. Options value can be
+
+1. The list of format names that will be added to ajv instance:
+
+```javascript
+addFormats(ajv, ["date", "time"])
+```
+
+**Please note**: when ajv encounters an undefined format it throws exception (unless ajv instance was configured with `strict: false` option). To allow specific undefined formats they have to be passed to ajv instance via `formats` option with `true` value:
+
+```javascript
+const ajv = new Ajv((formats: {date: true, time: true})) // to ignore "date" and "time" formats in schemas.
+```
+
+2. Format validation mode (default is `"full"`) with optional list of format names and `keywords` option to add additional format comparison keywords:
+
+```javascript
+addFormats(ajv, {mode: "fast"})
+```
+
+or
+
+```javascript
+addFormats(ajv, {mode: "fast", formats: ["date", "time"], keywords: true})
+```
+
+In `"fast"` mode the following formats are simplified: `"date"`, `"time"`, `"date-time"`, `"iso-time"`, `"iso-date-time"`, `"uri"`, `"uri-reference"`, `"email"`. For example, `"date"`, `"time"` and `"date-time"` do not validate ranges in `"fast"` mode, only string structure, and other formats have simplified regular expressions.
+
+## Tests
+
+```bash
+npm install
+git submodule update --init
+npm test
+```
+
+## License
+
+[MIT](https://github.com/ajv-validator/ajv-formats/blob/master/LICENSE)
diff --git a/node_modules/ajv-formats/package.json b/node_modules/ajv-formats/package.json
new file mode 100644
index 0000000000000000000000000000000000000000..e673a8fc4722278dad7103e108229fd12d4db725
--- /dev/null
+++ b/node_modules/ajv-formats/package.json
@@ -0,0 +1,74 @@
+{
+ "name": "ajv-formats",
+ "version": "3.0.1",
+ "description": "Format validation for Ajv v7+",
+ "main": "dist/index.js",
+ "types": "dist/index.d.ts",
+ "files": [
+ "src/",
+ "dist/"
+ ],
+ "scripts": {
+ "build": "tsc",
+ "prettier:write": "prettier --write \"./**/*.{md,json,yaml,js,ts}\"",
+ "prettier:check": "prettier --list-different \"./**/*.{md,json,yaml,js,ts}\"",
+ "eslint": "eslint --ext .ts ./src/**/*",
+ "test-spec": "jest",
+ "test-cov": "jest --coverage",
+ "test": "npm run prettier:check && npm run build && npm run eslint && npm run test-cov",
+ "ci-test": "npm run test"
+ },
+ "repository": {
+ "type": "git",
+ "url": "git+https://github.com/ajv-validator/ajv-formats.git"
+ },
+ "keywords": [
+ "Ajv",
+ "JSON-Schema",
+ "format",
+ "validation"
+ ],
+ "author": "Evgeny Poberezkin",
+ "license": "MIT",
+ "bugs": {
+ "url": "https://github.com/ajv-validator/ajv-formats/issues"
+ },
+ "homepage": "https://github.com/ajv-validator/ajv-formats#readme",
+ "dependencies": {
+ "ajv": "^8.0.0"
+ },
+ "peerDependencies": {
+ "ajv": "^8.0.0"
+ },
+ "peerDependenciesMeta": {
+ "ajv": {
+ "optional": true
+ }
+ },
+ "devDependencies": {
+ "@ajv-validator/config": "^0.3.0",
+ "@types/jest": "^26.0.5",
+ "@types/node": "^14.10.1",
+ "@typescript-eslint/eslint-plugin": "^3.7.0",
+ "@typescript-eslint/parser": "^3.7.0",
+ "ajv": "^8.0.0",
+ "eslint": "^7.5.0",
+ "eslint-config-prettier": "^6.11.0",
+ "husky": "^4.2.5",
+ "jest": "^26.1.0",
+ "json-schema-test": "^2.0.0",
+ "lint-staged": "^10.2.11",
+ "prettier": "^2.3.2",
+ "ts-jest": "^26.1.3",
+ "typescript": "^4.0.0"
+ },
+ "prettier": "@ajv-validator/config/prettierrc.json",
+ "husky": {
+ "hooks": {
+ "pre-commit": "lint-staged && npm test"
+ }
+ },
+ "lint-staged": {
+ "*.{md,json,yaml,js,ts}": "prettier --write"
+ }
+}
diff --git a/node_modules/ajv-formats/src/formats.ts b/node_modules/ajv-formats/src/formats.ts
new file mode 100644
index 0000000000000000000000000000000000000000..d3cde9bcaf124a57fd49ba15fdb979e24259a17f
--- /dev/null
+++ b/node_modules/ajv-formats/src/formats.ts
@@ -0,0 +1,269 @@
+import type {Format, FormatDefinition} from "ajv"
+import type {FormatValidator, FormatCompare} from "ajv/dist/types"
+
+export type FormatMode = "fast" | "full"
+
+export type FormatName =
+ | "date"
+ | "time"
+ | "date-time"
+ | "iso-time"
+ | "iso-date-time"
+ | "duration"
+ | "uri"
+ | "uri-reference"
+ | "uri-template"
+ | "url"
+ | "email"
+ | "hostname"
+ | "ipv4"
+ | "ipv6"
+ | "regex"
+ | "uuid"
+ | "json-pointer"
+ | "json-pointer-uri-fragment"
+ | "relative-json-pointer"
+ | "byte"
+ | "int32"
+ | "int64"
+ | "float"
+ | "double"
+ | "password"
+ | "binary"
+
+export type DefinedFormats = {
+ [key in FormatName]: Format
+}
+
+function fmtDef(
+ validate: RegExp | FormatValidator,
+ compare: FormatCompare
+): FormatDefinition {
+ return {validate, compare}
+}
+
+export const fullFormats: DefinedFormats = {
+ // date: http://tools.ietf.org/html/rfc3339#section-5.6
+ date: fmtDef(date, compareDate),
+ // date-time: http://tools.ietf.org/html/rfc3339#section-5.6
+ time: fmtDef(getTime(true), compareTime),
+ "date-time": fmtDef(getDateTime(true), compareDateTime),
+ "iso-time": fmtDef(getTime(), compareIsoTime),
+ "iso-date-time": fmtDef(getDateTime(), compareIsoDateTime),
+ // duration: https://tools.ietf.org/html/rfc3339#appendix-A
+ duration: /^P(?!$)((\d+Y)?(\d+M)?(\d+D)?(T(?=\d)(\d+H)?(\d+M)?(\d+S)?)?|(\d+W)?)$/,
+ uri,
+ "uri-reference":
+ /^(?:[a-z][a-z0-9+\-.]*:)?(?:\/?\/(?:(?:[a-z0-9\-._~!$&'()*+,;=:]|%[0-9a-f]{2})*@)?(?:\[(?:(?:(?:(?:[0-9a-f]{1,4}:){6}|::(?:[0-9a-f]{1,4}:){5}|(?:[0-9a-f]{1,4})?::(?:[0-9a-f]{1,4}:){4}|(?:(?:[0-9a-f]{1,4}:){0,1}[0-9a-f]{1,4})?::(?:[0-9a-f]{1,4}:){3}|(?:(?:[0-9a-f]{1,4}:){0,2}[0-9a-f]{1,4})?::(?:[0-9a-f]{1,4}:){2}|(?:(?:[0-9a-f]{1,4}:){0,3}[0-9a-f]{1,4})?::[0-9a-f]{1,4}:|(?:(?:[0-9a-f]{1,4}:){0,4}[0-9a-f]{1,4})?::)(?:[0-9a-f]{1,4}:[0-9a-f]{1,4}|(?:(?:25[0-5]|2[0-4]\d|[01]?\d\d?)\.){3}(?:25[0-5]|2[0-4]\d|[01]?\d\d?))|(?:(?:[0-9a-f]{1,4}:){0,5}[0-9a-f]{1,4})?::[0-9a-f]{1,4}|(?:(?:[0-9a-f]{1,4}:){0,6}[0-9a-f]{1,4})?::)|[Vv][0-9a-f]+\.[a-z0-9\-._~!$&'()*+,;=:]+)\]|(?:(?:25[0-5]|2[0-4]\d|[01]?\d\d?)\.){3}(?:25[0-5]|2[0-4]\d|[01]?\d\d?)|(?:[a-z0-9\-._~!$&'"()*+,;=]|%[0-9a-f]{2})*)(?::\d*)?(?:\/(?:[a-z0-9\-._~!$&'"()*+,;=:@]|%[0-9a-f]{2})*)*|\/(?:(?:[a-z0-9\-._~!$&'"()*+,;=:@]|%[0-9a-f]{2})+(?:\/(?:[a-z0-9\-._~!$&'"()*+,;=:@]|%[0-9a-f]{2})*)*)?|(?:[a-z0-9\-._~!$&'"()*+,;=:@]|%[0-9a-f]{2})+(?:\/(?:[a-z0-9\-._~!$&'"()*+,;=:@]|%[0-9a-f]{2})*)*)?(?:\?(?:[a-z0-9\-._~!$&'"()*+,;=:@/?]|%[0-9a-f]{2})*)?(?:#(?:[a-z0-9\-._~!$&'"()*+,;=:@/?]|%[0-9a-f]{2})*)?$/i,
+ // uri-template: https://tools.ietf.org/html/rfc6570
+ "uri-template":
+ /^(?:(?:[^\x00-\x20"'<>%\\^`{|}]|%[0-9a-f]{2})|\{[+#./;?&=,!@|]?(?:[a-z0-9_]|%[0-9a-f]{2})+(?::[1-9][0-9]{0,3}|\*)?(?:,(?:[a-z0-9_]|%[0-9a-f]{2})+(?::[1-9][0-9]{0,3}|\*)?)*\})*$/i,
+ // For the source: https://gist.github.com/dperini/729294
+ // For test cases: https://mathiasbynens.be/demo/url-regex
+ url: /^(?:https?|ftp):\/\/(?:\S+(?::\S*)?@)?(?:(?!(?:10|127)(?:\.\d{1,3}){3})(?!(?:169\.254|192\.168)(?:\.\d{1,3}){2})(?!172\.(?:1[6-9]|2\d|3[0-1])(?:\.\d{1,3}){2})(?:[1-9]\d?|1\d\d|2[01]\d|22[0-3])(?:\.(?:1?\d{1,2}|2[0-4]\d|25[0-5])){2}(?:\.(?:[1-9]\d?|1\d\d|2[0-4]\d|25[0-4]))|(?:(?:[a-z0-9\u{00a1}-\u{ffff}]+-)*[a-z0-9\u{00a1}-\u{ffff}]+)(?:\.(?:[a-z0-9\u{00a1}-\u{ffff}]+-)*[a-z0-9\u{00a1}-\u{ffff}]+)*(?:\.(?:[a-z\u{00a1}-\u{ffff}]{2,})))(?::\d{2,5})?(?:\/[^\s]*)?$/iu,
+ email:
+ /^[a-z0-9!#$%&'*+/=?^_`{|}~-]+(?:\.[a-z0-9!#$%&'*+/=?^_`{|}~-]+)*@(?:[a-z0-9](?:[a-z0-9-]*[a-z0-9])?\.)+[a-z0-9](?:[a-z0-9-]*[a-z0-9])?$/i,
+ hostname:
+ /^(?=.{1,253}\.?$)[a-z0-9](?:[a-z0-9-]{0,61}[a-z0-9])?(?:\.[a-z0-9](?:[-0-9a-z]{0,61}[0-9a-z])?)*\.?$/i,
+ // optimized https://www.safaribooksonline.com/library/view/regular-expressions-cookbook/9780596802837/ch07s16.html
+ ipv4: /^(?:(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)\.){3}(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)$/,
+ ipv6: /^((([0-9a-f]{1,4}:){7}([0-9a-f]{1,4}|:))|(([0-9a-f]{1,4}:){6}(:[0-9a-f]{1,4}|((25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(\.(25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3})|:))|(([0-9a-f]{1,4}:){5}(((:[0-9a-f]{1,4}){1,2})|:((25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(\.(25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3})|:))|(([0-9a-f]{1,4}:){4}(((:[0-9a-f]{1,4}){1,3})|((:[0-9a-f]{1,4})?:((25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(\.(25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3}))|:))|(([0-9a-f]{1,4}:){3}(((:[0-9a-f]{1,4}){1,4})|((:[0-9a-f]{1,4}){0,2}:((25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(\.(25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3}))|:))|(([0-9a-f]{1,4}:){2}(((:[0-9a-f]{1,4}){1,5})|((:[0-9a-f]{1,4}){0,3}:((25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(\.(25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3}))|:))|(([0-9a-f]{1,4}:){1}(((:[0-9a-f]{1,4}){1,6})|((:[0-9a-f]{1,4}){0,4}:((25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(\.(25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3}))|:))|(:(((:[0-9a-f]{1,4}){1,7})|((:[0-9a-f]{1,4}){0,5}:((25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(\.(25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3}))|:)))$/i,
+ regex,
+ // uuid: http://tools.ietf.org/html/rfc4122
+ uuid: /^(?:urn:uuid:)?[0-9a-f]{8}-(?:[0-9a-f]{4}-){3}[0-9a-f]{12}$/i,
+ // JSON-pointer: https://tools.ietf.org/html/rfc6901
+ // uri fragment: https://tools.ietf.org/html/rfc3986#appendix-A
+ "json-pointer": /^(?:\/(?:[^~/]|~0|~1)*)*$/,
+ "json-pointer-uri-fragment": /^#(?:\/(?:[a-z0-9_\-.!$&'()*+,;:=@]|%[0-9a-f]{2}|~0|~1)*)*$/i,
+ // relative JSON-pointer: http://tools.ietf.org/html/draft-luff-relative-json-pointer-00
+ "relative-json-pointer": /^(?:0|[1-9][0-9]*)(?:#|(?:\/(?:[^~/]|~0|~1)*)*)$/,
+ // the following formats are used by the openapi specification: https://spec.openapis.org/oas/v3.0.0#data-types
+ // byte: https://github.com/miguelmota/is-base64
+ byte,
+ // signed 32 bit integer
+ int32: {type: "number", validate: validateInt32},
+ // signed 64 bit integer
+ int64: {type: "number", validate: validateInt64},
+ // C-type float
+ float: {type: "number", validate: validateNumber},
+ // C-type double
+ double: {type: "number", validate: validateNumber},
+ // hint to the UI to hide input strings
+ password: true,
+ // unchecked string payload
+ binary: true,
+}
+
+export const fastFormats: DefinedFormats = {
+ ...fullFormats,
+ date: fmtDef(/^\d\d\d\d-[0-1]\d-[0-3]\d$/, compareDate),
+ time: fmtDef(
+ /^(?:[0-2]\d:[0-5]\d:[0-5]\d|23:59:60)(?:\.\d+)?(?:z|[+-]\d\d(?::?\d\d)?)$/i,
+ compareTime
+ ),
+ "date-time": fmtDef(
+ /^\d\d\d\d-[0-1]\d-[0-3]\dt(?:[0-2]\d:[0-5]\d:[0-5]\d|23:59:60)(?:\.\d+)?(?:z|[+-]\d\d(?::?\d\d)?)$/i,
+ compareDateTime
+ ),
+ "iso-time": fmtDef(
+ /^(?:[0-2]\d:[0-5]\d:[0-5]\d|23:59:60)(?:\.\d+)?(?:z|[+-]\d\d(?::?\d\d)?)?$/i,
+ compareIsoTime
+ ),
+ "iso-date-time": fmtDef(
+ /^\d\d\d\d-[0-1]\d-[0-3]\d[t\s](?:[0-2]\d:[0-5]\d:[0-5]\d|23:59:60)(?:\.\d+)?(?:z|[+-]\d\d(?::?\d\d)?)?$/i,
+ compareIsoDateTime
+ ),
+ // uri: https://github.com/mafintosh/is-my-json-valid/blob/master/formats.js
+ uri: /^(?:[a-z][a-z0-9+\-.]*:)(?:\/?\/)?[^\s]*$/i,
+ "uri-reference": /^(?:(?:[a-z][a-z0-9+\-.]*:)?\/?\/)?(?:[^\\\s#][^\s#]*)?(?:#[^\\\s]*)?$/i,
+ // email (sources from jsen validator):
+ // http://stackoverflow.com/questions/201323/using-a-regular-expression-to-validate-an-email-address#answer-8829363
+ // http://www.w3.org/TR/html5/forms.html#valid-e-mail-address (search for 'wilful violation')
+ email:
+ /^[a-z0-9.!#$%&'*+/=?^_`{|}~-]+@[a-z0-9](?:[a-z0-9-]{0,61}[a-z0-9])?(?:\.[a-z0-9](?:[a-z0-9-]{0,61}[a-z0-9])?)*$/i,
+}
+
+export const formatNames = Object.keys(fullFormats) as FormatName[]
+
+function isLeapYear(year: number): boolean {
+ // https://tools.ietf.org/html/rfc3339#appendix-C
+ return year % 4 === 0 && (year % 100 !== 0 || year % 400 === 0)
+}
+
+const DATE = /^(\d\d\d\d)-(\d\d)-(\d\d)$/
+const DAYS = [0, 31, 28, 31, 30, 31, 30, 31, 31, 30, 31, 30, 31]
+
+function date(str: string): boolean {
+ // full-date from http://tools.ietf.org/html/rfc3339#section-5.6
+ const matches: string[] | null = DATE.exec(str)
+ if (!matches) return false
+ const year: number = +matches[1]
+ const month: number = +matches[2]
+ const day: number = +matches[3]
+ return (
+ month >= 1 &&
+ month <= 12 &&
+ day >= 1 &&
+ day <= (month === 2 && isLeapYear(year) ? 29 : DAYS[month])
+ )
+}
+
+function compareDate(d1: string, d2: string): number | undefined {
+ if (!(d1 && d2)) return undefined
+ if (d1 > d2) return 1
+ if (d1 < d2) return -1
+ return 0
+}
+
+const TIME = /^(\d\d):(\d\d):(\d\d(?:\.\d+)?)(z|([+-])(\d\d)(?::?(\d\d))?)?$/i
+
+function getTime(strictTimeZone?: boolean): (str: string) => boolean {
+ return function time(str: string): boolean {
+ const matches: string[] | null = TIME.exec(str)
+ if (!matches) return false
+ const hr: number = +matches[1]
+ const min: number = +matches[2]
+ const sec: number = +matches[3]
+ const tz: string | undefined = matches[4]
+ const tzSign: number = matches[5] === "-" ? -1 : 1
+ const tzH: number = +(matches[6] || 0)
+ const tzM: number = +(matches[7] || 0)
+ if (tzH > 23 || tzM > 59 || (strictTimeZone && !tz)) return false
+ if (hr <= 23 && min <= 59 && sec < 60) return true
+ // leap second
+ const utcMin = min - tzM * tzSign
+ const utcHr = hr - tzH * tzSign - (utcMin < 0 ? 1 : 0)
+ return (utcHr === 23 || utcHr === -1) && (utcMin === 59 || utcMin === -1) && sec < 61
+ }
+}
+
+function compareTime(s1: string, s2: string): number | undefined {
+ if (!(s1 && s2)) return undefined
+ const t1 = new Date("2020-01-01T" + s1).valueOf()
+ const t2 = new Date("2020-01-01T" + s2).valueOf()
+ if (!(t1 && t2)) return undefined
+ return t1 - t2
+}
+
+function compareIsoTime(t1: string, t2: string): number | undefined {
+ if (!(t1 && t2)) return undefined
+ const a1 = TIME.exec(t1)
+ const a2 = TIME.exec(t2)
+ if (!(a1 && a2)) return undefined
+ t1 = a1[1] + a1[2] + a1[3]
+ t2 = a2[1] + a2[2] + a2[3]
+ if (t1 > t2) return 1
+ if (t1 < t2) return -1
+ return 0
+}
+
+const DATE_TIME_SEPARATOR = /t|\s/i
+function getDateTime(strictTimeZone?: boolean): (str: string) => boolean {
+ const time = getTime(strictTimeZone)
+
+ return function date_time(str: string): boolean {
+ // http://tools.ietf.org/html/rfc3339#section-5.6
+ const dateTime: string[] = str.split(DATE_TIME_SEPARATOR)
+ return dateTime.length === 2 && date(dateTime[0]) && time(dateTime[1])
+ }
+}
+
+function compareDateTime(dt1: string, dt2: string): number | undefined {
+ if (!(dt1 && dt2)) return undefined
+ const d1 = new Date(dt1).valueOf()
+ const d2 = new Date(dt2).valueOf()
+ if (!(d1 && d2)) return undefined
+ return d1 - d2
+}
+
+function compareIsoDateTime(dt1: string, dt2: string): number | undefined {
+ if (!(dt1 && dt2)) return undefined
+ const [d1, t1] = dt1.split(DATE_TIME_SEPARATOR)
+ const [d2, t2] = dt2.split(DATE_TIME_SEPARATOR)
+ const res = compareDate(d1, d2)
+ if (res === undefined) return undefined
+ return res || compareTime(t1, t2)
+}
+
+const NOT_URI_FRAGMENT = /\/|:/
+const URI =
+ /^(?:[a-z][a-z0-9+\-.]*:)(?:\/?\/(?:(?:[a-z0-9\-._~!$&'()*+,;=:]|%[0-9a-f]{2})*@)?(?:\[(?:(?:(?:(?:[0-9a-f]{1,4}:){6}|::(?:[0-9a-f]{1,4}:){5}|(?:[0-9a-f]{1,4})?::(?:[0-9a-f]{1,4}:){4}|(?:(?:[0-9a-f]{1,4}:){0,1}[0-9a-f]{1,4})?::(?:[0-9a-f]{1,4}:){3}|(?:(?:[0-9a-f]{1,4}:){0,2}[0-9a-f]{1,4})?::(?:[0-9a-f]{1,4}:){2}|(?:(?:[0-9a-f]{1,4}:){0,3}[0-9a-f]{1,4})?::[0-9a-f]{1,4}:|(?:(?:[0-9a-f]{1,4}:){0,4}[0-9a-f]{1,4})?::)(?:[0-9a-f]{1,4}:[0-9a-f]{1,4}|(?:(?:25[0-5]|2[0-4]\d|[01]?\d\d?)\.){3}(?:25[0-5]|2[0-4]\d|[01]?\d\d?))|(?:(?:[0-9a-f]{1,4}:){0,5}[0-9a-f]{1,4})?::[0-9a-f]{1,4}|(?:(?:[0-9a-f]{1,4}:){0,6}[0-9a-f]{1,4})?::)|[Vv][0-9a-f]+\.[a-z0-9\-._~!$&'()*+,;=:]+)\]|(?:(?:25[0-5]|2[0-4]\d|[01]?\d\d?)\.){3}(?:25[0-5]|2[0-4]\d|[01]?\d\d?)|(?:[a-z0-9\-._~!$&'()*+,;=]|%[0-9a-f]{2})*)(?::\d*)?(?:\/(?:[a-z0-9\-._~!$&'()*+,;=:@]|%[0-9a-f]{2})*)*|\/(?:(?:[a-z0-9\-._~!$&'()*+,;=:@]|%[0-9a-f]{2})+(?:\/(?:[a-z0-9\-._~!$&'()*+,;=:@]|%[0-9a-f]{2})*)*)?|(?:[a-z0-9\-._~!$&'()*+,;=:@]|%[0-9a-f]{2})+(?:\/(?:[a-z0-9\-._~!$&'()*+,;=:@]|%[0-9a-f]{2})*)*)(?:\?(?:[a-z0-9\-._~!$&'()*+,;=:@/?]|%[0-9a-f]{2})*)?(?:#(?:[a-z0-9\-._~!$&'()*+,;=:@/?]|%[0-9a-f]{2})*)?$/i
+
+function uri(str: string): boolean {
+ // http://jmrware.com/articles/2009/uri_regexp/URI_regex.html + optional protocol + required "."
+ return NOT_URI_FRAGMENT.test(str) && URI.test(str)
+}
+
+const BYTE = /^(?:[A-Za-z0-9+/]{4})*(?:[A-Za-z0-9+/]{2}==|[A-Za-z0-9+/]{3}=)?$/gm
+
+function byte(str: string): boolean {
+ BYTE.lastIndex = 0
+ return BYTE.test(str)
+}
+
+const MIN_INT32 = -(2 ** 31)
+const MAX_INT32 = 2 ** 31 - 1
+
+function validateInt32(value: number): boolean {
+ return Number.isInteger(value) && value <= MAX_INT32 && value >= MIN_INT32
+}
+
+function validateInt64(value: number): boolean {
+ // JSON and javascript max Int is 2**53, so any int that passes isInteger is valid for Int64
+ return Number.isInteger(value)
+}
+
+function validateNumber(): boolean {
+ return true
+}
+
+const Z_ANCHOR = /[^\\]\\Z/
+function regex(str: string): boolean {
+ if (Z_ANCHOR.test(str)) return false
+ try {
+ new RegExp(str)
+ return true
+ } catch (e) {
+ return false
+ }
+}
diff --git a/node_modules/ajv-formats/src/index.ts b/node_modules/ajv-formats/src/index.ts
new file mode 100644
index 0000000000000000000000000000000000000000..8fd944a09021a795e86c3285c838f65ca0a957d9
--- /dev/null
+++ b/node_modules/ajv-formats/src/index.ts
@@ -0,0 +1,62 @@
+import {
+ DefinedFormats,
+ FormatMode,
+ FormatName,
+ formatNames,
+ fastFormats,
+ fullFormats,
+} from "./formats"
+import formatLimit from "./limit"
+import type Ajv from "ajv"
+import type {Plugin, Format} from "ajv"
+import {_, Name} from "ajv/dist/compile/codegen"
+
+export {FormatMode, FormatName} from "./formats"
+export {LimitFormatError} from "./limit"
+export interface FormatOptions {
+ mode?: FormatMode
+ formats?: FormatName[]
+ keywords?: boolean
+}
+
+export type FormatsPluginOptions = FormatName[] | FormatOptions
+
+export interface FormatsPlugin extends Plugin {
+ get: (format: FormatName, mode?: FormatMode) => Format
+}
+
+const fullName = new Name("fullFormats")
+const fastName = new Name("fastFormats")
+
+const formatsPlugin: FormatsPlugin = (
+ ajv: Ajv,
+ opts: FormatsPluginOptions = {keywords: true}
+): Ajv => {
+ if (Array.isArray(opts)) {
+ addFormats(ajv, opts, fullFormats, fullName)
+ return ajv
+ }
+ const [formats, exportName] =
+ opts.mode === "fast" ? [fastFormats, fastName] : [fullFormats, fullName]
+ const list = opts.formats || formatNames
+ addFormats(ajv, list, formats, exportName)
+ if (opts.keywords) formatLimit(ajv)
+ return ajv
+}
+
+formatsPlugin.get = (name: FormatName, mode: FormatMode = "full"): Format => {
+ const formats = mode === "fast" ? fastFormats : fullFormats
+ const f = formats[name]
+ if (!f) throw new Error(`Unknown format "${name}"`)
+ return f
+}
+
+function addFormats(ajv: Ajv, list: FormatName[], fs: DefinedFormats, exportName: Name): void {
+ ajv.opts.code.formats ??= _`require("ajv-formats/dist/formats").${exportName}`
+ for (const f of list) ajv.addFormat(f, fs[f])
+}
+
+module.exports = exports = formatsPlugin
+Object.defineProperty(exports, "__esModule", {value: true})
+
+export default formatsPlugin
diff --git a/node_modules/ajv-formats/src/limit.ts b/node_modules/ajv-formats/src/limit.ts
new file mode 100644
index 0000000000000000000000000000000000000000..bf6a57cb9d728658e8461b9e02b5d59fcaff74b1
--- /dev/null
+++ b/node_modules/ajv-formats/src/limit.ts
@@ -0,0 +1,99 @@
+import type Ajv from "ajv"
+import type {
+ Plugin,
+ CodeKeywordDefinition,
+ KeywordErrorDefinition,
+ Code,
+ Name,
+ ErrorObject,
+} from "ajv"
+import type {AddedFormat} from "ajv/dist/types"
+import type {Rule} from "ajv/dist/compile/rules"
+import {KeywordCxt} from "ajv"
+import {_, str, or, getProperty, operators} from "ajv/dist/compile/codegen"
+
+type Kwd = "formatMaximum" | "formatMinimum" | "formatExclusiveMaximum" | "formatExclusiveMinimum"
+
+type Comparison = "<=" | ">=" | "<" | ">"
+
+const ops = operators
+
+const KWDs: {[K in Kwd]: {okStr: Comparison; ok: Code; fail: Code}} = {
+ formatMaximum: {okStr: "<=", ok: ops.LTE, fail: ops.GT},
+ formatMinimum: {okStr: ">=", ok: ops.GTE, fail: ops.LT},
+ formatExclusiveMaximum: {okStr: "<", ok: ops.LT, fail: ops.GTE},
+ formatExclusiveMinimum: {okStr: ">", ok: ops.GT, fail: ops.LTE},
+}
+
+export type LimitFormatError = ErrorObject
+
+const error: KeywordErrorDefinition = {
+ message: ({keyword, schemaCode}) => str`should be ${KWDs[keyword as Kwd].okStr} ${schemaCode}`,
+ params: ({keyword, schemaCode}) =>
+ _`{comparison: ${KWDs[keyword as Kwd].okStr}, limit: ${schemaCode}}`,
+}
+
+export const formatLimitDefinition: CodeKeywordDefinition = {
+ keyword: Object.keys(KWDs),
+ type: "string",
+ schemaType: "string",
+ $data: true,
+ error,
+ code(cxt) {
+ const {gen, data, schemaCode, keyword, it} = cxt
+ const {opts, self} = it
+ if (!opts.validateFormats) return
+
+ const fCxt = new KeywordCxt(it, (self.RULES.all.format as Rule).definition, "format")
+ if (fCxt.$data) validate$DataFormat()
+ else validateFormat()
+
+ function validate$DataFormat(): void {
+ const fmts = gen.scopeValue("formats", {
+ ref: self.formats,
+ code: opts.code.formats,
+ })
+ const fmt = gen.const("fmt", _`${fmts}[${fCxt.schemaCode}]`)
+ cxt.fail$data(
+ or(
+ _`typeof ${fmt} != "object"`,
+ _`${fmt} instanceof RegExp`,
+ _`typeof ${fmt}.compare != "function"`,
+ compareCode(fmt)
+ )
+ )
+ }
+
+ function validateFormat(): void {
+ const format = fCxt.schema as string
+ const fmtDef: AddedFormat | undefined = self.formats[format]
+ if (!fmtDef || fmtDef === true) return
+ if (
+ typeof fmtDef != "object" ||
+ fmtDef instanceof RegExp ||
+ typeof fmtDef.compare != "function"
+ ) {
+ throw new Error(`"${keyword}": format "${format}" does not define "compare" function`)
+ }
+ const fmt = gen.scopeValue("formats", {
+ key: format,
+ ref: fmtDef,
+ code: opts.code.formats ? _`${opts.code.formats}${getProperty(format)}` : undefined,
+ })
+
+ cxt.fail$data(compareCode(fmt))
+ }
+
+ function compareCode(fmt: Name): Code {
+ return _`${fmt}.compare(${data}, ${schemaCode}) ${KWDs[keyword as Kwd].fail} 0`
+ }
+ },
+ dependencies: ["format"],
+}
+
+const formatLimitPlugin: Plugin = (ajv: Ajv): Ajv => {
+ ajv.addKeyword(formatLimitDefinition)
+ return ajv
+}
+
+export default formatLimitPlugin
diff --git a/node_modules/ajv/.runkit_example.js b/node_modules/ajv/.runkit_example.js
new file mode 100644
index 0000000000000000000000000000000000000000..0d578d5d51e51a3e03b8a69f0eea05c3a3d8913a
--- /dev/null
+++ b/node_modules/ajv/.runkit_example.js
@@ -0,0 +1,23 @@
+const Ajv = require("ajv")
+const ajv = new Ajv({allErrors: true})
+
+const schema = {
+ type: "object",
+ properties: {
+ foo: {type: "string"},
+ bar: {type: "number", maximum: 3},
+ },
+ required: ["foo", "bar"],
+ additionalProperties: false,
+}
+
+const validate = ajv.compile(schema)
+
+test({foo: "abc", bar: 2})
+test({foo: 2, bar: 4})
+
+function test(data) {
+ const valid = validate(data)
+ if (valid) console.log("Valid!")
+ else console.log("Invalid: " + ajv.errorsText(validate.errors))
+}
diff --git a/node_modules/ajv/LICENSE b/node_modules/ajv/LICENSE
new file mode 100644
index 0000000000000000000000000000000000000000..139162ad2c389a18d3d66e159a2821b2e40087fc
--- /dev/null
+++ b/node_modules/ajv/LICENSE
@@ -0,0 +1,22 @@
+The MIT License (MIT)
+
+Copyright (c) 2015-2021 Evgeny Poberezkin
+
+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.
+
diff --git a/node_modules/ajv/README.md b/node_modules/ajv/README.md
new file mode 100644
index 0000000000000000000000000000000000000000..d0c4c08a5bd5ac198a84298da09d3e76a7684322
--- /dev/null
+++ b/node_modules/ajv/README.md
@@ -0,0 +1,207 @@
+
+
+
+
+# Ajv JSON schema validator
+
+The fastest JSON validator for Node.js and browser.
+
+Supports JSON Schema draft-04/06/07/2019-09/2020-12 ([draft-04 support](https://ajv.js.org/json-schema.html#draft-04) requires ajv-draft-04 package) and JSON Type Definition [RFC8927](https://datatracker.ietf.org/doc/rfc8927/).
+
+[](https://github.com/ajv-validator/ajv/actions?query=workflow%3Abuild)
+[](https://www.npmjs.com/package/ajv)
+[](https://www.npmjs.com/package/ajv)
+[](https://coveralls.io/github/ajv-validator/ajv?branch=master)
+[](https://simplex.chat/contact#/?v=1-2&smp=smp%3A%2F%2Fu2dS9sG8nMNURyZwqASV4yROM28Er0luVTx5X1CsMrU%3D%40smp4.simplex.im%2F8KvvURM6J38Gdq9dCuPswMOkMny0xCOJ%23%2F%3Fv%3D1-2%26dh%3DMCowBQYDK2VuAyEAr8rPVRuMOXv6kwF2yUAap-eoVg-9ssOFCi1fIrxTUw0%253D%26srv%3Do5vmywmrnaxalvz6wi3zicyftgio6psuvyniis6gco6bp6ekl4cqj4id.onion&data=%7B%22type%22%3A%22group%22%2C%22groupLinkId%22%3A%224pwLRgWHU9tlroMWHz0uOg%3D%3D%22%7D)
+[](https://gitter.im/ajv-validator/ajv)
+[](https://github.com/sponsors/epoberezkin)
+
+## Ajv sponsors
+
+[
](https://www.mozilla.org)
[
](https://opencollective.com/ajv)
+
+[
](https://opensource.microsoft.com)
[
](https://opencollective.com/ajv)
[
](https://opencollective.com/ajv)
+
+[
](https://retool.com/?utm_source=sponsor&utm_campaign=ajv)
[
](https://tidelift.com/subscription/pkg/npm-ajv?utm_source=npm-ajv&utm_medium=referral&utm_campaign=enterprise)
[
](https://github.com/simplex-chat/simplex-chat)
[
](https://opencollective.com/ajv)
+
+## Contributing
+
+More than 100 people contributed to Ajv, and we would love to have you join the development. We welcome implementing new features that will benefit many users and ideas to improve our documentation.
+
+Please review [Contributing guidelines](./CONTRIBUTING.md) and [Code components](https://ajv.js.org/components.html).
+
+## Documentation
+
+All documentation is available on the [Ajv website](https://ajv.js.org).
+
+Some useful site links:
+
+- [Getting started](https://ajv.js.org/guide/getting-started.html)
+- [JSON Schema vs JSON Type Definition](https://ajv.js.org/guide/schema-language.html)
+- [API reference](https://ajv.js.org/api.html)
+- [Strict mode](https://ajv.js.org/strict-mode.html)
+- [Standalone validation code](https://ajv.js.org/standalone.html)
+- [Security considerations](https://ajv.js.org/security.html)
+- [Command line interface](https://ajv.js.org/packages/ajv-cli.html)
+- [Frequently Asked Questions](https://ajv.js.org/faq.html)
+
+## Please [sponsor Ajv development](https://github.com/sponsors/epoberezkin)
+
+Since I asked to support Ajv development 40 people and 6 organizations contributed via GitHub and OpenCollective - this support helped receiving the MOSS grant!
+
+Your continuing support is very important - the funds will be used to develop and maintain Ajv once the next major version is released.
+
+Please sponsor Ajv via:
+
+- [GitHub sponsors page](https://github.com/sponsors/epoberezkin) (GitHub will match it)
+- [Ajv Open Collective](https://opencollective.com/ajv)
+
+Thank you.
+
+#### Open Collective sponsors
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+## Performance
+
+Ajv generates code to turn JSON Schemas into super-fast validation functions that are efficient for v8 optimization.
+
+Currently Ajv is the fastest and the most standard compliant validator according to these benchmarks:
+
+- [json-schema-benchmark](https://github.com/ebdrup/json-schema-benchmark) - 50% faster than the second place
+- [jsck benchmark](https://github.com/pandastrike/jsck#benchmarks) - 20-190% faster
+- [z-schema benchmark](https://rawgit.com/zaggino/z-schema/master/benchmark/results.html)
+- [themis benchmark](https://cdn.rawgit.com/playlyfe/themis/master/benchmark/results.html)
+
+Performance of different validators by [json-schema-benchmark](https://github.com/ebdrup/json-schema-benchmark):
+
+[](https://github.com/ebdrup/json-schema-benchmark/blob/master/README.md#performance)
+
+## Features
+
+- Ajv implements JSON Schema [draft-06/07/2019-09/2020-12](http://json-schema.org/) standards (draft-04 is supported in v6):
+ - all validation keywords (see [JSON Schema validation keywords](https://ajv.js.org/json-schema.html))
+ - [OpenAPI](https://github.com/OAI/OpenAPI-Specification/blob/master/versions/3.0.3.md) extensions:
+ - NEW: keyword [discriminator](https://ajv.js.org/json-schema.html#discriminator).
+ - keyword [nullable](https://ajv.js.org/json-schema.html#nullable).
+ - full support of remote references (remote schemas have to be added with `addSchema` or compiled to be available)
+ - support of recursive references between schemas
+ - correct string lengths for strings with unicode pairs
+ - JSON Schema [formats](https://ajv.js.org/guide/formats.html) (with [ajv-formats](https://github.com/ajv-validator/ajv-formats) plugin).
+ - [validates schemas against meta-schema](https://ajv.js.org/api.html#api-validateschema)
+- NEW: supports [JSON Type Definition](https://datatracker.ietf.org/doc/rfc8927/):
+ - all keywords (see [JSON Type Definition schema forms](https://ajv.js.org/json-type-definition.html))
+ - meta-schema for JTD schemas
+ - "union" keyword and user-defined keywords (can be used inside "metadata" member of the schema)
+- supports [browsers](https://ajv.js.org/guide/environments.html#browsers) and Node.js 18.x - current
+- [asynchronous loading](https://ajv.js.org/guide/managing-schemas.html#asynchronous-schema-loading) of referenced schemas during compilation
+- "All errors" validation mode with [option allErrors](https://ajv.js.org/options.html#allerrors)
+- [error messages with parameters](https://ajv.js.org/api.html#validation-errors) describing error reasons to allow error message generation
+- i18n error messages support with [ajv-i18n](https://github.com/ajv-validator/ajv-i18n) package
+- [removing-additional-properties](https://ajv.js.org/guide/modifying-data.html#removing-additional-properties)
+- [assigning defaults](https://ajv.js.org/guide/modifying-data.html#assigning-defaults) to missing properties and items
+- [coercing data](https://ajv.js.org/guide/modifying-data.html#coercing-data-types) to the types specified in `type` keywords
+- [user-defined keywords](https://ajv.js.org/guide/user-keywords.html)
+- additional extension keywords with [ajv-keywords](https://github.com/ajv-validator/ajv-keywords) package
+- [\$data reference](https://ajv.js.org/guide/combining-schemas.html#data-reference) to use values from the validated data as values for the schema keywords
+- [asynchronous validation](https://ajv.js.org/guide/async-validation.html) of user-defined formats and keywords
+
+## Install
+
+To install version 8:
+
+```
+npm install ajv
+```
+
+## Getting started
+
+Try it in the Node.js REPL: https://runkit.com/npm/ajv
+
+In JavaScript:
+
+```javascript
+// or ESM/TypeScript import
+import Ajv from "ajv"
+// Node.js require:
+const Ajv = require("ajv")
+
+const ajv = new Ajv() // options can be passed, e.g. {allErrors: true}
+
+const schema = {
+ type: "object",
+ properties: {
+ foo: {type: "integer"},
+ bar: {type: "string"},
+ },
+ required: ["foo"],
+ additionalProperties: false,
+}
+
+const data = {
+ foo: 1,
+ bar: "abc",
+}
+
+const validate = ajv.compile(schema)
+const valid = validate(data)
+if (!valid) console.log(validate.errors)
+```
+
+Learn how to use Ajv and see more examples in the [Guide: getting started](https://ajv.js.org/guide/getting-started.html)
+
+## Changes history
+
+See [https://github.com/ajv-validator/ajv/releases](https://github.com/ajv-validator/ajv/releases)
+
+**Please note**: [Changes in version 8.0.0](https://github.com/ajv-validator/ajv/releases/tag/v8.0.0)
+
+[Version 7.0.0](https://github.com/ajv-validator/ajv/releases/tag/v7.0.0)
+
+[Version 6.0.0](https://github.com/ajv-validator/ajv/releases/tag/v6.0.0).
+
+## Code of conduct
+
+Please review and follow the [Code of conduct](./CODE_OF_CONDUCT.md).
+
+Please report any unacceptable behaviour to ajv.validator@gmail.com - it will be reviewed by the project team.
+
+## Security contact
+
+To report a security vulnerability, please use the
+[Tidelift security contact](https://tidelift.com/security).
+Tidelift will coordinate the fix and disclosure. Please do NOT report security vulnerabilities via GitHub issues.
+
+## Open-source software support
+
+Ajv is a part of [Tidelift subscription](https://tidelift.com/subscription/pkg/npm-ajv?utm_source=npm-ajv&utm_medium=referral&utm_campaign=readme) - it provides a centralised support to open-source software users, in addition to the support provided by software maintainers.
+
+## License
+
+[MIT](./LICENSE)
diff --git a/node_modules/ajv/lib/2019.ts b/node_modules/ajv/lib/2019.ts
new file mode 100644
index 0000000000000000000000000000000000000000..3f7194f1bce5f23075cb95ba7e0191a716768e4f
--- /dev/null
+++ b/node_modules/ajv/lib/2019.ts
@@ -0,0 +1,81 @@
+import type {AnySchemaObject} from "./types"
+import AjvCore, {Options} from "./core"
+
+import draft7Vocabularies from "./vocabularies/draft7"
+import dynamicVocabulary from "./vocabularies/dynamic"
+import nextVocabulary from "./vocabularies/next"
+import unevaluatedVocabulary from "./vocabularies/unevaluated"
+import discriminator from "./vocabularies/discriminator"
+import addMetaSchema2019 from "./refs/json-schema-2019-09"
+
+const META_SCHEMA_ID = "https://json-schema.org/draft/2019-09/schema"
+
+export class Ajv2019 extends AjvCore {
+ constructor(opts: Options = {}) {
+ super({
+ ...opts,
+ dynamicRef: true,
+ next: true,
+ unevaluated: true,
+ })
+ }
+
+ _addVocabularies(): void {
+ super._addVocabularies()
+ this.addVocabulary(dynamicVocabulary)
+ draft7Vocabularies.forEach((v) => this.addVocabulary(v))
+ this.addVocabulary(nextVocabulary)
+ this.addVocabulary(unevaluatedVocabulary)
+ if (this.opts.discriminator) this.addKeyword(discriminator)
+ }
+
+ _addDefaultMetaSchema(): void {
+ super._addDefaultMetaSchema()
+ const {$data, meta} = this.opts
+ if (!meta) return
+ addMetaSchema2019.call(this, $data)
+ this.refs["http://json-schema.org/schema"] = META_SCHEMA_ID
+ }
+
+ defaultMeta(): string | AnySchemaObject | undefined {
+ return (this.opts.defaultMeta =
+ super.defaultMeta() || (this.getSchema(META_SCHEMA_ID) ? META_SCHEMA_ID : undefined))
+ }
+}
+
+module.exports = exports = Ajv2019
+module.exports.Ajv2019 = Ajv2019
+Object.defineProperty(exports, "__esModule", {value: true})
+
+export default Ajv2019
+
+export {
+ Format,
+ FormatDefinition,
+ AsyncFormatDefinition,
+ KeywordDefinition,
+ KeywordErrorDefinition,
+ CodeKeywordDefinition,
+ MacroKeywordDefinition,
+ FuncKeywordDefinition,
+ Vocabulary,
+ Schema,
+ SchemaObject,
+ AnySchemaObject,
+ AsyncSchema,
+ AnySchema,
+ ValidateFunction,
+ AsyncValidateFunction,
+ ErrorObject,
+ ErrorNoParams,
+} from "./types"
+
+export {Plugin, Options, CodeOptions, InstanceOptions, Logger, ErrorsTextOptions} from "./core"
+export {SchemaCxt, SchemaObjCxt} from "./compile"
+export {KeywordCxt} from "./compile/validate"
+export {DefinedError} from "./vocabularies/errors"
+export {JSONType} from "./compile/rules"
+export {JSONSchemaType} from "./types/json-schema"
+export {_, str, stringify, nil, Name, Code, CodeGen, CodeGenOptions} from "./compile/codegen"
+export {default as ValidationError} from "./runtime/validation_error"
+export {default as MissingRefError} from "./compile/ref_error"
diff --git a/node_modules/ajv/lib/2020.ts b/node_modules/ajv/lib/2020.ts
new file mode 100644
index 0000000000000000000000000000000000000000..cfb36af9d7822ec5d2a1783806d85d16e018b6b8
--- /dev/null
+++ b/node_modules/ajv/lib/2020.ts
@@ -0,0 +1,75 @@
+import type {AnySchemaObject} from "./types"
+import AjvCore, {Options} from "./core"
+
+import draft2020Vocabularies from "./vocabularies/draft2020"
+import discriminator from "./vocabularies/discriminator"
+import addMetaSchema2020 from "./refs/json-schema-2020-12"
+
+const META_SCHEMA_ID = "https://json-schema.org/draft/2020-12/schema"
+
+export class Ajv2020 extends AjvCore {
+ constructor(opts: Options = {}) {
+ super({
+ ...opts,
+ dynamicRef: true,
+ next: true,
+ unevaluated: true,
+ })
+ }
+
+ _addVocabularies(): void {
+ super._addVocabularies()
+ draft2020Vocabularies.forEach((v) => this.addVocabulary(v))
+ if (this.opts.discriminator) this.addKeyword(discriminator)
+ }
+
+ _addDefaultMetaSchema(): void {
+ super._addDefaultMetaSchema()
+ const {$data, meta} = this.opts
+ if (!meta) return
+ addMetaSchema2020.call(this, $data)
+ this.refs["http://json-schema.org/schema"] = META_SCHEMA_ID
+ }
+
+ defaultMeta(): string | AnySchemaObject | undefined {
+ return (this.opts.defaultMeta =
+ super.defaultMeta() || (this.getSchema(META_SCHEMA_ID) ? META_SCHEMA_ID : undefined))
+ }
+}
+
+module.exports = exports = Ajv2020
+module.exports.Ajv2020 = Ajv2020
+Object.defineProperty(exports, "__esModule", {value: true})
+
+export default Ajv2020
+
+export {
+ Format,
+ FormatDefinition,
+ AsyncFormatDefinition,
+ KeywordDefinition,
+ KeywordErrorDefinition,
+ CodeKeywordDefinition,
+ MacroKeywordDefinition,
+ FuncKeywordDefinition,
+ Vocabulary,
+ Schema,
+ SchemaObject,
+ AnySchemaObject,
+ AsyncSchema,
+ AnySchema,
+ ValidateFunction,
+ AsyncValidateFunction,
+ ErrorObject,
+ ErrorNoParams,
+} from "./types"
+
+export {Plugin, Options, CodeOptions, InstanceOptions, Logger, ErrorsTextOptions} from "./core"
+export {SchemaCxt, SchemaObjCxt} from "./compile"
+export {KeywordCxt} from "./compile/validate"
+export {DefinedError} from "./vocabularies/errors"
+export {JSONType} from "./compile/rules"
+export {JSONSchemaType} from "./types/json-schema"
+export {_, str, stringify, nil, Name, Code, CodeGen, CodeGenOptions} from "./compile/codegen"
+export {default as ValidationError} from "./runtime/validation_error"
+export {default as MissingRefError} from "./compile/ref_error"
diff --git a/node_modules/ajv/lib/ajv.ts b/node_modules/ajv/lib/ajv.ts
new file mode 100644
index 0000000000000000000000000000000000000000..8275b93a8ecea2cd36ebaaa5bc0255548de67428
--- /dev/null
+++ b/node_modules/ajv/lib/ajv.ts
@@ -0,0 +1,70 @@
+import type {AnySchemaObject} from "./types"
+import AjvCore from "./core"
+import draft7Vocabularies from "./vocabularies/draft7"
+import discriminator from "./vocabularies/discriminator"
+import * as draft7MetaSchema from "./refs/json-schema-draft-07.json"
+
+const META_SUPPORT_DATA = ["/properties"]
+
+const META_SCHEMA_ID = "http://json-schema.org/draft-07/schema"
+
+export class Ajv extends AjvCore {
+ _addVocabularies(): void {
+ super._addVocabularies()
+ draft7Vocabularies.forEach((v) => this.addVocabulary(v))
+ if (this.opts.discriminator) this.addKeyword(discriminator)
+ }
+
+ _addDefaultMetaSchema(): void {
+ super._addDefaultMetaSchema()
+ if (!this.opts.meta) return
+ const metaSchema = this.opts.$data
+ ? this.$dataMetaSchema(draft7MetaSchema, META_SUPPORT_DATA)
+ : draft7MetaSchema
+ this.addMetaSchema(metaSchema, META_SCHEMA_ID, false)
+ this.refs["http://json-schema.org/schema"] = META_SCHEMA_ID
+ }
+
+ defaultMeta(): string | AnySchemaObject | undefined {
+ return (this.opts.defaultMeta =
+ super.defaultMeta() || (this.getSchema(META_SCHEMA_ID) ? META_SCHEMA_ID : undefined))
+ }
+}
+
+module.exports = exports = Ajv
+module.exports.Ajv = Ajv
+Object.defineProperty(exports, "__esModule", {value: true})
+
+export default Ajv
+
+export {
+ Format,
+ FormatDefinition,
+ AsyncFormatDefinition,
+ KeywordDefinition,
+ KeywordErrorDefinition,
+ CodeKeywordDefinition,
+ MacroKeywordDefinition,
+ FuncKeywordDefinition,
+ Vocabulary,
+ Schema,
+ SchemaObject,
+ AnySchemaObject,
+ AsyncSchema,
+ AnySchema,
+ ValidateFunction,
+ AsyncValidateFunction,
+ SchemaValidateFunction,
+ ErrorObject,
+ ErrorNoParams,
+} from "./types"
+
+export {Plugin, Options, CodeOptions, InstanceOptions, Logger, ErrorsTextOptions} from "./core"
+export {SchemaCxt, SchemaObjCxt} from "./compile"
+export {KeywordCxt} from "./compile/validate"
+export {DefinedError} from "./vocabularies/errors"
+export {JSONType} from "./compile/rules"
+export {JSONSchemaType} from "./types/json-schema"
+export {_, str, stringify, nil, Name, Code, CodeGen, CodeGenOptions} from "./compile/codegen"
+export {default as ValidationError} from "./runtime/validation_error"
+export {default as MissingRefError} from "./compile/ref_error"
diff --git a/node_modules/ajv/lib/compile/codegen/code.ts b/node_modules/ajv/lib/compile/codegen/code.ts
new file mode 100644
index 0000000000000000000000000000000000000000..9d4de6149f9451273ae7e3ca547cb69baed7877c
--- /dev/null
+++ b/node_modules/ajv/lib/compile/codegen/code.ts
@@ -0,0 +1,169 @@
+// eslint-disable-next-line @typescript-eslint/no-extraneous-class
+export abstract class _CodeOrName {
+ abstract readonly str: string
+ abstract readonly names: UsedNames
+ abstract toString(): string
+ abstract emptyStr(): boolean
+}
+
+export const IDENTIFIER = /^[a-z$_][a-z$_0-9]*$/i
+
+export class Name extends _CodeOrName {
+ readonly str: string
+ constructor(s: string) {
+ super()
+ if (!IDENTIFIER.test(s)) throw new Error("CodeGen: name must be a valid identifier")
+ this.str = s
+ }
+
+ toString(): string {
+ return this.str
+ }
+
+ emptyStr(): boolean {
+ return false
+ }
+
+ get names(): UsedNames {
+ return {[this.str]: 1}
+ }
+}
+
+export class _Code extends _CodeOrName {
+ readonly _items: readonly CodeItem[]
+ private _str?: string
+ private _names?: UsedNames
+
+ constructor(code: string | readonly CodeItem[]) {
+ super()
+ this._items = typeof code === "string" ? [code] : code
+ }
+
+ toString(): string {
+ return this.str
+ }
+
+ emptyStr(): boolean {
+ if (this._items.length > 1) return false
+ const item = this._items[0]
+ return item === "" || item === '""'
+ }
+
+ get str(): string {
+ return (this._str ??= this._items.reduce((s: string, c: CodeItem) => `${s}${c}`, ""))
+ }
+
+ get names(): UsedNames {
+ return (this._names ??= this._items.reduce((names: UsedNames, c) => {
+ if (c instanceof Name) names[c.str] = (names[c.str] || 0) + 1
+ return names
+ }, {}))
+ }
+}
+
+export type CodeItem = Name | string | number | boolean | null
+
+export type UsedNames = Record
+
+export type Code = _Code | Name
+
+export type SafeExpr = Code | number | boolean | null
+
+export const nil = new _Code("")
+
+type CodeArg = SafeExpr | string | undefined
+
+export function _(strs: TemplateStringsArray, ...args: CodeArg[]): _Code {
+ const code: CodeItem[] = [strs[0]]
+ let i = 0
+ while (i < args.length) {
+ addCodeArg(code, args[i])
+ code.push(strs[++i])
+ }
+ return new _Code(code)
+}
+
+const plus = new _Code("+")
+
+export function str(strs: TemplateStringsArray, ...args: (CodeArg | string[])[]): _Code {
+ const expr: CodeItem[] = [safeStringify(strs[0])]
+ let i = 0
+ while (i < args.length) {
+ expr.push(plus)
+ addCodeArg(expr, args[i])
+ expr.push(plus, safeStringify(strs[++i]))
+ }
+ optimize(expr)
+ return new _Code(expr)
+}
+
+export function addCodeArg(code: CodeItem[], arg: CodeArg | string[]): void {
+ if (arg instanceof _Code) code.push(...arg._items)
+ else if (arg instanceof Name) code.push(arg)
+ else code.push(interpolate(arg))
+}
+
+function optimize(expr: CodeItem[]): void {
+ let i = 1
+ while (i < expr.length - 1) {
+ if (expr[i] === plus) {
+ const res = mergeExprItems(expr[i - 1], expr[i + 1])
+ if (res !== undefined) {
+ expr.splice(i - 1, 3, res)
+ continue
+ }
+ expr[i++] = "+"
+ }
+ i++
+ }
+}
+
+function mergeExprItems(a: CodeItem, b: CodeItem): CodeItem | undefined {
+ if (b === '""') return a
+ if (a === '""') return b
+ if (typeof a == "string") {
+ if (b instanceof Name || a[a.length - 1] !== '"') return
+ if (typeof b != "string") return `${a.slice(0, -1)}${b}"`
+ if (b[0] === '"') return a.slice(0, -1) + b.slice(1)
+ return
+ }
+ if (typeof b == "string" && b[0] === '"' && !(a instanceof Name)) return `"${a}${b.slice(1)}`
+ return
+}
+
+export function strConcat(c1: Code, c2: Code): Code {
+ return c2.emptyStr() ? c1 : c1.emptyStr() ? c2 : str`${c1}${c2}`
+}
+
+// TODO do not allow arrays here
+function interpolate(x?: string | string[] | number | boolean | null): SafeExpr | string {
+ return typeof x == "number" || typeof x == "boolean" || x === null
+ ? x
+ : safeStringify(Array.isArray(x) ? x.join(",") : x)
+}
+
+export function stringify(x: unknown): Code {
+ return new _Code(safeStringify(x))
+}
+
+export function safeStringify(x: unknown): string {
+ return JSON.stringify(x)
+ .replace(/\u2028/g, "\\u2028")
+ .replace(/\u2029/g, "\\u2029")
+}
+
+export function getProperty(key: Code | string | number): Code {
+ return typeof key == "string" && IDENTIFIER.test(key) ? new _Code(`.${key}`) : _`[${key}]`
+}
+
+//Does best effort to format the name properly
+export function getEsmExportName(key: Code | string | number): Code {
+ if (typeof key == "string" && IDENTIFIER.test(key)) {
+ return new _Code(`${key}`)
+ }
+ throw new Error(`CodeGen: invalid export name: ${key}, use explicit $id name mapping`)
+}
+
+export function regexpCode(rx: RegExp): Code {
+ return new _Code(rx.toString())
+}
diff --git a/node_modules/ajv/lib/compile/codegen/index.ts b/node_modules/ajv/lib/compile/codegen/index.ts
new file mode 100644
index 0000000000000000000000000000000000000000..5a6d1ee58c106245ba8a1b56f929fe3a23f337b8
--- /dev/null
+++ b/node_modules/ajv/lib/compile/codegen/index.ts
@@ -0,0 +1,852 @@
+import type {ScopeValueSets, NameValue, ValueScope, ValueScopeName} from "./scope"
+import {_, nil, _Code, Code, Name, UsedNames, CodeItem, addCodeArg, _CodeOrName} from "./code"
+import {Scope, varKinds} from "./scope"
+
+export {_, str, strConcat, nil, getProperty, stringify, regexpCode, Name, Code} from "./code"
+export {Scope, ScopeStore, ValueScope, ValueScopeName, ScopeValueSets, varKinds} from "./scope"
+
+// type for expressions that can be safely inserted in code without quotes
+export type SafeExpr = Code | number | boolean | null
+
+// type that is either Code of function that adds code to CodeGen instance using its methods
+export type Block = Code | (() => void)
+
+export const operators = {
+ GT: new _Code(">"),
+ GTE: new _Code(">="),
+ LT: new _Code("<"),
+ LTE: new _Code("<="),
+ EQ: new _Code("==="),
+ NEQ: new _Code("!=="),
+ NOT: new _Code("!"),
+ OR: new _Code("||"),
+ AND: new _Code("&&"),
+ ADD: new _Code("+"),
+}
+
+abstract class Node {
+ abstract readonly names: UsedNames
+
+ optimizeNodes(): this | ChildNode | ChildNode[] | undefined {
+ return this
+ }
+
+ optimizeNames(_names: UsedNames, _constants: Constants): this | undefined {
+ return this
+ }
+
+ // get count(): number {
+ // return 1
+ // }
+}
+
+class Def extends Node {
+ constructor(
+ private readonly varKind: Name,
+ private readonly name: Name,
+ private rhs?: SafeExpr
+ ) {
+ super()
+ }
+
+ render({es5, _n}: CGOptions): string {
+ const varKind = es5 ? varKinds.var : this.varKind
+ const rhs = this.rhs === undefined ? "" : ` = ${this.rhs}`
+ return `${varKind} ${this.name}${rhs};` + _n
+ }
+
+ optimizeNames(names: UsedNames, constants: Constants): this | undefined {
+ if (!names[this.name.str]) return
+ if (this.rhs) this.rhs = optimizeExpr(this.rhs, names, constants)
+ return this
+ }
+
+ get names(): UsedNames {
+ return this.rhs instanceof _CodeOrName ? this.rhs.names : {}
+ }
+}
+
+class Assign extends Node {
+ constructor(
+ readonly lhs: Code,
+ public rhs: SafeExpr,
+ private readonly sideEffects?: boolean
+ ) {
+ super()
+ }
+
+ render({_n}: CGOptions): string {
+ return `${this.lhs} = ${this.rhs};` + _n
+ }
+
+ optimizeNames(names: UsedNames, constants: Constants): this | undefined {
+ if (this.lhs instanceof Name && !names[this.lhs.str] && !this.sideEffects) return
+ this.rhs = optimizeExpr(this.rhs, names, constants)
+ return this
+ }
+
+ get names(): UsedNames {
+ const names = this.lhs instanceof Name ? {} : {...this.lhs.names}
+ return addExprNames(names, this.rhs)
+ }
+}
+
+class AssignOp extends Assign {
+ constructor(
+ lhs: Code,
+ private readonly op: Code,
+ rhs: SafeExpr,
+ sideEffects?: boolean
+ ) {
+ super(lhs, rhs, sideEffects)
+ }
+
+ render({_n}: CGOptions): string {
+ return `${this.lhs} ${this.op}= ${this.rhs};` + _n
+ }
+}
+
+class Label extends Node {
+ readonly names: UsedNames = {}
+ constructor(readonly label: Name) {
+ super()
+ }
+
+ render({_n}: CGOptions): string {
+ return `${this.label}:` + _n
+ }
+}
+
+class Break extends Node {
+ readonly names: UsedNames = {}
+ constructor(readonly label?: Code) {
+ super()
+ }
+
+ render({_n}: CGOptions): string {
+ const label = this.label ? ` ${this.label}` : ""
+ return `break${label};` + _n
+ }
+}
+
+class Throw extends Node {
+ constructor(readonly error: Code) {
+ super()
+ }
+
+ render({_n}: CGOptions): string {
+ return `throw ${this.error};` + _n
+ }
+
+ get names(): UsedNames {
+ return this.error.names
+ }
+}
+
+class AnyCode extends Node {
+ constructor(private code: SafeExpr) {
+ super()
+ }
+
+ render({_n}: CGOptions): string {
+ return `${this.code};` + _n
+ }
+
+ optimizeNodes(): this | undefined {
+ return `${this.code}` ? this : undefined
+ }
+
+ optimizeNames(names: UsedNames, constants: Constants): this {
+ this.code = optimizeExpr(this.code, names, constants)
+ return this
+ }
+
+ get names(): UsedNames {
+ return this.code instanceof _CodeOrName ? this.code.names : {}
+ }
+}
+
+abstract class ParentNode extends Node {
+ constructor(readonly nodes: ChildNode[] = []) {
+ super()
+ }
+
+ render(opts: CGOptions): string {
+ return this.nodes.reduce((code, n) => code + n.render(opts), "")
+ }
+
+ optimizeNodes(): this | ChildNode | ChildNode[] | undefined {
+ const {nodes} = this
+ let i = nodes.length
+ while (i--) {
+ const n = nodes[i].optimizeNodes()
+ if (Array.isArray(n)) nodes.splice(i, 1, ...n)
+ else if (n) nodes[i] = n
+ else nodes.splice(i, 1)
+ }
+ return nodes.length > 0 ? this : undefined
+ }
+
+ optimizeNames(names: UsedNames, constants: Constants): this | undefined {
+ const {nodes} = this
+ let i = nodes.length
+ while (i--) {
+ // iterating backwards improves 1-pass optimization
+ const n = nodes[i]
+ if (n.optimizeNames(names, constants)) continue
+ subtractNames(names, n.names)
+ nodes.splice(i, 1)
+ }
+ return nodes.length > 0 ? this : undefined
+ }
+
+ get names(): UsedNames {
+ return this.nodes.reduce((names: UsedNames, n) => addNames(names, n.names), {})
+ }
+
+ // get count(): number {
+ // return this.nodes.reduce((c, n) => c + n.count, 1)
+ // }
+}
+
+abstract class BlockNode extends ParentNode {
+ render(opts: CGOptions): string {
+ return "{" + opts._n + super.render(opts) + "}" + opts._n
+ }
+}
+
+class Root extends ParentNode {}
+
+class Else extends BlockNode {
+ static readonly kind = "else"
+}
+
+class If extends BlockNode {
+ static readonly kind = "if"
+ else?: If | Else
+ constructor(
+ private condition: Code | boolean,
+ nodes?: ChildNode[]
+ ) {
+ super(nodes)
+ }
+
+ render(opts: CGOptions): string {
+ let code = `if(${this.condition})` + super.render(opts)
+ if (this.else) code += "else " + this.else.render(opts)
+ return code
+ }
+
+ optimizeNodes(): If | ChildNode[] | undefined {
+ super.optimizeNodes()
+ const cond = this.condition
+ if (cond === true) return this.nodes // else is ignored here
+ let e = this.else
+ if (e) {
+ const ns = e.optimizeNodes()
+ e = this.else = Array.isArray(ns) ? new Else(ns) : (ns as Else | undefined)
+ }
+ if (e) {
+ if (cond === false) return e instanceof If ? e : e.nodes
+ if (this.nodes.length) return this
+ return new If(not(cond), e instanceof If ? [e] : e.nodes)
+ }
+ if (cond === false || !this.nodes.length) return undefined
+ return this
+ }
+
+ optimizeNames(names: UsedNames, constants: Constants): this | undefined {
+ this.else = this.else?.optimizeNames(names, constants)
+ if (!(super.optimizeNames(names, constants) || this.else)) return
+ this.condition = optimizeExpr(this.condition, names, constants)
+ return this
+ }
+
+ get names(): UsedNames {
+ const names = super.names
+ addExprNames(names, this.condition)
+ if (this.else) addNames(names, this.else.names)
+ return names
+ }
+
+ // get count(): number {
+ // return super.count + (this.else?.count || 0)
+ // }
+}
+
+abstract class For extends BlockNode {
+ static readonly kind = "for"
+}
+
+class ForLoop extends For {
+ constructor(private iteration: Code) {
+ super()
+ }
+
+ render(opts: CGOptions): string {
+ return `for(${this.iteration})` + super.render(opts)
+ }
+
+ optimizeNames(names: UsedNames, constants: Constants): this | undefined {
+ if (!super.optimizeNames(names, constants)) return
+ this.iteration = optimizeExpr(this.iteration, names, constants)
+ return this
+ }
+
+ get names(): UsedNames {
+ return addNames(super.names, this.iteration.names)
+ }
+}
+
+class ForRange extends For {
+ constructor(
+ private readonly varKind: Name,
+ private readonly name: Name,
+ private readonly from: SafeExpr,
+ private readonly to: SafeExpr
+ ) {
+ super()
+ }
+
+ render(opts: CGOptions): string {
+ const varKind = opts.es5 ? varKinds.var : this.varKind
+ const {name, from, to} = this
+ return `for(${varKind} ${name}=${from}; ${name}<${to}; ${name}++)` + super.render(opts)
+ }
+
+ get names(): UsedNames {
+ const names = addExprNames(super.names, this.from)
+ return addExprNames(names, this.to)
+ }
+}
+
+class ForIter extends For {
+ constructor(
+ private readonly loop: "of" | "in",
+ private readonly varKind: Name,
+ private readonly name: Name,
+ private iterable: Code
+ ) {
+ super()
+ }
+
+ render(opts: CGOptions): string {
+ return `for(${this.varKind} ${this.name} ${this.loop} ${this.iterable})` + super.render(opts)
+ }
+
+ optimizeNames(names: UsedNames, constants: Constants): this | undefined {
+ if (!super.optimizeNames(names, constants)) return
+ this.iterable = optimizeExpr(this.iterable, names, constants)
+ return this
+ }
+
+ get names(): UsedNames {
+ return addNames(super.names, this.iterable.names)
+ }
+}
+
+class Func extends BlockNode {
+ static readonly kind = "func"
+ constructor(
+ public name: Name,
+ public args: Code,
+ public async?: boolean
+ ) {
+ super()
+ }
+
+ render(opts: CGOptions): string {
+ const _async = this.async ? "async " : ""
+ return `${_async}function ${this.name}(${this.args})` + super.render(opts)
+ }
+}
+
+class Return extends ParentNode {
+ static readonly kind = "return"
+
+ render(opts: CGOptions): string {
+ return "return " + super.render(opts)
+ }
+}
+
+class Try extends BlockNode {
+ catch?: Catch
+ finally?: Finally
+
+ render(opts: CGOptions): string {
+ let code = "try" + super.render(opts)
+ if (this.catch) code += this.catch.render(opts)
+ if (this.finally) code += this.finally.render(opts)
+ return code
+ }
+
+ optimizeNodes(): this {
+ super.optimizeNodes()
+ this.catch?.optimizeNodes() as Catch | undefined
+ this.finally?.optimizeNodes() as Finally | undefined
+ return this
+ }
+
+ optimizeNames(names: UsedNames, constants: Constants): this {
+ super.optimizeNames(names, constants)
+ this.catch?.optimizeNames(names, constants)
+ this.finally?.optimizeNames(names, constants)
+ return this
+ }
+
+ get names(): UsedNames {
+ const names = super.names
+ if (this.catch) addNames(names, this.catch.names)
+ if (this.finally) addNames(names, this.finally.names)
+ return names
+ }
+
+ // get count(): number {
+ // return super.count + (this.catch?.count || 0) + (this.finally?.count || 0)
+ // }
+}
+
+class Catch extends BlockNode {
+ static readonly kind = "catch"
+ constructor(readonly error: Name) {
+ super()
+ }
+
+ render(opts: CGOptions): string {
+ return `catch(${this.error})` + super.render(opts)
+ }
+}
+
+class Finally extends BlockNode {
+ static readonly kind = "finally"
+ render(opts: CGOptions): string {
+ return "finally" + super.render(opts)
+ }
+}
+
+type StartBlockNode = If | For | Func | Return | Try
+
+type LeafNode = Def | Assign | Label | Break | Throw | AnyCode
+
+type ChildNode = StartBlockNode | LeafNode
+
+type EndBlockNodeType =
+ | typeof If
+ | typeof Else
+ | typeof For
+ | typeof Func
+ | typeof Return
+ | typeof Catch
+ | typeof Finally
+
+type Constants = Record
+
+export interface CodeGenOptions {
+ es5?: boolean
+ lines?: boolean
+ ownProperties?: boolean
+}
+
+interface CGOptions extends CodeGenOptions {
+ _n: "\n" | ""
+}
+
+export class CodeGen {
+ readonly _scope: Scope
+ readonly _extScope: ValueScope
+ readonly _values: ScopeValueSets = {}
+ private readonly _nodes: ParentNode[]
+ private readonly _blockStarts: number[] = []
+ private readonly _constants: Constants = {}
+ private readonly opts: CGOptions
+
+ constructor(extScope: ValueScope, opts: CodeGenOptions = {}) {
+ this.opts = {...opts, _n: opts.lines ? "\n" : ""}
+ this._extScope = extScope
+ this._scope = new Scope({parent: extScope})
+ this._nodes = [new Root()]
+ }
+
+ toString(): string {
+ return this._root.render(this.opts)
+ }
+
+ // returns unique name in the internal scope
+ name(prefix: string): Name {
+ return this._scope.name(prefix)
+ }
+
+ // reserves unique name in the external scope
+ scopeName(prefix: string): ValueScopeName {
+ return this._extScope.name(prefix)
+ }
+
+ // reserves unique name in the external scope and assigns value to it
+ scopeValue(prefixOrName: ValueScopeName | string, value: NameValue): Name {
+ const name = this._extScope.value(prefixOrName, value)
+ const vs = this._values[name.prefix] || (this._values[name.prefix] = new Set())
+ vs.add(name)
+ return name
+ }
+
+ getScopeValue(prefix: string, keyOrRef: unknown): ValueScopeName | undefined {
+ return this._extScope.getValue(prefix, keyOrRef)
+ }
+
+ // return code that assigns values in the external scope to the names that are used internally
+ // (same names that were returned by gen.scopeName or gen.scopeValue)
+ scopeRefs(scopeName: Name): Code {
+ return this._extScope.scopeRefs(scopeName, this._values)
+ }
+
+ scopeCode(): Code {
+ return this._extScope.scopeCode(this._values)
+ }
+
+ private _def(
+ varKind: Name,
+ nameOrPrefix: Name | string,
+ rhs?: SafeExpr,
+ constant?: boolean
+ ): Name {
+ const name = this._scope.toName(nameOrPrefix)
+ if (rhs !== undefined && constant) this._constants[name.str] = rhs
+ this._leafNode(new Def(varKind, name, rhs))
+ return name
+ }
+
+ // `const` declaration (`var` in es5 mode)
+ const(nameOrPrefix: Name | string, rhs: SafeExpr, _constant?: boolean): Name {
+ return this._def(varKinds.const, nameOrPrefix, rhs, _constant)
+ }
+
+ // `let` declaration with optional assignment (`var` in es5 mode)
+ let(nameOrPrefix: Name | string, rhs?: SafeExpr, _constant?: boolean): Name {
+ return this._def(varKinds.let, nameOrPrefix, rhs, _constant)
+ }
+
+ // `var` declaration with optional assignment
+ var(nameOrPrefix: Name | string, rhs?: SafeExpr, _constant?: boolean): Name {
+ return this._def(varKinds.var, nameOrPrefix, rhs, _constant)
+ }
+
+ // assignment code
+ assign(lhs: Code, rhs: SafeExpr, sideEffects?: boolean): CodeGen {
+ return this._leafNode(new Assign(lhs, rhs, sideEffects))
+ }
+
+ // `+=` code
+ add(lhs: Code, rhs: SafeExpr): CodeGen {
+ return this._leafNode(new AssignOp(lhs, operators.ADD, rhs))
+ }
+
+ // appends passed SafeExpr to code or executes Block
+ code(c: Block | SafeExpr): CodeGen {
+ if (typeof c == "function") c()
+ else if (c !== nil) this._leafNode(new AnyCode(c))
+ return this
+ }
+
+ // returns code for object literal for the passed argument list of key-value pairs
+ object(...keyValues: [Name | string, SafeExpr | string][]): _Code {
+ const code: CodeItem[] = ["{"]
+ for (const [key, value] of keyValues) {
+ if (code.length > 1) code.push(",")
+ code.push(key)
+ if (key !== value || this.opts.es5) {
+ code.push(":")
+ addCodeArg(code, value)
+ }
+ }
+ code.push("}")
+ return new _Code(code)
+ }
+
+ // `if` clause (or statement if `thenBody` and, optionally, `elseBody` are passed)
+ if(condition: Code | boolean, thenBody?: Block, elseBody?: Block): CodeGen {
+ this._blockNode(new If(condition))
+
+ if (thenBody && elseBody) {
+ this.code(thenBody).else().code(elseBody).endIf()
+ } else if (thenBody) {
+ this.code(thenBody).endIf()
+ } else if (elseBody) {
+ throw new Error('CodeGen: "else" body without "then" body')
+ }
+ return this
+ }
+
+ // `else if` clause - invalid without `if` or after `else` clauses
+ elseIf(condition: Code | boolean): CodeGen {
+ return this._elseNode(new If(condition))
+ }
+
+ // `else` clause - only valid after `if` or `else if` clauses
+ else(): CodeGen {
+ return this._elseNode(new Else())
+ }
+
+ // end `if` statement (needed if gen.if was used only with condition)
+ endIf(): CodeGen {
+ return this._endBlockNode(If, Else)
+ }
+
+ private _for(node: For, forBody?: Block): CodeGen {
+ this._blockNode(node)
+ if (forBody) this.code(forBody).endFor()
+ return this
+ }
+
+ // a generic `for` clause (or statement if `forBody` is passed)
+ for(iteration: Code, forBody?: Block): CodeGen {
+ return this._for(new ForLoop(iteration), forBody)
+ }
+
+ // `for` statement for a range of values
+ forRange(
+ nameOrPrefix: Name | string,
+ from: SafeExpr,
+ to: SafeExpr,
+ forBody: (index: Name) => void,
+ varKind: Code = this.opts.es5 ? varKinds.var : varKinds.let
+ ): CodeGen {
+ const name = this._scope.toName(nameOrPrefix)
+ return this._for(new ForRange(varKind, name, from, to), () => forBody(name))
+ }
+
+ // `for-of` statement (in es5 mode replace with a normal for loop)
+ forOf(
+ nameOrPrefix: Name | string,
+ iterable: Code,
+ forBody: (item: Name) => void,
+ varKind: Code = varKinds.const
+ ): CodeGen {
+ const name = this._scope.toName(nameOrPrefix)
+ if (this.opts.es5) {
+ const arr = iterable instanceof Name ? iterable : this.var("_arr", iterable)
+ return this.forRange("_i", 0, _`${arr}.length`, (i) => {
+ this.var(name, _`${arr}[${i}]`)
+ forBody(name)
+ })
+ }
+ return this._for(new ForIter("of", varKind, name, iterable), () => forBody(name))
+ }
+
+ // `for-in` statement.
+ // With option `ownProperties` replaced with a `for-of` loop for object keys
+ forIn(
+ nameOrPrefix: Name | string,
+ obj: Code,
+ forBody: (item: Name) => void,
+ varKind: Code = this.opts.es5 ? varKinds.var : varKinds.const
+ ): CodeGen {
+ if (this.opts.ownProperties) {
+ return this.forOf(nameOrPrefix, _`Object.keys(${obj})`, forBody)
+ }
+ const name = this._scope.toName(nameOrPrefix)
+ return this._for(new ForIter("in", varKind, name, obj), () => forBody(name))
+ }
+
+ // end `for` loop
+ endFor(): CodeGen {
+ return this._endBlockNode(For)
+ }
+
+ // `label` statement
+ label(label: Name): CodeGen {
+ return this._leafNode(new Label(label))
+ }
+
+ // `break` statement
+ break(label?: Code): CodeGen {
+ return this._leafNode(new Break(label))
+ }
+
+ // `return` statement
+ return(value: Block | SafeExpr): CodeGen {
+ const node = new Return()
+ this._blockNode(node)
+ this.code(value)
+ if (node.nodes.length !== 1) throw new Error('CodeGen: "return" should have one node')
+ return this._endBlockNode(Return)
+ }
+
+ // `try` statement
+ try(tryBody: Block, catchCode?: (e: Name) => void, finallyCode?: Block): CodeGen {
+ if (!catchCode && !finallyCode) throw new Error('CodeGen: "try" without "catch" and "finally"')
+ const node = new Try()
+ this._blockNode(node)
+ this.code(tryBody)
+ if (catchCode) {
+ const error = this.name("e")
+ this._currNode = node.catch = new Catch(error)
+ catchCode(error)
+ }
+ if (finallyCode) {
+ this._currNode = node.finally = new Finally()
+ this.code(finallyCode)
+ }
+ return this._endBlockNode(Catch, Finally)
+ }
+
+ // `throw` statement
+ throw(error: Code): CodeGen {
+ return this._leafNode(new Throw(error))
+ }
+
+ // start self-balancing block
+ block(body?: Block, nodeCount?: number): CodeGen {
+ this._blockStarts.push(this._nodes.length)
+ if (body) this.code(body).endBlock(nodeCount)
+ return this
+ }
+
+ // end the current self-balancing block
+ endBlock(nodeCount?: number): CodeGen {
+ const len = this._blockStarts.pop()
+ if (len === undefined) throw new Error("CodeGen: not in self-balancing block")
+ const toClose = this._nodes.length - len
+ if (toClose < 0 || (nodeCount !== undefined && toClose !== nodeCount)) {
+ throw new Error(`CodeGen: wrong number of nodes: ${toClose} vs ${nodeCount} expected`)
+ }
+ this._nodes.length = len
+ return this
+ }
+
+ // `function` heading (or definition if funcBody is passed)
+ func(name: Name, args: Code = nil, async?: boolean, funcBody?: Block): CodeGen {
+ this._blockNode(new Func(name, args, async))
+ if (funcBody) this.code(funcBody).endFunc()
+ return this
+ }
+
+ // end function definition
+ endFunc(): CodeGen {
+ return this._endBlockNode(Func)
+ }
+
+ optimize(n = 1): void {
+ while (n-- > 0) {
+ this._root.optimizeNodes()
+ this._root.optimizeNames(this._root.names, this._constants)
+ }
+ }
+
+ private _leafNode(node: LeafNode): CodeGen {
+ this._currNode.nodes.push(node)
+ return this
+ }
+
+ private _blockNode(node: StartBlockNode): void {
+ this._currNode.nodes.push(node)
+ this._nodes.push(node)
+ }
+
+ private _endBlockNode(N1: EndBlockNodeType, N2?: EndBlockNodeType): CodeGen {
+ const n = this._currNode
+ if (n instanceof N1 || (N2 && n instanceof N2)) {
+ this._nodes.pop()
+ return this
+ }
+ throw new Error(`CodeGen: not in block "${N2 ? `${N1.kind}/${N2.kind}` : N1.kind}"`)
+ }
+
+ private _elseNode(node: If | Else): CodeGen {
+ const n = this._currNode
+ if (!(n instanceof If)) {
+ throw new Error('CodeGen: "else" without "if"')
+ }
+ this._currNode = n.else = node
+ return this
+ }
+
+ private get _root(): Root {
+ return this._nodes[0] as Root
+ }
+
+ private get _currNode(): ParentNode {
+ const ns = this._nodes
+ return ns[ns.length - 1]
+ }
+
+ private set _currNode(node: ParentNode) {
+ const ns = this._nodes
+ ns[ns.length - 1] = node
+ }
+
+ // get nodeCount(): number {
+ // return this._root.count
+ // }
+}
+
+function addNames(names: UsedNames, from: UsedNames): UsedNames {
+ for (const n in from) names[n] = (names[n] || 0) + (from[n] || 0)
+ return names
+}
+
+function addExprNames(names: UsedNames, from: SafeExpr): UsedNames {
+ return from instanceof _CodeOrName ? addNames(names, from.names) : names
+}
+
+function optimizeExpr(expr: T, names: UsedNames, constants: Constants): T
+function optimizeExpr(expr: SafeExpr, names: UsedNames, constants: Constants): SafeExpr {
+ if (expr instanceof Name) return replaceName(expr)
+ if (!canOptimize(expr)) return expr
+ return new _Code(
+ expr._items.reduce((items: CodeItem[], c: SafeExpr | string) => {
+ if (c instanceof Name) c = replaceName(c)
+ if (c instanceof _Code) items.push(...c._items)
+ else items.push(c)
+ return items
+ }, [])
+ )
+
+ function replaceName(n: Name): SafeExpr {
+ const c = constants[n.str]
+ if (c === undefined || names[n.str] !== 1) return n
+ delete names[n.str]
+ return c
+ }
+
+ function canOptimize(e: SafeExpr): e is _Code {
+ return (
+ e instanceof _Code &&
+ e._items.some(
+ (c) => c instanceof Name && names[c.str] === 1 && constants[c.str] !== undefined
+ )
+ )
+ }
+}
+
+function subtractNames(names: UsedNames, from: UsedNames): void {
+ for (const n in from) names[n] = (names[n] || 0) - (from[n] || 0)
+}
+
+export function not(x: T): T
+export function not(x: Code | SafeExpr): Code | SafeExpr {
+ return typeof x == "boolean" || typeof x == "number" || x === null ? !x : _`!${par(x)}`
+}
+
+const andCode = mappend(operators.AND)
+
+// boolean AND (&&) expression with the passed arguments
+export function and(...args: Code[]): Code {
+ return args.reduce(andCode)
+}
+
+const orCode = mappend(operators.OR)
+
+// boolean OR (||) expression with the passed arguments
+export function or(...args: Code[]): Code {
+ return args.reduce(orCode)
+}
+
+type MAppend = (x: Code, y: Code) => Code
+
+function mappend(op: Code): MAppend {
+ return (x, y) => (x === nil ? y : y === nil ? x : _`${par(x)} ${op} ${par(y)}`)
+}
+
+function par(x: Code): Code {
+ return x instanceof Name ? x : _`(${x})`
+}
diff --git a/node_modules/ajv/lib/compile/codegen/scope.ts b/node_modules/ajv/lib/compile/codegen/scope.ts
new file mode 100644
index 0000000000000000000000000000000000000000..511992297d08f661ef4cf826eba9fbdbf0854db0
--- /dev/null
+++ b/node_modules/ajv/lib/compile/codegen/scope.ts
@@ -0,0 +1,215 @@
+import {_, nil, Code, Name} from "./code"
+
+interface NameGroup {
+ prefix: string
+ index: number
+}
+
+export interface NameValue {
+ ref: ValueReference // this is the reference to any value that can be referred to from generated code via `globals` var in the closure
+ key?: unknown // any key to identify a global to avoid duplicates, if not passed ref is used
+ code?: Code // this is the code creating the value needed for standalone code wit_out closure - can be a primitive value, function or import (`require`)
+}
+
+export type ValueReference = unknown // possibly make CodeGen parameterized type on this type
+
+class ValueError extends Error {
+ readonly value?: NameValue
+ constructor(name: ValueScopeName) {
+ super(`CodeGen: "code" for ${name} not defined`)
+ this.value = name.value
+ }
+}
+
+interface ScopeOptions {
+ prefixes?: Set
+ parent?: Scope
+}
+
+interface ValueScopeOptions extends ScopeOptions {
+ scope: ScopeStore
+ es5?: boolean
+ lines?: boolean
+}
+
+export type ScopeStore = Record
+
+type ScopeValues = {
+ [Prefix in string]?: Map
+}
+
+export type ScopeValueSets = {
+ [Prefix in string]?: Set
+}
+
+export enum UsedValueState {
+ Started,
+ Completed,
+}
+
+export type UsedScopeValues = {
+ [Prefix in string]?: Map
+}
+
+export const varKinds = {
+ const: new Name("const"),
+ let: new Name("let"),
+ var: new Name("var"),
+}
+
+export class Scope {
+ protected readonly _names: {[Prefix in string]?: NameGroup} = {}
+ protected readonly _prefixes?: Set
+ protected readonly _parent?: Scope
+
+ constructor({prefixes, parent}: ScopeOptions = {}) {
+ this._prefixes = prefixes
+ this._parent = parent
+ }
+
+ toName(nameOrPrefix: Name | string): Name {
+ return nameOrPrefix instanceof Name ? nameOrPrefix : this.name(nameOrPrefix)
+ }
+
+ name(prefix: string): Name {
+ return new Name(this._newName(prefix))
+ }
+
+ protected _newName(prefix: string): string {
+ const ng = this._names[prefix] || this._nameGroup(prefix)
+ return `${prefix}${ng.index++}`
+ }
+
+ private _nameGroup(prefix: string): NameGroup {
+ if (this._parent?._prefixes?.has(prefix) || (this._prefixes && !this._prefixes.has(prefix))) {
+ throw new Error(`CodeGen: prefix "${prefix}" is not allowed in this scope`)
+ }
+ return (this._names[prefix] = {prefix, index: 0})
+ }
+}
+
+interface ScopePath {
+ property: string
+ itemIndex: number
+}
+
+export class ValueScopeName extends Name {
+ readonly prefix: string
+ value?: NameValue
+ scopePath?: Code
+
+ constructor(prefix: string, nameStr: string) {
+ super(nameStr)
+ this.prefix = prefix
+ }
+
+ setValue(value: NameValue, {property, itemIndex}: ScopePath): void {
+ this.value = value
+ this.scopePath = _`.${new Name(property)}[${itemIndex}]`
+ }
+}
+
+interface VSOptions extends ValueScopeOptions {
+ _n: Code
+}
+
+const line = _`\n`
+
+export class ValueScope extends Scope {
+ protected readonly _values: ScopeValues = {}
+ protected readonly _scope: ScopeStore
+ readonly opts: VSOptions
+
+ constructor(opts: ValueScopeOptions) {
+ super(opts)
+ this._scope = opts.scope
+ this.opts = {...opts, _n: opts.lines ? line : nil}
+ }
+
+ get(): ScopeStore {
+ return this._scope
+ }
+
+ name(prefix: string): ValueScopeName {
+ return new ValueScopeName(prefix, this._newName(prefix))
+ }
+
+ value(nameOrPrefix: ValueScopeName | string, value: NameValue): ValueScopeName {
+ if (value.ref === undefined) throw new Error("CodeGen: ref must be passed in value")
+ const name = this.toName(nameOrPrefix) as ValueScopeName
+ const {prefix} = name
+ const valueKey = value.key ?? value.ref
+ let vs = this._values[prefix]
+ if (vs) {
+ const _name = vs.get(valueKey)
+ if (_name) return _name
+ } else {
+ vs = this._values[prefix] = new Map()
+ }
+ vs.set(valueKey, name)
+
+ const s = this._scope[prefix] || (this._scope[prefix] = [])
+ const itemIndex = s.length
+ s[itemIndex] = value.ref
+ name.setValue(value, {property: prefix, itemIndex})
+ return name
+ }
+
+ getValue(prefix: string, keyOrRef: unknown): ValueScopeName | undefined {
+ const vs = this._values[prefix]
+ if (!vs) return
+ return vs.get(keyOrRef)
+ }
+
+ scopeRefs(scopeName: Name, values: ScopeValues | ScopeValueSets = this._values): Code {
+ return this._reduceValues(values, (name: ValueScopeName) => {
+ if (name.scopePath === undefined) throw new Error(`CodeGen: name "${name}" has no value`)
+ return _`${scopeName}${name.scopePath}`
+ })
+ }
+
+ scopeCode(
+ values: ScopeValues | ScopeValueSets = this._values,
+ usedValues?: UsedScopeValues,
+ getCode?: (n: ValueScopeName) => Code | undefined
+ ): Code {
+ return this._reduceValues(
+ values,
+ (name: ValueScopeName) => {
+ if (name.value === undefined) throw new Error(`CodeGen: name "${name}" has no value`)
+ return name.value.code
+ },
+ usedValues,
+ getCode
+ )
+ }
+
+ private _reduceValues(
+ values: ScopeValues | ScopeValueSets,
+ valueCode: (n: ValueScopeName) => Code | undefined,
+ usedValues: UsedScopeValues = {},
+ getCode?: (n: ValueScopeName) => Code | undefined
+ ): Code {
+ let code: Code = nil
+ for (const prefix in values) {
+ const vs = values[prefix]
+ if (!vs) continue
+ const nameSet = (usedValues[prefix] = usedValues[prefix] || new Map())
+ vs.forEach((name: ValueScopeName) => {
+ if (nameSet.has(name)) return
+ nameSet.set(name, UsedValueState.Started)
+ let c = valueCode(name)
+ if (c) {
+ const def = this.opts.es5 ? varKinds.var : varKinds.const
+ code = _`${code}${def} ${name} = ${c};${this.opts._n}`
+ } else if ((c = getCode?.(name))) {
+ code = _`${code}${c}${this.opts._n}`
+ } else {
+ throw new ValueError(name)
+ }
+ nameSet.set(name, UsedValueState.Completed)
+ })
+ }
+ return code
+ }
+}
diff --git a/node_modules/ajv/lib/compile/errors.ts b/node_modules/ajv/lib/compile/errors.ts
new file mode 100644
index 0000000000000000000000000000000000000000..18424a0fc62917fa720aee28e97280865f8bf1f5
--- /dev/null
+++ b/node_modules/ajv/lib/compile/errors.ts
@@ -0,0 +1,184 @@
+import type {KeywordErrorCxt, KeywordErrorDefinition} from "../types"
+import type {SchemaCxt} from "./index"
+import {CodeGen, _, str, strConcat, Code, Name} from "./codegen"
+import {SafeExpr} from "./codegen/code"
+import {getErrorPath, Type} from "./util"
+import N from "./names"
+
+export const keywordError: KeywordErrorDefinition = {
+ message: ({keyword}) => str`must pass "${keyword}" keyword validation`,
+}
+
+export const keyword$DataError: KeywordErrorDefinition = {
+ message: ({keyword, schemaType}) =>
+ schemaType
+ ? str`"${keyword}" keyword must be ${schemaType} ($data)`
+ : str`"${keyword}" keyword is invalid ($data)`,
+}
+
+export interface ErrorPaths {
+ instancePath?: Code
+ schemaPath?: string
+ parentSchema?: boolean
+}
+
+export function reportError(
+ cxt: KeywordErrorCxt,
+ error: KeywordErrorDefinition = keywordError,
+ errorPaths?: ErrorPaths,
+ overrideAllErrors?: boolean
+): void {
+ const {it} = cxt
+ const {gen, compositeRule, allErrors} = it
+ const errObj = errorObjectCode(cxt, error, errorPaths)
+ if (overrideAllErrors ?? (compositeRule || allErrors)) {
+ addError(gen, errObj)
+ } else {
+ returnErrors(it, _`[${errObj}]`)
+ }
+}
+
+export function reportExtraError(
+ cxt: KeywordErrorCxt,
+ error: KeywordErrorDefinition = keywordError,
+ errorPaths?: ErrorPaths
+): void {
+ const {it} = cxt
+ const {gen, compositeRule, allErrors} = it
+ const errObj = errorObjectCode(cxt, error, errorPaths)
+ addError(gen, errObj)
+ if (!(compositeRule || allErrors)) {
+ returnErrors(it, N.vErrors)
+ }
+}
+
+export function resetErrorsCount(gen: CodeGen, errsCount: Name): void {
+ gen.assign(N.errors, errsCount)
+ gen.if(_`${N.vErrors} !== null`, () =>
+ gen.if(
+ errsCount,
+ () => gen.assign(_`${N.vErrors}.length`, errsCount),
+ () => gen.assign(N.vErrors, null)
+ )
+ )
+}
+
+export function extendErrors({
+ gen,
+ keyword,
+ schemaValue,
+ data,
+ errsCount,
+ it,
+}: KeywordErrorCxt): void {
+ /* istanbul ignore if */
+ if (errsCount === undefined) throw new Error("ajv implementation error")
+ const err = gen.name("err")
+ gen.forRange("i", errsCount, N.errors, (i) => {
+ gen.const(err, _`${N.vErrors}[${i}]`)
+ gen.if(_`${err}.instancePath === undefined`, () =>
+ gen.assign(_`${err}.instancePath`, strConcat(N.instancePath, it.errorPath))
+ )
+ gen.assign(_`${err}.schemaPath`, str`${it.errSchemaPath}/${keyword}`)
+ if (it.opts.verbose) {
+ gen.assign(_`${err}.schema`, schemaValue)
+ gen.assign(_`${err}.data`, data)
+ }
+ })
+}
+
+function addError(gen: CodeGen, errObj: Code): void {
+ const err = gen.const("err", errObj)
+ gen.if(
+ _`${N.vErrors} === null`,
+ () => gen.assign(N.vErrors, _`[${err}]`),
+ _`${N.vErrors}.push(${err})`
+ )
+ gen.code(_`${N.errors}++`)
+}
+
+function returnErrors(it: SchemaCxt, errs: Code): void {
+ const {gen, validateName, schemaEnv} = it
+ if (schemaEnv.$async) {
+ gen.throw(_`new ${it.ValidationError as Name}(${errs})`)
+ } else {
+ gen.assign(_`${validateName}.errors`, errs)
+ gen.return(false)
+ }
+}
+
+const E = {
+ keyword: new Name("keyword"),
+ schemaPath: new Name("schemaPath"), // also used in JTD errors
+ params: new Name("params"),
+ propertyName: new Name("propertyName"),
+ message: new Name("message"),
+ schema: new Name("schema"),
+ parentSchema: new Name("parentSchema"),
+}
+
+function errorObjectCode(
+ cxt: KeywordErrorCxt,
+ error: KeywordErrorDefinition,
+ errorPaths?: ErrorPaths
+): Code {
+ const {createErrors} = cxt.it
+ if (createErrors === false) return _`{}`
+ return errorObject(cxt, error, errorPaths)
+}
+
+function errorObject(
+ cxt: KeywordErrorCxt,
+ error: KeywordErrorDefinition,
+ errorPaths: ErrorPaths = {}
+): Code {
+ const {gen, it} = cxt
+ const keyValues: [Name, SafeExpr | string][] = [
+ errorInstancePath(it, errorPaths),
+ errorSchemaPath(cxt, errorPaths),
+ ]
+ extraErrorProps(cxt, error, keyValues)
+ return gen.object(...keyValues)
+}
+
+function errorInstancePath({errorPath}: SchemaCxt, {instancePath}: ErrorPaths): [Name, Code] {
+ const instPath = instancePath
+ ? str`${errorPath}${getErrorPath(instancePath, Type.Str)}`
+ : errorPath
+ return [N.instancePath, strConcat(N.instancePath, instPath)]
+}
+
+function errorSchemaPath(
+ {keyword, it: {errSchemaPath}}: KeywordErrorCxt,
+ {schemaPath, parentSchema}: ErrorPaths
+): [Name, string | Code] {
+ let schPath = parentSchema ? errSchemaPath : str`${errSchemaPath}/${keyword}`
+ if (schemaPath) {
+ schPath = str`${schPath}${getErrorPath(schemaPath, Type.Str)}`
+ }
+ return [E.schemaPath, schPath]
+}
+
+function extraErrorProps(
+ cxt: KeywordErrorCxt,
+ {params, message}: KeywordErrorDefinition,
+ keyValues: [Name, SafeExpr | string][]
+): void {
+ const {keyword, data, schemaValue, it} = cxt
+ const {opts, propertyName, topSchemaRef, schemaPath} = it
+ keyValues.push(
+ [E.keyword, keyword],
+ [E.params, typeof params == "function" ? params(cxt) : params || _`{}`]
+ )
+ if (opts.messages) {
+ keyValues.push([E.message, typeof message == "function" ? message(cxt) : message])
+ }
+ if (opts.verbose) {
+ keyValues.push(
+ [E.schema, schemaValue],
+ [E.parentSchema, _`${topSchemaRef}${schemaPath}`],
+ [N.data, data]
+ )
+ }
+ if (propertyName) keyValues.push([E.propertyName, propertyName])
+}
diff --git a/node_modules/ajv/lib/compile/index.ts b/node_modules/ajv/lib/compile/index.ts
new file mode 100644
index 0000000000000000000000000000000000000000..bfc39345526afe62f8c1d52eabf5b25b7959537f
--- /dev/null
+++ b/node_modules/ajv/lib/compile/index.ts
@@ -0,0 +1,324 @@
+import type {
+ AnySchema,
+ AnySchemaObject,
+ AnyValidateFunction,
+ AsyncValidateFunction,
+ EvaluatedProperties,
+ EvaluatedItems,
+} from "../types"
+import type Ajv from "../core"
+import type {InstanceOptions} from "../core"
+import {CodeGen, _, nil, stringify, Name, Code, ValueScopeName} from "./codegen"
+import ValidationError from "../runtime/validation_error"
+import N from "./names"
+import {LocalRefs, getFullPath, _getFullPath, inlineRef, normalizeId, resolveUrl} from "./resolve"
+import {schemaHasRulesButRef, unescapeFragment} from "./util"
+import {validateFunctionCode} from "./validate"
+import {URIComponent} from "fast-uri"
+import {JSONType} from "./rules"
+
+export type SchemaRefs = {
+ [Ref in string]?: SchemaEnv | AnySchema
+}
+
+export interface SchemaCxt {
+ readonly gen: CodeGen
+ readonly allErrors?: boolean // validation mode - whether to collect all errors or break on error
+ readonly data: Name // Name with reference to the current part of data instance
+ readonly parentData: Name // should be used in keywords modifying data
+ readonly parentDataProperty: Code | number // should be used in keywords modifying data
+ readonly dataNames: Name[]
+ readonly dataPathArr: (Code | number)[]
+ readonly dataLevel: number // the level of the currently validated data,
+ // it can be used to access both the property names and the data on all levels from the top.
+ dataTypes: JSONType[] // data types applied to the current part of data instance
+ definedProperties: Set // set of properties to keep track of for required checks
+ readonly topSchemaRef: Code
+ readonly validateName: Name
+ evaluated?: Name
+ readonly ValidationError?: Name
+ readonly schema: AnySchema // current schema object - equal to parentSchema passed via KeywordCxt
+ readonly schemaEnv: SchemaEnv
+ readonly rootId: string
+ baseId: string // the current schema base URI that should be used as the base for resolving URIs in references (\$ref)
+ readonly schemaPath: Code // the run-time expression that evaluates to the property name of the current schema
+ readonly errSchemaPath: string // this is actual string, should not be changed to Code
+ readonly errorPath: Code
+ readonly propertyName?: Name
+ readonly compositeRule?: boolean // true indicates that the current schema is inside the compound keyword,
+ // where failing some rule doesn't mean validation failure (`anyOf`, `oneOf`, `not`, `if`).
+ // This flag is used to determine whether you can return validation result immediately after any error in case the option `allErrors` is not `true.
+ // You only need to use it if you have many steps in your keywords and potentially can define multiple errors.
+ props?: EvaluatedProperties | Name // properties evaluated by this schema - used by parent schema or assigned to validation function
+ items?: EvaluatedItems | Name // last item evaluated by this schema - used by parent schema or assigned to validation function
+ jtdDiscriminator?: string
+ jtdMetadata?: boolean
+ readonly createErrors?: boolean
+ readonly opts: InstanceOptions // Ajv instance option.
+ readonly self: Ajv // current Ajv instance
+}
+
+export interface SchemaObjCxt extends SchemaCxt {
+ readonly schema: AnySchemaObject
+}
+interface SchemaEnvArgs {
+ readonly schema: AnySchema
+ readonly schemaId?: "$id" | "id"
+ readonly root?: SchemaEnv
+ readonly baseId?: string
+ readonly schemaPath?: string
+ readonly localRefs?: LocalRefs
+ readonly meta?: boolean
+}
+
+export class SchemaEnv implements SchemaEnvArgs {
+ readonly schema: AnySchema
+ readonly schemaId?: "$id" | "id"
+ readonly root: SchemaEnv
+ baseId: string // TODO possibly, it should be readonly
+ schemaPath?: string
+ localRefs?: LocalRefs
+ readonly meta?: boolean
+ readonly $async?: boolean // true if the current schema is asynchronous.
+ readonly refs: SchemaRefs = {}
+ readonly dynamicAnchors: {[Ref in string]?: true} = {}
+ validate?: AnyValidateFunction
+ validateName?: ValueScopeName
+ serialize?: (data: unknown) => string
+ serializeName?: ValueScopeName
+ parse?: (data: string) => unknown
+ parseName?: ValueScopeName
+
+ constructor(env: SchemaEnvArgs) {
+ let schema: AnySchemaObject | undefined
+ if (typeof env.schema == "object") schema = env.schema
+ this.schema = env.schema
+ this.schemaId = env.schemaId
+ this.root = env.root || this
+ this.baseId = env.baseId ?? normalizeId(schema?.[env.schemaId || "$id"])
+ this.schemaPath = env.schemaPath
+ this.localRefs = env.localRefs
+ this.meta = env.meta
+ this.$async = schema?.$async
+ this.refs = {}
+ }
+}
+
+// let codeSize = 0
+// let nodeCount = 0
+
+// Compiles schema in SchemaEnv
+export function compileSchema(this: Ajv, sch: SchemaEnv): SchemaEnv {
+ // TODO refactor - remove compilations
+ const _sch = getCompilingSchema.call(this, sch)
+ if (_sch) return _sch
+ const rootId = getFullPath(this.opts.uriResolver, sch.root.baseId) // TODO if getFullPath removed 1 tests fails
+ const {es5, lines} = this.opts.code
+ const {ownProperties} = this.opts
+ const gen = new CodeGen(this.scope, {es5, lines, ownProperties})
+ let _ValidationError
+ if (sch.$async) {
+ _ValidationError = gen.scopeValue("Error", {
+ ref: ValidationError,
+ code: _`require("ajv/dist/runtime/validation_error").default`,
+ })
+ }
+
+ const validateName = gen.scopeName("validate")
+ sch.validateName = validateName
+
+ const schemaCxt: SchemaCxt = {
+ gen,
+ allErrors: this.opts.allErrors,
+ data: N.data,
+ parentData: N.parentData,
+ parentDataProperty: N.parentDataProperty,
+ dataNames: [N.data],
+ dataPathArr: [nil], // TODO can its length be used as dataLevel if nil is removed?
+ dataLevel: 0,
+ dataTypes: [],
+ definedProperties: new Set(),
+ topSchemaRef: gen.scopeValue(
+ "schema",
+ this.opts.code.source === true
+ ? {ref: sch.schema, code: stringify(sch.schema)}
+ : {ref: sch.schema}
+ ),
+ validateName,
+ ValidationError: _ValidationError,
+ schema: sch.schema,
+ schemaEnv: sch,
+ rootId,
+ baseId: sch.baseId || rootId,
+ schemaPath: nil,
+ errSchemaPath: sch.schemaPath || (this.opts.jtd ? "" : "#"),
+ errorPath: _`""`,
+ opts: this.opts,
+ self: this,
+ }
+
+ let sourceCode: string | undefined
+ try {
+ this._compilations.add(sch)
+ validateFunctionCode(schemaCxt)
+ gen.optimize(this.opts.code.optimize)
+ // gen.optimize(1)
+ const validateCode = gen.toString()
+ sourceCode = `${gen.scopeRefs(N.scope)}return ${validateCode}`
+ // console.log((codeSize += sourceCode.length), (nodeCount += gen.nodeCount))
+ if (this.opts.code.process) sourceCode = this.opts.code.process(sourceCode, sch)
+ // console.log("\n\n\n *** \n", sourceCode)
+ const makeValidate = new Function(`${N.self}`, `${N.scope}`, sourceCode)
+ const validate: AnyValidateFunction = makeValidate(this, this.scope.get())
+ this.scope.value(validateName, {ref: validate})
+
+ validate.errors = null
+ validate.schema = sch.schema
+ validate.schemaEnv = sch
+ if (sch.$async) (validate as AsyncValidateFunction).$async = true
+ if (this.opts.code.source === true) {
+ validate.source = {validateName, validateCode, scopeValues: gen._values}
+ }
+ if (this.opts.unevaluated) {
+ const {props, items} = schemaCxt
+ validate.evaluated = {
+ props: props instanceof Name ? undefined : props,
+ items: items instanceof Name ? undefined : items,
+ dynamicProps: props instanceof Name,
+ dynamicItems: items instanceof Name,
+ }
+ if (validate.source) validate.source.evaluated = stringify(validate.evaluated)
+ }
+ sch.validate = validate
+ return sch
+ } catch (e) {
+ delete sch.validate
+ delete sch.validateName
+ if (sourceCode) this.logger.error("Error compiling schema, function code:", sourceCode)
+ // console.log("\n\n\n *** \n", sourceCode, this.opts)
+ throw e
+ } finally {
+ this._compilations.delete(sch)
+ }
+}
+
+export function resolveRef(
+ this: Ajv,
+ root: SchemaEnv,
+ baseId: string,
+ ref: string
+): AnySchema | SchemaEnv | undefined {
+ ref = resolveUrl(this.opts.uriResolver, baseId, ref)
+ const schOrFunc = root.refs[ref]
+ if (schOrFunc) return schOrFunc
+
+ let _sch = resolve.call(this, root, ref)
+ if (_sch === undefined) {
+ const schema = root.localRefs?.[ref] // TODO maybe localRefs should hold SchemaEnv
+ const {schemaId} = this.opts
+ if (schema) _sch = new SchemaEnv({schema, schemaId, root, baseId})
+ }
+
+ if (_sch === undefined) return
+ return (root.refs[ref] = inlineOrCompile.call(this, _sch))
+}
+
+function inlineOrCompile(this: Ajv, sch: SchemaEnv): AnySchema | SchemaEnv {
+ if (inlineRef(sch.schema, this.opts.inlineRefs)) return sch.schema
+ return sch.validate ? sch : compileSchema.call(this, sch)
+}
+
+// Index of schema compilation in the currently compiled list
+export function getCompilingSchema(this: Ajv, schEnv: SchemaEnv): SchemaEnv | void {
+ for (const sch of this._compilations) {
+ if (sameSchemaEnv(sch, schEnv)) return sch
+ }
+}
+
+function sameSchemaEnv(s1: SchemaEnv, s2: SchemaEnv): boolean {
+ return s1.schema === s2.schema && s1.root === s2.root && s1.baseId === s2.baseId
+}
+
+// resolve and compile the references ($ref)
+// TODO returns AnySchemaObject (if the schema can be inlined) or validation function
+function resolve(
+ this: Ajv,
+ root: SchemaEnv, // information about the root schema for the current schema
+ ref: string // reference to resolve
+): SchemaEnv | undefined {
+ let sch
+ while (typeof (sch = this.refs[ref]) == "string") ref = sch
+ return sch || this.schemas[ref] || resolveSchema.call(this, root, ref)
+}
+
+// Resolve schema, its root and baseId
+export function resolveSchema(
+ this: Ajv,
+ root: SchemaEnv, // root object with properties schema, refs TODO below SchemaEnv is assigned to it
+ ref: string // reference to resolve
+): SchemaEnv | undefined {
+ const p = this.opts.uriResolver.parse(ref)
+ const refPath = _getFullPath(this.opts.uriResolver, p)
+ let baseId = getFullPath(this.opts.uriResolver, root.baseId, undefined)
+ // TODO `Object.keys(root.schema).length > 0` should not be needed - but removing breaks 2 tests
+ if (Object.keys(root.schema).length > 0 && refPath === baseId) {
+ return getJsonPointer.call(this, p, root)
+ }
+
+ const id = normalizeId(refPath)
+ const schOrRef = this.refs[id] || this.schemas[id]
+ if (typeof schOrRef == "string") {
+ const sch = resolveSchema.call(this, root, schOrRef)
+ if (typeof sch?.schema !== "object") return
+ return getJsonPointer.call(this, p, sch)
+ }
+
+ if (typeof schOrRef?.schema !== "object") return
+ if (!schOrRef.validate) compileSchema.call(this, schOrRef)
+ if (id === normalizeId(ref)) {
+ const {schema} = schOrRef
+ const {schemaId} = this.opts
+ const schId = schema[schemaId]
+ if (schId) baseId = resolveUrl(this.opts.uriResolver, baseId, schId)
+ return new SchemaEnv({schema, schemaId, root, baseId})
+ }
+ return getJsonPointer.call(this, p, schOrRef)
+}
+
+const PREVENT_SCOPE_CHANGE = new Set([
+ "properties",
+ "patternProperties",
+ "enum",
+ "dependencies",
+ "definitions",
+])
+
+function getJsonPointer(
+ this: Ajv,
+ parsedRef: URIComponent,
+ {baseId, schema, root}: SchemaEnv
+): SchemaEnv | undefined {
+ if (parsedRef.fragment?.[0] !== "/") return
+ for (const part of parsedRef.fragment.slice(1).split("/")) {
+ if (typeof schema === "boolean") return
+ const partSchema = schema[unescapeFragment(part)]
+ if (partSchema === undefined) return
+ schema = partSchema
+ // TODO PREVENT_SCOPE_CHANGE could be defined in keyword def?
+ const schId = typeof schema === "object" && schema[this.opts.schemaId]
+ if (!PREVENT_SCOPE_CHANGE.has(part) && schId) {
+ baseId = resolveUrl(this.opts.uriResolver, baseId, schId)
+ }
+ }
+ let env: SchemaEnv | undefined
+ if (typeof schema != "boolean" && schema.$ref && !schemaHasRulesButRef(schema, this.RULES)) {
+ const $ref = resolveUrl(this.opts.uriResolver, baseId, schema.$ref)
+ env = resolveSchema.call(this, root, $ref)
+ }
+ // even though resolution failed we need to return SchemaEnv to throw exception
+ // so that compileAsync loads missing schema.
+ const {schemaId} = this.opts
+ env = env || new SchemaEnv({schema, schemaId, root, baseId})
+ if (env.schema !== env.root.schema) return env
+ return undefined
+}
diff --git a/node_modules/ajv/lib/compile/jtd/parse.ts b/node_modules/ajv/lib/compile/jtd/parse.ts
new file mode 100644
index 0000000000000000000000000000000000000000..a0141c770c7029ce1d41db61bcd9a19fbd0c08d5
--- /dev/null
+++ b/node_modules/ajv/lib/compile/jtd/parse.ts
@@ -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)
+}
diff --git a/node_modules/ajv/lib/compile/jtd/serialize.ts b/node_modules/ajv/lib/compile/jtd/serialize.ts
new file mode 100644
index 0000000000000000000000000000000000000000..42a47cffc1d2e1461212f9feeee08fbde02c0c2a
--- /dev/null
+++ b/node_modules/ajv/lib/compile/jtd/serialize.ts
@@ -0,0 +1,277 @@
+import type Ajv from "../../core"
+import type {SchemaObject} from "../../types"
+import {jtdForms, JTDForm, SchemaObjectMap} from "./types"
+import {SchemaEnv, getCompilingSchema} from ".."
+import {_, str, and, getProperty, CodeGen, Code, Name} from "../codegen"
+import MissingRefError from "../ref_error"
+import N from "../names"
+import {isOwnProperty} from "../../vocabularies/code"
+import {hasRef} from "../../vocabularies/jtd/ref"
+import {useFunc} from "../util"
+import quote from "../../runtime/quote"
+
+const genSerialize: {[F in JTDForm]: (cxt: SerializeCxt) => void} = {
+ elements: serializeElements,
+ values: serializeValues,
+ discriminator: serializeDiscriminator,
+ properties: serializeProperties,
+ optionalProperties: serializeProperties,
+ enum: serializeString,
+ type: serializeType,
+ ref: serializeRef,
+}
+
+interface SerializeCxt {
+ readonly gen: CodeGen
+ readonly self: Ajv // current Ajv instance
+ readonly schemaEnv: SchemaEnv
+ readonly definitions: SchemaObjectMap
+ schema: SchemaObject
+ data: Code
+}
+
+export default function compileSerializer(
+ 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 serializeName = gen.scopeName("serialize")
+ const cxt: SerializeCxt = {
+ self: this,
+ gen,
+ schema: sch.schema as SchemaObject,
+ schemaEnv: sch,
+ definitions,
+ data: N.data,
+ }
+
+ let sourceCode: string | undefined
+ try {
+ this._compilations.add(sch)
+ sch.serializeName = serializeName
+ gen.func(serializeName, N.data, false, () => {
+ gen.let(N.json, str``)
+ serializeCode(cxt)
+ gen.return(N.json)
+ })
+ gen.optimize(this.opts.code.optimize)
+ const serializeFuncCode = gen.toString()
+ sourceCode = `${gen.scopeRefs(N.scope)}return ${serializeFuncCode}`
+ const makeSerialize = new Function(`${N.scope}`, sourceCode)
+ const serialize: (data: unknown) => string = makeSerialize(this.scope.get())
+ this.scope.value(serializeName, {ref: serialize})
+ sch.serialize = serialize
+ } catch (e) {
+ if (sourceCode) this.logger.error("Error compiling serializer, function code:", sourceCode)
+ delete sch.serialize
+ delete sch.serializeName
+ throw e
+ } finally {
+ this._compilations.delete(sch)
+ }
+ return sch
+}
+
+function serializeCode(cxt: SerializeCxt): void {
+ let form: JTDForm | undefined
+ for (const key of jtdForms) {
+ if (key in cxt.schema) {
+ form = key
+ break
+ }
+ }
+ serializeNullable(cxt, form ? genSerialize[form] : serializeEmpty)
+}
+
+function serializeNullable(cxt: SerializeCxt, serializeForm: (_cxt: SerializeCxt) => void): void {
+ const {gen, schema, data} = cxt
+ if (!schema.nullable) return serializeForm(cxt)
+ gen.if(
+ _`${data} === undefined || ${data} === null`,
+ () => gen.add(N.json, _`"null"`),
+ () => serializeForm(cxt)
+ )
+}
+
+function serializeElements(cxt: SerializeCxt): void {
+ const {gen, schema, data} = cxt
+ gen.add(N.json, str`[`)
+ const first = gen.let("first", true)
+ gen.forOf("el", data, (el) => {
+ addComma(cxt, first)
+ serializeCode({...cxt, schema: schema.elements, data: el})
+ })
+ gen.add(N.json, str`]`)
+}
+
+function serializeValues(cxt: SerializeCxt): void {
+ const {gen, schema, data} = cxt
+ gen.add(N.json, str`{`)
+ const first = gen.let("first", true)
+ gen.forIn("key", data, (key) => serializeKeyValue(cxt, key, schema.values, first))
+ gen.add(N.json, str`}`)
+}
+
+function serializeKeyValue(cxt: SerializeCxt, key: Name, schema: SchemaObject, first?: Name): void {
+ const {gen, data} = cxt
+ addComma(cxt, first)
+ serializeString({...cxt, data: key})
+ gen.add(N.json, str`:`)
+ const value = gen.const("value", _`${data}${getProperty(key)}`)
+ serializeCode({...cxt, schema, data: value})
+}
+
+function serializeDiscriminator(cxt: SerializeCxt): void {
+ const {gen, schema, data} = cxt
+ const {discriminator} = schema
+ gen.add(N.json, str`{${JSON.stringify(discriminator)}:`)
+ const tag = gen.const("tag", _`${data}${getProperty(discriminator)}`)
+ serializeString({...cxt, data: tag})
+ gen.if(false)
+ for (const tagValue in schema.mapping) {
+ gen.elseIf(_`${tag} === ${tagValue}`)
+ const sch = schema.mapping[tagValue]
+ serializeSchemaProperties({...cxt, schema: sch}, discriminator)
+ }
+ gen.endIf()
+ gen.add(N.json, str`}`)
+}
+
+function serializeProperties(cxt: SerializeCxt): void {
+ const {gen} = cxt
+ gen.add(N.json, str`{`)
+ serializeSchemaProperties(cxt)
+ gen.add(N.json, str`}`)
+}
+
+function serializeSchemaProperties(cxt: SerializeCxt, discriminator?: string): void {
+ const {gen, schema, data} = cxt
+ const {properties, optionalProperties} = schema
+ const props = keys(properties)
+ const optProps = keys(optionalProperties)
+ const allProps = allProperties(props.concat(optProps))
+ let first = !discriminator
+ let firstProp: Name | undefined
+
+ for (const key of props) {
+ if (first) first = false
+ else gen.add(N.json, str`,`)
+ serializeProperty(key, properties[key], keyValue(key))
+ }
+ if (first) firstProp = gen.let("first", true)
+ for (const key of optProps) {
+ const value = keyValue(key)
+ gen.if(and(_`${value} !== undefined`, isOwnProperty(gen, data, key)), () => {
+ addComma(cxt, firstProp)
+ serializeProperty(key, optionalProperties[key], value)
+ })
+ }
+ if (schema.additionalProperties) {
+ gen.forIn("key", data, (key) =>
+ gen.if(isAdditional(key, allProps), () => serializeKeyValue(cxt, key, {}, firstProp))
+ )
+ }
+
+ function keys(ps?: SchemaObjectMap): string[] {
+ return ps ? Object.keys(ps) : []
+ }
+
+ function allProperties(ps: string[]): string[] {
+ if (discriminator) ps.push(discriminator)
+ if (new Set(ps).size !== ps.length) {
+ throw new Error("JTD: properties/optionalProperties/disciminator overlap")
+ }
+ return ps
+ }
+
+ function keyValue(key: string): Name {
+ return gen.const("value", _`${data}${getProperty(key)}`)
+ }
+
+ function serializeProperty(key: string, propSchema: SchemaObject, value: Name): void {
+ gen.add(N.json, str`${JSON.stringify(key)}:`)
+ serializeCode({...cxt, schema: propSchema, data: value})
+ }
+
+ function isAdditional(key: Name, ps: string[]): Code | true {
+ return ps.length ? and(...ps.map((p) => _`${key} !== ${p}`)) : true
+ }
+}
+
+function serializeType(cxt: SerializeCxt): void {
+ const {gen, schema, data} = cxt
+ switch (schema.type) {
+ case "boolean":
+ gen.add(N.json, _`${data} ? "true" : "false"`)
+ break
+ case "string":
+ serializeString(cxt)
+ break
+ case "timestamp":
+ gen.if(
+ _`${data} instanceof Date`,
+ () => gen.add(N.json, _`'"' + ${data}.toISOString() + '"'`),
+ () => serializeString(cxt)
+ )
+ break
+ default:
+ serializeNumber(cxt)
+ }
+}
+
+function serializeString({gen, data}: SerializeCxt): void {
+ gen.add(N.json, _`${useFunc(gen, quote)}(${data})`)
+}
+
+function serializeNumber({gen, data, self}: SerializeCxt): void {
+ const condition = _`${data} === Infinity || ${data} === -Infinity || ${data} !== ${data}`
+
+ if (self.opts.specialNumbers === undefined || self.opts.specialNumbers === "fast") {
+ gen.add(N.json, _`"" + ${data}`)
+ } else {
+ // specialNumbers === "null"
+ gen.if(
+ condition,
+ () => gen.add(N.json, _`null`),
+ () => gen.add(N.json, _`"" + ${data}`)
+ )
+ }
+}
+
+function serializeRef(cxt: SerializeCxt): void {
+ const {gen, self, data, 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 serializeCode({...cxt, schema: refSchema})
+ const {root} = schemaEnv
+ const sch = compileSerializer.call(self, new SchemaEnv({schema: refSchema, root}), definitions)
+ gen.add(N.json, _`${getSerialize(gen, sch)}(${data})`)
+}
+
+function getSerialize(gen: CodeGen, sch: SchemaEnv): Code {
+ return sch.serialize
+ ? gen.scopeValue("serialize", {ref: sch.serialize})
+ : _`${gen.scopeValue("wrapper", {ref: sch})}.serialize`
+}
+
+function serializeEmpty({gen, data}: SerializeCxt): void {
+ gen.add(N.json, _`JSON.stringify(${data})`)
+}
+
+function addComma({gen}: SerializeCxt, first?: Name): void {
+ if (first) {
+ gen.if(
+ first,
+ () => gen.assign(first, false),
+ () => gen.add(N.json, str`,`)
+ )
+ } else {
+ gen.add(N.json, str`,`)
+ }
+}
diff --git a/node_modules/ajv/lib/compile/jtd/types.ts b/node_modules/ajv/lib/compile/jtd/types.ts
new file mode 100644
index 0000000000000000000000000000000000000000..1258050fdf426a085097c3858c513b95447ded94
--- /dev/null
+++ b/node_modules/ajv/lib/compile/jtd/types.ts
@@ -0,0 +1,16 @@
+import type {SchemaObject} from "../../types"
+
+export type SchemaObjectMap = {[Ref in string]?: SchemaObject}
+
+export const jtdForms = [
+ "elements",
+ "values",
+ "discriminator",
+ "properties",
+ "optionalProperties",
+ "enum",
+ "type",
+ "ref",
+] as const
+
+export type JTDForm = (typeof jtdForms)[number]
diff --git a/node_modules/ajv/lib/compile/names.ts b/node_modules/ajv/lib/compile/names.ts
new file mode 100644
index 0000000000000000000000000000000000000000..b4b242e175f08c9705f80e0daaec11ab6662e06a
--- /dev/null
+++ b/node_modules/ajv/lib/compile/names.ts
@@ -0,0 +1,27 @@
+import {Name} from "./codegen"
+
+const names = {
+ // validation function arguments
+ data: new Name("data"), // data passed to validation function
+ // args passed from referencing schema
+ valCxt: new Name("valCxt"), // validation/data context - should not be used directly, it is destructured to the names below
+ instancePath: new Name("instancePath"),
+ parentData: new Name("parentData"),
+ parentDataProperty: new Name("parentDataProperty"),
+ rootData: new Name("rootData"), // root data - same as the data passed to the first/top validation function
+ dynamicAnchors: new Name("dynamicAnchors"), // used to support recursiveRef and dynamicRef
+ // function scoped variables
+ vErrors: new Name("vErrors"), // null or array of validation errors
+ errors: new Name("errors"), // counter of validation errors
+ this: new Name("this"),
+ // "globals"
+ self: new Name("self"),
+ scope: new Name("scope"),
+ // JTD serialize/parse name for JSON string and position
+ json: new Name("json"),
+ jsonPos: new Name("jsonPos"),
+ jsonLen: new Name("jsonLen"),
+ jsonPart: new Name("jsonPart"),
+}
+
+export default names
diff --git a/node_modules/ajv/lib/compile/ref_error.ts b/node_modules/ajv/lib/compile/ref_error.ts
new file mode 100644
index 0000000000000000000000000000000000000000..386bf04995827ca2e6653fee7d4095049a753955
--- /dev/null
+++ b/node_modules/ajv/lib/compile/ref_error.ts
@@ -0,0 +1,13 @@
+import {resolveUrl, normalizeId, getFullPath} from "./resolve"
+import type {UriResolver} from "../types"
+
+export default class MissingRefError extends Error {
+ readonly missingRef: string
+ readonly missingSchema: string
+
+ constructor(resolver: UriResolver, baseId: string, ref: string, msg?: string) {
+ super(msg || `can't resolve reference ${ref} from id ${baseId}`)
+ this.missingRef = resolveUrl(resolver, baseId, ref)
+ this.missingSchema = normalizeId(getFullPath(resolver, this.missingRef))
+ }
+}
diff --git a/node_modules/ajv/lib/compile/resolve.ts b/node_modules/ajv/lib/compile/resolve.ts
new file mode 100644
index 0000000000000000000000000000000000000000..b8c4aca394a7a3f46f7977c2e66a7ab570213e80
--- /dev/null
+++ b/node_modules/ajv/lib/compile/resolve.ts
@@ -0,0 +1,149 @@
+import type {AnySchema, AnySchemaObject, UriResolver} from "../types"
+import type Ajv from "../ajv"
+import type {URIComponent} from "fast-uri"
+import {eachItem} from "./util"
+import * as equal from "fast-deep-equal"
+import * as traverse from "json-schema-traverse"
+
+// the hash of local references inside the schema (created by getSchemaRefs), used for inline resolution
+export type LocalRefs = {[Ref in string]?: AnySchemaObject}
+
+// TODO refactor to use keyword definitions
+const SIMPLE_INLINED = new Set([
+ "type",
+ "format",
+ "pattern",
+ "maxLength",
+ "minLength",
+ "maxProperties",
+ "minProperties",
+ "maxItems",
+ "minItems",
+ "maximum",
+ "minimum",
+ "uniqueItems",
+ "multipleOf",
+ "required",
+ "enum",
+ "const",
+])
+
+export function inlineRef(schema: AnySchema, limit: boolean | number = true): boolean {
+ if (typeof schema == "boolean") return true
+ if (limit === true) return !hasRef(schema)
+ if (!limit) return false
+ return countKeys(schema) <= limit
+}
+
+const REF_KEYWORDS = new Set([
+ "$ref",
+ "$recursiveRef",
+ "$recursiveAnchor",
+ "$dynamicRef",
+ "$dynamicAnchor",
+])
+
+function hasRef(schema: AnySchemaObject): boolean {
+ for (const key in schema) {
+ if (REF_KEYWORDS.has(key)) return true
+ const sch = schema[key]
+ if (Array.isArray(sch) && sch.some(hasRef)) return true
+ if (typeof sch == "object" && hasRef(sch)) return true
+ }
+ return false
+}
+
+function countKeys(schema: AnySchemaObject): number {
+ let count = 0
+ for (const key in schema) {
+ if (key === "$ref") return Infinity
+ count++
+ if (SIMPLE_INLINED.has(key)) continue
+ if (typeof schema[key] == "object") {
+ eachItem(schema[key], (sch) => (count += countKeys(sch)))
+ }
+ if (count === Infinity) return Infinity
+ }
+ return count
+}
+
+export function getFullPath(resolver: UriResolver, id = "", normalize?: boolean): string {
+ if (normalize !== false) id = normalizeId(id)
+ const p = resolver.parse(id)
+ return _getFullPath(resolver, p)
+}
+
+export function _getFullPath(resolver: UriResolver, p: URIComponent): string {
+ const serialized = resolver.serialize(p)
+ return serialized.split("#")[0] + "#"
+}
+
+const TRAILING_SLASH_HASH = /#\/?$/
+export function normalizeId(id: string | undefined): string {
+ return id ? id.replace(TRAILING_SLASH_HASH, "") : ""
+}
+
+export function resolveUrl(resolver: UriResolver, baseId: string, id: string): string {
+ id = normalizeId(id)
+ return resolver.resolve(baseId, id)
+}
+
+const ANCHOR = /^[a-z_][-a-z0-9._]*$/i
+
+export function getSchemaRefs(this: Ajv, schema: AnySchema, baseId: string): LocalRefs {
+ if (typeof schema == "boolean") return {}
+ const {schemaId, uriResolver} = this.opts
+ const schId = normalizeId(schema[schemaId] || baseId)
+ const baseIds: {[JsonPtr in string]?: string} = {"": schId}
+ const pathPrefix = getFullPath(uriResolver, schId, false)
+ const localRefs: LocalRefs = {}
+ const schemaRefs: Set = new Set()
+
+ traverse(schema, {allKeys: true}, (sch, jsonPtr, _, parentJsonPtr) => {
+ if (parentJsonPtr === undefined) return
+ const fullPath = pathPrefix + jsonPtr
+ let innerBaseId = baseIds[parentJsonPtr]
+ if (typeof sch[schemaId] == "string") innerBaseId = addRef.call(this, sch[schemaId])
+ addAnchor.call(this, sch.$anchor)
+ addAnchor.call(this, sch.$dynamicAnchor)
+ baseIds[jsonPtr] = innerBaseId
+
+ function addRef(this: Ajv, ref: string): string {
+ // eslint-disable-next-line @typescript-eslint/unbound-method
+ const _resolve = this.opts.uriResolver.resolve
+ ref = normalizeId(innerBaseId ? _resolve(innerBaseId, ref) : ref)
+ if (schemaRefs.has(ref)) throw ambiguos(ref)
+ schemaRefs.add(ref)
+ let schOrRef = this.refs[ref]
+ if (typeof schOrRef == "string") schOrRef = this.refs[schOrRef]
+ if (typeof schOrRef == "object") {
+ checkAmbiguosRef(sch, schOrRef.schema, ref)
+ } else if (ref !== normalizeId(fullPath)) {
+ if (ref[0] === "#") {
+ checkAmbiguosRef(sch, localRefs[ref], ref)
+ localRefs[ref] = sch
+ } else {
+ this.refs[ref] = fullPath
+ }
+ }
+ return ref
+ }
+
+ function addAnchor(this: Ajv, anchor: unknown): void {
+ if (typeof anchor == "string") {
+ if (!ANCHOR.test(anchor)) throw new Error(`invalid anchor "${anchor}"`)
+ addRef.call(this, `#${anchor}`)
+ }
+ }
+ })
+
+ return localRefs
+
+ function checkAmbiguosRef(sch1: AnySchema, sch2: AnySchema | undefined, ref: string): void {
+ if (sch2 !== undefined && !equal(sch1, sch2)) throw ambiguos(ref)
+ }
+
+ function ambiguos(ref: string): Error {
+ return new Error(`reference "${ref}" resolves to more than one schema`)
+ }
+}
diff --git a/node_modules/ajv/lib/compile/rules.ts b/node_modules/ajv/lib/compile/rules.ts
new file mode 100644
index 0000000000000000000000000000000000000000..7dbf7ab9e08317ff4e893317d07962bb6df43327
--- /dev/null
+++ b/node_modules/ajv/lib/compile/rules.ts
@@ -0,0 +1,50 @@
+import type {AddedKeywordDefinition} from "../types"
+
+const _jsonTypes = ["string", "number", "integer", "boolean", "null", "object", "array"] as const
+
+export type JSONType = (typeof _jsonTypes)[number]
+
+const jsonTypes: Set = new Set(_jsonTypes)
+
+export function isJSONType(x: unknown): x is JSONType {
+ return typeof x == "string" && jsonTypes.has(x)
+}
+
+type ValidationTypes = {
+ [K in JSONType]: boolean | RuleGroup | undefined
+}
+
+export interface ValidationRules {
+ rules: RuleGroup[]
+ post: RuleGroup
+ all: {[Key in string]?: boolean | Rule} // rules that have to be validated
+ keywords: {[Key in string]?: boolean} // all known keywords (superset of "all")
+ types: ValidationTypes
+}
+
+export interface RuleGroup {
+ type?: JSONType
+ rules: Rule[]
+}
+
+// This interface wraps KeywordDefinition because definition can have multiple keywords
+export interface Rule {
+ keyword: string
+ definition: AddedKeywordDefinition
+}
+
+export function getRules(): ValidationRules {
+ const groups: Record<"number" | "string" | "array" | "object", RuleGroup> = {
+ number: {type: "number", rules: []},
+ string: {type: "string", rules: []},
+ array: {type: "array", rules: []},
+ object: {type: "object", rules: []},
+ }
+ return {
+ types: {...groups, integer: true, boolean: true, null: true},
+ rules: [{rules: []}, groups.number, groups.string, groups.array, groups.object],
+ post: {rules: []},
+ all: {},
+ keywords: {},
+ }
+}
diff --git a/node_modules/ajv/lib/compile/util.ts b/node_modules/ajv/lib/compile/util.ts
new file mode 100644
index 0000000000000000000000000000000000000000..cefae51c2bfcc01fed2b40bcbe3425c9d1c53d18
--- /dev/null
+++ b/node_modules/ajv/lib/compile/util.ts
@@ -0,0 +1,213 @@
+import type {AnySchema, EvaluatedProperties, EvaluatedItems} from "../types"
+import type {SchemaCxt, SchemaObjCxt} from "."
+import {_, getProperty, Code, Name, CodeGen} from "./codegen"
+import {_Code} from "./codegen/code"
+import type {Rule, ValidationRules} from "./rules"
+
+// TODO refactor to use Set
+export function toHash(arr: T[]): {[K in T]?: true} {
+ const hash: {[K in T]?: true} = {}
+ for (const item of arr) hash[item] = true
+ return hash
+}
+
+export function alwaysValidSchema(it: SchemaCxt, schema: AnySchema): boolean | void {
+ if (typeof schema == "boolean") return schema
+ if (Object.keys(schema).length === 0) return true
+ checkUnknownRules(it, schema)
+ return !schemaHasRules(schema, it.self.RULES.all)
+}
+
+export function checkUnknownRules(it: SchemaCxt, schema: AnySchema = it.schema): void {
+ const {opts, self} = it
+ if (!opts.strictSchema) return
+ if (typeof schema === "boolean") return
+ const rules = self.RULES.keywords
+ for (const key in schema) {
+ if (!rules[key]) checkStrictMode(it, `unknown keyword: "${key}"`)
+ }
+}
+
+export function schemaHasRules(
+ schema: AnySchema,
+ rules: {[Key in string]?: boolean | Rule}
+): boolean {
+ if (typeof schema == "boolean") return !schema
+ for (const key in schema) if (rules[key]) return true
+ return false
+}
+
+export function schemaHasRulesButRef(schema: AnySchema, RULES: ValidationRules): boolean {
+ if (typeof schema == "boolean") return !schema
+ for (const key in schema) if (key !== "$ref" && RULES.all[key]) return true
+ return false
+}
+
+export function schemaRefOrVal(
+ {topSchemaRef, schemaPath}: SchemaObjCxt,
+ schema: unknown,
+ keyword: string,
+ $data?: string | false
+): Code | number | boolean {
+ if (!$data) {
+ if (typeof schema == "number" || typeof schema == "boolean") return schema
+ if (typeof schema == "string") return _`${schema}`
+ }
+ return _`${topSchemaRef}${schemaPath}${getProperty(keyword)}`
+}
+
+export function unescapeFragment(str: string): string {
+ return unescapeJsonPointer(decodeURIComponent(str))
+}
+
+export function escapeFragment(str: string | number): string {
+ return encodeURIComponent(escapeJsonPointer(str))
+}
+
+export function escapeJsonPointer(str: string | number): string {
+ if (typeof str == "number") return `${str}`
+ return str.replace(/~/g, "~0").replace(/\//g, "~1")
+}
+
+export function unescapeJsonPointer(str: string): string {
+ return str.replace(/~1/g, "/").replace(/~0/g, "~")
+}
+
+export function eachItem(xs: T | T[], f: (x: T) => void): void {
+ if (Array.isArray(xs)) {
+ for (const x of xs) f(x)
+ } else {
+ f(xs)
+ }
+}
+
+type SomeEvaluated = EvaluatedProperties | EvaluatedItems
+
+type MergeEvaluatedFunc = (
+ gen: CodeGen,
+ from: Name | T,
+ to: Name | Exclude | undefined,
+ toName?: typeof Name
+) => Name | T
+
+interface MakeMergeFuncArgs {
+ mergeNames: (gen: CodeGen, from: Name, to: Name) => void
+ mergeToName: (gen: CodeGen, from: T, to: Name) => void
+ mergeValues: (from: T, to: Exclude) => T
+ resultToName: (gen: CodeGen, res?: T) => Name
+}
+
+function makeMergeEvaluated({
+ mergeNames,
+ mergeToName,
+ mergeValues,
+ resultToName,
+}: MakeMergeFuncArgs): MergeEvaluatedFunc {
+ return (gen, from, to, toName) => {
+ const res =
+ to === undefined
+ ? from
+ : to instanceof Name
+ ? (from instanceof Name ? mergeNames(gen, from, to) : mergeToName(gen, from, to), to)
+ : from instanceof Name
+ ? (mergeToName(gen, to, from), from)
+ : mergeValues(from, to)
+ return toName === Name && !(res instanceof Name) ? resultToName(gen, res) : res
+ }
+}
+
+interface MergeEvaluated {
+ props: MergeEvaluatedFunc
+ items: MergeEvaluatedFunc
+}
+
+export const mergeEvaluated: MergeEvaluated = {
+ props: makeMergeEvaluated({
+ mergeNames: (gen, from, to) =>
+ gen.if(_`${to} !== true && ${from} !== undefined`, () => {
+ gen.if(
+ _`${from} === true`,
+ () => gen.assign(to, true),
+ () => gen.assign(to, _`${to} || {}`).code(_`Object.assign(${to}, ${from})`)
+ )
+ }),
+ mergeToName: (gen, from, to) =>
+ gen.if(_`${to} !== true`, () => {
+ if (from === true) {
+ gen.assign(to, true)
+ } else {
+ gen.assign(to, _`${to} || {}`)
+ setEvaluated(gen, to, from)
+ }
+ }),
+ mergeValues: (from, to) => (from === true ? true : {...from, ...to}),
+ resultToName: evaluatedPropsToName,
+ }),
+ items: makeMergeEvaluated({
+ mergeNames: (gen, from, to) =>
+ gen.if(_`${to} !== true && ${from} !== undefined`, () =>
+ gen.assign(to, _`${from} === true ? true : ${to} > ${from} ? ${to} : ${from}`)
+ ),
+ mergeToName: (gen, from, to) =>
+ gen.if(_`${to} !== true`, () =>
+ gen.assign(to, from === true ? true : _`${to} > ${from} ? ${to} : ${from}`)
+ ),
+ mergeValues: (from, to) => (from === true ? true : Math.max(from, to)),
+ resultToName: (gen, items) => gen.var("items", items),
+ }),
+}
+
+export function evaluatedPropsToName(gen: CodeGen, ps?: EvaluatedProperties): Name {
+ if (ps === true) return gen.var("props", true)
+ const props = gen.var("props", _`{}`)
+ if (ps !== undefined) setEvaluated(gen, props, ps)
+ return props
+}
+
+export function setEvaluated(gen: CodeGen, props: Name, ps: {[K in string]?: true}): void {
+ Object.keys(ps).forEach((p) => gen.assign(_`${props}${getProperty(p)}`, true))
+}
+
+const snippets: {[S in string]?: _Code} = {}
+
+export function useFunc(gen: CodeGen, f: {code: string}): Name {
+ return gen.scopeValue("func", {
+ ref: f,
+ code: snippets[f.code] || (snippets[f.code] = new _Code(f.code)),
+ })
+}
+
+export enum Type {
+ Num,
+ Str,
+}
+
+export function getErrorPath(
+ dataProp: Name | string | number,
+ dataPropType?: Type,
+ jsPropertySyntax?: boolean
+): Code | string {
+ // let path
+ if (dataProp instanceof Name) {
+ const isNumber = dataPropType === Type.Num
+ return jsPropertySyntax
+ ? isNumber
+ ? _`"[" + ${dataProp} + "]"`
+ : _`"['" + ${dataProp} + "']"`
+ : isNumber
+ ? _`"/" + ${dataProp}`
+ : _`"/" + ${dataProp}.replace(/~/g, "~0").replace(/\\//g, "~1")` // TODO maybe use global escapePointer
+ }
+ return jsPropertySyntax ? getProperty(dataProp).toString() : "/" + escapeJsonPointer(dataProp)
+}
+
+export function checkStrictMode(
+ it: SchemaCxt,
+ msg: string,
+ mode: boolean | "log" = it.opts.strictSchema
+): void {
+ if (!mode) return
+ msg = `strict mode: ${msg}`
+ if (mode === true) throw new Error(msg)
+ it.self.logger.warn(msg)
+}
diff --git a/node_modules/ajv/lib/compile/validate/applicability.ts b/node_modules/ajv/lib/compile/validate/applicability.ts
new file mode 100644
index 0000000000000000000000000000000000000000..478b704ac571d7b34deb19ef84aa0e2dd08973e3
--- /dev/null
+++ b/node_modules/ajv/lib/compile/validate/applicability.ts
@@ -0,0 +1,22 @@
+import type {AnySchemaObject} from "../../types"
+import type {SchemaObjCxt} from ".."
+import type {JSONType, RuleGroup, Rule} from "../rules"
+
+export function schemaHasRulesForType(
+ {schema, self}: SchemaObjCxt,
+ type: JSONType
+): boolean | undefined {
+ const group = self.RULES.types[type]
+ return group && group !== true && shouldUseGroup(schema, group)
+}
+
+export function shouldUseGroup(schema: AnySchemaObject, group: RuleGroup): boolean {
+ return group.rules.some((rule) => shouldUseRule(schema, rule))
+}
+
+export function shouldUseRule(schema: AnySchemaObject, rule: Rule): boolean | undefined {
+ return (
+ schema[rule.keyword] !== undefined ||
+ rule.definition.implements?.some((kwd) => schema[kwd] !== undefined)
+ )
+}
diff --git a/node_modules/ajv/lib/compile/validate/boolSchema.ts b/node_modules/ajv/lib/compile/validate/boolSchema.ts
new file mode 100644
index 0000000000000000000000000000000000000000..156355016d62249d16c6dc19a89c28b5ff6972c7
--- /dev/null
+++ b/node_modules/ajv/lib/compile/validate/boolSchema.ts
@@ -0,0 +1,47 @@
+import type {KeywordErrorDefinition, KeywordErrorCxt} from "../../types"
+import type {SchemaCxt} from ".."
+import {reportError} from "../errors"
+import {_, Name} from "../codegen"
+import N from "../names"
+
+const boolError: KeywordErrorDefinition = {
+ message: "boolean schema is false",
+}
+
+export function topBoolOrEmptySchema(it: SchemaCxt): void {
+ const {gen, schema, validateName} = it
+ if (schema === false) {
+ falseSchemaError(it, false)
+ } else if (typeof schema == "object" && schema.$async === true) {
+ gen.return(N.data)
+ } else {
+ gen.assign(_`${validateName}.errors`, null)
+ gen.return(true)
+ }
+}
+
+export function boolOrEmptySchema(it: SchemaCxt, valid: Name): void {
+ const {gen, schema} = it
+ if (schema === false) {
+ gen.var(valid, false) // TODO var
+ falseSchemaError(it)
+ } else {
+ gen.var(valid, true) // TODO var
+ }
+}
+
+function falseSchemaError(it: SchemaCxt, overrideAllErrors?: boolean): void {
+ const {gen, data} = it
+ // TODO maybe some other interface should be used for non-keyword validation errors...
+ const cxt: KeywordErrorCxt = {
+ gen,
+ keyword: "false schema",
+ data,
+ schema: false,
+ schemaCode: false,
+ schemaValue: false,
+ params: {},
+ it,
+ }
+ reportError(cxt, boolError, undefined, overrideAllErrors)
+}
diff --git a/node_modules/ajv/lib/compile/validate/dataType.ts b/node_modules/ajv/lib/compile/validate/dataType.ts
new file mode 100644
index 0000000000000000000000000000000000000000..d8142b3e1f55194a06de0ab489ee01e00136df25
--- /dev/null
+++ b/node_modules/ajv/lib/compile/validate/dataType.ts
@@ -0,0 +1,230 @@
+import type {
+ KeywordErrorDefinition,
+ KeywordErrorCxt,
+ ErrorObject,
+ AnySchemaObject,
+} from "../../types"
+import type {SchemaObjCxt} from ".."
+import {isJSONType, JSONType} from "../rules"
+import {schemaHasRulesForType} from "./applicability"
+import {reportError} from "../errors"
+import {_, nil, and, not, operators, Code, Name} from "../codegen"
+import {toHash, schemaRefOrVal} from "../util"
+
+export enum DataType {
+ Correct,
+ Wrong,
+}
+
+export function getSchemaTypes(schema: AnySchemaObject): JSONType[] {
+ const types = getJSONTypes(schema.type)
+ const hasNull = types.includes("null")
+ if (hasNull) {
+ if (schema.nullable === false) throw new Error("type: null contradicts nullable: false")
+ } else {
+ if (!types.length && schema.nullable !== undefined) {
+ throw new Error('"nullable" cannot be used without "type"')
+ }
+ if (schema.nullable === true) types.push("null")
+ }
+ return types
+}
+
+// eslint-disable-next-line @typescript-eslint/no-redundant-type-constituents
+export function getJSONTypes(ts: unknown | unknown[]): JSONType[] {
+ const types: unknown[] = Array.isArray(ts) ? ts : ts ? [ts] : []
+ if (types.every(isJSONType)) return types
+ throw new Error("type must be JSONType or JSONType[]: " + types.join(","))
+}
+
+export function coerceAndCheckDataType(it: SchemaObjCxt, types: JSONType[]): boolean {
+ const {gen, data, opts} = it
+ const coerceTo = coerceToTypes(types, opts.coerceTypes)
+ const checkTypes =
+ types.length > 0 &&
+ !(coerceTo.length === 0 && types.length === 1 && schemaHasRulesForType(it, types[0]))
+ if (checkTypes) {
+ const wrongType = checkDataTypes(types, data, opts.strictNumbers, DataType.Wrong)
+ gen.if(wrongType, () => {
+ if (coerceTo.length) coerceData(it, types, coerceTo)
+ else reportTypeError(it)
+ })
+ }
+ return checkTypes
+}
+
+const COERCIBLE: Set = new Set(["string", "number", "integer", "boolean", "null"])
+function coerceToTypes(types: JSONType[], coerceTypes?: boolean | "array"): JSONType[] {
+ return coerceTypes
+ ? types.filter((t) => COERCIBLE.has(t) || (coerceTypes === "array" && t === "array"))
+ : []
+}
+
+function coerceData(it: SchemaObjCxt, types: JSONType[], coerceTo: JSONType[]): void {
+ const {gen, data, opts} = it
+ const dataType = gen.let("dataType", _`typeof ${data}`)
+ const coerced = gen.let("coerced", _`undefined`)
+ if (opts.coerceTypes === "array") {
+ gen.if(_`${dataType} == 'object' && Array.isArray(${data}) && ${data}.length == 1`, () =>
+ gen
+ .assign(data, _`${data}[0]`)
+ .assign(dataType, _`typeof ${data}`)
+ .if(checkDataTypes(types, data, opts.strictNumbers), () => gen.assign(coerced, data))
+ )
+ }
+ gen.if(_`${coerced} !== undefined`)
+ for (const t of coerceTo) {
+ if (COERCIBLE.has(t) || (t === "array" && opts.coerceTypes === "array")) {
+ coerceSpecificType(t)
+ }
+ }
+ gen.else()
+ reportTypeError(it)
+ gen.endIf()
+
+ gen.if(_`${coerced} !== undefined`, () => {
+ gen.assign(data, coerced)
+ assignParentData(it, coerced)
+ })
+
+ function coerceSpecificType(t: string): void {
+ switch (t) {
+ case "string":
+ gen
+ .elseIf(_`${dataType} == "number" || ${dataType} == "boolean"`)
+ .assign(coerced, _`"" + ${data}`)
+ .elseIf(_`${data} === null`)
+ .assign(coerced, _`""`)
+ return
+ case "number":
+ gen
+ .elseIf(
+ _`${dataType} == "boolean" || ${data} === null
+ || (${dataType} == "string" && ${data} && ${data} == +${data})`
+ )
+ .assign(coerced, _`+${data}`)
+ return
+ case "integer":
+ gen
+ .elseIf(
+ _`${dataType} === "boolean" || ${data} === null
+ || (${dataType} === "string" && ${data} && ${data} == +${data} && !(${data} % 1))`
+ )
+ .assign(coerced, _`+${data}`)
+ return
+ case "boolean":
+ gen
+ .elseIf(_`${data} === "false" || ${data} === 0 || ${data} === null`)
+ .assign(coerced, false)
+ .elseIf(_`${data} === "true" || ${data} === 1`)
+ .assign(coerced, true)
+ return
+ case "null":
+ gen.elseIf(_`${data} === "" || ${data} === 0 || ${data} === false`)
+ gen.assign(coerced, null)
+ return
+
+ case "array":
+ gen
+ .elseIf(
+ _`${dataType} === "string" || ${dataType} === "number"
+ || ${dataType} === "boolean" || ${data} === null`
+ )
+ .assign(coerced, _`[${data}]`)
+ }
+ }
+}
+
+function assignParentData({gen, parentData, parentDataProperty}: SchemaObjCxt, expr: Name): void {
+ // TODO use gen.property
+ gen.if(_`${parentData} !== undefined`, () =>
+ gen.assign(_`${parentData}[${parentDataProperty}]`, expr)
+ )
+}
+
+export function checkDataType(
+ dataType: JSONType,
+ data: Name,
+ strictNums?: boolean | "log",
+ correct = DataType.Correct
+): Code {
+ const EQ = correct === DataType.Correct ? operators.EQ : operators.NEQ
+ let cond: Code
+ switch (dataType) {
+ case "null":
+ return _`${data} ${EQ} null`
+ case "array":
+ cond = _`Array.isArray(${data})`
+ break
+ case "object":
+ cond = _`${data} && typeof ${data} == "object" && !Array.isArray(${data})`
+ break
+ case "integer":
+ cond = numCond(_`!(${data} % 1) && !isNaN(${data})`)
+ break
+ case "number":
+ cond = numCond()
+ break
+ default:
+ return _`typeof ${data} ${EQ} ${dataType}`
+ }
+ return correct === DataType.Correct ? cond : not(cond)
+
+ function numCond(_cond: Code = nil): Code {
+ return and(_`typeof ${data} == "number"`, _cond, strictNums ? _`isFinite(${data})` : nil)
+ }
+}
+
+export function checkDataTypes(
+ dataTypes: JSONType[],
+ data: Name,
+ strictNums?: boolean | "log",
+ correct?: DataType
+): Code {
+ if (dataTypes.length === 1) {
+ return checkDataType(dataTypes[0], data, strictNums, correct)
+ }
+ let cond: Code
+ const types = toHash(dataTypes)
+ if (types.array && types.object) {
+ const notObj = _`typeof ${data} != "object"`
+ cond = types.null ? notObj : _`!${data} || ${notObj}`
+ delete types.null
+ delete types.array
+ delete types.object
+ } else {
+ cond = nil
+ }
+ if (types.number) delete types.integer
+ for (const t in types) cond = and(cond, checkDataType(t as JSONType, data, strictNums, correct))
+ return cond
+}
+
+export type TypeError = ErrorObject<"type", {type: string}>
+
+const typeError: KeywordErrorDefinition = {
+ message: ({schema}) => `must be ${schema}`,
+ params: ({schema, schemaValue}) =>
+ typeof schema == "string" ? _`{type: ${schema}}` : _`{type: ${schemaValue}}`,
+}
+
+export function reportTypeError(it: SchemaObjCxt): void {
+ const cxt = getTypeErrorContext(it)
+ reportError(cxt, typeError)
+}
+
+function getTypeErrorContext(it: SchemaObjCxt): KeywordErrorCxt {
+ const {gen, data, schema} = it
+ const schemaCode = schemaRefOrVal(it, schema, "type")
+ return {
+ gen,
+ keyword: "type",
+ data,
+ schema: schema.type,
+ schemaCode,
+ schemaValue: schemaCode,
+ parentSchema: schema,
+ params: {},
+ it,
+ }
+}
diff --git a/node_modules/ajv/lib/compile/validate/defaults.ts b/node_modules/ajv/lib/compile/validate/defaults.ts
new file mode 100644
index 0000000000000000000000000000000000000000..2ad3d4df8291bdfd7aec74833bec4b0b4c91f36f
--- /dev/null
+++ b/node_modules/ajv/lib/compile/validate/defaults.ts
@@ -0,0 +1,32 @@
+import type {SchemaObjCxt} from ".."
+import {_, getProperty, stringify} from "../codegen"
+import {checkStrictMode} from "../util"
+
+export function assignDefaults(it: SchemaObjCxt, ty?: string): void {
+ const {properties, items} = it.schema
+ if (ty === "object" && properties) {
+ for (const key in properties) {
+ assignDefault(it, key, properties[key].default)
+ }
+ } else if (ty === "array" && Array.isArray(items)) {
+ items.forEach((sch, i: number) => assignDefault(it, i, sch.default))
+ }
+}
+
+function assignDefault(it: SchemaObjCxt, prop: string | number, defaultValue: unknown): void {
+ const {gen, compositeRule, data, opts} = it
+ if (defaultValue === undefined) return
+ const childData = _`${data}${getProperty(prop)}`
+ if (compositeRule) {
+ checkStrictMode(it, `default is ignored for: ${childData}`)
+ return
+ }
+
+ let condition = _`${childData} === undefined`
+ if (opts.useDefaults === "empty") {
+ condition = _`${condition} || ${childData} === null || ${childData} === ""`
+ }
+ // `${childData} === undefined` +
+ // (opts.useDefaults === "empty" ? ` || ${childData} === null || ${childData} === ""` : "")
+ gen.if(condition, _`${childData} = ${stringify(defaultValue)}`)
+}
diff --git a/node_modules/ajv/lib/compile/validate/index.ts b/node_modules/ajv/lib/compile/validate/index.ts
new file mode 100644
index 0000000000000000000000000000000000000000..15ecabd85169e3f19b56b7547982643383068552
--- /dev/null
+++ b/node_modules/ajv/lib/compile/validate/index.ts
@@ -0,0 +1,582 @@
+import type {
+ AddedKeywordDefinition,
+ AnySchema,
+ AnySchemaObject,
+ KeywordErrorCxt,
+ KeywordCxtParams,
+} from "../../types"
+import type {SchemaCxt, SchemaObjCxt} from ".."
+import type {InstanceOptions} from "../../core"
+import {boolOrEmptySchema, topBoolOrEmptySchema} from "./boolSchema"
+import {coerceAndCheckDataType, getSchemaTypes} from "./dataType"
+import {shouldUseGroup, shouldUseRule} from "./applicability"
+import {checkDataType, checkDataTypes, reportTypeError, DataType} from "./dataType"
+import {assignDefaults} from "./defaults"
+import {funcKeywordCode, macroKeywordCode, validateKeywordUsage, validSchemaType} from "./keyword"
+import {getSubschema, extendSubschemaData, SubschemaArgs, extendSubschemaMode} from "./subschema"
+import {_, nil, str, or, not, getProperty, Block, Code, Name, CodeGen} from "../codegen"
+import N from "../names"
+import {resolveUrl} from "../resolve"
+import {
+ schemaRefOrVal,
+ schemaHasRulesButRef,
+ checkUnknownRules,
+ checkStrictMode,
+ unescapeJsonPointer,
+ mergeEvaluated,
+} from "../util"
+import type {JSONType, Rule, RuleGroup} from "../rules"
+import {
+ ErrorPaths,
+ reportError,
+ reportExtraError,
+ resetErrorsCount,
+ keyword$DataError,
+} from "../errors"
+
+// schema compilation - generates validation function, subschemaCode (below) is used for subschemas
+export function validateFunctionCode(it: SchemaCxt): void {
+ if (isSchemaObj(it)) {
+ checkKeywords(it)
+ if (schemaCxtHasRules(it)) {
+ topSchemaObjCode(it)
+ return
+ }
+ }
+ validateFunction(it, () => topBoolOrEmptySchema(it))
+}
+
+function validateFunction(
+ {gen, validateName, schema, schemaEnv, opts}: SchemaCxt,
+ body: Block
+): void {
+ if (opts.code.es5) {
+ gen.func(validateName, _`${N.data}, ${N.valCxt}`, schemaEnv.$async, () => {
+ gen.code(_`"use strict"; ${funcSourceUrl(schema, opts)}`)
+ destructureValCxtES5(gen, opts)
+ gen.code(body)
+ })
+ } else {
+ gen.func(validateName, _`${N.data}, ${destructureValCxt(opts)}`, schemaEnv.$async, () =>
+ gen.code(funcSourceUrl(schema, opts)).code(body)
+ )
+ }
+}
+
+function destructureValCxt(opts: InstanceOptions): Code {
+ return _`{${N.instancePath}="", ${N.parentData}, ${N.parentDataProperty}, ${N.rootData}=${
+ N.data
+ }${opts.dynamicRef ? _`, ${N.dynamicAnchors}={}` : nil}}={}`
+}
+
+function destructureValCxtES5(gen: CodeGen, opts: InstanceOptions): void {
+ gen.if(
+ N.valCxt,
+ () => {
+ gen.var(N.instancePath, _`${N.valCxt}.${N.instancePath}`)
+ gen.var(N.parentData, _`${N.valCxt}.${N.parentData}`)
+ gen.var(N.parentDataProperty, _`${N.valCxt}.${N.parentDataProperty}`)
+ gen.var(N.rootData, _`${N.valCxt}.${N.rootData}`)
+ if (opts.dynamicRef) gen.var(N.dynamicAnchors, _`${N.valCxt}.${N.dynamicAnchors}`)
+ },
+ () => {
+ gen.var(N.instancePath, _`""`)
+ gen.var(N.parentData, _`undefined`)
+ gen.var(N.parentDataProperty, _`undefined`)
+ gen.var(N.rootData, N.data)
+ if (opts.dynamicRef) gen.var(N.dynamicAnchors, _`{}`)
+ }
+ )
+}
+
+function topSchemaObjCode(it: SchemaObjCxt): void {
+ const {schema, opts, gen} = it
+ validateFunction(it, () => {
+ if (opts.$comment && schema.$comment) commentKeyword(it)
+ checkNoDefault(it)
+ gen.let(N.vErrors, null)
+ gen.let(N.errors, 0)
+ if (opts.unevaluated) resetEvaluated(it)
+ typeAndKeywords(it)
+ returnResults(it)
+ })
+ return
+}
+
+function resetEvaluated(it: SchemaObjCxt): void {
+ // TODO maybe some hook to execute it in the end to check whether props/items are Name, as in assignEvaluated
+ const {gen, validateName} = it
+ it.evaluated = gen.const("evaluated", _`${validateName}.evaluated`)
+ gen.if(_`${it.evaluated}.dynamicProps`, () => gen.assign(_`${it.evaluated}.props`, _`undefined`))
+ gen.if(_`${it.evaluated}.dynamicItems`, () => gen.assign(_`${it.evaluated}.items`, _`undefined`))
+}
+
+function funcSourceUrl(schema: AnySchema, opts: InstanceOptions): Code {
+ const schId = typeof schema == "object" && schema[opts.schemaId]
+ return schId && (opts.code.source || opts.code.process) ? _`/*# sourceURL=${schId} */` : nil
+}
+
+// schema compilation - this function is used recursively to generate code for sub-schemas
+function subschemaCode(it: SchemaCxt, valid: Name): void {
+ if (isSchemaObj(it)) {
+ checkKeywords(it)
+ if (schemaCxtHasRules(it)) {
+ subSchemaObjCode(it, valid)
+ return
+ }
+ }
+ boolOrEmptySchema(it, valid)
+}
+
+function schemaCxtHasRules({schema, self}: SchemaCxt): boolean {
+ if (typeof schema == "boolean") return !schema
+ for (const key in schema) if (self.RULES.all[key]) return true
+ return false
+}
+
+function isSchemaObj(it: SchemaCxt): it is SchemaObjCxt {
+ return typeof it.schema != "boolean"
+}
+
+function subSchemaObjCode(it: SchemaObjCxt, valid: Name): void {
+ const {schema, gen, opts} = it
+ if (opts.$comment && schema.$comment) commentKeyword(it)
+ updateContext(it)
+ checkAsyncSchema(it)
+ const errsCount = gen.const("_errs", N.errors)
+ typeAndKeywords(it, errsCount)
+ // TODO var
+ gen.var(valid, _`${errsCount} === ${N.errors}`)
+}
+
+function checkKeywords(it: SchemaObjCxt): void {
+ checkUnknownRules(it)
+ checkRefsAndKeywords(it)
+}
+
+function typeAndKeywords(it: SchemaObjCxt, errsCount?: Name): void {
+ if (it.opts.jtd) return schemaKeywords(it, [], false, errsCount)
+ const types = getSchemaTypes(it.schema)
+ const checkedTypes = coerceAndCheckDataType(it, types)
+ schemaKeywords(it, types, !checkedTypes, errsCount)
+}
+
+function checkRefsAndKeywords(it: SchemaObjCxt): void {
+ const {schema, errSchemaPath, opts, self} = it
+ if (schema.$ref && opts.ignoreKeywordsWithRef && schemaHasRulesButRef(schema, self.RULES)) {
+ self.logger.warn(`$ref: keywords ignored in schema at path "${errSchemaPath}"`)
+ }
+}
+
+function checkNoDefault(it: SchemaObjCxt): void {
+ const {schema, opts} = it
+ if (schema.default !== undefined && opts.useDefaults && opts.strictSchema) {
+ checkStrictMode(it, "default is ignored in the schema root")
+ }
+}
+
+function updateContext(it: SchemaObjCxt): void {
+ const schId = it.schema[it.opts.schemaId]
+ if (schId) it.baseId = resolveUrl(it.opts.uriResolver, it.baseId, schId)
+}
+
+function checkAsyncSchema(it: SchemaObjCxt): void {
+ if (it.schema.$async && !it.schemaEnv.$async) throw new Error("async schema in sync schema")
+}
+
+function commentKeyword({gen, schemaEnv, schema, errSchemaPath, opts}: SchemaObjCxt): void {
+ const msg = schema.$comment
+ if (opts.$comment === true) {
+ gen.code(_`${N.self}.logger.log(${msg})`)
+ } else if (typeof opts.$comment == "function") {
+ const schemaPath = str`${errSchemaPath}/$comment`
+ const rootName = gen.scopeValue("root", {ref: schemaEnv.root})
+ gen.code(_`${N.self}.opts.$comment(${msg}, ${schemaPath}, ${rootName}.schema)`)
+ }
+}
+
+function returnResults(it: SchemaCxt): void {
+ const {gen, schemaEnv, validateName, ValidationError, opts} = it
+ if (schemaEnv.$async) {
+ // TODO assign unevaluated
+ gen.if(
+ _`${N.errors} === 0`,
+ () => gen.return(N.data),
+ () => gen.throw(_`new ${ValidationError as Name}(${N.vErrors})`)
+ )
+ } else {
+ gen.assign(_`${validateName}.errors`, N.vErrors)
+ if (opts.unevaluated) assignEvaluated(it)
+ gen.return(_`${N.errors} === 0`)
+ }
+}
+
+function assignEvaluated({gen, evaluated, props, items}: SchemaCxt): void {
+ if (props instanceof Name) gen.assign(_`${evaluated}.props`, props)
+ if (items instanceof Name) gen.assign(_`${evaluated}.items`, items)
+}
+
+function schemaKeywords(
+ it: SchemaObjCxt,
+ types: JSONType[],
+ typeErrors: boolean,
+ errsCount?: Name
+): void {
+ const {gen, schema, data, allErrors, opts, self} = it
+ const {RULES} = self
+ if (schema.$ref && (opts.ignoreKeywordsWithRef || !schemaHasRulesButRef(schema, RULES))) {
+ gen.block(() => keywordCode(it, "$ref", (RULES.all.$ref as Rule).definition)) // TODO typecast
+ return
+ }
+ if (!opts.jtd) checkStrictTypes(it, types)
+ gen.block(() => {
+ for (const group of RULES.rules) groupKeywords(group)
+ groupKeywords(RULES.post)
+ })
+
+ function groupKeywords(group: RuleGroup): void {
+ if (!shouldUseGroup(schema, group)) return
+ if (group.type) {
+ gen.if(checkDataType(group.type, data, opts.strictNumbers))
+ iterateKeywords(it, group)
+ if (types.length === 1 && types[0] === group.type && typeErrors) {
+ gen.else()
+ reportTypeError(it)
+ }
+ gen.endIf()
+ } else {
+ iterateKeywords(it, group)
+ }
+ // TODO make it "ok" call?
+ if (!allErrors) gen.if(_`${N.errors} === ${errsCount || 0}`)
+ }
+}
+
+function iterateKeywords(it: SchemaObjCxt, group: RuleGroup): void {
+ const {
+ gen,
+ schema,
+ opts: {useDefaults},
+ } = it
+ if (useDefaults) assignDefaults(it, group.type)
+ gen.block(() => {
+ for (const rule of group.rules) {
+ if (shouldUseRule(schema, rule)) {
+ keywordCode(it, rule.keyword, rule.definition, group.type)
+ }
+ }
+ })
+}
+
+function checkStrictTypes(it: SchemaObjCxt, types: JSONType[]): void {
+ if (it.schemaEnv.meta || !it.opts.strictTypes) return
+ checkContextTypes(it, types)
+ if (!it.opts.allowUnionTypes) checkMultipleTypes(it, types)
+ checkKeywordTypes(it, it.dataTypes)
+}
+
+function checkContextTypes(it: SchemaObjCxt, types: JSONType[]): void {
+ if (!types.length) return
+ if (!it.dataTypes.length) {
+ it.dataTypes = types
+ return
+ }
+ types.forEach((t) => {
+ if (!includesType(it.dataTypes, t)) {
+ strictTypesError(it, `type "${t}" not allowed by context "${it.dataTypes.join(",")}"`)
+ }
+ })
+ narrowSchemaTypes(it, types)
+}
+
+function checkMultipleTypes(it: SchemaObjCxt, ts: JSONType[]): void {
+ if (ts.length > 1 && !(ts.length === 2 && ts.includes("null"))) {
+ strictTypesError(it, "use allowUnionTypes to allow union type keyword")
+ }
+}
+
+function checkKeywordTypes(it: SchemaObjCxt, ts: JSONType[]): void {
+ const rules = it.self.RULES.all
+ for (const keyword in rules) {
+ const rule = rules[keyword]
+ if (typeof rule == "object" && shouldUseRule(it.schema, rule)) {
+ const {type} = rule.definition
+ if (type.length && !type.some((t) => hasApplicableType(ts, t))) {
+ strictTypesError(it, `missing type "${type.join(",")}" for keyword "${keyword}"`)
+ }
+ }
+ }
+}
+
+function hasApplicableType(schTs: JSONType[], kwdT: JSONType): boolean {
+ return schTs.includes(kwdT) || (kwdT === "number" && schTs.includes("integer"))
+}
+
+function includesType(ts: JSONType[], t: JSONType): boolean {
+ return ts.includes(t) || (t === "integer" && ts.includes("number"))
+}
+
+function narrowSchemaTypes(it: SchemaObjCxt, withTypes: JSONType[]): void {
+ const ts: JSONType[] = []
+ for (const t of it.dataTypes) {
+ if (includesType(withTypes, t)) ts.push(t)
+ else if (withTypes.includes("integer") && t === "number") ts.push("integer")
+ }
+ it.dataTypes = ts
+}
+
+function strictTypesError(it: SchemaObjCxt, msg: string): void {
+ const schemaPath = it.schemaEnv.baseId + it.errSchemaPath
+ msg += ` at "${schemaPath}" (strictTypes)`
+ checkStrictMode(it, msg, it.opts.strictTypes)
+}
+
+export class KeywordCxt implements KeywordErrorCxt {
+ readonly gen: CodeGen
+ readonly allErrors?: boolean
+ readonly keyword: string
+ readonly data: Name // Name referencing the current level of the data instance
+ readonly $data?: string | false
+ schema: any // keyword value in the schema
+ readonly schemaValue: Code | number | boolean // Code reference to keyword schema value or primitive value
+ readonly schemaCode: Code | number | boolean // Code reference to resolved schema value (different if schema is $data)
+ readonly schemaType: JSONType[] // allowed type(s) of keyword value in the schema
+ readonly parentSchema: AnySchemaObject
+ readonly errsCount?: Name // Name reference to the number of validation errors collected before this keyword,
+ // requires option trackErrors in keyword definition
+ params: KeywordCxtParams // object to pass parameters to error messages from keyword code
+ readonly it: SchemaObjCxt // schema compilation context (schema is guaranteed to be an object, not boolean)
+ readonly def: AddedKeywordDefinition
+
+ constructor(it: SchemaObjCxt, def: AddedKeywordDefinition, keyword: string) {
+ validateKeywordUsage(it, def, keyword)
+ this.gen = it.gen
+ this.allErrors = it.allErrors
+ this.keyword = keyword
+ this.data = it.data
+ this.schema = it.schema[keyword]
+ this.$data = def.$data && it.opts.$data && this.schema && this.schema.$data
+ this.schemaValue = schemaRefOrVal(it, this.schema, keyword, this.$data)
+ this.schemaType = def.schemaType
+ this.parentSchema = it.schema
+ this.params = {}
+ this.it = it
+ this.def = def
+
+ if (this.$data) {
+ this.schemaCode = it.gen.const("vSchema", getData(this.$data, it))
+ } else {
+ this.schemaCode = this.schemaValue
+ if (!validSchemaType(this.schema, def.schemaType, def.allowUndefined)) {
+ throw new Error(`${keyword} value must be ${JSON.stringify(def.schemaType)}`)
+ }
+ }
+
+ if ("code" in def ? def.trackErrors : def.errors !== false) {
+ this.errsCount = it.gen.const("_errs", N.errors)
+ }
+ }
+
+ result(condition: Code, successAction?: () => void, failAction?: () => void): void {
+ this.failResult(not(condition), successAction, failAction)
+ }
+
+ failResult(condition: Code, successAction?: () => void, failAction?: () => void): void {
+ this.gen.if(condition)
+ if (failAction) failAction()
+ else this.error()
+ if (successAction) {
+ this.gen.else()
+ successAction()
+ if (this.allErrors) this.gen.endIf()
+ } else {
+ if (this.allErrors) this.gen.endIf()
+ else this.gen.else()
+ }
+ }
+
+ pass(condition: Code, failAction?: () => void): void {
+ this.failResult(not(condition), undefined, failAction)
+ }
+
+ fail(condition?: Code): void {
+ if (condition === undefined) {
+ this.error()
+ if (!this.allErrors) this.gen.if(false) // this branch will be removed by gen.optimize
+ return
+ }
+ this.gen.if(condition)
+ this.error()
+ if (this.allErrors) this.gen.endIf()
+ else this.gen.else()
+ }
+
+ fail$data(condition: Code): void {
+ if (!this.$data) return this.fail(condition)
+ const {schemaCode} = this
+ this.fail(_`${schemaCode} !== undefined && (${or(this.invalid$data(), condition)})`)
+ }
+
+ error(append?: boolean, errorParams?: KeywordCxtParams, errorPaths?: ErrorPaths): void {
+ if (errorParams) {
+ this.setParams(errorParams)
+ this._error(append, errorPaths)
+ this.setParams({})
+ return
+ }
+ this._error(append, errorPaths)
+ }
+
+ private _error(append?: boolean, errorPaths?: ErrorPaths): void {
+ ;(append ? reportExtraError : reportError)(this, this.def.error, errorPaths)
+ }
+
+ $dataError(): void {
+ reportError(this, this.def.$dataError || keyword$DataError)
+ }
+
+ reset(): void {
+ if (this.errsCount === undefined) throw new Error('add "trackErrors" to keyword definition')
+ resetErrorsCount(this.gen, this.errsCount)
+ }
+
+ ok(cond: Code | boolean): void {
+ if (!this.allErrors) this.gen.if(cond)
+ }
+
+ setParams(obj: KeywordCxtParams, assign?: true): void {
+ if (assign) Object.assign(this.params, obj)
+ else this.params = obj
+ }
+
+ block$data(valid: Name, codeBlock: () => void, $dataValid: Code = nil): void {
+ this.gen.block(() => {
+ this.check$data(valid, $dataValid)
+ codeBlock()
+ })
+ }
+
+ check$data(valid: Name = nil, $dataValid: Code = nil): void {
+ if (!this.$data) return
+ const {gen, schemaCode, schemaType, def} = this
+ gen.if(or(_`${schemaCode} === undefined`, $dataValid))
+ if (valid !== nil) gen.assign(valid, true)
+ if (schemaType.length || def.validateSchema) {
+ gen.elseIf(this.invalid$data())
+ this.$dataError()
+ if (valid !== nil) gen.assign(valid, false)
+ }
+ gen.else()
+ }
+
+ invalid$data(): Code {
+ const {gen, schemaCode, schemaType, def, it} = this
+ return or(wrong$DataType(), invalid$DataSchema())
+
+ function wrong$DataType(): Code {
+ if (schemaType.length) {
+ /* istanbul ignore if */
+ if (!(schemaCode instanceof Name)) throw new Error("ajv implementation error")
+ const st = Array.isArray(schemaType) ? schemaType : [schemaType]
+ return _`${checkDataTypes(st, schemaCode, it.opts.strictNumbers, DataType.Wrong)}`
+ }
+ return nil
+ }
+
+ function invalid$DataSchema(): Code {
+ if (def.validateSchema) {
+ const validateSchemaRef = gen.scopeValue("validate$data", {ref: def.validateSchema}) // TODO value.code for standalone
+ return _`!${validateSchemaRef}(${schemaCode})`
+ }
+ return nil
+ }
+ }
+
+ subschema(appl: SubschemaArgs, valid: Name): SchemaCxt {
+ const subschema = getSubschema(this.it, appl)
+ extendSubschemaData(subschema, this.it, appl)
+ extendSubschemaMode(subschema, appl)
+ const nextContext = {...this.it, ...subschema, items: undefined, props: undefined}
+ subschemaCode(nextContext, valid)
+ return nextContext
+ }
+
+ mergeEvaluated(schemaCxt: SchemaCxt, toName?: typeof Name): void {
+ const {it, gen} = this
+ if (!it.opts.unevaluated) return
+ if (it.props !== true && schemaCxt.props !== undefined) {
+ it.props = mergeEvaluated.props(gen, schemaCxt.props, it.props, toName)
+ }
+ if (it.items !== true && schemaCxt.items !== undefined) {
+ it.items = mergeEvaluated.items(gen, schemaCxt.items, it.items, toName)
+ }
+ }
+
+ mergeValidEvaluated(schemaCxt: SchemaCxt, valid: Name): boolean | void {
+ const {it, gen} = this
+ if (it.opts.unevaluated && (it.props !== true || it.items !== true)) {
+ gen.if(valid, () => this.mergeEvaluated(schemaCxt, Name))
+ return true
+ }
+ }
+}
+
+function keywordCode(
+ it: SchemaObjCxt,
+ keyword: string,
+ def: AddedKeywordDefinition,
+ ruleType?: JSONType
+): void {
+ const cxt = new KeywordCxt(it, def, keyword)
+ if ("code" in def) {
+ def.code(cxt, ruleType)
+ } else if (cxt.$data && def.validate) {
+ funcKeywordCode(cxt, def)
+ } else if ("macro" in def) {
+ macroKeywordCode(cxt, def)
+ } else if (def.compile || def.validate) {
+ funcKeywordCode(cxt, def)
+ }
+}
+
+const JSON_POINTER = /^\/(?:[^~]|~0|~1)*$/
+const RELATIVE_JSON_POINTER = /^([0-9]+)(#|\/(?:[^~]|~0|~1)*)?$/
+export function getData(
+ $data: string,
+ {dataLevel, dataNames, dataPathArr}: SchemaCxt
+): Code | number {
+ let jsonPointer
+ let data: Code
+ if ($data === "") return N.rootData
+ if ($data[0] === "/") {
+ if (!JSON_POINTER.test($data)) throw new Error(`Invalid JSON-pointer: ${$data}`)
+ jsonPointer = $data
+ data = N.rootData
+ } else {
+ const matches = RELATIVE_JSON_POINTER.exec($data)
+ if (!matches) throw new Error(`Invalid JSON-pointer: ${$data}`)
+ const up: number = +matches[1]
+ jsonPointer = matches[2]
+ if (jsonPointer === "#") {
+ if (up >= dataLevel) throw new Error(errorMsg("property/index", up))
+ return dataPathArr[dataLevel - up]
+ }
+ if (up > dataLevel) throw new Error(errorMsg("data", up))
+ data = dataNames[dataLevel - up]
+ if (!jsonPointer) return data
+ }
+
+ let expr = data
+ const segments = jsonPointer.split("/")
+ for (const segment of segments) {
+ if (segment) {
+ data = _`${data}${getProperty(unescapeJsonPointer(segment))}`
+ expr = _`${expr} && ${data}`
+ }
+ }
+ return expr
+
+ function errorMsg(pointerType: string, up: number): string {
+ return `Cannot access ${pointerType} ${up} levels up, current level is ${dataLevel}`
+ }
+}
diff --git a/node_modules/ajv/lib/compile/validate/keyword.ts b/node_modules/ajv/lib/compile/validate/keyword.ts
new file mode 100644
index 0000000000000000000000000000000000000000..f854aa71083ca28c01f8064fdca177a847e6f308
--- /dev/null
+++ b/node_modules/ajv/lib/compile/validate/keyword.ts
@@ -0,0 +1,171 @@
+import type {KeywordCxt} from "."
+import type {
+ AnySchema,
+ SchemaValidateFunction,
+ AnyValidateFunction,
+ AddedKeywordDefinition,
+ MacroKeywordDefinition,
+ FuncKeywordDefinition,
+} from "../../types"
+import type {SchemaObjCxt} from ".."
+import {_, nil, not, stringify, Code, Name, CodeGen} from "../codegen"
+import N from "../names"
+import type {JSONType} from "../rules"
+import {callValidateCode} from "../../vocabularies/code"
+import {extendErrors} from "../errors"
+
+type KeywordCompilationResult = AnySchema | SchemaValidateFunction | AnyValidateFunction
+
+export function macroKeywordCode(cxt: KeywordCxt, def: MacroKeywordDefinition): void {
+ const {gen, keyword, schema, parentSchema, it} = cxt
+ const macroSchema = def.macro.call(it.self, schema, parentSchema, it)
+ const schemaRef = useKeyword(gen, keyword, macroSchema)
+ if (it.opts.validateSchema !== false) it.self.validateSchema(macroSchema, true)
+
+ const valid = gen.name("valid")
+ cxt.subschema(
+ {
+ schema: macroSchema,
+ schemaPath: nil,
+ errSchemaPath: `${it.errSchemaPath}/${keyword}`,
+ topSchemaRef: schemaRef,
+ compositeRule: true,
+ },
+ valid
+ )
+ cxt.pass(valid, () => cxt.error(true))
+}
+
+export function funcKeywordCode(cxt: KeywordCxt, def: FuncKeywordDefinition): void {
+ const {gen, keyword, schema, parentSchema, $data, it} = cxt
+ checkAsyncKeyword(it, def)
+ const validate =
+ !$data && def.compile ? def.compile.call(it.self, schema, parentSchema, it) : def.validate
+ const validateRef = useKeyword(gen, keyword, validate)
+ const valid = gen.let("valid")
+ cxt.block$data(valid, validateKeyword)
+ cxt.ok(def.valid ?? valid)
+
+ function validateKeyword(): void {
+ if (def.errors === false) {
+ assignValid()
+ if (def.modifying) modifyData(cxt)
+ reportErrs(() => cxt.error())
+ } else {
+ const ruleErrs = def.async ? validateAsync() : validateSync()
+ if (def.modifying) modifyData(cxt)
+ reportErrs(() => addErrs(cxt, ruleErrs))
+ }
+ }
+
+ function validateAsync(): Name {
+ const ruleErrs = gen.let("ruleErrs", null)
+ gen.try(
+ () => assignValid(_`await `),
+ (e) =>
+ gen.assign(valid, false).if(
+ _`${e} instanceof ${it.ValidationError as Name}`,
+ () => gen.assign(ruleErrs, _`${e}.errors`),
+ () => gen.throw(e)
+ )
+ )
+ return ruleErrs
+ }
+
+ function validateSync(): Code {
+ const validateErrs = _`${validateRef}.errors`
+ gen.assign(validateErrs, null)
+ assignValid(nil)
+ return validateErrs
+ }
+
+ function assignValid(_await: Code = def.async ? _`await ` : nil): void {
+ const passCxt = it.opts.passContext ? N.this : N.self
+ const passSchema = !(("compile" in def && !$data) || def.schema === false)
+ gen.assign(
+ valid,
+ _`${_await}${callValidateCode(cxt, validateRef, passCxt, passSchema)}`,
+ def.modifying
+ )
+ }
+
+ function reportErrs(errors: () => void): void {
+ gen.if(not(def.valid ?? valid), errors)
+ }
+}
+
+function modifyData(cxt: KeywordCxt): void {
+ const {gen, data, it} = cxt
+ gen.if(it.parentData, () => gen.assign(data, _`${it.parentData}[${it.parentDataProperty}]`))
+}
+
+function addErrs(cxt: KeywordCxt, errs: Code): void {
+ const {gen} = cxt
+ gen.if(
+ _`Array.isArray(${errs})`,
+ () => {
+ gen
+ .assign(N.vErrors, _`${N.vErrors} === null ? ${errs} : ${N.vErrors}.concat(${errs})`)
+ .assign(N.errors, _`${N.vErrors}.length`)
+ extendErrors(cxt)
+ },
+ () => cxt.error()
+ )
+}
+
+function checkAsyncKeyword({schemaEnv}: SchemaObjCxt, def: FuncKeywordDefinition): void {
+ if (def.async && !schemaEnv.$async) throw new Error("async keyword in sync schema")
+}
+
+function useKeyword(gen: CodeGen, keyword: string, result?: KeywordCompilationResult): Name {
+ if (result === undefined) throw new Error(`keyword "${keyword}" failed to compile`)
+ return gen.scopeValue(
+ "keyword",
+ typeof result == "function" ? {ref: result} : {ref: result, code: stringify(result)}
+ )
+}
+
+export function validSchemaType(
+ schema: unknown,
+ schemaType: JSONType[],
+ allowUndefined = false
+): boolean {
+ // TODO add tests
+ return (
+ !schemaType.length ||
+ schemaType.some((st) =>
+ st === "array"
+ ? Array.isArray(schema)
+ : st === "object"
+ ? schema && typeof schema == "object" && !Array.isArray(schema)
+ : typeof schema == st || (allowUndefined && typeof schema == "undefined")
+ )
+ )
+}
+
+export function validateKeywordUsage(
+ {schema, opts, self, errSchemaPath}: SchemaObjCxt,
+ def: AddedKeywordDefinition,
+ keyword: string
+): void {
+ /* istanbul ignore if */
+ if (Array.isArray(def.keyword) ? !def.keyword.includes(keyword) : def.keyword !== keyword) {
+ throw new Error("ajv implementation error")
+ }
+
+ const deps = def.dependencies
+ if (deps?.some((kwd) => !Object.prototype.hasOwnProperty.call(schema, kwd))) {
+ throw new Error(`parent schema must have dependencies of ${keyword}: ${deps.join(",")}`)
+ }
+
+ if (def.validateSchema) {
+ const valid = def.validateSchema(schema[keyword])
+ if (!valid) {
+ const msg =
+ `keyword "${keyword}" value is invalid at path "${errSchemaPath}": ` +
+ self.errorsText(def.validateSchema.errors)
+ if (opts.validateSchema === "log") self.logger.error(msg)
+ else throw new Error(msg)
+ }
+ }
+}
diff --git a/node_modules/ajv/lib/compile/validate/subschema.ts b/node_modules/ajv/lib/compile/validate/subschema.ts
new file mode 100644
index 0000000000000000000000000000000000000000..9072ed7743decf23950a40033cb2c2f6ec1845e4
--- /dev/null
+++ b/node_modules/ajv/lib/compile/validate/subschema.ts
@@ -0,0 +1,135 @@
+import type {AnySchema} from "../../types"
+import type {SchemaObjCxt} from ".."
+import {_, str, getProperty, Code, Name} from "../codegen"
+import {escapeFragment, getErrorPath, Type} from "../util"
+import type {JSONType} from "../rules"
+
+export interface SubschemaContext {
+ // TODO use Optional? align with SchemCxt property types
+ schema: AnySchema
+ schemaPath: Code
+ errSchemaPath: string
+ topSchemaRef?: Code
+ errorPath?: Code
+ dataLevel?: number
+ dataTypes?: JSONType[]
+ data?: Name
+ parentData?: Name
+ parentDataProperty?: Code | number
+ dataNames?: Name[]
+ dataPathArr?: (Code | number)[]
+ propertyName?: Name
+ jtdDiscriminator?: string
+ jtdMetadata?: boolean
+ compositeRule?: true
+ createErrors?: boolean
+ allErrors?: boolean
+}
+
+export type SubschemaArgs = Partial<{
+ keyword: string
+ schemaProp: string | number
+ schema: AnySchema
+ schemaPath: Code
+ errSchemaPath: string
+ topSchemaRef: Code
+ data: Name | Code
+ dataProp: Code | string | number
+ dataTypes: JSONType[]
+ definedProperties: Set
+ propertyName: Name
+ dataPropType: Type
+ jtdDiscriminator: string
+ jtdMetadata: boolean
+ compositeRule: true
+ createErrors: boolean
+ allErrors: boolean
+}>
+
+export function getSubschema(
+ it: SchemaObjCxt,
+ {keyword, schemaProp, schema, schemaPath, errSchemaPath, topSchemaRef}: SubschemaArgs
+): SubschemaContext {
+ if (keyword !== undefined && schema !== undefined) {
+ throw new Error('both "keyword" and "schema" passed, only one allowed')
+ }
+
+ if (keyword !== undefined) {
+ const sch = it.schema[keyword]
+ return schemaProp === undefined
+ ? {
+ schema: sch,
+ schemaPath: _`${it.schemaPath}${getProperty(keyword)}`,
+ errSchemaPath: `${it.errSchemaPath}/${keyword}`,
+ }
+ : {
+ schema: sch[schemaProp],
+ schemaPath: _`${it.schemaPath}${getProperty(keyword)}${getProperty(schemaProp)}`,
+ errSchemaPath: `${it.errSchemaPath}/${keyword}/${escapeFragment(schemaProp)}`,
+ }
+ }
+
+ if (schema !== undefined) {
+ if (schemaPath === undefined || errSchemaPath === undefined || topSchemaRef === undefined) {
+ throw new Error('"schemaPath", "errSchemaPath" and "topSchemaRef" are required with "schema"')
+ }
+ return {
+ schema,
+ schemaPath,
+ topSchemaRef,
+ errSchemaPath,
+ }
+ }
+
+ throw new Error('either "keyword" or "schema" must be passed')
+}
+
+export function extendSubschemaData(
+ subschema: SubschemaContext,
+ it: SchemaObjCxt,
+ {dataProp, dataPropType: dpType, data, dataTypes, propertyName}: SubschemaArgs
+): void {
+ if (data !== undefined && dataProp !== undefined) {
+ throw new Error('both "data" and "dataProp" passed, only one allowed')
+ }
+
+ const {gen} = it
+
+ if (dataProp !== undefined) {
+ const {errorPath, dataPathArr, opts} = it
+ const nextData = gen.let("data", _`${it.data}${getProperty(dataProp)}`, true)
+ dataContextProps(nextData)
+ subschema.errorPath = str`${errorPath}${getErrorPath(dataProp, dpType, opts.jsPropertySyntax)}`
+ subschema.parentDataProperty = _`${dataProp}`
+ subschema.dataPathArr = [...dataPathArr, subschema.parentDataProperty]
+ }
+
+ if (data !== undefined) {
+ const nextData = data instanceof Name ? data : gen.let("data", data, true) // replaceable if used once?
+ dataContextProps(nextData)
+ if (propertyName !== undefined) subschema.propertyName = propertyName
+ // TODO something is possibly wrong here with not changing parentDataProperty and not appending dataPathArr
+ }
+
+ if (dataTypes) subschema.dataTypes = dataTypes
+
+ function dataContextProps(_nextData: Name): void {
+ subschema.data = _nextData
+ subschema.dataLevel = it.dataLevel + 1
+ subschema.dataTypes = []
+ it.definedProperties = new Set()
+ subschema.parentData = it.data
+ subschema.dataNames = [...it.dataNames, _nextData]
+ }
+}
+
+export function extendSubschemaMode(
+ subschema: SubschemaContext,
+ {jtdDiscriminator, jtdMetadata, compositeRule, createErrors, allErrors}: SubschemaArgs
+): void {
+ if (compositeRule !== undefined) subschema.compositeRule = compositeRule
+ if (createErrors !== undefined) subschema.createErrors = createErrors
+ if (allErrors !== undefined) subschema.allErrors = allErrors
+ subschema.jtdDiscriminator = jtdDiscriminator // not inherited
+ subschema.jtdMetadata = jtdMetadata // not inherited
+}
diff --git a/node_modules/ajv/lib/core.ts b/node_modules/ajv/lib/core.ts
new file mode 100644
index 0000000000000000000000000000000000000000..81a2d33ceecf62a055722373bd26384cbb1a4ebb
--- /dev/null
+++ b/node_modules/ajv/lib/core.ts
@@ -0,0 +1,892 @@
+export {
+ Format,
+ FormatDefinition,
+ AsyncFormatDefinition,
+ KeywordDefinition,
+ KeywordErrorDefinition,
+ CodeKeywordDefinition,
+ MacroKeywordDefinition,
+ FuncKeywordDefinition,
+ Vocabulary,
+ Schema,
+ SchemaObject,
+ AnySchemaObject,
+ AsyncSchema,
+ AnySchema,
+ ValidateFunction,
+ AsyncValidateFunction,
+ AnyValidateFunction,
+ ErrorObject,
+ ErrorNoParams,
+} from "./types"
+
+export {SchemaCxt, SchemaObjCxt} from "./compile"
+export interface Plugin {
+ (ajv: Ajv, options?: Opts): Ajv
+ [prop: string]: any
+}
+
+export {KeywordCxt} from "./compile/validate"
+export {DefinedError} from "./vocabularies/errors"
+export {JSONType} from "./compile/rules"
+export {JSONSchemaType} from "./types/json-schema"
+export {JTDSchemaType, SomeJTDSchemaType, JTDDataType} from "./types/jtd-schema"
+export {_, str, stringify, nil, Name, Code, CodeGen, CodeGenOptions} from "./compile/codegen"
+
+import type {
+ Schema,
+ AnySchema,
+ AnySchemaObject,
+ SchemaObject,
+ AsyncSchema,
+ Vocabulary,
+ KeywordDefinition,
+ AddedKeywordDefinition,
+ AnyValidateFunction,
+ ValidateFunction,
+ AsyncValidateFunction,
+ ErrorObject,
+ Format,
+ AddedFormat,
+ RegExpEngine,
+ UriResolver,
+} from "./types"
+import type {JSONSchemaType} from "./types/json-schema"
+import type {JTDSchemaType, SomeJTDSchemaType, JTDDataType} from "./types/jtd-schema"
+import ValidationError from "./runtime/validation_error"
+import MissingRefError from "./compile/ref_error"
+import {getRules, ValidationRules, Rule, RuleGroup, JSONType} from "./compile/rules"
+import {SchemaEnv, compileSchema, resolveSchema} from "./compile"
+import {Code, ValueScope} from "./compile/codegen"
+import {normalizeId, getSchemaRefs} from "./compile/resolve"
+import {getJSONTypes} from "./compile/validate/dataType"
+import {eachItem} from "./compile/util"
+import * as $dataRefSchema from "./refs/data.json"
+
+import DefaultUriResolver from "./runtime/uri"
+
+const defaultRegExp: RegExpEngine = (str, flags) => new RegExp(str, flags)
+defaultRegExp.code = "new RegExp"
+
+const META_IGNORE_OPTIONS: (keyof Options)[] = ["removeAdditional", "useDefaults", "coerceTypes"]
+const EXT_SCOPE_NAMES = new Set([
+ "validate",
+ "serialize",
+ "parse",
+ "wrapper",
+ "root",
+ "schema",
+ "keyword",
+ "pattern",
+ "formats",
+ "validate$data",
+ "func",
+ "obj",
+ "Error",
+])
+
+export type Options = CurrentOptions & DeprecatedOptions
+
+export interface CurrentOptions {
+ // strict mode options (NEW)
+ strict?: boolean | "log"
+ strictSchema?: boolean | "log"
+ strictNumbers?: boolean | "log"
+ strictTypes?: boolean | "log"
+ strictTuples?: boolean | "log"
+ strictRequired?: boolean | "log"
+ allowMatchingProperties?: boolean // disables a strict mode restriction
+ allowUnionTypes?: boolean
+ validateFormats?: boolean
+ // validation and reporting options:
+ $data?: boolean
+ allErrors?: boolean
+ verbose?: boolean
+ discriminator?: boolean
+ unicodeRegExp?: boolean
+ timestamp?: "string" | "date" // JTD only
+ parseDate?: boolean // JTD only
+ allowDate?: boolean // JTD only
+ specialNumbers?: "fast" | "null" // JTD only
+ $comment?:
+ | true
+ | ((comment: string, schemaPath?: string, rootSchema?: AnySchemaObject) => unknown)
+ formats?: {[Name in string]?: Format}
+ keywords?: Vocabulary
+ schemas?: AnySchema[] | {[Key in string]?: AnySchema}
+ logger?: Logger | false
+ loadSchema?: (uri: string) => Promise
+ // options to modify validated data:
+ removeAdditional?: boolean | "all" | "failing"
+ useDefaults?: boolean | "empty"
+ coerceTypes?: boolean | "array"
+ // advanced options:
+ next?: boolean // NEW
+ unevaluated?: boolean // NEW
+ dynamicRef?: boolean // NEW
+ schemaId?: "id" | "$id"
+ jtd?: boolean // NEW
+ meta?: SchemaObject | boolean
+ defaultMeta?: string | AnySchemaObject
+ validateSchema?: boolean | "log"
+ addUsedSchema?: boolean
+ inlineRefs?: boolean | number
+ passContext?: boolean
+ loopRequired?: number
+ loopEnum?: number // NEW
+ ownProperties?: boolean
+ multipleOfPrecision?: number
+ int32range?: boolean // JTD only
+ messages?: boolean
+ code?: CodeOptions // NEW
+ uriResolver?: UriResolver
+}
+
+export interface CodeOptions {
+ es5?: boolean
+ esm?: boolean
+ lines?: boolean
+ optimize?: boolean | number
+ formats?: Code // code to require (or construct) map of available formats - for standalone code
+ source?: boolean
+ process?: (code: string, schema?: SchemaEnv) => string
+ regExp?: RegExpEngine
+}
+
+interface InstanceCodeOptions extends CodeOptions {
+ regExp: RegExpEngine
+ optimize: number
+}
+
+interface DeprecatedOptions {
+ /** @deprecated */
+ ignoreKeywordsWithRef?: boolean
+ /** @deprecated */
+ jsPropertySyntax?: boolean // added instead of jsonPointers
+ /** @deprecated */
+ unicode?: boolean
+}
+
+interface RemovedOptions {
+ format?: boolean
+ errorDataPath?: "object" | "property"
+ nullable?: boolean // "nullable" keyword is supported by default
+ jsonPointers?: boolean
+ extendRefs?: true | "ignore" | "fail"
+ missingRefs?: true | "ignore" | "fail"
+ processCode?: (code: string, schema?: SchemaEnv) => string
+ sourceCode?: boolean
+ strictDefaults?: boolean
+ strictKeywords?: boolean
+ uniqueItems?: boolean
+ unknownFormats?: true | string[] | "ignore"
+ cache?: any
+ serialize?: (schema: AnySchema) => unknown
+ ajvErrors?: boolean
+}
+
+type OptionsInfo = {
+ [K in keyof T]-?: string | undefined
+}
+
+const removedOptions: OptionsInfo = {
+ errorDataPath: "",
+ format: "`validateFormats: false` can be used instead.",
+ nullable: '"nullable" keyword is supported by default.',
+ jsonPointers: "Deprecated jsPropertySyntax can be used instead.",
+ extendRefs: "Deprecated ignoreKeywordsWithRef can be used instead.",
+ missingRefs: "Pass empty schema with $id that should be ignored to ajv.addSchema.",
+ processCode: "Use option `code: {process: (code, schemaEnv: object) => string}`",
+ sourceCode: "Use option `code: {source: true}`",
+ strictDefaults: "It is default now, see option `strict`.",
+ strictKeywords: "It is default now, see option `strict`.",
+ uniqueItems: '"uniqueItems" keyword is always validated.',
+ unknownFormats: "Disable strict mode or pass `true` to `ajv.addFormat` (or `formats` option).",
+ cache: "Map is used as cache, schema object as key.",
+ serialize: "Map is used as cache, schema object as key.",
+ ajvErrors: "It is default now.",
+}
+
+const deprecatedOptions: OptionsInfo = {
+ ignoreKeywordsWithRef: "",
+ jsPropertySyntax: "",
+ unicode: '"minLength"/"maxLength" account for unicode characters by default.',
+}
+
+type RequiredInstanceOptions = {
+ [K in
+ | "strictSchema"
+ | "strictNumbers"
+ | "strictTypes"
+ | "strictTuples"
+ | "strictRequired"
+ | "inlineRefs"
+ | "loopRequired"
+ | "loopEnum"
+ | "meta"
+ | "messages"
+ | "schemaId"
+ | "addUsedSchema"
+ | "validateSchema"
+ | "validateFormats"
+ | "int32range"
+ | "unicodeRegExp"
+ | "uriResolver"]: NonNullable
+} & {code: InstanceCodeOptions}
+
+export type InstanceOptions = Options & RequiredInstanceOptions
+
+const MAX_EXPRESSION = 200
+
+// eslint-disable-next-line complexity
+function requiredOptions(o: Options): RequiredInstanceOptions {
+ const s = o.strict
+ const _optz = o.code?.optimize
+ const optimize = _optz === true || _optz === undefined ? 1 : _optz || 0
+ const regExp = o.code?.regExp ?? defaultRegExp
+ const uriResolver = o.uriResolver ?? DefaultUriResolver
+ return {
+ strictSchema: o.strictSchema ?? s ?? true,
+ strictNumbers: o.strictNumbers ?? s ?? true,
+ strictTypes: o.strictTypes ?? s ?? "log",
+ strictTuples: o.strictTuples ?? s ?? "log",
+ strictRequired: o.strictRequired ?? s ?? false,
+ code: o.code ? {...o.code, optimize, regExp} : {optimize, regExp},
+ loopRequired: o.loopRequired ?? MAX_EXPRESSION,
+ loopEnum: o.loopEnum ?? MAX_EXPRESSION,
+ meta: o.meta ?? true,
+ messages: o.messages ?? true,
+ inlineRefs: o.inlineRefs ?? true,
+ schemaId: o.schemaId ?? "$id",
+ addUsedSchema: o.addUsedSchema ?? true,
+ validateSchema: o.validateSchema ?? true,
+ validateFormats: o.validateFormats ?? true,
+ unicodeRegExp: o.unicodeRegExp ?? true,
+ int32range: o.int32range ?? true,
+ uriResolver: uriResolver,
+ }
+}
+
+export interface Logger {
+ log(...args: unknown[]): unknown
+ warn(...args: unknown[]): unknown
+ error(...args: unknown[]): unknown
+}
+
+export default class Ajv {
+ opts: InstanceOptions
+ errors?: ErrorObject[] | null // errors from the last validation
+ logger: Logger
+ // shared external scope values for compiled functions
+ readonly scope: ValueScope
+ readonly schemas: {[Key in string]?: SchemaEnv} = {}
+ readonly refs: {[Ref in string]?: SchemaEnv | string} = {}
+ readonly formats: {[Name in string]?: AddedFormat} = Object.create(null)
+ readonly RULES: ValidationRules
+ readonly _compilations: Set = new Set()
+ private readonly _loading: {[Ref in string]?: Promise} = {}
+ private readonly _cache: Map = new Map()
+ private readonly _metaOpts: InstanceOptions
+
+ static ValidationError = ValidationError
+ static MissingRefError = MissingRefError
+
+ constructor(opts: Options = {}) {
+ opts = this.opts = {...opts, ...requiredOptions(opts)}
+ const {es5, lines} = this.opts.code
+
+ this.scope = new ValueScope({scope: {}, prefixes: EXT_SCOPE_NAMES, es5, lines})
+ this.logger = getLogger(opts.logger)
+ const formatOpt = opts.validateFormats
+ opts.validateFormats = false
+
+ this.RULES = getRules()
+ checkOptions.call(this, removedOptions, opts, "NOT SUPPORTED")
+ checkOptions.call(this, deprecatedOptions, opts, "DEPRECATED", "warn")
+ this._metaOpts = getMetaSchemaOptions.call(this)
+
+ if (opts.formats) addInitialFormats.call(this)
+ this._addVocabularies()
+ this._addDefaultMetaSchema()
+ if (opts.keywords) addInitialKeywords.call(this, opts.keywords)
+ if (typeof opts.meta == "object") this.addMetaSchema(opts.meta)
+ addInitialSchemas.call(this)
+ opts.validateFormats = formatOpt
+ }
+
+ _addVocabularies(): void {
+ this.addKeyword("$async")
+ }
+
+ _addDefaultMetaSchema(): void {
+ const {$data, meta, schemaId} = this.opts
+ let _dataRefSchema: SchemaObject = $dataRefSchema
+ if (schemaId === "id") {
+ _dataRefSchema = {...$dataRefSchema}
+ _dataRefSchema.id = _dataRefSchema.$id
+ delete _dataRefSchema.$id
+ }
+ if (meta && $data) this.addMetaSchema(_dataRefSchema, _dataRefSchema[schemaId], false)
+ }
+
+ defaultMeta(): string | AnySchemaObject | undefined {
+ const {meta, schemaId} = this.opts
+ return (this.opts.defaultMeta = typeof meta == "object" ? meta[schemaId] || meta : undefined)
+ }
+
+ // Validate data using schema
+ // AnySchema will be compiled and cached using schema itself as a key for Map
+ validate(schema: Schema | string, data: unknown): boolean
+ validate(schemaKeyRef: AnySchema | string, data: unknown): boolean | Promise
+ validate(schema: Schema | JSONSchemaType | string, data: unknown): data is T
+ // Separated for type inference to work
+ // eslint-disable-next-line @typescript-eslint/unified-signatures
+ validate(schema: JTDSchemaType, data: unknown): data is T
+ // This overload is only intended for typescript inference, the first
+ // argument prevents manual type annotation from matching this overload
+ // eslint-disable-next-line @typescript-eslint/no-unused-vars
+ validate(
+ schema: T,
+ data: unknown
+ ): data is JTDDataType
+ // eslint-disable-next-line @typescript-eslint/no-redundant-type-constituents
+ validate(schema: AsyncSchema, data: unknown | T): Promise
+ validate(schemaKeyRef: AnySchema | string, data: unknown): data is T | Promise
+ validate(
+ schemaKeyRef: AnySchema | string, // key, ref or schema object
+ // eslint-disable-next-line @typescript-eslint/no-redundant-type-constituents
+ data: unknown | T // to be validated
+ ): boolean | Promise {
+ let v: AnyValidateFunction | undefined
+ if (typeof schemaKeyRef == "string") {
+ v = this.getSchema(schemaKeyRef)
+ if (!v) throw new Error(`no schema with key or ref "${schemaKeyRef}"`)
+ } else {
+ v = this.compile(schemaKeyRef)
+ }
+
+ const valid = v(data)
+ if (!("$async" in v)) this.errors = v.errors
+ return valid
+ }
+
+ // Create validation function for passed schema
+ // _meta: true if schema is a meta-schema. Used internally to compile meta schemas of user-defined keywords.
+ compile(schema: Schema | JSONSchemaType