,
+> {
+ // tslint:disable-next-line callable-types (This is extended from and can't extend from a type alias in ts<2.2)
+ (
+ req: Request,
+ res: Response,
+ next: NextFunction,
+ ): void | Promise;
+}
+
+export type ErrorRequestHandler<
+ P = ParamsDictionary,
+ ResBody = any,
+ ReqBody = any,
+ ReqQuery = ParsedQs,
+ LocalsObj extends Record = Record,
+> = (
+ err: any,
+ req: Request,
+ res: Response,
+ next: NextFunction,
+) => void | Promise;
+
+export type PathParams = string | RegExp | Array;
+
+export type RequestHandlerParams<
+ P = ParamsDictionary,
+ ResBody = any,
+ ReqBody = any,
+ ReqQuery = ParsedQs,
+ LocalsObj extends Record = Record,
+> =
+ | RequestHandler
+ | ErrorRequestHandler
+ | Array | ErrorRequestHandler>;
+
+type RemoveTail = S extends `${infer P}${Tail}` ? P : S;
+type GetRouteParameter = RemoveTail<
+ RemoveTail, `-${string}`>,
+ `.${string}`
+>;
+
+// prettier-ignore
+export type RouteParameters = Route extends `${infer Required}{${infer Optional}}${infer Next}`
+ ? ParseRouteParameters & Partial> & RouteParameters
+ : ParseRouteParameters;
+
+type ParseRouteParameters = string extends Route ? ParamsDictionary
+ : Route extends `${string}(${string}` ? ParamsDictionary // TODO: handling for regex parameters
+ : Route extends `${string}:${infer Rest}` ?
+ & (
+ GetRouteParameter extends never ? ParamsDictionary
+ : GetRouteParameter extends `${infer ParamName}?` ? { [P in ParamName]?: string } // TODO: Remove old `?` handling when Express 5 is promoted to "latest"
+ : { [P in GetRouteParameter]: string }
+ )
+ & (Rest extends `${GetRouteParameter}${infer Next}` ? RouteParameters : unknown)
+ : {};
+
+/* eslint-disable @definitelytyped/no-unnecessary-generics */
+export interface IRouterMatcher<
+ T,
+ Method extends "all" | "get" | "post" | "put" | "delete" | "patch" | "options" | "head" = any,
+> {
+ <
+ Route extends string,
+ P = RouteParameters,
+ ResBody = any,
+ ReqBody = any,
+ ReqQuery = ParsedQs,
+ LocalsObj extends Record = Record,
+ >(
+ // (it's used as the default type parameter for P)
+ path: Route,
+ // (This generic is meant to be passed explicitly.)
+ ...handlers: Array>
+ ): T;
+ <
+ Path extends string,
+ P = RouteParameters,
+ ResBody = any,
+ ReqBody = any,
+ ReqQuery = ParsedQs,
+ LocalsObj extends Record = Record,
+ >(
+ // (it's used as the default type parameter for P)
+ path: Path,
+ // (This generic is meant to be passed explicitly.)
+ ...handlers: Array>
+ ): T;
+ <
+ P = ParamsDictionary,
+ ResBody = any,
+ ReqBody = any,
+ ReqQuery = ParsedQs,
+ LocalsObj extends Record = Record,
+ >(
+ path: PathParams,
+ // (This generic is meant to be passed explicitly.)
+ ...handlers: Array>
+ ): T;
+ <
+ P = ParamsDictionary,
+ ResBody = any,
+ ReqBody = any,
+ ReqQuery = ParsedQs,
+ LocalsObj extends Record = Record,
+ >(
+ path: PathParams,
+ // (This generic is meant to be passed explicitly.)
+ ...handlers: Array>
+ ): T;
+ (path: PathParams, subApplication: Application): T;
+}
+
+export interface IRouterHandler {
+ (...handlers: Array>>): T;
+ (...handlers: Array>>): T;
+ <
+ P = RouteParameters,
+ ResBody = any,
+ ReqBody = any,
+ ReqQuery = ParsedQs,
+ LocalsObj extends Record = Record,
+ >(
+ // (This generic is meant to be passed explicitly.)
+ // eslint-disable-next-line @definitelytyped/no-unnecessary-generics
+ ...handlers: Array>
+ ): T;
+ <
+ P = RouteParameters,
+ ResBody = any,
+ ReqBody = any,
+ ReqQuery = ParsedQs,
+ LocalsObj extends Record = Record,
+ >(
+ // (This generic is meant to be passed explicitly.)
+ // eslint-disable-next-line @definitelytyped/no-unnecessary-generics
+ ...handlers: Array>
+ ): T;
+ <
+ P = ParamsDictionary,
+ ResBody = any,
+ ReqBody = any,
+ ReqQuery = ParsedQs,
+ LocalsObj extends Record = Record,
+ >(
+ // (This generic is meant to be passed explicitly.)
+ // eslint-disable-next-line @definitelytyped/no-unnecessary-generics
+ ...handlers: Array>
+ ): T;
+ <
+ P = ParamsDictionary,
+ ResBody = any,
+ ReqBody = any,
+ ReqQuery = ParsedQs,
+ LocalsObj extends Record = Record,
+ >(
+ // (This generic is meant to be passed explicitly.)
+ // eslint-disable-next-line @definitelytyped/no-unnecessary-generics
+ ...handlers: Array>
+ ): T;
+}
+/* eslint-enable @definitelytyped/no-unnecessary-generics */
+
+export interface IRouter extends RequestHandler {
+ /**
+ * Map the given param placeholder `name`(s) to the given callback(s).
+ *
+ * Parameter mapping is used to provide pre-conditions to routes
+ * which use normalized placeholders. For example a _:user_id_ parameter
+ * could automatically load a user's information from the database without
+ * any additional code,
+ *
+ * The callback uses the samesignature as middleware, the only differencing
+ * being that the value of the placeholder is passed, in this case the _id_
+ * of the user. Once the `next()` function is invoked, just like middleware
+ * it will continue on to execute the route, or subsequent parameter functions.
+ *
+ * app.param('user_id', function(req, res, next, id){
+ * User.find(id, function(err, user){
+ * if (err) {
+ * next(err);
+ * } else if (user) {
+ * req.user = user;
+ * next();
+ * } else {
+ * next(new Error('failed to load user'));
+ * }
+ * });
+ * });
+ */
+ param(name: string, handler: RequestParamHandler): this;
+
+ /**
+ * Special-cased "all" method, applying the given route `path`,
+ * middleware, and callback to _every_ HTTP method.
+ */
+ all: IRouterMatcher;
+ get: IRouterMatcher;
+ post: IRouterMatcher;
+ put: IRouterMatcher;
+ delete: IRouterMatcher;
+ patch: IRouterMatcher;
+ options: IRouterMatcher;
+ head: IRouterMatcher;
+
+ checkout: IRouterMatcher;
+ connect: IRouterMatcher;
+ copy: IRouterMatcher;
+ lock: IRouterMatcher;
+ merge: IRouterMatcher;
+ mkactivity: IRouterMatcher;
+ mkcol: IRouterMatcher;
+ move: IRouterMatcher;
+ "m-search": IRouterMatcher;
+ notify: IRouterMatcher;
+ propfind: IRouterMatcher;
+ proppatch: IRouterMatcher;
+ purge: IRouterMatcher;
+ report: IRouterMatcher;
+ search: IRouterMatcher;
+ subscribe: IRouterMatcher;
+ trace: IRouterMatcher;
+ unlock: IRouterMatcher;
+ unsubscribe: IRouterMatcher;
+ link: IRouterMatcher;
+ unlink: IRouterMatcher;
+
+ use: IRouterHandler & IRouterMatcher;
+
+ route(prefix: T): IRoute;
+ route(prefix: PathParams): IRoute;
+ /**
+ * Stack of configured routes
+ */
+ stack: ILayer[];
+}
+
+export interface ILayer {
+ route?: IRoute;
+ name: string | "";
+ params?: Record;
+ keys: string[];
+ path?: string;
+ method: string;
+ regexp: RegExp;
+ handle: (req: Request, res: Response, next: NextFunction) => any;
+}
+
+export interface IRoute {
+ path: string;
+ stack: ILayer[];
+ all: IRouterHandler;
+ get: IRouterHandler;
+ post: IRouterHandler;
+ put: IRouterHandler;
+ delete: IRouterHandler;
+ patch: IRouterHandler;
+ options: IRouterHandler;
+ head: IRouterHandler;
+
+ checkout: IRouterHandler;
+ copy: IRouterHandler;
+ lock: IRouterHandler;
+ merge: IRouterHandler;
+ mkactivity: IRouterHandler;
+ mkcol: IRouterHandler;
+ move: IRouterHandler;
+ "m-search": IRouterHandler;
+ notify: IRouterHandler;
+ purge: IRouterHandler;
+ report: IRouterHandler;
+ search: IRouterHandler;
+ subscribe: IRouterHandler;
+ trace: IRouterHandler;
+ unlock: IRouterHandler;
+ unsubscribe: IRouterHandler;
+}
+
+export interface Router extends IRouter {}
+
+/**
+ * Options passed down into `res.cookie`
+ * @link https://expressjs.com/en/api.html#res.cookie
+ */
+export interface CookieOptions {
+ /** Convenient option for setting the expiry time relative to the current time in **milliseconds**. */
+ maxAge?: number | undefined;
+ /** Indicates if the cookie should be signed. */
+ signed?: boolean | undefined;
+ /** Expiry date of the cookie in GMT. If not specified (undefined), creates a session cookie. */
+ expires?: Date | undefined;
+ /** Flags the cookie to be accessible only by the web server. */
+ httpOnly?: boolean | undefined;
+ /** Path for the cookie. Defaults to “/”. */
+ path?: string | undefined;
+ /** Domain name for the cookie. Defaults to the domain name of the app. */
+ domain?: string | undefined;
+ /** Marks the cookie to be used with HTTPS only. */
+ secure?: boolean | undefined;
+ /** A synchronous function used for cookie value encoding. Defaults to encodeURIComponent. */
+ encode?: ((val: string) => string) | undefined;
+ /**
+ * Value of the “SameSite” Set-Cookie attribute.
+ * @link https://tools.ietf.org/html/draft-ietf-httpbis-cookie-same-site-00#section-4.1.1.
+ */
+ sameSite?: boolean | "lax" | "strict" | "none" | undefined;
+ /**
+ * Value of the “Priority” Set-Cookie attribute.
+ * @link https://datatracker.ietf.org/doc/html/draft-west-cookie-priority-00#section-4.3
+ */
+ priority?: "low" | "medium" | "high";
+ /** Marks the cookie to use partioned storage. */
+ partitioned?: boolean | undefined;
+}
+
+export interface ByteRange {
+ start: number;
+ end: number;
+}
+
+export interface RequestRanges extends RangeParserRanges {}
+
+export type Errback = (err: Error) => void;
+
+/**
+ * @param P For most requests, this should be `ParamsDictionary`, but if you're
+ * using this in a route handler for a route that uses a `RegExp` or a wildcard
+ * `string` path (e.g. `'/user/*'`), then `req.params` will be an array, in
+ * which case you should use `ParamsArray` instead.
+ *
+ * @see https://expressjs.com/en/api.html#req.params
+ *
+ * @example
+ * app.get('/user/:id', (req, res) => res.send(req.params.id)); // implicitly `ParamsDictionary`
+ * app.get(/user\/(.*)/, (req, res) => res.send(req.params[0]));
+ * app.get('/user/*', (req, res) => res.send(req.params[0]));
+ */
+export interface Request<
+ P = ParamsDictionary,
+ ResBody = any,
+ ReqBody = any,
+ ReqQuery = ParsedQs,
+ LocalsObj extends Record = Record,
+> extends http.IncomingMessage, Express.Request {
+ /**
+ * Return request header.
+ *
+ * The `Referrer` header field is special-cased,
+ * both `Referrer` and `Referer` are interchangeable.
+ *
+ * Examples:
+ *
+ * req.get('Content-Type');
+ * // => "text/plain"
+ *
+ * req.get('content-type');
+ * // => "text/plain"
+ *
+ * req.get('Something');
+ * // => undefined
+ *
+ * Aliased as `req.header()`.
+ */
+ get(name: "set-cookie"): string[] | undefined;
+ get(name: string): string | undefined;
+
+ header(name: "set-cookie"): string[] | undefined;
+ header(name: string): string | undefined;
+
+ /**
+ * 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", a comma-delimted list such as "json, html, text/plain",
+ * 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
+ * req.accepts('html');
+ * // => "html"
+ *
+ * // Accept: text/*, application/json
+ * req.accepts('html');
+ * // => "html"
+ * req.accepts('text/html');
+ * // => "text/html"
+ * req.accepts('json, text');
+ * // => "json"
+ * req.accepts('application/json');
+ * // => "application/json"
+ *
+ * // Accept: text/*, application/json
+ * req.accepts('image/png');
+ * req.accepts('png');
+ * // => false
+ *
+ * // Accept: text/*;q=.5, application/json
+ * req.accepts(['html', 'json']);
+ * req.accepts('html, json');
+ * // => "json"
+ */
+ accepts(): string[];
+ accepts(type: string): string | false;
+ accepts(type: string[]): string | false;
+ accepts(...type: string[]): string | false;
+
+ /**
+ * Returns the first accepted charset of the specified character sets,
+ * based on the request's Accept-Charset HTTP header field.
+ * If none of the specified charsets is accepted, returns false.
+ *
+ * For more information, or if you have issues or concerns, see accepts.
+ */
+ acceptsCharsets(): string[];
+ acceptsCharsets(charset: string): string | false;
+ acceptsCharsets(charset: string[]): string | false;
+ acceptsCharsets(...charset: string[]): string | false;
+
+ /**
+ * Returns the first accepted encoding of the specified encodings,
+ * based on the request's Accept-Encoding HTTP header field.
+ * If none of the specified encodings is accepted, returns false.
+ *
+ * For more information, or if you have issues or concerns, see accepts.
+ */
+ acceptsEncodings(): string[];
+ acceptsEncodings(encoding: string): string | false;
+ acceptsEncodings(encoding: string[]): string | false;
+ acceptsEncodings(...encoding: string[]): string | false;
+
+ /**
+ * Returns the first accepted language of the specified languages,
+ * based on the request's Accept-Language HTTP header field.
+ * If none of the specified languages is accepted, returns false.
+ *
+ * For more information, or if you have issues or concerns, see accepts.
+ */
+ acceptsLanguages(): string[];
+ acceptsLanguages(lang: string): string | false;
+ acceptsLanguages(lang: string[]): string | false;
+ acceptsLanguages(...lang: string[]): string | false;
+
+ /**
+ * Parse Range header field, capping to the given `size`.
+ *
+ * Unspecified ranges such as "0-" require knowledge of your resource length. In
+ * the case of a byte range this is of course the total number of bytes.
+ * If the Range header field is not given `undefined` is returned.
+ * If the Range header field is given, return value is a result of range-parser.
+ * See more ./types/range-parser/index.d.ts
+ *
+ * NOTE: remember that ranges are inclusive, so for example "Range: users=0-3"
+ * should respond with 4 users when available, not 3.
+ */
+ range(size: number, options?: RangeParserOptions): RangeParserRanges | RangeParserResult | undefined;
+
+ /**
+ * Return an array of Accepted media types
+ * ordered from highest quality to lowest.
+ */
+ accepted: MediaType[];
+
+ /**
+ * Check if the incoming request contains the "Content-Type"
+ * header field, and it contains the give mime `type`.
+ *
+ * Examples:
+ *
+ * // With Content-Type: text/html; charset=utf-8
+ * req.is('html');
+ * req.is('text/html');
+ * req.is('text/*');
+ * // => true
+ *
+ * // When Content-Type is application/json
+ * req.is('json');
+ * req.is('application/json');
+ * req.is('application/*');
+ * // => true
+ *
+ * req.is('html');
+ * // => false
+ */
+ is(type: string | string[]): string | false | null;
+
+ /**
+ * Return the protocol string "http" or "https"
+ * when requested with TLS. When the "trust proxy"
+ * setting is enabled the "X-Forwarded-Proto" header
+ * field will be trusted. If you're running behind
+ * a reverse proxy that supplies https for you this
+ * may be enabled.
+ */
+ readonly protocol: string;
+
+ /**
+ * Short-hand for:
+ *
+ * req.protocol == 'https'
+ */
+ readonly secure: boolean;
+
+ /**
+ * Return the remote address, or when
+ * "trust proxy" is `true` return
+ * the upstream addr.
+ *
+ * Value may be undefined if the `req.socket` is destroyed
+ * (for example, if the client disconnected).
+ */
+ readonly ip: string | undefined;
+
+ /**
+ * When "trust proxy" is `true`, parse
+ * the "X-Forwarded-For" ip address list.
+ *
+ * For example if the value were "client, proxy1, proxy2"
+ * you would receive the array `["client", "proxy1", "proxy2"]`
+ * where "proxy2" is the furthest down-stream.
+ */
+ readonly ips: string[];
+
+ /**
+ * Return subdomains as an array.
+ *
+ * Subdomains are the dot-separated parts of the host before the main domain of
+ * the app. By default, the domain of the app is assumed to be the last two
+ * parts of the host. This can be changed by setting "subdomain offset".
+ *
+ * For example, if the domain is "tobi.ferrets.example.com":
+ * If "subdomain offset" is not set, req.subdomains is `["ferrets", "tobi"]`.
+ * If "subdomain offset" is 3, req.subdomains is `["tobi"]`.
+ */
+ readonly subdomains: string[];
+
+ /**
+ * Short-hand for `url.parse(req.url).pathname`.
+ */
+ readonly path: string;
+
+ /**
+ * Contains the hostname derived from the `Host` HTTP header.
+ */
+ readonly hostname: string;
+
+ /**
+ * Contains the host derived from the `Host` HTTP header.
+ */
+ readonly host: string;
+
+ /**
+ * Check if the request is fresh, aka
+ * Last-Modified and/or the ETag
+ * still match.
+ */
+ readonly fresh: boolean;
+
+ /**
+ * Check if the request is stale, aka
+ * "Last-Modified" and / or the "ETag" for the
+ * resource has changed.
+ */
+ readonly stale: boolean;
+
+ /**
+ * Check if the request was an _XMLHttpRequest_.
+ */
+ readonly xhr: boolean;
+
+ // body: { username: string; password: string; remember: boolean; title: string; };
+ body: ReqBody;
+
+ // cookies: { string; remember: boolean; };
+ cookies: any;
+
+ method: string;
+
+ params: P;
+
+ query: ReqQuery;
+
+ route: any;
+
+ signedCookies: any;
+
+ originalUrl: string;
+
+ url: string;
+
+ baseUrl: string;
+
+ app: Application;
+
+ /**
+ * After middleware.init executed, Request will contain res and next properties
+ * See: express/lib/middleware/init.js
+ */
+ res?: Response | undefined;
+ next?: NextFunction | undefined;
+}
+
+export interface MediaType {
+ value: string;
+ quality: number;
+ type: string;
+ subtype: string;
+}
+
+export type Send> = (body?: ResBody) => T;
+
+export interface SendFileOptions extends SendOptions {
+ /** Object containing HTTP headers to serve with the file. */
+ headers?: Record;
+}
+
+export interface DownloadOptions extends SendOptions {
+ /** Object containing HTTP headers to serve with the file. The header `Content-Disposition` will be overridden by the filename argument. */
+ headers?: Record;
+}
+
+export interface Response<
+ ResBody = any,
+ LocalsObj extends Record = Record,
+ StatusCode extends number = number,
+> extends http.ServerResponse, Express.Response {
+ /**
+ * Set status `code`.
+ */
+ status(code: StatusCode): this;
+
+ /**
+ * Set the response HTTP status code to `statusCode` and send its string representation as the response body.
+ * @link http://expressjs.com/4x/api.html#res.sendStatus
+ *
+ * Examples:
+ *
+ * res.sendStatus(200); // equivalent to res.status(200).send('OK')
+ * res.sendStatus(403); // equivalent to res.status(403).send('Forbidden')
+ * res.sendStatus(404); // equivalent to res.status(404).send('Not Found')
+ * res.sendStatus(500); // equivalent to res.status(500).send('Internal Server Error')
+ */
+ sendStatus(code: StatusCode): this;
+
+ /**
+ * Set Link header field with the given `links`.
+ *
+ * Examples:
+ *
+ * res.links({
+ * next: 'http://api.example.com/users?page=2',
+ * last: 'http://api.example.com/users?page=5'
+ * });
+ */
+ links(links: any): this;
+
+ /**
+ * Send a response.
+ *
+ * Examples:
+ *
+ * res.send(new Buffer('wahoo'));
+ * res.send({ some: 'json' });
+ * res.send('some html
');
+ * res.status(404).send('Sorry, cant find that');
+ */
+ send: Send;
+
+ /**
+ * Send JSON response.
+ *
+ * Examples:
+ *
+ * res.json(null);
+ * res.json({ user: 'tj' });
+ * res.status(500).json('oh noes!');
+ * res.status(404).json('I dont have that');
+ */
+ json: Send;
+
+ /**
+ * Send JSON response with JSONP callback support.
+ *
+ * Examples:
+ *
+ * res.jsonp(null);
+ * res.jsonp({ user: 'tj' });
+ * res.status(500).jsonp('oh noes!');
+ * res.status(404).jsonp('I dont have that');
+ */
+ jsonp: Send;
+
+ /**
+ * Transfer the file at the given `path`.
+ *
+ * Automatically sets the _Content-Type_ response header field.
+ * The callback `fn(err)` is invoked when the transfer is complete
+ * or when an error occurs. Be sure to check `res.headersSent`
+ * if you wish to attempt responding, as the header and some data
+ * may have already been transferred.
+ *
+ * Options:
+ *
+ * - `maxAge` defaulting to 0 (can be string converted by `ms`)
+ * - `root` root directory for relative filenames
+ * - `headers` object of headers to serve with file
+ * - `dotfiles` serve dotfiles, defaulting to false; can be `"allow"` to send them
+ *
+ * Other options are passed along to `send`.
+ *
+ * Examples:
+ *
+ * The following example illustrates how `res.sendFile()` may
+ * be used as an alternative for the `static()` middleware for
+ * dynamic situations. The code backing `res.sendFile()` is actually
+ * the same code, so HTTP cache support etc is identical.
+ *
+ * app.get('/user/:uid/photos/:file', function(req, res){
+ * var uid = req.params.uid
+ * , file = req.params.file;
+ *
+ * req.user.mayViewFilesFrom(uid, function(yes){
+ * if (yes) {
+ * res.sendFile('/uploads/' + uid + '/' + file);
+ * } else {
+ * res.send(403, 'Sorry! you cant see that.');
+ * }
+ * });
+ * });
+ *
+ * @api public
+ */
+ sendFile(path: string, fn?: Errback): void;
+ sendFile(path: string, options: SendFileOptions, fn?: Errback): void;
+
+ /**
+ * Transfer the file at the given `path` as an attachment.
+ *
+ * Optionally providing an alternate attachment `filename`,
+ * and optional callback `fn(err)`. The callback is invoked
+ * when the data transfer is complete, or when an error has
+ * ocurred. Be sure to check `res.headersSent` if you plan to respond.
+ *
+ * The optional options argument passes through to the underlying
+ * res.sendFile() call, and takes the exact same parameters.
+ *
+ * This method uses `res.sendFile()`.
+ */
+ download(path: string, fn?: Errback): void;
+ download(path: string, filename: string, fn?: Errback): void;
+ download(path: string, filename: string, options: DownloadOptions, fn?: Errback): void;
+
+ /**
+ * Set _Content-Type_ response header with `type` through `mime.lookup()`
+ * when it does not contain "/", or set the Content-Type to `type` otherwise.
+ *
+ * Examples:
+ *
+ * res.type('.html');
+ * res.type('html');
+ * res.type('json');
+ * res.type('application/json');
+ * res.type('png');
+ */
+ contentType(type: string): this;
+
+ /**
+ * Set _Content-Type_ response header with `type` through `mime.lookup()`
+ * when it does not contain "/", or set the Content-Type to `type` otherwise.
+ *
+ * Examples:
+ *
+ * res.type('.html');
+ * res.type('html');
+ * res.type('json');
+ * res.type('application/json');
+ * res.type('png');
+ */
+ type(type: string): this;
+
+ /**
+ * Respond to the Acceptable formats using an `obj`
+ * of mime-type callbacks.
+ *
+ * This method uses `req.accepted`, an array of
+ * acceptable types ordered by their quality values.
+ * When "Accept" is not present the _first_ callback
+ * is invoked, otherwise the first match is used. When
+ * no match is performed the server responds with
+ * 406 "Not Acceptable".
+ *
+ * Content-Type is set for you, however if you choose
+ * you may alter this within the callback using `res.type()`
+ * or `res.set('Content-Type', ...)`.
+ *
+ * res.format({
+ * 'text/plain': function(){
+ * res.send('hey');
+ * },
+ *
+ * 'text/html': function(){
+ * res.send('hey
');
+ * },
+ *
+ * 'appliation/json': function(){
+ * res.send({ message: 'hey' });
+ * }
+ * });
+ *
+ * In addition to canonicalized MIME types you may
+ * also use extnames mapped to these types:
+ *
+ * res.format({
+ * text: function(){
+ * res.send('hey');
+ * },
+ *
+ * html: function(){
+ * res.send('hey
');
+ * },
+ *
+ * json: function(){
+ * res.send({ message: 'hey' });
+ * }
+ * });
+ *
+ * By default Express passes an `Error`
+ * with a `.status` of 406 to `next(err)`
+ * if a match is not made. If you provide
+ * a `.default` callback it will be invoked
+ * instead.
+ */
+ format(obj: any): this;
+
+ /**
+ * Set _Content-Disposition_ header to _attachment_ with optional `filename`.
+ */
+ attachment(filename?: string): this;
+
+ /**
+ * Set header `field` to `val`, or pass
+ * an object of header fields.
+ *
+ * Examples:
+ *
+ * res.set('Foo', ['bar', 'baz']);
+ * res.set('Accept', 'application/json');
+ * res.set({ Accept: 'text/plain', 'X-API-Key': 'tobi' });
+ *
+ * Aliased as `res.header()`.
+ */
+ set(field: any): this;
+ set(field: string, value?: string | string[]): this;
+
+ header(field: any): this;
+ header(field: string, value?: string | string[]): this;
+
+ // Property indicating if HTTP headers has been sent for the response.
+ headersSent: boolean;
+
+ /** Get value for header `field`. */
+ get(field: string): string | undefined;
+
+ /** Clear cookie `name`. */
+ clearCookie(name: string, options?: CookieOptions): this;
+
+ /**
+ * Set cookie `name` to `val`, with the given `options`.
+ *
+ * Options:
+ *
+ * - `maxAge` max-age in milliseconds, converted to `expires`
+ * - `signed` sign the cookie
+ * - `path` defaults to "/"
+ *
+ * Examples:
+ *
+ * // "Remember Me" for 15 minutes
+ * res.cookie('rememberme', '1', { expires: new Date(Date.now() + 900000), httpOnly: true });
+ *
+ * // save as above
+ * res.cookie('rememberme', '1', { maxAge: 900000, httpOnly: true })
+ */
+ cookie(name: string, val: string, options: CookieOptions): this;
+ cookie(name: string, val: any, options: CookieOptions): this;
+ cookie(name: string, val: any): this;
+
+ /**
+ * Set the location header to `url`.
+ *
+ * Examples:
+ *
+ * res.location('/foo/bar').;
+ * res.location('http://example.com');
+ * res.location('../login'); // /blog/post/1 -> /blog/login
+ *
+ * Mounting:
+ *
+ * When an application is mounted and `res.location()`
+ * is given a path that does _not_ lead with "/" it becomes
+ * relative to the mount-point. For example if the application
+ * is mounted at "/blog", the following would become "/blog/login".
+ *
+ * res.location('login');
+ *
+ * While the leading slash would result in a location of "/login":
+ *
+ * res.location('/login');
+ */
+ location(url: string): this;
+
+ /**
+ * Redirect to the given `url` with optional response `status`
+ * defaulting to 302.
+ *
+ * The resulting `url` is determined by `res.location()`, so
+ * it will play nicely with mounted apps, relative paths, etc.
+ *
+ * Examples:
+ *
+ * res.redirect('/foo/bar');
+ * res.redirect('http://example.com');
+ * res.redirect(301, 'http://example.com');
+ * res.redirect('../login'); // /blog/post/1 -> /blog/login
+ */
+ redirect(url: string): void;
+ redirect(status: number, url: string): void;
+
+ /**
+ * Render `view` with the given `options` and optional callback `fn`.
+ * When a callback function is given a response will _not_ be made
+ * automatically, otherwise a response of _200_ and _text/html_ is given.
+ *
+ * Options:
+ *
+ * - `cache` boolean hinting to the engine it should cache
+ * - `filename` filename of the view being rendered
+ */
+ render(view: string, options?: object, callback?: (err: Error, html: string) => void): void;
+ render(view: string, callback?: (err: Error, html: string) => void): void;
+
+ locals: LocalsObj & Locals;
+
+ charset: string;
+
+ /**
+ * Adds the field to the Vary response header, if it is not there already.
+ * Examples:
+ *
+ * res.vary('User-Agent').render('docs');
+ */
+ vary(field: string): this;
+
+ app: Application;
+
+ /**
+ * Appends the specified value to the HTTP response header field.
+ * If the header is not already set, it creates the header with the specified value.
+ * The value parameter can be a string or an array.
+ *
+ * Note: calling res.set() after res.append() will reset the previously-set header value.
+ *
+ * @since 4.11.0
+ */
+ append(field: string, value?: string[] | string): this;
+
+ /**
+ * After middleware.init executed, Response will contain req property
+ * See: express/lib/middleware/init.js
+ */
+ req: Request;
+}
+
+export interface Handler extends RequestHandler {}
+
+export type RequestParamHandler = (req: Request, res: Response, next: NextFunction, value: any, name: string) => any;
+
+export type ApplicationRequestHandler =
+ & IRouterHandler
+ & IRouterMatcher
+ & ((...handlers: RequestHandlerParams[]) => T);
+
+export interface Application<
+ LocalsObj extends Record = Record,
+> extends EventEmitter, IRouter, Express.Application {
+ /**
+ * Express instance itself is a request handler, which could be invoked without
+ * third argument.
+ */
+ (req: Request | http.IncomingMessage, res: Response | http.ServerResponse): any;
+
+ /**
+ * Initialize the server.
+ *
+ * - setup default configuration
+ * - setup default middleware
+ * - setup route reflection methods
+ */
+ init(): void;
+
+ /**
+ * Initialize application configuration.
+ */
+ defaultConfiguration(): void;
+
+ /**
+ * Register the given template engine callback `fn`
+ * as `ext`.
+ *
+ * By default will `require()` the engine based on the
+ * file extension. For example if you try to render
+ * a "foo.jade" file Express will invoke the following internally:
+ *
+ * app.engine('jade', require('jade').__express);
+ *
+ * For engines that do not provide `.__express` out of the box,
+ * or if you wish to "map" a different extension to the template engine
+ * you may use this method. For example mapping the EJS template engine to
+ * ".html" files:
+ *
+ * app.engine('html', require('ejs').renderFile);
+ *
+ * In this case EJS provides a `.renderFile()` method with
+ * the same signature that Express expects: `(path, options, callback)`,
+ * though note that it aliases this method as `ejs.__express` internally
+ * so if you're using ".ejs" extensions you dont need to do anything.
+ *
+ * Some template engines do not follow this convention, the
+ * [Consolidate.js](https://github.com/visionmedia/consolidate.js)
+ * library was created to map all of node's popular template
+ * engines to follow this convention, thus allowing them to
+ * work seamlessly within Express.
+ */
+ engine(
+ ext: string,
+ fn: (path: string, options: object, callback: (e: any, rendered?: string) => void) => void,
+ ): this;
+
+ /**
+ * Assign `setting` to `val`, or return `setting`'s value.
+ *
+ * app.set('foo', 'bar');
+ * app.get('foo');
+ * // => "bar"
+ * app.set('foo', ['bar', 'baz']);
+ * app.get('foo');
+ * // => ["bar", "baz"]
+ *
+ * Mounted servers inherit their parent server's settings.
+ */
+ set(setting: string, val: any): this;
+ get: ((name: string) => any) & IRouterMatcher;
+
+ param(name: string | string[], handler: RequestParamHandler): this;
+
+ /**
+ * Return the app's absolute pathname
+ * based on the parent(s) that have
+ * mounted it.
+ *
+ * For example if the application was
+ * mounted as "/admin", which itself
+ * was mounted as "/blog" then the
+ * return value would be "/blog/admin".
+ */
+ path(): string;
+
+ /**
+ * Check if `setting` is enabled (truthy).
+ *
+ * app.enabled('foo')
+ * // => false
+ *
+ * app.enable('foo')
+ * app.enabled('foo')
+ * // => true
+ */
+ enabled(setting: string): boolean;
+
+ /**
+ * Check if `setting` is disabled.
+ *
+ * app.disabled('foo')
+ * // => true
+ *
+ * app.enable('foo')
+ * app.disabled('foo')
+ * // => false
+ */
+ disabled(setting: string): boolean;
+
+ /** Enable `setting`. */
+ enable(setting: string): this;
+
+ /** Disable `setting`. */
+ disable(setting: string): this;
+
+ /**
+ * Render the given view `name` name with `options`
+ * and a callback accepting an error and the
+ * rendered template string.
+ *
+ * Example:
+ *
+ * app.render('email', { name: 'Tobi' }, function(err, html){
+ * // ...
+ * })
+ */
+ render(name: string, options?: object, callback?: (err: Error, html: string) => void): void;
+ render(name: string, callback: (err: Error, html: string) => void): void;
+
+ /**
+ * Listen for connections.
+ *
+ * A node `http.Server` is returned, with this
+ * application (which is a `Function`) as its
+ * callback. If you wish to create both an HTTP
+ * and HTTPS server you may do so with the "http"
+ * and "https" modules as shown here:
+ *
+ * var http = require('http')
+ * , https = require('https')
+ * , express = require('express')
+ * , app = express();
+ *
+ * http.createServer(app).listen(80);
+ * https.createServer({ ... }, app).listen(443);
+ */
+ listen(port: number, hostname: string, backlog: number, callback?: (error?: Error) => void): http.Server;
+ listen(port: number, hostname: string, callback?: (error?: Error) => void): http.Server;
+ listen(port: number, callback?: (error?: Error) => void): http.Server;
+ listen(callback?: (error?: Error) => void): http.Server;
+ listen(path: string, callback?: (error?: Error) => void): http.Server;
+ listen(handle: any, listeningListener?: (error?: Error) => void): http.Server;
+
+ router: Router;
+
+ settings: any;
+
+ resource: any;
+
+ map: any;
+
+ locals: LocalsObj & Locals;
+
+ /**
+ * The app.routes object houses all of the routes defined mapped by the
+ * associated HTTP verb. This object may be used for introspection
+ * capabilities, for example Express uses this internally not only for
+ * routing but to provide default OPTIONS behaviour unless app.options()
+ * is used. Your application or framework may also remove routes by
+ * simply by removing them from this object.
+ */
+ routes: any;
+
+ /**
+ * Used to get all registered routes in Express Application
+ */
+ _router: any;
+
+ use: ApplicationRequestHandler;
+
+ /**
+ * The mount event is fired on a sub-app, when it is mounted on a parent app.
+ * The parent app is passed to the callback function.
+ *
+ * NOTE:
+ * Sub-apps will:
+ * - Not inherit the value of settings that have a default value. You must set the value in the sub-app.
+ * - Inherit the value of settings with no default value.
+ */
+ on: (event: string, callback: (parent: Application) => void) => this;
+
+ /**
+ * The app.mountpath property contains one or more path patterns on which a sub-app was mounted.
+ */
+ mountpath: string | string[];
+}
+
+export interface Express extends Application {
+ request: Request;
+ response: Response;
+}
diff --git a/node_modules/@types/express-serve-static-core/package.json b/node_modules/@types/express-serve-static-core/package.json
new file mode 100644
index 0000000..b7ddef6
--- /dev/null
+++ b/node_modules/@types/express-serve-static-core/package.json
@@ -0,0 +1,51 @@
+{
+ "name": "@types/express-serve-static-core",
+ "version": "5.0.6",
+ "description": "TypeScript definitions for express-serve-static-core",
+ "homepage": "https://github.com/DefinitelyTyped/DefinitelyTyped/tree/master/types/express-serve-static-core",
+ "license": "MIT",
+ "contributors": [
+ {
+ "name": "Boris Yankov",
+ "githubUsername": "borisyankov",
+ "url": "https://github.com/borisyankov"
+ },
+ {
+ "name": "Satana Charuwichitratana",
+ "githubUsername": "micksatana",
+ "url": "https://github.com/micksatana"
+ },
+ {
+ "name": "Jose Luis Leon",
+ "githubUsername": "JoseLion",
+ "url": "https://github.com/JoseLion"
+ },
+ {
+ "name": "David Stephens",
+ "githubUsername": "dwrss",
+ "url": "https://github.com/dwrss"
+ },
+ {
+ "name": "Shin Ando",
+ "githubUsername": "andoshin11",
+ "url": "https://github.com/andoshin11"
+ }
+ ],
+ "main": "",
+ "types": "index.d.ts",
+ "repository": {
+ "type": "git",
+ "url": "https://github.com/DefinitelyTyped/DefinitelyTyped.git",
+ "directory": "types/express-serve-static-core"
+ },
+ "scripts": {},
+ "dependencies": {
+ "@types/node": "*",
+ "@types/qs": "*",
+ "@types/range-parser": "*",
+ "@types/send": "*"
+ },
+ "peerDependencies": {},
+ "typesPublisherContentHash": "44d5cdf58e5ee1073bddfbf6110c8e09cc6e0712ad27c9ed54d367643bee193b",
+ "typeScriptVersion": "5.0"
+}
\ No newline at end of file
diff --git a/node_modules/@types/express/LICENSE b/node_modules/@types/express/LICENSE
new file mode 100644
index 0000000..9e841e7
--- /dev/null
+++ b/node_modules/@types/express/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/express/README.md b/node_modules/@types/express/README.md
new file mode 100644
index 0000000..1db5ac5
--- /dev/null
+++ b/node_modules/@types/express/README.md
@@ -0,0 +1,15 @@
+# Installation
+> `npm install --save @types/express`
+
+# Summary
+This package contains type definitions for express (http://expressjs.com).
+
+# Details
+Files were exported from https://github.com/DefinitelyTyped/DefinitelyTyped/tree/master/types/express.
+
+### Additional Details
+ * Last updated: Wed, 19 Mar 2025 19:32:12 GMT
+ * Dependencies: [@types/body-parser](https://npmjs.com/package/@types/body-parser), [@types/express-serve-static-core](https://npmjs.com/package/@types/express-serve-static-core), [@types/serve-static](https://npmjs.com/package/@types/serve-static)
+
+# Credits
+These definitions were written by [Boris Yankov](https://github.com/borisyankov), [China Medical University Hospital](https://github.com/CMUH), [Puneet Arora](https://github.com/puneetar), and [Dylan Frankland](https://github.com/dfrankland).
diff --git a/node_modules/@types/express/index.d.ts b/node_modules/@types/express/index.d.ts
new file mode 100644
index 0000000..1c36585
--- /dev/null
+++ b/node_modules/@types/express/index.d.ts
@@ -0,0 +1,122 @@
+/* =================== USAGE ===================
+
+ import express = require("express");
+ var app = express();
+
+ =============================================== */
+
+///
+///
+
+import * as bodyParser from "body-parser";
+import * as core from "express-serve-static-core";
+import * as serveStatic from "serve-static";
+
+/**
+ * Creates an Express application. The express() function is a top-level function exported by the express module.
+ */
+declare function e(): core.Express;
+
+declare namespace e {
+ /**
+ * This is a built-in middleware function in Express. It parses incoming requests with JSON payloads and is based on body-parser.
+ * @since 4.16.0
+ */
+ var json: typeof bodyParser.json;
+
+ /**
+ * This is a built-in middleware function in Express. It parses incoming requests with Buffer payloads and is based on body-parser.
+ * @since 4.17.0
+ */
+ var raw: typeof bodyParser.raw;
+
+ /**
+ * This is a built-in middleware function in Express. It parses incoming requests with text payloads and is based on body-parser.
+ * @since 4.17.0
+ */
+ var text: typeof bodyParser.text;
+
+ /**
+ * These are the exposed prototypes.
+ */
+ var application: Application;
+ var request: Request;
+ var response: Response;
+
+ /**
+ * This is a built-in middleware function in Express. It serves static files and is based on serve-static.
+ */
+ var static: serveStatic.RequestHandlerConstructor;
+
+ /**
+ * This is a built-in middleware function in Express. It parses incoming requests with urlencoded payloads and is based on body-parser.
+ * @since 4.16.0
+ */
+ var urlencoded: typeof bodyParser.urlencoded;
+
+ export function Router(options?: RouterOptions): core.Router;
+
+ interface RouterOptions {
+ /**
+ * Enable case sensitivity.
+ */
+ caseSensitive?: boolean | undefined;
+
+ /**
+ * Preserve the req.params values from the parent router.
+ * If the parent and the child have conflicting param names, the child’s value take precedence.
+ *
+ * @default false
+ * @since 4.5.0
+ */
+ mergeParams?: boolean | undefined;
+
+ /**
+ * Enable strict routing.
+ */
+ strict?: boolean | undefined;
+ }
+
+ interface Application extends core.Application {}
+ interface CookieOptions extends core.CookieOptions {}
+ interface Errback extends core.Errback {}
+ interface ErrorRequestHandler<
+ P = core.ParamsDictionary,
+ ResBody = any,
+ ReqBody = any,
+ ReqQuery = core.Query,
+ Locals extends Record = Record,
+ > extends core.ErrorRequestHandler {}
+ interface Express extends core.Express {}
+ interface Handler extends core.Handler {}
+ interface IRoute extends core.IRoute {}
+ interface IRouter extends core.IRouter {}
+ interface IRouterHandler extends core.IRouterHandler {}
+ interface IRouterMatcher extends core.IRouterMatcher {}
+ interface MediaType extends core.MediaType {}
+ interface NextFunction extends core.NextFunction {}
+ interface Locals extends core.Locals {}
+ interface Request<
+ P = core.ParamsDictionary,
+ ResBody = any,
+ ReqBody = any,
+ ReqQuery = core.Query,
+ Locals extends Record = Record,
+ > extends core.Request {}
+ interface RequestHandler<
+ P = core.ParamsDictionary,
+ ResBody = any,
+ ReqBody = any,
+ ReqQuery = core.Query,
+ Locals extends Record = Record,
+ > extends core.RequestHandler {}
+ interface RequestParamHandler extends core.RequestParamHandler {}
+ interface Response<
+ ResBody = any,
+ Locals extends Record = Record,
+ > extends core.Response {}
+ interface Router extends core.Router {}
+ interface Send extends core.Send {}
+}
+
+export = e;
diff --git a/node_modules/@types/express/package.json b/node_modules/@types/express/package.json
new file mode 100644
index 0000000..d6480cb
--- /dev/null
+++ b/node_modules/@types/express/package.json
@@ -0,0 +1,45 @@
+{
+ "name": "@types/express",
+ "version": "5.0.1",
+ "description": "TypeScript definitions for express",
+ "homepage": "https://github.com/DefinitelyTyped/DefinitelyTyped/tree/master/types/express",
+ "license": "MIT",
+ "contributors": [
+ {
+ "name": "Boris Yankov",
+ "githubUsername": "borisyankov",
+ "url": "https://github.com/borisyankov"
+ },
+ {
+ "name": "China Medical University Hospital",
+ "githubUsername": "CMUH",
+ "url": "https://github.com/CMUH"
+ },
+ {
+ "name": "Puneet Arora",
+ "githubUsername": "puneetar",
+ "url": "https://github.com/puneetar"
+ },
+ {
+ "name": "Dylan Frankland",
+ "githubUsername": "dfrankland",
+ "url": "https://github.com/dfrankland"
+ }
+ ],
+ "main": "",
+ "types": "index.d.ts",
+ "repository": {
+ "type": "git",
+ "url": "https://github.com/DefinitelyTyped/DefinitelyTyped.git",
+ "directory": "types/express"
+ },
+ "scripts": {},
+ "dependencies": {
+ "@types/body-parser": "*",
+ "@types/express-serve-static-core": "^5.0.0",
+ "@types/serve-static": "*"
+ },
+ "peerDependencies": {},
+ "typesPublisherContentHash": "fc4e2b97399a28edf0ea8af60a18a56b71622eab908009e7e3a18677f98a80d8",
+ "typeScriptVersion": "5.0"
+}
\ No newline at end of file
diff --git a/node_modules/@types/http-errors/LICENSE b/node_modules/@types/http-errors/LICENSE
new file mode 100644
index 0000000..9e841e7
--- /dev/null
+++ b/node_modules/@types/http-errors/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/http-errors/README.md b/node_modules/@types/http-errors/README.md
new file mode 100644
index 0000000..0de5402
--- /dev/null
+++ b/node_modules/@types/http-errors/README.md
@@ -0,0 +1,15 @@
+# Installation
+> `npm install --save @types/http-errors`
+
+# Summary
+This package contains type definitions for http-errors (https://github.com/jshttp/http-errors).
+
+# Details
+Files were exported from https://github.com/DefinitelyTyped/DefinitelyTyped/tree/master/types/http-errors.
+
+### Additional Details
+ * Last updated: Tue, 07 Nov 2023 03:09:37 GMT
+ * Dependencies: none
+
+# Credits
+These definitions were written by [Tanguy Krotoff](https://github.com/tkrotoff), and [BendingBender](https://github.com/BendingBender).
diff --git a/node_modules/@types/http-errors/index.d.ts b/node_modules/@types/http-errors/index.d.ts
new file mode 100644
index 0000000..e7fb2a8
--- /dev/null
+++ b/node_modules/@types/http-errors/index.d.ts
@@ -0,0 +1,77 @@
+export = createHttpError;
+
+declare const createHttpError: createHttpError.CreateHttpError & createHttpError.NamedConstructors & {
+ isHttpError: createHttpError.IsHttpError;
+};
+
+declare namespace createHttpError {
+ interface HttpError extends Error {
+ status: N;
+ statusCode: N;
+ expose: boolean;
+ headers?: {
+ [key: string]: string;
+ } | undefined;
+ [key: string]: any;
+ }
+
+ type UnknownError = Error | string | { [key: string]: any };
+
+ interface HttpErrorConstructor {
+ (msg?: string): HttpError;
+ new(msg?: string): HttpError;
+ }
+
+ interface CreateHttpError {
+ (arg: N, ...rest: UnknownError[]): HttpError;
+ (...rest: UnknownError[]): HttpError;
+ }
+
+ type IsHttpError = (error: unknown) => error is HttpError;
+
+ type NamedConstructors =
+ & {
+ HttpError: HttpErrorConstructor;
+ }
+ & Record<"BadRequest" | "400", HttpErrorConstructor<400>>
+ & Record<"Unauthorized" | "401", HttpErrorConstructor<401>>
+ & Record<"PaymentRequired" | "402", HttpErrorConstructor<402>>
+ & Record<"Forbidden" | "403", HttpErrorConstructor<403>>
+ & Record<"NotFound" | "404", HttpErrorConstructor<404>>
+ & Record<"MethodNotAllowed" | "405", HttpErrorConstructor<405>>
+ & Record<"NotAcceptable" | "406", HttpErrorConstructor<406>>
+ & Record<"ProxyAuthenticationRequired" | "407", HttpErrorConstructor<407>>
+ & Record<"RequestTimeout" | "408", HttpErrorConstructor<408>>
+ & Record<"Conflict" | "409", HttpErrorConstructor<409>>
+ & Record<"Gone" | "410", HttpErrorConstructor<410>>
+ & Record<"LengthRequired" | "411", HttpErrorConstructor<411>>
+ & Record<"PreconditionFailed" | "412", HttpErrorConstructor<412>>
+ & Record<"PayloadTooLarge" | "413", HttpErrorConstructor<413>>
+ & Record<"URITooLong" | "414", HttpErrorConstructor<414>>
+ & Record<"UnsupportedMediaType" | "415", HttpErrorConstructor<415>>
+ & Record<"RangeNotSatisfiable" | "416", HttpErrorConstructor<416>>
+ & Record<"ExpectationFailed" | "417", HttpErrorConstructor<417>>
+ & Record<"ImATeapot" | "418", HttpErrorConstructor<418>>
+ & Record<"MisdirectedRequest" | "421", HttpErrorConstructor<421>>
+ & Record<"UnprocessableEntity" | "422", HttpErrorConstructor<422>>
+ & Record<"Locked" | "423", HttpErrorConstructor<423>>
+ & Record<"FailedDependency" | "424", HttpErrorConstructor<424>>
+ & Record<"TooEarly" | "425", HttpErrorConstructor<425>>
+ & Record<"UpgradeRequired" | "426", HttpErrorConstructor<426>>
+ & Record<"PreconditionRequired" | "428", HttpErrorConstructor<428>>
+ & Record<"TooManyRequests" | "429", HttpErrorConstructor<429>>
+ & Record<"RequestHeaderFieldsTooLarge" | "431", HttpErrorConstructor<431>>
+ & Record<"UnavailableForLegalReasons" | "451", HttpErrorConstructor<451>>
+ & Record<"InternalServerError" | "500", HttpErrorConstructor<500>>
+ & Record<"NotImplemented" | "501", HttpErrorConstructor<501>>
+ & Record<"BadGateway" | "502", HttpErrorConstructor<502>>
+ & Record<"ServiceUnavailable" | "503", HttpErrorConstructor<503>>
+ & Record<"GatewayTimeout" | "504", HttpErrorConstructor<504>>
+ & Record<"HTTPVersionNotSupported" | "505", HttpErrorConstructor<505>>
+ & Record<"VariantAlsoNegotiates" | "506", HttpErrorConstructor<506>>
+ & Record<"InsufficientStorage" | "507", HttpErrorConstructor<507>>
+ & Record<"LoopDetected" | "508", HttpErrorConstructor<508>>
+ & Record<"BandwidthLimitExceeded" | "509", HttpErrorConstructor<509>>
+ & Record<"NotExtended" | "510", HttpErrorConstructor<510>>
+ & Record<"NetworkAuthenticationRequire" | "511", HttpErrorConstructor<511>>;
+}
diff --git a/node_modules/@types/http-errors/package.json b/node_modules/@types/http-errors/package.json
new file mode 100644
index 0000000..247f9d4
--- /dev/null
+++ b/node_modules/@types/http-errors/package.json
@@ -0,0 +1,30 @@
+{
+ "name": "@types/http-errors",
+ "version": "2.0.4",
+ "description": "TypeScript definitions for http-errors",
+ "homepage": "https://github.com/DefinitelyTyped/DefinitelyTyped/tree/master/types/http-errors",
+ "license": "MIT",
+ "contributors": [
+ {
+ "name": "Tanguy Krotoff",
+ "githubUsername": "tkrotoff",
+ "url": "https://github.com/tkrotoff"
+ },
+ {
+ "name": "BendingBender",
+ "githubUsername": "BendingBender",
+ "url": "https://github.com/BendingBender"
+ }
+ ],
+ "main": "",
+ "types": "index.d.ts",
+ "repository": {
+ "type": "git",
+ "url": "https://github.com/DefinitelyTyped/DefinitelyTyped.git",
+ "directory": "types/http-errors"
+ },
+ "scripts": {},
+ "dependencies": {},
+ "typesPublisherContentHash": "06e33723b60f818facd3b7dd2025f043142fb7c56ab4832babafeb9470f2086f",
+ "typeScriptVersion": "4.5"
+}
\ No newline at end of file
diff --git a/node_modules/@types/mime/LICENSE b/node_modules/@types/mime/LICENSE
new file mode 100644
index 0000000..9e841e7
--- /dev/null
+++ b/node_modules/@types/mime/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/mime/Mime.d.ts b/node_modules/@types/mime/Mime.d.ts
new file mode 100644
index 0000000..a516bd4
--- /dev/null
+++ b/node_modules/@types/mime/Mime.d.ts
@@ -0,0 +1,10 @@
+import { TypeMap } from "./index";
+
+export default class Mime {
+ constructor(mimes: TypeMap);
+
+ lookup(path: string, fallback?: string): string;
+ extension(mime: string): string | undefined;
+ load(filepath: string): void;
+ define(mimes: TypeMap): void;
+}
diff --git a/node_modules/@types/mime/README.md b/node_modules/@types/mime/README.md
new file mode 100644
index 0000000..a08301c
--- /dev/null
+++ b/node_modules/@types/mime/README.md
@@ -0,0 +1,15 @@
+# Installation
+> `npm install --save @types/mime`
+
+# Summary
+This package contains type definitions for mime (https://github.com/broofa/node-mime).
+
+# Details
+Files were exported from https://github.com/DefinitelyTyped/DefinitelyTyped/tree/master/types/mime/v1.
+
+### Additional Details
+ * Last updated: Tue, 07 Nov 2023 20:08:00 GMT
+ * Dependencies: none
+
+# Credits
+These definitions were written by [Jeff Goddard](https://github.com/jedigo), and [Daniel Hritzkiv](https://github.com/dhritzkiv).
diff --git a/node_modules/@types/mime/index.d.ts b/node_modules/@types/mime/index.d.ts
new file mode 100644
index 0000000..93e8259
--- /dev/null
+++ b/node_modules/@types/mime/index.d.ts
@@ -0,0 +1,31 @@
+// Originally imported from: https://github.com/soywiz/typescript-node-definitions/mime.d.ts
+
+export as namespace mime;
+
+export interface TypeMap {
+ [key: string]: string[];
+}
+
+/**
+ * Look up a mime type based on extension.
+ *
+ * If not found, uses the fallback argument if provided, and otherwise
+ * uses `default_type`.
+ */
+export function lookup(path: string, fallback?: string): string;
+/**
+ * Return a file extensions associated with a mime type.
+ */
+export function extension(mime: string): string | undefined;
+/**
+ * Load an Apache2-style ".types" file.
+ */
+export function load(filepath: string): void;
+export function define(mimes: TypeMap): void;
+
+export interface Charsets {
+ lookup(mime: string, fallback: string): string;
+}
+
+export const charsets: Charsets;
+export const default_type: string;
diff --git a/node_modules/@types/mime/lite.d.ts b/node_modules/@types/mime/lite.d.ts
new file mode 100644
index 0000000..ffebaec
--- /dev/null
+++ b/node_modules/@types/mime/lite.d.ts
@@ -0,0 +1,7 @@
+import { default as Mime } from "./Mime";
+
+declare const mimelite: Mime;
+
+export as namespace mimelite;
+
+export = mimelite;
diff --git a/node_modules/@types/mime/package.json b/node_modules/@types/mime/package.json
new file mode 100644
index 0000000..98a29ff
--- /dev/null
+++ b/node_modules/@types/mime/package.json
@@ -0,0 +1,30 @@
+{
+ "name": "@types/mime",
+ "version": "1.3.5",
+ "description": "TypeScript definitions for mime",
+ "homepage": "https://github.com/DefinitelyTyped/DefinitelyTyped/tree/master/types/mime",
+ "license": "MIT",
+ "contributors": [
+ {
+ "name": "Jeff Goddard",
+ "githubUsername": "jedigo",
+ "url": "https://github.com/jedigo"
+ },
+ {
+ "name": "Daniel Hritzkiv",
+ "githubUsername": "dhritzkiv",
+ "url": "https://github.com/dhritzkiv"
+ }
+ ],
+ "main": "",
+ "types": "index.d.ts",
+ "repository": {
+ "type": "git",
+ "url": "https://github.com/DefinitelyTyped/DefinitelyTyped.git",
+ "directory": "types/mime"
+ },
+ "scripts": {},
+ "dependencies": {},
+ "typesPublisherContentHash": "2ad7ee9a549e6721825e733c6a1a7e8bee0ca7ba93d9ab922c8f4558def52d77",
+ "typeScriptVersion": "4.5"
+}
\ No newline at end of file
diff --git a/node_modules/@types/qs/LICENSE b/node_modules/@types/qs/LICENSE
new file mode 100644
index 0000000..9e841e7
--- /dev/null
+++ b/node_modules/@types/qs/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/qs/README.md b/node_modules/@types/qs/README.md
new file mode 100644
index 0000000..eb2fe69
--- /dev/null
+++ b/node_modules/@types/qs/README.md
@@ -0,0 +1,15 @@
+# Installation
+> `npm install --save @types/qs`
+
+# Summary
+This package contains type definitions for qs (https://github.com/ljharb/qs).
+
+# Details
+Files were exported from https://github.com/DefinitelyTyped/DefinitelyTyped/tree/master/types/qs.
+
+### Additional Details
+ * Last updated: Tue, 14 Jan 2025 01:30:27 GMT
+ * Dependencies: none
+
+# Credits
+These definitions were written by [Roman Korneev](https://github.com/RWander), [Leon Yu](https://github.com/leonyu), [Belinda Teh](https://github.com/tehbelinda), [Melvin Lee](https://github.com/zyml), [Arturs Vonda](https://github.com/artursvonda), [Carlos Bonetti](https://github.com/CarlosBonetti), [Dan Smith](https://github.com/dpsmith3), [Hunter Perrin](https://github.com/hperrin), and [Jordan Harband](https://github.com/ljharb).
diff --git a/node_modules/@types/qs/index.d.ts b/node_modules/@types/qs/index.d.ts
new file mode 100644
index 0000000..972edda
--- /dev/null
+++ b/node_modules/@types/qs/index.d.ts
@@ -0,0 +1,81 @@
+export = QueryString;
+export as namespace qs;
+
+declare namespace QueryString {
+ type defaultEncoder = (str: any, defaultEncoder?: any, charset?: string) => string;
+ type defaultDecoder = (str: string, decoder?: any, charset?: string) => string;
+
+ type BooleanOptional = boolean | undefined;
+
+ interface IStringifyBaseOptions {
+ delimiter?: string | undefined;
+ strictNullHandling?: boolean | undefined;
+ skipNulls?: boolean | undefined;
+ encode?: boolean | undefined;
+ encoder?:
+ | ((str: any, defaultEncoder: defaultEncoder, charset: string, type: "key" | "value") => string)
+ | undefined;
+ filter?: Array | ((prefix: string, value: any) => any) | undefined;
+ arrayFormat?: "indices" | "brackets" | "repeat" | "comma" | undefined;
+ indices?: boolean | undefined;
+ sort?: ((a: string, b: string) => number) | undefined;
+ serializeDate?: ((d: Date) => string) | undefined;
+ format?: "RFC1738" | "RFC3986" | undefined;
+ encodeValuesOnly?: boolean | undefined;
+ addQueryPrefix?: boolean | undefined;
+ charset?: "utf-8" | "iso-8859-1" | undefined;
+ charsetSentinel?: boolean | undefined;
+ allowEmptyArrays?: boolean | undefined;
+ commaRoundTrip?: boolean | undefined;
+ }
+
+ type IStringifyDynamicOptions = AllowDots extends true
+ ? { allowDots?: AllowDots; encodeDotInKeys?: boolean }
+ : { allowDots?: boolean; encodeDotInKeys?: false };
+
+ type IStringifyOptions =
+ & IStringifyBaseOptions
+ & IStringifyDynamicOptions;
+
+ interface IParseBaseOptions {
+ comma?: boolean | undefined;
+ delimiter?: string | RegExp | undefined;
+ depth?: number | false | undefined;
+ decoder?:
+ | ((str: string, defaultDecoder: defaultDecoder, charset: string, type: "key" | "value") => any)
+ | undefined;
+ arrayLimit?: number | undefined;
+ parseArrays?: boolean | undefined;
+ plainObjects?: boolean | undefined;
+ allowPrototypes?: boolean | undefined;
+ allowSparse?: boolean | undefined;
+ parameterLimit?: number | undefined;
+ strictNullHandling?: boolean | undefined;
+ ignoreQueryPrefix?: boolean | undefined;
+ charset?: "utf-8" | "iso-8859-1" | undefined;
+ charsetSentinel?: boolean | undefined;
+ interpretNumericEntities?: boolean | undefined;
+ allowEmptyArrays?: boolean | undefined;
+ duplicates?: "combine" | "first" | "last" | undefined;
+ strictDepth?: boolean | undefined;
+ }
+
+ type IParseDynamicOptions = AllowDots extends true
+ ? { allowDots?: AllowDots; decodeDotInKeys?: boolean }
+ : { allowDots?: boolean; decodeDotInKeys?: false };
+
+ type IParseOptions =
+ & IParseBaseOptions
+ & IParseDynamicOptions;
+
+ interface ParsedQs {
+ [key: string]: undefined | string | ParsedQs | (string | ParsedQs)[];
+ }
+
+ function stringify(obj: any, options?: IStringifyOptions): string;
+ function parse(str: string, options?: IParseOptions & { decoder?: never | undefined }): ParsedQs;
+ function parse(
+ str: string | Record,
+ options?: IParseOptions,
+ ): { [key: string]: unknown };
+}
diff --git a/node_modules/@types/qs/package.json b/node_modules/@types/qs/package.json
new file mode 100644
index 0000000..0b58187
--- /dev/null
+++ b/node_modules/@types/qs/package.json
@@ -0,0 +1,66 @@
+{
+ "name": "@types/qs",
+ "version": "6.9.18",
+ "description": "TypeScript definitions for qs",
+ "homepage": "https://github.com/DefinitelyTyped/DefinitelyTyped/tree/master/types/qs",
+ "license": "MIT",
+ "contributors": [
+ {
+ "name": "Roman Korneev",
+ "githubUsername": "RWander",
+ "url": "https://github.com/RWander"
+ },
+ {
+ "name": "Leon Yu",
+ "githubUsername": "leonyu",
+ "url": "https://github.com/leonyu"
+ },
+ {
+ "name": "Belinda Teh",
+ "githubUsername": "tehbelinda",
+ "url": "https://github.com/tehbelinda"
+ },
+ {
+ "name": "Melvin Lee",
+ "githubUsername": "zyml",
+ "url": "https://github.com/zyml"
+ },
+ {
+ "name": "Arturs Vonda",
+ "githubUsername": "artursvonda",
+ "url": "https://github.com/artursvonda"
+ },
+ {
+ "name": "Carlos Bonetti",
+ "githubUsername": "CarlosBonetti",
+ "url": "https://github.com/CarlosBonetti"
+ },
+ {
+ "name": "Dan Smith",
+ "githubUsername": "dpsmith3",
+ "url": "https://github.com/dpsmith3"
+ },
+ {
+ "name": "Hunter Perrin",
+ "githubUsername": "hperrin",
+ "url": "https://github.com/hperrin"
+ },
+ {
+ "name": "Jordan Harband",
+ "githubUsername": "ljharb",
+ "url": "https://github.com/ljharb"
+ }
+ ],
+ "main": "",
+ "types": "index.d.ts",
+ "repository": {
+ "type": "git",
+ "url": "https://github.com/DefinitelyTyped/DefinitelyTyped.git",
+ "directory": "types/qs"
+ },
+ "scripts": {},
+ "dependencies": {},
+ "peerDependencies": {},
+ "typesPublisherContentHash": "2b3ee00ab119740c8d250fb641a3ab35b4a40a86c735d92f5d6ca12894a1ec0f",
+ "typeScriptVersion": "5.0"
+}
\ No newline at end of file
diff --git a/node_modules/@types/range-parser/LICENSE b/node_modules/@types/range-parser/LICENSE
new file mode 100644
index 0000000..9e841e7
--- /dev/null
+++ b/node_modules/@types/range-parser/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/range-parser/README.md b/node_modules/@types/range-parser/README.md
new file mode 100644
index 0000000..6ab8b0b
--- /dev/null
+++ b/node_modules/@types/range-parser/README.md
@@ -0,0 +1,53 @@
+# Installation
+> `npm install --save @types/range-parser`
+
+# Summary
+This package contains type definitions for range-parser (https://github.com/jshttp/range-parser).
+
+# Details
+Files were exported from https://github.com/DefinitelyTyped/DefinitelyTyped/tree/master/types/range-parser.
+## [index.d.ts](https://github.com/DefinitelyTyped/DefinitelyTyped/tree/master/types/range-parser/index.d.ts)
+````ts
+/**
+ * When ranges are returned, the array has a "type" property which is the type of
+ * range that is required (most commonly, "bytes"). Each array element is an object
+ * with a "start" and "end" property for the portion of the range.
+ *
+ * @returns `-1` when unsatisfiable and `-2` when syntactically invalid, ranges otherwise.
+ */
+declare function RangeParser(
+ size: number,
+ str: string,
+ options?: RangeParser.Options,
+): RangeParser.Result | RangeParser.Ranges;
+
+declare namespace RangeParser {
+ interface Ranges extends Array {
+ type: string;
+ }
+ interface Range {
+ start: number;
+ end: number;
+ }
+ interface Options {
+ /**
+ * The "combine" option can be set to `true` and overlapping & adjacent ranges
+ * will be combined into a single range.
+ */
+ combine?: boolean | undefined;
+ }
+ type ResultUnsatisfiable = -1;
+ type ResultInvalid = -2;
+ type Result = ResultUnsatisfiable | ResultInvalid;
+}
+
+export = RangeParser;
+
+````
+
+### Additional Details
+ * Last updated: Tue, 07 Nov 2023 09:09:39 GMT
+ * Dependencies: none
+
+# Credits
+These definitions were written by [Tomek Łaziuk](https://github.com/tlaziuk).
diff --git a/node_modules/@types/range-parser/index.d.ts b/node_modules/@types/range-parser/index.d.ts
new file mode 100644
index 0000000..f6baed8
--- /dev/null
+++ b/node_modules/@types/range-parser/index.d.ts
@@ -0,0 +1,34 @@
+/**
+ * When ranges are returned, the array has a "type" property which is the type of
+ * range that is required (most commonly, "bytes"). Each array element is an object
+ * with a "start" and "end" property for the portion of the range.
+ *
+ * @returns `-1` when unsatisfiable and `-2` when syntactically invalid, ranges otherwise.
+ */
+declare function RangeParser(
+ size: number,
+ str: string,
+ options?: RangeParser.Options,
+): RangeParser.Result | RangeParser.Ranges;
+
+declare namespace RangeParser {
+ interface Ranges extends Array {
+ type: string;
+ }
+ interface Range {
+ start: number;
+ end: number;
+ }
+ interface Options {
+ /**
+ * The "combine" option can be set to `true` and overlapping & adjacent ranges
+ * will be combined into a single range.
+ */
+ combine?: boolean | undefined;
+ }
+ type ResultUnsatisfiable = -1;
+ type ResultInvalid = -2;
+ type Result = ResultUnsatisfiable | ResultInvalid;
+}
+
+export = RangeParser;
diff --git a/node_modules/@types/range-parser/package.json b/node_modules/@types/range-parser/package.json
new file mode 100644
index 0000000..d43f781
--- /dev/null
+++ b/node_modules/@types/range-parser/package.json
@@ -0,0 +1,25 @@
+{
+ "name": "@types/range-parser",
+ "version": "1.2.7",
+ "description": "TypeScript definitions for range-parser",
+ "homepage": "https://github.com/DefinitelyTyped/DefinitelyTyped/tree/master/types/range-parser",
+ "license": "MIT",
+ "contributors": [
+ {
+ "name": "Tomek Łaziuk",
+ "githubUsername": "tlaziuk",
+ "url": "https://github.com/tlaziuk"
+ }
+ ],
+ "main": "",
+ "types": "index.d.ts",
+ "repository": {
+ "type": "git",
+ "url": "https://github.com/DefinitelyTyped/DefinitelyTyped.git",
+ "directory": "types/range-parser"
+ },
+ "scripts": {},
+ "dependencies": {},
+ "typesPublisherContentHash": "85ed88e3afe8da85360c400901b67e99a7c6690c6376c5ab8939ae9dee4b0a93",
+ "typeScriptVersion": "4.5"
+}
\ No newline at end of file
diff --git a/node_modules/@types/send/LICENSE b/node_modules/@types/send/LICENSE
new file mode 100644
index 0000000..9e841e7
--- /dev/null
+++ b/node_modules/@types/send/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/send/README.md b/node_modules/@types/send/README.md
new file mode 100644
index 0000000..2a4056a
--- /dev/null
+++ b/node_modules/@types/send/README.md
@@ -0,0 +1,15 @@
+# Installation
+> `npm install --save @types/send`
+
+# Summary
+This package contains type definitions for send (https://github.com/pillarjs/send).
+
+# Details
+Files were exported from https://github.com/DefinitelyTyped/DefinitelyTyped/tree/master/types/send.
+
+### Additional Details
+ * Last updated: Tue, 07 Nov 2023 15:11:36 GMT
+ * Dependencies: [@types/mime](https://npmjs.com/package/@types/mime), [@types/node](https://npmjs.com/package/@types/node)
+
+# Credits
+These definitions were written by [Mike Jerred](https://github.com/MikeJerred), and [Piotr Błażejewicz](https://github.com/peterblazejewicz).
diff --git a/node_modules/@types/send/index.d.ts b/node_modules/@types/send/index.d.ts
new file mode 100644
index 0000000..6d624bb
--- /dev/null
+++ b/node_modules/@types/send/index.d.ts
@@ -0,0 +1,225 @@
+///
+
+import * as fs from "fs";
+import * as m from "mime";
+import * as stream from "stream";
+
+/**
+ * Create a new SendStream for the given path to send to a res.
+ * The req is the Node.js HTTP request and the path is a urlencoded path to send (urlencoded, not the actual file-system path).
+ */
+declare function send(req: stream.Readable, path: string, options?: send.SendOptions): send.SendStream;
+
+declare namespace send {
+ const mime: typeof m;
+ interface SendOptions {
+ /**
+ * Enable or disable accepting ranged requests, defaults to true.
+ * Disabling this will not send Accept-Ranges and ignore the contents of the Range request header.
+ */
+ acceptRanges?: boolean | undefined;
+
+ /**
+ * Enable or disable setting Cache-Control response header, defaults to true.
+ * Disabling this will ignore the maxAge option.
+ */
+ cacheControl?: boolean | undefined;
+
+ /**
+ * Set how "dotfiles" are treated when encountered.
+ * A dotfile is a file or directory that begins with a dot (".").
+ * Note this check is done on the path itself without checking if the path actually exists on the disk.
+ * If root is specified, only the dotfiles above the root are checked (i.e. the root itself can be within a dotfile when when set to "deny").
+ * 'allow' No special treatment for dotfiles.
+ * 'deny' Send a 403 for any request for a dotfile.
+ * 'ignore' Pretend like the dotfile does not exist and 404.
+ * The default value is similar to 'ignore', with the exception that this default will not ignore the files within a directory that begins with a dot, for backward-compatibility.
+ */
+ dotfiles?: "allow" | "deny" | "ignore" | undefined;
+
+ /**
+ * Byte offset at which the stream ends, defaults to the length of the file minus 1.
+ * The end is inclusive in the stream, meaning end: 3 will include the 4th byte in the stream.
+ */
+ end?: number | undefined;
+
+ /**
+ * Enable or disable etag generation, defaults to true.
+ */
+ etag?: boolean | undefined;
+
+ /**
+ * If a given file doesn't exist, try appending one of the given extensions, in the given order.
+ * By default, this is disabled (set to false).
+ * An example value that will serve extension-less HTML files: ['html', 'htm'].
+ * This is skipped if the requested file already has an extension.
+ */
+ extensions?: string[] | string | boolean | undefined;
+
+ /**
+ * Enable or disable the immutable directive in the Cache-Control response header, defaults to false.
+ * If set to true, the maxAge option should also be specified to enable caching.
+ * The immutable directive will prevent supported clients from making conditional requests during the life of the maxAge option to check if the file has changed.
+ * @default false
+ */
+ immutable?: boolean | undefined;
+
+ /**
+ * By default send supports "index.html" files, to disable this set false or to supply a new index pass a string or an array in preferred order.
+ */
+ index?: string[] | string | boolean | undefined;
+
+ /**
+ * Enable or disable Last-Modified header, defaults to true.
+ * Uses the file system's last modified value.
+ */
+ lastModified?: boolean | undefined;
+
+ /**
+ * Provide a max-age in milliseconds for http caching, defaults to 0.
+ * This can also be a string accepted by the ms module.
+ */
+ maxAge?: string | number | undefined;
+
+ /**
+ * Serve files relative to path.
+ */
+ root?: string | undefined;
+
+ /**
+ * Byte offset at which the stream starts, defaults to 0.
+ * The start is inclusive, meaning start: 2 will include the 3rd byte in the stream.
+ */
+ start?: number | undefined;
+ }
+
+ interface SendStream extends stream.Stream {
+ /**
+ * @deprecated pass etag as option
+ * Enable or disable etag generation.
+ */
+ etag(val: boolean): SendStream;
+
+ /**
+ * @deprecated use dotfiles option
+ * Enable or disable "hidden" (dot) files.
+ */
+ hidden(val: boolean): SendStream;
+
+ /**
+ * @deprecated pass index as option
+ * Set index `paths`, set to a falsy value to disable index support.
+ */
+ index(paths: string[] | string): SendStream;
+
+ /**
+ * @deprecated pass root as option
+ * Set root `path`.
+ */
+ root(paths: string): SendStream;
+
+ /**
+ * @deprecated pass root as option
+ * Set root `path`.
+ */
+ from(paths: string): SendStream;
+
+ /**
+ * @deprecated pass maxAge as option
+ * Set max-age to `maxAge`.
+ */
+ maxage(maxAge: string | number): SendStream;
+
+ /**
+ * Emit error with `status`.
+ */
+ error(status: number, error?: Error): void;
+
+ /**
+ * Check if the pathname ends with "/".
+ */
+ hasTrailingSlash(): boolean;
+
+ /**
+ * Check if this is a conditional GET request.
+ */
+ isConditionalGET(): boolean;
+
+ /**
+ * Strip content-* header fields.
+ */
+ removeContentHeaderFields(): void;
+
+ /**
+ * Respond with 304 not modified.
+ */
+ notModified(): void;
+
+ /**
+ * Raise error that headers already sent.
+ */
+ headersAlreadySent(): void;
+
+ /**
+ * Check if the request is cacheable, aka responded with 2xx or 304 (see RFC 2616 section 14.2{5,6}).
+ */
+ isCachable(): boolean;
+
+ /**
+ * Handle stat() error.
+ */
+ onStatError(error: Error): void;
+
+ /**
+ * Check if the cache is fresh.
+ */
+ isFresh(): boolean;
+
+ /**
+ * Check if the range is fresh.
+ */
+ isRangeFresh(): boolean;
+
+ /**
+ * Redirect to path.
+ */
+ redirect(path: string): void;
+
+ /**
+ * Pipe to `res`.
+ */
+ pipe(res: T): T;
+
+ /**
+ * Transfer `path`.
+ */
+ send(path: string, stat?: fs.Stats): void;
+
+ /**
+ * Transfer file for `path`.
+ */
+ sendFile(path: string): void;
+
+ /**
+ * Transfer index for `path`.
+ */
+ sendIndex(path: string): void;
+
+ /**
+ * Transfer index for `path`.
+ */
+ stream(path: string, options?: {}): void;
+
+ /**
+ * Set content-type based on `path` if it hasn't been explicitly set.
+ */
+ type(path: string): void;
+
+ /**
+ * Set response header fields, most fields may be pre-defined.
+ */
+ setHeader(path: string, stat: fs.Stats): void;
+ }
+}
+
+export = send;
diff --git a/node_modules/@types/send/package.json b/node_modules/@types/send/package.json
new file mode 100644
index 0000000..1bbca79
--- /dev/null
+++ b/node_modules/@types/send/package.json
@@ -0,0 +1,33 @@
+{
+ "name": "@types/send",
+ "version": "0.17.4",
+ "description": "TypeScript definitions for send",
+ "homepage": "https://github.com/DefinitelyTyped/DefinitelyTyped/tree/master/types/send",
+ "license": "MIT",
+ "contributors": [
+ {
+ "name": "Mike Jerred",
+ "githubUsername": "MikeJerred",
+ "url": "https://github.com/MikeJerred"
+ },
+ {
+ "name": "Piotr Błażejewicz",
+ "githubUsername": "peterblazejewicz",
+ "url": "https://github.com/peterblazejewicz"
+ }
+ ],
+ "main": "",
+ "types": "index.d.ts",
+ "repository": {
+ "type": "git",
+ "url": "https://github.com/DefinitelyTyped/DefinitelyTyped.git",
+ "directory": "types/send"
+ },
+ "scripts": {},
+ "dependencies": {
+ "@types/mime": "^1",
+ "@types/node": "*"
+ },
+ "typesPublisherContentHash": "80c2c0bda207c1a802cfc46bf20e4f774429c8ae1e9808128c20468d438b895c",
+ "typeScriptVersion": "4.5"
+}
\ No newline at end of file
diff --git a/node_modules/@types/serve-static/LICENSE b/node_modules/@types/serve-static/LICENSE
new file mode 100644
index 0000000..9e841e7
--- /dev/null
+++ b/node_modules/@types/serve-static/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/serve-static/README.md b/node_modules/@types/serve-static/README.md
new file mode 100644
index 0000000..144dffb
--- /dev/null
+++ b/node_modules/@types/serve-static/README.md
@@ -0,0 +1,15 @@
+# Installation
+> `npm install --save @types/serve-static`
+
+# Summary
+This package contains type definitions for serve-static (https://github.com/expressjs/serve-static).
+
+# Details
+Files were exported from https://github.com/DefinitelyTyped/DefinitelyTyped/tree/master/types/serve-static.
+
+### Additional Details
+ * Last updated: Wed, 03 Apr 2024 06:07:52 GMT
+ * Dependencies: [@types/http-errors](https://npmjs.com/package/@types/http-errors), [@types/node](https://npmjs.com/package/@types/node), [@types/send](https://npmjs.com/package/@types/send)
+
+# Credits
+These definitions were written by [Uros Smolnik](https://github.com/urossmolnik), [Linus Unnebäck](https://github.com/LinusU), and [Devansh Jethmalani](https://github.com/devanshj).
diff --git a/node_modules/@types/serve-static/index.d.ts b/node_modules/@types/serve-static/index.d.ts
new file mode 100644
index 0000000..564909f
--- /dev/null
+++ b/node_modules/@types/serve-static/index.d.ts
@@ -0,0 +1,107 @@
+///
+import * as http from "http";
+import { HttpError } from "http-errors";
+import * as send from "send";
+
+/**
+ * Create a new middleware function to serve files from within a given root directory.
+ * The file to serve will be determined by combining req.url with the provided root directory.
+ * When a file is not found, instead of sending a 404 response, this module will instead call next() to move on to the next middleware, allowing for stacking and fall-backs.
+ */
+declare function serveStatic(
+ root: string,
+ options?: serveStatic.ServeStaticOptions,
+): serveStatic.RequestHandler;
+
+declare namespace serveStatic {
+ var mime: typeof send.mime;
+ interface ServeStaticOptions {
+ /**
+ * Enable or disable accepting ranged requests, defaults to true.
+ * Disabling this will not send Accept-Ranges and ignore the contents of the Range request header.
+ */
+ acceptRanges?: boolean | undefined;
+
+ /**
+ * Enable or disable setting Cache-Control response header, defaults to true.
+ * Disabling this will ignore the immutable and maxAge options.
+ */
+ cacheControl?: boolean | undefined;
+
+ /**
+ * Set how "dotfiles" are treated when encountered. A dotfile is a file or directory that begins with a dot (".").
+ * Note this check is done on the path itself without checking if the path actually exists on the disk.
+ * If root is specified, only the dotfiles above the root are checked (i.e. the root itself can be within a dotfile when when set to "deny").
+ * The default value is 'ignore'.
+ * 'allow' No special treatment for dotfiles
+ * 'deny' Send a 403 for any request for a dotfile
+ * 'ignore' Pretend like the dotfile does not exist and call next()
+ */
+ dotfiles?: string | undefined;
+
+ /**
+ * Enable or disable etag generation, defaults to true.
+ */
+ etag?: boolean | undefined;
+
+ /**
+ * Set file extension fallbacks. When set, if a file is not found, the given extensions will be added to the file name and search for.
+ * The first that exists will be served. Example: ['html', 'htm'].
+ * The default value is false.
+ */
+ extensions?: string[] | false | undefined;
+
+ /**
+ * Let client errors fall-through as unhandled requests, otherwise forward a client error.
+ * The default value is true.
+ */
+ fallthrough?: boolean | undefined;
+
+ /**
+ * Enable or disable the immutable directive in the Cache-Control response header.
+ * If enabled, the maxAge option should also be specified to enable caching. The immutable directive will prevent supported clients from making conditional requests during the life of the maxAge option to check if the file has changed.
+ */
+ immutable?: boolean | undefined;
+
+ /**
+ * By default this module will send "index.html" files in response to a request on a directory.
+ * To disable this set false or to supply a new index pass a string or an array in preferred order.
+ */
+ index?: boolean | string | string[] | undefined;
+
+ /**
+ * Enable or disable Last-Modified header, defaults to true. Uses the file system's last modified value.
+ */
+ lastModified?: boolean | undefined;
+
+ /**
+ * Provide a max-age in milliseconds for http caching, defaults to 0. This can also be a string accepted by the ms module.
+ */
+ maxAge?: number | string | undefined;
+
+ /**
+ * Redirect to trailing "/" when the pathname is a dir. Defaults to true.
+ */
+ redirect?: boolean | undefined;
+
+ /**
+ * Function to set custom headers on response. Alterations to the headers need to occur synchronously.
+ * The function is called as fn(res, path, stat), where the arguments are:
+ * res the response object
+ * path the file path that is being sent
+ * stat the stat object of the file that is being sent
+ */
+ setHeaders?: ((res: R, path: string, stat: any) => any) | undefined;
+ }
+
+ interface RequestHandler {
+ (request: http.IncomingMessage, response: R, next: (err?: HttpError) => void): any;
+ }
+
+ interface RequestHandlerConstructor {
+ (root: string, options?: ServeStaticOptions): RequestHandler;
+ mime: typeof send.mime;
+ }
+}
+
+export = serveStatic;
diff --git a/node_modules/@types/serve-static/package.json b/node_modules/@types/serve-static/package.json
new file mode 100644
index 0000000..5a2f018
--- /dev/null
+++ b/node_modules/@types/serve-static/package.json
@@ -0,0 +1,39 @@
+{
+ "name": "@types/serve-static",
+ "version": "1.15.7",
+ "description": "TypeScript definitions for serve-static",
+ "homepage": "https://github.com/DefinitelyTyped/DefinitelyTyped/tree/master/types/serve-static",
+ "license": "MIT",
+ "contributors": [
+ {
+ "name": "Uros Smolnik",
+ "githubUsername": "urossmolnik",
+ "url": "https://github.com/urossmolnik"
+ },
+ {
+ "name": "Linus Unnebäck",
+ "githubUsername": "LinusU",
+ "url": "https://github.com/LinusU"
+ },
+ {
+ "name": "Devansh Jethmalani",
+ "githubUsername": "devanshj",
+ "url": "https://github.com/devanshj"
+ }
+ ],
+ "main": "",
+ "types": "index.d.ts",
+ "repository": {
+ "type": "git",
+ "url": "https://github.com/DefinitelyTyped/DefinitelyTyped.git",
+ "directory": "types/serve-static"
+ },
+ "scripts": {},
+ "dependencies": {
+ "@types/http-errors": "*",
+ "@types/node": "*",
+ "@types/send": "*"
+ },
+ "typesPublisherContentHash": "781872d0ec274d5e3360acd4087e25d9d8440401b99181fe8cd1fc968aa78b14",
+ "typeScriptVersion": "4.7"
+}
\ 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 0000000..627a81d
--- /dev/null
+++ b/node_modules/accepts/HISTORY.md
@@ -0,0 +1,250 @@
+2.0.0 / 2024-08-31
+==================
+
+ * Drop node <18 support
+ * deps: mime-types@^3.0.0
+ * deps: negotiator@^1.0.0
+
+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 0000000..0616607
--- /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 0000000..f3f10c4
--- /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 type 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 0000000..4f2840c
--- /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 {Boolean}
+ * @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 0000000..b35b262
--- /dev/null
+++ b/node_modules/accepts/package.json
@@ -0,0 +1,47 @@
+{
+ "name": "accepts",
+ "description": "Higher-level content negotiation",
+ "version": "2.0.0",
+ "contributors": [
+ "Douglas Christopher Wilson ",
+ "Jonathan Ong (http://jongleberry.com)"
+ ],
+ "license": "MIT",
+ "repository": "jshttp/accepts",
+ "dependencies": {
+ "mime-types": "^3.0.0",
+ "negotiator": "^1.0.0"
+ },
+ "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/basic-auth/HISTORY.md b/node_modules/basic-auth/HISTORY.md
new file mode 100644
index 0000000..2c44a01
--- /dev/null
+++ b/node_modules/basic-auth/HISTORY.md
@@ -0,0 +1,52 @@
+2.0.1 / 2018-09-19
+==================
+
+ * deps: safe-buffer@5.1.2
+
+2.0.0 / 2017-09-12
+==================
+
+ * Drop support for Node.js below 0.8
+ * Remove `auth(ctx)` signature -- pass in header or `auth(ctx.req)`
+ * Use `safe-buffer` for improved Buffer API
+
+1.1.0 / 2016-11-18
+==================
+
+ * Add `auth.parse` for low-level string parsing
+
+1.0.4 / 2016-05-10
+==================
+
+ * Improve error message when `req` argument is not an object
+ * Improve error message when `req` missing `headers` property
+
+1.0.3 / 2015-07-01
+==================
+
+ * Fix regression accepting a Koa context
+
+1.0.2 / 2015-06-12
+==================
+
+ * Improve error message when `req` argument missing
+ * perf: enable strict mode
+ * perf: hoist regular expression
+ * perf: parse with regular expressions
+ * perf: remove argument reassignment
+
+1.0.1 / 2015-05-04
+==================
+
+ * Update readme
+
+1.0.0 / 2014-07-01
+==================
+
+ * Support empty password
+ * Support empty username
+
+0.0.1 / 2013-11-30
+==================
+
+ * Initial release
diff --git a/node_modules/basic-auth/LICENSE b/node_modules/basic-auth/LICENSE
new file mode 100644
index 0000000..89041f6
--- /dev/null
+++ b/node_modules/basic-auth/LICENSE
@@ -0,0 +1,24 @@
+(The MIT License)
+
+Copyright (c) 2013 TJ Holowaychuk
+Copyright (c) 2014 Jonathan Ong
+Copyright (c) 2015-2016 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/basic-auth/README.md b/node_modules/basic-auth/README.md
new file mode 100644
index 0000000..5f3d758
--- /dev/null
+++ b/node_modules/basic-auth/README.md
@@ -0,0 +1,113 @@
+# basic-auth
+
+[![NPM Version][npm-image]][npm-url]
+[![NPM Downloads][downloads-image]][downloads-url]
+[![Node.js Version][node-version-image]][node-version-url]
+[![Build Status][travis-image]][travis-url]
+[![Test Coverage][coveralls-image]][coveralls-url]
+
+Generic basic auth Authorization header field parser for whatever.
+
+## 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):
+
+```
+$ npm install basic-auth
+```
+
+## API
+
+
+
+```js
+var auth = require('basic-auth')
+```
+
+### auth(req)
+
+Get the basic auth credentials from the given request. The `Authorization`
+header is parsed and if the header is invalid, `undefined` is returned,
+otherwise an object with `name` and `pass` properties.
+
+### auth.parse(string)
+
+Parse a basic auth authorization header string. This will return an object
+with `name` and `pass` properties, or `undefined` if the string is invalid.
+
+## Example
+
+Pass a Node.js request object to the module export. If parsing fails
+`undefined` is returned, otherwise an object with `.name` and `.pass`.
+
+
+
+```js
+var auth = require('basic-auth')
+var user = auth(req)
+// => { name: 'something', pass: 'whatever' }
+```
+
+A header string from any other location can also be parsed with
+`auth.parse`, for example a `Proxy-Authorization` header:
+
+
+
+```js
+var auth = require('basic-auth')
+var user = auth.parse(req.getHeader('Proxy-Authorization'))
+```
+
+### With vanilla node.js http server
+
+```js
+var http = require('http')
+var auth = require('basic-auth')
+var compare = require('tsscmp')
+
+// Create server
+var server = http.createServer(function (req, res) {
+ var credentials = auth(req)
+
+ // Check credentials
+ // The "check" function will typically be against your user store
+ if (!credentials || !check(credentials.name, credentials.pass)) {
+ res.statusCode = 401
+ res.setHeader('WWW-Authenticate', 'Basic realm="example"')
+ res.end('Access denied')
+ } else {
+ res.end('Access granted')
+ }
+})
+
+// Basic function to validate credentials for example
+function check (name, pass) {
+ var valid = true
+
+ // Simple method to prevent short-circut and use timing-safe compare
+ valid = compare(name, 'john') && valid
+ valid = compare(pass, 'secret') && valid
+
+ return valid
+}
+
+// Listen
+server.listen(3000)
+```
+
+# License
+
+[MIT](LICENSE)
+
+[coveralls-image]: https://badgen.net/coveralls/c/github/jshttp/basic-auth/master
+[coveralls-url]: https://coveralls.io/r/jshttp/basic-auth?branch=master
+[downloads-image]: https://badgen.net/npm/dm/basic-auth
+[downloads-url]: https://npmjs.org/package/basic-auth
+[node-version-image]: https://badgen.net/npm/node/basic-auth
+[node-version-url]: https://nodejs.org/en/download
+[npm-image]: https://badgen.net/npm/v/basic-auth
+[npm-url]: https://npmjs.org/package/basic-auth
+[travis-image]: https://badgen.net/travis/jshttp/basic-auth/master
+[travis-url]: https://travis-ci.org/jshttp/basic-auth
diff --git a/node_modules/basic-auth/index.js b/node_modules/basic-auth/index.js
new file mode 100644
index 0000000..9106e64
--- /dev/null
+++ b/node_modules/basic-auth/index.js
@@ -0,0 +1,133 @@
+/*!
+ * basic-auth
+ * Copyright(c) 2013 TJ Holowaychuk
+ * Copyright(c) 2014 Jonathan Ong
+ * Copyright(c) 2015-2016 Douglas Christopher Wilson
+ * MIT Licensed
+ */
+
+'use strict'
+
+/**
+ * Module dependencies.
+ * @private
+ */
+
+var Buffer = require('safe-buffer').Buffer
+
+/**
+ * Module exports.
+ * @public
+ */
+
+module.exports = auth
+module.exports.parse = parse
+
+/**
+ * RegExp for basic auth credentials
+ *
+ * credentials = auth-scheme 1*SP token68
+ * auth-scheme = "Basic" ; case insensitive
+ * token68 = 1*( ALPHA / DIGIT / "-" / "." / "_" / "~" / "+" / "/" ) *"="
+ * @private
+ */
+
+var CREDENTIALS_REGEXP = /^ *(?:[Bb][Aa][Ss][Ii][Cc]) +([A-Za-z0-9._~+/-]+=*) *$/
+
+/**
+ * RegExp for basic auth user/pass
+ *
+ * user-pass = userid ":" password
+ * userid = *
+ * password = *TEXT
+ * @private
+ */
+
+var USER_PASS_REGEXP = /^([^:]*):(.*)$/
+
+/**
+ * Parse the Authorization header field of a request.
+ *
+ * @param {object} req
+ * @return {object} with .name and .pass
+ * @public
+ */
+
+function auth (req) {
+ if (!req) {
+ throw new TypeError('argument req is required')
+ }
+
+ if (typeof req !== 'object') {
+ throw new TypeError('argument req is required to be an object')
+ }
+
+ // get header
+ var header = getAuthorization(req)
+
+ // parse header
+ return parse(header)
+}
+
+/**
+ * Decode base64 string.
+ * @private
+ */
+
+function decodeBase64 (str) {
+ return Buffer.from(str, 'base64').toString()
+}
+
+/**
+ * Get the Authorization header from request object.
+ * @private
+ */
+
+function getAuthorization (req) {
+ if (!req.headers || typeof req.headers !== 'object') {
+ throw new TypeError('argument req is required to have headers property')
+ }
+
+ return req.headers.authorization
+}
+
+/**
+ * Parse basic auth to object.
+ *
+ * @param {string} string
+ * @return {object}
+ * @public
+ */
+
+function parse (string) {
+ if (typeof string !== 'string') {
+ return undefined
+ }
+
+ // parse header
+ var match = CREDENTIALS_REGEXP.exec(string)
+
+ if (!match) {
+ return undefined
+ }
+
+ // decode user pass
+ var userPass = USER_PASS_REGEXP.exec(decodeBase64(match[1]))
+
+ if (!userPass) {
+ return undefined
+ }
+
+ // return credentials object
+ return new Credentials(userPass[1], userPass[2])
+}
+
+/**
+ * Object to represent user credentials.
+ * @private
+ */
+
+function Credentials (name, pass) {
+ this.name = name
+ this.pass = pass
+}
diff --git a/node_modules/basic-auth/package.json b/node_modules/basic-auth/package.json
new file mode 100644
index 0000000..01bd8dc
--- /dev/null
+++ b/node_modules/basic-auth/package.json
@@ -0,0 +1,41 @@
+{
+ "name": "basic-auth",
+ "description": "node.js basic auth parser",
+ "version": "2.0.1",
+ "license": "MIT",
+ "keywords": [
+ "basic",
+ "auth",
+ "authorization",
+ "basicauth"
+ ],
+ "repository": "jshttp/basic-auth",
+ "dependencies": {
+ "safe-buffer": "5.1.2"
+ },
+ "devDependencies": {
+ "eslint": "5.6.0",
+ "eslint-config-standard": "12.0.0",
+ "eslint-plugin-import": "2.14.0",
+ "eslint-plugin-markdown": "1.0.0-beta.6",
+ "eslint-plugin-node": "7.0.1",
+ "eslint-plugin-promise": "4.0.1",
+ "eslint-plugin-standard": "4.0.0",
+ "istanbul": "0.4.5",
+ "mocha": "5.2.0"
+ },
+ "files": [
+ "HISTORY.md",
+ "LICENSE",
+ "index.js"
+ ],
+ "engines": {
+ "node": ">= 0.8"
+ },
+ "scripts": {
+ "lint": "eslint --plugin markdown --ext js,md .",
+ "test": "mocha --check-leaks --reporter spec --bail",
+ "test-cov": "istanbul cover node_modules/mocha/bin/_mocha -- --reporter dot --check-leaks test/",
+ "test-travis": "istanbul cover node_modules/mocha/bin/_mocha --report lcovonly -- --reporter spec --check-leaks test/"
+ }
+}
diff --git a/node_modules/body-parser/HISTORY.md b/node_modules/body-parser/HISTORY.md
new file mode 100644
index 0000000..17dd110
--- /dev/null
+++ b/node_modules/body-parser/HISTORY.md
@@ -0,0 +1,731 @@
+2.2.0 / 2025-03-27
+=========================
+
+* refactor: normalize common options for all parsers
+* deps:
+ * iconv-lite@^0.6.3
+
+2.1.0 / 2025-02-10
+=========================
+
+* deps:
+ * type-is@^2.0.0
+ * debug@^4.4.0
+ * Removed destroy
+* refactor: prefix built-in node module imports
+* use the node require cache instead of custom caching
+
+2.0.2 / 2024-10-31
+=========================
+
+* remove `unpipe` package and use native `unpipe()` method
+
+2.0.1 / 2024-09-10
+=========================
+
+* Restore expected behavior `extended` to `false`
+
+2.0.0 / 2024-09-10
+=========================
+* Propagate changes from 1.20.3
+* add brotli support #406
+* Breaking Change: Node.js 18 is the minimum supported version
+
+2.0.0-beta.2 / 2023-02-23
+=========================
+
+This incorporates all changes after 1.19.1 up to 1.20.2.
+
+ * Remove deprecated `bodyParser()` combination middleware
+ * deps: debug@3.1.0
+ - Add `DEBUG_HIDE_DATE` environment variable
+ - Change timer to per-namespace instead of global
+ - Change non-TTY date format
+ - Remove `DEBUG_FD` environment variable support
+ - Support 256 namespace colors
+ * deps: iconv-lite@0.5.2
+ - Add encoding cp720
+ - Add encoding UTF-32
+ * deps: raw-body@3.0.0-beta.1
+
+2.0.0-beta.1 / 2021-12-17
+=========================
+
+ * Drop support for Node.js 0.8
+ * `req.body` is no longer always initialized to `{}`
+ - it is left `undefined` unless a body is parsed
+ * `urlencoded` parser now defaults `extended` to `false`
+ * Use `on-finished` to determine when body read
+
+1.20.3 / 2024-09-10
+===================
+
+ * deps: qs@6.13.0
+ * add `depth` option to customize the depth level in the parser
+ * IMPORTANT: The default `depth` level for parsing URL-encoded data is now `32` (previously was `Infinity`)
+
+1.20.2 / 2023-02-21
+===================
+
+ * Fix strict json error message on Node.js 19+
+ * deps: content-type@~1.0.5
+ - perf: skip value escaping when unnecessary
+ * deps: raw-body@2.5.2
+
+1.20.1 / 2022-10-06
+===================
+
+ * deps: qs@6.11.0
+ * perf: remove unnecessary object clone
+
+1.20.0 / 2022-04-02
+===================
+
+ * Fix error message for json parse whitespace in `strict`
+ * Fix internal error when inflated body exceeds limit
+ * Prevent loss of async hooks context
+ * Prevent hanging when request already read
+ * deps: depd@2.0.0
+ - Replace internal `eval` usage with `Function` constructor
+ - Use instance methods on `process` to check for listeners
+ * deps: http-errors@2.0.0
+ - deps: depd@2.0.0
+ - deps: statuses@2.0.1
+ * deps: on-finished@2.4.1
+ * deps: qs@6.10.3
+ * deps: raw-body@2.5.1
+ - deps: http-errors@2.0.0
+
+1.19.2 / 2022-02-15
+===================
+
+ * deps: bytes@3.1.2
+ * deps: qs@6.9.7
+ * Fix handling of `__proto__` keys
+ * deps: raw-body@2.4.3
+ - deps: bytes@3.1.2
+
+1.19.1 / 2021-12-10
+===================
+
+ * deps: bytes@3.1.1
+ * deps: http-errors@1.8.1
+ - deps: inherits@2.0.4
+ - deps: toidentifier@1.0.1
+ - deps: setprototypeof@1.2.0
+ * deps: qs@6.9.6
+ * deps: raw-body@2.4.2
+ - deps: bytes@3.1.1
+ - deps: http-errors@1.8.1
+ * deps: safe-buffer@5.2.1
+ * deps: type-is@~1.6.18
+
+1.19.0 / 2019-04-25
+===================
+
+ * deps: bytes@3.1.0
+ - Add petabyte (`pb`) support
+ * deps: http-errors@1.7.2
+ - Set constructor name when possible
+ - deps: setprototypeof@1.1.1
+ - deps: statuses@'>= 1.5.0 < 2'
+ * deps: iconv-lite@0.4.24
+ - Added encoding MIK
+ * deps: qs@6.7.0
+ - Fix parsing array brackets after index
+ * deps: raw-body@2.4.0
+ - deps: bytes@3.1.0
+ - deps: http-errors@1.7.2
+ - deps: iconv-lite@0.4.24
+ * deps: type-is@~1.6.17
+ - deps: mime-types@~2.1.24
+ - perf: prevent internal `throw` on invalid type
+
+1.18.3 / 2018-05-14
+===================
+
+ * Fix stack trace for strict json parse error
+ * deps: depd@~1.1.2
+ - perf: remove argument reassignment
+ * deps: http-errors@~1.6.3
+ - deps: depd@~1.1.2
+ - deps: setprototypeof@1.1.0
+ - deps: statuses@'>= 1.3.1 < 2'
+ * deps: iconv-lite@0.4.23
+ - Fix loading encoding with year appended
+ - Fix deprecation warnings on Node.js 10+
+ * deps: qs@6.5.2
+ * deps: raw-body@2.3.3
+ - deps: http-errors@1.6.3
+ - deps: iconv-lite@0.4.23
+ * deps: type-is@~1.6.16
+ - deps: mime-types@~2.1.18
+
+1.18.2 / 2017-09-22
+===================
+
+ * deps: debug@2.6.9
+ * perf: remove argument reassignment
+
+1.18.1 / 2017-09-12
+===================
+
+ * deps: content-type@~1.0.4
+ - perf: remove argument reassignment
+ - perf: skip parameter parsing when no parameters
+ * deps: iconv-lite@0.4.19
+ - Fix ISO-8859-1 regression
+ - Update Windows-1255
+ * deps: qs@6.5.1
+ - Fix parsing & compacting very deep objects
+ * deps: raw-body@2.3.2
+ - deps: iconv-lite@0.4.19
+
+1.18.0 / 2017-09-08
+===================
+
+ * Fix JSON strict violation error to match native parse error
+ * Include the `body` property on verify errors
+ * Include the `type` property on all generated errors
+ * Use `http-errors` to set status code on errors
+ * deps: bytes@3.0.0
+ * deps: debug@2.6.8
+ * deps: depd@~1.1.1
+ - Remove unnecessary `Buffer` loading
+ * deps: http-errors@~1.6.2
+ - deps: depd@1.1.1
+ * deps: iconv-lite@0.4.18
+ - Add support for React Native
+ - Add a warning if not loaded as utf-8
+ - Fix CESU-8 decoding in Node.js 8
+ - Improve speed of ISO-8859-1 encoding
+ * deps: qs@6.5.0
+ * deps: raw-body@2.3.1
+ - Use `http-errors` for standard emitted errors
+ - deps: bytes@3.0.0
+ - deps: iconv-lite@0.4.18
+ - perf: skip buffer decoding on overage chunk
+ * perf: prevent internal `throw` when missing charset
+
+1.17.2 / 2017-05-17
+===================
+
+ * deps: debug@2.6.7
+ - Fix `DEBUG_MAX_ARRAY_LENGTH`
+ - deps: ms@2.0.0
+ * deps: type-is@~1.6.15
+ - deps: mime-types@~2.1.15
+
+1.17.1 / 2017-03-06
+===================
+
+ * deps: qs@6.4.0
+ - Fix regression parsing keys starting with `[`
+
+1.17.0 / 2017-03-01
+===================
+
+ * deps: http-errors@~1.6.1
+ - Make `message` property enumerable for `HttpError`s
+ - deps: setprototypeof@1.0.3
+ * deps: qs@6.3.1
+ - Fix compacting nested arrays
+
+1.16.1 / 2017-02-10
+===================
+
+ * deps: debug@2.6.1
+ - Fix deprecation messages in WebStorm and other editors
+ - Undeprecate `DEBUG_FD` set to `1` or `2`
+
+1.16.0 / 2017-01-17
+===================
+
+ * deps: debug@2.6.0
+ - Allow colors in workers
+ - Deprecated `DEBUG_FD` environment variable
+ - Fix error when running under React Native
+ - Use same color for same namespace
+ - deps: ms@0.7.2
+ * deps: http-errors@~1.5.1
+ - deps: inherits@2.0.3
+ - deps: setprototypeof@1.0.2
+ - deps: statuses@'>= 1.3.1 < 2'
+ * deps: iconv-lite@0.4.15
+ - Added encoding MS-31J
+ - Added encoding MS-932
+ - Added encoding MS-936
+ - Added encoding MS-949
+ - Added encoding MS-950
+ - Fix GBK/GB18030 handling of Euro character
+ * deps: qs@6.2.1
+ - Fix array parsing from skipping empty values
+ * deps: raw-body@~2.2.0
+ - deps: iconv-lite@0.4.15
+ * deps: type-is@~1.6.14
+ - deps: mime-types@~2.1.13
+
+1.15.2 / 2016-06-19
+===================
+
+ * deps: bytes@2.4.0
+ * deps: content-type@~1.0.2
+ - perf: enable strict mode
+ * deps: http-errors@~1.5.0
+ - Use `setprototypeof` module to replace `__proto__` setting
+ - deps: statuses@'>= 1.3.0 < 2'
+ - perf: enable strict mode
+ * deps: qs@6.2.0
+ * deps: raw-body@~2.1.7
+ - deps: bytes@2.4.0
+ - perf: remove double-cleanup on happy path
+ * deps: type-is@~1.6.13
+ - deps: mime-types@~2.1.11
+
+1.15.1 / 2016-05-05
+===================
+
+ * deps: bytes@2.3.0
+ - Drop partial bytes on all parsed units
+ - Fix parsing byte string that looks like hex
+ * deps: raw-body@~2.1.6
+ - deps: bytes@2.3.0
+ * deps: type-is@~1.6.12
+ - deps: mime-types@~2.1.10
+
+1.15.0 / 2016-02-10
+===================
+
+ * deps: http-errors@~1.4.0
+ - Add `HttpError` export, for `err instanceof createError.HttpError`
+ - deps: inherits@2.0.1
+ - deps: statuses@'>= 1.2.1 < 2'
+ * deps: qs@6.1.0
+ * deps: type-is@~1.6.11
+ - deps: mime-types@~2.1.9
+
+1.14.2 / 2015-12-16
+===================
+
+ * deps: bytes@2.2.0
+ * deps: iconv-lite@0.4.13
+ * deps: qs@5.2.0
+ * deps: raw-body@~2.1.5
+ - deps: bytes@2.2.0
+ - deps: iconv-lite@0.4.13
+ * deps: type-is@~1.6.10
+ - deps: mime-types@~2.1.8
+
+1.14.1 / 2015-09-27
+===================
+
+ * Fix issue where invalid charset results in 400 when `verify` used
+ * deps: iconv-lite@0.4.12
+ - Fix CESU-8 decoding in Node.js 4.x
+ * deps: raw-body@~2.1.4
+ - Fix masking critical errors from `iconv-lite`
+ - deps: iconv-lite@0.4.12
+ * deps: type-is@~1.6.9
+ - deps: mime-types@~2.1.7
+
+1.14.0 / 2015-09-16
+===================
+
+ * Fix JSON strict parse error to match syntax errors
+ * Provide static `require` analysis in `urlencoded` parser
+ * deps: depd@~1.1.0
+ - Support web browser loading
+ * deps: qs@5.1.0
+ * deps: raw-body@~2.1.3
+ - Fix sync callback when attaching data listener causes sync read
+ * deps: type-is@~1.6.8
+ - Fix type error when given invalid type to match against
+ - deps: mime-types@~2.1.6
+
+1.13.3 / 2015-07-31
+===================
+
+ * deps: type-is@~1.6.6
+ - deps: mime-types@~2.1.4
+
+1.13.2 / 2015-07-05
+===================
+
+ * deps: iconv-lite@0.4.11
+ * deps: qs@4.0.0
+ - Fix dropping parameters like `hasOwnProperty`
+ - Fix user-visible incompatibilities from 3.1.0
+ - Fix various parsing edge cases
+ * deps: raw-body@~2.1.2
+ - Fix error stack traces to skip `makeError`
+ - deps: iconv-lite@0.4.11
+ * deps: type-is@~1.6.4
+ - deps: mime-types@~2.1.2
+ - perf: enable strict mode
+ - perf: remove argument reassignment
+
+1.13.1 / 2015-06-16
+===================
+
+ * deps: qs@2.4.2
+ - Downgraded from 3.1.0 because of user-visible incompatibilities
+
+1.13.0 / 2015-06-14
+===================
+
+ * Add `statusCode` property on `Error`s, in addition to `status`
+ * Change `type` default to `application/json` for JSON parser
+ * Change `type` default to `application/x-www-form-urlencoded` for urlencoded parser
+ * Provide static `require` analysis
+ * Use the `http-errors` module to generate errors
+ * deps: bytes@2.1.0
+ - Slight optimizations
+ * deps: iconv-lite@0.4.10
+ - The encoding UTF-16 without BOM now defaults to UTF-16LE when detection fails
+ - Leading BOM is now removed when decoding
+ * deps: on-finished@~2.3.0
+ - Add defined behavior for HTTP `CONNECT` requests
+ - Add defined behavior for HTTP `Upgrade` requests
+ - deps: ee-first@1.1.1
+ * deps: qs@3.1.0
+ - Fix dropping parameters like `hasOwnProperty`
+ - Fix various parsing edge cases
+ - Parsed object now has `null` prototype
+ * deps: raw-body@~2.1.1
+ - Use `unpipe` module for unpiping requests
+ - deps: iconv-lite@0.4.10
+ * deps: type-is@~1.6.3
+ - deps: mime-types@~2.1.1
+ - perf: reduce try block size
+ - perf: remove bitwise operations
+ * perf: enable strict mode
+ * perf: remove argument reassignment
+ * perf: remove delete call
+
+1.12.4 / 2015-05-10
+===================
+
+ * deps: debug@~2.2.0
+ * deps: qs@2.4.2
+ - Fix allowing parameters like `constructor`
+ * deps: on-finished@~2.2.1
+ * deps: raw-body@~2.0.1
+ - Fix a false-positive when unpiping in Node.js 0.8
+ - deps: bytes@2.0.1
+ * deps: type-is@~1.6.2
+ - deps: mime-types@~2.0.11
+
+1.12.3 / 2015-04-15
+===================
+
+ * Slight efficiency improvement when not debugging
+ * deps: depd@~1.0.1
+ * deps: iconv-lite@0.4.8
+ - Add encoding alias UNICODE-1-1-UTF-7
+ * deps: raw-body@1.3.4
+ - Fix hanging callback if request aborts during read
+ - deps: iconv-lite@0.4.8
+
+1.12.2 / 2015-03-16
+===================
+
+ * deps: qs@2.4.1
+ - Fix error when parameter `hasOwnProperty` is present
+
+1.12.1 / 2015-03-15
+===================
+
+ * deps: debug@~2.1.3
+ - Fix high intensity foreground color for bold
+ - deps: ms@0.7.0
+ * deps: type-is@~1.6.1
+ - deps: mime-types@~2.0.10
+
+1.12.0 / 2015-02-13
+===================
+
+ * add `debug` messages
+ * accept a function for the `type` option
+ * use `content-type` to parse `Content-Type` headers
+ * deps: iconv-lite@0.4.7
+ - Gracefully support enumerables on `Object.prototype`
+ * deps: raw-body@1.3.3
+ - deps: iconv-lite@0.4.7
+ * deps: type-is@~1.6.0
+ - fix argument reassignment
+ - fix false-positives in `hasBody` `Transfer-Encoding` check
+ - support wildcard for both type and subtype (`*/*`)
+ - deps: mime-types@~2.0.9
+
+1.11.0 / 2015-01-30
+===================
+
+ * make internal `extended: true` depth limit infinity
+ * deps: type-is@~1.5.6
+ - deps: mime-types@~2.0.8
+
+1.10.2 / 2015-01-20
+===================
+
+ * deps: iconv-lite@0.4.6
+ - Fix rare aliases of single-byte encodings
+ * deps: raw-body@1.3.2
+ - deps: iconv-lite@0.4.6
+
+1.10.1 / 2015-01-01
+===================
+
+ * deps: on-finished@~2.2.0
+ * deps: type-is@~1.5.5
+ - deps: mime-types@~2.0.7
+
+1.10.0 / 2014-12-02
+===================
+
+ * make internal `extended: true` array limit dynamic
+
+1.9.3 / 2014-11-21
+==================
+
+ * deps: iconv-lite@0.4.5
+ - Fix Windows-31J and X-SJIS encoding support
+ * deps: qs@2.3.3
+ - Fix `arrayLimit` behavior
+ * deps: raw-body@1.3.1
+ - deps: iconv-lite@0.4.5
+ * deps: type-is@~1.5.3
+ - deps: mime-types@~2.0.3
+
+1.9.2 / 2014-10-27
+==================
+
+ * deps: qs@2.3.2
+ - Fix parsing of mixed objects and values
+
+1.9.1 / 2014-10-22
+==================
+
+ * deps: on-finished@~2.1.1
+ - Fix handling of pipelined requests
+ * deps: qs@2.3.0
+ - Fix parsing of mixed implicit and explicit arrays
+ * deps: type-is@~1.5.2
+ - deps: mime-types@~2.0.2
+
+1.9.0 / 2014-09-24
+==================
+
+ * include the charset in "unsupported charset" error message
+ * include the encoding in "unsupported content encoding" error message
+ * deps: depd@~1.0.0
+
+1.8.4 / 2014-09-23
+==================
+
+ * fix content encoding to be case-insensitive
+
+1.8.3 / 2014-09-19
+==================
+
+ * deps: qs@2.2.4
+ - Fix issue with object keys starting with numbers truncated
+
+1.8.2 / 2014-09-15
+==================
+
+ * deps: depd@0.4.5
+
+1.8.1 / 2014-09-07
+==================
+
+ * deps: media-typer@0.3.0
+ * deps: type-is@~1.5.1
+
+1.8.0 / 2014-09-05
+==================
+
+ * make empty-body-handling consistent between chunked requests
+ - empty `json` produces `{}`
+ - empty `raw` produces `new Buffer(0)`
+ - empty `text` produces `''`
+ - empty `urlencoded` produces `{}`
+ * deps: qs@2.2.3
+ - Fix issue where first empty value in array is discarded
+ * deps: type-is@~1.5.0
+ - fix `hasbody` to be true for `content-length: 0`
+
+1.7.0 / 2014-09-01
+==================
+
+ * add `parameterLimit` option to `urlencoded` parser
+ * change `urlencoded` extended array limit to 100
+ * respond with 413 when over `parameterLimit` in `urlencoded`
+
+1.6.7 / 2014-08-29
+==================
+
+ * deps: qs@2.2.2
+ - Remove unnecessary cloning
+
+1.6.6 / 2014-08-27
+==================
+
+ * deps: qs@2.2.0
+ - Array parsing fix
+ - Performance improvements
+
+1.6.5 / 2014-08-16
+==================
+
+ * deps: on-finished@2.1.0
+
+1.6.4 / 2014-08-14
+==================
+
+ * deps: qs@1.2.2
+
+1.6.3 / 2014-08-10
+==================
+
+ * deps: qs@1.2.1
+
+1.6.2 / 2014-08-07
+==================
+
+ * deps: qs@1.2.0
+ - Fix parsing array of objects
+
+1.6.1 / 2014-08-06
+==================
+
+ * deps: qs@1.1.0
+ - Accept urlencoded square brackets
+ - Accept empty values in implicit array notation
+
+1.6.0 / 2014-08-05
+==================
+
+ * deps: qs@1.0.2
+ - Complete rewrite
+ - Limits array length to 20
+ - Limits object depth to 5
+ - Limits parameters to 1,000
+
+1.5.2 / 2014-07-27
+==================
+
+ * deps: depd@0.4.4
+ - Work-around v8 generating empty stack traces
+
+1.5.1 / 2014-07-26
+==================
+
+ * deps: depd@0.4.3
+ - Fix exception when global `Error.stackTraceLimit` is too low
+
+1.5.0 / 2014-07-20
+==================
+
+ * deps: depd@0.4.2
+ - Add `TRACE_DEPRECATION` environment variable
+ - Remove non-standard grey color from color output
+ - Support `--no-deprecation` argument
+ - Support `--trace-deprecation` argument
+ * deps: iconv-lite@0.4.4
+ - Added encoding UTF-7
+ * deps: raw-body@1.3.0
+ - deps: iconv-lite@0.4.4
+ - Added encoding UTF-7
+ - Fix `Cannot switch to old mode now` error on Node.js 0.10+
+ * deps: type-is@~1.3.2
+
+1.4.3 / 2014-06-19
+==================
+
+ * deps: type-is@1.3.1
+ - fix global variable leak
+
+1.4.2 / 2014-06-19
+==================
+
+ * deps: type-is@1.3.0
+ - improve type parsing
+
+1.4.1 / 2014-06-19
+==================
+
+ * fix urlencoded extended deprecation message
+
+1.4.0 / 2014-06-19
+==================
+
+ * add `text` parser
+ * add `raw` parser
+ * check accepted charset in content-type (accepts utf-8)
+ * check accepted encoding in content-encoding (accepts identity)
+ * deprecate `bodyParser()` middleware; use `.json()` and `.urlencoded()` as needed
+ * deprecate `urlencoded()` without provided `extended` option
+ * lazy-load urlencoded parsers
+ * parsers split into files for reduced mem usage
+ * support gzip and deflate bodies
+ - set `inflate: false` to turn off
+ * deps: raw-body@1.2.2
+ - Support all encodings from `iconv-lite`
+
+1.3.1 / 2014-06-11
+==================
+
+ * deps: type-is@1.2.1
+ - Switch dependency from mime to mime-types@1.0.0
+
+1.3.0 / 2014-05-31
+==================
+
+ * add `extended` option to urlencoded parser
+
+1.2.2 / 2014-05-27
+==================
+
+ * deps: raw-body@1.1.6
+ - assert stream encoding on node.js 0.8
+ - assert stream encoding on node.js < 0.10.6
+ - deps: bytes@1
+
+1.2.1 / 2014-05-26
+==================
+
+ * invoke `next(err)` after request fully read
+ - prevents hung responses and socket hang ups
+
+1.2.0 / 2014-05-11
+==================
+
+ * add `verify` option
+ * deps: type-is@1.2.0
+ - support suffix matching
+
+1.1.2 / 2014-05-11
+==================
+
+ * improve json parser speed
+
+1.1.1 / 2014-05-11
+==================
+
+ * fix repeated limit parsing with every request
+
+1.1.0 / 2014-05-10
+==================
+
+ * add `type` option
+ * deps: pin for safety and consistency
+
+1.0.2 / 2014-04-14
+==================
+
+ * use `type-is` module
+
+1.0.1 / 2014-03-20
+==================
+
+ * lower default limits to 100kb
diff --git a/node_modules/body-parser/LICENSE b/node_modules/body-parser/LICENSE
new file mode 100644
index 0000000..386b7b6
--- /dev/null
+++ b/node_modules/body-parser/LICENSE
@@ -0,0 +1,23 @@
+(The MIT License)
+
+Copyright (c) 2014 Jonathan Ong
+Copyright (c) 2014-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/body-parser/README.md b/node_modules/body-parser/README.md
new file mode 100644
index 0000000..9fcd4c6
--- /dev/null
+++ b/node_modules/body-parser/README.md
@@ -0,0 +1,491 @@
+# body-parser
+
+[![NPM Version][npm-version-image]][npm-url]
+[![NPM Downloads][npm-downloads-image]][npm-url]
+[![Build Status][ci-image]][ci-url]
+[![Test Coverage][coveralls-image]][coveralls-url]
+[![OpenSSF Scorecard Badge][ossf-scorecard-badge]][ossf-scorecard-visualizer]
+
+Node.js body parsing middleware.
+
+Parse incoming request bodies in a middleware before your handlers, available
+under the `req.body` property.
+
+**Note** As `req.body`'s shape is based on user-controlled input, all
+properties and values in this object are untrusted and should be validated
+before trusting. For example, `req.body.foo.toString()` may fail in multiple
+ways, for example the `foo` property may not be there or may not be a string,
+and `toString` may not be a function and instead a string or other user input.
+
+[Learn about the anatomy of an HTTP transaction in Node.js](https://nodejs.org/en/docs/guides/anatomy-of-an-http-transaction/).
+
+_This does not handle multipart bodies_, due to their complex and typically
+large nature. For multipart bodies, you may be interested in the following
+modules:
+
+ * [busboy](https://www.npmjs.org/package/busboy#readme) and
+ [connect-busboy](https://www.npmjs.org/package/connect-busboy#readme)
+ * [multiparty](https://www.npmjs.org/package/multiparty#readme) and
+ [connect-multiparty](https://www.npmjs.org/package/connect-multiparty#readme)
+ * [formidable](https://www.npmjs.org/package/formidable#readme)
+ * [multer](https://www.npmjs.org/package/multer#readme)
+
+This module provides the following parsers:
+
+ * [JSON body parser](#bodyparserjsonoptions)
+ * [Raw body parser](#bodyparserrawoptions)
+ * [Text body parser](#bodyparsertextoptions)
+ * [URL-encoded form body parser](#bodyparserurlencodedoptions)
+
+Other body parsers you might be interested in:
+
+- [body](https://www.npmjs.org/package/body#readme)
+- [co-body](https://www.npmjs.org/package/co-body#readme)
+
+## Installation
+
+```sh
+$ npm install body-parser
+```
+
+## API
+
+```js
+const bodyParser = require('body-parser')
+```
+
+The `bodyParser` object exposes various factories to create middlewares. All
+middlewares will populate the `req.body` property with the parsed body when
+the `Content-Type` request header matches the `type` option.
+
+The various errors returned by this module are described in the
+[errors section](#errors).
+
+### bodyParser.json([options])
+
+Returns middleware that only parses `json` and only looks at requests where
+the `Content-Type` header matches the `type` option. This parser accepts any
+Unicode encoding of the body and supports automatic inflation of `gzip`,
+`br` (brotli) and `deflate` encodings.
+
+A new `body` object containing the parsed data is populated on the `request`
+object after the middleware (i.e. `req.body`).
+
+#### Options
+
+The `json` function takes an optional `options` object that may contain any of
+the following keys:
+
+##### inflate
+
+When set to `true`, then deflated (compressed) bodies will be inflated; when
+`false`, deflated bodies are rejected. Defaults to `true`.
+
+##### limit
+
+Controls the maximum request body size. If this is a number, then the value
+specifies the number of bytes; if it is a string, the value is passed to the
+[bytes](https://www.npmjs.com/package/bytes) library for parsing. Defaults
+to `'100kb'`.
+
+##### reviver
+
+The `reviver` option is passed directly to `JSON.parse` as the second
+argument. You can find more information on this argument
+[in the MDN documentation about JSON.parse](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/JSON/parse#Example.3A_Using_the_reviver_parameter).
+
+##### strict
+
+When set to `true`, will only accept arrays and objects; when `false` will
+accept anything `JSON.parse` accepts. Defaults to `true`.
+
+##### type
+
+The `type` option is used to determine what media type the middleware will
+parse. This option can be a string, array of strings, or a function. If not a
+function, `type` option is passed directly to the
+[type-is](https://www.npmjs.org/package/type-is#readme) library and this can
+be an extension name (like `json`), a mime type (like `application/json`), or
+a mime type with a wildcard (like `*/*` or `*/json`). If a function, the `type`
+option is called as `fn(req)` and the request is parsed if it returns a truthy
+value. Defaults to `application/json`.
+
+##### verify
+
+The `verify` option, if supplied, is called as `verify(req, res, buf, encoding)`,
+where `buf` is a `Buffer` of the raw request body and `encoding` is the
+encoding of the request. The parsing can be aborted by throwing an error.
+
+### bodyParser.raw([options])
+
+Returns middleware that parses all bodies as a `Buffer` and only looks at
+requests where the `Content-Type` header matches the `type` option. This
+parser supports automatic inflation of `gzip`, `br` (brotli) and `deflate`
+encodings.
+
+A new `body` object containing the parsed data is populated on the `request`
+object after the middleware (i.e. `req.body`). This will be a `Buffer` object
+of the body.
+
+#### Options
+
+The `raw` function takes an optional `options` object that may contain any of
+the following keys:
+
+##### inflate
+
+When set to `true`, then deflated (compressed) bodies will be inflated; when
+`false`, deflated bodies are rejected. Defaults to `true`.
+
+##### limit
+
+Controls the maximum request body size. If this is a number, then the value
+specifies the number of bytes; if it is a string, the value is passed to the
+[bytes](https://www.npmjs.com/package/bytes) library for parsing. Defaults
+to `'100kb'`.
+
+##### type
+
+The `type` option is used to determine what media type the middleware will
+parse. This option can be a string, array of strings, or a function.
+If not a function, `type` option is passed directly to the
+[type-is](https://www.npmjs.org/package/type-is#readme) library and this
+can be an extension name (like `bin`), a mime type (like
+`application/octet-stream`), or a mime type with a wildcard (like `*/*` or
+`application/*`). If a function, the `type` option is called as `fn(req)`
+and the request is parsed if it returns a truthy value. Defaults to
+`application/octet-stream`.
+
+##### verify
+
+The `verify` option, if supplied, is called as `verify(req, res, buf, encoding)`,
+where `buf` is a `Buffer` of the raw request body and `encoding` is the
+encoding of the request. The parsing can be aborted by throwing an error.
+
+### bodyParser.text([options])
+
+Returns middleware that parses all bodies as a string and only looks at
+requests where the `Content-Type` header matches the `type` option. This
+parser supports automatic inflation of `gzip`, `br` (brotli) and `deflate`
+encodings.
+
+A new `body` string containing the parsed data is populated on the `request`
+object after the middleware (i.e. `req.body`). This will be a string of the
+body.
+
+#### Options
+
+The `text` function takes an optional `options` object that may contain any of
+the following keys:
+
+##### defaultCharset
+
+Specify the default character set for the text content if the charset is not
+specified in the `Content-Type` header of the request. Defaults to `utf-8`.
+
+##### inflate
+
+When set to `true`, then deflated (compressed) bodies will be inflated; when
+`false`, deflated bodies are rejected. Defaults to `true`.
+
+##### limit
+
+Controls the maximum request body size. If this is a number, then the value
+specifies the number of bytes; if it is a string, the value is passed to the
+[bytes](https://www.npmjs.com/package/bytes) library for parsing. Defaults
+to `'100kb'`.
+
+##### type
+
+The `type` option is used to determine what media type the middleware will
+parse. This option can be a string, array of strings, or a function. If not
+a function, `type` option is passed directly to the
+[type-is](https://www.npmjs.org/package/type-is#readme) library and this can
+be an extension name (like `txt`), a mime type (like `text/plain`), or a mime
+type with a wildcard (like `*/*` or `text/*`). If a function, the `type`
+option is called as `fn(req)` and the request is parsed if it returns a
+truthy value. Defaults to `text/plain`.
+
+##### verify
+
+The `verify` option, if supplied, is called as `verify(req, res, buf, encoding)`,
+where `buf` is a `Buffer` of the raw request body and `encoding` is the
+encoding of the request. The parsing can be aborted by throwing an error.
+
+### bodyParser.urlencoded([options])
+
+Returns middleware that only parses `urlencoded` bodies and only looks at
+requests where the `Content-Type` header matches the `type` option. This
+parser accepts only UTF-8 encoding of the body and supports automatic
+inflation of `gzip`, `br` (brotli) and `deflate` encodings.
+
+A new `body` object containing the parsed data is populated on the `request`
+object after the middleware (i.e. `req.body`). This object will contain
+key-value pairs, where the value can be a string or array (when `extended` is
+`false`), or any type (when `extended` is `true`).
+
+#### Options
+
+The `urlencoded` function takes an optional `options` object that may contain
+any of the following keys:
+
+##### extended
+
+The "extended" syntax allows for rich objects and arrays to be encoded into the
+URL-encoded format, allowing for a JSON-like experience with URL-encoded. For
+more information, please [see the qs
+library](https://www.npmjs.org/package/qs#readme).
+
+Defaults to `false`.
+
+##### inflate
+
+When set to `true`, then deflated (compressed) bodies will be inflated; when
+`false`, deflated bodies are rejected. Defaults to `true`.
+
+##### limit
+
+Controls the maximum request body size. If this is a number, then the value
+specifies the number of bytes; if it is a string, the value is passed to the
+[bytes](https://www.npmjs.com/package/bytes) library for parsing. Defaults
+to `'100kb'`.
+
+##### parameterLimit
+
+The `parameterLimit` option controls the maximum number of parameters that
+are allowed in the URL-encoded data. If a request contains more parameters
+than this value, a 413 will be returned to the client. Defaults to `1000`.
+
+##### type
+
+The `type` option is used to determine what media type the middleware will
+parse. This option can be a string, array of strings, or a function. If not
+a function, `type` option is passed directly to the
+[type-is](https://www.npmjs.org/package/type-is#readme) library and this can
+be an extension name (like `urlencoded`), a mime type (like
+`application/x-www-form-urlencoded`), or a mime type with a wildcard (like
+`*/x-www-form-urlencoded`). If a function, the `type` option is called as
+`fn(req)` and the request is parsed if it returns a truthy value. Defaults
+to `application/x-www-form-urlencoded`.
+
+##### verify
+
+The `verify` option, if supplied, is called as `verify(req, res, buf, encoding)`,
+where `buf` is a `Buffer` of the raw request body and `encoding` is the
+encoding of the request. The parsing can be aborted by throwing an error.
+
+##### defaultCharset
+
+The default charset to parse as, if not specified in content-type. Must be
+either `utf-8` or `iso-8859-1`. Defaults to `utf-8`.
+
+##### charsetSentinel
+
+Whether to let the value of the `utf8` parameter take precedence as the charset
+selector. It requires the form to contain a parameter named `utf8` with a value
+of `✓`. Defaults to `false`.
+
+##### interpretNumericEntities
+
+Whether to decode numeric entities such as `☺` when parsing an iso-8859-1
+form. Defaults to `false`.
+
+
+#### depth
+
+The `depth` option is used to configure the maximum depth of the `qs` library when `extended` is `true`. This allows you to limit the amount of keys that are parsed and can be useful to prevent certain types of abuse. Defaults to `32`. It is recommended to keep this value as low as possible.
+
+## Errors
+
+The middlewares provided by this module create errors using the
+[`http-errors` module](https://www.npmjs.com/package/http-errors). The errors
+will typically have a `status`/`statusCode` property that contains the suggested
+HTTP response code, an `expose` property to determine if the `message` property
+should be displayed to the client, a `type` property to determine the type of
+error without matching against the `message`, and a `body` property containing
+the read body, if available.
+
+The following are the common errors created, though any error can come through
+for various reasons.
+
+### content encoding unsupported
+
+This error will occur when the request had a `Content-Encoding` header that
+contained an encoding but the "inflation" option was set to `false`. The
+`status` property is set to `415`, the `type` property is set to
+`'encoding.unsupported'`, and the `charset` property will be set to the
+encoding that is unsupported.
+
+### entity parse failed
+
+This error will occur when the request contained an entity that could not be
+parsed by the middleware. The `status` property is set to `400`, the `type`
+property is set to `'entity.parse.failed'`, and the `body` property is set to
+the entity value that failed parsing.
+
+### entity verify failed
+
+This error will occur when the request contained an entity that could not be
+failed verification by the defined `verify` option. The `status` property is
+set to `403`, the `type` property is set to `'entity.verify.failed'`, and the
+`body` property is set to the entity value that failed verification.
+
+### request aborted
+
+This error will occur when the request is aborted by the client before reading
+the body has finished. The `received` property will be set to the number of
+bytes received before the request was aborted and the `expected` property is
+set to the number of expected bytes. The `status` property is set to `400`
+and `type` property is set to `'request.aborted'`.
+
+### request entity too large
+
+This error will occur when the request body's size is larger than the "limit"
+option. The `limit` property will be set to the byte limit and the `length`
+property will be set to the request body's length. The `status` property is
+set to `413` and the `type` property is set to `'entity.too.large'`.
+
+### request size did not match content length
+
+This error will occur when the request's length did not match the length from
+the `Content-Length` header. This typically occurs when the request is malformed,
+typically when the `Content-Length` header was calculated based on characters
+instead of bytes. The `status` property is set to `400` and the `type` property
+is set to `'request.size.invalid'`.
+
+### stream encoding should not be set
+
+This error will occur when something called the `req.setEncoding` method prior
+to this middleware. This module operates directly on bytes only and you cannot
+call `req.setEncoding` when using this module. The `status` property is set to
+`500` and the `type` property is set to `'stream.encoding.set'`.
+
+### stream is not readable
+
+This error will occur when the request is no longer readable when this middleware
+attempts to read it. This typically means something other than a middleware from
+this module read the request body already and the middleware was also configured to
+read the same request. The `status` property is set to `500` and the `type`
+property is set to `'stream.not.readable'`.
+
+### too many parameters
+
+This error will occur when the content of the request exceeds the configured
+`parameterLimit` for the `urlencoded` parser. The `status` property is set to
+`413` and the `type` property is set to `'parameters.too.many'`.
+
+### unsupported charset "BOGUS"
+
+This error will occur when the request had a charset parameter in the
+`Content-Type` header, but the `iconv-lite` module does not support it OR the
+parser does not support it. The charset is contained in the message as well
+as in the `charset` property. The `status` property is set to `415`, the
+`type` property is set to `'charset.unsupported'`, and the `charset` property
+is set to the charset that is unsupported.
+
+### unsupported content encoding "bogus"
+
+This error will occur when the request had a `Content-Encoding` header that
+contained an unsupported encoding. The encoding is contained in the message
+as well as in the `encoding` property. The `status` property is set to `415`,
+the `type` property is set to `'encoding.unsupported'`, and the `encoding`
+property is set to the encoding that is unsupported.
+
+### The input exceeded the depth
+
+This error occurs when using `bodyParser.urlencoded` with the `extended` property set to `true` and the input exceeds the configured `depth` option. The `status` property is set to `400`. It is recommended to review the `depth` option and evaluate if it requires a higher value. When the `depth` option is set to `32` (default value), the error will not be thrown.
+
+## Examples
+
+### Express/Connect top-level generic
+
+This example demonstrates adding a generic JSON and URL-encoded parser as a
+top-level middleware, which will parse the bodies of all incoming requests.
+This is the simplest setup.
+
+```js
+const express = require('express')
+const bodyParser = require('body-parser')
+
+const app = express()
+
+// parse application/x-www-form-urlencoded
+app.use(bodyParser.urlencoded())
+
+// parse application/json
+app.use(bodyParser.json())
+
+app.use(function (req, res) {
+ res.setHeader('Content-Type', 'text/plain')
+ res.write('you posted:\n')
+ res.end(String(JSON.stringify(req.body, null, 2)))
+})
+```
+
+### Express route-specific
+
+This example demonstrates adding body parsers specifically to the routes that
+need them. In general, this is the most recommended way to use body-parser with
+Express.
+
+```js
+const express = require('express')
+const bodyParser = require('body-parser')
+
+const app = express()
+
+// create application/json parser
+const jsonParser = bodyParser.json()
+
+// create application/x-www-form-urlencoded parser
+const urlencodedParser = bodyParser.urlencoded()
+
+// POST /login gets urlencoded bodies
+app.post('/login', urlencodedParser, function (req, res) {
+ if (!req.body || !req.body.username) res.sendStatus(400)
+ res.send('welcome, ' + req.body.username)
+})
+
+// POST /api/users gets JSON bodies
+app.post('/api/users', jsonParser, function (req, res) {
+ if (!req.body) res.sendStatus(400)
+ // create user in req.body
+})
+```
+
+### Change accepted type for parsers
+
+All the parsers accept a `type` option which allows you to change the
+`Content-Type` that the middleware will parse.
+
+```js
+const express = require('express')
+const bodyParser = require('body-parser')
+
+const app = express()
+
+// parse various different custom JSON types as JSON
+app.use(bodyParser.json({ type: 'application/*+json' }))
+
+// parse some custom thing into a Buffer
+app.use(bodyParser.raw({ type: 'application/vnd.custom-type' }))
+
+// parse an HTML body into a string
+app.use(bodyParser.text({ type: 'text/html' }))
+```
+
+## License
+
+[MIT](LICENSE)
+
+[ci-image]: https://badgen.net/github/checks/expressjs/body-parser/master?label=ci
+[ci-url]: https://github.com/expressjs/body-parser/actions/workflows/ci.yml
+[coveralls-image]: https://badgen.net/coveralls/c/github/expressjs/body-parser/master
+[coveralls-url]: https://coveralls.io/r/expressjs/body-parser?branch=master
+[node-version-image]: https://badgen.net/npm/node/body-parser
+[node-version-url]: https://nodejs.org/en/download
+[npm-downloads-image]: https://badgen.net/npm/dm/body-parser
+[npm-url]: https://npmjs.org/package/body-parser
+[npm-version-image]: https://badgen.net/npm/v/body-parser
+[ossf-scorecard-badge]: https://api.scorecard.dev/projects/github.com/expressjs/body-parser/badge
+[ossf-scorecard-visualizer]: https://ossf.github.io/scorecard-visualizer/#/projects/github.com/expressjs/body-parser
\ No newline at end of file
diff --git a/node_modules/body-parser/index.js b/node_modules/body-parser/index.js
new file mode 100644
index 0000000..d722d0b
--- /dev/null
+++ b/node_modules/body-parser/index.js
@@ -0,0 +1,80 @@
+/*!
+ * body-parser
+ * Copyright(c) 2014-2015 Douglas Christopher Wilson
+ * MIT Licensed
+ */
+
+'use strict'
+
+/**
+ * @typedef Parsers
+ * @type {function}
+ * @property {function} json
+ * @property {function} raw
+ * @property {function} text
+ * @property {function} urlencoded
+ */
+
+/**
+ * Module exports.
+ * @type {Parsers}
+ */
+
+exports = module.exports = bodyParser
+
+/**
+ * JSON parser.
+ * @public
+ */
+
+Object.defineProperty(exports, 'json', {
+ configurable: true,
+ enumerable: true,
+ get: () => require('./lib/types/json')
+})
+
+/**
+ * Raw parser.
+ * @public
+ */
+
+Object.defineProperty(exports, 'raw', {
+ configurable: true,
+ enumerable: true,
+ get: () => require('./lib/types/raw')
+})
+
+/**
+ * Text parser.
+ * @public
+ */
+
+Object.defineProperty(exports, 'text', {
+ configurable: true,
+ enumerable: true,
+ get: () => require('./lib/types/text')
+})
+
+/**
+ * URL-encoded parser.
+ * @public
+ */
+
+Object.defineProperty(exports, 'urlencoded', {
+ configurable: true,
+ enumerable: true,
+ get: () => require('./lib/types/urlencoded')
+})
+
+/**
+ * Create a middleware to parse json and urlencoded bodies.
+ *
+ * @param {object} [options]
+ * @return {function}
+ * @deprecated
+ * @public
+ */
+
+function bodyParser () {
+ throw new Error('The bodyParser() generic has been split into individual middleware to use instead.')
+}
diff --git a/node_modules/body-parser/lib/read.js b/node_modules/body-parser/lib/read.js
new file mode 100644
index 0000000..eee8b11
--- /dev/null
+++ b/node_modules/body-parser/lib/read.js
@@ -0,0 +1,210 @@
+/*!
+ * body-parser
+ * Copyright(c) 2014-2015 Douglas Christopher Wilson
+ * MIT Licensed
+ */
+
+'use strict'
+
+/**
+ * Module dependencies.
+ * @private
+ */
+
+var createError = require('http-errors')
+var getBody = require('raw-body')
+var iconv = require('iconv-lite')
+var onFinished = require('on-finished')
+var zlib = require('node:zlib')
+
+/**
+ * Module exports.
+ */
+
+module.exports = read
+
+/**
+ * Read a request into a buffer and parse.
+ *
+ * @param {object} req
+ * @param {object} res
+ * @param {function} next
+ * @param {function} parse
+ * @param {function} debug
+ * @param {object} options
+ * @private
+ */
+
+function read (req, res, next, parse, debug, options) {
+ var length
+ var opts = options
+ var stream
+
+ // read options
+ var encoding = opts.encoding !== null
+ ? opts.encoding
+ : null
+ var verify = opts.verify
+
+ try {
+ // get the content stream
+ stream = contentstream(req, debug, opts.inflate)
+ length = stream.length
+ stream.length = undefined
+ } catch (err) {
+ return next(err)
+ }
+
+ // set raw-body options
+ opts.length = length
+ opts.encoding = verify
+ ? null
+ : encoding
+
+ // assert charset is supported
+ if (opts.encoding === null && encoding !== null && !iconv.encodingExists(encoding)) {
+ return next(createError(415, 'unsupported charset "' + encoding.toUpperCase() + '"', {
+ charset: encoding.toLowerCase(),
+ type: 'charset.unsupported'
+ }))
+ }
+
+ // read body
+ debug('read body')
+ getBody(stream, opts, function (error, body) {
+ if (error) {
+ var _error
+
+ if (error.type === 'encoding.unsupported') {
+ // echo back charset
+ _error = createError(415, 'unsupported charset "' + encoding.toUpperCase() + '"', {
+ charset: encoding.toLowerCase(),
+ type: 'charset.unsupported'
+ })
+ } else {
+ // set status code on error
+ _error = createError(400, error)
+ }
+
+ // unpipe from stream and destroy
+ if (stream !== req) {
+ req.unpipe()
+ stream.destroy()
+ }
+
+ // read off entire request
+ dump(req, function onfinished () {
+ next(createError(400, _error))
+ })
+ return
+ }
+
+ // verify
+ if (verify) {
+ try {
+ debug('verify body')
+ verify(req, res, body, encoding)
+ } catch (err) {
+ next(createError(403, err, {
+ body: body,
+ type: err.type || 'entity.verify.failed'
+ }))
+ return
+ }
+ }
+
+ // parse
+ var str = body
+ try {
+ debug('parse body')
+ str = typeof body !== 'string' && encoding !== null
+ ? iconv.decode(body, encoding)
+ : body
+ req.body = parse(str, encoding)
+ } catch (err) {
+ next(createError(400, err, {
+ body: str,
+ type: err.type || 'entity.parse.failed'
+ }))
+ return
+ }
+
+ next()
+ })
+}
+
+/**
+ * Get the content stream of the request.
+ *
+ * @param {object} req
+ * @param {function} debug
+ * @param {boolean} [inflate=true]
+ * @return {object}
+ * @api private
+ */
+
+function contentstream (req, debug, inflate) {
+ var encoding = (req.headers['content-encoding'] || 'identity').toLowerCase()
+ var length = req.headers['content-length']
+
+ debug('content-encoding "%s"', encoding)
+
+ if (inflate === false && encoding !== 'identity') {
+ throw createError(415, 'content encoding unsupported', {
+ encoding: encoding,
+ type: 'encoding.unsupported'
+ })
+ }
+
+ if (encoding === 'identity') {
+ req.length = length
+ return req
+ }
+
+ var stream = createDecompressionStream(encoding, debug)
+ req.pipe(stream)
+ return stream
+}
+
+/**
+ * Create a decompression stream for the given encoding.
+ * @param {string} encoding
+ * @param {function} debug
+ * @return {object}
+ * @api private
+ */
+function createDecompressionStream (encoding, debug) {
+ switch (encoding) {
+ case 'deflate':
+ debug('inflate body')
+ return zlib.createInflate()
+ case 'gzip':
+ debug('gunzip body')
+ return zlib.createGunzip()
+ case 'br':
+ debug('brotli decompress body')
+ return zlib.createBrotliDecompress()
+ default:
+ throw createError(415, 'unsupported content encoding "' + encoding + '"', {
+ encoding: encoding,
+ type: 'encoding.unsupported'
+ })
+ }
+}
+
+/**
+ * Dump the contents of a request.
+ *
+ * @param {object} req
+ * @param {function} callback
+ * @api private
+ */
+
+function dump (req, callback) {
+ if (onFinished.isFinished(req)) {
+ callback(null)
+ } else {
+ onFinished(req, callback)
+ req.resume()
+ }
+}
diff --git a/node_modules/body-parser/lib/types/json.js b/node_modules/body-parser/lib/types/json.js
new file mode 100644
index 0000000..078ce71
--- /dev/null
+++ b/node_modules/body-parser/lib/types/json.js
@@ -0,0 +1,206 @@
+/*!
+ * body-parser
+ * Copyright(c) 2014 Jonathan Ong
+ * Copyright(c) 2014-2015 Douglas Christopher Wilson
+ * MIT Licensed
+ */
+
+'use strict'
+
+/**
+ * Module dependencies.
+ * @private
+ */
+
+var createError = require('http-errors')
+var debug = require('debug')('body-parser:json')
+var isFinished = require('on-finished').isFinished
+var read = require('../read')
+var typeis = require('type-is')
+var { getCharset, normalizeOptions } = require('../utils')
+
+/**
+ * Module exports.
+ */
+
+module.exports = json
+
+/**
+ * RegExp to match the first non-space in a string.
+ *
+ * Allowed whitespace is defined in RFC 7159:
+ *
+ * ws = *(
+ * %x20 / ; Space
+ * %x09 / ; Horizontal tab
+ * %x0A / ; Line feed or New line
+ * %x0D ) ; Carriage return
+ */
+
+var FIRST_CHAR_REGEXP = /^[\x20\x09\x0a\x0d]*([^\x20\x09\x0a\x0d])/ // eslint-disable-line no-control-regex
+
+var JSON_SYNTAX_CHAR = '#'
+var JSON_SYNTAX_REGEXP = /#+/g
+
+/**
+ * Create a middleware to parse JSON bodies.
+ *
+ * @param {object} [options]
+ * @return {function}
+ * @public
+ */
+
+function json (options) {
+ var { inflate, limit, verify, shouldParse } = normalizeOptions(options, 'application/json')
+
+ var reviver = options?.reviver
+ var strict = options?.strict !== false
+
+ function parse (body) {
+ if (body.length === 0) {
+ // special-case empty json body, as it's a common client-side mistake
+ // TODO: maybe make this configurable or part of "strict" option
+ return {}
+ }
+
+ if (strict) {
+ var first = firstchar(body)
+
+ if (first !== '{' && first !== '[') {
+ debug('strict violation')
+ throw createStrictSyntaxError(body, first)
+ }
+ }
+
+ try {
+ debug('parse json')
+ return JSON.parse(body, reviver)
+ } catch (e) {
+ throw normalizeJsonSyntaxError(e, {
+ message: e.message,
+ stack: e.stack
+ })
+ }
+ }
+
+ return function jsonParser (req, res, next) {
+ if (isFinished(req)) {
+ debug('body already parsed')
+ next()
+ return
+ }
+
+ if (!('body' in req)) {
+ req.body = undefined
+ }
+
+ // skip requests without bodies
+ if (!typeis.hasBody(req)) {
+ debug('skip empty body')
+ next()
+ return
+ }
+
+ debug('content-type %j', req.headers['content-type'])
+
+ // determine if request should be parsed
+ if (!shouldParse(req)) {
+ debug('skip parsing')
+ next()
+ return
+ }
+
+ // assert charset per RFC 7159 sec 8.1
+ var charset = getCharset(req) || 'utf-8'
+ if (charset.slice(0, 4) !== 'utf-') {
+ debug('invalid charset')
+ next(createError(415, 'unsupported charset "' + charset.toUpperCase() + '"', {
+ charset: charset,
+ type: 'charset.unsupported'
+ }))
+ return
+ }
+
+ // read
+ read(req, res, next, parse, debug, {
+ encoding: charset,
+ inflate,
+ limit,
+ verify
+ })
+ }
+}
+
+/**
+ * Create strict violation syntax error matching native error.
+ *
+ * @param {string} str
+ * @param {string} char
+ * @return {Error}
+ * @private
+ */
+
+function createStrictSyntaxError (str, char) {
+ var index = str.indexOf(char)
+ var partial = ''
+
+ if (index !== -1) {
+ partial = str.substring(0, index) + JSON_SYNTAX_CHAR
+
+ for (var i = index + 1; i < str.length; i++) {
+ partial += JSON_SYNTAX_CHAR
+ }
+ }
+
+ try {
+ JSON.parse(partial); /* istanbul ignore next */ throw new SyntaxError('strict violation')
+ } catch (e) {
+ return normalizeJsonSyntaxError(e, {
+ message: e.message.replace(JSON_SYNTAX_REGEXP, function (placeholder) {
+ return str.substring(index, index + placeholder.length)
+ }),
+ stack: e.stack
+ })
+ }
+}
+
+/**
+ * Get the first non-whitespace character in a string.
+ *
+ * @param {string} str
+ * @return {function}
+ * @private
+ */
+
+function firstchar (str) {
+ var match = FIRST_CHAR_REGEXP.exec(str)
+
+ return match
+ ? match[1]
+ : undefined
+}
+
+/**
+ * Normalize a SyntaxError for JSON.parse.
+ *
+ * @param {SyntaxError} error
+ * @param {object} obj
+ * @return {SyntaxError}
+ */
+
+function normalizeJsonSyntaxError (error, obj) {
+ var keys = Object.getOwnPropertyNames(error)
+
+ for (var i = 0; i < keys.length; i++) {
+ var key = keys[i]
+ if (key !== 'stack' && key !== 'message') {
+ delete error[key]
+ }
+ }
+
+ // replace stack before message for Node.js 0.10 and below
+ error.stack = obj.stack.replace(error.message, obj.message)
+ error.message = obj.message
+
+ return error
+}
diff --git a/node_modules/body-parser/lib/types/raw.js b/node_modules/body-parser/lib/types/raw.js
new file mode 100644
index 0000000..3788ff2
--- /dev/null
+++ b/node_modules/body-parser/lib/types/raw.js
@@ -0,0 +1,75 @@
+/*!
+ * body-parser
+ * Copyright(c) 2014-2015 Douglas Christopher Wilson
+ * MIT Licensed
+ */
+
+'use strict'
+
+/**
+ * Module dependencies.
+ */
+
+var debug = require('debug')('body-parser:raw')
+var isFinished = require('on-finished').isFinished
+var read = require('../read')
+var typeis = require('type-is')
+var { normalizeOptions } = require('../utils')
+
+/**
+ * Module exports.
+ */
+
+module.exports = raw
+
+/**
+ * Create a middleware to parse raw bodies.
+ *
+ * @param {object} [options]
+ * @return {function}
+ * @api public
+ */
+
+function raw (options) {
+ var { inflate, limit, verify, shouldParse } = normalizeOptions(options, 'application/octet-stream')
+
+ function parse (buf) {
+ return buf
+ }
+
+ return function rawParser (req, res, next) {
+ if (isFinished(req)) {
+ debug('body already parsed')
+ next()
+ return
+ }
+
+ if (!('body' in req)) {
+ req.body = undefined
+ }
+
+ // skip requests without bodies
+ if (!typeis.hasBody(req)) {
+ debug('skip empty body')
+ next()
+ return
+ }
+
+ debug('content-type %j', req.headers['content-type'])
+
+ // determine if request should be parsed
+ if (!shouldParse(req)) {
+ debug('skip parsing')
+ next()
+ return
+ }
+
+ // read
+ read(req, res, next, parse, debug, {
+ encoding: null,
+ inflate,
+ limit,
+ verify
+ })
+ }
+}
diff --git a/node_modules/body-parser/lib/types/text.js b/node_modules/body-parser/lib/types/text.js
new file mode 100644
index 0000000..3e0ab1b
--- /dev/null
+++ b/node_modules/body-parser/lib/types/text.js
@@ -0,0 +1,80 @@
+/*!
+ * body-parser
+ * Copyright(c) 2014-2015 Douglas Christopher Wilson
+ * MIT Licensed
+ */
+
+'use strict'
+
+/**
+ * Module dependencies.
+ */
+
+var debug = require('debug')('body-parser:text')
+var isFinished = require('on-finished').isFinished
+var read = require('../read')
+var typeis = require('type-is')
+var { getCharset, normalizeOptions } = require('../utils')
+
+/**
+ * Module exports.
+ */
+
+module.exports = text
+
+/**
+ * Create a middleware to parse text bodies.
+ *
+ * @param {object} [options]
+ * @return {function}
+ * @api public
+ */
+
+function text (options) {
+ var { inflate, limit, verify, shouldParse } = normalizeOptions(options, 'text/plain')
+
+ var defaultCharset = options?.defaultCharset || 'utf-8'
+
+ function parse (buf) {
+ return buf
+ }
+
+ return function textParser (req, res, next) {
+ if (isFinished(req)) {
+ debug('body already parsed')
+ next()
+ return
+ }
+
+ if (!('body' in req)) {
+ req.body = undefined
+ }
+
+ // skip requests without bodies
+ if (!typeis.hasBody(req)) {
+ debug('skip empty body')
+ next()
+ return
+ }
+
+ debug('content-type %j', req.headers['content-type'])
+
+ // determine if request should be parsed
+ if (!shouldParse(req)) {
+ debug('skip parsing')
+ next()
+ return
+ }
+
+ // get charset
+ var charset = getCharset(req) || defaultCharset
+
+ // read
+ read(req, res, next, parse, debug, {
+ encoding: charset,
+ inflate,
+ limit,
+ verify
+ })
+ }
+}
diff --git a/node_modules/body-parser/lib/types/urlencoded.js b/node_modules/body-parser/lib/types/urlencoded.js
new file mode 100644
index 0000000..f993425
--- /dev/null
+++ b/node_modules/body-parser/lib/types/urlencoded.js
@@ -0,0 +1,177 @@
+/*!
+ * body-parser
+ * Copyright(c) 2014 Jonathan Ong
+ * Copyright(c) 2014-2015 Douglas Christopher Wilson
+ * MIT Licensed
+ */
+
+'use strict'
+
+/**
+ * Module dependencies.
+ * @private
+ */
+
+var createError = require('http-errors')
+var debug = require('debug')('body-parser:urlencoded')
+var isFinished = require('on-finished').isFinished
+var read = require('../read')
+var typeis = require('type-is')
+var qs = require('qs')
+var { getCharset, normalizeOptions } = require('../utils')
+
+/**
+ * Module exports.
+ */
+
+module.exports = urlencoded
+
+/**
+ * Create a middleware to parse urlencoded bodies.
+ *
+ * @param {object} [options]
+ * @return {function}
+ * @public
+ */
+
+function urlencoded (options) {
+ var { inflate, limit, verify, shouldParse } = normalizeOptions(options, 'application/x-www-form-urlencoded')
+
+ var defaultCharset = options?.defaultCharset || 'utf-8'
+ if (defaultCharset !== 'utf-8' && defaultCharset !== 'iso-8859-1') {
+ throw new TypeError('option defaultCharset must be either utf-8 or iso-8859-1')
+ }
+
+ // create the appropriate query parser
+ var queryparse = createQueryParser(options)
+
+ function parse (body, encoding) {
+ return body.length
+ ? queryparse(body, encoding)
+ : {}
+ }
+
+ return function urlencodedParser (req, res, next) {
+ if (isFinished(req)) {
+ debug('body already parsed')
+ next()
+ return
+ }
+
+ if (!('body' in req)) {
+ req.body = undefined
+ }
+
+ // skip requests without bodies
+ if (!typeis.hasBody(req)) {
+ debug('skip empty body')
+ next()
+ return
+ }
+
+ debug('content-type %j', req.headers['content-type'])
+
+ // determine if request should be parsed
+ if (!shouldParse(req)) {
+ debug('skip parsing')
+ next()
+ return
+ }
+
+ // assert charset
+ var charset = getCharset(req) || defaultCharset
+ if (charset !== 'utf-8' && charset !== 'iso-8859-1') {
+ debug('invalid charset')
+ next(createError(415, 'unsupported charset "' + charset.toUpperCase() + '"', {
+ charset: charset,
+ type: 'charset.unsupported'
+ }))
+ return
+ }
+
+ // read
+ read(req, res, next, parse, debug, {
+ encoding: charset,
+ inflate,
+ limit,
+ verify
+ })
+ }
+}
+
+/**
+ * Get the extended query parser.
+ *
+ * @param {object} options
+ */
+
+function createQueryParser (options) {
+ var extended = Boolean(options?.extended)
+ var parameterLimit = options?.parameterLimit !== undefined
+ ? options?.parameterLimit
+ : 1000
+ var charsetSentinel = options?.charsetSentinel
+ var interpretNumericEntities = options?.interpretNumericEntities
+ var depth = extended ? (options?.depth !== undefined ? options?.depth : 32) : 0
+
+ if (isNaN(parameterLimit) || parameterLimit < 1) {
+ throw new TypeError('option parameterLimit must be a positive number')
+ }
+
+ if (isNaN(depth) || depth < 0) {
+ throw new TypeError('option depth must be a zero or a positive number')
+ }
+
+ if (isFinite(parameterLimit)) {
+ parameterLimit = parameterLimit | 0
+ }
+
+ return function queryparse (body, encoding) {
+ var paramCount = parameterCount(body, parameterLimit)
+
+ if (paramCount === undefined) {
+ debug('too many parameters')
+ throw createError(413, 'too many parameters', {
+ type: 'parameters.too.many'
+ })
+ }
+
+ var arrayLimit = extended ? Math.max(100, paramCount) : 0
+
+ debug('parse ' + (extended ? 'extended ' : '') + 'urlencoding')
+ try {
+ return qs.parse(body, {
+ allowPrototypes: true,
+ arrayLimit: arrayLimit,
+ depth: depth,
+ charsetSentinel: charsetSentinel,
+ interpretNumericEntities: interpretNumericEntities,
+ charset: encoding,
+ parameterLimit: parameterLimit,
+ strictDepth: true
+ })
+ } catch (err) {
+ if (err instanceof RangeError) {
+ throw createError(400, 'The input exceeded the depth', {
+ type: 'querystring.parse.rangeError'
+ })
+ } else {
+ throw err
+ }
+ }
+ }
+}
+
+/**
+ * Count the number of parameters, stopping once limit reached
+ *
+ * @param {string} body
+ * @param {number} limit
+ * @api private
+ */
+
+function parameterCount (body, limit) {
+ var len = body.split('&').length
+
+ return len > limit ? undefined : len - 1
+}
diff --git a/node_modules/body-parser/lib/utils.js b/node_modules/body-parser/lib/utils.js
new file mode 100644
index 0000000..eee5d95
--- /dev/null
+++ b/node_modules/body-parser/lib/utils.js
@@ -0,0 +1,83 @@
+'use strict'
+
+/**
+ * Module dependencies.
+ */
+
+var bytes = require('bytes')
+var contentType = require('content-type')
+var typeis = require('type-is')
+
+/**
+ * Module exports.
+ */
+
+module.exports = {
+ getCharset,
+ normalizeOptions
+}
+
+/**
+ * Get the charset of a request.
+ *
+ * @param {object} req
+ * @api private
+ */
+
+function getCharset (req) {
+ try {
+ return (contentType.parse(req).parameters.charset || '').toLowerCase()
+ } catch {
+ return undefined
+ }
+}
+
+/**
+ * Get the simple type checker.
+ *
+ * @param {string | string[]} type
+ * @return {function}
+ */
+
+function typeChecker (type) {
+ return function checkType (req) {
+ return Boolean(typeis(req, type))
+ }
+}
+
+/**
+ * Normalizes the common options for all parsers.
+ *
+ * @param {object} options options to normalize
+ * @param {string | string[] | function} defaultType default content type(s) or a function to determine it
+ * @returns {object}
+ */
+function normalizeOptions (options, defaultType) {
+ if (!defaultType) {
+ // Parsers must define a default content type
+ throw new TypeError('defaultType must be provided')
+ }
+
+ var inflate = options?.inflate !== false
+ var limit = typeof options?.limit !== 'number'
+ ? bytes.parse(options?.limit || '100kb')
+ : options?.limit
+ var type = options?.type || defaultType
+ var verify = options?.verify || false
+
+ if (verify !== false && typeof verify !== 'function') {
+ throw new TypeError('option verify must be function')
+ }
+
+ // create the appropriate type checking function
+ var shouldParse = typeof type !== 'function'
+ ? typeChecker(type)
+ : type
+
+ return {
+ inflate,
+ limit,
+ verify,
+ shouldParse
+ }
+}
diff --git a/node_modules/body-parser/package.json b/node_modules/body-parser/package.json
new file mode 100644
index 0000000..e7f763b
--- /dev/null
+++ b/node_modules/body-parser/package.json
@@ -0,0 +1,49 @@
+{
+ "name": "body-parser",
+ "description": "Node.js body parsing middleware",
+ "version": "2.2.0",
+ "contributors": [
+ "Douglas Christopher Wilson ",
+ "Jonathan Ong (http://jongleberry.com)"
+ ],
+ "license": "MIT",
+ "repository": "expressjs/body-parser",
+ "dependencies": {
+ "bytes": "^3.1.2",
+ "content-type": "^1.0.5",
+ "debug": "^4.4.0",
+ "http-errors": "^2.0.0",
+ "iconv-lite": "^0.6.3",
+ "on-finished": "^2.4.1",
+ "qs": "^6.14.0",
+ "raw-body": "^3.0.0",
+ "type-is": "^2.0.0"
+ },
+ "devDependencies": {
+ "eslint": "8.34.0",
+ "eslint-config-standard": "14.1.1",
+ "eslint-plugin-import": "2.27.5",
+ "eslint-plugin-markdown": "3.0.0",
+ "eslint-plugin-node": "11.1.0",
+ "eslint-plugin-promise": "6.1.1",
+ "eslint-plugin-standard": "4.1.0",
+ "mocha": "^11.1.0",
+ "nyc": "^17.1.0",
+ "supertest": "^7.0.0"
+ },
+ "files": [
+ "lib/",
+ "LICENSE",
+ "HISTORY.md",
+ "index.js"
+ ],
+ "engines": {
+ "node": ">=18"
+ },
+ "scripts": {
+ "lint": "eslint .",
+ "test": "mocha --reporter spec --check-leaks test/",
+ "test-ci": "nyc --reporter=lcovonly --reporter=text npm test",
+ "test-cov": "nyc --reporter=html --reporter=text npm test"
+ }
+}
diff --git a/node_modules/bytes/History.md b/node_modules/bytes/History.md
new file mode 100644
index 0000000..d60ce0e
--- /dev/null
+++ b/node_modules/bytes/History.md
@@ -0,0 +1,97 @@
+3.1.2 / 2022-01-27
+==================
+
+ * Fix return value for un-parsable strings
+
+3.1.1 / 2021-11-15
+==================
+
+ * Fix "thousandsSeparator" incorrecting formatting fractional part
+
+3.1.0 / 2019-01-22
+==================
+
+ * Add petabyte (`pb`) support
+
+3.0.0 / 2017-08-31
+==================
+
+ * Change "kB" to "KB" in format output
+ * Remove support for Node.js 0.6
+ * Remove support for ComponentJS
+
+2.5.0 / 2017-03-24
+==================
+
+ * Add option "unit"
+
+2.4.0 / 2016-06-01
+==================
+
+ * Add option "unitSeparator"
+
+2.3.0 / 2016-02-15
+==================
+
+ * Drop partial bytes on all parsed units
+ * Fix non-finite numbers to `.format` to return `null`
+ * Fix parsing byte string that looks like hex
+ * perf: hoist regular expressions
+
+2.2.0 / 2015-11-13
+==================
+
+ * add option "decimalPlaces"
+ * add option "fixedDecimals"
+
+2.1.0 / 2015-05-21
+==================
+
+ * add `.format` export
+ * add `.parse` export
+
+2.0.2 / 2015-05-20
+==================
+
+ * remove map recreation
+ * remove unnecessary object construction
+
+2.0.1 / 2015-05-07
+==================
+
+ * fix browserify require
+ * remove node.extend dependency
+
+2.0.0 / 2015-04-12
+==================
+
+ * add option "case"
+ * add option "thousandsSeparator"
+ * return "null" on invalid parse input
+ * support proper round-trip: bytes(bytes(num)) === num
+ * units no longer case sensitive when parsing
+
+1.0.0 / 2014-05-05
+==================
+
+ * add negative support. fixes #6
+
+0.3.0 / 2014-03-19
+==================
+
+ * added terabyte support
+
+0.2.1 / 2013-04-01
+==================
+
+ * add .component
+
+0.2.0 / 2012-10-28
+==================
+
+ * bytes(200).should.eql('200b')
+
+0.1.0 / 2012-07-04
+==================
+
+ * add bytes to string conversion [yields]
diff --git a/node_modules/bytes/LICENSE b/node_modules/bytes/LICENSE
new file mode 100644
index 0000000..63e95a9
--- /dev/null
+++ b/node_modules/bytes/LICENSE
@@ -0,0 +1,23 @@
+(The MIT License)
+
+Copyright (c) 2012-2014 TJ Holowaychuk
+Copyright (c) 2015 Jed Watson
+
+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/bytes/Readme.md b/node_modules/bytes/Readme.md
new file mode 100644
index 0000000..5790e23
--- /dev/null
+++ b/node_modules/bytes/Readme.md
@@ -0,0 +1,152 @@
+# Bytes utility
+
+[![NPM Version][npm-image]][npm-url]
+[![NPM Downloads][downloads-image]][downloads-url]
+[![Build Status][ci-image]][ci-url]
+[![Test Coverage][coveralls-image]][coveralls-url]
+
+Utility to parse a string bytes (ex: `1TB`) to bytes (`1099511627776`) and vice-versa.
+
+## 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):
+
+```bash
+$ npm install bytes
+```
+
+## Usage
+
+```js
+var bytes = require('bytes');
+```
+
+#### bytes(number|string value, [options]): number|string|null
+
+Default export function. Delegates to either `bytes.format` or `bytes.parse` based on the type of `value`.
+
+**Arguments**
+
+| Name | Type | Description |
+|---------|----------|--------------------|
+| value | `number`|`string` | Number value to format or string value to parse |
+| options | `Object` | Conversion options for `format` |
+
+**Returns**
+
+| Name | Type | Description |
+|---------|------------------|-------------------------------------------------|
+| results | `string`|`number`|`null` | Return null upon error. Numeric value in bytes, or string value otherwise. |
+
+**Example**
+
+```js
+bytes(1024);
+// output: '1KB'
+
+bytes('1KB');
+// output: 1024
+```
+
+#### bytes.format(number value, [options]): string|null
+
+Format the given value in bytes into a string. If the value is negative, it is kept as such. If it is a float, it is
+ rounded.
+
+**Arguments**
+
+| Name | Type | Description |
+|---------|----------|--------------------|
+| value | `number` | Value in bytes |
+| options | `Object` | Conversion options |
+
+**Options**
+
+| Property | Type | Description |
+|-------------------|--------|-----------------------------------------------------------------------------------------|
+| decimalPlaces | `number`|`null` | Maximum number of decimal places to include in output. Default value to `2`. |
+| fixedDecimals | `boolean`|`null` | Whether to always display the maximum number of decimal places. Default value to `false` |
+| thousandsSeparator | `string`|`null` | Example of values: `' '`, `','` and `'.'`... Default value to `''`. |
+| unit | `string`|`null` | The unit in which the result will be returned (B/KB/MB/GB/TB). Default value to `''` (which means auto detect). |
+| unitSeparator | `string`|`null` | Separator to use between number and unit. Default value to `''`. |
+
+**Returns**
+
+| Name | Type | Description |
+|---------|------------------|-------------------------------------------------|
+| results | `string`|`null` | Return null upon error. String value otherwise. |
+
+**Example**
+
+```js
+bytes.format(1024);
+// output: '1KB'
+
+bytes.format(1000);
+// output: '1000B'
+
+bytes.format(1000, {thousandsSeparator: ' '});
+// output: '1 000B'
+
+bytes.format(1024 * 1.7, {decimalPlaces: 0});
+// output: '2KB'
+
+bytes.format(1024, {unitSeparator: ' '});
+// output: '1 KB'
+```
+
+#### bytes.parse(string|number value): number|null
+
+Parse the string value into an integer in bytes. If no unit is given, or `value`
+is a number, it is assumed the value is in bytes.
+
+Supported units and abbreviations are as follows and are case-insensitive:
+
+ * `b` for bytes
+ * `kb` for kilobytes
+ * `mb` for megabytes
+ * `gb` for gigabytes
+ * `tb` for terabytes
+ * `pb` for petabytes
+
+The units are in powers of two, not ten. This means 1kb = 1024b according to this parser.
+
+**Arguments**
+
+| Name | Type | Description |
+|---------------|--------|--------------------|
+| value | `string`|`number` | String to parse, or number in bytes. |
+
+**Returns**
+
+| Name | Type | Description |
+|---------|-------------|-------------------------|
+| results | `number`|`null` | Return null upon error. Value in bytes otherwise. |
+
+**Example**
+
+```js
+bytes.parse('1KB');
+// output: 1024
+
+bytes.parse('1024');
+// output: 1024
+
+bytes.parse(1024);
+// output: 1024
+```
+
+## License
+
+[MIT](LICENSE)
+
+[ci-image]: https://badgen.net/github/checks/visionmedia/bytes.js/master?label=ci
+[ci-url]: https://github.com/visionmedia/bytes.js/actions?query=workflow%3Aci
+[coveralls-image]: https://badgen.net/coveralls/c/github/visionmedia/bytes.js/master
+[coveralls-url]: https://coveralls.io/r/visionmedia/bytes.js?branch=master
+[downloads-image]: https://badgen.net/npm/dm/bytes
+[downloads-url]: https://npmjs.org/package/bytes
+[npm-image]: https://badgen.net/npm/v/bytes
+[npm-url]: https://npmjs.org/package/bytes
diff --git a/node_modules/bytes/index.js b/node_modules/bytes/index.js
new file mode 100644
index 0000000..6f2d0f8
--- /dev/null
+++ b/node_modules/bytes/index.js
@@ -0,0 +1,170 @@
+/*!
+ * bytes
+ * Copyright(c) 2012-2014 TJ Holowaychuk
+ * Copyright(c) 2015 Jed Watson
+ * MIT Licensed
+ */
+
+'use strict';
+
+/**
+ * Module exports.
+ * @public
+ */
+
+module.exports = bytes;
+module.exports.format = format;
+module.exports.parse = parse;
+
+/**
+ * Module variables.
+ * @private
+ */
+
+var formatThousandsRegExp = /\B(?=(\d{3})+(?!\d))/g;
+
+var formatDecimalsRegExp = /(?:\.0*|(\.[^0]+)0+)$/;
+
+var map = {
+ b: 1,
+ kb: 1 << 10,
+ mb: 1 << 20,
+ gb: 1 << 30,
+ tb: Math.pow(1024, 4),
+ pb: Math.pow(1024, 5),
+};
+
+var parseRegExp = /^((-|\+)?(\d+(?:\.\d+)?)) *(kb|mb|gb|tb|pb)$/i;
+
+/**
+ * Convert the given value in bytes into a string or parse to string to an integer in bytes.
+ *
+ * @param {string|number} value
+ * @param {{
+ * case: [string],
+ * decimalPlaces: [number]
+ * fixedDecimals: [boolean]
+ * thousandsSeparator: [string]
+ * unitSeparator: [string]
+ * }} [options] bytes options.
+ *
+ * @returns {string|number|null}
+ */
+
+function bytes(value, options) {
+ if (typeof value === 'string') {
+ return parse(value);
+ }
+
+ if (typeof value === 'number') {
+ return format(value, options);
+ }
+
+ return null;
+}
+
+/**
+ * Format the given value in bytes into a string.
+ *
+ * If the value is negative, it is kept as such. If it is a float,
+ * it is rounded.
+ *
+ * @param {number} value
+ * @param {object} [options]
+ * @param {number} [options.decimalPlaces=2]
+ * @param {number} [options.fixedDecimals=false]
+ * @param {string} [options.thousandsSeparator=]
+ * @param {string} [options.unit=]
+ * @param {string} [options.unitSeparator=]
+ *
+ * @returns {string|null}
+ * @public
+ */
+
+function format(value, options) {
+ if (!Number.isFinite(value)) {
+ return null;
+ }
+
+ var mag = Math.abs(value);
+ var thousandsSeparator = (options && options.thousandsSeparator) || '';
+ var unitSeparator = (options && options.unitSeparator) || '';
+ var decimalPlaces = (options && options.decimalPlaces !== undefined) ? options.decimalPlaces : 2;
+ var fixedDecimals = Boolean(options && options.fixedDecimals);
+ var unit = (options && options.unit) || '';
+
+ if (!unit || !map[unit.toLowerCase()]) {
+ if (mag >= map.pb) {
+ unit = 'PB';
+ } else if (mag >= map.tb) {
+ unit = 'TB';
+ } else if (mag >= map.gb) {
+ unit = 'GB';
+ } else if (mag >= map.mb) {
+ unit = 'MB';
+ } else if (mag >= map.kb) {
+ unit = 'KB';
+ } else {
+ unit = 'B';
+ }
+ }
+
+ var val = value / map[unit.toLowerCase()];
+ var str = val.toFixed(decimalPlaces);
+
+ if (!fixedDecimals) {
+ str = str.replace(formatDecimalsRegExp, '$1');
+ }
+
+ if (thousandsSeparator) {
+ str = str.split('.').map(function (s, i) {
+ return i === 0
+ ? s.replace(formatThousandsRegExp, thousandsSeparator)
+ : s
+ }).join('.');
+ }
+
+ return str + unitSeparator + unit;
+}
+
+/**
+ * Parse the string value into an integer in bytes.
+ *
+ * If no unit is given, it is assumed the value is in bytes.
+ *
+ * @param {number|string} val
+ *
+ * @returns {number|null}
+ * @public
+ */
+
+function parse(val) {
+ if (typeof val === 'number' && !isNaN(val)) {
+ return val;
+ }
+
+ if (typeof val !== 'string') {
+ return null;
+ }
+
+ // Test if the string passed is valid
+ var results = parseRegExp.exec(val);
+ var floatValue;
+ var unit = 'b';
+
+ if (!results) {
+ // Nothing could be extracted from the given string
+ floatValue = parseInt(val, 10);
+ unit = 'b'
+ } else {
+ // Retrieve the value and the unit
+ floatValue = parseFloat(results[1]);
+ unit = results[4].toLowerCase();
+ }
+
+ if (isNaN(floatValue)) {
+ return null;
+ }
+
+ return Math.floor(map[unit] * floatValue);
+}
diff --git a/node_modules/bytes/package.json b/node_modules/bytes/package.json
new file mode 100644
index 0000000..f2b6a8b
--- /dev/null
+++ b/node_modules/bytes/package.json
@@ -0,0 +1,42 @@
+{
+ "name": "bytes",
+ "description": "Utility to parse a string bytes to bytes and vice-versa",
+ "version": "3.1.2",
+ "author": "TJ Holowaychuk (http://tjholowaychuk.com)",
+ "contributors": [
+ "Jed Watson ",
+ "Théo FIDRY "
+ ],
+ "license": "MIT",
+ "keywords": [
+ "byte",
+ "bytes",
+ "utility",
+ "parse",
+ "parser",
+ "convert",
+ "converter"
+ ],
+ "repository": "visionmedia/bytes.js",
+ "devDependencies": {
+ "eslint": "7.32.0",
+ "eslint-plugin-markdown": "2.2.1",
+ "mocha": "9.2.0",
+ "nyc": "15.1.0"
+ },
+ "files": [
+ "History.md",
+ "LICENSE",
+ "Readme.md",
+ "index.js"
+ ],
+ "engines": {
+ "node": ">= 0.8"
+ },
+ "scripts": {
+ "lint": "eslint .",
+ "test": "mocha --check-leaks --reporter spec",
+ "test-ci": "nyc --reporter=lcov --reporter=text npm test",
+ "test-cov": "nyc --reporter=html --reporter=text npm test"
+ }
+}
diff --git a/node_modules/call-bind-apply-helpers/.eslintrc b/node_modules/call-bind-apply-helpers/.eslintrc
new file mode 100644
index 0000000..201e859
--- /dev/null
+++ b/node_modules/call-bind-apply-helpers/.eslintrc
@@ -0,0 +1,17 @@
+{
+ "root": true,
+
+ "extends": "@ljharb",
+
+ "rules": {
+ "func-name-matching": 0,
+ "id-length": 0,
+ "new-cap": [2, {
+ "capIsNewExceptions": [
+ "GetIntrinsic",
+ ],
+ }],
+ "no-extra-parens": 0,
+ "no-magic-numbers": 0,
+ },
+}
diff --git a/node_modules/call-bind-apply-helpers/.github/FUNDING.yml b/node_modules/call-bind-apply-helpers/.github/FUNDING.yml
new file mode 100644
index 0000000..0011e9d
--- /dev/null
+++ b/node_modules/call-bind-apply-helpers/.github/FUNDING.yml
@@ -0,0 +1,12 @@
+# These are supported funding model platforms
+
+github: [ljharb]
+patreon: # Replace with a single Patreon username
+open_collective: # Replace with a single Open Collective username
+ko_fi: # Replace with a single Ko-fi username
+tidelift: npm/call-bind-apply-helpers
+community_bridge: # Replace with a single Community Bridge project-name e.g., cloud-foundry
+liberapay: # Replace with a single Liberapay username
+issuehunt: # Replace with a single IssueHunt username
+otechie: # Replace with a single Otechie username
+custom: # Replace with up to 4 custom sponsorship URLs e.g., ['link1', 'link2']
diff --git a/node_modules/call-bind-apply-helpers/.nycrc b/node_modules/call-bind-apply-helpers/.nycrc
new file mode 100644
index 0000000..bdd626c
--- /dev/null
+++ b/node_modules/call-bind-apply-helpers/.nycrc
@@ -0,0 +1,9 @@
+{
+ "all": true,
+ "check-coverage": false,
+ "reporter": ["text-summary", "text", "html", "json"],
+ "exclude": [
+ "coverage",
+ "test"
+ ]
+}
diff --git a/node_modules/call-bind-apply-helpers/CHANGELOG.md b/node_modules/call-bind-apply-helpers/CHANGELOG.md
new file mode 100644
index 0000000..2484942
--- /dev/null
+++ b/node_modules/call-bind-apply-helpers/CHANGELOG.md
@@ -0,0 +1,30 @@
+# Changelog
+
+All notable changes to this project will be documented in this file.
+
+The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/)
+and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).
+
+## [v1.0.2](https://github.com/ljharb/call-bind-apply-helpers/compare/v1.0.1...v1.0.2) - 2025-02-12
+
+### Commits
+
+- [types] improve inferred types [`e6f9586`](https://github.com/ljharb/call-bind-apply-helpers/commit/e6f95860a3c72879cb861a858cdfb8138fbedec1)
+- [Dev Deps] update `@arethetypeswrong/cli`, `@ljharb/tsconfig`, `@types/tape`, `es-value-fixtures`, `for-each`, `has-strict-mode`, `object-inspect` [`e43d540`](https://github.com/ljharb/call-bind-apply-helpers/commit/e43d5409f97543bfbb11f345d47d8ce4e066d8c1)
+
+## [v1.0.1](https://github.com/ljharb/call-bind-apply-helpers/compare/v1.0.0...v1.0.1) - 2024-12-08
+
+### Commits
+
+- [types] `reflectApply`: fix types [`4efc396`](https://github.com/ljharb/call-bind-apply-helpers/commit/4efc3965351a4f02cc55e836fa391d3d11ef2ef8)
+- [Fix] `reflectApply`: oops, Reflect is not a function [`83cc739`](https://github.com/ljharb/call-bind-apply-helpers/commit/83cc7395de6b79b7730bdf092f1436f0b1263c75)
+- [Dev Deps] update `@arethetypeswrong/cli` [`80bd5d3`](https://github.com/ljharb/call-bind-apply-helpers/commit/80bd5d3ae58b4f6b6995ce439dd5a1bcb178a940)
+
+## v1.0.0 - 2024-12-05
+
+### Commits
+
+- Initial implementation, tests, readme [`7879629`](https://github.com/ljharb/call-bind-apply-helpers/commit/78796290f9b7430c9934d6f33d94ae9bc89fce04)
+- Initial commit [`3f1dc16`](https://github.com/ljharb/call-bind-apply-helpers/commit/3f1dc164afc43285631b114a5f9dd9137b2b952f)
+- npm init [`081df04`](https://github.com/ljharb/call-bind-apply-helpers/commit/081df048c312fcee400922026f6e97281200a603)
+- Only apps should have lockfiles [`5b9ca0f`](https://github.com/ljharb/call-bind-apply-helpers/commit/5b9ca0fe8101ebfaf309c549caac4e0a017ed930)
diff --git a/node_modules/call-bind-apply-helpers/LICENSE b/node_modules/call-bind-apply-helpers/LICENSE
new file mode 100644
index 0000000..f82f389
--- /dev/null
+++ b/node_modules/call-bind-apply-helpers/LICENSE
@@ -0,0 +1,21 @@
+MIT License
+
+Copyright (c) 2024 Jordan Harband
+
+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/call-bind-apply-helpers/README.md b/node_modules/call-bind-apply-helpers/README.md
new file mode 100644
index 0000000..8fc0dae
--- /dev/null
+++ b/node_modules/call-bind-apply-helpers/README.md
@@ -0,0 +1,62 @@
+# call-bind-apply-helpers [![Version Badge][npm-version-svg]][package-url]
+
+[![github actions][actions-image]][actions-url]
+[![coverage][codecov-image]][codecov-url]
+[![dependency status][deps-svg]][deps-url]
+[![dev dependency status][dev-deps-svg]][dev-deps-url]
+[![License][license-image]][license-url]
+[![Downloads][downloads-image]][downloads-url]
+
+[![npm badge][npm-badge-png]][package-url]
+
+Helper functions around Function call/apply/bind, for use in `call-bind`.
+
+The only packages that should likely ever use this package directly are `call-bind` and `get-intrinsic`.
+Please use `call-bind` unless you have a very good reason not to.
+
+## Getting started
+
+```sh
+npm install --save call-bind-apply-helpers
+```
+
+## Usage/Examples
+
+```js
+const assert = require('assert');
+const callBindBasic = require('call-bind-apply-helpers');
+
+function f(a, b) {
+ assert.equal(this, 1);
+ assert.equal(a, 2);
+ assert.equal(b, 3);
+ assert.equal(arguments.length, 2);
+}
+
+const fBound = callBindBasic([f, 1]);
+
+delete Function.prototype.call;
+delete Function.prototype.bind;
+
+fBound(2, 3);
+```
+
+## Tests
+
+Clone the repo, `npm install`, and run `npm test`
+
+[package-url]: https://npmjs.org/package/call-bind-apply-helpers
+[npm-version-svg]: https://versionbadg.es/ljharb/call-bind-apply-helpers.svg
+[deps-svg]: https://david-dm.org/ljharb/call-bind-apply-helpers.svg
+[deps-url]: https://david-dm.org/ljharb/call-bind-apply-helpers
+[dev-deps-svg]: https://david-dm.org/ljharb/call-bind-apply-helpers/dev-status.svg
+[dev-deps-url]: https://david-dm.org/ljharb/call-bind-apply-helpers#info=devDependencies
+[npm-badge-png]: https://nodei.co/npm/call-bind-apply-helpers.png?downloads=true&stars=true
+[license-image]: https://img.shields.io/npm/l/call-bind-apply-helpers.svg
+[license-url]: LICENSE
+[downloads-image]: https://img.shields.io/npm/dm/call-bind-apply-helpers.svg
+[downloads-url]: https://npm-stat.com/charts.html?package=call-bind-apply-helpers
+[codecov-image]: https://codecov.io/gh/ljharb/call-bind-apply-helpers/branch/main/graphs/badge.svg
+[codecov-url]: https://app.codecov.io/gh/ljharb/call-bind-apply-helpers/
+[actions-image]: https://img.shields.io/endpoint?url=https://github-actions-badge-u3jn4tfpocch.runkit.sh/ljharb/call-bind-apply-helpers
+[actions-url]: https://github.com/ljharb/call-bind-apply-helpers/actions
diff --git a/node_modules/call-bind-apply-helpers/actualApply.d.ts b/node_modules/call-bind-apply-helpers/actualApply.d.ts
new file mode 100644
index 0000000..b87286a
--- /dev/null
+++ b/node_modules/call-bind-apply-helpers/actualApply.d.ts
@@ -0,0 +1 @@
+export = Reflect.apply;
\ No newline at end of file
diff --git a/node_modules/call-bind-apply-helpers/actualApply.js b/node_modules/call-bind-apply-helpers/actualApply.js
new file mode 100644
index 0000000..ffa5135
--- /dev/null
+++ b/node_modules/call-bind-apply-helpers/actualApply.js
@@ -0,0 +1,10 @@
+'use strict';
+
+var bind = require('function-bind');
+
+var $apply = require('./functionApply');
+var $call = require('./functionCall');
+var $reflectApply = require('./reflectApply');
+
+/** @type {import('./actualApply')} */
+module.exports = $reflectApply || bind.call($call, $apply);
diff --git a/node_modules/call-bind-apply-helpers/applyBind.d.ts b/node_modules/call-bind-apply-helpers/applyBind.d.ts
new file mode 100644
index 0000000..d176c1a
--- /dev/null
+++ b/node_modules/call-bind-apply-helpers/applyBind.d.ts
@@ -0,0 +1,19 @@
+import actualApply from './actualApply';
+
+type TupleSplitHead = T['length'] extends N
+ ? T
+ : T extends [...infer R, any]
+ ? TupleSplitHead
+ : never
+
+type TupleSplitTail = O['length'] extends N
+ ? T
+ : T extends [infer F, ...infer R]
+ ? TupleSplitTail<[...R], N, [...O, F]>
+ : never
+
+type TupleSplit = [TupleSplitHead, TupleSplitTail]
+
+declare function applyBind(...args: TupleSplit, 2>[1]): ReturnType;
+
+export = applyBind;
\ No newline at end of file
diff --git a/node_modules/call-bind-apply-helpers/applyBind.js b/node_modules/call-bind-apply-helpers/applyBind.js
new file mode 100644
index 0000000..d2b7723
--- /dev/null
+++ b/node_modules/call-bind-apply-helpers/applyBind.js
@@ -0,0 +1,10 @@
+'use strict';
+
+var bind = require('function-bind');
+var $apply = require('./functionApply');
+var actualApply = require('./actualApply');
+
+/** @type {import('./applyBind')} */
+module.exports = function applyBind() {
+ return actualApply(bind, $apply, arguments);
+};
diff --git a/node_modules/call-bind-apply-helpers/functionApply.d.ts b/node_modules/call-bind-apply-helpers/functionApply.d.ts
new file mode 100644
index 0000000..1f6e11b
--- /dev/null
+++ b/node_modules/call-bind-apply-helpers/functionApply.d.ts
@@ -0,0 +1 @@
+export = Function.prototype.apply;
\ No newline at end of file
diff --git a/node_modules/call-bind-apply-helpers/functionApply.js b/node_modules/call-bind-apply-helpers/functionApply.js
new file mode 100644
index 0000000..c71df9c
--- /dev/null
+++ b/node_modules/call-bind-apply-helpers/functionApply.js
@@ -0,0 +1,4 @@
+'use strict';
+
+/** @type {import('./functionApply')} */
+module.exports = Function.prototype.apply;
diff --git a/node_modules/call-bind-apply-helpers/functionCall.d.ts b/node_modules/call-bind-apply-helpers/functionCall.d.ts
new file mode 100644
index 0000000..15e93df
--- /dev/null
+++ b/node_modules/call-bind-apply-helpers/functionCall.d.ts
@@ -0,0 +1 @@
+export = Function.prototype.call;
\ No newline at end of file
diff --git a/node_modules/call-bind-apply-helpers/functionCall.js b/node_modules/call-bind-apply-helpers/functionCall.js
new file mode 100644
index 0000000..7a8d873
--- /dev/null
+++ b/node_modules/call-bind-apply-helpers/functionCall.js
@@ -0,0 +1,4 @@
+'use strict';
+
+/** @type {import('./functionCall')} */
+module.exports = Function.prototype.call;
diff --git a/node_modules/call-bind-apply-helpers/index.d.ts b/node_modules/call-bind-apply-helpers/index.d.ts
new file mode 100644
index 0000000..541516b
--- /dev/null
+++ b/node_modules/call-bind-apply-helpers/index.d.ts
@@ -0,0 +1,64 @@
+type RemoveFromTuple<
+ Tuple extends readonly unknown[],
+ RemoveCount extends number,
+ Index extends 1[] = []
+> = Index["length"] extends RemoveCount
+ ? Tuple
+ : Tuple extends [infer First, ...infer Rest]
+ ? RemoveFromTuple
+ : Tuple;
+
+type ConcatTuples<
+ Prefix extends readonly unknown[],
+ Suffix extends readonly unknown[]
+> = [...Prefix, ...Suffix];
+
+type ExtractFunctionParams = T extends (this: infer TThis, ...args: infer P extends readonly unknown[]) => infer R
+ ? { thisArg: TThis; params: P; returnType: R }
+ : never;
+
+type BindFunction<
+ T extends (this: any, ...args: any[]) => any,
+ TThis,
+ TBoundArgs extends readonly unknown[],
+ ReceiverBound extends boolean
+> = ExtractFunctionParams extends {
+ thisArg: infer OrigThis;
+ params: infer P extends readonly unknown[];
+ returnType: infer R;
+}
+ ? ReceiverBound extends true
+ ? (...args: RemoveFromTuple>) => R extends [OrigThis, ...infer Rest]
+ ? [TThis, ...Rest] // Replace `this` with `thisArg`
+ : R
+ : >>(
+ thisArg: U,
+ ...args: RemainingArgs
+ ) => R extends [OrigThis, ...infer Rest]
+ ? [U, ...ConcatTuples] // Preserve bound args in return type
+ : R
+ : never;
+
+declare function callBind<
+ const T extends (this: any, ...args: any[]) => any,
+ Extracted extends ExtractFunctionParams,
+ const TBoundArgs extends Partial & readonly unknown[],
+ const TThis extends Extracted["thisArg"]
+>(
+ args: [fn: T, thisArg: TThis, ...boundArgs: TBoundArgs]
+): BindFunction;
+
+declare function callBind<
+ const T extends (this: any, ...args: any[]) => any,
+ Extracted extends ExtractFunctionParams,
+ const TBoundArgs extends Partial & readonly unknown[]
+>(
+ args: [fn: T, ...boundArgs: TBoundArgs]
+): BindFunction;
+
+declare function callBind(
+ args: [fn: Exclude, ...rest: TArgs]
+): never;
+
+// export as namespace callBind;
+export = callBind;
diff --git a/node_modules/call-bind-apply-helpers/index.js b/node_modules/call-bind-apply-helpers/index.js
new file mode 100644
index 0000000..2f6dab4
--- /dev/null
+++ b/node_modules/call-bind-apply-helpers/index.js
@@ -0,0 +1,15 @@
+'use strict';
+
+var bind = require('function-bind');
+var $TypeError = require('es-errors/type');
+
+var $call = require('./functionCall');
+var $actualApply = require('./actualApply');
+
+/** @type {(args: [Function, thisArg?: unknown, ...args: unknown[]]) => Function} TODO FIXME, find a way to use import('.') */
+module.exports = function callBindBasic(args) {
+ if (args.length < 1 || typeof args[0] !== 'function') {
+ throw new $TypeError('a function is required');
+ }
+ return $actualApply(bind, $call, args);
+};
diff --git a/node_modules/call-bind-apply-helpers/package.json b/node_modules/call-bind-apply-helpers/package.json
new file mode 100644
index 0000000..923b8be
--- /dev/null
+++ b/node_modules/call-bind-apply-helpers/package.json
@@ -0,0 +1,85 @@
+{
+ "name": "call-bind-apply-helpers",
+ "version": "1.0.2",
+ "description": "Helper functions around Function call/apply/bind, for use in `call-bind`",
+ "main": "index.js",
+ "exports": {
+ ".": "./index.js",
+ "./actualApply": "./actualApply.js",
+ "./applyBind": "./applyBind.js",
+ "./functionApply": "./functionApply.js",
+ "./functionCall": "./functionCall.js",
+ "./reflectApply": "./reflectApply.js",
+ "./package.json": "./package.json"
+ },
+ "scripts": {
+ "prepack": "npmignore --auto --commentLines=auto",
+ "prepublish": "not-in-publish || npm run prepublishOnly",
+ "prepublishOnly": "safe-publish-latest",
+ "prelint": "evalmd README.md",
+ "lint": "eslint --ext=.js,.mjs .",
+ "postlint": "tsc -p . && attw -P",
+ "pretest": "npm run lint",
+ "tests-only": "nyc tape 'test/**/*.js'",
+ "test": "npm run tests-only",
+ "posttest": "npx npm@'>=10.2' audit --production",
+ "version": "auto-changelog && git add CHANGELOG.md",
+ "postversion": "auto-changelog && git add CHANGELOG.md && git commit --no-edit --amend && git tag -f \"v$(node -e \"console.log(require('./package.json').version)\")\""
+ },
+ "repository": {
+ "type": "git",
+ "url": "git+https://github.com/ljharb/call-bind-apply-helpers.git"
+ },
+ "author": "Jordan Harband ",
+ "license": "MIT",
+ "bugs": {
+ "url": "https://github.com/ljharb/call-bind-apply-helpers/issues"
+ },
+ "homepage": "https://github.com/ljharb/call-bind-apply-helpers#readme",
+ "dependencies": {
+ "es-errors": "^1.3.0",
+ "function-bind": "^1.1.2"
+ },
+ "devDependencies": {
+ "@arethetypeswrong/cli": "^0.17.3",
+ "@ljharb/eslint-config": "^21.1.1",
+ "@ljharb/tsconfig": "^0.2.3",
+ "@types/for-each": "^0.3.3",
+ "@types/function-bind": "^1.1.10",
+ "@types/object-inspect": "^1.13.0",
+ "@types/tape": "^5.8.1",
+ "auto-changelog": "^2.5.0",
+ "encoding": "^0.1.13",
+ "es-value-fixtures": "^1.7.1",
+ "eslint": "=8.8.0",
+ "evalmd": "^0.0.19",
+ "for-each": "^0.3.5",
+ "has-strict-mode": "^1.1.0",
+ "in-publish": "^2.0.1",
+ "npmignore": "^0.3.1",
+ "nyc": "^10.3.2",
+ "object-inspect": "^1.13.4",
+ "safe-publish-latest": "^2.0.0",
+ "tape": "^5.9.0",
+ "typescript": "next"
+ },
+ "testling": {
+ "files": "test/index.js"
+ },
+ "auto-changelog": {
+ "output": "CHANGELOG.md",
+ "template": "keepachangelog",
+ "unreleased": false,
+ "commitLimit": false,
+ "backfillLimit": false,
+ "hideCredit": true
+ },
+ "publishConfig": {
+ "ignore": [
+ ".github/workflows"
+ ]
+ },
+ "engines": {
+ "node": ">= 0.4"
+ }
+}
diff --git a/node_modules/call-bind-apply-helpers/reflectApply.d.ts b/node_modules/call-bind-apply-helpers/reflectApply.d.ts
new file mode 100644
index 0000000..6b2ae76
--- /dev/null
+++ b/node_modules/call-bind-apply-helpers/reflectApply.d.ts
@@ -0,0 +1,3 @@
+declare const reflectApply: false | typeof Reflect.apply;
+
+export = reflectApply;
diff --git a/node_modules/call-bind-apply-helpers/reflectApply.js b/node_modules/call-bind-apply-helpers/reflectApply.js
new file mode 100644
index 0000000..3d03caa
--- /dev/null
+++ b/node_modules/call-bind-apply-helpers/reflectApply.js
@@ -0,0 +1,4 @@
+'use strict';
+
+/** @type {import('./reflectApply')} */
+module.exports = typeof Reflect !== 'undefined' && Reflect && Reflect.apply;
diff --git a/node_modules/call-bind-apply-helpers/test/index.js b/node_modules/call-bind-apply-helpers/test/index.js
new file mode 100644
index 0000000..1cdc89e
--- /dev/null
+++ b/node_modules/call-bind-apply-helpers/test/index.js
@@ -0,0 +1,63 @@
+'use strict';
+
+var callBind = require('../');
+var hasStrictMode = require('has-strict-mode')();
+var forEach = require('for-each');
+var inspect = require('object-inspect');
+var v = require('es-value-fixtures');
+
+var test = require('tape');
+
+test('callBindBasic', function (t) {
+ forEach(v.nonFunctions, function (nonFunction) {
+ t['throws'](
+ // @ts-expect-error
+ function () { callBind([nonFunction]); },
+ TypeError,
+ inspect(nonFunction) + ' is not a function'
+ );
+ });
+
+ var sentinel = { sentinel: true };
+ /** @type {(this: T, a: A, b: B) => [T | undefined, A, B]} */
+ var func = function (a, b) {
+ // eslint-disable-next-line no-invalid-this
+ return [!hasStrictMode && this === global ? undefined : this, a, b];
+ };
+ t.equal(func.length, 2, 'original function length is 2');
+
+ /** type {(thisArg: unknown, a: number, b: number) => [unknown, number, number]} */
+ var bound = callBind([func]);
+ /** type {((a: number, b: number) => [typeof sentinel, typeof a, typeof b])} */
+ var boundR = callBind([func, sentinel]);
+ /** type {((b: number) => [typeof sentinel, number, typeof b])} */
+ var boundArg = callBind([func, sentinel, /** @type {const} */ (1)]);
+
+ // @ts-expect-error
+ t.deepEqual(bound(), [undefined, undefined, undefined], 'bound func with no args');
+
+ // @ts-expect-error
+ t.deepEqual(func(), [undefined, undefined, undefined], 'unbound func with too few args');
+ // @ts-expect-error
+ t.deepEqual(bound(1, 2), [hasStrictMode ? 1 : Object(1), 2, undefined], 'bound func too few args');
+ // @ts-expect-error
+ t.deepEqual(boundR(), [sentinel, undefined, undefined], 'bound func with receiver, with too few args');
+ // @ts-expect-error
+ t.deepEqual(boundArg(), [sentinel, 1, undefined], 'bound func with receiver and arg, with too few args');
+
+ t.deepEqual(func(1, 2), [undefined, 1, 2], 'unbound func with right args');
+ t.deepEqual(bound(1, 2, 3), [hasStrictMode ? 1 : Object(1), 2, 3], 'bound func with right args');
+ t.deepEqual(boundR(1, 2), [sentinel, 1, 2], 'bound func with receiver, with right args');
+ t.deepEqual(boundArg(2), [sentinel, 1, 2], 'bound func with receiver and arg, with right arg');
+
+ // @ts-expect-error
+ t.deepEqual(func(1, 2, 3), [undefined, 1, 2], 'unbound func with too many args');
+ // @ts-expect-error
+ t.deepEqual(bound(1, 2, 3, 4), [hasStrictMode ? 1 : Object(1), 2, 3], 'bound func with too many args');
+ // @ts-expect-error
+ t.deepEqual(boundR(1, 2, 3), [sentinel, 1, 2], 'bound func with receiver, with too many args');
+ // @ts-expect-error
+ t.deepEqual(boundArg(2, 3), [sentinel, 1, 2], 'bound func with receiver and arg, with too many args');
+
+ t.end();
+});
diff --git a/node_modules/call-bind-apply-helpers/tsconfig.json b/node_modules/call-bind-apply-helpers/tsconfig.json
new file mode 100644
index 0000000..aef9993
--- /dev/null
+++ b/node_modules/call-bind-apply-helpers/tsconfig.json
@@ -0,0 +1,9 @@
+{
+ "extends": "@ljharb/tsconfig",
+ "compilerOptions": {
+ "target": "es2021",
+ },
+ "exclude": [
+ "coverage",
+ ],
+}
\ No newline at end of file
diff --git a/node_modules/call-bound/.eslintrc b/node_modules/call-bound/.eslintrc
new file mode 100644
index 0000000..2612ed8
--- /dev/null
+++ b/node_modules/call-bound/.eslintrc
@@ -0,0 +1,13 @@
+{
+ "root": true,
+
+ "extends": "@ljharb",
+
+ "rules": {
+ "new-cap": [2, {
+ "capIsNewExceptions": [
+ "GetIntrinsic",
+ ],
+ }],
+ },
+}
diff --git a/node_modules/call-bound/.github/FUNDING.yml b/node_modules/call-bound/.github/FUNDING.yml
new file mode 100644
index 0000000..2a2a135
--- /dev/null
+++ b/node_modules/call-bound/.github/FUNDING.yml
@@ -0,0 +1,12 @@
+# These are supported funding model platforms
+
+github: [ljharb]
+patreon: # Replace with a single Patreon username
+open_collective: # Replace with a single Open Collective username
+ko_fi: # Replace with a single Ko-fi username
+tidelift: npm/call-bound
+community_bridge: # Replace with a single Community Bridge project-name e.g., cloud-foundry
+liberapay: # Replace with a single Liberapay username
+issuehunt: # Replace with a single IssueHunt username
+otechie: # Replace with a single Otechie username
+custom: # Replace with up to 4 custom sponsorship URLs e.g., ['link1', 'link2']
diff --git a/node_modules/call-bound/.nycrc b/node_modules/call-bound/.nycrc
new file mode 100644
index 0000000..bdd626c
--- /dev/null
+++ b/node_modules/call-bound/.nycrc
@@ -0,0 +1,9 @@
+{
+ "all": true,
+ "check-coverage": false,
+ "reporter": ["text-summary", "text", "html", "json"],
+ "exclude": [
+ "coverage",
+ "test"
+ ]
+}
diff --git a/node_modules/call-bound/CHANGELOG.md b/node_modules/call-bound/CHANGELOG.md
new file mode 100644
index 0000000..8bde4e9
--- /dev/null
+++ b/node_modules/call-bound/CHANGELOG.md
@@ -0,0 +1,42 @@
+# Changelog
+
+All notable changes to this project will be documented in this file.
+
+The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/)
+and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).
+
+## [v1.0.4](https://github.com/ljharb/call-bound/compare/v1.0.3...v1.0.4) - 2025-03-03
+
+### Commits
+
+- [types] improve types [`e648922`](https://github.com/ljharb/call-bound/commit/e6489222a9e54f350fbf952ceabe51fd8b6027ff)
+- [Dev Deps] update `@arethetypeswrong/cli`, `@ljharb/tsconfig`, `@types/tape`, `es-value-fixtures`, `for-each`, `has-strict-mode`, `object-inspect` [`a42a5eb`](https://github.com/ljharb/call-bound/commit/a42a5ebe6c1b54fcdc7997c7dc64fdca9e936719)
+- [Deps] update `call-bind-apply-helpers`, `get-intrinsic` [`f529eac`](https://github.com/ljharb/call-bound/commit/f529eac132404c17156bbc23ab2297a25d0f20b8)
+
+## [v1.0.3](https://github.com/ljharb/call-bound/compare/v1.0.2...v1.0.3) - 2024-12-15
+
+### Commits
+
+- [Refactor] use `call-bind-apply-helpers` instead of `call-bind` [`5e0b134`](https://github.com/ljharb/call-bound/commit/5e0b13496df14fb7d05dae9412f088da8d3f75be)
+- [Deps] update `get-intrinsic` [`41fc967`](https://github.com/ljharb/call-bound/commit/41fc96732a22c7b7e8f381f93ccc54bb6293be2e)
+- [readme] fix example [`79a0137`](https://github.com/ljharb/call-bound/commit/79a0137723f7c6d09c9c05452bbf8d5efb5d6e49)
+- [meta] add `sideEffects` flag [`08b07be`](https://github.com/ljharb/call-bound/commit/08b07be7f1c03f67dc6f3cdaf0906259771859f7)
+
+## [v1.0.2](https://github.com/ljharb/call-bound/compare/v1.0.1...v1.0.2) - 2024-12-10
+
+### Commits
+
+- [Dev Deps] update `@arethetypeswrong/cli`, `@ljharb/tsconfig`, `gopd` [`e6a5ffe`](https://github.com/ljharb/call-bound/commit/e6a5ffe849368fe4f74dfd6cdeca1b9baa39e8d5)
+- [Deps] update `call-bind`, `get-intrinsic` [`2aeb5b5`](https://github.com/ljharb/call-bound/commit/2aeb5b521dc2b2683d1345c753ea1161de2d1c14)
+- [types] improve return type [`1a0c9fe`](https://github.com/ljharb/call-bound/commit/1a0c9fe3114471e7ca1f57d104e2efe713bb4871)
+
+## v1.0.1 - 2024-12-05
+
+### Commits
+
+- Initial implementation, tests, readme, types [`6d94121`](https://github.com/ljharb/call-bound/commit/6d94121a9243602e506334069f7a03189fe3363d)
+- Initial commit [`0eae867`](https://github.com/ljharb/call-bound/commit/0eae867334ea025c33e6e91cdecfc9df96680cf9)
+- npm init [`71b2479`](https://github.com/ljharb/call-bound/commit/71b2479c6723e0b7d91a6b663613067e98b7b275)
+- Only apps should have lockfiles [`c3754a9`](https://github.com/ljharb/call-bound/commit/c3754a949b7f9132b47e2d18c1729889736741eb)
+- [actions] skip `npm ls` in node < 10 [`74275a5`](https://github.com/ljharb/call-bound/commit/74275a5186b8caf6309b6b97472bdcb0df4683a8)
+- [Dev Deps] add missing peer dep [`1354de8`](https://github.com/ljharb/call-bound/commit/1354de8679413e4ae9c523d85f76fa7a5e032d97)
diff --git a/node_modules/call-bound/LICENSE b/node_modules/call-bound/LICENSE
new file mode 100644
index 0000000..f82f389
--- /dev/null
+++ b/node_modules/call-bound/LICENSE
@@ -0,0 +1,21 @@
+MIT License
+
+Copyright (c) 2024 Jordan Harband
+
+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/call-bound/README.md b/node_modules/call-bound/README.md
new file mode 100644
index 0000000..a44e43e
--- /dev/null
+++ b/node_modules/call-bound/README.md
@@ -0,0 +1,53 @@
+# call-bound [![Version Badge][npm-version-svg]][package-url]
+
+[![github actions][actions-image]][actions-url]
+[![coverage][codecov-image]][codecov-url]
+[![dependency status][deps-svg]][deps-url]
+[![dev dependency status][dev-deps-svg]][dev-deps-url]
+[![License][license-image]][license-url]
+[![Downloads][downloads-image]][downloads-url]
+
+[![npm badge][npm-badge-png]][package-url]
+
+Robust call-bound JavaScript intrinsics, using `call-bind` and `get-intrinsic`.
+
+## Getting started
+
+```sh
+npm install --save call-bound
+```
+
+## Usage/Examples
+
+```js
+const assert = require('assert');
+const callBound = require('call-bound');
+
+const slice = callBound('Array.prototype.slice');
+
+delete Function.prototype.call;
+delete Function.prototype.bind;
+delete Array.prototype.slice;
+
+assert.deepEqual(slice([1, 2, 3, 4], 1, -1), [2, 3]);
+```
+
+## Tests
+
+Clone the repo, `npm install`, and run `npm test`
+
+[package-url]: https://npmjs.org/package/call-bound
+[npm-version-svg]: https://versionbadg.es/ljharb/call-bound.svg
+[deps-svg]: https://david-dm.org/ljharb/call-bound.svg
+[deps-url]: https://david-dm.org/ljharb/call-bound
+[dev-deps-svg]: https://david-dm.org/ljharb/call-bound/dev-status.svg
+[dev-deps-url]: https://david-dm.org/ljharb/call-bound#info=devDependencies
+[npm-badge-png]: https://nodei.co/npm/call-bound.png?downloads=true&stars=true
+[license-image]: https://img.shields.io/npm/l/call-bound.svg
+[license-url]: LICENSE
+[downloads-image]: https://img.shields.io/npm/dm/call-bound.svg
+[downloads-url]: https://npm-stat.com/charts.html?package=call-bound
+[codecov-image]: https://codecov.io/gh/ljharb/call-bound/branch/main/graphs/badge.svg
+[codecov-url]: https://app.codecov.io/gh/ljharb/call-bound/
+[actions-image]: https://img.shields.io/endpoint?url=https://github-actions-badge-u3jn4tfpocch.runkit.sh/ljharb/call-bound
+[actions-url]: https://github.com/ljharb/call-bound/actions
diff --git a/node_modules/call-bound/index.d.ts b/node_modules/call-bound/index.d.ts
new file mode 100644
index 0000000..5562f00
--- /dev/null
+++ b/node_modules/call-bound/index.d.ts
@@ -0,0 +1,94 @@
+type Intrinsic = typeof globalThis;
+
+type IntrinsicName = keyof Intrinsic | `%${keyof Intrinsic}%`;
+
+type IntrinsicPath = IntrinsicName | `${StripPercents}.${string}` | `%${StripPercents}.${string}%`;
+
+type AllowMissing = boolean;
+
+type StripPercents = T extends `%${infer U}%` ? U : T;
+
+type BindMethodPrecise =
+ F extends (this: infer This, ...args: infer Args) => infer R
+ ? (obj: This, ...args: Args) => R
+ : F extends {
+ (this: infer This1, ...args: infer Args1): infer R1;
+ (this: infer This2, ...args: infer Args2): infer R2
+ }
+ ? {
+ (obj: This1, ...args: Args1): R1;
+ (obj: This2, ...args: Args2): R2
+ }
+ : never
+
+// Extract method type from a prototype
+type GetPrototypeMethod =
+ (typeof globalThis)[T] extends { prototype: any }
+ ? M extends keyof (typeof globalThis)[T]['prototype']
+ ? (typeof globalThis)[T]['prototype'][M]
+ : never
+ : never
+
+// Get static property/method
+type GetStaticMember =
+ P extends keyof (typeof globalThis)[T] ? (typeof globalThis)[T][P] : never
+
+// Type that maps string path to actual bound function or value with better precision
+type BoundIntrinsic =
+ S extends `${infer Obj}.prototype.${infer Method}`
+ ? Obj extends keyof typeof globalThis
+ ? BindMethodPrecise>
+ : unknown
+ : S extends `${infer Obj}.${infer Prop}`
+ ? Obj extends keyof typeof globalThis
+ ? GetStaticMember
+ : unknown
+ : unknown
+
+declare function arraySlice(array: readonly T[], start?: number, end?: number): T[];
+declare function arraySlice(array: ArrayLike, start?: number, end?: number): T[];
+declare function arraySlice(array: IArguments, start?: number, end?: number): T[];
+
+// Special cases for methods that need explicit typing
+interface SpecialCases {
+ '%Object.prototype.isPrototypeOf%': (thisArg: {}, obj: unknown) => boolean;
+ '%String.prototype.replace%': {
+ (str: string, searchValue: string | RegExp, replaceValue: string): string;
+ (str: string, searchValue: string | RegExp, replacer: (substring: string, ...args: any[]) => string): string
+ };
+ '%Object.prototype.toString%': (obj: {}) => string;
+ '%Object.prototype.hasOwnProperty%': (obj: {}, v: PropertyKey) => boolean;
+ '%Array.prototype.slice%': typeof arraySlice;
+ '%Array.prototype.map%': (array: readonly T[], callbackfn: (value: T, index: number, array: readonly T[]) => U, thisArg?: any) => U[];
+ '%Array.prototype.filter%': (array: readonly T[], predicate: (value: T, index: number, array: readonly T[]) => unknown, thisArg?: any) => T[];
+ '%Array.prototype.indexOf%': (array: readonly T[], searchElement: T, fromIndex?: number) => number;
+ '%Function.prototype.apply%': (fn: (...args: A) => R, thisArg: any, args: A) => R;
+ '%Function.prototype.call%': (fn: (...args: A) => R, thisArg: any, ...args: A) => R;
+ '%Function.prototype.bind%': (fn: (...args: A) => R, thisArg: any, ...args: A) => (...remainingArgs: A) => R;
+ '%Promise.prototype.then%': {
+ (promise: Promise, onfulfilled: (value: T) => R | PromiseLike): Promise;
+ (promise: Promise, onfulfilled: ((value: T) => R | PromiseLike) | undefined | null, onrejected: (reason: any) => R | PromiseLike): Promise;
+ };
+ '%RegExp.prototype.test%': (regexp: RegExp, str: string) => boolean;
+ '%RegExp.prototype.exec%': (regexp: RegExp, str: string) => RegExpExecArray | null;
+ '%Error.prototype.toString%': (error: Error) => string;
+ '%TypeError.prototype.toString%': (error: TypeError) => string;
+ '%String.prototype.split%': (
+ obj: unknown,
+ splitter: string | RegExp | {
+ [Symbol.split](string: string, limit?: number): string[];
+ },
+ limit?: number | undefined
+ ) => string[];
+}
+
+/**
+ * Returns a bound function for a prototype method, or a value for a static property.
+ *
+ * @param name - The name of the intrinsic (e.g. 'Array.prototype.slice')
+ * @param {AllowMissing} [allowMissing] - Whether to allow missing intrinsics (default: false)
+ */
+declare function callBound