@so1ve/eslint-config
Version:
Ray's eslint config.
33,463 lines • 1.34 MB
JavaScript
var __create = Object.create;
var __defProp = Object.defineProperty;
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
var __getOwnPropNames = Object.getOwnPropertyNames;
var __getProtoOf = Object.getPrototypeOf;
var __hasOwnProp = Object.prototype.hasOwnProperty;
var __require = /* @__PURE__ */ ((x) => typeof require !== "undefined" ? require : typeof Proxy !== "undefined" ? new Proxy(x, {
get: (a, b) => (typeof require !== "undefined" ? require : a)[b]
}) : x)(function(x) {
if (typeof require !== "undefined") return require.apply(this, arguments);
throw Error('Dynamic require of "' + x + '" is not supported');
});
var __esm = (fn, res) => function __init() {
return fn && (res = (0, fn[__getOwnPropNames(fn)[0]])(fn = 0)), res;
};
var __commonJS = (cb, mod) => function __require2() {
return mod || (0, cb[__getOwnPropNames(cb)[0]])((mod = { exports: {} }).exports, mod), mod.exports;
};
var __export = (target, all) => {
for (var name in all)
__defProp(target, name, { get: all[name], enumerable: true });
};
var __copyProps = (to, from, except, desc) => {
if (from && typeof from === "object" || typeof from === "function") {
for (let key of __getOwnPropNames(from))
if (!__hasOwnProp.call(to, key) && key !== except)
__defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
}
return to;
};
var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__getProtoOf(mod)) : {}, __copyProps(
// If the importer is in node compatibility mode or this is not an ESM
// file that has been converted to a CommonJS file using a Babel-
// compatible transform (i.e. "__esModule" has not been set), then set
// "default" to the CommonJS "module.exports" for node compatibility.
isNodeMode || !mod || !mod.__esModule ? __defProp(target, "default", { value: mod, enumerable: true }) : target,
mod
));
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
// build/shims.ts
import { createRequire } from "node:module";
import { dirname } from "node:path";
import { fileURLToPath } from "node:url";
var init_shims = __esm({
"build/shims.ts"() {
"use strict";
globalThis.require = createRequire(import.meta.url);
globalThis.__filename = fileURLToPath(import.meta.url);
globalThis.__dirname = dirname(__filename);
}
});
// ../../node_modules/.pnpm/tslib@2.6.2/node_modules/tslib/tslib.es6.mjs
var tslib_es6_exports = {};
__export(tslib_es6_exports, {
__addDisposableResource: () => __addDisposableResource,
__assign: () => __assign,
__asyncDelegator: () => __asyncDelegator,
__asyncGenerator: () => __asyncGenerator,
__asyncValues: () => __asyncValues,
__await: () => __await,
__awaiter: () => __awaiter,
__classPrivateFieldGet: () => __classPrivateFieldGet,
__classPrivateFieldIn: () => __classPrivateFieldIn,
__classPrivateFieldSet: () => __classPrivateFieldSet,
__createBinding: () => __createBinding,
__decorate: () => __decorate,
__disposeResources: () => __disposeResources,
__esDecorate: () => __esDecorate,
__exportStar: () => __exportStar,
__extends: () => __extends,
__generator: () => __generator,
__importDefault: () => __importDefault,
__importStar: () => __importStar,
__makeTemplateObject: () => __makeTemplateObject,
__metadata: () => __metadata,
__param: () => __param,
__propKey: () => __propKey,
__read: () => __read,
__rest: () => __rest,
__runInitializers: () => __runInitializers,
__setFunctionName: () => __setFunctionName,
__spread: () => __spread,
__spreadArray: () => __spreadArray,
__spreadArrays: () => __spreadArrays,
__values: () => __values,
default: () => tslib_es6_default
});
function __extends(d, b) {
if (typeof b !== "function" && b !== null)
throw new TypeError("Class extends value " + String(b) + " is not a constructor or null");
extendStatics(d, b);
function __() {
this.constructor = d;
}
d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
}
function __rest(s, e) {
var t = {};
for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0)
t[p] = s[p];
if (s != null && typeof Object.getOwnPropertySymbols === "function")
for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) {
if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable.call(s, p[i]))
t[p[i]] = s[p[i]];
}
return t;
}
function __decorate(decorators, target, key, desc) {
var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
return c > 3 && r && Object.defineProperty(target, key, r), r;
}
function __param(paramIndex, decorator) {
return function(target, key) {
decorator(target, key, paramIndex);
};
}
function __esDecorate(ctor, descriptorIn, decorators, contextIn, initializers, extraInitializers) {
function accept(f) {
if (f !== void 0 && typeof f !== "function") throw new TypeError("Function expected");
return f;
}
var kind = contextIn.kind, key = kind === "getter" ? "get" : kind === "setter" ? "set" : "value";
var target = !descriptorIn && ctor ? contextIn["static"] ? ctor : ctor.prototype : null;
var descriptor = descriptorIn || (target ? Object.getOwnPropertyDescriptor(target, contextIn.name) : {});
var _, done = false;
for (var i = decorators.length - 1; i >= 0; i--) {
var context = {};
for (var p in contextIn) context[p] = p === "access" ? {} : contextIn[p];
for (var p in contextIn.access) context.access[p] = contextIn.access[p];
context.addInitializer = function(f) {
if (done) throw new TypeError("Cannot add initializers after decoration has completed");
extraInitializers.push(accept(f || null));
};
var result = (0, decorators[i])(kind === "accessor" ? { get: descriptor.get, set: descriptor.set } : descriptor[key], context);
if (kind === "accessor") {
if (result === void 0) continue;
if (result === null || typeof result !== "object") throw new TypeError("Object expected");
if (_ = accept(result.get)) descriptor.get = _;
if (_ = accept(result.set)) descriptor.set = _;
if (_ = accept(result.init)) initializers.unshift(_);
} else if (_ = accept(result)) {
if (kind === "field") initializers.unshift(_);
else descriptor[key] = _;
}
}
if (target) Object.defineProperty(target, contextIn.name, descriptor);
done = true;
}
function __runInitializers(thisArg, initializers, value) {
var useValue = arguments.length > 2;
for (var i = 0; i < initializers.length; i++) {
value = useValue ? initializers[i].call(thisArg, value) : initializers[i].call(thisArg);
}
return useValue ? value : void 0;
}
function __propKey(x) {
return typeof x === "symbol" ? x : "".concat(x);
}
function __setFunctionName(f, name, prefix) {
if (typeof name === "symbol") name = name.description ? "[".concat(name.description, "]") : "";
return Object.defineProperty(f, "name", { configurable: true, value: prefix ? "".concat(prefix, " ", name) : name });
}
function __metadata(metadataKey, metadataValue) {
if (typeof Reflect === "object" && typeof Reflect.metadata === "function") return Reflect.metadata(metadataKey, metadataValue);
}
function __awaiter(thisArg, _arguments, P, generator) {
function adopt(value) {
return value instanceof P ? value : new P(function(resolve) {
resolve(value);
});
}
return new (P || (P = Promise))(function(resolve, reject) {
function fulfilled(value) {
try {
step(generator.next(value));
} catch (e) {
reject(e);
}
}
function rejected(value) {
try {
step(generator["throw"](value));
} catch (e) {
reject(e);
}
}
function step(result) {
result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected);
}
step((generator = generator.apply(thisArg, _arguments || [])).next());
});
}
function __generator(thisArg, body) {
var _ = { label: 0, sent: function() {
if (t[0] & 1) throw t[1];
return t[1];
}, trys: [], ops: [] }, f, y, t, g;
return g = { next: verb(0), "throw": verb(1), "return": verb(2) }, typeof Symbol === "function" && (g[Symbol.iterator] = function() {
return this;
}), g;
function verb(n) {
return function(v) {
return step([n, v]);
};
}
function step(op) {
if (f) throw new TypeError("Generator is already executing.");
while (g && (g = 0, op[0] && (_ = 0)), _) try {
if (f = 1, y && (t = op[0] & 2 ? y["return"] : op[0] ? y["throw"] || ((t = y["return"]) && t.call(y), 0) : y.next) && !(t = t.call(y, op[1])).done) return t;
if (y = 0, t) op = [op[0] & 2, t.value];
switch (op[0]) {
case 0:
case 1:
t = op;
break;
case 4:
_.label++;
return { value: op[1], done: false };
case 5:
_.label++;
y = op[1];
op = [0];
continue;
case 7:
op = _.ops.pop();
_.trys.pop();
continue;
default:
if (!(t = _.trys, t = t.length > 0 && t[t.length - 1]) && (op[0] === 6 || op[0] === 2)) {
_ = 0;
continue;
}
if (op[0] === 3 && (!t || op[1] > t[0] && op[1] < t[3])) {
_.label = op[1];
break;
}
if (op[0] === 6 && _.label < t[1]) {
_.label = t[1];
t = op;
break;
}
if (t && _.label < t[2]) {
_.label = t[2];
_.ops.push(op);
break;
}
if (t[2]) _.ops.pop();
_.trys.pop();
continue;
}
op = body.call(thisArg, _);
} catch (e) {
op = [6, e];
y = 0;
} finally {
f = t = 0;
}
if (op[0] & 5) throw op[1];
return { value: op[0] ? op[1] : void 0, done: true };
}
}
function __exportStar(m, o) {
for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(o, p)) __createBinding(o, m, p);
}
function __values(o) {
var s = typeof Symbol === "function" && Symbol.iterator, m = s && o[s], i = 0;
if (m) return m.call(o);
if (o && typeof o.length === "number") return {
next: function() {
if (o && i >= o.length) o = void 0;
return { value: o && o[i++], done: !o };
}
};
throw new TypeError(s ? "Object is not iterable." : "Symbol.iterator is not defined.");
}
function __read(o, n) {
var m = typeof Symbol === "function" && o[Symbol.iterator];
if (!m) return o;
var i = m.call(o), r, ar = [], e;
try {
while ((n === void 0 || n-- > 0) && !(r = i.next()).done) ar.push(r.value);
} catch (error) {
e = { error };
} finally {
try {
if (r && !r.done && (m = i["return"])) m.call(i);
} finally {
if (e) throw e.error;
}
}
return ar;
}
function __spread() {
for (var ar = [], i = 0; i < arguments.length; i++)
ar = ar.concat(__read(arguments[i]));
return ar;
}
function __spreadArrays() {
for (var s = 0, i = 0, il = arguments.length; i < il; i++) s += arguments[i].length;
for (var r = Array(s), k = 0, i = 0; i < il; i++)
for (var a = arguments[i], j = 0, jl = a.length; j < jl; j++, k++)
r[k] = a[j];
return r;
}
function __spreadArray(to, from, pack) {
if (pack || arguments.length === 2) for (var i = 0, l = from.length, ar; i < l; i++) {
if (ar || !(i in from)) {
if (!ar) ar = Array.prototype.slice.call(from, 0, i);
ar[i] = from[i];
}
}
return to.concat(ar || Array.prototype.slice.call(from));
}
function __await(v) {
return this instanceof __await ? (this.v = v, this) : new __await(v);
}
function __asyncGenerator(thisArg, _arguments, generator) {
if (!Symbol.asyncIterator) throw new TypeError("Symbol.asyncIterator is not defined.");
var g = generator.apply(thisArg, _arguments || []), i, q = [];
return i = {}, verb("next"), verb("throw"), verb("return"), i[Symbol.asyncIterator] = function() {
return this;
}, i;
function verb(n) {
if (g[n]) i[n] = function(v) {
return new Promise(function(a, b) {
q.push([n, v, a, b]) > 1 || resume(n, v);
});
};
}
function resume(n, v) {
try {
step(g[n](v));
} catch (e) {
settle(q[0][3], e);
}
}
function step(r) {
r.value instanceof __await ? Promise.resolve(r.value.v).then(fulfill, reject) : settle(q[0][2], r);
}
function fulfill(value) {
resume("next", value);
}
function reject(value) {
resume("throw", value);
}
function settle(f, v) {
if (f(v), q.shift(), q.length) resume(q[0][0], q[0][1]);
}
}
function __asyncDelegator(o) {
var i, p;
return i = {}, verb("next"), verb("throw", function(e) {
throw e;
}), verb("return"), i[Symbol.iterator] = function() {
return this;
}, i;
function verb(n, f) {
i[n] = o[n] ? function(v) {
return (p = !p) ? { value: __await(o[n](v)), done: false } : f ? f(v) : v;
} : f;
}
}
function __asyncValues(o) {
if (!Symbol.asyncIterator) throw new TypeError("Symbol.asyncIterator is not defined.");
var m = o[Symbol.asyncIterator], i;
return m ? m.call(o) : (o = typeof __values === "function" ? __values(o) : o[Symbol.iterator](), i = {}, verb("next"), verb("throw"), verb("return"), i[Symbol.asyncIterator] = function() {
return this;
}, i);
function verb(n) {
i[n] = o[n] && function(v) {
return new Promise(function(resolve, reject) {
v = o[n](v), settle(resolve, reject, v.done, v.value);
});
};
}
function settle(resolve, reject, d, v) {
Promise.resolve(v).then(function(v2) {
resolve({ value: v2, done: d });
}, reject);
}
}
function __makeTemplateObject(cooked, raw) {
if (Object.defineProperty) {
Object.defineProperty(cooked, "raw", { value: raw });
} else {
cooked.raw = raw;
}
return cooked;
}
function __importStar(mod) {
if (mod && mod.__esModule) return mod;
var result = {};
if (mod != null) {
for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k);
}
__setModuleDefault(result, mod);
return result;
}
function __importDefault(mod) {
return mod && mod.__esModule ? mod : { default: mod };
}
function __classPrivateFieldGet(receiver, state, kind, f) {
if (kind === "a" && !f) throw new TypeError("Private accessor was defined without a getter");
if (typeof state === "function" ? receiver !== state || !f : !state.has(receiver)) throw new TypeError("Cannot read private member from an object whose class did not declare it");
return kind === "m" ? f : kind === "a" ? f.call(receiver) : f ? f.value : state.get(receiver);
}
function __classPrivateFieldSet(receiver, state, value, kind, f) {
if (kind === "m") throw new TypeError("Private method is not writable");
if (kind === "a" && !f) throw new TypeError("Private accessor was defined without a setter");
if (typeof state === "function" ? receiver !== state || !f : !state.has(receiver)) throw new TypeError("Cannot write private member to an object whose class did not declare it");
return kind === "a" ? f.call(receiver, value) : f ? f.value = value : state.set(receiver, value), value;
}
function __classPrivateFieldIn(state, receiver) {
if (receiver === null || typeof receiver !== "object" && typeof receiver !== "function") throw new TypeError("Cannot use 'in' operator on non-object");
return typeof state === "function" ? receiver === state : state.has(receiver);
}
function __addDisposableResource(env, value, async) {
if (value !== null && value !== void 0) {
if (typeof value !== "object" && typeof value !== "function") throw new TypeError("Object expected.");
var dispose;
if (async) {
if (!Symbol.asyncDispose) throw new TypeError("Symbol.asyncDispose is not defined.");
dispose = value[Symbol.asyncDispose];
}
if (dispose === void 0) {
if (!Symbol.dispose) throw new TypeError("Symbol.dispose is not defined.");
dispose = value[Symbol.dispose];
}
if (typeof dispose !== "function") throw new TypeError("Object not disposable.");
env.stack.push({ value, dispose, async });
} else if (async) {
env.stack.push({ async: true });
}
return value;
}
function __disposeResources(env) {
function fail(e) {
env.error = env.hasError ? new _SuppressedError(e, env.error, "An error was suppressed during disposal.") : e;
env.hasError = true;
}
function next() {
while (env.stack.length) {
var rec = env.stack.pop();
try {
var result = rec.dispose && rec.dispose.call(rec.value);
if (rec.async) return Promise.resolve(result).then(next, function(e) {
fail(e);
return next();
});
} catch (e) {
fail(e);
}
}
if (env.hasError) throw env.error;
}
return next();
}
var extendStatics, __assign, __createBinding, __setModuleDefault, _SuppressedError, tslib_es6_default;
var init_tslib_es6 = __esm({
"../../node_modules/.pnpm/tslib@2.6.2/node_modules/tslib/tslib.es6.mjs"() {
"use strict";
init_shims();
extendStatics = function(d, b) {
extendStatics = Object.setPrototypeOf || { __proto__: [] } instanceof Array && function(d2, b2) {
d2.__proto__ = b2;
} || function(d2, b2) {
for (var p in b2) if (Object.prototype.hasOwnProperty.call(b2, p)) d2[p] = b2[p];
};
return extendStatics(d, b);
};
__assign = function() {
__assign = Object.assign || function __assign2(t) {
for (var s, i = 1, n = arguments.length; i < n; i++) {
s = arguments[i];
for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p)) t[p] = s[p];
}
return t;
};
return __assign.apply(this, arguments);
};
__createBinding = Object.create ? function(o, m, k, k2) {
if (k2 === void 0) k2 = k;
var desc = Object.getOwnPropertyDescriptor(m, k);
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
desc = { enumerable: true, get: function() {
return m[k];
} };
}
Object.defineProperty(o, k2, desc);
} : function(o, m, k, k2) {
if (k2 === void 0) k2 = k;
o[k2] = m[k];
};
__setModuleDefault = Object.create ? function(o, v) {
Object.defineProperty(o, "default", { enumerable: true, value: v });
} : function(o, v) {
o["default"] = v;
};
_SuppressedError = typeof SuppressedError === "function" ? SuppressedError : function(error, suppressed, message) {
var e = new Error(message);
return e.name = "SuppressedError", e.error = error, e.suppressed = suppressed, e;
};
tslib_es6_default = {
__extends,
__assign,
__rest,
__decorate,
__param,
__metadata,
__awaiter,
__generator,
__createBinding,
__exportStar,
__values,
__read,
__spread,
__spreadArrays,
__spreadArray,
__await,
__asyncGenerator,
__asyncDelegator,
__asyncValues,
__makeTemplateObject,
__importStar,
__importDefault,
__classPrivateFieldGet,
__classPrivateFieldSet,
__classPrivateFieldIn,
__addDisposableResource,
__disposeResources
};
}
});
// ../../node_modules/.pnpm/eslint-plugin-import-x@0.4.4_patch_hash=4oryti2zfrehz2qi62zyaaa334_eslint@9.4.0_typescript@5.4.5/node_modules/eslint-plugin-import-x/lib/config/electron.js
var require_electron = __commonJS({
"../../node_modules/.pnpm/eslint-plugin-import-x@0.4.4_patch_hash=4oryti2zfrehz2qi62zyaaa334_eslint@9.4.0_typescript@5.4.5/node_modules/eslint-plugin-import-x/lib/config/electron.js"(exports, module) {
"use strict";
init_shims();
module.exports = {
settings: {
"import-x/core-modules": ["electron"]
}
};
}
});
// ../../node_modules/.pnpm/eslint-plugin-import-x@0.4.4_patch_hash=4oryti2zfrehz2qi62zyaaa334_eslint@9.4.0_typescript@5.4.5/node_modules/eslint-plugin-import-x/lib/config/errors.js
var require_errors = __commonJS({
"../../node_modules/.pnpm/eslint-plugin-import-x@0.4.4_patch_hash=4oryti2zfrehz2qi62zyaaa334_eslint@9.4.0_typescript@5.4.5/node_modules/eslint-plugin-import-x/lib/config/errors.js"(exports, module) {
"use strict";
init_shims();
module.exports = {
plugins: ["import-x"],
rules: {
"import-x/no-unresolved": 2,
"import-x/named": 2,
"import-x/namespace": 2,
"import-x/default": 2,
"import-x/export": 2
}
};
}
});
// ../../node_modules/.pnpm/eslint-plugin-import-x@0.4.4_patch_hash=4oryti2zfrehz2qi62zyaaa334_eslint@9.4.0_typescript@5.4.5/node_modules/eslint-plugin-import-x/lib/config/react.js
var require_react = __commonJS({
"../../node_modules/.pnpm/eslint-plugin-import-x@0.4.4_patch_hash=4oryti2zfrehz2qi62zyaaa334_eslint@9.4.0_typescript@5.4.5/node_modules/eslint-plugin-import-x/lib/config/react.js"(exports, module) {
"use strict";
init_shims();
module.exports = {
settings: {
"import-x/extensions": [".js", ".jsx"]
},
parserOptions: {
ecmaFeatures: {
jsx: true
}
}
};
}
});
// ../../node_modules/.pnpm/eslint-plugin-import-x@0.4.4_patch_hash=4oryti2zfrehz2qi62zyaaa334_eslint@9.4.0_typescript@5.4.5/node_modules/eslint-plugin-import-x/lib/config/react-native.js
var require_react_native = __commonJS({
"../../node_modules/.pnpm/eslint-plugin-import-x@0.4.4_patch_hash=4oryti2zfrehz2qi62zyaaa334_eslint@9.4.0_typescript@5.4.5/node_modules/eslint-plugin-import-x/lib/config/react-native.js"(exports, module) {
"use strict";
init_shims();
module.exports = {
settings: {
"import-x/resolver": {
node: {
extensions: [".js", ".web.js", ".ios.js", ".android.js"]
}
}
}
};
}
});
// ../../node_modules/.pnpm/eslint-plugin-import-x@0.4.4_patch_hash=4oryti2zfrehz2qi62zyaaa334_eslint@9.4.0_typescript@5.4.5/node_modules/eslint-plugin-import-x/lib/config/recommended.js
var require_recommended = __commonJS({
"../../node_modules/.pnpm/eslint-plugin-import-x@0.4.4_patch_hash=4oryti2zfrehz2qi62zyaaa334_eslint@9.4.0_typescript@5.4.5/node_modules/eslint-plugin-import-x/lib/config/recommended.js"(exports, module) {
"use strict";
init_shims();
module.exports = {
plugins: ["import-x"],
rules: {
"import-x/no-unresolved": "error",
"import-x/named": "error",
"import-x/namespace": "error",
"import-x/default": "error",
"import-x/export": "error",
"import-x/no-named-as-default": "warn",
"import-x/no-named-as-default-member": "warn",
"import-x/no-duplicates": "warn"
},
parserOptions: {
sourceType: "module",
ecmaVersion: 2018
}
};
}
});
// ../../node_modules/.pnpm/eslint-plugin-import-x@0.4.4_patch_hash=4oryti2zfrehz2qi62zyaaa334_eslint@9.4.0_typescript@5.4.5/node_modules/eslint-plugin-import-x/lib/config/stage-0.js
var require_stage_0 = __commonJS({
"../../node_modules/.pnpm/eslint-plugin-import-x@0.4.4_patch_hash=4oryti2zfrehz2qi62zyaaa334_eslint@9.4.0_typescript@5.4.5/node_modules/eslint-plugin-import-x/lib/config/stage-0.js"(exports, module) {
"use strict";
init_shims();
module.exports = {
plugins: ["import-x"],
rules: {
"import-x/no-deprecated": 1
}
};
}
});
// ../../node_modules/.pnpm/eslint-plugin-import-x@0.4.4_patch_hash=4oryti2zfrehz2qi62zyaaa334_eslint@9.4.0_typescript@5.4.5/node_modules/eslint-plugin-import-x/lib/config/typescript.js
var require_typescript = __commonJS({
"../../node_modules/.pnpm/eslint-plugin-import-x@0.4.4_patch_hash=4oryti2zfrehz2qi62zyaaa334_eslint@9.4.0_typescript@5.4.5/node_modules/eslint-plugin-import-x/lib/config/typescript.js"(exports, module) {
"use strict";
init_shims();
var typeScriptExtensions = [".ts", ".tsx"];
var allExtensions = [...typeScriptExtensions, ".js", ".jsx"];
module.exports = {
settings: {
"import-x/extensions": allExtensions,
"import-x/external-module-folders": ["node_modules", "node_modules/@types"],
"import-x/parsers": {
"@typescript-eslint/parser": [...typeScriptExtensions, ".cts", ".mts"]
},
"import-x/resolver": {
node: {
extensions: allExtensions
}
}
},
rules: {
"import-x/named": "off"
}
};
}
});
// ../../node_modules/.pnpm/eslint-plugin-import-x@0.4.4_patch_hash=4oryti2zfrehz2qi62zyaaa334_eslint@9.4.0_typescript@5.4.5/node_modules/eslint-plugin-import-x/lib/config/warnings.js
var require_warnings = __commonJS({
"../../node_modules/.pnpm/eslint-plugin-import-x@0.4.4_patch_hash=4oryti2zfrehz2qi62zyaaa334_eslint@9.4.0_typescript@5.4.5/node_modules/eslint-plugin-import-x/lib/config/warnings.js"(exports, module) {
"use strict";
init_shims();
module.exports = {
plugins: ["import-x"],
rules: {
"import-x/no-named-as-default": 1,
"import-x/no-named-as-default-member": 1,
"import-x/no-duplicates": 1
}
};
}
});
// ../../node_modules/.pnpm/eslint-compat-utils@0.5.1_eslint@9.4.0/node_modules/eslint-compat-utils/dist/index.cjs
var require_dist = __commonJS({
"../../node_modules/.pnpm/eslint-compat-utils@0.5.1_eslint@9.4.0/node_modules/eslint-compat-utils/dist/index.cjs"(exports) {
"use strict";
init_shims();
var path = __require("path");
var fs2 = __require("fs");
function applyPolyfills(object, polyfill) {
return new Proxy(object, {
get(_target, p) {
var _a;
return (_a = object[p]) != null ? _a : polyfill[p];
}
});
}
function getParent(node2) {
return node2.parent;
}
var cache = /* @__PURE__ */ new WeakMap();
function getSourceCode(context) {
const original = context.sourceCode || context.getSourceCode();
const cached = cache.get(original);
if (cached) {
return cached;
}
const sourceCode = applyPolyfills(original, {
getScope(node2) {
const inner = node2.type !== "Program";
for (let n = node2; n; n = getParent(n)) {
const scope = original.scopeManager.acquire(n, inner);
if (scope) {
if (scope.type === "function-expression-name") {
return scope.childScopes[0];
}
return scope;
}
}
return original.scopeManager.scopes[0];
},
markVariableAsUsed(name, refNode = original.ast) {
const currentScope = sourceCode.getScope(refNode);
if (currentScope === context.getScope()) {
return context.markVariableAsUsed(name);
}
let initialScope = currentScope;
if (currentScope.type === "global" && currentScope.childScopes.length > 0 && currentScope.childScopes[0].block === original.ast) {
initialScope = currentScope.childScopes[0];
}
for (let scope = initialScope; scope; scope = scope.upper) {
const variable = scope.variables.find(
(scopeVar) => scopeVar.name === name
);
if (variable) {
variable.eslintUsed = true;
return true;
}
}
return false;
},
getAncestors(node2) {
const result = [];
for (let ancestor = getParent(node2); ancestor; ancestor = ancestor.parent) {
result.unshift(ancestor);
}
return result;
},
getDeclaredVariables(node2) {
return original.scopeManager.getDeclaredVariables(node2);
},
isSpaceBetween(first, second) {
if (first.range[0] <= second.range[1] && second.range[0] <= first.range[1]) {
return false;
}
const [startingNodeOrToken, endingNodeOrToken] = first.range[1] <= second.range[0] ? [first, second] : [second, first];
const tokens = sourceCode.getTokensBetween(first, second, {
includeComments: true
});
let startIndex = startingNodeOrToken.range[1];
for (const token of tokens) {
if (startIndex !== token.range[0]) {
return true;
}
startIndex = token.range[1];
}
return startIndex !== endingNodeOrToken.range[0];
}
});
cache.set(original, sourceCode);
return sourceCode;
}
function getCwd(context) {
var _a, _b, _c;
return (_c = (_b = context.cwd) != null ? _b : (_a = context.getCwd) == null ? void 0 : _a.call(context)) != null ? _c : (
// getCwd is added in v6.6.0
process.cwd()
);
}
function getFilename(context) {
var _a;
return (_a = context.filename) != null ? _a : context.getFilename();
}
function getPhysicalFilename(context) {
var _a, _b;
const physicalFilename = (_b = context.physicalFilename) != null ? _b : (_a = context.getPhysicalFilename) == null ? void 0 : _a.call(context);
if (physicalFilename != null) {
return physicalFilename;
}
const filename = getFilename(context);
let target = filename;
while (/^\d+_/u.test(path.basename(target)) && !fs2.existsSync(target)) {
const next = path.dirname(target);
if (next === target || !path.extname(next)) {
break;
}
target = next;
}
return target;
}
exports.getCwd = getCwd;
exports.getFilename = getFilename;
exports.getPhysicalFilename = getPhysicalFilename;
exports.getSourceCode = getSourceCode;
}
});
// ../../node_modules/.pnpm/eslint-plugin-import-x@0.4.4_patch_hash=4oryti2zfrehz2qi62zyaaa334_eslint@9.4.0_typescript@5.4.5/node_modules/eslint-plugin-import-x/lib/utils/constants.js
var require_constants = __commonJS({
"../../node_modules/.pnpm/eslint-plugin-import-x@0.4.4_patch_hash=4oryti2zfrehz2qi62zyaaa334_eslint@9.4.0_typescript@5.4.5/node_modules/eslint-plugin-import-x/lib/utils/constants.js"(exports) {
"use strict";
init_shims();
Object.defineProperty(exports, "__esModule", { value: true });
exports.pluginName = void 0;
exports.pluginName = "import-x";
}
});
// ../../node_modules/.pnpm/eslint-visitor-keys@3.4.3/node_modules/eslint-visitor-keys/dist/eslint-visitor-keys.cjs
var require_eslint_visitor_keys = __commonJS({
"../../node_modules/.pnpm/eslint-visitor-keys@3.4.3/node_modules/eslint-visitor-keys/dist/eslint-visitor-keys.cjs"(exports) {
"use strict";
init_shims();
Object.defineProperty(exports, "__esModule", { value: true });
var KEYS = {
ArrayExpression: [
"elements"
],
ArrayPattern: [
"elements"
],
ArrowFunctionExpression: [
"params",
"body"
],
AssignmentExpression: [
"left",
"right"
],
AssignmentPattern: [
"left",
"right"
],
AwaitExpression: [
"argument"
],
BinaryExpression: [
"left",
"right"
],
BlockStatement: [
"body"
],
BreakStatement: [
"label"
],
CallExpression: [
"callee",
"arguments"
],
CatchClause: [
"param",
"body"
],
ChainExpression: [
"expression"
],
ClassBody: [
"body"
],
ClassDeclaration: [
"id",
"superClass",
"body"
],
ClassExpression: [
"id",
"superClass",
"body"
],
ConditionalExpression: [
"test",
"consequent",
"alternate"
],
ContinueStatement: [
"label"
],
DebuggerStatement: [],
DoWhileStatement: [
"body",
"test"
],
EmptyStatement: [],
ExperimentalRestProperty: [
"argument"
],
ExperimentalSpreadProperty: [
"argument"
],
ExportAllDeclaration: [
"exported",
"source"
],
ExportDefaultDeclaration: [
"declaration"
],
ExportNamedDeclaration: [
"declaration",
"specifiers",
"source"
],
ExportSpecifier: [
"exported",
"local"
],
ExpressionStatement: [
"expression"
],
ForInStatement: [
"left",
"right",
"body"
],
ForOfStatement: [
"left",
"right",
"body"
],
ForStatement: [
"init",
"test",
"update",
"body"
],
FunctionDeclaration: [
"id",
"params",
"body"
],
FunctionExpression: [
"id",
"params",
"body"
],
Identifier: [],
IfStatement: [
"test",
"consequent",
"alternate"
],
ImportDeclaration: [
"specifiers",
"source"
],
ImportDefaultSpecifier: [
"local"
],
ImportExpression: [
"source"
],
ImportNamespaceSpecifier: [
"local"
],
ImportSpecifier: [
"imported",
"local"
],
JSXAttribute: [
"name",
"value"
],
JSXClosingElement: [
"name"
],
JSXClosingFragment: [],
JSXElement: [
"openingElement",
"children",
"closingElement"
],
JSXEmptyExpression: [],
JSXExpressionContainer: [
"expression"
],
JSXFragment: [
"openingFragment",
"children",
"closingFragment"
],
JSXIdentifier: [],
JSXMemberExpression: [
"object",
"property"
],
JSXNamespacedName: [
"namespace",
"name"
],
JSXOpeningElement: [
"name",
"attributes"
],
JSXOpeningFragment: [],
JSXSpreadAttribute: [
"argument"
],
JSXSpreadChild: [
"expression"
],
JSXText: [],
LabeledStatement: [
"label",
"body"
],
Literal: [],
LogicalExpression: [
"left",
"right"
],
MemberExpression: [
"object",
"property"
],
MetaProperty: [
"meta",
"property"
],
MethodDefinition: [
"key",
"value"
],
NewExpression: [
"callee",
"arguments"
],
ObjectExpression: [
"properties"
],
ObjectPattern: [
"properties"
],
PrivateIdentifier: [],
Program: [
"body"
],
Property: [
"key",
"value"
],
PropertyDefinition: [
"key",
"value"
],
RestElement: [
"argument"
],
ReturnStatement: [
"argument"
],
SequenceExpression: [
"expressions"
],
SpreadElement: [
"argument"
],
StaticBlock: [
"body"
],
Super: [],
SwitchCase: [
"test",
"consequent"
],
SwitchStatement: [
"discriminant",
"cases"
],
TaggedTemplateExpression: [
"tag",
"quasi"
],
TemplateElement: [],
TemplateLiteral: [
"quasis",
"expressions"
],
ThisExpression: [],
ThrowStatement: [
"argument"
],
TryStatement: [
"block",
"handler",
"finalizer"
],
UnaryExpression: [
"argument"
],
UpdateExpression: [
"argument"
],
VariableDeclaration: [
"declarations"
],
VariableDeclarator: [
"id",
"init"
],
WhileStatement: [
"test",
"body"
],
WithStatement: [
"object",
"body"
],
YieldExpression: [
"argument"
]
};
var NODE_TYPES = Object.keys(KEYS);
for (const type of NODE_TYPES) {
Object.freeze(KEYS[type]);
}
Object.freeze(KEYS);
var KEY_BLACKLIST = /* @__PURE__ */ new Set([
"parent",
"leadingComments",
"trailingComments"
]);
function filterKey(key) {
return !KEY_BLACKLIST.has(key) && key[0] !== "_";
}
function getKeys(node2) {
return Object.keys(node2).filter(filterKey);
}
function unionWith(additionalKeys) {
const retv = (
/** @type {{
[type: string]: ReadonlyArray<string>
}} */
Object.assign({}, KEYS)
);
for (const type of Object.keys(additionalKeys)) {
if (Object.prototype.hasOwnProperty.call(retv, type)) {
const keys = new Set(additionalKeys[type]);
for (const key of retv[type]) {
keys.add(key);
}
retv[type] = Object.freeze(Array.from(keys));
} else {
retv[type] = Object.freeze(Array.from(additionalKeys[type]));
}
}
return Object.freeze(retv);
}
exports.KEYS = KEYS;
exports.getKeys = getKeys;
exports.unionWith = unionWith;
}
});
// ../../node_modules/.pnpm/@eslint-community+eslint-utils@4.4.0_eslint@9.4.0/node_modules/@eslint-community/eslint-utils/index.js
var require_eslint_utils = __commonJS({
"../../node_modules/.pnpm/@eslint-community+eslint-utils@4.4.0_eslint@9.4.0/node_modules/@eslint-community/eslint-utils/index.js"(exports) {
"use strict";
init_shims();
Object.defineProperty(exports, "__esModule", { value: true });
var eslintVisitorKeys = require_eslint_visitor_keys();
function getInnermostScope(initialScope, node2) {
const location = node2.range[0];
let scope = initialScope;
let found = false;
do {
found = false;
for (const childScope of scope.childScopes) {
const range = childScope.block.range;
if (range[0] <= location && location < range[1]) {
scope = childScope;
found = true;
break;
}
}
} while (found);
return scope;
}
function findVariable(initialScope, nameOrNode) {
let name = "";
let scope = initialScope;
if (typeof nameOrNode === "string") {
name = nameOrNode;
} else {
name = nameOrNode.name;
scope = getInnermostScope(scope, nameOrNode);
}
while (scope != null) {
const variable = scope.set.get(name);
if (variable != null) {
return variable;
}
scope = scope.upper;
}
return null;
}
function negate0(token) {
return !this(token);
}
function negate(f) {
return negate0.bind(f);
}
function isPunctuatorTokenWithValue(token, value) {
return token.type === "Punctuator" && token.value === value;
}
function isArrowToken(token) {
return isPunctuatorTokenWithValue(token, "=>");
}
function isCommaToken(token) {
return isPunctuatorTokenWithValue(token, ",");
}
function isSemicolonToken(token) {
return isPunctuatorTokenWithValue(token, ";");
}
function isColonToken(token) {
return isPunctuatorTokenWithValue(token, ":");
}
function isOpeningParenToken(token) {
return isPunctuatorTokenWithValue(token, "(");
}
function isClosingParenToken(token) {
return isPunctuatorTokenWithValue(token, ")");
}
function isOpeningBracketToken(token) {
return isPunctuatorTokenWithValue(token, "[");
}
function isClosingBracketToken(token) {
return isPunctuatorTokenWithValue(token, "]");
}
function isOpeningBraceToken(token) {
return isPunctuatorTokenWithValue(token, "{");
}
function isClosingBraceToken(token) {
return isPunctuatorTokenWithValue(token, "}");
}
function isCommentToken(token) {
return ["Block", "Line", "Shebang"].includes(token.type);
}
var isNotArrowToken = negate(isArrowToken);
var isNotCommaToken = negate(isCommaToken);
var isNotSemicolonToken = negate(isSemicolonToken);
var isNotColonToken = negate(isColonToken);
var isNotOpeningParenToken = negate(isOpeningParenToken);
var isNotClosingParenToken = negate(isClosingParenToken);
var isNotOpeningBracketToken = negate(isOpeningBracketToken);
var isNotClosingBracketToken = negate(isClosingBracketToken);
var isNotOpeningBraceToken = negate(isOpeningBraceToken);
var isNotClosingBraceToken = negate(isClosingBraceToken);
var isNotCommentToken = negate(isCommentToken);
function getOpeningParenOfParams(node2, sourceCode) {
return node2.id ? sourceCode.getTokenAfter(node2.id, isOpeningParenToken) : sourceCode.getFirstToken(node2, isOpeningParenToken);
}
function getFunctionHeadLocation(node2, sourceCode) {
const parent = node2.parent;
let start = null;
let end = null;
if (node2.type === "ArrowFunctionExpression") {
const arrowToken = sourceCode.getTokenBefore(node2.body, isArrowToken);
start = arrowToken.loc.start;
end = arrowToken.loc.end;
} else if (parent.type === "Property" || parent.type === "MethodDefinition" || parent.type === "PropertyDefinition") {
start = parent.loc.start;
end = getOpeningParenOfParams(node2, sourceCode).loc.start;
} else {
start = node2.loc.start;
end = getOpeningParenOfParams(node2, sourceCode).loc.start;
}
return {
start: { ...start },
end: { ...end }
};
}
var globalObject = typeof globalThis !== "undefined" ? globalThis : typeof self !== "undefined" ? self : typeof window !== "undefined" ? window : typeof global !== "undefined" ? global : {};
var builtinNames = Object.freeze(
/* @__PURE__ */ new Set([
"Array",
"ArrayBuffer",
"BigInt",
"BigInt64Array",
"BigUint64Array",
"Boolean",
"DataView",
"Date",
"decodeURI",
"decodeURIComponent",
"encodeURI",
"encodeURIComponent",
"escape",
"Float32Array",
"Float64Array",
"Function",
"Infinity",
"Int16Array",
"Int32Array",
"Int8Array",
"isFinite",
"isNaN",
"isPrototypeOf",
"JSON",
"Map",
"Math",
"NaN",
"Number",
"Object",
"parseFloat",
"parseInt",
"Promise",
"Proxy",
"Reflect",
"RegExp",
"Set",
"String",
"Symbol",
"Uint16Array",
"Uint32Array",
"Uint8Array",
"Uint8ClampedArray",
"undefined",
"unescape",
"WeakMap",
"WeakSet"
])
);
var callAllowed = new Set(
[
Array.isArray,
Array.of,
Array.prototype.at,
Array.prototype.concat,
Array.prototype.entries,
Array.prototype.every,
Array.prototype.filter,
Array.prototype.find,
Array.prototype.findIndex,
Array.prototype.flat,
Array.prototype.includes,
Array.prototype.indexOf,
Array.prototype.join,
Array.prototype.keys,
Array.prototype.lastIndexOf,
Array.prototype.slice,
Array.prototype.some,
Array.prototype.toString,
Array.prototype.values,
typeof BigInt === "function" ? BigInt : void 0,
Boolean,
Date,
Date.parse,
decodeURI,
decodeURIComponent,
encodeURI,
encodeURIComponent,
escape,
isFinite,
isNaN,
isPrototypeOf,
Map,
Map.prototype.entries,
Map.prototype.get,
Map.prototype.has,
Map.prototype.keys,
Map.prototype.values,
...Object.getOwnPropertyNames(Math).filter((k) => k !== "random").map((k) => Math[k]).filter((f) => typeof f === "function"),
Number,
Number.isFinite,
Number.isNaN,
Number.parseFloat,
Number.parseInt,
Number.prototype.toExponential,
Number.prototype.toFixed,
Number.prototype.toPrecision,
Number.prototype.toString,
Object,
Object.entries,
Object.is,
Object.isExtensible,
Object.isFrozen,
Object.isSealed,
Object.keys,
Object.values,
parseFloat,
parseInt,
RegExp,
Set,
Set.prototype.entries,
Set.prototype.has,
Set.prototype.keys,
Set.prototype.values,
String,
String.fromCharCode,
String.fromCodePoint,
String.raw,
String.prototype.at,
String.prototype.charAt,
String.prototype.charCodeAt,
String.prototype.codePointAt,
String.prototype.concat,
String.prototype.endsWith,
String.prototype.includes,
String.prototype.indexOf,
String.prototype.lastIndexOf,
String.prototype.normalize,
String.prototype.padEnd,
String.prototype.padStart,
String.prototype.slice,
String.prototype.startsWith,
String.prototype.substr,
String.prototype.substring,
String.prototype.toLowerCase,
String.prototype.toString,
String.prototype.toUpperCase,
String.prototype.trim,
String.prototype.trimEnd,
String.prototype.trimLeft,
String.prototype.trimRight,
String.prototype.trimStart,
Symbol.for,
Symbol.keyFor,
unescape
].filter((f) => typeof f === "function")
);
var callPassThrough = /* @__PURE__ */ new Set([
Object.freeze,
Object.preventExtensions,
Object.seal
]);
var getterAllowed = [
[Map, /* @__PURE__ */ new Set(["size"])],
[
RegExp,
/* @__PURE__ */ new Set([
"dotAll",
"flags",
"global",
"hasIndices",
"ignoreCase",
"multiline",
"source",
"sticky",
"unicode"
])
],
[Set, /* @__PURE__ */ new Set(["size"])]
];
function getPropertyDescriptor(object, name) {
let x = object;
while ((typeof x === "object" || typeof x === "function") && x !== null) {
const d = Object.getOwnPropertyDescriptor(x, name);
if (d) {
return d;
}
x = Object.getPrototypeOf(x);
}
return null;
}
function isGetter(object, name) {
const d = getPropertyDescriptor(object, name);
return d != null && d.get != null;
}
function getElementValues(nodeList, initialScope) {
const valueList = [];
for (let i = 0; i < nodeList.length; ++i) {
const elementNode = nodeList[i];
if (elementNode == null) {
valueList.length = i + 1;
} else if (elementNode.type === "SpreadElement") {
const argument = getStaticValueR(elementNode.argument, initialScope);
if (argument == null) {
return null;
}
valueList.push(...argument.value);
} else {
const element = getStaticValueR(elementNode, initialScope);
if (element == null) {
return null;
}
valueList.push(element.value);
}
}
return valueList;
}
function isEffectivelyConst(variable) {
const refs = variable.references;
const inits = refs.filter((r) => r.init).length;
const reads = refs.filter((r) => r.isReadOnly()).length;
if (inits === 1 && reads + inits === refs.length) {
return true;
}
return false;
}
var operations = Object.freeze({
ArrayExpression(node2, initialScope) {
const elements = getElementValues(node2.elements, initialScope);
return elements != null ? { value: elements } : null;
},
AssignmentExpression(node2, initialScope) {
if (node2.operator === "=") {
return getStaticValueR(node2.right, initialScope);
}
return null;
},
//eslint-disable-next-line complexity
BinaryExpression(node2, initialScope) {
if (node2.operator === "in" || node2.operator === "instanceof") {
return null;
}
const left = getStaticValueR(node2.left, initialScope);
const right = getStaticValueR(node2.right, initialScope);
if (left != null && right != null) {
switch (node2.operator) {
case "==":
return { value: left.value == right.value };
case "!=":
return { value: left.value != right.value };
case "===":
return { value: left.value === right.value };
case "!==":
return { value: left.value !== right.value };
case "<":
return { value: left.value < right.value };
case "<=":
return { value: left.value <= right.value };
case ">":
return { value: left.value > right.value };
case ">=":
return { value: left.value >= right.value };
case "<<":
return { value: left.value << right.value };
case ">>":
return { value: left.value >> right.value };
case ">>>":
return { value: left.value >>> right.value };
case "+":
return { value: left.value + right.value };
case "-":
return { value: left.value - right.value };
case "*":
return { value: left.value * right.value };
case "/":
return { value: left.value / right.value };
case "%":
return { value: left.value % right.value };
case "**":
return { value: left.value ** right.value };
case "|":
return { value: left.value | right.value };
case "^":
return { value: left.value ^ right.value };
case "&":
return { value: left.value & right.value };
}
}
return null;
},
CallExpression(node2, initialScope) {
const calleeNode = node2.callee;
const args = getElementValues(node2.arguments, initialScope);
if (args != null) {
if (calleeNode.type === "MemberExpression") {
if (calleeNode.property.type === "PrivateIdentifier") {
return null;
}
const object = getStaticValueR(calleeNode.object, initialScope);
if (object != null) {
if (object.value == null && (object.optional || node2.optional)) {
return { value: void 0, optional: true };
}
const property = getStaticPropertyNameValue(
calleeNode,
initialScope
);
if (property != null) {
const receiver = object.value;
const methodName = property.value;
if (callAllowed.has(receiver[methodName])) {
return { value: receiver[methodName](...args) };
}
if (callPassThrough.has(receiver[methodName])) {
return { value: args[0] };
}
}
}
} else {
const callee = getStaticValueR(calleeNode, initialScope);
if (callee != null) {
if (callee.value == null && node2.optional) {
return { value: void 0, optional: true };
}
const func = callee.value;
if (callAllowed.has(func)) {
return { value: func(...args) };
}
if (callPassThrough.has(func)) {
return { value: args[0] };
}
}
}
}
return null;
},
ConditionalExpression(node2, initialScope) {
const test2 = getStaticValueR(node2.test, initialScope);
if (test2 != null) {
return test2.value ? getStaticValueR(node2.consequent, initialScope) : getStaticValueR(node2.alternate, initialScope);
}
return null;
},
ExpressionStatement(node2, initialScope) {
return getStaticValueR(node2.expression, initialScope);
},
Identifier(node2, initialScope) {
if (initialScope != null) {
const variable = findVariable(initialScope, node2);
if (variable != null && variable.defs.length === 0 && builtinNames.has(variable.name) && variable.name in globalObject) {
return { value: globalObject[variable.name] };
}
if (variable != null && variable.defs.length === 1) {
const def = variable.defs[0];
if (def.parent && def.type === "Variable" && (def.parent.kind === "const" || isEffectivelyConst(variable)) && // TODO(mysticatea): don't support destructuring here.
def.node.id.type === "Identifier") {
return getStaticValueR(def.node.init, initialScope);
}
}
}
return null;
},
Literal(node2) {
if ((node2.regex != null || node2.bigint != null) && node2.value == null) {
return null;
}
return { value: node2.value };
},
LogicalExpression(node2, initialScope) {
const left = getStaticValueR(node2.left, initialScope);
if (left != null) {
if (node2.operator === "||" && Boolean(left.value) === true || node2.operator === "&&" && Boolean(left.value) === false || node2.operator === "??" && left.value != null) {
return left;
}
const right = getStaticValueR(node2.right, initialScope);
if (right != null) {
return right;
}
}
return null;
},
MemberExpression(node2, initialScope) {
if (node2.property.type === "PrivateIdentifier") {
return null;
}
const object = getStaticValueR(node2.object, initialScope);
if (object != null) {
if (object.value == null && (object.optional || node2.optional)) {
return { value: void 0, optional: true };
}
const property = getStaticPropertyNameValue(node2, initialScope);
if (property != null) {
if (!isGetter(object.value, property.value)) {
return { value: object.value[property.value] };
}
for (const [classFn, allowed] of getterAllowed) {
if (object.value instanceof classFn && allowed.has(property.value)) {
return { value: object.value[property.value] };
}
}
}
}
return null;
},
ChainExpression(node2, initialScope) {
const expression = getStaticValueR(node2.expression, initialScope);
if (expression != null) {
return { value: expression.value };
}
return null;
},
NewExpression(node2, initialScope) {
const callee = getStaticValueR(node2.callee, initialScope);
const args = getElementValues(node2.arguments, initialScope);
if (callee != null && args != null) {
const Func = callee.value;
if (callAllowed.has(Func)) {
return { value: new Func(...args) };
}
}
return null;
},
ObjectExpression(node2, initialScope) {
const object = {};
for (const propertyNode of node2.properties) {
if (propertyNode.type === "Property") {
if (propertyNode.kind !== "init") {
return null;
}
const key = getStaticPropertyNameValue(
propertyNode,
initialScope
);
const value = getStaticValueR(propertyNode.value, initialScope);
if (key == null || value == null) {
return null;
}
object[key.value] = value.value;
} else if (propertyNode.type === "SpreadElement" || propertyNode.type === "ExperimentalSpreadProperty") {
const argument = getStaticValueR(
propertyNode.argument,
initialScope
);
if (argument == null) {
return null;
}
Object.assign(object, argument.value);
} else {
return null;
}
}
return { value: object };
},
SequenceExpression(node2, initialScope) {
const last = node2.expressions[node2.expressions.length - 1];
return getStaticValueR(last, initialScope);
},
TaggedTemplateExpression(node2, initialScope) {
const tag = getStaticValueR(node2.tag, initialScope);
const expressions = getElementValues(
node2.quasi.expressions,
initialScope
);
if (tag != null && expressions != null) {
const func = tag.value;
const strings = node2.quasi.quasis.map((q) => q.value.cooked);
strings.raw = node2.quasi.quasis.map((q) => q.value.raw);
if (func === String.raw) {
return { value: func(strings, ...expressions) };
}
}
return null;
},
TemplateLiteral(node2, initialScope) {
const expressions = getElementValues(node2.expressions, initialScope);
if (expressions != null) {
let value = node2.quasis[0].value.cooked;
for (let i = 0; i < expressions.length; ++i) {
value += expressions[i];
value += node2.quasis[i + 1].value.cooked;
}
return { value };
}
return null;
},
UnaryExpression(node2, initialScope) {
if (node2.operator === "delete") {
return null;
}
if (node2.operator === "void") {
return { value: void 0 };
}
const arg = getStaticValueR(node2.argument, initialScope);
if (arg != null) {
switch (node2.operator) {
case "-":
return { value: -arg.value };
case "+":
return { value: +arg.value };
case "!":
return { value: !arg.value };
case "~":
return { value: ~arg.value };
case "typeof":
return { value: typeof arg.value };
}
}
return null;
}
});
function getStaticValueR(node2, initialScope) {
if (node2 != null && Object.hasOwnProperty.call(operations, node2.type)) {
return operations[node2.type](node2, initialScope);
}
return null;
}
function getStaticPropertyNameValue(node2, initialScope) {
const nameNode = node2.type === "Property" ? node2.key : node2.property;
if (node2.computed) {
return getStaticValueR(nameNode, initialScope);
}
if (nameNode.type === "Identifier") {
return { value: nameNode.name };
}
if (nameNode.type === "Literal") {
if (nameNode.bigint) {
return { value: nameNode.bigint };
}
return { value: String(nameNode.value) };
}
return null;
}
function getStaticValue(node2, initialScope = null) {
try {
return getStaticValueR(node2, initialScope);
} catch (_error) {
return null;
}
}
function getStringIfConstant(node2, initialScope = null) {
if (node2 && node2.type === "Literal" && node2.value === null) {
if (node2.regex) {
return `/${node2.regex.pattern}/${node2.regex.flags}`;
}
if (node2.bigint) {
return node2.bigint;
}
}
const evaluated = getStaticValue(node2, initialScope);
return evaluated && String(evaluated.value);
}
function getPropertyName(node2, initialScope) {
switch (node2.type) {
case "MemberExpression":
if (node2.computed) {
return getStringIfConstant(node2.property, initialScope);
}
if (node2.property.type === "PrivateIdentifier") {
return null;
}
return node2.property.name;
case "Property":
case "MethodDefinition":
case "PropertyDefinition":
if (node2.computed) {
return getStringIfConstant(node2.key, initialScope);
}
if (node2.key.type === "Literal") {
return String(node2.key.value);
}
if (node2.key.type === "PrivateIdentifier") {
return null;
}
return node2.key.name;
}
return null;
}
function getFunctionNameWithKind(node2, sourceCode) {
const parent = node2.parent;
const tokens = [];
const isObjectMethod = parent.type === "Property" && parent.value === node2;
const isClassMethod = parent.type === "MethodDefinition" && parent.value === node2;
const isClassFieldMethod = parent.type === "PropertyDefinition" && parent.value === node2;
if (isClassMethod || isClassFieldMethod) {
if (parent.static) {
tokens.push("static");
}
if (parent.key.type === "PrivateIdentifier") {
tokens.push("private");
}
}
if (node2.async) {
tokens.push("async");
}
if (node2.generator) {
tokens.push("generator");
}
if (isObjectMethod || isClassMethod) {
if (parent.kind === "constructor") {
return "constructor";
}
if (parent.kind === "get") {
tokens.push("getter");
} else if (parent.kind === "set") {
tokens.push("setter");
} else {
tokens.push("method");
}
} else if (isClassFieldMethod) {
tokens.push("method");
} else {
if (node2.type === "ArrowFunctionExpression") {
tokens.push("arrow");
}
tokens.push("function");
}
if (isObjectMethod || isClassMethod || isClassFieldMethod) {
if (parent.key.type === "PrivateIdentifier") {
tokens.push(`#${parent.key.name}`);
} else {
const name = getPropertyName(parent);
if (name) {
tokens.push(`'${name}'`);
} else if (sourceCode) {
const keyText = sourceCode.getText(parent.key);
if (!keyText.includes("\n")) {
tokens.push(`[${keyText}]`);
}
}
}
} else if (node2.id) {
tokens.push(`'${node2.id.name}'`);
} else if (parent.type === "VariableDeclarator" && parent.id && parent.id.type === "Identifier") {
tokens.push(`'${parent.id.name}'`);
} else if ((parent.type === "AssignmentExpression" || parent.type === "AssignmentPattern") && parent.left && parent.left.type === "Identifier") {
tokens.push(`'${parent.left.name}'`);
} else if (parent.type === "ExportDefaultDeclaration" && parent.declaration === node2) {
tokens.push("'default'");
}
return tokens.join(" ");
}
var typeConversionBinaryOps = Object.freeze(
/* @__PURE__ */ new Set([
"==",
"!=",
"<",
"<=",
">",
">=",
"<<",
">>",
">>>",
"+",
"-",
"*",
"/",
"%",
"|",
"^",
"&",
"in"
])
);
var typeConversionUnaryOps = Object.freeze(/* @__PURE__ */ new Set(["-", "+", "!", "~"]));
function isNode(x) {
return x !== null && typeof x === "object" && typeof x.type === "string";
}
var visitor = Object.freeze(
Object.assign(/* @__PURE__ */ Object.create(null), {
$visit(node2, options, visitorKeys) {
const { type } = node2;
if (typeof this[type] === "function") {
return this[type](node2, options, visitorKeys);
}
return this.$visitChildren(node2, options, visitorKeys);
},
$visitChildren(node2, options, visitorKeys) {
const { type } = node2;
for (const key of visitorKeys[type] || eslintVisitorKeys.getKeys(node2)) {
const value = node2[key];
if (Array.isArray(value)) {
for (const element of value) {
if (isNode(element) && this.$visit(element, options, visitorKeys)) {
return true;
}
}
} else if (isNode(value) && this.$visit(value, options, visitorKeys)) {
return true;
}
}
return false;
},
ArrowFunctionExpression() {
return false;
},
AssignmentExpression() {
return true;
},
AwaitExpression() {
return true;
},
BinaryExpression(node2, options, visitorKeys) {
if (options.considerImplicitTypeConversion && typeConversionBinaryOps.has(node2.operator) && (node2.left.type !== "Literal" || node2.right.type !== "Literal")) {
return true;
}
return this.$visitChildren(node2, options, visitorKeys);
},
CallExpression() {
return true;
},
FunctionExpression() {
return false;
},
ImportExpression() {
return true;
},
MemberExpression(node2, options, visitorKeys) {
if (options.considerGetters) {
return true;
}
if (options.considerImplicitTypeConversion && node2.computed && node2.property.type !== "Literal") {
return true;
}
return this.$visitChildren(node2, options, visitorKeys);
},
MethodDefinition(node2, options, visitorKeys) {
if (options.considerImplicitTypeConversion && node2.computed && node2.key.type !== "Literal") {
return true;
}
return this.$visitChildren(node2, options, visitorKeys);
},
NewExpression() {
return true;
},
Property(node2, options, visitorKeys) {
if (options.considerImplicitTypeConversion && node2.computed && node2.key.type !== "Literal") {
return true;
}
return this.$visitChildren(node2, options, visitorKeys);
},
PropertyDefinition(node2, options, visitorKeys) {
if (options.considerImplicitTypeConversion && node2.computed && node2.key.type !== "Literal") {
return true;
}
return this.$visitChildren(node2, options, visitorKeys);
},
UnaryExpression(node2, options, visitorKeys) {
if (node2.operator === "delete") {
return true;
}
if (options.considerImplicitTypeConversion && typeConversionUnaryOps.has(node2.operator) && node2.argument.type !== "Literal") {
return true;
}
return this.$visitChildren(node2, options, visitorKeys);
},
UpdateExpression() {
return true;
},
YieldExpression() {
return true;
}
})
);
function hasSideEffect(node2, sourceCode, { considerGetters = false, considerImplicitTypeConversion = false } = {}) {
return visitor.$visit(
node2,
{ considerGetters, considerImplicitTypeConversion },
sourceCode.visitorKeys || eslintVisitorKeys.KEYS
);
}
function getParentSyntaxParen(node2, sourceCode) {
const parent = node2.parent;
switch (parent.type) {
case "CallExpression":
case "NewExpression":
if (parent.arguments.length === 1 && parent.arguments[0] === node2) {
return sourceCode.getTokenAfter(
parent.callee,
isOpeningParenToken
);
}
return null;
case "DoWhileStatement":
if (parent.test === node2) {
return sourceCode.getTokenAfter(
parent.body,
isOpeningParenToken
);
}
return null;
case "IfStatement":
case "WhileStatement":
if (parent.test === node2) {
return sourceCode.getFirstToken(parent, 1);
}
return null;
case "ImportExpression":
if (parent.source === node2) {
return sourceCode.getFirstToken(parent, 1);
}
return null;
case "SwitchStatement":
if (parent.discriminant === node2) {
return sourceCode.getFirstToken(parent, 1);
}
return null;
case "WithStatement":
if (parent.object === node2) {
return sourceCode.getFirstToken(parent, 1);
}
return null;
default:
return null;
}
}
function isParenthesized(timesOrNode, nodeOrSourceCode, optionalSourceCode) {
let times, node2, sourceCode, maybeLeftParen, maybeRightParen;
if (typeof timesOrNode === "number") {
times = timesOrNode | 0;
node2 = nodeOrSourceCode;
sourceCode = optionalSourceCode;
if (!(times >= 1)) {
throw new TypeError("'times' should be a positive integer.");
}
} else {
times = 1;
node2 = timesOrNode;
sourceCode = nodeOrSourceCode;
}
if (node2 == null || // `Program` can't be parenthesized
node2.parent == null || // `CatchClause.param` can't be parenthesized, example `try {} catch (error) {}`
node2.parent.type === "CatchClause" && node2.parent.param === node2) {
return false;
}
maybeLeftParen = maybeRightParen = node2;
do {
maybeLeftParen = sourceCode.getTokenBefore(maybeLeftParen);
maybeRightParen = sourceCode.getTokenAfter(maybeRightParen);
} while (maybeLeftParen != null && maybeRightParen != null && isOpeningParenToken(maybeLeftParen) && isClosingParenToken(maybeRightParen) && // Avoid false positive such as `if (a) {}`
maybeLeftParen !== getParentSyntaxParen(node2, sourceCode) && --times > 0);
return times === 0;
}
var placeholder = /\$(?:[$&`']|[1-9][0-9]?)/gu;
var internal = /* @__PURE__ */ new WeakMap();
function isEscaped(str, index2) {
let escaped = false;
for (let i = index2 - 1; i >= 0 && str.charCodeAt(i) === 92; --i) {
escaped = !escaped;
}
return escaped;
}
function replaceS(matcher, str, replacement) {
const chunks = [];
let index2 = 0;
let match = null;
function replacer(key) {
switch (key) {
case "$$":
return "$";
case "$&":
return match[0];
case "$`":
return str.slice(0, match.index);
case "$'":
return str.slice(match.index + match[0].length);
default: {
const i = key.slice(1);
if (i in match) {
return match[i];
}
return key;
}
}
}
for (match of matcher.execAll(str)) {
chunks.push(str.slice(index2, match.index));
chunks.push(replacement.replace(placeholder, replacer));
index2 = match.index + match[0].length;
}
chunks.push(str.slice(index2));
return chunks.join("");
}
function replaceF(matcher, str, replace) {
const chunks = [];
let index2 = 0;
for (const match of matcher.execAll(str)) {
chunks.push(str.slice(index2, match.index));
chunks.push(String(replace(...match, match.index, match.input)));
index2 = match.index + match[0].length;
}
chunks.push(str.slice(index2));
return chunks.join("");
}
var PatternMatcher = class {
/**
* Initialize this matcher.
* @param {RegExp} pattern The pattern to match.
* @param {{escaped:boolean}} options The options.
*/
constructor(pattern, { escaped = false } = {}) {
if (!(pattern instanceof RegExp)) {
throw new TypeError("'pattern' should be a RegExp instance.");
}
if (!pattern.flags.includes("g")) {
throw new Error("'pattern' should contains 'g' flag.");
}
internal.set(this, {
pattern: new RegExp(pattern.source, pattern.flags),
escaped: Boolean(escaped)
});
}
/**
* Find the pattern in a given string.
* @param {string} str The string to find.
* @returns {IterableIterator<RegExpExecArray>} The iterator which iterate the matched information.
*/
*execAll(str) {
const { pattern, escaped } = internal.get(this);
let match = null;
let lastIndex = 0;
pattern.lastIndex = 0;
while ((match = pattern.exec(str)) != null) {
if (escaped || !isEscaped(str, match.index)) {
lastIndex = pattern.lastIndex;
yield match;
pattern.lastIndex = lastIndex;
}
}
}
/**
* Check whether the pattern is found in a given string.
* @param {string} str The string to check.
* @returns {boolean} `true` if the pattern was found in the string.
*/
test(str) {
const it = this.execAll(str);
const ret = it.next();
return !ret.done;
}
/**
* Replace a given string.
* @param {string} str The string to be replaced.
* @param {(string|((...strs:string[])=>string))} replacer The string or function to replace. This is the same as the 2nd argument of `String.prototype.replace`.
* @returns {string} The replaced string.
*/
[Symbol.replace](str, replacer) {
return typeof replacer === "function" ? replaceF(this, String(str), replacer) : replaceS(this, String(str), String(replacer));
}
};
var IMPORT_TYPE = /^(?:Import|Export(?:All|Default|Named))Declaration$/u;
var has = Function.call.bind(Object.hasOwnProperty);
var READ = Symbol("read");
var CALL = Symbol("call");
var CONSTRUCT = Symbol("construct");
var ESM = Symbol("esm");
var requireCall = { require: { [CALL]: true } };
function isModifiedGlobal(variable) {
return variable == null || variable.defs.length !== 0 || variable.references.some((r) => r.isWrite());
}
function isPassThrough(node2) {
const parent = node2.parent;
switch (parent && parent.type) {
case "ConditionalExpression":
return parent.consequent === node2 || parent.alternate === node2;
case "LogicalExpression":
return true;
case "SequenceExpression":
return parent.expressions[parent.expressions.length - 1] === node2;
case "ChainExpression":
return true;
default:
return false;
}
}
var ReferenceTracker = class {
/**
* Initialize this tracker.
* @param {Scope} globalScope The global scope.
* @param {object} [options] The options.
* @param {"legacy"|"strict"} [options.mode="strict"] The mode to determine the ImportDeclaration's behavior for CJS modules.
* @param {string[]} [options.globalObjectNames=["global","globalThis","self","window"]] The variable names for Global Object.
*/
constructor(globalScope, {
mode = "strict",
globalObjectNames = ["global", "globalThis", "self", "window"]
} = {}) {
this.variableStack = [];
this.globalScope = globalScope;
this.mode = mode;
this.globalObjectNames = globalObjectNames.slice(0);
}
/**
* Iterate the references of global variables.
* @param {object} traceMap The trace map.
* @returns {IterableIterator<{node:Node,path:string[],type:symbol,info:any}>} The iterator to iterate references.
*/
*iterateGlobalReferences(traceMap) {
for (const key of Object.keys(traceMap)) {
const nextTraceMap = traceMap[key];
const path = [key];
const variable = this.globalScope.set.get(key);
if (isModifiedGlobal(variable)) {
continue;
}
yield* this._iterateVariableReferences(
variable,
path,
nextTraceMap,
true
);
}
for (const key of this.globalObjectNames) {
const path = [];
const variable = this.globalScope.set.get(key);
if (isModifiedGlobal(variable)) {
continue;
}
yield* this._iterateVariableReferences(
variable,
path,
traceMap,
false
);
}
}
/**
* Iterate the references of CommonJS modules.
* @param {object} traceMap The trace map.
* @returns {IterableIterator<{node:Node,path:string[],type:symbol,info:any}>} The iterator to iterate references.
*/
*iterateCjsReferences(traceMap) {
for (const { node: node2 } of this.iterateGlobalReferences(requireCall)) {
const key = getStringIfConstant(node2.arguments[0]);
if (key == null || !has(traceMap, key)) {
continue;
}
const nextTraceMap = traceMap[key];
const path = [key];
if (nextTraceMap[READ]) {
yield {
node: node2,
path,
type: READ,
info: nextTraceMap[READ]
};
}
yield* this._iteratePropertyReferences(node2, path, nextTraceMap);
}
}
/**
* Iterate the references of ES modules.
* @param {object} traceMap The trace map.
* @returns {IterableIterator<{node:Node,path:string[],type:symbol,info:any}>} The iterator to iterate references.
*/
*iterateEsmReferences(traceMap) {
const programNode = this.globalScope.block;
for (const node2 of programNode.body) {
if (!IMPORT_TYPE.test(node2.type) || node2.source == null) {
continue;
}
const moduleId = node2.source.value;
if (!has(traceMap, moduleId)) {
continue;
}
const nextTraceMap = traceMap[moduleId];
const path = [moduleId];
if (nextTraceMap[READ]) {
yield { node: node2, path, type: READ, info: nextTraceMap[READ] };
}
if (node2.type === "ExportAllDeclaration") {
for (const key of Object.keys(nextTraceMap)) {
const exportTraceMap = nextTraceMap[key];
if (exportTraceMap[READ]) {
yield {
node: node2,
path: path.concat(key),
type: READ,
info: exportTraceMap[READ]
};
}
}
} else {
for (const specifier of node2.specifiers) {
const esm = has(nextTraceMap, ESM);
const it = this._iterateImportReferences(
specifier,
path,
esm ? nextTraceMap : this.mode === "legacy" ? { default: nextTraceMap, ...nextTraceMap } : { default: nextTraceMap }
);
if (esm) {
yield* it;
} else {
for (const report of it) {
report.path = report.path.filter(exceptDefault);
if (report.path.length >= 2 || report.type !== READ) {
yield report;
}
}
}
}
}
}
}
/**
* Iterate the references for a given variable.
* @param {Variable} variable The variable to iterate that references.
* @param {string[]} path The current path.
* @param {object} traceMap The trace map.
* @param {boolean} shouldReport = The flag to report those references.
* @returns {IterableIterator<{node:Node,path:string[],type:symbol,info:any}>} The iterator to iterate references.
*/
*_iterateVariableReferences(variable, path, traceMap, shouldReport) {
if (this.variableStack.includes(variable)) {
return;
}
this.variableStack.push(variable);
try {
for (const reference of variable.references) {
if (!reference.isRead()) {
continue;
}
const node2 = reference.identifier;
if (shouldReport && traceMap[READ]) {
yield { node: node2, path, type: READ, info: traceMap[READ] };
}
yield* this._iteratePropertyReferences(node2, path, traceMap);
}
} finally {
this.variableStack.pop();
}
}
/**
* Iterate the references for a given AST node.
* @param rootNode The AST node to iterate references.
* @param {string[]} path The current path.
* @param {object} traceMap The trace map.
* @returns {IterableIterator<{node:Node,path:string[],type:symbol,info:any}>} The iterator to iterate references.
*/
//eslint-disable-next-line complexity
*_iteratePropertyReferences(rootNode, path, traceMap) {
let node2 = rootNode;
while (isPassThrough(node2)) {
node2 = node2.parent;
}
const parent = node2.parent;
if (parent.type === "MemberExpression") {
if (parent.object === node2) {
const key = getPropertyName(parent);
if (key == null || !has(traceMap, key)) {
return;
}
path = path.concat(key);
const nextTraceMap = traceMap[key];
if (nextTraceMap[READ]) {
yield {
node: parent,
path,
type: READ,
info: nextTraceMap[READ]
};
}
yield* this._iteratePropertyReferences(
parent,
path,
nextTraceMap
);
}
return;
}
if (parent.type === "CallExpression") {
if (parent.callee === node2 && traceMap[CALL]) {
yield { node: parent, path, type: CALL, info: traceMap[CALL] };
}
return;
}
if (parent.type === "NewExpression") {
if (parent.callee === node2 && traceMap[CONSTRUCT]) {
yield {
node: parent,
path,
type: CONSTRUCT,
info: traceMap[CONSTRUCT]
};
}
return;
}
if (parent.type === "AssignmentExpression") {
if (parent.right === node2) {
yield* this._iterateLhsReferences(parent.left, path, traceMap);
yield* this._iteratePropertyReferences(parent, path, traceMap);
}
return;
}
if (parent.type === "AssignmentPattern") {
if (parent.right === node2) {
yield* this._iterateLhsReferences(parent.left, path, traceMap);
}
return;
}
if (parent.type === "VariableDeclarator") {
if (parent.init === node2) {
yield* this._iterateLhsReferences(parent.id, path, traceMap);
}
}
}
/**
* Iterate the references for a given Pattern node.
* @param {Node} patternNode The Pattern node to iterate references.
* @param {string[]} path The current path.
* @param {object} traceMap The trace map.
* @returns {IterableIterator<{node:Node,path:string[],type:symbol,info:any}>} The iterator to iterate references.
*/
*_iterateLhsReferences(patternNode, path, traceMap) {
if (patternNode.type === "Identifier") {
const variable = findVariable(this.globalScope, patternNode);
if (variable != null) {
yield* this._iterateVariableReferences(
variable,
path,
traceMap,
false
);
}
return;
}
if (patternNode.type === "ObjectPattern") {
for (const property of patternNode.properties) {
const key = getPropertyName(property);
if (key == null || !has(traceMap, key)) {
continue;
}
const nextPath = path.concat(key);
const nextTraceMap = traceMap[key];
if (nextTraceMap[READ]) {
yield {
node: property,
path: nextPath,
type: READ,
info: nextTraceMap[READ]
};
}
yield* this._iterateLhsReferences(
property.value,
nextPath,
nextTraceMap
);
}
return;
}
if (patternNode.type === "AssignmentPattern") {
yield* this._iterateLhsReferences(patternNode.left, path, traceMap);
}
}
/**
* Iterate the references for a given ModuleSpecifier node.
* @param {Node} specifierNode The ModuleSpecifier node to iterate references.
* @param {string[]} path The current path.
* @param {object} traceMap The trace map.
* @returns {IterableIterator<{node:Node,path:string[],type:symbol,info:any}>} The iterator to iterate references.
*/
*_iterateImportReferences(specifierNode, path, traceMap) {
const type = specifierNode.type;
if (type === "ImportSpecifier" || type === "ImportDefaultSpecifier") {
const key = type === "ImportDefaultSpecifier" ? "default" : specifierNode.imported.name;
if (!has(traceMap, key)) {
return;
}
path = path.concat(key);
const nextTraceMap = traceMap[key];
if (nextTraceMap[READ]) {
yield {
node: specifierNode,
path,
type: READ,
info: nextTraceMap[READ]
};
}
yield* this._iterateVariableReferences(
findVariable(this.globalScope, specifierNode.local),
path,
nextTraceMap,
false
);
return;
}
if (type === "ImportNamespaceSpecifier") {
yield* this._iterateVariableReferences(
findVariable(this.globalScope, specifierNode.local),
path,
traceMap,
false
);
return;
}
if (type === "ExportSpecifier") {
const key = specifierNode.local.name;
if (!has(traceMap, key)) {
return;
}
path = path.concat(key);
const nextTraceMap = traceMap[key];
if (nextTraceMap[READ]) {
yield {
node: specifierNode,
path,
type: READ,
info: nextTraceMap[READ]
};
}
}
}
};
ReferenceTracker.READ = READ;
ReferenceTracker.CALL = CALL;
ReferenceTracker.CONSTRUCT = CONSTRUCT;
ReferenceTracker.ESM = ESM;
function exceptDefault(name, index2) {
return !(index2 === 1 && name === "default");
}
var index = {
CALL,
CONSTRUCT,
ESM,
findVariable,
getFunctionHeadLocation,
getFunctionNameWithKind,
getInnermostScope,
getPropertyName,
getStaticValue,
getStringIfConstant,
hasSideEffect,
isArrowToken,
isClosingBraceToken,
isClosingBracketToken,
isClosingParenToken,
isColonToken,
isCommaToken,
isCommentToken,
isNotArrowToken,
isNotClosingBraceToken,
isNotClosingBracketToken,
isNotClosingParenToken,
isNotColonToken,
isNotCommaToken,
isNotCommentToken,
isNotOpeningBraceToken,
isNotOpeningBracketToken,
isNotOpeningParenToken,
isNotSemicolonToken,
isOpeningBraceToken,
isOpeningBracketToken,
isOpeningParenToken,
isParenthesized,
isSemicolonToken,
PatternMatcher,
READ,
ReferenceTracker
};
exports.CALL = CALL;
exports.CONSTRUCT = CONSTRUCT;
exports.ESM = ESM;
exports.PatternMatcher = PatternMatcher;
exports.READ = READ;
exports.ReferenceTracker = ReferenceTracker;
exports["default"] = index;
exports.findVariable = findVariable;
exports.getFunctionHeadLocation = getFunctionHeadLocation;
exports.getFunctionNameWithKind = getFunctionNameWithKind;
exports.getInnermostScope = getInnermostScope;
exports.getPropertyName = getPropertyName;
exports.getStaticValue = getStaticValue;
exports.getStringIfConstant = getStringIfConstant;
exports.hasSideEffect = hasSideEffect;
exports.isArrowToken = isArrowToken;
exports.isClosingBraceToken = isClosingBraceToken;
exports.isClosingBracketToken = isClosingBracketToken;
exports.isClosingParenToken = isClosingParenToken;
exports.isColonToken = isColonToken;
exports.isCommaToken = isCommaToken;
exports.isCommentToken = isCommentToken;
exports.isNotArrowToken = isNotArrowToken;
exports.isNotClosingBraceToken = isNotClosingBraceToken;
exports.isNotClosingBracketToken = isNotClosingBracketToken;
exports.isNotClosingParenToken = isNotClosingParenToken;
exports.isNotColonToken = isNotColonToken;
exports.isNotCommaToken = isNotCommaToken;
exports.isNotCommentToken = isNotCommentToken;
exports.isNotOpeningBraceToken = isNotOpeningBraceToken;
exports.isNotOpeningBracketToken = isNotOpeningBracketToken;
exports.isNotOpeningParenToken = isNotOpeningParenToken;
exports.isNotSemicolonToken = isNotSemicolonToken;
exports.isOpeningBraceToken = isOpeningBraceToken;
exports.isOpeningBracketToken = isOpeningBracketToken;
exports.isOpeningParenToken = isOpeningParenToken;
exports.isParenthesized = isParenthesized;
exports.isSemicolonToken = isSemicolonToken;
}
});
// ../../node_modules/.pnpm/@typescript-eslint+utils@5.62.0_eslint@9.4.0_typescript@5.4.5/node_modules/@typescript-eslint/utils/dist/ast-utils/eslint-utils/astUtilities.js
var require_astUtilities = __commonJS({
"../../node_modules/.pnpm/@typescript-eslint+utils@5.62.0_eslint@9.4.0_typescript@5.4.5/node_modules/@typescript-eslint/utils/dist/ast-utils/eslint-utils/astUtilities.js"(exports) {
"use strict";
init_shims();
var __createBinding2 = exports && exports.__createBinding || (Object.create ? function(o, m, k, k2) {
if (k2 === void 0) k2 = k;
var desc = Object.getOwnPropertyDescriptor(m, k);
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
desc = { enumerable: true, get: function() {
return m[k];
} };
}
Object.defineProperty(o, k2, desc);
} : function(o, m, k, k2) {
if (k2 === void 0) k2 = k;
o[k2] = m[k];
});
var __setModuleDefault2 = exports && exports.__setModuleDefault || (Object.create ? function(o, v) {
Object.defineProperty(o, "default", { enumerable: true, value: v });
} : function(o, v) {
o["default"] = v;
});
var __importStar2 = exports && exports.__importStar || function(mod) {
if (mod && mod.__esModule) return mod;
var result = {};
if (mod != null) {
for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding2(result, mod, k);
}
__setModuleDefault2(result, mod);
return result;
};
Object.defineProperty(exports, "__esModule", { value: true });
exports.isParenthesized = exports.hasSideEffect = exports.getStringIfConstant = exports.getStaticValue = exports.getPropertyName = exports.getFunctionNameWithKind = exports.getFunctionHeadLocation = void 0;
var eslintUtils = __importStar2(require_eslint_utils());
var getFunctionHeadLocation = eslintUtils.getFunctionHeadLocation;
exports.getFunctionHeadLocation = getFunctionHeadLocation;
var getFunctionNameWithKind = eslintUtils.getFunctionNameWithKind;
exports.getFunctionNameWithKind = getFunctionNameWithKind;
var getPropertyName = eslintUtils.getPropertyName;
exports.getPropertyName = getPropertyName;
var getStaticValue = eslintUtils.getStaticValue;
exports.getStaticValue = getStaticValue;
var getStringIfConstant = eslintUtils.getStringIfConstant;
exports.getStringIfConstant = getStringIfConstant;
var hasSideEffect = eslintUtils.hasSideEffect;
exports.hasSideEffect = hasSideEffect;
var isParenthesized = eslintUtils.isParenthesized;
exports.isParenthesized = isParenthesized;
}
});
// ../../node_modules/.pnpm/@typescript-eslint+utils@5.62.0_eslint@9.4.0_typescript@5.4.5/node_modules/@typescript-eslint/utils/dist/ast-utils/eslint-utils/PatternMatcher.js
var require_PatternMatcher = __commonJS({
"../../node_modules/.pnpm/@typescript-eslint+utils@5.62.0_eslint@9.4.0_typescript@5.4.5/node_modules/@typescript-eslint/utils/dist/ast-utils/eslint-utils/PatternMatcher.js"(exports) {
"use strict";
init_shims();
var __createBinding2 = exports && exports.__createBinding || (Object.create ? function(o, m, k, k2) {
if (k2 === void 0) k2 = k;
var desc = Object.getOwnPropertyDescriptor(m, k);
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
desc = { enumerable: true, get: function() {
return m[k];
} };
}
Object.defineProperty(o, k2, desc);
} : function(o, m, k, k2) {
if (k2 === void 0) k2 = k;
o[k2] = m[k];
});
var __setModuleDefault2 = exports && exports.__setModuleDefault || (Object.create ? function(o, v) {
Object.defineProperty(o, "default", { enumerable: true, value: v });
} : function(o, v) {
o["default"] = v;
});
var __importStar2 = exports && exports.__importStar || function(mod) {
if (mod && mod.__esModule) return mod;
var result = {};
if (mod != null) {
for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding2(result, mod, k);
}
__setModuleDefault2(result, mod);
return result;
};
Object.defineProperty(exports, "__esModule", { value: true });
exports.PatternMatcher = void 0;
var eslintUtils = __importStar2(require_eslint_utils());
var PatternMatcher = eslintUtils.PatternMatcher;
exports.PatternMatcher = PatternMatcher;
}
});
// ../../node_modules/.pnpm/@typescript-eslint+utils@5.62.0_eslint@9.4.0_typescript@5.4.5/node_modules/@typescript-eslint/utils/dist/ast-utils/eslint-utils/predicates.js
var require_predicates = __commonJS({
"../../node_modules/.pnpm/@typescript-eslint+utils@5.62.0_eslint@9.4.0_typescript@5.4.5/node_modules/@typescript-eslint/utils/dist/ast-utils/eslint-utils/predicates.js"(exports) {
"use strict";
init_shims();
var __createBinding2 = exports && exports.__createBinding || (Object.create ? function(o, m, k, k2) {
if (k2 === void 0) k2 = k;
var desc = Object.getOwnPropertyDescriptor(m, k);
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
desc = { enumerable: true, get: function() {
return m[k];
} };
}
Object.defineProperty(o, k2, desc);
} : function(o, m, k, k2) {
if (k2 === void 0) k2 = k;
o[k2] = m[k];
});
var __setModuleDefault2 = exports && exports.__setModuleDefault || (Object.create ? function(o, v) {
Object.defineProperty(o, "default", { enumerable: true, value: v });
} : function(o, v) {
o["default"] = v;
});
var __importStar2 = exports && exports.__importStar || function(mod) {
if (mod && mod.__esModule) return mod;
var result = {};
if (mod != null) {
for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding2(result, mod, k);
}
__setModuleDefault2(result, mod);
return result;
};
Object.defineProperty(exports, "__esModule", { value: true });
exports.isSemicolonToken = exports.isOpeningParenToken = exports.isOpeningBracketToken = exports.isOpeningBraceToken = exports.isNotSemicolonToken = exports.isNotOpeningParenToken = exports.isNotOpeningBracketToken = exports.isNotOpeningBraceToken = exports.isNotCommentToken = exports.isNotCommaToken = exports.isNotColonToken = exports.isNotClosingParenToken = exports.isNotClosingBracketToken = exports.isNotClosingBraceToken = exports.isNotArrowToken = exports.isCommentToken = exports.isCommaToken = exports.isColonToken = exports.isClosingParenToken = exports.isClosingBracketToken = exports.isClosingBraceToken = exports.isArrowToken = void 0;
var eslintUtils = __importStar2(require_eslint_utils());
var isArrowToken = eslintUtils.isArrowToken;
exports.isArrowToken = isArrowToken;
var isNotArrowToken = eslintUtils.isNotArrowToken;
exports.isNotArrowToken = isNotArrowToken;
var isClosingBraceToken = eslintUtils.isClosingBraceToken;
exports.isClosingBraceToken = isClosingBraceToken;
var isNotClosingBraceToken = eslintUtils.isNotClosingBraceToken;
exports.isNotClosingBraceToken = isNotClosingBraceToken;
var isClosingBracketToken = eslintUtils.isClosingBracketToken;
exports.isClosingBracketToken = isClosingBracketToken;
var isNotClosingBracketToken = eslintUtils.isNotClosingBracketToken;
exports.isNotClosingBracketToken = isNotClosingBracketToken;
var isClosingParenToken = eslintUtils.isClosingParenToken;
exports.isClosingParenToken = isClosingParenToken;
var isNotClosingParenToken = eslintUtils.isNotClosingParenToken;
exports.isNotClosingParenToken = isNotClosingParenToken;
var isColonToken = eslintUtils.isColonToken;
exports.isColonToken = isColonToken;
var isNotColonToken = eslintUtils.isNotColonToken;
exports.isNotColonToken = isNotColonToken;
var isCommaToken = eslintUtils.isCommaToken;
exports.isCommaToken = isCommaToken;
var isNotCommaToken = eslintUtils.isNotCommaToken;
exports.isNotCommaToken = isNotCommaToken;
var isCommentToken = eslintUtils.isCommentToken;
exports.isCommentToken = isCommentToken;
var isNotCommentToken = eslintUtils.isNotCommentToken;
exports.isNotCommentToken = isNotCommentToken;
var isOpeningBraceToken = eslintUtils.isOpeningBraceToken;
exports.isOpeningBraceToken = isOpeningBraceToken;
var isNotOpeningBraceToken = eslintUtils.isNotOpeningBraceToken;
exports.isNotOpeningBraceToken = isNotOpeningBraceToken;
var isOpeningBracketToken = eslintUtils.isOpeningBracketToken;
exports.isOpeningBracketToken = isOpeningBracketToken;
var isNotOpeningBracketToken = eslintUtils.isNotOpeningBracketToken;
exports.isNotOpeningBracketToken = isNotOpeningBracketToken;
var isOpeningParenToken = eslintUtils.isOpeningParenToken;
exports.isOpeningParenToken = isOpeningParenToken;
var isNotOpeningParenToken = eslintUtils.isNotOpeningParenToken;
exports.isNotOpeningParenToken = isNotOpeningParenToken;
var isSemicolonToken = eslintUtils.isSemicolonToken;
exports.isSemicolonToken = isSemicolonToken;
var isNotSemicolonToken = eslintUtils.isNotSemicolonToken;
exports.isNotSemicolonToken = isNotSemicolonToken;
}
});
// ../../node_modules/.pnpm/@typescript-eslint+utils@5.62.0_eslint@9.4.0_typescript@5.4.5/node_modules/@typescript-eslint/utils/dist/ast-utils/eslint-utils/ReferenceTracker.js
var require_ReferenceTracker = __commonJS({
"../../node_modules/.pnpm/@typescript-eslint+utils@5.62.0_eslint@9.4.0_typescript@5.4.5/node_modules/@typescript-eslint/utils/dist/ast-utils/eslint-utils/ReferenceTracker.js"(exports) {
"use strict";
init_shims();
var __createBinding2 = exports && exports.__createBinding || (Object.create ? function(o, m, k, k2) {
if (k2 === void 0) k2 = k;
var desc = Object.getOwnPropertyDescriptor(m, k);
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
desc = { enumerable: true, get: function() {
return m[k];
} };
}
Object.defineProperty(o, k2, desc);
} : function(o, m, k, k2) {
if (k2 === void 0) k2 = k;
o[k2] = m[k];
});
var __setModuleDefault2 = exports && exports.__setModuleDefault || (Object.create ? function(o, v) {
Object.defineProperty(o, "default", { enumerable: true, value: v });
} : function(o, v) {
o["default"] = v;
});
var __importStar2 = exports && exports.__importStar || function(mod) {
if (mod && mod.__esModule) return mod;
var result = {};
if (mod != null) {
for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding2(result, mod, k);
}
__setModuleDefault2(result, mod);
return result;
};
Object.defineProperty(exports, "__esModule", { value: true });
exports.ReferenceTracker = void 0;
var eslintUtils = __importStar2(require_eslint_utils());
var ReferenceTrackerREAD = eslintUtils.ReferenceTracker.READ;
var ReferenceTrackerCALL = eslintUtils.ReferenceTracker.CALL;
var ReferenceTrackerCONSTRUCT = eslintUtils.ReferenceTracker.CONSTRUCT;
var ReferenceTrackerESM = eslintUtils.ReferenceTracker.ESM;
var ReferenceTracker = eslintUtils.ReferenceTracker;
exports.ReferenceTracker = ReferenceTracker;
}
});
// ../../node_modules/.pnpm/@typescript-eslint+utils@5.62.0_eslint@9.4.0_typescript@5.4.5/node_modules/@typescript-eslint/utils/dist/ast-utils/eslint-utils/scopeAnalysis.js
var require_scopeAnalysis = __commonJS({
"../../node_modules/.pnpm/@typescript-eslint+utils@5.62.0_eslint@9.4.0_typescript@5.4.5/node_modules/@typescript-eslint/utils/dist/ast-utils/eslint-utils/scopeAnalysis.js"(exports) {
"use strict";
init_shims();
var __createBinding2 = exports && exports.__createBinding || (Object.create ? function(o, m, k, k2) {
if (k2 === void 0) k2 = k;
var desc = Object.getOwnPropertyDescriptor(m, k);
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
desc = { enumerable: true, get: function() {
return m[k];
} };
}
Object.defineProperty(o, k2, desc);
} : function(o, m, k, k2) {
if (k2 === void 0) k2 = k;
o[k2] = m[k];
});
var __setModuleDefault2 = exports && exports.__setModuleDefault || (Object.create ? function(o, v) {
Object.defineProperty(o, "default", { enumerable: true, value: v });
} : function(o, v) {
o["default"] = v;
});
var __importStar2 = exports && exports.__importStar || function(mod) {
if (mod && mod.__esModule) return mod;
var result = {};
if (mod != null) {
for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding2(result, mod, k);
}
__setModuleDefault2(result, mod);
return result;
};
Object.defineProperty(exports, "__esModule", { value: true });
exports.getInnermostScope = exports.findVariable = void 0;
var eslintUtils = __importStar2(require_eslint_utils());
var findVariable = eslintUtils.findVariable;
exports.findVariable = findVariable;
var getInnermostScope = eslintUtils.getInnermostScope;
exports.getInnermostScope = getInnermostScope;
}
});
// ../../node_modules/.pnpm/@typescript-eslint+utils@5.62.0_eslint@9.4.0_typescript@5.4.5/node_modules/@typescript-eslint/utils/dist/ast-utils/eslint-utils/index.js
var require_eslint_utils2 = __commonJS({
"../../node_modules/.pnpm/@typescript-eslint+utils@5.62.0_eslint@9.4.0_typescript@5.4.5/node_modules/@typescript-eslint/utils/dist/ast-utils/eslint-utils/index.js"(exports) {
"use strict";
init_shims();
var __createBinding2 = exports && exports.__createBinding || (Object.create ? function(o, m, k, k2) {
if (k2 === void 0) k2 = k;
var desc = Object.getOwnPropertyDescriptor(m, k);
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
desc = { enumerable: true, get: function() {
return m[k];
} };
}
Object.defineProperty(o, k2, desc);
} : function(o, m, k, k2) {
if (k2 === void 0) k2 = k;
o[k2] = m[k];
});
var __exportStar2 = exports && exports.__exportStar || function(m, exports2) {
for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports2, p)) __createBinding2(exports2, m, p);
};
Object.defineProperty(exports, "__esModule", { value: true });
__exportStar2(require_astUtilities(), exports);
__exportStar2(require_PatternMatcher(), exports);
__exportStar2(require_predicates(), exports);
__exportStar2(require_ReferenceTracker(), exports);
__exportStar2(require_scopeAnalysis(), exports);
}
});
// ../../node_modules/.pnpm/@typescript-eslint+utils@5.62.0_eslint@9.4.0_typescript@5.4.5/node_modules/@typescript-eslint/utils/dist/ast-utils/helpers.js
var require_helpers = __commonJS({
"../../node_modules/.pnpm/@typescript-eslint+utils@5.62.0_eslint@9.4.0_typescript@5.4.5/node_modules/@typescript-eslint/utils/dist/ast-utils/helpers.js"(exports) {
"use strict";
init_shims();
Object.defineProperty(exports, "__esModule", { value: true });
exports.isNotTokenOfTypeWithConditions = exports.isTokenOfTypeWithConditions = exports.isNodeOfTypeWithConditions = exports.isNodeOfTypes = exports.isNodeOfType = void 0;
var isNodeOfType = (nodeType) => (node2) => (node2 === null || node2 === void 0 ? void 0 : node2.type) === nodeType;
exports.isNodeOfType = isNodeOfType;
var isNodeOfTypes = (nodeTypes) => (node2) => !!node2 && nodeTypes.includes(node2.type);
exports.isNodeOfTypes = isNodeOfTypes;
var isNodeOfTypeWithConditions = (nodeType, conditions) => {
const entries = Object.entries(conditions);
return (node2) => (node2 === null || node2 === void 0 ? void 0 : node2.type) === nodeType && entries.every(([key, value]) => node2[key] === value);
};
exports.isNodeOfTypeWithConditions = isNodeOfTypeWithConditions;
var isTokenOfTypeWithConditions = (tokenType, conditions) => {
const entries = Object.entries(conditions);
return (token) => (token === null || token === void 0 ? void 0 : token.type) === tokenType && entries.every(([key, value]) => token[key] === value);
};
exports.isTokenOfTypeWithConditions = isTokenOfTypeWithConditions;
var isNotTokenOfTypeWithConditions = (tokenType, conditions) => (token) => !(0, exports.isTokenOfTypeWithConditions)(tokenType, conditions)(token);
exports.isNotTokenOfTypeWithConditions = isNotTokenOfTypeWithConditions;
}
});
// ../../node_modules/.pnpm/@typescript-eslint+utils@5.62.0_eslint@9.4.0_typescript@5.4.5/node_modules/@typescript-eslint/utils/dist/ast-utils/misc.js
var require_misc = __commonJS({
"../../node_modules/.pnpm/@typescript-eslint+utils@5.62.0_eslint@9.4.0_typescript@5.4.5/node_modules/@typescript-eslint/utils/dist/ast-utils/misc.js"(exports) {
"use strict";
init_shims();
Object.defineProperty(exports, "__esModule", { value: true });
exports.LINEBREAK_MATCHER = exports.isTokenOnSameLine = void 0;
var LINEBREAK_MATCHER = /\r\n|[\r\n\u2028\u2029]/;
exports.LINEBREAK_MATCHER = LINEBREAK_MATCHER;
function isTokenOnSameLine(left, right) {
return left.loc.end.line === right.loc.start.line;
}
exports.isTokenOnSameLine = isTokenOnSameLine;
}
});
// ../../node_modules/.pnpm/@typescript-eslint+types@5.62.0/node_modules/@typescript-eslint/types/dist/generated/ast-spec.js
var require_ast_spec = __commonJS({
"../../node_modules/.pnpm/@typescript-eslint+types@5.62.0/node_modules/@typescript-eslint/types/dist/generated/ast-spec.js"(exports) {
"use strict";
init_shims();
Object.defineProperty(exports, "__esModule", { value: true });
exports.AST_TOKEN_TYPES = exports.AST_NODE_TYPES = void 0;
var AST_NODE_TYPES;
(function(AST_NODE_TYPES2) {
AST_NODE_TYPES2["AccessorProperty"] = "AccessorProperty";
AST_NODE_TYPES2["ArrayExpression"] = "ArrayExpression";
AST_NODE_TYPES2["ArrayPattern"] = "ArrayPattern";
AST_NODE_TYPES2["ArrowFunctionExpression"] = "ArrowFunctionExpression";
AST_NODE_TYPES2["AssignmentExpression"] = "AssignmentExpression";
AST_NODE_TYPES2["AssignmentPattern"] = "AssignmentPattern";
AST_NODE_TYPES2["AwaitExpression"] = "AwaitExpression";
AST_NODE_TYPES2["BinaryExpression"] = "BinaryExpression";
AST_NODE_TYPES2["BlockStatement"] = "BlockStatement";
AST_NODE_TYPES2["BreakStatement"] = "BreakStatement";
AST_NODE_TYPES2["CallExpression"] = "CallExpression";
AST_NODE_TYPES2["CatchClause"] = "CatchClause";
AST_NODE_TYPES2["ChainExpression"] = "ChainExpression";
AST_NODE_TYPES2["ClassBody"] = "ClassBody";
AST_NODE_TYPES2["ClassDeclaration"] = "ClassDeclaration";
AST_NODE_TYPES2["ClassExpression"] = "ClassExpression";
AST_NODE_TYPES2["ConditionalExpression"] = "ConditionalExpression";
AST_NODE_TYPES2["ContinueStatement"] = "ContinueStatement";
AST_NODE_TYPES2["DebuggerStatement"] = "DebuggerStatement";
AST_NODE_TYPES2["Decorator"] = "Decorator";
AST_NODE_TYPES2["DoWhileStatement"] = "DoWhileStatement";
AST_NODE_TYPES2["EmptyStatement"] = "EmptyStatement";
AST_NODE_TYPES2["ExportAllDeclaration"] = "ExportAllDeclaration";
AST_NODE_TYPES2["ExportDefaultDeclaration"] = "ExportDefaultDeclaration";
AST_NODE_TYPES2["ExportNamedDeclaration"] = "ExportNamedDeclaration";
AST_NODE_TYPES2["ExportSpecifier"] = "ExportSpecifier";
AST_NODE_TYPES2["ExpressionStatement"] = "ExpressionStatement";
AST_NODE_TYPES2["ForInStatement"] = "ForInStatement";
AST_NODE_TYPES2["ForOfStatement"] = "ForOfStatement";
AST_NODE_TYPES2["ForStatement"] = "ForStatement";
AST_NODE_TYPES2["FunctionDeclaration"] = "FunctionDeclaration";
AST_NODE_TYPES2["FunctionExpression"] = "FunctionExpression";
AST_NODE_TYPES2["Identifier"] = "Identifier";
AST_NODE_TYPES2["IfStatement"] = "IfStatement";
AST_NODE_TYPES2["ImportAttribute"] = "ImportAttribute";
AST_NODE_TYPES2["ImportDeclaration"] = "ImportDeclaration";
AST_NODE_TYPES2["ImportDefaultSpecifier"] = "ImportDefaultSpecifier";
AST_NODE_TYPES2["ImportExpression"] = "ImportExpression";
AST_NODE_TYPES2["ImportNamespaceSpecifier"] = "ImportNamespaceSpecifier";
AST_NODE_TYPES2["ImportSpecifier"] = "ImportSpecifier";
AST_NODE_TYPES2["JSXAttribute"] = "JSXAttribute";
AST_NODE_TYPES2["JSXClosingElement"] = "JSXClosingElement";
AST_NODE_TYPES2["JSXClosingFragment"] = "JSXClosingFragment";
AST_NODE_TYPES2["JSXElement"] = "JSXElement";
AST_NODE_TYPES2["JSXEmptyExpression"] = "JSXEmptyExpression";
AST_NODE_TYPES2["JSXExpressionContainer"] = "JSXExpressionContainer";
AST_NODE_TYPES2["JSXFragment"] = "JSXFragment";
AST_NODE_TYPES2["JSXIdentifier"] = "JSXIdentifier";
AST_NODE_TYPES2["JSXMemberExpression"] = "JSXMemberExpression";
AST_NODE_TYPES2["JSXNamespacedName"] = "JSXNamespacedName";
AST_NODE_TYPES2["JSXOpeningElement"] = "JSXOpeningElement";
AST_NODE_TYPES2["JSXOpeningFragment"] = "JSXOpeningFragment";
AST_NODE_TYPES2["JSXSpreadAttribute"] = "JSXSpreadAttribute";
AST_NODE_TYPES2["JSXSpreadChild"] = "JSXSpreadChild";
AST_NODE_TYPES2["JSXText"] = "JSXText";
AST_NODE_TYPES2["LabeledStatement"] = "LabeledStatement";
AST_NODE_TYPES2["Literal"] = "Literal";
AST_NODE_TYPES2["LogicalExpression"] = "LogicalExpression";
AST_NODE_TYPES2["MemberExpression"] = "MemberExpression";
AST_NODE_TYPES2["MetaProperty"] = "MetaProperty";
AST_NODE_TYPES2["MethodDefinition"] = "MethodDefinition";
AST_NODE_TYPES2["NewExpression"] = "NewExpression";
AST_NODE_TYPES2["ObjectExpression"] = "ObjectExpression";
AST_NODE_TYPES2["ObjectPattern"] = "ObjectPattern";
AST_NODE_TYPES2["PrivateIdentifier"] = "PrivateIdentifier";
AST_NODE_TYPES2["Program"] = "Program";
AST_NODE_TYPES2["Property"] = "Property";
AST_NODE_TYPES2["PropertyDefinition"] = "PropertyDefinition";
AST_NODE_TYPES2["RestElement"] = "RestElement";
AST_NODE_TYPES2["ReturnStatement"] = "ReturnStatement";
AST_NODE_TYPES2["SequenceExpression"] = "SequenceExpression";
AST_NODE_TYPES2["SpreadElement"] = "SpreadElement";
AST_NODE_TYPES2["StaticBlock"] = "StaticBlock";
AST_NODE_TYPES2["Super"] = "Super";
AST_NODE_TYPES2["SwitchCase"] = "SwitchCase";
AST_NODE_TYPES2["SwitchStatement"] = "SwitchStatement";
AST_NODE_TYPES2["TaggedTemplateExpression"] = "TaggedTemplateExpression";
AST_NODE_TYPES2["TemplateElement"] = "TemplateElement";
AST_NODE_TYPES2["TemplateLiteral"] = "TemplateLiteral";
AST_NODE_TYPES2["ThisExpression"] = "ThisExpression";
AST_NODE_TYPES2["ThrowStatement"] = "ThrowStatement";
AST_NODE_TYPES2["TryStatement"] = "TryStatement";
AST_NODE_TYPES2["UnaryExpression"] = "UnaryExpression";
AST_NODE_TYPES2["UpdateExpression"] = "UpdateExpression";
AST_NODE_TYPES2["VariableDeclaration"] = "VariableDeclaration";
AST_NODE_TYPES2["VariableDeclarator"] = "VariableDeclarator";
AST_NODE_TYPES2["WhileStatement"] = "WhileStatement";
AST_NODE_TYPES2["WithStatement"] = "WithStatement";
AST_NODE_TYPES2["YieldExpression"] = "YieldExpression";
AST_NODE_TYPES2["TSAbstractAccessorProperty"] = "TSAbstractAccessorProperty";
AST_NODE_TYPES2["TSAbstractKeyword"] = "TSAbstractKeyword";
AST_NODE_TYPES2["TSAbstractMethodDefinition"] = "TSAbstractMethodDefinition";
AST_NODE_TYPES2["TSAbstractPropertyDefinition"] = "TSAbstractPropertyDefinition";
AST_NODE_TYPES2["TSAnyKeyword"] = "TSAnyKeyword";
AST_NODE_TYPES2["TSArrayType"] = "TSArrayType";
AST_NODE_TYPES2["TSAsExpression"] = "TSAsExpression";
AST_NODE_TYPES2["TSAsyncKeyword"] = "TSAsyncKeyword";
AST_NODE_TYPES2["TSBigIntKeyword"] = "TSBigIntKeyword";
AST_NODE_TYPES2["TSBooleanKeyword"] = "TSBooleanKeyword";
AST_NODE_TYPES2["TSCallSignatureDeclaration"] = "TSCallSignatureDeclaration";
AST_NODE_TYPES2["TSClassImplements"] = "TSClassImplements";
AST_NODE_TYPES2["TSConditionalType"] = "TSConditionalType";
AST_NODE_TYPES2["TSConstructorType"] = "TSConstructorType";
AST_NODE_TYPES2["TSConstructSignatureDeclaration"] = "TSConstructSignatureDeclaration";
AST_NODE_TYPES2["TSDeclareFunction"] = "TSDeclareFunction";
AST_NODE_TYPES2["TSDeclareKeyword"] = "TSDeclareKeyword";
AST_NODE_TYPES2["TSEmptyBodyFunctionExpression"] = "TSEmptyBodyFunctionExpression";
AST_NODE_TYPES2["TSEnumDeclaration"] = "TSEnumDeclaration";
AST_NODE_TYPES2["TSEnumMember"] = "TSEnumMember";
AST_NODE_TYPES2["TSExportAssignment"] = "TSExportAssignment";
AST_NODE_TYPES2["TSExportKeyword"] = "TSExportKeyword";
AST_NODE_TYPES2["TSExternalModuleReference"] = "TSExternalModuleReference";
AST_NODE_TYPES2["TSFunctionType"] = "TSFunctionType";
AST_NODE_TYPES2["TSInstantiationExpression"] = "TSInstantiationExpression";
AST_NODE_TYPES2["TSImportEqualsDeclaration"] = "TSImportEqualsDeclaration";
AST_NODE_TYPES2["TSImportType"] = "TSImportType";
AST_NODE_TYPES2["TSIndexedAccessType"] = "TSIndexedAccessType";
AST_NODE_TYPES2["TSIndexSignature"] = "TSIndexSignature";
AST_NODE_TYPES2["TSInferType"] = "TSInferType";
AST_NODE_TYPES2["TSInterfaceBody"] = "TSInterfaceBody";
AST_NODE_TYPES2["TSInterfaceDeclaration"] = "TSInterfaceDeclaration";
AST_NODE_TYPES2["TSInterfaceHeritage"] = "TSInterfaceHeritage";
AST_NODE_TYPES2["TSIntersectionType"] = "TSIntersectionType";
AST_NODE_TYPES2["TSIntrinsicKeyword"] = "TSIntrinsicKeyword";
AST_NODE_TYPES2["TSLiteralType"] = "TSLiteralType";
AST_NODE_TYPES2["TSMappedType"] = "TSMappedType";
AST_NODE_TYPES2["TSMethodSignature"] = "TSMethodSignature";
AST_NODE_TYPES2["TSModuleBlock"] = "TSModuleBlock";
AST_NODE_TYPES2["TSModuleDeclaration"] = "TSModuleDeclaration";
AST_NODE_TYPES2["TSNamedTupleMember"] = "TSNamedTupleMember";
AST_NODE_TYPES2["TSNamespaceExportDeclaration"] = "TSNamespaceExportDeclaration";
AST_NODE_TYPES2["TSNeverKeyword"] = "TSNeverKeyword";
AST_NODE_TYPES2["TSNonNullExpression"] = "TSNonNullExpression";
AST_NODE_TYPES2["TSNullKeyword"] = "TSNullKeyword";
AST_NODE_TYPES2["TSNumberKeyword"] = "TSNumberKeyword";
AST_NODE_TYPES2["TSObjectKeyword"] = "TSObjectKeyword";
AST_NODE_TYPES2["TSOptionalType"] = "TSOptionalType";
AST_NODE_TYPES2["TSParameterProperty"] = "TSParameterProperty";
AST_NODE_TYPES2["TSPrivateKeyword"] = "TSPrivateKeyword";
AST_NODE_TYPES2["TSPropertySignature"] = "TSPropertySignature";
AST_NODE_TYPES2["TSProtectedKeyword"] = "TSProtectedKeyword";
AST_NODE_TYPES2["TSPublicKeyword"] = "TSPublicKeyword";
AST_NODE_TYPES2["TSQualifiedName"] = "TSQualifiedName";
AST_NODE_TYPES2["TSReadonlyKeyword"] = "TSReadonlyKeyword";
AST_NODE_TYPES2["TSRestType"] = "TSRestType";
AST_NODE_TYPES2["TSSatisfiesExpression"] = "TSSatisfiesExpression";
AST_NODE_TYPES2["TSStaticKeyword"] = "TSStaticKeyword";
AST_NODE_TYPES2["TSStringKeyword"] = "TSStringKeyword";
AST_NODE_TYPES2["TSSymbolKeyword"] = "TSSymbolKeyword";
AST_NODE_TYPES2["TSTemplateLiteralType"] = "TSTemplateLiteralType";
AST_NODE_TYPES2["TSThisType"] = "TSThisType";
AST_NODE_TYPES2["TSTupleType"] = "TSTupleType";
AST_NODE_TYPES2["TSTypeAliasDeclaration"] = "TSTypeAliasDeclaration";
AST_NODE_TYPES2["TSTypeAnnotation"] = "TSTypeAnnotation";
AST_NODE_TYPES2["TSTypeAssertion"] = "TSTypeAssertion";
AST_NODE_TYPES2["TSTypeLiteral"] = "TSTypeLiteral";
AST_NODE_TYPES2["TSTypeOperator"] = "TSTypeOperator";
AST_NODE_TYPES2["TSTypeParameter"] = "TSTypeParameter";
AST_NODE_TYPES2["TSTypeParameterDeclaration"] = "TSTypeParameterDeclaration";
AST_NODE_TYPES2["TSTypeParameterInstantiation"] = "TSTypeParameterInstantiation";
AST_NODE_TYPES2["TSTypePredicate"] = "TSTypePredicate";
AST_NODE_TYPES2["TSTypeQuery"] = "TSTypeQuery";
AST_NODE_TYPES2["TSTypeReference"] = "TSTypeReference";
AST_NODE_TYPES2["TSUndefinedKeyword"] = "TSUndefinedKeyword";
AST_NODE_TYPES2["TSUnionType"] = "TSUnionType";
AST_NODE_TYPES2["TSUnknownKeyword"] = "TSUnknownKeyword";
AST_NODE_TYPES2["TSVoidKeyword"] = "TSVoidKeyword";
})(AST_NODE_TYPES || (exports.AST_NODE_TYPES = AST_NODE_TYPES = {}));
var AST_TOKEN_TYPES;
(function(AST_TOKEN_TYPES2) {
AST_TOKEN_TYPES2["Boolean"] = "Boolean";
AST_TOKEN_TYPES2["Identifier"] = "Identifier";
AST_TOKEN_TYPES2["JSXIdentifier"] = "JSXIdentifier";
AST_TOKEN_TYPES2["JSXText"] = "JSXText";
AST_TOKEN_TYPES2["Keyword"] = "Keyword";
AST_TOKEN_TYPES2["Null"] = "Null";
AST_TOKEN_TYPES2["Numeric"] = "Numeric";
AST_TOKEN_TYPES2["Punctuator"] = "Punctuator";
AST_TOKEN_TYPES2["RegularExpression"] = "RegularExpression";
AST_TOKEN_TYPES2["String"] = "String";
AST_TOKEN_TYPES2["Template"] = "Template";
AST_TOKEN_TYPES2["Block"] = "Block";
AST_TOKEN_TYPES2["Line"] = "Line";
})(AST_TOKEN_TYPES || (exports.AST_TOKEN_TYPES = AST_TOKEN_TYPES = {}));
}
});
// ../../node_modules/.pnpm/@typescript-eslint+types@5.62.0/node_modules/@typescript-eslint/types/dist/lib.js
var require_lib = __commonJS({
"../../node_modules/.pnpm/@typescript-eslint+types@5.62.0/node_modules/@typescript-eslint/types/dist/lib.js"(exports) {
"use strict";
init_shims();
Object.defineProperty(exports, "__esModule", { value: true });
}
});
// ../../node_modules/.pnpm/@typescript-eslint+types@5.62.0/node_modules/@typescript-eslint/types/dist/parser-options.js
var require_parser_options = __commonJS({
"../../node_modules/.pnpm/@typescript-eslint+types@5.62.0/node_modules/@typescript-eslint/types/dist/parser-options.js"(exports) {
"use strict";
init_shims();
Object.defineProperty(exports, "__esModule", { value: true });
}
});
// ../../node_modules/.pnpm/@typescript-eslint+types@5.62.0/node_modules/@typescript-eslint/types/dist/ts-estree.js
var require_ts_estree = __commonJS({
"../../node_modules/.pnpm/@typescript-eslint+types@5.62.0/node_modules/@typescript-eslint/types/dist/ts-estree.js"(exports) {
"use strict";
init_shims();
var __createBinding2 = exports && exports.__createBinding || (Object.create ? function(o, m, k, k2) {
if (k2 === void 0) k2 = k;
var desc = Object.getOwnPropertyDescriptor(m, k);
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
desc = { enumerable: true, get: function() {
return m[k];
} };
}
Object.defineProperty(o, k2, desc);
} : function(o, m, k, k2) {
if (k2 === void 0) k2 = k;
o[k2] = m[k];
});
var __setModuleDefault2 = exports && exports.__setModuleDefault || (Object.create ? function(o, v) {
Object.defineProperty(o, "default", { enumerable: true, value: v });
} : function(o, v) {
o["default"] = v;
});
var __importStar2 = exports && exports.__importStar || function(mod) {
if (mod && mod.__esModule) return mod;
var result = {};
if (mod != null) {
for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding2(result, mod, k);
}
__setModuleDefault2(result, mod);
return result;
};
Object.defineProperty(exports, "__esModule", { value: true });
exports.TSESTree = void 0;
exports.TSESTree = __importStar2(require_ast_spec());
}
});
// ../../node_modules/.pnpm/@typescript-eslint+types@5.62.0/node_modules/@typescript-eslint/types/dist/index.js
var require_dist2 = __commonJS({
"../../node_modules/.pnpm/@typescript-eslint+types@5.62.0/node_modules/@typescript-eslint/types/dist/index.js"(exports) {
"use strict";
init_shims();
var __createBinding2 = exports && exports.__createBinding || (Object.create ? function(o, m, k, k2) {
if (k2 === void 0) k2 = k;
var desc = Object.getOwnPropertyDescriptor(m, k);
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
desc = { enumerable: true, get: function() {
return m[k];
} };
}
Object.defineProperty(o, k2, desc);
} : function(o, m, k, k2) {
if (k2 === void 0) k2 = k;
o[k2] = m[k];
});
var __exportStar2 = exports && exports.__exportStar || function(m, exports2) {
for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports2, p)) __createBinding2(exports2, m, p);
};
Object.defineProperty(exports, "__esModule", { value: true });
exports.AST_TOKEN_TYPES = exports.AST_NODE_TYPES = void 0;
var ast_spec_1 = require_ast_spec();
Object.defineProperty(exports, "AST_NODE_TYPES", { enumerable: true, get: function() {
return ast_spec_1.AST_NODE_TYPES;
} });
Object.defineProperty(exports, "AST_TOKEN_TYPES", { enumerable: true, get: function() {
return ast_spec_1.AST_TOKEN_TYPES;
} });
__exportStar2(require_lib(), exports);
__exportStar2(require_parser_options(), exports);
__exportStar2(require_ts_estree(), exports);
}
});
// ../../node_modules/.pnpm/@typescript-eslint+utils@5.62.0_eslint@9.4.0_typescript@5.4.5/node_modules/@typescript-eslint/utils/dist/ts-estree.js
var require_ts_estree2 = __commonJS({
"../../node_modules/.pnpm/@typescript-eslint+utils@5.62.0_eslint@9.4.0_typescript@5.4.5/node_modules/@typescript-eslint/utils/dist/ts-estree.js"(exports) {
"use strict";
init_shims();
Object.defineProperty(exports, "__esModule", { value: true });
exports.TSESTree = exports.AST_TOKEN_TYPES = exports.AST_NODE_TYPES = void 0;
var types_1 = require_dist2();
Object.defineProperty(exports, "AST_NODE_TYPES", { enumerable: true, get: function() {
return types_1.AST_NODE_TYPES;
} });
Object.defineProperty(exports, "AST_TOKEN_TYPES", { enumerable: true, get: function() {
return types_1.AST_TOKEN_TYPES;
} });
Object.defineProperty(exports, "TSESTree", { enumerable: true, get: function() {
return types_1.TSESTree;
} });
}
});
// ../../node_modules/.pnpm/@typescript-eslint+utils@5.62.0_eslint@9.4.0_typescript@5.4.5/node_modules/@typescript-eslint/utils/dist/ast-utils/predicates.js
var require_predicates2 = __commonJS({
"../../node_modules/.pnpm/@typescript-eslint+utils@5.62.0_eslint@9.4.0_typescript@5.4.5/node_modules/@typescript-eslint/utils/dist/ast-utils/predicates.js"(exports) {
"use strict";
init_shims();
Object.defineProperty(exports, "__esModule", { value: true });
exports.isVariableDeclarator = exports.isTypeKeyword = exports.isTypeAssertion = exports.isTSFunctionType = exports.isTSConstructorType = exports.isSetter = exports.isOptionalCallExpression = exports.isOptionalChainPunctuator = exports.isNotOptionalChainPunctuator = exports.isNotNonNullAssertionPunctuator = exports.isNonNullAssertionPunctuator = exports.isLogicalOrOperator = exports.isLoop = exports.isImportKeyword = exports.isIdentifier = exports.isFunctionType = exports.isFunctionOrFunctionType = exports.isFunction = exports.isClassOrTypeElement = exports.isConstructor = exports.isAwaitKeyword = exports.isAwaitExpression = void 0;
var ts_estree_1 = require_ts_estree2();
var helpers_1 = require_helpers();
var isOptionalChainPunctuator = (0, helpers_1.isTokenOfTypeWithConditions)(ts_estree_1.AST_TOKEN_TYPES.Punctuator, { value: "?." });
exports.isOptionalChainPunctuator = isOptionalChainPunctuator;
var isNotOptionalChainPunctuator = (0, helpers_1.isNotTokenOfTypeWithConditions)(ts_estree_1.AST_TOKEN_TYPES.Punctuator, { value: "?." });
exports.isNotOptionalChainPunctuator = isNotOptionalChainPunctuator;
var isNonNullAssertionPunctuator = (0, helpers_1.isTokenOfTypeWithConditions)(ts_estree_1.AST_TOKEN_TYPES.Punctuator, { value: "!" });
exports.isNonNullAssertionPunctuator = isNonNullAssertionPunctuator;
var isNotNonNullAssertionPunctuator = (0, helpers_1.isNotTokenOfTypeWithConditions)(ts_estree_1.AST_TOKEN_TYPES.Punctuator, { value: "!" });
exports.isNotNonNullAssertionPunctuator = isNotNonNullAssertionPunctuator;
var isOptionalCallExpression = (0, helpers_1.isNodeOfTypeWithConditions)(
ts_estree_1.AST_NODE_TYPES.CallExpression,
// this flag means the call expression itself is option
// i.e. it is foo.bar?.() and not foo?.bar()
{ optional: true }
);
exports.isOptionalCallExpression = isOptionalCallExpression;
var isLogicalOrOperator = (0, helpers_1.isNodeOfTypeWithConditions)(ts_estree_1.AST_NODE_TYPES.LogicalExpression, { operator: "||" });
exports.isLogicalOrOperator = isLogicalOrOperator;
var isTypeAssertion = (0, helpers_1.isNodeOfTypes)([
ts_estree_1.AST_NODE_TYPES.TSAsExpression,
ts_estree_1.AST_NODE_TYPES.TSTypeAssertion
]);
exports.isTypeAssertion = isTypeAssertion;
var isVariableDeclarator = (0, helpers_1.isNodeOfType)(ts_estree_1.AST_NODE_TYPES.VariableDeclarator);
exports.isVariableDeclarator = isVariableDeclarator;
var functionTypes = [
ts_estree_1.AST_NODE_TYPES.ArrowFunctionExpression,
ts_estree_1.AST_NODE_TYPES.FunctionDeclaration,
ts_estree_1.AST_NODE_TYPES.FunctionExpression
];
var isFunction = (0, helpers_1.isNodeOfTypes)(functionTypes);
exports.isFunction = isFunction;
var functionTypeTypes = [
ts_estree_1.AST_NODE_TYPES.TSCallSignatureDeclaration,
ts_estree_1.AST_NODE_TYPES.TSConstructorType,
ts_estree_1.AST_NODE_TYPES.TSConstructSignatureDeclaration,
ts_estree_1.AST_NODE_TYPES.TSEmptyBodyFunctionExpression,
ts_estree_1.AST_NODE_TYPES.TSFunctionType,
ts_estree_1.AST_NODE_TYPES.TSMethodSignature
];
var isFunctionType = (0, helpers_1.isNodeOfTypes)(functionTypeTypes);
exports.isFunctionType = isFunctionType;
var isFunctionOrFunctionType = (0, helpers_1.isNodeOfTypes)([
...functionTypes,
...functionTypeTypes
]);
exports.isFunctionOrFunctionType = isFunctionOrFunctionType;
var isTSFunctionType = (0, helpers_1.isNodeOfType)(ts_estree_1.AST_NODE_TYPES.TSFunctionType);
exports.isTSFunctionType = isTSFunctionType;
var isTSConstructorType = (0, helpers_1.isNodeOfType)(ts_estree_1.AST_NODE_TYPES.TSConstructorType);
exports.isTSConstructorType = isTSConstructorType;
var isClassOrTypeElement = (0, helpers_1.isNodeOfTypes)([
// ClassElement
ts_estree_1.AST_NODE_TYPES.PropertyDefinition,
ts_estree_1.AST_NODE_TYPES.FunctionExpression,
ts_estree_1.AST_NODE_TYPES.MethodDefinition,
ts_estree_1.AST_NODE_TYPES.TSAbstractPropertyDefinition,
ts_estree_1.AST_NODE_TYPES.TSAbstractMethodDefinition,
ts_estree_1.AST_NODE_TYPES.TSEmptyBodyFunctionExpression,
ts_estree_1.AST_NODE_TYPES.TSIndexSignature,
// TypeElement
ts_estree_1.AST_NODE_TYPES.TSCallSignatureDeclaration,
ts_estree_1.AST_NODE_TYPES.TSConstructSignatureDeclaration,
// AST_NODE_TYPES.TSIndexSignature,
ts_estree_1.AST_NODE_TYPES.TSMethodSignature,
ts_estree_1.AST_NODE_TYPES.TSPropertySignature
]);
exports.isClassOrTypeElement = isClassOrTypeElement;
var isConstructor = (0, helpers_1.isNodeOfTypeWithConditions)(ts_estree_1.AST_NODE_TYPES.MethodDefinition, { kind: "constructor" });
exports.isConstructor = isConstructor;
function isSetter(node2) {
return !!node2 && (node2.type === ts_estree_1.AST_NODE_TYPES.MethodDefinition || node2.type === ts_estree_1.AST_NODE_TYPES.Property) && node2.kind === "set";
}
exports.isSetter = isSetter;
var isIdentifier = (0, helpers_1.isNodeOfType)(ts_estree_1.AST_NODE_TYPES.Identifier);
exports.isIdentifier = isIdentifier;
var isAwaitExpression = (0, helpers_1.isNodeOfType)(ts_estree_1.AST_NODE_TYPES.AwaitExpression);
exports.isAwaitExpression = isAwaitExpression;
var isAwaitKeyword = (0, helpers_1.isTokenOfTypeWithConditions)(ts_estree_1.AST_TOKEN_TYPES.Identifier, {
value: "await"
});
exports.isAwaitKeyword = isAwaitKeyword;
var isTypeKeyword = (0, helpers_1.isTokenOfTypeWithConditions)(ts_estree_1.AST_TOKEN_TYPES.Identifier, {
value: "type"
});
exports.isTypeKeyword = isTypeKeyword;
var isImportKeyword = (0, helpers_1.isTokenOfTypeWithConditions)(ts_estree_1.AST_TOKEN_TYPES.Keyword, {
value: "import"
});
exports.isImportKeyword = isImportKeyword;
var isLoop = (0, helpers_1.isNodeOfTypes)([
ts_estree_1.AST_NODE_TYPES.DoWhileStatement,
ts_estree_1.AST_NODE_TYPES.ForStatement,
ts_estree_1.AST_NODE_TYPES.ForInStatement,
ts_estree_1.AST_NODE_TYPES.ForOfStatement,
ts_estree_1.AST_NODE_TYPES.WhileStatement
]);
exports.isLoop = isLoop;
}
});
// ../../node_modules/.pnpm/@typescript-eslint+utils@5.62.0_eslint@9.4.0_typescript@5.4.5/node_modules/@typescript-eslint/utils/dist/ast-utils/index.js
var require_ast_utils = __commonJS({
"../../node_modules/.pnpm/@typescript-eslint+utils@5.62.0_eslint@9.4.0_typescript@5.4.5/node_modules/@typescript-eslint/utils/dist/ast-utils/index.js"(exports) {
"use strict";
init_shims();
var __createBinding2 = exports && exports.__createBinding || (Object.create ? function(o, m, k, k2) {
if (k2 === void 0) k2 = k;
var desc = Object.getOwnPropertyDescriptor(m, k);
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
desc = { enumerable: true, get: function() {
return m[k];
} };
}
Object.defineProperty(o, k2, desc);
} : function(o, m, k, k2) {
if (k2 === void 0) k2 = k;
o[k2] = m[k];
});
var __exportStar2 = exports && exports.__exportStar || function(m, exports2) {
for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports2, p)) __createBinding2(exports2, m, p);
};
Object.defineProperty(exports, "__esModule", { value: true });
__exportStar2(require_eslint_utils2(), exports);
__exportStar2(require_helpers(), exports);
__exportStar2(require_misc(), exports);
__exportStar2(require_predicates2(), exports);
}
});
// ../../node_modules/.pnpm/@typescript-eslint+utils@5.62.0_eslint@9.4.0_typescript@5.4.5/node_modules/@typescript-eslint/utils/dist/eslint-utils/deepMerge.js
var require_deepMerge = __commonJS({
"../../node_modules/.pnpm/@typescript-eslint+utils@5.62.0_eslint@9.4.0_typescript@5.4.5/node_modules/@typescript-eslint/utils/dist/eslint-utils/deepMerge.js"(exports) {
"use strict";
init_shims();
Object.defineProperty(exports, "__esModule", { value: true });
exports.isObjectNotArray = exports.deepMerge = void 0;
function isObjectNotArray(obj) {
return typeof obj === "object" && !Array.isArray(obj);
}
exports.isObjectNotArray = isObjectNotArray;
function deepMerge(first = {}, second = {}) {
const keys = new Set(Object.keys(first).concat(Object.keys(second)));
return Array.from(keys).reduce((acc, key) => {
const firstHasKey = key in first;
const secondHasKey = key in second;
const firstValue = first[key];
const secondValue = second[key];
if (firstHasKey && secondHasKey) {
if (isObjectNotArray(firstValue) && isObjectNotArray(secondValue)) {
acc[key] = deepMerge(firstValue, secondValue);
} else {
acc[key] = secondValue;
}
} else if (firstHasKey) {
acc[key] = firstValue;
} else {
acc[key] = secondValue;
}
return acc;
}, {});
}
exports.deepMerge = deepMerge;
}
});
// ../../node_modules/.pnpm/@typescript-eslint+utils@5.62.0_eslint@9.4.0_typescript@5.4.5/node_modules/@typescript-eslint/utils/dist/eslint-utils/applyDefault.js
var require_applyDefault = __commonJS({
"../../node_modules/.pnpm/@typescript-eslint+utils@5.62.0_eslint@9.4.0_typescript@5.4.5/node_modules/@typescript-eslint/utils/dist/eslint-utils/applyDefault.js"(exports) {
"use strict";
init_shims();
Object.defineProperty(exports, "__esModule", { value: true });
exports.applyDefault = void 0;
var deepMerge_1 = require_deepMerge();
function applyDefault(defaultOptions, userOptions) {
const options = JSON.parse(JSON.stringify(defaultOptions));
if (userOptions == null) {
return options;
}
options.forEach((opt, i) => {
if (userOptions[i] !== void 0) {
const userOpt = userOptions[i];
if ((0, deepMerge_1.isObjectNotArray)(userOpt) && (0, deepMerge_1.isObjectNotArray)(opt)) {
options[i] = (0, deepMerge_1.deepMerge)(opt, userOpt);
} else {
options[i] = userOpt;
}
}
});
return options;
}
exports.applyDefault = applyDefault;
}
});
// ../../node_modules/.pnpm/@typescript-eslint+utils@5.62.0_eslint@9.4.0_typescript@5.4.5/node_modules/@typescript-eslint/utils/dist/eslint-utils/batchedSingleLineTests.js
var require_batchedSingleLineTests = __commonJS({
"../../node_modules/.pnpm/@typescript-eslint+utils@5.62.0_eslint@9.4.0_typescript@5.4.5/node_modules/@typescript-eslint/utils/dist/eslint-utils/batchedSingleLineTests.js"(exports) {
"use strict";
init_shims();
Object.defineProperty(exports, "__esModule", { value: true });
exports.batchedSingleLineTests = void 0;
function batchedSingleLineTests(options) {
const lineOffset = options.code.startsWith("\n") ? 2 : 1;
const output = "output" in options && options.output ? options.output.trim().split("\n") : null;
return options.code.trim().split("\n").map((code, i) => {
const lineNum = i + lineOffset;
const errors = "errors" in options ? options.errors.filter((e) => e.line === lineNum) : [];
const returnVal = Object.assign(Object.assign({}, options), { code, errors: errors.map((e) => Object.assign(Object.assign({}, e), { line: 1 })) });
if (output === null || output === void 0 ? void 0 : output[i]) {
return Object.assign(Object.assign({}, returnVal), { output: output[i] });
}
return returnVal;
});
}
exports.batchedSingleLineTests = batchedSingleLineTests;
}
});
// ../../node_modules/.pnpm/@typescript-eslint+utils@5.62.0_eslint@9.4.0_typescript@5.4.5/node_modules/@typescript-eslint/utils/dist/eslint-utils/getParserServices.js
var require_getParserServices = __commonJS({
"../../node_modules/.pnpm/@typescript-eslint+utils@5.62.0_eslint@9.4.0_typescript@5.4.5/node_modules/@typescript-eslint/utils/dist/eslint-utils/getParserServices.js"(exports) {
"use strict";
init_shims();
Object.defineProperty(exports, "__esModule", { value: true });
exports.getParserServices = void 0;
var ERROR_MESSAGE = 'You have used a rule which requires parserServices to be generated. You must therefore provide a value for the "parserOptions.project" property for @typescript-eslint/parser.';
function getParserServices(context, allowWithoutFullTypeInformation = false) {
var _a, _b;
if (!((_a = context.parserServices) === null || _a === void 0 ? void 0 : _a.program) || !context.parserServices.esTreeNodeToTSNodeMap || !context.parserServices.tsNodeToESTreeNodeMap) {
throw new Error(ERROR_MESSAGE);
}
const hasFullTypeInformation = (_b = context.parserServices.hasFullTypeInformation) !== null && _b !== void 0 ? _b : (
/* backwards compatible */
true
);
if (!hasFullTypeInformation && !allowWithoutFullTypeInformation) {
throw new Error(ERROR_MESSAGE);
}
return context.parserServices;
}
exports.getParserServices = getParserServices;
}
});
// ../../node_modules/.pnpm/@typescript-eslint+utils@5.62.0_eslint@9.4.0_typescript@5.4.5/node_modules/@typescript-eslint/utils/dist/eslint-utils/InferTypesFromRule.js
var require_InferTypesFromRule = __commonJS({
"../../node_modules/.pnpm/@typescript-eslint+utils@5.62.0_eslint@9.4.0_typescript@5.4.5/node_modules/@typescript-eslint/utils/dist/eslint-utils/InferTypesFromRule.js"(exports) {
"use strict";
init_shims();
Object.defineProperty(exports, "__esModule", { value: true });
}
});
// ../../node_modules/.pnpm/@typescript-eslint+utils@5.62.0_eslint@9.4.0_typescript@5.4.5/node_modules/@typescript-eslint/utils/dist/eslint-utils/RuleCreator.js
var require_RuleCreator = __commonJS({
"../../node_modules/.pnpm/@typescript-eslint+utils@5.62.0_eslint@9.4.0_typescript@5.4.5/node_modules/@typescript-eslint/utils/dist/eslint-utils/RuleCreator.js"(exports) {
"use strict";
init_shims();
var __rest2 = exports && exports.__rest || function(s, e) {
var t = {};
for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0)
t[p] = s[p];
if (s != null && typeof Object.getOwnPropertySymbols === "function")
for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) {
if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable.call(s, p[i]))
t[p[i]] = s[p[i]];
}
return t;
};
Object.defineProperty(exports, "__esModule", { value: true });
exports.RuleCreator = void 0;
var applyDefault_1 = require_applyDefault();
function RuleCreator(urlCreator) {
return function createNamedRule(_a) {
var { name, meta } = _a, rule = __rest2(_a, ["name", "meta"]);
return createRule(Object.assign({ meta: Object.assign(Object.assign({}, meta), { docs: Object.assign(Object.assign({}, meta.docs), { url: urlCreator(name) }) }) }, rule));
};
}
exports.RuleCreator = RuleCreator;
function createRule({ create, defaultOptions, meta }) {
return {
create(context) {
const optionsWithDefault = (0, applyDefault_1.applyDefault)(defaultOptions, context.options);
return create(context, optionsWithDefault);
},
defaultOptions,
meta
};
}
RuleCreator.withoutDocs = createRule;
}
});
// ../../node_modules/.pnpm/semver@7.5.4/node_modules/semver/internal/constants.js
var require_constants2 = __commonJS({
"../../node_modules/.pnpm/semver@7.5.4/node_modules/semver/internal/constants.js"(exports, module) {
"use strict";
init_shims();
var SEMVER_SPEC_VERSION = "2.0.0";
var MAX_LENGTH = 256;
var MAX_SAFE_INTEGER = Number.MAX_SAFE_INTEGER || /* istanbul ignore next */
9007199254740991;
var MAX_SAFE_COMPONENT_LENGTH = 16;
var MAX_SAFE_BUILD_LENGTH = MAX_LENGTH - 6;
var RELEASE_TYPES = [
"major",
"premajor",
"minor",
"preminor",
"patch",
"prepatch",
"prerelease"
];
module.exports = {
MAX_LENGTH,
MAX_SAFE_COMPONENT_LENGTH,
MAX_SAFE_BUILD_LENGTH,
MAX_SAFE_INTEGER,
RELEASE_TYPES,
SEMVER_SPEC_VERSION,
FLAG_INCLUDE_PRERELEASE: 1,
FLAG_LOOSE: 2
};
}
});
// ../../node_modules/.pnpm/semver@7.5.4/node_modules/semver/internal/debug.js
var require_debug = __commonJS({
"../../node_modules/.pnpm/semver@7.5.4/node_modules/semver/internal/debug.js"(exports, module) {
"use strict";
init_shims();
var debug = typeof process === "object" && process.env && process.env.NODE_DEBUG && /\bsemver\b/i.test(process.env.NODE_DEBUG) ? (...args) => console.error("SEMVER", ...args) : () => {
};
module.exports = debug;
}
});
// ../../node_modules/.pnpm/semver@7.5.4/node_modules/semver/internal/re.js
var require_re = __commonJS({
"../../node_modules/.pnpm/semver@7.5.4/node_modules/semver/internal/re.js"(exports, module) {
"use strict";
init_shims();
var {
MAX_SAFE_COMPONENT_LENGTH,
MAX_SAFE_BUILD_LENGTH,
MAX_LENGTH
} = require_constants2();
var debug = require_debug();
exports = module.exports = {};
var re = exports.re = [];
var safeRe = exports.safeRe = [];
var src = exports.src = [];
var t = exports.t = {};
var R = 0;
var LETTERDASHNUMBER = "[a-zA-Z0-9-]";
var safeRegexReplacements = [
["\\s", 1],
["\\d", MAX_LENGTH],
[LETTERDASHNUMBER, MAX_SAFE_BUILD_LENGTH]
];
var makeSafeRegex = (value) => {
for (const [token, max] of safeRegexReplacements) {
value = value.split(`${token}*`).join(`${token}{0,${max}}`).split(`${token}+`).join(`${token}{1,${max}}`);
}
return value;
};
var createToken = (name, value, isGlobal) => {
const safe = makeSafeRegex(value);
const index = R++;
debug(name, index, value);
t[name] = index;
src[index] = value;
re[index] = new RegExp(value, isGlobal ? "g" : void 0);
safeRe[index] = new RegExp(safe, isGlobal ? "g" : void 0);
};
createToken("NUMERICIDENTIFIER", "0|[1-9]\\d*");
createToken("NUMERICIDENTIFIERLOOSE", "\\d+");
createToken("NONNUMERICIDENTIFIER", `\\d*[a-zA-Z-]${LETTERDASHNUMBER}*`);
createToken("MAINVERSION", `(${src[t.NUMERICIDENTIFIER]})\\.(${src[t.NUMERICIDENTIFIER]})\\.(${src[t.NUMERICIDENTIFIER]})`);
createToken("MAINVERSIONLOOSE", `(${src[t.NUMERICIDENTIFIERLOOSE]})\\.(${src[t.NUMERICIDENTIFIERLOOSE]})\\.(${src[t.NUMERICIDENTIFIERLOOSE]})`);
createToken("PRERELEASEIDENTIFIER", `(?:${src[t.NUMERICIDENTIFIER]}|${src[t.NONNUMERICIDENTIFIER]})`);
createToken("PRERELEASEIDENTIFIERLOOSE", `(?:${src[t.NUMERICIDENTIFIERLOOSE]}|${src[t.NONNUMERICIDENTIFIER]})`);
createToken("PRERELEASE", `(?:-(${src[t.PRERELEASEIDENTIFIER]}(?:\\.${src[t.PRERELEASEIDENTIFIER]})*))`);
createToken("PRERELEASELOOSE", `(?:-?(${src[t.PRERELEASEIDENTIFIERLOOSE]}(?:\\.${src[t.PRERELEASEIDENTIFIERLOOSE]})*))`);
createToken("BUILDIDENTIFIER", `${LETTERDASHNUMBER}+`);
createToken("BUILD", `(?:\\+(${src[t.BUILDIDENTIFIER]}(?:\\.${src[t.BUILDIDENTIFIER]})*))`);
createToken("FULLPLAIN", `v?${src[t.MAINVERSION]}${src[t.PRERELEASE]}?${src[t.BUILD]}?`);
createToken("FULL", `^${src[t.FULLPLAIN]}$`);
createToken("LOOSEPLAIN", `[v=\\s]*${src[t.MAINVERSIONLOOSE]}${src[t.PRERELEASELOOSE]}?${src[t.BUILD]}?`);
createToken("LOOSE", `^${src[t.LOOSEPLAIN]}$`);
createToken("GTLT", "((?:<|>)?=?)");
createToken("XRANGEIDENTIFIERLOOSE", `${src[t.NUMERICIDENTIFIERLOOSE]}|x|X|\\*`);
createToken("XRANGEIDENTIFIER", `${src[t.NUMERICIDENTIFIER]}|x|X|\\*`);
createToken("XRANGEPLAIN", `[v=\\s]*(${src[t.XRANGEIDENTIFIER]})(?:\\.(${src[t.XRANGEIDENTIFIER]})(?:\\.(${src[t.XRANGEIDENTIFIER]})(?:${src[t.PRERELEASE]})?${src[t.BUILD]}?)?)?`);
createToken("XRANGEPLAINLOOSE", `[v=\\s]*(${src[t.XRANGEIDENTIFIERLOOSE]})(?:\\.(${src[t.XRANGEIDENTIFIERLOOSE]})(?:\\.(${src[t.XRANGEIDENTIFIERLOOSE]})(?:${src[t.PRERELEASELOOSE]})?${src[t.BUILD]}?)?)?`);
createToken("XRANGE", `^${src[t.GTLT]}\\s*${src[t.XRANGEPLAIN]}$`);
createToken("XRANGELOOSE", `^${src[t.GTLT]}\\s*${src[t.XRANGEPLAINLOOSE]}$`);
createToken("COERCE", `${"(^|[^\\d])(\\d{1,"}${MAX_SAFE_COMPONENT_LENGTH}})(?:\\.(\\d{1,${MAX_SAFE_COMPONENT_LENGTH}}))?(?:\\.(\\d{1,${MAX_SAFE_COMPONENT_LENGTH}}))?(?:$|[^\\d])`);
createToken("COERCERTL", src[t.COERCE], true);
createToken("LONETILDE", "(?:~>?)");
createToken("TILDETRIM", `(\\s*)${src[t.LONETILDE]}\\s+`, true);
exports.tildeTrimReplace = "$1~";
createToken("TILDE", `^${src[t.LONETILDE]}${src[t.XRANGEPLAIN]}$`);
createToken("TILDELOOSE", `^${src[t.LONETILDE]}${src[t.XRANGEPLAINLOOSE]}$`);
createToken("LONECARET", "(?:\\^)");
createToken("CARETTRIM", `(\\s*)${src[t.LONECARET]}\\s+`, true);
exports.caretTrimReplace = "$1^";
createToken("CARET", `^${src[t.LONECARET]}${src[t.XRANGEPLAIN]}$`);
createToken("CARETLOOSE", `^${src[t.LONECARET]}${src[t.XRANGEPLAINLOOSE]}$`);
createToken("COMPARATORLOOSE", `^${src[t.GTLT]}\\s*(${src[t.LOOSEPLAIN]})$|^$`);
createToken("COMPARATOR", `^${src[t.GTLT]}\\s*(${src[t.FULLPLAIN]})$|^$`);
createToken("COMPARATORTRIM", `(\\s*)${src[t.GTLT]}\\s*(${src[t.LOOSEPLAIN]}|${src[t.XRANGEPLAIN]})`, true);
exports.comparatorTrimReplace = "$1$2$3";
createToken("HYPHENRANGE", `^\\s*(${src[t.XRANGEPLAIN]})\\s+-\\s+(${src[t.XRANGEPLAIN]})\\s*$`);
createToken("HYPHENRANGELOOSE", `^\\s*(${src[t.XRANGEPLAINLOOSE]})\\s+-\\s+(${src[t.XRANGEPLAINLOOSE]})\\s*$`);
createToken("STAR", "(<|>)?=?\\s*\\*");
createToken("GTE0", "^\\s*>=\\s*0\\.0\\.0\\s*$");
createToken("GTE0PRE", "^\\s*>=\\s*0\\.0\\.0-0\\s*$");
}
});
// ../../node_modules/.pnpm/semver@7.5.4/node_modules/semver/internal/parse-options.js
var require_parse_options = __commonJS({
"../../node_modules/.pnpm/semver@7.5.4/node_modules/semver/internal/parse-options.js"(exports, module) {
"use strict";
init_shims();
var looseOption = Object.freeze({ loose: true });
var emptyOpts = Object.freeze({});
var parseOptions = (options) => {
if (!options) {
return emptyOpts;
}
if (typeof options !== "object") {
return looseOption;
}
return options;
};
module.exports = parseOptions;
}
});
// ../../node_modules/.pnpm/semver@7.5.4/node_modules/semver/internal/identifiers.js
var require_identifiers = __commonJS({
"../../node_modules/.pnpm/semver@7.5.4/node_modules/semver/internal/identifiers.js"(exports, module) {
"use strict";
init_shims();
var numeric = /^[0-9]+$/;
var compareIdentifiers = (a, b) => {
const anum = numeric.test(a);
const bnum = numeric.test(b);
if (anum && bnum) {
a = +a;
b = +b;
}
return a === b ? 0 : anum && !bnum ? -1 : bnum && !anum ? 1 : a < b ? -1 : 1;
};
var rcompareIdentifiers = (a, b) => compareIdentifiers(b, a);
module.exports = {
compareIdentifiers,
rcompareIdentifiers
};
}
});
// ../../node_modules/.pnpm/semver@7.5.4/node_modules/semver/classes/semver.js
var require_semver = __commonJS({
"../../node_modules/.pnpm/semver@7.5.4/node_modules/semver/classes/semver.js"(exports, module) {
"use strict";
init_shims();
var debug = require_debug();
var { MAX_LENGTH, MAX_SAFE_INTEGER } = require_constants2();
var { safeRe: re, t } = require_re();
var parseOptions = require_parse_options();
var { compareIdentifiers } = require_identifiers();
var SemVer = class _SemVer {
constructor(version, options) {
options = parseOptions(options);
if (version instanceof _SemVer) {
if (version.loose === !!options.loose && version.includePrerelease === !!options.includePrerelease) {
return version;
} else {
version = version.version;
}
} else if (typeof version !== "string") {
throw new TypeError(`Invalid version. Must be a string. Got type "${typeof version}".`);
}
if (version.length > MAX_LENGTH) {
throw new TypeError(
`version is longer than ${MAX_LENGTH} characters`
);
}
debug("SemVer", version, options);
this.options = options;
this.loose = !!options.loose;
this.includePrerelease = !!options.includePrerelease;
const m = version.trim().match(options.loose ? re[t.LOOSE] : re[t.FULL]);
if (!m) {
throw new TypeError(`Invalid Version: ${version}`);
}
this.raw = version;
this.major = +m[1];
this.minor = +m[2];
this.patch = +m[3];
if (this.major > MAX_SAFE_INTEGER || this.major < 0) {
throw new TypeError("Invalid major version");
}
if (this.minor > MAX_SAFE_INTEGER || this.minor < 0) {
throw new TypeError("Invalid minor version");
}
if (this.patch > MAX_SAFE_INTEGER || this.patch < 0) {
throw new TypeError("Invalid patch version");
}
if (!m[4]) {
this.prerelease = [];
} else {
this.prerelease = m[4].split(".").map((id) => {
if (/^[0-9]+$/.test(id)) {
const num = +id;
if (num >= 0 && num < MAX_SAFE_INTEGER) {
return num;
}
}
return id;
});
}
this.build = m[5] ? m[5].split(".") : [];
this.format();
}
format() {
this.version = `${this.major}.${this.minor}.${this.patch}`;
if (this.prerelease.length) {
this.version += `-${this.prerelease.join(".")}`;
}
return this.version;
}
toString() {
return this.version;
}
compare(other) {
debug("SemVer.compare", this.version, this.options, other);
if (!(other instanceof _SemVer)) {
if (typeof other === "string" && other === this.version) {
return 0;
}
other = new _SemVer(other, this.options);
}
if (other.version === this.version) {
return 0;
}
return this.compareMain(other) || this.comparePre(other);
}
compareMain(other) {
if (!(other instanceof _SemVer)) {
other = new _SemVer(other, this.options);
}
return compareIdentifiers(this.major, other.major) || compareIdentifiers(this.minor, other.minor) || compareIdentifiers(this.patch, other.patch);
}
comparePre(other) {
if (!(other instanceof _SemVer)) {
other = new _SemVer(other, this.options);
}
if (this.prerelease.length && !other.prerelease.length) {
return -1;
} else if (!this.prerelease.length && other.prerelease.length) {
return 1;
} else if (!this.prerelease.length && !other.prerelease.length) {
return 0;
}
let i = 0;
do {
const a = this.prerelease[i];
const b = other.prerelease[i];
debug("prerelease compare", i, a, b);
if (a === void 0 && b === void 0) {
return 0;
} else if (b === void 0) {
return 1;
} else if (a === void 0) {
return -1;
} else if (a === b) {
continue;
} else {
return compareIdentifiers(a, b);
}
} while (++i);
}
compareBuild(other) {
if (!(other instanceof _SemVer)) {
other = new _SemVer(other, this.options);
}
let i = 0;
do {
const a = this.build[i];
const b = other.build[i];
debug("prerelease compare", i, a, b);
if (a === void 0 && b === void 0) {
return 0;
} else if (b === void 0) {
return 1;
} else if (a === void 0) {
return -1;
} else if (a === b) {
continue;
} else {
return compareIdentifiers(a, b);
}
} while (++i);
}
// preminor will bump the version up to the next minor release, and immediately
// down to pre-release. premajor and prepatch work the same way.
inc(release, identifier, identifierBase) {
switch (release) {
case "premajor":
this.prerelease.length = 0;
this.patch = 0;
this.minor = 0;
this.major++;
this.inc("pre", identifier, identifierBase);
break;
case "preminor":
this.prerelease.length = 0;
this.patch = 0;
this.minor++;
this.inc("pre", identifier, identifierBase);
break;
case "prepatch":
this.prerelease.length = 0;
this.inc("patch", identifier, identifierBase);
this.inc("pre", identifier, identifierBase);
break;
case "prerelease":
if (this.prerelease.length === 0) {
this.inc("patch", identifier, identifierBase);
}
this.inc("pre", identifier, identifierBase);
break;
case "major":
if (this.minor !== 0 || this.patch !== 0 || this.prerelease.length === 0) {
this.major++;
}
this.minor = 0;
this.patch = 0;
this.prerelease = [];
break;
case "minor":
if (this.patch !== 0 || this.prerelease.length === 0) {
this.minor++;
}
this.patch = 0;
this.prerelease = [];
break;
case "patch":
if (this.prerelease.length === 0) {
this.patch++;
}
this.prerelease = [];
break;
case "pre": {
const base = Number(identifierBase) ? 1 : 0;
if (!identifier && identifierBase === false) {
throw new Error("invalid increment argument: identifier is empty");
}
if (this.prerelease.length === 0) {
this.prerelease = [base];
} else {
let i = this.prerelease.length;
while (--i >= 0) {
if (typeof this.prerelease[i] === "number") {
this.prerelease[i]++;
i = -2;
}
}
if (i === -1) {
if (identifier === this.prerelease.join(".") && identifierBase === false) {
throw new Error("invalid increment argument: identifier already exists");
}
this.prerelease.push(base);
}
}
if (identifier) {
let prerelease = [identifier, base];
if (identifierBase === false) {
prerelease = [identifier];
}
if (compareIdentifiers(this.prerelease[0], identifier) === 0) {
if (isNaN(this.prerelease[1])) {
this.prerelease = prerelease;
}
} else {
this.prerelease = prerelease;
}
}
break;
}
default:
throw new Error(`invalid increment argument: ${release}`);
}
this.raw = this.format();
if (this.build.length) {
this.raw += `+${this.build.join(".")}`;
}
return this;
}
};
module.exports = SemVer;
}
});
// ../../node_modules/.pnpm/semver@7.5.4/node_modules/semver/functions/parse.js
var require_parse = __commonJS({
"../../node_modules/.pnpm/semver@7.5.4/node_modules/semver/functions/parse.js"(exports, module) {
"use strict";
init_shims();
var SemVer = require_semver();
var parse = (version, options, throwErrors = false) => {
if (version instanceof SemVer) {
return version;
}
try {
return new SemVer(version, options);
} catch (er) {
if (!throwErrors) {
return null;
}
throw er;
}
};
module.exports = parse;
}
});
// ../../node_modules/.pnpm/semver@7.5.4/node_modules/semver/functions/valid.js
var require_valid = __commonJS({
"../../node_modules/.pnpm/semver@7.5.4/node_modules/semver/functions/valid.js"(exports, module) {
"use strict";
init_shims();
var parse = require_parse();
var valid = (version, options) => {
const v = parse(version, options);
return v ? v.version : null;
};
module.exports = valid;
}
});
// ../../node_modules/.pnpm/semver@7.5.4/node_modules/semver/functions/clean.js
var require_clean = __commonJS({
"../../node_modules/.pnpm/semver@7.5.4/node_modules/semver/functions/clean.js"(exports, module) {
"use strict";
init_shims();
var parse = require_parse();
var clean = (version, options) => {
const s = parse(version.trim().replace(/^[=v]+/, ""), options);
return s ? s.version : null;
};
module.exports = clean;
}
});
// ../../node_modules/.pnpm/semver@7.5.4/node_modules/semver/functions/inc.js
var require_inc = __commonJS({
"../../node_modules/.pnpm/semver@7.5.4/node_modules/semver/functions/inc.js"(exports, module) {
"use strict";
init_shims();
var SemVer = require_semver();
var inc = (version, release, options, identifier, identifierBase) => {
if (typeof options === "string") {
identifierBase = identifier;
identifier = options;
options = void 0;
}
try {
return new SemVer(
version instanceof SemVer ? version.version : version,
options
).inc(release, identifier, identifierBase).version;
} catch (er) {
return null;
}
};
module.exports = inc;
}
});
// ../../node_modules/.pnpm/semver@7.5.4/node_modules/semver/functions/diff.js
var require_diff = __commonJS({
"../../node_modules/.pnpm/semver@7.5.4/node_modules/semver/functions/diff.js"(exports, module) {
"use strict";
init_shims();
var parse = require_parse();
var diff = (version1, version2) => {
const v1 = parse(version1, null, true);
const v2 = parse(version2, null, true);
const comparison = v1.compare(v2);
if (comparison === 0) {
return null;
}
const v1Higher = comparison > 0;
const highVersion = v1Higher ? v1 : v2;
const lowVersion = v1Higher ? v2 : v1;
const highHasPre = !!highVersion.prerelease.length;
const lowHasPre = !!lowVersion.prerelease.length;
if (lowHasPre && !highHasPre) {
if (!lowVersion.patch && !lowVersion.minor) {
return "major";
}
if (highVersion.patch) {
return "patch";
}
if (highVersion.minor) {
return "minor";
}
return "major";
}
const prefix = highHasPre ? "pre" : "";
if (v1.major !== v2.major) {
return prefix + "major";
}
if (v1.minor !== v2.minor) {
return prefix + "minor";
}
if (v1.patch !== v2.patch) {
return prefix + "patch";
}
return "prerelease";
};
module.exports = diff;
}
});
// ../../node_modules/.pnpm/semver@7.5.4/node_modules/semver/functions/major.js
var require_major = __commonJS({
"../../node_modules/.pnpm/semver@7.5.4/node_modules/semver/functions/major.js"(exports, module) {
"use strict";
init_shims();
var SemVer = require_semver();
var major = (a, loose) => new SemVer(a, loose).major;
module.exports = major;
}
});
// ../../node_modules/.pnpm/semver@7.5.4/node_modules/semver/functions/minor.js
var require_minor = __commonJS({
"../../node_modules/.pnpm/semver@7.5.4/node_modules/semver/functions/minor.js"(exports, module) {
"use strict";
init_shims();
var SemVer = require_semver();
var minor = (a, loose) => new SemVer(a, loose).minor;
module.exports = minor;
}
});
// ../../node_modules/.pnpm/semver@7.5.4/node_modules/semver/functions/patch.js
var require_patch = __commonJS({
"../../node_modules/.pnpm/semver@7.5.4/node_modules/semver/functions/patch.js"(exports, module) {
"use strict";
init_shims();
var SemVer = require_semver();
var patch = (a, loose) => new SemVer(a, loose).patch;
module.exports = patch;
}
});
// ../../node_modules/.pnpm/semver@7.5.4/node_modules/semver/functions/prerelease.js
var require_prerelease = __commonJS({
"../../node_modules/.pnpm/semver@7.5.4/node_modules/semver/functions/prerelease.js"(exports, module) {
"use strict";
init_shims();
var parse = require_parse();
var prerelease = (version, options) => {
const parsed = parse(version, options);
return parsed && parsed.prerelease.length ? parsed.prerelease : null;
};
module.exports = prerelease;
}
});
// ../../node_modules/.pnpm/semver@7.5.4/node_modules/semver/functions/compare.js
var require_compare = __commonJS({
"../../node_modules/.pnpm/semver@7.5.4/node_modules/semver/functions/compare.js"(exports, module) {
"use strict";
init_shims();
var SemVer = require_semver();
var compare = (a, b, loose) => new SemVer(a, loose).compare(new SemVer(b, loose));
module.exports = compare;
}
});
// ../../node_modules/.pnpm/semver@7.5.4/node_modules/semver/functions/rcompare.js
var require_rcompare = __commonJS({
"../../node_modules/.pnpm/semver@7.5.4/node_modules/semver/functions/rcompare.js"(exports, module) {
"use strict";
init_shims();
var compare = require_compare();
var rcompare = (a, b, loose) => compare(b, a, loose);
module.exports = rcompare;
}
});
// ../../node_modules/.pnpm/semver@7.5.4/node_modules/semver/functions/compare-loose.js
var require_compare_loose = __commonJS({
"../../node_modules/.pnpm/semver@7.5.4/node_modules/semver/functions/compare-loose.js"(exports, module) {
"use strict";
init_shims();
var compare = require_compare();
var compareLoose = (a, b) => compare(a, b, true);
module.exports = compareLoose;
}
});
// ../../node_modules/.pnpm/semver@7.5.4/node_modules/semver/functions/compare-build.js
var require_compare_build = __commonJS({
"../../node_modules/.pnpm/semver@7.5.4/node_modules/semver/functions/compare-build.js"(exports, module) {
"use strict";
init_shims();
var SemVer = require_semver();
var compareBuild = (a, b, loose) => {
const versionA = new SemVer(a, loose);
const versionB = new SemVer(b, loose);
return versionA.compare(versionB) || versionA.compareBuild(versionB);
};
module.exports = compareBuild;
}
});
// ../../node_modules/.pnpm/semver@7.5.4/node_modules/semver/functions/sort.js
var require_sort = __commonJS({
"../../node_modules/.pnpm/semver@7.5.4/node_modules/semver/functions/sort.js"(exports, module) {
"use strict";
init_shims();
var compareBuild = require_compare_build();
var sort = (list, loose) => list.sort((a, b) => compareBuild(a, b, loose));
module.exports = sort;
}
});
// ../../node_modules/.pnpm/semver@7.5.4/node_modules/semver/functions/rsort.js
var require_rsort = __commonJS({
"../../node_modules/.pnpm/semver@7.5.4/node_modules/semver/functions/rsort.js"(exports, module) {
"use strict";
init_shims();
var compareBuild = require_compare_build();
var rsort = (list, loose) => list.sort((a, b) => compareBuild(b, a, loose));
module.exports = rsort;
}
});
// ../../node_modules/.pnpm/semver@7.5.4/node_modules/semver/functions/gt.js
var require_gt = __commonJS({
"../../node_modules/.pnpm/semver@7.5.4/node_modules/semver/functions/gt.js"(exports, module) {
"use strict";
init_shims();
var compare = require_compare();
var gt = (a, b, loose) => compare(a, b, loose) > 0;
module.exports = gt;
}
});
// ../../node_modules/.pnpm/semver@7.5.4/node_modules/semver/functions/lt.js
var require_lt = __commonJS({
"../../node_modules/.pnpm/semver@7.5.4/node_modules/semver/functions/lt.js"(exports, module) {
"use strict";
init_shims();
var compare = require_compare();
var lt = (a, b, loose) => compare(a, b, loose) < 0;
module.exports = lt;
}
});
// ../../node_modules/.pnpm/semver@7.5.4/node_modules/semver/functions/eq.js
var require_eq = __commonJS({
"../../node_modules/.pnpm/semver@7.5.4/node_modules/semver/functions/eq.js"(exports, module) {
"use strict";
init_shims();
var compare = require_compare();
var eq = (a, b, loose) => compare(a, b, loose) === 0;
module.exports = eq;
}
});
// ../../node_modules/.pnpm/semver@7.5.4/node_modules/semver/functions/neq.js
var require_neq = __commonJS({
"../../node_modules/.pnpm/semver@7.5.4/node_modules/semver/functions/neq.js"(exports, module) {
"use strict";
init_shims();
var compare = require_compare();
var neq = (a, b, loose) => compare(a, b, loose) !== 0;
module.exports = neq;
}
});
// ../../node_modules/.pnpm/semver@7.5.4/node_modules/semver/functions/gte.js
var require_gte = __commonJS({
"../../node_modules/.pnpm/semver@7.5.4/node_modules/semver/functions/gte.js"(exports, module) {
"use strict";
init_shims();
var compare = require_compare();
var gte = (a, b, loose) => compare(a, b, loose) >= 0;
module.exports = gte;
}
});
// ../../node_modules/.pnpm/semver@7.5.4/node_modules/semver/functions/lte.js
var require_lte = __commonJS({
"../../node_modules/.pnpm/semver@7.5.4/node_modules/semver/functions/lte.js"(exports, module) {
"use strict";
init_shims();
var compare = require_compare();
var lte = (a, b, loose) => compare(a, b, loose) <= 0;
module.exports = lte;
}
});
// ../../node_modules/.pnpm/semver@7.5.4/node_modules/semver/functions/cmp.js
var require_cmp = __commonJS({
"../../node_modules/.pnpm/semver@7.5.4/node_modules/semver/functions/cmp.js"(exports, module) {
"use strict";
init_shims();
var eq = require_eq();
var neq = require_neq();
var gt = require_gt();
var gte = require_gte();
var lt = require_lt();
var lte = require_lte();
var cmp = (a, op, b, loose) => {
switch (op) {
case "===":
if (typeof a === "object") {
a = a.version;
}
if (typeof b === "object") {
b = b.version;
}
return a === b;
case "!==":
if (typeof a === "object") {
a = a.version;
}
if (typeof b === "object") {
b = b.version;
}
return a !== b;
case "":
case "=":
case "==":
return eq(a, b, loose);
case "!=":
return neq(a, b, loose);
case ">":
return gt(a, b, loose);
case ">=":
return gte(a, b, loose);
case "<":
return lt(a, b, loose);
case "<=":
return lte(a, b, loose);
default:
throw new TypeError(`Invalid operator: ${op}`);
}
};
module.exports = cmp;
}
});
// ../../node_modules/.pnpm/semver@7.5.4/node_modules/semver/functions/coerce.js
var require_coerce = __commonJS({
"../../node_modules/.pnpm/semver@7.5.4/node_modules/semver/functions/coerce.js"(exports, module) {
"use strict";
init_shims();
var SemVer = require_semver();
var parse = require_parse();
var { safeRe: re, t } = require_re();
var coerce = (version, options) => {
if (version instanceof SemVer) {
return version;
}
if (typeof version === "number") {
version = String(version);
}
if (typeof version !== "string") {
return null;
}
options = options || {};
let match = null;
if (!options.rtl) {
match = version.match(re[t.COERCE]);
} else {
let next;
while ((next = re[t.COERCERTL].exec(version)) && (!match || match.index + match[0].length !== version.length)) {
if (!match || next.index + next[0].length !== match.index + match[0].length) {
match = next;
}
re[t.COERCERTL].lastIndex = next.index + next[1].length + next[2].length;
}
re[t.COERCERTL].lastIndex = -1;
}
if (match === null) {
return null;
}
return parse(`${match[2]}.${match[3] || "0"}.${match[4] || "0"}`, options);
};
module.exports = coerce;
}
});
// ../../node_modules/.pnpm/yallist@4.0.0/node_modules/yallist/iterator.js
var require_iterator = __commonJS({
"../../node_modules/.pnpm/yallist@4.0.0/node_modules/yallist/iterator.js"(exports, module) {
"use strict";
init_shims();
module.exports = function(Yallist) {
Yallist.prototype[Symbol.iterator] = function* () {
for (let walker = this.head; walker; walker = walker.next) {
yield walker.value;
}
};
};
}
});
// ../../node_modules/.pnpm/yallist@4.0.0/node_modules/yallist/yallist.js
var require_yallist = __commonJS({
"../../node_modules/.pnpm/yallist@4.0.0/node_modules/yallist/yallist.js"(exports, module) {
"use strict";
init_shims();
module.exports = Yallist;
Yallist.Node = Node;
Yallist.create = Yallist;
function Yallist(list) {
var self2 = this;
if (!(self2 instanceof Yallist)) {
self2 = new Yallist();
}
self2.tail = null;
self2.head = null;
self2.length = 0;
if (list && typeof list.forEach === "function") {
list.forEach(function(item) {
self2.push(item);
});
} else if (arguments.length > 0) {
for (var i = 0, l = arguments.length; i < l; i++) {
self2.push(arguments[i]);
}
}
return self2;
}
Yallist.prototype.removeNode = function(node2) {
if (node2.list !== this) {
throw new Error("removing node which does not belong to this list");
}
var next = node2.next;
var prev = node2.prev;
if (next) {
next.prev = prev;
}
if (prev) {
prev.next = next;
}
if (node2 === this.head) {
this.head = next;
}
if (node2 === this.tail) {
this.tail = prev;
}
node2.list.length--;
node2.next = null;
node2.prev = null;
node2.list = null;
return next;
};
Yallist.prototype.unshiftNode = function(node2) {
if (node2 === this.head) {
return;
}
if (node2.list) {
node2.list.removeNode(node2);
}
var head = this.head;
node2.list = this;
node2.next = head;
if (head) {
head.prev = node2;
}
this.head = node2;
if (!this.tail) {
this.tail = node2;
}
this.length++;
};
Yallist.prototype.pushNode = function(node2) {
if (node2 === this.tail) {
return;
}
if (node2.list) {
node2.list.removeNode(node2);
}
var tail = this.tail;
node2.list = this;
node2.prev = tail;
if (tail) {
tail.next = node2;
}
this.tail = node2;
if (!this.head) {
this.head = node2;
}
this.length++;
};
Yallist.prototype.push = function() {
for (var i = 0, l = arguments.length; i < l; i++) {
push(this, arguments[i]);
}
return this.length;
};
Yallist.prototype.unshift = function() {
for (var i = 0, l = arguments.length; i < l; i++) {
unshift(this, arguments[i]);
}
return this.length;
};
Yallist.prototype.pop = function() {
if (!this.tail) {
return void 0;
}
var res = this.tail.value;
this.tail = this.tail.prev;
if (this.tail) {
this.tail.next = null;
} else {
this.head = null;
}
this.length--;
return res;
};
Yallist.prototype.shift = function() {
if (!this.head) {
return void 0;
}
var res = this.head.value;
this.head = this.head.next;
if (this.head) {
this.head.prev = null;
} else {
this.tail = null;
}
this.length--;
return res;
};
Yallist.prototype.forEach = function(fn, thisp) {
thisp = thisp || this;
for (var walker = this.head, i = 0; walker !== null; i++) {
fn.call(thisp, walker.value, i, this);
walker = walker.next;
}
};
Yallist.prototype.forEachReverse = function(fn, thisp) {
thisp = thisp || this;
for (var walker = this.tail, i = this.length - 1; walker !== null; i--) {
fn.call(thisp, walker.value, i, this);
walker = walker.prev;
}
};
Yallist.prototype.get = function(n) {
for (var i = 0, walker = this.head; walker !== null && i < n; i++) {
walker = walker.next;
}
if (i === n && walker !== null) {
return walker.value;
}
};
Yallist.prototype.getReverse = function(n) {
for (var i = 0, walker = this.tail; walker !== null && i < n; i++) {
walker = walker.prev;
}
if (i === n && walker !== null) {
return walker.value;
}
};
Yallist.prototype.map = function(fn, thisp) {
thisp = thisp || this;
var res = new Yallist();
for (var walker = this.head; walker !== null; ) {
res.push(fn.call(thisp, walker.value, this));
walker = walker.next;
}
return res;
};
Yallist.prototype.mapReverse = function(fn, thisp) {
thisp = thisp || this;
var res = new Yallist();
for (var walker = this.tail; walker !== null; ) {
res.push(fn.call(thisp, walker.value, this));
walker = walker.prev;
}
return res;
};
Yallist.prototype.reduce = function(fn, initial) {
var acc;
var walker = this.head;
if (arguments.length > 1) {
acc = initial;
} else if (this.head) {
walker = this.head.next;
acc = this.head.value;
} else {
throw new TypeError("Reduce of empty list with no initial value");
}
for (var i = 0; walker !== null; i++) {
acc = fn(acc, walker.value, i);
walker = walker.next;
}
return acc;
};
Yallist.prototype.reduceReverse = function(fn, initial) {
var acc;
var walker = this.tail;
if (arguments.length > 1) {
acc = initial;
} else if (this.tail) {
walker = this.tail.prev;
acc = this.tail.value;
} else {
throw new TypeError("Reduce of empty list with no initial value");
}
for (var i = this.length - 1; walker !== null; i--) {
acc = fn(acc, walker.value, i);
walker = walker.prev;
}
return acc;
};
Yallist.prototype.toArray = function() {
var arr = new Array(this.length);
for (var i = 0, walker = this.head; walker !== null; i++) {
arr[i] = walker.value;
walker = walker.next;
}
return arr;
};
Yallist.prototype.toArrayReverse = function() {
var arr = new Array(this.length);
for (var i = 0, walker = this.tail; walker !== null; i++) {
arr[i] = walker.value;
walker = walker.prev;
}
return arr;
};
Yallist.prototype.slice = function(from, to) {
to = to || this.length;
if (to < 0) {
to += this.length;
}
from = from || 0;
if (from < 0) {
from += this.length;
}
var ret = new Yallist();
if (to < from || to < 0) {
return ret;
}
if (from < 0) {
from = 0;
}
if (to > this.length) {
to = this.length;
}
for (var i = 0, walker = this.head; walker !== null && i < from; i++) {
walker = walker.next;
}
for (; walker !== null && i < to; i++, walker = walker.next) {
ret.push(walker.value);
}
return ret;
};
Yallist.prototype.sliceReverse = function(from, to) {
to = to || this.length;
if (to < 0) {
to += this.length;
}
from = from || 0;
if (from < 0) {
from += this.length;
}
var ret = new Yallist();
if (to < from || to < 0) {
return ret;
}
if (from < 0) {
from = 0;
}
if (to > this.length) {
to = this.length;
}
for (var i = this.length, walker = this.tail; walker !== null && i > to; i--) {
walker = walker.prev;
}
for (; walker !== null && i > from; i--, walker = walker.prev) {
ret.push(walker.value);
}
return ret;
};
Yallist.prototype.splice = function(start, deleteCount, ...nodes) {
if (start > this.length) {
start = this.length - 1;
}
if (start < 0) {
start = this.length + start;
}
for (var i = 0, walker = this.head; walker !== null && i < start; i++) {
walker = walker.next;
}
var ret = [];
for (var i = 0; walker && i < deleteCount; i++) {
ret.push(walker.value);
walker = this.removeNode(walker);
}
if (walker === null) {
walker = this.tail;
}
if (walker !== this.head && walker !== this.tail) {
walker = walker.prev;
}
for (var i = 0; i < nodes.length; i++) {
walker = insert(this, walker, nodes[i]);
}
return ret;
};
Yallist.prototype.reverse = function() {
var head = this.head;
var tail = this.tail;
for (var walker = head; walker !== null; walker = walker.prev) {
var p = walker.prev;
walker.prev = walker.next;
walker.next = p;
}
this.head = tail;
this.tail = head;
return this;
};
function insert(self2, node2, value) {
var inserted = node2 === self2.head ? new Node(value, null, node2, self2) : new Node(value, node2, node2.next, self2);
if (inserted.next === null) {
self2.tail = inserted;
}
if (inserted.prev === null) {
self2.head = inserted;
}
self2.length++;
return inserted;
}
function push(self2, item) {
self2.tail = new Node(item, self2.tail, null, self2);
if (!self2.head) {
self2.head = self2.tail;
}
self2.length++;
}
function unshift(self2, item) {
self2.head = new Node(item, null, self2.head, self2);
if (!self2.tail) {
self2.tail = self2.head;
}
self2.length++;
}
function Node(value, prev, next, list) {
if (!(this instanceof Node)) {
return new Node(value, prev, next, list);
}
this.list = list;
this.value = value;
if (prev) {
prev.next = this;
this.prev = prev;
} else {
this.prev = null;
}
if (next) {
next.prev = this;
this.next = next;
} else {
this.next = null;
}
}
try {
require_iterator()(Yallist);
} catch (er) {
}
}
});
// ../../node_modules/.pnpm/lru-cache@6.0.0/node_modules/lru-cache/index.js
var require_lru_cache = __commonJS({
"../../node_modules/.pnpm/lru-cache@6.0.0/node_modules/lru-cache/index.js"(exports, module) {
"use strict";
init_shims();
var Yallist = require_yallist();
var MAX = Symbol("max");
var LENGTH = Symbol("length");
var LENGTH_CALCULATOR = Symbol("lengthCalculator");
var ALLOW_STALE = Symbol("allowStale");
var MAX_AGE = Symbol("maxAge");
var DISPOSE = Symbol("dispose");
var NO_DISPOSE_ON_SET = Symbol("noDisposeOnSet");
var LRU_LIST = Symbol("lruList");
var CACHE = Symbol("cache");
var UPDATE_AGE_ON_GET = Symbol("updateAgeOnGet");
var naiveLength = () => 1;
var LRUCache = class {
constructor(options) {
if (typeof options === "number")
options = { max: options };
if (!options)
options = {};
if (options.max && (typeof options.max !== "number" || options.max < 0))
throw new TypeError("max must be a non-negative number");
const max = this[MAX] = options.max || Infinity;
const lc = options.length || naiveLength;
this[LENGTH_CALCULATOR] = typeof lc !== "function" ? naiveLength : lc;
this[ALLOW_STALE] = options.stale || false;
if (options.maxAge && typeof options.maxAge !== "number")
throw new TypeError("maxAge must be a number");
this[MAX_AGE] = options.maxAge || 0;
this[DISPOSE] = options.dispose;
this[NO_DISPOSE_ON_SET] = options.noDisposeOnSet || false;
this[UPDATE_AGE_ON_GET] = options.updateAgeOnGet || false;
this.reset();
}
// resize the cache when the max changes.
set max(mL) {
if (typeof mL !== "number" || mL < 0)
throw new TypeError("max must be a non-negative number");
this[MAX] = mL || Infinity;
trim(this);
}
get max() {
return this[MAX];
}
set allowStale(allowStale) {
this[ALLOW_STALE] = !!allowStale;
}
get allowStale() {
return this[ALLOW_STALE];
}
set maxAge(mA) {
if (typeof mA !== "number")
throw new TypeError("maxAge must be a non-negative number");
this[MAX_AGE] = mA;
trim(this);
}
get maxAge() {
return this[MAX_AGE];
}
// resize the cache when the lengthCalculator changes.
set lengthCalculator(lC) {
if (typeof lC !== "function")
lC = naiveLength;
if (lC !== this[LENGTH_CALCULATOR]) {
this[LENGTH_CALCULATOR] = lC;
this[LENGTH] = 0;
this[LRU_LIST].forEach((hit) => {
hit.length = this[LENGTH_CALCULATOR](hit.value, hit.key);
this[LENGTH] += hit.length;
});
}
trim(this);
}
get lengthCalculator() {
return this[LENGTH_CALCULATOR];
}
get length() {
return this[LENGTH];
}
get itemCount() {
return this[LRU_LIST].length;
}
rforEach(fn, thisp) {
thisp = thisp || this;
for (let walker = this[LRU_LIST].tail; walker !== null; ) {
const prev = walker.prev;
forEachStep(this, fn, walker, thisp);
walker = prev;
}
}
forEach(fn, thisp) {
thisp = thisp || this;
for (let walker = this[LRU_LIST].head; walker !== null; ) {
const next = walker.next;
forEachStep(this, fn, walker, thisp);
walker = next;
}
}
keys() {
return this[LRU_LIST].toArray().map((k) => k.key);
}
values() {
return this[LRU_LIST].toArray().map((k) => k.value);
}
reset() {
if (this[DISPOSE] && this[LRU_LIST] && this[LRU_LIST].length) {
this[LRU_LIST].forEach((hit) => this[DISPOSE](hit.key, hit.value));
}
this[CACHE] = /* @__PURE__ */ new Map();
this[LRU_LIST] = new Yallist();
this[LENGTH] = 0;
}
dump() {
return this[LRU_LIST].map((hit) => isStale(this, hit) ? false : {
k: hit.key,
v: hit.value,
e: hit.now + (hit.maxAge || 0)
}).toArray().filter((h) => h);
}
dumpLru() {
return this[LRU_LIST];
}
set(key, value, maxAge) {
maxAge = maxAge || this[MAX_AGE];
if (maxAge && typeof maxAge !== "number")
throw new TypeError("maxAge must be a number");
const now = maxAge ? Date.now() : 0;
const len = this[LENGTH_CALCULATOR](value, key);
if (this[CACHE].has(key)) {
if (len > this[MAX]) {
del(this, this[CACHE].get(key));
return false;
}
const node2 = this[CACHE].get(key);
const item = node2.value;
if (this[DISPOSE]) {
if (!this[NO_DISPOSE_ON_SET])
this[DISPOSE](key, item.value);
}
item.now = now;
item.maxAge = maxAge;
item.value = value;
this[LENGTH] += len - item.length;
item.length = len;
this.get(key);
trim(this);
return true;
}
const hit = new Entry(key, value, len, now, maxAge);
if (hit.length > this[MAX]) {
if (this[DISPOSE])
this[DISPOSE](key, value);
return false;
}
this[LENGTH] += hit.length;
this[LRU_LIST].unshift(hit);
this[CACHE].set(key, this[LRU_LIST].head);
trim(this);
return true;
}
has(key) {
if (!this[CACHE].has(key)) return false;
const hit = this[CACHE].get(key).value;
return !isStale(this, hit);
}
get(key) {
return get(this, key, true);
}
peek(key) {
return get(this, key, false);
}
pop() {
const node2 = this[LRU_LIST].tail;
if (!node2)
return null;
del(this, node2);
return node2.value;
}
del(key) {
del(this, this[CACHE].get(key));
}
load(arr) {
this.reset();
const now = Date.now();
for (let l = arr.length - 1; l >= 0; l--) {
const hit = arr[l];
const expiresAt = hit.e || 0;
if (expiresAt === 0)
this.set(hit.k, hit.v);
else {
const maxAge = expiresAt - now;
if (maxAge > 0) {
this.set(hit.k, hit.v, maxAge);
}
}
}
}
prune() {
this[CACHE].forEach((value, key) => get(this, key, false));
}
};
var get = (self2, key, doUse) => {
const node2 = self2[CACHE].get(key);
if (node2) {
const hit = node2.value;
if (isStale(self2, hit)) {
del(self2, node2);
if (!self2[ALLOW_STALE])
return void 0;
} else {
if (doUse) {
if (self2[UPDATE_AGE_ON_GET])
node2.value.now = Date.now();
self2[LRU_LIST].unshiftNode(node2);
}
}
return hit.value;
}
};
var isStale = (self2, hit) => {
if (!hit || !hit.maxAge && !self2[MAX_AGE])
return false;
const diff = Date.now() - hit.now;
return hit.maxAge ? diff > hit.maxAge : self2[MAX_AGE] && diff > self2[MAX_AGE];
};
var trim = (self2) => {
if (self2[LENGTH] > self2[MAX]) {
for (let walker = self2[LRU_LIST].tail; self2[LENGTH] > self2[MAX] && walker !== null; ) {
const prev = walker.prev;
del(self2, walker);
walker = prev;
}
}
};
var del = (self2, node2) => {
if (node2) {
const hit = node2.value;
if (self2[DISPOSE])
self2[DISPOSE](hit.key, hit.value);
self2[LENGTH] -= hit.length;
self2[CACHE].delete(hit.key);
self2[LRU_LIST].removeNode(node2);
}
};
var Entry = class {
constructor(key, value, length, now, maxAge) {
this.key = key;
this.value = value;
this.length = length;
this.now = now;
this.maxAge = maxAge || 0;
}
};
var forEachStep = (self2, fn, node2, thisp) => {
let hit = node2.value;
if (isStale(self2, hit)) {
del(self2, node2);
if (!self2[ALLOW_STALE])
hit = void 0;
}
if (hit)
fn.call(thisp, hit.value, hit.key, self2);
};
module.exports = LRUCache;
}
});
// ../../node_modules/.pnpm/semver@7.5.4/node_modules/semver/classes/range.js
var require_range = __commonJS({
"../../node_modules/.pnpm/semver@7.5.4/node_modules/semver/classes/range.js"(exports, module) {
"use strict";
init_shims();
var Range = class _Range {
constructor(range, options) {
options = parseOptions(options);
if (range instanceof _Range) {
if (range.loose === !!options.loose && range.includePrerelease === !!options.includePrerelease) {
return range;
} else {
return new _Range(range.raw, options);
}
}
if (range instanceof Comparator) {
this.raw = range.value;
this.set = [[range]];
this.format();
return this;
}
this.options = options;
this.loose = !!options.loose;
this.includePrerelease = !!options.includePrerelease;
this.raw = range.trim().split(/\s+/).join(" ");
this.set = this.raw.split("||").map((r) => this.parseRange(r.trim())).filter((c) => c.length);
if (!this.set.length) {
throw new TypeError(`Invalid SemVer Range: ${this.raw}`);
}
if (this.set.length > 1) {
const first = this.set[0];
this.set = this.set.filter((c) => !isNullSet(c[0]));
if (this.set.length === 0) {
this.set = [first];
} else if (this.set.length > 1) {
for (const c of this.set) {
if (c.length === 1 && isAny(c[0])) {
this.set = [c];
break;
}
}
}
}
this.format();
}
format() {
this.range = this.set.map((comps) => comps.join(" ").trim()).join("||").trim();
return this.range;
}
toString() {
return this.range;
}
parseRange(range) {
const memoOpts = (this.options.includePrerelease && FLAG_INCLUDE_PRERELEASE) | (this.options.loose && FLAG_LOOSE);
const memoKey = memoOpts + ":" + range;
const cached = cache.get(memoKey);
if (cached) {
return cached;
}
const loose = this.options.loose;
const hr = loose ? re[t.HYPHENRANGELOOSE] : re[t.HYPHENRANGE];
range = range.replace(hr, hyphenReplace(this.options.includePrerelease));
debug("hyphen replace", range);
range = range.replace(re[t.COMPARATORTRIM], comparatorTrimReplace);
debug("comparator trim", range);
range = range.replace(re[t.TILDETRIM], tildeTrimReplace);
debug("tilde trim", range);
range = range.replace(re[t.CARETTRIM], caretTrimReplace);
debug("caret trim", range);
let rangeList = range.split(" ").map((comp) => parseComparator(comp, this.options)).join(" ").split(/\s+/).map((comp) => replaceGTE0(comp, this.options));
if (loose) {
rangeList = rangeList.filter((comp) => {
debug("loose invalid filter", comp, this.options);
return !!comp.match(re[t.COMPARATORLOOSE]);
});
}
debug("range list", rangeList);
const rangeMap = /* @__PURE__ */ new Map();
const comparators = rangeList.map((comp) => new Comparator(comp, this.options));
for (const comp of comparators) {
if (isNullSet(comp)) {
return [comp];
}
rangeMap.set(comp.value, comp);
}
if (rangeMap.size > 1 && rangeMap.has("")) {
rangeMap.delete("");
}
const result = [...rangeMap.values()];
cache.set(memoKey, result);
return result;
}
intersects(range, options) {
if (!(range instanceof _Range)) {
throw new TypeError("a Range is required");
}
return this.set.some((thisComparators) => {
return isSatisfiable(thisComparators, options) && range.set.some((rangeComparators) => {
return isSatisfiable(rangeComparators, options) && thisComparators.every((thisComparator) => {
return rangeComparators.every((rangeComparator) => {
return thisComparator.intersects(rangeComparator, options);
});
});
});
});
}
// if ANY of the sets match ALL of its comparators, then pass
test(version) {
if (!version) {
return false;
}
if (typeof version === "string") {
try {
version = new SemVer(version, this.options);
} catch (er) {
return false;
}
}
for (let i = 0; i < this.set.length; i++) {
if (testSet(this.set[i], version, this.options)) {
return true;
}
}
return false;
}
};
module.exports = Range;
var LRU = require_lru_cache();
var cache = new LRU({ max: 1e3 });
var parseOptions = require_parse_options();
var Comparator = require_comparator();
var debug = require_debug();
var SemVer = require_semver();
var {
safeRe: re,
t,
comparatorTrimReplace,
tildeTrimReplace,
caretTrimReplace
} = require_re();
var { FLAG_INCLUDE_PRERELEASE, FLAG_LOOSE } = require_constants2();
var isNullSet = (c) => c.value === "<0.0.0-0";
var isAny = (c) => c.value === "";
var isSatisfiable = (comparators, options) => {
let result = true;
const remainingComparators = comparators.slice();
let testComparator = remainingComparators.pop();
while (result && remainingComparators.length) {
result = remainingComparators.every((otherComparator) => {
return testComparator.intersects(otherComparator, options);
});
testComparator = remainingComparators.pop();
}
return result;
};
var parseComparator = (comp, options) => {
debug("comp", comp, options);
comp = replaceCarets(comp, options);
debug("caret", comp);
comp = replaceTildes(comp, options);
debug("tildes", comp);
comp = replaceXRanges(comp, options);
debug("xrange", comp);
comp = replaceStars(comp, options);
debug("stars", comp);
return comp;
};
var isX = (id) => !id || id.toLowerCase() === "x" || id === "*";
var replaceTildes = (comp, options) => {
return comp.trim().split(/\s+/).map((c) => replaceTilde(c, options)).join(" ");
};
var replaceTilde = (comp, options) => {
const r = options.loose ? re[t.TILDELOOSE] : re[t.TILDE];
return comp.replace(r, (_, M, m, p, pr) => {
debug("tilde", comp, _, M, m, p, pr);
let ret;
if (isX(M)) {
ret = "";
} else if (isX(m)) {
ret = `>=${M}.0.0 <${+M + 1}.0.0-0`;
} else if (isX(p)) {
ret = `>=${M}.${m}.0 <${M}.${+m + 1}.0-0`;
} else if (pr) {
debug("replaceTilde pr", pr);
ret = `>=${M}.${m}.${p}-${pr} <${M}.${+m + 1}.0-0`;
} else {
ret = `>=${M}.${m}.${p} <${M}.${+m + 1}.0-0`;
}
debug("tilde return", ret);
return ret;
});
};
var replaceCarets = (comp, options) => {
return comp.trim().split(/\s+/).map((c) => replaceCaret(c, options)).join(" ");
};
var replaceCaret = (comp, options) => {
debug("caret", comp, options);
const r = options.loose ? re[t.CARETLOOSE] : re[t.CARET];
const z = options.includePrerelease ? "-0" : "";
return comp.replace(r, (_, M, m, p, pr) => {
debug("caret", comp, _, M, m, p, pr);
let ret;
if (isX(M)) {
ret = "";
} else if (isX(m)) {
ret = `>=${M}.0.0${z} <${+M + 1}.0.0-0`;
} else if (isX(p)) {
if (M === "0") {
ret = `>=${M}.${m}.0${z} <${M}.${+m + 1}.0-0`;
} else {
ret = `>=${M}.${m}.0${z} <${+M + 1}.0.0-0`;
}
} else if (pr) {
debug("replaceCaret pr", pr);
if (M === "0") {
if (m === "0") {
ret = `>=${M}.${m}.${p}-${pr} <${M}.${m}.${+p + 1}-0`;
} else {
ret = `>=${M}.${m}.${p}-${pr} <${M}.${+m + 1}.0-0`;
}
} else {
ret = `>=${M}.${m}.${p}-${pr} <${+M + 1}.0.0-0`;
}
} else {
debug("no pr");
if (M === "0") {
if (m === "0") {
ret = `>=${M}.${m}.${p}${z} <${M}.${m}.${+p + 1}-0`;
} else {
ret = `>=${M}.${m}.${p}${z} <${M}.${+m + 1}.0-0`;
}
} else {
ret = `>=${M}.${m}.${p} <${+M + 1}.0.0-0`;
}
}
debug("caret return", ret);
return ret;
});
};
var replaceXRanges = (comp, options) => {
debug("replaceXRanges", comp, options);
return comp.split(/\s+/).map((c) => replaceXRange(c, options)).join(" ");
};
var replaceXRange = (comp, options) => {
comp = comp.trim();
const r = options.loose ? re[t.XRANGELOOSE] : re[t.XRANGE];
return comp.replace(r, (ret, gtlt, M, m, p, pr) => {
debug("xRange", comp, ret, gtlt, M, m, p, pr);
const xM = isX(M);
const xm = xM || isX(m);
const xp = xm || isX(p);
const anyX = xp;
if (gtlt === "=" && anyX) {
gtlt = "";
}
pr = options.includePrerelease ? "-0" : "";
if (xM) {
if (gtlt === ">" || gtlt === "<") {
ret = "<0.0.0-0";
} else {
ret = "*";
}
} else if (gtlt && anyX) {
if (xm) {
m = 0;
}
p = 0;
if (gtlt === ">") {
gtlt = ">=";
if (xm) {
M = +M + 1;
m = 0;
p = 0;
} else {
m = +m + 1;
p = 0;
}
} else if (gtlt === "<=") {
gtlt = "<";
if (xm) {
M = +M + 1;
} else {
m = +m + 1;
}
}
if (gtlt === "<") {
pr = "-0";
}
ret = `${gtlt + M}.${m}.${p}${pr}`;
} else if (xm) {
ret = `>=${M}.0.0${pr} <${+M + 1}.0.0-0`;
} else if (xp) {
ret = `>=${M}.${m}.0${pr} <${M}.${+m + 1}.0-0`;
}
debug("xRange return", ret);
return ret;
});
};
var replaceStars = (comp, options) => {
debug("replaceStars", comp, options);
return comp.trim().replace(re[t.STAR], "");
};
var replaceGTE0 = (comp, options) => {
debug("replaceGTE0", comp, options);
return comp.trim().replace(re[options.includePrerelease ? t.GTE0PRE : t.GTE0], "");
};
var hyphenReplace = (incPr) => ($0, from, fM, fm, fp, fpr, fb, to, tM, tm, tp, tpr, tb) => {
if (isX(fM)) {
from = "";
} else if (isX(fm)) {
from = `>=${fM}.0.0${incPr ? "-0" : ""}`;
} else if (isX(fp)) {
from = `>=${fM}.${fm}.0${incPr ? "-0" : ""}`;
} else if (fpr) {
from = `>=${from}`;
} else {
from = `>=${from}${incPr ? "-0" : ""}`;
}
if (isX(tM)) {
to = "";
} else if (isX(tm)) {
to = `<${+tM + 1}.0.0-0`;
} else if (isX(tp)) {
to = `<${tM}.${+tm + 1}.0-0`;
} else if (tpr) {
to = `<=${tM}.${tm}.${tp}-${tpr}`;
} else if (incPr) {
to = `<${tM}.${tm}.${+tp + 1}-0`;
} else {
to = `<=${to}`;
}
return `${from} ${to}`.trim();
};
var testSet = (set, version, options) => {
for (let i = 0; i < set.length; i++) {
if (!set[i].test(version)) {
return false;
}
}
if (version.prerelease.length && !options.includePrerelease) {
for (let i = 0; i < set.length; i++) {
debug(set[i].semver);
if (set[i].semver === Comparator.ANY) {
continue;
}
if (set[i].semver.prerelease.length > 0) {
const allowed = set[i].semver;
if (allowed.major === version.major && allowed.minor === version.minor && allowed.patch === version.patch) {
return true;
}
}
}
return false;
}
return true;
};
}
});
// ../../node_modules/.pnpm/semver@7.5.4/node_modules/semver/classes/comparator.js
var require_comparator = __commonJS({
"../../node_modules/.pnpm/semver@7.5.4/node_modules/semver/classes/comparator.js"(exports, module) {
"use strict";
init_shims();
var ANY = Symbol("SemVer ANY");
var Comparator = class _Comparator {
static get ANY() {
return ANY;
}
constructor(comp, options) {
options = parseOptions(options);
if (comp instanceof _Comparator) {
if (comp.loose === !!options.loose) {
return comp;
} else {
comp = comp.value;
}
}
comp = comp.trim().split(/\s+/).join(" ");
debug("comparator", comp, options);
this.options = options;
this.loose = !!options.loose;
this.parse(comp);
if (this.semver === ANY) {
this.value = "";
} else {
this.value = this.operator + this.semver.version;
}
debug("comp", this);
}
parse(comp) {
const r = this.options.loose ? re[t.COMPARATORLOOSE] : re[t.COMPARATOR];
const m = comp.match(r);
if (!m) {
throw new TypeError(`Invalid comparator: ${comp}`);
}
this.operator = m[1] !== void 0 ? m[1] : "";
if (this.operator === "=") {
this.operator = "";
}
if (!m[2]) {
this.semver = ANY;
} else {
this.semver = new SemVer(m[2], this.options.loose);
}
}
toString() {
return this.value;
}
test(version) {
debug("Comparator.test", version, this.options.loose);
if (this.semver === ANY || version === ANY) {
return true;
}
if (typeof version === "string") {
try {
version = new SemVer(version, this.options);
} catch (er) {
return false;
}
}
return cmp(version, this.operator, this.semver, this.options);
}
intersects(comp, options) {
if (!(comp instanceof _Comparator)) {
throw new TypeError("a Comparator is required");
}
if (this.operator === "") {
if (this.value === "") {
return true;
}
return new Range(comp.value, options).test(this.value);
} else if (comp.operator === "") {
if (comp.value === "") {
return true;
}
return new Range(this.value, options).test(comp.semver);
}
options = parseOptions(options);
if (options.includePrerelease && (this.value === "<0.0.0-0" || comp.value === "<0.0.0-0")) {
return false;
}
if (!options.includePrerelease && (this.value.startsWith("<0.0.0") || comp.value.startsWith("<0.0.0"))) {
return false;
}
if (this.operator.startsWith(">") && comp.operator.startsWith(">")) {
return true;
}
if (this.operator.startsWith("<") && comp.operator.startsWith("<")) {
return true;
}
if (this.semver.version === comp.semver.version && this.operator.includes("=") && comp.operator.includes("=")) {
return true;
}
if (cmp(this.semver, "<", comp.semver, options) && this.operator.startsWith(">") && comp.operator.startsWith("<")) {
return true;
}
if (cmp(this.semver, ">", comp.semver, options) && this.operator.startsWith("<") && comp.operator.startsWith(">")) {
return true;
}
return false;
}
};
module.exports = Comparator;
var parseOptions = require_parse_options();
var { safeRe: re, t } = require_re();
var cmp = require_cmp();
var debug = require_debug();
var SemVer = require_semver();
var Range = require_range();
}
});
// ../../node_modules/.pnpm/semver@7.5.4/node_modules/semver/functions/satisfies.js
var require_satisfies = __commonJS({
"../../node_modules/.pnpm/semver@7.5.4/node_modules/semver/functions/satisfies.js"(exports, module) {
"use strict";
init_shims();
var Range = require_range();
var satisfies = (version, range, options) => {
try {
range = new Range(range, options);
} catch (er) {
return false;
}
return range.test(version);
};
module.exports = satisfies;
}
});
// ../../node_modules/.pnpm/semver@7.5.4/node_modules/semver/ranges/to-comparators.js
var require_to_comparators = __commonJS({
"../../node_modules/.pnpm/semver@7.5.4/node_modules/semver/ranges/to-comparators.js"(exports, module) {
"use strict";
init_shims();
var Range = require_range();
var toComparators = (range, options) => new Range(range, options).set.map((comp) => comp.map((c) => c.value).join(" ").trim().split(" "));
module.exports = toComparators;
}
});
// ../../node_modules/.pnpm/semver@7.5.4/node_modules/semver/ranges/max-satisfying.js
var require_max_satisfying = __commonJS({
"../../node_modules/.pnpm/semver@7.5.4/node_modules/semver/ranges/max-satisfying.js"(exports, module) {
"use strict";
init_shims();
var SemVer = require_semver();
var Range = require_range();
var maxSatisfying = (versions, range, options) => {
let max = null;
let maxSV = null;
let rangeObj = null;
try {
rangeObj = new Range(range, options);
} catch (er) {
return null;
}
versions.forEach((v) => {
if (rangeObj.test(v)) {
if (!max || maxSV.compare(v) === -1) {
max = v;
maxSV = new SemVer(max, options);
}
}
});
return max;
};
module.exports = maxSatisfying;
}
});
// ../../node_modules/.pnpm/semver@7.5.4/node_modules/semver/ranges/min-satisfying.js
var require_min_satisfying = __commonJS({
"../../node_modules/.pnpm/semver@7.5.4/node_modules/semver/ranges/min-satisfying.js"(exports, module) {
"use strict";
init_shims();
var SemVer = require_semver();
var Range = require_range();
var minSatisfying = (versions, range, options) => {
let min = null;
let minSV = null;
let rangeObj = null;
try {
rangeObj = new Range(range, options);
} catch (er) {
return null;
}
versions.forEach((v) => {
if (rangeObj.test(v)) {
if (!min || minSV.compare(v) === 1) {
min = v;
minSV = new SemVer(min, options);
}
}
});
return min;
};
module.exports = minSatisfying;
}
});
// ../../node_modules/.pnpm/semver@7.5.4/node_modules/semver/ranges/min-version.js
var require_min_version = __commonJS({
"../../node_modules/.pnpm/semver@7.5.4/node_modules/semver/ranges/min-version.js"(exports, module) {
"use strict";
init_shims();
var SemVer = require_semver();
var Range = require_range();
var gt = require_gt();
var minVersion = (range, loose) => {
range = new Range(range, loose);
let minver = new SemVer("0.0.0");
if (range.test(minver)) {
return minver;
}
minver = new SemVer("0.0.0-0");
if (range.test(minver)) {
return minver;
}
minver = null;
for (let i = 0; i < range.set.length; ++i) {
const comparators = range.set[i];
let setMin = null;
comparators.forEach((comparator) => {
const compver = new SemVer(comparator.semver.version);
switch (comparator.operator) {
case ">":
if (compver.prerelease.length === 0) {
compver.patch++;
} else {
compver.prerelease.push(0);
}
compver.raw = compver.format();
case "":
case ">=":
if (!setMin || gt(compver, setMin)) {
setMin = compver;
}
break;
case "<":
case "<=":
break;
default:
throw new Error(`Unexpected operation: ${comparator.operator}`);
}
});
if (setMin && (!minver || gt(minver, setMin))) {
minver = setMin;
}
}
if (minver && range.test(minver)) {
return minver;
}
return null;
};
module.exports = minVersion;
}
});
// ../../node_modules/.pnpm/semver@7.5.4/node_modules/semver/ranges/valid.js
var require_valid2 = __commonJS({
"../../node_modules/.pnpm/semver@7.5.4/node_modules/semver/ranges/valid.js"(exports, module) {
"use strict";
init_shims();
var Range = require_range();
var validRange = (range, options) => {
try {
return new Range(range, options).range || "*";
} catch (er) {
return null;
}
};
module.exports = validRange;
}
});
// ../../node_modules/.pnpm/semver@7.5.4/node_modules/semver/ranges/outside.js
var require_outside = __commonJS({
"../../node_modules/.pnpm/semver@7.5.4/node_modules/semver/ranges/outside.js"(exports, module) {
"use strict";
init_shims();
var SemVer = require_semver();
var Comparator = require_comparator();
var { ANY } = Comparator;
var Range = require_range();
var satisfies = require_satisfies();
var gt = require_gt();
var lt = require_lt();
var lte = require_lte();
var gte = require_gte();
var outside = (version, range, hilo, options) => {
version = new SemVer(version, options);
range = new Range(range, options);
let gtfn, ltefn, ltfn, comp, ecomp;
switch (hilo) {
case ">":
gtfn = gt;
ltefn = lte;
ltfn = lt;
comp = ">";
ecomp = ">=";
break;
case "<":
gtfn = lt;
ltefn = gte;
ltfn = gt;
comp = "<";
ecomp = "<=";
break;
default:
throw new TypeError('Must provide a hilo val of "<" or ">"');
}
if (satisfies(version, range, options)) {
return false;
}
for (let i = 0; i < range.set.length; ++i) {
const comparators = range.set[i];
let high = null;
let low = null;
comparators.forEach((comparator) => {
if (comparator.semver === ANY) {
comparator = new Comparator(">=0.0.0");
}
high = high || comparator;
low = low || comparator;
if (gtfn(comparator.semver, high.semver, options)) {
high = comparator;
} else if (ltfn(comparator.semver, low.semver, options)) {
low = comparator;
}
});
if (high.operator === comp || high.operator === ecomp) {
return false;
}
if ((!low.operator || low.operator === comp) && ltefn(version, low.semver)) {
return false;
} else if (low.operator === ecomp && ltfn(version, low.semver)) {
return false;
}
}
return true;
};
module.exports = outside;
}
});
// ../../node_modules/.pnpm/semver@7.5.4/node_modules/semver/ranges/gtr.js
var require_gtr = __commonJS({
"../../node_modules/.pnpm/semver@7.5.4/node_modules/semver/ranges/gtr.js"(exports, module) {
"use strict";
init_shims();
var outside = require_outside();
var gtr = (version, range, options) => outside(version, range, ">", options);
module.exports = gtr;
}
});
// ../../node_modules/.pnpm/semver@7.5.4/node_modules/semver/ranges/ltr.js
var require_ltr = __commonJS({
"../../node_modules/.pnpm/semver@7.5.4/node_modules/semver/ranges/ltr.js"(exports, module) {
"use strict";
init_shims();
var outside = require_outside();
var ltr = (version, range, options) => outside(version, range, "<", options);
module.exports = ltr;
}
});
// ../../node_modules/.pnpm/semver@7.5.4/node_modules/semver/ranges/intersects.js
var require_intersects = __commonJS({
"../../node_modules/.pnpm/semver@7.5.4/node_modules/semver/ranges/intersects.js"(exports, module) {
"use strict";
init_shims();
var Range = require_range();
var intersects = (r1, r2, options) => {
r1 = new Range(r1, options);
r2 = new Range(r2, options);
return r1.intersects(r2, options);
};
module.exports = intersects;
}
});
// ../../node_modules/.pnpm/semver@7.5.4/node_modules/semver/ranges/simplify.js
var require_simplify = __commonJS({
"../../node_modules/.pnpm/semver@7.5.4/node_modules/semver/ranges/simplify.js"(exports, module) {
"use strict";
init_shims();
var satisfies = require_satisfies();
var compare = require_compare();
module.exports = (versions, range, options) => {
const set = [];
let first = null;
let prev = null;
const v = versions.sort((a, b) => compare(a, b, options));
for (const version of v) {
const included = satisfies(version, range, options);
if (included) {
prev = version;
if (!first) {
first = version;
}
} else {
if (prev) {
set.push([first, prev]);
}
prev = null;
first = null;
}
}
if (first) {
set.push([first, null]);
}
const ranges = [];
for (const [min, max] of set) {
if (min === max) {
ranges.push(min);
} else if (!max && min === v[0]) {
ranges.push("*");
} else if (!max) {
ranges.push(`>=${min}`);
} else if (min === v[0]) {
ranges.push(`<=${max}`);
} else {
ranges.push(`${min} - ${max}`);
}
}
const simplified = ranges.join(" || ");
const original = typeof range.raw === "string" ? range.raw : String(range);
return simplified.length < original.length ? simplified : range;
};
}
});
// ../../node_modules/.pnpm/semver@7.5.4/node_modules/semver/ranges/subset.js
var require_subset = __commonJS({
"../../node_modules/.pnpm/semver@7.5.4/node_modules/semver/ranges/subset.js"(exports, module) {
"use strict";
init_shims();
var Range = require_range();
var Comparator = require_comparator();
var { ANY } = Comparator;
var satisfies = require_satisfies();
var compare = require_compare();
var subset = (sub, dom, options = {}) => {
if (sub === dom) {
return true;
}
sub = new Range(sub, options);
dom = new Range(dom, options);
let sawNonNull = false;
OUTER: for (const simpleSub of sub.set) {
for (const simpleDom of dom.set) {
const isSub = simpleSubset(simpleSub, simpleDom, options);
sawNonNull = sawNonNull || isSub !== null;
if (isSub) {
continue OUTER;
}
}
if (sawNonNull) {
return false;
}
}
return true;
};
var minimumVersionWithPreRelease = [new Comparator(">=0.0.0-0")];
var minimumVersion = [new Comparator(">=0.0.0")];
var simpleSubset = (sub, dom, options) => {
if (sub === dom) {
return true;
}
if (sub.length === 1 && sub[0].semver === ANY) {
if (dom.length === 1 && dom[0].semver === ANY) {
return true;
} else if (options.includePrerelease) {
sub = minimumVersionWithPreRelease;
} else {
sub = minimumVersion;
}
}
if (dom.length === 1 && dom[0].semver === ANY) {
if (options.includePrerelease) {
return true;
} else {
dom = minimumVersion;
}
}
const eqSet = /* @__PURE__ */ new Set();
let gt, lt;
for (const c of sub) {
if (c.operator === ">" || c.operator === ">=") {
gt = higherGT(gt, c, options);
} else if (c.operator === "<" || c.operator === "<=") {
lt = lowerLT(lt, c, options);
} else {
eqSet.add(c.semver);
}
}
if (eqSet.size > 1) {
return null;
}
let gtltComp;
if (gt && lt) {
gtltComp = compare(gt.semver, lt.semver, options);
if (gtltComp > 0) {
return null;
} else if (gtltComp === 0 && (gt.operator !== ">=" || lt.operator !== "<=")) {
return null;
}
}
for (const eq of eqSet) {
if (gt && !satisfies(eq, String(gt), options)) {
return null;
}
if (lt && !satisfies(eq, String(lt), options)) {
return null;
}
for (const c of dom) {
if (!satisfies(eq, String(c), options)) {
return false;
}
}
return true;
}
let higher, lower;
let hasDomLT, hasDomGT;
let needDomLTPre = lt && !options.includePrerelease && lt.semver.prerelease.length ? lt.semver : false;
let needDomGTPre = gt && !options.includePrerelease && gt.semver.prerelease.length ? gt.semver : false;
if (needDomLTPre && needDomLTPre.prerelease.length === 1 && lt.operator === "<" && needDomLTPre.prerelease[0] === 0) {
needDomLTPre = false;
}
for (const c of dom) {
hasDomGT = hasDomGT || c.operator === ">" || c.operator === ">=";
hasDomLT = hasDomLT || c.operator === "<" || c.operator === "<=";
if (gt) {
if (needDomGTPre) {
if (c.semver.prerelease && c.semver.prerelease.length && c.semver.major === needDomGTPre.major && c.semver.minor === needDomGTPre.minor && c.semver.patch === needDomGTPre.patch) {
needDomGTPre = false;
}
}
if (c.operator === ">" || c.operator === ">=") {
higher = higherGT(gt, c, options);
if (higher === c && higher !== gt) {
return false;
}
} else if (gt.operator === ">=" && !satisfies(gt.semver, String(c), options)) {
return false;
}
}
if (lt) {
if (needDomLTPre) {
if (c.semver.prerelease && c.semver.prerelease.length && c.semver.major === needDomLTPre.major && c.semver.minor === needDomLTPre.minor && c.semver.patch === needDomLTPre.patch) {
needDomLTPre = false;
}
}
if (c.operator === "<" || c.operator === "<=") {
lower = lowerLT(lt, c, options);
if (lower === c && lower !== lt) {
return false;
}
} else if (lt.operator === "<=" && !satisfies(lt.semver, String(c), options)) {
return false;
}
}
if (!c.operator && (lt || gt) && gtltComp !== 0) {
return false;
}
}
if (gt && hasDomLT && !lt && gtltComp !== 0) {
return false;
}
if (lt && hasDomGT && !gt && gtltComp !== 0) {
return false;
}
if (needDomGTPre || needDomLTPre) {
return false;
}
return true;
};
var higherGT = (a, b, options) => {
if (!a) {
return b;
}
const comp = compare(a.semver, b.semver, options);
return comp > 0 ? a : comp < 0 ? b : b.operator === ">" && a.operator === ">=" ? b : a;
};
var lowerLT = (a, b, options) => {
if (!a) {
return b;
}
const comp = compare(a.semver, b.semver, options);
return comp < 0 ? a : comp > 0 ? b : b.operator === "<" && a.operator === "<=" ? b : a;
};
module.exports = subset;
}
});
// ../../node_modules/.pnpm/semver@7.5.4/node_modules/semver/index.js
var require_semver2 = __commonJS({
"../../node_modules/.pnpm/semver@7.5.4/node_modules/semver/index.js"(exports, module) {
"use strict";
init_shims();
var internalRe = require_re();
var constants = require_constants2();
var SemVer = require_semver();
var identifiers = require_identifiers();
var parse = require_parse();
var valid = require_valid();
var clean = require_clean();
var inc = require_inc();
var diff = require_diff();
var major = require_major();
var minor = require_minor();
var patch = require_patch();
var prerelease = require_prerelease();
var compare = require_compare();
var rcompare = require_rcompare();
var compareLoose = require_compare_loose();
var compareBuild = require_compare_build();
var sort = require_sort();
var rsort = require_rsort();
var gt = require_gt();
var lt = require_lt();
var eq = require_eq();
var neq = require_neq();
var gte = require_gte();
var lte = require_lte();
var cmp = require_cmp();
var coerce = require_coerce();
var Comparator = require_comparator();
var Range = require_range();
var satisfies = require_satisfies();
var toComparators = require_to_comparators();
var maxSatisfying = require_max_satisfying();
var minSatisfying = require_min_satisfying();
var minVersion = require_min_version();
var validRange = require_valid2();
var outside = require_outside();
var gtr = require_gtr();
var ltr = require_ltr();
var intersects = require_intersects();
var simplifyRange = require_simplify();
var subset = require_subset();
module.exports = {
parse,
valid,
clean,
inc,
diff,
major,
minor,
patch,
prerelease,
compare,
rcompare,
compareLoose,
compareBuild,
sort,
rsort,
gt,
lt,
eq,
neq,
gte,
lte,
cmp,
coerce,
Comparator,
Range,
satisfies,
toComparators,
maxSatisfying,
minSatisfying,
minVersion,
validRange,
outside,
gtr,
ltr,
intersects,
simplifyRange,
subset,
SemVer,
re: internalRe.re,
src: internalRe.src,
tokens: internalRe.t,
SEMVER_SPEC_VERSION: constants.SEMVER_SPEC_VERSION,
RELEASE_TYPES: constants.RELEASE_TYPES,
compareIdentifiers: identifiers.compareIdentifiers,
rcompareIdentifiers: identifiers.rcompareIdentifiers
};
}
});
// ../../node_modules/.pnpm/@typescript-eslint+utils@5.62.0_eslint@9.4.0_typescript@5.4.5/node_modules/@typescript-eslint/utils/dist/ts-eslint/RuleTester.js
var require_RuleTester = __commonJS({
"../../node_modules/.pnpm/@typescript-eslint+utils@5.62.0_eslint@9.4.0_typescript@5.4.5/node_modules/@typescript-eslint/utils/dist/ts-eslint/RuleTester.js"(exports) {
"use strict";
init_shims();
Object.defineProperty(exports, "__esModule", { value: true });
exports.RuleTester = void 0;
var eslint_1 = __require("eslint");
var RuleTester = class extends eslint_1.RuleTester {
};
exports.RuleTester = RuleTester;
}
});
// ../../node_modules/.pnpm/@typescript-eslint+utils@5.62.0_eslint@9.4.0_typescript@5.4.5/node_modules/@typescript-eslint/utils/dist/eslint-utils/rule-tester/dependencyConstraints.js
var require_dependencyConstraints = __commonJS({
"../../node_modules/.pnpm/@typescript-eslint+utils@5.62.0_eslint@9.4.0_typescript@5.4.5/node_modules/@typescript-eslint/utils/dist/eslint-utils/rule-tester/dependencyConstraints.js"(exports) {
"use strict";
init_shims();
var __createBinding2 = exports && exports.__createBinding || (Object.create ? function(o, m, k, k2) {
if (k2 === void 0) k2 = k;
var desc = Object.getOwnPropertyDescriptor(m, k);
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
desc = { enumerable: true, get: function() {
return m[k];
} };
}
Object.defineProperty(o, k2, desc);
} : function(o, m, k, k2) {
if (k2 === void 0) k2 = k;
o[k2] = m[k];
});
var __setModuleDefault2 = exports && exports.__setModuleDefault || (Object.create ? function(o, v) {
Object.defineProperty(o, "default", { enumerable: true, value: v });
} : function(o, v) {
o["default"] = v;
});
var __importStar2 = exports && exports.__importStar || function(mod) {
if (mod && mod.__esModule) return mod;
var result = {};
if (mod != null) {
for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding2(result, mod, k);
}
__setModuleDefault2(result, mod);
return result;
};
Object.defineProperty(exports, "__esModule", { value: true });
exports.satisfiesAllDependencyConstraints = void 0;
var semver = __importStar2(require_semver2());
var BASE_SATISFIES_OPTIONS = {
includePrerelease: true
};
function satisfiesDependencyConstraint(packageName, constraintIn) {
const constraint = typeof constraintIn === "string" ? {
range: `>=${constraintIn}`
} : constraintIn;
return semver.satisfies(__require(`${packageName}/package.json`).version, constraint.range, typeof constraint.options === "object" ? Object.assign(Object.assign({}, BASE_SATISFIES_OPTIONS), constraint.options) : constraint.options);
}
function satisfiesAllDependencyConstraints(dependencyConstraints) {
if (dependencyConstraints == null) {
return true;
}
for (const [packageName, constraint] of Object.entries(dependencyConstraints)) {
if (!satisfiesDependencyConstraint(packageName, constraint)) {
return false;
}
}
return true;
}
exports.satisfiesAllDependencyConstraints = satisfiesAllDependencyConstraints;
}
});
// ../../node_modules/.pnpm/@typescript-eslint+utils@5.62.0_eslint@9.4.0_typescript@5.4.5/node_modules/@typescript-eslint/utils/dist/eslint-utils/rule-tester/RuleTester.js
var require_RuleTester2 = __commonJS({
"../../node_modules/.pnpm/@typescript-eslint+utils@5.62.0_eslint@9.4.0_typescript@5.4.5/node_modules/@typescript-eslint/utils/dist/eslint-utils/rule-tester/RuleTester.js"(exports) {
"use strict";
init_shims();
var __createBinding2 = exports && exports.__createBinding || (Object.create ? function(o, m, k, k2) {
if (k2 === void 0) k2 = k;
var desc = Object.getOwnPropertyDescriptor(m, k);
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
desc = { enumerable: true, get: function() {
return m[k];
} };
}
Object.defineProperty(o, k2, desc);
} : function(o, m, k, k2) {
if (k2 === void 0) k2 = k;
o[k2] = m[k];
});
var __setModuleDefault2 = exports && exports.__setModuleDefault || (Object.create ? function(o, v) {
Object.defineProperty(o, "default", { enumerable: true, value: v });
} : function(o, v) {
o["default"] = v;
});
var __importStar2 = exports && exports.__importStar || function(mod) {
if (mod && mod.__esModule) return mod;
var result = {};
if (mod != null) {
for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding2(result, mod, k);
}
__setModuleDefault2(result, mod);
return result;
};
var __classPrivateFieldGet2 = exports && exports.__classPrivateFieldGet || function(receiver, state, kind, f) {
if (kind === "a" && !f) throw new TypeError("Private accessor was defined without a getter");
if (typeof state === "function" ? receiver !== state || !f : !state.has(receiver)) throw new TypeError("Cannot read private member from an object whose class did not declare it");
return kind === "m" ? f : kind === "a" ? f.call(receiver) : f ? f.value : state.get(receiver);
};
var __classPrivateFieldSet2 = exports && exports.__classPrivateFieldSet || function(receiver, state, value, kind, f) {
if (kind === "m") throw new TypeError("Private method is not writable");
if (kind === "a" && !f) throw new TypeError("Private accessor was defined without a setter");
if (typeof state === "function" ? receiver !== state || !f : !state.has(receiver)) throw new TypeError("Cannot write private member to an object whose class did not declare it");
return kind === "a" ? f.call(receiver, value) : f ? f.value = value : state.set(receiver, value), value;
};
var __rest2 = exports && exports.__rest || function(s, e) {
var t = {};
for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0)
t[p] = s[p];
if (s != null && typeof Object.getOwnPropertySymbols === "function")
for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) {
if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable.call(s, p[i]))
t[p[i]] = s[p[i]];
}
return t;
};
var __importDefault2 = exports && exports.__importDefault || function(mod) {
return mod && mod.__esModule ? mod : { "default": mod };
};
var _a;
var _RuleTester_baseOptions;
var _RuleTester_afterAll;
Object.defineProperty(exports, "__esModule", { value: true });
exports.RuleTester = exports.noFormat = void 0;
var assert_1 = __importDefault2(__require("assert"));
var package_json_1 = __require("eslint/package.json");
var path = __importStar2(__require("path"));
var semver = __importStar2(require_semver2());
var BaseRuleTester = __importStar2(require_RuleTester());
var deepMerge_1 = require_deepMerge();
var dependencyConstraints_1 = require_dependencyConstraints();
var TS_ESLINT_PARSER = "@typescript-eslint/parser";
var ERROR_MESSAGE = `Do not set the parser at the test level unless you want to use a parser other than ${TS_ESLINT_PARSER}`;
function isDescribeWithSkip(value) {
return typeof value === "object" && value != null && "skip" in value && typeof value.skip === "function";
}
var RuleTester = class extends BaseRuleTester.RuleTester {
/**
* If you supply a value to this property, the rule tester will call this instead of using the version defined on
* the global namespace.
*/
static get afterAll() {
var _b;
return (_b = __classPrivateFieldGet2(this, _a, "f", _RuleTester_afterAll)) !== null && _b !== void 0 ? _b : typeof afterAll === "function" ? afterAll : () => {
};
}
static set afterAll(value) {
__classPrivateFieldSet2(this, _a, value, "f", _RuleTester_afterAll);
}
get staticThis() {
return this.constructor;
}
constructor(baseOptions) {
var _b, _c;
const { dependencyConstraints: _ } = baseOptions, baseOptionsSafeForESLint = __rest2(baseOptions, ["dependencyConstraints"]);
super(Object.assign(Object.assign({}, baseOptionsSafeForESLint), {
parserOptions: Object.assign(Object.assign({}, baseOptions.parserOptions), { warnOnUnsupportedTypeScriptVersion: (_c = (_b = baseOptions.parserOptions) === null || _b === void 0 ? void 0 : _b.warnOnUnsupportedTypeScriptVersion) !== null && _c !== void 0 ? _c : false }),
// as of eslint 6 you have to provide an absolute path to the parser
// but that's not as clean to type, this saves us trying to manually enforce
// that contributors require.resolve everything
parser: __require.resolve(baseOptions.parser)
}));
_RuleTester_baseOptions.set(this, void 0);
__classPrivateFieldSet2(this, _RuleTester_baseOptions, baseOptions, "f");
this.staticThis.afterAll(() => {
try {
const parser = __require(TS_ESLINT_PARSER);
parser.clearCaches();
} catch (_b2) {
}
});
}
getFilename(testOptions) {
var _b;
const resolvedOptions = (0, deepMerge_1.deepMerge)(__classPrivateFieldGet2(this, _RuleTester_baseOptions, "f").parserOptions, testOptions);
const filename = `file.ts${((_b = resolvedOptions.ecmaFeatures) === null || _b === void 0 ? void 0 : _b.jsx) ? "x" : ""}`;
if (resolvedOptions.project) {
return path.join(resolvedOptions.tsconfigRootDir != null ? resolvedOptions.tsconfigRootDir : process.cwd(), filename);
}
return filename;
}
// as of eslint 6 you have to provide an absolute path to the parser
// If you don't do that at the test level, the test will fail somewhat cryptically...
// This is a lot more explicit
run(name, rule, testsReadonly) {
if (__classPrivateFieldGet2(this, _RuleTester_baseOptions, "f").dependencyConstraints && !(0, dependencyConstraints_1.satisfiesAllDependencyConstraints)(__classPrivateFieldGet2(this, _RuleTester_baseOptions, "f").dependencyConstraints)) {
if (isDescribeWithSkip(this.staticThis.describe)) {
this.staticThis.describe.skip(name, () => {
this.staticThis.it("All tests skipped due to unsatisfied constructor dependency constraints", () => {
});
});
} else {
this.staticThis.describe(name, () => {
this.staticThis.it("All tests skipped due to unsatisfied constructor dependency constraints", () => {
assert_1.default.equal(true, true);
});
});
}
return;
}
const tests = {
// standardize the valid tests as objects
valid: testsReadonly.valid.map((test2) => {
if (typeof test2 === "string") {
return {
code: test2
};
}
return test2;
}),
invalid: testsReadonly.invalid
};
const allTestsIterator = {
*[Symbol.iterator]() {
for (const test2 of tests.valid) {
yield test2;
}
for (const test2 of tests.invalid) {
yield test2;
}
}
};
const normalizeTest = (_b) => {
var { dependencyConstraints: _ } = _b, test2 = __rest2(_b, ["dependencyConstraints"]);
if (test2.parser === TS_ESLINT_PARSER) {
throw new Error(ERROR_MESSAGE);
}
if (!test2.filename) {
return Object.assign(Object.assign({}, test2), { filename: this.getFilename(test2.parserOptions) });
}
return test2;
};
tests.valid = tests.valid.map(normalizeTest);
tests.invalid = tests.invalid.map(normalizeTest);
const hasOnly = (() => {
for (const test2 of allTestsIterator) {
if (test2.only) {
return true;
}
}
return false;
})();
if (!hasOnly) {
const hasConstraints = (() => {
for (const test2 of allTestsIterator) {
if (test2.dependencyConstraints && Object.keys(test2.dependencyConstraints).length > 0) {
return true;
}
}
return false;
})();
if (hasConstraints) {
if (semver.satisfies(package_json_1.version, ">=7.29.0")) {
const maybeMarkAsOnly = (test2) => {
return Object.assign(Object.assign({}, test2), { only: (0, dependencyConstraints_1.satisfiesAllDependencyConstraints)(test2.dependencyConstraints) });
};
tests.valid = tests.valid.map(maybeMarkAsOnly);
tests.invalid = tests.invalid.map(maybeMarkAsOnly);
} else {
tests.valid = tests.valid.filter((test2) => (0, dependencyConstraints_1.satisfiesAllDependencyConstraints)(test2.dependencyConstraints));
tests.invalid = tests.invalid.filter((test2) => (0, dependencyConstraints_1.satisfiesAllDependencyConstraints)(test2.dependencyConstraints));
}
}
}
super.run(name, rule, tests);
}
};
exports.RuleTester = RuleTester;
_a = RuleTester, _RuleTester_baseOptions = /* @__PURE__ */ new WeakMap();
_RuleTester_afterAll = { value: void 0 };
function noFormat(raw, ...keys) {
return String.raw({ raw }, ...keys);
}
exports.noFormat = noFormat;
}
});
// ../../node_modules/.pnpm/@typescript-eslint+utils@5.62.0_eslint@9.4.0_typescript@5.4.5/node_modules/@typescript-eslint/utils/dist/eslint-utils/nullThrows.js
var require_nullThrows = __commonJS({
"../../node_modules/.pnpm/@typescript-eslint+utils@5.62.0_eslint@9.4.0_typescript@5.4.5/node_modules/@typescript-eslint/utils/dist/eslint-utils/nullThrows.js"(exports) {
"use strict";
init_shims();
Object.defineProperty(exports, "__esModule", { value: true });
exports.NullThrowsReasons = exports.nullThrows = void 0;
var NullThrowsReasons = {
MissingParent: "Expected node to have a parent.",
MissingToken: (token, thing) => `Expected to find a ${token} for the ${thing}.`
};
exports.NullThrowsReasons = NullThrowsReasons;
function nullThrows(value, message) {
if (value == null) {
throw new Error(`Non-null Assertion Failed: ${message}`);
}
return value;
}
exports.nullThrows = nullThrows;
}
});
// ../../node_modules/.pnpm/@typescript-eslint+utils@5.62.0_eslint@9.4.0_typescript@5.4.5/node_modules/@typescript-eslint/utils/dist/eslint-utils/index.js
var require_eslint_utils3 = __commonJS({
"../../node_modules/.pnpm/@typescript-eslint+utils@5.62.0_eslint@9.4.0_typescript@5.4.5/node_modules/@typescript-eslint/utils/dist/eslint-utils/index.js"(exports) {
"use strict";
init_shims();
var __createBinding2 = exports && exports.__createBinding || (Object.create ? function(o, m, k, k2) {
if (k2 === void 0) k2 = k;
var desc = Object.getOwnPropertyDescriptor(m, k);
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
desc = { enumerable: true, get: function() {
return m[k];
} };
}
Object.defineProperty(o, k2, desc);
} : function(o, m, k, k2) {
if (k2 === void 0) k2 = k;
o[k2] = m[k];
});
var __exportStar2 = exports && exports.__exportStar || function(m, exports2) {
for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports2, p)) __createBinding2(exports2, m, p);
};
Object.defineProperty(exports, "__esModule", { value: true });
__exportStar2(require_applyDefault(), exports);
__exportStar2(require_batchedSingleLineTests(), exports);
__exportStar2(require_getParserServices(), exports);
__exportStar2(require_InferTypesFromRule(), exports);
__exportStar2(require_RuleCreator(), exports);
__exportStar2(require_RuleTester2(), exports);
__exportStar2(require_deepMerge(), exports);
__exportStar2(require_nullThrows(), exports);
}
});
// ../../node_modules/.pnpm/@typescript-eslint+utils@5.62.0_eslint@9.4.0_typescript@5.4.5/node_modules/@typescript-eslint/utils/dist/json-schema.js
var require_json_schema = __commonJS({
"../../node_modules/.pnpm/@typescript-eslint+utils@5.62.0_eslint@9.4.0_typescript@5.4.5/node_modules/@typescript-eslint/utils/dist/json-schema.js"(exports) {
"use strict";
init_shims();
Object.defineProperty(exports, "__esModule", { value: true });
}
});
// ../../node_modules/.pnpm/@typescript-eslint+utils@5.62.0_eslint@9.4.0_typescript@5.4.5/node_modules/@typescript-eslint/utils/dist/ts-eslint/AST.js
var require_AST = __commonJS({
"../../node_modules/.pnpm/@typescript-eslint+utils@5.62.0_eslint@9.4.0_typescript@5.4.5/node_modules/@typescript-eslint/utils/dist/ts-eslint/AST.js"(exports) {
"use strict";
init_shims();
Object.defineProperty(exports, "__esModule", { value: true });
}
});
// ../../node_modules/.pnpm/@typescript-eslint+utils@5.62.0_eslint@9.4.0_typescript@5.4.5/node_modules/@typescript-eslint/utils/dist/ts-eslint/CLIEngine.js
var require_CLIEngine = __commonJS({
"../../node_modules/.pnpm/@typescript-eslint+utils@5.62.0_eslint@9.4.0_typescript@5.4.5/node_modules/@typescript-eslint/utils/dist/ts-eslint/CLIEngine.js"(exports) {
"use strict";
init_shims();
Object.defineProperty(exports, "__esModule", { value: true });
exports.CLIEngine = void 0;
var eslint_1 = __require("eslint");
var CLIEngine = eslint_1.CLIEngine ? class CLIEngine extends eslint_1.CLIEngine {
} : void 0;
exports.CLIEngine = CLIEngine;
}
});
// ../../node_modules/.pnpm/@typescript-eslint+utils@5.62.0_eslint@9.4.0_typescript@5.4.5/node_modules/@typescript-eslint/utils/dist/ts-eslint/ESLint.js
var require_ESLint = __commonJS({
"../../node_modules/.pnpm/@typescript-eslint+utils@5.62.0_eslint@9.4.0_typescript@5.4.5/node_modules/@typescript-eslint/utils/dist/ts-eslint/ESLint.js"(exports) {
"use strict";
init_shims();
Object.defineProperty(exports, "__esModule", { value: true });
exports.ESLint = void 0;
var eslint_1 = __require("eslint");
var _ESLint = eslint_1.ESLint !== null && eslint_1.ESLint !== void 0 ? eslint_1.ESLint : function() {
throw new Error("Attempted to construct an ESLint instance on less than ESLint v7.0.0");
};
var ESLint = class extends _ESLint {
};
exports.ESLint = ESLint;
}
});
// ../../node_modules/.pnpm/@typescript-eslint+utils@5.62.0_eslint@9.4.0_typescript@5.4.5/node_modules/@typescript-eslint/utils/dist/ts-eslint/Linter.js
var require_Linter = __commonJS({
"../../node_modules/.pnpm/@typescript-eslint+utils@5.62.0_eslint@9.4.0_typescript@5.4.5/node_modules/@typescript-eslint/utils/dist/ts-eslint/Linter.js"(exports) {
"use strict";
init_shims();
Object.defineProperty(exports, "__esModule", { value: true });
exports.Linter = void 0;
var eslint_1 = __require("eslint");
var Linter = class extends eslint_1.Linter {
};
exports.Linter = Linter;
}
});
// ../../node_modules/.pnpm/@typescript-eslint+utils@5.62.0_eslint@9.4.0_typescript@5.4.5/node_modules/@typescript-eslint/utils/dist/ts-eslint/ParserOptions.js
var require_ParserOptions = __commonJS({
"../../node_modules/.pnpm/@typescript-eslint+utils@5.62.0_eslint@9.4.0_typescript@5.4.5/node_modules/@typescript-eslint/utils/dist/ts-eslint/ParserOptions.js"(exports) {
"use strict";
init_shims();
Object.defineProperty(exports, "__esModule", { value: true });
}
});
// ../../node_modules/.pnpm/@typescript-eslint+utils@5.62.0_eslint@9.4.0_typescript@5.4.5/node_modules/@typescript-eslint/utils/dist/ts-eslint/Rule.js
var require_Rule = __commonJS({
"../../node_modules/.pnpm/@typescript-eslint+utils@5.62.0_eslint@9.4.0_typescript@5.4.5/node_modules/@typescript-eslint/utils/dist/ts-eslint/Rule.js"(exports) {
"use strict";
init_shims();
Object.defineProperty(exports, "__esModule", { value: true });
}
});
// ../../node_modules/.pnpm/@typescript-eslint+visitor-keys@5.62.0/node_modules/@typescript-eslint/visitor-keys/dist/get-keys.js
var require_get_keys = __commonJS({
"../../node_modules/.pnpm/@typescript-eslint+visitor-keys@5.62.0/node_modules/@typescript-eslint/visitor-keys/dist/get-keys.js"(exports) {
"use strict";
init_shims();
Object.defineProperty(exports, "__esModule", { value: true });
exports.getKeys = void 0;
var eslint_visitor_keys_1 = require_eslint_visitor_keys();
var getKeys = eslint_visitor_keys_1.getKeys;
exports.getKeys = getKeys;
}
});
// ../../node_modules/.pnpm/@typescript-eslint+visitor-keys@5.62.0/node_modules/@typescript-eslint/visitor-keys/dist/visitor-keys.js
var require_visitor_keys = __commonJS({
"../../node_modules/.pnpm/@typescript-eslint+visitor-keys@5.62.0/node_modules/@typescript-eslint/visitor-keys/dist/visitor-keys.js"(exports) {
"use strict";
init_shims();
var __createBinding2 = exports && exports.__createBinding || (Object.create ? function(o, m, k, k2) {
if (k2 === void 0) k2 = k;
var desc = Object.getOwnPropertyDescriptor(m, k);
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
desc = { enumerable: true, get: function() {
return m[k];
} };
}
Object.defineProperty(o, k2, desc);
} : function(o, m, k, k2) {
if (k2 === void 0) k2 = k;
o[k2] = m[k];
});
var __setModuleDefault2 = exports && exports.__setModuleDefault || (Object.create ? function(o, v) {
Object.defineProperty(o, "default", { enumerable: true, value: v });
} : function(o, v) {
o["default"] = v;
});
var __importStar2 = exports && exports.__importStar || function(mod) {
if (mod && mod.__esModule) return mod;
var result = {};
if (mod != null) {
for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding2(result, mod, k);
}
__setModuleDefault2(result, mod);
return result;
};
Object.defineProperty(exports, "__esModule", { value: true });
exports.visitorKeys = void 0;
var eslintVisitorKeys = __importStar2(require_eslint_visitor_keys());
var SharedVisitorKeys = (() => {
const FunctionType = ["typeParameters", "params", "returnType"];
const AnonymousFunction = [...FunctionType, "body"];
const AbstractPropertyDefinition = [
"decorators",
"key",
"typeAnnotation"
];
return {
AnonymousFunction,
Function: ["id", ...AnonymousFunction],
FunctionType,
ClassDeclaration: [
"decorators",
"id",
"typeParameters",
"superClass",
"superTypeParameters",
"implements",
"body"
],
AbstractPropertyDefinition: ["decorators", "key", "typeAnnotation"],
PropertyDefinition: [...AbstractPropertyDefinition, "value"],
TypeAssertion: ["expression", "typeAnnotation"]
};
})();
var additionalKeys = {
AccessorProperty: SharedVisitorKeys.PropertyDefinition,
ArrayPattern: ["decorators", "elements", "typeAnnotation"],
ArrowFunctionExpression: SharedVisitorKeys.AnonymousFunction,
AssignmentPattern: ["decorators", "left", "right", "typeAnnotation"],
CallExpression: ["callee", "typeParameters", "arguments"],
ClassDeclaration: SharedVisitorKeys.ClassDeclaration,
ClassExpression: SharedVisitorKeys.ClassDeclaration,
Decorator: ["expression"],
ExportAllDeclaration: ["exported", "source", "assertions"],
ExportNamedDeclaration: ["declaration", "specifiers", "source", "assertions"],
FunctionDeclaration: SharedVisitorKeys.Function,
FunctionExpression: SharedVisitorKeys.Function,
Identifier: ["decorators", "typeAnnotation"],
ImportAttribute: ["key", "value"],
ImportDeclaration: ["specifiers", "source", "assertions"],
ImportExpression: ["source", "attributes"],
JSXClosingFragment: [],
JSXOpeningElement: ["name", "typeParameters", "attributes"],
JSXOpeningFragment: [],
JSXSpreadChild: ["expression"],
MethodDefinition: ["decorators", "key", "value", "typeParameters"],
NewExpression: ["callee", "typeParameters", "arguments"],
ObjectPattern: ["decorators", "properties", "typeAnnotation"],
PropertyDefinition: SharedVisitorKeys.PropertyDefinition,
RestElement: ["decorators", "argument", "typeAnnotation"],
StaticBlock: ["body"],
TaggedTemplateExpression: ["tag", "typeParameters", "quasi"],
TSAbstractAccessorProperty: SharedVisitorKeys.AbstractPropertyDefinition,
TSAbstractKeyword: [],
TSAbstractMethodDefinition: ["key", "value"],
TSAbstractPropertyDefinition: SharedVisitorKeys.AbstractPropertyDefinition,
TSAnyKeyword: [],
TSArrayType: ["elementType"],
TSAsExpression: SharedVisitorKeys.TypeAssertion,
TSAsyncKeyword: [],
TSBigIntKeyword: [],
TSBooleanKeyword: [],
TSCallSignatureDeclaration: SharedVisitorKeys.FunctionType,
TSClassImplements: ["expression", "typeParameters"],
TSConditionalType: ["checkType", "extendsType", "trueType", "falseType"],
TSConstructorType: SharedVisitorKeys.FunctionType,
TSConstructSignatureDeclaration: SharedVisitorKeys.FunctionType,
TSDeclareFunction: SharedVisitorKeys.Function,
TSDeclareKeyword: [],
TSEmptyBodyFunctionExpression: ["id", ...SharedVisitorKeys.FunctionType],
TSEnumDeclaration: ["id", "members"],
TSEnumMember: ["id", "initializer"],
TSExportAssignment: ["expression"],
TSExportKeyword: [],
TSExternalModuleReference: ["expression"],
TSFunctionType: SharedVisitorKeys.FunctionType,
TSImportEqualsDeclaration: ["id", "moduleReference"],
TSImportType: ["parameter", "qualifier", "typeParameters"],
TSIndexedAccessType: ["indexType", "objectType"],
TSIndexSignature: ["parameters", "typeAnnotation"],
TSInferType: ["typeParameter"],
TSInstantiationExpression: ["expression", "typeParameters"],
TSInterfaceBody: ["body"],
TSInterfaceDeclaration: ["id", "typeParameters", "extends", "body"],
TSInterfaceHeritage: ["expression", "typeParameters"],
TSIntersectionType: ["types"],
TSIntrinsicKeyword: [],
TSLiteralType: ["literal"],
TSMappedType: ["nameType", "typeParameter", "typeAnnotation"],
TSMethodSignature: ["typeParameters", "key", "params", "returnType"],
TSModuleBlock: ["body"],
TSModuleDeclaration: ["id", "body"],
TSNamedTupleMember: ["label", "elementType"],
TSNamespaceExportDeclaration: ["id"],
TSNeverKeyword: [],
TSNonNullExpression: ["expression"],
TSNullKeyword: [],
TSNumberKeyword: [],
TSObjectKeyword: [],
TSOptionalType: ["typeAnnotation"],
TSParameterProperty: ["decorators", "parameter"],
TSPrivateKeyword: [],
TSPropertySignature: ["typeAnnotation", "key", "initializer"],
TSProtectedKeyword: [],
TSPublicKeyword: [],
TSQualifiedName: ["left", "right"],
TSReadonlyKeyword: [],
TSRestType: ["typeAnnotation"],
TSSatisfiesExpression: [
// this is intentionally different to SharedVisitorKeys.TypeAssertion because
// the type annotation comes first in the source code
"typeAnnotation",
"expression"
],
TSStaticKeyword: [],
TSStringKeyword: [],
TSSymbolKeyword: [],
TSTemplateLiteralType: ["quasis", "types"],
TSThisType: [],
TSTupleType: ["elementTypes"],
TSTypeAliasDeclaration: ["id", "typeParameters", "typeAnnotation"],
TSTypeAnnotation: ["typeAnnotation"],
TSTypeAssertion: SharedVisitorKeys.TypeAssertion,
TSTypeLiteral: ["members"],
TSTypeOperator: ["typeAnnotation"],
TSTypeParameter: ["name", "constraint", "default"],
TSTypeParameterDeclaration: ["params"],
TSTypeParameterInstantiation: ["params"],
TSTypePredicate: ["typeAnnotation", "parameterName"],
TSTypeQuery: ["exprName", "typeParameters"],
TSTypeReference: ["typeName", "typeParameters"],
TSUndefinedKeyword: [],
TSUnionType: ["types"],
TSUnknownKeyword: [],
TSVoidKeyword: []
};
var visitorKeys = eslintVisitorKeys.unionWith(additionalKeys);
exports.visitorKeys = visitorKeys;
}
});
// ../../node_modules/.pnpm/@typescript-eslint+visitor-keys@5.62.0/node_modules/@typescript-eslint/visitor-keys/dist/index.js
var require_dist3 = __commonJS({
"../../node_modules/.pnpm/@typescript-eslint+visitor-keys@5.62.0/node_modules/@typescript-eslint/visitor-keys/dist/index.js"(exports) {
"use strict";
init_shims();
Object.defineProperty(exports, "__esModule", { value: true });
exports.visitorKeys = exports.getKeys = void 0;
var get_keys_1 = require_get_keys();
Object.defineProperty(exports, "getKeys", { enumerable: true, get: function() {
return get_keys_1.getKeys;
} });
var visitor_keys_1 = require_visitor_keys();
Object.defineProperty(exports, "visitorKeys", { enumerable: true, get: function() {
return visitor_keys_1.visitorKeys;
} });
}
});
// ../../node_modules/.pnpm/@typescript-eslint+scope-manager@5.62.0/node_modules/@typescript-eslint/scope-manager/dist/lib/base-config.js
var require_base_config = __commonJS({
"../../node_modules/.pnpm/@typescript-eslint+scope-manager@5.62.0/node_modules/@typescript-eslint/scope-manager/dist/lib/base-config.js"(exports) {
"use strict";
init_shims();
Object.defineProperty(exports, "__esModule", { value: true });
exports.TYPE_VALUE = exports.VALUE = exports.TYPE = void 0;
exports.TYPE = Object.freeze({
eslintImplicitGlobalSetting: "readonly",
isTypeVariable: true,
isValueVariable: false
});
exports.VALUE = Object.freeze({
eslintImplicitGlobalSetting: "readonly",
isTypeVariable: false,
isValueVariable: true
});
exports.TYPE_VALUE = Object.freeze({
eslintImplicitGlobalSetting: "readonly",
isTypeVariable: true,
isValueVariable: true
});
}
});
// ../../node_modules/.pnpm/@typescript-eslint+scope-manager@5.62.0/node_modules/@typescript-eslint/scope-manager/dist/lib/decorators.js
var require_decorators = __commonJS({
"../../node_modules/.pnpm/@typescript-eslint+scope-manager@5.62.0/node_modules/@typescript-eslint/scope-manager/dist/lib/decorators.js"(exports) {
"use strict";
init_shims();
Object.defineProperty(exports, "__esModule", { value: true });
exports.decorators = void 0;
var base_config_1 = require_base_config();
exports.decorators = {
ClassMemberDecoratorContext: base_config_1.TYPE,
DecoratorContext: base_config_1.TYPE,
ClassDecoratorContext: base_config_1.TYPE,
ClassMethodDecoratorContext: base_config_1.TYPE,
ClassGetterDecoratorContext: base_config_1.TYPE,
ClassSetterDecoratorContext: base_config_1.TYPE,
ClassAccessorDecoratorContext: base_config_1.TYPE,
ClassAccessorDecoratorTarget: base_config_1.TYPE,
ClassAccessorDecoratorResult: base_config_1.TYPE,
ClassFieldDecoratorContext: base_config_1.TYPE
};
}
});
// ../../node_modules/.pnpm/@typescript-eslint+scope-manager@5.62.0/node_modules/@typescript-eslint/scope-manager/dist/lib/decorators.legacy.js
var require_decorators_legacy = __commonJS({
"../../node_modules/.pnpm/@typescript-eslint+scope-manager@5.62.0/node_modules/@typescript-eslint/scope-manager/dist/lib/decorators.legacy.js"(exports) {
"use strict";
init_shims();
Object.defineProperty(exports, "__esModule", { value: true });
exports.decorators_legacy = void 0;
var base_config_1 = require_base_config();
exports.decorators_legacy = {
ClassDecorator: base_config_1.TYPE,
PropertyDecorator: base_config_1.TYPE,
MethodDecorator: base_config_1.TYPE,
ParameterDecorator: base_config_1.TYPE
};
}
});
// ../../node_modules/.pnpm/@typescript-eslint+scope-manager@5.62.0/node_modules/@typescript-eslint/scope-manager/dist/lib/dom.js
var require_dom = __commonJS({
"../../node_modules/.pnpm/@typescript-eslint+scope-manager@5.62.0/node_modules/@typescript-eslint/scope-manager/dist/lib/dom.js"(exports) {
"use strict";
init_shims();
Object.defineProperty(exports, "__esModule", { value: true });
exports.dom = void 0;
var base_config_1 = require_base_config();
exports.dom = {
AddEventListenerOptions: base_config_1.TYPE,
AesCbcParams: base_config_1.TYPE,
AesCtrParams: base_config_1.TYPE,
AesDerivedKeyParams: base_config_1.TYPE,
AesGcmParams: base_config_1.TYPE,
AesKeyAlgorithm: base_config_1.TYPE,
AesKeyGenParams: base_config_1.TYPE,
Algorithm: base_config_1.TYPE,
AnalyserOptions: base_config_1.TYPE,
AnimationEventInit: base_config_1.TYPE,
AnimationPlaybackEventInit: base_config_1.TYPE,
AssignedNodesOptions: base_config_1.TYPE,
AudioBufferOptions: base_config_1.TYPE,
AudioBufferSourceOptions: base_config_1.TYPE,
AudioConfiguration: base_config_1.TYPE,
AudioContextOptions: base_config_1.TYPE,
AudioNodeOptions: base_config_1.TYPE,
AudioProcessingEventInit: base_config_1.TYPE,
AudioTimestamp: base_config_1.TYPE,
AudioWorkletNodeOptions: base_config_1.TYPE,
AuthenticationExtensionsClientInputs: base_config_1.TYPE,
AuthenticationExtensionsClientOutputs: base_config_1.TYPE,
AuthenticatorSelectionCriteria: base_config_1.TYPE,
BiquadFilterOptions: base_config_1.TYPE,
BlobEventInit: base_config_1.TYPE,
BlobPropertyBag: base_config_1.TYPE,
CSSStyleSheetInit: base_config_1.TYPE,
CacheQueryOptions: base_config_1.TYPE,
CanvasRenderingContext2DSettings: base_config_1.TYPE,
ChannelMergerOptions: base_config_1.TYPE,
ChannelSplitterOptions: base_config_1.TYPE,
CheckVisibilityOptions: base_config_1.TYPE,
ClientQueryOptions: base_config_1.TYPE,
ClipboardEventInit: base_config_1.TYPE,
ClipboardItemOptions: base_config_1.TYPE,
CloseEventInit: base_config_1.TYPE,
CompositionEventInit: base_config_1.TYPE,
ComputedEffectTiming: base_config_1.TYPE,
ComputedKeyframe: base_config_1.TYPE,
ConstantSourceOptions: base_config_1.TYPE,
ConstrainBooleanParameters: base_config_1.TYPE,
ConstrainDOMStringParameters: base_config_1.TYPE,
ConstrainDoubleRange: base_config_1.TYPE,
ConstrainULongRange: base_config_1.TYPE,
ConvolverOptions: base_config_1.TYPE,
CredentialCreationOptions: base_config_1.TYPE,
CredentialPropertiesOutput: base_config_1.TYPE,
CredentialRequestOptions: base_config_1.TYPE,
CryptoKeyPair: base_config_1.TYPE,
CustomEventInit: base_config_1.TYPE,
DOMMatrix2DInit: base_config_1.TYPE,
DOMMatrixInit: base_config_1.TYPE,
DOMPointInit: base_config_1.TYPE,
DOMQuadInit: base_config_1.TYPE,
DOMRectInit: base_config_1.TYPE,
DelayOptions: base_config_1.TYPE,
DeviceMotionEventAccelerationInit: base_config_1.TYPE,
DeviceMotionEventInit: base_config_1.TYPE,
DeviceMotionEventRotationRateInit: base_config_1.TYPE,
DeviceOrientationEventInit: base_config_1.TYPE,
DisplayMediaStreamOptions: base_config_1.TYPE,
DocumentTimelineOptions: base_config_1.TYPE,
DoubleRange: base_config_1.TYPE,
DragEventInit: base_config_1.TYPE,
DynamicsCompressorOptions: base_config_1.TYPE,
EcKeyAlgorithm: base_config_1.TYPE,
EcKeyGenParams: base_config_1.TYPE,
EcKeyImportParams: base_config_1.TYPE,
EcdhKeyDeriveParams: base_config_1.TYPE,
EcdsaParams: base_config_1.TYPE,
EffectTiming: base_config_1.TYPE,
ElementCreationOptions: base_config_1.TYPE,
ElementDefinitionOptions: base_config_1.TYPE,
ErrorEventInit: base_config_1.TYPE,
EventInit: base_config_1.TYPE,
EventListenerOptions: base_config_1.TYPE,
EventModifierInit: base_config_1.TYPE,
EventSourceInit: base_config_1.TYPE,
FilePropertyBag: base_config_1.TYPE,
FileSystemFlags: base_config_1.TYPE,
FileSystemGetDirectoryOptions: base_config_1.TYPE,
FileSystemGetFileOptions: base_config_1.TYPE,
FileSystemRemoveOptions: base_config_1.TYPE,
FocusEventInit: base_config_1.TYPE,
FocusOptions: base_config_1.TYPE,
FontFaceDescriptors: base_config_1.TYPE,
FontFaceSetLoadEventInit: base_config_1.TYPE,
FormDataEventInit: base_config_1.TYPE,
FullscreenOptions: base_config_1.TYPE,
GainOptions: base_config_1.TYPE,
GamepadEventInit: base_config_1.TYPE,
GetAnimationsOptions: base_config_1.TYPE,
GetNotificationOptions: base_config_1.TYPE,
GetRootNodeOptions: base_config_1.TYPE,
HashChangeEventInit: base_config_1.TYPE,
HkdfParams: base_config_1.TYPE,
HmacImportParams: base_config_1.TYPE,
HmacKeyAlgorithm: base_config_1.TYPE,
HmacKeyGenParams: base_config_1.TYPE,
IDBDatabaseInfo: base_config_1.TYPE,
IDBIndexParameters: base_config_1.TYPE,
IDBObjectStoreParameters: base_config_1.TYPE,
IDBTransactionOptions: base_config_1.TYPE,
IDBVersionChangeEventInit: base_config_1.TYPE,
IIRFilterOptions: base_config_1.TYPE,
IdleRequestOptions: base_config_1.TYPE,
ImageBitmapOptions: base_config_1.TYPE,
ImageBitmapRenderingContextSettings: base_config_1.TYPE,
ImageDataSettings: base_config_1.TYPE,
ImageEncodeOptions: base_config_1.TYPE,
ImportMeta: base_config_1.TYPE,
InputEventInit: base_config_1.TYPE,
IntersectionObserverEntryInit: base_config_1.TYPE,
IntersectionObserverInit: base_config_1.TYPE,
JsonWebKey: base_config_1.TYPE,
KeyAlgorithm: base_config_1.TYPE,
KeyboardEventInit: base_config_1.TYPE,
Keyframe: base_config_1.TYPE,
KeyframeAnimationOptions: base_config_1.TYPE,
KeyframeEffectOptions: base_config_1.TYPE,
LockInfo: base_config_1.TYPE,
LockManagerSnapshot: base_config_1.TYPE,
LockOptions: base_config_1.TYPE,
MIDIConnectionEventInit: base_config_1.TYPE,
MIDIMessageEventInit: base_config_1.TYPE,
MIDIOptions: base_config_1.TYPE,
MediaCapabilitiesDecodingInfo: base_config_1.TYPE,
MediaCapabilitiesEncodingInfo: base_config_1.TYPE,
MediaCapabilitiesInfo: base_config_1.TYPE,
MediaConfiguration: base_config_1.TYPE,
MediaDecodingConfiguration: base_config_1.TYPE,
MediaElementAudioSourceOptions: base_config_1.TYPE,
MediaEncodingConfiguration: base_config_1.TYPE,
MediaEncryptedEventInit: base_config_1.TYPE,
MediaImage: base_config_1.TYPE,
MediaKeyMessageEventInit: base_config_1.TYPE,
MediaKeySystemConfiguration: base_config_1.TYPE,
MediaKeySystemMediaCapability: base_config_1.TYPE,
MediaMetadataInit: base_config_1.TYPE,
MediaPositionState: base_config_1.TYPE,
MediaQueryListEventInit: base_config_1.TYPE,
MediaRecorderOptions: base_config_1.TYPE,
MediaSessionActionDetails: base_config_1.TYPE,
MediaStreamAudioSourceOptions: base_config_1.TYPE,
MediaStreamConstraints: base_config_1.TYPE,
MediaStreamTrackEventInit: base_config_1.TYPE,
MediaTrackCapabilities: base_config_1.TYPE,
MediaTrackConstraintSet: base_config_1.TYPE,
MediaTrackConstraints: base_config_1.TYPE,
MediaTrackSettings: base_config_1.TYPE,
MediaTrackSupportedConstraints: base_config_1.TYPE,
MessageEventInit: base_config_1.TYPE,
MouseEventInit: base_config_1.TYPE,
MultiCacheQueryOptions: base_config_1.TYPE,
MutationObserverInit: base_config_1.TYPE,
NavigationPreloadState: base_config_1.TYPE,
NotificationAction: base_config_1.TYPE,
NotificationOptions: base_config_1.TYPE,
OfflineAudioCompletionEventInit: base_config_1.TYPE,
OfflineAudioContextOptions: base_config_1.TYPE,
OptionalEffectTiming: base_config_1.TYPE,
OscillatorOptions: base_config_1.TYPE,
PageTransitionEventInit: base_config_1.TYPE,
PannerOptions: base_config_1.TYPE,
PaymentCurrencyAmount: base_config_1.TYPE,
PaymentDetailsBase: base_config_1.TYPE,
PaymentDetailsInit: base_config_1.TYPE,
PaymentDetailsModifier: base_config_1.TYPE,
PaymentDetailsUpdate: base_config_1.TYPE,
PaymentItem: base_config_1.TYPE,
PaymentMethodChangeEventInit: base_config_1.TYPE,
PaymentMethodData: base_config_1.TYPE,
PaymentRequestUpdateEventInit: base_config_1.TYPE,
PaymentValidationErrors: base_config_1.TYPE,
Pbkdf2Params: base_config_1.TYPE,
PerformanceMarkOptions: base_config_1.TYPE,
PerformanceMeasureOptions: base_config_1.TYPE,
PerformanceObserverInit: base_config_1.TYPE,
PeriodicWaveConstraints: base_config_1.TYPE,
PeriodicWaveOptions: base_config_1.TYPE,
PermissionDescriptor: base_config_1.TYPE,
PictureInPictureEventInit: base_config_1.TYPE,
PointerEventInit: base_config_1.TYPE,
PopStateEventInit: base_config_1.TYPE,
PositionOptions: base_config_1.TYPE,
ProgressEventInit: base_config_1.TYPE,
PromiseRejectionEventInit: base_config_1.TYPE,
PropertyIndexedKeyframes: base_config_1.TYPE,
PublicKeyCredentialCreationOptions: base_config_1.TYPE,
PublicKeyCredentialDescriptor: base_config_1.TYPE,
PublicKeyCredentialEntity: base_config_1.TYPE,
PublicKeyCredentialParameters: base_config_1.TYPE,
PublicKeyCredentialRequestOptions: base_config_1.TYPE,
PublicKeyCredentialRpEntity: base_config_1.TYPE,
PublicKeyCredentialUserEntity: base_config_1.TYPE,
PushSubscriptionJSON: base_config_1.TYPE,
PushSubscriptionOptionsInit: base_config_1.TYPE,
QueuingStrategy: base_config_1.TYPE,
QueuingStrategyInit: base_config_1.TYPE,
RTCAnswerOptions: base_config_1.TYPE,
RTCCertificateExpiration: base_config_1.TYPE,
RTCConfiguration: base_config_1.TYPE,
RTCDTMFToneChangeEventInit: base_config_1.TYPE,
RTCDataChannelEventInit: base_config_1.TYPE,
RTCDataChannelInit: base_config_1.TYPE,
RTCDtlsFingerprint: base_config_1.TYPE,
RTCEncodedAudioFrameMetadata: base_config_1.TYPE,
RTCEncodedVideoFrameMetadata: base_config_1.TYPE,
RTCErrorEventInit: base_config_1.TYPE,
RTCErrorInit: base_config_1.TYPE,
RTCIceCandidateInit: base_config_1.TYPE,
RTCIceCandidatePairStats: base_config_1.TYPE,
RTCIceServer: base_config_1.TYPE,
RTCInboundRtpStreamStats: base_config_1.TYPE,
RTCLocalSessionDescriptionInit: base_config_1.TYPE,
RTCOfferAnswerOptions: base_config_1.TYPE,
RTCOfferOptions: base_config_1.TYPE,
RTCOutboundRtpStreamStats: base_config_1.TYPE,
RTCPeerConnectionIceErrorEventInit: base_config_1.TYPE,
RTCPeerConnectionIceEventInit: base_config_1.TYPE,
RTCReceivedRtpStreamStats: base_config_1.TYPE,
RTCRtcpParameters: base_config_1.TYPE,
RTCRtpCapabilities: base_config_1.TYPE,
RTCRtpCodecCapability: base_config_1.TYPE,
RTCRtpCodecParameters: base_config_1.TYPE,
RTCRtpCodingParameters: base_config_1.TYPE,
RTCRtpContributingSource: base_config_1.TYPE,
RTCRtpEncodingParameters: base_config_1.TYPE,
RTCRtpHeaderExtensionCapability: base_config_1.TYPE,
RTCRtpHeaderExtensionParameters: base_config_1.TYPE,
RTCRtpParameters: base_config_1.TYPE,
RTCRtpReceiveParameters: base_config_1.TYPE,
RTCRtpSendParameters: base_config_1.TYPE,
RTCRtpStreamStats: base_config_1.TYPE,
RTCRtpSynchronizationSource: base_config_1.TYPE,
RTCRtpTransceiverInit: base_config_1.TYPE,
RTCSentRtpStreamStats: base_config_1.TYPE,
RTCSessionDescriptionInit: base_config_1.TYPE,
RTCStats: base_config_1.TYPE,
RTCTrackEventInit: base_config_1.TYPE,
RTCTransportStats: base_config_1.TYPE,
ReadableStreamGetReaderOptions: base_config_1.TYPE,
ReadableStreamReadDoneResult: base_config_1.TYPE,
ReadableStreamReadValueResult: base_config_1.TYPE,
ReadableWritablePair: base_config_1.TYPE,
RegistrationOptions: base_config_1.TYPE,
RequestInit: base_config_1.TYPE,
ResizeObserverOptions: base_config_1.TYPE,
ResponseInit: base_config_1.TYPE,
RsaHashedImportParams: base_config_1.TYPE,
RsaHashedKeyAlgorithm: base_config_1.TYPE,
RsaHashedKeyGenParams: base_config_1.TYPE,
RsaKeyAlgorithm: base_config_1.TYPE,
RsaKeyGenParams: base_config_1.TYPE,
RsaOaepParams: base_config_1.TYPE,
RsaOtherPrimesInfo: base_config_1.TYPE,
RsaPssParams: base_config_1.TYPE,
SVGBoundingBoxOptions: base_config_1.TYPE,
ScrollIntoViewOptions: base_config_1.TYPE,
ScrollOptions: base_config_1.TYPE,
ScrollToOptions: base_config_1.TYPE,
SecurityPolicyViolationEventInit: base_config_1.TYPE,
ShadowRootInit: base_config_1.TYPE,
ShareData: base_config_1.TYPE,
SpeechSynthesisErrorEventInit: base_config_1.TYPE,
SpeechSynthesisEventInit: base_config_1.TYPE,
StaticRangeInit: base_config_1.TYPE,
StereoPannerOptions: base_config_1.TYPE,
StorageEstimate: base_config_1.TYPE,
StorageEventInit: base_config_1.TYPE,
StreamPipeOptions: base_config_1.TYPE,
StructuredSerializeOptions: base_config_1.TYPE,
SubmitEventInit: base_config_1.TYPE,
TextDecodeOptions: base_config_1.TYPE,
TextDecoderOptions: base_config_1.TYPE,
TextEncoderEncodeIntoResult: base_config_1.TYPE,
TouchEventInit: base_config_1.TYPE,
TouchInit: base_config_1.TYPE,
TrackEventInit: base_config_1.TYPE,
Transformer: base_config_1.TYPE,
TransitionEventInit: base_config_1.TYPE,
UIEventInit: base_config_1.TYPE,
ULongRange: base_config_1.TYPE,
UnderlyingByteSource: base_config_1.TYPE,
UnderlyingDefaultSource: base_config_1.TYPE,
UnderlyingSink: base_config_1.TYPE,
UnderlyingSource: base_config_1.TYPE,
ValidityStateFlags: base_config_1.TYPE,
VideoColorSpaceInit: base_config_1.TYPE,
VideoConfiguration: base_config_1.TYPE,
VideoFrameCallbackMetadata: base_config_1.TYPE,
WaveShaperOptions: base_config_1.TYPE,
WebGLContextAttributes: base_config_1.TYPE,
WebGLContextEventInit: base_config_1.TYPE,
WheelEventInit: base_config_1.TYPE,
WindowPostMessageOptions: base_config_1.TYPE,
WorkerOptions: base_config_1.TYPE,
WorkletOptions: base_config_1.TYPE,
NodeFilter: base_config_1.TYPE_VALUE,
XPathNSResolver: base_config_1.TYPE,
ANGLE_instanced_arrays: base_config_1.TYPE,
ARIAMixin: base_config_1.TYPE,
AbortController: base_config_1.TYPE_VALUE,
AbortSignalEventMap: base_config_1.TYPE,
AbortSignal: base_config_1.TYPE_VALUE,
AbstractRange: base_config_1.TYPE_VALUE,
AbstractWorkerEventMap: base_config_1.TYPE,
AbstractWorker: base_config_1.TYPE,
AnalyserNode: base_config_1.TYPE_VALUE,
Animatable: base_config_1.TYPE,
AnimationEventMap: base_config_1.TYPE,
Animation: base_config_1.TYPE_VALUE,
AnimationEffect: base_config_1.TYPE_VALUE,
AnimationEvent: base_config_1.TYPE_VALUE,
AnimationFrameProvider: base_config_1.TYPE,
AnimationPlaybackEvent: base_config_1.TYPE_VALUE,
AnimationTimeline: base_config_1.TYPE_VALUE,
Attr: base_config_1.TYPE_VALUE,
AudioBuffer: base_config_1.TYPE_VALUE,
AudioBufferSourceNode: base_config_1.TYPE_VALUE,
AudioContext: base_config_1.TYPE_VALUE,
AudioDestinationNode: base_config_1.TYPE_VALUE,
AudioListener: base_config_1.TYPE_VALUE,
AudioNode: base_config_1.TYPE_VALUE,
AudioParam: base_config_1.TYPE_VALUE,
AudioParamMap: base_config_1.TYPE_VALUE,
AudioProcessingEvent: base_config_1.TYPE_VALUE,
AudioScheduledSourceNodeEventMap: base_config_1.TYPE,
AudioScheduledSourceNode: base_config_1.TYPE_VALUE,
AudioWorklet: base_config_1.TYPE_VALUE,
AudioWorkletNodeEventMap: base_config_1.TYPE,
AudioWorkletNode: base_config_1.TYPE_VALUE,
AuthenticatorAssertionResponse: base_config_1.TYPE_VALUE,
AuthenticatorAttestationResponse: base_config_1.TYPE_VALUE,
AuthenticatorResponse: base_config_1.TYPE_VALUE,
BarProp: base_config_1.TYPE_VALUE,
BaseAudioContextEventMap: base_config_1.TYPE,
BaseAudioContext: base_config_1.TYPE_VALUE,
BeforeUnloadEvent: base_config_1.TYPE_VALUE,
BiquadFilterNode: base_config_1.TYPE_VALUE,
Blob: base_config_1.TYPE_VALUE,
BlobEvent: base_config_1.TYPE_VALUE,
Body: base_config_1.TYPE,
BroadcastChannelEventMap: base_config_1.TYPE,
BroadcastChannel: base_config_1.TYPE_VALUE,
ByteLengthQueuingStrategy: base_config_1.TYPE_VALUE,
CDATASection: base_config_1.TYPE_VALUE,
CSSAnimation: base_config_1.TYPE_VALUE,
CSSConditionRule: base_config_1.TYPE_VALUE,
CSSContainerRule: base_config_1.TYPE_VALUE,
CSSCounterStyleRule: base_config_1.TYPE_VALUE,
CSSFontFaceRule: base_config_1.TYPE_VALUE,
CSSFontFeatureValuesRule: base_config_1.TYPE_VALUE,
CSSFontPaletteValuesRule: base_config_1.TYPE_VALUE,
CSSGroupingRule: base_config_1.TYPE_VALUE,
CSSImportRule: base_config_1.TYPE_VALUE,
CSSKeyframeRule: base_config_1.TYPE_VALUE,
CSSKeyframesRule: base_config_1.TYPE_VALUE,
CSSLayerBlockRule: base_config_1.TYPE_VALUE,
CSSLayerStatementRule: base_config_1.TYPE_VALUE,
CSSMediaRule: base_config_1.TYPE_VALUE,
CSSNamespaceRule: base_config_1.TYPE_VALUE,
CSSPageRule: base_config_1.TYPE_VALUE,
CSSRule: base_config_1.TYPE_VALUE,
CSSRuleList: base_config_1.TYPE_VALUE,
CSSStyleDeclaration: base_config_1.TYPE_VALUE,
CSSStyleRule: base_config_1.TYPE_VALUE,
CSSStyleSheet: base_config_1.TYPE_VALUE,
CSSSupportsRule: base_config_1.TYPE_VALUE,
CSSTransition: base_config_1.TYPE_VALUE,
Cache: base_config_1.TYPE_VALUE,
CacheStorage: base_config_1.TYPE_VALUE,
CanvasCaptureMediaStreamTrack: base_config_1.TYPE_VALUE,
CanvasCompositing: base_config_1.TYPE,
CanvasDrawImage: base_config_1.TYPE,
CanvasDrawPath: base_config_1.TYPE,
CanvasFillStrokeStyles: base_config_1.TYPE,
CanvasFilters: base_config_1.TYPE,
CanvasGradient: base_config_1.TYPE_VALUE,
CanvasImageData: base_config_1.TYPE,
CanvasImageSmoothing: base_config_1.TYPE,
CanvasPath: base_config_1.TYPE,
CanvasPathDrawingStyles: base_config_1.TYPE,
CanvasPattern: base_config_1.TYPE_VALUE,
CanvasRect: base_config_1.TYPE,
CanvasRenderingContext2D: base_config_1.TYPE_VALUE,
CanvasShadowStyles: base_config_1.TYPE,
CanvasState: base_config_1.TYPE,
CanvasText: base_config_1.TYPE,
CanvasTextDrawingStyles: base_config_1.TYPE,
CanvasTransform: base_config_1.TYPE,
CanvasUserInterface: base_config_1.TYPE,
ChannelMergerNode: base_config_1.TYPE_VALUE,
ChannelSplitterNode: base_config_1.TYPE_VALUE,
CharacterData: base_config_1.TYPE_VALUE,
ChildNode: base_config_1.TYPE,
ClientRect: base_config_1.TYPE,
Clipboard: base_config_1.TYPE_VALUE,
ClipboardEvent: base_config_1.TYPE_VALUE,
ClipboardItem: base_config_1.TYPE_VALUE,
CloseEvent: base_config_1.TYPE_VALUE,
Comment: base_config_1.TYPE_VALUE,
CompositionEvent: base_config_1.TYPE_VALUE,
ConstantSourceNode: base_config_1.TYPE_VALUE,
ConvolverNode: base_config_1.TYPE_VALUE,
CountQueuingStrategy: base_config_1.TYPE_VALUE,
Credential: base_config_1.TYPE_VALUE,
CredentialsContainer: base_config_1.TYPE_VALUE,
Crypto: base_config_1.TYPE_VALUE,
CryptoKey: base_config_1.TYPE_VALUE,
CustomElementRegistry: base_config_1.TYPE_VALUE,
CustomEvent: base_config_1.TYPE_VALUE,
DOMException: base_config_1.TYPE_VALUE,
DOMImplementation: base_config_1.TYPE_VALUE,
DOMMatrix: base_config_1.TYPE_VALUE,
SVGMatrix: base_config_1.TYPE_VALUE,
WebKitCSSMatrix: base_config_1.TYPE_VALUE,
DOMMatrixReadOnly: base_config_1.TYPE_VALUE,
DOMParser: base_config_1.TYPE_VALUE,
DOMPoint: base_config_1.TYPE_VALUE,
SVGPoint: base_config_1.TYPE_VALUE,
DOMPointReadOnly: base_config_1.TYPE_VALUE,
DOMQuad: base_config_1.TYPE_VALUE,
DOMRect: base_config_1.TYPE_VALUE,
SVGRect: base_config_1.TYPE_VALUE,
DOMRectList: base_config_1.TYPE_VALUE,
DOMRectReadOnly: base_config_1.TYPE_VALUE,
DOMStringList: base_config_1.TYPE_VALUE,
DOMStringMap: base_config_1.TYPE_VALUE,
DOMTokenList: base_config_1.TYPE_VALUE,
DataTransfer: base_config_1.TYPE_VALUE,
DataTransferItem: base_config_1.TYPE_VALUE,
DataTransferItemList: base_config_1.TYPE_VALUE,
DelayNode: base_config_1.TYPE_VALUE,
DeviceMotionEvent: base_config_1.TYPE_VALUE,
DeviceMotionEventAcceleration: base_config_1.TYPE,
DeviceMotionEventRotationRate: base_config_1.TYPE,
DeviceOrientationEvent: base_config_1.TYPE_VALUE,
DocumentEventMap: base_config_1.TYPE,
Document: base_config_1.TYPE_VALUE,
DocumentFragment: base_config_1.TYPE_VALUE,
DocumentOrShadowRoot: base_config_1.TYPE,
DocumentTimeline: base_config_1.TYPE_VALUE,
DocumentType: base_config_1.TYPE_VALUE,
DragEvent: base_config_1.TYPE_VALUE,
DynamicsCompressorNode: base_config_1.TYPE_VALUE,
EXT_blend_minmax: base_config_1.TYPE,
EXT_color_buffer_float: base_config_1.TYPE,
EXT_color_buffer_half_float: base_config_1.TYPE,
EXT_float_blend: base_config_1.TYPE,
EXT_frag_depth: base_config_1.TYPE,
EXT_sRGB: base_config_1.TYPE,
EXT_shader_texture_lod: base_config_1.TYPE,
EXT_texture_compression_bptc: base_config_1.TYPE,
EXT_texture_compression_rgtc: base_config_1.TYPE,
EXT_texture_filter_anisotropic: base_config_1.TYPE,
EXT_texture_norm16: base_config_1.TYPE,
ElementEventMap: base_config_1.TYPE,
Element: base_config_1.TYPE_VALUE,
ElementCSSInlineStyle: base_config_1.TYPE,
ElementContentEditable: base_config_1.TYPE,
ElementInternals: base_config_1.TYPE_VALUE,
ErrorEvent: base_config_1.TYPE_VALUE,
Event: base_config_1.TYPE_VALUE,
EventCounts: base_config_1.TYPE_VALUE,
EventListener: base_config_1.TYPE,
EventListenerObject: base_config_1.TYPE,
EventSourceEventMap: base_config_1.TYPE,
EventSource: base_config_1.TYPE_VALUE,
EventTarget: base_config_1.TYPE_VALUE,
External: base_config_1.TYPE_VALUE,
File: base_config_1.TYPE_VALUE,
FileList: base_config_1.TYPE_VALUE,
FileReaderEventMap: base_config_1.TYPE,
FileReader: base_config_1.TYPE_VALUE,
FileSystem: base_config_1.TYPE_VALUE,
FileSystemDirectoryEntry: base_config_1.TYPE_VALUE,
FileSystemDirectoryHandle: base_config_1.TYPE_VALUE,
FileSystemDirectoryReader: base_config_1.TYPE_VALUE,
FileSystemEntry: base_config_1.TYPE_VALUE,
FileSystemFileEntry: base_config_1.TYPE_VALUE,
FileSystemFileHandle: base_config_1.TYPE_VALUE,
FileSystemHandle: base_config_1.TYPE_VALUE,
FocusEvent: base_config_1.TYPE_VALUE,
FontFace: base_config_1.TYPE_VALUE,
FontFaceSetEventMap: base_config_1.TYPE,
FontFaceSet: base_config_1.TYPE_VALUE,
FontFaceSetLoadEvent: base_config_1.TYPE_VALUE,
FontFaceSource: base_config_1.TYPE,
FormData: base_config_1.TYPE_VALUE,
FormDataEvent: base_config_1.TYPE_VALUE,
GainNode: base_config_1.TYPE_VALUE,
Gamepad: base_config_1.TYPE_VALUE,
GamepadButton: base_config_1.TYPE_VALUE,
GamepadEvent: base_config_1.TYPE_VALUE,
GamepadHapticActuator: base_config_1.TYPE_VALUE,
GenericTransformStream: base_config_1.TYPE,
Geolocation: base_config_1.TYPE_VALUE,
GeolocationCoordinates: base_config_1.TYPE_VALUE,
GeolocationPosition: base_config_1.TYPE_VALUE,
GeolocationPositionError: base_config_1.TYPE_VALUE,
GlobalEventHandlersEventMap: base_config_1.TYPE,
GlobalEventHandlers: base_config_1.TYPE,
HTMLAllCollection: base_config_1.TYPE_VALUE,
HTMLAnchorElement: base_config_1.TYPE_VALUE,
HTMLAreaElement: base_config_1.TYPE_VALUE,
HTMLAudioElement: base_config_1.TYPE_VALUE,
HTMLBRElement: base_config_1.TYPE_VALUE,
HTMLBaseElement: base_config_1.TYPE_VALUE,
HTMLBodyElementEventMap: base_config_1.TYPE,
HTMLBodyElement: base_config_1.TYPE_VALUE,
HTMLButtonElement: base_config_1.TYPE_VALUE,
HTMLCanvasElement: base_config_1.TYPE_VALUE,
HTMLCollectionBase: base_config_1.TYPE,
HTMLCollection: base_config_1.TYPE_VALUE,
HTMLCollectionOf: base_config_1.TYPE,
HTMLDListElement: base_config_1.TYPE_VALUE,
HTMLDataElement: base_config_1.TYPE_VALUE,
HTMLDataListElement: base_config_1.TYPE_VALUE,
HTMLDetailsElement: base_config_1.TYPE_VALUE,
HTMLDialogElement: base_config_1.TYPE_VALUE,
HTMLDirectoryElement: base_config_1.TYPE_VALUE,
HTMLDivElement: base_config_1.TYPE_VALUE,
HTMLDocument: base_config_1.TYPE_VALUE,
HTMLElementEventMap: base_config_1.TYPE,
HTMLElement: base_config_1.TYPE_VALUE,
HTMLEmbedElement: base_config_1.TYPE_VALUE,
HTMLFieldSetElement: base_config_1.TYPE_VALUE,
HTMLFontElement: base_config_1.TYPE_VALUE,
HTMLFormControlsCollection: base_config_1.TYPE_VALUE,
HTMLFormElement: base_config_1.TYPE_VALUE,
HTMLFrameElement: base_config_1.TYPE_VALUE,
HTMLFrameSetElementEventMap: base_config_1.TYPE,
HTMLFrameSetElement: base_config_1.TYPE_VALUE,
HTMLHRElement: base_config_1.TYPE_VALUE,
HTMLHeadElement: base_config_1.TYPE_VALUE,
HTMLHeadingElement: base_config_1.TYPE_VALUE,
HTMLHtmlElement: base_config_1.TYPE_VALUE,
HTMLHyperlinkElementUtils: base_config_1.TYPE,
HTMLIFrameElement: base_config_1.TYPE_VALUE,
HTMLImageElement: base_config_1.TYPE_VALUE,
HTMLInputElement: base_config_1.TYPE_VALUE,
HTMLLIElement: base_config_1.TYPE_VALUE,
HTMLLabelElement: base_config_1.TYPE_VALUE,
HTMLLegendElement: base_config_1.TYPE_VALUE,
HTMLLinkElement: base_config_1.TYPE_VALUE,
HTMLMapElement: base_config_1.TYPE_VALUE,
HTMLMarqueeElement: base_config_1.TYPE_VALUE,
HTMLMediaElementEventMap: base_config_1.TYPE,
HTMLMediaElement: base_config_1.TYPE_VALUE,
HTMLMenuElement: base_config_1.TYPE_VALUE,
HTMLMetaElement: base_config_1.TYPE_VALUE,
HTMLMeterElement: base_config_1.TYPE_VALUE,
HTMLModElement: base_config_1.TYPE_VALUE,
HTMLOListElement: base_config_1.TYPE_VALUE,
HTMLObjectElement: base_config_1.TYPE_VALUE,
HTMLOptGroupElement: base_config_1.TYPE_VALUE,
HTMLOptionElement: base_config_1.TYPE_VALUE,
HTMLOptionsCollection: base_config_1.TYPE_VALUE,
HTMLOrSVGElement: base_config_1.TYPE,
HTMLOutputElement: base_config_1.TYPE_VALUE,
HTMLParagraphElement: base_config_1.TYPE_VALUE,
HTMLParamElement: base_config_1.TYPE_VALUE,
HTMLPictureElement: base_config_1.TYPE_VALUE,
HTMLPreElement: base_config_1.TYPE_VALUE,
HTMLProgressElement: base_config_1.TYPE_VALUE,
HTMLQuoteElement: base_config_1.TYPE_VALUE,
HTMLScriptElement: base_config_1.TYPE_VALUE,
HTMLSelectElement: base_config_1.TYPE_VALUE,
HTMLSlotElement: base_config_1.TYPE_VALUE,
HTMLSourceElement: base_config_1.TYPE_VALUE,
HTMLSpanElement: base_config_1.TYPE_VALUE,
HTMLStyleElement: base_config_1.TYPE_VALUE,
HTMLTableCaptionElement: base_config_1.TYPE_VALUE,
HTMLTableCellElement: base_config_1.TYPE_VALUE,
HTMLTableColElement: base_config_1.TYPE_VALUE,
HTMLTableDataCellElement: base_config_1.TYPE,
HTMLTableElement: base_config_1.TYPE_VALUE,
HTMLTableHeaderCellElement: base_config_1.TYPE,
HTMLTableRowElement: base_config_1.TYPE_VALUE,
HTMLTableSectionElement: base_config_1.TYPE_VALUE,
HTMLTemplateElement: base_config_1.TYPE_VALUE,
HTMLTextAreaElement: base_config_1.TYPE_VALUE,
HTMLTimeElement: base_config_1.TYPE_VALUE,
HTMLTitleElement: base_config_1.TYPE_VALUE,
HTMLTrackElement: base_config_1.TYPE_VALUE,
HTMLUListElement: base_config_1.TYPE_VALUE,
HTMLUnknownElement: base_config_1.TYPE_VALUE,
HTMLVideoElementEventMap: base_config_1.TYPE,
HTMLVideoElement: base_config_1.TYPE_VALUE,
HashChangeEvent: base_config_1.TYPE_VALUE,
Headers: base_config_1.TYPE_VALUE,
History: base_config_1.TYPE_VALUE,
IDBCursor: base_config_1.TYPE_VALUE,
IDBCursorWithValue: base_config_1.TYPE_VALUE,
IDBDatabaseEventMap: base_config_1.TYPE,
IDBDatabase: base_config_1.TYPE_VALUE,
IDBFactory: base_config_1.TYPE_VALUE,
IDBIndex: base_config_1.TYPE_VALUE,
IDBKeyRange: base_config_1.TYPE_VALUE,
IDBObjectStore: base_config_1.TYPE_VALUE,
IDBOpenDBRequestEventMap: base_config_1.TYPE,
IDBOpenDBRequest: base_config_1.TYPE_VALUE,
IDBRequestEventMap: base_config_1.TYPE,
IDBRequest: base_config_1.TYPE_VALUE,
IDBTransactionEventMap: base_config_1.TYPE,
IDBTransaction: base_config_1.TYPE_VALUE,
IDBVersionChangeEvent: base_config_1.TYPE_VALUE,
IIRFilterNode: base_config_1.TYPE_VALUE,
IdleDeadline: base_config_1.TYPE_VALUE,
ImageBitmap: base_config_1.TYPE_VALUE,
ImageBitmapRenderingContext: base_config_1.TYPE_VALUE,
ImageData: base_config_1.TYPE_VALUE,
InnerHTML: base_config_1.TYPE,
InputDeviceInfo: base_config_1.TYPE_VALUE,
InputEvent: base_config_1.TYPE_VALUE,
IntersectionObserver: base_config_1.TYPE_VALUE,
IntersectionObserverEntry: base_config_1.TYPE_VALUE,
KHR_parallel_shader_compile: base_config_1.TYPE,
KeyboardEvent: base_config_1.TYPE_VALUE,
KeyframeEffect: base_config_1.TYPE_VALUE,
LinkStyle: base_config_1.TYPE,
Location: base_config_1.TYPE_VALUE,
Lock: base_config_1.TYPE_VALUE,
LockManager: base_config_1.TYPE_VALUE,
MIDIAccessEventMap: base_config_1.TYPE,
MIDIAccess: base_config_1.TYPE_VALUE,
MIDIConnectionEvent: base_config_1.TYPE_VALUE,
MIDIInputEventMap: base_config_1.TYPE,
MIDIInput: base_config_1.TYPE_VALUE,
MIDIInputMap: base_config_1.TYPE_VALUE,
MIDIMessageEvent: base_config_1.TYPE_VALUE,
MIDIOutput: base_config_1.TYPE_VALUE,
MIDIOutputMap: base_config_1.TYPE_VALUE,
MIDIPortEventMap: base_config_1.TYPE,
MIDIPort: base_config_1.TYPE_VALUE,
MathMLElementEventMap: base_config_1.TYPE,
MathMLElement: base_config_1.TYPE_VALUE,
MediaCapabilities: base_config_1.TYPE_VALUE,
MediaDeviceInfo: base_config_1.TYPE_VALUE,
MediaDevicesEventMap: base_config_1.TYPE,
MediaDevices: base_config_1.TYPE_VALUE,
MediaElementAudioSourceNode: base_config_1.TYPE_VALUE,
MediaEncryptedEvent: base_config_1.TYPE_VALUE,
MediaError: base_config_1.TYPE_VALUE,
MediaKeyMessageEvent: base_config_1.TYPE_VALUE,
MediaKeySessionEventMap: base_config_1.TYPE,
MediaKeySession: base_config_1.TYPE_VALUE,
MediaKeyStatusMap: base_config_1.TYPE_VALUE,
MediaKeySystemAccess: base_config_1.TYPE_VALUE,
MediaKeys: base_config_1.TYPE_VALUE,
MediaList: base_config_1.TYPE_VALUE,
MediaMetadata: base_config_1.TYPE_VALUE,
MediaQueryListEventMap: base_config_1.TYPE,
MediaQueryList: base_config_1.TYPE_VALUE,
MediaQueryListEvent: base_config_1.TYPE_VALUE,
MediaRecorderEventMap: base_config_1.TYPE,
MediaRecorder: base_config_1.TYPE_VALUE,
MediaSession: base_config_1.TYPE_VALUE,
MediaSourceEventMap: base_config_1.TYPE,
MediaSource: base_config_1.TYPE_VALUE,
MediaStreamEventMap: base_config_1.TYPE,
MediaStream: base_config_1.TYPE_VALUE,
MediaStreamAudioDestinationNode: base_config_1.TYPE_VALUE,
MediaStreamAudioSourceNode: base_config_1.TYPE_VALUE,
MediaStreamTrackEventMap: base_config_1.TYPE,
MediaStreamTrack: base_config_1.TYPE_VALUE,
MediaStreamTrackEvent: base_config_1.TYPE_VALUE,
MessageChannel: base_config_1.TYPE_VALUE,
MessageEvent: base_config_1.TYPE_VALUE,
MessagePortEventMap: base_config_1.TYPE,
MessagePort: base_config_1.TYPE_VALUE,
MimeType: base_config_1.TYPE_VALUE,
MimeTypeArray: base_config_1.TYPE_VALUE,
MouseEvent: base_config_1.TYPE_VALUE,
MutationEvent: base_config_1.TYPE_VALUE,
MutationObserver: base_config_1.TYPE_VALUE,
MutationRecord: base_config_1.TYPE_VALUE,
NamedNodeMap: base_config_1.TYPE_VALUE,
NavigationPreloadManager: base_config_1.TYPE_VALUE,
Navigator: base_config_1.TYPE_VALUE,
NavigatorAutomationInformation: base_config_1.TYPE,
NavigatorConcurrentHardware: base_config_1.TYPE,
NavigatorContentUtils: base_config_1.TYPE,
NavigatorCookies: base_config_1.TYPE,
NavigatorID: base_config_1.TYPE,
NavigatorLanguage: base_config_1.TYPE,
NavigatorLocks: base_config_1.TYPE,
NavigatorOnLine: base_config_1.TYPE,
NavigatorPlugins: base_config_1.TYPE,
NavigatorStorage: base_config_1.TYPE,
Node: base_config_1.TYPE_VALUE,
NodeIterator: base_config_1.TYPE_VALUE,
NodeList: base_config_1.TYPE_VALUE,
NodeListOf: base_config_1.TYPE,
NonDocumentTypeChildNode: base_config_1.TYPE,
NonElementParentNode: base_config_1.TYPE,
NotificationEventMap: base_config_1.TYPE,
Notification: base_config_1.TYPE_VALUE,
OES_draw_buffers_indexed: base_config_1.TYPE,
OES_element_index_uint: base_config_1.TYPE,
OES_fbo_render_mipmap: base_config_1.TYPE,
OES_standard_derivatives: base_config_1.TYPE,
OES_texture_float: base_config_1.TYPE,
OES_texture_float_linear: base_config_1.TYPE,
OES_texture_half_float: base_config_1.TYPE,
OES_texture_half_float_linear: base_config_1.TYPE,
OES_vertex_array_object: base_config_1.TYPE,
OVR_multiview2: base_config_1.TYPE,
OfflineAudioCompletionEvent: base_config_1.TYPE_VALUE,
OfflineAudioContextEventMap: base_config_1.TYPE,
OfflineAudioContext: base_config_1.TYPE_VALUE,
OffscreenCanvasEventMap: base_config_1.TYPE,
OffscreenCanvas: base_config_1.TYPE_VALUE,
OffscreenCanvasRenderingContext2D: base_config_1.TYPE_VALUE,
OscillatorNode: base_config_1.TYPE_VALUE,
OverconstrainedError: base_config_1.TYPE_VALUE,
PageTransitionEvent: base_config_1.TYPE_VALUE,
PannerNode: base_config_1.TYPE_VALUE,
ParentNode: base_config_1.TYPE,
Path2D: base_config_1.TYPE_VALUE,
PaymentMethodChangeEvent: base_config_1.TYPE_VALUE,
PaymentRequestEventMap: base_config_1.TYPE,
PaymentRequest: base_config_1.TYPE_VALUE,
PaymentRequestUpdateEvent: base_config_1.TYPE_VALUE,
PaymentResponse: base_config_1.TYPE_VALUE,
PerformanceEventMap: base_config_1.TYPE,
Performance: base_config_1.TYPE_VALUE,
PerformanceEntry: base_config_1.TYPE_VALUE,
PerformanceEventTiming: base_config_1.TYPE_VALUE,
PerformanceMark: base_config_1.TYPE_VALUE,
PerformanceMeasure: base_config_1.TYPE_VALUE,
PerformanceNavigation: base_config_1.TYPE_VALUE,
PerformanceNavigationTiming: base_config_1.TYPE_VALUE,
PerformanceObserver: base_config_1.TYPE_VALUE,
PerformanceObserverEntryList: base_config_1.TYPE_VALUE,
PerformancePaintTiming: base_config_1.TYPE_VALUE,
PerformanceResourceTiming: base_config_1.TYPE_VALUE,
PerformanceServerTiming: base_config_1.TYPE_VALUE,
PerformanceTiming: base_config_1.TYPE_VALUE,
PeriodicWave: base_config_1.TYPE_VALUE,
PermissionStatusEventMap: base_config_1.TYPE,
PermissionStatus: base_config_1.TYPE_VALUE,
Permissions: base_config_1.TYPE_VALUE,
PictureInPictureEvent: base_config_1.TYPE_VALUE,
PictureInPictureWindowEventMap: base_config_1.TYPE,
PictureInPictureWindow: base_config_1.TYPE_VALUE,
Plugin: base_config_1.TYPE_VALUE,
PluginArray: base_config_1.TYPE_VALUE,
PointerEvent: base_config_1.TYPE_VALUE,
PopStateEvent: base_config_1.TYPE_VALUE,
ProcessingInstruction: base_config_1.TYPE_VALUE,
ProgressEvent: base_config_1.TYPE_VALUE,
PromiseRejectionEvent: base_config_1.TYPE_VALUE,
PublicKeyCredential: base_config_1.TYPE_VALUE,
PushManager: base_config_1.TYPE_VALUE,
PushSubscription: base_config_1.TYPE_VALUE,
PushSubscriptionOptions: base_config_1.TYPE_VALUE,
RTCCertificate: base_config_1.TYPE_VALUE,
RTCDTMFSenderEventMap: base_config_1.TYPE,
RTCDTMFSender: base_config_1.TYPE_VALUE,
RTCDTMFToneChangeEvent: base_config_1.TYPE_VALUE,
RTCDataChannelEventMap: base_config_1.TYPE,
RTCDataChannel: base_config_1.TYPE_VALUE,
RTCDataChannelEvent: base_config_1.TYPE_VALUE,
RTCDtlsTransportEventMap: base_config_1.TYPE,
RTCDtlsTransport: base_config_1.TYPE_VALUE,
RTCEncodedAudioFrame: base_config_1.TYPE_VALUE,
RTCEncodedVideoFrame: base_config_1.TYPE_VALUE,
RTCError: base_config_1.TYPE_VALUE,
RTCErrorEvent: base_config_1.TYPE_VALUE,
RTCIceCandidate: base_config_1.TYPE_VALUE,
RTCIceTransportEventMap: base_config_1.TYPE,
RTCIceTransport: base_config_1.TYPE_VALUE,
RTCPeerConnectionEventMap: base_config_1.TYPE,
RTCPeerConnection: base_config_1.TYPE_VALUE,
RTCPeerConnectionIceErrorEvent: base_config_1.TYPE_VALUE,
RTCPeerConnectionIceEvent: base_config_1.TYPE_VALUE,
RTCRtpReceiver: base_config_1.TYPE_VALUE,
RTCRtpSender: base_config_1.TYPE_VALUE,
RTCRtpTransceiver: base_config_1.TYPE_VALUE,
RTCSctpTransportEventMap: base_config_1.TYPE,
RTCSctpTransport: base_config_1.TYPE_VALUE,
RTCSessionDescription: base_config_1.TYPE_VALUE,
RTCStatsReport: base_config_1.TYPE_VALUE,
RTCTrackEvent: base_config_1.TYPE_VALUE,
RadioNodeList: base_config_1.TYPE_VALUE,
Range: base_config_1.TYPE_VALUE,
ReadableByteStreamController: base_config_1.TYPE_VALUE,
ReadableStream: base_config_1.TYPE_VALUE,
ReadableStreamBYOBReader: base_config_1.TYPE_VALUE,
ReadableStreamBYOBRequest: base_config_1.TYPE_VALUE,
ReadableStreamDefaultController: base_config_1.TYPE_VALUE,
ReadableStreamDefaultReader: base_config_1.TYPE_VALUE,
ReadableStreamGenericReader: base_config_1.TYPE,
RemotePlaybackEventMap: base_config_1.TYPE,
RemotePlayback: base_config_1.TYPE_VALUE,
Request: base_config_1.TYPE_VALUE,
ResizeObserver: base_config_1.TYPE_VALUE,
ResizeObserverEntry: base_config_1.TYPE_VALUE,
ResizeObserverSize: base_config_1.TYPE_VALUE,
Response: base_config_1.TYPE_VALUE,
SVGAElement: base_config_1.TYPE_VALUE,
SVGAngle: base_config_1.TYPE_VALUE,
SVGAnimateElement: base_config_1.TYPE_VALUE,
SVGAnimateMotionElement: base_config_1.TYPE_VALUE,
SVGAnimateTransformElement: base_config_1.TYPE_VALUE,
SVGAnimatedAngle: base_config_1.TYPE_VALUE,
SVGAnimatedBoolean: base_config_1.TYPE_VALUE,
SVGAnimatedEnumeration: base_config_1.TYPE_VALUE,
SVGAnimatedInteger: base_config_1.TYPE_VALUE,
SVGAnimatedLength: base_config_1.TYPE_VALUE,
SVGAnimatedLengthList: base_config_1.TYPE_VALUE,
SVGAnimatedNumber: base_config_1.TYPE_VALUE,
SVGAnimatedNumberList: base_config_1.TYPE_VALUE,
SVGAnimatedPoints: base_config_1.TYPE,
SVGAnimatedPreserveAspectRatio: base_config_1.TYPE_VALUE,
SVGAnimatedRect: base_config_1.TYPE_VALUE,
SVGAnimatedString: base_config_1.TYPE_VALUE,
SVGAnimatedTransformList: base_config_1.TYPE_VALUE,
SVGAnimationElement: base_config_1.TYPE_VALUE,
SVGCircleElement: base_config_1.TYPE_VALUE,
SVGClipPathElement: base_config_1.TYPE_VALUE,
SVGComponentTransferFunctionElement: base_config_1.TYPE_VALUE,
SVGDefsElement: base_config_1.TYPE_VALUE,
SVGDescElement: base_config_1.TYPE_VALUE,
SVGElementEventMap: base_config_1.TYPE,
SVGElement: base_config_1.TYPE_VALUE,
SVGEllipseElement: base_config_1.TYPE_VALUE,
SVGFEBlendElement: base_config_1.TYPE_VALUE,
SVGFEColorMatrixElement: base_config_1.TYPE_VALUE,
SVGFEComponentTransferElement: base_config_1.TYPE_VALUE,
SVGFECompositeElement: base_config_1.TYPE_VALUE,
SVGFEConvolveMatrixElement: base_config_1.TYPE_VALUE,
SVGFEDiffuseLightingElement: base_config_1.TYPE_VALUE,
SVGFEDisplacementMapElement: base_config_1.TYPE_VALUE,
SVGFEDistantLightElement: base_config_1.TYPE_VALUE,
SVGFEDropShadowElement: base_config_1.TYPE_VALUE,
SVGFEFloodElement: base_config_1.TYPE_VALUE,
SVGFEFuncAElement: base_config_1.TYPE_VALUE,
SVGFEFuncBElement: base_config_1.TYPE_VALUE,
SVGFEFuncGElement: base_config_1.TYPE_VALUE,
SVGFEFuncRElement: base_config_1.TYPE_VALUE,
SVGFEGaussianBlurElement: base_config_1.TYPE_VALUE,
SVGFEImageElement: base_config_1.TYPE_VALUE,
SVGFEMergeElement: base_config_1.TYPE_VALUE,
SVGFEMergeNodeElement: base_config_1.TYPE_VALUE,
SVGFEMorphologyElement: base_config_1.TYPE_VALUE,
SVGFEOffsetElement: base_config_1.TYPE_VALUE,
SVGFEPointLightElement: base_config_1.TYPE_VALUE,
SVGFESpecularLightingElement: base_config_1.TYPE_VALUE,
SVGFESpotLightElement: base_config_1.TYPE_VALUE,
SVGFETileElement: base_config_1.TYPE_VALUE,
SVGFETurbulenceElement: base_config_1.TYPE_VALUE,
SVGFilterElement: base_config_1.TYPE_VALUE,
SVGFilterPrimitiveStandardAttributes: base_config_1.TYPE,
SVGFitToViewBox: base_config_1.TYPE,
SVGForeignObjectElement: base_config_1.TYPE_VALUE,
SVGGElement: base_config_1.TYPE_VALUE,
SVGGeometryElement: base_config_1.TYPE_VALUE,
SVGGradientElement: base_config_1.TYPE_VALUE,
SVGGraphicsElement: base_config_1.TYPE_VALUE,
SVGImageElement: base_config_1.TYPE_VALUE,
SVGLength: base_config_1.TYPE_VALUE,
SVGLengthList: base_config_1.TYPE_VALUE,
SVGLineElement: base_config_1.TYPE_VALUE,
SVGLinearGradientElement: base_config_1.TYPE_VALUE,
SVGMPathElement: base_config_1.TYPE_VALUE,
SVGMarkerElement: base_config_1.TYPE_VALUE,
SVGMaskElement: base_config_1.TYPE_VALUE,
SVGMetadataElement: base_config_1.TYPE_VALUE,
SVGNumber: base_config_1.TYPE_VALUE,
SVGNumberList: base_config_1.TYPE_VALUE,
SVGPathElement: base_config_1.TYPE_VALUE,
SVGPatternElement: base_config_1.TYPE_VALUE,
SVGPointList: base_config_1.TYPE_VALUE,
SVGPolygonElement: base_config_1.TYPE_VALUE,
SVGPolylineElement: base_config_1.TYPE_VALUE,
SVGPreserveAspectRatio: base_config_1.TYPE_VALUE,
SVGRadialGradientElement: base_config_1.TYPE_VALUE,
SVGRectElement: base_config_1.TYPE_VALUE,
SVGSVGElementEventMap: base_config_1.TYPE,
SVGSVGElement: base_config_1.TYPE_VALUE,
SVGScriptElement: base_config_1.TYPE_VALUE,
SVGSetElement: base_config_1.TYPE_VALUE,
SVGStopElement: base_config_1.TYPE_VALUE,
SVGStringList: base_config_1.TYPE_VALUE,
SVGStyleElement: base_config_1.TYPE_VALUE,
SVGSwitchElement: base_config_1.TYPE_VALUE,
SVGSymbolElement: base_config_1.TYPE_VALUE,
SVGTSpanElement: base_config_1.TYPE_VALUE,
SVGTests: base_config_1.TYPE,
SVGTextContentElement: base_config_1.TYPE_VALUE,
SVGTextElement: base_config_1.TYPE_VALUE,
SVGTextPathElement: base_config_1.TYPE_VALUE,
SVGTextPositioningElement: base_config_1.TYPE_VALUE,
SVGTitleElement: base_config_1.TYPE_VALUE,
SVGTransform: base_config_1.TYPE_VALUE,
SVGTransformList: base_config_1.TYPE_VALUE,
SVGURIReference: base_config_1.TYPE,
SVGUnitTypes: base_config_1.TYPE_VALUE,
SVGUseElement: base_config_1.TYPE_VALUE,
SVGViewElement: base_config_1.TYPE_VALUE,
Screen: base_config_1.TYPE_VALUE,
ScreenOrientationEventMap: base_config_1.TYPE,
ScreenOrientation: base_config_1.TYPE_VALUE,
ScriptProcessorNodeEventMap: base_config_1.TYPE,
ScriptProcessorNode: base_config_1.TYPE_VALUE,
SecurityPolicyViolationEvent: base_config_1.TYPE_VALUE,
Selection: base_config_1.TYPE_VALUE,
ServiceWorkerEventMap: base_config_1.TYPE,
ServiceWorker: base_config_1.TYPE_VALUE,
ServiceWorkerContainerEventMap: base_config_1.TYPE,
ServiceWorkerContainer: base_config_1.TYPE_VALUE,
ServiceWorkerRegistrationEventMap: base_config_1.TYPE,
ServiceWorkerRegistration: base_config_1.TYPE_VALUE,
ShadowRootEventMap: base_config_1.TYPE,
ShadowRoot: base_config_1.TYPE_VALUE,
SharedWorker: base_config_1.TYPE_VALUE,
Slottable: base_config_1.TYPE,
SourceBufferEventMap: base_config_1.TYPE,
SourceBuffer: base_config_1.TYPE_VALUE,
SourceBufferListEventMap: base_config_1.TYPE,
SourceBufferList: base_config_1.TYPE_VALUE,
SpeechRecognitionAlternative: base_config_1.TYPE_VALUE,
SpeechRecognitionResult: base_config_1.TYPE_VALUE,
SpeechRecognitionResultList: base_config_1.TYPE_VALUE,
SpeechSynthesisEventMap: base_config_1.TYPE,
SpeechSynthesis: base_config_1.TYPE_VALUE,
SpeechSynthesisErrorEvent: base_config_1.TYPE_VALUE,
SpeechSynthesisEvent: base_config_1.TYPE_VALUE,
SpeechSynthesisUtteranceEventMap: base_config_1.TYPE,
SpeechSynthesisUtterance: base_config_1.TYPE_VALUE,
SpeechSynthesisVoice: base_config_1.TYPE_VALUE,
StaticRange: base_config_1.TYPE_VALUE,
StereoPannerNode: base_config_1.TYPE_VALUE,
Storage: base_config_1.TYPE_VALUE,
StorageEvent: base_config_1.TYPE_VALUE,
StorageManager: base_config_1.TYPE_VALUE,
StyleMedia: base_config_1.TYPE,
StyleSheet: base_config_1.TYPE_VALUE,
StyleSheetList: base_config_1.TYPE_VALUE,
SubmitEvent: base_config_1.TYPE_VALUE,
SubtleCrypto: base_config_1.TYPE_VALUE,
Text: base_config_1.TYPE_VALUE,
TextDecoder: base_config_1.TYPE_VALUE,
TextDecoderCommon: base_config_1.TYPE,
TextDecoderStream: base_config_1.TYPE_VALUE,
TextEncoder: base_config_1.TYPE_VALUE,
TextEncoderCommon: base_config_1.TYPE,
TextEncoderStream: base_config_1.TYPE_VALUE,
TextMetrics: base_config_1.TYPE_VALUE,
TextTrackEventMap: base_config_1.TYPE,
TextTrack: base_config_1.TYPE_VALUE,
TextTrackCueEventMap: base_config_1.TYPE,
TextTrackCue: base_config_1.TYPE_VALUE,
TextTrackCueList: base_config_1.TYPE_VALUE,
TextTrackListEventMap: base_config_1.TYPE,
TextTrackList: base_config_1.TYPE_VALUE,
TimeRanges: base_config_1.TYPE_VALUE,
Touch: base_config_1.TYPE_VALUE,
TouchEvent: base_config_1.TYPE_VALUE,
TouchList: base_config_1.TYPE_VALUE,
TrackEvent: base_config_1.TYPE_VALUE,
TransformStream: base_config_1.TYPE_VALUE,
TransformStreamDefaultController: base_config_1.TYPE_VALUE,
TransitionEvent: base_config_1.TYPE_VALUE,
TreeWalker: base_config_1.TYPE_VALUE,
UIEvent: base_config_1.TYPE_VALUE,
URL: base_config_1.TYPE_VALUE,
webkitURL: base_config_1.TYPE_VALUE,
URLSearchParams: base_config_1.TYPE_VALUE,
VTTCue: base_config_1.TYPE_VALUE,
VTTRegion: base_config_1.TYPE_VALUE,
ValidityState: base_config_1.TYPE_VALUE,
VideoColorSpace: base_config_1.TYPE_VALUE,
VideoPlaybackQuality: base_config_1.TYPE_VALUE,
VisualViewportEventMap: base_config_1.TYPE,
VisualViewport: base_config_1.TYPE_VALUE,
WEBGL_color_buffer_float: base_config_1.TYPE,
WEBGL_compressed_texture_astc: base_config_1.TYPE,
WEBGL_compressed_texture_etc: base_config_1.TYPE,
WEBGL_compressed_texture_etc1: base_config_1.TYPE,
WEBGL_compressed_texture_s3tc: base_config_1.TYPE,
WEBGL_compressed_texture_s3tc_srgb: base_config_1.TYPE,
WEBGL_debug_renderer_info: base_config_1.TYPE,
WEBGL_debug_shaders: base_config_1.TYPE,
WEBGL_depth_texture: base_config_1.TYPE,
WEBGL_draw_buffers: base_config_1.TYPE,
WEBGL_lose_context: base_config_1.TYPE,
WEBGL_multi_draw: base_config_1.TYPE,
WaveShaperNode: base_config_1.TYPE_VALUE,
WebGL2RenderingContext: base_config_1.TYPE_VALUE,
WebGL2RenderingContextBase: base_config_1.TYPE,
WebGL2RenderingContextOverloads: base_config_1.TYPE,
WebGLActiveInfo: base_config_1.TYPE_VALUE,
WebGLBuffer: base_config_1.TYPE_VALUE,
WebGLContextEvent: base_config_1.TYPE_VALUE,
WebGLFramebuffer: base_config_1.TYPE_VALUE,
WebGLProgram: base_config_1.TYPE_VALUE,
WebGLQuery: base_config_1.TYPE_VALUE,
WebGLRenderbuffer: base_config_1.TYPE_VALUE,
WebGLRenderingContext: base_config_1.TYPE_VALUE,
WebGLRenderingContextBase: base_config_1.TYPE,
WebGLRenderingContextOverloads: base_config_1.TYPE,
WebGLSampler: base_config_1.TYPE_VALUE,
WebGLShader: base_config_1.TYPE_VALUE,
WebGLShaderPrecisionFormat: base_config_1.TYPE_VALUE,
WebGLSync: base_config_1.TYPE_VALUE,
WebGLTexture: base_config_1.TYPE_VALUE,
WebGLTransformFeedback: base_config_1.TYPE_VALUE,
WebGLUniformLocation: base_config_1.TYPE_VALUE,
WebGLVertexArrayObject: base_config_1.TYPE_VALUE,
WebGLVertexArrayObjectOES: base_config_1.TYPE,
WebSocketEventMap: base_config_1.TYPE,
WebSocket: base_config_1.TYPE_VALUE,
WheelEvent: base_config_1.TYPE_VALUE,
WindowEventMap: base_config_1.TYPE,
Window: base_config_1.TYPE_VALUE,
WindowEventHandlersEventMap: base_config_1.TYPE,
WindowEventHandlers: base_config_1.TYPE,
WindowLocalStorage: base_config_1.TYPE,
WindowOrWorkerGlobalScope: base_config_1.TYPE,
WindowSessionStorage: base_config_1.TYPE,
WorkerEventMap: base_config_1.TYPE,
Worker: base_config_1.TYPE_VALUE,
Worklet: base_config_1.TYPE_VALUE,
WritableStream: base_config_1.TYPE_VALUE,
WritableStreamDefaultController: base_config_1.TYPE_VALUE,
WritableStreamDefaultWriter: base_config_1.TYPE_VALUE,
XMLDocument: base_config_1.TYPE_VALUE,
XMLHttpRequestEventMap: base_config_1.TYPE,
XMLHttpRequest: base_config_1.TYPE_VALUE,
XMLHttpRequestEventTargetEventMap: base_config_1.TYPE,
XMLHttpRequestEventTarget: base_config_1.TYPE_VALUE,
XMLHttpRequestUpload: base_config_1.TYPE_VALUE,
XMLSerializer: base_config_1.TYPE_VALUE,
XPathEvaluator: base_config_1.TYPE_VALUE,
XPathEvaluatorBase: base_config_1.TYPE,
XPathExpression: base_config_1.TYPE_VALUE,
XPathResult: base_config_1.TYPE_VALUE,
XSLTProcessor: base_config_1.TYPE_VALUE,
Console: base_config_1.TYPE,
CSS: base_config_1.TYPE_VALUE,
WebAssembly: base_config_1.TYPE_VALUE,
BlobCallback: base_config_1.TYPE,
CustomElementConstructor: base_config_1.TYPE,
DecodeErrorCallback: base_config_1.TYPE,
DecodeSuccessCallback: base_config_1.TYPE,
ErrorCallback: base_config_1.TYPE,
FileCallback: base_config_1.TYPE,
FileSystemEntriesCallback: base_config_1.TYPE,
FileSystemEntryCallback: base_config_1.TYPE,
FrameRequestCallback: base_config_1.TYPE,
FunctionStringCallback: base_config_1.TYPE,
IdleRequestCallback: base_config_1.TYPE,
IntersectionObserverCallback: base_config_1.TYPE,
LockGrantedCallback: base_config_1.TYPE,
MediaSessionActionHandler: base_config_1.TYPE,
MutationCallback: base_config_1.TYPE,
NotificationPermissionCallback: base_config_1.TYPE,
OnBeforeUnloadEventHandlerNonNull: base_config_1.TYPE,
OnErrorEventHandlerNonNull: base_config_1.TYPE,
PerformanceObserverCallback: base_config_1.TYPE,
PositionCallback: base_config_1.TYPE,
PositionErrorCallback: base_config_1.TYPE,
QueuingStrategySize: base_config_1.TYPE,
RTCPeerConnectionErrorCallback: base_config_1.TYPE,
RTCSessionDescriptionCallback: base_config_1.TYPE,
RemotePlaybackAvailabilityCallback: base_config_1.TYPE,
ResizeObserverCallback: base_config_1.TYPE,
TransformerFlushCallback: base_config_1.TYPE,
TransformerStartCallback: base_config_1.TYPE,
TransformerTransformCallback: base_config_1.TYPE,
UnderlyingSinkAbortCallback: base_config_1.TYPE,
UnderlyingSinkCloseCallback: base_config_1.TYPE,
UnderlyingSinkStartCallback: base_config_1.TYPE,
UnderlyingSinkWriteCallback: base_config_1.TYPE,
UnderlyingSourceCancelCallback: base_config_1.TYPE,
UnderlyingSourcePullCallback: base_config_1.TYPE,
UnderlyingSourceStartCallback: base_config_1.TYPE,
VideoFrameRequestCallback: base_config_1.TYPE,
VoidFunction: base_config_1.TYPE,
HTMLElementTagNameMap: base_config_1.TYPE,
HTMLElementDeprecatedTagNameMap: base_config_1.TYPE,
SVGElementTagNameMap: base_config_1.TYPE,
MathMLElementTagNameMap: base_config_1.TYPE,
ElementTagNameMap: base_config_1.TYPE,
AlgorithmIdentifier: base_config_1.TYPE,
BigInteger: base_config_1.TYPE,
BinaryData: base_config_1.TYPE,
BlobPart: base_config_1.TYPE,
BodyInit: base_config_1.TYPE,
BufferSource: base_config_1.TYPE,
COSEAlgorithmIdentifier: base_config_1.TYPE,
CSSNumberish: base_config_1.TYPE,
CanvasImageSource: base_config_1.TYPE,
ClipboardItemData: base_config_1.TYPE,
ClipboardItems: base_config_1.TYPE,
ConstrainBoolean: base_config_1.TYPE,
ConstrainDOMString: base_config_1.TYPE,
ConstrainDouble: base_config_1.TYPE,
ConstrainULong: base_config_1.TYPE,
DOMHighResTimeStamp: base_config_1.TYPE,
EpochTimeStamp: base_config_1.TYPE,
EventListenerOrEventListenerObject: base_config_1.TYPE,
Float32List: base_config_1.TYPE,
FormDataEntryValue: base_config_1.TYPE,
GLbitfield: base_config_1.TYPE,
GLboolean: base_config_1.TYPE,
GLclampf: base_config_1.TYPE,
GLenum: base_config_1.TYPE,
GLfloat: base_config_1.TYPE,
GLint: base_config_1.TYPE,
GLint64: base_config_1.TYPE,
GLintptr: base_config_1.TYPE,
GLsizei: base_config_1.TYPE,
GLsizeiptr: base_config_1.TYPE,
GLuint: base_config_1.TYPE,
GLuint64: base_config_1.TYPE,
HTMLOrSVGImageElement: base_config_1.TYPE,
HTMLOrSVGScriptElement: base_config_1.TYPE,
HashAlgorithmIdentifier: base_config_1.TYPE,
HeadersInit: base_config_1.TYPE,
IDBValidKey: base_config_1.TYPE,
ImageBitmapSource: base_config_1.TYPE,
Int32List: base_config_1.TYPE,
LineAndPositionSetting: base_config_1.TYPE,
MediaProvider: base_config_1.TYPE,
MessageEventSource: base_config_1.TYPE,
MutationRecordType: base_config_1.TYPE,
NamedCurve: base_config_1.TYPE,
OffscreenRenderingContext: base_config_1.TYPE,
OnBeforeUnloadEventHandler: base_config_1.TYPE,
OnErrorEventHandler: base_config_1.TYPE,
PerformanceEntryList: base_config_1.TYPE,
ReadableStreamController: base_config_1.TYPE,
ReadableStreamReadResult: base_config_1.TYPE,
ReadableStreamReader: base_config_1.TYPE,
RenderingContext: base_config_1.TYPE,
RequestInfo: base_config_1.TYPE,
TexImageSource: base_config_1.TYPE,
TimerHandler: base_config_1.TYPE,
Transferable: base_config_1.TYPE,
Uint32List: base_config_1.TYPE,
VibratePattern: base_config_1.TYPE,
WindowProxy: base_config_1.TYPE,
XMLHttpRequestBodyInit: base_config_1.TYPE,
AlignSetting: base_config_1.TYPE,
AnimationPlayState: base_config_1.TYPE,
AnimationReplaceState: base_config_1.TYPE,
AppendMode: base_config_1.TYPE,
AttestationConveyancePreference: base_config_1.TYPE,
AudioContextLatencyCategory: base_config_1.TYPE,
AudioContextState: base_config_1.TYPE,
AuthenticatorAttachment: base_config_1.TYPE,
AuthenticatorTransport: base_config_1.TYPE,
AutoKeyword: base_config_1.TYPE,
AutomationRate: base_config_1.TYPE,
BinaryType: base_config_1.TYPE,
BiquadFilterType: base_config_1.TYPE,
CanPlayTypeResult: base_config_1.TYPE,
CanvasDirection: base_config_1.TYPE,
CanvasFillRule: base_config_1.TYPE,
CanvasFontKerning: base_config_1.TYPE,
CanvasFontStretch: base_config_1.TYPE,
CanvasFontVariantCaps: base_config_1.TYPE,
CanvasLineCap: base_config_1.TYPE,
CanvasLineJoin: base_config_1.TYPE,
CanvasTextAlign: base_config_1.TYPE,
CanvasTextBaseline: base_config_1.TYPE,
CanvasTextRendering: base_config_1.TYPE,
ChannelCountMode: base_config_1.TYPE,
ChannelInterpretation: base_config_1.TYPE,
ClientTypes: base_config_1.TYPE,
ColorGamut: base_config_1.TYPE,
ColorSpaceConversion: base_config_1.TYPE,
CompositeOperation: base_config_1.TYPE,
CompositeOperationOrAuto: base_config_1.TYPE,
CredentialMediationRequirement: base_config_1.TYPE,
DOMParserSupportedType: base_config_1.TYPE,
DirectionSetting: base_config_1.TYPE,
DisplayCaptureSurfaceType: base_config_1.TYPE,
DistanceModelType: base_config_1.TYPE,
DocumentReadyState: base_config_1.TYPE,
DocumentVisibilityState: base_config_1.TYPE,
EndOfStreamError: base_config_1.TYPE,
EndingType: base_config_1.TYPE,
FileSystemHandleKind: base_config_1.TYPE,
FillMode: base_config_1.TYPE,
FontDisplay: base_config_1.TYPE,
FontFaceLoadStatus: base_config_1.TYPE,
FontFaceSetLoadStatus: base_config_1.TYPE,
FullscreenNavigationUI: base_config_1.TYPE,
GamepadHapticActuatorType: base_config_1.TYPE,
GamepadMappingType: base_config_1.TYPE,
GlobalCompositeOperation: base_config_1.TYPE,
HdrMetadataType: base_config_1.TYPE,
IDBCursorDirection: base_config_1.TYPE,
IDBRequestReadyState: base_config_1.TYPE,
IDBTransactionDurability: base_config_1.TYPE,
IDBTransactionMode: base_config_1.TYPE,
ImageOrientation: base_config_1.TYPE,
ImageSmoothingQuality: base_config_1.TYPE,
InsertPosition: base_config_1.TYPE,
IterationCompositeOperation: base_config_1.TYPE,
KeyFormat: base_config_1.TYPE,
KeyType: base_config_1.TYPE,
KeyUsage: base_config_1.TYPE,
LineAlignSetting: base_config_1.TYPE,
LockMode: base_config_1.TYPE,
MIDIPortConnectionState: base_config_1.TYPE,
MIDIPortDeviceState: base_config_1.TYPE,
MIDIPortType: base_config_1.TYPE,
MediaDecodingType: base_config_1.TYPE,
MediaDeviceKind: base_config_1.TYPE,
MediaEncodingType: base_config_1.TYPE,
MediaKeyMessageType: base_config_1.TYPE,
MediaKeySessionClosedReason: base_config_1.TYPE,
MediaKeySessionType: base_config_1.TYPE,
MediaKeyStatus: base_config_1.TYPE,
MediaKeysRequirement: base_config_1.TYPE,
MediaSessionAction: base_config_1.TYPE,
MediaSessionPlaybackState: base_config_1.TYPE,
MediaStreamTrackState: base_config_1.TYPE,
NavigationTimingType: base_config_1.TYPE,
NotificationDirection: base_config_1.TYPE,
NotificationPermission: base_config_1.TYPE,
OffscreenRenderingContextId: base_config_1.TYPE,
OrientationLockType: base_config_1.TYPE,
OrientationType: base_config_1.TYPE,
OscillatorType: base_config_1.TYPE,
OverSampleType: base_config_1.TYPE,
PanningModelType: base_config_1.TYPE,
PaymentComplete: base_config_1.TYPE,
PermissionName: base_config_1.TYPE,
PermissionState: base_config_1.TYPE,
PlaybackDirection: base_config_1.TYPE,
PositionAlignSetting: base_config_1.TYPE,
PredefinedColorSpace: base_config_1.TYPE,
PremultiplyAlpha: base_config_1.TYPE,
PresentationStyle: base_config_1.TYPE,
PublicKeyCredentialType: base_config_1.TYPE,
PushEncryptionKeyName: base_config_1.TYPE,
RTCBundlePolicy: base_config_1.TYPE,
RTCDataChannelState: base_config_1.TYPE,
RTCDegradationPreference: base_config_1.TYPE,
RTCDtlsTransportState: base_config_1.TYPE,
RTCEncodedVideoFrameType: base_config_1.TYPE,
RTCErrorDetailType: base_config_1.TYPE,
RTCIceCandidateType: base_config_1.TYPE,
RTCIceComponent: base_config_1.TYPE,
RTCIceConnectionState: base_config_1.TYPE,
RTCIceGathererState: base_config_1.TYPE,
RTCIceGatheringState: base_config_1.TYPE,
RTCIceProtocol: base_config_1.TYPE,
RTCIceTcpCandidateType: base_config_1.TYPE,
RTCIceTransportPolicy: base_config_1.TYPE,
RTCIceTransportState: base_config_1.TYPE,
RTCPeerConnectionState: base_config_1.TYPE,
RTCPriorityType: base_config_1.TYPE,
RTCRtcpMuxPolicy: base_config_1.TYPE,
RTCRtpTransceiverDirection: base_config_1.TYPE,
RTCSctpTransportState: base_config_1.TYPE,
RTCSdpType: base_config_1.TYPE,
RTCSignalingState: base_config_1.TYPE,
RTCStatsIceCandidatePairState: base_config_1.TYPE,
RTCStatsType: base_config_1.TYPE,
ReadableStreamReaderMode: base_config_1.TYPE,
ReadableStreamType: base_config_1.TYPE,
ReadyState: base_config_1.TYPE,
RecordingState: base_config_1.TYPE,
ReferrerPolicy: base_config_1.TYPE,
RemotePlaybackState: base_config_1.TYPE,
RequestCache: base_config_1.TYPE,
RequestCredentials: base_config_1.TYPE,
RequestDestination: base_config_1.TYPE,
RequestMode: base_config_1.TYPE,
RequestRedirect: base_config_1.TYPE,
ResidentKeyRequirement: base_config_1.TYPE,
ResizeObserverBoxOptions: base_config_1.TYPE,
ResizeQuality: base_config_1.TYPE,
ResponseType: base_config_1.TYPE,
ScrollBehavior: base_config_1.TYPE,
ScrollLogicalPosition: base_config_1.TYPE,
ScrollRestoration: base_config_1.TYPE,
ScrollSetting: base_config_1.TYPE,
SecurityPolicyViolationEventDisposition: base_config_1.TYPE,
SelectionMode: base_config_1.TYPE,
ServiceWorkerState: base_config_1.TYPE,
ServiceWorkerUpdateViaCache: base_config_1.TYPE,
ShadowRootMode: base_config_1.TYPE,
SlotAssignmentMode: base_config_1.TYPE,
SpeechSynthesisErrorCode: base_config_1.TYPE,
TextTrackKind: base_config_1.TYPE,
TextTrackMode: base_config_1.TYPE,
TouchType: base_config_1.TYPE,
TransferFunction: base_config_1.TYPE,
UserVerificationRequirement: base_config_1.TYPE,
VideoColorPrimaries: base_config_1.TYPE,
VideoFacingModeEnum: base_config_1.TYPE,
VideoMatrixCoefficients: base_config_1.TYPE,
VideoTransferCharacteristics: base_config_1.TYPE,
WebGLPowerPreference: base_config_1.TYPE,
WorkerType: base_config_1.TYPE,
XMLHttpRequestResponseType: base_config_1.TYPE
};
}
});
// ../../node_modules/.pnpm/@typescript-eslint+scope-manager@5.62.0/node_modules/@typescript-eslint/scope-manager/dist/lib/dom.iterable.js
var require_dom_iterable = __commonJS({
"../../node_modules/.pnpm/@typescript-eslint+scope-manager@5.62.0/node_modules/@typescript-eslint/scope-manager/dist/lib/dom.iterable.js"(exports) {
"use strict";
init_shims();
Object.defineProperty(exports, "__esModule", { value: true });
exports.dom_iterable = void 0;
var base_config_1 = require_base_config();
exports.dom_iterable = {
AudioParam: base_config_1.TYPE,
AudioParamMap: base_config_1.TYPE,
BaseAudioContext: base_config_1.TYPE,
CSSKeyframesRule: base_config_1.TYPE,
CSSRuleList: base_config_1.TYPE,
CSSStyleDeclaration: base_config_1.TYPE,
Cache: base_config_1.TYPE,
CanvasPath: base_config_1.TYPE,
CanvasPathDrawingStyles: base_config_1.TYPE,
DOMRectList: base_config_1.TYPE,
DOMStringList: base_config_1.TYPE,
DOMTokenList: base_config_1.TYPE,
DataTransferItemList: base_config_1.TYPE,
EventCounts: base_config_1.TYPE,
FileList: base_config_1.TYPE,
FontFaceSet: base_config_1.TYPE,
FormData: base_config_1.TYPE,
HTMLAllCollection: base_config_1.TYPE,
HTMLCollectionBase: base_config_1.TYPE,
HTMLCollectionOf: base_config_1.TYPE,
HTMLFormElement: base_config_1.TYPE,
HTMLSelectElement: base_config_1.TYPE,
Headers: base_config_1.TYPE,
IDBDatabase: base_config_1.TYPE,
IDBObjectStore: base_config_1.TYPE,
MIDIInputMap: base_config_1.TYPE,
MIDIOutput: base_config_1.TYPE,
MIDIOutputMap: base_config_1.TYPE,
MediaKeyStatusMap: base_config_1.TYPE,
MediaList: base_config_1.TYPE,
MessageEvent: base_config_1.TYPE,
MimeTypeArray: base_config_1.TYPE,
NamedNodeMap: base_config_1.TYPE,
Navigator: base_config_1.TYPE,
NodeList: base_config_1.TYPE,
NodeListOf: base_config_1.TYPE,
Plugin: base_config_1.TYPE,
PluginArray: base_config_1.TYPE,
RTCRtpTransceiver: base_config_1.TYPE,
RTCStatsReport: base_config_1.TYPE,
SVGLengthList: base_config_1.TYPE,
SVGNumberList: base_config_1.TYPE,
SVGPointList: base_config_1.TYPE,
SVGStringList: base_config_1.TYPE,
SVGTransformList: base_config_1.TYPE,
SourceBufferList: base_config_1.TYPE,
SpeechRecognitionResult: base_config_1.TYPE,
SpeechRecognitionResultList: base_config_1.TYPE,
StyleSheetList: base_config_1.TYPE,
SubtleCrypto: base_config_1.TYPE,
TextTrackCueList: base_config_1.TYPE,
TextTrackList: base_config_1.TYPE,
TouchList: base_config_1.TYPE,
URLSearchParams: base_config_1.TYPE,
WEBGL_draw_buffers: base_config_1.TYPE,
WEBGL_multi_draw: base_config_1.TYPE,
WebGL2RenderingContextBase: base_config_1.TYPE,
WebGL2RenderingContextOverloads: base_config_1.TYPE,
WebGLRenderingContextBase: base_config_1.TYPE,
WebGLRenderingContextOverloads: base_config_1.TYPE
};
}
});
// ../../node_modules/.pnpm/@typescript-eslint+scope-manager@5.62.0/node_modules/@typescript-eslint/scope-manager/dist/lib/es5.js
var require_es5 = __commonJS({
"../../node_modules/.pnpm/@typescript-eslint+scope-manager@5.62.0/node_modules/@typescript-eslint/scope-manager/dist/lib/es5.js"(exports) {
"use strict";
init_shims();
Object.defineProperty(exports, "__esModule", { value: true });
exports.es5 = void 0;
var base_config_1 = require_base_config();
var decorators_1 = require_decorators();
var decorators_legacy_1 = require_decorators_legacy();
exports.es5 = Object.assign(Object.assign(Object.assign({}, decorators_1.decorators), decorators_legacy_1.decorators_legacy), { Symbol: base_config_1.TYPE, PropertyKey: base_config_1.TYPE, PropertyDescriptor: base_config_1.TYPE, PropertyDescriptorMap: base_config_1.TYPE, Object: base_config_1.TYPE_VALUE, ObjectConstructor: base_config_1.TYPE, Function: base_config_1.TYPE_VALUE, FunctionConstructor: base_config_1.TYPE, ThisParameterType: base_config_1.TYPE, OmitThisParameter: base_config_1.TYPE, CallableFunction: base_config_1.TYPE, NewableFunction: base_config_1.TYPE, IArguments: base_config_1.TYPE, String: base_config_1.TYPE_VALUE, StringConstructor: base_config_1.TYPE, Boolean: base_config_1.TYPE_VALUE, BooleanConstructor: base_config_1.TYPE, Number: base_config_1.TYPE_VALUE, NumberConstructor: base_config_1.TYPE, TemplateStringsArray: base_config_1.TYPE, ImportMeta: base_config_1.TYPE, ImportCallOptions: base_config_1.TYPE, ImportAssertions: base_config_1.TYPE, Math: base_config_1.TYPE_VALUE, Date: base_config_1.TYPE_VALUE, DateConstructor: base_config_1.TYPE, RegExpMatchArray: base_config_1.TYPE, RegExpExecArray: base_config_1.TYPE, RegExp: base_config_1.TYPE_VALUE, RegExpConstructor: base_config_1.TYPE, Error: base_config_1.TYPE_VALUE, ErrorConstructor: base_config_1.TYPE, EvalError: base_config_1.TYPE_VALUE, EvalErrorConstructor: base_config_1.TYPE, RangeError: base_config_1.TYPE_VALUE, RangeErrorConstructor: base_config_1.TYPE, ReferenceError: base_config_1.TYPE_VALUE, ReferenceErrorConstructor: base_config_1.TYPE, SyntaxError: base_config_1.TYPE_VALUE, SyntaxErrorConstructor: base_config_1.TYPE, TypeError: base_config_1.TYPE_VALUE, TypeErrorConstructor: base_config_1.TYPE, URIError: base_config_1.TYPE_VALUE, URIErrorConstructor: base_config_1.TYPE, JSON: base_config_1.TYPE_VALUE, ReadonlyArray: base_config_1.TYPE, ConcatArray: base_config_1.TYPE, Array: base_config_1.TYPE_VALUE, ArrayConstructor: base_config_1.TYPE, TypedPropertyDescriptor: base_config_1.TYPE, PromiseConstructorLike: base_config_1.TYPE, PromiseLike: base_config_1.TYPE, Promise: base_config_1.TYPE, Awaited: base_config_1.TYPE, ArrayLike: base_config_1.TYPE, Partial: base_config_1.TYPE, Required: base_config_1.TYPE, Readonly: base_config_1.TYPE, Pick: base_config_1.TYPE, Record: base_config_1.TYPE, Exclude: base_config_1.TYPE, Extract: base_config_1.TYPE, Omit: base_config_1.TYPE, NonNullable: base_config_1.TYPE, Parameters: base_config_1.TYPE, ConstructorParameters: base_config_1.TYPE, ReturnType: base_config_1.TYPE, InstanceType: base_config_1.TYPE, Uppercase: base_config_1.TYPE, Lowercase: base_config_1.TYPE, Capitalize: base_config_1.TYPE, Uncapitalize: base_config_1.TYPE, ThisType: base_config_1.TYPE, ArrayBuffer: base_config_1.TYPE_VALUE, ArrayBufferTypes: base_config_1.TYPE, ArrayBufferLike: base_config_1.TYPE, ArrayBufferConstructor: base_config_1.TYPE, ArrayBufferView: base_config_1.TYPE, DataView: base_config_1.TYPE_VALUE, DataViewConstructor: base_config_1.TYPE, Int8Array: base_config_1.TYPE_VALUE, Int8ArrayConstructor: base_config_1.TYPE, Uint8Array: base_config_1.TYPE_VALUE, Uint8ArrayConstructor: base_config_1.TYPE, Uint8ClampedArray: base_config_1.TYPE_VALUE, Uint8ClampedArrayConstructor: base_config_1.TYPE, Int16Array: base_config_1.TYPE_VALUE, Int16ArrayConstructor: base_config_1.TYPE, Uint16Array: base_config_1.TYPE_VALUE, Uint16ArrayConstructor: base_config_1.TYPE, Int32Array: base_config_1.TYPE_VALUE, Int32ArrayConstructor: base_config_1.TYPE, Uint32Array: base_config_1.TYPE_VALUE, Uint32ArrayConstructor: base_config_1.TYPE, Float32Array: base_config_1.TYPE_VALUE, Float32ArrayConstructor: base_config_1.TYPE, Float64Array: base_config_1.TYPE_VALUE, Float64ArrayConstructor: base_config_1.TYPE, Intl: base_config_1.TYPE_VALUE });
}
});
// ../../node_modules/.pnpm/@typescript-eslint+scope-manager@5.62.0/node_modules/@typescript-eslint/scope-manager/dist/lib/es2015.collection.js
var require_es2015_collection = __commonJS({
"../../node_modules/.pnpm/@typescript-eslint+scope-manager@5.62.0/node_modules/@typescript-eslint/scope-manager/dist/lib/es2015.collection.js"(exports) {
"use strict";
init_shims();
Object.defineProperty(exports, "__esModule", { value: true });
exports.es2015_collection = void 0;
var base_config_1 = require_base_config();
exports.es2015_collection = {
Map: base_config_1.TYPE_VALUE,
MapConstructor: base_config_1.TYPE,
ReadonlyMap: base_config_1.TYPE,
WeakMap: base_config_1.TYPE_VALUE,
WeakMapConstructor: base_config_1.TYPE,
Set: base_config_1.TYPE_VALUE,
SetConstructor: base_config_1.TYPE,
ReadonlySet: base_config_1.TYPE,
WeakSet: base_config_1.TYPE_VALUE,
WeakSetConstructor: base_config_1.TYPE
};
}
});
// ../../node_modules/.pnpm/@typescript-eslint+scope-manager@5.62.0/node_modules/@typescript-eslint/scope-manager/dist/lib/es2015.core.js
var require_es2015_core = __commonJS({
"../../node_modules/.pnpm/@typescript-eslint+scope-manager@5.62.0/node_modules/@typescript-eslint/scope-manager/dist/lib/es2015.core.js"(exports) {
"use strict";
init_shims();
Object.defineProperty(exports, "__esModule", { value: true });
exports.es2015_core = void 0;
var base_config_1 = require_base_config();
exports.es2015_core = {
Array: base_config_1.TYPE,
ArrayConstructor: base_config_1.TYPE,
DateConstructor: base_config_1.TYPE,
Function: base_config_1.TYPE,
Math: base_config_1.TYPE,
NumberConstructor: base_config_1.TYPE,
ObjectConstructor: base_config_1.TYPE,
ReadonlyArray: base_config_1.TYPE,
RegExp: base_config_1.TYPE,
RegExpConstructor: base_config_1.TYPE,
String: base_config_1.TYPE,
StringConstructor: base_config_1.TYPE
};
}
});
// ../../node_modules/.pnpm/@typescript-eslint+scope-manager@5.62.0/node_modules/@typescript-eslint/scope-manager/dist/lib/es2015.symbol.js
var require_es2015_symbol = __commonJS({
"../../node_modules/.pnpm/@typescript-eslint+scope-manager@5.62.0/node_modules/@typescript-eslint/scope-manager/dist/lib/es2015.symbol.js"(exports) {
"use strict";
init_shims();
Object.defineProperty(exports, "__esModule", { value: true });
exports.es2015_symbol = void 0;
var base_config_1 = require_base_config();
exports.es2015_symbol = {
SymbolConstructor: base_config_1.TYPE
};
}
});
// ../../node_modules/.pnpm/@typescript-eslint+scope-manager@5.62.0/node_modules/@typescript-eslint/scope-manager/dist/lib/es2015.iterable.js
var require_es2015_iterable = __commonJS({
"../../node_modules/.pnpm/@typescript-eslint+scope-manager@5.62.0/node_modules/@typescript-eslint/scope-manager/dist/lib/es2015.iterable.js"(exports) {
"use strict";
init_shims();
Object.defineProperty(exports, "__esModule", { value: true });
exports.es2015_iterable = void 0;
var base_config_1 = require_base_config();
var es2015_symbol_1 = require_es2015_symbol();
exports.es2015_iterable = Object.assign(Object.assign({}, es2015_symbol_1.es2015_symbol), { SymbolConstructor: base_config_1.TYPE, IteratorYieldResult: base_config_1.TYPE, IteratorReturnResult: base_config_1.TYPE, IteratorResult: base_config_1.TYPE, Iterator: base_config_1.TYPE, Iterable: base_config_1.TYPE, IterableIterator: base_config_1.TYPE, Array: base_config_1.TYPE, ArrayConstructor: base_config_1.TYPE, ReadonlyArray: base_config_1.TYPE, IArguments: base_config_1.TYPE, Map: base_config_1.TYPE, ReadonlyMap: base_config_1.TYPE, MapConstructor: base_config_1.TYPE, WeakMap: base_config_1.TYPE, WeakMapConstructor: base_config_1.TYPE, Set: base_config_1.TYPE, ReadonlySet: base_config_1.TYPE, SetConstructor: base_config_1.TYPE, WeakSet: base_config_1.TYPE, WeakSetConstructor: base_config_1.TYPE, Promise: base_config_1.TYPE, PromiseConstructor: base_config_1.TYPE, String: base_config_1.TYPE, Int8Array: base_config_1.TYPE, Int8ArrayConstructor: base_config_1.TYPE, Uint8Array: base_config_1.TYPE, Uint8ArrayConstructor: base_config_1.TYPE, Uint8ClampedArray: base_config_1.TYPE, Uint8ClampedArrayConstructor: base_config_1.TYPE, Int16Array: base_config_1.TYPE, Int16ArrayConstructor: base_config_1.TYPE, Uint16Array: base_config_1.TYPE, Uint16ArrayConstructor: base_config_1.TYPE, Int32Array: base_config_1.TYPE, Int32ArrayConstructor: base_config_1.TYPE, Uint32Array: base_config_1.TYPE, Uint32ArrayConstructor: base_config_1.TYPE, Float32Array: base_config_1.TYPE, Float32ArrayConstructor: base_config_1.TYPE, Float64Array: base_config_1.TYPE, Float64ArrayConstructor: base_config_1.TYPE });
}
});
// ../../node_modules/.pnpm/@typescript-eslint+scope-manager@5.62.0/node_modules/@typescript-eslint/scope-manager/dist/lib/es2015.generator.js
var require_es2015_generator = __commonJS({
"../../node_modules/.pnpm/@typescript-eslint+scope-manager@5.62.0/node_modules/@typescript-eslint/scope-manager/dist/lib/es2015.generator.js"(exports) {
"use strict";
init_shims();
Object.defineProperty(exports, "__esModule", { value: true });
exports.es2015_generator = void 0;
var base_config_1 = require_base_config();
var es2015_iterable_1 = require_es2015_iterable();
exports.es2015_generator = Object.assign(Object.assign({}, es2015_iterable_1.es2015_iterable), { Generator: base_config_1.TYPE, GeneratorFunction: base_config_1.TYPE, GeneratorFunctionConstructor: base_config_1.TYPE });
}
});
// ../../node_modules/.pnpm/@typescript-eslint+scope-manager@5.62.0/node_modules/@typescript-eslint/scope-manager/dist/lib/es2015.promise.js
var require_es2015_promise = __commonJS({
"../../node_modules/.pnpm/@typescript-eslint+scope-manager@5.62.0/node_modules/@typescript-eslint/scope-manager/dist/lib/es2015.promise.js"(exports) {
"use strict";
init_shims();
Object.defineProperty(exports, "__esModule", { value: true });
exports.es2015_promise = void 0;
var base_config_1 = require_base_config();
exports.es2015_promise = {
PromiseConstructor: base_config_1.TYPE
};
}
});
// ../../node_modules/.pnpm/@typescript-eslint+scope-manager@5.62.0/node_modules/@typescript-eslint/scope-manager/dist/lib/es2015.proxy.js
var require_es2015_proxy = __commonJS({
"../../node_modules/.pnpm/@typescript-eslint+scope-manager@5.62.0/node_modules/@typescript-eslint/scope-manager/dist/lib/es2015.proxy.js"(exports) {
"use strict";
init_shims();
Object.defineProperty(exports, "__esModule", { value: true });
exports.es2015_proxy = void 0;
var base_config_1 = require_base_config();
exports.es2015_proxy = {
ProxyHandler: base_config_1.TYPE,
ProxyConstructor: base_config_1.TYPE
};
}
});
// ../../node_modules/.pnpm/@typescript-eslint+scope-manager@5.62.0/node_modules/@typescript-eslint/scope-manager/dist/lib/es2015.reflect.js
var require_es2015_reflect = __commonJS({
"../../node_modules/.pnpm/@typescript-eslint+scope-manager@5.62.0/node_modules/@typescript-eslint/scope-manager/dist/lib/es2015.reflect.js"(exports) {
"use strict";
init_shims();
Object.defineProperty(exports, "__esModule", { value: true });
exports.es2015_reflect = void 0;
var base_config_1 = require_base_config();
exports.es2015_reflect = {
Reflect: base_config_1.TYPE_VALUE
};
}
});
// ../../node_modules/.pnpm/@typescript-eslint+scope-manager@5.62.0/node_modules/@typescript-eslint/scope-manager/dist/lib/es2015.symbol.wellknown.js
var require_es2015_symbol_wellknown = __commonJS({
"../../node_modules/.pnpm/@typescript-eslint+scope-manager@5.62.0/node_modules/@typescript-eslint/scope-manager/dist/lib/es2015.symbol.wellknown.js"(exports) {
"use strict";
init_shims();
Object.defineProperty(exports, "__esModule", { value: true });
exports.es2015_symbol_wellknown = void 0;
var base_config_1 = require_base_config();
var es2015_symbol_1 = require_es2015_symbol();
exports.es2015_symbol_wellknown = Object.assign(Object.assign({}, es2015_symbol_1.es2015_symbol), { SymbolConstructor: base_config_1.TYPE, Symbol: base_config_1.TYPE, Array: base_config_1.TYPE, ReadonlyArray: base_config_1.TYPE, Date: base_config_1.TYPE, Map: base_config_1.TYPE, WeakMap: base_config_1.TYPE, Set: base_config_1.TYPE, WeakSet: base_config_1.TYPE, JSON: base_config_1.TYPE, Function: base_config_1.TYPE, GeneratorFunction: base_config_1.TYPE, Math: base_config_1.TYPE, Promise: base_config_1.TYPE, PromiseConstructor: base_config_1.TYPE, RegExp: base_config_1.TYPE, RegExpConstructor: base_config_1.TYPE, String: base_config_1.TYPE, ArrayBuffer: base_config_1.TYPE, DataView: base_config_1.TYPE, Int8Array: base_config_1.TYPE, Uint8Array: base_config_1.TYPE, Uint8ClampedArray: base_config_1.TYPE, Int16Array: base_config_1.TYPE, Uint16Array: base_config_1.TYPE, Int32Array: base_config_1.TYPE, Uint32Array: base_config_1.TYPE, Float32Array: base_config_1.TYPE, Float64Array: base_config_1.TYPE, ArrayConstructor: base_config_1.TYPE, MapConstructor: base_config_1.TYPE, SetConstructor: base_config_1.TYPE, ArrayBufferConstructor: base_config_1.TYPE });
}
});
// ../../node_modules/.pnpm/@typescript-eslint+scope-manager@5.62.0/node_modules/@typescript-eslint/scope-manager/dist/lib/es6.js
var require_es6 = __commonJS({
"../../node_modules/.pnpm/@typescript-eslint+scope-manager@5.62.0/node_modules/@typescript-eslint/scope-manager/dist/lib/es6.js"(exports) {
"use strict";
init_shims();
Object.defineProperty(exports, "__esModule", { value: true });
exports.es6 = void 0;
var es5_1 = require_es5();
var es2015_collection_1 = require_es2015_collection();
var es2015_core_1 = require_es2015_core();
var es2015_generator_1 = require_es2015_generator();
var es2015_iterable_1 = require_es2015_iterable();
var es2015_promise_1 = require_es2015_promise();
var es2015_proxy_1 = require_es2015_proxy();
var es2015_reflect_1 = require_es2015_reflect();
var es2015_symbol_1 = require_es2015_symbol();
var es2015_symbol_wellknown_1 = require_es2015_symbol_wellknown();
exports.es6 = Object.assign(Object.assign(Object.assign(Object.assign(Object.assign(Object.assign(Object.assign(Object.assign(Object.assign(Object.assign({}, es5_1.es5), es2015_core_1.es2015_core), es2015_collection_1.es2015_collection), es2015_iterable_1.es2015_iterable), es2015_generator_1.es2015_generator), es2015_promise_1.es2015_promise), es2015_proxy_1.es2015_proxy), es2015_reflect_1.es2015_reflect), es2015_symbol_1.es2015_symbol), es2015_symbol_wellknown_1.es2015_symbol_wellknown);
}
});
// ../../node_modules/.pnpm/@typescript-eslint+scope-manager@5.62.0/node_modules/@typescript-eslint/scope-manager/dist/lib/es2015.js
var require_es2015 = __commonJS({
"../../node_modules/.pnpm/@typescript-eslint+scope-manager@5.62.0/node_modules/@typescript-eslint/scope-manager/dist/lib/es2015.js"(exports) {
"use strict";
init_shims();
Object.defineProperty(exports, "__esModule", { value: true });
exports.es2015 = void 0;
var es5_1 = require_es5();
var es2015_collection_1 = require_es2015_collection();
var es2015_core_1 = require_es2015_core();
var es2015_generator_1 = require_es2015_generator();
var es2015_iterable_1 = require_es2015_iterable();
var es2015_promise_1 = require_es2015_promise();
var es2015_proxy_1 = require_es2015_proxy();
var es2015_reflect_1 = require_es2015_reflect();
var es2015_symbol_1 = require_es2015_symbol();
var es2015_symbol_wellknown_1 = require_es2015_symbol_wellknown();
exports.es2015 = Object.assign(Object.assign(Object.assign(Object.assign(Object.assign(Object.assign(Object.assign(Object.assign(Object.assign(Object.assign({}, es5_1.es5), es2015_core_1.es2015_core), es2015_collection_1.es2015_collection), es2015_iterable_1.es2015_iterable), es2015_generator_1.es2015_generator), es2015_promise_1.es2015_promise), es2015_proxy_1.es2015_proxy), es2015_reflect_1.es2015_reflect), es2015_symbol_1.es2015_symbol), es2015_symbol_wellknown_1.es2015_symbol_wellknown);
}
});
// ../../node_modules/.pnpm/@typescript-eslint+scope-manager@5.62.0/node_modules/@typescript-eslint/scope-manager/dist/lib/es2016.array.include.js
var require_es2016_array_include = __commonJS({
"../../node_modules/.pnpm/@typescript-eslint+scope-manager@5.62.0/node_modules/@typescript-eslint/scope-manager/dist/lib/es2016.array.include.js"(exports) {
"use strict";
init_shims();
Object.defineProperty(exports, "__esModule", { value: true });
exports.es2016_array_include = void 0;
var base_config_1 = require_base_config();
exports.es2016_array_include = {
Array: base_config_1.TYPE,
ReadonlyArray: base_config_1.TYPE,
Int8Array: base_config_1.TYPE,
Uint8Array: base_config_1.TYPE,
Uint8ClampedArray: base_config_1.TYPE,
Int16Array: base_config_1.TYPE,
Uint16Array: base_config_1.TYPE,
Int32Array: base_config_1.TYPE,
Uint32Array: base_config_1.TYPE,
Float32Array: base_config_1.TYPE,
Float64Array: base_config_1.TYPE
};
}
});
// ../../node_modules/.pnpm/@typescript-eslint+scope-manager@5.62.0/node_modules/@typescript-eslint/scope-manager/dist/lib/es7.js
var require_es7 = __commonJS({
"../../node_modules/.pnpm/@typescript-eslint+scope-manager@5.62.0/node_modules/@typescript-eslint/scope-manager/dist/lib/es7.js"(exports) {
"use strict";
init_shims();
Object.defineProperty(exports, "__esModule", { value: true });
exports.es7 = void 0;
var es2015_1 = require_es2015();
var es2016_array_include_1 = require_es2016_array_include();
exports.es7 = Object.assign(Object.assign({}, es2015_1.es2015), es2016_array_include_1.es2016_array_include);
}
});
// ../../node_modules/.pnpm/@typescript-eslint+scope-manager@5.62.0/node_modules/@typescript-eslint/scope-manager/dist/lib/es2016.js
var require_es2016 = __commonJS({
"../../node_modules/.pnpm/@typescript-eslint+scope-manager@5.62.0/node_modules/@typescript-eslint/scope-manager/dist/lib/es2016.js"(exports) {
"use strict";
init_shims();
Object.defineProperty(exports, "__esModule", { value: true });
exports.es2016 = void 0;
var es2015_1 = require_es2015();
var es2016_array_include_1 = require_es2016_array_include();
exports.es2016 = Object.assign(Object.assign({}, es2015_1.es2015), es2016_array_include_1.es2016_array_include);
}
});
// ../../node_modules/.pnpm/@typescript-eslint+scope-manager@5.62.0/node_modules/@typescript-eslint/scope-manager/dist/lib/scripthost.js
var require_scripthost = __commonJS({
"../../node_modules/.pnpm/@typescript-eslint+scope-manager@5.62.0/node_modules/@typescript-eslint/scope-manager/dist/lib/scripthost.js"(exports) {
"use strict";
init_shims();
Object.defineProperty(exports, "__esModule", { value: true });
exports.scripthost = void 0;
var base_config_1 = require_base_config();
exports.scripthost = {
ActiveXObject: base_config_1.TYPE_VALUE,
ITextWriter: base_config_1.TYPE,
TextStreamBase: base_config_1.TYPE,
TextStreamWriter: base_config_1.TYPE,
TextStreamReader: base_config_1.TYPE,
SafeArray: base_config_1.TYPE_VALUE,
Enumerator: base_config_1.TYPE_VALUE,
EnumeratorConstructor: base_config_1.TYPE,
VBArray: base_config_1.TYPE_VALUE,
VBArrayConstructor: base_config_1.TYPE,
VarDate: base_config_1.TYPE_VALUE,
DateConstructor: base_config_1.TYPE,
Date: base_config_1.TYPE
};
}
});
// ../../node_modules/.pnpm/@typescript-eslint+scope-manager@5.62.0/node_modules/@typescript-eslint/scope-manager/dist/lib/webworker.importscripts.js
var require_webworker_importscripts = __commonJS({
"../../node_modules/.pnpm/@typescript-eslint+scope-manager@5.62.0/node_modules/@typescript-eslint/scope-manager/dist/lib/webworker.importscripts.js"(exports) {
"use strict";
init_shims();
Object.defineProperty(exports, "__esModule", { value: true });
exports.webworker_importscripts = void 0;
exports.webworker_importscripts = {};
}
});
// ../../node_modules/.pnpm/@typescript-eslint+scope-manager@5.62.0/node_modules/@typescript-eslint/scope-manager/dist/lib/es2016.full.js
var require_es2016_full = __commonJS({
"../../node_modules/.pnpm/@typescript-eslint+scope-manager@5.62.0/node_modules/@typescript-eslint/scope-manager/dist/lib/es2016.full.js"(exports) {
"use strict";
init_shims();
Object.defineProperty(exports, "__esModule", { value: true });
exports.es2016_full = void 0;
var dom_1 = require_dom();
var dom_iterable_1 = require_dom_iterable();
var es2016_1 = require_es2016();
var scripthost_1 = require_scripthost();
var webworker_importscripts_1 = require_webworker_importscripts();
exports.es2016_full = Object.assign(Object.assign(Object.assign(Object.assign(Object.assign({}, es2016_1.es2016), dom_1.dom), webworker_importscripts_1.webworker_importscripts), scripthost_1.scripthost), dom_iterable_1.dom_iterable);
}
});
// ../../node_modules/.pnpm/@typescript-eslint+scope-manager@5.62.0/node_modules/@typescript-eslint/scope-manager/dist/lib/es2017.intl.js
var require_es2017_intl = __commonJS({
"../../node_modules/.pnpm/@typescript-eslint+scope-manager@5.62.0/node_modules/@typescript-eslint/scope-manager/dist/lib/es2017.intl.js"(exports) {
"use strict";
init_shims();
Object.defineProperty(exports, "__esModule", { value: true });
exports.es2017_intl = void 0;
var base_config_1 = require_base_config();
exports.es2017_intl = {
Intl: base_config_1.TYPE_VALUE
};
}
});
// ../../node_modules/.pnpm/@typescript-eslint+scope-manager@5.62.0/node_modules/@typescript-eslint/scope-manager/dist/lib/es2017.object.js
var require_es2017_object = __commonJS({
"../../node_modules/.pnpm/@typescript-eslint+scope-manager@5.62.0/node_modules/@typescript-eslint/scope-manager/dist/lib/es2017.object.js"(exports) {
"use strict";
init_shims();
Object.defineProperty(exports, "__esModule", { value: true });
exports.es2017_object = void 0;
var base_config_1 = require_base_config();
exports.es2017_object = {
ObjectConstructor: base_config_1.TYPE
};
}
});
// ../../node_modules/.pnpm/@typescript-eslint+scope-manager@5.62.0/node_modules/@typescript-eslint/scope-manager/dist/lib/es2017.sharedmemory.js
var require_es2017_sharedmemory = __commonJS({
"../../node_modules/.pnpm/@typescript-eslint+scope-manager@5.62.0/node_modules/@typescript-eslint/scope-manager/dist/lib/es2017.sharedmemory.js"(exports) {
"use strict";
init_shims();
Object.defineProperty(exports, "__esModule", { value: true });
exports.es2017_sharedmemory = void 0;
var base_config_1 = require_base_config();
var es2015_symbol_1 = require_es2015_symbol();
var es2015_symbol_wellknown_1 = require_es2015_symbol_wellknown();
exports.es2017_sharedmemory = Object.assign(Object.assign(Object.assign({}, es2015_symbol_1.es2015_symbol), es2015_symbol_wellknown_1.es2015_symbol_wellknown), { SharedArrayBuffer: base_config_1.TYPE_VALUE, SharedArrayBufferConstructor: base_config_1.TYPE, ArrayBufferTypes: base_config_1.TYPE, Atomics: base_config_1.TYPE_VALUE });
}
});
// ../../node_modules/.pnpm/@typescript-eslint+scope-manager@5.62.0/node_modules/@typescript-eslint/scope-manager/dist/lib/es2017.string.js
var require_es2017_string = __commonJS({
"../../node_modules/.pnpm/@typescript-eslint+scope-manager@5.62.0/node_modules/@typescript-eslint/scope-manager/dist/lib/es2017.string.js"(exports) {
"use strict";
init_shims();
Object.defineProperty(exports, "__esModule", { value: true });
exports.es2017_string = void 0;
var base_config_1 = require_base_config();
exports.es2017_string = {
String: base_config_1.TYPE
};
}
});
// ../../node_modules/.pnpm/@typescript-eslint+scope-manager@5.62.0/node_modules/@typescript-eslint/scope-manager/dist/lib/es2017.typedarrays.js
var require_es2017_typedarrays = __commonJS({
"../../node_modules/.pnpm/@typescript-eslint+scope-manager@5.62.0/node_modules/@typescript-eslint/scope-manager/dist/lib/es2017.typedarrays.js"(exports) {
"use strict";
init_shims();
Object.defineProperty(exports, "__esModule", { value: true });
exports.es2017_typedarrays = void 0;
var base_config_1 = require_base_config();
exports.es2017_typedarrays = {
Int8ArrayConstructor: base_config_1.TYPE,
Uint8ArrayConstructor: base_config_1.TYPE,
Uint8ClampedArrayConstructor: base_config_1.TYPE,
Int16ArrayConstructor: base_config_1.TYPE,
Uint16ArrayConstructor: base_config_1.TYPE,
Int32ArrayConstructor: base_config_1.TYPE,
Uint32ArrayConstructor: base_config_1.TYPE,
Float32ArrayConstructor: base_config_1.TYPE,
Float64ArrayConstructor: base_config_1.TYPE
};
}
});
// ../../node_modules/.pnpm/@typescript-eslint+scope-manager@5.62.0/node_modules/@typescript-eslint/scope-manager/dist/lib/es2017.js
var require_es2017 = __commonJS({
"../../node_modules/.pnpm/@typescript-eslint+scope-manager@5.62.0/node_modules/@typescript-eslint/scope-manager/dist/lib/es2017.js"(exports) {
"use strict";
init_shims();
Object.defineProperty(exports, "__esModule", { value: true });
exports.es2017 = void 0;
var es2016_1 = require_es2016();
var es2017_intl_1 = require_es2017_intl();
var es2017_object_1 = require_es2017_object();
var es2017_sharedmemory_1 = require_es2017_sharedmemory();
var es2017_string_1 = require_es2017_string();
var es2017_typedarrays_1 = require_es2017_typedarrays();
exports.es2017 = Object.assign(Object.assign(Object.assign(Object.assign(Object.assign(Object.assign({}, es2016_1.es2016), es2017_object_1.es2017_object), es2017_sharedmemory_1.es2017_sharedmemory), es2017_string_1.es2017_string), es2017_intl_1.es2017_intl), es2017_typedarrays_1.es2017_typedarrays);
}
});
// ../../node_modules/.pnpm/@typescript-eslint+scope-manager@5.62.0/node_modules/@typescript-eslint/scope-manager/dist/lib/es2017.full.js
var require_es2017_full = __commonJS({
"../../node_modules/.pnpm/@typescript-eslint+scope-manager@5.62.0/node_modules/@typescript-eslint/scope-manager/dist/lib/es2017.full.js"(exports) {
"use strict";
init_shims();
Object.defineProperty(exports, "__esModule", { value: true });
exports.es2017_full = void 0;
var dom_1 = require_dom();
var dom_iterable_1 = require_dom_iterable();
var es2017_1 = require_es2017();
var scripthost_1 = require_scripthost();
var webworker_importscripts_1 = require_webworker_importscripts();
exports.es2017_full = Object.assign(Object.assign(Object.assign(Object.assign(Object.assign({}, es2017_1.es2017), dom_1.dom), webworker_importscripts_1.webworker_importscripts), scripthost_1.scripthost), dom_iterable_1.dom_iterable);
}
});
// ../../node_modules/.pnpm/@typescript-eslint+scope-manager@5.62.0/node_modules/@typescript-eslint/scope-manager/dist/lib/es2018.asynciterable.js
var require_es2018_asynciterable = __commonJS({
"../../node_modules/.pnpm/@typescript-eslint+scope-manager@5.62.0/node_modules/@typescript-eslint/scope-manager/dist/lib/es2018.asynciterable.js"(exports) {
"use strict";
init_shims();
Object.defineProperty(exports, "__esModule", { value: true });
exports.es2018_asynciterable = void 0;
var base_config_1 = require_base_config();
var es2015_iterable_1 = require_es2015_iterable();
var es2015_symbol_1 = require_es2015_symbol();
exports.es2018_asynciterable = Object.assign(Object.assign(Object.assign({}, es2015_symbol_1.es2015_symbol), es2015_iterable_1.es2015_iterable), { SymbolConstructor: base_config_1.TYPE, AsyncIterator: base_config_1.TYPE, AsyncIterable: base_config_1.TYPE, AsyncIterableIterator: base_config_1.TYPE });
}
});
// ../../node_modules/.pnpm/@typescript-eslint+scope-manager@5.62.0/node_modules/@typescript-eslint/scope-manager/dist/lib/es2018.asyncgenerator.js
var require_es2018_asyncgenerator = __commonJS({
"../../node_modules/.pnpm/@typescript-eslint+scope-manager@5.62.0/node_modules/@typescript-eslint/scope-manager/dist/lib/es2018.asyncgenerator.js"(exports) {
"use strict";
init_shims();
Object.defineProperty(exports, "__esModule", { value: true });
exports.es2018_asyncgenerator = void 0;
var base_config_1 = require_base_config();
var es2018_asynciterable_1 = require_es2018_asynciterable();
exports.es2018_asyncgenerator = Object.assign(Object.assign({}, es2018_asynciterable_1.es2018_asynciterable), { AsyncGenerator: base_config_1.TYPE, AsyncGeneratorFunction: base_config_1.TYPE, AsyncGeneratorFunctionConstructor: base_config_1.TYPE });
}
});
// ../../node_modules/.pnpm/@typescript-eslint+scope-manager@5.62.0/node_modules/@typescript-eslint/scope-manager/dist/lib/es2018.intl.js
var require_es2018_intl = __commonJS({
"../../node_modules/.pnpm/@typescript-eslint+scope-manager@5.62.0/node_modules/@typescript-eslint/scope-manager/dist/lib/es2018.intl.js"(exports) {
"use strict";
init_shims();
Object.defineProperty(exports, "__esModule", { value: true });
exports.es2018_intl = void 0;
var base_config_1 = require_base_config();
exports.es2018_intl = {
Intl: base_config_1.TYPE_VALUE
};
}
});
// ../../node_modules/.pnpm/@typescript-eslint+scope-manager@5.62.0/node_modules/@typescript-eslint/scope-manager/dist/lib/es2018.promise.js
var require_es2018_promise = __commonJS({
"../../node_modules/.pnpm/@typescript-eslint+scope-manager@5.62.0/node_modules/@typescript-eslint/scope-manager/dist/lib/es2018.promise.js"(exports) {
"use strict";
init_shims();
Object.defineProperty(exports, "__esModule", { value: true });
exports.es2018_promise = void 0;
var base_config_1 = require_base_config();
exports.es2018_promise = {
Promise: base_config_1.TYPE
};
}
});
// ../../node_modules/.pnpm/@typescript-eslint+scope-manager@5.62.0/node_modules/@typescript-eslint/scope-manager/dist/lib/es2018.regexp.js
var require_es2018_regexp = __commonJS({
"../../node_modules/.pnpm/@typescript-eslint+scope-manager@5.62.0/node_modules/@typescript-eslint/scope-manager/dist/lib/es2018.regexp.js"(exports) {
"use strict";
init_shims();
Object.defineProperty(exports, "__esModule", { value: true });
exports.es2018_regexp = void 0;
var base_config_1 = require_base_config();
exports.es2018_regexp = {
RegExpMatchArray: base_config_1.TYPE,
RegExpExecArray: base_config_1.TYPE,
RegExp: base_config_1.TYPE
};
}
});
// ../../node_modules/.pnpm/@typescript-eslint+scope-manager@5.62.0/node_modules/@typescript-eslint/scope-manager/dist/lib/es2018.js
var require_es2018 = __commonJS({
"../../node_modules/.pnpm/@typescript-eslint+scope-manager@5.62.0/node_modules/@typescript-eslint/scope-manager/dist/lib/es2018.js"(exports) {
"use strict";
init_shims();
Object.defineProperty(exports, "__esModule", { value: true });
exports.es2018 = void 0;
var es2017_1 = require_es2017();
var es2018_asyncgenerator_1 = require_es2018_asyncgenerator();
var es2018_asynciterable_1 = require_es2018_asynciterable();
var es2018_intl_1 = require_es2018_intl();
var es2018_promise_1 = require_es2018_promise();
var es2018_regexp_1 = require_es2018_regexp();
exports.es2018 = Object.assign(Object.assign(Object.assign(Object.assign(Object.assign(Object.assign({}, es2017_1.es2017), es2018_asynciterable_1.es2018_asynciterable), es2018_asyncgenerator_1.es2018_asyncgenerator), es2018_promise_1.es2018_promise), es2018_regexp_1.es2018_regexp), es2018_intl_1.es2018_intl);
}
});
// ../../node_modules/.pnpm/@typescript-eslint+scope-manager@5.62.0/node_modules/@typescript-eslint/scope-manager/dist/lib/es2018.full.js
var require_es2018_full = __commonJS({
"../../node_modules/.pnpm/@typescript-eslint+scope-manager@5.62.0/node_modules/@typescript-eslint/scope-manager/dist/lib/es2018.full.js"(exports) {
"use strict";
init_shims();
Object.defineProperty(exports, "__esModule", { value: true });
exports.es2018_full = void 0;
var dom_1 = require_dom();
var dom_iterable_1 = require_dom_iterable();
var es2018_1 = require_es2018();
var scripthost_1 = require_scripthost();
var webworker_importscripts_1 = require_webworker_importscripts();
exports.es2018_full = Object.assign(Object.assign(Object.assign(Object.assign(Object.assign({}, es2018_1.es2018), dom_1.dom), webworker_importscripts_1.webworker_importscripts), scripthost_1.scripthost), dom_iterable_1.dom_iterable);
}
});
// ../../node_modules/.pnpm/@typescript-eslint+scope-manager@5.62.0/node_modules/@typescript-eslint/scope-manager/dist/lib/es2019.array.js
var require_es2019_array = __commonJS({
"../../node_modules/.pnpm/@typescript-eslint+scope-manager@5.62.0/node_modules/@typescript-eslint/scope-manager/dist/lib/es2019.array.js"(exports) {
"use strict";
init_shims();
Object.defineProperty(exports, "__esModule", { value: true });
exports.es2019_array = void 0;
var base_config_1 = require_base_config();
exports.es2019_array = {
FlatArray: base_config_1.TYPE,
ReadonlyArray: base_config_1.TYPE,
Array: base_config_1.TYPE
};
}
});
// ../../node_modules/.pnpm/@typescript-eslint+scope-manager@5.62.0/node_modules/@typescript-eslint/scope-manager/dist/lib/es2019.intl.js
var require_es2019_intl = __commonJS({
"../../node_modules/.pnpm/@typescript-eslint+scope-manager@5.62.0/node_modules/@typescript-eslint/scope-manager/dist/lib/es2019.intl.js"(exports) {
"use strict";
init_shims();
Object.defineProperty(exports, "__esModule", { value: true });
exports.es2019_intl = void 0;
var base_config_1 = require_base_config();
exports.es2019_intl = {
Intl: base_config_1.TYPE_VALUE
};
}
});
// ../../node_modules/.pnpm/@typescript-eslint+scope-manager@5.62.0/node_modules/@typescript-eslint/scope-manager/dist/lib/es2019.object.js
var require_es2019_object = __commonJS({
"../../node_modules/.pnpm/@typescript-eslint+scope-manager@5.62.0/node_modules/@typescript-eslint/scope-manager/dist/lib/es2019.object.js"(exports) {
"use strict";
init_shims();
Object.defineProperty(exports, "__esModule", { value: true });
exports.es2019_object = void 0;
var base_config_1 = require_base_config();
var es2015_iterable_1 = require_es2015_iterable();
exports.es2019_object = Object.assign(Object.assign({}, es2015_iterable_1.es2015_iterable), { ObjectConstructor: base_config_1.TYPE });
}
});
// ../../node_modules/.pnpm/@typescript-eslint+scope-manager@5.62.0/node_modules/@typescript-eslint/scope-manager/dist/lib/es2019.string.js
var require_es2019_string = __commonJS({
"../../node_modules/.pnpm/@typescript-eslint+scope-manager@5.62.0/node_modules/@typescript-eslint/scope-manager/dist/lib/es2019.string.js"(exports) {
"use strict";
init_shims();
Object.defineProperty(exports, "__esModule", { value: true });
exports.es2019_string = void 0;
var base_config_1 = require_base_config();
exports.es2019_string = {
String: base_config_1.TYPE
};
}
});
// ../../node_modules/.pnpm/@typescript-eslint+scope-manager@5.62.0/node_modules/@typescript-eslint/scope-manager/dist/lib/es2019.symbol.js
var require_es2019_symbol = __commonJS({
"../../node_modules/.pnpm/@typescript-eslint+scope-manager@5.62.0/node_modules/@typescript-eslint/scope-manager/dist/lib/es2019.symbol.js"(exports) {
"use strict";
init_shims();
Object.defineProperty(exports, "__esModule", { value: true });
exports.es2019_symbol = void 0;
var base_config_1 = require_base_config();
exports.es2019_symbol = {
Symbol: base_config_1.TYPE
};
}
});
// ../../node_modules/.pnpm/@typescript-eslint+scope-manager@5.62.0/node_modules/@typescript-eslint/scope-manager/dist/lib/es2019.js
var require_es2019 = __commonJS({
"../../node_modules/.pnpm/@typescript-eslint+scope-manager@5.62.0/node_modules/@typescript-eslint/scope-manager/dist/lib/es2019.js"(exports) {
"use strict";
init_shims();
Object.defineProperty(exports, "__esModule", { value: true });
exports.es2019 = void 0;
var es2018_1 = require_es2018();
var es2019_array_1 = require_es2019_array();
var es2019_intl_1 = require_es2019_intl();
var es2019_object_1 = require_es2019_object();
var es2019_string_1 = require_es2019_string();
var es2019_symbol_1 = require_es2019_symbol();
exports.es2019 = Object.assign(Object.assign(Object.assign(Object.assign(Object.assign(Object.assign({}, es2018_1.es2018), es2019_array_1.es2019_array), es2019_object_1.es2019_object), es2019_string_1.es2019_string), es2019_symbol_1.es2019_symbol), es2019_intl_1.es2019_intl);
}
});
// ../../node_modules/.pnpm/@typescript-eslint+scope-manager@5.62.0/node_modules/@typescript-eslint/scope-manager/dist/lib/es2019.full.js
var require_es2019_full = __commonJS({
"../../node_modules/.pnpm/@typescript-eslint+scope-manager@5.62.0/node_modules/@typescript-eslint/scope-manager/dist/lib/es2019.full.js"(exports) {
"use strict";
init_shims();
Object.defineProperty(exports, "__esModule", { value: true });
exports.es2019_full = void 0;
var dom_1 = require_dom();
var dom_iterable_1 = require_dom_iterable();
var es2019_1 = require_es2019();
var scripthost_1 = require_scripthost();
var webworker_importscripts_1 = require_webworker_importscripts();
exports.es2019_full = Object.assign(Object.assign(Object.assign(Object.assign(Object.assign({}, es2019_1.es2019), dom_1.dom), webworker_importscripts_1.webworker_importscripts), scripthost_1.scripthost), dom_iterable_1.dom_iterable);
}
});
// ../../node_modules/.pnpm/@typescript-eslint+scope-manager@5.62.0/node_modules/@typescript-eslint/scope-manager/dist/lib/es2020.intl.js
var require_es2020_intl = __commonJS({
"../../node_modules/.pnpm/@typescript-eslint+scope-manager@5.62.0/node_modules/@typescript-eslint/scope-manager/dist/lib/es2020.intl.js"(exports) {
"use strict";
init_shims();
Object.defineProperty(exports, "__esModule", { value: true });
exports.es2020_intl = void 0;
var base_config_1 = require_base_config();
var es2018_intl_1 = require_es2018_intl();
exports.es2020_intl = Object.assign(Object.assign({}, es2018_intl_1.es2018_intl), { Intl: base_config_1.TYPE_VALUE });
}
});
// ../../node_modules/.pnpm/@typescript-eslint+scope-manager@5.62.0/node_modules/@typescript-eslint/scope-manager/dist/lib/es2020.bigint.js
var require_es2020_bigint = __commonJS({
"../../node_modules/.pnpm/@typescript-eslint+scope-manager@5.62.0/node_modules/@typescript-eslint/scope-manager/dist/lib/es2020.bigint.js"(exports) {
"use strict";
init_shims();
Object.defineProperty(exports, "__esModule", { value: true });
exports.es2020_bigint = void 0;
var base_config_1 = require_base_config();
var es2020_intl_1 = require_es2020_intl();
exports.es2020_bigint = Object.assign(Object.assign({}, es2020_intl_1.es2020_intl), { BigIntToLocaleStringOptions: base_config_1.TYPE, BigInt: base_config_1.TYPE_VALUE, BigIntConstructor: base_config_1.TYPE, BigInt64Array: base_config_1.TYPE_VALUE, BigInt64ArrayConstructor: base_config_1.TYPE, BigUint64Array: base_config_1.TYPE_VALUE, BigUint64ArrayConstructor: base_config_1.TYPE, DataView: base_config_1.TYPE, Intl: base_config_1.TYPE_VALUE });
}
});
// ../../node_modules/.pnpm/@typescript-eslint+scope-manager@5.62.0/node_modules/@typescript-eslint/scope-manager/dist/lib/es2020.date.js
var require_es2020_date = __commonJS({
"../../node_modules/.pnpm/@typescript-eslint+scope-manager@5.62.0/node_modules/@typescript-eslint/scope-manager/dist/lib/es2020.date.js"(exports) {
"use strict";
init_shims();
Object.defineProperty(exports, "__esModule", { value: true });
exports.es2020_date = void 0;
var base_config_1 = require_base_config();
var es2020_intl_1 = require_es2020_intl();
exports.es2020_date = Object.assign(Object.assign({}, es2020_intl_1.es2020_intl), { Date: base_config_1.TYPE });
}
});
// ../../node_modules/.pnpm/@typescript-eslint+scope-manager@5.62.0/node_modules/@typescript-eslint/scope-manager/dist/lib/es2020.number.js
var require_es2020_number = __commonJS({
"../../node_modules/.pnpm/@typescript-eslint+scope-manager@5.62.0/node_modules/@typescript-eslint/scope-manager/dist/lib/es2020.number.js"(exports) {
"use strict";
init_shims();
Object.defineProperty(exports, "__esModule", { value: true });
exports.es2020_number = void 0;
var base_config_1 = require_base_config();
var es2020_intl_1 = require_es2020_intl();
exports.es2020_number = Object.assign(Object.assign({}, es2020_intl_1.es2020_intl), { Number: base_config_1.TYPE });
}
});
// ../../node_modules/.pnpm/@typescript-eslint+scope-manager@5.62.0/node_modules/@typescript-eslint/scope-manager/dist/lib/es2020.promise.js
var require_es2020_promise = __commonJS({
"../../node_modules/.pnpm/@typescript-eslint+scope-manager@5.62.0/node_modules/@typescript-eslint/scope-manager/dist/lib/es2020.promise.js"(exports) {
"use strict";
init_shims();
Object.defineProperty(exports, "__esModule", { value: true });
exports.es2020_promise = void 0;
var base_config_1 = require_base_config();
exports.es2020_promise = {
PromiseFulfilledResult: base_config_1.TYPE,
PromiseRejectedResult: base_config_1.TYPE,
PromiseSettledResult: base_config_1.TYPE,
PromiseConstructor: base_config_1.TYPE
};
}
});
// ../../node_modules/.pnpm/@typescript-eslint+scope-manager@5.62.0/node_modules/@typescript-eslint/scope-manager/dist/lib/es2020.sharedmemory.js
var require_es2020_sharedmemory = __commonJS({
"../../node_modules/.pnpm/@typescript-eslint+scope-manager@5.62.0/node_modules/@typescript-eslint/scope-manager/dist/lib/es2020.sharedmemory.js"(exports) {
"use strict";
init_shims();
Object.defineProperty(exports, "__esModule", { value: true });
exports.es2020_sharedmemory = void 0;
var base_config_1 = require_base_config();
exports.es2020_sharedmemory = {
Atomics: base_config_1.TYPE
};
}
});
// ../../node_modules/.pnpm/@typescript-eslint+scope-manager@5.62.0/node_modules/@typescript-eslint/scope-manager/dist/lib/es2020.string.js
var require_es2020_string = __commonJS({
"../../node_modules/.pnpm/@typescript-eslint+scope-manager@5.62.0/node_modules/@typescript-eslint/scope-manager/dist/lib/es2020.string.js"(exports) {
"use strict";
init_shims();
Object.defineProperty(exports, "__esModule", { value: true });
exports.es2020_string = void 0;
var base_config_1 = require_base_config();
var es2015_iterable_1 = require_es2015_iterable();
exports.es2020_string = Object.assign(Object.assign({}, es2015_iterable_1.es2015_iterable), { String: base_config_1.TYPE });
}
});
// ../../node_modules/.pnpm/@typescript-eslint+scope-manager@5.62.0/node_modules/@typescript-eslint/scope-manager/dist/lib/es2020.symbol.wellknown.js
var require_es2020_symbol_wellknown = __commonJS({
"../../node_modules/.pnpm/@typescript-eslint+scope-manager@5.62.0/node_modules/@typescript-eslint/scope-manager/dist/lib/es2020.symbol.wellknown.js"(exports) {
"use strict";
init_shims();
Object.defineProperty(exports, "__esModule", { value: true });
exports.es2020_symbol_wellknown = void 0;
var base_config_1 = require_base_config();
var es2015_iterable_1 = require_es2015_iterable();
var es2015_symbol_1 = require_es2015_symbol();
exports.es2020_symbol_wellknown = Object.assign(Object.assign(Object.assign({}, es2015_iterable_1.es2015_iterable), es2015_symbol_1.es2015_symbol), { SymbolConstructor: base_config_1.TYPE, RegExp: base_config_1.TYPE });
}
});
// ../../node_modules/.pnpm/@typescript-eslint+scope-manager@5.62.0/node_modules/@typescript-eslint/scope-manager/dist/lib/es2020.js
var require_es2020 = __commonJS({
"../../node_modules/.pnpm/@typescript-eslint+scope-manager@5.62.0/node_modules/@typescript-eslint/scope-manager/dist/lib/es2020.js"(exports) {
"use strict";
init_shims();
Object.defineProperty(exports, "__esModule", { value: true });
exports.es2020 = void 0;
var es2019_1 = require_es2019();
var es2020_bigint_1 = require_es2020_bigint();
var es2020_date_1 = require_es2020_date();
var es2020_intl_1 = require_es2020_intl();
var es2020_number_1 = require_es2020_number();
var es2020_promise_1 = require_es2020_promise();
var es2020_sharedmemory_1 = require_es2020_sharedmemory();
var es2020_string_1 = require_es2020_string();
var es2020_symbol_wellknown_1 = require_es2020_symbol_wellknown();
exports.es2020 = Object.assign(Object.assign(Object.assign(Object.assign(Object.assign(Object.assign(Object.assign(Object.assign(Object.assign({}, es2019_1.es2019), es2020_bigint_1.es2020_bigint), es2020_date_1.es2020_date), es2020_number_1.es2020_number), es2020_promise_1.es2020_promise), es2020_sharedmemory_1.es2020_sharedmemory), es2020_string_1.es2020_string), es2020_symbol_wellknown_1.es2020_symbol_wellknown), es2020_intl_1.es2020_intl);
}
});
// ../../node_modules/.pnpm/@typescript-eslint+scope-manager@5.62.0/node_modules/@typescript-eslint/scope-manager/dist/lib/es2020.full.js
var require_es2020_full = __commonJS({
"../../node_modules/.pnpm/@typescript-eslint+scope-manager@5.62.0/node_modules/@typescript-eslint/scope-manager/dist/lib/es2020.full.js"(exports) {
"use strict";
init_shims();
Object.defineProperty(exports, "__esModule", { value: true });
exports.es2020_full = void 0;
var dom_1 = require_dom();
var dom_iterable_1 = require_dom_iterable();
var es2020_1 = require_es2020();
var scripthost_1 = require_scripthost();
var webworker_importscripts_1 = require_webworker_importscripts();
exports.es2020_full = Object.assign(Object.assign(Object.assign(Object.assign(Object.assign({}, es2020_1.es2020), dom_1.dom), webworker_importscripts_1.webworker_importscripts), scripthost_1.scripthost), dom_iterable_1.dom_iterable);
}
});
// ../../node_modules/.pnpm/@typescript-eslint+scope-manager@5.62.0/node_modules/@typescript-eslint/scope-manager/dist/lib/es2021.intl.js
var require_es2021_intl = __commonJS({
"../../node_modules/.pnpm/@typescript-eslint+scope-manager@5.62.0/node_modules/@typescript-eslint/scope-manager/dist/lib/es2021.intl.js"(exports) {
"use strict";
init_shims();
Object.defineProperty(exports, "__esModule", { value: true });
exports.es2021_intl = void 0;
var base_config_1 = require_base_config();
exports.es2021_intl = {
Intl: base_config_1.TYPE_VALUE
};
}
});
// ../../node_modules/.pnpm/@typescript-eslint+scope-manager@5.62.0/node_modules/@typescript-eslint/scope-manager/dist/lib/es2021.promise.js
var require_es2021_promise = __commonJS({
"../../node_modules/.pnpm/@typescript-eslint+scope-manager@5.62.0/node_modules/@typescript-eslint/scope-manager/dist/lib/es2021.promise.js"(exports) {
"use strict";
init_shims();
Object.defineProperty(exports, "__esModule", { value: true });
exports.es2021_promise = void 0;
var base_config_1 = require_base_config();
exports.es2021_promise = {
AggregateError: base_config_1.TYPE_VALUE,
AggregateErrorConstructor: base_config_1.TYPE,
PromiseConstructor: base_config_1.TYPE
};
}
});
// ../../node_modules/.pnpm/@typescript-eslint+scope-manager@5.62.0/node_modules/@typescript-eslint/scope-manager/dist/lib/es2021.string.js
var require_es2021_string = __commonJS({
"../../node_modules/.pnpm/@typescript-eslint+scope-manager@5.62.0/node_modules/@typescript-eslint/scope-manager/dist/lib/es2021.string.js"(exports) {
"use strict";
init_shims();
Object.defineProperty(exports, "__esModule", { value: true });
exports.es2021_string = void 0;
var base_config_1 = require_base_config();
exports.es2021_string = {
String: base_config_1.TYPE
};
}
});
// ../../node_modules/.pnpm/@typescript-eslint+scope-manager@5.62.0/node_modules/@typescript-eslint/scope-manager/dist/lib/es2021.weakref.js
var require_es2021_weakref = __commonJS({
"../../node_modules/.pnpm/@typescript-eslint+scope-manager@5.62.0/node_modules/@typescript-eslint/scope-manager/dist/lib/es2021.weakref.js"(exports) {
"use strict";
init_shims();
Object.defineProperty(exports, "__esModule", { value: true });
exports.es2021_weakref = void 0;
var base_config_1 = require_base_config();
exports.es2021_weakref = {
WeakRef: base_config_1.TYPE_VALUE,
WeakRefConstructor: base_config_1.TYPE,
FinalizationRegistry: base_config_1.TYPE_VALUE,
FinalizationRegistryConstructor: base_config_1.TYPE
};
}
});
// ../../node_modules/.pnpm/@typescript-eslint+scope-manager@5.62.0/node_modules/@typescript-eslint/scope-manager/dist/lib/es2021.js
var require_es2021 = __commonJS({
"../../node_modules/.pnpm/@typescript-eslint+scope-manager@5.62.0/node_modules/@typescript-eslint/scope-manager/dist/lib/es2021.js"(exports) {
"use strict";
init_shims();
Object.defineProperty(exports, "__esModule", { value: true });
exports.es2021 = void 0;
var es2020_1 = require_es2020();
var es2021_intl_1 = require_es2021_intl();
var es2021_promise_1 = require_es2021_promise();
var es2021_string_1 = require_es2021_string();
var es2021_weakref_1 = require_es2021_weakref();
exports.es2021 = Object.assign(Object.assign(Object.assign(Object.assign(Object.assign({}, es2020_1.es2020), es2021_promise_1.es2021_promise), es2021_string_1.es2021_string), es2021_weakref_1.es2021_weakref), es2021_intl_1.es2021_intl);
}
});
// ../../node_modules/.pnpm/@typescript-eslint+scope-manager@5.62.0/node_modules/@typescript-eslint/scope-manager/dist/lib/es2021.full.js
var require_es2021_full = __commonJS({
"../../node_modules/.pnpm/@typescript-eslint+scope-manager@5.62.0/node_modules/@typescript-eslint/scope-manager/dist/lib/es2021.full.js"(exports) {
"use strict";
init_shims();
Object.defineProperty(exports, "__esModule", { value: true });
exports.es2021_full = void 0;
var dom_1 = require_dom();
var dom_iterable_1 = require_dom_iterable();
var es2021_1 = require_es2021();
var scripthost_1 = require_scripthost();
var webworker_importscripts_1 = require_webworker_importscripts();
exports.es2021_full = Object.assign(Object.assign(Object.assign(Object.assign(Object.assign({}, es2021_1.es2021), dom_1.dom), webworker_importscripts_1.webworker_importscripts), scripthost_1.scripthost), dom_iterable_1.dom_iterable);
}
});
// ../../node_modules/.pnpm/@typescript-eslint+scope-manager@5.62.0/node_modules/@typescript-eslint/scope-manager/dist/lib/es2022.array.js
var require_es2022_array = __commonJS({
"../../node_modules/.pnpm/@typescript-eslint+scope-manager@5.62.0/node_modules/@typescript-eslint/scope-manager/dist/lib/es2022.array.js"(exports) {
"use strict";
init_shims();
Object.defineProperty(exports, "__esModule", { value: true });
exports.es2022_array = void 0;
var base_config_1 = require_base_config();
exports.es2022_array = {
Array: base_config_1.TYPE,
ReadonlyArray: base_config_1.TYPE,
Int8Array: base_config_1.TYPE,
Uint8Array: base_config_1.TYPE,
Uint8ClampedArray: base_config_1.TYPE,
Int16Array: base_config_1.TYPE,
Uint16Array: base_config_1.TYPE,
Int32Array: base_config_1.TYPE,
Uint32Array: base_config_1.TYPE,
Float32Array: base_config_1.TYPE,
Float64Array: base_config_1.TYPE,
BigInt64Array: base_config_1.TYPE,
BigUint64Array: base_config_1.TYPE
};
}
});
// ../../node_modules/.pnpm/@typescript-eslint+scope-manager@5.62.0/node_modules/@typescript-eslint/scope-manager/dist/lib/es2022.error.js
var require_es2022_error = __commonJS({
"../../node_modules/.pnpm/@typescript-eslint+scope-manager@5.62.0/node_modules/@typescript-eslint/scope-manager/dist/lib/es2022.error.js"(exports) {
"use strict";
init_shims();
Object.defineProperty(exports, "__esModule", { value: true });
exports.es2022_error = void 0;
var base_config_1 = require_base_config();
exports.es2022_error = {
ErrorOptions: base_config_1.TYPE,
Error: base_config_1.TYPE,
ErrorConstructor: base_config_1.TYPE,
EvalErrorConstructor: base_config_1.TYPE,
RangeErrorConstructor: base_config_1.TYPE,
ReferenceErrorConstructor: base_config_1.TYPE,
SyntaxErrorConstructor: base_config_1.TYPE,
TypeErrorConstructor: base_config_1.TYPE,
URIErrorConstructor: base_config_1.TYPE,
AggregateErrorConstructor: base_config_1.TYPE
};
}
});
// ../../node_modules/.pnpm/@typescript-eslint+scope-manager@5.62.0/node_modules/@typescript-eslint/scope-manager/dist/lib/es2022.intl.js
var require_es2022_intl = __commonJS({
"../../node_modules/.pnpm/@typescript-eslint+scope-manager@5.62.0/node_modules/@typescript-eslint/scope-manager/dist/lib/es2022.intl.js"(exports) {
"use strict";
init_shims();
Object.defineProperty(exports, "__esModule", { value: true });
exports.es2022_intl = void 0;
var base_config_1 = require_base_config();
exports.es2022_intl = {
Intl: base_config_1.TYPE_VALUE
};
}
});
// ../../node_modules/.pnpm/@typescript-eslint+scope-manager@5.62.0/node_modules/@typescript-eslint/scope-manager/dist/lib/es2022.object.js
var require_es2022_object = __commonJS({
"../../node_modules/.pnpm/@typescript-eslint+scope-manager@5.62.0/node_modules/@typescript-eslint/scope-manager/dist/lib/es2022.object.js"(exports) {
"use strict";
init_shims();
Object.defineProperty(exports, "__esModule", { value: true });
exports.es2022_object = void 0;
var base_config_1 = require_base_config();
exports.es2022_object = {
ObjectConstructor: base_config_1.TYPE
};
}
});
// ../../node_modules/.pnpm/@typescript-eslint+scope-manager@5.62.0/node_modules/@typescript-eslint/scope-manager/dist/lib/es2022.regexp.js
var require_es2022_regexp = __commonJS({
"../../node_modules/.pnpm/@typescript-eslint+scope-manager@5.62.0/node_modules/@typescript-eslint/scope-manager/dist/lib/es2022.regexp.js"(exports) {
"use strict";
init_shims();
Object.defineProperty(exports, "__esModule", { value: true });
exports.es2022_regexp = void 0;
var base_config_1 = require_base_config();
exports.es2022_regexp = {
RegExpMatchArray: base_config_1.TYPE,
RegExpExecArray: base_config_1.TYPE,
RegExpIndicesArray: base_config_1.TYPE,
RegExp: base_config_1.TYPE
};
}
});
// ../../node_modules/.pnpm/@typescript-eslint+scope-manager@5.62.0/node_modules/@typescript-eslint/scope-manager/dist/lib/es2022.sharedmemory.js
var require_es2022_sharedmemory = __commonJS({
"../../node_modules/.pnpm/@typescript-eslint+scope-manager@5.62.0/node_modules/@typescript-eslint/scope-manager/dist/lib/es2022.sharedmemory.js"(exports) {
"use strict";
init_shims();
Object.defineProperty(exports, "__esModule", { value: true });
exports.es2022_sharedmemory = void 0;
var base_config_1 = require_base_config();
exports.es2022_sharedmemory = {
Atomics: base_config_1.TYPE
};
}
});
// ../../node_modules/.pnpm/@typescript-eslint+scope-manager@5.62.0/node_modules/@typescript-eslint/scope-manager/dist/lib/es2022.string.js
var require_es2022_string = __commonJS({
"../../node_modules/.pnpm/@typescript-eslint+scope-manager@5.62.0/node_modules/@typescript-eslint/scope-manager/dist/lib/es2022.string.js"(exports) {
"use strict";
init_shims();
Object.defineProperty(exports, "__esModule", { value: true });
exports.es2022_string = void 0;
var base_config_1 = require_base_config();
exports.es2022_string = {
String: base_config_1.TYPE
};
}
});
// ../../node_modules/.pnpm/@typescript-eslint+scope-manager@5.62.0/node_modules/@typescript-eslint/scope-manager/dist/lib/es2022.js
var require_es2022 = __commonJS({
"../../node_modules/.pnpm/@typescript-eslint+scope-manager@5.62.0/node_modules/@typescript-eslint/scope-manager/dist/lib/es2022.js"(exports) {
"use strict";
init_shims();
Object.defineProperty(exports, "__esModule", { value: true });
exports.es2022 = void 0;
var es2021_1 = require_es2021();
var es2022_array_1 = require_es2022_array();
var es2022_error_1 = require_es2022_error();
var es2022_intl_1 = require_es2022_intl();
var es2022_object_1 = require_es2022_object();
var es2022_regexp_1 = require_es2022_regexp();
var es2022_sharedmemory_1 = require_es2022_sharedmemory();
var es2022_string_1 = require_es2022_string();
exports.es2022 = Object.assign(Object.assign(Object.assign(Object.assign(Object.assign(Object.assign(Object.assign(Object.assign({}, es2021_1.es2021), es2022_array_1.es2022_array), es2022_error_1.es2022_error), es2022_intl_1.es2022_intl), es2022_object_1.es2022_object), es2022_sharedmemory_1.es2022_sharedmemory), es2022_string_1.es2022_string), es2022_regexp_1.es2022_regexp);
}
});
// ../../node_modules/.pnpm/@typescript-eslint+scope-manager@5.62.0/node_modules/@typescript-eslint/scope-manager/dist/lib/es2022.full.js
var require_es2022_full = __commonJS({
"../../node_modules/.pnpm/@typescript-eslint+scope-manager@5.62.0/node_modules/@typescript-eslint/scope-manager/dist/lib/es2022.full.js"(exports) {
"use strict";
init_shims();
Object.defineProperty(exports, "__esModule", { value: true });
exports.es2022_full = void 0;
var dom_1 = require_dom();
var dom_iterable_1 = require_dom_iterable();
var es2022_1 = require_es2022();
var scripthost_1 = require_scripthost();
var webworker_importscripts_1 = require_webworker_importscripts();
exports.es2022_full = Object.assign(Object.assign(Object.assign(Object.assign(Object.assign({}, es2022_1.es2022), dom_1.dom), webworker_importscripts_1.webworker_importscripts), scripthost_1.scripthost), dom_iterable_1.dom_iterable);
}
});
// ../../node_modules/.pnpm/@typescript-eslint+scope-manager@5.62.0/node_modules/@typescript-eslint/scope-manager/dist/lib/es2023.array.js
var require_es2023_array = __commonJS({
"../../node_modules/.pnpm/@typescript-eslint+scope-manager@5.62.0/node_modules/@typescript-eslint/scope-manager/dist/lib/es2023.array.js"(exports) {
"use strict";
init_shims();
Object.defineProperty(exports, "__esModule", { value: true });
exports.es2023_array = void 0;
var base_config_1 = require_base_config();
exports.es2023_array = {
Array: base_config_1.TYPE,
ReadonlyArray: base_config_1.TYPE,
Int8Array: base_config_1.TYPE,
Uint8Array: base_config_1.TYPE,
Uint8ClampedArray: base_config_1.TYPE,
Int16Array: base_config_1.TYPE,
Uint16Array: base_config_1.TYPE,
Int32Array: base_config_1.TYPE,
Uint32Array: base_config_1.TYPE,
Float32Array: base_config_1.TYPE,
Float64Array: base_config_1.TYPE,
BigInt64Array: base_config_1.TYPE,
BigUint64Array: base_config_1.TYPE
};
}
});
// ../../node_modules/.pnpm/@typescript-eslint+scope-manager@5.62.0/node_modules/@typescript-eslint/scope-manager/dist/lib/es2023.js
var require_es2023 = __commonJS({
"../../node_modules/.pnpm/@typescript-eslint+scope-manager@5.62.0/node_modules/@typescript-eslint/scope-manager/dist/lib/es2023.js"(exports) {
"use strict";
init_shims();
Object.defineProperty(exports, "__esModule", { value: true });
exports.es2023 = void 0;
var es2022_1 = require_es2022();
var es2023_array_1 = require_es2023_array();
exports.es2023 = Object.assign(Object.assign({}, es2022_1.es2022), es2023_array_1.es2023_array);
}
});
// ../../node_modules/.pnpm/@typescript-eslint+scope-manager@5.62.0/node_modules/@typescript-eslint/scope-manager/dist/lib/es2023.full.js
var require_es2023_full = __commonJS({
"../../node_modules/.pnpm/@typescript-eslint+scope-manager@5.62.0/node_modules/@typescript-eslint/scope-manager/dist/lib/es2023.full.js"(exports) {
"use strict";
init_shims();
Object.defineProperty(exports, "__esModule", { value: true });
exports.es2023_full = void 0;
var dom_1 = require_dom();
var dom_iterable_1 = require_dom_iterable();
var es2023_1 = require_es2023();
var scripthost_1 = require_scripthost();
var webworker_importscripts_1 = require_webworker_importscripts();
exports.es2023_full = Object.assign(Object.assign(Object.assign(Object.assign(Object.assign({}, es2023_1.es2023), dom_1.dom), webworker_importscripts_1.webworker_importscripts), scripthost_1.scripthost), dom_iterable_1.dom_iterable);
}
});
// ../../node_modules/.pnpm/@typescript-eslint+scope-manager@5.62.0/node_modules/@typescript-eslint/scope-manager/dist/lib/esnext.intl.js
var require_esnext_intl = __commonJS({
"../../node_modules/.pnpm/@typescript-eslint+scope-manager@5.62.0/node_modules/@typescript-eslint/scope-manager/dist/lib/esnext.intl.js"(exports) {
"use strict";
init_shims();
Object.defineProperty(exports, "__esModule", { value: true });
exports.esnext_intl = void 0;
var base_config_1 = require_base_config();
exports.esnext_intl = {
Intl: base_config_1.TYPE_VALUE
};
}
});
// ../../node_modules/.pnpm/@typescript-eslint+scope-manager@5.62.0/node_modules/@typescript-eslint/scope-manager/dist/lib/esnext.js
var require_esnext = __commonJS({
"../../node_modules/.pnpm/@typescript-eslint+scope-manager@5.62.0/node_modules/@typescript-eslint/scope-manager/dist/lib/esnext.js"(exports) {
"use strict";
init_shims();
Object.defineProperty(exports, "__esModule", { value: true });
exports.esnext = void 0;
var es2023_1 = require_es2023();
var esnext_intl_1 = require_esnext_intl();
exports.esnext = Object.assign(Object.assign({}, es2023_1.es2023), esnext_intl_1.esnext_intl);
}
});
// ../../node_modules/.pnpm/@typescript-eslint+scope-manager@5.62.0/node_modules/@typescript-eslint/scope-manager/dist/lib/esnext.array.js
var require_esnext_array = __commonJS({
"../../node_modules/.pnpm/@typescript-eslint+scope-manager@5.62.0/node_modules/@typescript-eslint/scope-manager/dist/lib/esnext.array.js"(exports) {
"use strict";
init_shims();
Object.defineProperty(exports, "__esModule", { value: true });
exports.esnext_array = void 0;
var base_config_1 = require_base_config();
exports.esnext_array = {
Array: base_config_1.TYPE,
ReadonlyArray: base_config_1.TYPE,
Int8Array: base_config_1.TYPE,
Uint8Array: base_config_1.TYPE,
Uint8ClampedArray: base_config_1.TYPE,
Int16Array: base_config_1.TYPE,
Uint16Array: base_config_1.TYPE,
Int32Array: base_config_1.TYPE,
Uint32Array: base_config_1.TYPE,
Float32Array: base_config_1.TYPE,
Float64Array: base_config_1.TYPE,
BigInt64Array: base_config_1.TYPE,
BigUint64Array: base_config_1.TYPE
};
}
});
// ../../node_modules/.pnpm/@typescript-eslint+scope-manager@5.62.0/node_modules/@typescript-eslint/scope-manager/dist/lib/esnext.asynciterable.js
var require_esnext_asynciterable = __commonJS({
"../../node_modules/.pnpm/@typescript-eslint+scope-manager@5.62.0/node_modules/@typescript-eslint/scope-manager/dist/lib/esnext.asynciterable.js"(exports) {
"use strict";
init_shims();
Object.defineProperty(exports, "__esModule", { value: true });
exports.esnext_asynciterable = void 0;
var base_config_1 = require_base_config();
var es2015_iterable_1 = require_es2015_iterable();
var es2015_symbol_1 = require_es2015_symbol();
exports.esnext_asynciterable = Object.assign(Object.assign(Object.assign({}, es2015_symbol_1.es2015_symbol), es2015_iterable_1.es2015_iterable), { SymbolConstructor: base_config_1.TYPE, AsyncIterator: base_config_1.TYPE, AsyncIterable: base_config_1.TYPE, AsyncIterableIterator: base_config_1.TYPE });
}
});
// ../../node_modules/.pnpm/@typescript-eslint+scope-manager@5.62.0/node_modules/@typescript-eslint/scope-manager/dist/lib/esnext.bigint.js
var require_esnext_bigint = __commonJS({
"../../node_modules/.pnpm/@typescript-eslint+scope-manager@5.62.0/node_modules/@typescript-eslint/scope-manager/dist/lib/esnext.bigint.js"(exports) {
"use strict";
init_shims();
Object.defineProperty(exports, "__esModule", { value: true });
exports.esnext_bigint = void 0;
var base_config_1 = require_base_config();
var es2020_intl_1 = require_es2020_intl();
exports.esnext_bigint = Object.assign(Object.assign({}, es2020_intl_1.es2020_intl), { BigIntToLocaleStringOptions: base_config_1.TYPE, BigInt: base_config_1.TYPE_VALUE, BigIntConstructor: base_config_1.TYPE, BigInt64Array: base_config_1.TYPE_VALUE, BigInt64ArrayConstructor: base_config_1.TYPE, BigUint64Array: base_config_1.TYPE_VALUE, BigUint64ArrayConstructor: base_config_1.TYPE, DataView: base_config_1.TYPE, Intl: base_config_1.TYPE_VALUE });
}
});
// ../../node_modules/.pnpm/@typescript-eslint+scope-manager@5.62.0/node_modules/@typescript-eslint/scope-manager/dist/lib/esnext.full.js
var require_esnext_full = __commonJS({
"../../node_modules/.pnpm/@typescript-eslint+scope-manager@5.62.0/node_modules/@typescript-eslint/scope-manager/dist/lib/esnext.full.js"(exports) {
"use strict";
init_shims();
Object.defineProperty(exports, "__esModule", { value: true });
exports.esnext_full = void 0;
var dom_1 = require_dom();
var dom_iterable_1 = require_dom_iterable();
var esnext_1 = require_esnext();
var scripthost_1 = require_scripthost();
var webworker_importscripts_1 = require_webworker_importscripts();
exports.esnext_full = Object.assign(Object.assign(Object.assign(Object.assign(Object.assign({}, esnext_1.esnext), dom_1.dom), webworker_importscripts_1.webworker_importscripts), scripthost_1.scripthost), dom_iterable_1.dom_iterable);
}
});
// ../../node_modules/.pnpm/@typescript-eslint+scope-manager@5.62.0/node_modules/@typescript-eslint/scope-manager/dist/lib/esnext.promise.js
var require_esnext_promise = __commonJS({
"../../node_modules/.pnpm/@typescript-eslint+scope-manager@5.62.0/node_modules/@typescript-eslint/scope-manager/dist/lib/esnext.promise.js"(exports) {
"use strict";
init_shims();
Object.defineProperty(exports, "__esModule", { value: true });
exports.esnext_promise = void 0;
var base_config_1 = require_base_config();
exports.esnext_promise = {
AggregateError: base_config_1.TYPE_VALUE,
AggregateErrorConstructor: base_config_1.TYPE,
PromiseConstructor: base_config_1.TYPE
};
}
});
// ../../node_modules/.pnpm/@typescript-eslint+scope-manager@5.62.0/node_modules/@typescript-eslint/scope-manager/dist/lib/esnext.string.js
var require_esnext_string = __commonJS({
"../../node_modules/.pnpm/@typescript-eslint+scope-manager@5.62.0/node_modules/@typescript-eslint/scope-manager/dist/lib/esnext.string.js"(exports) {
"use strict";
init_shims();
Object.defineProperty(exports, "__esModule", { value: true });
exports.esnext_string = void 0;
var base_config_1 = require_base_config();
exports.esnext_string = {
String: base_config_1.TYPE
};
}
});
// ../../node_modules/.pnpm/@typescript-eslint+scope-manager@5.62.0/node_modules/@typescript-eslint/scope-manager/dist/lib/esnext.symbol.js
var require_esnext_symbol = __commonJS({
"../../node_modules/.pnpm/@typescript-eslint+scope-manager@5.62.0/node_modules/@typescript-eslint/scope-manager/dist/lib/esnext.symbol.js"(exports) {
"use strict";
init_shims();
Object.defineProperty(exports, "__esModule", { value: true });
exports.esnext_symbol = void 0;
var base_config_1 = require_base_config();
exports.esnext_symbol = {
Symbol: base_config_1.TYPE
};
}
});
// ../../node_modules/.pnpm/@typescript-eslint+scope-manager@5.62.0/node_modules/@typescript-eslint/scope-manager/dist/lib/esnext.weakref.js
var require_esnext_weakref = __commonJS({
"../../node_modules/.pnpm/@typescript-eslint+scope-manager@5.62.0/node_modules/@typescript-eslint/scope-manager/dist/lib/esnext.weakref.js"(exports) {
"use strict";
init_shims();
Object.defineProperty(exports, "__esModule", { value: true });
exports.esnext_weakref = void 0;
var base_config_1 = require_base_config();
exports.esnext_weakref = {
WeakRef: base_config_1.TYPE_VALUE,
WeakRefConstructor: base_config_1.TYPE,
FinalizationRegistry: base_config_1.TYPE_VALUE,
FinalizationRegistryConstructor: base_config_1.TYPE
};
}
});
// ../../node_modules/.pnpm/@typescript-eslint+scope-manager@5.62.0/node_modules/@typescript-eslint/scope-manager/dist/lib/lib.js
var require_lib2 = __commonJS({
"../../node_modules/.pnpm/@typescript-eslint+scope-manager@5.62.0/node_modules/@typescript-eslint/scope-manager/dist/lib/lib.js"(exports) {
"use strict";
init_shims();
Object.defineProperty(exports, "__esModule", { value: true });
exports.lib = void 0;
var dom_1 = require_dom();
var es5_1 = require_es5();
var scripthost_1 = require_scripthost();
var webworker_importscripts_1 = require_webworker_importscripts();
exports.lib = Object.assign(Object.assign(Object.assign(Object.assign({}, es5_1.es5), dom_1.dom), webworker_importscripts_1.webworker_importscripts), scripthost_1.scripthost);
}
});
// ../../node_modules/.pnpm/@typescript-eslint+scope-manager@5.62.0/node_modules/@typescript-eslint/scope-manager/dist/lib/webworker.js
var require_webworker = __commonJS({
"../../node_modules/.pnpm/@typescript-eslint+scope-manager@5.62.0/node_modules/@typescript-eslint/scope-manager/dist/lib/webworker.js"(exports) {
"use strict";
init_shims();
Object.defineProperty(exports, "__esModule", { value: true });
exports.webworker = void 0;
var base_config_1 = require_base_config();
exports.webworker = {
AddEventListenerOptions: base_config_1.TYPE,
AesCbcParams: base_config_1.TYPE,
AesCtrParams: base_config_1.TYPE,
AesDerivedKeyParams: base_config_1.TYPE,
AesGcmParams: base_config_1.TYPE,
AesKeyAlgorithm: base_config_1.TYPE,
AesKeyGenParams: base_config_1.TYPE,
Algorithm: base_config_1.TYPE,
AudioConfiguration: base_config_1.TYPE,
BlobPropertyBag: base_config_1.TYPE,
CacheQueryOptions: base_config_1.TYPE,
ClientQueryOptions: base_config_1.TYPE,
CloseEventInit: base_config_1.TYPE,
CryptoKeyPair: base_config_1.TYPE,
CustomEventInit: base_config_1.TYPE,
DOMMatrix2DInit: base_config_1.TYPE,
DOMMatrixInit: base_config_1.TYPE,
DOMPointInit: base_config_1.TYPE,
DOMQuadInit: base_config_1.TYPE,
DOMRectInit: base_config_1.TYPE,
EcKeyGenParams: base_config_1.TYPE,
EcKeyImportParams: base_config_1.TYPE,
EcdhKeyDeriveParams: base_config_1.TYPE,
EcdsaParams: base_config_1.TYPE,
ErrorEventInit: base_config_1.TYPE,
EventInit: base_config_1.TYPE,
EventListenerOptions: base_config_1.TYPE,
EventSourceInit: base_config_1.TYPE,
ExtendableEventInit: base_config_1.TYPE,
ExtendableMessageEventInit: base_config_1.TYPE,
FetchEventInit: base_config_1.TYPE,
FilePropertyBag: base_config_1.TYPE,
FileSystemGetDirectoryOptions: base_config_1.TYPE,
FileSystemGetFileOptions: base_config_1.TYPE,
FileSystemReadWriteOptions: base_config_1.TYPE,
FileSystemRemoveOptions: base_config_1.TYPE,
FontFaceDescriptors: base_config_1.TYPE,
FontFaceSetLoadEventInit: base_config_1.TYPE,
GetNotificationOptions: base_config_1.TYPE,
HkdfParams: base_config_1.TYPE,
HmacImportParams: base_config_1.TYPE,
HmacKeyGenParams: base_config_1.TYPE,
IDBDatabaseInfo: base_config_1.TYPE,
IDBIndexParameters: base_config_1.TYPE,
IDBObjectStoreParameters: base_config_1.TYPE,
IDBTransactionOptions: base_config_1.TYPE,
IDBVersionChangeEventInit: base_config_1.TYPE,
ImageBitmapOptions: base_config_1.TYPE,
ImageBitmapRenderingContextSettings: base_config_1.TYPE,
ImageDataSettings: base_config_1.TYPE,
ImageEncodeOptions: base_config_1.TYPE,
ImportMeta: base_config_1.TYPE,
JsonWebKey: base_config_1.TYPE,
KeyAlgorithm: base_config_1.TYPE,
LockInfo: base_config_1.TYPE,
LockManagerSnapshot: base_config_1.TYPE,
LockOptions: base_config_1.TYPE,
MediaCapabilitiesDecodingInfo: base_config_1.TYPE,
MediaCapabilitiesEncodingInfo: base_config_1.TYPE,
MediaCapabilitiesInfo: base_config_1.TYPE,
MediaConfiguration: base_config_1.TYPE,
MediaDecodingConfiguration: base_config_1.TYPE,
MediaEncodingConfiguration: base_config_1.TYPE,
MessageEventInit: base_config_1.TYPE,
MultiCacheQueryOptions: base_config_1.TYPE,
NavigationPreloadState: base_config_1.TYPE,
NotificationAction: base_config_1.TYPE,
NotificationEventInit: base_config_1.TYPE,
NotificationOptions: base_config_1.TYPE,
Pbkdf2Params: base_config_1.TYPE,
PerformanceMarkOptions: base_config_1.TYPE,
PerformanceMeasureOptions: base_config_1.TYPE,
PerformanceObserverInit: base_config_1.TYPE,
PermissionDescriptor: base_config_1.TYPE,
ProgressEventInit: base_config_1.TYPE,
PromiseRejectionEventInit: base_config_1.TYPE,
PushEventInit: base_config_1.TYPE,
PushSubscriptionJSON: base_config_1.TYPE,
PushSubscriptionOptionsInit: base_config_1.TYPE,
QueuingStrategy: base_config_1.TYPE,
QueuingStrategyInit: base_config_1.TYPE,
RTCEncodedAudioFrameMetadata: base_config_1.TYPE,
RTCEncodedVideoFrameMetadata: base_config_1.TYPE,
ReadableStreamGetReaderOptions: base_config_1.TYPE,
ReadableStreamReadDoneResult: base_config_1.TYPE,
ReadableStreamReadValueResult: base_config_1.TYPE,
ReadableWritablePair: base_config_1.TYPE,
RegistrationOptions: base_config_1.TYPE,
RequestInit: base_config_1.TYPE,
ResponseInit: base_config_1.TYPE,
RsaHashedImportParams: base_config_1.TYPE,
RsaHashedKeyGenParams: base_config_1.TYPE,
RsaKeyGenParams: base_config_1.TYPE,
RsaOaepParams: base_config_1.TYPE,
RsaOtherPrimesInfo: base_config_1.TYPE,
RsaPssParams: base_config_1.TYPE,
SecurityPolicyViolationEventInit: base_config_1.TYPE,
StorageEstimate: base_config_1.TYPE,
StreamPipeOptions: base_config_1.TYPE,
StructuredSerializeOptions: base_config_1.TYPE,
TextDecodeOptions: base_config_1.TYPE,
TextDecoderOptions: base_config_1.TYPE,
TextEncoderEncodeIntoResult: base_config_1.TYPE,
Transformer: base_config_1.TYPE,
UnderlyingByteSource: base_config_1.TYPE,
UnderlyingDefaultSource: base_config_1.TYPE,
UnderlyingSink: base_config_1.TYPE,
UnderlyingSource: base_config_1.TYPE,
VideoColorSpaceInit: base_config_1.TYPE,
VideoConfiguration: base_config_1.TYPE,
WebGLContextAttributes: base_config_1.TYPE,
WebGLContextEventInit: base_config_1.TYPE,
WorkerOptions: base_config_1.TYPE,
ANGLE_instanced_arrays: base_config_1.TYPE,
AbortController: base_config_1.TYPE_VALUE,
AbortSignalEventMap: base_config_1.TYPE,
AbortSignal: base_config_1.TYPE_VALUE,
AbstractWorkerEventMap: base_config_1.TYPE,
AbstractWorker: base_config_1.TYPE,
AnimationFrameProvider: base_config_1.TYPE,
Blob: base_config_1.TYPE_VALUE,
Body: base_config_1.TYPE,
BroadcastChannelEventMap: base_config_1.TYPE,
BroadcastChannel: base_config_1.TYPE_VALUE,
ByteLengthQueuingStrategy: base_config_1.TYPE_VALUE,
Cache: base_config_1.TYPE_VALUE,
CacheStorage: base_config_1.TYPE_VALUE,
CanvasCompositing: base_config_1.TYPE,
CanvasDrawImage: base_config_1.TYPE,
CanvasDrawPath: base_config_1.TYPE,
CanvasFillStrokeStyles: base_config_1.TYPE,
CanvasFilters: base_config_1.TYPE,
CanvasGradient: base_config_1.TYPE_VALUE,
CanvasImageData: base_config_1.TYPE,
CanvasImageSmoothing: base_config_1.TYPE,
CanvasPath: base_config_1.TYPE,
CanvasPathDrawingStyles: base_config_1.TYPE,
CanvasPattern: base_config_1.TYPE_VALUE,
CanvasRect: base_config_1.TYPE,
CanvasShadowStyles: base_config_1.TYPE,
CanvasState: base_config_1.TYPE,
CanvasText: base_config_1.TYPE,
CanvasTextDrawingStyles: base_config_1.TYPE,
CanvasTransform: base_config_1.TYPE,
Client: base_config_1.TYPE_VALUE,
Clients: base_config_1.TYPE_VALUE,
CloseEvent: base_config_1.TYPE_VALUE,
CountQueuingStrategy: base_config_1.TYPE_VALUE,
Crypto: base_config_1.TYPE_VALUE,
CryptoKey: base_config_1.TYPE_VALUE,
CustomEvent: base_config_1.TYPE_VALUE,
DOMException: base_config_1.TYPE_VALUE,
DOMMatrix: base_config_1.TYPE_VALUE,
DOMMatrixReadOnly: base_config_1.TYPE_VALUE,
DOMPoint: base_config_1.TYPE_VALUE,
DOMPointReadOnly: base_config_1.TYPE_VALUE,
DOMQuad: base_config_1.TYPE_VALUE,
DOMRect: base_config_1.TYPE_VALUE,
DOMRectReadOnly: base_config_1.TYPE_VALUE,
DOMStringList: base_config_1.TYPE_VALUE,
DedicatedWorkerGlobalScopeEventMap: base_config_1.TYPE,
DedicatedWorkerGlobalScope: base_config_1.TYPE_VALUE,
EXT_blend_minmax: base_config_1.TYPE,
EXT_color_buffer_float: base_config_1.TYPE,
EXT_color_buffer_half_float: base_config_1.TYPE,
EXT_float_blend: base_config_1.TYPE,
EXT_frag_depth: base_config_1.TYPE,
EXT_sRGB: base_config_1.TYPE,
EXT_shader_texture_lod: base_config_1.TYPE,
EXT_texture_compression_bptc: base_config_1.TYPE,
EXT_texture_compression_rgtc: base_config_1.TYPE,
EXT_texture_filter_anisotropic: base_config_1.TYPE,
EXT_texture_norm16: base_config_1.TYPE,
ErrorEvent: base_config_1.TYPE_VALUE,
Event: base_config_1.TYPE_VALUE,
EventListener: base_config_1.TYPE,
EventListenerObject: base_config_1.TYPE,
EventSourceEventMap: base_config_1.TYPE,
EventSource: base_config_1.TYPE_VALUE,
EventTarget: base_config_1.TYPE_VALUE,
ExtendableEvent: base_config_1.TYPE_VALUE,
ExtendableMessageEvent: base_config_1.TYPE_VALUE,
FetchEvent: base_config_1.TYPE_VALUE,
File: base_config_1.TYPE_VALUE,
FileList: base_config_1.TYPE_VALUE,
FileReaderEventMap: base_config_1.TYPE,
FileReader: base_config_1.TYPE_VALUE,
FileReaderSync: base_config_1.TYPE_VALUE,
FileSystemDirectoryHandle: base_config_1.TYPE_VALUE,
FileSystemFileHandle: base_config_1.TYPE_VALUE,
FileSystemHandle: base_config_1.TYPE_VALUE,
FileSystemSyncAccessHandle: base_config_1.TYPE_VALUE,
FontFace: base_config_1.TYPE_VALUE,
FontFaceSetEventMap: base_config_1.TYPE,
FontFaceSet: base_config_1.TYPE_VALUE,
FontFaceSetLoadEvent: base_config_1.TYPE_VALUE,
FontFaceSource: base_config_1.TYPE,
FormData: base_config_1.TYPE_VALUE,
GenericTransformStream: base_config_1.TYPE,
Headers: base_config_1.TYPE_VALUE,
IDBCursor: base_config_1.TYPE_VALUE,
IDBCursorWithValue: base_config_1.TYPE_VALUE,
IDBDatabaseEventMap: base_config_1.TYPE,
IDBDatabase: base_config_1.TYPE_VALUE,
IDBFactory: base_config_1.TYPE_VALUE,
IDBIndex: base_config_1.TYPE_VALUE,
IDBKeyRange: base_config_1.TYPE_VALUE,
IDBObjectStore: base_config_1.TYPE_VALUE,
IDBOpenDBRequestEventMap: base_config_1.TYPE,
IDBOpenDBRequest: base_config_1.TYPE_VALUE,
IDBRequestEventMap: base_config_1.TYPE,
IDBRequest: base_config_1.TYPE_VALUE,
IDBTransactionEventMap: base_config_1.TYPE,
IDBTransaction: base_config_1.TYPE_VALUE,
IDBVersionChangeEvent: base_config_1.TYPE_VALUE,
ImageBitmap: base_config_1.TYPE_VALUE,
ImageBitmapRenderingContext: base_config_1.TYPE_VALUE,
ImageData: base_config_1.TYPE_VALUE,
KHR_parallel_shader_compile: base_config_1.TYPE,
Lock: base_config_1.TYPE_VALUE,
LockManager: base_config_1.TYPE_VALUE,
MediaCapabilities: base_config_1.TYPE_VALUE,
MessageChannel: base_config_1.TYPE_VALUE,
MessageEvent: base_config_1.TYPE_VALUE,
MessagePortEventMap: base_config_1.TYPE,
MessagePort: base_config_1.TYPE_VALUE,
NavigationPreloadManager: base_config_1.TYPE_VALUE,
NavigatorConcurrentHardware: base_config_1.TYPE,
NavigatorID: base_config_1.TYPE,
NavigatorLanguage: base_config_1.TYPE,
NavigatorLocks: base_config_1.TYPE,
NavigatorOnLine: base_config_1.TYPE,
NavigatorStorage: base_config_1.TYPE,
NotificationEventMap: base_config_1.TYPE,
Notification: base_config_1.TYPE_VALUE,
NotificationEvent: base_config_1.TYPE_VALUE,
OES_draw_buffers_indexed: base_config_1.TYPE,
OES_element_index_uint: base_config_1.TYPE,
OES_fbo_render_mipmap: base_config_1.TYPE,
OES_standard_derivatives: base_config_1.TYPE,
OES_texture_float: base_config_1.TYPE,
OES_texture_float_linear: base_config_1.TYPE,
OES_texture_half_float: base_config_1.TYPE,
OES_texture_half_float_linear: base_config_1.TYPE,
OES_vertex_array_object: base_config_1.TYPE,
OVR_multiview2: base_config_1.TYPE,
OffscreenCanvasEventMap: base_config_1.TYPE,
OffscreenCanvas: base_config_1.TYPE_VALUE,
OffscreenCanvasRenderingContext2D: base_config_1.TYPE_VALUE,
Path2D: base_config_1.TYPE_VALUE,
PerformanceEventMap: base_config_1.TYPE,
Performance: base_config_1.TYPE_VALUE,
PerformanceEntry: base_config_1.TYPE_VALUE,
PerformanceMark: base_config_1.TYPE_VALUE,
PerformanceMeasure: base_config_1.TYPE_VALUE,
PerformanceObserver: base_config_1.TYPE_VALUE,
PerformanceObserverEntryList: base_config_1.TYPE_VALUE,
PerformanceResourceTiming: base_config_1.TYPE_VALUE,
PerformanceServerTiming: base_config_1.TYPE_VALUE,
PermissionStatusEventMap: base_config_1.TYPE,
PermissionStatus: base_config_1.TYPE_VALUE,
Permissions: base_config_1.TYPE_VALUE,
ProgressEvent: base_config_1.TYPE_VALUE,
PromiseRejectionEvent: base_config_1.TYPE_VALUE,
PushEvent: base_config_1.TYPE_VALUE,
PushManager: base_config_1.TYPE_VALUE,
PushMessageData: base_config_1.TYPE_VALUE,
PushSubscription: base_config_1.TYPE_VALUE,
PushSubscriptionOptions: base_config_1.TYPE_VALUE,
RTCEncodedAudioFrame: base_config_1.TYPE_VALUE,
RTCEncodedVideoFrame: base_config_1.TYPE_VALUE,
ReadableByteStreamController: base_config_1.TYPE_VALUE,
ReadableStream: base_config_1.TYPE_VALUE,
ReadableStreamBYOBReader: base_config_1.TYPE_VALUE,
ReadableStreamBYOBRequest: base_config_1.TYPE_VALUE,
ReadableStreamDefaultController: base_config_1.TYPE_VALUE,
ReadableStreamDefaultReader: base_config_1.TYPE_VALUE,
ReadableStreamGenericReader: base_config_1.TYPE,
Request: base_config_1.TYPE_VALUE,
Response: base_config_1.TYPE_VALUE,
SecurityPolicyViolationEvent: base_config_1.TYPE_VALUE,
ServiceWorkerEventMap: base_config_1.TYPE,
ServiceWorker: base_config_1.TYPE_VALUE,
ServiceWorkerContainerEventMap: base_config_1.TYPE,
ServiceWorkerContainer: base_config_1.TYPE_VALUE,
ServiceWorkerGlobalScopeEventMap: base_config_1.TYPE,
ServiceWorkerGlobalScope: base_config_1.TYPE_VALUE,
ServiceWorkerRegistrationEventMap: base_config_1.TYPE,
ServiceWorkerRegistration: base_config_1.TYPE_VALUE,
SharedWorkerGlobalScopeEventMap: base_config_1.TYPE,
SharedWorkerGlobalScope: base_config_1.TYPE_VALUE,
StorageManager: base_config_1.TYPE_VALUE,
SubtleCrypto: base_config_1.TYPE_VALUE,
TextDecoder: base_config_1.TYPE_VALUE,
TextDecoderCommon: base_config_1.TYPE,
TextDecoderStream: base_config_1.TYPE_VALUE,
TextEncoder: base_config_1.TYPE_VALUE,
TextEncoderCommon: base_config_1.TYPE,
TextEncoderStream: base_config_1.TYPE_VALUE,
TextMetrics: base_config_1.TYPE_VALUE,
TransformStream: base_config_1.TYPE_VALUE,
TransformStreamDefaultController: base_config_1.TYPE_VALUE,
URL: base_config_1.TYPE_VALUE,
URLSearchParams: base_config_1.TYPE_VALUE,
VideoColorSpace: base_config_1.TYPE_VALUE,
WEBGL_color_buffer_float: base_config_1.TYPE,
WEBGL_compressed_texture_astc: base_config_1.TYPE,
WEBGL_compressed_texture_etc: base_config_1.TYPE,
WEBGL_compressed_texture_etc1: base_config_1.TYPE,
WEBGL_compressed_texture_s3tc: base_config_1.TYPE,
WEBGL_compressed_texture_s3tc_srgb: base_config_1.TYPE,
WEBGL_debug_renderer_info: base_config_1.TYPE,
WEBGL_debug_shaders: base_config_1.TYPE,
WEBGL_depth_texture: base_config_1.TYPE,
WEBGL_draw_buffers: base_config_1.TYPE,
WEBGL_lose_context: base_config_1.TYPE,
WEBGL_multi_draw: base_config_1.TYPE,
WebGL2RenderingContext: base_config_1.TYPE_VALUE,
WebGL2RenderingContextBase: base_config_1.TYPE,
WebGL2RenderingContextOverloads: base_config_1.TYPE,
WebGLActiveInfo: base_config_1.TYPE_VALUE,
WebGLBuffer: base_config_1.TYPE_VALUE,
WebGLContextEvent: base_config_1.TYPE_VALUE,
WebGLFramebuffer: base_config_1.TYPE_VALUE,
WebGLProgram: base_config_1.TYPE_VALUE,
WebGLQuery: base_config_1.TYPE_VALUE,
WebGLRenderbuffer: base_config_1.TYPE_VALUE,
WebGLRenderingContext: base_config_1.TYPE_VALUE,
WebGLRenderingContextBase: base_config_1.TYPE,
WebGLRenderingContextOverloads: base_config_1.TYPE,
WebGLSampler: base_config_1.TYPE_VALUE,
WebGLShader: base_config_1.TYPE_VALUE,
WebGLShaderPrecisionFormat: base_config_1.TYPE_VALUE,
WebGLSync: base_config_1.TYPE_VALUE,
WebGLTexture: base_config_1.TYPE_VALUE,
WebGLTransformFeedback: base_config_1.TYPE_VALUE,
WebGLUniformLocation: base_config_1.TYPE_VALUE,
WebGLVertexArrayObject: base_config_1.TYPE_VALUE,
WebGLVertexArrayObjectOES: base_config_1.TYPE,
WebSocketEventMap: base_config_1.TYPE,
WebSocket: base_config_1.TYPE_VALUE,
WindowClient: base_config_1.TYPE_VALUE,
WindowOrWorkerGlobalScope: base_config_1.TYPE,
WorkerEventMap: base_config_1.TYPE,
Worker: base_config_1.TYPE_VALUE,
WorkerGlobalScopeEventMap: base_config_1.TYPE,
WorkerGlobalScope: base_config_1.TYPE_VALUE,
WorkerLocation: base_config_1.TYPE_VALUE,
WorkerNavigator: base_config_1.TYPE_VALUE,
WritableStream: base_config_1.TYPE_VALUE,
WritableStreamDefaultController: base_config_1.TYPE_VALUE,
WritableStreamDefaultWriter: base_config_1.TYPE_VALUE,
XMLHttpRequestEventMap: base_config_1.TYPE,
XMLHttpRequest: base_config_1.TYPE_VALUE,
XMLHttpRequestEventTargetEventMap: base_config_1.TYPE,
XMLHttpRequestEventTarget: base_config_1.TYPE_VALUE,
XMLHttpRequestUpload: base_config_1.TYPE_VALUE,
Console: base_config_1.TYPE,
WebAssembly: base_config_1.TYPE_VALUE,
FrameRequestCallback: base_config_1.TYPE,
LockGrantedCallback: base_config_1.TYPE,
OnErrorEventHandlerNonNull: base_config_1.TYPE,
PerformanceObserverCallback: base_config_1.TYPE,
QueuingStrategySize: base_config_1.TYPE,
TransformerFlushCallback: base_config_1.TYPE,
TransformerStartCallback: base_config_1.TYPE,
TransformerTransformCallback: base_config_1.TYPE,
UnderlyingSinkAbortCallback: base_config_1.TYPE,
UnderlyingSinkCloseCallback: base_config_1.TYPE,
UnderlyingSinkStartCallback: base_config_1.TYPE,
UnderlyingSinkWriteCallback: base_config_1.TYPE,
UnderlyingSourceCancelCallback: base_config_1.TYPE,
UnderlyingSourcePullCallback: base_config_1.TYPE,
UnderlyingSourceStartCallback: base_config_1.TYPE,
VoidFunction: base_config_1.TYPE,
AlgorithmIdentifier: base_config_1.TYPE,
BigInteger: base_config_1.TYPE,
BinaryData: base_config_1.TYPE,
BlobPart: base_config_1.TYPE,
BodyInit: base_config_1.TYPE,
BufferSource: base_config_1.TYPE,
CanvasImageSource: base_config_1.TYPE,
DOMHighResTimeStamp: base_config_1.TYPE,
EpochTimeStamp: base_config_1.TYPE,
EventListenerOrEventListenerObject: base_config_1.TYPE,
Float32List: base_config_1.TYPE,
FormDataEntryValue: base_config_1.TYPE,
GLbitfield: base_config_1.TYPE,
GLboolean: base_config_1.TYPE,
GLclampf: base_config_1.TYPE,
GLenum: base_config_1.TYPE,
GLfloat: base_config_1.TYPE,
GLint: base_config_1.TYPE,
GLint64: base_config_1.TYPE,
GLintptr: base_config_1.TYPE,
GLsizei: base_config_1.TYPE,
GLsizeiptr: base_config_1.TYPE,
GLuint: base_config_1.TYPE,
GLuint64: base_config_1.TYPE,
HashAlgorithmIdentifier: base_config_1.TYPE,
HeadersInit: base_config_1.TYPE,
IDBValidKey: base_config_1.TYPE,
ImageBitmapSource: base_config_1.TYPE,
Int32List: base_config_1.TYPE,
MessageEventSource: base_config_1.TYPE,
NamedCurve: base_config_1.TYPE,
OffscreenRenderingContext: base_config_1.TYPE,
OnErrorEventHandler: base_config_1.TYPE,
PerformanceEntryList: base_config_1.TYPE,
PushMessageDataInit: base_config_1.TYPE,
ReadableStreamController: base_config_1.TYPE,
ReadableStreamReadResult: base_config_1.TYPE,
ReadableStreamReader: base_config_1.TYPE,
RequestInfo: base_config_1.TYPE,
TexImageSource: base_config_1.TYPE,
TimerHandler: base_config_1.TYPE,
Transferable: base_config_1.TYPE,
Uint32List: base_config_1.TYPE,
VibratePattern: base_config_1.TYPE,
XMLHttpRequestBodyInit: base_config_1.TYPE,
BinaryType: base_config_1.TYPE,
CanvasDirection: base_config_1.TYPE,
CanvasFillRule: base_config_1.TYPE,
CanvasFontKerning: base_config_1.TYPE,
CanvasFontStretch: base_config_1.TYPE,
CanvasFontVariantCaps: base_config_1.TYPE,
CanvasLineCap: base_config_1.TYPE,
CanvasLineJoin: base_config_1.TYPE,
CanvasTextAlign: base_config_1.TYPE,
CanvasTextBaseline: base_config_1.TYPE,
CanvasTextRendering: base_config_1.TYPE,
ClientTypes: base_config_1.TYPE,
ColorGamut: base_config_1.TYPE,
ColorSpaceConversion: base_config_1.TYPE,
DocumentVisibilityState: base_config_1.TYPE,
EndingType: base_config_1.TYPE,
FileSystemHandleKind: base_config_1.TYPE,
FontDisplay: base_config_1.TYPE,
FontFaceLoadStatus: base_config_1.TYPE,
FontFaceSetLoadStatus: base_config_1.TYPE,
FrameType: base_config_1.TYPE,
GlobalCompositeOperation: base_config_1.TYPE,
HdrMetadataType: base_config_1.TYPE,
IDBCursorDirection: base_config_1.TYPE,
IDBRequestReadyState: base_config_1.TYPE,
IDBTransactionDurability: base_config_1.TYPE,
IDBTransactionMode: base_config_1.TYPE,
ImageOrientation: base_config_1.TYPE,
ImageSmoothingQuality: base_config_1.TYPE,
KeyFormat: base_config_1.TYPE,
KeyType: base_config_1.TYPE,
KeyUsage: base_config_1.TYPE,
LockMode: base_config_1.TYPE,
MediaDecodingType: base_config_1.TYPE,
MediaEncodingType: base_config_1.TYPE,
NotificationDirection: base_config_1.TYPE,
NotificationPermission: base_config_1.TYPE,
OffscreenRenderingContextId: base_config_1.TYPE,
PermissionName: base_config_1.TYPE,
PermissionState: base_config_1.TYPE,
PredefinedColorSpace: base_config_1.TYPE,
PremultiplyAlpha: base_config_1.TYPE,
PushEncryptionKeyName: base_config_1.TYPE,
RTCEncodedVideoFrameType: base_config_1.TYPE,
ReadableStreamReaderMode: base_config_1.TYPE,
ReadableStreamType: base_config_1.TYPE,
ReferrerPolicy: base_config_1.TYPE,
RequestCache: base_config_1.TYPE,
RequestCredentials: base_config_1.TYPE,
RequestDestination: base_config_1.TYPE,
RequestMode: base_config_1.TYPE,
RequestRedirect: base_config_1.TYPE,
ResizeQuality: base_config_1.TYPE,
ResponseType: base_config_1.TYPE,
SecurityPolicyViolationEventDisposition: base_config_1.TYPE,
ServiceWorkerState: base_config_1.TYPE,
ServiceWorkerUpdateViaCache: base_config_1.TYPE,
TransferFunction: base_config_1.TYPE,
VideoColorPrimaries: base_config_1.TYPE,
VideoMatrixCoefficients: base_config_1.TYPE,
VideoTransferCharacteristics: base_config_1.TYPE,
WebGLPowerPreference: base_config_1.TYPE,
WorkerType: base_config_1.TYPE,
XMLHttpRequestResponseType: base_config_1.TYPE
};
}
});
// ../../node_modules/.pnpm/@typescript-eslint+scope-manager@5.62.0/node_modules/@typescript-eslint/scope-manager/dist/lib/webworker.iterable.js
var require_webworker_iterable = __commonJS({
"../../node_modules/.pnpm/@typescript-eslint+scope-manager@5.62.0/node_modules/@typescript-eslint/scope-manager/dist/lib/webworker.iterable.js"(exports) {
"use strict";
init_shims();
Object.defineProperty(exports, "__esModule", { value: true });
exports.webworker_iterable = void 0;
var base_config_1 = require_base_config();
exports.webworker_iterable = {
Cache: base_config_1.TYPE,
CanvasPath: base_config_1.TYPE,
CanvasPathDrawingStyles: base_config_1.TYPE,
DOMStringList: base_config_1.TYPE,
FileList: base_config_1.TYPE,
FontFaceSet: base_config_1.TYPE,
FormData: base_config_1.TYPE,
Headers: base_config_1.TYPE,
IDBDatabase: base_config_1.TYPE,
IDBObjectStore: base_config_1.TYPE,
MessageEvent: base_config_1.TYPE,
SubtleCrypto: base_config_1.TYPE,
URLSearchParams: base_config_1.TYPE,
WEBGL_draw_buffers: base_config_1.TYPE,
WEBGL_multi_draw: base_config_1.TYPE,
WebGL2RenderingContextBase: base_config_1.TYPE,
WebGL2RenderingContextOverloads: base_config_1.TYPE,
WebGLRenderingContextBase: base_config_1.TYPE,
WebGLRenderingContextOverloads: base_config_1.TYPE
};
}
});
// ../../node_modules/.pnpm/@typescript-eslint+scope-manager@5.62.0/node_modules/@typescript-eslint/scope-manager/dist/lib/index.js
var require_lib3 = __commonJS({
"../../node_modules/.pnpm/@typescript-eslint+scope-manager@5.62.0/node_modules/@typescript-eslint/scope-manager/dist/lib/index.js"(exports) {
"use strict";
init_shims();
Object.defineProperty(exports, "__esModule", { value: true });
exports.lib = void 0;
var decorators_1 = require_decorators();
var decorators_legacy_1 = require_decorators_legacy();
var dom_1 = require_dom();
var dom_iterable_1 = require_dom_iterable();
var es5_1 = require_es5();
var es6_1 = require_es6();
var es7_1 = require_es7();
var es2015_1 = require_es2015();
var es2015_collection_1 = require_es2015_collection();
var es2015_core_1 = require_es2015_core();
var es2015_generator_1 = require_es2015_generator();
var es2015_iterable_1 = require_es2015_iterable();
var es2015_promise_1 = require_es2015_promise();
var es2015_proxy_1 = require_es2015_proxy();
var es2015_reflect_1 = require_es2015_reflect();
var es2015_symbol_1 = require_es2015_symbol();
var es2015_symbol_wellknown_1 = require_es2015_symbol_wellknown();
var es2016_1 = require_es2016();
var es2016_array_include_1 = require_es2016_array_include();
var es2016_full_1 = require_es2016_full();
var es2017_1 = require_es2017();
var es2017_full_1 = require_es2017_full();
var es2017_intl_1 = require_es2017_intl();
var es2017_object_1 = require_es2017_object();
var es2017_sharedmemory_1 = require_es2017_sharedmemory();
var es2017_string_1 = require_es2017_string();
var es2017_typedarrays_1 = require_es2017_typedarrays();
var es2018_1 = require_es2018();
var es2018_asyncgenerator_1 = require_es2018_asyncgenerator();
var es2018_asynciterable_1 = require_es2018_asynciterable();
var es2018_full_1 = require_es2018_full();
var es2018_intl_1 = require_es2018_intl();
var es2018_promise_1 = require_es2018_promise();
var es2018_regexp_1 = require_es2018_regexp();
var es2019_1 = require_es2019();
var es2019_array_1 = require_es2019_array();
var es2019_full_1 = require_es2019_full();
var es2019_intl_1 = require_es2019_intl();
var es2019_object_1 = require_es2019_object();
var es2019_string_1 = require_es2019_string();
var es2019_symbol_1 = require_es2019_symbol();
var es2020_1 = require_es2020();
var es2020_bigint_1 = require_es2020_bigint();
var es2020_date_1 = require_es2020_date();
var es2020_full_1 = require_es2020_full();
var es2020_intl_1 = require_es2020_intl();
var es2020_number_1 = require_es2020_number();
var es2020_promise_1 = require_es2020_promise();
var es2020_sharedmemory_1 = require_es2020_sharedmemory();
var es2020_string_1 = require_es2020_string();
var es2020_symbol_wellknown_1 = require_es2020_symbol_wellknown();
var es2021_1 = require_es2021();
var es2021_full_1 = require_es2021_full();
var es2021_intl_1 = require_es2021_intl();
var es2021_promise_1 = require_es2021_promise();
var es2021_string_1 = require_es2021_string();
var es2021_weakref_1 = require_es2021_weakref();
var es2022_1 = require_es2022();
var es2022_array_1 = require_es2022_array();
var es2022_error_1 = require_es2022_error();
var es2022_full_1 = require_es2022_full();
var es2022_intl_1 = require_es2022_intl();
var es2022_object_1 = require_es2022_object();
var es2022_regexp_1 = require_es2022_regexp();
var es2022_sharedmemory_1 = require_es2022_sharedmemory();
var es2022_string_1 = require_es2022_string();
var es2023_1 = require_es2023();
var es2023_array_1 = require_es2023_array();
var es2023_full_1 = require_es2023_full();
var esnext_1 = require_esnext();
var esnext_array_1 = require_esnext_array();
var esnext_asynciterable_1 = require_esnext_asynciterable();
var esnext_bigint_1 = require_esnext_bigint();
var esnext_full_1 = require_esnext_full();
var esnext_intl_1 = require_esnext_intl();
var esnext_promise_1 = require_esnext_promise();
var esnext_string_1 = require_esnext_string();
var esnext_symbol_1 = require_esnext_symbol();
var esnext_weakref_1 = require_esnext_weakref();
var lib_1 = require_lib2();
var scripthost_1 = require_scripthost();
var webworker_1 = require_webworker();
var webworker_importscripts_1 = require_webworker_importscripts();
var webworker_iterable_1 = require_webworker_iterable();
var lib = {
es5: es5_1.es5,
es6: es6_1.es6,
es2015: es2015_1.es2015,
es7: es7_1.es7,
es2016: es2016_1.es2016,
es2017: es2017_1.es2017,
es2018: es2018_1.es2018,
es2019: es2019_1.es2019,
es2020: es2020_1.es2020,
es2021: es2021_1.es2021,
es2022: es2022_1.es2022,
es2023: es2023_1.es2023,
esnext: esnext_1.esnext,
dom: dom_1.dom,
"dom.iterable": dom_iterable_1.dom_iterable,
webworker: webworker_1.webworker,
"webworker.importscripts": webworker_importscripts_1.webworker_importscripts,
"webworker.iterable": webworker_iterable_1.webworker_iterable,
scripthost: scripthost_1.scripthost,
"es2015.core": es2015_core_1.es2015_core,
"es2015.collection": es2015_collection_1.es2015_collection,
"es2015.generator": es2015_generator_1.es2015_generator,
"es2015.iterable": es2015_iterable_1.es2015_iterable,
"es2015.promise": es2015_promise_1.es2015_promise,
"es2015.proxy": es2015_proxy_1.es2015_proxy,
"es2015.reflect": es2015_reflect_1.es2015_reflect,
"es2015.symbol": es2015_symbol_1.es2015_symbol,
"es2015.symbol.wellknown": es2015_symbol_wellknown_1.es2015_symbol_wellknown,
"es2016.array.include": es2016_array_include_1.es2016_array_include,
"es2017.object": es2017_object_1.es2017_object,
"es2017.sharedmemory": es2017_sharedmemory_1.es2017_sharedmemory,
"es2017.string": es2017_string_1.es2017_string,
"es2017.intl": es2017_intl_1.es2017_intl,
"es2017.typedarrays": es2017_typedarrays_1.es2017_typedarrays,
"es2018.asyncgenerator": es2018_asyncgenerator_1.es2018_asyncgenerator,
"es2018.asynciterable": es2018_asynciterable_1.es2018_asynciterable,
"es2018.intl": es2018_intl_1.es2018_intl,
"es2018.promise": es2018_promise_1.es2018_promise,
"es2018.regexp": es2018_regexp_1.es2018_regexp,
"es2019.array": es2019_array_1.es2019_array,
"es2019.object": es2019_object_1.es2019_object,
"es2019.string": es2019_string_1.es2019_string,
"es2019.symbol": es2019_symbol_1.es2019_symbol,
"es2019.intl": es2019_intl_1.es2019_intl,
"es2020.bigint": es2020_bigint_1.es2020_bigint,
"es2020.date": es2020_date_1.es2020_date,
"es2020.promise": es2020_promise_1.es2020_promise,
"es2020.sharedmemory": es2020_sharedmemory_1.es2020_sharedmemory,
"es2020.string": es2020_string_1.es2020_string,
"es2020.symbol.wellknown": es2020_symbol_wellknown_1.es2020_symbol_wellknown,
"es2020.intl": es2020_intl_1.es2020_intl,
"es2020.number": es2020_number_1.es2020_number,
"es2021.promise": es2021_promise_1.es2021_promise,
"es2021.string": es2021_string_1.es2021_string,
"es2021.weakref": es2021_weakref_1.es2021_weakref,
"es2021.intl": es2021_intl_1.es2021_intl,
"es2022.array": es2022_array_1.es2022_array,
"es2022.error": es2022_error_1.es2022_error,
"es2022.intl": es2022_intl_1.es2022_intl,
"es2022.object": es2022_object_1.es2022_object,
"es2022.sharedmemory": es2022_sharedmemory_1.es2022_sharedmemory,
"es2022.string": es2022_string_1.es2022_string,
"es2022.regexp": es2022_regexp_1.es2022_regexp,
"es2023.array": es2023_array_1.es2023_array,
"esnext.array": esnext_array_1.esnext_array,
"esnext.symbol": esnext_symbol_1.esnext_symbol,
"esnext.asynciterable": esnext_asynciterable_1.esnext_asynciterable,
"esnext.intl": esnext_intl_1.esnext_intl,
"esnext.bigint": esnext_bigint_1.esnext_bigint,
"esnext.string": esnext_string_1.esnext_string,
"esnext.promise": esnext_promise_1.esnext_promise,
"esnext.weakref": esnext_weakref_1.esnext_weakref,
decorators: decorators_1.decorators,
"decorators.legacy": decorators_legacy_1.decorators_legacy,
"es2016.full": es2016_full_1.es2016_full,
"es2017.full": es2017_full_1.es2017_full,
"es2018.full": es2018_full_1.es2018_full,
"es2019.full": es2019_full_1.es2019_full,
"es2020.full": es2020_full_1.es2020_full,
"es2021.full": es2021_full_1.es2021_full,
"es2022.full": es2022_full_1.es2022_full,
"es2023.full": es2023_full_1.es2023_full,
"esnext.full": esnext_full_1.esnext_full,
lib: lib_1.lib
};
exports.lib = lib;
}
});
// ../../node_modules/.pnpm/@typescript-eslint+scope-manager@5.62.0/node_modules/@typescript-eslint/scope-manager/dist/assert.js
var require_assert = __commonJS({
"../../node_modules/.pnpm/@typescript-eslint+scope-manager@5.62.0/node_modules/@typescript-eslint/scope-manager/dist/assert.js"(exports) {
"use strict";
init_shims();
Object.defineProperty(exports, "__esModule", { value: true });
exports.assert = void 0;
function assert(value, message) {
if (value == null) {
throw new Error(message);
}
}
exports.assert = assert;
}
});
// ../../node_modules/.pnpm/@typescript-eslint+scope-manager@5.62.0/node_modules/@typescript-eslint/scope-manager/dist/ID.js
var require_ID = __commonJS({
"../../node_modules/.pnpm/@typescript-eslint+scope-manager@5.62.0/node_modules/@typescript-eslint/scope-manager/dist/ID.js"(exports) {
"use strict";
init_shims();
Object.defineProperty(exports, "__esModule", { value: true });
exports.resetIds = exports.createIdGenerator = void 0;
var ID_CACHE = /* @__PURE__ */ new Map();
var NEXT_KEY = 0;
function createIdGenerator() {
const key = NEXT_KEY += 1;
ID_CACHE.set(key, 0);
return () => {
var _a;
const current = (_a = ID_CACHE.get(key)) !== null && _a !== void 0 ? _a : 0;
const next = current + 1;
ID_CACHE.set(key, next);
return next;
};
}
exports.createIdGenerator = createIdGenerator;
function resetIds() {
ID_CACHE.clear();
}
exports.resetIds = resetIds;
}
});
// ../../node_modules/.pnpm/@typescript-eslint+scope-manager@5.62.0/node_modules/@typescript-eslint/scope-manager/dist/definition/DefinitionBase.js
var require_DefinitionBase = __commonJS({
"../../node_modules/.pnpm/@typescript-eslint+scope-manager@5.62.0/node_modules/@typescript-eslint/scope-manager/dist/definition/DefinitionBase.js"(exports) {
"use strict";
init_shims();
Object.defineProperty(exports, "__esModule", { value: true });
exports.DefinitionBase = void 0;
var ID_1 = require_ID();
var generator = (0, ID_1.createIdGenerator)();
var DefinitionBase = class {
constructor(type, name, node2, parent) {
this.$id = generator();
this.type = type;
this.name = name;
this.node = node2;
this.parent = parent;
}
};
exports.DefinitionBase = DefinitionBase;
}
});
// ../../node_modules/.pnpm/@typescript-eslint+scope-manager@5.62.0/node_modules/@typescript-eslint/scope-manager/dist/definition/DefinitionType.js
var require_DefinitionType = __commonJS({
"../../node_modules/.pnpm/@typescript-eslint+scope-manager@5.62.0/node_modules/@typescript-eslint/scope-manager/dist/definition/DefinitionType.js"(exports) {
"use strict";
init_shims();
Object.defineProperty(exports, "__esModule", { value: true });
exports.DefinitionType = void 0;
var DefinitionType;
(function(DefinitionType2) {
DefinitionType2["CatchClause"] = "CatchClause";
DefinitionType2["ClassName"] = "ClassName";
DefinitionType2["FunctionName"] = "FunctionName";
DefinitionType2["ImplicitGlobalVariable"] = "ImplicitGlobalVariable";
DefinitionType2["ImportBinding"] = "ImportBinding";
DefinitionType2["Parameter"] = "Parameter";
DefinitionType2["TSEnumName"] = "TSEnumName";
DefinitionType2["TSEnumMember"] = "TSEnumMemberName";
DefinitionType2["TSModuleName"] = "TSModuleName";
DefinitionType2["Type"] = "Type";
DefinitionType2["Variable"] = "Variable";
})(DefinitionType || (exports.DefinitionType = DefinitionType = {}));
}
});
// ../../node_modules/.pnpm/@typescript-eslint+scope-manager@5.62.0/node_modules/@typescript-eslint/scope-manager/dist/definition/CatchClauseDefinition.js
var require_CatchClauseDefinition = __commonJS({
"../../node_modules/.pnpm/@typescript-eslint+scope-manager@5.62.0/node_modules/@typescript-eslint/scope-manager/dist/definition/CatchClauseDefinition.js"(exports) {
"use strict";
init_shims();
Object.defineProperty(exports, "__esModule", { value: true });
exports.CatchClauseDefinition = void 0;
var DefinitionBase_1 = require_DefinitionBase();
var DefinitionType_1 = require_DefinitionType();
var CatchClauseDefinition = class extends DefinitionBase_1.DefinitionBase {
constructor(name, node2) {
super(DefinitionType_1.DefinitionType.CatchClause, name, node2, null);
this.isTypeDefinition = false;
this.isVariableDefinition = true;
}
};
exports.CatchClauseDefinition = CatchClauseDefinition;
}
});
// ../../node_modules/.pnpm/@typescript-eslint+scope-manager@5.62.0/node_modules/@typescript-eslint/scope-manager/dist/definition/ClassNameDefinition.js
var require_ClassNameDefinition = __commonJS({
"../../node_modules/.pnpm/@typescript-eslint+scope-manager@5.62.0/node_modules/@typescript-eslint/scope-manager/dist/definition/ClassNameDefinition.js"(exports) {
"use strict";
init_shims();
Object.defineProperty(exports, "__esModule", { value: true });
exports.ClassNameDefinition = void 0;
var DefinitionBase_1 = require_DefinitionBase();
var DefinitionType_1 = require_DefinitionType();
var ClassNameDefinition = class extends DefinitionBase_1.DefinitionBase {
constructor(name, node2) {
super(DefinitionType_1.DefinitionType.ClassName, name, node2, null);
this.isTypeDefinition = true;
this.isVariableDefinition = true;
}
};
exports.ClassNameDefinition = ClassNameDefinition;
}
});
// ../../node_modules/.pnpm/@typescript-eslint+scope-manager@5.62.0/node_modules/@typescript-eslint/scope-manager/dist/definition/Definition.js
var require_Definition = __commonJS({
"../../node_modules/.pnpm/@typescript-eslint+scope-manager@5.62.0/node_modules/@typescript-eslint/scope-manager/dist/definition/Definition.js"(exports) {
"use strict";
init_shims();
Object.defineProperty(exports, "__esModule", { value: true });
}
});
// ../../node_modules/.pnpm/@typescript-eslint+scope-manager@5.62.0/node_modules/@typescript-eslint/scope-manager/dist/definition/FunctionNameDefinition.js
var require_FunctionNameDefinition = __commonJS({
"../../node_modules/.pnpm/@typescript-eslint+scope-manager@5.62.0/node_modules/@typescript-eslint/scope-manager/dist/definition/FunctionNameDefinition.js"(exports) {
"use strict";
init_shims();
Object.defineProperty(exports, "__esModule", { value: true });
exports.FunctionNameDefinition = void 0;
var DefinitionBase_1 = require_DefinitionBase();
var DefinitionType_1 = require_DefinitionType();
var FunctionNameDefinition = class extends DefinitionBase_1.DefinitionBase {
constructor(name, node2) {
super(DefinitionType_1.DefinitionType.FunctionName, name, node2, null);
this.isTypeDefinition = false;
this.isVariableDefinition = true;
}
};
exports.FunctionNameDefinition = FunctionNameDefinition;
}
});
// ../../node_modules/.pnpm/@typescript-eslint+scope-manager@5.62.0/node_modules/@typescript-eslint/scope-manager/dist/definition/ImplicitGlobalVariableDefinition.js
var require_ImplicitGlobalVariableDefinition = __commonJS({
"../../node_modules/.pnpm/@typescript-eslint+scope-manager@5.62.0/node_modules/@typescript-eslint/scope-manager/dist/definition/ImplicitGlobalVariableDefinition.js"(exports) {
"use strict";
init_shims();
Object.defineProperty(exports, "__esModule", { value: true });
exports.ImplicitGlobalVariableDefinition = void 0;
var DefinitionBase_1 = require_DefinitionBase();
var DefinitionType_1 = require_DefinitionType();
var ImplicitGlobalVariableDefinition = class extends DefinitionBase_1.DefinitionBase {
constructor(name, node2) {
super(DefinitionType_1.DefinitionType.ImplicitGlobalVariable, name, node2, null);
this.isTypeDefinition = false;
this.isVariableDefinition = true;
}
};
exports.ImplicitGlobalVariableDefinition = ImplicitGlobalVariableDefinition;
}
});
// ../../node_modules/.pnpm/@typescript-eslint+scope-manager@5.62.0/node_modules/@typescript-eslint/scope-manager/dist/definition/ImportBindingDefinition.js
var require_ImportBindingDefinition = __commonJS({
"../../node_modules/.pnpm/@typescript-eslint+scope-manager@5.62.0/node_modules/@typescript-eslint/scope-manager/dist/definition/ImportBindingDefinition.js"(exports) {
"use strict";
init_shims();
Object.defineProperty(exports, "__esModule", { value: true });
exports.ImportBindingDefinition = void 0;
var DefinitionBase_1 = require_DefinitionBase();
var DefinitionType_1 = require_DefinitionType();
var ImportBindingDefinition = class extends DefinitionBase_1.DefinitionBase {
constructor(name, node2, decl) {
super(DefinitionType_1.DefinitionType.ImportBinding, name, node2, decl);
this.isTypeDefinition = true;
this.isVariableDefinition = true;
}
};
exports.ImportBindingDefinition = ImportBindingDefinition;
}
});
// ../../node_modules/.pnpm/@typescript-eslint+scope-manager@5.62.0/node_modules/@typescript-eslint/scope-manager/dist/definition/ParameterDefinition.js
var require_ParameterDefinition = __commonJS({
"../../node_modules/.pnpm/@typescript-eslint+scope-manager@5.62.0/node_modules/@typescript-eslint/scope-manager/dist/definition/ParameterDefinition.js"(exports) {
"use strict";
init_shims();
Object.defineProperty(exports, "__esModule", { value: true });
exports.ParameterDefinition = void 0;
var DefinitionBase_1 = require_DefinitionBase();
var DefinitionType_1 = require_DefinitionType();
var ParameterDefinition = class extends DefinitionBase_1.DefinitionBase {
constructor(name, node2, rest) {
super(DefinitionType_1.DefinitionType.Parameter, name, node2, null);
this.isTypeDefinition = false;
this.isVariableDefinition = true;
this.rest = rest;
}
};
exports.ParameterDefinition = ParameterDefinition;
}
});
// ../../node_modules/.pnpm/@typescript-eslint+scope-manager@5.62.0/node_modules/@typescript-eslint/scope-manager/dist/definition/TSEnumMemberDefinition.js
var require_TSEnumMemberDefinition = __commonJS({
"../../node_modules/.pnpm/@typescript-eslint+scope-manager@5.62.0/node_modules/@typescript-eslint/scope-manager/dist/definition/TSEnumMemberDefinition.js"(exports) {
"use strict";
init_shims();
Object.defineProperty(exports, "__esModule", { value: true });
exports.TSEnumMemberDefinition = void 0;
var DefinitionBase_1 = require_DefinitionBase();
var DefinitionType_1 = require_DefinitionType();
var TSEnumMemberDefinition = class extends DefinitionBase_1.DefinitionBase {
constructor(name, node2) {
super(DefinitionType_1.DefinitionType.TSEnumMember, name, node2, null);
this.isTypeDefinition = true;
this.isVariableDefinition = true;
}
};
exports.TSEnumMemberDefinition = TSEnumMemberDefinition;
}
});
// ../../node_modules/.pnpm/@typescript-eslint+scope-manager@5.62.0/node_modules/@typescript-eslint/scope-manager/dist/definition/TSEnumNameDefinition.js
var require_TSEnumNameDefinition = __commonJS({
"../../node_modules/.pnpm/@typescript-eslint+scope-manager@5.62.0/node_modules/@typescript-eslint/scope-manager/dist/definition/TSEnumNameDefinition.js"(exports) {
"use strict";
init_shims();
Object.defineProperty(exports, "__esModule", { value: true });
exports.TSEnumNameDefinition = void 0;
var DefinitionBase_1 = require_DefinitionBase();
var DefinitionType_1 = require_DefinitionType();
var TSEnumNameDefinition = class extends DefinitionBase_1.DefinitionBase {
constructor(name, node2) {
super(DefinitionType_1.DefinitionType.TSEnumName, name, node2, null);
this.isTypeDefinition = true;
this.isVariableDefinition = true;
}
};
exports.TSEnumNameDefinition = TSEnumNameDefinition;
}
});
// ../../node_modules/.pnpm/@typescript-eslint+scope-manager@5.62.0/node_modules/@typescript-eslint/scope-manager/dist/definition/TSModuleNameDefinition.js
var require_TSModuleNameDefinition = __commonJS({
"../../node_modules/.pnpm/@typescript-eslint+scope-manager@5.62.0/node_modules/@typescript-eslint/scope-manager/dist/definition/TSModuleNameDefinition.js"(exports) {
"use strict";
init_shims();
Object.defineProperty(exports, "__esModule", { value: true });
exports.TSModuleNameDefinition = void 0;
var DefinitionBase_1 = require_DefinitionBase();
var DefinitionType_1 = require_DefinitionType();
var TSModuleNameDefinition = class extends DefinitionBase_1.DefinitionBase {
constructor(name, node2) {
super(DefinitionType_1.DefinitionType.TSModuleName, name, node2, null);
this.isTypeDefinition = true;
this.isVariableDefinition = true;
}
};
exports.TSModuleNameDefinition = TSModuleNameDefinition;
}
});
// ../../node_modules/.pnpm/@typescript-eslint+scope-manager@5.62.0/node_modules/@typescript-eslint/scope-manager/dist/definition/TypeDefinition.js
var require_TypeDefinition = __commonJS({
"../../node_modules/.pnpm/@typescript-eslint+scope-manager@5.62.0/node_modules/@typescript-eslint/scope-manager/dist/definition/TypeDefinition.js"(exports) {
"use strict";
init_shims();
Object.defineProperty(exports, "__esModule", { value: true });
exports.TypeDefinition = void 0;
var DefinitionBase_1 = require_DefinitionBase();
var DefinitionType_1 = require_DefinitionType();
var TypeDefinition = class extends DefinitionBase_1.DefinitionBase {
constructor(name, node2) {
super(DefinitionType_1.DefinitionType.Type, name, node2, null);
this.isTypeDefinition = true;
this.isVariableDefinition = false;
}
};
exports.TypeDefinition = TypeDefinition;
}
});
// ../../node_modules/.pnpm/@typescript-eslint+scope-manager@5.62.0/node_modules/@typescript-eslint/scope-manager/dist/definition/VariableDefinition.js
var require_VariableDefinition = __commonJS({
"../../node_modules/.pnpm/@typescript-eslint+scope-manager@5.62.0/node_modules/@typescript-eslint/scope-manager/dist/definition/VariableDefinition.js"(exports) {
"use strict";
init_shims();
Object.defineProperty(exports, "__esModule", { value: true });
exports.VariableDefinition = void 0;
var DefinitionBase_1 = require_DefinitionBase();
var DefinitionType_1 = require_DefinitionType();
var VariableDefinition = class extends DefinitionBase_1.DefinitionBase {
constructor(name, node2, decl) {
super(DefinitionType_1.DefinitionType.Variable, name, node2, decl);
this.isTypeDefinition = false;
this.isVariableDefinition = true;
}
};
exports.VariableDefinition = VariableDefinition;
}
});
// ../../node_modules/.pnpm/@typescript-eslint+scope-manager@5.62.0/node_modules/@typescript-eslint/scope-manager/dist/definition/index.js
var require_definition = __commonJS({
"../../node_modules/.pnpm/@typescript-eslint+scope-manager@5.62.0/node_modules/@typescript-eslint/scope-manager/dist/definition/index.js"(exports) {
"use strict";
init_shims();
var __createBinding2 = exports && exports.__createBinding || (Object.create ? function(o, m, k, k2) {
if (k2 === void 0) k2 = k;
var desc = Object.getOwnPropertyDescriptor(m, k);
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
desc = { enumerable: true, get: function() {
return m[k];
} };
}
Object.defineProperty(o, k2, desc);
} : function(o, m, k, k2) {
if (k2 === void 0) k2 = k;
o[k2] = m[k];
});
var __exportStar2 = exports && exports.__exportStar || function(m, exports2) {
for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports2, p)) __createBinding2(exports2, m, p);
};
Object.defineProperty(exports, "__esModule", { value: true });
__exportStar2(require_CatchClauseDefinition(), exports);
__exportStar2(require_ClassNameDefinition(), exports);
__exportStar2(require_Definition(), exports);
__exportStar2(require_DefinitionType(), exports);
__exportStar2(require_FunctionNameDefinition(), exports);
__exportStar2(require_ImplicitGlobalVariableDefinition(), exports);
__exportStar2(require_ImportBindingDefinition(), exports);
__exportStar2(require_ParameterDefinition(), exports);
__exportStar2(require_TSEnumMemberDefinition(), exports);
__exportStar2(require_TSEnumNameDefinition(), exports);
__exportStar2(require_TSModuleNameDefinition(), exports);
__exportStar2(require_TypeDefinition(), exports);
__exportStar2(require_VariableDefinition(), exports);
}
});
// ../../node_modules/.pnpm/@typescript-eslint+scope-manager@5.62.0/node_modules/@typescript-eslint/scope-manager/dist/referencer/Reference.js
var require_Reference = __commonJS({
"../../node_modules/.pnpm/@typescript-eslint+scope-manager@5.62.0/node_modules/@typescript-eslint/scope-manager/dist/referencer/Reference.js"(exports) {
"use strict";
init_shims();
var __classPrivateFieldGet2 = exports && exports.__classPrivateFieldGet || function(receiver, state, kind, f) {
if (kind === "a" && !f) throw new TypeError("Private accessor was defined without a getter");
if (typeof state === "function" ? receiver !== state || !f : !state.has(receiver)) throw new TypeError("Cannot read private member from an object whose class did not declare it");
return kind === "m" ? f : kind === "a" ? f.call(receiver) : f ? f.value : state.get(receiver);
};
var __classPrivateFieldSet2 = exports && exports.__classPrivateFieldSet || function(receiver, state, value, kind, f) {
if (kind === "m") throw new TypeError("Private method is not writable");
if (kind === "a" && !f) throw new TypeError("Private accessor was defined without a setter");
if (typeof state === "function" ? receiver !== state || !f : !state.has(receiver)) throw new TypeError("Cannot write private member to an object whose class did not declare it");
return kind === "a" ? f.call(receiver, value) : f ? f.value = value : state.set(receiver, value), value;
};
var _Reference_flag;
var _Reference_referenceType;
Object.defineProperty(exports, "__esModule", { value: true });
exports.ReferenceTypeFlag = exports.ReferenceFlag = exports.Reference = void 0;
var ID_1 = require_ID();
var ReferenceFlag;
(function(ReferenceFlag2) {
ReferenceFlag2[ReferenceFlag2["Read"] = 1] = "Read";
ReferenceFlag2[ReferenceFlag2["Write"] = 2] = "Write";
ReferenceFlag2[ReferenceFlag2["ReadWrite"] = 3] = "ReadWrite";
})(ReferenceFlag || (exports.ReferenceFlag = ReferenceFlag = {}));
var generator = (0, ID_1.createIdGenerator)();
var ReferenceTypeFlag;
(function(ReferenceTypeFlag2) {
ReferenceTypeFlag2[ReferenceTypeFlag2["Value"] = 1] = "Value";
ReferenceTypeFlag2[ReferenceTypeFlag2["Type"] = 2] = "Type";
})(ReferenceTypeFlag || (exports.ReferenceTypeFlag = ReferenceTypeFlag = {}));
var Reference = class {
/**
* True if this reference can reference types
*/
get isTypeReference() {
return (__classPrivateFieldGet2(this, _Reference_referenceType, "f") & ReferenceTypeFlag.Type) !== 0;
}
/**
* True if this reference can reference values
*/
get isValueReference() {
return (__classPrivateFieldGet2(this, _Reference_referenceType, "f") & ReferenceTypeFlag.Value) !== 0;
}
constructor(identifier, scope, flag, writeExpr, maybeImplicitGlobal, init, referenceType = ReferenceTypeFlag.Value) {
this.$id = generator();
_Reference_flag.set(this, void 0);
_Reference_referenceType.set(this, void 0);
this.identifier = identifier;
this.from = scope;
this.resolved = null;
__classPrivateFieldSet2(this, _Reference_flag, flag, "f");
if (this.isWrite()) {
this.writeExpr = writeExpr;
this.init = init;
}
this.maybeImplicitGlobal = maybeImplicitGlobal;
__classPrivateFieldSet2(this, _Reference_referenceType, referenceType, "f");
}
/**
* Whether the reference is writeable.
* @public
*/
isWrite() {
return !!(__classPrivateFieldGet2(this, _Reference_flag, "f") & ReferenceFlag.Write);
}
/**
* Whether the reference is readable.
* @public
*/
isRead() {
return !!(__classPrivateFieldGet2(this, _Reference_flag, "f") & ReferenceFlag.Read);
}
/**
* Whether the reference is read-only.
* @public
*/
isReadOnly() {
return __classPrivateFieldGet2(this, _Reference_flag, "f") === ReferenceFlag.Read;
}
/**
* Whether the reference is write-only.
* @public
*/
isWriteOnly() {
return __classPrivateFieldGet2(this, _Reference_flag, "f") === ReferenceFlag.Write;
}
/**
* Whether the reference is read-write.
* @public
*/
isReadWrite() {
return __classPrivateFieldGet2(this, _Reference_flag, "f") === ReferenceFlag.ReadWrite;
}
};
exports.Reference = Reference;
_Reference_flag = /* @__PURE__ */ new WeakMap(), _Reference_referenceType = /* @__PURE__ */ new WeakMap();
}
});
// ../../node_modules/.pnpm/@typescript-eslint+scope-manager@5.62.0/node_modules/@typescript-eslint/scope-manager/dist/variable/VariableBase.js
var require_VariableBase = __commonJS({
"../../node_modules/.pnpm/@typescript-eslint+scope-manager@5.62.0/node_modules/@typescript-eslint/scope-manager/dist/variable/VariableBase.js"(exports) {
"use strict";
init_shims();
Object.defineProperty(exports, "__esModule", { value: true });
exports.VariableBase = void 0;
var ID_1 = require_ID();
var generator = (0, ID_1.createIdGenerator)();
var VariableBase = class {
constructor(name, scope) {
this.$id = generator();
this.defs = [];
this.eslintUsed = false;
this.identifiers = [];
this.references = [];
this.name = name;
this.scope = scope;
}
};
exports.VariableBase = VariableBase;
}
});
// ../../node_modules/.pnpm/@typescript-eslint+scope-manager@5.62.0/node_modules/@typescript-eslint/scope-manager/dist/variable/ESLintScopeVariable.js
var require_ESLintScopeVariable = __commonJS({
"../../node_modules/.pnpm/@typescript-eslint+scope-manager@5.62.0/node_modules/@typescript-eslint/scope-manager/dist/variable/ESLintScopeVariable.js"(exports) {
"use strict";
init_shims();
Object.defineProperty(exports, "__esModule", { value: true });
exports.ESLintScopeVariable = void 0;
var VariableBase_1 = require_VariableBase();
var ESLintScopeVariable = class extends VariableBase_1.VariableBase {
};
exports.ESLintScopeVariable = ESLintScopeVariable;
}
});
// ../../node_modules/.pnpm/@typescript-eslint+scope-manager@5.62.0/node_modules/@typescript-eslint/scope-manager/dist/variable/ImplicitLibVariable.js
var require_ImplicitLibVariable = __commonJS({
"../../node_modules/.pnpm/@typescript-eslint+scope-manager@5.62.0/node_modules/@typescript-eslint/scope-manager/dist/variable/ImplicitLibVariable.js"(exports) {
"use strict";
init_shims();
Object.defineProperty(exports, "__esModule", { value: true });
exports.ImplicitLibVariable = void 0;
var ESLintScopeVariable_1 = require_ESLintScopeVariable();
var ImplicitLibVariable = class extends ESLintScopeVariable_1.ESLintScopeVariable {
constructor(scope, name, { isTypeVariable, isValueVariable, writeable, eslintImplicitGlobalSetting }) {
super(name, scope);
this.isTypeVariable = isTypeVariable !== null && isTypeVariable !== void 0 ? isTypeVariable : false;
this.isValueVariable = isValueVariable !== null && isValueVariable !== void 0 ? isValueVariable : false;
this.writeable = writeable !== null && writeable !== void 0 ? writeable : false;
this.eslintImplicitGlobalSetting = eslintImplicitGlobalSetting !== null && eslintImplicitGlobalSetting !== void 0 ? eslintImplicitGlobalSetting : "readonly";
}
};
exports.ImplicitLibVariable = ImplicitLibVariable;
}
});
// ../../node_modules/.pnpm/@typescript-eslint+scope-manager@5.62.0/node_modules/@typescript-eslint/scope-manager/dist/variable/Variable.js
var require_Variable = __commonJS({
"../../node_modules/.pnpm/@typescript-eslint+scope-manager@5.62.0/node_modules/@typescript-eslint/scope-manager/dist/variable/Variable.js"(exports) {
"use strict";
init_shims();
Object.defineProperty(exports, "__esModule", { value: true });
exports.Variable = void 0;
var VariableBase_1 = require_VariableBase();
var Variable = class extends VariableBase_1.VariableBase {
/**
* `true` if the variable is valid in a type context, false otherwise
* @public
*/
get isTypeVariable() {
if (this.defs.length === 0) {
return true;
}
return this.defs.some((def) => def.isTypeDefinition);
}
/**
* `true` if the variable is valid in a value context, false otherwise
* @public
*/
get isValueVariable() {
if (this.defs.length === 0) {
return true;
}
return this.defs.some((def) => def.isVariableDefinition);
}
};
exports.Variable = Variable;
}
});
// ../../node_modules/.pnpm/@typescript-eslint+scope-manager@5.62.0/node_modules/@typescript-eslint/scope-manager/dist/variable/index.js
var require_variable = __commonJS({
"../../node_modules/.pnpm/@typescript-eslint+scope-manager@5.62.0/node_modules/@typescript-eslint/scope-manager/dist/variable/index.js"(exports) {
"use strict";
init_shims();
Object.defineProperty(exports, "__esModule", { value: true });
exports.Variable = exports.ImplicitLibVariable = exports.ESLintScopeVariable = void 0;
var ESLintScopeVariable_1 = require_ESLintScopeVariable();
Object.defineProperty(exports, "ESLintScopeVariable", { enumerable: true, get: function() {
return ESLintScopeVariable_1.ESLintScopeVariable;
} });
var ImplicitLibVariable_1 = require_ImplicitLibVariable();
Object.defineProperty(exports, "ImplicitLibVariable", { enumerable: true, get: function() {
return ImplicitLibVariable_1.ImplicitLibVariable;
} });
var Variable_1 = require_Variable();
Object.defineProperty(exports, "Variable", { enumerable: true, get: function() {
return Variable_1.Variable;
} });
}
});
// ../../node_modules/.pnpm/@typescript-eslint+scope-manager@5.62.0/node_modules/@typescript-eslint/scope-manager/dist/scope/ScopeType.js
var require_ScopeType = __commonJS({
"../../node_modules/.pnpm/@typescript-eslint+scope-manager@5.62.0/node_modules/@typescript-eslint/scope-manager/dist/scope/ScopeType.js"(exports) {
"use strict";
init_shims();
Object.defineProperty(exports, "__esModule", { value: true });
exports.ScopeType = void 0;
var ScopeType;
(function(ScopeType2) {
ScopeType2["block"] = "block";
ScopeType2["catch"] = "catch";
ScopeType2["class"] = "class";
ScopeType2["classFieldInitializer"] = "class-field-initializer";
ScopeType2["classStaticBlock"] = "class-static-block";
ScopeType2["conditionalType"] = "conditionalType";
ScopeType2["for"] = "for";
ScopeType2["function"] = "function";
ScopeType2["functionExpressionName"] = "function-expression-name";
ScopeType2["functionType"] = "functionType";
ScopeType2["global"] = "global";
ScopeType2["mappedType"] = "mappedType";
ScopeType2["module"] = "module";
ScopeType2["switch"] = "switch";
ScopeType2["tsEnum"] = "tsEnum";
ScopeType2["tsModule"] = "tsModule";
ScopeType2["type"] = "type";
ScopeType2["with"] = "with";
})(ScopeType || (exports.ScopeType = ScopeType = {}));
}
});
// ../../node_modules/.pnpm/@typescript-eslint+scope-manager@5.62.0/node_modules/@typescript-eslint/scope-manager/dist/scope/ScopeBase.js
var require_ScopeBase = __commonJS({
"../../node_modules/.pnpm/@typescript-eslint+scope-manager@5.62.0/node_modules/@typescript-eslint/scope-manager/dist/scope/ScopeBase.js"(exports) {
"use strict";
init_shims();
var __classPrivateFieldSet2 = exports && exports.__classPrivateFieldSet || function(receiver, state, value, kind, f) {
if (kind === "m") throw new TypeError("Private method is not writable");
if (kind === "a" && !f) throw new TypeError("Private accessor was defined without a setter");
if (typeof state === "function" ? receiver !== state || !f : !state.has(receiver)) throw new TypeError("Cannot write private member to an object whose class did not declare it");
return kind === "a" ? f.call(receiver, value) : f ? f.value = value : state.set(receiver, value), value;
};
var __classPrivateFieldGet2 = exports && exports.__classPrivateFieldGet || function(receiver, state, kind, f) {
if (kind === "a" && !f) throw new TypeError("Private accessor was defined without a getter");
if (typeof state === "function" ? receiver !== state || !f : !state.has(receiver)) throw new TypeError("Cannot read private member from an object whose class did not declare it");
return kind === "m" ? f : kind === "a" ? f.call(receiver) : f ? f.value : state.get(receiver);
};
var _ScopeBase_declaredVariables;
var _ScopeBase_dynamic;
var _ScopeBase_staticCloseRef;
var _ScopeBase_dynamicCloseRef;
var _ScopeBase_globalCloseRef;
Object.defineProperty(exports, "__esModule", { value: true });
exports.ScopeBase = void 0;
var types_1 = require_dist2();
var assert_1 = require_assert();
var definition_1 = require_definition();
var ID_1 = require_ID();
var Reference_1 = require_Reference();
var variable_1 = require_variable();
var ScopeType_1 = require_ScopeType();
function isStrictScope(scope, block, isMethodDefinition) {
var _a;
let body;
if ((_a = scope.upper) === null || _a === void 0 ? void 0 : _a.isStrict) {
return true;
}
if (isMethodDefinition) {
return true;
}
if (scope.type === ScopeType_1.ScopeType.class || scope.type === ScopeType_1.ScopeType.conditionalType || scope.type === ScopeType_1.ScopeType.functionType || scope.type === ScopeType_1.ScopeType.mappedType || scope.type === ScopeType_1.ScopeType.module || scope.type === ScopeType_1.ScopeType.tsEnum || scope.type === ScopeType_1.ScopeType.tsModule || scope.type === ScopeType_1.ScopeType.type) {
return true;
}
if (scope.type === ScopeType_1.ScopeType.block || scope.type === ScopeType_1.ScopeType.switch) {
return false;
}
if (scope.type === ScopeType_1.ScopeType.function) {
const functionBody = block;
switch (functionBody.type) {
case types_1.AST_NODE_TYPES.ArrowFunctionExpression:
if (functionBody.body.type !== types_1.AST_NODE_TYPES.BlockStatement) {
return false;
}
body = functionBody.body;
break;
case types_1.AST_NODE_TYPES.Program:
body = functionBody;
break;
default:
body = functionBody.body;
}
if (!body) {
return false;
}
} else if (scope.type === ScopeType_1.ScopeType.global) {
body = block;
} else {
return false;
}
for (const stmt of body.body) {
if (stmt.type !== types_1.AST_NODE_TYPES.ExpressionStatement) {
break;
}
if (stmt.directive === "use strict") {
return true;
}
const expr = stmt.expression;
if (expr.type !== types_1.AST_NODE_TYPES.Literal) {
break;
}
if (expr.raw === '"use strict"' || expr.raw === "'use strict'") {
return true;
}
if (expr.value === "use strict") {
return true;
}
}
return false;
}
function registerScope(scopeManager, scope) {
scopeManager.scopes.push(scope);
const scopes = scopeManager.nodeToScope.get(scope.block);
if (scopes) {
scopes.push(scope);
} else {
scopeManager.nodeToScope.set(scope.block, [scope]);
}
}
var generator = (0, ID_1.createIdGenerator)();
var VARIABLE_SCOPE_TYPES = /* @__PURE__ */ new Set([
ScopeType_1.ScopeType.classFieldInitializer,
ScopeType_1.ScopeType.classStaticBlock,
ScopeType_1.ScopeType.function,
ScopeType_1.ScopeType.global,
ScopeType_1.ScopeType.module,
ScopeType_1.ScopeType.tsModule
]);
var ScopeBase = class {
constructor(scopeManager, type, upperScope, block, isMethodDefinition) {
this.$id = generator();
this.childScopes = [];
_ScopeBase_declaredVariables.set(this, void 0);
_ScopeBase_dynamic.set(this, void 0);
this.functionExpressionScope = false;
this.leftToResolve = [];
this.references = [];
this.set = /* @__PURE__ */ new Map();
this.through = [];
this.variables = [];
_ScopeBase_staticCloseRef.set(this, (ref) => {
const resolve = () => {
const name = ref.identifier.name;
const variable = this.set.get(name);
if (!variable) {
return false;
}
if (!this.isValidResolution(ref, variable)) {
return false;
}
const isValidTypeReference = ref.isTypeReference && variable.isTypeVariable;
const isValidValueReference = ref.isValueReference && variable.isValueVariable;
if (!isValidTypeReference && !isValidValueReference) {
return false;
}
variable.references.push(ref);
ref.resolved = variable;
return true;
};
if (!resolve()) {
this.delegateToUpperScope(ref);
}
});
_ScopeBase_dynamicCloseRef.set(this, (ref) => {
let current = this;
do {
current.through.push(ref);
current = current.upper;
} while (current);
});
_ScopeBase_globalCloseRef.set(this, (ref, scopeManager2) => {
if (this.shouldStaticallyCloseForGlobal(ref, scopeManager2)) {
__classPrivateFieldGet2(this, _ScopeBase_staticCloseRef, "f").call(this, ref);
} else {
__classPrivateFieldGet2(this, _ScopeBase_dynamicCloseRef, "f").call(this, ref);
}
});
const upperScopeAsScopeBase = upperScope;
this.type = type;
__classPrivateFieldSet2(this, _ScopeBase_dynamic, this.type === ScopeType_1.ScopeType.global || this.type === ScopeType_1.ScopeType.with, "f");
this.block = block;
this.variableScope = this.isVariableScope() ? this : upperScopeAsScopeBase.variableScope;
this.upper = upperScope;
this.isStrict = isStrictScope(this, block, isMethodDefinition);
if (upperScopeAsScopeBase) {
upperScopeAsScopeBase.childScopes.push(this);
}
__classPrivateFieldSet2(this, _ScopeBase_declaredVariables, scopeManager.declaredVariables, "f");
registerScope(scopeManager, this);
}
isVariableScope() {
return VARIABLE_SCOPE_TYPES.has(this.type);
}
shouldStaticallyClose() {
return !__classPrivateFieldGet2(this, _ScopeBase_dynamic, "f");
}
shouldStaticallyCloseForGlobal(ref, scopeManager) {
const name = ref.identifier.name;
const variable = this.set.get(name);
if (!variable) {
return false;
}
if (scopeManager.isModule()) {
return true;
}
const defs = variable.defs;
return defs.length > 0 && defs.every((def) => {
var _a;
if (def.type === definition_1.DefinitionType.Variable && ((_a = def.parent) === null || _a === void 0 ? void 0 : _a.type) === types_1.AST_NODE_TYPES.VariableDeclaration && def.parent.kind === "var") {
return false;
}
return true;
});
}
close(scopeManager) {
let closeRef;
if (this.shouldStaticallyClose()) {
closeRef = __classPrivateFieldGet2(this, _ScopeBase_staticCloseRef, "f");
} else if (this.type !== "global") {
closeRef = __classPrivateFieldGet2(this, _ScopeBase_dynamicCloseRef, "f");
} else {
closeRef = __classPrivateFieldGet2(this, _ScopeBase_globalCloseRef, "f");
}
(0, assert_1.assert)(this.leftToResolve);
this.leftToResolve.forEach((ref) => closeRef(ref, scopeManager));
this.leftToResolve = null;
return this.upper;
}
/**
* To override by function scopes.
* References in default parameters isn't resolved to variables which are in their function body.
*/
isValidResolution(_ref, _variable) {
return true;
}
delegateToUpperScope(ref) {
const upper = this.upper;
if (upper === null || upper === void 0 ? void 0 : upper.leftToResolve) {
upper.leftToResolve.push(ref);
}
this.through.push(ref);
}
addDeclaredVariablesOfNode(variable, node2) {
if (node2 == null) {
return;
}
let variables = __classPrivateFieldGet2(this, _ScopeBase_declaredVariables, "f").get(node2);
if (variables == null) {
variables = [];
__classPrivateFieldGet2(this, _ScopeBase_declaredVariables, "f").set(node2, variables);
}
if (!variables.includes(variable)) {
variables.push(variable);
}
}
defineVariable(nameOrVariable, set, variables, node2, def) {
const name = typeof nameOrVariable === "string" ? nameOrVariable : nameOrVariable.name;
let variable = set.get(name);
if (!variable) {
variable = typeof nameOrVariable === "string" ? new variable_1.Variable(name, this) : nameOrVariable;
set.set(name, variable);
variables.push(variable);
}
if (def) {
variable.defs.push(def);
this.addDeclaredVariablesOfNode(variable, def.node);
this.addDeclaredVariablesOfNode(variable, def.parent);
}
if (node2) {
variable.identifiers.push(node2);
}
}
defineIdentifier(node2, def) {
this.defineVariable(node2.name, this.set, this.variables, node2, def);
}
defineLiteralIdentifier(node2, def) {
this.defineVariable(node2.value, this.set, this.variables, null, def);
}
referenceValue(node2, assign = Reference_1.ReferenceFlag.Read, writeExpr, maybeImplicitGlobal, init = false) {
var _a;
const ref = new Reference_1.Reference(node2, this, assign, writeExpr, maybeImplicitGlobal, init, Reference_1.ReferenceTypeFlag.Value);
this.references.push(ref);
(_a = this.leftToResolve) === null || _a === void 0 ? void 0 : _a.push(ref);
}
referenceType(node2) {
var _a;
const ref = new Reference_1.Reference(node2, this, Reference_1.ReferenceFlag.Read, null, null, false, Reference_1.ReferenceTypeFlag.Type);
this.references.push(ref);
(_a = this.leftToResolve) === null || _a === void 0 ? void 0 : _a.push(ref);
}
referenceDualValueType(node2) {
var _a;
const ref = new Reference_1.Reference(node2, this, Reference_1.ReferenceFlag.Read, null, null, false, Reference_1.ReferenceTypeFlag.Type | Reference_1.ReferenceTypeFlag.Value);
this.references.push(ref);
(_a = this.leftToResolve) === null || _a === void 0 ? void 0 : _a.push(ref);
}
};
exports.ScopeBase = ScopeBase;
_ScopeBase_declaredVariables = /* @__PURE__ */ new WeakMap(), _ScopeBase_dynamic = /* @__PURE__ */ new WeakMap(), _ScopeBase_staticCloseRef = /* @__PURE__ */ new WeakMap(), _ScopeBase_dynamicCloseRef = /* @__PURE__ */ new WeakMap(), _ScopeBase_globalCloseRef = /* @__PURE__ */ new WeakMap();
}
});
// ../../node_modules/.pnpm/@typescript-eslint+scope-manager@5.62.0/node_modules/@typescript-eslint/scope-manager/dist/scope/BlockScope.js
var require_BlockScope = __commonJS({
"../../node_modules/.pnpm/@typescript-eslint+scope-manager@5.62.0/node_modules/@typescript-eslint/scope-manager/dist/scope/BlockScope.js"(exports) {
"use strict";
init_shims();
Object.defineProperty(exports, "__esModule", { value: true });
exports.BlockScope = void 0;
var ScopeBase_1 = require_ScopeBase();
var ScopeType_1 = require_ScopeType();
var BlockScope = class extends ScopeBase_1.ScopeBase {
constructor(scopeManager, upperScope, block) {
super(scopeManager, ScopeType_1.ScopeType.block, upperScope, block, false);
}
};
exports.BlockScope = BlockScope;
}
});
// ../../node_modules/.pnpm/@typescript-eslint+scope-manager@5.62.0/node_modules/@typescript-eslint/scope-manager/dist/scope/CatchScope.js
var require_CatchScope = __commonJS({
"../../node_modules/.pnpm/@typescript-eslint+scope-manager@5.62.0/node_modules/@typescript-eslint/scope-manager/dist/scope/CatchScope.js"(exports) {
"use strict";
init_shims();
Object.defineProperty(exports, "__esModule", { value: true });
exports.CatchScope = void 0;
var ScopeBase_1 = require_ScopeBase();
var ScopeType_1 = require_ScopeType();
var CatchScope = class extends ScopeBase_1.ScopeBase {
constructor(scopeManager, upperScope, block) {
super(scopeManager, ScopeType_1.ScopeType.catch, upperScope, block, false);
}
};
exports.CatchScope = CatchScope;
}
});
// ../../node_modules/.pnpm/@typescript-eslint+scope-manager@5.62.0/node_modules/@typescript-eslint/scope-manager/dist/scope/ClassFieldInitializerScope.js
var require_ClassFieldInitializerScope = __commonJS({
"../../node_modules/.pnpm/@typescript-eslint+scope-manager@5.62.0/node_modules/@typescript-eslint/scope-manager/dist/scope/ClassFieldInitializerScope.js"(exports) {
"use strict";
init_shims();
Object.defineProperty(exports, "__esModule", { value: true });
exports.ClassFieldInitializerScope = void 0;
var ScopeBase_1 = require_ScopeBase();
var ScopeType_1 = require_ScopeType();
var ClassFieldInitializerScope = class extends ScopeBase_1.ScopeBase {
constructor(scopeManager, upperScope, block) {
super(scopeManager, ScopeType_1.ScopeType.classFieldInitializer, upperScope, block, false);
}
};
exports.ClassFieldInitializerScope = ClassFieldInitializerScope;
}
});
// ../../node_modules/.pnpm/@typescript-eslint+scope-manager@5.62.0/node_modules/@typescript-eslint/scope-manager/dist/scope/ClassScope.js
var require_ClassScope = __commonJS({
"../../node_modules/.pnpm/@typescript-eslint+scope-manager@5.62.0/node_modules/@typescript-eslint/scope-manager/dist/scope/ClassScope.js"(exports) {
"use strict";
init_shims();
Object.defineProperty(exports, "__esModule", { value: true });
exports.ClassScope = void 0;
var ScopeBase_1 = require_ScopeBase();
var ScopeType_1 = require_ScopeType();
var ClassScope = class extends ScopeBase_1.ScopeBase {
constructor(scopeManager, upperScope, block) {
super(scopeManager, ScopeType_1.ScopeType.class, upperScope, block, false);
}
};
exports.ClassScope = ClassScope;
}
});
// ../../node_modules/.pnpm/@typescript-eslint+scope-manager@5.62.0/node_modules/@typescript-eslint/scope-manager/dist/scope/ConditionalTypeScope.js
var require_ConditionalTypeScope = __commonJS({
"../../node_modules/.pnpm/@typescript-eslint+scope-manager@5.62.0/node_modules/@typescript-eslint/scope-manager/dist/scope/ConditionalTypeScope.js"(exports) {
"use strict";
init_shims();
Object.defineProperty(exports, "__esModule", { value: true });
exports.ConditionalTypeScope = void 0;
var ScopeBase_1 = require_ScopeBase();
var ScopeType_1 = require_ScopeType();
var ConditionalTypeScope = class extends ScopeBase_1.ScopeBase {
constructor(scopeManager, upperScope, block) {
super(scopeManager, ScopeType_1.ScopeType.conditionalType, upperScope, block, false);
}
};
exports.ConditionalTypeScope = ConditionalTypeScope;
}
});
// ../../node_modules/.pnpm/@typescript-eslint+scope-manager@5.62.0/node_modules/@typescript-eslint/scope-manager/dist/scope/ForScope.js
var require_ForScope = __commonJS({
"../../node_modules/.pnpm/@typescript-eslint+scope-manager@5.62.0/node_modules/@typescript-eslint/scope-manager/dist/scope/ForScope.js"(exports) {
"use strict";
init_shims();
Object.defineProperty(exports, "__esModule", { value: true });
exports.ForScope = void 0;
var ScopeBase_1 = require_ScopeBase();
var ScopeType_1 = require_ScopeType();
var ForScope = class extends ScopeBase_1.ScopeBase {
constructor(scopeManager, upperScope, block) {
super(scopeManager, ScopeType_1.ScopeType.for, upperScope, block, false);
}
};
exports.ForScope = ForScope;
}
});
// ../../node_modules/.pnpm/@typescript-eslint+scope-manager@5.62.0/node_modules/@typescript-eslint/scope-manager/dist/scope/FunctionExpressionNameScope.js
var require_FunctionExpressionNameScope = __commonJS({
"../../node_modules/.pnpm/@typescript-eslint+scope-manager@5.62.0/node_modules/@typescript-eslint/scope-manager/dist/scope/FunctionExpressionNameScope.js"(exports) {
"use strict";
init_shims();
Object.defineProperty(exports, "__esModule", { value: true });
exports.FunctionExpressionNameScope = void 0;
var definition_1 = require_definition();
var ScopeBase_1 = require_ScopeBase();
var ScopeType_1 = require_ScopeType();
var FunctionExpressionNameScope = class extends ScopeBase_1.ScopeBase {
constructor(scopeManager, upperScope, block) {
super(scopeManager, ScopeType_1.ScopeType.functionExpressionName, upperScope, block, false);
if (block.id) {
this.defineIdentifier(block.id, new definition_1.FunctionNameDefinition(block.id, block));
}
this.functionExpressionScope = true;
}
};
exports.FunctionExpressionNameScope = FunctionExpressionNameScope;
}
});
// ../../node_modules/.pnpm/@typescript-eslint+scope-manager@5.62.0/node_modules/@typescript-eslint/scope-manager/dist/scope/FunctionScope.js
var require_FunctionScope = __commonJS({
"../../node_modules/.pnpm/@typescript-eslint+scope-manager@5.62.0/node_modules/@typescript-eslint/scope-manager/dist/scope/FunctionScope.js"(exports) {
"use strict";
init_shims();
Object.defineProperty(exports, "__esModule", { value: true });
exports.FunctionScope = void 0;
var types_1 = require_dist2();
var ScopeBase_1 = require_ScopeBase();
var ScopeType_1 = require_ScopeType();
var FunctionScope = class extends ScopeBase_1.ScopeBase {
constructor(scopeManager, upperScope, block, isMethodDefinition) {
super(scopeManager, ScopeType_1.ScopeType.function, upperScope, block, isMethodDefinition);
if (this.block.type !== types_1.AST_NODE_TYPES.ArrowFunctionExpression) {
this.defineVariable("arguments", this.set, this.variables, null, null);
}
}
// References in default parameters isn't resolved to variables which are in their function body.
// const x = 1
// function f(a = x) { // This `x` is resolved to the `x` in the outer scope.
// const x = 2
// console.log(a)
// }
isValidResolution(ref, variable) {
var _a, _b;
if (this.block.type === types_1.AST_NODE_TYPES.Program) {
return true;
}
const bodyStart = (_b = (_a = this.block.body) === null || _a === void 0 ? void 0 : _a.range[0]) !== null && _b !== void 0 ? _b : -1;
return !(variable.scope === this && ref.identifier.range[0] < bodyStart && // the reference is in the parameter part.
variable.defs.every((d) => d.name.range[0] >= bodyStart));
}
};
exports.FunctionScope = FunctionScope;
}
});
// ../../node_modules/.pnpm/@typescript-eslint+scope-manager@5.62.0/node_modules/@typescript-eslint/scope-manager/dist/scope/FunctionTypeScope.js
var require_FunctionTypeScope = __commonJS({
"../../node_modules/.pnpm/@typescript-eslint+scope-manager@5.62.0/node_modules/@typescript-eslint/scope-manager/dist/scope/FunctionTypeScope.js"(exports) {
"use strict";
init_shims();
Object.defineProperty(exports, "__esModule", { value: true });
exports.FunctionTypeScope = void 0;
var ScopeBase_1 = require_ScopeBase();
var ScopeType_1 = require_ScopeType();
var FunctionTypeScope = class extends ScopeBase_1.ScopeBase {
constructor(scopeManager, upperScope, block) {
super(scopeManager, ScopeType_1.ScopeType.functionType, upperScope, block, false);
}
};
exports.FunctionTypeScope = FunctionTypeScope;
}
});
// ../../node_modules/.pnpm/@typescript-eslint+scope-manager@5.62.0/node_modules/@typescript-eslint/scope-manager/dist/scope/GlobalScope.js
var require_GlobalScope = __commonJS({
"../../node_modules/.pnpm/@typescript-eslint+scope-manager@5.62.0/node_modules/@typescript-eslint/scope-manager/dist/scope/GlobalScope.js"(exports) {
"use strict";
init_shims();
Object.defineProperty(exports, "__esModule", { value: true });
exports.GlobalScope = void 0;
var types_1 = require_dist2();
var assert_1 = require_assert();
var ImplicitGlobalVariableDefinition_1 = require_ImplicitGlobalVariableDefinition();
var variable_1 = require_variable();
var ScopeBase_1 = require_ScopeBase();
var ScopeType_1 = require_ScopeType();
var GlobalScope = class extends ScopeBase_1.ScopeBase {
constructor(scopeManager, block) {
super(scopeManager, ScopeType_1.ScopeType.global, null, block, false);
this.implicit = {
set: /* @__PURE__ */ new Map(),
variables: [],
leftToBeResolved: []
};
}
defineImplicitVariable(name, options) {
this.defineVariable(new variable_1.ImplicitLibVariable(this, name, options), this.set, this.variables, null, null);
}
close(scopeManager) {
(0, assert_1.assert)(this.leftToResolve);
for (const ref of this.leftToResolve) {
if (ref.maybeImplicitGlobal && !this.set.has(ref.identifier.name)) {
const info = ref.maybeImplicitGlobal;
const node2 = info.pattern;
if (node2 && node2.type === types_1.AST_NODE_TYPES.Identifier) {
this.defineVariable(node2.name, this.implicit.set, this.implicit.variables, node2, new ImplicitGlobalVariableDefinition_1.ImplicitGlobalVariableDefinition(info.pattern, info.node));
}
}
}
this.implicit.leftToBeResolved = this.leftToResolve;
return super.close(scopeManager);
}
};
exports.GlobalScope = GlobalScope;
}
});
// ../../node_modules/.pnpm/@typescript-eslint+scope-manager@5.62.0/node_modules/@typescript-eslint/scope-manager/dist/scope/MappedTypeScope.js
var require_MappedTypeScope = __commonJS({
"../../node_modules/.pnpm/@typescript-eslint+scope-manager@5.62.0/node_modules/@typescript-eslint/scope-manager/dist/scope/MappedTypeScope.js"(exports) {
"use strict";
init_shims();
Object.defineProperty(exports, "__esModule", { value: true });
exports.MappedTypeScope = void 0;
var ScopeBase_1 = require_ScopeBase();
var ScopeType_1 = require_ScopeType();
var MappedTypeScope = class extends ScopeBase_1.ScopeBase {
constructor(scopeManager, upperScope, block) {
super(scopeManager, ScopeType_1.ScopeType.mappedType, upperScope, block, false);
}
};
exports.MappedTypeScope = MappedTypeScope;
}
});
// ../../node_modules/.pnpm/@typescript-eslint+scope-manager@5.62.0/node_modules/@typescript-eslint/scope-manager/dist/scope/ModuleScope.js
var require_ModuleScope = __commonJS({
"../../node_modules/.pnpm/@typescript-eslint+scope-manager@5.62.0/node_modules/@typescript-eslint/scope-manager/dist/scope/ModuleScope.js"(exports) {
"use strict";
init_shims();
Object.defineProperty(exports, "__esModule", { value: true });
exports.ModuleScope = void 0;
var ScopeBase_1 = require_ScopeBase();
var ScopeType_1 = require_ScopeType();
var ModuleScope = class extends ScopeBase_1.ScopeBase {
constructor(scopeManager, upperScope, block) {
super(scopeManager, ScopeType_1.ScopeType.module, upperScope, block, false);
}
};
exports.ModuleScope = ModuleScope;
}
});
// ../../node_modules/.pnpm/@typescript-eslint+scope-manager@5.62.0/node_modules/@typescript-eslint/scope-manager/dist/scope/Scope.js
var require_Scope = __commonJS({
"../../node_modules/.pnpm/@typescript-eslint+scope-manager@5.62.0/node_modules/@typescript-eslint/scope-manager/dist/scope/Scope.js"(exports) {
"use strict";
init_shims();
Object.defineProperty(exports, "__esModule", { value: true });
}
});
// ../../node_modules/.pnpm/@typescript-eslint+scope-manager@5.62.0/node_modules/@typescript-eslint/scope-manager/dist/scope/SwitchScope.js
var require_SwitchScope = __commonJS({
"../../node_modules/.pnpm/@typescript-eslint+scope-manager@5.62.0/node_modules/@typescript-eslint/scope-manager/dist/scope/SwitchScope.js"(exports) {
"use strict";
init_shims();
Object.defineProperty(exports, "__esModule", { value: true });
exports.SwitchScope = void 0;
var ScopeBase_1 = require_ScopeBase();
var ScopeType_1 = require_ScopeType();
var SwitchScope = class extends ScopeBase_1.ScopeBase {
constructor(scopeManager, upperScope, block) {
super(scopeManager, ScopeType_1.ScopeType.switch, upperScope, block, false);
}
};
exports.SwitchScope = SwitchScope;
}
});
// ../../node_modules/.pnpm/@typescript-eslint+scope-manager@5.62.0/node_modules/@typescript-eslint/scope-manager/dist/scope/TSEnumScope.js
var require_TSEnumScope = __commonJS({
"../../node_modules/.pnpm/@typescript-eslint+scope-manager@5.62.0/node_modules/@typescript-eslint/scope-manager/dist/scope/TSEnumScope.js"(exports) {
"use strict";
init_shims();
Object.defineProperty(exports, "__esModule", { value: true });
exports.TSEnumScope = void 0;
var ScopeBase_1 = require_ScopeBase();
var ScopeType_1 = require_ScopeType();
var TSEnumScope = class extends ScopeBase_1.ScopeBase {
constructor(scopeManager, upperScope, block) {
super(scopeManager, ScopeType_1.ScopeType.tsEnum, upperScope, block, false);
}
};
exports.TSEnumScope = TSEnumScope;
}
});
// ../../node_modules/.pnpm/@typescript-eslint+scope-manager@5.62.0/node_modules/@typescript-eslint/scope-manager/dist/scope/TSModuleScope.js
var require_TSModuleScope = __commonJS({
"../../node_modules/.pnpm/@typescript-eslint+scope-manager@5.62.0/node_modules/@typescript-eslint/scope-manager/dist/scope/TSModuleScope.js"(exports) {
"use strict";
init_shims();
Object.defineProperty(exports, "__esModule", { value: true });
exports.TSModuleScope = void 0;
var ScopeBase_1 = require_ScopeBase();
var ScopeType_1 = require_ScopeType();
var TSModuleScope = class extends ScopeBase_1.ScopeBase {
constructor(scopeManager, upperScope, block) {
super(scopeManager, ScopeType_1.ScopeType.tsModule, upperScope, block, false);
}
};
exports.TSModuleScope = TSModuleScope;
}
});
// ../../node_modules/.pnpm/@typescript-eslint+scope-manager@5.62.0/node_modules/@typescript-eslint/scope-manager/dist/scope/TypeScope.js
var require_TypeScope = __commonJS({
"../../node_modules/.pnpm/@typescript-eslint+scope-manager@5.62.0/node_modules/@typescript-eslint/scope-manager/dist/scope/TypeScope.js"(exports) {
"use strict";
init_shims();
Object.defineProperty(exports, "__esModule", { value: true });
exports.TypeScope = void 0;
var ScopeBase_1 = require_ScopeBase();
var ScopeType_1 = require_ScopeType();
var TypeScope = class extends ScopeBase_1.ScopeBase {
constructor(scopeManager, upperScope, block) {
super(scopeManager, ScopeType_1.ScopeType.type, upperScope, block, false);
}
};
exports.TypeScope = TypeScope;
}
});
// ../../node_modules/.pnpm/@typescript-eslint+scope-manager@5.62.0/node_modules/@typescript-eslint/scope-manager/dist/scope/WithScope.js
var require_WithScope = __commonJS({
"../../node_modules/.pnpm/@typescript-eslint+scope-manager@5.62.0/node_modules/@typescript-eslint/scope-manager/dist/scope/WithScope.js"(exports) {
"use strict";
init_shims();
Object.defineProperty(exports, "__esModule", { value: true });
exports.WithScope = void 0;
var assert_1 = require_assert();
var ScopeBase_1 = require_ScopeBase();
var ScopeType_1 = require_ScopeType();
var WithScope = class extends ScopeBase_1.ScopeBase {
constructor(scopeManager, upperScope, block) {
super(scopeManager, ScopeType_1.ScopeType.with, upperScope, block, false);
}
close(scopeManager) {
if (this.shouldStaticallyClose()) {
return super.close(scopeManager);
}
(0, assert_1.assert)(this.leftToResolve);
this.leftToResolve.forEach((ref) => this.delegateToUpperScope(ref));
this.leftToResolve = null;
return this.upper;
}
};
exports.WithScope = WithScope;
}
});
// ../../node_modules/.pnpm/@typescript-eslint+scope-manager@5.62.0/node_modules/@typescript-eslint/scope-manager/dist/scope/index.js
var require_scope = __commonJS({
"../../node_modules/.pnpm/@typescript-eslint+scope-manager@5.62.0/node_modules/@typescript-eslint/scope-manager/dist/scope/index.js"(exports) {
"use strict";
init_shims();
var __createBinding2 = exports && exports.__createBinding || (Object.create ? function(o, m, k, k2) {
if (k2 === void 0) k2 = k;
var desc = Object.getOwnPropertyDescriptor(m, k);
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
desc = { enumerable: true, get: function() {
return m[k];
} };
}
Object.defineProperty(o, k2, desc);
} : function(o, m, k, k2) {
if (k2 === void 0) k2 = k;
o[k2] = m[k];
});
var __exportStar2 = exports && exports.__exportStar || function(m, exports2) {
for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports2, p)) __createBinding2(exports2, m, p);
};
Object.defineProperty(exports, "__esModule", { value: true });
__exportStar2(require_BlockScope(), exports);
__exportStar2(require_CatchScope(), exports);
__exportStar2(require_ClassFieldInitializerScope(), exports);
__exportStar2(require_ClassScope(), exports);
__exportStar2(require_ConditionalTypeScope(), exports);
__exportStar2(require_ForScope(), exports);
__exportStar2(require_FunctionExpressionNameScope(), exports);
__exportStar2(require_FunctionScope(), exports);
__exportStar2(require_FunctionTypeScope(), exports);
__exportStar2(require_GlobalScope(), exports);
__exportStar2(require_MappedTypeScope(), exports);
__exportStar2(require_ModuleScope(), exports);
__exportStar2(require_Scope(), exports);
__exportStar2(require_ScopeType(), exports);
__exportStar2(require_SwitchScope(), exports);
__exportStar2(require_TSEnumScope(), exports);
__exportStar2(require_TSModuleScope(), exports);
__exportStar2(require_TypeScope(), exports);
__exportStar2(require_WithScope(), exports);
}
});
// ../../node_modules/.pnpm/@typescript-eslint+scope-manager@5.62.0/node_modules/@typescript-eslint/scope-manager/dist/referencer/VisitorBase.js
var require_VisitorBase = __commonJS({
"../../node_modules/.pnpm/@typescript-eslint+scope-manager@5.62.0/node_modules/@typescript-eslint/scope-manager/dist/referencer/VisitorBase.js"(exports) {
"use strict";
init_shims();
var __classPrivateFieldSet2 = exports && exports.__classPrivateFieldSet || function(receiver, state, value, kind, f) {
if (kind === "m") throw new TypeError("Private method is not writable");
if (kind === "a" && !f) throw new TypeError("Private accessor was defined without a setter");
if (typeof state === "function" ? receiver !== state || !f : !state.has(receiver)) throw new TypeError("Cannot write private member to an object whose class did not declare it");
return kind === "a" ? f.call(receiver, value) : f ? f.value = value : state.set(receiver, value), value;
};
var __classPrivateFieldGet2 = exports && exports.__classPrivateFieldGet || function(receiver, state, kind, f) {
if (kind === "a" && !f) throw new TypeError("Private accessor was defined without a getter");
if (typeof state === "function" ? receiver !== state || !f : !state.has(receiver)) throw new TypeError("Cannot read private member from an object whose class did not declare it");
return kind === "m" ? f : kind === "a" ? f.call(receiver) : f ? f.value : state.get(receiver);
};
var _VisitorBase_childVisitorKeys;
var _VisitorBase_visitChildrenEvenIfSelectorExists;
Object.defineProperty(exports, "__esModule", { value: true });
exports.VisitorBase = void 0;
var visitor_keys_1 = require_dist3();
function isObject(obj) {
return typeof obj === "object" && obj != null;
}
function isNode(node2) {
return isObject(node2) && typeof node2.type === "string";
}
var VisitorBase = class {
constructor(options) {
var _a, _b;
_VisitorBase_childVisitorKeys.set(this, void 0);
_VisitorBase_visitChildrenEvenIfSelectorExists.set(this, void 0);
__classPrivateFieldSet2(this, _VisitorBase_childVisitorKeys, (_a = options.childVisitorKeys) !== null && _a !== void 0 ? _a : visitor_keys_1.visitorKeys, "f");
__classPrivateFieldSet2(this, _VisitorBase_visitChildrenEvenIfSelectorExists, (_b = options.visitChildrenEvenIfSelectorExists) !== null && _b !== void 0 ? _b : false, "f");
}
/**
* Default method for visiting children.
* @param node the node whose children should be visited
* @param exclude a list of keys to not visit
*/
visitChildren(node2, excludeArr = []) {
var _a;
if (node2 == null || node2.type == null) {
return;
}
const exclude = new Set(excludeArr.concat(["parent"]));
const children = (_a = __classPrivateFieldGet2(this, _VisitorBase_childVisitorKeys, "f")[node2.type]) !== null && _a !== void 0 ? _a : Object.keys(node2);
for (const key of children) {
if (exclude.has(key)) {
continue;
}
const child = node2[key];
if (!child) {
continue;
}
if (Array.isArray(child)) {
for (const subChild of child) {
if (isNode(subChild)) {
this.visit(subChild);
}
}
} else if (isNode(child)) {
this.visit(child);
}
}
}
/**
* Dispatching node.
*/
visit(node2) {
if (node2 == null || node2.type == null) {
return;
}
const visitor = this[node2.type];
if (visitor) {
visitor.call(this, node2);
if (!__classPrivateFieldGet2(this, _VisitorBase_visitChildrenEvenIfSelectorExists, "f")) {
return;
}
}
this.visitChildren(node2);
}
};
exports.VisitorBase = VisitorBase;
_VisitorBase_childVisitorKeys = /* @__PURE__ */ new WeakMap(), _VisitorBase_visitChildrenEvenIfSelectorExists = /* @__PURE__ */ new WeakMap();
}
});
// ../../node_modules/.pnpm/@typescript-eslint+scope-manager@5.62.0/node_modules/@typescript-eslint/scope-manager/dist/referencer/PatternVisitor.js
var require_PatternVisitor = __commonJS({
"../../node_modules/.pnpm/@typescript-eslint+scope-manager@5.62.0/node_modules/@typescript-eslint/scope-manager/dist/referencer/PatternVisitor.js"(exports) {
"use strict";
init_shims();
var __classPrivateFieldSet2 = exports && exports.__classPrivateFieldSet || function(receiver, state, value, kind, f) {
if (kind === "m") throw new TypeError("Private method is not writable");
if (kind === "a" && !f) throw new TypeError("Private accessor was defined without a setter");
if (typeof state === "function" ? receiver !== state || !f : !state.has(receiver)) throw new TypeError("Cannot write private member to an object whose class did not declare it");
return kind === "a" ? f.call(receiver, value) : f ? f.value = value : state.set(receiver, value), value;
};
var __classPrivateFieldGet2 = exports && exports.__classPrivateFieldGet || function(receiver, state, kind, f) {
if (kind === "a" && !f) throw new TypeError("Private accessor was defined without a getter");
if (typeof state === "function" ? receiver !== state || !f : !state.has(receiver)) throw new TypeError("Cannot read private member from an object whose class did not declare it");
return kind === "m" ? f : kind === "a" ? f.call(receiver) : f ? f.value : state.get(receiver);
};
var _PatternVisitor_rootPattern;
var _PatternVisitor_callback;
var _PatternVisitor_assignments;
var _PatternVisitor_restElements;
Object.defineProperty(exports, "__esModule", { value: true });
exports.PatternVisitor = void 0;
var types_1 = require_dist2();
var VisitorBase_1 = require_VisitorBase();
var PatternVisitor = class extends VisitorBase_1.VisitorBase {
static isPattern(node2) {
const nodeType = node2.type;
return nodeType === types_1.AST_NODE_TYPES.Identifier || nodeType === types_1.AST_NODE_TYPES.ObjectPattern || nodeType === types_1.AST_NODE_TYPES.ArrayPattern || nodeType === types_1.AST_NODE_TYPES.SpreadElement || nodeType === types_1.AST_NODE_TYPES.RestElement || nodeType === types_1.AST_NODE_TYPES.AssignmentPattern;
}
constructor(options, rootPattern, callback) {
super(options);
_PatternVisitor_rootPattern.set(this, void 0);
_PatternVisitor_callback.set(this, void 0);
_PatternVisitor_assignments.set(this, []);
this.rightHandNodes = [];
_PatternVisitor_restElements.set(this, []);
__classPrivateFieldSet2(this, _PatternVisitor_rootPattern, rootPattern, "f");
__classPrivateFieldSet2(this, _PatternVisitor_callback, callback, "f");
}
ArrayExpression(node2) {
node2.elements.forEach(this.visit, this);
}
ArrayPattern(pattern) {
for (const element of pattern.elements) {
this.visit(element);
}
}
AssignmentExpression(node2) {
__classPrivateFieldGet2(this, _PatternVisitor_assignments, "f").push(node2);
this.visit(node2.left);
this.rightHandNodes.push(node2.right);
__classPrivateFieldGet2(this, _PatternVisitor_assignments, "f").pop();
}
AssignmentPattern(pattern) {
__classPrivateFieldGet2(this, _PatternVisitor_assignments, "f").push(pattern);
this.visit(pattern.left);
this.rightHandNodes.push(pattern.right);
__classPrivateFieldGet2(this, _PatternVisitor_assignments, "f").pop();
}
CallExpression(node2) {
node2.arguments.forEach((a) => {
this.rightHandNodes.push(a);
});
this.visit(node2.callee);
}
Decorator() {
}
Identifier(pattern) {
var _a;
const lastRestElement = (_a = __classPrivateFieldGet2(this, _PatternVisitor_restElements, "f")[__classPrivateFieldGet2(this, _PatternVisitor_restElements, "f").length - 1]) !== null && _a !== void 0 ? _a : null;
__classPrivateFieldGet2(this, _PatternVisitor_callback, "f").call(this, pattern, {
topLevel: pattern === __classPrivateFieldGet2(this, _PatternVisitor_rootPattern, "f"),
rest: lastRestElement != null && lastRestElement.argument === pattern,
assignments: __classPrivateFieldGet2(this, _PatternVisitor_assignments, "f")
});
}
MemberExpression(node2) {
if (node2.computed) {
this.rightHandNodes.push(node2.property);
}
this.rightHandNodes.push(node2.object);
}
Property(property) {
if (property.computed) {
this.rightHandNodes.push(property.key);
}
this.visit(property.value);
}
RestElement(pattern) {
__classPrivateFieldGet2(this, _PatternVisitor_restElements, "f").push(pattern);
this.visit(pattern.argument);
__classPrivateFieldGet2(this, _PatternVisitor_restElements, "f").pop();
}
SpreadElement(node2) {
this.visit(node2.argument);
}
TSTypeAnnotation() {
}
};
exports.PatternVisitor = PatternVisitor;
_PatternVisitor_rootPattern = /* @__PURE__ */ new WeakMap(), _PatternVisitor_callback = /* @__PURE__ */ new WeakMap(), _PatternVisitor_assignments = /* @__PURE__ */ new WeakMap(), _PatternVisitor_restElements = /* @__PURE__ */ new WeakMap();
}
});
// ../../node_modules/.pnpm/@typescript-eslint+scope-manager@5.62.0/node_modules/@typescript-eslint/scope-manager/dist/referencer/Visitor.js
var require_Visitor = __commonJS({
"../../node_modules/.pnpm/@typescript-eslint+scope-manager@5.62.0/node_modules/@typescript-eslint/scope-manager/dist/referencer/Visitor.js"(exports) {
"use strict";
init_shims();
var __classPrivateFieldGet2 = exports && exports.__classPrivateFieldGet || function(receiver, state, kind, f) {
if (kind === "a" && !f) throw new TypeError("Private accessor was defined without a getter");
if (typeof state === "function" ? receiver !== state || !f : !state.has(receiver)) throw new TypeError("Cannot read private member from an object whose class did not declare it");
return kind === "m" ? f : kind === "a" ? f.call(receiver) : f ? f.value : state.get(receiver);
};
var __classPrivateFieldSet2 = exports && exports.__classPrivateFieldSet || function(receiver, state, value, kind, f) {
if (kind === "m") throw new TypeError("Private method is not writable");
if (kind === "a" && !f) throw new TypeError("Private accessor was defined without a setter");
if (typeof state === "function" ? receiver !== state || !f : !state.has(receiver)) throw new TypeError("Cannot write private member to an object whose class did not declare it");
return kind === "a" ? f.call(receiver, value) : f ? f.value = value : state.set(receiver, value), value;
};
var _Visitor_options;
Object.defineProperty(exports, "__esModule", { value: true });
exports.VisitorBase = exports.Visitor = void 0;
var PatternVisitor_1 = require_PatternVisitor();
var VisitorBase_1 = require_VisitorBase();
Object.defineProperty(exports, "VisitorBase", { enumerable: true, get: function() {
return VisitorBase_1.VisitorBase;
} });
var Visitor = class _Visitor extends VisitorBase_1.VisitorBase {
constructor(optionsOrVisitor) {
super(optionsOrVisitor instanceof _Visitor ? __classPrivateFieldGet2(optionsOrVisitor, _Visitor_options, "f") : optionsOrVisitor);
_Visitor_options.set(this, void 0);
__classPrivateFieldSet2(this, _Visitor_options, optionsOrVisitor instanceof _Visitor ? __classPrivateFieldGet2(optionsOrVisitor, _Visitor_options, "f") : optionsOrVisitor, "f");
}
visitPattern(node2, callback, options = { processRightHandNodes: false }) {
const visitor = new PatternVisitor_1.PatternVisitor(__classPrivateFieldGet2(this, _Visitor_options, "f"), node2, callback);
visitor.visit(node2);
if (options.processRightHandNodes) {
visitor.rightHandNodes.forEach(this.visit, this);
}
}
};
exports.Visitor = Visitor;
_Visitor_options = /* @__PURE__ */ new WeakMap();
}
});
// ../../node_modules/.pnpm/@typescript-eslint+scope-manager@5.62.0/node_modules/@typescript-eslint/scope-manager/dist/referencer/TypeVisitor.js
var require_TypeVisitor = __commonJS({
"../../node_modules/.pnpm/@typescript-eslint+scope-manager@5.62.0/node_modules/@typescript-eslint/scope-manager/dist/referencer/TypeVisitor.js"(exports) {
"use strict";
init_shims();
var __classPrivateFieldSet2 = exports && exports.__classPrivateFieldSet || function(receiver, state, value, kind, f) {
if (kind === "m") throw new TypeError("Private method is not writable");
if (kind === "a" && !f) throw new TypeError("Private accessor was defined without a setter");
if (typeof state === "function" ? receiver !== state || !f : !state.has(receiver)) throw new TypeError("Cannot write private member to an object whose class did not declare it");
return kind === "a" ? f.call(receiver, value) : f ? f.value = value : state.set(receiver, value), value;
};
var __classPrivateFieldGet2 = exports && exports.__classPrivateFieldGet || function(receiver, state, kind, f) {
if (kind === "a" && !f) throw new TypeError("Private accessor was defined without a getter");
if (typeof state === "function" ? receiver !== state || !f : !state.has(receiver)) throw new TypeError("Cannot read private member from an object whose class did not declare it");
return kind === "m" ? f : kind === "a" ? f.call(receiver) : f ? f.value : state.get(receiver);
};
var _TypeVisitor_referencer;
Object.defineProperty(exports, "__esModule", { value: true });
exports.TypeVisitor = void 0;
var types_1 = require_dist2();
var definition_1 = require_definition();
var scope_1 = require_scope();
var Visitor_1 = require_Visitor();
var TypeVisitor = class _TypeVisitor extends Visitor_1.Visitor {
constructor(referencer) {
super(referencer);
_TypeVisitor_referencer.set(this, void 0);
__classPrivateFieldSet2(this, _TypeVisitor_referencer, referencer, "f");
}
static visit(referencer, node2) {
const typeReferencer = new _TypeVisitor(referencer);
typeReferencer.visit(node2);
}
///////////////////
// Visit helpers //
///////////////////
visitFunctionType(node2) {
__classPrivateFieldGet2(this, _TypeVisitor_referencer, "f").scopeManager.nestFunctionTypeScope(node2);
this.visit(node2.typeParameters);
for (const param of node2.params) {
let didVisitAnnotation = false;
this.visitPattern(param, (pattern, info) => {
__classPrivateFieldGet2(this, _TypeVisitor_referencer, "f").currentScope().defineIdentifier(pattern, new definition_1.ParameterDefinition(pattern, node2, info.rest));
if (pattern.typeAnnotation) {
this.visit(pattern.typeAnnotation);
didVisitAnnotation = true;
}
});
if (!didVisitAnnotation && "typeAnnotation" in param) {
this.visit(param.typeAnnotation);
}
}
this.visit(node2.returnType);
__classPrivateFieldGet2(this, _TypeVisitor_referencer, "f").close(node2);
}
visitPropertyKey(node2) {
if (!node2.computed) {
return;
}
__classPrivateFieldGet2(this, _TypeVisitor_referencer, "f").visit(node2.key);
}
/////////////////////
// Visit selectors //
/////////////////////
Identifier(node2) {
__classPrivateFieldGet2(this, _TypeVisitor_referencer, "f").currentScope().referenceType(node2);
}
MemberExpression(node2) {
this.visit(node2.object);
}
TSCallSignatureDeclaration(node2) {
this.visitFunctionType(node2);
}
TSConditionalType(node2) {
__classPrivateFieldGet2(this, _TypeVisitor_referencer, "f").scopeManager.nestConditionalTypeScope(node2);
this.visitChildren(node2, ["falseType"]);
__classPrivateFieldGet2(this, _TypeVisitor_referencer, "f").close(node2);
this.visit(node2.falseType);
}
TSConstructorType(node2) {
this.visitFunctionType(node2);
}
TSConstructSignatureDeclaration(node2) {
this.visitFunctionType(node2);
}
TSFunctionType(node2) {
this.visitFunctionType(node2);
}
TSImportType(node2) {
this.visit(node2.typeParameters);
}
TSIndexSignature(node2) {
for (const param of node2.parameters) {
if (param.type === types_1.AST_NODE_TYPES.Identifier) {
this.visit(param.typeAnnotation);
}
}
this.visit(node2.typeAnnotation);
}
TSInferType(node2) {
const typeParameter = node2.typeParameter;
let scope = __classPrivateFieldGet2(this, _TypeVisitor_referencer, "f").currentScope();
if (scope.type === scope_1.ScopeType.functionType || scope.type === scope_1.ScopeType.mappedType) {
let currentScope = scope.upper;
while (currentScope) {
if (currentScope.type === scope_1.ScopeType.functionType || currentScope.type === scope_1.ScopeType.mappedType) {
currentScope = currentScope.upper;
continue;
}
if (currentScope.type === scope_1.ScopeType.conditionalType) {
scope = currentScope;
break;
}
break;
}
}
scope.defineIdentifier(typeParameter.name, new definition_1.TypeDefinition(typeParameter.name, typeParameter));
this.visit(typeParameter.constraint);
}
TSInterfaceDeclaration(node2) {
var _a, _b;
__classPrivateFieldGet2(this, _TypeVisitor_referencer, "f").currentScope().defineIdentifier(node2.id, new definition_1.TypeDefinition(node2.id, node2));
if (node2.typeParameters) {
__classPrivateFieldGet2(this, _TypeVisitor_referencer, "f").scopeManager.nestTypeScope(node2);
this.visit(node2.typeParameters);
}
(_a = node2.extends) === null || _a === void 0 ? void 0 : _a.forEach(this.visit, this);
(_b = node2.implements) === null || _b === void 0 ? void 0 : _b.forEach(this.visit, this);
this.visit(node2.body);
if (node2.typeParameters) {
__classPrivateFieldGet2(this, _TypeVisitor_referencer, "f").close(node2);
}
}
TSMappedType(node2) {
__classPrivateFieldGet2(this, _TypeVisitor_referencer, "f").scopeManager.nestMappedTypeScope(node2);
this.visitChildren(node2);
__classPrivateFieldGet2(this, _TypeVisitor_referencer, "f").close(node2);
}
TSMethodSignature(node2) {
this.visitPropertyKey(node2);
this.visitFunctionType(node2);
}
TSNamedTupleMember(node2) {
this.visit(node2.elementType);
}
TSPropertySignature(node2) {
this.visitPropertyKey(node2);
this.visit(node2.typeAnnotation);
}
TSQualifiedName(node2) {
this.visit(node2.left);
}
TSTypeAliasDeclaration(node2) {
__classPrivateFieldGet2(this, _TypeVisitor_referencer, "f").currentScope().defineIdentifier(node2.id, new definition_1.TypeDefinition(node2.id, node2));
if (node2.typeParameters) {
__classPrivateFieldGet2(this, _TypeVisitor_referencer, "f").scopeManager.nestTypeScope(node2);
this.visit(node2.typeParameters);
}
this.visit(node2.typeAnnotation);
if (node2.typeParameters) {
__classPrivateFieldGet2(this, _TypeVisitor_referencer, "f").close(node2);
}
}
TSTypeParameter(node2) {
__classPrivateFieldGet2(this, _TypeVisitor_referencer, "f").currentScope().defineIdentifier(node2.name, new definition_1.TypeDefinition(node2.name, node2));
this.visit(node2.constraint);
this.visit(node2.default);
}
TSTypePredicate(node2) {
if (node2.parameterName.type !== types_1.AST_NODE_TYPES.TSThisType) {
__classPrivateFieldGet2(this, _TypeVisitor_referencer, "f").currentScope().referenceValue(node2.parameterName);
}
this.visit(node2.typeAnnotation);
}
// a type query `typeof foo` is a special case that references a _non-type_ variable,
TSTypeQuery(node2) {
let entityName;
if (node2.exprName.type === types_1.AST_NODE_TYPES.TSQualifiedName) {
let iter = node2.exprName;
while (iter.left.type === types_1.AST_NODE_TYPES.TSQualifiedName) {
iter = iter.left;
}
entityName = iter.left;
} else {
entityName = node2.exprName;
}
if (entityName.type === types_1.AST_NODE_TYPES.Identifier) {
__classPrivateFieldGet2(this, _TypeVisitor_referencer, "f").currentScope().referenceValue(entityName);
}
this.visit(node2.typeParameters);
}
TSTypeAnnotation(node2) {
this.visitChildren(node2);
}
};
exports.TypeVisitor = TypeVisitor;
_TypeVisitor_referencer = /* @__PURE__ */ new WeakMap();
}
});
// ../../node_modules/.pnpm/@typescript-eslint+scope-manager@5.62.0/node_modules/@typescript-eslint/scope-manager/dist/referencer/ClassVisitor.js
var require_ClassVisitor = __commonJS({
"../../node_modules/.pnpm/@typescript-eslint+scope-manager@5.62.0/node_modules/@typescript-eslint/scope-manager/dist/referencer/ClassVisitor.js"(exports) {
"use strict";
init_shims();
var __classPrivateFieldSet2 = exports && exports.__classPrivateFieldSet || function(receiver, state, value, kind, f) {
if (kind === "m") throw new TypeError("Private method is not writable");
if (kind === "a" && !f) throw new TypeError("Private accessor was defined without a setter");
if (typeof state === "function" ? receiver !== state || !f : !state.has(receiver)) throw new TypeError("Cannot write private member to an object whose class did not declare it");
return kind === "a" ? f.call(receiver, value) : f ? f.value = value : state.set(receiver, value), value;
};
var __classPrivateFieldGet2 = exports && exports.__classPrivateFieldGet || function(receiver, state, kind, f) {
if (kind === "a" && !f) throw new TypeError("Private accessor was defined without a getter");
if (typeof state === "function" ? receiver !== state || !f : !state.has(receiver)) throw new TypeError("Cannot read private member from an object whose class did not declare it");
return kind === "m" ? f : kind === "a" ? f.call(receiver) : f ? f.value : state.get(receiver);
};
var _ClassVisitor_classNode;
var _ClassVisitor_referencer;
var _ClassVisitor_emitDecoratorMetadata;
Object.defineProperty(exports, "__esModule", { value: true });
exports.ClassVisitor = void 0;
var types_1 = require_dist2();
var definition_1 = require_definition();
var TypeVisitor_1 = require_TypeVisitor();
var Visitor_1 = require_Visitor();
var ClassVisitor = class _ClassVisitor extends Visitor_1.Visitor {
constructor(referencer, node2, emitDecoratorMetadata) {
super(referencer);
_ClassVisitor_classNode.set(this, void 0);
_ClassVisitor_referencer.set(this, void 0);
_ClassVisitor_emitDecoratorMetadata.set(this, void 0);
__classPrivateFieldSet2(this, _ClassVisitor_referencer, referencer, "f");
__classPrivateFieldSet2(this, _ClassVisitor_classNode, node2, "f");
__classPrivateFieldSet2(this, _ClassVisitor_emitDecoratorMetadata, emitDecoratorMetadata, "f");
}
static visit(referencer, node2, emitDecoratorMetadata) {
const classVisitor = new _ClassVisitor(referencer, node2, emitDecoratorMetadata);
classVisitor.visitClass(node2);
}
visit(node2) {
if (node2 && node2.type in this) {
super.visit(node2);
} else {
__classPrivateFieldGet2(this, _ClassVisitor_referencer, "f").visit(node2);
}
}
///////////////////
// Visit helpers //
///////////////////
visitClass(node2) {
var _a, _b;
if (node2.type === types_1.AST_NODE_TYPES.ClassDeclaration && node2.id) {
__classPrivateFieldGet2(this, _ClassVisitor_referencer, "f").currentScope().defineIdentifier(node2.id, new definition_1.ClassNameDefinition(node2.id, node2));
}
(_a = node2.decorators) === null || _a === void 0 ? void 0 : _a.forEach((d) => __classPrivateFieldGet2(this, _ClassVisitor_referencer, "f").visit(d));
__classPrivateFieldGet2(this, _ClassVisitor_referencer, "f").scopeManager.nestClassScope(node2);
if (node2.id) {
__classPrivateFieldGet2(this, _ClassVisitor_referencer, "f").currentScope().defineIdentifier(node2.id, new definition_1.ClassNameDefinition(node2.id, node2));
}
__classPrivateFieldGet2(this, _ClassVisitor_referencer, "f").visit(node2.superClass);
this.visitType(node2.typeParameters);
this.visitType(node2.superTypeParameters);
(_b = node2.implements) === null || _b === void 0 ? void 0 : _b.forEach((imp) => this.visitType(imp));
this.visit(node2.body);
__classPrivateFieldGet2(this, _ClassVisitor_referencer, "f").close(node2);
}
visitPropertyDefinition(node2) {
this.visitPropertyBase(node2);
this.visitMetadataType(node2.typeAnnotation, !!node2.decorators);
}
visitFunctionParameterTypeAnnotation(node2, withDecorators) {
if ("typeAnnotation" in node2) {
this.visitMetadataType(node2.typeAnnotation, withDecorators);
} else if (node2.type === types_1.AST_NODE_TYPES.AssignmentPattern) {
this.visitMetadataType(node2.left.typeAnnotation, withDecorators);
} else if (node2.type === types_1.AST_NODE_TYPES.TSParameterProperty) {
this.visitFunctionParameterTypeAnnotation(node2.parameter, withDecorators);
}
}
visitMethodFunction(node2, methodNode) {
var _a, _b;
if (node2.id) {
__classPrivateFieldGet2(this, _ClassVisitor_referencer, "f").scopeManager.nestFunctionExpressionNameScope(node2);
}
__classPrivateFieldGet2(this, _ClassVisitor_referencer, "f").scopeManager.nestFunctionScope(node2, true);
let withMethodDecorators = !!methodNode.decorators;
withMethodDecorators = withMethodDecorators || methodNode.kind !== "set" && node2.params.some((param) => param.decorators);
if (!withMethodDecorators && methodNode.kind === "set") {
const keyName = getLiteralMethodKeyName(methodNode);
if (keyName != null && ((_a = __classPrivateFieldGet2(this, _ClassVisitor_classNode, "f").body.body.find((node3) => node3 !== methodNode && node3.type === types_1.AST_NODE_TYPES.MethodDefinition && // Node must both be static or not
node3.static === methodNode.static && getLiteralMethodKeyName(node3) === keyName)) === null || _a === void 0 ? void 0 : _a.decorators)) {
withMethodDecorators = true;
}
}
if (!withMethodDecorators && methodNode.kind === "constructor" && __classPrivateFieldGet2(this, _ClassVisitor_classNode, "f").decorators) {
withMethodDecorators = true;
}
for (const param of node2.params) {
this.visitPattern(param, (pattern, info) => {
__classPrivateFieldGet2(this, _ClassVisitor_referencer, "f").currentScope().defineIdentifier(pattern, new definition_1.ParameterDefinition(pattern, node2, info.rest));
__classPrivateFieldGet2(this, _ClassVisitor_referencer, "f").referencingDefaultValue(pattern, info.assignments, null, true);
}, { processRightHandNodes: true });
this.visitFunctionParameterTypeAnnotation(param, withMethodDecorators);
(_b = param.decorators) === null || _b === void 0 ? void 0 : _b.forEach((d) => this.visit(d));
}
this.visitMetadataType(node2.returnType, withMethodDecorators);
this.visitType(node2.typeParameters);
if (node2.body) {
if (node2.body.type === types_1.AST_NODE_TYPES.BlockStatement) {
__classPrivateFieldGet2(this, _ClassVisitor_referencer, "f").visitChildren(node2.body);
} else {
__classPrivateFieldGet2(this, _ClassVisitor_referencer, "f").visit(node2.body);
}
}
__classPrivateFieldGet2(this, _ClassVisitor_referencer, "f").close(node2);
}
visitPropertyBase(node2) {
var _a;
if (node2.computed) {
__classPrivateFieldGet2(this, _ClassVisitor_referencer, "f").visit(node2.key);
}
if (node2.value) {
if (node2.type === types_1.AST_NODE_TYPES.PropertyDefinition || node2.type === types_1.AST_NODE_TYPES.AccessorProperty) {
__classPrivateFieldGet2(this, _ClassVisitor_referencer, "f").scopeManager.nestClassFieldInitializerScope(node2.value);
}
__classPrivateFieldGet2(this, _ClassVisitor_referencer, "f").visit(node2.value);
if (node2.type === types_1.AST_NODE_TYPES.PropertyDefinition || node2.type === types_1.AST_NODE_TYPES.AccessorProperty) {
__classPrivateFieldGet2(this, _ClassVisitor_referencer, "f").close(node2.value);
}
}
if ("decorators" in node2) {
(_a = node2.decorators) === null || _a === void 0 ? void 0 : _a.forEach((d) => __classPrivateFieldGet2(this, _ClassVisitor_referencer, "f").visit(d));
}
}
visitMethod(node2) {
var _a;
if (node2.computed) {
__classPrivateFieldGet2(this, _ClassVisitor_referencer, "f").visit(node2.key);
}
if (node2.value.type === types_1.AST_NODE_TYPES.FunctionExpression) {
this.visitMethodFunction(node2.value, node2);
} else {
__classPrivateFieldGet2(this, _ClassVisitor_referencer, "f").visit(node2.value);
}
if ("decorators" in node2) {
(_a = node2.decorators) === null || _a === void 0 ? void 0 : _a.forEach((d) => __classPrivateFieldGet2(this, _ClassVisitor_referencer, "f").visit(d));
}
}
visitType(node2) {
if (!node2) {
return;
}
TypeVisitor_1.TypeVisitor.visit(__classPrivateFieldGet2(this, _ClassVisitor_referencer, "f"), node2);
}
visitMetadataType(node2, withDecorators) {
if (!node2) {
return;
}
if (__classPrivateFieldGet2(this, _ClassVisitor_classNode, "f").type === types_1.AST_NODE_TYPES.ClassDeclaration && !__classPrivateFieldGet2(this, _ClassVisitor_classNode, "f").declare && node2.typeAnnotation.type === types_1.AST_NODE_TYPES.TSTypeReference && __classPrivateFieldGet2(this, _ClassVisitor_emitDecoratorMetadata, "f")) {
let entityName;
if (node2.typeAnnotation.typeName.type === types_1.AST_NODE_TYPES.TSQualifiedName) {
let iter = node2.typeAnnotation.typeName;
while (iter.left.type === types_1.AST_NODE_TYPES.TSQualifiedName) {
iter = iter.left;
}
entityName = iter.left;
} else {
entityName = node2.typeAnnotation.typeName;
}
if (withDecorators) {
if (entityName.type === types_1.AST_NODE_TYPES.Identifier) {
__classPrivateFieldGet2(this, _ClassVisitor_referencer, "f").currentScope().referenceDualValueType(entityName);
}
if (node2.typeAnnotation.typeParameters) {
this.visitType(node2.typeAnnotation.typeParameters);
}
return;
}
}
this.visitType(node2);
}
/////////////////////
// Visit selectors //
/////////////////////
AccessorProperty(node2) {
this.visitPropertyDefinition(node2);
}
ClassBody(node2) {
this.visitChildren(node2);
}
PropertyDefinition(node2) {
this.visitPropertyDefinition(node2);
}
MethodDefinition(node2) {
this.visitMethod(node2);
}
TSAbstractAccessorProperty(node2) {
this.visitPropertyDefinition(node2);
}
TSAbstractPropertyDefinition(node2) {
this.visitPropertyDefinition(node2);
}
TSAbstractMethodDefinition(node2) {
this.visitPropertyBase(node2);
}
Identifier(node2) {
__classPrivateFieldGet2(this, _ClassVisitor_referencer, "f").visit(node2);
}
PrivateIdentifier() {
}
StaticBlock(node2) {
__classPrivateFieldGet2(this, _ClassVisitor_referencer, "f").scopeManager.nestClassStaticBlockScope(node2);
node2.body.forEach((b) => this.visit(b));
__classPrivateFieldGet2(this, _ClassVisitor_referencer, "f").close(node2);
}
};
exports.ClassVisitor = ClassVisitor;
_ClassVisitor_classNode = /* @__PURE__ */ new WeakMap(), _ClassVisitor_referencer = /* @__PURE__ */ new WeakMap(), _ClassVisitor_emitDecoratorMetadata = /* @__PURE__ */ new WeakMap();
function getLiteralMethodKeyName(node2) {
if (node2.computed && node2.key.type === types_1.AST_NODE_TYPES.Literal) {
if (typeof node2.key.value === "string" || typeof node2.key.value === "number") {
return node2.key.value;
}
} else if (!node2.computed && node2.key.type === types_1.AST_NODE_TYPES.Identifier) {
return node2.key.name;
}
return null;
}
}
});
// ../../node_modules/.pnpm/@typescript-eslint+scope-manager@5.62.0/node_modules/@typescript-eslint/scope-manager/dist/referencer/ExportVisitor.js
var require_ExportVisitor = __commonJS({
"../../node_modules/.pnpm/@typescript-eslint+scope-manager@5.62.0/node_modules/@typescript-eslint/scope-manager/dist/referencer/ExportVisitor.js"(exports) {
"use strict";
init_shims();
var __classPrivateFieldSet2 = exports && exports.__classPrivateFieldSet || function(receiver, state, value, kind, f) {
if (kind === "m") throw new TypeError("Private method is not writable");
if (kind === "a" && !f) throw new TypeError("Private accessor was defined without a setter");
if (typeof state === "function" ? receiver !== state || !f : !state.has(receiver)) throw new TypeError("Cannot write private member to an object whose class did not declare it");
return kind === "a" ? f.call(receiver, value) : f ? f.value = value : state.set(receiver, value), value;
};
var __classPrivateFieldGet2 = exports && exports.__classPrivateFieldGet || function(receiver, state, kind, f) {
if (kind === "a" && !f) throw new TypeError("Private accessor was defined without a getter");
if (typeof state === "function" ? receiver !== state || !f : !state.has(receiver)) throw new TypeError("Cannot read private member from an object whose class did not declare it");
return kind === "m" ? f : kind === "a" ? f.call(receiver) : f ? f.value : state.get(receiver);
};
var _ExportVisitor_referencer;
var _ExportVisitor_exportNode;
Object.defineProperty(exports, "__esModule", { value: true });
exports.ExportVisitor = void 0;
var types_1 = require_dist2();
var Visitor_1 = require_Visitor();
var ExportVisitor = class _ExportVisitor extends Visitor_1.Visitor {
constructor(node2, referencer) {
super(referencer);
_ExportVisitor_referencer.set(this, void 0);
_ExportVisitor_exportNode.set(this, void 0);
__classPrivateFieldSet2(this, _ExportVisitor_exportNode, node2, "f");
__classPrivateFieldSet2(this, _ExportVisitor_referencer, referencer, "f");
}
static visit(referencer, node2) {
const exportReferencer = new _ExportVisitor(node2, referencer);
exportReferencer.visit(node2);
}
Identifier(node2) {
if (__classPrivateFieldGet2(this, _ExportVisitor_exportNode, "f").exportKind === "type") {
__classPrivateFieldGet2(this, _ExportVisitor_referencer, "f").currentScope().referenceType(node2);
} else {
__classPrivateFieldGet2(this, _ExportVisitor_referencer, "f").currentScope().referenceDualValueType(node2);
}
}
ExportDefaultDeclaration(node2) {
if (node2.declaration.type === types_1.AST_NODE_TYPES.Identifier) {
this.visit(node2.declaration);
} else {
}
}
ExportNamedDeclaration(node2) {
if (node2.source) {
return;
}
if (!node2.declaration) {
this.visitChildren(node2);
} else {
}
}
ExportSpecifier(node2) {
if (node2.exportKind === "type") {
__classPrivateFieldGet2(this, _ExportVisitor_referencer, "f").currentScope().referenceType(node2.local);
} else {
this.visit(node2.local);
}
}
};
exports.ExportVisitor = ExportVisitor;
_ExportVisitor_referencer = /* @__PURE__ */ new WeakMap(), _ExportVisitor_exportNode = /* @__PURE__ */ new WeakMap();
}
});
// ../../node_modules/.pnpm/@typescript-eslint+scope-manager@5.62.0/node_modules/@typescript-eslint/scope-manager/dist/referencer/ImportVisitor.js
var require_ImportVisitor = __commonJS({
"../../node_modules/.pnpm/@typescript-eslint+scope-manager@5.62.0/node_modules/@typescript-eslint/scope-manager/dist/referencer/ImportVisitor.js"(exports) {
"use strict";
init_shims();
var __classPrivateFieldSet2 = exports && exports.__classPrivateFieldSet || function(receiver, state, value, kind, f) {
if (kind === "m") throw new TypeError("Private method is not writable");
if (kind === "a" && !f) throw new TypeError("Private accessor was defined without a setter");
if (typeof state === "function" ? receiver !== state || !f : !state.has(receiver)) throw new TypeError("Cannot write private member to an object whose class did not declare it");
return kind === "a" ? f.call(receiver, value) : f ? f.value = value : state.set(receiver, value), value;
};
var __classPrivateFieldGet2 = exports && exports.__classPrivateFieldGet || function(receiver, state, kind, f) {
if (kind === "a" && !f) throw new TypeError("Private accessor was defined without a getter");
if (typeof state === "function" ? receiver !== state || !f : !state.has(receiver)) throw new TypeError("Cannot read private member from an object whose class did not declare it");
return kind === "m" ? f : kind === "a" ? f.call(receiver) : f ? f.value : state.get(receiver);
};
var _ImportVisitor_declaration;
var _ImportVisitor_referencer;
Object.defineProperty(exports, "__esModule", { value: true });
exports.ImportVisitor = void 0;
var definition_1 = require_definition();
var Visitor_1 = require_Visitor();
var ImportVisitor = class _ImportVisitor extends Visitor_1.Visitor {
constructor(declaration, referencer) {
super(referencer);
_ImportVisitor_declaration.set(this, void 0);
_ImportVisitor_referencer.set(this, void 0);
__classPrivateFieldSet2(this, _ImportVisitor_declaration, declaration, "f");
__classPrivateFieldSet2(this, _ImportVisitor_referencer, referencer, "f");
}
static visit(referencer, declaration) {
const importReferencer = new _ImportVisitor(declaration, referencer);
importReferencer.visit(declaration);
}
visitImport(id, specifier) {
__classPrivateFieldGet2(this, _ImportVisitor_referencer, "f").currentScope().defineIdentifier(id, new definition_1.ImportBindingDefinition(id, specifier, __classPrivateFieldGet2(this, _ImportVisitor_declaration, "f")));
}
ImportNamespaceSpecifier(node2) {
const local = node2.local;
this.visitImport(local, node2);
}
ImportDefaultSpecifier(node2) {
const local = node2.local;
this.visitImport(local, node2);
}
ImportSpecifier(node2) {
const local = node2.local;
this.visitImport(local, node2);
}
};
exports.ImportVisitor = ImportVisitor;
_ImportVisitor_declaration = /* @__PURE__ */ new WeakMap(), _ImportVisitor_referencer = /* @__PURE__ */ new WeakMap();
}
});
// ../../node_modules/.pnpm/@typescript-eslint+scope-manager@5.62.0/node_modules/@typescript-eslint/scope-manager/dist/referencer/Referencer.js
var require_Referencer = __commonJS({
"../../node_modules/.pnpm/@typescript-eslint+scope-manager@5.62.0/node_modules/@typescript-eslint/scope-manager/dist/referencer/Referencer.js"(exports) {
"use strict";
init_shims();
var __classPrivateFieldSet2 = exports && exports.__classPrivateFieldSet || function(receiver, state, value, kind, f) {
if (kind === "m") throw new TypeError("Private method is not writable");
if (kind === "a" && !f) throw new TypeError("Private accessor was defined without a setter");
if (typeof state === "function" ? receiver !== state || !f : !state.has(receiver)) throw new TypeError("Cannot write private member to an object whose class did not declare it");
return kind === "a" ? f.call(receiver, value) : f ? f.value = value : state.set(receiver, value), value;
};
var __classPrivateFieldGet2 = exports && exports.__classPrivateFieldGet || function(receiver, state, kind, f) {
if (kind === "a" && !f) throw new TypeError("Private accessor was defined without a getter");
if (typeof state === "function" ? receiver !== state || !f : !state.has(receiver)) throw new TypeError("Cannot read private member from an object whose class did not declare it");
return kind === "m" ? f : kind === "a" ? f.call(receiver) : f ? f.value : state.get(receiver);
};
var _Referencer_jsxPragma;
var _Referencer_jsxFragmentName;
var _Referencer_hasReferencedJsxFactory;
var _Referencer_hasReferencedJsxFragmentFactory;
var _Referencer_lib;
var _Referencer_emitDecoratorMetadata;
Object.defineProperty(exports, "__esModule", { value: true });
exports.Referencer = void 0;
var types_1 = require_dist2();
var assert_1 = require_assert();
var definition_1 = require_definition();
var lib_1 = require_lib3();
var ClassVisitor_1 = require_ClassVisitor();
var ExportVisitor_1 = require_ExportVisitor();
var ImportVisitor_1 = require_ImportVisitor();
var PatternVisitor_1 = require_PatternVisitor();
var Reference_1 = require_Reference();
var TypeVisitor_1 = require_TypeVisitor();
var Visitor_1 = require_Visitor();
var Referencer = class extends Visitor_1.Visitor {
constructor(options, scopeManager) {
super(options);
_Referencer_jsxPragma.set(this, void 0);
_Referencer_jsxFragmentName.set(this, void 0);
_Referencer_hasReferencedJsxFactory.set(this, false);
_Referencer_hasReferencedJsxFragmentFactory.set(this, false);
_Referencer_lib.set(this, void 0);
_Referencer_emitDecoratorMetadata.set(this, void 0);
this.scopeManager = scopeManager;
__classPrivateFieldSet2(this, _Referencer_jsxPragma, options.jsxPragma, "f");
__classPrivateFieldSet2(this, _Referencer_jsxFragmentName, options.jsxFragmentName, "f");
__classPrivateFieldSet2(this, _Referencer_lib, options.lib, "f");
__classPrivateFieldSet2(this, _Referencer_emitDecoratorMetadata, options.emitDecoratorMetadata, "f");
}
currentScope(dontThrowOnNull) {
if (!dontThrowOnNull) {
(0, assert_1.assert)(this.scopeManager.currentScope, "aaa");
}
return this.scopeManager.currentScope;
}
close(node2) {
while (this.currentScope(true) && node2 === this.currentScope().block) {
this.scopeManager.currentScope = this.currentScope().close(this.scopeManager);
}
}
referencingDefaultValue(pattern, assignments, maybeImplicitGlobal, init) {
assignments.forEach((assignment) => {
this.currentScope().referenceValue(pattern, Reference_1.ReferenceFlag.Write, assignment.right, maybeImplicitGlobal, init);
});
}
populateGlobalsFromLib(globalScope) {
for (const lib of __classPrivateFieldGet2(this, _Referencer_lib, "f")) {
const variables = lib_1.lib[lib];
if (!variables) {
throw new Error(`Invalid value for lib provided: ${lib}`);
}
for (const [name, variable] of Object.entries(variables)) {
globalScope.defineImplicitVariable(name, variable);
}
}
globalScope.defineImplicitVariable("const", {
eslintImplicitGlobalSetting: "readonly",
isTypeVariable: true,
isValueVariable: false
});
}
/**
* Searches for a variable named "name" in the upper scopes and adds a pseudo-reference from itself to itself
*/
referenceInSomeUpperScope(name) {
let scope = this.scopeManager.currentScope;
while (scope) {
const variable = scope.set.get(name);
if (!variable) {
scope = scope.upper;
continue;
}
scope.referenceValue(variable.identifiers[0]);
return true;
}
return false;
}
referenceJsxPragma() {
if (__classPrivateFieldGet2(this, _Referencer_jsxPragma, "f") == null || __classPrivateFieldGet2(this, _Referencer_hasReferencedJsxFactory, "f")) {
return;
}
__classPrivateFieldSet2(this, _Referencer_hasReferencedJsxFactory, this.referenceInSomeUpperScope(__classPrivateFieldGet2(this, _Referencer_jsxPragma, "f")), "f");
}
referenceJsxFragment() {
if (__classPrivateFieldGet2(this, _Referencer_jsxFragmentName, "f") == null || __classPrivateFieldGet2(this, _Referencer_hasReferencedJsxFragmentFactory, "f")) {
return;
}
__classPrivateFieldSet2(this, _Referencer_hasReferencedJsxFragmentFactory, this.referenceInSomeUpperScope(__classPrivateFieldGet2(this, _Referencer_jsxFragmentName, "f")), "f");
}
///////////////////
// Visit helpers //
///////////////////
visitClass(node2) {
ClassVisitor_1.ClassVisitor.visit(this, node2, __classPrivateFieldGet2(this, _Referencer_emitDecoratorMetadata, "f"));
}
visitForIn(node2) {
if (node2.left.type === types_1.AST_NODE_TYPES.VariableDeclaration && node2.left.kind !== "var") {
this.scopeManager.nestForScope(node2);
}
if (node2.left.type === types_1.AST_NODE_TYPES.VariableDeclaration) {
this.visit(node2.left);
this.visitPattern(node2.left.declarations[0].id, (pattern) => {
this.currentScope().referenceValue(pattern, Reference_1.ReferenceFlag.Write, node2.right, null, true);
});
} else {
this.visitPattern(node2.left, (pattern, info) => {
const maybeImplicitGlobal = !this.currentScope().isStrict ? {
pattern,
node: node2
} : null;
this.referencingDefaultValue(pattern, info.assignments, maybeImplicitGlobal, false);
this.currentScope().referenceValue(pattern, Reference_1.ReferenceFlag.Write, node2.right, maybeImplicitGlobal, false);
}, { processRightHandNodes: true });
}
this.visit(node2.right);
this.visit(node2.body);
this.close(node2);
}
visitFunctionParameterTypeAnnotation(node2) {
if ("typeAnnotation" in node2) {
this.visitType(node2.typeAnnotation);
} else if (node2.type === types_1.AST_NODE_TYPES.AssignmentPattern) {
this.visitType(node2.left.typeAnnotation);
} else if (node2.type === types_1.AST_NODE_TYPES.TSParameterProperty) {
this.visitFunctionParameterTypeAnnotation(node2.parameter);
}
}
visitFunction(node2) {
var _a;
if (node2.type === types_1.AST_NODE_TYPES.FunctionExpression) {
if (node2.id) {
this.scopeManager.nestFunctionExpressionNameScope(node2);
}
} else if (node2.id) {
this.currentScope().defineIdentifier(node2.id, new definition_1.FunctionNameDefinition(node2.id, node2));
}
this.scopeManager.nestFunctionScope(node2, false);
for (const param of node2.params) {
this.visitPattern(param, (pattern, info) => {
this.currentScope().defineIdentifier(pattern, new definition_1.ParameterDefinition(pattern, node2, info.rest));
this.referencingDefaultValue(pattern, info.assignments, null, true);
}, { processRightHandNodes: true });
this.visitFunctionParameterTypeAnnotation(param);
(_a = param.decorators) === null || _a === void 0 ? void 0 : _a.forEach((d) => this.visit(d));
}
this.visitType(node2.returnType);
this.visitType(node2.typeParameters);
if (node2.body) {
if (node2.body.type === types_1.AST_NODE_TYPES.BlockStatement) {
this.visitChildren(node2.body);
} else {
this.visit(node2.body);
}
}
this.close(node2);
}
visitProperty(node2) {
if (node2.computed) {
this.visit(node2.key);
}
this.visit(node2.value);
}
visitType(node2) {
if (!node2) {
return;
}
TypeVisitor_1.TypeVisitor.visit(this, node2);
}
visitTypeAssertion(node2) {
this.visit(node2.expression);
this.visitType(node2.typeAnnotation);
}
/////////////////////
// Visit selectors //
/////////////////////
ArrowFunctionExpression(node2) {
this.visitFunction(node2);
}
AssignmentExpression(node2) {
let left = node2.left;
switch (left.type) {
case types_1.AST_NODE_TYPES.TSAsExpression:
case types_1.AST_NODE_TYPES.TSTypeAssertion:
this.visitType(left.typeAnnotation);
case types_1.AST_NODE_TYPES.TSNonNullExpression:
left = left.expression;
}
if (PatternVisitor_1.PatternVisitor.isPattern(left)) {
if (node2.operator === "=") {
this.visitPattern(left, (pattern, info) => {
const maybeImplicitGlobal = !this.currentScope().isStrict ? {
pattern,
node: node2
} : null;
this.referencingDefaultValue(pattern, info.assignments, maybeImplicitGlobal, false);
this.currentScope().referenceValue(pattern, Reference_1.ReferenceFlag.Write, node2.right, maybeImplicitGlobal, false);
}, { processRightHandNodes: true });
} else if (left.type === types_1.AST_NODE_TYPES.Identifier) {
this.currentScope().referenceValue(left, Reference_1.ReferenceFlag.ReadWrite, node2.right);
}
} else {
this.visit(left);
}
this.visit(node2.right);
}
BlockStatement(node2) {
if (this.scopeManager.isES6()) {
this.scopeManager.nestBlockScope(node2);
}
this.visitChildren(node2);
this.close(node2);
}
BreakStatement() {
}
CallExpression(node2) {
this.visitChildren(node2, ["typeParameters"]);
this.visitType(node2.typeParameters);
}
CatchClause(node2) {
this.scopeManager.nestCatchScope(node2);
if (node2.param) {
const param = node2.param;
this.visitPattern(param, (pattern, info) => {
this.currentScope().defineIdentifier(pattern, new definition_1.CatchClauseDefinition(param, node2));
this.referencingDefaultValue(pattern, info.assignments, null, true);
}, { processRightHandNodes: true });
}
this.visit(node2.body);
this.close(node2);
}
ClassExpression(node2) {
this.visitClass(node2);
}
ClassDeclaration(node2) {
this.visitClass(node2);
}
ContinueStatement() {
}
ExportAllDeclaration() {
}
ExportDefaultDeclaration(node2) {
if (node2.declaration.type === types_1.AST_NODE_TYPES.Identifier) {
ExportVisitor_1.ExportVisitor.visit(this, node2);
} else {
this.visit(node2.declaration);
}
}
ExportNamedDeclaration(node2) {
if (node2.declaration) {
this.visit(node2.declaration);
} else {
ExportVisitor_1.ExportVisitor.visit(this, node2);
}
}
ForInStatement(node2) {
this.visitForIn(node2);
}
ForOfStatement(node2) {
this.visitForIn(node2);
}
ForStatement(node2) {
if (node2.init && node2.init.type === types_1.AST_NODE_TYPES.VariableDeclaration && node2.init.kind !== "var") {
this.scopeManager.nestForScope(node2);
}
this.visitChildren(node2);
this.close(node2);
}
FunctionDeclaration(node2) {
this.visitFunction(node2);
}
FunctionExpression(node2) {
this.visitFunction(node2);
}
Identifier(node2) {
this.currentScope().referenceValue(node2);
this.visitType(node2.typeAnnotation);
}
ImportDeclaration(node2) {
(0, assert_1.assert)(this.scopeManager.isES6() && this.scopeManager.isModule(), "ImportDeclaration should appear when the mode is ES6 and in the module context.");
ImportVisitor_1.ImportVisitor.visit(this, node2);
}
JSXAttribute(node2) {
this.visit(node2.value);
}
JSXClosingElement() {
}
JSXFragment(node2) {
this.referenceJsxPragma();
this.referenceJsxFragment();
this.visitChildren(node2);
}
JSXIdentifier(node2) {
this.currentScope().referenceValue(node2);
}
JSXMemberExpression(node2) {
if (node2.object.type !== types_1.AST_NODE_TYPES.JSXIdentifier) {
this.visit(node2.object);
} else {
if (node2.object.name !== "this") {
this.visit(node2.object);
}
}
}
JSXOpeningElement(node2) {
this.referenceJsxPragma();
if (node2.name.type === types_1.AST_NODE_TYPES.JSXIdentifier) {
if (node2.name.name[0].toUpperCase() === node2.name.name[0] || node2.name.name === "this") {
this.visit(node2.name);
}
} else {
this.visit(node2.name);
}
this.visitType(node2.typeParameters);
for (const attr of node2.attributes) {
this.visit(attr);
}
}
LabeledStatement(node2) {
this.visit(node2.body);
}
MemberExpression(node2) {
this.visit(node2.object);
if (node2.computed) {
this.visit(node2.property);
}
}
MetaProperty() {
}
NewExpression(node2) {
this.visitChildren(node2, ["typeParameters"]);
this.visitType(node2.typeParameters);
}
PrivateIdentifier() {
}
Program(node2) {
const globalScope = this.scopeManager.nestGlobalScope(node2);
this.populateGlobalsFromLib(globalScope);
if (this.scopeManager.isGlobalReturn()) {
this.currentScope().isStrict = false;
this.scopeManager.nestFunctionScope(node2, false);
}
if (this.scopeManager.isES6() && this.scopeManager.isModule()) {
this.scopeManager.nestModuleScope(node2);
}
if (this.scopeManager.isStrictModeSupported() && this.scopeManager.isImpliedStrict()) {
this.currentScope().isStrict = true;
}
this.visitChildren(node2);
this.close(node2);
}
Property(node2) {
this.visitProperty(node2);
}
SwitchStatement(node2) {
this.visit(node2.discriminant);
if (this.scopeManager.isES6()) {
this.scopeManager.nestSwitchScope(node2);
}
for (const switchCase of node2.cases) {
this.visit(switchCase);
}
this.close(node2);
}
TaggedTemplateExpression(node2) {
this.visit(node2.tag);
this.visit(node2.quasi);
this.visitType(node2.typeParameters);
}
TSAsExpression(node2) {
this.visitTypeAssertion(node2);
}
TSDeclareFunction(node2) {
this.visitFunction(node2);
}
TSImportEqualsDeclaration(node2) {
this.currentScope().defineIdentifier(node2.id, new definition_1.ImportBindingDefinition(node2.id, node2, node2));
if (node2.moduleReference.type === types_1.AST_NODE_TYPES.TSQualifiedName) {
this.visit(node2.moduleReference.left);
} else {
this.visit(node2.moduleReference);
}
}
TSEmptyBodyFunctionExpression(node2) {
this.visitFunction(node2);
}
TSEnumDeclaration(node2) {
this.currentScope().defineIdentifier(node2.id, new definition_1.TSEnumNameDefinition(node2.id, node2));
this.scopeManager.nestTSEnumScope(node2);
this.currentScope().defineIdentifier(node2.id, new definition_1.TSEnumNameDefinition(node2.id, node2));
for (const member of node2.members) {
if (member.id.type === types_1.AST_NODE_TYPES.Literal && typeof member.id.value === "string") {
const name = member.id;
this.currentScope().defineLiteralIdentifier(name, new definition_1.TSEnumMemberDefinition(name, member));
} else if (!member.computed && member.id.type === types_1.AST_NODE_TYPES.Identifier) {
this.currentScope().defineIdentifier(member.id, new definition_1.TSEnumMemberDefinition(member.id, member));
}
this.visit(member.initializer);
}
this.close(node2);
}
TSInstantiationExpression(node2) {
this.visitChildren(node2, ["typeParameters"]);
this.visitType(node2.typeParameters);
}
TSInterfaceDeclaration(node2) {
this.visitType(node2);
}
TSModuleDeclaration(node2) {
if (node2.id.type === types_1.AST_NODE_TYPES.Identifier && !node2.global) {
this.currentScope().defineIdentifier(node2.id, new definition_1.TSModuleNameDefinition(node2.id, node2));
}
this.scopeManager.nestTSModuleScope(node2);
this.visit(node2.body);
this.close(node2);
}
TSSatisfiesExpression(node2) {
this.visitTypeAssertion(node2);
}
TSTypeAliasDeclaration(node2) {
this.visitType(node2);
}
TSTypeAssertion(node2) {
this.visitTypeAssertion(node2);
}
UpdateExpression(node2) {
if (PatternVisitor_1.PatternVisitor.isPattern(node2.argument)) {
this.visitPattern(node2.argument, (pattern) => {
this.currentScope().referenceValue(pattern, Reference_1.ReferenceFlag.ReadWrite, null);
});
} else {
this.visitChildren(node2);
}
}
VariableDeclaration(node2) {
const variableTargetScope = node2.kind === "var" ? this.currentScope().variableScope : this.currentScope();
for (const decl of node2.declarations) {
const init = decl.init;
this.visitPattern(decl.id, (pattern, info) => {
variableTargetScope.defineIdentifier(pattern, new definition_1.VariableDefinition(pattern, decl, node2));
this.referencingDefaultValue(pattern, info.assignments, null, true);
if (init) {
this.currentScope().referenceValue(pattern, Reference_1.ReferenceFlag.Write, init, null, true);
}
}, { processRightHandNodes: true });
if (decl.init) {
this.visit(decl.init);
}
if ("typeAnnotation" in decl.id) {
this.visitType(decl.id.typeAnnotation);
}
}
}
WithStatement(node2) {
this.visit(node2.object);
this.scopeManager.nestWithScope(node2);
this.visit(node2.body);
this.close(node2);
}
ImportAttribute() {
}
};
exports.Referencer = Referencer;
_Referencer_jsxPragma = /* @__PURE__ */ new WeakMap(), _Referencer_jsxFragmentName = /* @__PURE__ */ new WeakMap(), _Referencer_hasReferencedJsxFactory = /* @__PURE__ */ new WeakMap(), _Referencer_hasReferencedJsxFragmentFactory = /* @__PURE__ */ new WeakMap(), _Referencer_lib = /* @__PURE__ */ new WeakMap(), _Referencer_emitDecoratorMetadata = /* @__PURE__ */ new WeakMap();
}
});
// ../../node_modules/.pnpm/@typescript-eslint+scope-manager@5.62.0/node_modules/@typescript-eslint/scope-manager/dist/referencer/index.js
var require_referencer = __commonJS({
"../../node_modules/.pnpm/@typescript-eslint+scope-manager@5.62.0/node_modules/@typescript-eslint/scope-manager/dist/referencer/index.js"(exports) {
"use strict";
init_shims();
Object.defineProperty(exports, "__esModule", { value: true });
exports.Referencer = void 0;
var Referencer_1 = require_Referencer();
Object.defineProperty(exports, "Referencer", { enumerable: true, get: function() {
return Referencer_1.Referencer;
} });
}
});
// ../../node_modules/.pnpm/@typescript-eslint+scope-manager@5.62.0/node_modules/@typescript-eslint/scope-manager/dist/scope/ClassStaticBlockScope.js
var require_ClassStaticBlockScope = __commonJS({
"../../node_modules/.pnpm/@typescript-eslint+scope-manager@5.62.0/node_modules/@typescript-eslint/scope-manager/dist/scope/ClassStaticBlockScope.js"(exports) {
"use strict";
init_shims();
Object.defineProperty(exports, "__esModule", { value: true });
exports.ClassStaticBlockScope = void 0;
var ScopeBase_1 = require_ScopeBase();
var ScopeType_1 = require_ScopeType();
var ClassStaticBlockScope = class extends ScopeBase_1.ScopeBase {
constructor(scopeManager, upperScope, block) {
super(scopeManager, ScopeType_1.ScopeType.classStaticBlock, upperScope, block, false);
}
};
exports.ClassStaticBlockScope = ClassStaticBlockScope;
}
});
// ../../node_modules/.pnpm/@typescript-eslint+scope-manager@5.62.0/node_modules/@typescript-eslint/scope-manager/dist/ScopeManager.js
var require_ScopeManager = __commonJS({
"../../node_modules/.pnpm/@typescript-eslint+scope-manager@5.62.0/node_modules/@typescript-eslint/scope-manager/dist/ScopeManager.js"(exports) {
"use strict";
init_shims();
var __classPrivateFieldSet2 = exports && exports.__classPrivateFieldSet || function(receiver, state, value, kind, f) {
if (kind === "m") throw new TypeError("Private method is not writable");
if (kind === "a" && !f) throw new TypeError("Private accessor was defined without a setter");
if (typeof state === "function" ? receiver !== state || !f : !state.has(receiver)) throw new TypeError("Cannot write private member to an object whose class did not declare it");
return kind === "a" ? f.call(receiver, value) : f ? f.value = value : state.set(receiver, value), value;
};
var __classPrivateFieldGet2 = exports && exports.__classPrivateFieldGet || function(receiver, state, kind, f) {
if (kind === "a" && !f) throw new TypeError("Private accessor was defined without a getter");
if (typeof state === "function" ? receiver !== state || !f : !state.has(receiver)) throw new TypeError("Cannot read private member from an object whose class did not declare it");
return kind === "m" ? f : kind === "a" ? f.call(receiver) : f ? f.value : state.get(receiver);
};
var _ScopeManager_options;
Object.defineProperty(exports, "__esModule", { value: true });
exports.ScopeManager = void 0;
var assert_1 = require_assert();
var scope_1 = require_scope();
var ClassFieldInitializerScope_1 = require_ClassFieldInitializerScope();
var ClassStaticBlockScope_1 = require_ClassStaticBlockScope();
var ScopeManager = class {
get variables() {
const variables = /* @__PURE__ */ new Set();
function recurse(scope) {
scope.variables.forEach((v) => variables.add(v));
scope.childScopes.forEach(recurse);
}
this.scopes.forEach(recurse);
return Array.from(variables).sort((a, b) => a.$id - b.$id);
}
constructor(options) {
_ScopeManager_options.set(this, void 0);
this.scopes = [];
this.globalScope = null;
this.nodeToScope = /* @__PURE__ */ new WeakMap();
this.currentScope = null;
__classPrivateFieldSet2(this, _ScopeManager_options, options, "f");
this.declaredVariables = /* @__PURE__ */ new WeakMap();
}
isGlobalReturn() {
return __classPrivateFieldGet2(this, _ScopeManager_options, "f").globalReturn === true;
}
isModule() {
return __classPrivateFieldGet2(this, _ScopeManager_options, "f").sourceType === "module";
}
isImpliedStrict() {
return __classPrivateFieldGet2(this, _ScopeManager_options, "f").impliedStrict === true;
}
isStrictModeSupported() {
return __classPrivateFieldGet2(this, _ScopeManager_options, "f").ecmaVersion != null && __classPrivateFieldGet2(this, _ScopeManager_options, "f").ecmaVersion >= 5;
}
isES6() {
return __classPrivateFieldGet2(this, _ScopeManager_options, "f").ecmaVersion != null && __classPrivateFieldGet2(this, _ScopeManager_options, "f").ecmaVersion >= 6;
}
/**
* Get the variables that a given AST node defines. The gotten variables' `def[].node`/`def[].parent` property is the node.
* If the node does not define any variable, this returns an empty array.
* @param node An AST node to get their variables.
* @public
*/
getDeclaredVariables(node2) {
var _a;
return (_a = this.declaredVariables.get(node2)) !== null && _a !== void 0 ? _a : [];
}
/**
* Get the scope of a given AST node. The gotten scope's `block` property is the node.
* This method never returns `function-expression-name` scope. If the node does not have their scope, this returns `null`.
*
* @param node An AST node to get their scope.
* @param inner If the node has multiple scopes, this returns the outermost scope normally.
* If `inner` is `true` then this returns the innermost scope.
* @public
*/
acquire(node2, inner = false) {
var _a;
function predicate(testScope) {
if (testScope.type === "function" && testScope.functionExpressionScope) {
return false;
}
return true;
}
const scopes = this.nodeToScope.get(node2);
if (!scopes || scopes.length === 0) {
return null;
}
if (scopes.length === 1) {
return scopes[0];
}
if (inner) {
for (let i = scopes.length - 1; i >= 0; --i) {
const scope = scopes[i];
if (predicate(scope)) {
return scope;
}
}
return null;
}
return (_a = scopes.find(predicate)) !== null && _a !== void 0 ? _a : null;
}
nestScope(scope) {
if (scope instanceof scope_1.GlobalScope) {
(0, assert_1.assert)(this.currentScope == null);
this.globalScope = scope;
}
this.currentScope = scope;
return scope;
}
nestBlockScope(node2) {
(0, assert_1.assert)(this.currentScope);
return this.nestScope(new scope_1.BlockScope(this, this.currentScope, node2));
}
nestCatchScope(node2) {
(0, assert_1.assert)(this.currentScope);
return this.nestScope(new scope_1.CatchScope(this, this.currentScope, node2));
}
nestClassScope(node2) {
(0, assert_1.assert)(this.currentScope);
return this.nestScope(new scope_1.ClassScope(this, this.currentScope, node2));
}
nestClassFieldInitializerScope(node2) {
(0, assert_1.assert)(this.currentScope);
return this.nestScope(new ClassFieldInitializerScope_1.ClassFieldInitializerScope(this, this.currentScope, node2));
}
nestClassStaticBlockScope(node2) {
(0, assert_1.assert)(this.currentScope);
return this.nestScope(new ClassStaticBlockScope_1.ClassStaticBlockScope(this, this.currentScope, node2));
}
nestConditionalTypeScope(node2) {
(0, assert_1.assert)(this.currentScope);
return this.nestScope(new scope_1.ConditionalTypeScope(this, this.currentScope, node2));
}
nestForScope(node2) {
(0, assert_1.assert)(this.currentScope);
return this.nestScope(new scope_1.ForScope(this, this.currentScope, node2));
}
nestFunctionExpressionNameScope(node2) {
(0, assert_1.assert)(this.currentScope);
return this.nestScope(new scope_1.FunctionExpressionNameScope(this, this.currentScope, node2));
}
nestFunctionScope(node2, isMethodDefinition) {
(0, assert_1.assert)(this.currentScope);
return this.nestScope(new scope_1.FunctionScope(this, this.currentScope, node2, isMethodDefinition));
}
nestFunctionTypeScope(node2) {
(0, assert_1.assert)(this.currentScope);
return this.nestScope(new scope_1.FunctionTypeScope(this, this.currentScope, node2));
}
nestGlobalScope(node2) {
return this.nestScope(new scope_1.GlobalScope(this, node2));
}
nestMappedTypeScope(node2) {
(0, assert_1.assert)(this.currentScope);
return this.nestScope(new scope_1.MappedTypeScope(this, this.currentScope, node2));
}
nestModuleScope(node2) {
(0, assert_1.assert)(this.currentScope);
return this.nestScope(new scope_1.ModuleScope(this, this.currentScope, node2));
}
nestSwitchScope(node2) {
(0, assert_1.assert)(this.currentScope);
return this.nestScope(new scope_1.SwitchScope(this, this.currentScope, node2));
}
nestTSEnumScope(node2) {
(0, assert_1.assert)(this.currentScope);
return this.nestScope(new scope_1.TSEnumScope(this, this.currentScope, node2));
}
nestTSModuleScope(node2) {
(0, assert_1.assert)(this.currentScope);
return this.nestScope(new scope_1.TSModuleScope(this, this.currentScope, node2));
}
nestTypeScope(node2) {
(0, assert_1.assert)(this.currentScope);
return this.nestScope(new scope_1.TypeScope(this, this.currentScope, node2));
}
nestWithScope(node2) {
(0, assert_1.assert)(this.currentScope);
return this.nestScope(new scope_1.WithScope(this, this.currentScope, node2));
}
};
exports.ScopeManager = ScopeManager;
_ScopeManager_options = /* @__PURE__ */ new WeakMap();
}
});
// ../../node_modules/.pnpm/@typescript-eslint+scope-manager@5.62.0/node_modules/@typescript-eslint/scope-manager/dist/analyze.js
var require_analyze = __commonJS({
"../../node_modules/.pnpm/@typescript-eslint+scope-manager@5.62.0/node_modules/@typescript-eslint/scope-manager/dist/analyze.js"(exports) {
"use strict";
init_shims();
Object.defineProperty(exports, "__esModule", { value: true });
exports.analyze = void 0;
var visitor_keys_1 = require_dist3();
var lib_1 = require_lib3();
var referencer_1 = require_referencer();
var ScopeManager_1 = require_ScopeManager();
var DEFAULT_OPTIONS = {
childVisitorKeys: visitor_keys_1.visitorKeys,
ecmaVersion: 2018,
globalReturn: false,
impliedStrict: false,
jsxPragma: "React",
jsxFragmentName: null,
lib: ["es2018"],
sourceType: "script",
emitDecoratorMetadata: false
};
function mapEcmaVersion(version) {
if (version == null || version === 3 || version === 5) {
return "es5";
}
const year = version > 2e3 ? version : 2015 + (version - 6);
const lib = `es${year}`;
return lib in lib_1.lib ? lib : year > 2020 ? "esnext" : "es5";
}
function analyze(tree, providedOptions) {
var _a, _b, _c, _d, _e, _f, _g, _h;
const ecmaVersion = (_a = providedOptions === null || providedOptions === void 0 ? void 0 : providedOptions.ecmaVersion) !== null && _a !== void 0 ? _a : DEFAULT_OPTIONS.ecmaVersion;
const options = {
childVisitorKeys: (_b = providedOptions === null || providedOptions === void 0 ? void 0 : providedOptions.childVisitorKeys) !== null && _b !== void 0 ? _b : DEFAULT_OPTIONS.childVisitorKeys,
ecmaVersion,
globalReturn: (_c = providedOptions === null || providedOptions === void 0 ? void 0 : providedOptions.globalReturn) !== null && _c !== void 0 ? _c : DEFAULT_OPTIONS.globalReturn,
impliedStrict: (_d = providedOptions === null || providedOptions === void 0 ? void 0 : providedOptions.impliedStrict) !== null && _d !== void 0 ? _d : DEFAULT_OPTIONS.impliedStrict,
jsxPragma: (providedOptions === null || providedOptions === void 0 ? void 0 : providedOptions.jsxPragma) === void 0 ? DEFAULT_OPTIONS.jsxPragma : providedOptions.jsxPragma,
jsxFragmentName: (_e = providedOptions === null || providedOptions === void 0 ? void 0 : providedOptions.jsxFragmentName) !== null && _e !== void 0 ? _e : DEFAULT_OPTIONS.jsxFragmentName,
sourceType: (_f = providedOptions === null || providedOptions === void 0 ? void 0 : providedOptions.sourceType) !== null && _f !== void 0 ? _f : DEFAULT_OPTIONS.sourceType,
lib: (_g = providedOptions === null || providedOptions === void 0 ? void 0 : providedOptions.lib) !== null && _g !== void 0 ? _g : [mapEcmaVersion(ecmaVersion)],
emitDecoratorMetadata: (_h = providedOptions === null || providedOptions === void 0 ? void 0 : providedOptions.emitDecoratorMetadata) !== null && _h !== void 0 ? _h : DEFAULT_OPTIONS.emitDecoratorMetadata
};
options.lib = options.lib.map((l) => l.toLowerCase());
const scopeManager = new ScopeManager_1.ScopeManager(options);
const referencer = new referencer_1.Referencer(options, scopeManager);
referencer.visit(tree);
return scopeManager;
}
exports.analyze = analyze;
}
});
// ../../node_modules/.pnpm/@typescript-eslint+scope-manager@5.62.0/node_modules/@typescript-eslint/scope-manager/dist/index.js
var require_dist4 = __commonJS({
"../../node_modules/.pnpm/@typescript-eslint+scope-manager@5.62.0/node_modules/@typescript-eslint/scope-manager/dist/index.js"(exports) {
"use strict";
init_shims();
var __createBinding2 = exports && exports.__createBinding || (Object.create ? function(o, m, k, k2) {
if (k2 === void 0) k2 = k;
var desc = Object.getOwnPropertyDescriptor(m, k);
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
desc = { enumerable: true, get: function() {
return m[k];
} };
}
Object.defineProperty(o, k2, desc);
} : function(o, m, k, k2) {
if (k2 === void 0) k2 = k;
o[k2] = m[k];
});
var __exportStar2 = exports && exports.__exportStar || function(m, exports2) {
for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports2, p)) __createBinding2(exports2, m, p);
};
Object.defineProperty(exports, "__esModule", { value: true });
exports.ScopeManager = exports.PatternVisitor = exports.Visitor = exports.Reference = exports.analyze = void 0;
var analyze_1 = require_analyze();
Object.defineProperty(exports, "analyze", { enumerable: true, get: function() {
return analyze_1.analyze;
} });
__exportStar2(require_definition(), exports);
var Reference_1 = require_Reference();
Object.defineProperty(exports, "Reference", { enumerable: true, get: function() {
return Reference_1.Reference;
} });
var Visitor_1 = require_Visitor();
Object.defineProperty(exports, "Visitor", { enumerable: true, get: function() {
return Visitor_1.Visitor;
} });
var PatternVisitor_1 = require_PatternVisitor();
Object.defineProperty(exports, "PatternVisitor", { enumerable: true, get: function() {
return PatternVisitor_1.PatternVisitor;
} });
__exportStar2(require_scope(), exports);
var ScopeManager_1 = require_ScopeManager();
Object.defineProperty(exports, "ScopeManager", { enumerable: true, get: function() {
return ScopeManager_1.ScopeManager;
} });
__exportStar2(require_variable(), exports);
}
});
// ../../node_modules/.pnpm/@typescript-eslint+utils@5.62.0_eslint@9.4.0_typescript@5.4.5/node_modules/@typescript-eslint/utils/dist/ts-eslint/Scope.js
var require_Scope2 = __commonJS({
"../../node_modules/.pnpm/@typescript-eslint+utils@5.62.0_eslint@9.4.0_typescript@5.4.5/node_modules/@typescript-eslint/utils/dist/ts-eslint/Scope.js"(exports) {
"use strict";
init_shims();
var __createBinding2 = exports && exports.__createBinding || (Object.create ? function(o, m, k, k2) {
if (k2 === void 0) k2 = k;
var desc = Object.getOwnPropertyDescriptor(m, k);
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
desc = { enumerable: true, get: function() {
return m[k];
} };
}
Object.defineProperty(o, k2, desc);
} : function(o, m, k, k2) {
if (k2 === void 0) k2 = k;
o[k2] = m[k];
});
var __setModuleDefault2 = exports && exports.__setModuleDefault || (Object.create ? function(o, v) {
Object.defineProperty(o, "default", { enumerable: true, value: v });
} : function(o, v) {
o["default"] = v;
});
var __importStar2 = exports && exports.__importStar || function(mod) {
if (mod && mod.__esModule) return mod;
var result = {};
if (mod != null) {
for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding2(result, mod, k);
}
__setModuleDefault2(result, mod);
return result;
};
Object.defineProperty(exports, "__esModule", { value: true });
exports.Scope = void 0;
var scopeManager = __importStar2(require_dist4());
var Scope;
(function(Scope2) {
Scope2.ScopeType = scopeManager.ScopeType;
Scope2.DefinitionType = scopeManager.DefinitionType;
})(Scope || (exports.Scope = Scope = {}));
}
});
// ../../node_modules/.pnpm/@typescript-eslint+utils@5.62.0_eslint@9.4.0_typescript@5.4.5/node_modules/@typescript-eslint/utils/dist/ts-eslint/SourceCode.js
var require_SourceCode = __commonJS({
"../../node_modules/.pnpm/@typescript-eslint+utils@5.62.0_eslint@9.4.0_typescript@5.4.5/node_modules/@typescript-eslint/utils/dist/ts-eslint/SourceCode.js"(exports) {
"use strict";
init_shims();
Object.defineProperty(exports, "__esModule", { value: true });
exports.SourceCode = void 0;
var eslint_1 = __require("eslint");
var SourceCode = class extends eslint_1.SourceCode {
};
exports.SourceCode = SourceCode;
}
});
// ../../node_modules/.pnpm/@typescript-eslint+utils@5.62.0_eslint@9.4.0_typescript@5.4.5/node_modules/@typescript-eslint/utils/dist/ts-eslint/index.js
var require_ts_eslint = __commonJS({
"../../node_modules/.pnpm/@typescript-eslint+utils@5.62.0_eslint@9.4.0_typescript@5.4.5/node_modules/@typescript-eslint/utils/dist/ts-eslint/index.js"(exports) {
"use strict";
init_shims();
var __createBinding2 = exports && exports.__createBinding || (Object.create ? function(o, m, k, k2) {
if (k2 === void 0) k2 = k;
var desc = Object.getOwnPropertyDescriptor(m, k);
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
desc = { enumerable: true, get: function() {
return m[k];
} };
}
Object.defineProperty(o, k2, desc);
} : function(o, m, k, k2) {
if (k2 === void 0) k2 = k;
o[k2] = m[k];
});
var __exportStar2 = exports && exports.__exportStar || function(m, exports2) {
for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports2, p)) __createBinding2(exports2, m, p);
};
Object.defineProperty(exports, "__esModule", { value: true });
__exportStar2(require_AST(), exports);
__exportStar2(require_CLIEngine(), exports);
__exportStar2(require_ESLint(), exports);
__exportStar2(require_Linter(), exports);
__exportStar2(require_ParserOptions(), exports);
__exportStar2(require_Rule(), exports);
__exportStar2(require_RuleTester(), exports);
__exportStar2(require_Scope2(), exports);
__exportStar2(require_SourceCode(), exports);
}
});
// ../../node_modules/.pnpm/estraverse@4.3.0/node_modules/estraverse/package.json
var require_package = __commonJS({
"../../node_modules/.pnpm/estraverse@4.3.0/node_modules/estraverse/package.json"(exports, module) {
module.exports = {
name: "estraverse",
description: "ECMAScript JS AST traversal functions",
homepage: "https://github.com/estools/estraverse",
main: "estraverse.js",
version: "4.3.0",
engines: {
node: ">=4.0"
},
maintainers: [
{
name: "Yusuke Suzuki",
email: "utatane.tea@gmail.com",
web: "http://github.com/Constellation"
}
],
repository: {
type: "git",
url: "http://github.com/estools/estraverse.git"
},
devDependencies: {
"babel-preset-env": "^1.6.1",
"babel-register": "^6.3.13",
chai: "^2.1.1",
espree: "^1.11.0",
gulp: "^3.8.10",
"gulp-bump": "^0.2.2",
"gulp-filter": "^2.0.0",
"gulp-git": "^1.0.1",
"gulp-tag-version": "^1.3.0",
jshint: "^2.5.6",
mocha: "^2.1.0"
},
license: "BSD-2-Clause",
scripts: {
test: "npm run-script lint && npm run-script unit-test",
lint: "jshint estraverse.js",
"unit-test": "mocha --compilers js:babel-register"
}
};
}
});
// ../../node_modules/.pnpm/estraverse@4.3.0/node_modules/estraverse/estraverse.js
var require_estraverse = __commonJS({
"../../node_modules/.pnpm/estraverse@4.3.0/node_modules/estraverse/estraverse.js"(exports) {
"use strict";
init_shims();
(function clone(exports2) {
"use strict";
var Syntax, VisitorOption, VisitorKeys, BREAK, SKIP, REMOVE;
function deepCopy(obj) {
var ret = {}, key, val;
for (key in obj) {
if (obj.hasOwnProperty(key)) {
val = obj[key];
if (typeof val === "object" && val !== null) {
ret[key] = deepCopy(val);
} else {
ret[key] = val;
}
}
}
return ret;
}
function upperBound(array, func) {
var diff, len, i, current;
len = array.length;
i = 0;
while (len) {
diff = len >>> 1;
current = i + diff;
if (func(array[current])) {
len = diff;
} else {
i = current + 1;
len -= diff + 1;
}
}
return i;
}
Syntax = {
AssignmentExpression: "AssignmentExpression",
AssignmentPattern: "AssignmentPattern",
ArrayExpression: "ArrayExpression",
ArrayPattern: "ArrayPattern",
ArrowFunctionExpression: "ArrowFunctionExpression",
AwaitExpression: "AwaitExpression",
// CAUTION: It's deferred to ES7.
BlockStatement: "BlockStatement",
BinaryExpression: "BinaryExpression",
BreakStatement: "BreakStatement",
CallExpression: "CallExpression",
CatchClause: "CatchClause",
ClassBody: "ClassBody",
ClassDeclaration: "ClassDeclaration",
ClassExpression: "ClassExpression",
ComprehensionBlock: "ComprehensionBlock",
// CAUTION: It's deferred to ES7.
ComprehensionExpression: "ComprehensionExpression",
// CAUTION: It's deferred to ES7.
ConditionalExpression: "ConditionalExpression",
ContinueStatement: "ContinueStatement",
DebuggerStatement: "DebuggerStatement",
DirectiveStatement: "DirectiveStatement",
DoWhileStatement: "DoWhileStatement",
EmptyStatement: "EmptyStatement",
ExportAllDeclaration: "ExportAllDeclaration",
ExportDefaultDeclaration: "ExportDefaultDeclaration",
ExportNamedDeclaration: "ExportNamedDeclaration",
ExportSpecifier: "ExportSpecifier",
ExpressionStatement: "ExpressionStatement",
ForStatement: "ForStatement",
ForInStatement: "ForInStatement",
ForOfStatement: "ForOfStatement",
FunctionDeclaration: "FunctionDeclaration",
FunctionExpression: "FunctionExpression",
GeneratorExpression: "GeneratorExpression",
// CAUTION: It's deferred to ES7.
Identifier: "Identifier",
IfStatement: "IfStatement",
ImportExpression: "ImportExpression",
ImportDeclaration: "ImportDeclaration",
ImportDefaultSpecifier: "ImportDefaultSpecifier",
ImportNamespaceSpecifier: "ImportNamespaceSpecifier",
ImportSpecifier: "ImportSpecifier",
Literal: "Literal",
LabeledStatement: "LabeledStatement",
LogicalExpression: "LogicalExpression",
MemberExpression: "MemberExpression",
MetaProperty: "MetaProperty",
MethodDefinition: "MethodDefinition",
ModuleSpecifier: "ModuleSpecifier",
NewExpression: "NewExpression",
ObjectExpression: "ObjectExpression",
ObjectPattern: "ObjectPattern",
Program: "Program",
Property: "Property",
RestElement: "RestElement",
ReturnStatement: "ReturnStatement",
SequenceExpression: "SequenceExpression",
SpreadElement: "SpreadElement",
Super: "Super",
SwitchStatement: "SwitchStatement",
SwitchCase: "SwitchCase",
TaggedTemplateExpression: "TaggedTemplateExpression",
TemplateElement: "TemplateElement",
TemplateLiteral: "TemplateLiteral",
ThisExpression: "ThisExpression",
ThrowStatement: "ThrowStatement",
TryStatement: "TryStatement",
UnaryExpression: "UnaryExpression",
UpdateExpression: "UpdateExpression",
VariableDeclaration: "VariableDeclaration",
VariableDeclarator: "VariableDeclarator",
WhileStatement: "WhileStatement",
WithStatement: "WithStatement",
YieldExpression: "YieldExpression"
};
VisitorKeys = {
AssignmentExpression: ["left", "right"],
AssignmentPattern: ["left", "right"],
ArrayExpression: ["elements"],
ArrayPattern: ["elements"],
ArrowFunctionExpression: ["params", "body"],
AwaitExpression: ["argument"],
// CAUTION: It's deferred to ES7.
BlockStatement: ["body"],
BinaryExpression: ["left", "right"],
BreakStatement: ["label"],
CallExpression: ["callee", "arguments"],
CatchClause: ["param", "body"],
ClassBody: ["body"],
ClassDeclaration: ["id", "superClass", "body"],
ClassExpression: ["id", "superClass", "body"],
ComprehensionBlock: ["left", "right"],
// CAUTION: It's deferred to ES7.
ComprehensionExpression: ["blocks", "filter", "body"],
// CAUTION: It's deferred to ES7.
ConditionalExpression: ["test", "consequent", "alternate"],
ContinueStatement: ["label"],
DebuggerStatement: [],
DirectiveStatement: [],
DoWhileStatement: ["body", "test"],
EmptyStatement: [],
ExportAllDeclaration: ["source"],
ExportDefaultDeclaration: ["declaration"],
ExportNamedDeclaration: ["declaration", "specifiers", "source"],
ExportSpecifier: ["exported", "local"],
ExpressionStatement: ["expression"],
ForStatement: ["init", "test", "update", "body"],
ForInStatement: ["left", "right", "body"],
ForOfStatement: ["left", "right", "body"],
FunctionDeclaration: ["id", "params", "body"],
FunctionExpression: ["id", "params", "body"],
GeneratorExpression: ["blocks", "filter", "body"],
// CAUTION: It's deferred to ES7.
Identifier: [],
IfStatement: ["test", "consequent", "alternate"],
ImportExpression: ["source"],
ImportDeclaration: ["specifiers", "source"],
ImportDefaultSpecifier: ["local"],
ImportNamespaceSpecifier: ["local"],
ImportSpecifier: ["imported", "local"],
Literal: [],
LabeledStatement: ["label", "body"],
LogicalExpression: ["left", "right"],
MemberExpression: ["object", "property"],
MetaProperty: ["meta", "property"],
MethodDefinition: ["key", "value"],
ModuleSpecifier: [],
NewExpression: ["callee", "arguments"],
ObjectExpression: ["properties"],
ObjectPattern: ["properties"],
Program: ["body"],
Property: ["key", "value"],
RestElement: ["argument"],
ReturnStatement: ["argument"],
SequenceExpression: ["expressions"],
SpreadElement: ["argument"],
Super: [],
SwitchStatement: ["discriminant", "cases"],
SwitchCase: ["test", "consequent"],
TaggedTemplateExpression: ["tag", "quasi"],
TemplateElement: [],
TemplateLiteral: ["quasis", "expressions"],
ThisExpression: [],
ThrowStatement: ["argument"],
TryStatement: ["block", "handler", "finalizer"],
UnaryExpression: ["argument"],
UpdateExpression: ["argument"],
VariableDeclaration: ["declarations"],
VariableDeclarator: ["id", "init"],
WhileStatement: ["test", "body"],
WithStatement: ["object", "body"],
YieldExpression: ["argument"]
};
BREAK = {};
SKIP = {};
REMOVE = {};
VisitorOption = {
Break: BREAK,
Skip: SKIP,
Remove: REMOVE
};
function Reference(parent, key) {
this.parent = parent;
this.key = key;
}
Reference.prototype.replace = function replace2(node2) {
this.parent[this.key] = node2;
};
Reference.prototype.remove = function remove() {
if (Array.isArray(this.parent)) {
this.parent.splice(this.key, 1);
return true;
} else {
this.replace(null);
return false;
}
};
function Element(node2, path, wrap, ref) {
this.node = node2;
this.path = path;
this.wrap = wrap;
this.ref = ref;
}
function Controller() {
}
Controller.prototype.path = function path() {
var i, iz, j, jz, result, element;
function addToPath(result2, path2) {
if (Array.isArray(path2)) {
for (j = 0, jz = path2.length; j < jz; ++j) {
result2.push(path2[j]);
}
} else {
result2.push(path2);
}
}
if (!this.__current.path) {
return null;
}
result = [];
for (i = 2, iz = this.__leavelist.length; i < iz; ++i) {
element = this.__leavelist[i];
addToPath(result, element.path);
}
addToPath(result, this.__current.path);
return result;
};
Controller.prototype.type = function() {
var node2 = this.current();
return node2.type || this.__current.wrap;
};
Controller.prototype.parents = function parents() {
var i, iz, result;
result = [];
for (i = 1, iz = this.__leavelist.length; i < iz; ++i) {
result.push(this.__leavelist[i].node);
}
return result;
};
Controller.prototype.current = function current() {
return this.__current.node;
};
Controller.prototype.__execute = function __execute(callback, element) {
var previous, result;
result = void 0;
previous = this.__current;
this.__current = element;
this.__state = null;
if (callback) {
result = callback.call(this, element.node, this.__leavelist[this.__leavelist.length - 1].node);
}
this.__current = previous;
return result;
};
Controller.prototype.notify = function notify(flag) {
this.__state = flag;
};
Controller.prototype.skip = function() {
this.notify(SKIP);
};
Controller.prototype["break"] = function() {
this.notify(BREAK);
};
Controller.prototype.remove = function() {
this.notify(REMOVE);
};
Controller.prototype.__initialize = function(root, visitor) {
this.visitor = visitor;
this.root = root;
this.__worklist = [];
this.__leavelist = [];
this.__current = null;
this.__state = null;
this.__fallback = null;
if (visitor.fallback === "iteration") {
this.__fallback = Object.keys;
} else if (typeof visitor.fallback === "function") {
this.__fallback = visitor.fallback;
}
this.__keys = VisitorKeys;
if (visitor.keys) {
this.__keys = Object.assign(Object.create(this.__keys), visitor.keys);
}
};
function isNode(node2) {
if (node2 == null) {
return false;
}
return typeof node2 === "object" && typeof node2.type === "string";
}
function isProperty(nodeType, key) {
return (nodeType === Syntax.ObjectExpression || nodeType === Syntax.ObjectPattern) && "properties" === key;
}
Controller.prototype.traverse = function traverse2(root, visitor) {
var worklist, leavelist, element, node2, nodeType, ret, key, current, current2, candidates, candidate, sentinel;
this.__initialize(root, visitor);
sentinel = {};
worklist = this.__worklist;
leavelist = this.__leavelist;
worklist.push(new Element(root, null, null, null));
leavelist.push(new Element(null, null, null, null));
while (worklist.length) {
element = worklist.pop();
if (element === sentinel) {
element = leavelist.pop();
ret = this.__execute(visitor.leave, element);
if (this.__state === BREAK || ret === BREAK) {
return;
}
continue;
}
if (element.node) {
ret = this.__execute(visitor.enter, element);
if (this.__state === BREAK || ret === BREAK) {
return;
}
worklist.push(sentinel);
leavelist.push(element);
if (this.__state === SKIP || ret === SKIP) {
continue;
}
node2 = element.node;
nodeType = node2.type || element.wrap;
candidates = this.__keys[nodeType];
if (!candidates) {
if (this.__fallback) {
candidates = this.__fallback(node2);
} else {
throw new Error("Unknown node type " + nodeType + ".");
}
}
current = candidates.length;
while ((current -= 1) >= 0) {
key = candidates[current];
candidate = node2[key];
if (!candidate) {
continue;
}
if (Array.isArray(candidate)) {
current2 = candidate.length;
while ((current2 -= 1) >= 0) {
if (!candidate[current2]) {
continue;
}
if (isProperty(nodeType, candidates[current])) {
element = new Element(candidate[current2], [key, current2], "Property", null);
} else if (isNode(candidate[current2])) {
element = new Element(candidate[current2], [key, current2], null, null);
} else {
continue;
}
worklist.push(element);
}
} else if (isNode(candidate)) {
worklist.push(new Element(candidate, key, null, null));
}
}
}
}
};
Controller.prototype.replace = function replace2(root, visitor) {
var worklist, leavelist, node2, nodeType, target, element, current, current2, candidates, candidate, sentinel, outer, key;
function removeElem(element2) {
var i, key2, nextElem, parent;
if (element2.ref.remove()) {
key2 = element2.ref.key;
parent = element2.ref.parent;
i = worklist.length;
while (i--) {
nextElem = worklist[i];
if (nextElem.ref && nextElem.ref.parent === parent) {
if (nextElem.ref.key < key2) {
break;
}
--nextElem.ref.key;
}
}
}
}
this.__initialize(root, visitor);
sentinel = {};
worklist = this.__worklist;
leavelist = this.__leavelist;
outer = {
root
};
element = new Element(root, null, null, new Reference(outer, "root"));
worklist.push(element);
leavelist.push(element);
while (worklist.length) {
element = worklist.pop();
if (element === sentinel) {
element = leavelist.pop();
target = this.__execute(visitor.leave, element);
if (target !== void 0 && target !== BREAK && target !== SKIP && target !== REMOVE) {
element.ref.replace(target);
}
if (this.__state === REMOVE || target === REMOVE) {
removeElem(element);
}
if (this.__state === BREAK || target === BREAK) {
return outer.root;
}
continue;
}
target = this.__execute(visitor.enter, element);
if (target !== void 0 && target !== BREAK && target !== SKIP && target !== REMOVE) {
element.ref.replace(target);
element.node = target;
}
if (this.__state === REMOVE || target === REMOVE) {
removeElem(element);
element.node = null;
}
if (this.__state === BREAK || target === BREAK) {
return outer.root;
}
node2 = element.node;
if (!node2) {
continue;
}
worklist.push(sentinel);
leavelist.push(element);
if (this.__state === SKIP || target === SKIP) {
continue;
}
nodeType = node2.type || element.wrap;
candidates = this.__keys[nodeType];
if (!candidates) {
if (this.__fallback) {
candidates = this.__fallback(node2);
} else {
throw new Error("Unknown node type " + nodeType + ".");
}
}
current = candidates.length;
while ((current -= 1) >= 0) {
key = candidates[current];
candidate = node2[key];
if (!candidate) {
continue;
}
if (Array.isArray(candidate)) {
current2 = candidate.length;
while ((current2 -= 1) >= 0) {
if (!candidate[current2]) {
continue;
}
if (isProperty(nodeType, candidates[current])) {
element = new Element(candidate[current2], [key, current2], "Property", new Reference(candidate, current2));
} else if (isNode(candidate[current2])) {
element = new Element(candidate[current2], [key, current2], null, new Reference(candidate, current2));
} else {
continue;
}
worklist.push(element);
}
} else if (isNode(candidate)) {
worklist.push(new Element(candidate, key, null, new Reference(node2, key)));
}
}
}
return outer.root;
};
function traverse(root, visitor) {
var controller = new Controller();
return controller.traverse(root, visitor);
}
function replace(root, visitor) {
var controller = new Controller();
return controller.replace(root, visitor);
}
function extendCommentRange(comment, tokens) {
var target;
target = upperBound(tokens, function search(token) {
return token.range[0] > comment.range[0];
});
comment.extendedRange = [comment.range[0], comment.range[1]];
if (target !== tokens.length) {
comment.extendedRange[1] = tokens[target].range[0];
}
target -= 1;
if (target >= 0) {
comment.extendedRange[0] = tokens[target].range[1];
}
return comment;
}
function attachComments(tree, providedComments, tokens) {
var comments2 = [], comment, len, i, cursor;
if (!tree.range) {
throw new Error("attachComments needs range information");
}
if (!tokens.length) {
if (providedComments.length) {
for (i = 0, len = providedComments.length; i < len; i += 1) {
comment = deepCopy(providedComments[i]);
comment.extendedRange = [0, tree.range[0]];
comments2.push(comment);
}
tree.leadingComments = comments2;
}
return tree;
}
for (i = 0, len = providedComments.length; i < len; i += 1) {
comments2.push(extendCommentRange(deepCopy(providedComments[i]), tokens));
}
cursor = 0;
traverse(tree, {
enter: function(node2) {
var comment2;
while (cursor < comments2.length) {
comment2 = comments2[cursor];
if (comment2.extendedRange[1] > node2.range[0]) {
break;
}
if (comment2.extendedRange[1] === node2.range[0]) {
if (!node2.leadingComments) {
node2.leadingComments = [];
}
node2.leadingComments.push(comment2);
comments2.splice(cursor, 1);
} else {
cursor += 1;
}
}
if (cursor === comments2.length) {
return VisitorOption.Break;
}
if (comments2[cursor].extendedRange[0] > node2.range[1]) {
return VisitorOption.Skip;
}
}
});
cursor = 0;
traverse(tree, {
leave: function(node2) {
var comment2;
while (cursor < comments2.length) {
comment2 = comments2[cursor];
if (node2.range[1] < comment2.extendedRange[0]) {
break;
}
if (node2.range[1] === comment2.extendedRange[0]) {
if (!node2.trailingComments) {
node2.trailingComments = [];
}
node2.trailingComments.push(comment2);
comments2.splice(cursor, 1);
} else {
cursor += 1;
}
}
if (cursor === comments2.length) {
return VisitorOption.Break;
}
if (comments2[cursor].extendedRange[0] > node2.range[1]) {
return VisitorOption.Skip;
}
}
});
return tree;
}
exports2.version = require_package().version;
exports2.Syntax = Syntax;
exports2.traverse = traverse;
exports2.replace = replace;
exports2.attachComments = attachComments;
exports2.VisitorKeys = VisitorKeys;
exports2.VisitorOption = VisitorOption;
exports2.Controller = Controller;
exports2.cloneEnvironment = function() {
return clone({});
};
return exports2;
})(exports);
}
});
// ../../node_modules/.pnpm/eslint-scope@5.1.1/node_modules/eslint-scope/lib/reference.js
var require_reference = __commonJS({
"../../node_modules/.pnpm/eslint-scope@5.1.1/node_modules/eslint-scope/lib/reference.js"(exports, module) {
"use strict";
init_shims();
var READ = 1;
var WRITE = 2;
var RW = READ | WRITE;
var Reference = class _Reference {
constructor(ident, scope, flag, writeExpr, maybeImplicitGlobal, partial, init) {
this.identifier = ident;
this.from = scope;
this.tainted = false;
this.resolved = null;
this.flag = flag;
if (this.isWrite()) {
this.writeExpr = writeExpr;
this.partial = partial;
this.init = init;
}
this.__maybeImplicitGlobal = maybeImplicitGlobal;
}
/**
* Whether the reference is static.
* @method Reference#isStatic
* @returns {boolean} static
*/
isStatic() {
return !this.tainted && this.resolved && this.resolved.scope.isStatic();
}
/**
* Whether the reference is writeable.
* @method Reference#isWrite
* @returns {boolean} write
*/
isWrite() {
return !!(this.flag & _Reference.WRITE);
}
/**
* Whether the reference is readable.
* @method Reference#isRead
* @returns {boolean} read
*/
isRead() {
return !!(this.flag & _Reference.READ);
}
/**
* Whether the reference is read-only.
* @method Reference#isReadOnly
* @returns {boolean} read only
*/
isReadOnly() {
return this.flag === _Reference.READ;
}
/**
* Whether the reference is write-only.
* @method Reference#isWriteOnly
* @returns {boolean} write only
*/
isWriteOnly() {
return this.flag === _Reference.WRITE;
}
/**
* Whether the reference is read-write.
* @method Reference#isReadWrite
* @returns {boolean} read write
*/
isReadWrite() {
return this.flag === _Reference.RW;
}
};
Reference.READ = READ;
Reference.WRITE = WRITE;
Reference.RW = RW;
module.exports = Reference;
}
});
// ../../node_modules/.pnpm/eslint-scope@5.1.1/node_modules/eslint-scope/lib/variable.js
var require_variable2 = __commonJS({
"../../node_modules/.pnpm/eslint-scope@5.1.1/node_modules/eslint-scope/lib/variable.js"(exports, module) {
"use strict";
init_shims();
var Variable = class {
constructor(name, scope) {
this.name = name;
this.identifiers = [];
this.references = [];
this.defs = [];
this.tainted = false;
this.stack = true;
this.scope = scope;
}
};
Variable.CatchClause = "CatchClause";
Variable.Parameter = "Parameter";
Variable.FunctionName = "FunctionName";
Variable.ClassName = "ClassName";
Variable.Variable = "Variable";
Variable.ImportBinding = "ImportBinding";
Variable.ImplicitGlobalVariable = "ImplicitGlobalVariable";
module.exports = Variable;
}
});
// ../../node_modules/.pnpm/eslint-scope@5.1.1/node_modules/eslint-scope/lib/definition.js
var require_definition2 = __commonJS({
"../../node_modules/.pnpm/eslint-scope@5.1.1/node_modules/eslint-scope/lib/definition.js"(exports, module) {
"use strict";
init_shims();
var Variable = require_variable2();
var Definition = class {
constructor(type, name, node2, parent, index, kind) {
this.type = type;
this.name = name;
this.node = node2;
this.parent = parent;
this.index = index;
this.kind = kind;
}
};
var ParameterDefinition = class extends Definition {
constructor(name, node2, index, rest) {
super(Variable.Parameter, name, node2, null, index, null);
this.rest = rest;
}
};
module.exports = {
ParameterDefinition,
Definition
};
}
});
// ../../node_modules/.pnpm/eslint-scope@5.1.1/node_modules/eslint-scope/lib/scope.js
var require_scope2 = __commonJS({
"../../node_modules/.pnpm/eslint-scope@5.1.1/node_modules/eslint-scope/lib/scope.js"(exports, module) {
"use strict";
init_shims();
var Syntax = require_estraverse().Syntax;
var Reference = require_reference();
var Variable = require_variable2();
var Definition = require_definition2().Definition;
var assert = __require("assert");
function isStrictScope(scope, block, isMethodDefinition, useDirective) {
let body;
if (scope.upper && scope.upper.isStrict) {
return true;
}
if (isMethodDefinition) {
return true;
}
if (scope.type === "class" || scope.type === "module") {
return true;
}
if (scope.type === "block" || scope.type === "switch") {
return false;
}
if (scope.type === "function") {
if (block.type === Syntax.ArrowFunctionExpression && block.body.type !== Syntax.BlockStatement) {
return false;
}
if (block.type === Syntax.Program) {
body = block;
} else {
body = block.body;
}
if (!body) {
return false;
}
} else if (scope.type === "global") {
body = block;
} else {
return false;
}
if (useDirective) {
for (let i = 0, iz = body.body.length; i < iz; ++i) {
const stmt = body.body[i];
if (stmt.type !== Syntax.DirectiveStatement) {
break;
}
if (stmt.raw === '"use strict"' || stmt.raw === "'use strict'") {
return true;
}
}
} else {
for (let i = 0, iz = body.body.length; i < iz; ++i) {
const stmt = body.body[i];
if (stmt.type !== Syntax.ExpressionStatement) {
break;
}
const expr = stmt.expression;
if (expr.type !== Syntax.Literal || typeof expr.value !== "string") {
break;
}
if (expr.raw !== null && expr.raw !== void 0) {
if (expr.raw === '"use strict"' || expr.raw === "'use strict'") {
return true;
}
} else {
if (expr.value === "use strict") {
return true;
}
}
}
}
return false;
}
function registerScope(scopeManager, scope) {
scopeManager.scopes.push(scope);
const scopes = scopeManager.__nodeToScope.get(scope.block);
if (scopes) {
scopes.push(scope);
} else {
scopeManager.__nodeToScope.set(scope.block, [scope]);
}
}
function shouldBeStatically(def) {
return def.type === Variable.ClassName || def.type === Variable.Variable && def.parent.kind !== "var";
}
var Scope = class {
constructor(scopeManager, type, upperScope, block, isMethodDefinition) {
this.type = type;
this.set = /* @__PURE__ */ new Map();
this.taints = /* @__PURE__ */ new Map();
this.dynamic = this.type === "global" || this.type === "with";
this.block = block;
this.through = [];
this.variables = [];
this.references = [];
this.variableScope = this.type === "global" || this.type === "function" || this.type === "module" ? this : upperScope.variableScope;
this.functionExpressionScope = false;
this.directCallToEvalScope = false;
this.thisFound = false;
this.__left = [];
this.upper = upperScope;
this.isStrict = isStrictScope(this, block, isMethodDefinition, scopeManager.__useDirective());
this.childScopes = [];
if (this.upper) {
this.upper.childScopes.push(this);
}
this.__declaredVariables = scopeManager.__declaredVariables;
registerScope(scopeManager, this);
}
__shouldStaticallyClose(scopeManager) {
return !this.dynamic || scopeManager.__isOptimistic();
}
__shouldStaticallyCloseForGlobal(ref) {
const name = ref.identifier.name;
if (!this.set.has(name)) {
return false;
}
const variable = this.set.get(name);
const defs = variable.defs;
return defs.length > 0 && defs.every(shouldBeStatically);
}
__staticCloseRef(ref) {
if (!this.__resolve(ref)) {
this.__delegateToUpperScope(ref);
}
}
__dynamicCloseRef(ref) {
let current = this;
do {
current.through.push(ref);
current = current.upper;
} while (current);
}
__globalCloseRef(ref) {
if (this.__shouldStaticallyCloseForGlobal(ref)) {
this.__staticCloseRef(ref);
} else {
this.__dynamicCloseRef(ref);
}
}
__close(scopeManager) {
let closeRef;
if (this.__shouldStaticallyClose(scopeManager)) {
closeRef = this.__staticCloseRef;
} else if (this.type !== "global") {
closeRef = this.__dynamicCloseRef;
} else {
closeRef = this.__globalCloseRef;
}
for (let i = 0, iz = this.__left.length; i < iz; ++i) {
const ref = this.__left[i];
closeRef.call(this, ref);
}
this.__left = null;
return this.upper;
}
// To override by function scopes.
// References in default parameters isn't resolved to variables which are in their function body.
__isValidResolution(ref, variable) {
return true;
}
__resolve(ref) {
const name = ref.identifier.name;
if (!this.set.has(name)) {
return false;
}
const variable = this.set.get(name);
if (!this.__isValidResolution(ref, variable)) {
return false;
}
variable.references.push(ref);
variable.stack = variable.stack && ref.from.variableScope === this.variableScope;
if (ref.tainted) {
variable.tainted = true;
this.taints.set(variable.name, true);
}
ref.resolved = variable;
return true;
}
__delegateToUpperScope(ref) {
if (this.upper) {
this.upper.__left.push(ref);
}
this.through.push(ref);
}
__addDeclaredVariablesOfNode(variable, node2) {
if (node2 === null || node2 === void 0) {
return;
}
let variables = this.__declaredVariables.get(node2);
if (variables === null || variables === void 0) {
variables = [];
this.__declaredVariables.set(node2, variables);
}
if (variables.indexOf(variable) === -1) {
variables.push(variable);
}
}
__defineGeneric(name, set, variables, node2, def) {
let variable;
variable = set.get(name);
if (!variable) {
variable = new Variable(name, this);
set.set(name, variable);
variables.push(variable);
}
if (def) {
variable.defs.push(def);
this.__addDeclaredVariablesOfNode(variable, def.node);
this.__addDeclaredVariablesOfNode(variable, def.parent);
}
if (node2) {
variable.identifiers.push(node2);
}
}
__define(node2, def) {
if (node2 && node2.type === Syntax.Identifier) {
this.__defineGeneric(
node2.name,
this.set,
this.variables,
node2,
def
);
}
}
__referencing(node2, assign, writeExpr, maybeImplicitGlobal, partial, init) {
if (!node2 || node2.type !== Syntax.Identifier) {
return;
}
if (node2.name === "super") {
return;
}
const ref = new Reference(node2, this, assign || Reference.READ, writeExpr, maybeImplicitGlobal, !!partial, !!init);
this.references.push(ref);
this.__left.push(ref);
}
__detectEval() {
let current = this;
this.directCallToEvalScope = true;
do {
current.dynamic = true;
current = current.upper;
} while (current);
}
__detectThis() {
this.thisFound = true;
}
__isClosed() {
return this.__left === null;
}
/**
* returns resolved {Reference}
* @method Scope#resolve
* @param {Espree.Identifier} ident - identifier to be resolved.
* @returns {Reference} reference
*/
resolve(ident) {
let ref, i, iz;
assert(this.__isClosed(), "Scope should be closed.");
assert(ident.type === Syntax.Identifier, "Target should be identifier.");
for (i = 0, iz = this.references.length; i < iz; ++i) {
ref = this.references[i];
if (ref.identifier === ident) {
return ref;
}
}
return null;
}
/**
* returns this scope is static
* @method Scope#isStatic
* @returns {boolean} static
*/
isStatic() {
return !this.dynamic;
}
/**
* returns this scope has materialized arguments
* @method Scope#isArgumentsMaterialized
* @returns {boolean} arguemnts materialized
*/
isArgumentsMaterialized() {
return true;
}
/**
* returns this scope has materialized `this` reference
* @method Scope#isThisMaterialized
* @returns {boolean} this materialized
*/
isThisMaterialized() {
return true;
}
isUsedName(name) {
if (this.set.has(name)) {
return true;
}
for (let i = 0, iz = this.through.length; i < iz; ++i) {
if (this.through[i].identifier.name === name) {
return true;
}
}
return false;
}
};
var GlobalScope = class extends Scope {
constructor(scopeManager, block) {
super(scopeManager, "global", null, block, false);
this.implicit = {
set: /* @__PURE__ */ new Map(),
variables: [],
/**
* List of {@link Reference}s that are left to be resolved (i.e. which
* need to be linked to the variable they refer to).
* @member {Reference[]} Scope#implicit#left
*/
left: []
};
}
__close(scopeManager) {
const implicit = [];
for (let i = 0, iz = this.__left.length; i < iz; ++i) {
const ref = this.__left[i];
if (ref.__maybeImplicitGlobal && !this.set.has(ref.identifier.name)) {
implicit.push(ref.__maybeImplicitGlobal);
}
}
for (let i = 0, iz = implicit.length; i < iz; ++i) {
const info = implicit[i];
this.__defineImplicit(
info.pattern,
new Definition(
Variable.ImplicitGlobalVariable,
info.pattern,
info.node,
null,
null,
null
)
);
}
this.implicit.left = this.__left;
return super.__close(scopeManager);
}
__defineImplicit(node2, def) {
if (node2 && node2.type === Syntax.Identifier) {
this.__defineGeneric(
node2.name,
this.implicit.set,
this.implicit.variables,
node2,
def
);
}
}
};
var ModuleScope = class extends Scope {
constructor(scopeManager, upperScope, block) {
super(scopeManager, "module", upperScope, block, false);
}
};
var FunctionExpressionNameScope = class extends Scope {
constructor(scopeManager, upperScope, block) {
super(scopeManager, "function-expression-name", upperScope, block, false);
this.__define(
block.id,
new Definition(
Variable.FunctionName,
block.id,
block,
null,
null,
null
)
);
this.functionExpressionScope = true;
}
};
var CatchScope = class extends Scope {
constructor(scopeManager, upperScope, block) {
super(scopeManager, "catch", upperScope, block, false);
}
};
var WithScope = class extends Scope {
constructor(scopeManager, upperScope, block) {
super(scopeManager, "with", upperScope, block, false);
}
__close(scopeManager) {
if (this.__shouldStaticallyClose(scopeManager)) {
return super.__close(scopeManager);
}
for (let i = 0, iz = this.__left.length; i < iz; ++i) {
const ref = this.__left[i];
ref.tainted = true;
this.__delegateToUpperScope(ref);
}
this.__left = null;
return this.upper;
}
};
var BlockScope = class extends Scope {
constructor(scopeManager, upperScope, block) {
super(scopeManager, "block", upperScope, block, false);
}
};
var SwitchScope = class extends Scope {
constructor(scopeManager, upperScope, block) {
super(scopeManager, "switch", upperScope, block, false);
}
};
var FunctionScope = class extends Scope {
constructor(scopeManager, upperScope, block, isMethodDefinition) {
super(scopeManager, "function", upperScope, block, isMethodDefinition);
if (this.block.type !== Syntax.ArrowFunctionExpression) {
this.__defineArguments();
}
}
isArgumentsMaterialized() {
if (this.block.type === Syntax.ArrowFunctionExpression) {
return false;
}
if (!this.isStatic()) {
return true;
}
const variable = this.set.get("arguments");
assert(variable, "Always have arguments variable.");
return variable.tainted || variable.references.length !== 0;
}
isThisMaterialized() {
if (!this.isStatic()) {
return true;
}
return this.thisFound;
}
__defineArguments() {
this.__defineGeneric(
"arguments",
this.set,
this.variables,
null,
null
);
this.taints.set("arguments", true);
}
// References in default parameters isn't resolved to variables which are in their function body.
// const x = 1
// function f(a = x) { // This `x` is resolved to the `x` in the outer scope.
// const x = 2
// console.log(a)
// }
__isValidResolution(ref, variable) {
if (this.block.type === "Program") {
return true;
}
const bodyStart = this.block.body.range[0];
return !(variable.scope === this && ref.identifier.range[0] < bodyStart && // the reference is in the parameter part.
variable.defs.every((d) => d.name.range[0] >= bodyStart));
}
};
var ForScope = class extends Scope {
constructor(scopeManager, upperScope, block) {
super(scopeManager, "for", upperScope, block, false);
}
};
var ClassScope = class extends Scope {
constructor(scopeManager, upperScope, block) {
super(scopeManager, "class", upperScope, block, false);
}
};
module.exports = {
Scope,
GlobalScope,
ModuleScope,
FunctionExpressionNameScope,
CatchScope,
WithScope,
BlockScope,
SwitchScope,
FunctionScope,
ForScope,
ClassScope
};
}
});
// ../../node_modules/.pnpm/eslint-scope@5.1.1/node_modules/eslint-scope/lib/scope-manager.js
var require_scope_manager = __commonJS({
"../../node_modules/.pnpm/eslint-scope@5.1.1/node_modules/eslint-scope/lib/scope-manager.js"(exports, module) {
"use strict";
init_shims();
var Scope = require_scope2();
var assert = __require("assert");
var GlobalScope = Scope.GlobalScope;
var CatchScope = Scope.CatchScope;
var WithScope = Scope.WithScope;
var ModuleScope = Scope.ModuleScope;
var ClassScope = Scope.ClassScope;
var SwitchScope = Scope.SwitchScope;
var FunctionScope = Scope.FunctionScope;
var ForScope = Scope.ForScope;
var FunctionExpressionNameScope = Scope.FunctionExpressionNameScope;
var BlockScope = Scope.BlockScope;
var ScopeManager = class {
constructor(options) {
this.scopes = [];
this.globalScope = null;
this.__nodeToScope = /* @__PURE__ */ new WeakMap();
this.__currentScope = null;
this.__options = options;
this.__declaredVariables = /* @__PURE__ */ new WeakMap();
}
__useDirective() {
return this.__options.directive;
}
__isOptimistic() {
return this.__options.optimistic;
}
__ignoreEval() {
return this.__options.ignoreEval;
}
__isNodejsScope() {
return this.__options.nodejsScope;
}
isModule() {
return this.__options.sourceType === "module";
}
isImpliedStrict() {
return this.__options.impliedStrict;
}
isStrictModeSupported() {
return this.__options.ecmaVersion >= 5;
}
// Returns appropriate scope for this node.
__get(node2) {
return this.__nodeToScope.get(node2);
}
/**
* Get variables that are declared by the node.
*
* "are declared by the node" means the node is same as `Variable.defs[].node` or `Variable.defs[].parent`.
* If the node declares nothing, this method returns an empty array.
* CAUTION: This API is experimental. See https://github.com/estools/escope/pull/69 for more details.
*
* @param {Espree.Node} node - a node to get.
* @returns {Variable[]} variables that declared by the node.
*/
getDeclaredVariables(node2) {
return this.__declaredVariables.get(node2) || [];
}
/**
* acquire scope from node.
* @method ScopeManager#acquire
* @param {Espree.Node} node - node for the acquired scope.
* @param {boolean=} inner - look up the most inner scope, default value is false.
* @returns {Scope?} Scope from node
*/
acquire(node2, inner) {
function predicate(testScope) {
if (testScope.type === "function" && testScope.functionExpressionScope) {
return false;
}
return true;
}
const scopes = this.__get(node2);
if (!scopes || scopes.length === 0) {
return null;
}
if (scopes.length === 1) {
return scopes[0];
}
if (inner) {
for (let i = scopes.length - 1; i >= 0; --i) {
const scope = scopes[i];
if (predicate(scope)) {
return scope;
}
}
} else {
for (let i = 0, iz = scopes.length; i < iz; ++i) {
const scope = scopes[i];
if (predicate(scope)) {
return scope;
}
}
}
return null;
}
/**
* acquire all scopes from node.
* @method ScopeManager#acquireAll
* @param {Espree.Node} node - node for the acquired scope.
* @returns {Scopes?} Scope array
*/
acquireAll(node2) {
return this.__get(node2);
}
/**
* release the node.
* @method ScopeManager#release
* @param {Espree.Node} node - releasing node.
* @param {boolean=} inner - look up the most inner scope, default value is false.
* @returns {Scope?} upper scope for the node.
*/
release(node2, inner) {
const scopes = this.__get(node2);
if (scopes && scopes.length) {
const scope = scopes[0].upper;
if (!scope) {
return null;
}
return this.acquire(scope.block, inner);
}
return null;
}
attach() {
}
// eslint-disable-line class-methods-use-this
detach() {
}
// eslint-disable-line class-methods-use-this
__nestScope(scope) {
if (scope instanceof GlobalScope) {
assert(this.__currentScope === null);
this.globalScope = scope;
}
this.__currentScope = scope;
return scope;
}
__nestGlobalScope(node2) {
return this.__nestScope(new GlobalScope(this, node2));
}
__nestBlockScope(node2) {
return this.__nestScope(new BlockScope(this, this.__currentScope, node2));
}
__nestFunctionScope(node2, isMethodDefinition) {
return this.__nestScope(new FunctionScope(this, this.__currentScope, node2, isMethodDefinition));
}
__nestForScope(node2) {
return this.__nestScope(new ForScope(this, this.__currentScope, node2));
}
__nestCatchScope(node2) {
return this.__nestScope(new CatchScope(this, this.__currentScope, node2));
}
__nestWithScope(node2) {
return this.__nestScope(new WithScope(this, this.__currentScope, node2));
}
__nestClassScope(node2) {
return this.__nestScope(new ClassScope(this, this.__currentScope, node2));
}
__nestSwitchScope(node2) {
return this.__nestScope(new SwitchScope(this, this.__currentScope, node2));
}
__nestModuleScope(node2) {
return this.__nestScope(new ModuleScope(this, this.__currentScope, node2));
}
__nestFunctionExpressionNameScope(node2) {
return this.__nestScope(new FunctionExpressionNameScope(this, this.__currentScope, node2));
}
__isES6() {
return this.__options.ecmaVersion >= 6;
}
};
module.exports = ScopeManager;
}
});
// ../../node_modules/.pnpm/estraverse@5.3.0/node_modules/estraverse/estraverse.js
var require_estraverse2 = __commonJS({
"../../node_modules/.pnpm/estraverse@5.3.0/node_modules/estraverse/estraverse.js"(exports) {
"use strict";
init_shims();
(function clone(exports2) {
"use strict";
var Syntax, VisitorOption, VisitorKeys, BREAK, SKIP, REMOVE;
function deepCopy(obj) {
var ret = {}, key, val;
for (key in obj) {
if (obj.hasOwnProperty(key)) {
val = obj[key];
if (typeof val === "object" && val !== null) {
ret[key] = deepCopy(val);
} else {
ret[key] = val;
}
}
}
return ret;
}
function upperBound(array, func) {
var diff, len, i, current;
len = array.length;
i = 0;
while (len) {
diff = len >>> 1;
current = i + diff;
if (func(array[current])) {
len = diff;
} else {
i = current + 1;
len -= diff + 1;
}
}
return i;
}
Syntax = {
AssignmentExpression: "AssignmentExpression",
AssignmentPattern: "AssignmentPattern",
ArrayExpression: "ArrayExpression",
ArrayPattern: "ArrayPattern",
ArrowFunctionExpression: "ArrowFunctionExpression",
AwaitExpression: "AwaitExpression",
// CAUTION: It's deferred to ES7.
BlockStatement: "BlockStatement",
BinaryExpression: "BinaryExpression",
BreakStatement: "BreakStatement",
CallExpression: "CallExpression",
CatchClause: "CatchClause",
ChainExpression: "ChainExpression",
ClassBody: "ClassBody",
ClassDeclaration: "ClassDeclaration",
ClassExpression: "ClassExpression",
ComprehensionBlock: "ComprehensionBlock",
// CAUTION: It's deferred to ES7.
ComprehensionExpression: "ComprehensionExpression",
// CAUTION: It's deferred to ES7.
ConditionalExpression: "ConditionalExpression",
ContinueStatement: "ContinueStatement",
DebuggerStatement: "DebuggerStatement",
DirectiveStatement: "DirectiveStatement",
DoWhileStatement: "DoWhileStatement",
EmptyStatement: "EmptyStatement",
ExportAllDeclaration: "ExportAllDeclaration",
ExportDefaultDeclaration: "ExportDefaultDeclaration",
ExportNamedDeclaration: "ExportNamedDeclaration",
ExportSpecifier: "ExportSpecifier",
ExpressionStatement: "ExpressionStatement",
ForStatement: "ForStatement",
ForInStatement: "ForInStatement",
ForOfStatement: "ForOfStatement",
FunctionDeclaration: "FunctionDeclaration",
FunctionExpression: "FunctionExpression",
GeneratorExpression: "GeneratorExpression",
// CAUTION: It's deferred to ES7.
Identifier: "Identifier",
IfStatement: "IfStatement",
ImportExpression: "ImportExpression",
ImportDeclaration: "ImportDeclaration",
ImportDefaultSpecifier: "ImportDefaultSpecifier",
ImportNamespaceSpecifier: "ImportNamespaceSpecifier",
ImportSpecifier: "ImportSpecifier",
Literal: "Literal",
LabeledStatement: "LabeledStatement",
LogicalExpression: "LogicalExpression",
MemberExpression: "MemberExpression",
MetaProperty: "MetaProperty",
MethodDefinition: "MethodDefinition",
ModuleSpecifier: "ModuleSpecifier",
NewExpression: "NewExpression",
ObjectExpression: "ObjectExpression",
ObjectPattern: "ObjectPattern",
PrivateIdentifier: "PrivateIdentifier",
Program: "Program",
Property: "Property",
PropertyDefinition: "PropertyDefinition",
RestElement: "RestElement",
ReturnStatement: "ReturnStatement",
SequenceExpression: "SequenceExpression",
SpreadElement: "SpreadElement",
Super: "Super",
SwitchStatement: "SwitchStatement",
SwitchCase: "SwitchCase",
TaggedTemplateExpression: "TaggedTemplateExpression",
TemplateElement: "TemplateElement",
TemplateLiteral: "TemplateLiteral",
ThisExpression: "ThisExpression",
ThrowStatement: "ThrowStatement",
TryStatement: "TryStatement",
UnaryExpression: "UnaryExpression",
UpdateExpression: "UpdateExpression",
VariableDeclaration: "VariableDeclaration",
VariableDeclarator: "VariableDeclarator",
WhileStatement: "WhileStatement",
WithStatement: "WithStatement",
YieldExpression: "YieldExpression"
};
VisitorKeys = {
AssignmentExpression: ["left", "right"],
AssignmentPattern: ["left", "right"],
ArrayExpression: ["elements"],
ArrayPattern: ["elements"],
ArrowFunctionExpression: ["params", "body"],
AwaitExpression: ["argument"],
// CAUTION: It's deferred to ES7.
BlockStatement: ["body"],
BinaryExpression: ["left", "right"],
BreakStatement: ["label"],
CallExpression: ["callee", "arguments"],
CatchClause: ["param", "body"],
ChainExpression: ["expression"],
ClassBody: ["body"],
ClassDeclaration: ["id", "superClass", "body"],
ClassExpression: ["id", "superClass", "body"],
ComprehensionBlock: ["left", "right"],
// CAUTION: It's deferred to ES7.
ComprehensionExpression: ["blocks", "filter", "body"],
// CAUTION: It's deferred to ES7.
ConditionalExpression: ["test", "consequent", "alternate"],
ContinueStatement: ["label"],
DebuggerStatement: [],
DirectiveStatement: [],
DoWhileStatement: ["body", "test"],
EmptyStatement: [],
ExportAllDeclaration: ["source"],
ExportDefaultDeclaration: ["declaration"],
ExportNamedDeclaration: ["declaration", "specifiers", "source"],
ExportSpecifier: ["exported", "local"],
ExpressionStatement: ["expression"],
ForStatement: ["init", "test", "update", "body"],
ForInStatement: ["left", "right", "body"],
ForOfStatement: ["left", "right", "body"],
FunctionDeclaration: ["id", "params", "body"],
FunctionExpression: ["id", "params", "body"],
GeneratorExpression: ["blocks", "filter", "body"],
// CAUTION: It's deferred to ES7.
Identifier: [],
IfStatement: ["test", "consequent", "alternate"],
ImportExpression: ["source"],
ImportDeclaration: ["specifiers", "source"],
ImportDefaultSpecifier: ["local"],
ImportNamespaceSpecifier: ["local"],
ImportSpecifier: ["imported", "local"],
Literal: [],
LabeledStatement: ["label", "body"],
LogicalExpression: ["left", "right"],
MemberExpression: ["object", "property"],
MetaProperty: ["meta", "property"],
MethodDefinition: ["key", "value"],
ModuleSpecifier: [],
NewExpression: ["callee", "arguments"],
ObjectExpression: ["properties"],
ObjectPattern: ["properties"],
PrivateIdentifier: [],
Program: ["body"],
Property: ["key", "value"],
PropertyDefinition: ["key", "value"],
RestElement: ["argument"],
ReturnStatement: ["argument"],
SequenceExpression: ["expressions"],
SpreadElement: ["argument"],
Super: [],
SwitchStatement: ["discriminant", "cases"],
SwitchCase: ["test", "consequent"],
TaggedTemplateExpression: ["tag", "quasi"],
TemplateElement: [],
TemplateLiteral: ["quasis", "expressions"],
ThisExpression: [],
ThrowStatement: ["argument"],
TryStatement: ["block", "handler", "finalizer"],
UnaryExpression: ["argument"],
UpdateExpression: ["argument"],
VariableDeclaration: ["declarations"],
VariableDeclarator: ["id", "init"],
WhileStatement: ["test", "body"],
WithStatement: ["object", "body"],
YieldExpression: ["argument"]
};
BREAK = {};
SKIP = {};
REMOVE = {};
VisitorOption = {
Break: BREAK,
Skip: SKIP,
Remove: REMOVE
};
function Reference(parent, key) {
this.parent = parent;
this.key = key;
}
Reference.prototype.replace = function replace2(node2) {
this.parent[this.key] = node2;
};
Reference.prototype.remove = function remove() {
if (Array.isArray(this.parent)) {
this.parent.splice(this.key, 1);
return true;
} else {
this.replace(null);
return false;
}
};
function Element(node2, path, wrap, ref) {
this.node = node2;
this.path = path;
this.wrap = wrap;
this.ref = ref;
}
function Controller() {
}
Controller.prototype.path = function path() {
var i, iz, j, jz, result, element;
function addToPath(result2, path2) {
if (Array.isArray(path2)) {
for (j = 0, jz = path2.length; j < jz; ++j) {
result2.push(path2[j]);
}
} else {
result2.push(path2);
}
}
if (!this.__current.path) {
return null;
}
result = [];
for (i = 2, iz = this.__leavelist.length; i < iz; ++i) {
element = this.__leavelist[i];
addToPath(result, element.path);
}
addToPath(result, this.__current.path);
return result;
};
Controller.prototype.type = function() {
var node2 = this.current();
return node2.type || this.__current.wrap;
};
Controller.prototype.parents = function parents() {
var i, iz, result;
result = [];
for (i = 1, iz = this.__leavelist.length; i < iz; ++i) {
result.push(this.__leavelist[i].node);
}
return result;
};
Controller.prototype.current = function current() {
return this.__current.node;
};
Controller.prototype.__execute = function __execute(callback, element) {
var previous, result;
result = void 0;
previous = this.__current;
this.__current = element;
this.__state = null;
if (callback) {
result = callback.call(this, element.node, this.__leavelist[this.__leavelist.length - 1].node);
}
this.__current = previous;
return result;
};
Controller.prototype.notify = function notify(flag) {
this.__state = flag;
};
Controller.prototype.skip = function() {
this.notify(SKIP);
};
Controller.prototype["break"] = function() {
this.notify(BREAK);
};
Controller.prototype.remove = function() {
this.notify(REMOVE);
};
Controller.prototype.__initialize = function(root, visitor) {
this.visitor = visitor;
this.root = root;
this.__worklist = [];
this.__leavelist = [];
this.__current = null;
this.__state = null;
this.__fallback = null;
if (visitor.fallback === "iteration") {
this.__fallback = Object.keys;
} else if (typeof visitor.fallback === "function") {
this.__fallback = visitor.fallback;
}
this.__keys = VisitorKeys;
if (visitor.keys) {
this.__keys = Object.assign(Object.create(this.__keys), visitor.keys);
}
};
function isNode(node2) {
if (node2 == null) {
return false;
}
return typeof node2 === "object" && typeof node2.type === "string";
}
function isProperty(nodeType, key) {
return (nodeType === Syntax.ObjectExpression || nodeType === Syntax.ObjectPattern) && "properties" === key;
}
function candidateExistsInLeaveList(leavelist, candidate) {
for (var i = leavelist.length - 1; i >= 0; --i) {
if (leavelist[i].node === candidate) {
return true;
}
}
return false;
}
Controller.prototype.traverse = function traverse2(root, visitor) {
var worklist, leavelist, element, node2, nodeType, ret, key, current, current2, candidates, candidate, sentinel;
this.__initialize(root, visitor);
sentinel = {};
worklist = this.__worklist;
leavelist = this.__leavelist;
worklist.push(new Element(root, null, null, null));
leavelist.push(new Element(null, null, null, null));
while (worklist.length) {
element = worklist.pop();
if (element === sentinel) {
element = leavelist.pop();
ret = this.__execute(visitor.leave, element);
if (this.__state === BREAK || ret === BREAK) {
return;
}
continue;
}
if (element.node) {
ret = this.__execute(visitor.enter, element);
if (this.__state === BREAK || ret === BREAK) {
return;
}
worklist.push(sentinel);
leavelist.push(element);
if (this.__state === SKIP || ret === SKIP) {
continue;
}
node2 = element.node;
nodeType = node2.type || element.wrap;
candidates = this.__keys[nodeType];
if (!candidates) {
if (this.__fallback) {
candidates = this.__fallback(node2);
} else {
throw new Error("Unknown node type " + nodeType + ".");
}
}
current = candidates.length;
while ((current -= 1) >= 0) {
key = candidates[current];
candidate = node2[key];
if (!candidate) {
continue;
}
if (Array.isArray(candidate)) {
current2 = candidate.length;
while ((current2 -= 1) >= 0) {
if (!candidate[current2]) {
continue;
}
if (candidateExistsInLeaveList(leavelist, candidate[current2])) {
continue;
}
if (isProperty(nodeType, candidates[current])) {
element = new Element(candidate[current2], [key, current2], "Property", null);
} else if (isNode(candidate[current2])) {
element = new Element(candidate[current2], [key, current2], null, null);
} else {
continue;
}
worklist.push(element);
}
} else if (isNode(candidate)) {
if (candidateExistsInLeaveList(leavelist, candidate)) {
continue;
}
worklist.push(new Element(candidate, key, null, null));
}
}
}
}
};
Controller.prototype.replace = function replace2(root, visitor) {
var worklist, leavelist, node2, nodeType, target, element, current, current2, candidates, candidate, sentinel, outer, key;
function removeElem(element2) {
var i, key2, nextElem, parent;
if (element2.ref.remove()) {
key2 = element2.ref.key;
parent = element2.ref.parent;
i = worklist.length;
while (i--) {
nextElem = worklist[i];
if (nextElem.ref && nextElem.ref.parent === parent) {
if (nextElem.ref.key < key2) {
break;
}
--nextElem.ref.key;
}
}
}
}
this.__initialize(root, visitor);
sentinel = {};
worklist = this.__worklist;
leavelist = this.__leavelist;
outer = {
root
};
element = new Element(root, null, null, new Reference(outer, "root"));
worklist.push(element);
leavelist.push(element);
while (worklist.length) {
element = worklist.pop();
if (element === sentinel) {
element = leavelist.pop();
target = this.__execute(visitor.leave, element);
if (target !== void 0 && target !== BREAK && target !== SKIP && target !== REMOVE) {
element.ref.replace(target);
}
if (this.__state === REMOVE || target === REMOVE) {
removeElem(element);
}
if (this.__state === BREAK || target === BREAK) {
return outer.root;
}
continue;
}
target = this.__execute(visitor.enter, element);
if (target !== void 0 && target !== BREAK && target !== SKIP && target !== REMOVE) {
element.ref.replace(target);
element.node = target;
}
if (this.__state === REMOVE || target === REMOVE) {
removeElem(element);
element.node = null;
}
if (this.__state === BREAK || target === BREAK) {
return outer.root;
}
node2 = element.node;
if (!node2) {
continue;
}
worklist.push(sentinel);
leavelist.push(element);
if (this.__state === SKIP || target === SKIP) {
continue;
}
nodeType = node2.type || element.wrap;
candidates = this.__keys[nodeType];
if (!candidates) {
if (this.__fallback) {
candidates = this.__fallback(node2);
} else {
throw new Error("Unknown node type " + nodeType + ".");
}
}
current = candidates.length;
while ((current -= 1) >= 0) {
key = candidates[current];
candidate = node2[key];
if (!candidate) {
continue;
}
if (Array.isArray(candidate)) {
current2 = candidate.length;
while ((current2 -= 1) >= 0) {
if (!candidate[current2]) {
continue;
}
if (isProperty(nodeType, candidates[current])) {
element = new Element(candidate[current2], [key, current2], "Property", new Reference(candidate, current2));
} else if (isNode(candidate[current2])) {
element = new Element(candidate[current2], [key, current2], null, new Reference(candidate, current2));
} else {
continue;
}
worklist.push(element);
}
} else if (isNode(candidate)) {
worklist.push(new Element(candidate, key, null, new Reference(node2, key)));
}
}
}
return outer.root;
};
function traverse(root, visitor) {
var controller = new Controller();
return controller.traverse(root, visitor);
}
function replace(root, visitor) {
var controller = new Controller();
return controller.replace(root, visitor);
}
function extendCommentRange(comment, tokens) {
var target;
target = upperBound(tokens, function search(token) {
return token.range[0] > comment.range[0];
});
comment.extendedRange = [comment.range[0], comment.range[1]];
if (target !== tokens.length) {
comment.extendedRange[1] = tokens[target].range[0];
}
target -= 1;
if (target >= 0) {
comment.extendedRange[0] = tokens[target].range[1];
}
return comment;
}
function attachComments(tree, providedComments, tokens) {
var comments2 = [], comment, len, i, cursor;
if (!tree.range) {
throw new Error("attachComments needs range information");
}
if (!tokens.length) {
if (providedComments.length) {
for (i = 0, len = providedComments.length; i < len; i += 1) {
comment = deepCopy(providedComments[i]);
comment.extendedRange = [0, tree.range[0]];
comments2.push(comment);
}
tree.leadingComments = comments2;
}
return tree;
}
for (i = 0, len = providedComments.length; i < len; i += 1) {
comments2.push(extendCommentRange(deepCopy(providedComments[i]), tokens));
}
cursor = 0;
traverse(tree, {
enter: function(node2) {
var comment2;
while (cursor < comments2.length) {
comment2 = comments2[cursor];
if (comment2.extendedRange[1] > node2.range[0]) {
break;
}
if (comment2.extendedRange[1] === node2.range[0]) {
if (!node2.leadingComments) {
node2.leadingComments = [];
}
node2.leadingComments.push(comment2);
comments2.splice(cursor, 1);
} else {
cursor += 1;
}
}
if (cursor === comments2.length) {
return VisitorOption.Break;
}
if (comments2[cursor].extendedRange[0] > node2.range[1]) {
return VisitorOption.Skip;
}
}
});
cursor = 0;
traverse(tree, {
leave: function(node2) {
var comment2;
while (cursor < comments2.length) {
comment2 = comments2[cursor];
if (node2.range[1] < comment2.extendedRange[0]) {
break;
}
if (node2.range[1] === comment2.extendedRange[0]) {
if (!node2.trailingComments) {
node2.trailingComments = [];
}
node2.trailingComments.push(comment2);
comments2.splice(cursor, 1);
} else {
cursor += 1;
}
}
if (cursor === comments2.length) {
return VisitorOption.Break;
}
if (comments2[cursor].extendedRange[0] > node2.range[1]) {
return VisitorOption.Skip;
}
}
});
return tree;
}
exports2.Syntax = Syntax;
exports2.traverse = traverse;
exports2.replace = replace;
exports2.attachComments = attachComments;
exports2.VisitorKeys = VisitorKeys;
exports2.VisitorOption = VisitorOption;
exports2.Controller = Controller;
exports2.cloneEnvironment = function() {
return clone({});
};
return exports2;
})(exports);
}
});
// ../../node_modules/.pnpm/esrecurse@4.3.0/node_modules/esrecurse/package.json
var require_package2 = __commonJS({
"../../node_modules/.pnpm/esrecurse@4.3.0/node_modules/esrecurse/package.json"(exports, module) {
module.exports = {
name: "esrecurse",
description: "ECMAScript AST recursive visitor",
homepage: "https://github.com/estools/esrecurse",
main: "esrecurse.js",
version: "4.3.0",
engines: {
node: ">=4.0"
},
maintainers: [
{
name: "Yusuke Suzuki",
email: "utatane.tea@gmail.com",
web: "https://github.com/Constellation"
}
],
repository: {
type: "git",
url: "https://github.com/estools/esrecurse.git"
},
dependencies: {
estraverse: "^5.2.0"
},
devDependencies: {
"babel-cli": "^6.24.1",
"babel-eslint": "^7.2.3",
"babel-preset-es2015": "^6.24.1",
"babel-register": "^6.24.1",
chai: "^4.0.2",
esprima: "^4.0.0",
gulp: "^3.9.0",
"gulp-bump": "^2.7.0",
"gulp-eslint": "^4.0.0",
"gulp-filter": "^5.0.0",
"gulp-git": "^2.4.1",
"gulp-mocha": "^4.3.1",
"gulp-tag-version": "^1.2.1",
jsdoc: "^3.3.0-alpha10",
minimist: "^1.1.0"
},
license: "BSD-2-Clause",
scripts: {
test: "gulp travis",
"unit-test": "gulp test",
lint: "gulp lint"
},
babel: {
presets: [
"es2015"
]
}
};
}
});
// ../../node_modules/.pnpm/esrecurse@4.3.0/node_modules/esrecurse/esrecurse.js
var require_esrecurse = __commonJS({
"../../node_modules/.pnpm/esrecurse@4.3.0/node_modules/esrecurse/esrecurse.js"(exports) {
"use strict";
init_shims();
(function() {
"use strict";
var estraverse = require_estraverse2();
function isNode(node2) {
if (node2 == null) {
return false;
}
return typeof node2 === "object" && typeof node2.type === "string";
}
function isProperty(nodeType, key) {
return (nodeType === estraverse.Syntax.ObjectExpression || nodeType === estraverse.Syntax.ObjectPattern) && key === "properties";
}
function Visitor(visitor, options) {
options = options || {};
this.__visitor = visitor || this;
this.__childVisitorKeys = options.childVisitorKeys ? Object.assign({}, estraverse.VisitorKeys, options.childVisitorKeys) : estraverse.VisitorKeys;
if (options.fallback === "iteration") {
this.__fallback = Object.keys;
} else if (typeof options.fallback === "function") {
this.__fallback = options.fallback;
}
}
Visitor.prototype.visitChildren = function(node2) {
var type, children, i, iz, j, jz, child;
if (node2 == null) {
return;
}
type = node2.type || estraverse.Syntax.Property;
children = this.__childVisitorKeys[type];
if (!children) {
if (this.__fallback) {
children = this.__fallback(node2);
} else {
throw new Error("Unknown node type " + type + ".");
}
}
for (i = 0, iz = children.length; i < iz; ++i) {
child = node2[children[i]];
if (child) {
if (Array.isArray(child)) {
for (j = 0, jz = child.length; j < jz; ++j) {
if (child[j]) {
if (isNode(child[j]) || isProperty(type, children[i])) {
this.visit(child[j]);
}
}
}
} else if (isNode(child)) {
this.visit(child);
}
}
}
};
Visitor.prototype.visit = function(node2) {
var type;
if (node2 == null) {
return;
}
type = node2.type || estraverse.Syntax.Property;
if (this.__visitor[type]) {
this.__visitor[type].call(this, node2);
return;
}
this.visitChildren(node2);
};
exports.version = require_package2().version;
exports.Visitor = Visitor;
exports.visit = function(node2, visitor, options) {
var v = new Visitor(visitor, options);
v.visit(node2);
};
})();
}
});
// ../../node_modules/.pnpm/eslint-scope@5.1.1/node_modules/eslint-scope/lib/pattern-visitor.js
var require_pattern_visitor = __commonJS({
"../../node_modules/.pnpm/eslint-scope@5.1.1/node_modules/eslint-scope/lib/pattern-visitor.js"(exports, module) {
"use strict";
init_shims();
var Syntax = require_estraverse().Syntax;
var esrecurse = require_esrecurse();
function getLast(xs) {
return xs[xs.length - 1] || null;
}
var PatternVisitor = class extends esrecurse.Visitor {
static isPattern(node2) {
const nodeType = node2.type;
return nodeType === Syntax.Identifier || nodeType === Syntax.ObjectPattern || nodeType === Syntax.ArrayPattern || nodeType === Syntax.SpreadElement || nodeType === Syntax.RestElement || nodeType === Syntax.AssignmentPattern;
}
constructor(options, rootPattern, callback) {
super(null, options);
this.rootPattern = rootPattern;
this.callback = callback;
this.assignments = [];
this.rightHandNodes = [];
this.restElements = [];
}
Identifier(pattern) {
const lastRestElement = getLast(this.restElements);
this.callback(pattern, {
topLevel: pattern === this.rootPattern,
rest: lastRestElement !== null && lastRestElement !== void 0 && lastRestElement.argument === pattern,
assignments: this.assignments
});
}
Property(property) {
if (property.computed) {
this.rightHandNodes.push(property.key);
}
this.visit(property.value);
}
ArrayPattern(pattern) {
for (let i = 0, iz = pattern.elements.length; i < iz; ++i) {
const element = pattern.elements[i];
this.visit(element);
}
}
AssignmentPattern(pattern) {
this.assignments.push(pattern);
this.visit(pattern.left);
this.rightHandNodes.push(pattern.right);
this.assignments.pop();
}
RestElement(pattern) {
this.restElements.push(pattern);
this.visit(pattern.argument);
this.restElements.pop();
}
MemberExpression(node2) {
if (node2.computed) {
this.rightHandNodes.push(node2.property);
}
this.rightHandNodes.push(node2.object);
}
//
// ForInStatement.left and AssignmentExpression.left are LeftHandSideExpression.
// By spec, LeftHandSideExpression is Pattern or MemberExpression.
// (see also: https://github.com/estree/estree/pull/20#issuecomment-74584758)
// But espree 2.0 parses to ArrayExpression, ObjectExpression, etc...
//
SpreadElement(node2) {
this.visit(node2.argument);
}
ArrayExpression(node2) {
node2.elements.forEach(this.visit, this);
}
AssignmentExpression(node2) {
this.assignments.push(node2);
this.visit(node2.left);
this.rightHandNodes.push(node2.right);
this.assignments.pop();
}
CallExpression(node2) {
node2.arguments.forEach((a) => {
this.rightHandNodes.push(a);
});
this.visit(node2.callee);
}
};
module.exports = PatternVisitor;
}
});
// ../../node_modules/.pnpm/eslint-scope@5.1.1/node_modules/eslint-scope/lib/referencer.js
var require_referencer2 = __commonJS({
"../../node_modules/.pnpm/eslint-scope@5.1.1/node_modules/eslint-scope/lib/referencer.js"(exports, module) {
"use strict";
init_shims();
var Syntax = require_estraverse().Syntax;
var esrecurse = require_esrecurse();
var Reference = require_reference();
var Variable = require_variable2();
var PatternVisitor = require_pattern_visitor();
var definition = require_definition2();
var assert = __require("assert");
var ParameterDefinition = definition.ParameterDefinition;
var Definition = definition.Definition;
function traverseIdentifierInPattern(options, rootPattern, referencer, callback) {
const visitor = new PatternVisitor(options, rootPattern, callback);
visitor.visit(rootPattern);
if (referencer !== null && referencer !== void 0) {
visitor.rightHandNodes.forEach(referencer.visit, referencer);
}
}
var Importer = class extends esrecurse.Visitor {
constructor(declaration, referencer) {
super(null, referencer.options);
this.declaration = declaration;
this.referencer = referencer;
}
visitImport(id, specifier) {
this.referencer.visitPattern(id, (pattern) => {
this.referencer.currentScope().__define(
pattern,
new Definition(
Variable.ImportBinding,
pattern,
specifier,
this.declaration,
null,
null
)
);
});
}
ImportNamespaceSpecifier(node2) {
const local = node2.local || node2.id;
if (local) {
this.visitImport(local, node2);
}
}
ImportDefaultSpecifier(node2) {
const local = node2.local || node2.id;
this.visitImport(local, node2);
}
ImportSpecifier(node2) {
const local = node2.local || node2.id;
if (node2.name) {
this.visitImport(node2.name, node2);
} else {
this.visitImport(local, node2);
}
}
};
var Referencer = class extends esrecurse.Visitor {
constructor(options, scopeManager) {
super(null, options);
this.options = options;
this.scopeManager = scopeManager;
this.parent = null;
this.isInnerMethodDefinition = false;
}
currentScope() {
return this.scopeManager.__currentScope;
}
close(node2) {
while (this.currentScope() && node2 === this.currentScope().block) {
this.scopeManager.__currentScope = this.currentScope().__close(this.scopeManager);
}
}
pushInnerMethodDefinition(isInnerMethodDefinition) {
const previous = this.isInnerMethodDefinition;
this.isInnerMethodDefinition = isInnerMethodDefinition;
return previous;
}
popInnerMethodDefinition(isInnerMethodDefinition) {
this.isInnerMethodDefinition = isInnerMethodDefinition;
}
referencingDefaultValue(pattern, assignments, maybeImplicitGlobal, init) {
const scope = this.currentScope();
assignments.forEach((assignment) => {
scope.__referencing(
pattern,
Reference.WRITE,
assignment.right,
maybeImplicitGlobal,
pattern !== assignment.left,
init
);
});
}
visitPattern(node2, options, callback) {
let visitPatternOptions = options;
let visitPatternCallback = callback;
if (typeof options === "function") {
visitPatternCallback = options;
visitPatternOptions = { processRightHandNodes: false };
}
traverseIdentifierInPattern(
this.options,
node2,
visitPatternOptions.processRightHandNodes ? this : null,
visitPatternCallback
);
}
visitFunction(node2) {
let i, iz;
if (node2.type === Syntax.FunctionDeclaration) {
this.currentScope().__define(
node2.id,
new Definition(
Variable.FunctionName,
node2.id,
node2,
null,
null,
null
)
);
}
if (node2.type === Syntax.FunctionExpression && node2.id) {
this.scopeManager.__nestFunctionExpressionNameScope(node2);
}
this.scopeManager.__nestFunctionScope(node2, this.isInnerMethodDefinition);
const that = this;
function visitPatternCallback(pattern, info) {
that.currentScope().__define(
pattern,
new ParameterDefinition(
pattern,
node2,
i,
info.rest
)
);
that.referencingDefaultValue(pattern, info.assignments, null, true);
}
for (i = 0, iz = node2.params.length; i < iz; ++i) {
this.visitPattern(node2.params[i], { processRightHandNodes: true }, visitPatternCallback);
}
if (node2.rest) {
this.visitPattern({
type: "RestElement",
argument: node2.rest
}, (pattern) => {
this.currentScope().__define(
pattern,
new ParameterDefinition(
pattern,
node2,
node2.params.length,
true
)
);
});
}
if (node2.body) {
if (node2.body.type === Syntax.BlockStatement) {
this.visitChildren(node2.body);
} else {
this.visit(node2.body);
}
}
this.close(node2);
}
visitClass(node2) {
if (node2.type === Syntax.ClassDeclaration) {
this.currentScope().__define(
node2.id,
new Definition(
Variable.ClassName,
node2.id,
node2,
null,
null,
null
)
);
}
this.visit(node2.superClass);
this.scopeManager.__nestClassScope(node2);
if (node2.id) {
this.currentScope().__define(
node2.id,
new Definition(
Variable.ClassName,
node2.id,
node2
)
);
}
this.visit(node2.body);
this.close(node2);
}
visitProperty(node2) {
let previous;
if (node2.computed) {
this.visit(node2.key);
}
const isMethodDefinition = node2.type === Syntax.MethodDefinition;
if (isMethodDefinition) {
previous = this.pushInnerMethodDefinition(true);
}
this.visit(node2.value);
if (isMethodDefinition) {
this.popInnerMethodDefinition(previous);
}
}
visitForIn(node2) {
if (node2.left.type === Syntax.VariableDeclaration && node2.left.kind !== "var") {
this.scopeManager.__nestForScope(node2);
}
if (node2.left.type === Syntax.VariableDeclaration) {
this.visit(node2.left);
this.visitPattern(node2.left.declarations[0].id, (pattern) => {
this.currentScope().__referencing(pattern, Reference.WRITE, node2.right, null, true, true);
});
} else {
this.visitPattern(node2.left, { processRightHandNodes: true }, (pattern, info) => {
let maybeImplicitGlobal = null;
if (!this.currentScope().isStrict) {
maybeImplicitGlobal = {
pattern,
node: node2
};
}
this.referencingDefaultValue(pattern, info.assignments, maybeImplicitGlobal, false);
this.currentScope().__referencing(pattern, Reference.WRITE, node2.right, maybeImplicitGlobal, true, false);
});
}
this.visit(node2.right);
this.visit(node2.body);
this.close(node2);
}
visitVariableDeclaration(variableTargetScope, type, node2, index) {
const decl = node2.declarations[index];
const init = decl.init;
this.visitPattern(decl.id, { processRightHandNodes: true }, (pattern, info) => {
variableTargetScope.__define(
pattern,
new Definition(
type,
pattern,
decl,
node2,
index,
node2.kind
)
);
this.referencingDefaultValue(pattern, info.assignments, null, true);
if (init) {
this.currentScope().__referencing(pattern, Reference.WRITE, init, null, !info.topLevel, true);
}
});
}
AssignmentExpression(node2) {
if (PatternVisitor.isPattern(node2.left)) {
if (node2.operator === "=") {
this.visitPattern(node2.left, { processRightHandNodes: true }, (pattern, info) => {
let maybeImplicitGlobal = null;
if (!this.currentScope().isStrict) {
maybeImplicitGlobal = {
pattern,
node: node2
};
}
this.referencingDefaultValue(pattern, info.assignments, maybeImplicitGlobal, false);
this.currentScope().__referencing(pattern, Reference.WRITE, node2.right, maybeImplicitGlobal, !info.topLevel, false);
});
} else {
this.currentScope().__referencing(node2.left, Reference.RW, node2.right);
}
} else {
this.visit(node2.left);
}
this.visit(node2.right);
}
CatchClause(node2) {
this.scopeManager.__nestCatchScope(node2);
this.visitPattern(node2.param, { processRightHandNodes: true }, (pattern, info) => {
this.currentScope().__define(
pattern,
new Definition(
Variable.CatchClause,
node2.param,
node2,
null,
null,
null
)
);
this.referencingDefaultValue(pattern, info.assignments, null, true);
});
this.visit(node2.body);
this.close(node2);
}
Program(node2) {
this.scopeManager.__nestGlobalScope(node2);
if (this.scopeManager.__isNodejsScope()) {
this.currentScope().isStrict = false;
this.scopeManager.__nestFunctionScope(node2, false);
}
if (this.scopeManager.__isES6() && this.scopeManager.isModule()) {
this.scopeManager.__nestModuleScope(node2);
}
if (this.scopeManager.isStrictModeSupported() && this.scopeManager.isImpliedStrict()) {
this.currentScope().isStrict = true;
}
this.visitChildren(node2);
this.close(node2);
}
Identifier(node2) {
this.currentScope().__referencing(node2);
}
UpdateExpression(node2) {
if (PatternVisitor.isPattern(node2.argument)) {
this.currentScope().__referencing(node2.argument, Reference.RW, null);
} else {
this.visitChildren(node2);
}
}
MemberExpression(node2) {
this.visit(node2.object);
if (node2.computed) {
this.visit(node2.property);
}
}
Property(node2) {
this.visitProperty(node2);
}
MethodDefinition(node2) {
this.visitProperty(node2);
}
BreakStatement() {
}
// eslint-disable-line class-methods-use-this
ContinueStatement() {
}
// eslint-disable-line class-methods-use-this
LabeledStatement(node2) {
this.visit(node2.body);
}
ForStatement(node2) {
if (node2.init && node2.init.type === Syntax.VariableDeclaration && node2.init.kind !== "var") {
this.scopeManager.__nestForScope(node2);
}
this.visitChildren(node2);
this.close(node2);
}
ClassExpression(node2) {
this.visitClass(node2);
}
ClassDeclaration(node2) {
this.visitClass(node2);
}
CallExpression(node2) {
if (!this.scopeManager.__ignoreEval() && node2.callee.type === Syntax.Identifier && node2.callee.name === "eval") {
this.currentScope().variableScope.__detectEval();
}
this.visitChildren(node2);
}
BlockStatement(node2) {
if (this.scopeManager.__isES6()) {
this.scopeManager.__nestBlockScope(node2);
}
this.visitChildren(node2);
this.close(node2);
}
ThisExpression() {
this.currentScope().variableScope.__detectThis();
}
WithStatement(node2) {
this.visit(node2.object);
this.scopeManager.__nestWithScope(node2);
this.visit(node2.body);
this.close(node2);
}
VariableDeclaration(node2) {
const variableTargetScope = node2.kind === "var" ? this.currentScope().variableScope : this.currentScope();
for (let i = 0, iz = node2.declarations.length; i < iz; ++i) {
const decl = node2.declarations[i];
this.visitVariableDeclaration(variableTargetScope, Variable.Variable, node2, i);
if (decl.init) {
this.visit(decl.init);
}
}
}
// sec 13.11.8
SwitchStatement(node2) {
this.visit(node2.discriminant);
if (this.scopeManager.__isES6()) {
this.scopeManager.__nestSwitchScope(node2);
}
for (let i = 0, iz = node2.cases.length; i < iz; ++i) {
this.visit(node2.cases[i]);
}
this.close(node2);
}
FunctionDeclaration(node2) {
this.visitFunction(node2);
}
FunctionExpression(node2) {
this.visitFunction(node2);
}
ForOfStatement(node2) {
this.visitForIn(node2);
}
ForInStatement(node2) {
this.visitForIn(node2);
}
ArrowFunctionExpression(node2) {
this.visitFunction(node2);
}
ImportDeclaration(node2) {
assert(this.scopeManager.__isES6() && this.scopeManager.isModule(), "ImportDeclaration should appear when the mode is ES6 and in the module context.");
const importer = new Importer(node2, this);
importer.visit(node2);
}
visitExportDeclaration(node2) {
if (node2.source) {
return;
}
if (node2.declaration) {
this.visit(node2.declaration);
return;
}
this.visitChildren(node2);
}
// TODO: ExportDeclaration doesn't exist. for bc?
ExportDeclaration(node2) {
this.visitExportDeclaration(node2);
}
ExportAllDeclaration(node2) {
this.visitExportDeclaration(node2);
}
ExportDefaultDeclaration(node2) {
this.visitExportDeclaration(node2);
}
ExportNamedDeclaration(node2) {
this.visitExportDeclaration(node2);
}
ExportSpecifier(node2) {
const local = node2.id || node2.local;
this.visit(local);
}
MetaProperty() {
}
};
module.exports = Referencer;
}
});
// ../../node_modules/.pnpm/eslint-scope@5.1.1/node_modules/eslint-scope/package.json
var require_package3 = __commonJS({
"../../node_modules/.pnpm/eslint-scope@5.1.1/node_modules/eslint-scope/package.json"(exports, module) {
module.exports = {
name: "eslint-scope",
description: "ECMAScript scope analyzer for ESLint",
homepage: "http://github.com/eslint/eslint-scope",
main: "lib/index.js",
version: "5.1.1",
engines: {
node: ">=8.0.0"
},
repository: "eslint/eslint-scope",
bugs: {
url: "https://github.com/eslint/eslint-scope/issues"
},
license: "BSD-2-Clause",
scripts: {
test: "node Makefile.js test",
lint: "node Makefile.js lint",
"generate-release": "eslint-generate-release",
"generate-alpharelease": "eslint-generate-prerelease alpha",
"generate-betarelease": "eslint-generate-prerelease beta",
"generate-rcrelease": "eslint-generate-prerelease rc",
"publish-release": "eslint-publish-release"
},
files: [
"LICENSE",
"README.md",
"lib"
],
dependencies: {
esrecurse: "^4.3.0",
estraverse: "^4.1.1"
},
devDependencies: {
"@typescript-eslint/parser": "^1.11.0",
chai: "^4.2.0",
eslint: "^6.0.1",
"eslint-config-eslint": "^5.0.1",
"eslint-plugin-node": "^9.1.0",
"eslint-release": "^1.0.0",
"eslint-visitor-keys": "^1.2.0",
espree: "^7.1.0",
istanbul: "^0.4.5",
mocha: "^6.1.4",
"npm-license": "^0.3.3",
shelljs: "^0.8.3",
typescript: "^3.5.2"
}
};
}
});
// ../../node_modules/.pnpm/eslint-scope@5.1.1/node_modules/eslint-scope/lib/index.js
var require_lib4 = __commonJS({
"../../node_modules/.pnpm/eslint-scope@5.1.1/node_modules/eslint-scope/lib/index.js"(exports, module) {
"use strict";
init_shims();
var assert = __require("assert");
var ScopeManager = require_scope_manager();
var Referencer = require_referencer2();
var Reference = require_reference();
var Variable = require_variable2();
var Scope = require_scope2().Scope;
var version = require_package3().version;
function defaultOptions() {
return {
optimistic: false,
directive: false,
nodejsScope: false,
impliedStrict: false,
sourceType: "script",
// one of ['script', 'module']
ecmaVersion: 5,
childVisitorKeys: null,
fallback: "iteration"
};
}
function updateDeeply(target, override) {
function isHashObject(value) {
return typeof value === "object" && value instanceof Object && !(value instanceof Array) && !(value instanceof RegExp);
}
for (const key in override) {
if (Object.prototype.hasOwnProperty.call(override, key)) {
const val = override[key];
if (isHashObject(val)) {
if (isHashObject(target[key])) {
updateDeeply(target[key], val);
} else {
target[key] = updateDeeply({}, val);
}
} else {
target[key] = val;
}
}
}
return target;
}
function analyze(tree, providedOptions) {
const options = updateDeeply(defaultOptions(), providedOptions);
const scopeManager = new ScopeManager(options);
const referencer = new Referencer(options, scopeManager);
referencer.visit(tree);
assert(scopeManager.__currentScope === null, "currentScope should be null.");
return scopeManager;
}
module.exports = {
/** @name module:escope.version */
version,
/** @name module:escope.Reference */
Reference,
/** @name module:escope.Variable */
Variable,
/** @name module:escope.Scope */
Scope,
/** @name module:escope.ScopeManager */
ScopeManager,
analyze
};
}
});
// ../../node_modules/.pnpm/@typescript-eslint+utils@5.62.0_eslint@9.4.0_typescript@5.4.5/node_modules/@typescript-eslint/utils/dist/ts-eslint-scope/analyze.js
var require_analyze2 = __commonJS({
"../../node_modules/.pnpm/@typescript-eslint+utils@5.62.0_eslint@9.4.0_typescript@5.4.5/node_modules/@typescript-eslint/utils/dist/ts-eslint-scope/analyze.js"(exports) {
"use strict";
init_shims();
Object.defineProperty(exports, "__esModule", { value: true });
exports.analyze = void 0;
var eslint_scope_1 = require_lib4();
var analyze = eslint_scope_1.analyze;
exports.analyze = analyze;
}
});
// ../../node_modules/.pnpm/@typescript-eslint+utils@5.62.0_eslint@9.4.0_typescript@5.4.5/node_modules/@typescript-eslint/utils/dist/ts-eslint-scope/Definition.js
var require_Definition2 = __commonJS({
"../../node_modules/.pnpm/@typescript-eslint+utils@5.62.0_eslint@9.4.0_typescript@5.4.5/node_modules/@typescript-eslint/utils/dist/ts-eslint-scope/Definition.js"(exports) {
"use strict";
init_shims();
Object.defineProperty(exports, "__esModule", { value: true });
exports.ParameterDefinition = exports.Definition = void 0;
var definition_1 = require_definition2();
var Definition = definition_1.Definition;
exports.Definition = Definition;
var ParameterDefinition = definition_1.ParameterDefinition;
exports.ParameterDefinition = ParameterDefinition;
}
});
// ../../node_modules/.pnpm/@typescript-eslint+utils@5.62.0_eslint@9.4.0_typescript@5.4.5/node_modules/@typescript-eslint/utils/dist/ts-eslint-scope/Options.js
var require_Options = __commonJS({
"../../node_modules/.pnpm/@typescript-eslint+utils@5.62.0_eslint@9.4.0_typescript@5.4.5/node_modules/@typescript-eslint/utils/dist/ts-eslint-scope/Options.js"(exports) {
"use strict";
init_shims();
Object.defineProperty(exports, "__esModule", { value: true });
}
});
// ../../node_modules/.pnpm/@typescript-eslint+utils@5.62.0_eslint@9.4.0_typescript@5.4.5/node_modules/@typescript-eslint/utils/dist/ts-eslint-scope/PatternVisitor.js
var require_PatternVisitor2 = __commonJS({
"../../node_modules/.pnpm/@typescript-eslint+utils@5.62.0_eslint@9.4.0_typescript@5.4.5/node_modules/@typescript-eslint/utils/dist/ts-eslint-scope/PatternVisitor.js"(exports) {
"use strict";
init_shims();
var __importDefault2 = exports && exports.__importDefault || function(mod) {
return mod && mod.__esModule ? mod : { "default": mod };
};
Object.defineProperty(exports, "__esModule", { value: true });
exports.PatternVisitor = void 0;
var pattern_visitor_1 = __importDefault2(require_pattern_visitor());
var PatternVisitor = pattern_visitor_1.default;
exports.PatternVisitor = PatternVisitor;
}
});
// ../../node_modules/.pnpm/@typescript-eslint+utils@5.62.0_eslint@9.4.0_typescript@5.4.5/node_modules/@typescript-eslint/utils/dist/ts-eslint-scope/Reference.js
var require_Reference2 = __commonJS({
"../../node_modules/.pnpm/@typescript-eslint+utils@5.62.0_eslint@9.4.0_typescript@5.4.5/node_modules/@typescript-eslint/utils/dist/ts-eslint-scope/Reference.js"(exports) {
"use strict";
init_shims();
var __importDefault2 = exports && exports.__importDefault || function(mod) {
return mod && mod.__esModule ? mod : { "default": mod };
};
Object.defineProperty(exports, "__esModule", { value: true });
exports.Reference = void 0;
var reference_1 = __importDefault2(require_reference());
var Reference = reference_1.default;
exports.Reference = Reference;
}
});
// ../../node_modules/.pnpm/@typescript-eslint+utils@5.62.0_eslint@9.4.0_typescript@5.4.5/node_modules/@typescript-eslint/utils/dist/ts-eslint-scope/Referencer.js
var require_Referencer2 = __commonJS({
"../../node_modules/.pnpm/@typescript-eslint+utils@5.62.0_eslint@9.4.0_typescript@5.4.5/node_modules/@typescript-eslint/utils/dist/ts-eslint-scope/Referencer.js"(exports) {
"use strict";
init_shims();
var __importDefault2 = exports && exports.__importDefault || function(mod) {
return mod && mod.__esModule ? mod : { "default": mod };
};
Object.defineProperty(exports, "__esModule", { value: true });
exports.Referencer = void 0;
var referencer_1 = __importDefault2(require_referencer2());
var Referencer = referencer_1.default;
exports.Referencer = Referencer;
}
});
// ../../node_modules/.pnpm/@typescript-eslint+utils@5.62.0_eslint@9.4.0_typescript@5.4.5/node_modules/@typescript-eslint/utils/dist/ts-eslint-scope/Scope.js
var require_Scope3 = __commonJS({
"../../node_modules/.pnpm/@typescript-eslint+utils@5.62.0_eslint@9.4.0_typescript@5.4.5/node_modules/@typescript-eslint/utils/dist/ts-eslint-scope/Scope.js"(exports) {
"use strict";
init_shims();
Object.defineProperty(exports, "__esModule", { value: true });
exports.ClassScope = exports.ForScope = exports.FunctionScope = exports.SwitchScope = exports.BlockScope = exports.WithScope = exports.CatchScope = exports.FunctionExpressionNameScope = exports.ModuleScope = exports.GlobalScope = exports.Scope = void 0;
var scope_1 = require_scope2();
var Scope = scope_1.Scope;
exports.Scope = Scope;
var GlobalScope = scope_1.GlobalScope;
exports.GlobalScope = GlobalScope;
var ModuleScope = scope_1.ModuleScope;
exports.ModuleScope = ModuleScope;
var FunctionExpressionNameScope = scope_1.FunctionExpressionNameScope;
exports.FunctionExpressionNameScope = FunctionExpressionNameScope;
var CatchScope = scope_1.CatchScope;
exports.CatchScope = CatchScope;
var WithScope = scope_1.WithScope;
exports.WithScope = WithScope;
var BlockScope = scope_1.BlockScope;
exports.BlockScope = BlockScope;
var SwitchScope = scope_1.SwitchScope;
exports.SwitchScope = SwitchScope;
var FunctionScope = scope_1.FunctionScope;
exports.FunctionScope = FunctionScope;
var ForScope = scope_1.ForScope;
exports.ForScope = ForScope;
var ClassScope = scope_1.ClassScope;
exports.ClassScope = ClassScope;
}
});
// ../../node_modules/.pnpm/@typescript-eslint+utils@5.62.0_eslint@9.4.0_typescript@5.4.5/node_modules/@typescript-eslint/utils/dist/ts-eslint-scope/ScopeManager.js
var require_ScopeManager2 = __commonJS({
"../../node_modules/.pnpm/@typescript-eslint+utils@5.62.0_eslint@9.4.0_typescript@5.4.5/node_modules/@typescript-eslint/utils/dist/ts-eslint-scope/ScopeManager.js"(exports) {
"use strict";
init_shims();
var __importDefault2 = exports && exports.__importDefault || function(mod) {
return mod && mod.__esModule ? mod : { "default": mod };
};
Object.defineProperty(exports, "__esModule", { value: true });
exports.ScopeManager = void 0;
var scope_manager_1 = __importDefault2(require_scope_manager());
var ScopeManager = scope_manager_1.default;
exports.ScopeManager = ScopeManager;
}
});
// ../../node_modules/.pnpm/@typescript-eslint+utils@5.62.0_eslint@9.4.0_typescript@5.4.5/node_modules/@typescript-eslint/utils/dist/ts-eslint-scope/Variable.js
var require_Variable2 = __commonJS({
"../../node_modules/.pnpm/@typescript-eslint+utils@5.62.0_eslint@9.4.0_typescript@5.4.5/node_modules/@typescript-eslint/utils/dist/ts-eslint-scope/Variable.js"(exports) {
"use strict";
init_shims();
var __importDefault2 = exports && exports.__importDefault || function(mod) {
return mod && mod.__esModule ? mod : { "default": mod };
};
Object.defineProperty(exports, "__esModule", { value: true });
exports.Variable = void 0;
var variable_1 = __importDefault2(require_variable2());
var Variable = variable_1.default;
exports.Variable = Variable;
}
});
// ../../node_modules/.pnpm/@typescript-eslint+utils@5.62.0_eslint@9.4.0_typescript@5.4.5/node_modules/@typescript-eslint/utils/dist/ts-eslint-scope/index.js
var require_ts_eslint_scope = __commonJS({
"../../node_modules/.pnpm/@typescript-eslint+utils@5.62.0_eslint@9.4.0_typescript@5.4.5/node_modules/@typescript-eslint/utils/dist/ts-eslint-scope/index.js"(exports) {
"use strict";
init_shims();
var __createBinding2 = exports && exports.__createBinding || (Object.create ? function(o, m, k, k2) {
if (k2 === void 0) k2 = k;
var desc = Object.getOwnPropertyDescriptor(m, k);
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
desc = { enumerable: true, get: function() {
return m[k];
} };
}
Object.defineProperty(o, k2, desc);
} : function(o, m, k, k2) {
if (k2 === void 0) k2 = k;
o[k2] = m[k];
});
var __exportStar2 = exports && exports.__exportStar || function(m, exports2) {
for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports2, p)) __createBinding2(exports2, m, p);
};
Object.defineProperty(exports, "__esModule", { value: true });
exports.version = void 0;
var eslint_scope_1 = require_lib4();
__exportStar2(require_analyze2(), exports);
__exportStar2(require_Definition2(), exports);
__exportStar2(require_Options(), exports);
__exportStar2(require_PatternVisitor2(), exports);
__exportStar2(require_Reference2(), exports);
__exportStar2(require_Referencer2(), exports);
__exportStar2(require_Scope3(), exports);
__exportStar2(require_ScopeManager2(), exports);
__exportStar2(require_Variable2(), exports);
exports.version = eslint_scope_1.version;
}
});
// ../../node_modules/.pnpm/@typescript-eslint+utils@5.62.0_eslint@9.4.0_typescript@5.4.5/node_modules/@typescript-eslint/utils/dist/index.js
var require_dist5 = __commonJS({
"../../node_modules/.pnpm/@typescript-eslint+utils@5.62.0_eslint@9.4.0_typescript@5.4.5/node_modules/@typescript-eslint/utils/dist/index.js"(exports) {
"use strict";
init_shims();
var __createBinding2 = exports && exports.__createBinding || (Object.create ? function(o, m, k, k2) {
if (k2 === void 0) k2 = k;
var desc = Object.getOwnPropertyDescriptor(m, k);
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
desc = { enumerable: true, get: function() {
return m[k];
} };
}
Object.defineProperty(o, k2, desc);
} : function(o, m, k, k2) {
if (k2 === void 0) k2 = k;
o[k2] = m[k];
});
var __setModuleDefault2 = exports && exports.__setModuleDefault || (Object.create ? function(o, v) {
Object.defineProperty(o, "default", { enumerable: true, value: v });
} : function(o, v) {
o["default"] = v;
});
var __importStar2 = exports && exports.__importStar || function(mod) {
if (mod && mod.__esModule) return mod;
var result = {};
if (mod != null) {
for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding2(result, mod, k);
}
__setModuleDefault2(result, mod);
return result;
};
var __exportStar2 = exports && exports.__exportStar || function(m, exports2) {
for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports2, p)) __createBinding2(exports2, m, p);
};
Object.defineProperty(exports, "__esModule", { value: true });
exports.TSESLintScope = exports.TSESLint = exports.JSONSchema = exports.ESLintUtils = exports.ASTUtils = void 0;
var ASTUtils = __importStar2(require_ast_utils());
exports.ASTUtils = ASTUtils;
var ESLintUtils = __importStar2(require_eslint_utils3());
exports.ESLintUtils = ESLintUtils;
var JSONSchema = __importStar2(require_json_schema());
exports.JSONSchema = JSONSchema;
var TSESLint = __importStar2(require_ts_eslint());
exports.TSESLint = TSESLint;
var TSESLintScope = __importStar2(require_ts_eslint_scope());
exports.TSESLintScope = TSESLintScope;
__exportStar2(require_ts_estree2(), exports);
}
});
// ../../node_modules/.pnpm/eslint-plugin-import-x@0.4.4_patch_hash=4oryti2zfrehz2qi62zyaaa334_eslint@9.4.0_typescript@5.4.5/node_modules/eslint-plugin-import-x/package.json
var require_package4 = __commonJS({
"../../node_modules/.pnpm/eslint-plugin-import-x@0.4.4_patch_hash=4oryti2zfrehz2qi62zyaaa334_eslint@9.4.0_typescript@5.4.5/node_modules/eslint-plugin-import-x/package.json"(exports, module) {
module.exports = {
name: "eslint-plugin-import-x",
version: "0.4.4",
description: "Import with sanity.",
repository: "git+https://github.com/un-ts/eslint-plugin-import-x",
author: "JounQin <admin@1stg.me> (https://www.1stG.me)",
license: "MIT",
packageManager: "yarn@1.22.19",
engines: {
node: ">=16"
},
main: "lib/index.js",
exports: {
".": "./lib/index.js",
"./package.json": "./package.json",
"./*": "./lib/*"
},
files: [
"lib",
"!lib/*.tsbuildinfo"
],
keywords: [
"eslint",
"eslintplugin",
"eslint-plugin",
"es6",
"jsnext",
"modules",
"import",
"export"
],
scripts: {
build: "tsc -p src",
clean: "rimraf lib",
"codesandbox:install": "yarn --ignore-engines",
lint: "run-p lint:*",
"lint:docs": "yarn update:eslint-docs --check",
"lint:es": "eslint . --cache",
"lint:tsc": "tsc -p tsconfig.base.json --noEmit",
prepare: "patch-package",
release: "changeset publish",
test: "jest",
"test-compiled": "yarn build && cross-env TEST_COMPILED=1 jest",
"update:eslint-docs": "eslint-doc-generator --rule-doc-title-format prefix-name --rule-doc-section-options false --rule-list-split meta.docs.category --ignore-config stage-0 --config-emoji recommended,\u2611\uFE0F",
watch: "yarn test --watch"
},
peerDependencies: {
eslint: "^7.2.0 || ^8 || ^9.0.0-0"
},
dependencies: {
"@typescript-eslint/utils": "^5.62.0",
debug: "^4.3.4",
doctrine: "^3.0.0",
"eslint-compat-utils": "^0.5.0",
"eslint-import-resolver-node": "^0.3.9",
"get-tsconfig": "^4.7.3",
"is-glob": "^4.0.3",
minimatch: "^9.0.3",
semver: "^7.6.0"
},
devDependencies: {
"@1stg/prettier-config": "^4.0.1",
"@1stg/tsconfig": "^2.3.3",
"@angular-eslint/template-parser": "^17.3.0",
"@babel/core": "^7.24.0",
"@babel/eslint-parser": "^7.23.10",
"@babel/plugin-proposal-decorators": "^7.24.0",
"@babel/plugin-proposal-export-default-from": "^7.23.3",
"@babel/preset-env": "^7.24.0",
"@babel/preset-flow": "^7.24.0",
"@babel/preset-react": "^7.23.3",
"@babel/preset-typescript": "^7.23.3",
"@babel/register": "^7.23.7",
"@changesets/changelog-github": "^0.5.0",
"@changesets/cli": "^2.27.1",
"@eslint/import-test-order-redirect-scoped": "link:./test/fixtures/order-redirect-scoped",
"@swc-node/jest": "^1.8.0",
"@swc/core": "^1.4.8",
"@swc/helpers": "^0.5.7",
"@test-scope/some-module": "link:./test/fixtures/symlinked-module",
"@total-typescript/ts-reset": "^0.5.1",
"@types/debug": "^4.1.12",
"@types/doctrine": "^0.0.9",
"@types/eslint": "^8.56.5",
"@types/is-glob": "^4.0.4",
"@types/jest": "^29.5.12",
"@types/json-schema": "^7.0.15",
"@types/node": "^20.11.28",
"@typescript-eslint/eslint-plugin": "^5.62.0",
"@typescript-eslint/parser": "^5.62.0",
"@typescript-eslint/typescript-estree": "^5.62.0",
"@unts/patch-package": "^8.0.0",
"cross-env": "^7.0.3",
"enhanced-resolve": "^5.16.0",
escope: "^4.0.0",
eslint: "^7.2.0 || ^8",
"eslint-config-prettier": "^9.1.0",
"eslint-doc-generator": "^1.7.0",
"eslint-import-resolver-typescript": "^3.6.1",
"eslint-import-resolver-webpack": "^0.13.8",
"eslint-import-test-order-redirect": "link:./test/fixtures/order-redirect",
"eslint-plugin-eslint-plugin": "^5.4.0",
"eslint-plugin-import-x": "link:.",
"eslint-plugin-jest": "^27.9.0",
"eslint-plugin-json": "^3.1.0",
"eslint-plugin-n": "^16.6.2",
"eslint-plugin-prettier": "^5.1.3",
"eslint-plugin-unicorn": "^51.0.1",
jest: "^29.7.0",
"npm-run-all2": "^6.1.2",
prettier: "^3.2.5",
redux: "^5.0.1",
rimraf: "^5.0.5",
svelte: "^4.2.12",
"ts-node": "^10.9.2",
"type-fest": "^4.12.0",
typescript: "~5.1.0"
}
};
}
});
// ../../node_modules/.pnpm/eslint-plugin-import-x@0.4.4_patch_hash=4oryti2zfrehz2qi62zyaaa334_eslint@9.4.0_typescript@5.4.5/node_modules/eslint-plugin-import-x/lib/utils/docs-url.js
var require_docs_url = __commonJS({
"../../node_modules/.pnpm/eslint-plugin-import-x@0.4.4_patch_hash=4oryti2zfrehz2qi62zyaaa334_eslint@9.4.0_typescript@5.4.5/node_modules/eslint-plugin-import-x/lib/utils/docs-url.js"(exports) {
"use strict";
init_shims();
Object.defineProperty(exports, "__esModule", { value: true });
exports.docsUrl = void 0;
var tslib_1 = (init_tslib_es6(), __toCommonJS(tslib_es6_exports));
var package_json_1 = tslib_1.__importDefault(require_package4());
var repoUrl = "https://github.com/un-ts/eslint-plugin-import-x";
var docsUrl = (ruleName, commitish = `v${package_json_1.default.version}`) => `${repoUrl}/blob/${commitish}/docs/rules/${ruleName}.md`;
exports.docsUrl = docsUrl;
}
});
// ../../node_modules/.pnpm/eslint-plugin-import-x@0.4.4_patch_hash=4oryti2zfrehz2qi62zyaaa334_eslint@9.4.0_typescript@5.4.5/node_modules/eslint-plugin-import-x/lib/utils/create-rule.js
var require_create_rule = __commonJS({
"../../node_modules/.pnpm/eslint-plugin-import-x@0.4.4_patch_hash=4oryti2zfrehz2qi62zyaaa334_eslint@9.4.0_typescript@5.4.5/node_modules/eslint-plugin-import-x/lib/utils/create-rule.js"(exports) {
"use strict";
init_shims();
Object.defineProperty(exports, "__esModule", { value: true });
exports.createRule = void 0;
var utils_1 = require_dist5();
var docs_url_1 = require_docs_url();
exports.createRule = utils_1.ESLintUtils.RuleCreator(docs_url_1.docsUrl);
}
});
// ../../node_modules/.pnpm/eslint-plugin-import-x@0.4.4_patch_hash=4oryti2zfrehz2qi62zyaaa334_eslint@9.4.0_typescript@5.4.5/node_modules/eslint-plugin-import-x/lib/utils/get-scope.js
var require_get_scope = __commonJS({
"../../node_modules/.pnpm/eslint-plugin-import-x@0.4.4_patch_hash=4oryti2zfrehz2qi62zyaaa334_eslint@9.4.0_typescript@5.4.5/node_modules/eslint-plugin-import-x/lib/utils/get-scope.js"(exports) {
"use strict";
init_shims();
Object.defineProperty(exports, "__esModule", { value: true });
exports.getScope = void 0;
var eslint_compat_utils_1 = require_dist();
var getScope = (context, node2) => {
const sourceCode = (0, eslint_compat_utils_1.getSourceCode)(context);
return sourceCode.getScope(node2);
};
exports.getScope = getScope;
}
});
// ../../node_modules/.pnpm/eslint-plugin-import-x@0.4.4_patch_hash=4oryti2zfrehz2qi62zyaaa334_eslint@9.4.0_typescript@5.4.5/node_modules/eslint-plugin-import-x/lib/utils/declared-scope.js
var require_declared_scope = __commonJS({
"../../node_modules/.pnpm/eslint-plugin-import-x@0.4.4_patch_hash=4oryti2zfrehz2qi62zyaaa334_eslint@9.4.0_typescript@5.4.5/node_modules/eslint-plugin-import-x/lib/utils/declared-scope.js"(exports) {
"use strict";
init_shims();
Object.defineProperty(exports, "__esModule", { value: true });
exports.declaredScope = void 0;
var get_scope_1 = require_get_scope();
function declaredScope(context, node2, name) {
const references = (0, get_scope_1.getScope)(context, node2).references;
const reference = references.find((x) => x.identifier.name === name);
if (!reference || !reference.resolved) {
return;
}
return reference.resolved.scope.type;
}
exports.declaredScope = declaredScope;
}
});
// ../../node_modules/.pnpm/ms@2.1.2/node_modules/ms/index.js
var require_ms = __commonJS({
"../../node_modules/.pnpm/ms@2.1.2/node_modules/ms/index.js"(exports, module) {
"use strict";
init_shims();
var s = 1e3;
var m = s * 60;
var h = m * 60;
var d = h * 24;
var w = d * 7;
var y = d * 365.25;
module.exports = function(val, options) {
options = options || {};
var type = typeof val;
if (type === "string" && val.length > 0) {
return parse(val);
} else if (type === "number" && isFinite(val)) {
return options.long ? fmtLong(val) : fmtShort(val);
}
throw new Error(
"val is not a non-empty string or a valid number. val=" + JSON.stringify(val)
);
};
function parse(str) {
str = String(str);
if (str.length > 100) {
return;
}
var match = /^(-?(?:\d+)?\.?\d+) *(milliseconds?|msecs?|ms|seconds?|secs?|s|minutes?|mins?|m|hours?|hrs?|h|days?|d|weeks?|w|years?|yrs?|y)?$/i.exec(
str
);
if (!match) {
return;
}
var n = parseFloat(match[1]);
var type = (match[2] || "ms").toLowerCase();
switch (type) {
case "years":
case "year":
case "yrs":
case "yr":
case "y":
return n * y;
case "weeks":
case "week":
case "w":
return n * w;
case "days":
case "day":
case "d":
return n * d;
case "hours":
case "hour":
case "hrs":
case "hr":
case "h":
return n * h;
case "minutes":
case "minute":
case "mins":
case "min":
case "m":
return n * m;
case "seconds":
case "second":
case "secs":
case "sec":
case "s":
return n * s;
case "milliseconds":
case "millisecond":
case "msecs":
case "msec":
case "ms":
return n;
default:
return void 0;
}
}
function fmtShort(ms) {
var msAbs = Math.abs(ms);
if (msAbs >= d) {
return Math.round(ms / d) + "d";
}
if (msAbs >= h) {
return Math.round(ms / h) + "h";
}
if (msAbs >= m) {
return Math.round(ms / m) + "m";
}
if (msAbs >= s) {
return Math.round(ms / s) + "s";
}
return ms + "ms";
}
function fmtLong(ms) {
var msAbs = Math.abs(ms);
if (msAbs >= d) {
return plural(ms, msAbs, d, "day");
}
if (msAbs >= h) {
return plural(ms, msAbs, h, "hour");
}
if (msAbs >= m) {
return plural(ms, msAbs, m, "minute");
}
if (msAbs >= s) {
return plural(ms, msAbs, s, "second");
}
return ms + " ms";
}
function plural(ms, msAbs, n, name) {
var isPlural = msAbs >= n * 1.5;
return Math.round(ms / n) + " " + name + (isPlural ? "s" : "");
}
}
});
// ../../node_modules/.pnpm/debug@4.3.4/node_modules/debug/src/common.js
var require_common = __commonJS({
"../../node_modules/.pnpm/debug@4.3.4/node_modules/debug/src/common.js"(exports, module) {
"use strict";
init_shims();
function setup(env) {
createDebug.debug = createDebug;
createDebug.default = createDebug;
createDebug.coerce = coerce;
createDebug.disable = disable;
createDebug.enable = enable;
createDebug.enabled = enabled;
createDebug.humanize = require_ms();
createDebug.destroy = destroy;
Object.keys(env).forEach((key) => {
createDebug[key] = env[key];
});
createDebug.names = [];
createDebug.skips = [];
createDebug.formatters = {};
function selectColor(namespace) {
let hash = 0;
for (let i = 0; i < namespace.length; i++) {
hash = (hash << 5) - hash + namespace.charCodeAt(i);
hash |= 0;
}
return createDebug.colors[Math.abs(hash) % createDebug.colors.length];
}
createDebug.selectColor = selectColor;
function createDebug(namespace) {
let prevTime;
let enableOverride = null;
let namespacesCache;
let enabledCache;
function debug(...args) {
if (!debug.enabled) {
return;
}
const self2 = debug;
const curr = Number(/* @__PURE__ */ new Date());
const ms = curr - (prevTime || curr);
self2.diff = ms;
self2.prev = prevTime;
self2.curr = curr;
prevTime = curr;
args[0] = createDebug.coerce(args[0]);
if (typeof args[0] !== "string") {
args.unshift("%O");
}
let index = 0;
args[0] = args[0].replace(/%([a-zA-Z%])/g, (match, format) => {
if (match === "%%") {
return "%";
}
index++;
const formatter = createDebug.formatters[format];
if (typeof formatter === "function") {
const val = args[index];
match = formatter.call(self2, val);
args.splice(index, 1);
index--;
}
return match;
});
createDebug.formatArgs.call(self2, args);
const logFn = self2.log || createDebug.log;
logFn.apply(self2, args);
}
debug.namespace = namespace;
debug.useColors = createDebug.useColors();
debug.color = createDebug.selectColor(namespace);
debug.extend = extend;
debug.destroy = createDebug.destroy;
Object.defineProperty(debug, "enabled", {
enumerable: true,
configurable: false,
get: () => {
if (enableOverride !== null) {
return enableOverride;
}
if (namespacesCache !== createDebug.namespaces) {
namespacesCache = createDebug.namespaces;
enabledCache = createDebug.enabled(namespace);
}
return enabledCache;
},
set: (v) => {
enableOverride = v;
}
});
if (typeof createDebug.init === "function") {
createDebug.init(debug);
}
return debug;
}
function extend(namespace, delimiter) {
const newDebug = createDebug(this.namespace + (typeof delimiter === "undefined" ? ":" : delimiter) + namespace);
newDebug.log = this.log;
return newDebug;
}
function enable(namespaces) {
createDebug.save(namespaces);
createDebug.namespaces = namespaces;
createDebug.names = [];
createDebug.skips = [];
let i;
const split = (typeof namespaces === "string" ? namespaces : "").split(/[\s,]+/);
const len = split.length;
for (i = 0; i < len; i++) {
if (!split[i]) {
continue;
}
namespaces = split[i].replace(/\*/g, ".*?");
if (namespaces[0] === "-") {
createDebug.skips.push(new RegExp("^" + namespaces.slice(1) + "$"));
} else {
createDebug.names.push(new RegExp("^" + namespaces + "$"));
}
}
}
function disable() {
const namespaces = [
...createDebug.names.map(toNamespace),
...createDebug.skips.map(toNamespace).map((namespace) => "-" + namespace)
].join(",");
createDebug.enable("");
return namespaces;
}
function enabled(name) {
if (name[name.length - 1] === "*") {
return true;
}
let i;
let len;
for (i = 0, len = createDebug.skips.length; i < len; i++) {
if (createDebug.skips[i].test(name)) {
return false;
}
}
for (i = 0, len = createDebug.names.length; i < len; i++) {
if (createDebug.names[i].test(name)) {
return true;
}
}
return false;
}
function toNamespace(regexp) {
return regexp.toString().substring(2, regexp.toString().length - 2).replace(/\.\*\?$/, "*");
}
function coerce(val) {
if (val instanceof Error) {
return val.stack || val.message;
}
return val;
}
function destroy() {
console.warn("Instance method `debug.destroy()` is deprecated and no longer does anything. It will be removed in the next major version of `debug`.");
}
createDebug.enable(createDebug.load());
return createDebug;
}
module.exports = setup;
}
});
// ../../node_modules/.pnpm/debug@4.3.4/node_modules/debug/src/browser.js
var require_browser = __commonJS({
"../../node_modules/.pnpm/debug@4.3.4/node_modules/debug/src/browser.js"(exports, module) {
"use strict";
init_shims();
exports.formatArgs = formatArgs;
exports.save = save;
exports.load = load;
exports.useColors = useColors;
exports.storage = localstorage();
exports.destroy = /* @__PURE__ */ (() => {
let warned = false;
return () => {
if (!warned) {
warned = true;
console.warn("Instance method `debug.destroy()` is deprecated and no longer does anything. It will be removed in the next major version of `debug`.");
}
};
})();
exports.colors = [
"#0000CC",
"#0000FF",
"#0033CC",
"#0033FF",
"#0066CC",
"#0066FF",
"#0099CC",
"#0099FF",
"#00CC00",
"#00CC33",
"#00CC66",
"#00CC99",
"#00CCCC",
"#00CCFF",
"#3300CC",
"#3300FF",
"#3333CC",
"#3333FF",
"#3366CC",
"#3366FF",
"#3399CC",
"#3399FF",
"#33CC00",
"#33CC33",
"#33CC66",
"#33CC99",
"#33CCCC",
"#33CCFF",
"#6600CC",
"#6600FF",
"#6633CC",
"#6633FF",
"#66CC00",
"#66CC33",
"#9900CC",
"#9900FF",
"#9933CC",
"#9933FF",
"#99CC00",
"#99CC33",
"#CC0000",
"#CC0033",
"#CC0066",
"#CC0099",
"#CC00CC",
"#CC00FF",
"#CC3300",
"#CC3333",
"#CC3366",
"#CC3399",
"#CC33CC",
"#CC33FF",
"#CC6600",
"#CC6633",
"#CC9900",
"#CC9933",
"#CCCC00",
"#CCCC33",
"#FF0000",
"#FF0033",
"#FF0066",
"#FF0099",
"#FF00CC",
"#FF00FF",
"#FF3300",
"#FF3333",
"#FF3366",
"#FF3399",
"#FF33CC",
"#FF33FF",
"#FF6600",
"#FF6633",
"#FF9900",
"#FF9933",
"#FFCC00",
"#FFCC33"
];
function useColors() {
if (typeof window !== "undefined" && window.process && (window.process.type === "renderer" || window.process.__nwjs)) {
return true;
}
if (typeof navigator !== "undefined" && navigator.userAgent && navigator.userAgent.toLowerCase().match(/(edge|trident)\/(\d+)/)) {
return false;
}
return typeof document !== "undefined" && document.documentElement && document.documentElement.style && document.documentElement.style.WebkitAppearance || // Is firebug? http://stackoverflow.com/a/398120/376773
typeof window !== "undefined" && window.console && (window.console.firebug || window.console.exception && window.console.table) || // Is firefox >= v31?
// https://developer.mozilla.org/en-US/docs/Tools/Web_Console#Styling_messages
typeof navigator !== "undefined" && navigator.userAgent && navigator.userAgent.toLowerCase().match(/firefox\/(\d+)/) && parseInt(RegExp.$1, 10) >= 31 || // Double check webkit in userAgent just in case we are in a worker
typeof navigator !== "undefined" && navigator.userAgent && navigator.userAgent.toLowerCase().match(/applewebkit\/(\d+)/);
}
function formatArgs(args) {
args[0] = (this.useColors ? "%c" : "") + this.namespace + (this.useColors ? " %c" : " ") + args[0] + (this.useColors ? "%c " : " ") + "+" + module.exports.humanize(this.diff);
if (!this.useColors) {
return;
}
const c = "color: " + this.color;
args.splice(1, 0, c, "color: inherit");
let index = 0;
let lastC = 0;
args[0].replace(/%[a-zA-Z%]/g, (match) => {
if (match === "%%") {
return;
}
index++;
if (match === "%c") {
lastC = index;
}
});
args.splice(lastC, 0, c);
}
exports.log = console.debug || console.log || (() => {
});
function save(namespaces) {
try {
if (namespaces) {
exports.storage.setItem("debug", namespaces);
} else {
exports.storage.removeItem("debug");
}
} catch (error) {
}
}
function load() {
let r;
try {
r = exports.storage.getItem("debug");
} catch (error) {
}
if (!r && typeof process !== "undefined" && "env" in process) {
r = process.env.DEBUG;
}
return r;
}
function localstorage() {
try {
return localStorage;
} catch (error) {
}
}
module.exports = require_common()(exports);
var { formatters } = module.exports;
formatters.j = function(v) {
try {
return JSON.stringify(v);
} catch (error) {
return "[UnexpectedJSONParseError]: " + error.message;
}
};
}
});
// ../../node_modules/.pnpm/has-flag@4.0.0/node_modules/has-flag/index.js
var require_has_flag = __commonJS({
"../../node_modules/.pnpm/has-flag@4.0.0/node_modules/has-flag/index.js"(exports, module) {
"use strict";
init_shims();
module.exports = (flag, argv = process.argv) => {
const prefix = flag.startsWith("-") ? "" : flag.length === 1 ? "-" : "--";
const position = argv.indexOf(prefix + flag);
const terminatorPosition = argv.indexOf("--");
return position !== -1 && (terminatorPosition === -1 || position < terminatorPosition);
};
}
});
// ../../node_modules/.pnpm/supports-color@7.2.0/node_modules/supports-color/index.js
var require_supports_color = __commonJS({
"../../node_modules/.pnpm/supports-color@7.2.0/node_modules/supports-color/index.js"(exports, module) {
"use strict";
init_shims();
var os = __require("os");
var tty = __require("tty");
var hasFlag = require_has_flag();
var { env } = process;
var forceColor;
if (hasFlag("no-color") || hasFlag("no-colors") || hasFlag("color=false") || hasFlag("color=never")) {
forceColor = 0;
} else if (hasFlag("color") || hasFlag("colors") || hasFlag("color=true") || hasFlag("color=always")) {
forceColor = 1;
}
if ("FORCE_COLOR" in env) {
if (env.FORCE_COLOR === "true") {
forceColor = 1;
} else if (env.FORCE_COLOR === "false") {
forceColor = 0;
} else {
forceColor = env.FORCE_COLOR.length === 0 ? 1 : Math.min(parseInt(env.FORCE_COLOR, 10), 3);
}
}
function translateLevel(level) {
if (level === 0) {
return false;
}
return {
level,
hasBasic: true,
has256: level >= 2,
has16m: level >= 3
};
}
function supportsColor(haveStream, streamIsTTY) {
if (forceColor === 0) {
return 0;
}
if (hasFlag("color=16m") || hasFlag("color=full") || hasFlag("color=truecolor")) {
return 3;
}
if (hasFlag("color=256")) {
return 2;
}
if (haveStream && !streamIsTTY && forceColor === void 0) {
return 0;
}
const min = forceColor || 0;
if (env.TERM === "dumb") {
return min;
}
if (process.platform === "win32") {
const osRelease = os.release().split(".");
if (Number(osRelease[0]) >= 10 && Number(osRelease[2]) >= 10586) {
return Number(osRelease[2]) >= 14931 ? 3 : 2;
}
return 1;
}
if ("CI" in env) {
if (["TRAVIS", "CIRCLECI", "APPVEYOR", "GITLAB_CI", "GITHUB_ACTIONS", "BUILDKITE"].some((sign) => sign in env) || env.CI_NAME === "codeship") {
return 1;
}
return min;
}
if ("TEAMCITY_VERSION" in env) {
return /^(9\.(0*[1-9]\d*)\.|\d{2,}\.)/.test(env.TEAMCITY_VERSION) ? 1 : 0;
}
if (env.COLORTERM === "truecolor") {
return 3;
}
if ("TERM_PROGRAM" in env) {
const version = parseInt((env.TERM_PROGRAM_VERSION || "").split(".")[0], 10);
switch (env.TERM_PROGRAM) {
case "iTerm.app":
return version >= 3 ? 3 : 2;
case "Apple_Terminal":
return 2;
}
}
if (/-256(color)?$/i.test(env.TERM)) {
return 2;
}
if (/^screen|^xterm|^vt100|^vt220|^rxvt|color|ansi|cygwin|linux/i.test(env.TERM)) {
return 1;
}
if ("COLORTERM" in env) {
return 1;
}
return min;
}
function getSupportLevel(stream) {
const level = supportsColor(stream, stream && stream.isTTY);
return translateLevel(level);
}
module.exports = {
supportsColor: getSupportLevel,
stdout: translateLevel(supportsColor(true, tty.isatty(1))),
stderr: translateLevel(supportsColor(true, tty.isatty(2)))
};
}
});
// ../../node_modules/.pnpm/debug@4.3.4/node_modules/debug/src/node.js
var require_node = __commonJS({
"../../node_modules/.pnpm/debug@4.3.4/node_modules/debug/src/node.js"(exports, module) {
"use strict";
init_shims();
var tty = __require("tty");
var util = __require("util");
exports.init = init;
exports.log = log;
exports.formatArgs = formatArgs;
exports.save = save;
exports.load = load;
exports.useColors = useColors;
exports.destroy = util.deprecate(
() => {
},
"Instance method `debug.destroy()` is deprecated and no longer does anything. It will be removed in the next major version of `debug`."
);
exports.colors = [6, 2, 3, 4, 5, 1];
try {
const supportsColor = require_supports_color();
if (supportsColor && (supportsColor.stderr || supportsColor).level >= 2) {
exports.colors = [
20,
21,
26,
27,
32,
33,
38,
39,
40,
41,
42,
43,
44,
45,
56,
57,
62,
63,
68,
69,
74,
75,
76,
77,
78,
79,
80,
81,
92,
93,
98,
99,
112,
113,
128,
129,
134,
135,
148,
149,
160,
161,
162,
163,
164,
165,
166,
167,
168,
169,
170,
171,
172,
173,
178,
179,
184,
185,
196,
197,
198,
199,
200,
201,
202,
203,
204,
205,
206,
207,
208,
209,
214,
215,
220,
221
];
}
} catch (error) {
}
exports.inspectOpts = Object.keys(process.env).filter((key) => {
return /^debug_/i.test(key);
}).reduce((obj, key) => {
const prop = key.substring(6).toLowerCase().replace(/_([a-z])/g, (_, k) => {
return k.toUpperCase();
});
let val = process.env[key];
if (/^(yes|on|true|enabled)$/i.test(val)) {
val = true;
} else if (/^(no|off|false|disabled)$/i.test(val)) {
val = false;
} else if (val === "null") {
val = null;
} else {
val = Number(val);
}
obj[prop] = val;
return obj;
}, {});
function useColors() {
return "colors" in exports.inspectOpts ? Boolean(exports.inspectOpts.colors) : tty.isatty(process.stderr.fd);
}
function formatArgs(args) {
const { namespace: name, useColors: useColors2 } = this;
if (useColors2) {
const c = this.color;
const colorCode = "\x1B[3" + (c < 8 ? c : "8;5;" + c);
const prefix = ` ${colorCode};1m${name} \x1B[0m`;
args[0] = prefix + args[0].split("\n").join("\n" + prefix);
args.push(colorCode + "m+" + module.exports.humanize(this.diff) + "\x1B[0m");
} else {
args[0] = getDate() + name + " " + args[0];
}
}
function getDate() {
if (exports.inspectOpts.hideDate) {
return "";
}
return (/* @__PURE__ */ new Date()).toISOString() + " ";
}
function log(...args) {
return process.stderr.write(util.format(...args) + "\n");
}
function save(namespaces) {
if (namespaces) {
process.env.DEBUG = namespaces;
} else {
delete process.env.DEBUG;
}
}
function load() {
return process.env.DEBUG;
}
function init(debug) {
debug.inspectOpts = {};
const keys = Object.keys(exports.inspectOpts);
for (let i = 0; i < keys.length; i++) {
debug.inspectOpts[keys[i]] = exports.inspectOpts[keys[i]];
}
}
module.exports = require_common()(exports);
var { formatters } = module.exports;
formatters.o = function(v) {
this.inspectOpts.colors = this.useColors;
return util.inspect(v, this.inspectOpts).split("\n").map((str) => str.trim()).join(" ");
};
formatters.O = function(v) {
this.inspectOpts.colors = this.useColors;
return util.inspect(v, this.inspectOpts);
};
}
});
// ../../node_modules/.pnpm/debug@4.3.4/node_modules/debug/src/index.js
var require_src = __commonJS({
"../../node_modules/.pnpm/debug@4.3.4/node_modules/debug/src/index.js"(exports, module) {
"use strict";
init_shims();
if (typeof process === "undefined" || process.type === "renderer" || process.browser === true || process.__nwjs) {
module.exports = require_browser();
} else {
module.exports = require_node();
}
}
});
// ../../node_modules/.pnpm/esutils@2.0.3/node_modules/esutils/lib/ast.js
var require_ast = __commonJS({
"../../node_modules/.pnpm/esutils@2.0.3/node_modules/esutils/lib/ast.js"(exports, module) {
"use strict";
init_shims();
(function() {
"use strict";
function isExpression(node2) {
if (node2 == null) {
return false;
}
switch (node2.type) {
case "ArrayExpression":
case "AssignmentExpression":
case "BinaryExpression":
case "CallExpression":
case "ConditionalExpression":
case "FunctionExpression":
case "Identifier":
case "Literal":
case "LogicalExpression":
case "MemberExpression":
case "NewExpression":
case "ObjectExpression":
case "SequenceExpression":
case "ThisExpression":
case "UnaryExpression":
case "UpdateExpression":
return true;
}
return false;
}
function isIterationStatement(node2) {
if (node2 == null) {
return false;
}
switch (node2.type) {
case "DoWhileStatement":
case "ForInStatement":
case "ForStatement":
case "WhileStatement":
return true;
}
return false;
}
function isStatement(node2) {
if (node2 == null) {
return false;
}
switch (node2.type) {
case "BlockStatement":
case "BreakStatement":
case "ContinueStatement":
case "DebuggerStatement":
case "DoWhileStatement":
case "EmptyStatement":
case "ExpressionStatement":
case "ForInStatement":
case "ForStatement":
case "IfStatement":
case "LabeledStatement":
case "ReturnStatement":
case "SwitchStatement":
case "ThrowStatement":
case "TryStatement":
case "VariableDeclaration":
case "WhileStatement":
case "WithStatement":
return true;
}
return false;
}
function isSourceElement(node2) {
return isStatement(node2) || node2 != null && node2.type === "FunctionDeclaration";
}
function trailingStatement(node2) {
switch (node2.type) {
case "IfStatement":
if (node2.alternate != null) {
return node2.alternate;
}
return node2.consequent;
case "LabeledStatement":
case "ForStatement":
case "ForInStatement":
case "WhileStatement":
case "WithStatement":
return node2.body;
}
return null;
}
function isProblematicIfStatement(node2) {
var current;
if (node2.type !== "IfStatement") {
return false;
}
if (node2.alternate == null) {
return false;
}
current = node2.consequent;
do {
if (current.type === "IfStatement") {
if (current.alternate == null) {
return true;
}
}
current = trailingStatement(current);
} while (current);
return false;
}
module.exports = {
isExpression,
isStatement,
isIterationStatement,
isSourceElement,
isProblematicIfStatement,
trailingStatement
};
})();
}
});
// ../../node_modules/.pnpm/esutils@2.0.3/node_modules/esutils/lib/code.js
var require_code = __commonJS({
"../../node_modules/.pnpm/esutils@2.0.3/node_modules/esutils/lib/code.js"(exports, module) {
"use strict";
init_shims();
(function() {
"use strict";
var ES6Regex, ES5Regex, NON_ASCII_WHITESPACES, IDENTIFIER_START, IDENTIFIER_PART, ch;
ES5Regex = {
// ECMAScript 5.1/Unicode v9.0.0 NonAsciiIdentifierStart:
NonAsciiIdentifierStart: /[\xAA\xB5\xBA\xC0-\xD6\xD8-\xF6\xF8-\u02C1\u02C6-\u02D1\u02E0-\u02E4\u02EC\u02EE\u0370-\u0374\u0376\u0377\u037A-\u037D\u037F\u0386\u0388-\u038A\u038C\u038E-\u03A1\u03A3-\u03F5\u03F7-\u0481\u048A-\u052F\u0531-\u0556\u0559\u0561-\u0587\u05D0-\u05EA\u05F0-\u05F2\u0620-\u064A\u066E\u066F\u0671-\u06D3\u06D5\u06E5\u06E6\u06EE\u06EF\u06FA-\u06FC\u06FF\u0710\u0712-\u072F\u074D-\u07A5\u07B1\u07CA-\u07EA\u07F4\u07F5\u07FA\u0800-\u0815\u081A\u0824\u0828\u0840-\u0858\u08A0-\u08B4\u08B6-\u08BD\u0904-\u0939\u093D\u0950\u0958-\u0961\u0971-\u0980\u0985-\u098C\u098F\u0990\u0993-\u09A8\u09AA-\u09B0\u09B2\u09B6-\u09B9\u09BD\u09CE\u09DC\u09DD\u09DF-\u09E1\u09F0\u09F1\u0A05-\u0A0A\u0A0F\u0A10\u0A13-\u0A28\u0A2A-\u0A30\u0A32\u0A33\u0A35\u0A36\u0A38\u0A39\u0A59-\u0A5C\u0A5E\u0A72-\u0A74\u0A85-\u0A8D\u0A8F-\u0A91\u0A93-\u0AA8\u0AAA-\u0AB0\u0AB2\u0AB3\u0AB5-\u0AB9\u0ABD\u0AD0\u0AE0\u0AE1\u0AF9\u0B05-\u0B0C\u0B0F\u0B10\u0B13-\u0B28\u0B2A-\u0B30\u0B32\u0B33\u0B35-\u0B39\u0B3D\u0B5C\u0B5D\u0B5F-\u0B61\u0B71\u0B83\u0B85-\u0B8A\u0B8E-\u0B90\u0B92-\u0B95\u0B99\u0B9A\u0B9C\u0B9E\u0B9F\u0BA3\u0BA4\u0BA8-\u0BAA\u0BAE-\u0BB9\u0BD0\u0C05-\u0C0C\u0C0E-\u0C10\u0C12-\u0C28\u0C2A-\u0C39\u0C3D\u0C58-\u0C5A\u0C60\u0C61\u0C80\u0C85-\u0C8C\u0C8E-\u0C90\u0C92-\u0CA8\u0CAA-\u0CB3\u0CB5-\u0CB9\u0CBD\u0CDE\u0CE0\u0CE1\u0CF1\u0CF2\u0D05-\u0D0C\u0D0E-\u0D10\u0D12-\u0D3A\u0D3D\u0D4E\u0D54-\u0D56\u0D5F-\u0D61\u0D7A-\u0D7F\u0D85-\u0D96\u0D9A-\u0DB1\u0DB3-\u0DBB\u0DBD\u0DC0-\u0DC6\u0E01-\u0E30\u0E32\u0E33\u0E40-\u0E46\u0E81\u0E82\u0E84\u0E87\u0E88\u0E8A\u0E8D\u0E94-\u0E97\u0E99-\u0E9F\u0EA1-\u0EA3\u0EA5\u0EA7\u0EAA\u0EAB\u0EAD-\u0EB0\u0EB2\u0EB3\u0EBD\u0EC0-\u0EC4\u0EC6\u0EDC-\u0EDF\u0F00\u0F40-\u0F47\u0F49-\u0F6C\u0F88-\u0F8C\u1000-\u102A\u103F\u1050-\u1055\u105A-\u105D\u1061\u1065\u1066\u106E-\u1070\u1075-\u1081\u108E\u10A0-\u10C5\u10C7\u10CD\u10D0-\u10FA\u10FC-\u1248\u124A-\u124D\u1250-\u1256\u1258\u125A-\u125D\u1260-\u1288\u128A-\u128D\u1290-\u12B0\u12B2-\u12B5\u12B8-\u12BE\u12C0\u12C2-\u12C5\u12C8-\u12D6\u12D8-\u1310\u1312-\u1315\u1318-\u135A\u1380-\u138F\u13A0-\u13F5\u13F8-\u13FD\u1401-\u166C\u166F-\u167F\u1681-\u169A\u16A0-\u16EA\u16EE-\u16F8\u1700-\u170C\u170E-\u1711\u1720-\u1731\u1740-\u1751\u1760-\u176C\u176E-\u1770\u1780-\u17B3\u17D7\u17DC\u1820-\u1877\u1880-\u1884\u1887-\u18A8\u18AA\u18B0-\u18F5\u1900-\u191E\u1950-\u196D\u1970-\u1974\u1980-\u19AB\u19B0-\u19C9\u1A00-\u1A16\u1A20-\u1A54\u1AA7\u1B05-\u1B33\u1B45-\u1B4B\u1B83-\u1BA0\u1BAE\u1BAF\u1BBA-\u1BE5\u1C00-\u1C23\u1C4D-\u1C4F\u1C5A-\u1C7D\u1C80-\u1C88\u1CE9-\u1CEC\u1CEE-\u1CF1\u1CF5\u1CF6\u1D00-\u1DBF\u1E00-\u1F15\u1F18-\u1F1D\u1F20-\u1F45\u1F48-\u1F4D\u1F50-\u1F57\u1F59\u1F5B\u1F5D\u1F5F-\u1F7D\u1F80-\u1FB4\u1FB6-\u1FBC\u1FBE\u1FC2-\u1FC4\u1FC6-\u1FCC\u1FD0-\u1FD3\u1FD6-\u1FDB\u1FE0-\u1FEC\u1FF2-\u1FF4\u1FF6-\u1FFC\u2071\u207F\u2090-\u209C\u2102\u2107\u210A-\u2113\u2115\u2119-\u211D\u2124\u2126\u2128\u212A-\u212D\u212F-\u2139\u213C-\u213F\u2145-\u2149\u214E\u2160-\u2188\u2C00-\u2C2E\u2C30-\u2C5E\u2C60-\u2CE4\u2CEB-\u2CEE\u2CF2\u2CF3\u2D00-\u2D25\u2D27\u2D2D\u2D30-\u2D67\u2D6F\u2D80-\u2D96\u2DA0-\u2DA6\u2DA8-\u2DAE\u2DB0-\u2DB6\u2DB8-\u2DBE\u2DC0-\u2DC6\u2DC8-\u2DCE\u2DD0-\u2DD6\u2DD8-\u2DDE\u2E2F\u3005-\u3007\u3021-\u3029\u3031-\u3035\u3038-\u303C\u3041-\u3096\u309D-\u309F\u30A1-\u30FA\u30FC-\u30FF\u3105-\u312D\u3131-\u318E\u31A0-\u31BA\u31F0-\u31FF\u3400-\u4DB5\u4E00-\u9FD5\uA000-\uA48C\uA4D0-\uA4FD\uA500-\uA60C\uA610-\uA61F\uA62A\uA62B\uA640-\uA66E\uA67F-\uA69D\uA6A0-\uA6EF\uA717-\uA71F\uA722-\uA788\uA78B-\uA7AE\uA7B0-\uA7B7\uA7F7-\uA801\uA803-\uA805\uA807-\uA80A\uA80C-\uA822\uA840-\uA873\uA882-\uA8B3\uA8F2-\uA8F7\uA8FB\uA8FD\uA90A-\uA925\uA930-\uA946\uA960-\uA97C\uA984-\uA9B2\uA9CF\uA9E0-\uA9E4\uA9E6-\uA9EF\uA9FA-\uA9FE\uAA00-\uAA28\uAA40-\uAA42\uAA44-\uAA4B\uAA60-\uAA76\uAA7A\uAA7E-\uAAAF\uAAB1\uAAB5\uAAB6\uAAB9-\uAABD\uAAC0\uAAC2\uAADB-\uAADD\uAAE0-\uAAEA\uAAF2-\uAAF4\uAB01-\uAB06\uAB09-\uAB0E\uAB11-\uAB16\uAB20-\uAB26\uAB28-\uAB2E\uAB30-\uAB5A\uAB5C-\uAB65\uAB70-\uABE2\uAC00-\uD7A3\uD7B0-\uD7C6\uD7CB-\uD7FB\uF900-\uFA6D\uFA70-\uFAD9\uFB00-\uFB06\uFB13-\uFB17\uFB1D\uFB1F-\uFB28\uFB2A-\uFB36\uFB38-\uFB3C\uFB3E\uFB40\uFB41\uFB43\uFB44\uFB46-\uFBB1\uFBD3-\uFD3D\uFD50-\uFD8F\uFD92-\uFDC7\uFDF0-\uFDFB\uFE70-\uFE74\uFE76-\uFEFC\uFF21-\uFF3A\uFF41-\uFF5A\uFF66-\uFFBE\uFFC2-\uFFC7\uFFCA-\uFFCF\uFFD2-\uFFD7\uFFDA-\uFFDC]/,
// ECMAScript 5.1/Unicode v9.0.0 NonAsciiIdentifierPart:
NonAsciiIdentifierPart: /[\xAA\xB5\xBA\xC0-\xD6\xD8-\xF6\xF8-\u02C1\u02C6-\u02D1\u02E0-\u02E4\u02EC\u02EE\u0300-\u0374\u0376\u0377\u037A-\u037D\u037F\u0386\u0388-\u038A\u038C\u038E-\u03A1\u03A3-\u03F5\u03F7-\u0481\u0483-\u0487\u048A-\u052F\u0531-\u0556\u0559\u0561-\u0587\u0591-\u05BD\u05BF\u05C1\u05C2\u05C4\u05C5\u05C7\u05D0-\u05EA\u05F0-\u05F2\u0610-\u061A\u0620-\u0669\u066E-\u06D3\u06D5-\u06DC\u06DF-\u06E8\u06EA-\u06FC\u06FF\u0710-\u074A\u074D-\u07B1\u07C0-\u07F5\u07FA\u0800-\u082D\u0840-\u085B\u08A0-\u08B4\u08B6-\u08BD\u08D4-\u08E1\u08E3-\u0963\u0966-\u096F\u0971-\u0983\u0985-\u098C\u098F\u0990\u0993-\u09A8\u09AA-\u09B0\u09B2\u09B6-\u09B9\u09BC-\u09C4\u09C7\u09C8\u09CB-\u09CE\u09D7\u09DC\u09DD\u09DF-\u09E3\u09E6-\u09F1\u0A01-\u0A03\u0A05-\u0A0A\u0A0F\u0A10\u0A13-\u0A28\u0A2A-\u0A30\u0A32\u0A33\u0A35\u0A36\u0A38\u0A39\u0A3C\u0A3E-\u0A42\u0A47\u0A48\u0A4B-\u0A4D\u0A51\u0A59-\u0A5C\u0A5E\u0A66-\u0A75\u0A81-\u0A83\u0A85-\u0A8D\u0A8F-\u0A91\u0A93-\u0AA8\u0AAA-\u0AB0\u0AB2\u0AB3\u0AB5-\u0AB9\u0ABC-\u0AC5\u0AC7-\u0AC9\u0ACB-\u0ACD\u0AD0\u0AE0-\u0AE3\u0AE6-\u0AEF\u0AF9\u0B01-\u0B03\u0B05-\u0B0C\u0B0F\u0B10\u0B13-\u0B28\u0B2A-\u0B30\u0B32\u0B33\u0B35-\u0B39\u0B3C-\u0B44\u0B47\u0B48\u0B4B-\u0B4D\u0B56\u0B57\u0B5C\u0B5D\u0B5F-\u0B63\u0B66-\u0B6F\u0B71\u0B82\u0B83\u0B85-\u0B8A\u0B8E-\u0B90\u0B92-\u0B95\u0B99\u0B9A\u0B9C\u0B9E\u0B9F\u0BA3\u0BA4\u0BA8-\u0BAA\u0BAE-\u0BB9\u0BBE-\u0BC2\u0BC6-\u0BC8\u0BCA-\u0BCD\u0BD0\u0BD7\u0BE6-\u0BEF\u0C00-\u0C03\u0C05-\u0C0C\u0C0E-\u0C10\u0C12-\u0C28\u0C2A-\u0C39\u0C3D-\u0C44\u0C46-\u0C48\u0C4A-\u0C4D\u0C55\u0C56\u0C58-\u0C5A\u0C60-\u0C63\u0C66-\u0C6F\u0C80-\u0C83\u0C85-\u0C8C\u0C8E-\u0C90\u0C92-\u0CA8\u0CAA-\u0CB3\u0CB5-\u0CB9\u0CBC-\u0CC4\u0CC6-\u0CC8\u0CCA-\u0CCD\u0CD5\u0CD6\u0CDE\u0CE0-\u0CE3\u0CE6-\u0CEF\u0CF1\u0CF2\u0D01-\u0D03\u0D05-\u0D0C\u0D0E-\u0D10\u0D12-\u0D3A\u0D3D-\u0D44\u0D46-\u0D48\u0D4A-\u0D4E\u0D54-\u0D57\u0D5F-\u0D63\u0D66-\u0D6F\u0D7A-\u0D7F\u0D82\u0D83\u0D85-\u0D96\u0D9A-\u0DB1\u0DB3-\u0DBB\u0DBD\u0DC0-\u0DC6\u0DCA\u0DCF-\u0DD4\u0DD6\u0DD8-\u0DDF\u0DE6-\u0DEF\u0DF2\u0DF3\u0E01-\u0E3A\u0E40-\u0E4E\u0E50-\u0E59\u0E81\u0E82\u0E84\u0E87\u0E88\u0E8A\u0E8D\u0E94-\u0E97\u0E99-\u0E9F\u0EA1-\u0EA3\u0EA5\u0EA7\u0EAA\u0EAB\u0EAD-\u0EB9\u0EBB-\u0EBD\u0EC0-\u0EC4\u0EC6\u0EC8-\u0ECD\u0ED0-\u0ED9\u0EDC-\u0EDF\u0F00\u0F18\u0F19\u0F20-\u0F29\u0F35\u0F37\u0F39\u0F3E-\u0F47\u0F49-\u0F6C\u0F71-\u0F84\u0F86-\u0F97\u0F99-\u0FBC\u0FC6\u1000-\u1049\u1050-\u109D\u10A0-\u10C5\u10C7\u10CD\u10D0-\u10FA\u10FC-\u1248\u124A-\u124D\u1250-\u1256\u1258\u125A-\u125D\u1260-\u1288\u128A-\u128D\u1290-\u12B0\u12B2-\u12B5\u12B8-\u12BE\u12C0\u12C2-\u12C5\u12C8-\u12D6\u12D8-\u1310\u1312-\u1315\u1318-\u135A\u135D-\u135F\u1380-\u138F\u13A0-\u13F5\u13F8-\u13FD\u1401-\u166C\u166F-\u167F\u1681-\u169A\u16A0-\u16EA\u16EE-\u16F8\u1700-\u170C\u170E-\u1714\u1720-\u1734\u1740-\u1753\u1760-\u176C\u176E-\u1770\u1772\u1773\u1780-\u17D3\u17D7\u17DC\u17DD\u17E0-\u17E9\u180B-\u180D\u1810-\u1819\u1820-\u1877\u1880-\u18AA\u18B0-\u18F5\u1900-\u191E\u1920-\u192B\u1930-\u193B\u1946-\u196D\u1970-\u1974\u1980-\u19AB\u19B0-\u19C9\u19D0-\u19D9\u1A00-\u1A1B\u1A20-\u1A5E\u1A60-\u1A7C\u1A7F-\u1A89\u1A90-\u1A99\u1AA7\u1AB0-\u1ABD\u1B00-\u1B4B\u1B50-\u1B59\u1B6B-\u1B73\u1B80-\u1BF3\u1C00-\u1C37\u1C40-\u1C49\u1C4D-\u1C7D\u1C80-\u1C88\u1CD0-\u1CD2\u1CD4-\u1CF6\u1CF8\u1CF9\u1D00-\u1DF5\u1DFB-\u1F15\u1F18-\u1F1D\u1F20-\u1F45\u1F48-\u1F4D\u1F50-\u1F57\u1F59\u1F5B\u1F5D\u1F5F-\u1F7D\u1F80-\u1FB4\u1FB6-\u1FBC\u1FBE\u1FC2-\u1FC4\u1FC6-\u1FCC\u1FD0-\u1FD3\u1FD6-\u1FDB\u1FE0-\u1FEC\u1FF2-\u1FF4\u1FF6-\u1FFC\u200C\u200D\u203F\u2040\u2054\u2071\u207F\u2090-\u209C\u20D0-\u20DC\u20E1\u20E5-\u20F0\u2102\u2107\u210A-\u2113\u2115\u2119-\u211D\u2124\u2126\u2128\u212A-\u212D\u212F-\u2139\u213C-\u213F\u2145-\u2149\u214E\u2160-\u2188\u2C00-\u2C2E\u2C30-\u2C5E\u2C60-\u2CE4\u2CEB-\u2CF3\u2D00-\u2D25\u2D27\u2D2D\u2D30-\u2D67\u2D6F\u2D7F-\u2D96\u2DA0-\u2DA6\u2DA8-\u2DAE\u2DB0-\u2DB6\u2DB8-\u2DBE\u2DC0-\u2DC6\u2DC8-\u2DCE\u2DD0-\u2DD6\u2DD8-\u2DDE\u2DE0-\u2DFF\u2E2F\u3005-\u3007\u3021-\u302F\u3031-\u3035\u3038-\u303C\u3041-\u3096\u3099\u309A\u309D-\u309F\u30A1-\u30FA\u30FC-\u30FF\u3105-\u312D\u3131-\u318E\u31A0-\u31BA\u31F0-\u31FF\u3400-\u4DB5\u4E00-\u9FD5\uA000-\uA48C\uA4D0-\uA4FD\uA500-\uA60C\uA610-\uA62B\uA640-\uA66F\uA674-\uA67D\uA67F-\uA6F1\uA717-\uA71F\uA722-\uA788\uA78B-\uA7AE\uA7B0-\uA7B7\uA7F7-\uA827\uA840-\uA873\uA880-\uA8C5\uA8D0-\uA8D9\uA8E0-\uA8F7\uA8FB\uA8FD\uA900-\uA92D\uA930-\uA953\uA960-\uA97C\uA980-\uA9C0\uA9CF-\uA9D9\uA9E0-\uA9FE\uAA00-\uAA36\uAA40-\uAA4D\uAA50-\uAA59\uAA60-\uAA76\uAA7A-\uAAC2\uAADB-\uAADD\uAAE0-\uAAEF\uAAF2-\uAAF6\uAB01-\uAB06\uAB09-\uAB0E\uAB11-\uAB16\uAB20-\uAB26\uAB28-\uAB2E\uAB30-\uAB5A\uAB5C-\uAB65\uAB70-\uABEA\uABEC\uABED\uABF0-\uABF9\uAC00-\uD7A3\uD7B0-\uD7C6\uD7CB-\uD7FB\uF900-\uFA6D\uFA70-\uFAD9\uFB00-\uFB06\uFB13-\uFB17\uFB1D-\uFB28\uFB2A-\uFB36\uFB38-\uFB3C\uFB3E\uFB40\uFB41\uFB43\uFB44\uFB46-\uFBB1\uFBD3-\uFD3D\uFD50-\uFD8F\uFD92-\uFDC7\uFDF0-\uFDFB\uFE00-\uFE0F\uFE20-\uFE2F\uFE33\uFE34\uFE4D-\uFE4F\uFE70-\uFE74\uFE76-\uFEFC\uFF10-\uFF19\uFF21-\uFF3A\uFF3F\uFF41-\uFF5A\uFF66-\uFFBE\uFFC2-\uFFC7\uFFCA-\uFFCF\uFFD2-\uFFD7\uFFDA-\uFFDC]/
};
ES6Regex = {
// ECMAScript 6/Unicode v9.0.0 NonAsciiIdentifierStart:
NonAsciiIdentifierStart: /[\xAA\xB5\xBA\xC0-\xD6\xD8-\xF6\xF8-\u02C1\u02C6-\u02D1\u02E0-\u02E4\u02EC\u02EE\u0370-\u0374\u0376\u0377\u037A-\u037D\u037F\u0386\u0388-\u038A\u038C\u038E-\u03A1\u03A3-\u03F5\u03F7-\u0481\u048A-\u052F\u0531-\u0556\u0559\u0561-\u0587\u05D0-\u05EA\u05F0-\u05F2\u0620-\u064A\u066E\u066F\u0671-\u06D3\u06D5\u06E5\u06E6\u06EE\u06EF\u06FA-\u06FC\u06FF\u0710\u0712-\u072F\u074D-\u07A5\u07B1\u07CA-\u07EA\u07F4\u07F5\u07FA\u0800-\u0815\u081A\u0824\u0828\u0840-\u0858\u08A0-\u08B4\u08B6-\u08BD\u0904-\u0939\u093D\u0950\u0958-\u0961\u0971-\u0980\u0985-\u098C\u098F\u0990\u0993-\u09A8\u09AA-\u09B0\u09B2\u09B6-\u09B9\u09BD\u09CE\u09DC\u09DD\u09DF-\u09E1\u09F0\u09F1\u0A05-\u0A0A\u0A0F\u0A10\u0A13-\u0A28\u0A2A-\u0A30\u0A32\u0A33\u0A35\u0A36\u0A38\u0A39\u0A59-\u0A5C\u0A5E\u0A72-\u0A74\u0A85-\u0A8D\u0A8F-\u0A91\u0A93-\u0AA8\u0AAA-\u0AB0\u0AB2\u0AB3\u0AB5-\u0AB9\u0ABD\u0AD0\u0AE0\u0AE1\u0AF9\u0B05-\u0B0C\u0B0F\u0B10\u0B13-\u0B28\u0B2A-\u0B30\u0B32\u0B33\u0B35-\u0B39\u0B3D\u0B5C\u0B5D\u0B5F-\u0B61\u0B71\u0B83\u0B85-\u0B8A\u0B8E-\u0B90\u0B92-\u0B95\u0B99\u0B9A\u0B9C\u0B9E\u0B9F\u0BA3\u0BA4\u0BA8-\u0BAA\u0BAE-\u0BB9\u0BD0\u0C05-\u0C0C\u0C0E-\u0C10\u0C12-\u0C28\u0C2A-\u0C39\u0C3D\u0C58-\u0C5A\u0C60\u0C61\u0C80\u0C85-\u0C8C\u0C8E-\u0C90\u0C92-\u0CA8\u0CAA-\u0CB3\u0CB5-\u0CB9\u0CBD\u0CDE\u0CE0\u0CE1\u0CF1\u0CF2\u0D05-\u0D0C\u0D0E-\u0D10\u0D12-\u0D3A\u0D3D\u0D4E\u0D54-\u0D56\u0D5F-\u0D61\u0D7A-\u0D7F\u0D85-\u0D96\u0D9A-\u0DB1\u0DB3-\u0DBB\u0DBD\u0DC0-\u0DC6\u0E01-\u0E30\u0E32\u0E33\u0E40-\u0E46\u0E81\u0E82\u0E84\u0E87\u0E88\u0E8A\u0E8D\u0E94-\u0E97\u0E99-\u0E9F\u0EA1-\u0EA3\u0EA5\u0EA7\u0EAA\u0EAB\u0EAD-\u0EB0\u0EB2\u0EB3\u0EBD\u0EC0-\u0EC4\u0EC6\u0EDC-\u0EDF\u0F00\u0F40-\u0F47\u0F49-\u0F6C\u0F88-\u0F8C\u1000-\u102A\u103F\u1050-\u1055\u105A-\u105D\u1061\u1065\u1066\u106E-\u1070\u1075-\u1081\u108E\u10A0-\u10C5\u10C7\u10CD\u10D0-\u10FA\u10FC-\u1248\u124A-\u124D\u1250-\u1256\u1258\u125A-\u125D\u1260-\u1288\u128A-\u128D\u1290-\u12B0\u12B2-\u12B5\u12B8-\u12BE\u12C0\u12C2-\u12C5\u12C8-\u12D6\u12D8-\u1310\u1312-\u1315\u1318-\u135A\u1380-\u138F\u13A0-\u13F5\u13F8-\u13FD\u1401-\u166C\u166F-\u167F\u1681-\u169A\u16A0-\u16EA\u16EE-\u16F8\u1700-\u170C\u170E-\u1711\u1720-\u1731\u1740-\u1751\u1760-\u176C\u176E-\u1770\u1780-\u17B3\u17D7\u17DC\u1820-\u1877\u1880-\u18A8\u18AA\u18B0-\u18F5\u1900-\u191E\u1950-\u196D\u1970-\u1974\u1980-\u19AB\u19B0-\u19C9\u1A00-\u1A16\u1A20-\u1A54\u1AA7\u1B05-\u1B33\u1B45-\u1B4B\u1B83-\u1BA0\u1BAE\u1BAF\u1BBA-\u1BE5\u1C00-\u1C23\u1C4D-\u1C4F\u1C5A-\u1C7D\u1C80-\u1C88\u1CE9-\u1CEC\u1CEE-\u1CF1\u1CF5\u1CF6\u1D00-\u1DBF\u1E00-\u1F15\u1F18-\u1F1D\u1F20-\u1F45\u1F48-\u1F4D\u1F50-\u1F57\u1F59\u1F5B\u1F5D\u1F5F-\u1F7D\u1F80-\u1FB4\u1FB6-\u1FBC\u1FBE\u1FC2-\u1FC4\u1FC6-\u1FCC\u1FD0-\u1FD3\u1FD6-\u1FDB\u1FE0-\u1FEC\u1FF2-\u1FF4\u1FF6-\u1FFC\u2071\u207F\u2090-\u209C\u2102\u2107\u210A-\u2113\u2115\u2118-\u211D\u2124\u2126\u2128\u212A-\u2139\u213C-\u213F\u2145-\u2149\u214E\u2160-\u2188\u2C00-\u2C2E\u2C30-\u2C5E\u2C60-\u2CE4\u2CEB-\u2CEE\u2CF2\u2CF3\u2D00-\u2D25\u2D27\u2D2D\u2D30-\u2D67\u2D6F\u2D80-\u2D96\u2DA0-\u2DA6\u2DA8-\u2DAE\u2DB0-\u2DB6\u2DB8-\u2DBE\u2DC0-\u2DC6\u2DC8-\u2DCE\u2DD0-\u2DD6\u2DD8-\u2DDE\u3005-\u3007\u3021-\u3029\u3031-\u3035\u3038-\u303C\u3041-\u3096\u309B-\u309F\u30A1-\u30FA\u30FC-\u30FF\u3105-\u312D\u3131-\u318E\u31A0-\u31BA\u31F0-\u31FF\u3400-\u4DB5\u4E00-\u9FD5\uA000-\uA48C\uA4D0-\uA4FD\uA500-\uA60C\uA610-\uA61F\uA62A\uA62B\uA640-\uA66E\uA67F-\uA69D\uA6A0-\uA6EF\uA717-\uA71F\uA722-\uA788\uA78B-\uA7AE\uA7B0-\uA7B7\uA7F7-\uA801\uA803-\uA805\uA807-\uA80A\uA80C-\uA822\uA840-\uA873\uA882-\uA8B3\uA8F2-\uA8F7\uA8FB\uA8FD\uA90A-\uA925\uA930-\uA946\uA960-\uA97C\uA984-\uA9B2\uA9CF\uA9E0-\uA9E4\uA9E6-\uA9EF\uA9FA-\uA9FE\uAA00-\uAA28\uAA40-\uAA42\uAA44-\uAA4B\uAA60-\uAA76\uAA7A\uAA7E-\uAAAF\uAAB1\uAAB5\uAAB6\uAAB9-\uAABD\uAAC0\uAAC2\uAADB-\uAADD\uAAE0-\uAAEA\uAAF2-\uAAF4\uAB01-\uAB06\uAB09-\uAB0E\uAB11-\uAB16\uAB20-\uAB26\uAB28-\uAB2E\uAB30-\uAB5A\uAB5C-\uAB65\uAB70-\uABE2\uAC00-\uD7A3\uD7B0-\uD7C6\uD7CB-\uD7FB\uF900-\uFA6D\uFA70-\uFAD9\uFB00-\uFB06\uFB13-\uFB17\uFB1D\uFB1F-\uFB28\uFB2A-\uFB36\uFB38-\uFB3C\uFB3E\uFB40\uFB41\uFB43\uFB44\uFB46-\uFBB1\uFBD3-\uFD3D\uFD50-\uFD8F\uFD92-\uFDC7\uFDF0-\uFDFB\uFE70-\uFE74\uFE76-\uFEFC\uFF21-\uFF3A\uFF41-\uFF5A\uFF66-\uFFBE\uFFC2-\uFFC7\uFFCA-\uFFCF\uFFD2-\uFFD7\uFFDA-\uFFDC]|\uD800[\uDC00-\uDC0B\uDC0D-\uDC26\uDC28-\uDC3A\uDC3C\uDC3D\uDC3F-\uDC4D\uDC50-\uDC5D\uDC80-\uDCFA\uDD40-\uDD74\uDE80-\uDE9C\uDEA0-\uDED0\uDF00-\uDF1F\uDF30-\uDF4A\uDF50-\uDF75\uDF80-\uDF9D\uDFA0-\uDFC3\uDFC8-\uDFCF\uDFD1-\uDFD5]|\uD801[\uDC00-\uDC9D\uDCB0-\uDCD3\uDCD8-\uDCFB\uDD00-\uDD27\uDD30-\uDD63\uDE00-\uDF36\uDF40-\uDF55\uDF60-\uDF67]|\uD802[\uDC00-\uDC05\uDC08\uDC0A-\uDC35\uDC37\uDC38\uDC3C\uDC3F-\uDC55\uDC60-\uDC76\uDC80-\uDC9E\uDCE0-\uDCF2\uDCF4\uDCF5\uDD00-\uDD15\uDD20-\uDD39\uDD80-\uDDB7\uDDBE\uDDBF\uDE00\uDE10-\uDE13\uDE15-\uDE17\uDE19-\uDE33\uDE60-\uDE7C\uDE80-\uDE9C\uDEC0-\uDEC7\uDEC9-\uDEE4\uDF00-\uDF35\uDF40-\uDF55\uDF60-\uDF72\uDF80-\uDF91]|\uD803[\uDC00-\uDC48\uDC80-\uDCB2\uDCC0-\uDCF2]|\uD804[\uDC03-\uDC37\uDC83-\uDCAF\uDCD0-\uDCE8\uDD03-\uDD26\uDD50-\uDD72\uDD76\uDD83-\uDDB2\uDDC1-\uDDC4\uDDDA\uDDDC\uDE00-\uDE11\uDE13-\uDE2B\uDE80-\uDE86\uDE88\uDE8A-\uDE8D\uDE8F-\uDE9D\uDE9F-\uDEA8\uDEB0-\uDEDE\uDF05-\uDF0C\uDF0F\uDF10\uDF13-\uDF28\uDF2A-\uDF30\uDF32\uDF33\uDF35-\uDF39\uDF3D\uDF50\uDF5D-\uDF61]|\uD805[\uDC00-\uDC34\uDC47-\uDC4A\uDC80-\uDCAF\uDCC4\uDCC5\uDCC7\uDD80-\uDDAE\uDDD8-\uDDDB\uDE00-\uDE2F\uDE44\uDE80-\uDEAA\uDF00-\uDF19]|\uD806[\uDCA0-\uDCDF\uDCFF\uDEC0-\uDEF8]|\uD807[\uDC00-\uDC08\uDC0A-\uDC2E\uDC40\uDC72-\uDC8F]|\uD808[\uDC00-\uDF99]|\uD809[\uDC00-\uDC6E\uDC80-\uDD43]|[\uD80C\uD81C-\uD820\uD840-\uD868\uD86A-\uD86C\uD86F-\uD872][\uDC00-\uDFFF]|\uD80D[\uDC00-\uDC2E]|\uD811[\uDC00-\uDE46]|\uD81A[\uDC00-\uDE38\uDE40-\uDE5E\uDED0-\uDEED\uDF00-\uDF2F\uDF40-\uDF43\uDF63-\uDF77\uDF7D-\uDF8F]|\uD81B[\uDF00-\uDF44\uDF50\uDF93-\uDF9F\uDFE0]|\uD821[\uDC00-\uDFEC]|\uD822[\uDC00-\uDEF2]|\uD82C[\uDC00\uDC01]|\uD82F[\uDC00-\uDC6A\uDC70-\uDC7C\uDC80-\uDC88\uDC90-\uDC99]|\uD835[\uDC00-\uDC54\uDC56-\uDC9C\uDC9E\uDC9F\uDCA2\uDCA5\uDCA6\uDCA9-\uDCAC\uDCAE-\uDCB9\uDCBB\uDCBD-\uDCC3\uDCC5-\uDD05\uDD07-\uDD0A\uDD0D-\uDD14\uDD16-\uDD1C\uDD1E-\uDD39\uDD3B-\uDD3E\uDD40-\uDD44\uDD46\uDD4A-\uDD50\uDD52-\uDEA5\uDEA8-\uDEC0\uDEC2-\uDEDA\uDEDC-\uDEFA\uDEFC-\uDF14\uDF16-\uDF34\uDF36-\uDF4E\uDF50-\uDF6E\uDF70-\uDF88\uDF8A-\uDFA8\uDFAA-\uDFC2\uDFC4-\uDFCB]|\uD83A[\uDC00-\uDCC4\uDD00-\uDD43]|\uD83B[\uDE00-\uDE03\uDE05-\uDE1F\uDE21\uDE22\uDE24\uDE27\uDE29-\uDE32\uDE34-\uDE37\uDE39\uDE3B\uDE42\uDE47\uDE49\uDE4B\uDE4D-\uDE4F\uDE51\uDE52\uDE54\uDE57\uDE59\uDE5B\uDE5D\uDE5F\uDE61\uDE62\uDE64\uDE67-\uDE6A\uDE6C-\uDE72\uDE74-\uDE77\uDE79-\uDE7C\uDE7E\uDE80-\uDE89\uDE8B-\uDE9B\uDEA1-\uDEA3\uDEA5-\uDEA9\uDEAB-\uDEBB]|\uD869[\uDC00-\uDED6\uDF00-\uDFFF]|\uD86D[\uDC00-\uDF34\uDF40-\uDFFF]|\uD86E[\uDC00-\uDC1D\uDC20-\uDFFF]|\uD873[\uDC00-\uDEA1]|\uD87E[\uDC00-\uDE1D]/,
// ECMAScript 6/Unicode v9.0.0 NonAsciiIdentifierPart:
NonAsciiIdentifierPart: /[\xAA\xB5\xB7\xBA\xC0-\xD6\xD8-\xF6\xF8-\u02C1\u02C6-\u02D1\u02E0-\u02E4\u02EC\u02EE\u0300-\u0374\u0376\u0377\u037A-\u037D\u037F\u0386-\u038A\u038C\u038E-\u03A1\u03A3-\u03F5\u03F7-\u0481\u0483-\u0487\u048A-\u052F\u0531-\u0556\u0559\u0561-\u0587\u0591-\u05BD\u05BF\u05C1\u05C2\u05C4\u05C5\u05C7\u05D0-\u05EA\u05F0-\u05F2\u0610-\u061A\u0620-\u0669\u066E-\u06D3\u06D5-\u06DC\u06DF-\u06E8\u06EA-\u06FC\u06FF\u0710-\u074A\u074D-\u07B1\u07C0-\u07F5\u07FA\u0800-\u082D\u0840-\u085B\u08A0-\u08B4\u08B6-\u08BD\u08D4-\u08E1\u08E3-\u0963\u0966-\u096F\u0971-\u0983\u0985-\u098C\u098F\u0990\u0993-\u09A8\u09AA-\u09B0\u09B2\u09B6-\u09B9\u09BC-\u09C4\u09C7\u09C8\u09CB-\u09CE\u09D7\u09DC\u09DD\u09DF-\u09E3\u09E6-\u09F1\u0A01-\u0A03\u0A05-\u0A0A\u0A0F\u0A10\u0A13-\u0A28\u0A2A-\u0A30\u0A32\u0A33\u0A35\u0A36\u0A38\u0A39\u0A3C\u0A3E-\u0A42\u0A47\u0A48\u0A4B-\u0A4D\u0A51\u0A59-\u0A5C\u0A5E\u0A66-\u0A75\u0A81-\u0A83\u0A85-\u0A8D\u0A8F-\u0A91\u0A93-\u0AA8\u0AAA-\u0AB0\u0AB2\u0AB3\u0AB5-\u0AB9\u0ABC-\u0AC5\u0AC7-\u0AC9\u0ACB-\u0ACD\u0AD0\u0AE0-\u0AE3\u0AE6-\u0AEF\u0AF9\u0B01-\u0B03\u0B05-\u0B0C\u0B0F\u0B10\u0B13-\u0B28\u0B2A-\u0B30\u0B32\u0B33\u0B35-\u0B39\u0B3C-\u0B44\u0B47\u0B48\u0B4B-\u0B4D\u0B56\u0B57\u0B5C\u0B5D\u0B5F-\u0B63\u0B66-\u0B6F\u0B71\u0B82\u0B83\u0B85-\u0B8A\u0B8E-\u0B90\u0B92-\u0B95\u0B99\u0B9A\u0B9C\u0B9E\u0B9F\u0BA3\u0BA4\u0BA8-\u0BAA\u0BAE-\u0BB9\u0BBE-\u0BC2\u0BC6-\u0BC8\u0BCA-\u0BCD\u0BD0\u0BD7\u0BE6-\u0BEF\u0C00-\u0C03\u0C05-\u0C0C\u0C0E-\u0C10\u0C12-\u0C28\u0C2A-\u0C39\u0C3D-\u0C44\u0C46-\u0C48\u0C4A-\u0C4D\u0C55\u0C56\u0C58-\u0C5A\u0C60-\u0C63\u0C66-\u0C6F\u0C80-\u0C83\u0C85-\u0C8C\u0C8E-\u0C90\u0C92-\u0CA8\u0CAA-\u0CB3\u0CB5-\u0CB9\u0CBC-\u0CC4\u0CC6-\u0CC8\u0CCA-\u0CCD\u0CD5\u0CD6\u0CDE\u0CE0-\u0CE3\u0CE6-\u0CEF\u0CF1\u0CF2\u0D01-\u0D03\u0D05-\u0D0C\u0D0E-\u0D10\u0D12-\u0D3A\u0D3D-\u0D44\u0D46-\u0D48\u0D4A-\u0D4E\u0D54-\u0D57\u0D5F-\u0D63\u0D66-\u0D6F\u0D7A-\u0D7F\u0D82\u0D83\u0D85-\u0D96\u0D9A-\u0DB1\u0DB3-\u0DBB\u0DBD\u0DC0-\u0DC6\u0DCA\u0DCF-\u0DD4\u0DD6\u0DD8-\u0DDF\u0DE6-\u0DEF\u0DF2\u0DF3\u0E01-\u0E3A\u0E40-\u0E4E\u0E50-\u0E59\u0E81\u0E82\u0E84\u0E87\u0E88\u0E8A\u0E8D\u0E94-\u0E97\u0E99-\u0E9F\u0EA1-\u0EA3\u0EA5\u0EA7\u0EAA\u0EAB\u0EAD-\u0EB9\u0EBB-\u0EBD\u0EC0-\u0EC4\u0EC6\u0EC8-\u0ECD\u0ED0-\u0ED9\u0EDC-\u0EDF\u0F00\u0F18\u0F19\u0F20-\u0F29\u0F35\u0F37\u0F39\u0F3E-\u0F47\u0F49-\u0F6C\u0F71-\u0F84\u0F86-\u0F97\u0F99-\u0FBC\u0FC6\u1000-\u1049\u1050-\u109D\u10A0-\u10C5\u10C7\u10CD\u10D0-\u10FA\u10FC-\u1248\u124A-\u124D\u1250-\u1256\u1258\u125A-\u125D\u1260-\u1288\u128A-\u128D\u1290-\u12B0\u12B2-\u12B5\u12B8-\u12BE\u12C0\u12C2-\u12C5\u12C8-\u12D6\u12D8-\u1310\u1312-\u1315\u1318-\u135A\u135D-\u135F\u1369-\u1371\u1380-\u138F\u13A0-\u13F5\u13F8-\u13FD\u1401-\u166C\u166F-\u167F\u1681-\u169A\u16A0-\u16EA\u16EE-\u16F8\u1700-\u170C\u170E-\u1714\u1720-\u1734\u1740-\u1753\u1760-\u176C\u176E-\u1770\u1772\u1773\u1780-\u17D3\u17D7\u17DC\u17DD\u17E0-\u17E9\u180B-\u180D\u1810-\u1819\u1820-\u1877\u1880-\u18AA\u18B0-\u18F5\u1900-\u191E\u1920-\u192B\u1930-\u193B\u1946-\u196D\u1970-\u1974\u1980-\u19AB\u19B0-\u19C9\u19D0-\u19DA\u1A00-\u1A1B\u1A20-\u1A5E\u1A60-\u1A7C\u1A7F-\u1A89\u1A90-\u1A99\u1AA7\u1AB0-\u1ABD\u1B00-\u1B4B\u1B50-\u1B59\u1B6B-\u1B73\u1B80-\u1BF3\u1C00-\u1C37\u1C40-\u1C49\u1C4D-\u1C7D\u1C80-\u1C88\u1CD0-\u1CD2\u1CD4-\u1CF6\u1CF8\u1CF9\u1D00-\u1DF5\u1DFB-\u1F15\u1F18-\u1F1D\u1F20-\u1F45\u1F48-\u1F4D\u1F50-\u1F57\u1F59\u1F5B\u1F5D\u1F5F-\u1F7D\u1F80-\u1FB4\u1FB6-\u1FBC\u1FBE\u1FC2-\u1FC4\u1FC6-\u1FCC\u1FD0-\u1FD3\u1FD6-\u1FDB\u1FE0-\u1FEC\u1FF2-\u1FF4\u1FF6-\u1FFC\u200C\u200D\u203F\u2040\u2054\u2071\u207F\u2090-\u209C\u20D0-\u20DC\u20E1\u20E5-\u20F0\u2102\u2107\u210A-\u2113\u2115\u2118-\u211D\u2124\u2126\u2128\u212A-\u2139\u213C-\u213F\u2145-\u2149\u214E\u2160-\u2188\u2C00-\u2C2E\u2C30-\u2C5E\u2C60-\u2CE4\u2CEB-\u2CF3\u2D00-\u2D25\u2D27\u2D2D\u2D30-\u2D67\u2D6F\u2D7F-\u2D96\u2DA0-\u2DA6\u2DA8-\u2DAE\u2DB0-\u2DB6\u2DB8-\u2DBE\u2DC0-\u2DC6\u2DC8-\u2DCE\u2DD0-\u2DD6\u2DD8-\u2DDE\u2DE0-\u2DFF\u3005-\u3007\u3021-\u302F\u3031-\u3035\u3038-\u303C\u3041-\u3096\u3099-\u309F\u30A1-\u30FA\u30FC-\u30FF\u3105-\u312D\u3131-\u318E\u31A0-\u31BA\u31F0-\u31FF\u3400-\u4DB5\u4E00-\u9FD5\uA000-\uA48C\uA4D0-\uA4FD\uA500-\uA60C\uA610-\uA62B\uA640-\uA66F\uA674-\uA67D\uA67F-\uA6F1\uA717-\uA71F\uA722-\uA788\uA78B-\uA7AE\uA7B0-\uA7B7\uA7F7-\uA827\uA840-\uA873\uA880-\uA8C5\uA8D0-\uA8D9\uA8E0-\uA8F7\uA8FB\uA8FD\uA900-\uA92D\uA930-\uA953\uA960-\uA97C\uA980-\uA9C0\uA9CF-\uA9D9\uA9E0-\uA9FE\uAA00-\uAA36\uAA40-\uAA4D\uAA50-\uAA59\uAA60-\uAA76\uAA7A-\uAAC2\uAADB-\uAADD\uAAE0-\uAAEF\uAAF2-\uAAF6\uAB01-\uAB06\uAB09-\uAB0E\uAB11-\uAB16\uAB20-\uAB26\uAB28-\uAB2E\uAB30-\uAB5A\uAB5C-\uAB65\uAB70-\uABEA\uABEC\uABED\uABF0-\uABF9\uAC00-\uD7A3\uD7B0-\uD7C6\uD7CB-\uD7FB\uF900-\uFA6D\uFA70-\uFAD9\uFB00-\uFB06\uFB13-\uFB17\uFB1D-\uFB28\uFB2A-\uFB36\uFB38-\uFB3C\uFB3E\uFB40\uFB41\uFB43\uFB44\uFB46-\uFBB1\uFBD3-\uFD3D\uFD50-\uFD8F\uFD92-\uFDC7\uFDF0-\uFDFB\uFE00-\uFE0F\uFE20-\uFE2F\uFE33\uFE34\uFE4D-\uFE4F\uFE70-\uFE74\uFE76-\uFEFC\uFF10-\uFF19\uFF21-\uFF3A\uFF3F\uFF41-\uFF5A\uFF66-\uFFBE\uFFC2-\uFFC7\uFFCA-\uFFCF\uFFD2-\uFFD7\uFFDA-\uFFDC]|\uD800[\uDC00-\uDC0B\uDC0D-\uDC26\uDC28-\uDC3A\uDC3C\uDC3D\uDC3F-\uDC4D\uDC50-\uDC5D\uDC80-\uDCFA\uDD40-\uDD74\uDDFD\uDE80-\uDE9C\uDEA0-\uDED0\uDEE0\uDF00-\uDF1F\uDF30-\uDF4A\uDF50-\uDF7A\uDF80-\uDF9D\uDFA0-\uDFC3\uDFC8-\uDFCF\uDFD1-\uDFD5]|\uD801[\uDC00-\uDC9D\uDCA0-\uDCA9\uDCB0-\uDCD3\uDCD8-\uDCFB\uDD00-\uDD27\uDD30-\uDD63\uDE00-\uDF36\uDF40-\uDF55\uDF60-\uDF67]|\uD802[\uDC00-\uDC05\uDC08\uDC0A-\uDC35\uDC37\uDC38\uDC3C\uDC3F-\uDC55\uDC60-\uDC76\uDC80-\uDC9E\uDCE0-\uDCF2\uDCF4\uDCF5\uDD00-\uDD15\uDD20-\uDD39\uDD80-\uDDB7\uDDBE\uDDBF\uDE00-\uDE03\uDE05\uDE06\uDE0C-\uDE13\uDE15-\uDE17\uDE19-\uDE33\uDE38-\uDE3A\uDE3F\uDE60-\uDE7C\uDE80-\uDE9C\uDEC0-\uDEC7\uDEC9-\uDEE6\uDF00-\uDF35\uDF40-\uDF55\uDF60-\uDF72\uDF80-\uDF91]|\uD803[\uDC00-\uDC48\uDC80-\uDCB2\uDCC0-\uDCF2]|\uD804[\uDC00-\uDC46\uDC66-\uDC6F\uDC7F-\uDCBA\uDCD0-\uDCE8\uDCF0-\uDCF9\uDD00-\uDD34\uDD36-\uDD3F\uDD50-\uDD73\uDD76\uDD80-\uDDC4\uDDCA-\uDDCC\uDDD0-\uDDDA\uDDDC\uDE00-\uDE11\uDE13-\uDE37\uDE3E\uDE80-\uDE86\uDE88\uDE8A-\uDE8D\uDE8F-\uDE9D\uDE9F-\uDEA8\uDEB0-\uDEEA\uDEF0-\uDEF9\uDF00-\uDF03\uDF05-\uDF0C\uDF0F\uDF10\uDF13-\uDF28\uDF2A-\uDF30\uDF32\uDF33\uDF35-\uDF39\uDF3C-\uDF44\uDF47\uDF48\uDF4B-\uDF4D\uDF50\uDF57\uDF5D-\uDF63\uDF66-\uDF6C\uDF70-\uDF74]|\uD805[\uDC00-\uDC4A\uDC50-\uDC59\uDC80-\uDCC5\uDCC7\uDCD0-\uDCD9\uDD80-\uDDB5\uDDB8-\uDDC0\uDDD8-\uDDDD\uDE00-\uDE40\uDE44\uDE50-\uDE59\uDE80-\uDEB7\uDEC0-\uDEC9\uDF00-\uDF19\uDF1D-\uDF2B\uDF30-\uDF39]|\uD806[\uDCA0-\uDCE9\uDCFF\uDEC0-\uDEF8]|\uD807[\uDC00-\uDC08\uDC0A-\uDC36\uDC38-\uDC40\uDC50-\uDC59\uDC72-\uDC8F\uDC92-\uDCA7\uDCA9-\uDCB6]|\uD808[\uDC00-\uDF99]|\uD809[\uDC00-\uDC6E\uDC80-\uDD43]|[\uD80C\uD81C-\uD820\uD840-\uD868\uD86A-\uD86C\uD86F-\uD872][\uDC00-\uDFFF]|\uD80D[\uDC00-\uDC2E]|\uD811[\uDC00-\uDE46]|\uD81A[\uDC00-\uDE38\uDE40-\uDE5E\uDE60-\uDE69\uDED0-\uDEED\uDEF0-\uDEF4\uDF00-\uDF36\uDF40-\uDF43\uDF50-\uDF59\uDF63-\uDF77\uDF7D-\uDF8F]|\uD81B[\uDF00-\uDF44\uDF50-\uDF7E\uDF8F-\uDF9F\uDFE0]|\uD821[\uDC00-\uDFEC]|\uD822[\uDC00-\uDEF2]|\uD82C[\uDC00\uDC01]|\uD82F[\uDC00-\uDC6A\uDC70-\uDC7C\uDC80-\uDC88\uDC90-\uDC99\uDC9D\uDC9E]|\uD834[\uDD65-\uDD69\uDD6D-\uDD72\uDD7B-\uDD82\uDD85-\uDD8B\uDDAA-\uDDAD\uDE42-\uDE44]|\uD835[\uDC00-\uDC54\uDC56-\uDC9C\uDC9E\uDC9F\uDCA2\uDCA5\uDCA6\uDCA9-\uDCAC\uDCAE-\uDCB9\uDCBB\uDCBD-\uDCC3\uDCC5-\uDD05\uDD07-\uDD0A\uDD0D-\uDD14\uDD16-\uDD1C\uDD1E-\uDD39\uDD3B-\uDD3E\uDD40-\uDD44\uDD46\uDD4A-\uDD50\uDD52-\uDEA5\uDEA8-\uDEC0\uDEC2-\uDEDA\uDEDC-\uDEFA\uDEFC-\uDF14\uDF16-\uDF34\uDF36-\uDF4E\uDF50-\uDF6E\uDF70-\uDF88\uDF8A-\uDFA8\uDFAA-\uDFC2\uDFC4-\uDFCB\uDFCE-\uDFFF]|\uD836[\uDE00-\uDE36\uDE3B-\uDE6C\uDE75\uDE84\uDE9B-\uDE9F\uDEA1-\uDEAF]|\uD838[\uDC00-\uDC06\uDC08-\uDC18\uDC1B-\uDC21\uDC23\uDC24\uDC26-\uDC2A]|\uD83A[\uDC00-\uDCC4\uDCD0-\uDCD6\uDD00-\uDD4A\uDD50-\uDD59]|\uD83B[\uDE00-\uDE03\uDE05-\uDE1F\uDE21\uDE22\uDE24\uDE27\uDE29-\uDE32\uDE34-\uDE37\uDE39\uDE3B\uDE42\uDE47\uDE49\uDE4B\uDE4D-\uDE4F\uDE51\uDE52\uDE54\uDE57\uDE59\uDE5B\uDE5D\uDE5F\uDE61\uDE62\uDE64\uDE67-\uDE6A\uDE6C-\uDE72\uDE74-\uDE77\uDE79-\uDE7C\uDE7E\uDE80-\uDE89\uDE8B-\uDE9B\uDEA1-\uDEA3\uDEA5-\uDEA9\uDEAB-\uDEBB]|\uD869[\uDC00-\uDED6\uDF00-\uDFFF]|\uD86D[\uDC00-\uDF34\uDF40-\uDFFF]|\uD86E[\uDC00-\uDC1D\uDC20-\uDFFF]|\uD873[\uDC00-\uDEA1]|\uD87E[\uDC00-\uDE1D]|\uDB40[\uDD00-\uDDEF]/
};
function isDecimalDigit(ch2) {
return 48 <= ch2 && ch2 <= 57;
}
function isHexDigit(ch2) {
return 48 <= ch2 && ch2 <= 57 || // 0..9
97 <= ch2 && ch2 <= 102 || // a..f
65 <= ch2 && ch2 <= 70;
}
function isOctalDigit(ch2) {
return ch2 >= 48 && ch2 <= 55;
}
NON_ASCII_WHITESPACES = [
5760,
8192,
8193,
8194,
8195,
8196,
8197,
8198,
8199,
8200,
8201,
8202,
8239,
8287,
12288,
65279
];
function isWhiteSpace(ch2) {
return ch2 === 32 || ch2 === 9 || ch2 === 11 || ch2 === 12 || ch2 === 160 || ch2 >= 5760 && NON_ASCII_WHITESPACES.indexOf(ch2) >= 0;
}
function isLineTerminator(ch2) {
return ch2 === 10 || ch2 === 13 || ch2 === 8232 || ch2 === 8233;
}
function fromCodePoint(cp) {
if (cp <= 65535) {
return String.fromCharCode(cp);
}
var cu1 = String.fromCharCode(Math.floor((cp - 65536) / 1024) + 55296);
var cu2 = String.fromCharCode((cp - 65536) % 1024 + 56320);
return cu1 + cu2;
}
IDENTIFIER_START = new Array(128);
for (ch = 0; ch < 128; ++ch) {
IDENTIFIER_START[ch] = ch >= 97 && ch <= 122 || // a..z
ch >= 65 && ch <= 90 || // A..Z
ch === 36 || ch === 95;
}
IDENTIFIER_PART = new Array(128);
for (ch = 0; ch < 128; ++ch) {
IDENTIFIER_PART[ch] = ch >= 97 && ch <= 122 || // a..z
ch >= 65 && ch <= 90 || // A..Z
ch >= 48 && ch <= 57 || // 0..9
ch === 36 || ch === 95;
}
function isIdentifierStartES5(ch2) {
return ch2 < 128 ? IDENTIFIER_START[ch2] : ES5Regex.NonAsciiIdentifierStart.test(fromCodePoint(ch2));
}
function isIdentifierPartES5(ch2) {
return ch2 < 128 ? IDENTIFIER_PART[ch2] : ES5Regex.NonAsciiIdentifierPart.test(fromCodePoint(ch2));
}
function isIdentifierStartES6(ch2) {
return ch2 < 128 ? IDENTIFIER_START[ch2] : ES6Regex.NonAsciiIdentifierStart.test(fromCodePoint(ch2));
}
function isIdentifierPartES6(ch2) {
return ch2 < 128 ? IDENTIFIER_PART[ch2] : ES6Regex.NonAsciiIdentifierPart.test(fromCodePoint(ch2));
}
module.exports = {
isDecimalDigit,
isHexDigit,
isOctalDigit,
isWhiteSpace,
isLineTerminator,
isIdentifierStartES5,
isIdentifierPartES5,
isIdentifierStartES6,
isIdentifierPartES6
};
})();
}
});
// ../../node_modules/.pnpm/esutils@2.0.3/node_modules/esutils/lib/keyword.js
var require_keyword = __commonJS({
"../../node_modules/.pnpm/esutils@2.0.3/node_modules/esutils/lib/keyword.js"(exports, module) {
"use strict";
init_shims();
(function() {
"use strict";
var code = require_code();
function isStrictModeReservedWordES6(id) {
switch (id) {
case "implements":
case "interface":
case "package":
case "private":
case "protected":
case "public":
case "static":
case "let":
return true;
default:
return false;
}
}
function isKeywordES5(id, strict) {
if (!strict && id === "yield") {
return false;
}
return isKeywordES6(id, strict);
}
function isKeywordES6(id, strict) {
if (strict && isStrictModeReservedWordES6(id)) {
return true;
}
switch (id.length) {
case 2:
return id === "if" || id === "in" || id === "do";
case 3:
return id === "var" || id === "for" || id === "new" || id === "try";
case 4:
return id === "this" || id === "else" || id === "case" || id === "void" || id === "with" || id === "enum";
case 5:
return id === "while" || id === "break" || id === "catch" || id === "throw" || id === "const" || id === "yield" || id === "class" || id === "super";
case 6:
return id === "return" || id === "typeof" || id === "delete" || id === "switch" || id === "export" || id === "import";
case 7:
return id === "default" || id === "finally" || id === "extends";
case 8:
return id === "function" || id === "continue" || id === "debugger";
case 10:
return id === "instanceof";
default:
return false;
}
}
function isReservedWordES5(id, strict) {
return id === "null" || id === "true" || id === "false" || isKeywordES5(id, strict);
}
function isReservedWordES6(id, strict) {
return id === "null" || id === "true" || id === "false" || isKeywordES6(id, strict);
}
function isRestrictedWord(id) {
return id === "eval" || id === "arguments";
}
function isIdentifierNameES5(id) {
var i, iz, ch;
if (id.length === 0) {
return false;
}
ch = id.charCodeAt(0);
if (!code.isIdentifierStartES5(ch)) {
return false;
}
for (i = 1, iz = id.length; i < iz; ++i) {
ch = id.charCodeAt(i);
if (!code.isIdentifierPartES5(ch)) {
return false;
}
}
return true;
}
function decodeUtf16(lead, trail) {
return (lead - 55296) * 1024 + (trail - 56320) + 65536;
}
function isIdentifierNameES6(id) {
var i, iz, ch, lowCh, check;
if (id.length === 0) {
return false;
}
check = code.isIdentifierStartES6;
for (i = 0, iz = id.length; i < iz; ++i) {
ch = id.charCodeAt(i);
if (55296 <= ch && ch <= 56319) {
++i;
if (i >= iz) {
return false;
}
lowCh = id.charCodeAt(i);
if (!(56320 <= lowCh && lowCh <= 57343)) {
return false;
}
ch = decodeUtf16(ch, lowCh);
}
if (!check(ch)) {
return false;
}
check = code.isIdentifierPartES6;
}
return true;
}
function isIdentifierES5(id, strict) {
return isIdentifierNameES5(id) && !isReservedWordES5(id, strict);
}
function isIdentifierES6(id, strict) {
return isIdentifierNameES6(id) && !isReservedWordES6(id, strict);
}
module.exports = {
isKeywordES5,
isKeywordES6,
isReservedWordES5,
isReservedWordES6,
isRestrictedWord,
isIdentifierNameES5,
isIdentifierNameES6,
isIdentifierES5,
isIdentifierES6
};
})();
}
});
// ../../node_modules/.pnpm/esutils@2.0.3/node_modules/esutils/lib/utils.js
var require_utils = __commonJS({
"../../node_modules/.pnpm/esutils@2.0.3/node_modules/esutils/lib/utils.js"(exports) {
"use strict";
init_shims();
(function() {
"use strict";
exports.ast = require_ast();
exports.code = require_code();
exports.keyword = require_keyword();
})();
}
});
// ../../node_modules/.pnpm/doctrine@3.0.0/node_modules/doctrine/package.json
var require_package5 = __commonJS({
"../../node_modules/.pnpm/doctrine@3.0.0/node_modules/doctrine/package.json"(exports, module) {
module.exports = {
name: "doctrine",
description: "JSDoc parser",
homepage: "https://github.com/eslint/doctrine",
main: "lib/doctrine.js",
version: "3.0.0",
engines: {
node: ">=6.0.0"
},
directories: {
lib: "./lib"
},
files: [
"lib"
],
maintainers: [
{
name: "Nicholas C. Zakas",
email: "nicholas+npm@nczconsulting.com",
web: "https://www.nczonline.net"
},
{
name: "Yusuke Suzuki",
email: "utatane.tea@gmail.com",
web: "https://github.com/Constellation"
}
],
repository: "eslint/doctrine",
devDependencies: {
coveralls: "^3.0.1",
dateformat: "^1.0.11",
eslint: "^1.10.3",
"eslint-release": "^1.0.0",
linefix: "^0.1.1",
mocha: "^3.4.2",
"npm-license": "^0.3.1",
nyc: "^10.3.2",
semver: "^5.0.3",
shelljs: "^0.5.3",
"shelljs-nodecli": "^0.1.1",
should: "^5.0.1"
},
license: "Apache-2.0",
scripts: {
pretest: "npm run lint",
test: "nyc mocha",
coveralls: "nyc report --reporter=text-lcov | coveralls",
lint: "eslint lib/",
"generate-release": "eslint-generate-release",
"generate-alpharelease": "eslint-generate-prerelease alpha",
"generate-betarelease": "eslint-generate-prerelease beta",
"generate-rcrelease": "eslint-generate-prerelease rc",
"publish-release": "eslint-publish-release"
},
dependencies: {
esutils: "^2.0.2"
}
};
}
});
// ../../node_modules/.pnpm/doctrine@3.0.0/node_modules/doctrine/lib/utility.js
var require_utility = __commonJS({
"../../node_modules/.pnpm/doctrine@3.0.0/node_modules/doctrine/lib/utility.js"(exports) {
"use strict";
init_shims();
(function() {
"use strict";
var VERSION;
VERSION = require_package5().version;
exports.VERSION = VERSION;
function DoctrineError(message) {
this.name = "DoctrineError";
this.message = message;
}
DoctrineError.prototype = function() {
var Middle = function() {
};
Middle.prototype = Error.prototype;
return new Middle();
}();
DoctrineError.prototype.constructor = DoctrineError;
exports.DoctrineError = DoctrineError;
function throwError(message) {
throw new DoctrineError(message);
}
exports.throwError = throwError;
exports.assert = __require("assert");
})();
}
});
// ../../node_modules/.pnpm/doctrine@3.0.0/node_modules/doctrine/lib/typed.js
var require_typed = __commonJS({
"../../node_modules/.pnpm/doctrine@3.0.0/node_modules/doctrine/lib/typed.js"(exports) {
"use strict";
init_shims();
(function() {
"use strict";
var Syntax, Token, source, length, index, previous, token, value, esutils, utility, rangeOffset, addRange;
esutils = require_utils();
utility = require_utility();
Syntax = {
NullableLiteral: "NullableLiteral",
AllLiteral: "AllLiteral",
NullLiteral: "NullLiteral",
UndefinedLiteral: "UndefinedLiteral",
VoidLiteral: "VoidLiteral",
UnionType: "UnionType",
ArrayType: "ArrayType",
RecordType: "RecordType",
FieldType: "FieldType",
FunctionType: "FunctionType",
ParameterType: "ParameterType",
RestType: "RestType",
NonNullableType: "NonNullableType",
OptionalType: "OptionalType",
NullableType: "NullableType",
NameExpression: "NameExpression",
TypeApplication: "TypeApplication",
StringLiteralType: "StringLiteralType",
NumericLiteralType: "NumericLiteralType",
BooleanLiteralType: "BooleanLiteralType"
};
Token = {
ILLEGAL: 0,
// ILLEGAL
DOT_LT: 1,
// .<
REST: 2,
// ...
LT: 3,
// <
GT: 4,
// >
LPAREN: 5,
// (
RPAREN: 6,
// )
LBRACE: 7,
// {
RBRACE: 8,
// }
LBRACK: 9,
// [
RBRACK: 10,
// ]
COMMA: 11,
// ,
COLON: 12,
// :
STAR: 13,
// *
PIPE: 14,
// |
QUESTION: 15,
// ?
BANG: 16,
// !
EQUAL: 17,
// =
NAME: 18,
// name token
STRING: 19,
// string
NUMBER: 20,
// number
EOF: 21
};
function isTypeName(ch) {
return "><(){}[],:*|?!=".indexOf(String.fromCharCode(ch)) === -1 && !esutils.code.isWhiteSpace(ch) && !esutils.code.isLineTerminator(ch);
}
function Context(previous2, index2, token2, value2) {
this._previous = previous2;
this._index = index2;
this._token = token2;
this._value = value2;
}
Context.prototype.restore = function() {
previous = this._previous;
index = this._index;
token = this._token;
value = this._value;
};
Context.save = function() {
return new Context(previous, index, token, value);
};
function maybeAddRange(node2, range) {
if (addRange) {
node2.range = [range[0] + rangeOffset, range[1] + rangeOffset];
}
return node2;
}
function advance() {
var ch = source.charAt(index);
index += 1;
return ch;
}
function scanHexEscape(prefix) {
var i, len, ch, code = 0;
len = prefix === "u" ? 4 : 2;
for (i = 0; i < len; ++i) {
if (index < length && esutils.code.isHexDigit(source.charCodeAt(index))) {
ch = advance();
code = code * 16 + "0123456789abcdef".indexOf(ch.toLowerCase());
} else {
return "";
}
}
return String.fromCharCode(code);
}
function scanString() {
var str = "", quote, ch, code, unescaped, restore;
quote = source.charAt(index);
++index;
while (index < length) {
ch = advance();
if (ch === quote) {
quote = "";
break;
} else if (ch === "\\") {
ch = advance();
if (!esutils.code.isLineTerminator(ch.charCodeAt(0))) {
switch (ch) {
case "n":
str += "\n";
break;
case "r":
str += "\r";
break;
case "t":
str += " ";
break;
case "u":
case "x":
restore = index;
unescaped = scanHexEscape(ch);
if (unescaped) {
str += unescaped;
} else {
index = restore;
str += ch;
}
break;
case "b":
str += "\b";
break;
case "f":
str += "\f";
break;
case "v":
str += "\v";
break;
default:
if (esutils.code.isOctalDigit(ch.charCodeAt(0))) {
code = "01234567".indexOf(ch);
if (index < length && esutils.code.isOctalDigit(source.charCodeAt(index))) {
code = code * 8 + "01234567".indexOf(advance());
if ("0123".indexOf(ch) >= 0 && index < length && esutils.code.isOctalDigit(source.charCodeAt(index))) {
code = code * 8 + "01234567".indexOf(advance());
}
}
str += String.fromCharCode(code);
} else {
str += ch;
}
break;
}
} else {
if (ch === "\r" && source.charCodeAt(index) === 10) {
++index;
}
}
} else if (esutils.code.isLineTerminator(ch.charCodeAt(0))) {
break;
} else {
str += ch;
}
}
if (quote !== "") {
utility.throwError("unexpected quote");
}
value = str;
return Token.STRING;
}
function scanNumber() {
var number, ch;
number = "";
ch = source.charCodeAt(index);
if (ch !== 46) {
number = advance();
ch = source.charCodeAt(index);
if (number === "0") {
if (ch === 120 || ch === 88) {
number += advance();
while (index < length) {
ch = source.charCodeAt(index);
if (!esutils.code.isHexDigit(ch)) {
break;
}
number += advance();
}
if (number.length <= 2) {
utility.throwError("unexpected token");
}
if (index < length) {
ch = source.charCodeAt(index);
if (esutils.code.isIdentifierStartES5(ch)) {
utility.throwError("unexpected token");
}
}
value = parseInt(number, 16);
return Token.NUMBER;
}
if (esutils.code.isOctalDigit(ch)) {
number += advance();
while (index < length) {
ch = source.charCodeAt(index);
if (!esutils.code.isOctalDigit(ch)) {
break;
}
number += advance();
}
if (index < length) {
ch = source.charCodeAt(index);
if (esutils.code.isIdentifierStartES5(ch) || esutils.code.isDecimalDigit(ch)) {
utility.throwError("unexpected token");
}
}
value = parseInt(number, 8);
return Token.NUMBER;
}
if (esutils.code.isDecimalDigit(ch)) {
utility.throwError("unexpected token");
}
}
while (index < length) {
ch = source.charCodeAt(index);
if (!esutils.code.isDecimalDigit(ch)) {
break;
}
number += advance();
}
}
if (ch === 46) {
number += advance();
while (index < length) {
ch = source.charCodeAt(index);
if (!esutils.code.isDecimalDigit(ch)) {
break;
}
number += advance();
}
}
if (ch === 101 || ch === 69) {
number += advance();
ch = source.charCodeAt(index);
if (ch === 43 || ch === 45) {
number += advance();
}
ch = source.charCodeAt(index);
if (esutils.code.isDecimalDigit(ch)) {
number += advance();
while (index < length) {
ch = source.charCodeAt(index);
if (!esutils.code.isDecimalDigit(ch)) {
break;
}
number += advance();
}
} else {
utility.throwError("unexpected token");
}
}
if (index < length) {
ch = source.charCodeAt(index);
if (esutils.code.isIdentifierStartES5(ch)) {
utility.throwError("unexpected token");
}
}
value = parseFloat(number);
return Token.NUMBER;
}
function scanTypeName() {
var ch, ch2;
value = advance();
while (index < length && isTypeName(source.charCodeAt(index))) {
ch = source.charCodeAt(index);
if (ch === 46) {
if (index + 1 >= length) {
return Token.ILLEGAL;
}
ch2 = source.charCodeAt(index + 1);
if (ch2 === 60) {
break;
}
}
value += advance();
}
return Token.NAME;
}
function next() {
var ch;
previous = index;
while (index < length && esutils.code.isWhiteSpace(source.charCodeAt(index))) {
advance();
}
if (index >= length) {
token = Token.EOF;
return token;
}
ch = source.charCodeAt(index);
switch (ch) {
case 39:
case 34:
token = scanString();
return token;
case 58:
advance();
token = Token.COLON;
return token;
case 44:
advance();
token = Token.COMMA;
return token;
case 40:
advance();
token = Token.LPAREN;
return token;
case 41:
advance();
token = Token.RPAREN;
return token;
case 91:
advance();
token = Token.LBRACK;
return token;
case 93:
advance();
token = Token.RBRACK;
return token;
case 123:
advance();
token = Token.LBRACE;
return token;
case 125:
advance();
token = Token.RBRACE;
return token;
case 46:
if (index + 1 < length) {
ch = source.charCodeAt(index + 1);
if (ch === 60) {
advance();
advance();
token = Token.DOT_LT;
return token;
}
if (ch === 46 && index + 2 < length && source.charCodeAt(index + 2) === 46) {
advance();
advance();
advance();
token = Token.REST;
return token;
}
if (esutils.code.isDecimalDigit(ch)) {
token = scanNumber();
return token;
}
}
token = Token.ILLEGAL;
return token;
case 60:
advance();
token = Token.LT;
return token;
case 62:
advance();
token = Token.GT;
return token;
case 42:
advance();
token = Token.STAR;
return token;
case 124:
advance();
token = Token.PIPE;
return token;
case 63:
advance();
token = Token.QUESTION;
return token;
case 33:
advance();
token = Token.BANG;
return token;
case 61:
advance();
token = Token.EQUAL;
return token;
case 45:
token = scanNumber();
return token;
default:
if (esutils.code.isDecimalDigit(ch)) {
token = scanNumber();
return token;
}
utility.assert(isTypeName(ch));
token = scanTypeName();
return token;
}
}
function consume(target, text) {
utility.assert(token === target, text || "consumed token not matched");
next();
}
function expect(target, message) {
if (token !== target) {
utility.throwError(message || "unexpected token");
}
next();
}
function parseUnionType() {
var elements, startIndex = index - 1;
consume(Token.LPAREN, "UnionType should start with (");
elements = [];
if (token !== Token.RPAREN) {
while (true) {
elements.push(parseTypeExpression());
if (token === Token.RPAREN) {
break;
}
expect(Token.PIPE);
}
}
consume(Token.RPAREN, "UnionType should end with )");
return maybeAddRange({
type: Syntax.UnionType,
elements
}, [startIndex, previous]);
}
function parseArrayType() {
var elements, startIndex = index - 1, restStartIndex;
consume(Token.LBRACK, "ArrayType should start with [");
elements = [];
while (token !== Token.RBRACK) {
if (token === Token.REST) {
restStartIndex = index - 3;
consume(Token.REST);
elements.push(maybeAddRange({
type: Syntax.RestType,
expression: parseTypeExpression()
}, [restStartIndex, previous]));
break;
} else {
elements.push(parseTypeExpression());
}
if (token !== Token.RBRACK) {
expect(Token.COMMA);
}
}
expect(Token.RBRACK);
return maybeAddRange({
type: Syntax.ArrayType,
elements
}, [startIndex, previous]);
}
function parseFieldName() {
var v = value;
if (token === Token.NAME || token === Token.STRING) {
next();
return v;
}
if (token === Token.NUMBER) {
consume(Token.NUMBER);
return String(v);
}
utility.throwError("unexpected token");
}
function parseFieldType() {
var key, rangeStart = previous;
key = parseFieldName();
if (token === Token.COLON) {
consume(Token.COLON);
return maybeAddRange({
type: Syntax.FieldType,
key,
value: parseTypeExpression()
}, [rangeStart, previous]);
}
return maybeAddRange({
type: Syntax.FieldType,
key,
value: null
}, [rangeStart, previous]);
}
function parseRecordType() {
var fields, rangeStart = index - 1, rangeEnd;
consume(Token.LBRACE, "RecordType should start with {");
fields = [];
if (token === Token.COMMA) {
consume(Token.COMMA);
} else {
while (token !== Token.RBRACE) {
fields.push(parseFieldType());
if (token !== Token.RBRACE) {
expect(Token.COMMA);
}
}
}
rangeEnd = index;
expect(Token.RBRACE);
return maybeAddRange({
type: Syntax.RecordType,
fields
}, [rangeStart, rangeEnd]);
}
function parseNameExpression() {
var name = value, rangeStart = index - name.length;
expect(Token.NAME);
if (token === Token.COLON && (name === "module" || name === "external" || name === "event")) {
consume(Token.COLON);
name += ":" + value;
expect(Token.NAME);
}
return maybeAddRange({
type: Syntax.NameExpression,
name
}, [rangeStart, previous]);
}
function parseTypeExpressionList() {
var elements = [];
elements.push(parseTop());
while (token === Token.COMMA) {
consume(Token.COMMA);
elements.push(parseTop());
}
return elements;
}
function parseTypeName() {
var expr, applications, startIndex = index - value.length;
expr = parseNameExpression();
if (token === Token.DOT_LT || token === Token.LT) {
next();
applications = parseTypeExpressionList();
expect(Token.GT);
return maybeAddRange({
type: Syntax.TypeApplication,
expression: expr,
applications
}, [startIndex, previous]);
}
return expr;
}
function parseResultType() {
consume(Token.COLON, "ResultType should start with :");
if (token === Token.NAME && value === "void") {
consume(Token.NAME);
return {
type: Syntax.VoidLiteral
};
}
return parseTypeExpression();
}
function parseParametersType() {
var params = [], optionalSequence = false, expr, rest = false, startIndex, restStartIndex = index - 3, nameStartIndex;
while (token !== Token.RPAREN) {
if (token === Token.REST) {
consume(Token.REST);
rest = true;
}
startIndex = previous;
expr = parseTypeExpression();
if (expr.type === Syntax.NameExpression && token === Token.COLON) {
nameStartIndex = previous - expr.name.length;
consume(Token.COLON);
expr = maybeAddRange({
type: Syntax.ParameterType,
name: expr.name,
expression: parseTypeExpression()
}, [nameStartIndex, previous]);
}
if (token === Token.EQUAL) {
consume(Token.EQUAL);
expr = maybeAddRange({
type: Syntax.OptionalType,
expression: expr
}, [startIndex, previous]);
optionalSequence = true;
} else {
if (optionalSequence) {
utility.throwError("unexpected token");
}
}
if (rest) {
expr = maybeAddRange({
type: Syntax.RestType,
expression: expr
}, [restStartIndex, previous]);
}
params.push(expr);
if (token !== Token.RPAREN) {
expect(Token.COMMA);
}
}
return params;
}
function parseFunctionType() {
var isNew, thisBinding, params, result, fnType, startIndex = index - value.length;
utility.assert(token === Token.NAME && value === "function", "FunctionType should start with 'function'");
consume(Token.NAME);
expect(Token.LPAREN);
isNew = false;
params = [];
thisBinding = null;
if (token !== Token.RPAREN) {
if (token === Token.NAME && (value === "this" || value === "new")) {
isNew = value === "new";
consume(Token.NAME);
expect(Token.COLON);
thisBinding = parseTypeName();
if (token === Token.COMMA) {
consume(Token.COMMA);
params = parseParametersType();
}
} else {
params = parseParametersType();
}
}
expect(Token.RPAREN);
result = null;
if (token === Token.COLON) {
result = parseResultType();
}
fnType = maybeAddRange({
type: Syntax.FunctionType,
params,
result
}, [startIndex, previous]);
if (thisBinding) {
fnType["this"] = thisBinding;
if (isNew) {
fnType["new"] = true;
}
}
return fnType;
}
function parseBasicTypeExpression() {
var context, startIndex;
switch (token) {
case Token.STAR:
consume(Token.STAR);
return maybeAddRange({
type: Syntax.AllLiteral
}, [previous - 1, previous]);
case Token.LPAREN:
return parseUnionType();
case Token.LBRACK:
return parseArrayType();
case Token.LBRACE:
return parseRecordType();
case Token.NAME:
startIndex = index - value.length;
if (value === "null") {
consume(Token.NAME);
return maybeAddRange({
type: Syntax.NullLiteral
}, [startIndex, previous]);
}
if (value === "undefined") {
consume(Token.NAME);
return maybeAddRange({
type: Syntax.UndefinedLiteral
}, [startIndex, previous]);
}
if (value === "true" || value === "false") {
consume(Token.NAME);
return maybeAddRange({
type: Syntax.BooleanLiteralType,
value: value === "true"
}, [startIndex, previous]);
}
context = Context.save();
if (value === "function") {
try {
return parseFunctionType();
} catch (e) {
context.restore();
}
}
return parseTypeName();
case Token.STRING:
next();
return maybeAddRange({
type: Syntax.StringLiteralType,
value
}, [previous - value.length - 2, previous]);
case Token.NUMBER:
next();
return maybeAddRange({
type: Syntax.NumericLiteralType,
value
}, [previous - String(value).length, previous]);
default:
utility.throwError("unexpected token");
}
}
function parseTypeExpression() {
var expr, rangeStart;
if (token === Token.QUESTION) {
rangeStart = index - 1;
consume(Token.QUESTION);
if (token === Token.COMMA || token === Token.EQUAL || token === Token.RBRACE || token === Token.RPAREN || token === Token.PIPE || token === Token.EOF || token === Token.RBRACK || token === Token.GT) {
return maybeAddRange({
type: Syntax.NullableLiteral
}, [rangeStart, previous]);
}
return maybeAddRange({
type: Syntax.NullableType,
expression: parseBasicTypeExpression(),
prefix: true
}, [rangeStart, previous]);
} else if (token === Token.BANG) {
rangeStart = index - 1;
consume(Token.BANG);
return maybeAddRange({
type: Syntax.NonNullableType,
expression: parseBasicTypeExpression(),
prefix: true
}, [rangeStart, previous]);
} else {
rangeStart = previous;
}
expr = parseBasicTypeExpression();
if (token === Token.BANG) {
consume(Token.BANG);
return maybeAddRange({
type: Syntax.NonNullableType,
expression: expr,
prefix: false
}, [rangeStart, previous]);
}
if (token === Token.QUESTION) {
consume(Token.QUESTION);
return maybeAddRange({
type: Syntax.NullableType,
expression: expr,
prefix: false
}, [rangeStart, previous]);
}
if (token === Token.LBRACK) {
consume(Token.LBRACK);
expect(Token.RBRACK, "expected an array-style type declaration (" + value + "[])");
return maybeAddRange({
type: Syntax.TypeApplication,
expression: maybeAddRange({
type: Syntax.NameExpression,
name: "Array"
}, [rangeStart, previous]),
applications: [expr]
}, [rangeStart, previous]);
}
return expr;
}
function parseTop() {
var expr, elements;
expr = parseTypeExpression();
if (token !== Token.PIPE) {
return expr;
}
elements = [expr];
consume(Token.PIPE);
while (true) {
elements.push(parseTypeExpression());
if (token !== Token.PIPE) {
break;
}
consume(Token.PIPE);
}
return maybeAddRange({
type: Syntax.UnionType,
elements
}, [0, index]);
}
function parseTopParamType() {
var expr;
if (token === Token.REST) {
consume(Token.REST);
return maybeAddRange({
type: Syntax.RestType,
expression: parseTop()
}, [0, index]);
}
expr = parseTop();
if (token === Token.EQUAL) {
consume(Token.EQUAL);
return maybeAddRange({
type: Syntax.OptionalType,
expression: expr
}, [0, index]);
}
return expr;
}
function parseType(src, opt) {
var expr;
source = src;
length = source.length;
index = 0;
previous = 0;
addRange = opt && opt.range;
rangeOffset = opt && opt.startIndex || 0;
next();
expr = parseTop();
if (opt && opt.midstream) {
return {
expression: expr,
index: previous
};
}
if (token !== Token.EOF) {
utility.throwError("not reach to EOF");
}
return expr;
}
function parseParamType(src, opt) {
var expr;
source = src;
length = source.length;
index = 0;
previous = 0;
addRange = opt && opt.range;
rangeOffset = opt && opt.startIndex || 0;
next();
expr = parseTopParamType();
if (opt && opt.midstream) {
return {
expression: expr,
index: previous
};
}
if (token !== Token.EOF) {
utility.throwError("not reach to EOF");
}
return expr;
}
function stringifyImpl(node2, compact, topLevel) {
var result, i, iz;
switch (node2.type) {
case Syntax.NullableLiteral:
result = "?";
break;
case Syntax.AllLiteral:
result = "*";
break;
case Syntax.NullLiteral:
result = "null";
break;
case Syntax.UndefinedLiteral:
result = "undefined";
break;
case Syntax.VoidLiteral:
result = "void";
break;
case Syntax.UnionType:
if (!topLevel) {
result = "(";
} else {
result = "";
}
for (i = 0, iz = node2.elements.length; i < iz; ++i) {
result += stringifyImpl(node2.elements[i], compact);
if (i + 1 !== iz) {
result += compact ? "|" : " | ";
}
}
if (!topLevel) {
result += ")";
}
break;
case Syntax.ArrayType:
result = "[";
for (i = 0, iz = node2.elements.length; i < iz; ++i) {
result += stringifyImpl(node2.elements[i], compact);
if (i + 1 !== iz) {
result += compact ? "," : ", ";
}
}
result += "]";
break;
case Syntax.RecordType:
result = "{";
for (i = 0, iz = node2.fields.length; i < iz; ++i) {
result += stringifyImpl(node2.fields[i], compact);
if (i + 1 !== iz) {
result += compact ? "," : ", ";
}
}
result += "}";
break;
case Syntax.FieldType:
if (node2.value) {
result = node2.key + (compact ? ":" : ": ") + stringifyImpl(node2.value, compact);
} else {
result = node2.key;
}
break;
case Syntax.FunctionType:
result = compact ? "function(" : "function (";
if (node2["this"]) {
if (node2["new"]) {
result += compact ? "new:" : "new: ";
} else {
result += compact ? "this:" : "this: ";
}
result += stringifyImpl(node2["this"], compact);
if (node2.params.length !== 0) {
result += compact ? "," : ", ";
}
}
for (i = 0, iz = node2.params.length; i < iz; ++i) {
result += stringifyImpl(node2.params[i], compact);
if (i + 1 !== iz) {
result += compact ? "," : ", ";
}
}
result += ")";
if (node2.result) {
result += (compact ? ":" : ": ") + stringifyImpl(node2.result, compact);
}
break;
case Syntax.ParameterType:
result = node2.name + (compact ? ":" : ": ") + stringifyImpl(node2.expression, compact);
break;
case Syntax.RestType:
result = "...";
if (node2.expression) {
result += stringifyImpl(node2.expression, compact);
}
break;
case Syntax.NonNullableType:
if (node2.prefix) {
result = "!" + stringifyImpl(node2.expression, compact);
} else {
result = stringifyImpl(node2.expression, compact) + "!";
}
break;
case Syntax.OptionalType:
result = stringifyImpl(node2.expression, compact) + "=";
break;
case Syntax.NullableType:
if (node2.prefix) {
result = "?" + stringifyImpl(node2.expression, compact);
} else {
result = stringifyImpl(node2.expression, compact) + "?";
}
break;
case Syntax.NameExpression:
result = node2.name;
break;
case Syntax.TypeApplication:
result = stringifyImpl(node2.expression, compact) + ".<";
for (i = 0, iz = node2.applications.length; i < iz; ++i) {
result += stringifyImpl(node2.applications[i], compact);
if (i + 1 !== iz) {
result += compact ? "," : ", ";
}
}
result += ">";
break;
case Syntax.StringLiteralType:
result = '"' + node2.value + '"';
break;
case Syntax.NumericLiteralType:
result = String(node2.value);
break;
case Syntax.BooleanLiteralType:
result = String(node2.value);
break;
default:
utility.throwError("Unknown type " + node2.type);
}
return result;
}
function stringify(node2, options) {
if (options == null) {
options = {};
}
return stringifyImpl(node2, options.compact, options.topLevel);
}
exports.parseType = parseType;
exports.parseParamType = parseParamType;
exports.stringify = stringify;
exports.Syntax = Syntax;
})();
}
});
// ../../node_modules/.pnpm/doctrine@3.0.0/node_modules/doctrine/lib/doctrine.js
var require_doctrine = __commonJS({
"../../node_modules/.pnpm/doctrine@3.0.0/node_modules/doctrine/lib/doctrine.js"(exports) {
"use strict";
init_shims();
(function() {
"use strict";
var typed, utility, jsdoc, esutils, hasOwnProperty;
esutils = require_utils();
typed = require_typed();
utility = require_utility();
function sliceSource(source, index, last) {
return source.slice(index, last);
}
hasOwnProperty = /* @__PURE__ */ function() {
var func = Object.prototype.hasOwnProperty;
return function hasOwnProperty2(obj, name) {
return func.call(obj, name);
};
}();
function shallowCopy(obj) {
var ret = {}, key;
for (key in obj) {
if (obj.hasOwnProperty(key)) {
ret[key] = obj[key];
}
}
return ret;
}
function isASCIIAlphanumeric(ch) {
return ch >= 97 && ch <= 122 || ch >= 65 && ch <= 90 || ch >= 48 && ch <= 57;
}
function isParamTitle(title) {
return title === "param" || title === "argument" || title === "arg";
}
function isReturnTitle(title) {
return title === "return" || title === "returns";
}
function isProperty(title) {
return title === "property" || title === "prop";
}
function isNameParameterRequired(title) {
return isParamTitle(title) || isProperty(title) || title === "alias" || title === "this" || title === "mixes" || title === "requires";
}
function isAllowedName(title) {
return isNameParameterRequired(title) || title === "const" || title === "constant";
}
function isAllowedNested(title) {
return isProperty(title) || isParamTitle(title);
}
function isAllowedOptional(title) {
return isProperty(title) || isParamTitle(title);
}
function isTypeParameterRequired(title) {
return isParamTitle(title) || isReturnTitle(title) || title === "define" || title === "enum" || title === "implements" || title === "this" || title === "type" || title === "typedef" || isProperty(title);
}
function isAllowedType(title) {
return isTypeParameterRequired(title) || title === "throws" || title === "const" || title === "constant" || title === "namespace" || title === "member" || title === "var" || title === "module" || title === "constructor" || title === "class" || title === "extends" || title === "augments" || title === "public" || title === "private" || title === "protected";
}
var WHITESPACE = "[ \\f\\t\\v\\u00a0\\u1680\\u180e\\u2000-\\u200a\\u202f\\u205f\\u3000\\ufeff]";
var STAR_MATCHER = "(" + WHITESPACE + "*(?:\\*" + WHITESPACE + "?)?)(.+|[\r\n\u2028\u2029])";
function unwrapComment(doc) {
return doc.replace(/^\/\*\*?/, "").replace(/\*\/$/, "").replace(new RegExp(STAR_MATCHER, "g"), "$2").replace(/\s*$/, "");
}
function convertUnwrappedCommentIndex(originalSource, unwrappedIndex) {
var replacedSource = originalSource.replace(/^\/\*\*?/, "");
var numSkippedChars = 0;
var matcher = new RegExp(STAR_MATCHER, "g");
var match;
while (match = matcher.exec(replacedSource)) {
numSkippedChars += match[1].length;
if (match.index + match[0].length > unwrappedIndex + numSkippedChars) {
return unwrappedIndex + numSkippedChars + originalSource.length - replacedSource.length;
}
}
return originalSource.replace(/\*\/$/, "").replace(/\s*$/, "").length;
}
(function(exports2) {
var Rules, index, lineNumber, length, source, originalSource, recoverable, sloppy, strict;
function advance() {
var ch = source.charCodeAt(index);
index += 1;
if (esutils.code.isLineTerminator(ch) && !(ch === 13 && source.charCodeAt(index) === 10)) {
lineNumber += 1;
}
return String.fromCharCode(ch);
}
function scanTitle() {
var title = "";
advance();
while (index < length && isASCIIAlphanumeric(source.charCodeAt(index))) {
title += advance();
}
return title;
}
function seekContent() {
var ch, waiting, last = index;
waiting = false;
while (last < length) {
ch = source.charCodeAt(last);
if (esutils.code.isLineTerminator(ch) && !(ch === 13 && source.charCodeAt(last + 1) === 10)) {
waiting = true;
} else if (waiting) {
if (ch === 64) {
break;
}
if (!esutils.code.isWhiteSpace(ch)) {
waiting = false;
}
}
last += 1;
}
return last;
}
function parseType(title, last, addRange) {
var ch, brace, type, startIndex, direct = false;
while (index < last) {
ch = source.charCodeAt(index);
if (esutils.code.isWhiteSpace(ch)) {
advance();
} else if (ch === 123) {
advance();
break;
} else {
direct = true;
break;
}
}
if (direct) {
return null;
}
brace = 1;
type = "";
while (index < last) {
ch = source.charCodeAt(index);
if (esutils.code.isLineTerminator(ch)) {
advance();
} else {
if (ch === 125) {
brace -= 1;
if (brace === 0) {
advance();
break;
}
} else if (ch === 123) {
brace += 1;
}
if (type === "") {
startIndex = index;
}
type += advance();
}
}
if (brace !== 0) {
return utility.throwError("Braces are not balanced");
}
if (isAllowedOptional(title)) {
return typed.parseParamType(type, { startIndex: convertIndex(startIndex), range: addRange });
}
return typed.parseType(type, { startIndex: convertIndex(startIndex), range: addRange });
}
function scanIdentifier(last) {
var identifier;
if (!esutils.code.isIdentifierStartES5(source.charCodeAt(index)) && !source[index].match(/[0-9]/)) {
return null;
}
identifier = advance();
while (index < last && esutils.code.isIdentifierPartES5(source.charCodeAt(index))) {
identifier += advance();
}
return identifier;
}
function skipWhiteSpace(last) {
while (index < last && (esutils.code.isWhiteSpace(source.charCodeAt(index)) || esutils.code.isLineTerminator(source.charCodeAt(index)))) {
advance();
}
}
function parseName(last, allowBrackets, allowNestedParams) {
var name = "", useBrackets, insideString;
skipWhiteSpace(last);
if (index >= last) {
return null;
}
if (source.charCodeAt(index) === 91) {
if (allowBrackets) {
useBrackets = true;
name = advance();
} else {
return null;
}
}
name += scanIdentifier(last);
if (allowNestedParams) {
if (source.charCodeAt(index) === 58 && (name === "module" || name === "external" || name === "event")) {
name += advance();
name += scanIdentifier(last);
}
if (source.charCodeAt(index) === 91 && source.charCodeAt(index + 1) === 93) {
name += advance();
name += advance();
}
while (source.charCodeAt(index) === 46 || source.charCodeAt(index) === 47 || source.charCodeAt(index) === 35 || source.charCodeAt(index) === 45 || source.charCodeAt(index) === 126) {
name += advance();
name += scanIdentifier(last);
}
}
if (useBrackets) {
skipWhiteSpace(last);
if (source.charCodeAt(index) === 61) {
name += advance();
skipWhiteSpace(last);
var ch;
var bracketDepth = 1;
while (index < last) {
ch = source.charCodeAt(index);
if (esutils.code.isWhiteSpace(ch)) {
if (!insideString) {
skipWhiteSpace(last);
ch = source.charCodeAt(index);
}
}
if (ch === 39) {
if (!insideString) {
insideString = "'";
} else {
if (insideString === "'") {
insideString = "";
}
}
}
if (ch === 34) {
if (!insideString) {
insideString = '"';
} else {
if (insideString === '"') {
insideString = "";
}
}
}
if (ch === 91) {
bracketDepth++;
} else if (ch === 93 && --bracketDepth === 0) {
break;
}
name += advance();
}
}
skipWhiteSpace(last);
if (index >= last || source.charCodeAt(index) !== 93) {
return null;
}
name += advance();
}
return name;
}
function skipToTag() {
while (index < length && source.charCodeAt(index) !== 64) {
advance();
}
if (index >= length) {
return false;
}
utility.assert(
source.charCodeAt(index) === 64
/* '@' */
);
return true;
}
function convertIndex(rangeIndex) {
if (source === originalSource) {
return rangeIndex;
}
return convertUnwrappedCommentIndex(originalSource, rangeIndex);
}
function TagParser(options, title) {
this._options = options;
this._title = title.toLowerCase();
this._tag = {
title,
description: null
};
if (this._options.lineNumbers) {
this._tag.lineNumber = lineNumber;
}
this._first = index - title.length - 1;
this._last = 0;
this._extra = {};
}
TagParser.prototype.addError = function addError(errorText) {
var args = Array.prototype.slice.call(arguments, 1), msg = errorText.replace(
/%(\d)/g,
function(whole, index2) {
utility.assert(index2 < args.length, "Message reference must be in range");
return args[index2];
}
);
if (!this._tag.errors) {
this._tag.errors = [];
}
if (strict) {
utility.throwError(msg);
}
this._tag.errors.push(msg);
return recoverable;
};
TagParser.prototype.parseType = function() {
if (isTypeParameterRequired(this._title)) {
try {
this._tag.type = parseType(this._title, this._last, this._options.range);
if (!this._tag.type) {
if (!isParamTitle(this._title) && !isReturnTitle(this._title)) {
if (!this.addError("Missing or invalid tag type")) {
return false;
}
}
}
} catch (error) {
this._tag.type = null;
if (!this.addError(error.message)) {
return false;
}
}
} else if (isAllowedType(this._title)) {
try {
this._tag.type = parseType(this._title, this._last, this._options.range);
} catch (e) {
}
}
return true;
};
TagParser.prototype._parseNamePath = function(optional) {
var name;
name = parseName(this._last, sloppy && isAllowedOptional(this._title), true);
if (!name) {
if (!optional) {
if (!this.addError("Missing or invalid tag name")) {
return false;
}
}
}
this._tag.name = name;
return true;
};
TagParser.prototype.parseNamePath = function() {
return this._parseNamePath(false);
};
TagParser.prototype.parseNamePathOptional = function() {
return this._parseNamePath(true);
};
TagParser.prototype.parseName = function() {
var assign, name;
if (isAllowedName(this._title)) {
this._tag.name = parseName(this._last, sloppy && isAllowedOptional(this._title), isAllowedNested(this._title));
if (!this._tag.name) {
if (!isNameParameterRequired(this._title)) {
return true;
}
if (isParamTitle(this._title) && this._tag.type && this._tag.type.name) {
this._extra.name = this._tag.type;
this._tag.name = this._tag.type.name;
this._tag.type = null;
} else {
if (!this.addError("Missing or invalid tag name")) {
return false;
}
}
} else {
name = this._tag.name;
if (name.charAt(0) === "[" && name.charAt(name.length - 1) === "]") {
assign = name.substring(1, name.length - 1).split("=");
if (assign.length > 1) {
this._tag["default"] = assign.slice(1).join("=");
}
this._tag.name = assign[0];
if (this._tag.type && this._tag.type.type !== "OptionalType") {
this._tag.type = {
type: "OptionalType",
expression: this._tag.type
};
}
}
}
}
return true;
};
TagParser.prototype.parseDescription = function parseDescription() {
var description = sliceSource(source, index, this._last).trim();
if (description) {
if (/^-\s+/.test(description)) {
description = description.substring(2);
}
this._tag.description = description;
}
return true;
};
TagParser.prototype.parseCaption = function parseDescription() {
var description = sliceSource(source, index, this._last).trim();
var captionStartTag = "<caption>";
var captionEndTag = "</caption>";
var captionStart = description.indexOf(captionStartTag);
var captionEnd = description.indexOf(captionEndTag);
if (captionStart >= 0 && captionEnd >= 0) {
this._tag.caption = description.substring(
captionStart + captionStartTag.length,
captionEnd
).trim();
this._tag.description = description.substring(captionEnd + captionEndTag.length).trim();
} else {
this._tag.description = description;
}
return true;
};
TagParser.prototype.parseKind = function parseKind() {
var kind, kinds;
kinds = {
"class": true,
"constant": true,
"event": true,
"external": true,
"file": true,
"function": true,
"member": true,
"mixin": true,
"module": true,
"namespace": true,
"typedef": true
};
kind = sliceSource(source, index, this._last).trim();
this._tag.kind = kind;
if (!hasOwnProperty(kinds, kind)) {
if (!this.addError("Invalid kind name '%0'", kind)) {
return false;
}
}
return true;
};
TagParser.prototype.parseAccess = function parseAccess() {
var access;
access = sliceSource(source, index, this._last).trim();
this._tag.access = access;
if (access !== "private" && access !== "protected" && access !== "public") {
if (!this.addError("Invalid access name '%0'", access)) {
return false;
}
}
return true;
};
TagParser.prototype.parseThis = function parseThis() {
var value = sliceSource(source, index, this._last).trim();
if (value && value.charAt(0) === "{") {
var gotType = this.parseType();
if (gotType && this._tag.type.type === "NameExpression" || this._tag.type.type === "UnionType") {
this._tag.name = this._tag.type.name;
return true;
} else {
return this.addError("Invalid name for this");
}
} else {
return this.parseNamePath();
}
};
TagParser.prototype.parseVariation = function parseVariation() {
var variation, text;
text = sliceSource(source, index, this._last).trim();
variation = parseFloat(text, 10);
this._tag.variation = variation;
if (isNaN(variation)) {
if (!this.addError("Invalid variation '%0'", text)) {
return false;
}
}
return true;
};
TagParser.prototype.ensureEnd = function() {
var shouldBeEmpty = sliceSource(source, index, this._last).trim();
if (shouldBeEmpty) {
if (!this.addError("Unknown content '%0'", shouldBeEmpty)) {
return false;
}
}
return true;
};
TagParser.prototype.epilogue = function epilogue() {
var description;
description = this._tag.description;
if (isAllowedOptional(this._title) && !this._tag.type && description && description.charAt(0) === "[") {
this._tag.type = this._extra.name;
if (!this._tag.name) {
this._tag.name = void 0;
}
if (!sloppy) {
if (!this.addError("Missing or invalid tag name")) {
return false;
}
}
}
return true;
};
Rules = {
// http://usejsdoc.org/tags-access.html
"access": ["parseAccess"],
// http://usejsdoc.org/tags-alias.html
"alias": ["parseNamePath", "ensureEnd"],
// http://usejsdoc.org/tags-augments.html
"augments": ["parseType", "parseNamePathOptional", "ensureEnd"],
// http://usejsdoc.org/tags-constructor.html
"constructor": ["parseType", "parseNamePathOptional", "ensureEnd"],
// Synonym: http://usejsdoc.org/tags-constructor.html
"class": ["parseType", "parseNamePathOptional", "ensureEnd"],
// Synonym: http://usejsdoc.org/tags-extends.html
"extends": ["parseType", "parseNamePathOptional", "ensureEnd"],
// http://usejsdoc.org/tags-example.html
"example": ["parseCaption"],
// http://usejsdoc.org/tags-deprecated.html
"deprecated": ["parseDescription"],
// http://usejsdoc.org/tags-global.html
"global": ["ensureEnd"],
// http://usejsdoc.org/tags-inner.html
"inner": ["ensureEnd"],
// http://usejsdoc.org/tags-instance.html
"instance": ["ensureEnd"],
// http://usejsdoc.org/tags-kind.html
"kind": ["parseKind"],
// http://usejsdoc.org/tags-mixes.html
"mixes": ["parseNamePath", "ensureEnd"],
// http://usejsdoc.org/tags-mixin.html
"mixin": ["parseNamePathOptional", "ensureEnd"],
// http://usejsdoc.org/tags-member.html
"member": ["parseType", "parseNamePathOptional", "ensureEnd"],
// http://usejsdoc.org/tags-method.html
"method": ["parseNamePathOptional", "ensureEnd"],
// http://usejsdoc.org/tags-module.html
"module": ["parseType", "parseNamePathOptional", "ensureEnd"],
// Synonym: http://usejsdoc.org/tags-method.html
"func": ["parseNamePathOptional", "ensureEnd"],
// Synonym: http://usejsdoc.org/tags-method.html
"function": ["parseNamePathOptional", "ensureEnd"],
// Synonym: http://usejsdoc.org/tags-member.html
"var": ["parseType", "parseNamePathOptional", "ensureEnd"],
// http://usejsdoc.org/tags-name.html
"name": ["parseNamePath", "ensureEnd"],
// http://usejsdoc.org/tags-namespace.html
"namespace": ["parseType", "parseNamePathOptional", "ensureEnd"],
// http://usejsdoc.org/tags-private.html
"private": ["parseType", "parseDescription"],
// http://usejsdoc.org/tags-protected.html
"protected": ["parseType", "parseDescription"],
// http://usejsdoc.org/tags-public.html
"public": ["parseType", "parseDescription"],
// http://usejsdoc.org/tags-readonly.html
"readonly": ["ensureEnd"],
// http://usejsdoc.org/tags-requires.html
"requires": ["parseNamePath", "ensureEnd"],
// http://usejsdoc.org/tags-since.html
"since": ["parseDescription"],
// http://usejsdoc.org/tags-static.html
"static": ["ensureEnd"],
// http://usejsdoc.org/tags-summary.html
"summary": ["parseDescription"],
// http://usejsdoc.org/tags-this.html
"this": ["parseThis", "ensureEnd"],
// http://usejsdoc.org/tags-todo.html
"todo": ["parseDescription"],
// http://usejsdoc.org/tags-typedef.html
"typedef": ["parseType", "parseNamePathOptional"],
// http://usejsdoc.org/tags-variation.html
"variation": ["parseVariation"],
// http://usejsdoc.org/tags-version.html
"version": ["parseDescription"]
};
TagParser.prototype.parse = function parse2() {
var i, iz, sequences, method;
if (!this._title) {
if (!this.addError("Missing or invalid title")) {
return null;
}
}
this._last = seekContent(this._title);
if (this._options.range) {
this._tag.range = [this._first, source.slice(0, this._last).replace(/\s*$/, "").length].map(convertIndex);
}
if (hasOwnProperty(Rules, this._title)) {
sequences = Rules[this._title];
} else {
sequences = ["parseType", "parseName", "parseDescription", "epilogue"];
}
for (i = 0, iz = sequences.length; i < iz; ++i) {
method = sequences[i];
if (!this[method]()) {
return null;
}
}
return this._tag;
};
function parseTag(options) {
var title, parser, tag;
if (!skipToTag()) {
return null;
}
title = scanTitle();
parser = new TagParser(options, title);
tag = parser.parse();
while (index < parser._last) {
advance();
}
return tag;
}
function scanJSDocDescription(preserveWhitespace) {
var description = "", ch, atAllowed;
atAllowed = true;
while (index < length) {
ch = source.charCodeAt(index);
if (atAllowed && ch === 64) {
break;
}
if (esutils.code.isLineTerminator(ch)) {
atAllowed = true;
} else if (atAllowed && !esutils.code.isWhiteSpace(ch)) {
atAllowed = false;
}
description += advance();
}
return preserveWhitespace ? description : description.trim();
}
function parse(comment, options) {
var tags = [], tag, description, interestingTags, i, iz;
if (options === void 0) {
options = {};
}
if (typeof options.unwrap === "boolean" && options.unwrap) {
source = unwrapComment(comment);
} else {
source = comment;
}
originalSource = comment;
if (options.tags) {
if (Array.isArray(options.tags)) {
interestingTags = {};
for (i = 0, iz = options.tags.length; i < iz; i++) {
if (typeof options.tags[i] === "string") {
interestingTags[options.tags[i]] = true;
} else {
utility.throwError('Invalid "tags" parameter: ' + options.tags);
}
}
} else {
utility.throwError('Invalid "tags" parameter: ' + options.tags);
}
}
length = source.length;
index = 0;
lineNumber = 0;
recoverable = options.recoverable;
sloppy = options.sloppy;
strict = options.strict;
description = scanJSDocDescription(options.preserveWhitespace);
while (true) {
tag = parseTag(options);
if (!tag) {
break;
}
if (!interestingTags || interestingTags.hasOwnProperty(tag.title)) {
tags.push(tag);
}
}
return {
description,
tags
};
}
exports2.parse = parse;
})(jsdoc = {});
exports.version = utility.VERSION;
exports.parse = jsdoc.parse;
exports.parseType = typed.parseType;
exports.parseParamType = typed.parseParamType;
exports.unwrapComment = unwrapComment;
exports.Syntax = shallowCopy(typed.Syntax);
exports.Error = utility.DoctrineError;
exports.type = {
Syntax: exports.Syntax,
parseType: typed.parseType,
parseParamType: typed.parseParamType,
stringify: typed.stringify
};
})();
}
});
// ../../node_modules/.pnpm/resolve-pkg-maps@1.0.0/node_modules/resolve-pkg-maps/dist/index.cjs
var require_dist6 = __commonJS({
"../../node_modules/.pnpm/resolve-pkg-maps@1.0.0/node_modules/resolve-pkg-maps/dist/index.cjs"(exports) {
"use strict";
init_shims();
Object.defineProperty(exports, "__esModule", { value: true });
var d = (r) => r !== null && typeof r == "object";
var s = (r, t) => Object.assign(new Error(`[${r}]: ${t}`), { code: r });
var g = "ERR_INVALID_PACKAGE_CONFIG";
var E = "ERR_INVALID_PACKAGE_TARGET";
var I = "ERR_PACKAGE_PATH_NOT_EXPORTED";
var P = "ERR_PACKAGE_IMPORT_NOT_DEFINED";
var R = /^\d+$/;
var O = /^(\.{1,2}|node_modules)$/i;
var u = /\/|\\/;
var h = ((r) => (r.Export = "exports", r.Import = "imports", r))(h || {});
var f = (r, t, n, o, c) => {
if (t == null) return [];
if (typeof t == "string") {
const [e, ...i] = t.split(u);
if (e === ".." || i.some((l) => O.test(l))) throw s(E, `Invalid "${r}" target "${t}" defined in the package config`);
return [c ? t.replace(/\*/g, c) : t];
}
if (Array.isArray(t)) return t.flatMap((e) => f(r, e, n, o, c));
if (d(t)) {
for (const e of Object.keys(t)) {
if (R.test(e)) throw s(g, "Cannot contain numeric property keys");
if (e === "default" || o.includes(e)) return f(r, t[e], n, o, c);
}
return [];
}
throw s(E, `Invalid "${r}" target "${t}"`);
};
var a = "*";
var v = (r, t) => {
const n = r.indexOf(a), o = t.indexOf(a);
return n === o ? t.length > r.length : o > n;
};
function A(r, t) {
if (!t.includes(a) && r.hasOwnProperty(t)) return [t];
let n, o;
for (const c of Object.keys(r)) if (c.includes(a)) {
const [e, i, l] = c.split(a);
if (l === void 0 && t.startsWith(e) && t.endsWith(i)) {
const _ = t.slice(e.length, -i.length || void 0);
_ && (!n || v(n, c)) && (n = c, o = _);
}
}
return [n, o];
}
var p = (r) => Object.keys(r).reduce((t, n) => {
const o = n === "" || n[0] !== ".";
if (t === void 0 || t === o) return o;
throw s(g, '"exports" cannot contain some keys starting with "." and some not');
}, void 0);
var w = /^\w+:/;
var m = (r, t, n) => {
if (!r) throw new Error('"exports" is required');
t = t === "" ? "." : `./${t}`, (typeof r == "string" || Array.isArray(r) || d(r) && p(r)) && (r = { ".": r });
const [o, c] = A(r, t), e = f(h.Export, r[o], t, n, c);
if (e.length === 0) throw s(I, t === "." ? 'No "exports" main defined' : `Package subpath '${t}' is not defined by "exports"`);
for (const i of e) if (!i.startsWith("./") && !w.test(i)) throw s(E, `Invalid "exports" target "${i}" defined in the package config`);
return e;
};
var T = (r, t, n) => {
if (!r) throw new Error('"imports" is required');
const [o, c] = A(r, t), e = f(h.Import, r[o], t, n, c);
if (e.length === 0) throw s(P, `Package import specifier "${t}" is not defined in package`);
return e;
};
exports.resolveExports = m, exports.resolveImports = T;
}
});
// ../../node_modules/.pnpm/get-tsconfig@4.7.5/node_modules/get-tsconfig/dist/index.cjs
var require_dist7 = __commonJS({
"../../node_modules/.pnpm/get-tsconfig@4.7.5/node_modules/get-tsconfig/dist/index.cjs"(exports) {
"use strict";
init_shims();
var p = __require("path");
var d = __require("fs");
var ge = __require("module");
var me = require_dist6();
function B(e) {
return e.startsWith("\\\\?\\") ? e : e.replace(/\\/g, "/");
}
var h = (e) => {
const t = d[e];
return (i, ...n) => {
const s = `${e}:${n.join(":")}`;
let o = i == null ? void 0 : i.get(s);
return o === void 0 && (o = Reflect.apply(t, d, n), i == null || i.set(s, o)), o;
};
};
var _ = h("existsSync");
var ke = h("readFileSync");
var P = h("statSync");
var Z = (e, t, i) => {
for (; ; ) {
const n = p.posix.join(e, t);
if (_(i, n)) return n;
const s = p.dirname(e);
if (s === e) return;
e = s;
}
};
var M = /^\.{1,2}(\/.*)?$/;
var W = (e) => {
const t = B(e);
return M.test(t) ? t : `./${t}`;
};
function be(e, t = false) {
const i = e.length;
let n = 0, s = "", o = 0, l = 16, a = 0, u = 0, w = 0, T = 0, c = 0;
function E(r, g) {
let f = 0, $ = 0;
for (; f < r || !g; ) {
let A = e.charCodeAt(n);
if (A >= 48 && A <= 57) $ = $ * 16 + A - 48;
else if (A >= 65 && A <= 70) $ = $ * 16 + A - 65 + 10;
else if (A >= 97 && A <= 102) $ = $ * 16 + A - 97 + 10;
else break;
n++, f++;
}
return f < r && ($ = -1), $;
}
function b(r) {
n = r, s = "", o = 0, l = 16, c = 0;
}
function v() {
let r = n;
if (e.charCodeAt(n) === 48) n++;
else for (n++; n < e.length && y(e.charCodeAt(n)); ) n++;
if (n < e.length && e.charCodeAt(n) === 46) if (n++, n < e.length && y(e.charCodeAt(n))) for (n++; n < e.length && y(e.charCodeAt(n)); ) n++;
else return c = 3, e.substring(r, n);
let g = n;
if (n < e.length && (e.charCodeAt(n) === 69 || e.charCodeAt(n) === 101)) if (n++, (n < e.length && e.charCodeAt(n) === 43 || e.charCodeAt(n) === 45) && n++, n < e.length && y(e.charCodeAt(n))) {
for (n++; n < e.length && y(e.charCodeAt(n)); ) n++;
g = n;
} else c = 3;
return e.substring(r, g);
}
function k() {
let r = "", g = n;
for (; ; ) {
if (n >= i) {
r += e.substring(g, n), c = 2;
break;
}
const f = e.charCodeAt(n);
if (f === 34) {
r += e.substring(g, n), n++;
break;
}
if (f === 92) {
if (r += e.substring(g, n), n++, n >= i) {
c = 2;
break;
}
switch (e.charCodeAt(n++)) {
case 34:
r += '"';
break;
case 92:
r += "\\";
break;
case 47:
r += "/";
break;
case 98:
r += "\b";
break;
case 102:
r += "\f";
break;
case 110:
r += `
`;
break;
case 114:
r += "\r";
break;
case 116:
r += " ";
break;
case 117:
const A = E(4, true);
A >= 0 ? r += String.fromCharCode(A) : c = 4;
break;
default:
c = 5;
}
g = n;
continue;
}
if (f >= 0 && f <= 31) if (N(f)) {
r += e.substring(g, n), c = 2;
break;
} else c = 6;
n++;
}
return r;
}
function j() {
if (s = "", c = 0, o = n, u = a, T = w, n >= i) return o = i, l = 17;
let r = e.charCodeAt(n);
if (J(r)) {
do
n++, s += String.fromCharCode(r), r = e.charCodeAt(n);
while (J(r));
return l = 15;
}
if (N(r)) return n++, s += String.fromCharCode(r), r === 13 && e.charCodeAt(n) === 10 && (n++, s += `
`), a++, w = n, l = 14;
switch (r) {
case 123:
return n++, l = 1;
case 125:
return n++, l = 2;
case 91:
return n++, l = 3;
case 93:
return n++, l = 4;
case 58:
return n++, l = 6;
case 44:
return n++, l = 5;
case 34:
return n++, s = k(), l = 10;
case 47:
const g = n - 1;
if (e.charCodeAt(n + 1) === 47) {
for (n += 2; n < i && !N(e.charCodeAt(n)); ) n++;
return s = e.substring(g, n), l = 12;
}
if (e.charCodeAt(n + 1) === 42) {
n += 2;
const f = i - 1;
let $ = false;
for (; n < f; ) {
const A = e.charCodeAt(n);
if (A === 42 && e.charCodeAt(n + 1) === 47) {
n += 2, $ = true;
break;
}
n++, N(A) && (A === 13 && e.charCodeAt(n) === 10 && n++, a++, w = n);
}
return $ || (n++, c = 1), s = e.substring(g, n), l = 13;
}
return s += String.fromCharCode(r), n++, l = 16;
case 45:
if (s += String.fromCharCode(r), n++, n === i || !y(e.charCodeAt(n))) return l = 16;
case 48:
case 49:
case 50:
case 51:
case 52:
case 53:
case 54:
case 55:
case 56:
case 57:
return s += v(), l = 11;
default:
for (; n < i && L(r); ) n++, r = e.charCodeAt(n);
if (o !== n) {
switch (s = e.substring(o, n), s) {
case "true":
return l = 8;
case "false":
return l = 9;
case "null":
return l = 7;
}
return l = 16;
}
return s += String.fromCharCode(r), n++, l = 16;
}
}
function L(r) {
if (J(r) || N(r)) return false;
switch (r) {
case 125:
case 93:
case 123:
case 91:
case 34:
case 58:
case 44:
case 47:
return false;
}
return true;
}
function U() {
let r;
do
r = j();
while (r >= 12 && r <= 15);
return r;
}
return { setPosition: b, getPosition: () => n, scan: t ? U : j, getToken: () => l, getTokenValue: () => s, getTokenOffset: () => o, getTokenLength: () => n - o, getTokenStartLine: () => u, getTokenStartCharacter: () => o - T, getTokenError: () => c };
}
function J(e) {
return e === 32 || e === 9;
}
function N(e) {
return e === 10 || e === 13;
}
function y(e) {
return e >= 48 && e <= 57;
}
var K;
(function(e) {
e[e.lineFeed = 10] = "lineFeed", e[e.carriageReturn = 13] = "carriageReturn", e[e.space = 32] = "space", e[e._0 = 48] = "_0", e[e._1 = 49] = "_1", e[e._2 = 50] = "_2", e[e._3 = 51] = "_3", e[e._4 = 52] = "_4", e[e._5 = 53] = "_5", e[e._6 = 54] = "_6", e[e._7 = 55] = "_7", e[e._8 = 56] = "_8", e[e._9 = 57] = "_9", e[e.a = 97] = "a", e[e.b = 98] = "b", e[e.c = 99] = "c", e[e.d = 100] = "d", e[e.e = 101] = "e", e[e.f = 102] = "f", e[e.g = 103] = "g", e[e.h = 104] = "h", e[e.i = 105] = "i", e[e.j = 106] = "j", e[e.k = 107] = "k", e[e.l = 108] = "l", e[e.m = 109] = "m", e[e.n = 110] = "n", e[e.o = 111] = "o", e[e.p = 112] = "p", e[e.q = 113] = "q", e[e.r = 114] = "r", e[e.s = 115] = "s", e[e.t = 116] = "t", e[e.u = 117] = "u", e[e.v = 118] = "v", e[e.w = 119] = "w", e[e.x = 120] = "x", e[e.y = 121] = "y", e[e.z = 122] = "z", e[e.A = 65] = "A", e[e.B = 66] = "B", e[e.C = 67] = "C", e[e.D = 68] = "D", e[e.E = 69] = "E", e[e.F = 70] = "F", e[e.G = 71] = "G", e[e.H = 72] = "H", e[e.I = 73] = "I", e[e.J = 74] = "J", e[e.K = 75] = "K", e[e.L = 76] = "L", e[e.M = 77] = "M", e[e.N = 78] = "N", e[e.O = 79] = "O", e[e.P = 80] = "P", e[e.Q = 81] = "Q", e[e.R = 82] = "R", e[e.S = 83] = "S", e[e.T = 84] = "T", e[e.U = 85] = "U", e[e.V = 86] = "V", e[e.W = 87] = "W", e[e.X = 88] = "X", e[e.Y = 89] = "Y", e[e.Z = 90] = "Z", e[e.asterisk = 42] = "asterisk", e[e.backslash = 92] = "backslash", e[e.closeBrace = 125] = "closeBrace", e[e.closeBracket = 93] = "closeBracket", e[e.colon = 58] = "colon", e[e.comma = 44] = "comma", e[e.dot = 46] = "dot", e[e.doubleQuote = 34] = "doubleQuote", e[e.minus = 45] = "minus", e[e.openBrace = 123] = "openBrace", e[e.openBracket = 91] = "openBracket", e[e.plus = 43] = "plus", e[e.slash = 47] = "slash", e[e.formFeed = 12] = "formFeed", e[e.tab = 9] = "tab";
})(K || (K = {})), new Array(20).fill(0).map((e, t) => " ".repeat(t));
var F = 200;
new Array(F).fill(0).map((e, t) => `
` + " ".repeat(t)), new Array(F).fill(0).map((e, t) => "\r" + " ".repeat(t)), new Array(F).fill(0).map((e, t) => `\r
` + " ".repeat(t)), new Array(F).fill(0).map((e, t) => `
` + " ".repeat(t)), new Array(F).fill(0).map((e, t) => "\r" + " ".repeat(t)), new Array(F).fill(0).map((e, t) => `\r
` + " ".repeat(t));
var I;
(function(e) {
e.DEFAULT = { allowTrailingComma: false };
})(I || (I = {}));
function we(e, t = [], i = I.DEFAULT) {
let n = null, s = [];
const o = [];
function l(u) {
Array.isArray(s) ? s.push(u) : n !== null && (s[n] = u);
}
return ve(e, { onObjectBegin: () => {
const u = {};
l(u), o.push(s), s = u, n = null;
}, onObjectProperty: (u) => {
n = u;
}, onObjectEnd: () => {
s = o.pop();
}, onArrayBegin: () => {
const u = [];
l(u), o.push(s), s = u, n = null;
}, onArrayEnd: () => {
s = o.pop();
}, onLiteralValue: l, onError: (u, w, T) => {
t.push({ error: u, offset: w, length: T });
} }, i), s[0];
}
function ve(e, t, i = I.DEFAULT) {
const n = be(e, false), s = [];
function o(m) {
return m ? () => m(n.getTokenOffset(), n.getTokenLength(), n.getTokenStartLine(), n.getTokenStartCharacter()) : () => true;
}
function l(m) {
return m ? () => m(n.getTokenOffset(), n.getTokenLength(), n.getTokenStartLine(), n.getTokenStartCharacter(), () => s.slice()) : () => true;
}
function a(m) {
return m ? (O) => m(O, n.getTokenOffset(), n.getTokenLength(), n.getTokenStartLine(), n.getTokenStartCharacter()) : () => true;
}
function u(m) {
return m ? (O) => m(O, n.getTokenOffset(), n.getTokenLength(), n.getTokenStartLine(), n.getTokenStartCharacter(), () => s.slice()) : () => true;
}
const w = l(t.onObjectBegin), T = u(t.onObjectProperty), c = o(t.onObjectEnd), E = l(t.onArrayBegin), b = o(t.onArrayEnd), v = u(t.onLiteralValue), k = a(t.onSeparator), j = o(t.onComment), L = a(t.onError), U = i && i.disallowComments, r = i && i.allowTrailingComma;
function g() {
for (; ; ) {
const m = n.scan();
switch (n.getTokenError()) {
case 4:
f(14);
break;
case 5:
f(15);
break;
case 3:
f(13);
break;
case 1:
U || f(11);
break;
case 2:
f(12);
break;
case 6:
f(16);
break;
}
switch (m) {
case 12:
case 13:
U ? f(10) : j();
break;
case 16:
f(1);
break;
case 15:
case 14:
break;
default:
return m;
}
}
}
function f(m, O = [], Y = []) {
if (L(m), O.length + Y.length > 0) {
let x = n.getToken();
for (; x !== 17; ) {
if (O.indexOf(x) !== -1) {
g();
break;
} else if (Y.indexOf(x) !== -1) break;
x = g();
}
}
}
function $(m) {
const O = n.getTokenValue();
return m ? v(O) : (T(O), s.push(O)), g(), true;
}
function A() {
switch (n.getToken()) {
case 11:
const m = n.getTokenValue();
let O = Number(m);
isNaN(O) && (f(2), O = 0), v(O);
break;
case 7:
v(null);
break;
case 8:
v(true);
break;
case 9:
v(false);
break;
default:
return false;
}
return g(), true;
}
function fe() {
return n.getToken() !== 10 ? (f(3, [], [2, 5]), false) : ($(false), n.getToken() === 6 ? (k(":"), g(), S() || f(4, [], [2, 5])) : f(5, [], [2, 5]), s.pop(), true);
}
function pe() {
w(), g();
let m = false;
for (; n.getToken() !== 2 && n.getToken() !== 17; ) {
if (n.getToken() === 5) {
if (m || f(4, [], []), k(","), g(), n.getToken() === 2 && r) break;
} else m && f(6, [], []);
fe() || f(4, [], [2, 5]), m = true;
}
return c(), n.getToken() !== 2 ? f(7, [2], []) : g(), true;
}
function ae() {
E(), g();
let m = true, O = false;
for (; n.getToken() !== 4 && n.getToken() !== 17; ) {
if (n.getToken() === 5) {
if (O || f(4, [], []), k(","), g(), n.getToken() === 4 && r) break;
} else O && f(6, [], []);
m ? (s.push(0), m = false) : s[s.length - 1]++, S() || f(4, [], [4, 5]), O = true;
}
return b(), m || s.pop(), n.getToken() !== 4 ? f(8, [4], []) : g(), true;
}
function S() {
switch (n.getToken()) {
case 3:
return ae();
case 1:
return pe();
case 10:
return $(true);
default:
return A();
}
}
return g(), n.getToken() === 17 ? i.allowEmptyContent ? true : (f(4, [], []), false) : S() ? (n.getToken() !== 17 && f(9, [], []), true) : (f(4, [], []), false);
}
var C;
(function(e) {
e[e.None = 0] = "None", e[e.UnexpectedEndOfComment = 1] = "UnexpectedEndOfComment", e[e.UnexpectedEndOfString = 2] = "UnexpectedEndOfString", e[e.UnexpectedEndOfNumber = 3] = "UnexpectedEndOfNumber", e[e.InvalidUnicode = 4] = "InvalidUnicode", e[e.InvalidEscapeCharacter = 5] = "InvalidEscapeCharacter", e[e.InvalidCharacter = 6] = "InvalidCharacter";
})(C || (C = {}));
var ee;
(function(e) {
e[e.OpenBraceToken = 1] = "OpenBraceToken", e[e.CloseBraceToken = 2] = "CloseBraceToken", e[e.OpenBracketToken = 3] = "OpenBracketToken", e[e.CloseBracketToken = 4] = "CloseBracketToken", e[e.CommaToken = 5] = "CommaToken", e[e.ColonToken = 6] = "ColonToken", e[e.NullKeyword = 7] = "NullKeyword", e[e.TrueKeyword = 8] = "TrueKeyword", e[e.FalseKeyword = 9] = "FalseKeyword", e[e.StringLiteral = 10] = "StringLiteral", e[e.NumericLiteral = 11] = "NumericLiteral", e[e.LineCommentTrivia = 12] = "LineCommentTrivia", e[e.BlockCommentTrivia = 13] = "BlockCommentTrivia", e[e.LineBreakTrivia = 14] = "LineBreakTrivia", e[e.Trivia = 15] = "Trivia", e[e.Unknown = 16] = "Unknown", e[e.EOF = 17] = "EOF";
})(ee || (ee = {}));
var Te = we;
var ne;
(function(e) {
e[e.InvalidSymbol = 1] = "InvalidSymbol", e[e.InvalidNumberFormat = 2] = "InvalidNumberFormat", e[e.PropertyNameExpected = 3] = "PropertyNameExpected", e[e.ValueExpected = 4] = "ValueExpected", e[e.ColonExpected = 5] = "ColonExpected", e[e.CommaExpected = 6] = "CommaExpected", e[e.CloseBraceExpected = 7] = "CloseBraceExpected", e[e.CloseBracketExpected = 8] = "CloseBracketExpected", e[e.EndOfFileExpected = 9] = "EndOfFileExpected", e[e.InvalidCommentToken = 10] = "InvalidCommentToken", e[e.UnexpectedEndOfComment = 11] = "UnexpectedEndOfComment", e[e.UnexpectedEndOfString = 12] = "UnexpectedEndOfString", e[e.UnexpectedEndOfNumber = 13] = "UnexpectedEndOfNumber", e[e.InvalidUnicode = 14] = "InvalidUnicode", e[e.InvalidEscapeCharacter = 15] = "InvalidEscapeCharacter", e[e.InvalidCharacter = 16] = "InvalidCharacter";
})(ne || (ne = {}));
var te = (e, t) => Te(ke(t, e, "utf8"));
var R = Symbol("implicitBaseUrl");
var Ae = () => {
const { findPnpApi: e } = ge;
return e && e(process.cwd());
};
var G = (e, t, i, n) => {
const s = `resolveFromPackageJsonPath:${e}:${t}:${i}`;
if (n != null && n.has(s)) return n.get(s);
const o = te(e, n);
if (!o) return;
let l = t || "tsconfig.json";
if (!i && o.exports) try {
const [a] = me.resolveExports(o.exports, t, ["require", "types"]);
l = a;
} catch {
return false;
}
else !t && o.tsconfig && (l = o.tsconfig);
return l = p.join(e, "..", l), n == null || n.set(s, l), l;
};
var z = "package.json";
var Q = "tsconfig.json";
var Oe = (e, t, i) => {
let n = e;
if (e === ".." && (n = p.join(n, Q)), e[0] === "." && (n = p.resolve(t, n)), p.isAbsolute(n)) {
if (_(i, n)) {
if (P(i, n).isFile()) return n;
} else if (!n.endsWith(".json")) {
const b = `${n}.json`;
if (_(i, b)) return b;
}
return;
}
const [s, ...o] = e.split("/"), l = s[0] === "@" ? `${s}/${o.shift()}` : s, a = o.join("/"), u = Ae();
if (u) {
const { resolveRequest: b } = u;
try {
if (l === e) {
const v = b(p.join(l, z), t);
if (v) {
const k = G(v, a, false, i);
if (k && _(i, k)) return k;
}
} else {
let v;
try {
v = b(e, t, { extensions: [".json"] });
} catch {
v = b(p.join(e, Q), t);
}
if (v) return v;
}
} catch {
}
}
const w = Z(p.resolve(t), p.join("node_modules", l), i);
if (!w || !P(i, w).isDirectory()) return;
const T = p.join(w, z);
if (_(i, T)) {
const b = G(T, a, false, i);
if (b === false) return;
if (b && _(i, b) && P(i, b).isFile()) return b;
}
const c = p.join(w, a), E = c.endsWith(".json");
if (!E) {
const b = `${c}.json`;
if (_(i, b)) return b;
}
if (_(i, c)) {
if (P(i, c).isDirectory()) {
const b = p.join(c, z);
if (_(i, b)) {
const k = G(b, "", true, i);
if (k && _(i, k)) return k;
}
const v = p.join(c, Q);
if (_(i, v)) return v;
} else if (E) return c;
}
};
var je = (e, t, i, n) => {
const s = Oe(e, t, n);
if (!s) throw new Error(`File '${e}' not found.`);
if (i.has(s)) throw new Error(`Circularity detected while resolving configuration: ${s}`);
i.add(s);
const o = p.dirname(s), l = ie(s, n, i);
delete l.references;
const { compilerOptions: a } = l;
if (a) {
const u = ["baseUrl", "outDir"];
for (const w of u) {
const T = a[w];
T && (a[w] = B(p.relative(t, p.join(o, T))) || "./");
}
}
return l.files && (l.files = l.files.map((u) => B(p.relative(t, p.join(o, u))))), l.include && (l.include = l.include.map((u) => B(p.relative(t, p.join(o, u))))), l.exclude && (l.exclude = l.exclude.map((u) => B(p.relative(t, p.join(o, u))))), l;
};
var ie = (e, t, i = /* @__PURE__ */ new Set()) => {
let n;
try {
n = te(e, t) || {};
} catch {
throw new Error(`Cannot resolve tsconfig at path: ${e}`);
}
if (typeof n != "object") throw new SyntaxError(`Failed to parse tsconfig at: ${e}`);
const s = p.dirname(e);
if (n.compilerOptions) {
const { compilerOptions: o } = n;
o.paths && !o.baseUrl && (o[R] = s);
}
if (n.extends) {
const o = Array.isArray(n.extends) ? n.extends : [n.extends];
delete n.extends;
for (const l of o.reverse()) {
const a = je(l, s, new Set(i), t), u = { ...a, ...n, compilerOptions: { ...a.compilerOptions, ...n.compilerOptions } };
a.watchOptions && (u.watchOptions = { ...a.watchOptions, ...n.watchOptions }), n = u;
}
}
if (n.compilerOptions) {
const { compilerOptions: o } = n, l = ["baseUrl", "rootDir"];
for (const u of l) {
const w = o[u];
if (w) {
const T = p.resolve(s, w), c = W(p.relative(s, T));
o[u] = c;
}
}
const { outDir: a } = o;
a && (Array.isArray(n.exclude) || (n.exclude = []), n.exclude.includes(a) || n.exclude.push(a), o.outDir = W(a));
} else n.compilerOptions = {};
if (n.files && (n.files = n.files.map(W)), n.include && (n.include = n.include.map(B)), n.watchOptions) {
const { watchOptions: o } = n;
o.excludeDirectories && (o.excludeDirectories = o.excludeDirectories.map((l) => B(p.resolve(s, l))));
}
return n;
};
var se = (e, t = /* @__PURE__ */ new Map()) => ie(e, t);
var $e = (e = process.cwd(), t = "tsconfig.json", i = /* @__PURE__ */ new Map()) => {
const n = Z(B(e), t, i);
if (!n) return null;
const s = se(n, i);
return { path: n, config: s };
};
var Be = /\*/g;
var le = (e, t) => {
const i = e.match(Be);
if (i && i.length > 1) throw new Error(t);
};
var _e = (e) => {
if (e.includes("*")) {
const [t, i] = e.split("*");
return { prefix: t, suffix: i };
}
return e;
};
var Ee = ({ prefix: e, suffix: t }, i) => i.startsWith(e) && i.endsWith(t);
var Le = (e, t, i) => Object.entries(e).map(([n, s]) => (le(n, `Pattern '${n}' can have at most one '*' character.`), { pattern: _e(n), substitutions: s.map((o) => {
if (le(o, `Substitution '${o}' in pattern '${n}' can have at most one '*' character.`), !t && !M.test(o)) throw new Error("Non-relative paths are not allowed when 'baseUrl' is not set. Did you forget a leading './'?");
return p.resolve(i, o);
}) }));
var Ue = (e) => {
if (!e.config.compilerOptions) return null;
const { baseUrl: t, paths: i } = e.config.compilerOptions, n = R in e.config.compilerOptions && e.config.compilerOptions[R];
if (!t && !i) return null;
const s = p.resolve(p.dirname(e.path), t || n || "."), o = i ? Le(i, t, s) : [];
return (l) => {
if (M.test(l)) return [];
const a = [];
for (const c of o) {
if (c.pattern === l) return c.substitutions.map(B);
typeof c.pattern != "string" && a.push(c);
}
let u, w = -1;
for (const c of a) Ee(c.pattern, l) && c.pattern.prefix.length > w && (w = c.pattern.prefix.length, u = c);
if (!u) return t ? [B(p.join(s, l))] : [];
const T = l.slice(u.pattern.prefix.length, l.length - u.pattern.suffix.length);
return u.substitutions.map((c) => B(c.replace("*", T)));
};
};
var oe = (e) => {
let t = "";
for (let i = 0; i < e.length; i += 1) {
const n = e[i], s = n.toUpperCase();
t += n === s ? n.toLowerCase() : s;
}
return t;
};
var ye = 65;
var Fe = 97;
var Ne = () => Math.floor(Math.random() * 26);
var xe = (e) => Array.from({ length: e }, () => String.fromCodePoint(Ne() + (Math.random() > 0.5 ? ye : Fe))).join("");
var Pe = (e = d) => {
const t = process.execPath;
if (e.existsSync(t)) return !e.existsSync(oe(t));
const i = `/${xe(10)}`;
e.writeFileSync(i, "");
const n = !e.existsSync(oe(i));
return e.unlinkSync(i), n;
};
var { join: D } = p.posix;
var H = { ts: [".ts", ".tsx", ".d.ts"], cts: [".cts", ".d.cts"], mts: [".mts", ".d.mts"] };
var Ie = (e) => {
const t = [...H.ts], i = [...H.cts], n = [...H.mts];
return e != null && e.allowJs && (t.push(".js", ".jsx"), i.push(".cjs"), n.push(".mjs")), [...t, ...i, ...n];
};
var De = (e) => {
const t = [];
if (!e) return t;
const { outDir: i, declarationDir: n } = e;
return i && t.push(i), n && t.push(n), t;
};
var re = (e) => e.replaceAll(/[.*+?^${}()|[\]\\]/g, "\\$&");
var Ve = ["node_modules", "bower_components", "jspm_packages"];
var q = `(?!(${Ve.join("|")})(/|$))`;
var Se = /(?:^|\/)[^.*?]+$/;
var ue = "**/*";
var V = "[^/]";
var X = "[^./]";
var ce = process.platform === "win32";
var de = ({ config: e, path: t }, i = Pe()) => {
if ("extends" in e) throw new Error("tsconfig#extends must be resolved. Use getTsconfig or parseTsconfig to resolve it.");
if (!p.isAbsolute(t)) throw new Error("The tsconfig path must be absolute");
ce && (t = B(t));
const n = p.dirname(t), { files: s, include: o, exclude: l, compilerOptions: a } = e, u = s == null ? void 0 : s.map((k) => D(n, k)), w = Ie(a), T = i ? "" : "i", E = (l || De(a)).map((k) => {
const j = D(n, k), L = re(j).replaceAll("\\*\\*/", "(.+/)?").replaceAll("\\*", `${V}*`).replaceAll("\\?", V);
return new RegExp(`^${L}($|/)`, T);
}), b = s || o ? o : [ue], v = b ? b.map((k) => {
let j = D(n, k);
Se.test(j) && (j = D(j, ue));
const L = re(j).replaceAll("/\\*\\*", `(/${q}${X}${V}*)*?`).replaceAll(/(\/)?\\\*/g, (U, r) => {
const g = `(${X}|(\\.(?!min\\.js$))?)*`;
return r ? `/${q}${X}${g}` : g;
}).replaceAll(/(\/)?\\\?/g, (U, r) => {
const g = V;
return r ? `/${q}${g}` : g;
});
return new RegExp(`^${L}$`, T);
}) : void 0;
return (k) => {
if (!p.isAbsolute(k)) throw new Error("filePath must be absolute");
if (ce && (k = B(k)), u != null && u.includes(k)) return e;
if (!(!w.some((j) => k.endsWith(j)) || E.some((j) => j.test(k))) && v && v.some((j) => j.test(k))) return e;
};
};
exports.createFilesMatcher = de, exports.createPathsMatcher = Ue, exports.getTsconfig = $e, exports.parseTsconfig = se;
}
});
// ../../node_modules/.pnpm/eslint-plugin-import-x@0.4.4_patch_hash=4oryti2zfrehz2qi62zyaaa334_eslint@9.4.0_typescript@5.4.5/node_modules/eslint-plugin-import-x/lib/utils/get-value.js
var require_get_value = __commonJS({
"../../node_modules/.pnpm/eslint-plugin-import-x@0.4.4_patch_hash=4oryti2zfrehz2qi62zyaaa334_eslint@9.4.0_typescript@5.4.5/node_modules/eslint-plugin-import-x/lib/utils/get-value.js"(exports) {
"use strict";
init_shims();
Object.defineProperty(exports, "__esModule", { value: true });
exports.getValue = void 0;
var utils_1 = require_dist5();
var getValue = (node2) => {
switch (node2.type) {
case utils_1.TSESTree.AST_NODE_TYPES.Identifier: {
return node2.name;
}
case utils_1.TSESTree.AST_NODE_TYPES.Literal: {
return node2.value;
}
default: {
throw new Error(`Unsupported node type: ${node2.type}`);
}
}
};
exports.getValue = getValue;
}
});
// ../../node_modules/.pnpm/eslint-plugin-import-x@0.4.4_patch_hash=4oryti2zfrehz2qi62zyaaa334_eslint@9.4.0_typescript@5.4.5/node_modules/eslint-plugin-import-x/lib/utils/hash.js
var require_hash = __commonJS({
"../../node_modules/.pnpm/eslint-plugin-import-x@0.4.4_patch_hash=4oryti2zfrehz2qi62zyaaa334_eslint@9.4.0_typescript@5.4.5/node_modules/eslint-plugin-import-x/lib/utils/hash.js"(exports) {
"use strict";
init_shims();
Object.defineProperty(exports, "__esModule", { value: true });
exports.hashObject = exports.hashArray = exports.hashify = void 0;
var node_crypto_1 = __require("node:crypto");
function hashify(value, hash) {
hash !== null && hash !== void 0 ? hash : hash = (0, node_crypto_1.createHash)("sha256");
if (Array.isArray(value)) {
hashArray(value, hash);
} else if (value instanceof Object) {
hashObject(value, hash);
} else {
hash.update(JSON.stringify(value) || "undefined");
}
return hash;
}
exports.hashify = hashify;
function hashArray(array, hash) {
hash !== null && hash !== void 0 ? hash : hash = (0, node_crypto_1.createHash)("sha256");
hash.update("[");
for (const element of array) {
hashify(element, hash);
hash.update(",");
}
hash.update("]");
return hash;
}
exports.hashArray = hashArray;
function hashObject(object, hash) {
hash !== null && hash !== void 0 ? hash : hash = (0, node_crypto_1.createHash)("sha256");
hash.update("{");
for (const key of Object.keys(object).sort()) {
hash.update(JSON.stringify(key));
hash.update(":");
hashify(object[key], hash);
hash.update(",");
}
hash.update("}");
return hash;
}
exports.hashObject = hashObject;
}
});
// ../../node_modules/.pnpm/eslint-plugin-import-x@0.4.4_patch_hash=4oryti2zfrehz2qi62zyaaa334_eslint@9.4.0_typescript@5.4.5/node_modules/eslint-plugin-import-x/lib/utils/ignore.js
var require_ignore = __commonJS({
"../../node_modules/.pnpm/eslint-plugin-import-x@0.4.4_patch_hash=4oryti2zfrehz2qi62zyaaa334_eslint@9.4.0_typescript@5.4.5/node_modules/eslint-plugin-import-x/lib/utils/ignore.js"(exports) {
"use strict";
init_shims();
Object.defineProperty(exports, "__esModule", { value: true });
exports.hasValidExtension = exports.ignore = exports.getFileExtensions = void 0;
var tslib_1 = (init_tslib_es6(), __toCommonJS(tslib_es6_exports));
var node_path_1 = tslib_1.__importDefault(__require("node:path"));
var debug_1 = tslib_1.__importDefault(require_src());
var log = (0, debug_1.default)("eslint-plugin-import-x:utils:ignore");
var cachedSet;
var lastSettings;
function validExtensions(context) {
if (cachedSet && context.settings === lastSettings) {
return cachedSet;
}
lastSettings = context.settings;
cachedSet = getFileExtensions(context.settings);
return cachedSet;
}
function getFileExtensions(settings) {
const exts = new Set(settings["import-x/extensions"] || [".js"]);
if ("import-x/parsers" in settings) {
for (const parser in settings["import-x/parsers"]) {
const parserSettings = settings["import-x/parsers"][parser];
if (!Array.isArray(parserSettings)) {
throw new TypeError(`"settings" for ${parser} must be an array`);
}
for (const ext of parserSettings)
exts.add(ext);
}
}
return exts;
}
exports.getFileExtensions = getFileExtensions;
function ignore(filepath, context) {
if (!hasValidExtension(filepath, context)) {
return true;
}
const ignoreStrings = context.settings["import-x/ignore"];
if (!(ignoreStrings === null || ignoreStrings === void 0 ? void 0 : ignoreStrings.length)) {
return false;
}
for (const ignoreString of ignoreStrings) {
const regex = new RegExp(ignoreString);
if (regex.test(filepath)) {
log(`ignoring ${filepath}, matched pattern /${ignoreString}/`);
return true;
}
}
return false;
}
exports.ignore = ignore;
function hasValidExtension(filepath, context) {
return validExtensions(context).has(node_path_1.default.extname(filepath));
}
exports.hasValidExtension = hasValidExtension;
}
});
// ../../node_modules/.pnpm/eslint-plugin-import-x@0.4.4_patch_hash=4oryti2zfrehz2qi62zyaaa334_eslint@9.4.0_typescript@5.4.5/node_modules/eslint-plugin-import-x/lib/utils/module-require.js
var require_module_require = __commonJS({
"../../node_modules/.pnpm/eslint-plugin-import-x@0.4.4_patch_hash=4oryti2zfrehz2qi62zyaaa334_eslint@9.4.0_typescript@5.4.5/node_modules/eslint-plugin-import-x/lib/utils/module-require.js"(exports) {
"use strict";
init_shims();
Object.defineProperty(exports, "__esModule", { value: true });
exports.moduleRequire = void 0;
var tslib_1 = (init_tslib_es6(), __toCommonJS(tslib_es6_exports));
var node_module_1 = tslib_1.__importDefault(__require("node:module"));
var node_path_1 = tslib_1.__importDefault(__require("node:path"));
function createModule(filename) {
const mod = new node_module_1.default(filename);
mod.filename = filename;
mod.paths = node_module_1.default._nodeModulePaths(node_path_1.default.dirname(filename));
return mod;
}
function moduleRequire(p) {
try {
const eslintPath = __require.resolve("eslint");
const eslintModule = createModule(eslintPath);
return __require(node_module_1.default._resolveFilename(p, eslintModule));
} catch (_a) {
}
try {
return __require.main.require(p);
} catch (_b) {
}
return __require(p);
}
exports.moduleRequire = moduleRequire;
}
});
// ../../node_modules/.pnpm/eslint-plugin-import-x@0.4.4_patch_hash=4oryti2zfrehz2qi62zyaaa334_eslint@9.4.0_typescript@5.4.5/node_modules/eslint-plugin-import-x/lib/utils/parse.js
var require_parse2 = __commonJS({
"../../node_modules/.pnpm/eslint-plugin-import-x@0.4.4_patch_hash=4oryti2zfrehz2qi62zyaaa334_eslint@9.4.0_typescript@5.4.5/node_modules/eslint-plugin-import-x/lib/utils/parse.js"(exports) {
"use strict";
init_shims();
Object.defineProperty(exports, "__esModule", { value: true });
exports.parse = void 0;
var tslib_1 = (init_tslib_es6(), __toCommonJS(tslib_es6_exports));
var node_path_1 = tslib_1.__importDefault(__require("node:path"));
var debug_1 = tslib_1.__importDefault(require_src());
var module_require_1 = require_module_require();
var log = (0, debug_1.default)("eslint-plugin-import-x:parse");
function keysFromParser(parserPath, parserInstance, parsedResult) {
if (parsedResult && parsedResult.visitorKeys) {
return parsedResult.visitorKeys;
}
if (typeof parserPath === "string" && /.*espree.*/.test(parserPath)) {
return parserInstance.VisitorKeys;
}
return null;
}
function makeParseReturn(ast, visitorKeys) {
return {
ast,
visitorKeys
};
}
function stripUnicodeBOM(text) {
return text.codePointAt(0) === 65279 ? text.slice(1) : text;
}
function transformHashbang(text) {
return text.replace(/^#!([^\r\n]+)/u, (_, captured) => `//${captured}`);
}
function parse(path, content, context) {
var _a;
if (context == null) {
throw new Error("need context to parse properly");
}
let parserOptions = "languageOptions" in context && ((_a = context.languageOptions) === null || _a === void 0 ? void 0 : _a.parserOptions) || context.parserOptions;
const parserOrPath = getParser(path, context);
if (!parserOrPath) {
throw new Error("parserPath or languageOptions.parser is required!");
}
parserOptions = Object.assign({}, parserOptions);
parserOptions.ecmaFeatures = Object.assign({}, parserOptions.ecmaFeatures);
parserOptions.comment = true;
parserOptions.attachComment = true;
parserOptions.tokens = true;
parserOptions.loc = true;
parserOptions.range = true;
parserOptions.filePath = path;
delete parserOptions.EXPERIMENTAL_useProjectService;
delete parserOptions.project;
delete parserOptions.projects;
const parser = typeof parserOrPath === "string" ? (0, module_require_1.moduleRequire)(parserOrPath) : parserOrPath;
content = transformHashbang(stripUnicodeBOM(String(content)));
if ("parseForESLint" in parser && typeof parser.parseForESLint === "function") {
let ast;
try {
const parserRaw = parser.parseForESLint(content, parserOptions);
ast = parserRaw.ast;
return makeParseReturn(ast, keysFromParser(parserOrPath, parser, parserRaw));
} catch (error_) {
const error = error_;
console.warn(`Error while parsing ${parserOptions.filePath}`);
console.warn(`Line ${error.lineNumber}, column ${error.column}: ${error.message}`);
}
if (!ast || typeof ast !== "object") {
console.warn(`\`parseForESLint\` from parser \`${typeof parserOrPath === "string" ? parserOrPath : "`context.languageOptions.parser`"}\` is invalid and will just be ignored`);
} else {
return makeParseReturn(ast, keysFromParser(parserOrPath, parser));
}
}
if ("parse" in parser) {
const ast = parser.parse(content, parserOptions);
return makeParseReturn(ast, keysFromParser(parserOrPath, parser));
}
throw new Error("Parser must expose a `parse` or `parseForESLint` method");
}
exports.parse = parse;
function getParser(path, context) {
var _a;
const parserPath = getParserPath(path, context);
if (parserPath) {
return parserPath;
}
const parser = "languageOptions" in context && ((_a = context.languageOptions) === null || _a === void 0 ? void 0 : _a.parser);
if (parser && typeof parser !== "string" && ("parse" in parser && typeof parse === "function" || "parseForESLint" in parser && typeof parser.parseForESLint === "function")) {
return parser;
}
return null;
}
function getParserPath(filepath, context) {
const parsers = context.settings["import-x/parsers"];
if (parsers != null) {
const extension = node_path_1.default.extname(filepath);
for (const parserPath in parsers) {
if (parsers[parserPath].includes(extension)) {
log("using alt parser:", parserPath);
return parserPath;
}
}
}
return context.parserPath;
}
}
});
// ../../node_modules/.pnpm/eslint-plugin-import-x@0.4.4_patch_hash=4oryti2zfrehz2qi62zyaaa334_eslint@9.4.0_typescript@5.4.5/node_modules/eslint-plugin-import-x/lib/utils/module-cache.js
var require_module_cache = __commonJS({
"../../node_modules/.pnpm/eslint-plugin-import-x@0.4.4_patch_hash=4oryti2zfrehz2qi62zyaaa334_eslint@9.4.0_typescript@5.4.5/node_modules/eslint-plugin-import-x/lib/utils/module-cache.js"(exports) {
"use strict";
init_shims();
Object.defineProperty(exports, "__esModule", { value: true });
exports.ModuleCache = void 0;
var tslib_1 = (init_tslib_es6(), __toCommonJS(tslib_es6_exports));
var debug_1 = tslib_1.__importDefault(require_src());
var log = (0, debug_1.default)("eslint-plugin-import-x:utils:ModuleCache");
var ModuleCache = class {
constructor(map = /* @__PURE__ */ new Map()) {
this.map = map;
}
set(cacheKey, result) {
this.map.set(cacheKey, {
result,
lastSeen: process.hrtime()
});
log("setting entry for", cacheKey);
return result;
}
get(cacheKey, settings) {
if (this.map.has(cacheKey)) {
const f = this.map.get(cacheKey);
if (process.hrtime(f.lastSeen)[0] < settings.lifetime) {
return f.result;
}
} else {
log("cache miss for", cacheKey);
}
}
static getSettings(settings) {
const cacheSettings = Object.assign({ lifetime: 30 }, settings["import-x/cache"]);
if (["\u221E", "Infinity"].includes(cacheSettings.lifetime)) {
cacheSettings.lifetime = Number.POSITIVE_INFINITY;
}
return cacheSettings;
}
};
exports.ModuleCache = ModuleCache;
}
});
// ../../node_modules/.pnpm/eslint-plugin-import-x@0.4.4_patch_hash=4oryti2zfrehz2qi62zyaaa334_eslint@9.4.0_typescript@5.4.5/node_modules/eslint-plugin-import-x/lib/utils/pkg-up.js
var require_pkg_up = __commonJS({
"../../node_modules/.pnpm/eslint-plugin-import-x@0.4.4_patch_hash=4oryti2zfrehz2qi62zyaaa334_eslint@9.4.0_typescript@5.4.5/node_modules/eslint-plugin-import-x/lib/utils/pkg-up.js"(exports) {
"use strict";
init_shims();
Object.defineProperty(exports, "__esModule", { value: true });
exports.pkgUp = void 0;
var tslib_1 = (init_tslib_es6(), __toCommonJS(tslib_es6_exports));
var node_fs_1 = tslib_1.__importDefault(__require("node:fs"));
var node_path_1 = tslib_1.__importDefault(__require("node:path"));
function findUp(filename, cwd) {
let dir = node_path_1.default.resolve(cwd || "");
const root = node_path_1.default.parse(dir).root;
const filenames = [filename].flat();
while (true) {
const file = filenames.find((el) => node_fs_1.default.existsSync(node_path_1.default.resolve(dir, el)));
if (file) {
return node_path_1.default.resolve(dir, file);
}
if (dir === root) {
return null;
}
dir = node_path_1.default.dirname(dir);
}
}
function pkgUp(opts) {
return findUp("package.json", opts && opts.cwd);
}
exports.pkgUp = pkgUp;
}
});
// ../../node_modules/.pnpm/eslint-plugin-import-x@0.4.4_patch_hash=4oryti2zfrehz2qi62zyaaa334_eslint@9.4.0_typescript@5.4.5/node_modules/eslint-plugin-import-x/lib/utils/pkg-dir.js
var require_pkg_dir = __commonJS({
"../../node_modules/.pnpm/eslint-plugin-import-x@0.4.4_patch_hash=4oryti2zfrehz2qi62zyaaa334_eslint@9.4.0_typescript@5.4.5/node_modules/eslint-plugin-import-x/lib/utils/pkg-dir.js"(exports) {
"use strict";
init_shims();
Object.defineProperty(exports, "__esModule", { value: true });
exports.pkgDir = void 0;
var tslib_1 = (init_tslib_es6(), __toCommonJS(tslib_es6_exports));
var node_path_1 = tslib_1.__importDefault(__require("node:path"));
var pkg_up_1 = require_pkg_up();
function pkgDir(cwd) {
const fp = (0, pkg_up_1.pkgUp)({ cwd });
return fp ? node_path_1.default.dirname(fp) : null;
}
exports.pkgDir = pkgDir;
}
});
// ../../node_modules/.pnpm/eslint-plugin-import-x@0.4.4_patch_hash=4oryti2zfrehz2qi62zyaaa334_eslint@9.4.0_typescript@5.4.5/node_modules/eslint-plugin-import-x/lib/utils/resolve.js
var require_resolve = __commonJS({
"../../node_modules/.pnpm/eslint-plugin-import-x@0.4.4_patch_hash=4oryti2zfrehz2qi62zyaaa334_eslint@9.4.0_typescript@5.4.5/node_modules/eslint-plugin-import-x/lib/utils/resolve.js"(exports) {
"use strict";
init_shims();
Object.defineProperty(exports, "__esModule", { value: true });
exports.resolve = exports.relative = exports.fileExistsWithCaseSync = exports.CASE_SENSITIVE_FS = void 0;
var tslib_1 = (init_tslib_es6(), __toCommonJS(tslib_es6_exports));
var node_fs_1 = tslib_1.__importDefault(__require("node:fs"));
var node_module_1 = __require("node:module");
var node_path_1 = tslib_1.__importDefault(__require("node:path"));
var eslint_compat_utils_1 = require_dist();
var hash_1 = require_hash();
var module_cache_1 = require_module_cache();
var pkg_dir_1 = require_pkg_dir();
exports.CASE_SENSITIVE_FS = !node_fs_1.default.existsSync(node_path_1.default.resolve(__dirname, node_path_1.default.basename(__filename).replace(/^resolve\./, "reSOLVE.")));
var ERROR_NAME = "EslintPluginImportResolveError";
var fileExistsCache = new module_cache_1.ModuleCache();
function tryRequire(target, sourceFile) {
let resolved;
try {
if (sourceFile == null) {
resolved = __require.resolve(target);
} else {
try {
resolved = (0, node_module_1.createRequire)(node_path_1.default.resolve(sourceFile)).resolve(target);
} catch (_a) {
resolved = __require.resolve(target);
}
}
} catch (_b) {
return void 0;
}
return __require(resolved);
}
function fileExistsWithCaseSync(filepath, cacheSettings, strict) {
if (exports.CASE_SENSITIVE_FS) {
return true;
}
if (filepath === null) {
return true;
}
if (filepath.toLowerCase() === process.cwd().toLowerCase() && !strict) {
return true;
}
const parsedPath = node_path_1.default.parse(filepath);
const dir = parsedPath.dir;
let result = fileExistsCache.get(filepath, cacheSettings);
if (result != null) {
return result;
}
if (dir === "" || parsedPath.root === filepath) {
result = true;
} else {
const filenames = node_fs_1.default.readdirSync(dir);
result = filenames.includes(parsedPath.base) ? fileExistsWithCaseSync(dir, cacheSettings, strict) : false;
}
fileExistsCache.set(filepath, result);
return result;
}
exports.fileExistsWithCaseSync = fileExistsWithCaseSync;
var prevSettings = null;
var memoizedHash;
function fullResolve(modulePath, sourceFile, settings) {
const coreSet = new Set(settings["import-x/core-modules"]);
if (coreSet.has(modulePath)) {
return {
found: true,
path: null
};
}
const sourceDir = node_path_1.default.dirname(sourceFile);
if (prevSettings !== settings) {
memoizedHash = (0, hash_1.hashObject)(settings).digest("hex");
prevSettings = settings;
}
const cacheKey = sourceDir + memoizedHash + modulePath;
const cacheSettings = module_cache_1.ModuleCache.getSettings(settings);
const cachedPath = fileExistsCache.get(cacheKey, cacheSettings);
if (cachedPath !== void 0) {
return { found: true, path: cachedPath };
}
function cache(resolvedPath) {
fileExistsCache.set(cacheKey, resolvedPath);
}
function withResolver(resolver, config) {
if (resolver.interfaceVersion === 2) {
return resolver.resolve(modulePath, sourceFile, config);
}
try {
const resolved = resolver.resolveImport(modulePath, sourceFile, config);
if (resolved === void 0) {
return {
found: false
};
}
return {
found: true,
path: resolved
};
} catch (_a) {
return {
found: false
};
}
}
const configResolvers = settings["import-x/resolver"] || {
node: settings["import-x/resolve"]
};
const resolvers = resolverReducer(configResolvers, /* @__PURE__ */ new Map());
for (const [name, config] of resolvers) {
const resolver = requireResolver(name, sourceFile);
const resolved = withResolver(resolver, config);
if (!resolved.found) {
continue;
}
cache(resolved.path);
return resolved;
}
return { found: false };
}
function relative(modulePath, sourceFile, settings) {
return fullResolve(modulePath, sourceFile, settings).path;
}
exports.relative = relative;
function resolverReducer(resolvers, map) {
if (Array.isArray(resolvers)) {
for (const r of resolvers)
resolverReducer(r, map);
return map;
}
if (typeof resolvers === "string") {
map.set(resolvers, null);
return map;
}
if (typeof resolvers === "object") {
for (const [key, value] of Object.entries(resolvers)) {
map.set(key, value);
}
return map;
}
const err = new Error("invalid resolver config");
err.name = ERROR_NAME;
throw err;
}
function getBaseDir(sourceFile) {
return (0, pkg_dir_1.pkgDir)(sourceFile) || process.cwd();
}
function requireResolver(name, sourceFile) {
const resolver = tryRequire(`eslint-import-resolver-${name}`, sourceFile) || tryRequire(name, sourceFile) || tryRequire(node_path_1.default.resolve(getBaseDir(sourceFile), name));
if (!resolver) {
const err = new Error(`unable to load resolver "${name}".`);
err.name = ERROR_NAME;
throw err;
}
if (!isResolverValid(resolver)) {
const err = new Error(`${name} with invalid interface loaded as resolver`);
err.name = ERROR_NAME;
throw err;
}
return resolver;
}
function isResolverValid(resolver) {
if ("interfaceVersion" in resolver && resolver.interfaceVersion === 2) {
return "resolve" in resolver && !!resolver.resolve && typeof resolver.resolve === "function";
}
return "resolveImport" in resolver && !!resolver.resolveImport && typeof resolver.resolveImport === "function";
}
var erroredContexts = /* @__PURE__ */ new Set();
function resolve(p, context) {
try {
return relative(p, (0, eslint_compat_utils_1.getPhysicalFilename)(context), context.settings);
} catch (error_) {
const error = error_;
if (!erroredContexts.has(context)) {
let errMessage = error.message;
if (error.name !== ERROR_NAME && error.stack) {
errMessage = error.stack.replace(/^Error: /, "");
}
context.report({
message: `Resolve error: ${errMessage}`,
loc: {
line: 1,
column: 0
}
});
erroredContexts.add(context);
}
}
}
exports.resolve = resolve;
}
});
// ../../node_modules/.pnpm/eslint-plugin-import-x@0.4.4_patch_hash=4oryti2zfrehz2qi62zyaaa334_eslint@9.4.0_typescript@5.4.5/node_modules/eslint-plugin-import-x/lib/utils/unambiguous.js
var require_unambiguous = __commonJS({
"../../node_modules/.pnpm/eslint-plugin-import-x@0.4.4_patch_hash=4oryti2zfrehz2qi62zyaaa334_eslint@9.4.0_typescript@5.4.5/node_modules/eslint-plugin-import-x/lib/utils/unambiguous.js"(exports) {
"use strict";
init_shims();
Object.defineProperty(exports, "__esModule", { value: true });
exports.isUnambiguousModule = exports.isMaybeUnambiguousModule = void 0;
var pattern = /(^|;)\s*(export|import)((\s+\w)|(\s*[*={]))|import\(/m;
function isMaybeUnambiguousModule(content) {
return pattern.test(content);
}
exports.isMaybeUnambiguousModule = isMaybeUnambiguousModule;
var unambiguousNodeType = /^(?:(?:Exp|Imp)ort.*Declaration|TSExportAssignment)$/;
function isUnambiguousModule(ast) {
return ast.body && ast.body.some((node2) => unambiguousNodeType.test(node2.type));
}
exports.isUnambiguousModule = isUnambiguousModule;
}
});
// ../../node_modules/.pnpm/eslint-plugin-import-x@0.4.4_patch_hash=4oryti2zfrehz2qi62zyaaa334_eslint@9.4.0_typescript@5.4.5/node_modules/eslint-plugin-import-x/lib/utils/visit.js
var require_visit = __commonJS({
"../../node_modules/.pnpm/eslint-plugin-import-x@0.4.4_patch_hash=4oryti2zfrehz2qi62zyaaa334_eslint@9.4.0_typescript@5.4.5/node_modules/eslint-plugin-import-x/lib/utils/visit.js"(exports) {
"use strict";
init_shims();
Object.defineProperty(exports, "__esModule", { value: true });
exports.visit = void 0;
function visit(node2, keys, visitorSpec) {
if (!node2 || !keys) {
return;
}
const type = node2.type;
const visitor = visitorSpec[type];
if (typeof visitor === "function") {
visitor(node2);
}
const childFields = keys[type];
if (!childFields) {
return;
}
for (const fieldName of childFields) {
for (const item of [node2[fieldName]].flat()) {
if (!item || typeof item !== "object" || !("type" in item)) {
continue;
}
visit(item, keys, visitorSpec);
}
}
const exit = visitorSpec[`${type}:Exit`];
if (typeof exit === "function") {
exit(node2);
}
}
exports.visit = visit;
}
});
// ../../node_modules/.pnpm/eslint-plugin-import-x@0.4.4_patch_hash=4oryti2zfrehz2qi62zyaaa334_eslint@9.4.0_typescript@5.4.5/node_modules/eslint-plugin-import-x/lib/utils/export-map.js
var require_export_map = __commonJS({
"../../node_modules/.pnpm/eslint-plugin-import-x@0.4.4_patch_hash=4oryti2zfrehz2qi62zyaaa334_eslint@9.4.0_typescript@5.4.5/node_modules/eslint-plugin-import-x/lib/utils/export-map.js"(exports) {
"use strict";
init_shims();
Object.defineProperty(exports, "__esModule", { value: true });
exports.recursivePatternCapture = exports.ExportMap = void 0;
var tslib_1 = (init_tslib_es6(), __toCommonJS(tslib_es6_exports));
var node_fs_1 = tslib_1.__importDefault(__require("node:fs"));
var node_path_1 = tslib_1.__importDefault(__require("node:path"));
var debug_1 = tslib_1.__importDefault(require_src());
var doctrine_1 = tslib_1.__importDefault(require_doctrine());
var eslint_1 = __require("eslint");
var get_tsconfig_1 = require_dist7();
var get_value_1 = require_get_value();
var hash_1 = require_hash();
var ignore_1 = require_ignore();
var parse_1 = require_parse2();
var resolve_1 = require_resolve();
var unambiguous_1 = require_unambiguous();
var visit_1 = require_visit();
var log = (0, debug_1.default)("eslint-plugin-import-x:ExportMap");
var exportCache = /* @__PURE__ */ new Map();
var tsconfigCache = /* @__PURE__ */ new Map();
var ExportMap = class _ExportMap {
static for(context) {
const { path: filepath } = context;
const cacheKey = context.cacheKey || (0, hash_1.hashObject)(context).digest("hex");
let exportMap = exportCache.get(cacheKey);
if (exportMap === null) {
return null;
}
const stats = node_fs_1.default.statSync(context.path);
if (exportMap != null && exportMap.mtime.valueOf() - stats.mtime.valueOf() === 0) {
return exportMap;
}
if (!(0, ignore_1.hasValidExtension)(filepath, context)) {
exportCache.set(cacheKey, null);
return null;
}
if ((0, ignore_1.ignore)(filepath, context)) {
log("ignored path due to ignore settings:", filepath);
exportCache.set(cacheKey, null);
return null;
}
const content = node_fs_1.default.readFileSync(filepath, { encoding: "utf8" });
if (!(0, unambiguous_1.isMaybeUnambiguousModule)(content)) {
log("ignored path due to unambiguous regex:", filepath);
exportCache.set(cacheKey, null);
return null;
}
log("cache miss", cacheKey, "for path", filepath);
exportMap = _ExportMap.parse(filepath, content, context);
if (exportMap == null) {
log("ignored path due to ambiguous parse:", filepath);
exportCache.set(cacheKey, null);
return null;
}
exportMap.mtime = stats.mtime;
exportCache.set(cacheKey, exportMap);
return exportMap;
}
static get(source, context) {
const path = (0, resolve_1.resolve)(source, context);
if (path == null) {
return null;
}
return _ExportMap.for(childContext(path, context));
}
static parse(filepath, content, context) {
const m = new _ExportMap(filepath);
const isEsModuleInteropTrue = isEsModuleInterop();
let ast;
let visitorKeys;
try {
;
({ ast, visitorKeys } = (0, parse_1.parse)(filepath, content, context));
} catch (error) {
m.errors.push(error);
return m;
}
m.visitorKeys = visitorKeys;
let hasDynamicImports = false;
function processDynamicImport(source2) {
hasDynamicImports = true;
if (source2.type !== "Literal") {
return null;
}
const p = remotePath(source2.value);
if (p == null) {
return null;
}
const getter = thunkFor(p, context);
m.imports.set(p, {
getter,
declarations: /* @__PURE__ */ new Set([
{
source: {
value: source2.value,
loc: source2.loc
},
importedSpecifiers: /* @__PURE__ */ new Set(["ImportNamespaceSpecifier"]),
dynamic: true
}
])
});
}
(0, visit_1.visit)(ast, visitorKeys, {
ImportExpression(node2) {
processDynamicImport(node2.source);
},
CallExpression(_node) {
const node2 = _node;
if (node2.callee.type === "Import") {
processDynamicImport(node2.arguments[0]);
}
}
});
const unambiguouslyESM = (0, unambiguous_1.isUnambiguousModule)(ast);
if (!unambiguouslyESM && !hasDynamicImports) {
return null;
}
const docStyles = context.settings && context.settings["import-x/docstyle"] || ["jsdoc"];
const docStyleParsers = {};
for (const style of docStyles) {
docStyleParsers[style] = availableDocStyleParsers[style];
}
if (ast.comments) {
ast.comments.some((c) => {
if (c.type !== "Block") {
return false;
}
try {
const doc = doctrine_1.default.parse(c.value, { unwrap: true });
if (doc.tags.some((t) => t.title === "module")) {
m.doc = doc;
return true;
}
} catch (_a) {
}
return false;
});
}
const namespaces = /* @__PURE__ */ new Map();
function remotePath(value) {
return (0, resolve_1.relative)(value, filepath, context.settings);
}
function resolveImport(value) {
const rp = remotePath(value);
if (rp == null) {
return null;
}
return _ExportMap.for(childContext(rp, context));
}
function getNamespace(namespace) {
if (!namespaces.has(namespace)) {
return;
}
return function() {
return resolveImport(namespaces.get(namespace));
};
}
function addNamespace(object, identifier) {
const nsfn = getNamespace((0, get_value_1.getValue)(identifier));
if (nsfn) {
Object.defineProperty(object, "namespace", { get: nsfn });
}
return object;
}
function processSpecifier(s, n, m2) {
const nsource = "source" in n && n.source && n.source.value;
const exportMeta = {};
let local;
switch (s.type) {
case "ExportDefaultSpecifier": {
if (!nsource) {
return;
}
local = "default";
break;
}
case "ExportNamespaceSpecifier": {
m2.namespace.set(s.exported.name, Object.defineProperty(exportMeta, "namespace", {
get() {
return resolveImport(nsource);
}
}));
return;
}
case "ExportAllDeclaration": {
m2.namespace.set((0, get_value_1.getValue)(s.exported), addNamespace(exportMeta, s.exported));
return;
}
case "ExportSpecifier": {
if (!("source" in n && n.source)) {
m2.namespace.set((0, get_value_1.getValue)(s.exported), addNamespace(exportMeta, s.local));
return;
}
}
default: {
if ("local" in s) {
local = s.local.name;
} else {
throw new Error("Unknown export specifier type");
}
break;
}
}
if ("exported" in s) {
m2.reexports.set(s.exported.name, {
local,
getImport: () => resolveImport(nsource)
});
}
}
function captureDependencyWithSpecifiers(n) {
const declarationIsType = "importKind" in n && (n.importKind === "type" || n.importKind === "typeof");
let specifiersOnlyImportingTypes = n.specifiers.length > 0;
const importedSpecifiers = /* @__PURE__ */ new Set();
for (const specifier of n.specifiers) {
if (specifier.type === "ImportSpecifier") {
importedSpecifiers.add((0, get_value_1.getValue)(specifier.imported));
} else if (supportedImportTypes.has(specifier.type)) {
importedSpecifiers.add(specifier.type);
}
specifiersOnlyImportingTypes = specifiersOnlyImportingTypes && "importKind" in specifier && (specifier.importKind === "type" || specifier.importKind === "typeof");
}
captureDependency(n, declarationIsType || specifiersOnlyImportingTypes, importedSpecifiers);
}
function captureDependency({ source: source2 }, isOnlyImportingTypes, importedSpecifiers = /* @__PURE__ */ new Set()) {
if (source2 == null) {
return null;
}
const p = remotePath(source2.value);
if (p == null) {
return null;
}
const declarationMetadata = {
source: {
value: source2.value,
loc: source2.loc
},
isOnlyImportingTypes,
importedSpecifiers
};
const existing = m.imports.get(p);
if (existing != null) {
existing.declarations.add(declarationMetadata);
return existing.getter;
}
const getter = thunkFor(p, context);
m.imports.set(p, { getter, declarations: /* @__PURE__ */ new Set([declarationMetadata]) });
return getter;
}
const source = makeSourceCode(content, ast);
function isEsModuleInterop() {
const parserOptions = context.parserOptions || {};
let tsconfigRootDir = parserOptions.tsconfigRootDir;
const project = parserOptions.project;
const cacheKey = (0, hash_1.hashObject)({
tsconfigRootDir,
project
}).digest("hex");
let tsConfig = tsconfigCache.get(cacheKey);
if (tsConfig === void 0) {
tsconfigRootDir = tsconfigRootDir || process.cwd();
let tsconfigResult;
if (project) {
const projects = Array.isArray(project) ? project : [project];
for (const project2 of projects) {
tsconfigResult = (0, get_tsconfig_1.getTsconfig)(project2 === true ? context.filename : node_path_1.default.resolve(tsconfigRootDir, project2));
if (tsconfigResult) {
break;
}
}
} else {
tsconfigResult = (0, get_tsconfig_1.getTsconfig)(tsconfigRootDir);
}
tsConfig = tsconfigResult && tsconfigResult.config || null;
tsconfigCache.set(cacheKey, tsConfig);
}
return tsConfig && tsConfig.compilerOptions ? tsConfig.compilerOptions.esModuleInterop : false;
}
for (const n of ast.body) {
if (n.type === "ExportDefaultDeclaration") {
const exportMeta = captureDoc(source, docStyleParsers, n);
if (n.declaration.type === "Identifier") {
addNamespace(exportMeta, n.declaration);
}
m.namespace.set("default", exportMeta);
continue;
}
if (n.type === "ExportAllDeclaration") {
if (n.exported) {
namespaces.set(n.exported.name, n.source.value);
processSpecifier(n, n.exported, m);
} else {
const getter = captureDependency(n, n.exportKind === "type");
if (getter) {
m.dependencies.add(getter);
}
}
continue;
}
if (n.type === "ImportDeclaration") {
captureDependencyWithSpecifiers(n);
const ns = n.specifiers.find((s) => s.type === "ImportNamespaceSpecifier");
if (ns) {
namespaces.set(ns.local.name, n.source.value);
}
continue;
}
if (n.type === "ExportNamedDeclaration") {
captureDependencyWithSpecifiers(n);
if (n.declaration != null) {
switch (n.declaration.type) {
case "FunctionDeclaration":
case "ClassDeclaration":
case "TypeAlias":
case "InterfaceDeclaration":
case "DeclareFunction":
case "TSDeclareFunction":
case "TSEnumDeclaration":
case "TSTypeAliasDeclaration":
case "TSInterfaceDeclaration":
case "TSAbstractClassDeclaration":
case "TSModuleDeclaration": {
m.namespace.set(n.declaration.id.name, captureDoc(source, docStyleParsers, n));
break;
}
case "VariableDeclaration": {
for (const d of n.declaration.declarations) {
recursivePatternCapture(d.id, (id) => m.namespace.set(id.name, captureDoc(source, docStyleParsers, d, n)));
}
break;
}
default:
}
}
for (const s of n.specifiers) {
processSpecifier(s, n, m);
}
}
const exports2 = ["TSExportAssignment"];
if (isEsModuleInteropTrue) {
exports2.push("TSNamespaceExportDeclaration");
}
if (exports2.includes(n.type)) {
const exportedName = n.type === "TSNamespaceExportDeclaration" ? (n.id || n.name).name : "expression" in n && n.expression && ("name" in n.expression && n.expression.name || "id" in n.expression && n.expression.id && n.expression.id.name) || null;
const declTypes = /* @__PURE__ */ new Set([
"VariableDeclaration",
"ClassDeclaration",
"TSDeclareFunction",
"TSEnumDeclaration",
"TSTypeAliasDeclaration",
"TSInterfaceDeclaration",
"TSAbstractClassDeclaration",
"TSModuleDeclaration"
]);
const exportedDecls = ast.body.filter((node2) => {
return declTypes.has(node2.type) && ("id" in node2 && node2.id && "name" in node2.id && node2.id.name === exportedName || "declarations" in node2 && node2.declarations.find((d) => "name" in d.id && d.id.name === exportedName));
});
if (exportedDecls.length === 0) {
m.namespace.set("default", captureDoc(source, docStyleParsers, n));
continue;
}
if (isEsModuleInteropTrue && !m.namespace.has("default")) {
m.namespace.set("default", {});
}
for (const decl of exportedDecls) {
if (decl.type === "TSModuleDeclaration") {
if (decl.body && decl.body.type === "TSModuleDeclaration") {
m.namespace.set(decl.body.id.name, captureDoc(source, docStyleParsers, decl.body));
} else if (decl.body && decl.body.body) {
for (const moduleBlockNode of decl.body.body) {
const namespaceDecl = moduleBlockNode.type === "ExportNamedDeclaration" ? moduleBlockNode.declaration : moduleBlockNode;
if (!namespaceDecl) {
} else if (namespaceDecl.type === "VariableDeclaration") {
for (const d of namespaceDecl.declarations)
recursivePatternCapture(d.id, (id) => m.namespace.set(id.name, captureDoc(source, docStyleParsers, decl, namespaceDecl, moduleBlockNode)));
} else if ("id" in namespaceDecl) {
m.namespace.set(namespaceDecl.id.name, captureDoc(source, docStyleParsers, moduleBlockNode));
}
}
}
} else {
m.namespace.set("default", captureDoc(source, docStyleParsers, decl));
}
}
}
}
if (isEsModuleInteropTrue && m.namespace.size > 0 && !m.namespace.has("default")) {
m.namespace.set("default", {});
}
if (unambiguouslyESM) {
m.parseGoal = "Module";
}
return m;
}
constructor(path) {
this.path = path;
this.namespace = /* @__PURE__ */ new Map();
this.reexports = /* @__PURE__ */ new Map();
this.dependencies = /* @__PURE__ */ new Set();
this.imports = /* @__PURE__ */ new Map();
this.errors = [];
this.parseGoal = "ambiguous";
}
get hasDefault() {
return this.get("default") != null;
}
get size() {
let size = this.namespace.size + this.reexports.size;
for (const dep of this.dependencies) {
const d = dep();
if (d == null) {
continue;
}
size += d.size;
}
return size;
}
has(name) {
if (this.namespace.has(name)) {
return true;
}
if (this.reexports.has(name)) {
return true;
}
if (name !== "default") {
for (const dep of this.dependencies) {
const innerMap = dep();
if (!innerMap) {
continue;
}
if (innerMap.has(name)) {
return true;
}
}
}
return false;
}
hasDeep(name) {
if (this.namespace.has(name)) {
return { found: true, path: [this] };
}
if (this.reexports.has(name)) {
const reexports = this.reexports.get(name);
const imported = reexports.getImport();
if (imported == null) {
return { found: true, path: [this] };
}
if (imported.path === this.path && reexports.local === name) {
return { found: false, path: [this] };
}
const deep = imported.hasDeep(reexports.local);
deep.path.unshift(this);
return deep;
}
if (name !== "default") {
for (const dep of this.dependencies) {
const innerMap = dep();
if (innerMap == null) {
return { found: true, path: [this] };
}
if (!innerMap) {
continue;
}
if (innerMap.path === this.path) {
continue;
}
const innerValue = innerMap.hasDeep(name);
if (innerValue.found) {
innerValue.path.unshift(this);
return innerValue;
}
}
}
return { found: false, path: [this] };
}
get(name) {
if (this.namespace.has(name)) {
return this.namespace.get(name);
}
if (this.reexports.has(name)) {
const reexports = this.reexports.get(name);
const imported = reexports.getImport();
if (imported == null) {
return null;
}
if (imported.path === this.path && reexports.local === name) {
return void 0;
}
return imported.get(reexports.local);
}
if (name !== "default") {
for (const dep of this.dependencies) {
const innerMap = dep();
if (!innerMap) {
continue;
}
if (innerMap.path === this.path) {
continue;
}
const innerValue = innerMap.get(name);
if (innerValue !== void 0) {
return innerValue;
}
}
}
}
forEach(callback, thisArg) {
for (const [n, v] of this.namespace.entries()) {
callback.call(thisArg, v, n, this);
}
for (const [name, reexports] of this.reexports.entries()) {
const reexported = reexports.getImport();
callback.call(thisArg, reexported === null || reexported === void 0 ? void 0 : reexported.get(reexports.local), name, this);
}
this.dependencies.forEach((dep) => {
const d = dep();
if (d == null) {
return;
}
d.forEach((v, n) => {
if (n !== "default") {
callback.call(thisArg, v, n, this);
}
});
});
}
reportErrors(context, declaration) {
if (!declaration.source) {
throw new Error("declaration.source is null");
}
const msg = this.errors.map((err) => `${err.message} (${err.lineNumber}:${err.column})`).join(", ");
context.report({
node: declaration.source,
message: `Parse errors in imported module '${declaration.source.value}': ${msg}`
});
}
};
exports.ExportMap = ExportMap;
function captureDoc(source, docStyleParsers, ...nodes) {
const metadata = {};
nodes.some((n) => {
try {
let leadingComments;
if ("leadingComments" in n && Array.isArray(n.leadingComments)) {
leadingComments = n.leadingComments;
} else if (n.range) {
leadingComments = source.getCommentsBefore(n);
}
if (!leadingComments || leadingComments.length === 0) {
return false;
}
for (const parser of Object.values(docStyleParsers)) {
const doc = parser(leadingComments);
if (doc) {
metadata.doc = doc;
}
}
return true;
} catch (_a) {
return false;
}
});
return metadata;
}
var availableDocStyleParsers = {
jsdoc: captureJsDoc,
tomdoc: captureTomDoc
};
function captureJsDoc(comments2) {
let doc;
for (const comment of comments2) {
if (comment.type !== "Block") {
continue;
}
try {
doc = doctrine_1.default.parse(comment.value, { unwrap: true });
} catch (_a) {
}
}
return doc;
}
function captureTomDoc(comments2) {
const lines = [];
for (const comment of comments2) {
if (/^\s*$/.test(comment.value)) {
break;
}
lines.push(comment.value.trim());
}
const statusMatch = lines.join(" ").match(/^(Public|Internal|Deprecated):\s*(.+)/);
if (statusMatch) {
return {
description: statusMatch[2],
tags: [
{
title: statusMatch[1].toLowerCase(),
description: statusMatch[2]
}
]
};
}
}
var supportedImportTypes = /* @__PURE__ */ new Set([
"ImportDefaultSpecifier",
"ImportNamespaceSpecifier"
]);
function thunkFor(p, context) {
return () => ExportMap.for(childContext(p, context));
}
function recursivePatternCapture(pattern, callback) {
switch (pattern.type) {
case "Identifier": {
callback(pattern);
break;
}
case "ObjectPattern": {
for (const p of pattern.properties) {
if (p.type === "ExperimentalRestProperty" || p.type === "RestElement") {
callback(p.argument);
continue;
}
recursivePatternCapture(p.value, callback);
}
break;
}
case "ArrayPattern": {
for (const element of pattern.elements) {
if (element == null) {
continue;
}
if (element.type === "ExperimentalRestProperty" || element.type === "RestElement") {
callback(element.argument);
continue;
}
recursivePatternCapture(element, callback);
}
break;
}
case "AssignmentPattern": {
callback(pattern.left);
break;
}
default:
}
}
exports.recursivePatternCapture = recursivePatternCapture;
var parserOptionsHash = "";
var prevParserOptions = "";
var settingsHash = "";
var prevSettings = "";
function childContext(path, context) {
const { settings, parserOptions, parserPath, languageOptions } = context;
if (JSON.stringify(settings) !== prevSettings) {
settingsHash = (0, hash_1.hashObject)({ settings }).digest("hex");
prevSettings = JSON.stringify(settings);
}
if (JSON.stringify(parserOptions) !== prevParserOptions) {
parserOptionsHash = (0, hash_1.hashObject)({ parserOptions }).digest("hex");
prevParserOptions = JSON.stringify(parserOptions);
}
return {
cacheKey: String(parserPath) + parserOptionsHash + settingsHash + String(path),
languageOptions,
settings,
parserOptions,
parserPath,
path,
filename: "getPhysicalFilename" in context && typeof context.getPhysicalFilename === "function" ? context.getPhysicalFilename() : "physicalFilename" in context && context.physicalFilename != null ? context.physicalFilename : "getFilename" in context && typeof context.getFilename === "function" ? context.getFilename() : "filename" in context && context.filename || void 0
};
}
function makeSourceCode(text, ast) {
if (eslint_1.SourceCode.length > 1) {
return new eslint_1.SourceCode(text, ast);
}
return new eslint_1.SourceCode({ text, ast });
}
}
});
// ../../node_modules/.pnpm/eslint-plugin-import-x@0.4.4_patch_hash=4oryti2zfrehz2qi62zyaaa334_eslint@9.4.0_typescript@5.4.5/node_modules/eslint-plugin-import-x/lib/utils/get-ancestors.js
var require_get_ancestors = __commonJS({
"../../node_modules/.pnpm/eslint-plugin-import-x@0.4.4_patch_hash=4oryti2zfrehz2qi62zyaaa334_eslint@9.4.0_typescript@5.4.5/node_modules/eslint-plugin-import-x/lib/utils/get-ancestors.js"(exports) {
"use strict";
init_shims();
Object.defineProperty(exports, "__esModule", { value: true });
exports.getAncestors = void 0;
var eslint_compat_utils_1 = require_dist();
var getAncestors = (context, node2) => {
const sourceCode = (0, eslint_compat_utils_1.getSourceCode)(context);
return sourceCode.getAncestors(node2);
};
exports.getAncestors = getAncestors;
}
});
// ../../node_modules/.pnpm/eslint-plugin-import-x@0.4.4_patch_hash=4oryti2zfrehz2qi62zyaaa334_eslint@9.4.0_typescript@5.4.5/node_modules/eslint-plugin-import-x/lib/utils/import-declaration.js
var require_import_declaration = __commonJS({
"../../node_modules/.pnpm/eslint-plugin-import-x@0.4.4_patch_hash=4oryti2zfrehz2qi62zyaaa334_eslint@9.4.0_typescript@5.4.5/node_modules/eslint-plugin-import-x/lib/utils/import-declaration.js"(exports) {
"use strict";
init_shims();
Object.defineProperty(exports, "__esModule", { value: true });
exports.importDeclaration = void 0;
var get_ancestors_1 = require_get_ancestors();
var importDeclaration = (context, node2) => {
const ancestors = (0, get_ancestors_1.getAncestors)(context, node2);
return ancestors[ancestors.length - 1];
};
exports.importDeclaration = importDeclaration;
}
});
// ../../node_modules/.pnpm/eslint-plugin-import-x@0.4.4_patch_hash=4oryti2zfrehz2qi62zyaaa334_eslint@9.4.0_typescript@5.4.5/node_modules/eslint-plugin-import-x/lib/utils/read-pkg-up.js
var require_read_pkg_up = __commonJS({
"../../node_modules/.pnpm/eslint-plugin-import-x@0.4.4_patch_hash=4oryti2zfrehz2qi62zyaaa334_eslint@9.4.0_typescript@5.4.5/node_modules/eslint-plugin-import-x/lib/utils/read-pkg-up.js"(exports) {
"use strict";
init_shims();
Object.defineProperty(exports, "__esModule", { value: true });
exports.readPkgUp = void 0;
var tslib_1 = (init_tslib_es6(), __toCommonJS(tslib_es6_exports));
var node_fs_1 = tslib_1.__importDefault(__require("node:fs"));
var pkg_up_1 = require_pkg_up();
function stripBOM(str) {
return str.replace(/^\uFEFF/, "");
}
function readPkgUp(opts) {
const fp = (0, pkg_up_1.pkgUp)(opts);
if (!fp) {
return {};
}
try {
return {
pkg: JSON.parse(stripBOM(node_fs_1.default.readFileSync(fp, { encoding: "utf8" }))),
path: fp
};
} catch (_a) {
return {};
}
}
exports.readPkgUp = readPkgUp;
}
});
// ../../node_modules/.pnpm/eslint-plugin-import-x@0.4.4_patch_hash=4oryti2zfrehz2qi62zyaaa334_eslint@9.4.0_typescript@5.4.5/node_modules/eslint-plugin-import-x/lib/utils/package-path.js
var require_package_path = __commonJS({
"../../node_modules/.pnpm/eslint-plugin-import-x@0.4.4_patch_hash=4oryti2zfrehz2qi62zyaaa334_eslint@9.4.0_typescript@5.4.5/node_modules/eslint-plugin-import-x/lib/utils/package-path.js"(exports) {
"use strict";
init_shims();
Object.defineProperty(exports, "__esModule", { value: true });
exports.getFilePackageName = exports.getFilePackagePath = exports.getContextPackagePath = void 0;
var tslib_1 = (init_tslib_es6(), __toCommonJS(tslib_es6_exports));
var node_path_1 = tslib_1.__importDefault(__require("node:path"));
var eslint_compat_utils_1 = require_dist();
var pkg_up_1 = require_pkg_up();
var read_pkg_up_1 = require_read_pkg_up();
function getContextPackagePath(context) {
return getFilePackagePath((0, eslint_compat_utils_1.getPhysicalFilename)(context));
}
exports.getContextPackagePath = getContextPackagePath;
function getFilePackagePath(filePath) {
return node_path_1.default.dirname((0, pkg_up_1.pkgUp)({ cwd: filePath }));
}
exports.getFilePackagePath = getFilePackagePath;
function getFilePackageName(filePath) {
const { pkg, path: pkgPath } = (0, read_pkg_up_1.readPkgUp)({ cwd: filePath });
if (pkg) {
return pkg.name || getFilePackageName(node_path_1.default.resolve(pkgPath, "../.."));
}
return null;
}
exports.getFilePackageName = getFilePackageName;
}
});
// ../../node_modules/.pnpm/eslint-plugin-import-x@0.4.4_patch_hash=4oryti2zfrehz2qi62zyaaa334_eslint@9.4.0_typescript@5.4.5/node_modules/eslint-plugin-import-x/lib/utils/import-type.js
var require_import_type = __commonJS({
"../../node_modules/.pnpm/eslint-plugin-import-x@0.4.4_patch_hash=4oryti2zfrehz2qi62zyaaa334_eslint@9.4.0_typescript@5.4.5/node_modules/eslint-plugin-import-x/lib/utils/import-type.js"(exports) {
"use strict";
init_shims();
Object.defineProperty(exports, "__esModule", { value: true });
exports.importType = exports.isScopedMain = exports.isScoped = exports.isExternalModuleMain = exports.isExternalModule = exports.isBuiltIn = exports.isAbsolute = void 0;
var tslib_1 = (init_tslib_es6(), __toCommonJS(tslib_es6_exports));
var node_module_1 = __require("node:module");
var node_path_1 = tslib_1.__importDefault(__require("node:path"));
var package_path_1 = require_package_path();
var resolve_1 = require_resolve();
function baseModule(name) {
if (isScoped(name)) {
const [scope, pkg2] = name.split("/");
return `${scope}/${pkg2}`;
}
const [pkg] = name.split("/");
return pkg;
}
function isInternalRegexMatch(name, settings) {
const internalScope = settings === null || settings === void 0 ? void 0 : settings["import-x/internal-regex"];
return internalScope && new RegExp(internalScope).test(name);
}
function isAbsolute(name) {
return typeof name === "string" && node_path_1.default.isAbsolute(name);
}
exports.isAbsolute = isAbsolute;
function isBuiltIn(name, settings, modulePath) {
if (modulePath || !name) {
return false;
}
const base = baseModule(name);
const extras = settings && settings["import-x/core-modules"] || [];
return (0, node_module_1.isBuiltin)(base) || extras.includes(base);
}
exports.isBuiltIn = isBuiltIn;
function isExternalModule(name, modulePath, context) {
if (arguments.length < 3) {
throw new TypeError("isExternalModule: name, path, and context are all required");
}
return (isModule(name) || isScoped(name)) && typeTest(name, context, modulePath) === "external";
}
exports.isExternalModule = isExternalModule;
function isExternalModuleMain(name, modulePath, context) {
if (arguments.length < 3) {
throw new TypeError("isExternalModule: name, path, and context are all required");
}
return isModuleMain(name) && typeTest(name, context, modulePath) === "external";
}
exports.isExternalModuleMain = isExternalModuleMain;
var moduleRegExp = /^\w/;
function isModule(name) {
return !!name && moduleRegExp.test(name);
}
var moduleMainRegExp = /^\w((?!\/).)*$/;
function isModuleMain(name) {
return !!name && moduleMainRegExp.test(name);
}
var scopedRegExp = /^@[^/]+\/?[^/]+/;
function isScoped(name) {
return !!name && scopedRegExp.test(name);
}
exports.isScoped = isScoped;
var scopedMainRegExp = /^@[^/]+\/?[^/]+$/;
function isScopedMain(name) {
return !!name && scopedMainRegExp.test(name);
}
exports.isScopedMain = isScopedMain;
function isRelativeToParent(name) {
return /^\.\.$|^\.\.[/\\]/.test(name);
}
var indexFiles = /* @__PURE__ */ new Set([".", "./", "./index", "./index.js"]);
function isIndex(name) {
return indexFiles.has(name);
}
function isRelativeToSibling(name) {
return /^\.[/\\]/.test(name);
}
function isExternalPath(filepath, context) {
if (!filepath) {
return false;
}
const { settings } = context;
const packagePath = (0, package_path_1.getContextPackagePath)(context);
if (node_path_1.default.relative(packagePath, filepath).startsWith("..")) {
return true;
}
const folders = (settings === null || settings === void 0 ? void 0 : settings["import-x/external-module-folders"]) || [
"node_modules"
];
return folders.some((folder) => {
const folderPath = node_path_1.default.resolve(packagePath, folder);
const relativePath = node_path_1.default.relative(folderPath, filepath);
return !relativePath.startsWith("..");
});
}
function isInternalPath(filepath, context) {
if (!filepath) {
return false;
}
const packagePath = (0, package_path_1.getContextPackagePath)(context);
return !node_path_1.default.relative(packagePath, filepath).startsWith("../");
}
function isExternalLookingName(name) {
return isModule(name) || isScoped(name);
}
function typeTest(name, context, path) {
const { settings } = context;
if (isInternalRegexMatch(name, settings)) {
return "internal";
}
if (isAbsolute(name)) {
return "absolute";
}
if (isBuiltIn(name, settings, path)) {
return "builtin";
}
if (isRelativeToParent(name)) {
return "parent";
}
if (isIndex(name)) {
return "index";
}
if (isRelativeToSibling(name)) {
return "sibling";
}
if (isExternalPath(path, context)) {
return "external";
}
if (isInternalPath(path, context)) {
return "internal";
}
if (isExternalLookingName(name)) {
return "external";
}
return "unknown";
}
function importType(name, context) {
return typeTest(name, context, (0, resolve_1.resolve)(name, context));
}
exports.importType = importType;
}
});
// ../../node_modules/.pnpm/eslint-plugin-import-x@0.4.4_patch_hash=4oryti2zfrehz2qi62zyaaa334_eslint@9.4.0_typescript@5.4.5/node_modules/eslint-plugin-import-x/lib/utils/module-visitor.js
var require_module_visitor = __commonJS({
"../../node_modules/.pnpm/eslint-plugin-import-x@0.4.4_patch_hash=4oryti2zfrehz2qi62zyaaa334_eslint@9.4.0_typescript@5.4.5/node_modules/eslint-plugin-import-x/lib/utils/module-visitor.js"(exports) {
"use strict";
init_shims();
Object.defineProperty(exports, "__esModule", { value: true });
exports.optionsSchema = exports.makeOptionsSchema = exports.moduleVisitor = void 0;
function moduleVisitor(visitor, options) {
const ignore = options === null || options === void 0 ? void 0 : options.ignore;
const amd = !!(options === null || options === void 0 ? void 0 : options.amd);
const commonjs = !!(options === null || options === void 0 ? void 0 : options.commonjs);
const esmodule = !!Object.assign({ esmodule: true }, options).esmodule;
const ignoreRegExps = ignore == null ? [] : ignore.map((p) => new RegExp(p));
function checkSourceValue(source, importer) {
if (source == null) {
return;
}
if (ignoreRegExps.some((re) => re.test(String(source.value)))) {
return;
}
visitor(source, importer);
}
function checkSource(node2) {
checkSourceValue(node2.source, node2);
}
function checkImportCall(node2) {
let modulePath;
if (node2.type === "ImportExpression") {
modulePath = node2.source;
} else if (node2.type === "CallExpression") {
if (node2.callee.type !== "Import") {
return;
}
if (node2.arguments.length !== 1) {
return;
}
modulePath = node2.arguments[0];
} else {
throw new TypeError("this should be unreachable");
}
if (modulePath.type !== "Literal") {
return;
}
if (typeof modulePath.value !== "string") {
return;
}
checkSourceValue(modulePath, node2);
}
function checkCommon(call) {
if (call.callee.type !== "Identifier") {
return;
}
if (call.callee.name !== "require") {
return;
}
if (call.arguments.length !== 1) {
return;
}
const modulePath = call.arguments[0];
if (modulePath.type !== "Literal") {
return;
}
if (typeof modulePath.value !== "string") {
return;
}
checkSourceValue(modulePath, call);
}
function checkAMD(call) {
if (call.callee.type !== "Identifier") {
return;
}
if (call.callee.name !== "require" && call.callee.name !== "define") {
return;
}
if (call.arguments.length !== 2) {
return;
}
const modules = call.arguments[0];
if (modules.type !== "ArrayExpression") {
return;
}
for (const element of modules.elements) {
if (!element) {
continue;
}
if (element.type !== "Literal") {
continue;
}
if (typeof element.value !== "string") {
continue;
}
if (element.value === "require" || element.value === "exports") {
continue;
}
checkSourceValue(element, element);
}
}
const visitors = {};
if (esmodule) {
Object.assign(visitors, {
ImportDeclaration: checkSource,
ExportNamedDeclaration: checkSource,
ExportAllDeclaration: checkSource,
CallExpression: checkImportCall,
ImportExpression: checkImportCall
});
}
if (commonjs || amd) {
const currentCallExpression = visitors.CallExpression;
visitors.CallExpression = function(call) {
if (currentCallExpression) {
currentCallExpression(call);
}
if (commonjs) {
checkCommon(call);
}
if (amd) {
checkAMD(call);
}
};
}
return visitors;
}
exports.moduleVisitor = moduleVisitor;
function makeOptionsSchema(additionalProperties) {
const base = {
type: "object",
properties: {
commonjs: { type: "boolean" },
amd: { type: "boolean" },
esmodule: { type: "boolean" },
ignore: {
type: "array",
minItems: 1,
items: { type: "string" },
uniqueItems: true
}
},
additionalProperties: false
};
if (additionalProperties) {
for (const key in additionalProperties) {
base.properties[key] = additionalProperties[key];
}
}
return base;
}
exports.makeOptionsSchema = makeOptionsSchema;
exports.optionsSchema = makeOptionsSchema();
}
});
// ../../node_modules/.pnpm/eslint-plugin-import-x@0.4.4_patch_hash=4oryti2zfrehz2qi62zyaaa334_eslint@9.4.0_typescript@5.4.5/node_modules/eslint-plugin-import-x/lib/utils/static-require.js
var require_static_require = __commonJS({
"../../node_modules/.pnpm/eslint-plugin-import-x@0.4.4_patch_hash=4oryti2zfrehz2qi62zyaaa334_eslint@9.4.0_typescript@5.4.5/node_modules/eslint-plugin-import-x/lib/utils/static-require.js"(exports) {
"use strict";
init_shims();
Object.defineProperty(exports, "__esModule", { value: true });
exports.isStaticRequire = void 0;
function isStaticRequire(node2) {
return node2 && node2.callee && node2.callee.type === "Identifier" && node2.callee.name === "require" && node2.arguments.length === 1 && node2.arguments[0].type === "Literal" && typeof node2.arguments[0].value === "string";
}
exports.isStaticRequire = isStaticRequire;
}
});
// ../../node_modules/.pnpm/eslint-plugin-import-x@0.4.4_patch_hash=4oryti2zfrehz2qi62zyaaa334_eslint@9.4.0_typescript@5.4.5/node_modules/eslint-plugin-import-x/lib/utils/index.js
var require_utils2 = __commonJS({
"../../node_modules/.pnpm/eslint-plugin-import-x@0.4.4_patch_hash=4oryti2zfrehz2qi62zyaaa334_eslint@9.4.0_typescript@5.4.5/node_modules/eslint-plugin-import-x/lib/utils/index.js"(exports) {
"use strict";
init_shims();
Object.defineProperty(exports, "__esModule", { value: true });
var tslib_1 = (init_tslib_es6(), __toCommonJS(tslib_es6_exports));
tslib_1.__exportStar(require_constants(), exports);
tslib_1.__exportStar(require_create_rule(), exports);
tslib_1.__exportStar(require_declared_scope(), exports);
tslib_1.__exportStar(require_docs_url(), exports);
tslib_1.__exportStar(require_export_map(), exports);
tslib_1.__exportStar(require_get_ancestors(), exports);
tslib_1.__exportStar(require_get_scope(), exports);
tslib_1.__exportStar(require_get_value(), exports);
tslib_1.__exportStar(require_hash(), exports);
tslib_1.__exportStar(require_ignore(), exports);
tslib_1.__exportStar(require_import_declaration(), exports);
tslib_1.__exportStar(require_import_type(), exports);
tslib_1.__exportStar(require_module_cache(), exports);
tslib_1.__exportStar(require_module_require(), exports);
tslib_1.__exportStar(require_module_visitor(), exports);
tslib_1.__exportStar(require_package_path(), exports);
tslib_1.__exportStar(require_parse2(), exports);
tslib_1.__exportStar(require_pkg_dir(), exports);
tslib_1.__exportStar(require_pkg_up(), exports);
tslib_1.__exportStar(require_read_pkg_up(), exports);
tslib_1.__exportStar(require_resolve(), exports);
tslib_1.__exportStar(require_static_require(), exports);
tslib_1.__exportStar(require_unambiguous(), exports);
tslib_1.__exportStar(require_visit(), exports);
}
});
// ../../node_modules/.pnpm/eslint-plugin-import-x@0.4.4_patch_hash=4oryti2zfrehz2qi62zyaaa334_eslint@9.4.0_typescript@5.4.5/node_modules/eslint-plugin-import-x/lib/rules/consistent-type-specifier-style.js
var require_consistent_type_specifier_style = __commonJS({
"../../node_modules/.pnpm/eslint-plugin-import-x@0.4.4_patch_hash=4oryti2zfrehz2qi62zyaaa334_eslint@9.4.0_typescript@5.4.5/node_modules/eslint-plugin-import-x/lib/rules/consistent-type-specifier-style.js"(exports, module) {
"use strict";
init_shims();
var eslint_compat_utils_1 = require_dist();
var utils_1 = require_utils2();
function isComma(token) {
return token.type === "Punctuator" && token.value === ",";
}
function removeSpecifiers(fixes, fixer, sourceCode, specifiers) {
for (const specifier of specifiers) {
const token = sourceCode.getTokenAfter(specifier);
if (token && isComma(token)) {
fixes.push(fixer.remove(token));
}
fixes.push(fixer.remove(specifier));
}
}
function getImportText(node2, sourceCode, specifiers, kind) {
const sourceString = sourceCode.getText(node2.source);
if (specifiers.length === 0) {
return "";
}
const names = specifiers.map((s) => {
if (s.imported.name === s.local.name) {
return s.imported.name;
}
return `${s.imported.name} as ${s.local.name}`;
});
return `import ${kind} {${names.join(", ")}} from ${sourceString};`;
}
module.exports = (0, utils_1.createRule)({
name: "consistent-type-specifier-style",
meta: {
type: "suggestion",
docs: {
category: "Style guide",
description: "Enforce or ban the use of inline type-only markers for named imports."
},
fixable: "code",
schema: [
{
type: "string",
enum: ["prefer-inline", "prefer-top-level"],
default: "prefer-inline"
}
],
messages: {
inline: "Prefer using inline {{kind}} specifiers instead of a top-level {{kind}}-only import.",
topLevel: "Prefer using a top-level {{kind}}-only import instead of inline {{kind}} specifiers."
}
},
defaultOptions: [],
create(context) {
const sourceCode = (0, eslint_compat_utils_1.getSourceCode)(context);
if (context.options[0] === "prefer-inline") {
return {
ImportDeclaration(node2) {
if (node2.importKind === "value" || node2.importKind == null) {
return;
}
if (node2.specifiers.length === 0 || node2.specifiers.length === 1 && (node2.specifiers[0].type === "ImportDefaultSpecifier" || node2.specifiers[0].type === "ImportNamespaceSpecifier")) {
return;
}
context.report({
node: node2,
messageId: "inline",
data: {
kind: node2.importKind
},
fix(fixer) {
const kindToken = sourceCode.getFirstToken(node2, { skip: 1 });
return [
kindToken ? fixer.remove(kindToken) : [],
node2.specifiers.map((specifier) => fixer.insertTextBefore(specifier, `${node2.importKind} `))
].flat();
}
});
}
};
}
return {
ImportDeclaration(node2) {
if (node2.importKind === "type" || node2.importKind === "typeof" || node2.specifiers.length === 0 || node2.specifiers.length === 1 && (node2.specifiers[0].type === "ImportDefaultSpecifier" || node2.specifiers[0].type === "ImportNamespaceSpecifier")) {
return;
}
const typeSpecifiers = [];
const typeofSpecifiers = [];
const valueSpecifiers = [];
let defaultSpecifier = null;
for (const specifier of node2.specifiers) {
if (specifier.type === "ImportDefaultSpecifier") {
defaultSpecifier = specifier;
continue;
}
if (!("importKind" in specifier)) {
continue;
}
if (specifier.importKind === "type") {
typeSpecifiers.push(specifier);
} else if (specifier.importKind === "typeof") {
typeofSpecifiers.push(specifier);
} else if (specifier.importKind === "value" || specifier.importKind == null) {
valueSpecifiers.push(specifier);
}
}
const typeImport = getImportText(node2, sourceCode, typeSpecifiers, "type");
const typeofImport = getImportText(node2, sourceCode, typeofSpecifiers, "typeof");
const newImports = `${typeImport}
${typeofImport}`.trim();
if (typeSpecifiers.length + typeofSpecifiers.length === node2.specifiers.length) {
const kind = [
typeSpecifiers.length > 0 ? "type" : [],
typeofSpecifiers.length > 0 ? "typeof" : []
].flat();
context.report({
node: node2,
messageId: "topLevel",
data: {
kind: kind.join("/")
},
fix(fixer) {
return fixer.replaceText(node2, newImports);
}
});
} else {
for (const specifier of [...typeSpecifiers, ...typeofSpecifiers]) {
context.report({
node: specifier,
messageId: "topLevel",
data: {
kind: specifier.importKind
},
fix(fixer) {
const fixes = [];
if (valueSpecifiers.length > 0) {
removeSpecifiers(fixes, fixer, sourceCode, typeSpecifiers);
removeSpecifiers(fixes, fixer, sourceCode, typeofSpecifiers);
const maybeComma = sourceCode.getTokenAfter(valueSpecifiers[valueSpecifiers.length - 1]);
if (isComma(maybeComma)) {
fixes.push(fixer.remove(maybeComma));
}
} else if (defaultSpecifier) {
const comma = sourceCode.getTokenAfter(defaultSpecifier, isComma);
const closingBrace = sourceCode.getTokenAfter(node2.specifiers[node2.specifiers.length - 1], (token) => token.type === "Punctuator" && token.value === "}");
fixes.push(fixer.removeRange([
comma.range[0],
closingBrace.range[1]
]));
}
return [
...fixes,
fixer.insertTextAfter(node2, `
${newImports}`)
];
}
});
}
}
}
};
}
});
}
});
// ../../node_modules/.pnpm/eslint-plugin-import-x@0.4.4_patch_hash=4oryti2zfrehz2qi62zyaaa334_eslint@9.4.0_typescript@5.4.5/node_modules/eslint-plugin-import-x/lib/rules/default.js
var require_default = __commonJS({
"../../node_modules/.pnpm/eslint-plugin-import-x@0.4.4_patch_hash=4oryti2zfrehz2qi62zyaaa334_eslint@9.4.0_typescript@5.4.5/node_modules/eslint-plugin-import-x/lib/rules/default.js"(exports, module) {
"use strict";
init_shims();
var utils_1 = require_utils2();
module.exports = (0, utils_1.createRule)({
name: "default",
meta: {
type: "problem",
docs: {
category: "Static analysis",
description: "Ensure a default export is present, given a default import."
},
schema: [],
messages: {
noDefaultExport: 'No default export found in imported module "{{module}}".'
}
},
defaultOptions: [],
create(context) {
function checkDefault(specifierType, node2) {
const defaultSpecifier = node2.specifiers.find((specifier) => specifier.type === specifierType);
if (!defaultSpecifier) {
return;
}
const imports2 = utils_1.ExportMap.get(node2.source.value, context);
if (imports2 == null) {
return;
}
if (imports2.errors.length > 0) {
imports2.reportErrors(context, node2);
} else if (imports2.get("default") === void 0) {
context.report({
node: defaultSpecifier,
messageId: "noDefaultExport",
data: {
module: node2.source.value
}
});
}
}
return {
ImportDeclaration: checkDefault.bind(null, "ImportDefaultSpecifier"),
ExportNamedDeclaration: checkDefault.bind(null, "ExportDefaultSpecifier")
};
}
});
}
});
// ../../node_modules/.pnpm/eslint-plugin-import-x@0.4.4_patch_hash=4oryti2zfrehz2qi62zyaaa334_eslint@9.4.0_typescript@5.4.5/node_modules/eslint-plugin-import-x/lib/rules/dynamic-import-chunkname.js
var require_dynamic_import_chunkname = __commonJS({
"../../node_modules/.pnpm/eslint-plugin-import-x@0.4.4_patch_hash=4oryti2zfrehz2qi62zyaaa334_eslint@9.4.0_typescript@5.4.5/node_modules/eslint-plugin-import-x/lib/rules/dynamic-import-chunkname.js"(exports, module) {
"use strict";
init_shims();
var tslib_1 = (init_tslib_es6(), __toCommonJS(tslib_es6_exports));
var node_vm_1 = tslib_1.__importDefault(__require("node:vm"));
var eslint_compat_utils_1 = require_dist();
var utils_1 = require_utils2();
module.exports = (0, utils_1.createRule)({
name: "dynamic-import-chunkname",
meta: {
type: "suggestion",
docs: {
category: "Style guide",
description: "Enforce a leading comment with the webpackChunkName for dynamic imports."
},
schema: [
{
type: "object",
properties: {
importFunctions: {
type: "array",
uniqueItems: true,
items: {
type: "string"
}
},
allowEmpty: {
type: "boolean"
},
webpackChunknameFormat: {
type: "string"
}
}
}
],
messages: {
leadingComment: "dynamic imports require a leading comment with the webpack chunkname",
blockComment: "dynamic imports require a /* foo */ style comment, not a // foo comment",
paddedSpaces: "dynamic imports require a block comment padded with spaces - /* foo */",
webpackComment: 'dynamic imports require a "webpack" comment with valid syntax',
chunknameFormat: "dynamic imports require a leading comment in the form /*{{format}}*/"
}
},
defaultOptions: [],
create(context) {
const { importFunctions = [], allowEmpty = false, webpackChunknameFormat = "([0-9a-zA-Z-_/.]|\\[(request|index)\\])+" } = context.options[0] || {};
const paddedCommentRegex = /^ (\S[\S\s]+\S) $/;
const commentStyleRegex = /^( ((webpackChunkName: .+)|((webpackPrefetch|webpackPreload): (true|false|-?\d+))|(webpackIgnore: (true|false))|((webpackInclude|webpackExclude): \/.*\/)|(webpackMode: ["'](lazy|lazy-once|eager|weak)["'])|(webpackExports: (["']\w+["']|\[(["']\w+["'], *)+(["']\w+["']*)]))),?)+ $/;
const chunkSubstrFormat = ` webpackChunkName: ["']${webpackChunknameFormat}["'],? `;
const chunkSubstrRegex = new RegExp(chunkSubstrFormat);
function run(node2, arg) {
const sourceCode = (0, eslint_compat_utils_1.getSourceCode)(context);
const leadingComments = sourceCode.getCommentsBefore(arg);
if ((!leadingComments || leadingComments.length === 0) && !allowEmpty) {
context.report({
node: node2,
messageId: "leadingComment"
});
return;
}
let isChunknamePresent = false;
for (const comment of leadingComments) {
if (comment.type !== "Block") {
context.report({
node: node2,
messageId: "blockComment"
});
return;
}
if (!paddedCommentRegex.test(comment.value)) {
context.report({
node: node2,
messageId: "paddedSpaces"
});
return;
}
try {
node_vm_1.default.runInNewContext(`(function() {return {${comment.value}}})()`);
} catch (_a) {
context.report({
node: node2,
messageId: "webpackComment"
});
return;
}
if (!commentStyleRegex.test(comment.value)) {
context.report({
node: node2,
messageId: "webpackComment"
});
return;
}
if (chunkSubstrRegex.test(comment.value)) {
isChunknamePresent = true;
}
}
if (!isChunknamePresent && !allowEmpty) {
context.report({
node: node2,
messageId: "chunknameFormat",
data: {
format: chunkSubstrFormat
}
});
}
}
return {
ImportExpression(node2) {
run(node2, node2.source);
},
CallExpression(node2) {
if (node2.callee.type !== "Import" && "name" in node2.callee && !importFunctions.includes(node2.callee.name)) {
return;
}
run(node2, node2.arguments[0]);
}
};
}
});
}
});
// ../../node_modules/.pnpm/eslint-plugin-import-x@0.4.4_patch_hash=4oryti2zfrehz2qi62zyaaa334_eslint@9.4.0_typescript@5.4.5/node_modules/eslint-plugin-import-x/lib/rules/export.js
var require_export = __commonJS({
"../../node_modules/.pnpm/eslint-plugin-import-x@0.4.4_patch_hash=4oryti2zfrehz2qi62zyaaa334_eslint@9.4.0_typescript@5.4.5/node_modules/eslint-plugin-import-x/lib/rules/export.js"(exports, module) {
"use strict";
init_shims();
var utils_1 = require_utils2();
var rootProgram = "root";
var tsTypePrefix = "type:";
function isTypescriptFunctionOverloads(nodes) {
const nodesArr = [...nodes];
const idents = nodesArr.flatMap((node2) => {
var _a;
return "declaration" in node2 && ((_a = node2.declaration) === null || _a === void 0 ? void 0 : _a.type) === "TSDeclareFunction" ? node2.declaration.id.name : [];
});
if (new Set(idents).size !== idents.length) {
return true;
}
const types = new Set(nodesArr.map((node2) => `${node2.parent.type}`));
if (!types.has("TSDeclareFunction")) {
return false;
}
if (types.size === 1) {
return true;
}
if (types.size === 2 && types.has("FunctionDeclaration")) {
return true;
}
return false;
}
function isTypescriptNamespaceMerging(nodes) {
const types = new Set(Array.from(nodes, (node2) => `${node2.parent.type}`));
const noNamespaceNodes = [...nodes].filter((node2) => node2.parent.type !== "TSModuleDeclaration");
return types.has("TSModuleDeclaration") && (types.size === 1 || types.size === 2 && (types.has("FunctionDeclaration") || types.has("TSDeclareFunction")) || types.size === 3 && types.has("FunctionDeclaration") && types.has("TSDeclareFunction") || types.size === 2 && (types.has("ClassDeclaration") || types.has("TSEnumDeclaration")) && noNamespaceNodes.length === 1);
}
function shouldSkipTypescriptNamespace(node2, nodes) {
const types = new Set(Array.from(nodes, (node3) => `${node3.parent.type}`));
return !isTypescriptNamespaceMerging(nodes) && node2.parent.type === "TSModuleDeclaration" && (types.has("TSEnumDeclaration") || types.has("ClassDeclaration") || types.has("FunctionDeclaration") || types.has("TSDeclareFunction"));
}
module.exports = (0, utils_1.createRule)({
name: "export",
meta: {
type: "problem",
docs: {
category: "Helpful warnings",
description: "Forbid any invalid exports, i.e. re-export of the same name."
},
schema: [],
messages: {
noNamed: "No named exports found in module '{{module}}'.",
multiDefault: "Multiple default exports.",
multiNamed: "Multiple exports of name '{{name}}'."
}
},
defaultOptions: [],
create(context) {
const namespace = /* @__PURE__ */ new Map([[rootProgram, /* @__PURE__ */ new Map()]]);
function addNamed(name, node2, parent, isType) {
if (!namespace.has(parent)) {
namespace.set(parent, /* @__PURE__ */ new Map());
}
const named = namespace.get(parent);
const key = isType ? `${tsTypePrefix}${name}` : name;
let nodes = named.get(key);
if (nodes == null) {
nodes = /* @__PURE__ */ new Set();
named.set(key, nodes);
}
nodes.add(node2);
}
function getParent(node2) {
var _a;
if (((_a = node2.parent) === null || _a === void 0 ? void 0 : _a.type) === "TSModuleBlock") {
return node2.parent.parent;
}
return rootProgram;
}
return {
ExportDefaultDeclaration(node2) {
addNamed("default", node2, getParent(node2));
},
ExportSpecifier(node2) {
addNamed((0, utils_1.getValue)(node2.exported), node2.exported, getParent(node2.parent));
},
ExportNamedDeclaration(node2) {
if (node2.declaration == null) {
return;
}
const parent = getParent(node2);
const isTypeVariableDecl = "kind" in node2.declaration && node2.declaration.kind === "type";
if ("id" in node2.declaration && node2.declaration.id != null) {
const id = node2.declaration.id;
addNamed(id.name, id, parent, ["TSTypeAliasDeclaration", "TSInterfaceDeclaration"].includes(node2.declaration.type) || isTypeVariableDecl);
}
if ("declarations" in node2.declaration && node2.declaration.declarations != null) {
for (const declaration of node2.declaration.declarations) {
(0, utils_1.recursivePatternCapture)(declaration.id, (v) => {
addNamed(v.name, v, parent, isTypeVariableDecl);
});
}
}
},
ExportAllDeclaration(node2) {
if (node2.source == null) {
return;
}
if (node2.exported && node2.exported.name) {
return;
}
const remoteExports = utils_1.ExportMap.get(node2.source.value, context);
if (remoteExports == null) {
return;
}
if (remoteExports.errors.length > 0) {
remoteExports.reportErrors(context, node2);
return;
}
const parent = getParent(node2);
let any = false;
remoteExports.forEach((_, name) => {
if (name !== "default") {
any = true;
addNamed(name, node2, parent);
}
});
if (!any) {
context.report({
node: node2.source,
messageId: "noNamed",
data: { module: node2.source.value }
});
}
},
"Program:exit"() {
for (const [, named] of namespace) {
for (const [name, nodes] of named) {
if (nodes.size <= 1) {
continue;
}
if (isTypescriptFunctionOverloads(nodes) || isTypescriptNamespaceMerging(nodes)) {
continue;
}
for (const node2 of nodes) {
if (shouldSkipTypescriptNamespace(node2, nodes)) {
continue;
}
if (name === "default") {
context.report({
node: node2,
messageId: "multiDefault"
});
} else {
context.report({
node: node2,
messageId: "multiNamed",
data: {
name: name.replace(tsTypePrefix, "")
}
});
}
}
}
}
}
};
}
});
}
});
// ../../node_modules/.pnpm/eslint-plugin-import-x@0.4.4_patch_hash=4oryti2zfrehz2qi62zyaaa334_eslint@9.4.0_typescript@5.4.5/node_modules/eslint-plugin-import-x/lib/rules/exports-last.js
var require_exports_last = __commonJS({
"../../node_modules/.pnpm/eslint-plugin-import-x@0.4.4_patch_hash=4oryti2zfrehz2qi62zyaaa334_eslint@9.4.0_typescript@5.4.5/node_modules/eslint-plugin-import-x/lib/rules/exports-last.js"(exports, module) {
"use strict";
init_shims();
var utils_1 = require_utils2();
var findLastIndex = (array, predicate) => {
let i = array.length - 1;
while (i >= 0) {
if (predicate(array[i])) {
return i;
}
i--;
}
return -1;
};
function isNonExportStatement({ type }) {
return type !== "ExportDefaultDeclaration" && type !== "ExportNamedDeclaration" && type !== "ExportAllDeclaration";
}
module.exports = (0, utils_1.createRule)({
name: "exports-last",
meta: {
type: "suggestion",
docs: {
category: "Style guide",
description: "Ensure all exports appear after other statements."
},
schema: [],
messages: {
end: "Export statements should appear at the end of the file"
}
},
defaultOptions: [],
create(context) {
return {
Program({ body }) {
const lastNonExportStatementIndex = findLastIndex(body, isNonExportStatement);
if (lastNonExportStatementIndex !== -1) {
for (const node2 of body.slice(0, lastNonExportStatementIndex)) {
if (!isNonExportStatement(node2)) {
context.report({
node: node2,
messageId: "end"
});
}
}
}
}
};
}
});
}
});
// ../../node_modules/.pnpm/eslint-plugin-import-x@0.4.4_patch_hash=4oryti2zfrehz2qi62zyaaa334_eslint@9.4.0_typescript@5.4.5/node_modules/eslint-plugin-import-x/lib/rules/extensions.js
var require_extensions = __commonJS({
"../../node_modules/.pnpm/eslint-plugin-import-x@0.4.4_patch_hash=4oryti2zfrehz2qi62zyaaa334_eslint@9.4.0_typescript@5.4.5/node_modules/eslint-plugin-import-x/lib/rules/extensions.js"(exports, module) {
"use strict";
init_shims();
var tslib_1 = (init_tslib_es6(), __toCommonJS(tslib_es6_exports));
var node_path_1 = tslib_1.__importDefault(__require("node:path"));
var utils_1 = require_utils2();
var enumValues = {
enum: ["always", "ignorePackages", "never"]
};
var patternProperties = {
type: "object",
patternProperties: { ".*": enumValues }
};
var properties = {
type: "object",
properties: {
pattern: patternProperties,
ignorePackages: { type: "boolean" }
}
};
function buildProperties(context) {
const result = {
defaultConfig: "never",
pattern: {},
ignorePackages: false
};
for (const obj of context.options) {
if (typeof obj === "string") {
result.defaultConfig = obj;
continue;
}
if (obj.pattern === void 0 && obj.ignorePackages === void 0) {
Object.assign(result.pattern, obj);
continue;
}
if (obj.pattern !== void 0) {
Object.assign(result.pattern, obj.pattern);
}
if (obj.ignorePackages !== void 0) {
result.ignorePackages = obj.ignorePackages;
}
}
if (result.defaultConfig === "ignorePackages") {
result.defaultConfig = "always";
result.ignorePackages = true;
}
return result;
}
function isExternalRootModule(file) {
if (file === "." || file === "..") {
return false;
}
const slashCount = file.split("/").length - 1;
if (slashCount === 0) {
return true;
}
if ((0, utils_1.isScoped)(file) && slashCount <= 1) {
return true;
}
return false;
}
module.exports = (0, utils_1.createRule)({
name: "extensions",
meta: {
type: "suggestion",
docs: {
category: "Style guide",
description: "Ensure consistent use of file extension within the import path."
},
schema: {
anyOf: [
{
type: "array",
items: [enumValues],
additionalItems: false
},
{
type: "array",
items: [enumValues, properties],
additionalItems: false
},
{
type: "array",
items: [properties],
additionalItems: false
},
{
type: "array",
items: [patternProperties],
additionalItems: false
},
{
type: "array",
items: [enumValues, patternProperties],
additionalItems: false
}
]
},
messages: {
missing: 'Missing file extension {{extension}}for "{{importPath}}"',
unexpected: 'Unexpected use of file extension "{{extension}}" for "{{importPath}}"'
}
},
defaultOptions: [],
create(context) {
const props = buildProperties(context);
function getModifier(extension) {
return props.pattern[extension] || props.defaultConfig;
}
function isUseOfExtensionRequired(extension, isPackage) {
return getModifier(extension) === "always" && (!props.ignorePackages || !isPackage);
}
function isUseOfExtensionForbidden(extension) {
return getModifier(extension) === "never";
}
function isResolvableWithoutExtension(file) {
const extension = node_path_1.default.extname(file);
const fileWithoutExtension = file.slice(0, -extension.length);
const resolvedFileWithoutExtension = (0, utils_1.resolve)(fileWithoutExtension, context);
return resolvedFileWithoutExtension === (0, utils_1.resolve)(file, context);
}
return (0, utils_1.moduleVisitor)((source, node2) => {
if (!source || !source.value) {
return;
}
const importPathWithQueryString = source.value;
if ((0, utils_1.isBuiltIn)(importPathWithQueryString, context.settings)) {
return;
}
const importPath = importPathWithQueryString.replace(/\?(.*)$/, "");
if (isExternalRootModule(importPath)) {
return;
}
const resolvedPath = (0, utils_1.resolve)(importPath, context);
const extension = node_path_1.default.extname(resolvedPath || importPath).slice(1);
const isPackage = (0, utils_1.isExternalModule)(importPath, (0, utils_1.resolve)(importPath, context), context) || (0, utils_1.isScoped)(importPath);
if (!extension || !importPath.endsWith(`.${extension}`)) {
if ("importKind" in node2 && node2.importKind === "type" || "exportKind" in node2 && node2.exportKind === "type") {
return;
}
const extensionRequired = isUseOfExtensionRequired(extension, isPackage);
const extensionForbidden = isUseOfExtensionForbidden(extension);
if (extensionRequired && !extensionForbidden) {
context.report({
node: source,
messageId: "missing",
data: {
extension: extension ? `"${extension}" ` : "",
importPath: importPathWithQueryString
}
});
}
} else if (extension && isUseOfExtensionForbidden(extension) && isResolvableWithoutExtension(importPath)) {
context.report({
node: source,
messageId: "unexpected",
data: {
extension,
importPath: importPathWithQueryString
}
});
}
}, { commonjs: true });
}
});
}
});
// ../../node_modules/.pnpm/eslint-plugin-import-x@0.4.4_patch_hash=4oryti2zfrehz2qi62zyaaa334_eslint@9.4.0_typescript@5.4.5/node_modules/eslint-plugin-import-x/lib/rules/first.js
var require_first = __commonJS({
"../../node_modules/.pnpm/eslint-plugin-import-x@0.4.4_patch_hash=4oryti2zfrehz2qi62zyaaa334_eslint@9.4.0_typescript@5.4.5/node_modules/eslint-plugin-import-x/lib/rules/first.js"(exports, module) {
"use strict";
init_shims();
var eslint_compat_utils_1 = require_dist();
var utils_1 = require_utils2();
function getImportValue(node2) {
return node2.type === "ImportDeclaration" ? node2.source.value : "moduleReference" in node2 && "expression" in node2.moduleReference && "value" in node2.moduleReference.expression && node2.moduleReference.expression.value;
}
function isPossibleDirective(node2) {
return node2.type === "ExpressionStatement" && node2.expression.type === "Literal" && typeof node2.expression.value === "string";
}
module.exports = (0, utils_1.createRule)({
name: "first",
meta: {
type: "suggestion",
docs: {
category: "Style guide",
description: "Ensure all imports appear before other statements."
},
fixable: "code",
schema: [
{
type: "string",
enum: ["absolute-first", "disable-absolute-first"]
}
],
messages: {
absolute: "Absolute imports should come before relative imports.",
order: "Import in body of module; reorder to top."
}
},
defaultOptions: [],
create(context) {
return {
Program(n) {
const body = n.body;
if (!(body === null || body === void 0 ? void 0 : body.length)) {
return;
}
const absoluteFirst = context.options[0] === "absolute-first";
const sourceCode = (0, eslint_compat_utils_1.getSourceCode)(context);
const originSourceCode = sourceCode.getText();
let nonImportCount = 0;
let anyExpressions = false;
let anyRelative = false;
let lastLegalImp = null;
const errorInfos = [];
let shouldSort = true;
let lastSortNodesIndex = 0;
for (const [index, node2] of body.entries()) {
if (!anyExpressions && isPossibleDirective(node2)) {
continue;
}
anyExpressions = true;
if (node2.type === "ImportDeclaration" || node2.type === "TSImportEqualsDeclaration") {
if (absoluteFirst) {
const importValue = getImportValue(node2);
if (typeof importValue === "string" && /^\./.test(importValue)) {
anyRelative = true;
} else if (anyRelative) {
context.report({
node: node2.type === "ImportDeclaration" ? node2.source : node2.moduleReference,
messageId: "absolute"
});
}
}
if (nonImportCount > 0) {
for (const variable of sourceCode.getDeclaredVariables(node2)) {
if (!shouldSort) {
break;
}
for (const reference of variable.references) {
if (reference.identifier.range[0] < node2.range[1]) {
shouldSort = false;
break;
}
}
}
if (shouldSort) {
lastSortNodesIndex = errorInfos.length;
}
errorInfos.push({
node: node2,
range: [body[index - 1].range[1], node2.range[1]]
});
} else {
lastLegalImp = node2;
}
} else {
nonImportCount++;
}
}
if (errorInfos.length === 0) {
return;
}
for (const [index, { node: node2 }] of errorInfos.entries()) {
let fix;
if (index < lastSortNodesIndex) {
fix = (fixer) => fixer.insertTextAfter(node2, "");
} else if (index === lastSortNodesIndex) {
const sortNodes = errorInfos.slice(0, lastSortNodesIndex + 1);
fix = (fixer) => {
const removeFixers = sortNodes.map(({ range: range2 }) => fixer.removeRange(range2));
const range = [
0,
removeFixers[removeFixers.length - 1].range[1]
];
let insertSourceCode = sortNodes.map(({ range: range2 }) => {
const nodeSourceCode = originSourceCode.slice(...range2);
if (/\S/.test(nodeSourceCode[0])) {
return `
${nodeSourceCode}`;
}
return nodeSourceCode;
}).join("");
let replaceSourceCode = "";
if (!lastLegalImp) {
insertSourceCode = insertSourceCode.trim() + insertSourceCode.match(/^(\s+)/)[0];
}
const insertFixer = lastLegalImp ? fixer.insertTextAfter(lastLegalImp, insertSourceCode) : fixer.insertTextBefore(body[0], insertSourceCode);
const fixers = [insertFixer, ...removeFixers];
for (const [i, computedFixer] of fixers.entries()) {
replaceSourceCode += originSourceCode.slice(fixers[i - 1] ? fixers[i - 1].range[1] : 0, computedFixer.range[0]) + computedFixer.text;
}
return fixer.replaceTextRange(range, replaceSourceCode);
};
}
context.report({
node: node2,
messageId: "order",
fix
});
}
}
};
}
});
}
});
// ../../node_modules/.pnpm/eslint-plugin-import-x@0.4.4_patch_hash=4oryti2zfrehz2qi62zyaaa334_eslint@9.4.0_typescript@5.4.5/node_modules/eslint-plugin-import-x/lib/rules/group-exports.js
var require_group_exports = __commonJS({
"../../node_modules/.pnpm/eslint-plugin-import-x@0.4.4_patch_hash=4oryti2zfrehz2qi62zyaaa334_eslint@9.4.0_typescript@5.4.5/node_modules/eslint-plugin-import-x/lib/rules/group-exports.js"(exports, module) {
"use strict";
init_shims();
var utils_1 = require_utils2();
function accessorChain(node2) {
const chain = [];
let exp = node2;
do {
if ("name" in exp.property) {
chain.unshift(exp.property.name);
} else if ("value" in exp.property) {
chain.unshift(exp.property.value);
}
if (exp.object.type === "Identifier") {
chain.unshift(exp.object.name);
break;
}
exp = exp.object;
} while (exp.type === "MemberExpression");
return chain;
}
module.exports = (0, utils_1.createRule)({
name: "group-exports",
meta: {
type: "suggestion",
docs: {
category: "Style guide",
description: "Prefer named exports to be grouped together in a single export declaration."
},
schema: {},
messages: {
ExportNamedDeclaration: "Multiple named export declarations; consolidate all named exports into a single export declaration",
AssignmentExpression: "Multiple CommonJS exports; consolidate all exports into a single assignment to `module.exports`"
}
},
defaultOptions: [],
create(context) {
const nodes = {
modules: {
set: /* @__PURE__ */ new Set(),
sources: {}
},
types: {
set: /* @__PURE__ */ new Set(),
sources: {}
},
commonjs: {
set: /* @__PURE__ */ new Set()
}
};
return {
ExportNamedDeclaration(node2) {
const target = node2.exportKind === "type" ? nodes.types : nodes.modules;
if (!node2.source) {
target.set.add(node2);
} else if (Array.isArray(target.sources[node2.source.value])) {
target.sources[node2.source.value].push(node2);
} else {
target.sources[node2.source.value] = [node2];
}
},
AssignmentExpression(node2) {
if (node2.left.type !== "MemberExpression") {
return;
}
const chain = accessorChain(node2.left);
if (chain[0] === "module" && chain[1] === "exports" && chain.length <= 3) {
nodes.commonjs.set.add(node2);
return;
}
if (chain[0] === "exports" && chain.length === 2) {
nodes.commonjs.set.add(node2);
return;
}
},
"Program:exit"() {
if (nodes.modules.set.size > 1) {
for (const node2 of nodes.modules.set) {
context.report({
node: node2,
messageId: node2.type
});
}
}
for (const node2 of Object.values(nodes.modules.sources).filter((nodesWithSource) => Array.isArray(nodesWithSource) && nodesWithSource.length > 1).flat()) {
context.report({
node: node2,
messageId: node2.type
});
}
if (nodes.types.set.size > 1) {
for (const node2 of nodes.types.set) {
context.report({
node: node2,
messageId: node2.type
});
}
}
for (const node2 of Object.values(nodes.types.sources).filter((nodesWithSource) => Array.isArray(nodesWithSource) && nodesWithSource.length > 1).flat()) {
context.report({
node: node2,
messageId: node2.type
});
}
if (nodes.commonjs.set.size > 1) {
for (const node2 of nodes.commonjs.set) {
context.report({
node: node2,
messageId: node2.type
});
}
}
}
};
}
});
}
});
// ../../node_modules/.pnpm/eslint-plugin-import-x@0.4.4_patch_hash=4oryti2zfrehz2qi62zyaaa334_eslint@9.4.0_typescript@5.4.5/node_modules/eslint-plugin-import-x/lib/rules/imports-first.js
var require_imports_first = __commonJS({
"../../node_modules/.pnpm/eslint-plugin-import-x@0.4.4_patch_hash=4oryti2zfrehz2qi62zyaaa334_eslint@9.4.0_typescript@5.4.5/node_modules/eslint-plugin-import-x/lib/rules/imports-first.js"(exports, module) {
"use strict";
init_shims();
var tslib_1 = (init_tslib_es6(), __toCommonJS(tslib_es6_exports));
var utils_1 = require_dist5();
var docs_url_1 = require_docs_url();
var first_1 = tslib_1.__importDefault(require_first());
var createRule = utils_1.ESLintUtils.RuleCreator((ruleName) => (0, docs_url_1.docsUrl)(ruleName, "7b25c1cb95ee18acc1531002fd343e1e6031f9ed"));
module.exports = createRule(Object.assign(Object.assign({}, first_1.default), { name: "imports-first", meta: Object.assign(Object.assign({}, first_1.default.meta), { deprecated: true, docs: {
category: "Style guide",
description: "Replaced by `import-x/first`."
} }) }));
}
});
// ../../node_modules/.pnpm/eslint-plugin-import-x@0.4.4_patch_hash=4oryti2zfrehz2qi62zyaaa334_eslint@9.4.0_typescript@5.4.5/node_modules/eslint-plugin-import-x/lib/rules/max-dependencies.js
var require_max_dependencies = __commonJS({
"../../node_modules/.pnpm/eslint-plugin-import-x@0.4.4_patch_hash=4oryti2zfrehz2qi62zyaaa334_eslint@9.4.0_typescript@5.4.5/node_modules/eslint-plugin-import-x/lib/rules/max-dependencies.js"(exports, module) {
"use strict";
init_shims();
var utils_1 = require_utils2();
module.exports = (0, utils_1.createRule)({
name: "max-dependencies",
meta: {
type: "suggestion",
docs: {
category: "Style guide",
description: "Enforce the maximum number of dependencies a module can have."
},
schema: [
{
type: "object",
properties: {
max: { type: "number" },
ignoreTypeImports: { type: "boolean" }
},
additionalProperties: false
}
],
messages: {
max: "Maximum number of dependencies ({{max}}) exceeded."
}
},
defaultOptions: [],
create(context) {
const { ignoreTypeImports } = context.options[0] || {};
const dependencies = /* @__PURE__ */ new Set();
let lastNode;
return Object.assign({ "Program:exit"() {
const { max = 10 } = context.options[0] || {};
if (dependencies.size <= max) {
return;
}
context.report({
node: lastNode,
messageId: "max",
data: {
max
}
});
} }, (0, utils_1.moduleVisitor)((source, node2) => {
if ("importKind" in node2 && node2.importKind !== "type" || !ignoreTypeImports) {
dependencies.add(source.value);
}
lastNode = source;
}, { commonjs: true }));
}
});
}
});
// ../../node_modules/.pnpm/eslint-plugin-import-x@0.4.4_patch_hash=4oryti2zfrehz2qi62zyaaa334_eslint@9.4.0_typescript@5.4.5/node_modules/eslint-plugin-import-x/lib/rules/named.js
var require_named = __commonJS({
"../../node_modules/.pnpm/eslint-plugin-import-x@0.4.4_patch_hash=4oryti2zfrehz2qi62zyaaa334_eslint@9.4.0_typescript@5.4.5/node_modules/eslint-plugin-import-x/lib/rules/named.js"(exports, module) {
"use strict";
init_shims();
var tslib_1 = (init_tslib_es6(), __toCommonJS(tslib_es6_exports));
var node_path_1 = tslib_1.__importDefault(__require("node:path"));
var eslint_compat_utils_1 = require_dist();
var utils_1 = require_utils2();
module.exports = (0, utils_1.createRule)({
name: "named",
meta: {
type: "problem",
docs: {
category: "Static analysis",
description: "Ensure named imports correspond to a named export in the remote file."
},
schema: [
{
type: "object",
properties: {
commonjs: {
type: "boolean"
}
},
additionalProperties: false
}
],
messages: {
notFound: "{{name}} not found in '{{path}}'",
notFoundDeep: "{{name}} not found via {{deepPath}}"
}
},
defaultOptions: [],
create(context) {
const options = context.options[0] || {};
function checkSpecifiers(key, type, node2) {
if (node2.source == null || "importKind" in node2 && (node2.importKind === "type" || node2.importKind === "typeof") || "exportKind" in node2 && node2.exportKind === "type") {
return;
}
if (!node2.specifiers.some((im) => im.type === type)) {
return;
}
const imports2 = utils_1.ExportMap.get(node2.source.value, context);
if (imports2 == null || imports2.parseGoal === "ambiguous") {
return;
}
if (imports2.errors.length > 0) {
imports2.reportErrors(context, node2);
return;
}
for (const im of node2.specifiers) {
if (im.type !== type || "importKind" in im && (im.importKind === "type" || im.importKind === "typeof")) {
continue;
}
const imNode = im[key];
const name = imNode.name || imNode.value;
const deepLookup = imports2.hasDeep(name);
if (!deepLookup.found) {
if (deepLookup.path.length > 1) {
const deepPath = deepLookup.path.map((i) => node_path_1.default.relative(node_path_1.default.dirname((0, eslint_compat_utils_1.getPhysicalFilename)(context)), i.path)).join(" -> ");
context.report({
node: imNode,
messageId: "notFoundDeep",
data: {
name,
deepPath
}
});
} else {
context.report({
node: imNode,
messageId: "notFound",
data: {
name,
path: node2.source.value
}
});
}
}
}
}
return {
ImportDeclaration: checkSpecifiers.bind(null, "imported", "ImportSpecifier"),
ExportNamedDeclaration: checkSpecifiers.bind(null, "local", "ExportSpecifier"),
VariableDeclarator(node2) {
if (!options.commonjs || node2.type !== "VariableDeclarator" || !node2.id || node2.id.type !== "ObjectPattern" || node2.id.properties.length === 0 || !node2.init || node2.init.type !== "CallExpression") {
return;
}
const call = node2.init;
const source = call.arguments[0];
const variableImports = node2.id.properties;
const variableExports = utils_1.ExportMap.get(source.value, context);
if (call.callee.type !== "Identifier" || call.callee.name !== "require" || call.arguments.length !== 1 || source.type !== "Literal" || variableExports == null || variableExports.parseGoal === "ambiguous") {
return;
}
if (variableExports.errors.length > 0) {
variableExports.reportErrors(context, node2);
return;
}
for (const im of variableImports) {
if (im.type !== "Property" || !im.key || im.key.type !== "Identifier") {
continue;
}
const deepLookup = variableExports.hasDeep(im.key.name);
if (!deepLookup.found) {
if (deepLookup.path.length > 1) {
const deepPath = deepLookup.path.map((i) => node_path_1.default.relative(node_path_1.default.dirname((0, eslint_compat_utils_1.getFilename)(context)), i.path)).join(" -> ");
context.report({
node: im.key,
messageId: "notFoundDeep",
data: {
name: im.key.name,
deepPath
}
});
} else {
context.report({
node: im.key,
messageId: "notFound",
data: {
name: im.key.name,
path: source.value
}
});
}
}
}
}
};
}
});
}
});
// ../../node_modules/.pnpm/eslint-plugin-import-x@0.4.4_patch_hash=4oryti2zfrehz2qi62zyaaa334_eslint@9.4.0_typescript@5.4.5/node_modules/eslint-plugin-import-x/lib/rules/namespace.js
var require_namespace = __commonJS({
"../../node_modules/.pnpm/eslint-plugin-import-x@0.4.4_patch_hash=4oryti2zfrehz2qi62zyaaa334_eslint@9.4.0_typescript@5.4.5/node_modules/eslint-plugin-import-x/lib/rules/namespace.js"(exports, module) {
"use strict";
init_shims();
var utils_1 = require_utils2();
function processBodyStatement(context, namespaces, declaration) {
if (declaration.type !== "ImportDeclaration") {
return;
}
if (declaration.specifiers.length === 0) {
return;
}
const imports2 = utils_1.ExportMap.get(declaration.source.value, context);
if (imports2 == null) {
return;
}
if (imports2.errors.length > 0) {
imports2.reportErrors(context, declaration);
return;
}
for (const specifier of declaration.specifiers) {
switch (specifier.type) {
case "ImportNamespaceSpecifier": {
if (imports2.size === 0) {
context.report({
node: specifier,
messageId: "noNamesFound",
data: {
module: declaration.source.value
}
});
}
namespaces.set(specifier.local.name, imports2);
break;
}
case "ImportDefaultSpecifier":
case "ImportSpecifier": {
const meta = imports2.get("imported" in specifier ? (0, utils_1.getValue)(specifier.imported) : "default");
if (!meta || !meta.namespace) {
break;
}
namespaces.set(specifier.local.name, meta.namespace);
break;
}
default:
}
}
}
function makeMessage(last, namepath, node2 = last) {
return {
node: node2,
messageId: "notFoundInNamespace",
data: {
name: last.name,
depth: namepath.length > 1 ? "deeply " : "",
namepath: namepath.join(".")
}
};
}
module.exports = (0, utils_1.createRule)({
name: "namespace",
meta: {
type: "problem",
docs: {
category: "Static analysis",
description: "Ensure imported namespaces contain dereferenced properties as they are dereferenced."
},
schema: [
{
type: "object",
properties: {
allowComputed: {
description: "If `false`, will report computed (and thus, un-lintable) references to namespace members.",
type: "boolean",
default: false
}
},
additionalProperties: false
}
],
messages: {
noNamesFound: "No exported names found in module '{{module}}'.",
computedReference: "Unable to validate computed reference to imported namespace '{{namespace}}'.",
namespaceMember: "Assignment to member of namespace '{{namespace}}'.",
topLevelNames: "Only destructure top-level names.",
notFoundInNamespace: "'{{name}}' not found in {{depth}}imported namespace '{{namepath}}'."
}
},
defaultOptions: [
{
allowComputed: false
}
],
create(context) {
const { allowComputed } = context.options[0] || {};
const namespaces = /* @__PURE__ */ new Map();
return {
Program({ body }) {
for (const x of body) {
processBodyStatement(context, namespaces, x);
}
},
ExportNamespaceSpecifier(namespace) {
const declaration = (0, utils_1.importDeclaration)(context, namespace);
const imports2 = utils_1.ExportMap.get(declaration.source.value, context);
if (imports2 == null) {
return null;
}
if (imports2.errors.length > 0) {
imports2.reportErrors(context, declaration);
return;
}
if (imports2.size === 0) {
context.report({
node: namespace,
messageId: "noNamesFound",
data: {
module: declaration.source.value
}
});
}
},
MemberExpression(dereference) {
if (dereference.object.type !== "Identifier") {
return;
}
if (!namespaces.has(dereference.object.name)) {
return;
}
if ((0, utils_1.declaredScope)(context, dereference, dereference.object.name) !== "module") {
return;
}
const parent = dereference.parent;
if ((parent === null || parent === void 0 ? void 0 : parent.type) === "AssignmentExpression" && parent.left === dereference) {
context.report({
node: parent,
messageId: "namespaceMember",
data: {
namespace: dereference.object.name
}
});
}
let namespace = namespaces.get(dereference.object.name);
const namepath = [dereference.object.name];
let deref = dereference;
while (namespace instanceof utils_1.ExportMap && (deref === null || deref === void 0 ? void 0 : deref.type) === "MemberExpression") {
if (deref.computed) {
if (!allowComputed) {
context.report({
node: deref.property,
messageId: "computedReference",
data: {
namespace: "name" in deref.object && deref.object.name
}
});
}
return;
}
if (!namespace.has(deref.property.name)) {
context.report(makeMessage(deref.property, namepath));
break;
}
const exported = namespace.get(deref.property.name);
if (exported == null) {
return;
}
namepath.push(deref.property.name);
namespace = exported.namespace;
deref = deref.parent;
}
},
VariableDeclarator(node2) {
const { id, init } = node2;
if (init == null) {
return;
}
if (init.type !== "Identifier") {
return;
}
if (!namespaces.has(init.name)) {
return;
}
if ((0, utils_1.declaredScope)(context, node2, init.name) !== "module") {
return;
}
const initName = init.name;
function testKey(pattern, namespace, path = [initName]) {
if (!(namespace instanceof utils_1.ExportMap)) {
return;
}
if (pattern.type !== "ObjectPattern") {
return;
}
for (const property of pattern.properties) {
if (property.type === "ExperimentalRestProperty" || property.type === "RestElement" || !property.key) {
continue;
}
if (property.key.type !== "Identifier") {
context.report({
node: property,
messageId: "topLevelNames"
});
continue;
}
if (!namespace.has(property.key.name)) {
context.report(makeMessage(property.key, path, property));
continue;
}
path.push(property.key.name);
const dependencyExportMap = namespace.get(property.key.name);
if (dependencyExportMap != null) {
testKey(property.value, dependencyExportMap.namespace, path);
}
path.pop();
}
}
testKey(id, namespaces.get(init.name));
},
JSXMemberExpression({ object, property }) {
if (!("name" in object) || typeof object.name !== "string" || !namespaces.has(object.name)) {
return;
}
const namespace = namespaces.get(object.name);
if (!namespace.has(property.name)) {
context.report(makeMessage(property, [object.name]));
}
}
};
}
});
}
});
// ../../node_modules/.pnpm/eslint-plugin-import-x@0.4.4_patch_hash=4oryti2zfrehz2qi62zyaaa334_eslint@9.4.0_typescript@5.4.5/node_modules/eslint-plugin-import-x/lib/rules/newline-after-import.js
var require_newline_after_import = __commonJS({
"../../node_modules/.pnpm/eslint-plugin-import-x@0.4.4_patch_hash=4oryti2zfrehz2qi62zyaaa334_eslint@9.4.0_typescript@5.4.5/node_modules/eslint-plugin-import-x/lib/rules/newline-after-import.js"(exports, module) {
"use strict";
init_shims();
var tslib_1 = (init_tslib_es6(), __toCommonJS(tslib_es6_exports));
var debug_1 = tslib_1.__importDefault(require_src());
var eslint_compat_utils_1 = require_dist();
var utils_1 = require_utils2();
var log = (0, debug_1.default)("eslint-plugin-import-x:rules:newline-after-import");
function containsNodeOrEqual(outerNode, innerNode) {
return outerNode.range[0] <= innerNode.range[0] && outerNode.range[1] >= innerNode.range[1];
}
function getScopeBody(scope) {
if (scope.block.type === "SwitchStatement") {
log("SwitchStatement scopes not supported");
return [];
}
const body = "body" in scope.block ? scope.block.body : null;
if (body && "type" in body && body.type === "BlockStatement") {
return body.body;
}
return Array.isArray(body) ? body : [];
}
function findNodeIndexInScopeBody(body, nodeToFind) {
return body.findIndex((node2) => containsNodeOrEqual(node2, nodeToFind));
}
function getLineDifference(node2, nextNode) {
return nextNode.loc.start.line - node2.loc.end.line;
}
function isClassWithDecorator(node2) {
var _a;
return node2.type === "ClassDeclaration" && !!((_a = node2.decorators) === null || _a === void 0 ? void 0 : _a.length);
}
function isExportDefaultClass(node2) {
return node2.type === "ExportDefaultDeclaration" && node2.declaration.type === "ClassDeclaration";
}
function isExportNameClass(node2) {
var _a;
return node2.type === "ExportNamedDeclaration" && ((_a = node2.declaration) === null || _a === void 0 ? void 0 : _a.type) === "ClassDeclaration";
}
module.exports = (0, utils_1.createRule)({
name: "newline-after-import",
meta: {
type: "layout",
docs: {
category: "Style guide",
description: "Enforce a newline after import statements."
},
fixable: "whitespace",
schema: [
{
type: "object",
properties: {
count: {
type: "integer",
minimum: 1
},
exactCount: { type: "boolean" },
considerComments: { type: "boolean" }
},
additionalProperties: false
}
],
messages: {
newline: "Expected {{count}} empty line{{lineSuffix}} after {{type}} statement not followed by another {{type}}."
}
},
defaultOptions: [],
create(context) {
let level = 0;
const requireCalls = [];
const options = Object.assign({ count: 1, exactCount: false, considerComments: false }, context.options[0]);
function checkForNewLine(node2, nextNode, type) {
if (isExportDefaultClass(nextNode) || isExportNameClass(nextNode)) {
const classNode = nextNode.declaration;
if (isClassWithDecorator(classNode)) {
nextNode = classNode.decorators[0];
}
} else if (isClassWithDecorator(nextNode)) {
nextNode = nextNode.decorators[0];
}
const lineDifference = getLineDifference(node2, nextNode);
const EXPECTED_LINE_DIFFERENCE = options.count + 1;
if (lineDifference < EXPECTED_LINE_DIFFERENCE || options.exactCount && lineDifference !== EXPECTED_LINE_DIFFERENCE) {
let column = node2.loc.start.column;
if (node2.loc.start.line !== node2.loc.end.line) {
column = 0;
}
context.report({
loc: {
line: node2.loc.end.line,
column
},
messageId: "newline",
data: {
count: options.count,
lineSuffix: options.count > 1 ? "s" : "",
type
},
fix: options.exactCount && EXPECTED_LINE_DIFFERENCE < lineDifference ? void 0 : (fixer) => fixer.insertTextAfter(node2, "\n".repeat(EXPECTED_LINE_DIFFERENCE - lineDifference))
});
}
}
function commentAfterImport(node2, nextComment) {
const lineDifference = getLineDifference(node2, nextComment);
const EXPECTED_LINE_DIFFERENCE = options.count + 1;
if (lineDifference < EXPECTED_LINE_DIFFERENCE) {
let column = node2.loc.start.column;
if (node2.loc.start.line !== node2.loc.end.line) {
column = 0;
}
context.report({
loc: {
line: node2.loc.end.line,
column
},
messageId: "newline",
data: {
count: options.count,
lineSuffix: options.count > 1 ? "s" : "",
type: "import"
},
fix: options.exactCount && EXPECTED_LINE_DIFFERENCE < lineDifference ? void 0 : (fixer) => fixer.insertTextAfter(node2, "\n".repeat(EXPECTED_LINE_DIFFERENCE - lineDifference))
});
}
}
function incrementLevel() {
level++;
}
function decrementLevel() {
level--;
}
function checkImport(node2) {
const { parent } = node2;
if (!parent || !("body" in parent) || !parent.body) {
return;
}
const root = parent;
const nodePosition = root.body.indexOf(node2);
const nextNode = root.body[nodePosition + 1];
const endLine = node2.loc.end.line;
let nextComment;
if (root.comments !== void 0 && options.considerComments) {
nextComment = root.comments.find((o) => o.loc.start.line >= endLine && o.loc.start.line <= endLine + options.count + 1);
}
if (node2.type === "TSImportEqualsDeclaration" && node2.isExport) {
return;
}
if (nextComment) {
commentAfterImport(node2, nextComment);
} else if (nextNode && nextNode.type !== "ImportDeclaration" && (nextNode.type !== "TSImportEqualsDeclaration" || nextNode.isExport)) {
checkForNewLine(node2, nextNode, "import");
}
}
return {
ImportDeclaration: checkImport,
TSImportEqualsDeclaration: checkImport,
CallExpression(node2) {
if ((0, utils_1.isStaticRequire)(node2) && level === 0) {
requireCalls.push(node2);
}
},
"Program:exit"(node2) {
log("exit processing for", (0, eslint_compat_utils_1.getPhysicalFilename)(context));
const scopeBody = getScopeBody((0, utils_1.getScope)(context, node2));
log("got scope:", scopeBody);
for (const [index, node3] of requireCalls.entries()) {
const nodePosition = findNodeIndexInScopeBody(scopeBody, node3);
log("node position in scope:", nodePosition);
const statementWithRequireCall = scopeBody[nodePosition];
const nextStatement = scopeBody[nodePosition + 1];
const nextRequireCall = requireCalls[index + 1];
if (nextRequireCall && containsNodeOrEqual(statementWithRequireCall, nextRequireCall)) {
continue;
}
if (nextStatement && (!nextRequireCall || !containsNodeOrEqual(nextStatement, nextRequireCall))) {
checkForNewLine(statementWithRequireCall, nextStatement, "require");
}
}
},
FunctionDeclaration: incrementLevel,
FunctionExpression: incrementLevel,
ArrowFunctionExpression: incrementLevel,
BlockStatement: incrementLevel,
ObjectExpression: incrementLevel,
Decorator: incrementLevel,
"FunctionDeclaration:exit": decrementLevel,
"FunctionExpression:exit": decrementLevel,
"ArrowFunctionExpression:exit": decrementLevel,
"BlockStatement:exit": decrementLevel,
"ObjectExpression:exit": decrementLevel,
"Decorator:exit": decrementLevel
};
}
});
}
});
// ../../node_modules/.pnpm/eslint-plugin-import-x@0.4.4_patch_hash=4oryti2zfrehz2qi62zyaaa334_eslint@9.4.0_typescript@5.4.5/node_modules/eslint-plugin-import-x/lib/rules/no-absolute-path.js
var require_no_absolute_path = __commonJS({
"../../node_modules/.pnpm/eslint-plugin-import-x@0.4.4_patch_hash=4oryti2zfrehz2qi62zyaaa334_eslint@9.4.0_typescript@5.4.5/node_modules/eslint-plugin-import-x/lib/rules/no-absolute-path.js"(exports, module) {
"use strict";
init_shims();
var tslib_1 = (init_tslib_es6(), __toCommonJS(tslib_es6_exports));
var node_path_1 = tslib_1.__importDefault(__require("node:path"));
var eslint_compat_utils_1 = require_dist();
var utils_1 = require_utils2();
module.exports = (0, utils_1.createRule)({
name: "no-absolute-path",
meta: {
type: "suggestion",
docs: {
category: "Static analysis",
description: "Forbid import of modules using absolute paths."
},
fixable: "code",
schema: [(0, utils_1.makeOptionsSchema)()],
messages: {
absolute: "Do not import modules using an absolute path"
}
},
defaultOptions: [],
create(context) {
const options = Object.assign({ esmodule: true, commonjs: true }, context.options[0]);
return (0, utils_1.moduleVisitor)((source) => {
if (!(0, utils_1.isAbsolute)(source.value)) {
return;
}
context.report({
node: source,
messageId: "absolute",
fix(fixer) {
const resolvedContext = (0, eslint_compat_utils_1.getPhysicalFilename)(context);
let relativePath = node_path_1.default.posix.relative(node_path_1.default.dirname(resolvedContext), source.value);
if (!relativePath.startsWith(".")) {
relativePath = `./${relativePath}`;
}
return fixer.replaceText(source, JSON.stringify(relativePath));
}
});
}, options);
}
});
}
});
// ../../node_modules/.pnpm/eslint-plugin-import-x@0.4.4_patch_hash=4oryti2zfrehz2qi62zyaaa334_eslint@9.4.0_typescript@5.4.5/node_modules/eslint-plugin-import-x/lib/rules/no-amd.js
var require_no_amd = __commonJS({
"../../node_modules/.pnpm/eslint-plugin-import-x@0.4.4_patch_hash=4oryti2zfrehz2qi62zyaaa334_eslint@9.4.0_typescript@5.4.5/node_modules/eslint-plugin-import-x/lib/rules/no-amd.js"(exports, module) {
"use strict";
init_shims();
var utils_1 = require_utils2();
module.exports = (0, utils_1.createRule)({
name: "no-amd",
meta: {
type: "suggestion",
docs: {
category: "Module systems",
description: "Forbid AMD `require` and `define` calls."
},
schema: [],
messages: {
amd: "Expected imports instead of AMD {{type}}()."
}
},
defaultOptions: [],
create(context) {
return {
CallExpression(node2) {
if ((0, utils_1.getScope)(context, node2).type !== "module") {
return;
}
if (node2.callee.type !== "Identifier") {
return;
}
if (node2.callee.name !== "require" && node2.callee.name !== "define") {
return;
}
if (node2.arguments.length !== 2) {
return;
}
const modules = node2.arguments[0];
if (modules.type !== "ArrayExpression") {
return;
}
context.report({
node: node2,
messageId: "amd",
data: {
type: node2.callee.name
}
});
}
};
}
});
}
});
// ../../node_modules/.pnpm/eslint-plugin-import-x@0.4.4_patch_hash=4oryti2zfrehz2qi62zyaaa334_eslint@9.4.0_typescript@5.4.5/node_modules/eslint-plugin-import-x/lib/rules/no-anonymous-default-export.js
var require_no_anonymous_default_export = __commonJS({
"../../node_modules/.pnpm/eslint-plugin-import-x@0.4.4_patch_hash=4oryti2zfrehz2qi62zyaaa334_eslint@9.4.0_typescript@5.4.5/node_modules/eslint-plugin-import-x/lib/rules/no-anonymous-default-export.js"(exports, module) {
"use strict";
init_shims();
var utils_1 = require_utils2();
var { hasOwnProperty } = Object.prototype;
var hasOwn = (object, key) => hasOwnProperty.call(object, key);
var defs = {
ArrayExpression: {
option: "allowArray",
description: "If `false`, will report default export of an array",
messageId: "assign",
data: {
type: "array"
}
},
ArrowFunctionExpression: {
option: "allowArrowFunction",
description: "If `false`, will report default export of an arrow function",
messageId: "assign",
data: {
type: "arrow function"
}
},
CallExpression: {
option: "allowCallExpression",
description: "If `false`, will report default export of a function call",
messageId: "assign",
data: {
type: "call result"
},
default: true
},
ClassDeclaration: {
option: "allowAnonymousClass",
description: "If `false`, will report default export of an anonymous class",
messageId: "anonymous",
data: {
type: "class"
},
forbid: (node2) => !("id" in node2.declaration) || !node2.declaration.id
},
FunctionDeclaration: {
option: "allowAnonymousFunction",
description: "If `false`, will report default export of an anonymous function",
messageId: "anonymous",
data: {
type: "function"
},
forbid: (node2) => !("id" in node2.declaration) || !node2.declaration.id
},
Literal: {
option: "allowLiteral",
description: "If `false`, will report default export of a literal",
messageId: "assign",
data: {
type: "literal"
}
},
ObjectExpression: {
option: "allowObject",
description: "If `false`, will report default export of an object expression",
messageId: "assign",
data: {
type: "object"
}
},
TemplateLiteral: {
option: "allowLiteral",
description: "If `false`, will report default export of a literal",
messageId: "assign",
data: {
type: "literal"
}
},
NewExpression: {
option: "allowNew",
description: "If `false`, will report default export of a class instantiation",
messageId: "assign",
data: {
type: "instance"
}
}
};
var schemaProperties = Object.fromEntries(Object.values(defs).map((def) => [
def.option,
{
description: def.description,
type: "boolean"
}
]));
var defaults = Object.fromEntries(Object.values(defs).map((def) => [
def.option,
hasOwn(def, "default") ? def.default : false
]));
module.exports = (0, utils_1.createRule)({
name: "no-anonymous-default-export",
meta: {
type: "suggestion",
docs: {
category: "Style guide",
description: "Forbid anonymous values as default exports."
},
schema: [
{
type: "object",
properties: schemaProperties,
additionalProperties: false
}
],
messages: {
assign: "Assign {{type}} to a variable before exporting as module default",
anonymous: "Unexpected default export of anonymous {{type}}"
}
},
defaultOptions: [],
create(context) {
const options = Object.assign(Object.assign({}, defaults), context.options[0]);
return {
ExportDefaultDeclaration(node2) {
const type = node2.declaration.type;
if (!(type in defs)) {
return;
}
const def = defs[type];
if (!options[def.option] && (!("forbid" in def) || def.forbid(node2))) {
context.report({
node: node2,
messageId: def.messageId,
data: def.data
});
}
}
};
}
});
}
});
// ../../node_modules/.pnpm/eslint-plugin-import-x@0.4.4_patch_hash=4oryti2zfrehz2qi62zyaaa334_eslint@9.4.0_typescript@5.4.5/node_modules/eslint-plugin-import-x/lib/rules/no-commonjs.js
var require_no_commonjs = __commonJS({
"../../node_modules/.pnpm/eslint-plugin-import-x@0.4.4_patch_hash=4oryti2zfrehz2qi62zyaaa334_eslint@9.4.0_typescript@5.4.5/node_modules/eslint-plugin-import-x/lib/rules/no-commonjs.js"(exports, module) {
"use strict";
init_shims();
var utils_1 = require_utils2();
function normalizeLegacyOptions(options) {
if (options.includes("allow-primitive-modules")) {
return { allowPrimitiveModules: true };
}
return options[0] || {};
}
function allowPrimitive(node2, options) {
if (!options.allowPrimitiveModules) {
return false;
}
if (node2.parent.type !== "AssignmentExpression") {
return false;
}
return node2.parent.right.type !== "ObjectExpression";
}
function validateScope(scope) {
return scope.variableScope.type === "module";
}
function isConditional(node2) {
if (node2.type === "IfStatement" || node2.type === "TryStatement" || node2.type === "LogicalExpression" || node2.type === "ConditionalExpression") {
return true;
}
if (node2.parent) {
return isConditional(node2.parent);
}
return false;
}
function isLiteralString(node2) {
return node2.type === "Literal" && typeof node2.value === "string" || node2.type === "TemplateLiteral" && node2.expressions.length === 0;
}
module.exports = (0, utils_1.createRule)({
name: "no-commonjs",
meta: {
type: "suggestion",
docs: {
category: "Module systems",
description: "Forbid CommonJS `require` calls and `module.exports` or `exports.*`."
},
schema: {
anyOf: [
{
type: "array",
items: [{ enum: ["allow-primitive-modules"] }],
additionalItems: false
},
{
type: "array",
items: [
{
type: "object",
properties: {
allowPrimitiveModules: { type: "boolean" },
allowRequire: { type: "boolean" },
allowConditionalRequire: { type: "boolean" }
},
additionalProperties: false
}
],
additionalItems: false
}
]
},
messages: {
export: 'Expected "export" or "export default"',
import: 'Expected "import" instead of "require()"'
}
},
defaultOptions: [],
create(context) {
const options = normalizeLegacyOptions(context.options);
return {
MemberExpression(node2) {
if ("name" in node2.object && node2.object.name === "module" && "name" in node2.property && node2.property.name === "exports") {
if (allowPrimitive(node2, options)) {
return;
}
context.report({ node: node2, messageId: "export" });
}
if ("name" in node2.object && node2.object.name === "exports") {
const isInScope = (0, utils_1.getScope)(context, node2).variables.some((variable) => variable.name === "exports");
if (!isInScope) {
context.report({ node: node2, messageId: "export" });
}
}
},
CallExpression(call) {
if (!validateScope((0, utils_1.getScope)(context, call))) {
return;
}
if (call.callee.type !== "Identifier") {
return;
}
if (call.callee.name !== "require") {
return;
}
if (call.arguments.length !== 1) {
return;
}
if (!isLiteralString(call.arguments[0])) {
return;
}
if (options.allowRequire) {
return;
}
if (options.allowConditionalRequire !== false && isConditional(call.parent)) {
return;
}
context.report({
node: call.callee,
messageId: "import"
});
}
};
}
});
}
});
// ../../node_modules/.pnpm/eslint-plugin-import-x@0.4.4_patch_hash=4oryti2zfrehz2qi62zyaaa334_eslint@9.4.0_typescript@5.4.5/node_modules/eslint-plugin-import-x/lib/rules/no-cycle.js
var require_no_cycle = __commonJS({
"../../node_modules/.pnpm/eslint-plugin-import-x@0.4.4_patch_hash=4oryti2zfrehz2qi62zyaaa334_eslint@9.4.0_typescript@5.4.5/node_modules/eslint-plugin-import-x/lib/rules/no-cycle.js"(exports, module) {
"use strict";
init_shims();
var eslint_compat_utils_1 = require_dist();
var utils_1 = require_utils2();
var traversed = /* @__PURE__ */ new Set();
function routeString(route) {
return route.map((s) => `${s.value}:${s.loc.start.line}`).join("=>");
}
module.exports = (0, utils_1.createRule)({
name: "no-cycle",
meta: {
type: "suggestion",
docs: {
category: "Static analysis",
description: "Forbid a module from importing a module with a dependency path back to itself."
},
schema: [
(0, utils_1.makeOptionsSchema)({
maxDepth: {
anyOf: [
{
description: "maximum dependency depth to traverse",
type: "integer",
minimum: 1
},
{
enum: ["\u221E"],
type: "string"
}
]
},
ignoreExternal: {
description: "ignore external modules",
type: "boolean",
default: false
},
allowUnsafeDynamicCyclicDependency: {
description: "Allow cyclic dependency if there is at least one dynamic import in the chain",
type: "boolean",
default: false
}
})
],
messages: {
cycle: "Dependency cycle {{source}}"
}
},
defaultOptions: [],
create(context) {
const filename = (0, eslint_compat_utils_1.getPhysicalFilename)(context);
if (filename === "<text>") {
return {};
}
const options = context.options[0] || {};
const maxDepth = typeof options.maxDepth === "number" ? options.maxDepth : Number.POSITIVE_INFINITY;
const ignoreModule = (name) => options.ignoreExternal && (0, utils_1.isExternalModule)(name, (0, utils_1.resolve)(name, context), context);
return Object.assign(Object.assign({}, (0, utils_1.moduleVisitor)(function checkSourceValue(sourceNode, importer) {
if (ignoreModule(sourceNode.value)) {
return;
}
if (options.allowUnsafeDynamicCyclicDependency && (importer.type === "ImportExpression" || importer.type === "CallExpression" && "name" in importer.callee && importer.callee.name !== "require")) {
return;
}
if (importer.type === "ImportDeclaration" && (importer.importKind === "type" || importer.specifiers.every((s) => "importKind" in s && s.importKind === "type"))) {
return;
}
const imported = utils_1.ExportMap.get(sourceNode.value, context);
if (imported == null) {
return;
}
if (imported.path === filename) {
return;
}
const untraversed = [{ mget: () => imported, route: [] }];
function detectCycle({ mget, route }) {
const m = mget();
if (m == null) {
return;
}
if (traversed.has(m.path)) {
return;
}
traversed.add(m.path);
for (const [path, { getter, declarations }] of m.imports) {
if (traversed.has(path)) {
continue;
}
const toTraverse = [...declarations].filter(({ source, isOnlyImportingTypes }) => !ignoreModule(source.value) && !isOnlyImportingTypes);
if (options.allowUnsafeDynamicCyclicDependency && toTraverse.some((d) => d.dynamic)) {
return;
}
if (path === filename && toTraverse.length > 0) {
return true;
}
if (route.length + 1 < maxDepth) {
for (const { source } of toTraverse) {
untraversed.push({ mget: getter, route: [...route, source] });
}
}
}
}
while (untraversed.length > 0) {
const next = untraversed.shift();
if (detectCycle(next)) {
context.report({
node: importer,
messageId: "cycle",
data: {
source: next.route.length > 0 ? `via ${routeString(next.route)}` : "detected."
}
});
return;
}
}
}, context.options[0])), { "Program:exit"() {
traversed.clear();
} });
}
});
}
});
// ../../node_modules/.pnpm/eslint-plugin-import-x@0.4.4_patch_hash=4oryti2zfrehz2qi62zyaaa334_eslint@9.4.0_typescript@5.4.5/node_modules/eslint-plugin-import-x/lib/rules/no-default-export.js
var require_no_default_export = __commonJS({
"../../node_modules/.pnpm/eslint-plugin-import-x@0.4.4_patch_hash=4oryti2zfrehz2qi62zyaaa334_eslint@9.4.0_typescript@5.4.5/node_modules/eslint-plugin-import-x/lib/rules/no-default-export.js"(exports, module) {
"use strict";
init_shims();
var eslint_compat_utils_1 = require_dist();
var utils_1 = require_utils2();
module.exports = (0, utils_1.createRule)({
name: "no-default-export",
meta: {
type: "suggestion",
docs: {
category: "Style guide",
description: "Forbid default exports."
},
schema: [],
messages: {
preferNamed: "Prefer named exports.",
noAliasDefault: "Do not alias `{{local}}` as `default`. Just export `{{local}}` itself instead."
}
},
defaultOptions: [],
create(context) {
if (context.parserOptions.sourceType !== "module") {
return {};
}
return {
ExportDefaultDeclaration(node2) {
const { loc } = (0, eslint_compat_utils_1.getSourceCode)(context).getFirstTokens(node2)[1] || {};
context.report({
node: node2,
messageId: "preferNamed",
loc
});
},
ExportNamedDeclaration(node2) {
for (const specifier of node2.specifiers.filter((specifier2) => (specifier2.exported.name || "value" in specifier2.exported && specifier2.exported.value) === "default")) {
const { loc } = (0, eslint_compat_utils_1.getSourceCode)(context).getFirstTokens(node2)[1] || {};
if (specifier.type === "ExportDefaultSpecifier") {
context.report({
node: node2,
messageId: "preferNamed",
loc
});
} else if (specifier.type === "ExportSpecifier") {
context.report({
node: node2,
messageId: "noAliasDefault",
data: {
local: specifier.local.name
},
loc
});
}
}
}
};
}
});
}
});
// ../../node_modules/.pnpm/eslint-plugin-import-x@0.4.4_patch_hash=4oryti2zfrehz2qi62zyaaa334_eslint@9.4.0_typescript@5.4.5/node_modules/eslint-plugin-import-x/lib/rules/no-deprecated.js
var require_no_deprecated = __commonJS({
"../../node_modules/.pnpm/eslint-plugin-import-x@0.4.4_patch_hash=4oryti2zfrehz2qi62zyaaa334_eslint@9.4.0_typescript@5.4.5/node_modules/eslint-plugin-import-x/lib/rules/no-deprecated.js"(exports, module) {
"use strict";
init_shims();
var utils_1 = require_utils2();
function message(deprecation) {
return {
messageId: "deprecated",
data: {
description: deprecation.description ? `: ${deprecation.description}` : "."
}
};
}
function getDeprecation(metadata) {
if (!metadata || !metadata.doc) {
return;
}
return metadata.doc.tags.find((t) => t.title === "deprecated");
}
module.exports = (0, utils_1.createRule)({
name: "no-deprecated",
meta: {
type: "suggestion",
docs: {
category: "Helpful warnings",
description: "Forbid imported names marked with `@deprecated` documentation tag."
},
schema: [],
messages: {
deprecated: "Deprecated{{description}}"
}
},
defaultOptions: [],
create(context) {
const deprecated = /* @__PURE__ */ new Map();
const namespaces = /* @__PURE__ */ new Map();
return {
Program({ body }) {
var _a;
for (const node2 of body) {
if (node2.type !== "ImportDeclaration") {
continue;
}
if (node2.source == null) {
continue;
}
const imports2 = utils_1.ExportMap.get(node2.source.value, context);
if (imports2 == null) {
continue;
}
const moduleDeprecation = (_a = imports2.doc) === null || _a === void 0 ? void 0 : _a.tags.find((t) => t.title === "deprecated");
if (moduleDeprecation) {
context.report(Object.assign({ node: node2 }, message(moduleDeprecation)));
}
if (imports2.errors.length > 0) {
imports2.reportErrors(context, node2);
continue;
}
for (const im of node2.specifiers) {
let imported;
let local;
switch (im.type) {
case "ImportNamespaceSpecifier": {
if (imports2.size === 0) {
continue;
}
namespaces.set(im.local.name, imports2);
continue;
}
case "ImportDefaultSpecifier": {
imported = "default";
local = im.local.name;
break;
}
case "ImportSpecifier": {
imported = im.imported.name;
local = im.local.name;
break;
}
default: {
continue;
}
}
const exported = imports2.get(imported);
if (exported == null) {
continue;
}
if (exported.namespace) {
namespaces.set(local, exported.namespace);
}
const deprecation = getDeprecation(imports2.get(imported));
if (!deprecation) {
continue;
}
context.report(Object.assign({ node: im }, message(deprecation)));
deprecated.set(local, deprecation);
}
}
},
Identifier(node2) {
if (!node2.parent || node2.parent.type === "MemberExpression" && node2.parent.property === node2) {
return;
}
if (node2.parent.type.slice(0, 6) === "Import") {
return;
}
if (!deprecated.has(node2.name)) {
return;
}
if ((0, utils_1.declaredScope)(context, node2, node2.name) !== "module") {
return;
}
context.report(Object.assign({ node: node2 }, message(deprecated.get(node2.name))));
},
MemberExpression(dereference) {
if (dereference.object.type !== "Identifier") {
return;
}
if (!namespaces.has(dereference.object.name)) {
return;
}
if ((0, utils_1.declaredScope)(context, dereference, dereference.object.name) !== "module") {
return;
}
let namespace = namespaces.get(dereference.object.name);
const namepath = [dereference.object.name];
let node2 = dereference;
while (namespace instanceof utils_1.ExportMap && (node2 === null || node2 === void 0 ? void 0 : node2.type) === "MemberExpression") {
if (node2.computed) {
return;
}
const metadata = namespace.get(node2.property.name);
if (!metadata) {
break;
}
const deprecation = getDeprecation(metadata);
if (deprecation) {
context.report(Object.assign({ node: node2.property }, message(deprecation)));
}
namepath.push(node2.property.name);
namespace = metadata.namespace;
node2 = node2.parent;
}
}
};
}
});
}
});
// ../../node_modules/.pnpm/semver@7.6.0/node_modules/semver/internal/constants.js
var require_constants3 = __commonJS({
"../../node_modules/.pnpm/semver@7.6.0/node_modules/semver/internal/constants.js"(exports, module) {
"use strict";
init_shims();
var SEMVER_SPEC_VERSION = "2.0.0";
var MAX_LENGTH = 256;
var MAX_SAFE_INTEGER = Number.MAX_SAFE_INTEGER || /* istanbul ignore next */
9007199254740991;
var MAX_SAFE_COMPONENT_LENGTH = 16;
var MAX_SAFE_BUILD_LENGTH = MAX_LENGTH - 6;
var RELEASE_TYPES = [
"major",
"premajor",
"minor",
"preminor",
"patch",
"prepatch",
"prerelease"
];
module.exports = {
MAX_LENGTH,
MAX_SAFE_COMPONENT_LENGTH,
MAX_SAFE_BUILD_LENGTH,
MAX_SAFE_INTEGER,
RELEASE_TYPES,
SEMVER_SPEC_VERSION,
FLAG_INCLUDE_PRERELEASE: 1,
FLAG_LOOSE: 2
};
}
});
// ../../node_modules/.pnpm/semver@7.6.0/node_modules/semver/internal/debug.js
var require_debug2 = __commonJS({
"../../node_modules/.pnpm/semver@7.6.0/node_modules/semver/internal/debug.js"(exports, module) {
"use strict";
init_shims();
var debug = typeof process === "object" && process.env && process.env.NODE_DEBUG && /\bsemver\b/i.test(process.env.NODE_DEBUG) ? (...args) => console.error("SEMVER", ...args) : () => {
};
module.exports = debug;
}
});
// ../../node_modules/.pnpm/semver@7.6.0/node_modules/semver/internal/re.js
var require_re2 = __commonJS({
"../../node_modules/.pnpm/semver@7.6.0/node_modules/semver/internal/re.js"(exports, module) {
"use strict";
init_shims();
var {
MAX_SAFE_COMPONENT_LENGTH,
MAX_SAFE_BUILD_LENGTH,
MAX_LENGTH
} = require_constants3();
var debug = require_debug2();
exports = module.exports = {};
var re = exports.re = [];
var safeRe = exports.safeRe = [];
var src = exports.src = [];
var t = exports.t = {};
var R = 0;
var LETTERDASHNUMBER = "[a-zA-Z0-9-]";
var safeRegexReplacements = [
["\\s", 1],
["\\d", MAX_LENGTH],
[LETTERDASHNUMBER, MAX_SAFE_BUILD_LENGTH]
];
var makeSafeRegex = (value) => {
for (const [token, max] of safeRegexReplacements) {
value = value.split(`${token}*`).join(`${token}{0,${max}}`).split(`${token}+`).join(`${token}{1,${max}}`);
}
return value;
};
var createToken = (name, value, isGlobal) => {
const safe = makeSafeRegex(value);
const index = R++;
debug(name, index, value);
t[name] = index;
src[index] = value;
re[index] = new RegExp(value, isGlobal ? "g" : void 0);
safeRe[index] = new RegExp(safe, isGlobal ? "g" : void 0);
};
createToken("NUMERICIDENTIFIER", "0|[1-9]\\d*");
createToken("NUMERICIDENTIFIERLOOSE", "\\d+");
createToken("NONNUMERICIDENTIFIER", `\\d*[a-zA-Z-]${LETTERDASHNUMBER}*`);
createToken("MAINVERSION", `(${src[t.NUMERICIDENTIFIER]})\\.(${src[t.NUMERICIDENTIFIER]})\\.(${src[t.NUMERICIDENTIFIER]})`);
createToken("MAINVERSIONLOOSE", `(${src[t.NUMERICIDENTIFIERLOOSE]})\\.(${src[t.NUMERICIDENTIFIERLOOSE]})\\.(${src[t.NUMERICIDENTIFIERLOOSE]})`);
createToken("PRERELEASEIDENTIFIER", `(?:${src[t.NUMERICIDENTIFIER]}|${src[t.NONNUMERICIDENTIFIER]})`);
createToken("PRERELEASEIDENTIFIERLOOSE", `(?:${src[t.NUMERICIDENTIFIERLOOSE]}|${src[t.NONNUMERICIDENTIFIER]})`);
createToken("PRERELEASE", `(?:-(${src[t.PRERELEASEIDENTIFIER]}(?:\\.${src[t.PRERELEASEIDENTIFIER]})*))`);
createToken("PRERELEASELOOSE", `(?:-?(${src[t.PRERELEASEIDENTIFIERLOOSE]}(?:\\.${src[t.PRERELEASEIDENTIFIERLOOSE]})*))`);
createToken("BUILDIDENTIFIER", `${LETTERDASHNUMBER}+`);
createToken("BUILD", `(?:\\+(${src[t.BUILDIDENTIFIER]}(?:\\.${src[t.BUILDIDENTIFIER]})*))`);
createToken("FULLPLAIN", `v?${src[t.MAINVERSION]}${src[t.PRERELEASE]}?${src[t.BUILD]}?`);
createToken("FULL", `^${src[t.FULLPLAIN]}$`);
createToken("LOOSEPLAIN", `[v=\\s]*${src[t.MAINVERSIONLOOSE]}${src[t.PRERELEASELOOSE]}?${src[t.BUILD]}?`);
createToken("LOOSE", `^${src[t.LOOSEPLAIN]}$`);
createToken("GTLT", "((?:<|>)?=?)");
createToken("XRANGEIDENTIFIERLOOSE", `${src[t.NUMERICIDENTIFIERLOOSE]}|x|X|\\*`);
createToken("XRANGEIDENTIFIER", `${src[t.NUMERICIDENTIFIER]}|x|X|\\*`);
createToken("XRANGEPLAIN", `[v=\\s]*(${src[t.XRANGEIDENTIFIER]})(?:\\.(${src[t.XRANGEIDENTIFIER]})(?:\\.(${src[t.XRANGEIDENTIFIER]})(?:${src[t.PRERELEASE]})?${src[t.BUILD]}?)?)?`);
createToken("XRANGEPLAINLOOSE", `[v=\\s]*(${src[t.XRANGEIDENTIFIERLOOSE]})(?:\\.(${src[t.XRANGEIDENTIFIERLOOSE]})(?:\\.(${src[t.XRANGEIDENTIFIERLOOSE]})(?:${src[t.PRERELEASELOOSE]})?${src[t.BUILD]}?)?)?`);
createToken("XRANGE", `^${src[t.GTLT]}\\s*${src[t.XRANGEPLAIN]}$`);
createToken("XRANGELOOSE", `^${src[t.GTLT]}\\s*${src[t.XRANGEPLAINLOOSE]}$`);
createToken("COERCEPLAIN", `${"(^|[^\\d])(\\d{1,"}${MAX_SAFE_COMPONENT_LENGTH}})(?:\\.(\\d{1,${MAX_SAFE_COMPONENT_LENGTH}}))?(?:\\.(\\d{1,${MAX_SAFE_COMPONENT_LENGTH}}))?`);
createToken("COERCE", `${src[t.COERCEPLAIN]}(?:$|[^\\d])`);
createToken("COERCEFULL", src[t.COERCEPLAIN] + `(?:${src[t.PRERELEASE]})?(?:${src[t.BUILD]})?(?:$|[^\\d])`);
createToken("COERCERTL", src[t.COERCE], true);
createToken("COERCERTLFULL", src[t.COERCEFULL], true);
createToken("LONETILDE", "(?:~>?)");
createToken("TILDETRIM", `(\\s*)${src[t.LONETILDE]}\\s+`, true);
exports.tildeTrimReplace = "$1~";
createToken("TILDE", `^${src[t.LONETILDE]}${src[t.XRANGEPLAIN]}$`);
createToken("TILDELOOSE", `^${src[t.LONETILDE]}${src[t.XRANGEPLAINLOOSE]}$`);
createToken("LONECARET", "(?:\\^)");
createToken("CARETTRIM", `(\\s*)${src[t.LONECARET]}\\s+`, true);
exports.caretTrimReplace = "$1^";
createToken("CARET", `^${src[t.LONECARET]}${src[t.XRANGEPLAIN]}$`);
createToken("CARETLOOSE", `^${src[t.LONECARET]}${src[t.XRANGEPLAINLOOSE]}$`);
createToken("COMPARATORLOOSE", `^${src[t.GTLT]}\\s*(${src[t.LOOSEPLAIN]})$|^$`);
createToken("COMPARATOR", `^${src[t.GTLT]}\\s*(${src[t.FULLPLAIN]})$|^$`);
createToken("COMPARATORTRIM", `(\\s*)${src[t.GTLT]}\\s*(${src[t.LOOSEPLAIN]}|${src[t.XRANGEPLAIN]})`, true);
exports.comparatorTrimReplace = "$1$2$3";
createToken("HYPHENRANGE", `^\\s*(${src[t.XRANGEPLAIN]})\\s+-\\s+(${src[t.XRANGEPLAIN]})\\s*$`);
createToken("HYPHENRANGELOOSE", `^\\s*(${src[t.XRANGEPLAINLOOSE]})\\s+-\\s+(${src[t.XRANGEPLAINLOOSE]})\\s*$`);
createToken("STAR", "(<|>)?=?\\s*\\*");
createToken("GTE0", "^\\s*>=\\s*0\\.0\\.0\\s*$");
createToken("GTE0PRE", "^\\s*>=\\s*0\\.0\\.0-0\\s*$");
}
});
// ../../node_modules/.pnpm/semver@7.6.0/node_modules/semver/internal/parse-options.js
var require_parse_options2 = __commonJS({
"../../node_modules/.pnpm/semver@7.6.0/node_modules/semver/internal/parse-options.js"(exports, module) {
"use strict";
init_shims();
var looseOption = Object.freeze({ loose: true });
var emptyOpts = Object.freeze({});
var parseOptions = (options) => {
if (!options) {
return emptyOpts;
}
if (typeof options !== "object") {
return looseOption;
}
return options;
};
module.exports = parseOptions;
}
});
// ../../node_modules/.pnpm/semver@7.6.0/node_modules/semver/internal/identifiers.js
var require_identifiers2 = __commonJS({
"../../node_modules/.pnpm/semver@7.6.0/node_modules/semver/internal/identifiers.js"(exports, module) {
"use strict";
init_shims();
var numeric = /^[0-9]+$/;
var compareIdentifiers = (a, b) => {
const anum = numeric.test(a);
const bnum = numeric.test(b);
if (anum && bnum) {
a = +a;
b = +b;
}
return a === b ? 0 : anum && !bnum ? -1 : bnum && !anum ? 1 : a < b ? -1 : 1;
};
var rcompareIdentifiers = (a, b) => compareIdentifiers(b, a);
module.exports = {
compareIdentifiers,
rcompareIdentifiers
};
}
});
// ../../node_modules/.pnpm/semver@7.6.0/node_modules/semver/classes/semver.js
var require_semver3 = __commonJS({
"../../node_modules/.pnpm/semver@7.6.0/node_modules/semver/classes/semver.js"(exports, module) {
"use strict";
init_shims();
var debug = require_debug2();
var { MAX_LENGTH, MAX_SAFE_INTEGER } = require_constants3();
var { safeRe: re, t } = require_re2();
var parseOptions = require_parse_options2();
var { compareIdentifiers } = require_identifiers2();
var SemVer = class _SemVer {
constructor(version, options) {
options = parseOptions(options);
if (version instanceof _SemVer) {
if (version.loose === !!options.loose && version.includePrerelease === !!options.includePrerelease) {
return version;
} else {
version = version.version;
}
} else if (typeof version !== "string") {
throw new TypeError(`Invalid version. Must be a string. Got type "${typeof version}".`);
}
if (version.length > MAX_LENGTH) {
throw new TypeError(
`version is longer than ${MAX_LENGTH} characters`
);
}
debug("SemVer", version, options);
this.options = options;
this.loose = !!options.loose;
this.includePrerelease = !!options.includePrerelease;
const m = version.trim().match(options.loose ? re[t.LOOSE] : re[t.FULL]);
if (!m) {
throw new TypeError(`Invalid Version: ${version}`);
}
this.raw = version;
this.major = +m[1];
this.minor = +m[2];
this.patch = +m[3];
if (this.major > MAX_SAFE_INTEGER || this.major < 0) {
throw new TypeError("Invalid major version");
}
if (this.minor > MAX_SAFE_INTEGER || this.minor < 0) {
throw new TypeError("Invalid minor version");
}
if (this.patch > MAX_SAFE_INTEGER || this.patch < 0) {
throw new TypeError("Invalid patch version");
}
if (!m[4]) {
this.prerelease = [];
} else {
this.prerelease = m[4].split(".").map((id) => {
if (/^[0-9]+$/.test(id)) {
const num = +id;
if (num >= 0 && num < MAX_SAFE_INTEGER) {
return num;
}
}
return id;
});
}
this.build = m[5] ? m[5].split(".") : [];
this.format();
}
format() {
this.version = `${this.major}.${this.minor}.${this.patch}`;
if (this.prerelease.length) {
this.version += `-${this.prerelease.join(".")}`;
}
return this.version;
}
toString() {
return this.version;
}
compare(other) {
debug("SemVer.compare", this.version, this.options, other);
if (!(other instanceof _SemVer)) {
if (typeof other === "string" && other === this.version) {
return 0;
}
other = new _SemVer(other, this.options);
}
if (other.version === this.version) {
return 0;
}
return this.compareMain(other) || this.comparePre(other);
}
compareMain(other) {
if (!(other instanceof _SemVer)) {
other = new _SemVer(other, this.options);
}
return compareIdentifiers(this.major, other.major) || compareIdentifiers(this.minor, other.minor) || compareIdentifiers(this.patch, other.patch);
}
comparePre(other) {
if (!(other instanceof _SemVer)) {
other = new _SemVer(other, this.options);
}
if (this.prerelease.length && !other.prerelease.length) {
return -1;
} else if (!this.prerelease.length && other.prerelease.length) {
return 1;
} else if (!this.prerelease.length && !other.prerelease.length) {
return 0;
}
let i = 0;
do {
const a = this.prerelease[i];
const b = other.prerelease[i];
debug("prerelease compare", i, a, b);
if (a === void 0 && b === void 0) {
return 0;
} else if (b === void 0) {
return 1;
} else if (a === void 0) {
return -1;
} else if (a === b) {
continue;
} else {
return compareIdentifiers(a, b);
}
} while (++i);
}
compareBuild(other) {
if (!(other instanceof _SemVer)) {
other = new _SemVer(other, this.options);
}
let i = 0;
do {
const a = this.build[i];
const b = other.build[i];
debug("prerelease compare", i, a, b);
if (a === void 0 && b === void 0) {
return 0;
} else if (b === void 0) {
return 1;
} else if (a === void 0) {
return -1;
} else if (a === b) {
continue;
} else {
return compareIdentifiers(a, b);
}
} while (++i);
}
// preminor will bump the version up to the next minor release, and immediately
// down to pre-release. premajor and prepatch work the same way.
inc(release, identifier, identifierBase) {
switch (release) {
case "premajor":
this.prerelease.length = 0;
this.patch = 0;
this.minor = 0;
this.major++;
this.inc("pre", identifier, identifierBase);
break;
case "preminor":
this.prerelease.length = 0;
this.patch = 0;
this.minor++;
this.inc("pre", identifier, identifierBase);
break;
case "prepatch":
this.prerelease.length = 0;
this.inc("patch", identifier, identifierBase);
this.inc("pre", identifier, identifierBase);
break;
case "prerelease":
if (this.prerelease.length === 0) {
this.inc("patch", identifier, identifierBase);
}
this.inc("pre", identifier, identifierBase);
break;
case "major":
if (this.minor !== 0 || this.patch !== 0 || this.prerelease.length === 0) {
this.major++;
}
this.minor = 0;
this.patch = 0;
this.prerelease = [];
break;
case "minor":
if (this.patch !== 0 || this.prerelease.length === 0) {
this.minor++;
}
this.patch = 0;
this.prerelease = [];
break;
case "patch":
if (this.prerelease.length === 0) {
this.patch++;
}
this.prerelease = [];
break;
case "pre": {
const base = Number(identifierBase) ? 1 : 0;
if (!identifier && identifierBase === false) {
throw new Error("invalid increment argument: identifier is empty");
}
if (this.prerelease.length === 0) {
this.prerelease = [base];
} else {
let i = this.prerelease.length;
while (--i >= 0) {
if (typeof this.prerelease[i] === "number") {
this.prerelease[i]++;
i = -2;
}
}
if (i === -1) {
if (identifier === this.prerelease.join(".") && identifierBase === false) {
throw new Error("invalid increment argument: identifier already exists");
}
this.prerelease.push(base);
}
}
if (identifier) {
let prerelease = [identifier, base];
if (identifierBase === false) {
prerelease = [identifier];
}
if (compareIdentifiers(this.prerelease[0], identifier) === 0) {
if (isNaN(this.prerelease[1])) {
this.prerelease = prerelease;
}
} else {
this.prerelease = prerelease;
}
}
break;
}
default:
throw new Error(`invalid increment argument: ${release}`);
}
this.raw = this.format();
if (this.build.length) {
this.raw += `+${this.build.join(".")}`;
}
return this;
}
};
module.exports = SemVer;
}
});
// ../../node_modules/.pnpm/semver@7.6.0/node_modules/semver/functions/parse.js
var require_parse3 = __commonJS({
"../../node_modules/.pnpm/semver@7.6.0/node_modules/semver/functions/parse.js"(exports, module) {
"use strict";
init_shims();
var SemVer = require_semver3();
var parse = (version, options, throwErrors = false) => {
if (version instanceof SemVer) {
return version;
}
try {
return new SemVer(version, options);
} catch (er) {
if (!throwErrors) {
return null;
}
throw er;
}
};
module.exports = parse;
}
});
// ../../node_modules/.pnpm/semver@7.6.0/node_modules/semver/functions/valid.js
var require_valid3 = __commonJS({
"../../node_modules/.pnpm/semver@7.6.0/node_modules/semver/functions/valid.js"(exports, module) {
"use strict";
init_shims();
var parse = require_parse3();
var valid = (version, options) => {
const v = parse(version, options);
return v ? v.version : null;
};
module.exports = valid;
}
});
// ../../node_modules/.pnpm/semver@7.6.0/node_modules/semver/functions/clean.js
var require_clean2 = __commonJS({
"../../node_modules/.pnpm/semver@7.6.0/node_modules/semver/functions/clean.js"(exports, module) {
"use strict";
init_shims();
var parse = require_parse3();
var clean = (version, options) => {
const s = parse(version.trim().replace(/^[=v]+/, ""), options);
return s ? s.version : null;
};
module.exports = clean;
}
});
// ../../node_modules/.pnpm/semver@7.6.0/node_modules/semver/functions/inc.js
var require_inc2 = __commonJS({
"../../node_modules/.pnpm/semver@7.6.0/node_modules/semver/functions/inc.js"(exports, module) {
"use strict";
init_shims();
var SemVer = require_semver3();
var inc = (version, release, options, identifier, identifierBase) => {
if (typeof options === "string") {
identifierBase = identifier;
identifier = options;
options = void 0;
}
try {
return new SemVer(
version instanceof SemVer ? version.version : version,
options
).inc(release, identifier, identifierBase).version;
} catch (er) {
return null;
}
};
module.exports = inc;
}
});
// ../../node_modules/.pnpm/semver@7.6.0/node_modules/semver/functions/diff.js
var require_diff2 = __commonJS({
"../../node_modules/.pnpm/semver@7.6.0/node_modules/semver/functions/diff.js"(exports, module) {
"use strict";
init_shims();
var parse = require_parse3();
var diff = (version1, version2) => {
const v1 = parse(version1, null, true);
const v2 = parse(version2, null, true);
const comparison = v1.compare(v2);
if (comparison === 0) {
return null;
}
const v1Higher = comparison > 0;
const highVersion = v1Higher ? v1 : v2;
const lowVersion = v1Higher ? v2 : v1;
const highHasPre = !!highVersion.prerelease.length;
const lowHasPre = !!lowVersion.prerelease.length;
if (lowHasPre && !highHasPre) {
if (!lowVersion.patch && !lowVersion.minor) {
return "major";
}
if (highVersion.patch) {
return "patch";
}
if (highVersion.minor) {
return "minor";
}
return "major";
}
const prefix = highHasPre ? "pre" : "";
if (v1.major !== v2.major) {
return prefix + "major";
}
if (v1.minor !== v2.minor) {
return prefix + "minor";
}
if (v1.patch !== v2.patch) {
return prefix + "patch";
}
return "prerelease";
};
module.exports = diff;
}
});
// ../../node_modules/.pnpm/semver@7.6.0/node_modules/semver/functions/major.js
var require_major2 = __commonJS({
"../../node_modules/.pnpm/semver@7.6.0/node_modules/semver/functions/major.js"(exports, module) {
"use strict";
init_shims();
var SemVer = require_semver3();
var major = (a, loose) => new SemVer(a, loose).major;
module.exports = major;
}
});
// ../../node_modules/.pnpm/semver@7.6.0/node_modules/semver/functions/minor.js
var require_minor2 = __commonJS({
"../../node_modules/.pnpm/semver@7.6.0/node_modules/semver/functions/minor.js"(exports, module) {
"use strict";
init_shims();
var SemVer = require_semver3();
var minor = (a, loose) => new SemVer(a, loose).minor;
module.exports = minor;
}
});
// ../../node_modules/.pnpm/semver@7.6.0/node_modules/semver/functions/patch.js
var require_patch2 = __commonJS({
"../../node_modules/.pnpm/semver@7.6.0/node_modules/semver/functions/patch.js"(exports, module) {
"use strict";
init_shims();
var SemVer = require_semver3();
var patch = (a, loose) => new SemVer(a, loose).patch;
module.exports = patch;
}
});
// ../../node_modules/.pnpm/semver@7.6.0/node_modules/semver/functions/prerelease.js
var require_prerelease2 = __commonJS({
"../../node_modules/.pnpm/semver@7.6.0/node_modules/semver/functions/prerelease.js"(exports, module) {
"use strict";
init_shims();
var parse = require_parse3();
var prerelease = (version, options) => {
const parsed = parse(version, options);
return parsed && parsed.prerelease.length ? parsed.prerelease : null;
};
module.exports = prerelease;
}
});
// ../../node_modules/.pnpm/semver@7.6.0/node_modules/semver/functions/compare.js
var require_compare2 = __commonJS({
"../../node_modules/.pnpm/semver@7.6.0/node_modules/semver/functions/compare.js"(exports, module) {
"use strict";
init_shims();
var SemVer = require_semver3();
var compare = (a, b, loose) => new SemVer(a, loose).compare(new SemVer(b, loose));
module.exports = compare;
}
});
// ../../node_modules/.pnpm/semver@7.6.0/node_modules/semver/functions/rcompare.js
var require_rcompare2 = __commonJS({
"../../node_modules/.pnpm/semver@7.6.0/node_modules/semver/functions/rcompare.js"(exports, module) {
"use strict";
init_shims();
var compare = require_compare2();
var rcompare = (a, b, loose) => compare(b, a, loose);
module.exports = rcompare;
}
});
// ../../node_modules/.pnpm/semver@7.6.0/node_modules/semver/functions/compare-loose.js
var require_compare_loose2 = __commonJS({
"../../node_modules/.pnpm/semver@7.6.0/node_modules/semver/functions/compare-loose.js"(exports, module) {
"use strict";
init_shims();
var compare = require_compare2();
var compareLoose = (a, b) => compare(a, b, true);
module.exports = compareLoose;
}
});
// ../../node_modules/.pnpm/semver@7.6.0/node_modules/semver/functions/compare-build.js
var require_compare_build2 = __commonJS({
"../../node_modules/.pnpm/semver@7.6.0/node_modules/semver/functions/compare-build.js"(exports, module) {
"use strict";
init_shims();
var SemVer = require_semver3();
var compareBuild = (a, b, loose) => {
const versionA = new SemVer(a, loose);
const versionB = new SemVer(b, loose);
return versionA.compare(versionB) || versionA.compareBuild(versionB);
};
module.exports = compareBuild;
}
});
// ../../node_modules/.pnpm/semver@7.6.0/node_modules/semver/functions/sort.js
var require_sort2 = __commonJS({
"../../node_modules/.pnpm/semver@7.6.0/node_modules/semver/functions/sort.js"(exports, module) {
"use strict";
init_shims();
var compareBuild = require_compare_build2();
var sort = (list, loose) => list.sort((a, b) => compareBuild(a, b, loose));
module.exports = sort;
}
});
// ../../node_modules/.pnpm/semver@7.6.0/node_modules/semver/functions/rsort.js
var require_rsort2 = __commonJS({
"../../node_modules/.pnpm/semver@7.6.0/node_modules/semver/functions/rsort.js"(exports, module) {
"use strict";
init_shims();
var compareBuild = require_compare_build2();
var rsort = (list, loose) => list.sort((a, b) => compareBuild(b, a, loose));
module.exports = rsort;
}
});
// ../../node_modules/.pnpm/semver@7.6.0/node_modules/semver/functions/gt.js
var require_gt2 = __commonJS({
"../../node_modules/.pnpm/semver@7.6.0/node_modules/semver/functions/gt.js"(exports, module) {
"use strict";
init_shims();
var compare = require_compare2();
var gt = (a, b, loose) => compare(a, b, loose) > 0;
module.exports = gt;
}
});
// ../../node_modules/.pnpm/semver@7.6.0/node_modules/semver/functions/lt.js
var require_lt2 = __commonJS({
"../../node_modules/.pnpm/semver@7.6.0/node_modules/semver/functions/lt.js"(exports, module) {
"use strict";
init_shims();
var compare = require_compare2();
var lt = (a, b, loose) => compare(a, b, loose) < 0;
module.exports = lt;
}
});
// ../../node_modules/.pnpm/semver@7.6.0/node_modules/semver/functions/eq.js
var require_eq2 = __commonJS({
"../../node_modules/.pnpm/semver@7.6.0/node_modules/semver/functions/eq.js"(exports, module) {
"use strict";
init_shims();
var compare = require_compare2();
var eq = (a, b, loose) => compare(a, b, loose) === 0;
module.exports = eq;
}
});
// ../../node_modules/.pnpm/semver@7.6.0/node_modules/semver/functions/neq.js
var require_neq2 = __commonJS({
"../../node_modules/.pnpm/semver@7.6.0/node_modules/semver/functions/neq.js"(exports, module) {
"use strict";
init_shims();
var compare = require_compare2();
var neq = (a, b, loose) => compare(a, b, loose) !== 0;
module.exports = neq;
}
});
// ../../node_modules/.pnpm/semver@7.6.0/node_modules/semver/functions/gte.js
var require_gte2 = __commonJS({
"../../node_modules/.pnpm/semver@7.6.0/node_modules/semver/functions/gte.js"(exports, module) {
"use strict";
init_shims();
var compare = require_compare2();
var gte = (a, b, loose) => compare(a, b, loose) >= 0;
module.exports = gte;
}
});
// ../../node_modules/.pnpm/semver@7.6.0/node_modules/semver/functions/lte.js
var require_lte2 = __commonJS({
"../../node_modules/.pnpm/semver@7.6.0/node_modules/semver/functions/lte.js"(exports, module) {
"use strict";
init_shims();
var compare = require_compare2();
var lte = (a, b, loose) => compare(a, b, loose) <= 0;
module.exports = lte;
}
});
// ../../node_modules/.pnpm/semver@7.6.0/node_modules/semver/functions/cmp.js
var require_cmp2 = __commonJS({
"../../node_modules/.pnpm/semver@7.6.0/node_modules/semver/functions/cmp.js"(exports, module) {
"use strict";
init_shims();
var eq = require_eq2();
var neq = require_neq2();
var gt = require_gt2();
var gte = require_gte2();
var lt = require_lt2();
var lte = require_lte2();
var cmp = (a, op, b, loose) => {
switch (op) {
case "===":
if (typeof a === "object") {
a = a.version;
}
if (typeof b === "object") {
b = b.version;
}
return a === b;
case "!==":
if (typeof a === "object") {
a = a.version;
}
if (typeof b === "object") {
b = b.version;
}
return a !== b;
case "":
case "=":
case "==":
return eq(a, b, loose);
case "!=":
return neq(a, b, loose);
case ">":
return gt(a, b, loose);
case ">=":
return gte(a, b, loose);
case "<":
return lt(a, b, loose);
case "<=":
return lte(a, b, loose);
default:
throw new TypeError(`Invalid operator: ${op}`);
}
};
module.exports = cmp;
}
});
// ../../node_modules/.pnpm/semver@7.6.0/node_modules/semver/functions/coerce.js
var require_coerce2 = __commonJS({
"../../node_modules/.pnpm/semver@7.6.0/node_modules/semver/functions/coerce.js"(exports, module) {
"use strict";
init_shims();
var SemVer = require_semver3();
var parse = require_parse3();
var { safeRe: re, t } = require_re2();
var coerce = (version, options) => {
if (version instanceof SemVer) {
return version;
}
if (typeof version === "number") {
version = String(version);
}
if (typeof version !== "string") {
return null;
}
options = options || {};
let match = null;
if (!options.rtl) {
match = version.match(options.includePrerelease ? re[t.COERCEFULL] : re[t.COERCE]);
} else {
const coerceRtlRegex = options.includePrerelease ? re[t.COERCERTLFULL] : re[t.COERCERTL];
let next;
while ((next = coerceRtlRegex.exec(version)) && (!match || match.index + match[0].length !== version.length)) {
if (!match || next.index + next[0].length !== match.index + match[0].length) {
match = next;
}
coerceRtlRegex.lastIndex = next.index + next[1].length + next[2].length;
}
coerceRtlRegex.lastIndex = -1;
}
if (match === null) {
return null;
}
const major = match[2];
const minor = match[3] || "0";
const patch = match[4] || "0";
const prerelease = options.includePrerelease && match[5] ? `-${match[5]}` : "";
const build = options.includePrerelease && match[6] ? `+${match[6]}` : "";
return parse(`${major}.${minor}.${patch}${prerelease}${build}`, options);
};
module.exports = coerce;
}
});
// ../../node_modules/.pnpm/semver@7.6.0/node_modules/semver/classes/range.js
var require_range2 = __commonJS({
"../../node_modules/.pnpm/semver@7.6.0/node_modules/semver/classes/range.js"(exports, module) {
"use strict";
init_shims();
var Range = class _Range {
constructor(range, options) {
options = parseOptions(options);
if (range instanceof _Range) {
if (range.loose === !!options.loose && range.includePrerelease === !!options.includePrerelease) {
return range;
} else {
return new _Range(range.raw, options);
}
}
if (range instanceof Comparator) {
this.raw = range.value;
this.set = [[range]];
this.format();
return this;
}
this.options = options;
this.loose = !!options.loose;
this.includePrerelease = !!options.includePrerelease;
this.raw = range.trim().split(/\s+/).join(" ");
this.set = this.raw.split("||").map((r) => this.parseRange(r.trim())).filter((c) => c.length);
if (!this.set.length) {
throw new TypeError(`Invalid SemVer Range: ${this.raw}`);
}
if (this.set.length > 1) {
const first = this.set[0];
this.set = this.set.filter((c) => !isNullSet(c[0]));
if (this.set.length === 0) {
this.set = [first];
} else if (this.set.length > 1) {
for (const c of this.set) {
if (c.length === 1 && isAny(c[0])) {
this.set = [c];
break;
}
}
}
}
this.format();
}
format() {
this.range = this.set.map((comps) => comps.join(" ").trim()).join("||").trim();
return this.range;
}
toString() {
return this.range;
}
parseRange(range) {
const memoOpts = (this.options.includePrerelease && FLAG_INCLUDE_PRERELEASE) | (this.options.loose && FLAG_LOOSE);
const memoKey = memoOpts + ":" + range;
const cached = cache.get(memoKey);
if (cached) {
return cached;
}
const loose = this.options.loose;
const hr = loose ? re[t.HYPHENRANGELOOSE] : re[t.HYPHENRANGE];
range = range.replace(hr, hyphenReplace(this.options.includePrerelease));
debug("hyphen replace", range);
range = range.replace(re[t.COMPARATORTRIM], comparatorTrimReplace);
debug("comparator trim", range);
range = range.replace(re[t.TILDETRIM], tildeTrimReplace);
debug("tilde trim", range);
range = range.replace(re[t.CARETTRIM], caretTrimReplace);
debug("caret trim", range);
let rangeList = range.split(" ").map((comp) => parseComparator(comp, this.options)).join(" ").split(/\s+/).map((comp) => replaceGTE0(comp, this.options));
if (loose) {
rangeList = rangeList.filter((comp) => {
debug("loose invalid filter", comp, this.options);
return !!comp.match(re[t.COMPARATORLOOSE]);
});
}
debug("range list", rangeList);
const rangeMap = /* @__PURE__ */ new Map();
const comparators = rangeList.map((comp) => new Comparator(comp, this.options));
for (const comp of comparators) {
if (isNullSet(comp)) {
return [comp];
}
rangeMap.set(comp.value, comp);
}
if (rangeMap.size > 1 && rangeMap.has("")) {
rangeMap.delete("");
}
const result = [...rangeMap.values()];
cache.set(memoKey, result);
return result;
}
intersects(range, options) {
if (!(range instanceof _Range)) {
throw new TypeError("a Range is required");
}
return this.set.some((thisComparators) => {
return isSatisfiable(thisComparators, options) && range.set.some((rangeComparators) => {
return isSatisfiable(rangeComparators, options) && thisComparators.every((thisComparator) => {
return rangeComparators.every((rangeComparator) => {
return thisComparator.intersects(rangeComparator, options);
});
});
});
});
}
// if ANY of the sets match ALL of its comparators, then pass
test(version) {
if (!version) {
return false;
}
if (typeof version === "string") {
try {
version = new SemVer(version, this.options);
} catch (er) {
return false;
}
}
for (let i = 0; i < this.set.length; i++) {
if (testSet(this.set[i], version, this.options)) {
return true;
}
}
return false;
}
};
module.exports = Range;
var LRU = require_lru_cache();
var cache = new LRU({ max: 1e3 });
var parseOptions = require_parse_options2();
var Comparator = require_comparator2();
var debug = require_debug2();
var SemVer = require_semver3();
var {
safeRe: re,
t,
comparatorTrimReplace,
tildeTrimReplace,
caretTrimReplace
} = require_re2();
var { FLAG_INCLUDE_PRERELEASE, FLAG_LOOSE } = require_constants3();
var isNullSet = (c) => c.value === "<0.0.0-0";
var isAny = (c) => c.value === "";
var isSatisfiable = (comparators, options) => {
let result = true;
const remainingComparators = comparators.slice();
let testComparator = remainingComparators.pop();
while (result && remainingComparators.length) {
result = remainingComparators.every((otherComparator) => {
return testComparator.intersects(otherComparator, options);
});
testComparator = remainingComparators.pop();
}
return result;
};
var parseComparator = (comp, options) => {
debug("comp", comp, options);
comp = replaceCarets(comp, options);
debug("caret", comp);
comp = replaceTildes(comp, options);
debug("tildes", comp);
comp = replaceXRanges(comp, options);
debug("xrange", comp);
comp = replaceStars(comp, options);
debug("stars", comp);
return comp;
};
var isX = (id) => !id || id.toLowerCase() === "x" || id === "*";
var replaceTildes = (comp, options) => {
return comp.trim().split(/\s+/).map((c) => replaceTilde(c, options)).join(" ");
};
var replaceTilde = (comp, options) => {
const r = options.loose ? re[t.TILDELOOSE] : re[t.TILDE];
return comp.replace(r, (_, M, m, p, pr) => {
debug("tilde", comp, _, M, m, p, pr);
let ret;
if (isX(M)) {
ret = "";
} else if (isX(m)) {
ret = `>=${M}.0.0 <${+M + 1}.0.0-0`;
} else if (isX(p)) {
ret = `>=${M}.${m}.0 <${M}.${+m + 1}.0-0`;
} else if (pr) {
debug("replaceTilde pr", pr);
ret = `>=${M}.${m}.${p}-${pr} <${M}.${+m + 1}.0-0`;
} else {
ret = `>=${M}.${m}.${p} <${M}.${+m + 1}.0-0`;
}
debug("tilde return", ret);
return ret;
});
};
var replaceCarets = (comp, options) => {
return comp.trim().split(/\s+/).map((c) => replaceCaret(c, options)).join(" ");
};
var replaceCaret = (comp, options) => {
debug("caret", comp, options);
const r = options.loose ? re[t.CARETLOOSE] : re[t.CARET];
const z = options.includePrerelease ? "-0" : "";
return comp.replace(r, (_, M, m, p, pr) => {
debug("caret", comp, _, M, m, p, pr);
let ret;
if (isX(M)) {
ret = "";
} else if (isX(m)) {
ret = `>=${M}.0.0${z} <${+M + 1}.0.0-0`;
} else if (isX(p)) {
if (M === "0") {
ret = `>=${M}.${m}.0${z} <${M}.${+m + 1}.0-0`;
} else {
ret = `>=${M}.${m}.0${z} <${+M + 1}.0.0-0`;
}
} else if (pr) {
debug("replaceCaret pr", pr);
if (M === "0") {
if (m === "0") {
ret = `>=${M}.${m}.${p}-${pr} <${M}.${m}.${+p + 1}-0`;
} else {
ret = `>=${M}.${m}.${p}-${pr} <${M}.${+m + 1}.0-0`;
}
} else {
ret = `>=${M}.${m}.${p}-${pr} <${+M + 1}.0.0-0`;
}
} else {
debug("no pr");
if (M === "0") {
if (m === "0") {
ret = `>=${M}.${m}.${p}${z} <${M}.${m}.${+p + 1}-0`;
} else {
ret = `>=${M}.${m}.${p}${z} <${M}.${+m + 1}.0-0`;
}
} else {
ret = `>=${M}.${m}.${p} <${+M + 1}.0.0-0`;
}
}
debug("caret return", ret);
return ret;
});
};
var replaceXRanges = (comp, options) => {
debug("replaceXRanges", comp, options);
return comp.split(/\s+/).map((c) => replaceXRange(c, options)).join(" ");
};
var replaceXRange = (comp, options) => {
comp = comp.trim();
const r = options.loose ? re[t.XRANGELOOSE] : re[t.XRANGE];
return comp.replace(r, (ret, gtlt, M, m, p, pr) => {
debug("xRange", comp, ret, gtlt, M, m, p, pr);
const xM = isX(M);
const xm = xM || isX(m);
const xp = xm || isX(p);
const anyX = xp;
if (gtlt === "=" && anyX) {
gtlt = "";
}
pr = options.includePrerelease ? "-0" : "";
if (xM) {
if (gtlt === ">" || gtlt === "<") {
ret = "<0.0.0-0";
} else {
ret = "*";
}
} else if (gtlt && anyX) {
if (xm) {
m = 0;
}
p = 0;
if (gtlt === ">") {
gtlt = ">=";
if (xm) {
M = +M + 1;
m = 0;
p = 0;
} else {
m = +m + 1;
p = 0;
}
} else if (gtlt === "<=") {
gtlt = "<";
if (xm) {
M = +M + 1;
} else {
m = +m + 1;
}
}
if (gtlt === "<") {
pr = "-0";
}
ret = `${gtlt + M}.${m}.${p}${pr}`;
} else if (xm) {
ret = `>=${M}.0.0${pr} <${+M + 1}.0.0-0`;
} else if (xp) {
ret = `>=${M}.${m}.0${pr} <${M}.${+m + 1}.0-0`;
}
debug("xRange return", ret);
return ret;
});
};
var replaceStars = (comp, options) => {
debug("replaceStars", comp, options);
return comp.trim().replace(re[t.STAR], "");
};
var replaceGTE0 = (comp, options) => {
debug("replaceGTE0", comp, options);
return comp.trim().replace(re[options.includePrerelease ? t.GTE0PRE : t.GTE0], "");
};
var hyphenReplace = (incPr) => ($0, from, fM, fm, fp, fpr, fb, to, tM, tm, tp, tpr, tb) => {
if (isX(fM)) {
from = "";
} else if (isX(fm)) {
from = `>=${fM}.0.0${incPr ? "-0" : ""}`;
} else if (isX(fp)) {
from = `>=${fM}.${fm}.0${incPr ? "-0" : ""}`;
} else if (fpr) {
from = `>=${from}`;
} else {
from = `>=${from}${incPr ? "-0" : ""}`;
}
if (isX(tM)) {
to = "";
} else if (isX(tm)) {
to = `<${+tM + 1}.0.0-0`;
} else if (isX(tp)) {
to = `<${tM}.${+tm + 1}.0-0`;
} else if (tpr) {
to = `<=${tM}.${tm}.${tp}-${tpr}`;
} else if (incPr) {
to = `<${tM}.${tm}.${+tp + 1}-0`;
} else {
to = `<=${to}`;
}
return `${from} ${to}`.trim();
};
var testSet = (set, version, options) => {
for (let i = 0; i < set.length; i++) {
if (!set[i].test(version)) {
return false;
}
}
if (version.prerelease.length && !options.includePrerelease) {
for (let i = 0; i < set.length; i++) {
debug(set[i].semver);
if (set[i].semver === Comparator.ANY) {
continue;
}
if (set[i].semver.prerelease.length > 0) {
const allowed = set[i].semver;
if (allowed.major === version.major && allowed.minor === version.minor && allowed.patch === version.patch) {
return true;
}
}
}
return false;
}
return true;
};
}
});
// ../../node_modules/.pnpm/semver@7.6.0/node_modules/semver/classes/comparator.js
var require_comparator2 = __commonJS({
"../../node_modules/.pnpm/semver@7.6.0/node_modules/semver/classes/comparator.js"(exports, module) {
"use strict";
init_shims();
var ANY = Symbol("SemVer ANY");
var Comparator = class _Comparator {
static get ANY() {
return ANY;
}
constructor(comp, options) {
options = parseOptions(options);
if (comp instanceof _Comparator) {
if (comp.loose === !!options.loose) {
return comp;
} else {
comp = comp.value;
}
}
comp = comp.trim().split(/\s+/).join(" ");
debug("comparator", comp, options);
this.options = options;
this.loose = !!options.loose;
this.parse(comp);
if (this.semver === ANY) {
this.value = "";
} else {
this.value = this.operator + this.semver.version;
}
debug("comp", this);
}
parse(comp) {
const r = this.options.loose ? re[t.COMPARATORLOOSE] : re[t.COMPARATOR];
const m = comp.match(r);
if (!m) {
throw new TypeError(`Invalid comparator: ${comp}`);
}
this.operator = m[1] !== void 0 ? m[1] : "";
if (this.operator === "=") {
this.operator = "";
}
if (!m[2]) {
this.semver = ANY;
} else {
this.semver = new SemVer(m[2], this.options.loose);
}
}
toString() {
return this.value;
}
test(version) {
debug("Comparator.test", version, this.options.loose);
if (this.semver === ANY || version === ANY) {
return true;
}
if (typeof version === "string") {
try {
version = new SemVer(version, this.options);
} catch (er) {
return false;
}
}
return cmp(version, this.operator, this.semver, this.options);
}
intersects(comp, options) {
if (!(comp instanceof _Comparator)) {
throw new TypeError("a Comparator is required");
}
if (this.operator === "") {
if (this.value === "") {
return true;
}
return new Range(comp.value, options).test(this.value);
} else if (comp.operator === "") {
if (comp.value === "") {
return true;
}
return new Range(this.value, options).test(comp.semver);
}
options = parseOptions(options);
if (options.includePrerelease && (this.value === "<0.0.0-0" || comp.value === "<0.0.0-0")) {
return false;
}
if (!options.includePrerelease && (this.value.startsWith("<0.0.0") || comp.value.startsWith("<0.0.0"))) {
return false;
}
if (this.operator.startsWith(">") && comp.operator.startsWith(">")) {
return true;
}
if (this.operator.startsWith("<") && comp.operator.startsWith("<")) {
return true;
}
if (this.semver.version === comp.semver.version && this.operator.includes("=") && comp.operator.includes("=")) {
return true;
}
if (cmp(this.semver, "<", comp.semver, options) && this.operator.startsWith(">") && comp.operator.startsWith("<")) {
return true;
}
if (cmp(this.semver, ">", comp.semver, options) && this.operator.startsWith("<") && comp.operator.startsWith(">")) {
return true;
}
return false;
}
};
module.exports = Comparator;
var parseOptions = require_parse_options2();
var { safeRe: re, t } = require_re2();
var cmp = require_cmp2();
var debug = require_debug2();
var SemVer = require_semver3();
var Range = require_range2();
}
});
// ../../node_modules/.pnpm/semver@7.6.0/node_modules/semver/functions/satisfies.js
var require_satisfies2 = __commonJS({
"../../node_modules/.pnpm/semver@7.6.0/node_modules/semver/functions/satisfies.js"(exports, module) {
"use strict";
init_shims();
var Range = require_range2();
var satisfies = (version, range, options) => {
try {
range = new Range(range, options);
} catch (er) {
return false;
}
return range.test(version);
};
module.exports = satisfies;
}
});
// ../../node_modules/.pnpm/semver@7.6.0/node_modules/semver/ranges/to-comparators.js
var require_to_comparators2 = __commonJS({
"../../node_modules/.pnpm/semver@7.6.0/node_modules/semver/ranges/to-comparators.js"(exports, module) {
"use strict";
init_shims();
var Range = require_range2();
var toComparators = (range, options) => new Range(range, options).set.map((comp) => comp.map((c) => c.value).join(" ").trim().split(" "));
module.exports = toComparators;
}
});
// ../../node_modules/.pnpm/semver@7.6.0/node_modules/semver/ranges/max-satisfying.js
var require_max_satisfying2 = __commonJS({
"../../node_modules/.pnpm/semver@7.6.0/node_modules/semver/ranges/max-satisfying.js"(exports, module) {
"use strict";
init_shims();
var SemVer = require_semver3();
var Range = require_range2();
var maxSatisfying = (versions, range, options) => {
let max = null;
let maxSV = null;
let rangeObj = null;
try {
rangeObj = new Range(range, options);
} catch (er) {
return null;
}
versions.forEach((v) => {
if (rangeObj.test(v)) {
if (!max || maxSV.compare(v) === -1) {
max = v;
maxSV = new SemVer(max, options);
}
}
});
return max;
};
module.exports = maxSatisfying;
}
});
// ../../node_modules/.pnpm/semver@7.6.0/node_modules/semver/ranges/min-satisfying.js
var require_min_satisfying2 = __commonJS({
"../../node_modules/.pnpm/semver@7.6.0/node_modules/semver/ranges/min-satisfying.js"(exports, module) {
"use strict";
init_shims();
var SemVer = require_semver3();
var Range = require_range2();
var minSatisfying = (versions, range, options) => {
let min = null;
let minSV = null;
let rangeObj = null;
try {
rangeObj = new Range(range, options);
} catch (er) {
return null;
}
versions.forEach((v) => {
if (rangeObj.test(v)) {
if (!min || minSV.compare(v) === 1) {
min = v;
minSV = new SemVer(min, options);
}
}
});
return min;
};
module.exports = minSatisfying;
}
});
// ../../node_modules/.pnpm/semver@7.6.0/node_modules/semver/ranges/min-version.js
var require_min_version2 = __commonJS({
"../../node_modules/.pnpm/semver@7.6.0/node_modules/semver/ranges/min-version.js"(exports, module) {
"use strict";
init_shims();
var SemVer = require_semver3();
var Range = require_range2();
var gt = require_gt2();
var minVersion = (range, loose) => {
range = new Range(range, loose);
let minver = new SemVer("0.0.0");
if (range.test(minver)) {
return minver;
}
minver = new SemVer("0.0.0-0");
if (range.test(minver)) {
return minver;
}
minver = null;
for (let i = 0; i < range.set.length; ++i) {
const comparators = range.set[i];
let setMin = null;
comparators.forEach((comparator) => {
const compver = new SemVer(comparator.semver.version);
switch (comparator.operator) {
case ">":
if (compver.prerelease.length === 0) {
compver.patch++;
} else {
compver.prerelease.push(0);
}
compver.raw = compver.format();
case "":
case ">=":
if (!setMin || gt(compver, setMin)) {
setMin = compver;
}
break;
case "<":
case "<=":
break;
default:
throw new Error(`Unexpected operation: ${comparator.operator}`);
}
});
if (setMin && (!minver || gt(minver, setMin))) {
minver = setMin;
}
}
if (minver && range.test(minver)) {
return minver;
}
return null;
};
module.exports = minVersion;
}
});
// ../../node_modules/.pnpm/semver@7.6.0/node_modules/semver/ranges/valid.js
var require_valid4 = __commonJS({
"../../node_modules/.pnpm/semver@7.6.0/node_modules/semver/ranges/valid.js"(exports, module) {
"use strict";
init_shims();
var Range = require_range2();
var validRange = (range, options) => {
try {
return new Range(range, options).range || "*";
} catch (er) {
return null;
}
};
module.exports = validRange;
}
});
// ../../node_modules/.pnpm/semver@7.6.0/node_modules/semver/ranges/outside.js
var require_outside2 = __commonJS({
"../../node_modules/.pnpm/semver@7.6.0/node_modules/semver/ranges/outside.js"(exports, module) {
"use strict";
init_shims();
var SemVer = require_semver3();
var Comparator = require_comparator2();
var { ANY } = Comparator;
var Range = require_range2();
var satisfies = require_satisfies2();
var gt = require_gt2();
var lt = require_lt2();
var lte = require_lte2();
var gte = require_gte2();
var outside = (version, range, hilo, options) => {
version = new SemVer(version, options);
range = new Range(range, options);
let gtfn, ltefn, ltfn, comp, ecomp;
switch (hilo) {
case ">":
gtfn = gt;
ltefn = lte;
ltfn = lt;
comp = ">";
ecomp = ">=";
break;
case "<":
gtfn = lt;
ltefn = gte;
ltfn = gt;
comp = "<";
ecomp = "<=";
break;
default:
throw new TypeError('Must provide a hilo val of "<" or ">"');
}
if (satisfies(version, range, options)) {
return false;
}
for (let i = 0; i < range.set.length; ++i) {
const comparators = range.set[i];
let high = null;
let low = null;
comparators.forEach((comparator) => {
if (comparator.semver === ANY) {
comparator = new Comparator(">=0.0.0");
}
high = high || comparator;
low = low || comparator;
if (gtfn(comparator.semver, high.semver, options)) {
high = comparator;
} else if (ltfn(comparator.semver, low.semver, options)) {
low = comparator;
}
});
if (high.operator === comp || high.operator === ecomp) {
return false;
}
if ((!low.operator || low.operator === comp) && ltefn(version, low.semver)) {
return false;
} else if (low.operator === ecomp && ltfn(version, low.semver)) {
return false;
}
}
return true;
};
module.exports = outside;
}
});
// ../../node_modules/.pnpm/semver@7.6.0/node_modules/semver/ranges/gtr.js
var require_gtr2 = __commonJS({
"../../node_modules/.pnpm/semver@7.6.0/node_modules/semver/ranges/gtr.js"(exports, module) {
"use strict";
init_shims();
var outside = require_outside2();
var gtr = (version, range, options) => outside(version, range, ">", options);
module.exports = gtr;
}
});
// ../../node_modules/.pnpm/semver@7.6.0/node_modules/semver/ranges/ltr.js
var require_ltr2 = __commonJS({
"../../node_modules/.pnpm/semver@7.6.0/node_modules/semver/ranges/ltr.js"(exports, module) {
"use strict";
init_shims();
var outside = require_outside2();
var ltr = (version, range, options) => outside(version, range, "<", options);
module.exports = ltr;
}
});
// ../../node_modules/.pnpm/semver@7.6.0/node_modules/semver/ranges/intersects.js
var require_intersects2 = __commonJS({
"../../node_modules/.pnpm/semver@7.6.0/node_modules/semver/ranges/intersects.js"(exports, module) {
"use strict";
init_shims();
var Range = require_range2();
var intersects = (r1, r2, options) => {
r1 = new Range(r1, options);
r2 = new Range(r2, options);
return r1.intersects(r2, options);
};
module.exports = intersects;
}
});
// ../../node_modules/.pnpm/semver@7.6.0/node_modules/semver/ranges/simplify.js
var require_simplify2 = __commonJS({
"../../node_modules/.pnpm/semver@7.6.0/node_modules/semver/ranges/simplify.js"(exports, module) {
"use strict";
init_shims();
var satisfies = require_satisfies2();
var compare = require_compare2();
module.exports = (versions, range, options) => {
const set = [];
let first = null;
let prev = null;
const v = versions.sort((a, b) => compare(a, b, options));
for (const version of v) {
const included = satisfies(version, range, options);
if (included) {
prev = version;
if (!first) {
first = version;
}
} else {
if (prev) {
set.push([first, prev]);
}
prev = null;
first = null;
}
}
if (first) {
set.push([first, null]);
}
const ranges = [];
for (const [min, max] of set) {
if (min === max) {
ranges.push(min);
} else if (!max && min === v[0]) {
ranges.push("*");
} else if (!max) {
ranges.push(`>=${min}`);
} else if (min === v[0]) {
ranges.push(`<=${max}`);
} else {
ranges.push(`${min} - ${max}`);
}
}
const simplified = ranges.join(" || ");
const original = typeof range.raw === "string" ? range.raw : String(range);
return simplified.length < original.length ? simplified : range;
};
}
});
// ../../node_modules/.pnpm/semver@7.6.0/node_modules/semver/ranges/subset.js
var require_subset2 = __commonJS({
"../../node_modules/.pnpm/semver@7.6.0/node_modules/semver/ranges/subset.js"(exports, module) {
"use strict";
init_shims();
var Range = require_range2();
var Comparator = require_comparator2();
var { ANY } = Comparator;
var satisfies = require_satisfies2();
var compare = require_compare2();
var subset = (sub, dom, options = {}) => {
if (sub === dom) {
return true;
}
sub = new Range(sub, options);
dom = new Range(dom, options);
let sawNonNull = false;
OUTER: for (const simpleSub of sub.set) {
for (const simpleDom of dom.set) {
const isSub = simpleSubset(simpleSub, simpleDom, options);
sawNonNull = sawNonNull || isSub !== null;
if (isSub) {
continue OUTER;
}
}
if (sawNonNull) {
return false;
}
}
return true;
};
var minimumVersionWithPreRelease = [new Comparator(">=0.0.0-0")];
var minimumVersion = [new Comparator(">=0.0.0")];
var simpleSubset = (sub, dom, options) => {
if (sub === dom) {
return true;
}
if (sub.length === 1 && sub[0].semver === ANY) {
if (dom.length === 1 && dom[0].semver === ANY) {
return true;
} else if (options.includePrerelease) {
sub = minimumVersionWithPreRelease;
} else {
sub = minimumVersion;
}
}
if (dom.length === 1 && dom[0].semver === ANY) {
if (options.includePrerelease) {
return true;
} else {
dom = minimumVersion;
}
}
const eqSet = /* @__PURE__ */ new Set();
let gt, lt;
for (const c of sub) {
if (c.operator === ">" || c.operator === ">=") {
gt = higherGT(gt, c, options);
} else if (c.operator === "<" || c.operator === "<=") {
lt = lowerLT(lt, c, options);
} else {
eqSet.add(c.semver);
}
}
if (eqSet.size > 1) {
return null;
}
let gtltComp;
if (gt && lt) {
gtltComp = compare(gt.semver, lt.semver, options);
if (gtltComp > 0) {
return null;
} else if (gtltComp === 0 && (gt.operator !== ">=" || lt.operator !== "<=")) {
return null;
}
}
for (const eq of eqSet) {
if (gt && !satisfies(eq, String(gt), options)) {
return null;
}
if (lt && !satisfies(eq, String(lt), options)) {
return null;
}
for (const c of dom) {
if (!satisfies(eq, String(c), options)) {
return false;
}
}
return true;
}
let higher, lower;
let hasDomLT, hasDomGT;
let needDomLTPre = lt && !options.includePrerelease && lt.semver.prerelease.length ? lt.semver : false;
let needDomGTPre = gt && !options.includePrerelease && gt.semver.prerelease.length ? gt.semver : false;
if (needDomLTPre && needDomLTPre.prerelease.length === 1 && lt.operator === "<" && needDomLTPre.prerelease[0] === 0) {
needDomLTPre = false;
}
for (const c of dom) {
hasDomGT = hasDomGT || c.operator === ">" || c.operator === ">=";
hasDomLT = hasDomLT || c.operator === "<" || c.operator === "<=";
if (gt) {
if (needDomGTPre) {
if (c.semver.prerelease && c.semver.prerelease.length && c.semver.major === needDomGTPre.major && c.semver.minor === needDomGTPre.minor && c.semver.patch === needDomGTPre.patch) {
needDomGTPre = false;
}
}
if (c.operator === ">" || c.operator === ">=") {
higher = higherGT(gt, c, options);
if (higher === c && higher !== gt) {
return false;
}
} else if (gt.operator === ">=" && !satisfies(gt.semver, String(c), options)) {
return false;
}
}
if (lt) {
if (needDomLTPre) {
if (c.semver.prerelease && c.semver.prerelease.length && c.semver.major === needDomLTPre.major && c.semver.minor === needDomLTPre.minor && c.semver.patch === needDomLTPre.patch) {
needDomLTPre = false;
}
}
if (c.operator === "<" || c.operator === "<=") {
lower = lowerLT(lt, c, options);
if (lower === c && lower !== lt) {
return false;
}
} else if (lt.operator === "<=" && !satisfies(lt.semver, String(c), options)) {
return false;
}
}
if (!c.operator && (lt || gt) && gtltComp !== 0) {
return false;
}
}
if (gt && hasDomLT && !lt && gtltComp !== 0) {
return false;
}
if (lt && hasDomGT && !gt && gtltComp !== 0) {
return false;
}
if (needDomGTPre || needDomLTPre) {
return false;
}
return true;
};
var higherGT = (a, b, options) => {
if (!a) {
return b;
}
const comp = compare(a.semver, b.semver, options);
return comp > 0 ? a : comp < 0 ? b : b.operator === ">" && a.operator === ">=" ? b : a;
};
var lowerLT = (a, b, options) => {
if (!a) {
return b;
}
const comp = compare(a.semver, b.semver, options);
return comp < 0 ? a : comp > 0 ? b : b.operator === "<" && a.operator === "<=" ? b : a;
};
module.exports = subset;
}
});
// ../../node_modules/.pnpm/semver@7.6.0/node_modules/semver/index.js
var require_semver4 = __commonJS({
"../../node_modules/.pnpm/semver@7.6.0/node_modules/semver/index.js"(exports, module) {
"use strict";
init_shims();
var internalRe = require_re2();
var constants = require_constants3();
var SemVer = require_semver3();
var identifiers = require_identifiers2();
var parse = require_parse3();
var valid = require_valid3();
var clean = require_clean2();
var inc = require_inc2();
var diff = require_diff2();
var major = require_major2();
var minor = require_minor2();
var patch = require_patch2();
var prerelease = require_prerelease2();
var compare = require_compare2();
var rcompare = require_rcompare2();
var compareLoose = require_compare_loose2();
var compareBuild = require_compare_build2();
var sort = require_sort2();
var rsort = require_rsort2();
var gt = require_gt2();
var lt = require_lt2();
var eq = require_eq2();
var neq = require_neq2();
var gte = require_gte2();
var lte = require_lte2();
var cmp = require_cmp2();
var coerce = require_coerce2();
var Comparator = require_comparator2();
var Range = require_range2();
var satisfies = require_satisfies2();
var toComparators = require_to_comparators2();
var maxSatisfying = require_max_satisfying2();
var minSatisfying = require_min_satisfying2();
var minVersion = require_min_version2();
var validRange = require_valid4();
var outside = require_outside2();
var gtr = require_gtr2();
var ltr = require_ltr2();
var intersects = require_intersects2();
var simplifyRange = require_simplify2();
var subset = require_subset2();
module.exports = {
parse,
valid,
clean,
inc,
diff,
major,
minor,
patch,
prerelease,
compare,
rcompare,
compareLoose,
compareBuild,
sort,
rsort,
gt,
lt,
eq,
neq,
gte,
lte,
cmp,
coerce,
Comparator,
Range,
satisfies,
toComparators,
maxSatisfying,
minSatisfying,
minVersion,
validRange,
outside,
gtr,
ltr,
intersects,
simplifyRange,
subset,
SemVer,
re: internalRe.re,
src: internalRe.src,
tokens: internalRe.t,
SEMVER_SPEC_VERSION: constants.SEMVER_SPEC_VERSION,
RELEASE_TYPES: constants.RELEASE_TYPES,
compareIdentifiers: identifiers.compareIdentifiers,
rcompareIdentifiers: identifiers.rcompareIdentifiers
};
}
});
// ../../node_modules/.pnpm/typescript@5.4.5/node_modules/typescript/package.json
var require_package6 = __commonJS({
"../../node_modules/.pnpm/typescript@5.4.5/node_modules/typescript/package.json"(exports, module) {
module.exports = {
name: "typescript",
author: "Microsoft Corp.",
homepage: "https://www.typescriptlang.org/",
version: "5.4.5",
license: "Apache-2.0",
description: "TypeScript is a language for application scale JavaScript development",
keywords: [
"TypeScript",
"Microsoft",
"compiler",
"language",
"javascript"
],
bugs: {
url: "https://github.com/Microsoft/TypeScript/issues"
},
repository: {
type: "git",
url: "https://github.com/Microsoft/TypeScript.git"
},
main: "./lib/typescript.js",
typings: "./lib/typescript.d.ts",
bin: {
tsc: "./bin/tsc",
tsserver: "./bin/tsserver"
},
engines: {
node: ">=14.17"
},
files: [
"bin",
"lib",
"!lib/enu",
"LICENSE.txt",
"README.md",
"SECURITY.md",
"ThirdPartyNoticeText.txt",
"!**/.gitattributes"
],
devDependencies: {
"@esfx/canceltoken": "^1.0.0",
"@octokit/rest": "^20.0.2",
"@types/chai": "^4.3.11",
"@types/glob": "^8.1.0",
"@types/microsoft__typescript-etw": "^0.1.3",
"@types/minimist": "^1.2.5",
"@types/mocha": "^10.0.6",
"@types/ms": "^0.7.34",
"@types/node": "latest",
"@types/source-map-support": "^0.5.10",
"@types/which": "^3.0.3",
"@typescript-eslint/eslint-plugin": "^6.19.0",
"@typescript-eslint/parser": "^6.19.0",
"@typescript-eslint/utils": "^6.19.0",
"azure-devops-node-api": "^12.3.0",
c8: "^9.1.0",
chai: "^4.4.1",
chalk: "^4.1.2",
chokidar: "^3.5.3",
diff: "^5.1.0",
dprint: "^0.45.0",
esbuild: "^0.20.0",
eslint: "^8.56.0",
"eslint-formatter-autolinkable-stylish": "^1.3.0",
"eslint-plugin-local": "^3.1.0",
"eslint-plugin-no-null": "^1.0.2",
"eslint-plugin-simple-import-sort": "^10.0.0",
"fast-xml-parser": "^4.3.3",
glob: "^10.3.10",
hereby: "^1.8.9",
"jsonc-parser": "^3.2.0",
minimist: "^1.2.8",
mocha: "^10.2.0",
"mocha-fivemat-progress-reporter": "^0.1.0",
ms: "^2.1.3",
"node-fetch": "^3.3.2",
playwright: "^1.41.0",
"source-map-support": "^0.5.21",
tslib: "^2.6.2",
typescript: "5.4.0-dev.20240119",
which: "^3.0.1"
},
overrides: {
"typescript@*": "$typescript"
},
scripts: {
test: "hereby runtests-parallel --light=false",
"test:eslint-rules": "hereby run-eslint-rules-tests",
build: "npm run build:compiler && npm run build:tests",
"build:compiler": "hereby local",
"build:tests": "hereby tests",
"build:tests:notypecheck": "hereby tests --no-typecheck",
clean: "hereby clean",
gulp: "hereby",
lint: "hereby lint",
format: "dprint fmt",
"setup-hooks": "node scripts/link-hooks.mjs"
},
browser: {
fs: false,
os: false,
path: false,
crypto: false,
buffer: false,
"@microsoft/typescript-etw": false,
"source-map-support": false,
inspector: false,
perf_hooks: false
},
packageManager: "npm@8.19.4",
volta: {
node: "20.1.0",
npm: "8.19.4"
}
};
}
});
// ../../node_modules/.pnpm/eslint-plugin-import-x@0.4.4_patch_hash=4oryti2zfrehz2qi62zyaaa334_eslint@9.4.0_typescript@5.4.5/node_modules/eslint-plugin-import-x/lib/rules/no-duplicates.js
var require_no_duplicates = __commonJS({
"../../node_modules/.pnpm/eslint-plugin-import-x@0.4.4_patch_hash=4oryti2zfrehz2qi62zyaaa334_eslint@9.4.0_typescript@5.4.5/node_modules/eslint-plugin-import-x/lib/rules/no-duplicates.js"(exports, module) {
"use strict";
init_shims();
var tslib_1 = (init_tslib_es6(), __toCommonJS(tslib_es6_exports));
var eslint_compat_utils_1 = require_dist();
var semver_1 = tslib_1.__importDefault(require_semver4());
var utils_1 = require_utils2();
var typescriptPkg;
try {
typescriptPkg = require_package6();
} catch (_a) {
}
function checkImports(imported, context) {
for (const [module2, nodes] of imported.entries()) {
if (nodes.length > 1) {
const [first, ...rest] = nodes;
const sourceCode = (0, eslint_compat_utils_1.getSourceCode)(context);
const fix = getFix(first, rest, sourceCode, context);
context.report({
node: first.source,
messageId: "duplicate",
data: {
module: module2
},
fix
});
for (const node2 of rest) {
context.report({
node: node2.source,
messageId: "duplicate",
data: {
module: module2
}
});
}
}
}
}
function getFix(first, rest, sourceCode, context) {
if (typeof sourceCode.getCommentsBefore !== "function") {
return;
}
if (hasProblematicComments(first, sourceCode) || hasNamespace(first)) {
return;
}
const defaultImportNames = new Set([first, ...rest].flatMap((x) => getDefaultImportName(x) || []));
if (defaultImportNames.size > 1) {
return;
}
const restWithoutComments = rest.filter((node2) => !hasProblematicComments(node2, sourceCode) && !hasNamespace(node2));
const specifiers = restWithoutComments.map((node2) => {
const tokens = sourceCode.getTokens(node2);
const openBrace = tokens.find((token) => isPunctuator(token, "{"));
const closeBrace = tokens.find((token) => isPunctuator(token, "}"));
if (openBrace == null || closeBrace == null) {
return;
}
return {
importNode: node2,
identifiers: sourceCode.text.slice(openBrace.range[1], closeBrace.range[0]).split(","),
isEmpty: !hasSpecifiers(node2)
};
}).filter(Boolean);
const unnecessaryImports = restWithoutComments.filter((node2) => !hasSpecifiers(node2) && !hasNamespace(node2) && !specifiers.some((specifier) => "importNode" in specifier && specifier.importNode === node2));
const shouldAddDefault = getDefaultImportName(first) == null && defaultImportNames.size === 1;
const shouldAddSpecifiers = specifiers.length > 0;
const shouldRemoveUnnecessary = unnecessaryImports.length > 0;
if (!(shouldAddDefault || shouldAddSpecifiers || shouldRemoveUnnecessary)) {
return;
}
return (fixer) => {
const tokens = sourceCode.getTokens(first);
const openBrace = tokens.find((token) => isPunctuator(token, "{"));
const closeBrace = tokens.find((token) => isPunctuator(token, "}"));
const firstToken = sourceCode.getFirstToken(first);
const [defaultImportName] = defaultImportNames;
const firstHasTrailingComma = closeBrace != null && isPunctuator(sourceCode.getTokenBefore(closeBrace), ",");
const firstIsEmpty = !hasSpecifiers(first);
const firstExistingIdentifiers = firstIsEmpty ? /* @__PURE__ */ new Set() : new Set(sourceCode.text.slice(openBrace.range[1], closeBrace.range[0]).split(",").map((x) => x.trim()));
const [specifiersText] = specifiers.reduce(([result, needsComma, existingIdentifiers], specifier) => {
const isTypeSpecifier = "importNode" in specifier && specifier.importNode.importKind === "type";
const preferInline = context.options[0] && context.options[0]["prefer-inline"];
if (preferInline && (!typescriptPkg || !semver_1.default.satisfies(typescriptPkg.version, ">= 4.5"))) {
throw new Error("Your version of TypeScript does not support inline type imports.");
}
const [specifierText, updatedExistingIdentifiers] = specifier.identifiers.reduce(([text, set], cur) => {
const trimmed = cur.trim();
const curWithType = trimmed.length > 0 && preferInline && isTypeSpecifier ? `type ${cur}` : cur;
if (existingIdentifiers.has(trimmed)) {
return [text, set];
}
return [
text.length > 0 ? `${text},${curWithType}` : curWithType,
set.add(trimmed)
];
}, ["", existingIdentifiers]);
return [
needsComma && !specifier.isEmpty && specifierText.length > 0 ? `${result},${specifierText}` : `${result}${specifierText}`,
specifier.isEmpty ? needsComma : true,
updatedExistingIdentifiers
];
}, ["", !firstHasTrailingComma && !firstIsEmpty, firstExistingIdentifiers]);
const fixes = [];
if (shouldAddDefault && openBrace == null && shouldAddSpecifiers) {
fixes.push(fixer.insertTextAfter(firstToken, ` ${defaultImportName}, {${specifiersText}} from`));
} else if (shouldAddDefault && openBrace == null && !shouldAddSpecifiers) {
fixes.push(fixer.insertTextAfter(firstToken, ` ${defaultImportName} from`));
} else if (shouldAddDefault && openBrace != null && closeBrace != null) {
fixes.push(fixer.insertTextAfter(firstToken, ` ${defaultImportName},`));
if (shouldAddSpecifiers) {
fixes.push(fixer.insertTextBefore(closeBrace, specifiersText));
}
} else if (!shouldAddDefault && openBrace == null && shouldAddSpecifiers) {
if (first.specifiers.length === 0) {
fixes.push(fixer.insertTextAfter(firstToken, ` {${specifiersText}} from`));
} else {
fixes.push(fixer.insertTextAfter(first.specifiers[0], `, {${specifiersText}}`));
}
} else if (!shouldAddDefault && openBrace != null && closeBrace != null) {
fixes.push(fixer.insertTextBefore(closeBrace, specifiersText));
}
for (const specifier of specifiers) {
const importNode = specifier.importNode;
fixes.push(fixer.remove(importNode));
const charAfterImportRange = [
importNode.range[1],
importNode.range[1] + 1
];
const charAfterImport = sourceCode.text.slice(charAfterImportRange[0], charAfterImportRange[1]);
if (charAfterImport === "\n") {
fixes.push(fixer.removeRange(charAfterImportRange));
}
}
for (const node2 of unnecessaryImports) {
fixes.push(fixer.remove(node2));
const charAfterImportRange = [node2.range[1], node2.range[1] + 1];
const charAfterImport = sourceCode.text.slice(charAfterImportRange[0], charAfterImportRange[1]);
if (charAfterImport === "\n") {
fixes.push(fixer.removeRange(charAfterImportRange));
}
}
return fixes;
};
}
function isPunctuator(node2, value) {
return node2.type === "Punctuator" && node2.value === value;
}
function getDefaultImportName(node2) {
const defaultSpecifier = node2.specifiers.find((specifier) => specifier.type === "ImportDefaultSpecifier");
return defaultSpecifier == null ? void 0 : defaultSpecifier.local.name;
}
function hasNamespace(node2) {
const specifiers = node2.specifiers.filter((specifier) => specifier.type === "ImportNamespaceSpecifier");
return specifiers.length > 0;
}
function hasSpecifiers(node2) {
const specifiers = node2.specifiers.filter((specifier) => specifier.type === "ImportSpecifier");
return specifiers.length > 0;
}
function hasProblematicComments(node2, sourceCode) {
return hasCommentBefore(node2, sourceCode) || hasCommentAfter(node2, sourceCode) || hasCommentInsideNonSpecifiers(node2, sourceCode);
}
function hasCommentBefore(node2, sourceCode) {
return sourceCode.getCommentsBefore(node2).some((comment) => comment.loc.end.line >= node2.loc.start.line - 1);
}
function hasCommentAfter(node2, sourceCode) {
return sourceCode.getCommentsAfter(node2).some((comment) => comment.loc.start.line === node2.loc.end.line);
}
function hasCommentInsideNonSpecifiers(node2, sourceCode) {
const tokens = sourceCode.getTokens(node2);
const openBraceIndex = tokens.findIndex((token) => isPunctuator(token, "{"));
const closeBraceIndex = tokens.findIndex((token) => isPunctuator(token, "}"));
const someTokens = openBraceIndex >= 0 && closeBraceIndex >= 0 ? [
...tokens.slice(1, openBraceIndex + 1),
...tokens.slice(closeBraceIndex + 1)
] : tokens.slice(1);
return someTokens.some((token) => sourceCode.getCommentsBefore(token).length > 0);
}
module.exports = (0, utils_1.createRule)({
name: "no-duplicates",
meta: {
type: "problem",
docs: {
category: "Style guide",
description: "Forbid repeated import of the same module in multiple places."
},
fixable: "code",
schema: [
{
type: "object",
properties: {
considerQueryString: {
type: "boolean"
},
"prefer-inline": {
type: "boolean"
}
},
additionalProperties: false
}
],
messages: {
duplicate: "'{{module}}' imported multiple times."
}
},
defaultOptions: [],
create(context) {
var _a;
const considerQueryStringOption = (_a = context.options[0]) === null || _a === void 0 ? void 0 : _a.considerQueryString;
const defaultResolver = (sourcePath) => (0, utils_1.resolve)(sourcePath, context) || sourcePath;
const resolver = considerQueryStringOption ? (sourcePath) => {
const parts = sourcePath.match(/^([^?]*)\?(.*)$/);
if (!parts) {
return defaultResolver(sourcePath);
}
return `${defaultResolver(parts[1])}?${parts[2]}`;
} : defaultResolver;
const moduleMaps = /* @__PURE__ */ new Map();
function getImportMap(n) {
var _a2;
const parent = n.parent;
if (!moduleMaps.has(parent)) {
moduleMaps.set(parent, {
imported: /* @__PURE__ */ new Map(),
nsImported: /* @__PURE__ */ new Map(),
defaultTypesImported: /* @__PURE__ */ new Map(),
namedTypesImported: /* @__PURE__ */ new Map()
});
}
const map = moduleMaps.get(parent);
const preferInline = (_a2 = context.options[0]) === null || _a2 === void 0 ? void 0 : _a2["prefer-inline"];
if (!preferInline && n.importKind === "type") {
return n.specifiers.length > 0 && n.specifiers[0].type === "ImportDefaultSpecifier" ? map.defaultTypesImported : map.namedTypesImported;
}
if (!preferInline && n.specifiers.some((spec) => "importKind" in spec && spec.importKind === "type")) {
return map.namedTypesImported;
}
return hasNamespace(n) ? map.nsImported : map.imported;
}
return {
ImportDeclaration(n) {
const resolvedPath = resolver(n.source.value);
const importMap = getImportMap(n);
if (importMap.has(resolvedPath)) {
importMap.get(resolvedPath).push(n);
} else {
importMap.set(resolvedPath, [n]);
}
},
"Program:exit"() {
for (const map of moduleMaps.values()) {
checkImports(map.imported, context);
checkImports(map.nsImported, context);
checkImports(map.defaultTypesImported, context);
checkImports(map.namedTypesImported, context);
}
}
};
}
});
}
});
// ../../node_modules/.pnpm/eslint-plugin-import-x@0.4.4_patch_hash=4oryti2zfrehz2qi62zyaaa334_eslint@9.4.0_typescript@5.4.5/node_modules/eslint-plugin-import-x/lib/rules/no-dynamic-require.js
var require_no_dynamic_require = __commonJS({
"../../node_modules/.pnpm/eslint-plugin-import-x@0.4.4_patch_hash=4oryti2zfrehz2qi62zyaaa334_eslint@9.4.0_typescript@5.4.5/node_modules/eslint-plugin-import-x/lib/rules/no-dynamic-require.js"(exports, module) {
"use strict";
init_shims();
var utils_1 = require_utils2();
function isRequire(node2) {
return node2 && node2.callee && node2.callee.type === "Identifier" && node2.callee.name === "require" && node2.arguments.length > 0;
}
function isDynamicImport(node2) {
return node2 && node2.callee && node2.callee.type === "Import";
}
function isStaticValue(node2) {
return node2.type === "Literal" || node2.type === "TemplateLiteral" && node2.expressions.length === 0;
}
module.exports = (0, utils_1.createRule)({
name: "no-dynamic-require",
meta: {
type: "suggestion",
docs: {
category: "Static analysis",
description: "Forbid `require()` calls with expressions."
},
schema: [
{
type: "object",
properties: {
esmodule: {
type: "boolean"
}
},
additionalProperties: false
}
],
messages: {
import: "Calls to import() should use string literals",
require: "Calls to require() should use string literals"
}
},
defaultOptions: [],
create(context) {
const options = context.options[0] || {};
return {
CallExpression(node2) {
if (!node2.arguments[0] || isStaticValue(node2.arguments[0])) {
return;
}
if (isRequire(node2)) {
return context.report({
node: node2,
messageId: "require"
});
}
if (options.esmodule && isDynamicImport(node2)) {
return context.report({
node: node2,
messageId: "import"
});
}
},
ImportExpression(node2) {
if (!options.esmodule || isStaticValue(node2.source)) {
return;
}
return context.report({
node: node2,
messageId: "import"
});
}
};
}
});
}
});
// ../../node_modules/.pnpm/eslint-plugin-import-x@0.4.4_patch_hash=4oryti2zfrehz2qi62zyaaa334_eslint@9.4.0_typescript@5.4.5/node_modules/eslint-plugin-import-x/lib/rules/no-empty-named-blocks.js
var require_no_empty_named_blocks = __commonJS({
"../../node_modules/.pnpm/eslint-plugin-import-x@0.4.4_patch_hash=4oryti2zfrehz2qi62zyaaa334_eslint@9.4.0_typescript@5.4.5/node_modules/eslint-plugin-import-x/lib/rules/no-empty-named-blocks.js"(exports, module) {
"use strict";
init_shims();
var eslint_compat_utils_1 = require_dist();
var utils_1 = require_utils2();
function getEmptyBlockRange(tokens, index) {
const token = tokens[index];
const nextToken = tokens[index + 1];
const prevToken = tokens[index - 1];
let start = token.range[0];
const end = nextToken.range[1];
if (prevToken.value === "," || prevToken.value === "type" || prevToken.value === "typeof") {
start = prevToken.range[0];
}
return [start, end];
}
module.exports = (0, utils_1.createRule)({
name: "no-empty-named-blocks",
meta: {
type: "suggestion",
docs: {
category: "Helpful warnings",
description: "Forbid empty named import blocks."
},
fixable: "code",
hasSuggestions: true,
schema: [],
messages: {
emptyNamed: "Unexpected empty named import block",
unused: "Remove unused import",
emptyImport: "Remove empty import block"
}
},
defaultOptions: [],
create(context) {
const importsWithoutNameds = [];
return {
ImportDeclaration(node2) {
if (!node2.specifiers.some((x) => x.type === "ImportSpecifier")) {
importsWithoutNameds.push(node2);
}
},
"Program:exit"(program) {
const importsTokens = importsWithoutNameds.map((node2) => [
node2,
program.tokens.filter((x) => x.range[0] >= node2.range[0] && x.range[1] <= node2.range[1])
]);
const pTokens = program.tokens || [];
for (const [node2, tokens] of importsTokens) {
for (const token of tokens) {
const idx = pTokens.indexOf(token);
const nextToken = pTokens[idx + 1];
if (nextToken && token.value === "{" && nextToken.value === "}") {
const hasOtherIdentifiers = tokens.some((token2) => token2.type === "Identifier" && token2.value !== "from" && token2.value !== "type" && token2.value !== "typeof");
if (hasOtherIdentifiers) {
context.report({
node: node2,
messageId: "emptyNamed",
fix(fixer) {
return fixer.removeRange(getEmptyBlockRange(pTokens, idx));
}
});
} else {
context.report({
node: node2,
messageId: "emptyNamed",
suggest: [
{
messageId: "unused",
fix(fixer) {
return fixer.remove(node2);
}
},
{
messageId: "emptyImport",
fix(fixer) {
const sourceCode = (0, eslint_compat_utils_1.getSourceCode)(context);
const fromToken = pTokens.find((t) => t.value === "from");
const importToken = pTokens.find((t) => t.value === "import");
const hasSpaceAfterFrom = sourceCode.isSpaceBetween(fromToken, sourceCode.getTokenAfter(fromToken));
const hasSpaceAfterImport = sourceCode.isSpaceBetween(importToken, sourceCode.getTokenAfter(fromToken));
const [start] = getEmptyBlockRange(pTokens, idx);
const [, end] = fromToken.range;
const range = [
start,
hasSpaceAfterFrom ? end + 1 : end
];
return fixer.replaceTextRange(range, hasSpaceAfterImport ? "" : " ");
}
}
]
});
}
}
}
}
}
};
}
});
}
});
// ../../node_modules/.pnpm/balanced-match@1.0.2/node_modules/balanced-match/index.js
var require_balanced_match = __commonJS({
"../../node_modules/.pnpm/balanced-match@1.0.2/node_modules/balanced-match/index.js"(exports, module) {
"use strict";
init_shims();
module.exports = balanced;
function balanced(a, b, str) {
if (a instanceof RegExp) a = maybeMatch(a, str);
if (b instanceof RegExp) b = maybeMatch(b, str);
var r = range(a, b, str);
return r && {
start: r[0],
end: r[1],
pre: str.slice(0, r[0]),
body: str.slice(r[0] + a.length, r[1]),
post: str.slice(r[1] + b.length)
};
}
function maybeMatch(reg, str) {
var m = str.match(reg);
return m ? m[0] : null;
}
balanced.range = range;
function range(a, b, str) {
var begs, beg, left, right, result;
var ai = str.indexOf(a);
var bi = str.indexOf(b, ai + 1);
var i = ai;
if (ai >= 0 && bi > 0) {
if (a === b) {
return [ai, bi];
}
begs = [];
left = str.length;
while (i >= 0 && !result) {
if (i == ai) {
begs.push(i);
ai = str.indexOf(a, i + 1);
} else if (begs.length == 1) {
result = [begs.pop(), bi];
} else {
beg = begs.pop();
if (beg < left) {
left = beg;
right = bi;
}
bi = str.indexOf(b, i + 1);
}
i = ai < bi && ai >= 0 ? ai : bi;
}
if (begs.length) {
result = [left, right];
}
}
return result;
}
}
});
// ../../node_modules/.pnpm/brace-expansion@2.0.1/node_modules/brace-expansion/index.js
var require_brace_expansion = __commonJS({
"../../node_modules/.pnpm/brace-expansion@2.0.1/node_modules/brace-expansion/index.js"(exports, module) {
"use strict";
init_shims();
var balanced = require_balanced_match();
module.exports = expandTop;
var escSlash = "\0SLASH" + Math.random() + "\0";
var escOpen = "\0OPEN" + Math.random() + "\0";
var escClose = "\0CLOSE" + Math.random() + "\0";
var escComma = "\0COMMA" + Math.random() + "\0";
var escPeriod = "\0PERIOD" + Math.random() + "\0";
function numeric(str) {
return parseInt(str, 10) == str ? parseInt(str, 10) : str.charCodeAt(0);
}
function escapeBraces(str) {
return str.split("\\\\").join(escSlash).split("\\{").join(escOpen).split("\\}").join(escClose).split("\\,").join(escComma).split("\\.").join(escPeriod);
}
function unescapeBraces(str) {
return str.split(escSlash).join("\\").split(escOpen).join("{").split(escClose).join("}").split(escComma).join(",").split(escPeriod).join(".");
}
function parseCommaParts(str) {
if (!str)
return [""];
var parts = [];
var m = balanced("{", "}", str);
if (!m)
return str.split(",");
var pre = m.pre;
var body = m.body;
var post = m.post;
var p = pre.split(",");
p[p.length - 1] += "{" + body + "}";
var postParts = parseCommaParts(post);
if (post.length) {
p[p.length - 1] += postParts.shift();
p.push.apply(p, postParts);
}
parts.push.apply(parts, p);
return parts;
}
function expandTop(str) {
if (!str)
return [];
if (str.substr(0, 2) === "{}") {
str = "\\{\\}" + str.substr(2);
}
return expand(escapeBraces(str), true).map(unescapeBraces);
}
function embrace(str) {
return "{" + str + "}";
}
function isPadded(el) {
return /^-?0\d/.test(el);
}
function lte(i, y) {
return i <= y;
}
function gte(i, y) {
return i >= y;
}
function expand(str, isTop) {
var expansions = [];
var m = balanced("{", "}", str);
if (!m) return [str];
var pre = m.pre;
var post = m.post.length ? expand(m.post, false) : [""];
if (/\$$/.test(m.pre)) {
for (var k = 0; k < post.length; k++) {
var expansion = pre + "{" + m.body + "}" + post[k];
expansions.push(expansion);
}
} else {
var isNumericSequence = /^-?\d+\.\.-?\d+(?:\.\.-?\d+)?$/.test(m.body);
var isAlphaSequence = /^[a-zA-Z]\.\.[a-zA-Z](?:\.\.-?\d+)?$/.test(m.body);
var isSequence = isNumericSequence || isAlphaSequence;
var isOptions = m.body.indexOf(",") >= 0;
if (!isSequence && !isOptions) {
if (m.post.match(/,.*\}/)) {
str = m.pre + "{" + m.body + escClose + m.post;
return expand(str);
}
return [str];
}
var n;
if (isSequence) {
n = m.body.split(/\.\./);
} else {
n = parseCommaParts(m.body);
if (n.length === 1) {
n = expand(n[0], false).map(embrace);
if (n.length === 1) {
return post.map(function(p) {
return m.pre + n[0] + p;
});
}
}
}
var N;
if (isSequence) {
var x = numeric(n[0]);
var y = numeric(n[1]);
var width = Math.max(n[0].length, n[1].length);
var incr = n.length == 3 ? Math.abs(numeric(n[2])) : 1;
var test2 = lte;
var reverse = y < x;
if (reverse) {
incr *= -1;
test2 = gte;
}
var pad = n.some(isPadded);
N = [];
for (var i = x; test2(i, y); i += incr) {
var c;
if (isAlphaSequence) {
c = String.fromCharCode(i);
if (c === "\\")
c = "";
} else {
c = String(i);
if (pad) {
var need = width - c.length;
if (need > 0) {
var z = new Array(need + 1).join("0");
if (i < 0)
c = "-" + z + c.slice(1);
else
c = z + c;
}
}
}
N.push(c);
}
} else {
N = [];
for (var j = 0; j < n.length; j++) {
N.push.apply(N, expand(n[j], false));
}
}
for (var j = 0; j < N.length; j++) {
for (var k = 0; k < post.length; k++) {
var expansion = pre + N[j] + post[k];
if (!isTop || isSequence || expansion)
expansions.push(expansion);
}
}
}
return expansions;
}
}
});
// ../../node_modules/.pnpm/minimatch@9.0.3/node_modules/minimatch/dist/cjs/assert-valid-pattern.js
var require_assert_valid_pattern = __commonJS({
"../../node_modules/.pnpm/minimatch@9.0.3/node_modules/minimatch/dist/cjs/assert-valid-pattern.js"(exports) {
"use strict";
init_shims();
Object.defineProperty(exports, "__esModule", { value: true });
exports.assertValidPattern = void 0;
var MAX_PATTERN_LENGTH = 1024 * 64;
var assertValidPattern = (pattern) => {
if (typeof pattern !== "string") {
throw new TypeError("invalid pattern");
}
if (pattern.length > MAX_PATTERN_LENGTH) {
throw new TypeError("pattern is too long");
}
};
exports.assertValidPattern = assertValidPattern;
}
});
// ../../node_modules/.pnpm/minimatch@9.0.3/node_modules/minimatch/dist/cjs/brace-expressions.js
var require_brace_expressions = __commonJS({
"../../node_modules/.pnpm/minimatch@9.0.3/node_modules/minimatch/dist/cjs/brace-expressions.js"(exports) {
"use strict";
init_shims();
Object.defineProperty(exports, "__esModule", { value: true });
exports.parseClass = void 0;
var posixClasses = {
"[:alnum:]": ["\\p{L}\\p{Nl}\\p{Nd}", true],
"[:alpha:]": ["\\p{L}\\p{Nl}", true],
"[:ascii:]": ["\\x00-\\x7f", false],
"[:blank:]": ["\\p{Zs}\\t", true],
"[:cntrl:]": ["\\p{Cc}", true],
"[:digit:]": ["\\p{Nd}", true],
"[:graph:]": ["\\p{Z}\\p{C}", true, true],
"[:lower:]": ["\\p{Ll}", true],
"[:print:]": ["\\p{C}", true],
"[:punct:]": ["\\p{P}", true],
"[:space:]": ["\\p{Z}\\t\\r\\n\\v\\f", true],
"[:upper:]": ["\\p{Lu}", true],
"[:word:]": ["\\p{L}\\p{Nl}\\p{Nd}\\p{Pc}", true],
"[:xdigit:]": ["A-Fa-f0-9", false]
};
var braceEscape = (s) => s.replace(/[[\]\\-]/g, "\\$&");
var regexpEscape = (s) => s.replace(/[-[\]{}()*+?.,\\^$|#\s]/g, "\\$&");
var rangesToString = (ranges) => ranges.join("");
var parseClass = (glob, position) => {
const pos = position;
if (glob.charAt(pos) !== "[") {
throw new Error("not in a brace expression");
}
const ranges = [];
const negs = [];
let i = pos + 1;
let sawStart = false;
let uflag = false;
let escaping = false;
let negate = false;
let endPos = pos;
let rangeStart = "";
WHILE: while (i < glob.length) {
const c = glob.charAt(i);
if ((c === "!" || c === "^") && i === pos + 1) {
negate = true;
i++;
continue;
}
if (c === "]" && sawStart && !escaping) {
endPos = i + 1;
break;
}
sawStart = true;
if (c === "\\") {
if (!escaping) {
escaping = true;
i++;
continue;
}
}
if (c === "[" && !escaping) {
for (const [cls, [unip, u, neg]] of Object.entries(posixClasses)) {
if (glob.startsWith(cls, i)) {
if (rangeStart) {
return ["$.", false, glob.length - pos, true];
}
i += cls.length;
if (neg)
negs.push(unip);
else
ranges.push(unip);
uflag = uflag || u;
continue WHILE;
}
}
}
escaping = false;
if (rangeStart) {
if (c > rangeStart) {
ranges.push(braceEscape(rangeStart) + "-" + braceEscape(c));
} else if (c === rangeStart) {
ranges.push(braceEscape(c));
}
rangeStart = "";
i++;
continue;
}
if (glob.startsWith("-]", i + 1)) {
ranges.push(braceEscape(c + "-"));
i += 2;
continue;
}
if (glob.startsWith("-", i + 1)) {
rangeStart = c;
i += 2;
continue;
}
ranges.push(braceEscape(c));
i++;
}
if (endPos < i) {
return ["", false, 0, false];
}
if (!ranges.length && !negs.length) {
return ["$.", false, glob.length - pos, true];
}
if (negs.length === 0 && ranges.length === 1 && /^\\?.$/.test(ranges[0]) && !negate) {
const r = ranges[0].length === 2 ? ranges[0].slice(-1) : ranges[0];
return [regexpEscape(r), false, endPos - pos, false];
}
const sranges = "[" + (negate ? "^" : "") + rangesToString(ranges) + "]";
const snegs = "[" + (negate ? "" : "^") + rangesToString(negs) + "]";
const comb = ranges.length && negs.length ? "(" + sranges + "|" + snegs + ")" : ranges.length ? sranges : snegs;
return [comb, uflag, endPos - pos, true];
};
exports.parseClass = parseClass;
}
});
// ../../node_modules/.pnpm/minimatch@9.0.3/node_modules/minimatch/dist/cjs/unescape.js
var require_unescape = __commonJS({
"../../node_modules/.pnpm/minimatch@9.0.3/node_modules/minimatch/dist/cjs/unescape.js"(exports) {
"use strict";
init_shims();
Object.defineProperty(exports, "__esModule", { value: true });
exports.unescape = void 0;
var unescape2 = (s, { windowsPathsNoEscape = false } = {}) => {
return windowsPathsNoEscape ? s.replace(/\[([^\/\\])\]/g, "$1") : s.replace(/((?!\\).|^)\[([^\/\\])\]/g, "$1$2").replace(/\\([^\/])/g, "$1");
};
exports.unescape = unescape2;
}
});
// ../../node_modules/.pnpm/minimatch@9.0.3/node_modules/minimatch/dist/cjs/ast.js
var require_ast2 = __commonJS({
"../../node_modules/.pnpm/minimatch@9.0.3/node_modules/minimatch/dist/cjs/ast.js"(exports) {
"use strict";
init_shims();
Object.defineProperty(exports, "__esModule", { value: true });
exports.AST = void 0;
var brace_expressions_js_1 = require_brace_expressions();
var unescape_js_1 = require_unescape();
var types = /* @__PURE__ */ new Set(["!", "?", "+", "*", "@"]);
var isExtglobType = (c) => types.has(c);
var startNoTraversal = "(?!(?:^|/)\\.\\.?(?:$|/))";
var startNoDot = "(?!\\.)";
var addPatternStart = /* @__PURE__ */ new Set(["[", "."]);
var justDots = /* @__PURE__ */ new Set(["..", "."]);
var reSpecials = new Set("().*{}+?[]^$\\!");
var regExpEscape = (s) => s.replace(/[-[\]{}()*+?.,\\^$|#\s]/g, "\\$&");
var qmark = "[^/]";
var star = qmark + "*?";
var starNoEmpty = qmark + "+?";
var AST = class _AST {
type;
#root;
#hasMagic;
#uflag = false;
#parts = [];
#parent;
#parentIndex;
#negs;
#filledNegs = false;
#options;
#toString;
// set to true if it's an extglob with no children
// (which really means one child of '')
#emptyExt = false;
constructor(type, parent, options = {}) {
this.type = type;
if (type)
this.#hasMagic = true;
this.#parent = parent;
this.#root = this.#parent ? this.#parent.#root : this;
this.#options = this.#root === this ? options : this.#root.#options;
this.#negs = this.#root === this ? [] : this.#root.#negs;
if (type === "!" && !this.#root.#filledNegs)
this.#negs.push(this);
this.#parentIndex = this.#parent ? this.#parent.#parts.length : 0;
}
get hasMagic() {
if (this.#hasMagic !== void 0)
return this.#hasMagic;
for (const p of this.#parts) {
if (typeof p === "string")
continue;
if (p.type || p.hasMagic)
return this.#hasMagic = true;
}
return this.#hasMagic;
}
// reconstructs the pattern
toString() {
if (this.#toString !== void 0)
return this.#toString;
if (!this.type) {
return this.#toString = this.#parts.map((p) => String(p)).join("");
} else {
return this.#toString = this.type + "(" + this.#parts.map((p) => String(p)).join("|") + ")";
}
}
#fillNegs() {
if (this !== this.#root)
throw new Error("should only call on root");
if (this.#filledNegs)
return this;
this.toString();
this.#filledNegs = true;
let n;
while (n = this.#negs.pop()) {
if (n.type !== "!")
continue;
let p = n;
let pp = p.#parent;
while (pp) {
for (let i = p.#parentIndex + 1; !pp.type && i < pp.#parts.length; i++) {
for (const part of n.#parts) {
if (typeof part === "string") {
throw new Error("string part in extglob AST??");
}
part.copyIn(pp.#parts[i]);
}
}
p = pp;
pp = p.#parent;
}
}
return this;
}
push(...parts) {
for (const p of parts) {
if (p === "")
continue;
if (typeof p !== "string" && !(p instanceof _AST && p.#parent === this)) {
throw new Error("invalid part: " + p);
}
this.#parts.push(p);
}
}
toJSON() {
const ret = this.type === null ? this.#parts.slice().map((p) => typeof p === "string" ? p : p.toJSON()) : [this.type, ...this.#parts.map((p) => p.toJSON())];
if (this.isStart() && !this.type)
ret.unshift([]);
if (this.isEnd() && (this === this.#root || this.#root.#filledNegs && this.#parent?.type === "!")) {
ret.push({});
}
return ret;
}
isStart() {
if (this.#root === this)
return true;
if (!this.#parent?.isStart())
return false;
if (this.#parentIndex === 0)
return true;
const p = this.#parent;
for (let i = 0; i < this.#parentIndex; i++) {
const pp = p.#parts[i];
if (!(pp instanceof _AST && pp.type === "!")) {
return false;
}
}
return true;
}
isEnd() {
if (this.#root === this)
return true;
if (this.#parent?.type === "!")
return true;
if (!this.#parent?.isEnd())
return false;
if (!this.type)
return this.#parent?.isEnd();
const pl = this.#parent ? this.#parent.#parts.length : 0;
return this.#parentIndex === pl - 1;
}
copyIn(part) {
if (typeof part === "string")
this.push(part);
else
this.push(part.clone(this));
}
clone(parent) {
const c = new _AST(this.type, parent);
for (const p of this.#parts) {
c.copyIn(p);
}
return c;
}
static #parseAST(str, ast, pos, opt) {
let escaping = false;
let inBrace = false;
let braceStart = -1;
let braceNeg = false;
if (ast.type === null) {
let i2 = pos;
let acc2 = "";
while (i2 < str.length) {
const c = str.charAt(i2++);
if (escaping || c === "\\") {
escaping = !escaping;
acc2 += c;
continue;
}
if (inBrace) {
if (i2 === braceStart + 1) {
if (c === "^" || c === "!") {
braceNeg = true;
}
} else if (c === "]" && !(i2 === braceStart + 2 && braceNeg)) {
inBrace = false;
}
acc2 += c;
continue;
} else if (c === "[") {
inBrace = true;
braceStart = i2;
braceNeg = false;
acc2 += c;
continue;
}
if (!opt.noext && isExtglobType(c) && str.charAt(i2) === "(") {
ast.push(acc2);
acc2 = "";
const ext = new _AST(c, ast);
i2 = _AST.#parseAST(str, ext, i2, opt);
ast.push(ext);
continue;
}
acc2 += c;
}
ast.push(acc2);
return i2;
}
let i = pos + 1;
let part = new _AST(null, ast);
const parts = [];
let acc = "";
while (i < str.length) {
const c = str.charAt(i++);
if (escaping || c === "\\") {
escaping = !escaping;
acc += c;
continue;
}
if (inBrace) {
if (i === braceStart + 1) {
if (c === "^" || c === "!") {
braceNeg = true;
}
} else if (c === "]" && !(i === braceStart + 2 && braceNeg)) {
inBrace = false;
}
acc += c;
continue;
} else if (c === "[") {
inBrace = true;
braceStart = i;
braceNeg = false;
acc += c;
continue;
}
if (isExtglobType(c) && str.charAt(i) === "(") {
part.push(acc);
acc = "";
const ext = new _AST(c, part);
part.push(ext);
i = _AST.#parseAST(str, ext, i, opt);
continue;
}
if (c === "|") {
part.push(acc);
acc = "";
parts.push(part);
part = new _AST(null, ast);
continue;
}
if (c === ")") {
if (acc === "" && ast.#parts.length === 0) {
ast.#emptyExt = true;
}
part.push(acc);
acc = "";
ast.push(...parts, part);
return i;
}
acc += c;
}
ast.type = null;
ast.#hasMagic = void 0;
ast.#parts = [str.substring(pos - 1)];
return i;
}
static fromGlob(pattern, options = {}) {
const ast = new _AST(null, void 0, options);
_AST.#parseAST(pattern, ast, 0, options);
return ast;
}
// returns the regular expression if there's magic, or the unescaped
// string if not.
toMMPattern() {
if (this !== this.#root)
return this.#root.toMMPattern();
const glob = this.toString();
const [re, body, hasMagic, uflag] = this.toRegExpSource();
const anyMagic = hasMagic || this.#hasMagic || this.#options.nocase && !this.#options.nocaseMagicOnly && glob.toUpperCase() !== glob.toLowerCase();
if (!anyMagic) {
return body;
}
const flags = (this.#options.nocase ? "i" : "") + (uflag ? "u" : "");
return Object.assign(new RegExp(`^${re}$`, flags), {
_src: re,
_glob: glob
});
}
// returns the string match, the regexp source, whether there's magic
// in the regexp (so a regular expression is required) and whether or
// not the uflag is needed for the regular expression (for posix classes)
// TODO: instead of injecting the start/end at this point, just return
// the BODY of the regexp, along with the start/end portions suitable
// for binding the start/end in either a joined full-path makeRe context
// (where we bind to (^|/), or a standalone matchPart context (where
// we bind to ^, and not /). Otherwise slashes get duped!
//
// In part-matching mode, the start is:
// - if not isStart: nothing
// - if traversal possible, but not allowed: ^(?!\.\.?$)
// - if dots allowed or not possible: ^
// - if dots possible and not allowed: ^(?!\.)
// end is:
// - if not isEnd(): nothing
// - else: $
//
// In full-path matching mode, we put the slash at the START of the
// pattern, so start is:
// - if first pattern: same as part-matching mode
// - if not isStart(): nothing
// - if traversal possible, but not allowed: /(?!\.\.?(?:$|/))
// - if dots allowed or not possible: /
// - if dots possible and not allowed: /(?!\.)
// end is:
// - if last pattern, same as part-matching mode
// - else nothing
//
// Always put the (?:$|/) on negated tails, though, because that has to be
// there to bind the end of the negated pattern portion, and it's easier to
// just stick it in now rather than try to inject it later in the middle of
// the pattern.
//
// We can just always return the same end, and leave it up to the caller
// to know whether it's going to be used joined or in parts.
// And, if the start is adjusted slightly, can do the same there:
// - if not isStart: nothing
// - if traversal possible, but not allowed: (?:/|^)(?!\.\.?$)
// - if dots allowed or not possible: (?:/|^)
// - if dots possible and not allowed: (?:/|^)(?!\.)
//
// But it's better to have a simpler binding without a conditional, for
// performance, so probably better to return both start options.
//
// Then the caller just ignores the end if it's not the first pattern,
// and the start always gets applied.
//
// But that's always going to be $ if it's the ending pattern, or nothing,
// so the caller can just attach $ at the end of the pattern when building.
//
// So the todo is:
// - better detect what kind of start is needed
// - return both flavors of starting pattern
// - attach $ at the end of the pattern when creating the actual RegExp
//
// Ah, but wait, no, that all only applies to the root when the first pattern
// is not an extglob. If the first pattern IS an extglob, then we need all
// that dot prevention biz to live in the extglob portions, because eg
// +(*|.x*) can match .xy but not .yx.
//
// So, return the two flavors if it's #root and the first child is not an
// AST, otherwise leave it to the child AST to handle it, and there,
// use the (?:^|/) style of start binding.
//
// Even simplified further:
// - Since the start for a join is eg /(?!\.) and the start for a part
// is ^(?!\.), we can just prepend (?!\.) to the pattern (either root
// or start or whatever) and prepend ^ or / at the Regexp construction.
toRegExpSource(allowDot) {
const dot = allowDot ?? !!this.#options.dot;
if (this.#root === this)
this.#fillNegs();
if (!this.type) {
const noEmpty = this.isStart() && this.isEnd();
const src = this.#parts.map((p) => {
const [re, _, hasMagic, uflag] = typeof p === "string" ? _AST.#parseGlob(p, this.#hasMagic, noEmpty) : p.toRegExpSource(allowDot);
this.#hasMagic = this.#hasMagic || hasMagic;
this.#uflag = this.#uflag || uflag;
return re;
}).join("");
let start2 = "";
if (this.isStart()) {
if (typeof this.#parts[0] === "string") {
const dotTravAllowed = this.#parts.length === 1 && justDots.has(this.#parts[0]);
if (!dotTravAllowed) {
const aps = addPatternStart;
const needNoTrav = (
// dots are allowed, and the pattern starts with [ or .
dot && aps.has(src.charAt(0)) || // the pattern starts with \., and then [ or .
src.startsWith("\\.") && aps.has(src.charAt(2)) || // the pattern starts with \.\., and then [ or .
src.startsWith("\\.\\.") && aps.has(src.charAt(4))
);
const needNoDot = !dot && !allowDot && aps.has(src.charAt(0));
start2 = needNoTrav ? startNoTraversal : needNoDot ? startNoDot : "";
}
}
}
let end = "";
if (this.isEnd() && this.#root.#filledNegs && this.#parent?.type === "!") {
end = "(?:$|\\/)";
}
const final2 = start2 + src + end;
return [
final2,
(0, unescape_js_1.unescape)(src),
this.#hasMagic = !!this.#hasMagic,
this.#uflag
];
}
const repeated = this.type === "*" || this.type === "+";
const start = this.type === "!" ? "(?:(?!(?:" : "(?:";
let body = this.#partsToRegExp(dot);
if (this.isStart() && this.isEnd() && !body && this.type !== "!") {
const s = this.toString();
this.#parts = [s];
this.type = null;
this.#hasMagic = void 0;
return [s, (0, unescape_js_1.unescape)(this.toString()), false, false];
}
let bodyDotAllowed = !repeated || allowDot || dot || !startNoDot ? "" : this.#partsToRegExp(true);
if (bodyDotAllowed === body) {
bodyDotAllowed = "";
}
if (bodyDotAllowed) {
body = `(?:${body})(?:${bodyDotAllowed})*?`;
}
let final = "";
if (this.type === "!" && this.#emptyExt) {
final = (this.isStart() && !dot ? startNoDot : "") + starNoEmpty;
} else {
const close = this.type === "!" ? (
// !() must match something,but !(x) can match ''
"))" + (this.isStart() && !dot && !allowDot ? startNoDot : "") + star + ")"
) : this.type === "@" ? ")" : this.type === "?" ? ")?" : this.type === "+" && bodyDotAllowed ? ")" : this.type === "*" && bodyDotAllowed ? `)?` : `)${this.type}`;
final = start + body + close;
}
return [
final,
(0, unescape_js_1.unescape)(body),
this.#hasMagic = !!this.#hasMagic,
this.#uflag
];
}
#partsToRegExp(dot) {
return this.#parts.map((p) => {
if (typeof p === "string") {
throw new Error("string type in extglob ast??");
}
const [re, _, _hasMagic, uflag] = p.toRegExpSource(dot);
this.#uflag = this.#uflag || uflag;
return re;
}).filter((p) => !(this.isStart() && this.isEnd()) || !!p).join("|");
}
static #parseGlob(glob, hasMagic, noEmpty = false) {
let escaping = false;
let re = "";
let uflag = false;
for (let i = 0; i < glob.length; i++) {
const c = glob.charAt(i);
if (escaping) {
escaping = false;
re += (reSpecials.has(c) ? "\\" : "") + c;
continue;
}
if (c === "\\") {
if (i === glob.length - 1) {
re += "\\\\";
} else {
escaping = true;
}
continue;
}
if (c === "[") {
const [src, needUflag, consumed, magic] = (0, brace_expressions_js_1.parseClass)(glob, i);
if (consumed) {
re += src;
uflag = uflag || needUflag;
i += consumed - 1;
hasMagic = hasMagic || magic;
continue;
}
}
if (c === "*") {
if (noEmpty && glob === "*")
re += starNoEmpty;
else
re += star;
hasMagic = true;
continue;
}
if (c === "?") {
re += qmark;
hasMagic = true;
continue;
}
re += regExpEscape(c);
}
return [re, (0, unescape_js_1.unescape)(glob), !!hasMagic, uflag];
}
};
exports.AST = AST;
}
});
// ../../node_modules/.pnpm/minimatch@9.0.3/node_modules/minimatch/dist/cjs/escape.js
var require_escape = __commonJS({
"../../node_modules/.pnpm/minimatch@9.0.3/node_modules/minimatch/dist/cjs/escape.js"(exports) {
"use strict";
init_shims();
Object.defineProperty(exports, "__esModule", { value: true });
exports.escape = void 0;
var escape2 = (s, { windowsPathsNoEscape = false } = {}) => {
return windowsPathsNoEscape ? s.replace(/[?*()[\]]/g, "[$&]") : s.replace(/[?*()[\]\\]/g, "\\$&");
};
exports.escape = escape2;
}
});
// ../../node_modules/.pnpm/minimatch@9.0.3/node_modules/minimatch/dist/cjs/index.js
var require_cjs = __commonJS({
"../../node_modules/.pnpm/minimatch@9.0.3/node_modules/minimatch/dist/cjs/index.js"(exports) {
"use strict";
init_shims();
var __importDefault2 = exports && exports.__importDefault || function(mod) {
return mod && mod.__esModule ? mod : { "default": mod };
};
Object.defineProperty(exports, "__esModule", { value: true });
exports.unescape = exports.escape = exports.AST = exports.Minimatch = exports.match = exports.makeRe = exports.braceExpand = exports.defaults = exports.filter = exports.GLOBSTAR = exports.sep = exports.minimatch = void 0;
var brace_expansion_1 = __importDefault2(require_brace_expansion());
var assert_valid_pattern_js_1 = require_assert_valid_pattern();
var ast_js_1 = require_ast2();
var escape_js_1 = require_escape();
var unescape_js_1 = require_unescape();
var minimatch = (p, pattern, options = {}) => {
(0, assert_valid_pattern_js_1.assertValidPattern)(pattern);
if (!options.nocomment && pattern.charAt(0) === "#") {
return false;
}
return new Minimatch(pattern, options).match(p);
};
exports.minimatch = minimatch;
var starDotExtRE = /^\*+([^+@!?\*\[\(]*)$/;
var starDotExtTest = (ext2) => (f) => !f.startsWith(".") && f.endsWith(ext2);
var starDotExtTestDot = (ext2) => (f) => f.endsWith(ext2);
var starDotExtTestNocase = (ext2) => {
ext2 = ext2.toLowerCase();
return (f) => !f.startsWith(".") && f.toLowerCase().endsWith(ext2);
};
var starDotExtTestNocaseDot = (ext2) => {
ext2 = ext2.toLowerCase();
return (f) => f.toLowerCase().endsWith(ext2);
};
var starDotStarRE = /^\*+\.\*+$/;
var starDotStarTest = (f) => !f.startsWith(".") && f.includes(".");
var starDotStarTestDot = (f) => f !== "." && f !== ".." && f.includes(".");
var dotStarRE = /^\.\*+$/;
var dotStarTest = (f) => f !== "." && f !== ".." && f.startsWith(".");
var starRE = /^\*+$/;
var starTest = (f) => f.length !== 0 && !f.startsWith(".");
var starTestDot = (f) => f.length !== 0 && f !== "." && f !== "..";
var qmarksRE = /^\?+([^+@!?\*\[\(]*)?$/;
var qmarksTestNocase = ([$0, ext2 = ""]) => {
const noext = qmarksTestNoExt([$0]);
if (!ext2)
return noext;
ext2 = ext2.toLowerCase();
return (f) => noext(f) && f.toLowerCase().endsWith(ext2);
};
var qmarksTestNocaseDot = ([$0, ext2 = ""]) => {
const noext = qmarksTestNoExtDot([$0]);
if (!ext2)
return noext;
ext2 = ext2.toLowerCase();
return (f) => noext(f) && f.toLowerCase().endsWith(ext2);
};
var qmarksTestDot = ([$0, ext2 = ""]) => {
const noext = qmarksTestNoExtDot([$0]);
return !ext2 ? noext : (f) => noext(f) && f.endsWith(ext2);
};
var qmarksTest = ([$0, ext2 = ""]) => {
const noext = qmarksTestNoExt([$0]);
return !ext2 ? noext : (f) => noext(f) && f.endsWith(ext2);
};
var qmarksTestNoExt = ([$0]) => {
const len = $0.length;
return (f) => f.length === len && !f.startsWith(".");
};
var qmarksTestNoExtDot = ([$0]) => {
const len = $0.length;
return (f) => f.length === len && f !== "." && f !== "..";
};
var defaultPlatform = typeof process === "object" && process ? typeof process.env === "object" && process.env && process.env.__MINIMATCH_TESTING_PLATFORM__ || process.platform : "posix";
var path = {
win32: { sep: "\\" },
posix: { sep: "/" }
};
exports.sep = defaultPlatform === "win32" ? path.win32.sep : path.posix.sep;
exports.minimatch.sep = exports.sep;
exports.GLOBSTAR = Symbol("globstar **");
exports.minimatch.GLOBSTAR = exports.GLOBSTAR;
var qmark = "[^/]";
var star = qmark + "*?";
var twoStarDot = "(?:(?!(?:\\/|^)(?:\\.{1,2})($|\\/)).)*?";
var twoStarNoDot = "(?:(?!(?:\\/|^)\\.).)*?";
var filter = (pattern, options = {}) => (p) => (0, exports.minimatch)(p, pattern, options);
exports.filter = filter;
exports.minimatch.filter = exports.filter;
var ext = (a, b = {}) => Object.assign({}, a, b);
var defaults = (def) => {
if (!def || typeof def !== "object" || !Object.keys(def).length) {
return exports.minimatch;
}
const orig = exports.minimatch;
const m = (p, pattern, options = {}) => orig(p, pattern, ext(def, options));
return Object.assign(m, {
Minimatch: class Minimatch extends orig.Minimatch {
constructor(pattern, options = {}) {
super(pattern, ext(def, options));
}
static defaults(options) {
return orig.defaults(ext(def, options)).Minimatch;
}
},
AST: class AST extends orig.AST {
/* c8 ignore start */
constructor(type, parent, options = {}) {
super(type, parent, ext(def, options));
}
/* c8 ignore stop */
static fromGlob(pattern, options = {}) {
return orig.AST.fromGlob(pattern, ext(def, options));
}
},
unescape: (s, options = {}) => orig.unescape(s, ext(def, options)),
escape: (s, options = {}) => orig.escape(s, ext(def, options)),
filter: (pattern, options = {}) => orig.filter(pattern, ext(def, options)),
defaults: (options) => orig.defaults(ext(def, options)),
makeRe: (pattern, options = {}) => orig.makeRe(pattern, ext(def, options)),
braceExpand: (pattern, options = {}) => orig.braceExpand(pattern, ext(def, options)),
match: (list, pattern, options = {}) => orig.match(list, pattern, ext(def, options)),
sep: orig.sep,
GLOBSTAR: exports.GLOBSTAR
});
};
exports.defaults = defaults;
exports.minimatch.defaults = exports.defaults;
var braceExpand = (pattern, options = {}) => {
(0, assert_valid_pattern_js_1.assertValidPattern)(pattern);
if (options.nobrace || !/\{(?:(?!\{).)*\}/.test(pattern)) {
return [pattern];
}
return (0, brace_expansion_1.default)(pattern);
};
exports.braceExpand = braceExpand;
exports.minimatch.braceExpand = exports.braceExpand;
var makeRe = (pattern, options = {}) => new Minimatch(pattern, options).makeRe();
exports.makeRe = makeRe;
exports.minimatch.makeRe = exports.makeRe;
var match = (list, pattern, options = {}) => {
const mm = new Minimatch(pattern, options);
list = list.filter((f) => mm.match(f));
if (mm.options.nonull && !list.length) {
list.push(pattern);
}
return list;
};
exports.match = match;
exports.minimatch.match = exports.match;
var globMagic = /[?*]|[+@!]\(.*?\)|\[|\]/;
var regExpEscape = (s) => s.replace(/[-[\]{}()*+?.,\\^$|#\s]/g, "\\$&");
var Minimatch = class {
options;
set;
pattern;
windowsPathsNoEscape;
nonegate;
negate;
comment;
empty;
preserveMultipleSlashes;
partial;
globSet;
globParts;
nocase;
isWindows;
platform;
windowsNoMagicRoot;
regexp;
constructor(pattern, options = {}) {
(0, assert_valid_pattern_js_1.assertValidPattern)(pattern);
options = options || {};
this.options = options;
this.pattern = pattern;
this.platform = options.platform || defaultPlatform;
this.isWindows = this.platform === "win32";
this.windowsPathsNoEscape = !!options.windowsPathsNoEscape || options.allowWindowsEscape === false;
if (this.windowsPathsNoEscape) {
this.pattern = this.pattern.replace(/\\/g, "/");
}
this.preserveMultipleSlashes = !!options.preserveMultipleSlashes;
this.regexp = null;
this.negate = false;
this.nonegate = !!options.nonegate;
this.comment = false;
this.empty = false;
this.partial = !!options.partial;
this.nocase = !!this.options.nocase;
this.windowsNoMagicRoot = options.windowsNoMagicRoot !== void 0 ? options.windowsNoMagicRoot : !!(this.isWindows && this.nocase);
this.globSet = [];
this.globParts = [];
this.set = [];
this.make();
}
hasMagic() {
if (this.options.magicalBraces && this.set.length > 1) {
return true;
}
for (const pattern of this.set) {
for (const part of pattern) {
if (typeof part !== "string")
return true;
}
}
return false;
}
debug(..._) {
}
make() {
const pattern = this.pattern;
const options = this.options;
if (!options.nocomment && pattern.charAt(0) === "#") {
this.comment = true;
return;
}
if (!pattern) {
this.empty = true;
return;
}
this.parseNegate();
this.globSet = [...new Set(this.braceExpand())];
if (options.debug) {
this.debug = (...args) => console.error(...args);
}
this.debug(this.pattern, this.globSet);
const rawGlobParts = this.globSet.map((s) => this.slashSplit(s));
this.globParts = this.preprocess(rawGlobParts);
this.debug(this.pattern, this.globParts);
let set = this.globParts.map((s, _, __) => {
if (this.isWindows && this.windowsNoMagicRoot) {
const isUNC = s[0] === "" && s[1] === "" && (s[2] === "?" || !globMagic.test(s[2])) && !globMagic.test(s[3]);
const isDrive = /^[a-z]:/i.test(s[0]);
if (isUNC) {
return [...s.slice(0, 4), ...s.slice(4).map((ss) => this.parse(ss))];
} else if (isDrive) {
return [s[0], ...s.slice(1).map((ss) => this.parse(ss))];
}
}
return s.map((ss) => this.parse(ss));
});
this.debug(this.pattern, set);
this.set = set.filter((s) => s.indexOf(false) === -1);
if (this.isWindows) {
for (let i = 0; i < this.set.length; i++) {
const p = this.set[i];
if (p[0] === "" && p[1] === "" && this.globParts[i][2] === "?" && typeof p[3] === "string" && /^[a-z]:$/i.test(p[3])) {
p[2] = "?";
}
}
}
this.debug(this.pattern, this.set);
}
// various transforms to equivalent pattern sets that are
// faster to process in a filesystem walk. The goal is to
// eliminate what we can, and push all ** patterns as far
// to the right as possible, even if it increases the number
// of patterns that we have to process.
preprocess(globParts) {
if (this.options.noglobstar) {
for (let i = 0; i < globParts.length; i++) {
for (let j = 0; j < globParts[i].length; j++) {
if (globParts[i][j] === "**") {
globParts[i][j] = "*";
}
}
}
}
const { optimizationLevel = 1 } = this.options;
if (optimizationLevel >= 2) {
globParts = this.firstPhasePreProcess(globParts);
globParts = this.secondPhasePreProcess(globParts);
} else if (optimizationLevel >= 1) {
globParts = this.levelOneOptimize(globParts);
} else {
globParts = this.adjascentGlobstarOptimize(globParts);
}
return globParts;
}
// just get rid of adjascent ** portions
adjascentGlobstarOptimize(globParts) {
return globParts.map((parts) => {
let gs = -1;
while (-1 !== (gs = parts.indexOf("**", gs + 1))) {
let i = gs;
while (parts[i + 1] === "**") {
i++;
}
if (i !== gs) {
parts.splice(gs, i - gs);
}
}
return parts;
});
}
// get rid of adjascent ** and resolve .. portions
levelOneOptimize(globParts) {
return globParts.map((parts) => {
parts = parts.reduce((set, part) => {
const prev = set[set.length - 1];
if (part === "**" && prev === "**") {
return set;
}
if (part === "..") {
if (prev && prev !== ".." && prev !== "." && prev !== "**") {
set.pop();
return set;
}
}
set.push(part);
return set;
}, []);
return parts.length === 0 ? [""] : parts;
});
}
levelTwoFileOptimize(parts) {
if (!Array.isArray(parts)) {
parts = this.slashSplit(parts);
}
let didSomething = false;
do {
didSomething = false;
if (!this.preserveMultipleSlashes) {
for (let i = 1; i < parts.length - 1; i++) {
const p = parts[i];
if (i === 1 && p === "" && parts[0] === "")
continue;
if (p === "." || p === "") {
didSomething = true;
parts.splice(i, 1);
i--;
}
}
if (parts[0] === "." && parts.length === 2 && (parts[1] === "." || parts[1] === "")) {
didSomething = true;
parts.pop();
}
}
let dd = 0;
while (-1 !== (dd = parts.indexOf("..", dd + 1))) {
const p = parts[dd - 1];
if (p && p !== "." && p !== ".." && p !== "**") {
didSomething = true;
parts.splice(dd - 1, 2);
dd -= 2;
}
}
} while (didSomething);
return parts.length === 0 ? [""] : parts;
}
// First phase: single-pattern processing
// <pre> is 1 or more portions
// <rest> is 1 or more portions
// <p> is any portion other than ., .., '', or **
// <e> is . or ''
//
// **/.. is *brutal* for filesystem walking performance, because
// it effectively resets the recursive walk each time it occurs,
// and ** cannot be reduced out by a .. pattern part like a regexp
// or most strings (other than .., ., and '') can be.
//
// <pre>/**/../<p>/<p>/<rest> -> {<pre>/../<p>/<p>/<rest>,<pre>/**/<p>/<p>/<rest>}
// <pre>/<e>/<rest> -> <pre>/<rest>
// <pre>/<p>/../<rest> -> <pre>/<rest>
// **/**/<rest> -> **/<rest>
//
// **/*/<rest> -> */**/<rest> <== not valid because ** doesn't follow
// this WOULD be allowed if ** did follow symlinks, or * didn't
firstPhasePreProcess(globParts) {
let didSomething = false;
do {
didSomething = false;
for (let parts of globParts) {
let gs = -1;
while (-1 !== (gs = parts.indexOf("**", gs + 1))) {
let gss = gs;
while (parts[gss + 1] === "**") {
gss++;
}
if (gss > gs) {
parts.splice(gs + 1, gss - gs);
}
let next = parts[gs + 1];
const p = parts[gs + 2];
const p2 = parts[gs + 3];
if (next !== "..")
continue;
if (!p || p === "." || p === ".." || !p2 || p2 === "." || p2 === "..") {
continue;
}
didSomething = true;
parts.splice(gs, 1);
const other = parts.slice(0);
other[gs] = "**";
globParts.push(other);
gs--;
}
if (!this.preserveMultipleSlashes) {
for (let i = 1; i < parts.length - 1; i++) {
const p = parts[i];
if (i === 1 && p === "" && parts[0] === "")
continue;
if (p === "." || p === "") {
didSomething = true;
parts.splice(i, 1);
i--;
}
}
if (parts[0] === "." && parts.length === 2 && (parts[1] === "." || parts[1] === "")) {
didSomething = true;
parts.pop();
}
}
let dd = 0;
while (-1 !== (dd = parts.indexOf("..", dd + 1))) {
const p = parts[dd - 1];
if (p && p !== "." && p !== ".." && p !== "**") {
didSomething = true;
const needDot = dd === 1 && parts[dd + 1] === "**";
const splin = needDot ? ["."] : [];
parts.splice(dd - 1, 2, ...splin);
if (parts.length === 0)
parts.push("");
dd -= 2;
}
}
}
} while (didSomething);
return globParts;
}
// second phase: multi-pattern dedupes
// {<pre>/*/<rest>,<pre>/<p>/<rest>} -> <pre>/*/<rest>
// {<pre>/<rest>,<pre>/<rest>} -> <pre>/<rest>
// {<pre>/**/<rest>,<pre>/<rest>} -> <pre>/**/<rest>
//
// {<pre>/**/<rest>,<pre>/**/<p>/<rest>} -> <pre>/**/<rest>
// ^-- not valid because ** doens't follow symlinks
secondPhasePreProcess(globParts) {
for (let i = 0; i < globParts.length - 1; i++) {
for (let j = i + 1; j < globParts.length; j++) {
const matched = this.partsMatch(globParts[i], globParts[j], !this.preserveMultipleSlashes);
if (!matched)
continue;
globParts[i] = matched;
globParts[j] = [];
}
}
return globParts.filter((gs) => gs.length);
}
partsMatch(a, b, emptyGSMatch = false) {
let ai = 0;
let bi = 0;
let result = [];
let which = "";
while (ai < a.length && bi < b.length) {
if (a[ai] === b[bi]) {
result.push(which === "b" ? b[bi] : a[ai]);
ai++;
bi++;
} else if (emptyGSMatch && a[ai] === "**" && b[bi] === a[ai + 1]) {
result.push(a[ai]);
ai++;
} else if (emptyGSMatch && b[bi] === "**" && a[ai] === b[bi + 1]) {
result.push(b[bi]);
bi++;
} else if (a[ai] === "*" && b[bi] && (this.options.dot || !b[bi].startsWith(".")) && b[bi] !== "**") {
if (which === "b")
return false;
which = "a";
result.push(a[ai]);
ai++;
bi++;
} else if (b[bi] === "*" && a[ai] && (this.options.dot || !a[ai].startsWith(".")) && a[ai] !== "**") {
if (which === "a")
return false;
which = "b";
result.push(b[bi]);
ai++;
bi++;
} else {
return false;
}
}
return a.length === b.length && result;
}
parseNegate() {
if (this.nonegate)
return;
const pattern = this.pattern;
let negate = false;
let negateOffset = 0;
for (let i = 0; i < pattern.length && pattern.charAt(i) === "!"; i++) {
negate = !negate;
negateOffset++;
}
if (negateOffset)
this.pattern = pattern.slice(negateOffset);
this.negate = negate;
}
// set partial to true to test if, for example,
// "/a/b" matches the start of "/*/b/*/d"
// Partial means, if you run out of file before you run
// out of pattern, then that's fine, as long as all
// the parts match.
matchOne(file, pattern, partial = false) {
const options = this.options;
if (this.isWindows) {
const fileDrive = typeof file[0] === "string" && /^[a-z]:$/i.test(file[0]);
const fileUNC = !fileDrive && file[0] === "" && file[1] === "" && file[2] === "?" && /^[a-z]:$/i.test(file[3]);
const patternDrive = typeof pattern[0] === "string" && /^[a-z]:$/i.test(pattern[0]);
const patternUNC = !patternDrive && pattern[0] === "" && pattern[1] === "" && pattern[2] === "?" && typeof pattern[3] === "string" && /^[a-z]:$/i.test(pattern[3]);
const fdi = fileUNC ? 3 : fileDrive ? 0 : void 0;
const pdi = patternUNC ? 3 : patternDrive ? 0 : void 0;
if (typeof fdi === "number" && typeof pdi === "number") {
const [fd, pd] = [file[fdi], pattern[pdi]];
if (fd.toLowerCase() === pd.toLowerCase()) {
pattern[pdi] = fd;
if (pdi > fdi) {
pattern = pattern.slice(pdi);
} else if (fdi > pdi) {
file = file.slice(fdi);
}
}
}
}
const { optimizationLevel = 1 } = this.options;
if (optimizationLevel >= 2) {
file = this.levelTwoFileOptimize(file);
}
this.debug("matchOne", this, { file, pattern });
this.debug("matchOne", file.length, pattern.length);
for (var fi = 0, pi = 0, fl = file.length, pl = pattern.length; fi < fl && pi < pl; fi++, pi++) {
this.debug("matchOne loop");
var p = pattern[pi];
var f = file[fi];
this.debug(pattern, p, f);
if (p === false) {
return false;
}
if (p === exports.GLOBSTAR) {
this.debug("GLOBSTAR", [pattern, p, f]);
var fr = fi;
var pr = pi + 1;
if (pr === pl) {
this.debug("** at the end");
for (; fi < fl; fi++) {
if (file[fi] === "." || file[fi] === ".." || !options.dot && file[fi].charAt(0) === ".")
return false;
}
return true;
}
while (fr < fl) {
var swallowee = file[fr];
this.debug("\nglobstar while", file, fr, pattern, pr, swallowee);
if (this.matchOne(file.slice(fr), pattern.slice(pr), partial)) {
this.debug("globstar found match!", fr, fl, swallowee);
return true;
} else {
if (swallowee === "." || swallowee === ".." || !options.dot && swallowee.charAt(0) === ".") {
this.debug("dot detected!", file, fr, pattern, pr);
break;
}
this.debug("globstar swallow a segment, and continue");
fr++;
}
}
if (partial) {
this.debug("\n>>> no match, partial?", file, fr, pattern, pr);
if (fr === fl) {
return true;
}
}
return false;
}
let hit;
if (typeof p === "string") {
hit = f === p;
this.debug("string match", p, f, hit);
} else {
hit = p.test(f);
this.debug("pattern match", p, f, hit);
}
if (!hit)
return false;
}
if (fi === fl && pi === pl) {
return true;
} else if (fi === fl) {
return partial;
} else if (pi === pl) {
return fi === fl - 1 && file[fi] === "";
} else {
throw new Error("wtf?");
}
}
braceExpand() {
return (0, exports.braceExpand)(this.pattern, this.options);
}
parse(pattern) {
(0, assert_valid_pattern_js_1.assertValidPattern)(pattern);
const options = this.options;
if (pattern === "**")
return exports.GLOBSTAR;
if (pattern === "")
return "";
let m;
let fastTest = null;
if (m = pattern.match(starRE)) {
fastTest = options.dot ? starTestDot : starTest;
} else if (m = pattern.match(starDotExtRE)) {
fastTest = (options.nocase ? options.dot ? starDotExtTestNocaseDot : starDotExtTestNocase : options.dot ? starDotExtTestDot : starDotExtTest)(m[1]);
} else if (m = pattern.match(qmarksRE)) {
fastTest = (options.nocase ? options.dot ? qmarksTestNocaseDot : qmarksTestNocase : options.dot ? qmarksTestDot : qmarksTest)(m);
} else if (m = pattern.match(starDotStarRE)) {
fastTest = options.dot ? starDotStarTestDot : starDotStarTest;
} else if (m = pattern.match(dotStarRE)) {
fastTest = dotStarTest;
}
const re = ast_js_1.AST.fromGlob(pattern, this.options).toMMPattern();
return fastTest ? Object.assign(re, { test: fastTest }) : re;
}
makeRe() {
if (this.regexp || this.regexp === false)
return this.regexp;
const set = this.set;
if (!set.length) {
this.regexp = false;
return this.regexp;
}
const options = this.options;
const twoStar = options.noglobstar ? star : options.dot ? twoStarDot : twoStarNoDot;
const flags = new Set(options.nocase ? ["i"] : []);
let re = set.map((pattern) => {
const pp = pattern.map((p) => {
if (p instanceof RegExp) {
for (const f of p.flags.split(""))
flags.add(f);
}
return typeof p === "string" ? regExpEscape(p) : p === exports.GLOBSTAR ? exports.GLOBSTAR : p._src;
});
pp.forEach((p, i) => {
const next = pp[i + 1];
const prev = pp[i - 1];
if (p !== exports.GLOBSTAR || prev === exports.GLOBSTAR) {
return;
}
if (prev === void 0) {
if (next !== void 0 && next !== exports.GLOBSTAR) {
pp[i + 1] = "(?:\\/|" + twoStar + "\\/)?" + next;
} else {
pp[i] = twoStar;
}
} else if (next === void 0) {
pp[i - 1] = prev + "(?:\\/|" + twoStar + ")?";
} else if (next !== exports.GLOBSTAR) {
pp[i - 1] = prev + "(?:\\/|\\/" + twoStar + "\\/)" + next;
pp[i + 1] = exports.GLOBSTAR;
}
});
return pp.filter((p) => p !== exports.GLOBSTAR).join("/");
}).join("|");
const [open, close] = set.length > 1 ? ["(?:", ")"] : ["", ""];
re = "^" + open + re + close + "$";
if (this.negate)
re = "^(?!" + re + ").+$";
try {
this.regexp = new RegExp(re, [...flags].join(""));
} catch (ex) {
this.regexp = false;
}
return this.regexp;
}
slashSplit(p) {
if (this.preserveMultipleSlashes) {
return p.split("/");
} else if (this.isWindows && /^\/\/[^\/]+/.test(p)) {
return ["", ...p.split(/\/+/)];
} else {
return p.split(/\/+/);
}
}
match(f, partial = this.partial) {
this.debug("match", f, this.pattern);
if (this.comment) {
return false;
}
if (this.empty) {
return f === "";
}
if (f === "/" && partial) {
return true;
}
const options = this.options;
if (this.isWindows) {
f = f.split("\\").join("/");
}
const ff = this.slashSplit(f);
this.debug(this.pattern, "split", ff);
const set = this.set;
this.debug(this.pattern, "set", set);
let filename = ff[ff.length - 1];
if (!filename) {
for (let i = ff.length - 2; !filename && i >= 0; i--) {
filename = ff[i];
}
}
for (let i = 0; i < set.length; i++) {
const pattern = set[i];
let file = ff;
if (options.matchBase && pattern.length === 1) {
file = [filename];
}
const hit = this.matchOne(file, pattern, partial);
if (hit) {
if (options.flipNegate) {
return true;
}
return !this.negate;
}
}
if (options.flipNegate) {
return false;
}
return this.negate;
}
static defaults(def) {
return exports.minimatch.defaults(def).Minimatch;
}
};
exports.Minimatch = Minimatch;
var ast_js_2 = require_ast2();
Object.defineProperty(exports, "AST", { enumerable: true, get: function() {
return ast_js_2.AST;
} });
var escape_js_2 = require_escape();
Object.defineProperty(exports, "escape", { enumerable: true, get: function() {
return escape_js_2.escape;
} });
var unescape_js_2 = require_unescape();
Object.defineProperty(exports, "unescape", { enumerable: true, get: function() {
return unescape_js_2.unescape;
} });
exports.minimatch.AST = ast_js_1.AST;
exports.minimatch.Minimatch = Minimatch;
exports.minimatch.escape = escape_js_1.escape;
exports.minimatch.unescape = unescape_js_1.unescape;
}
});
// ../../node_modules/.pnpm/eslint-plugin-import-x@0.4.4_patch_hash=4oryti2zfrehz2qi62zyaaa334_eslint@9.4.0_typescript@5.4.5/node_modules/eslint-plugin-import-x/lib/rules/no-extraneous-dependencies.js
var require_no_extraneous_dependencies = __commonJS({
"../../node_modules/.pnpm/eslint-plugin-import-x@0.4.4_patch_hash=4oryti2zfrehz2qi62zyaaa334_eslint@9.4.0_typescript@5.4.5/node_modules/eslint-plugin-import-x/lib/rules/no-extraneous-dependencies.js"(exports, module) {
"use strict";
init_shims();
var tslib_1 = (init_tslib_es6(), __toCommonJS(tslib_es6_exports));
var node_fs_1 = tslib_1.__importDefault(__require("node:fs"));
var node_path_1 = tslib_1.__importDefault(__require("node:path"));
var eslint_compat_utils_1 = require_dist();
var minimatch_1 = require_cjs();
var utils_1 = require_utils2();
var depFieldCache = /* @__PURE__ */ new Map();
function hasKeys(obj = {}) {
return Object.keys(obj).length > 0;
}
function arrayOrKeys(arrayOrObject) {
return Array.isArray(arrayOrObject) ? arrayOrObject : Object.keys(arrayOrObject);
}
function readJSON(jsonPath, throwException) {
try {
return JSON.parse(node_fs_1.default.readFileSync(jsonPath, "utf8"));
} catch (error) {
if (throwException) {
throw error;
}
}
}
function extractDepFields(pkg) {
return {
dependencies: pkg.dependencies || {},
devDependencies: pkg.devDependencies || {},
optionalDependencies: pkg.optionalDependencies || {},
peerDependencies: pkg.peerDependencies || {},
bundledDependencies: arrayOrKeys(pkg.bundleDependencies || pkg.bundledDependencies || [])
};
}
function getPackageDepFields(packageJsonPath, throwAtRead) {
if (!depFieldCache.has(packageJsonPath)) {
const depFields = extractDepFields(readJSON(packageJsonPath, throwAtRead));
depFieldCache.set(packageJsonPath, depFields);
}
return depFieldCache.get(packageJsonPath);
}
function getDependencies(context, packageDir) {
let paths = [];
try {
let packageContent = {
dependencies: {},
devDependencies: {},
optionalDependencies: {},
peerDependencies: {},
bundledDependencies: []
};
if (packageDir && packageDir.length > 0) {
paths = Array.isArray(packageDir) ? packageDir.map((dir) => node_path_1.default.resolve(dir)) : [node_path_1.default.resolve(packageDir)];
}
if (paths.length > 0) {
for (const dir of paths) {
const packageJsonPath = node_path_1.default.resolve(dir, "package.json");
const packageContent_ = getPackageDepFields(packageJsonPath, true);
for (const depsKey of Object.keys(packageContent)) {
const key = depsKey;
Object.assign(packageContent[key], packageContent_[key]);
}
}
} else {
const packageJsonPath = (0, utils_1.pkgUp)({
cwd: (0, eslint_compat_utils_1.getPhysicalFilename)(context)
});
const packageContent_ = getPackageDepFields(packageJsonPath, false);
if (packageContent_) {
packageContent = packageContent_;
}
}
if (![
packageContent.dependencies,
packageContent.devDependencies,
packageContent.optionalDependencies,
packageContent.peerDependencies,
packageContent.bundledDependencies
].some(hasKeys)) {
return;
}
return packageContent;
} catch (error_) {
const error = error_;
if (paths.length > 0 && error.code === "ENOENT") {
context.report({
messageId: "pkgNotFound",
loc: { line: 0, column: 0 }
});
}
if (error.name === "JSONError" || error instanceof SyntaxError) {
context.report({
messageId: "pkgUnparsable",
data: { error: error.message },
loc: { line: 0, column: 0 }
});
}
}
}
function getModuleOriginalName(name) {
const [first, second] = name.split("/");
return first.startsWith("@") ? `${first}/${second}` : first;
}
function checkDependencyDeclaration(deps, packageName, declarationStatus) {
const newDeclarationStatus = declarationStatus || {
isInDeps: false,
isInDevDeps: false,
isInOptDeps: false,
isInPeerDeps: false,
isInBundledDeps: false
};
const packageHierarchy = [];
const packageNameParts = packageName ? packageName.split("/") : [];
for (const [index, namePart] of packageNameParts.entries()) {
if (!namePart.startsWith("@")) {
const ancestor = packageNameParts.slice(0, index + 1).join("/");
packageHierarchy.push(ancestor);
}
}
return packageHierarchy.reduce((result, ancestorName) => ({
isInDeps: result.isInDeps || deps.dependencies[ancestorName] !== void 0,
isInDevDeps: result.isInDevDeps || deps.devDependencies[ancestorName] !== void 0,
isInOptDeps: result.isInOptDeps || deps.optionalDependencies[ancestorName] !== void 0,
isInPeerDeps: result.isInPeerDeps || deps.peerDependencies[ancestorName] !== void 0,
isInBundledDeps: result.isInBundledDeps || deps.bundledDependencies.includes(ancestorName)
}), newDeclarationStatus);
}
function reportIfMissing(context, deps, depsOptions, node2, name) {
if (!depsOptions.verifyTypeImports && ("importKind" in node2 && (node2.importKind === "type" || node2.importKind === "typeof") || "exportKind" in node2 && node2.exportKind === "type" || "specifiers" in node2 && Array.isArray(node2.specifiers) && node2.specifiers.length > 0 && node2.specifiers.every((specifier) => "importKind" in specifier && (specifier.importKind === "type" || specifier.importKind === "typeof")))) {
return;
}
const typeOfImport = (0, utils_1.importType)(name, context);
if (typeOfImport !== "external" && (typeOfImport !== "internal" || !depsOptions.verifyInternalDeps)) {
return;
}
const resolved = (0, utils_1.resolve)(name, context);
if (!resolved) {
return;
}
const importPackageName = getModuleOriginalName(name);
let declarationStatus = checkDependencyDeclaration(deps, importPackageName);
if (declarationStatus.isInDeps || depsOptions.allowDevDeps && declarationStatus.isInDevDeps || depsOptions.allowPeerDeps && declarationStatus.isInPeerDeps || depsOptions.allowOptDeps && declarationStatus.isInOptDeps || depsOptions.allowBundledDeps && declarationStatus.isInBundledDeps) {
return;
}
const realPackageName = (0, utils_1.getFilePackageName)(resolved);
if (realPackageName && realPackageName !== importPackageName) {
declarationStatus = checkDependencyDeclaration(deps, realPackageName, declarationStatus);
if (declarationStatus.isInDeps || depsOptions.allowDevDeps && declarationStatus.isInDevDeps || depsOptions.allowPeerDeps && declarationStatus.isInPeerDeps || depsOptions.allowOptDeps && declarationStatus.isInOptDeps || depsOptions.allowBundledDeps && declarationStatus.isInBundledDeps) {
return;
}
}
const packageName = realPackageName || importPackageName;
if (declarationStatus.isInDevDeps && !depsOptions.allowDevDeps) {
context.report({
node: node2,
messageId: "devDep",
data: {
packageName
}
});
return;
}
if (declarationStatus.isInOptDeps && !depsOptions.allowOptDeps) {
context.report({
node: node2,
messageId: "optDep",
data: {
packageName
}
});
return;
}
context.report({
node: node2,
messageId: "missing",
data: {
packageName
}
});
}
function testConfig(config, filename) {
if (typeof config === "boolean" || config === void 0) {
return config;
}
return config.some((c) => (0, minimatch_1.minimatch)(filename, c) || (0, minimatch_1.minimatch)(filename, node_path_1.default.resolve(c)));
}
module.exports = (0, utils_1.createRule)({
name: "no-extraneous-dependencies",
meta: {
type: "problem",
docs: {
category: "Helpful warnings",
description: "Forbid the use of extraneous packages."
},
schema: [
{
type: "object",
properties: {
devDependencies: { type: ["boolean", "array"] },
optionalDependencies: { type: ["boolean", "array"] },
peerDependencies: { type: ["boolean", "array"] },
bundledDependencies: { type: ["boolean", "array"] },
packageDir: { type: ["string", "array"] },
includeInternal: { type: ["boolean"] },
includeTypes: { type: ["boolean"] }
},
additionalProperties: false
}
],
messages: {
pkgNotFound: "The package.json file could not be found.",
pkgUnparsable: "The package.json file could not be parsed: {{error}}",
devDep: "'{{packageName}}' should be listed in the project's dependencies, not devDependencies.",
optDep: "'{{packageName}}' should be listed in the project's dependencies, not optionalDependencies.",
missing: "'{{packageName}}' should be listed in the project's dependencies. Run 'npm i -S {{packageName}}' to add it"
}
},
defaultOptions: [],
create(context) {
const options = context.options[0] || {};
const filename = (0, eslint_compat_utils_1.getPhysicalFilename)(context);
const deps = getDependencies(context, options.packageDir) || extractDepFields({});
const depsOptions = {
allowDevDeps: testConfig(options.devDependencies, filename) !== false,
allowOptDeps: testConfig(options.optionalDependencies, filename) !== false,
allowPeerDeps: testConfig(options.peerDependencies, filename) !== false,
allowBundledDeps: testConfig(options.bundledDependencies, filename) !== false,
verifyInternalDeps: !!options.includeInternal,
verifyTypeImports: !!options.includeTypes
};
return Object.assign(Object.assign({}, (0, utils_1.moduleVisitor)((source, node2) => {
reportIfMissing(context, deps, depsOptions, node2, source.value);
}, { commonjs: true })), { "Program:exit"() {
depFieldCache.clear();
} });
}
});
}
});
// ../../node_modules/.pnpm/eslint-plugin-import-x@0.4.4_patch_hash=4oryti2zfrehz2qi62zyaaa334_eslint@9.4.0_typescript@5.4.5/node_modules/eslint-plugin-import-x/lib/rules/no-import-module-exports.js
var require_no_import_module_exports = __commonJS({
"../../node_modules/.pnpm/eslint-plugin-import-x@0.4.4_patch_hash=4oryti2zfrehz2qi62zyaaa334_eslint@9.4.0_typescript@5.4.5/node_modules/eslint-plugin-import-x/lib/rules/no-import-module-exports.js"(exports, module) {
"use strict";
init_shims();
var tslib_1 = (init_tslib_es6(), __toCommonJS(tslib_es6_exports));
var node_path_1 = tslib_1.__importDefault(__require("node:path"));
var eslint_compat_utils_1 = require_dist();
var minimatch_1 = require_cjs();
var utils_1 = require_utils2();
function getEntryPoint(context) {
const pkgPath = (0, utils_1.pkgUp)({
cwd: (0, eslint_compat_utils_1.getPhysicalFilename)(context)
});
try {
return __require.resolve(node_path_1.default.dirname(pkgPath));
} catch (_a) {
return null;
}
}
function findScope(context, identifier) {
const { scopeManager } = (0, eslint_compat_utils_1.getSourceCode)(context);
return scopeManager === null || scopeManager === void 0 ? void 0 : scopeManager.scopes.slice().reverse().find((scope) => scope.variables.some((variable) => variable.identifiers.some((node2) => node2.name === identifier)));
}
function findDefinition(objectScope, identifier) {
const variable = objectScope.variables.find((variable2) => variable2.name === identifier);
return variable.defs.find((def) => "name" in def.name && def.name.name === identifier);
}
module.exports = (0, utils_1.createRule)({
name: "no-import-module-exports",
meta: {
type: "problem",
docs: {
category: "Module systems",
description: "Forbid import statements with CommonJS module.exports.",
recommended: true
},
fixable: "code",
schema: [
{
type: "object",
properties: {
exceptions: { type: "array" }
},
additionalProperties: false
}
],
messages: {
notAllowed: "Cannot use import declarations in modules that export using CommonJS (module.exports = 'foo' or exports.bar = 'hi')"
}
},
defaultOptions: [],
create(context) {
const importDeclarations = [];
const entryPoint = getEntryPoint(context);
const options = context.options[0] || {};
let alreadyReported = false;
return {
ImportDeclaration(node2) {
importDeclarations.push(node2);
},
MemberExpression(node2) {
if (alreadyReported) {
return;
}
const fileName = (0, eslint_compat_utils_1.getPhysicalFilename)(context);
const isEntryPoint = entryPoint === fileName;
const isIdentifier = node2.object.type === "Identifier";
if (!("name" in node2.object)) {
return;
}
const hasKeywords = /^(module|exports)$/.test(node2.object.name);
const objectScope = hasKeywords ? findScope(context, node2.object.name) : void 0;
const variableDefinition = objectScope && findDefinition(objectScope, node2.object.name);
const isImportBinding = (variableDefinition === null || variableDefinition === void 0 ? void 0 : variableDefinition.type) === "ImportBinding";
const hasCJSExportReference = hasKeywords && (!objectScope || objectScope.type === "module");
const isException = !!options.exceptions && options.exceptions.some((glob) => (0, minimatch_1.minimatch)(fileName, glob));
if (isIdentifier && hasCJSExportReference && !isEntryPoint && !isException && !isImportBinding) {
for (const importDeclaration of importDeclarations) {
context.report({
node: importDeclaration,
messageId: "notAllowed"
});
}
alreadyReported = true;
}
}
};
}
});
}
});
// ../../node_modules/.pnpm/eslint-plugin-import-x@0.4.4_patch_hash=4oryti2zfrehz2qi62zyaaa334_eslint@9.4.0_typescript@5.4.5/node_modules/eslint-plugin-import-x/lib/rules/no-internal-modules.js
var require_no_internal_modules = __commonJS({
"../../node_modules/.pnpm/eslint-plugin-import-x@0.4.4_patch_hash=4oryti2zfrehz2qi62zyaaa334_eslint@9.4.0_typescript@5.4.5/node_modules/eslint-plugin-import-x/lib/rules/no-internal-modules.js"(exports, module) {
"use strict";
init_shims();
var minimatch_1 = require_cjs();
var utils_1 = require_utils2();
function normalizeSep(somePath) {
return somePath.split("\\").join("/");
}
function toSteps(somePath) {
return normalizeSep(somePath).split("/").filter((step) => step && step !== ".").reduce((acc, step) => {
if (step === "..") {
return acc.slice(0, -1);
}
return [...acc, step];
}, []);
}
var potentialViolationTypes = /* @__PURE__ */ new Set([
"parent",
"index",
"sibling",
"external",
"internal"
]);
module.exports = (0, utils_1.createRule)({
name: "no-internal-modules",
meta: {
type: "suggestion",
docs: {
category: "Static analysis",
description: "Forbid importing the submodules of other modules."
},
schema: [
{
anyOf: [
{
type: "object",
properties: {
allow: {
type: "array",
items: {
type: "string"
}
}
},
additionalProperties: false
},
{
type: "object",
properties: {
forbid: {
type: "array",
items: {
type: "string"
}
}
},
additionalProperties: false
}
]
}
],
messages: {
noAllowed: `Reaching to "{{importPath}}" is not allowed.`
}
},
defaultOptions: [],
create(context) {
const options = context.options[0] || {};
const allowRegexps = (options.allow || []).map((p) => (0, minimatch_1.makeRe)(p)).filter(Boolean);
const forbidRegexps = (options.forbid || []).map((p) => (0, minimatch_1.makeRe)(p)).filter(Boolean);
function reachingAllowed(importPath) {
return allowRegexps.some((re) => re.test(importPath));
}
function reachingForbidden(importPath) {
return forbidRegexps.some((re) => re.test(importPath));
}
function isAllowViolation(importPath) {
const steps = toSteps(importPath);
const nonScopeSteps = steps.filter((step) => step.indexOf("@") !== 0);
if (nonScopeSteps.length <= 1) {
return false;
}
const justSteps = steps.join("/");
if (reachingAllowed(justSteps) || reachingAllowed(`/${justSteps}`)) {
return false;
}
const resolved = (0, utils_1.resolve)(importPath, context);
if (!resolved || reachingAllowed(normalizeSep(resolved))) {
return false;
}
return true;
}
function isForbidViolation(importPath) {
const steps = toSteps(importPath);
const justSteps = steps.join("/");
if (reachingForbidden(justSteps) || reachingForbidden(`/${justSteps}`)) {
return true;
}
const resolved = (0, utils_1.resolve)(importPath, context);
if (resolved && reachingForbidden(normalizeSep(resolved))) {
return true;
}
return false;
}
const isReachViolation = options.forbid ? isForbidViolation : isAllowViolation;
return (0, utils_1.moduleVisitor)((source) => {
const importPath = source.value;
if (potentialViolationTypes.has((0, utils_1.importType)(importPath, context)) && isReachViolation(importPath)) {
context.report({
node: source,
messageId: "noAllowed",
data: {
importPath
}
});
}
}, { commonjs: true });
}
});
}
});
// ../../node_modules/.pnpm/eslint-plugin-import-x@0.4.4_patch_hash=4oryti2zfrehz2qi62zyaaa334_eslint@9.4.0_typescript@5.4.5/node_modules/eslint-plugin-import-x/lib/rules/no-mutable-exports.js
var require_no_mutable_exports = __commonJS({
"../../node_modules/.pnpm/eslint-plugin-import-x@0.4.4_patch_hash=4oryti2zfrehz2qi62zyaaa334_eslint@9.4.0_typescript@5.4.5/node_modules/eslint-plugin-import-x/lib/rules/no-mutable-exports.js"(exports, module) {
"use strict";
init_shims();
var utils_1 = require_utils2();
module.exports = (0, utils_1.createRule)({
name: "no-mutable-exports",
meta: {
type: "suggestion",
docs: {
category: "Helpful warnings",
description: "Forbid the use of mutable exports with `var` or `let`."
},
schema: [],
messages: {
noMutable: "Exporting mutable '{{kind}}' binding, use 'const' instead."
}
},
defaultOptions: [],
create(context) {
function checkDeclaration(node2) {
if ("kind" in node2 && (node2.kind === "var" || node2.kind === "let")) {
context.report({
node: node2,
messageId: "noMutable",
data: {
kind: node2.kind
}
});
}
}
function checkDeclarationsInScope({ variables }, name) {
for (const variable of variables) {
if (variable.name === name) {
for (const def of variable.defs) {
if (def.type === "Variable" && def.parent) {
checkDeclaration(def.parent);
}
}
}
}
}
return {
ExportDefaultDeclaration(node2) {
const scope = (0, utils_1.getScope)(context, node2);
if ("name" in node2.declaration) {
checkDeclarationsInScope(scope, node2.declaration.name);
}
},
ExportNamedDeclaration(node2) {
const scope = (0, utils_1.getScope)(context, node2);
if (node2.declaration) {
checkDeclaration(node2.declaration);
} else if (!node2.source) {
for (const specifier of node2.specifiers) {
checkDeclarationsInScope(scope, specifier.local.name);
}
}
}
};
}
});
}
});
// ../../node_modules/.pnpm/eslint-plugin-import-x@0.4.4_patch_hash=4oryti2zfrehz2qi62zyaaa334_eslint@9.4.0_typescript@5.4.5/node_modules/eslint-plugin-import-x/lib/rules/no-named-as-default.js
var require_no_named_as_default = __commonJS({
"../../node_modules/.pnpm/eslint-plugin-import-x@0.4.4_patch_hash=4oryti2zfrehz2qi62zyaaa334_eslint@9.4.0_typescript@5.4.5/node_modules/eslint-plugin-import-x/lib/rules/no-named-as-default.js"(exports, module) {
"use strict";
init_shims();
var utils_1 = require_utils2();
module.exports = (0, utils_1.createRule)({
name: "no-named-as-default",
meta: {
type: "problem",
docs: {
category: "Helpful warnings",
description: "Forbid use of exported name as identifier of default export."
},
schema: [],
messages: {
default: "Using exported name '{{name}}' as identifier for default export."
}
},
defaultOptions: [],
create(context) {
function checkDefault(nameKey, defaultSpecifier) {
const nameValue = defaultSpecifier[nameKey].name;
if (nameValue === "default") {
return;
}
const declaration = (0, utils_1.importDeclaration)(context, defaultSpecifier);
const imports2 = utils_1.ExportMap.get(declaration.source.value, context);
if (imports2 == null) {
return;
}
if (imports2.errors.length > 0) {
imports2.reportErrors(context, declaration);
return;
}
if (imports2.has("default") && imports2.has(nameValue)) {
context.report({
node: defaultSpecifier,
messageId: "default",
data: {
name: nameValue
}
});
}
}
return {
ImportDefaultSpecifier: checkDefault.bind(null, "local"),
ExportDefaultSpecifier: checkDefault.bind(null, "exported")
};
}
});
}
});
// ../../node_modules/.pnpm/eslint-plugin-import-x@0.4.4_patch_hash=4oryti2zfrehz2qi62zyaaa334_eslint@9.4.0_typescript@5.4.5/node_modules/eslint-plugin-import-x/lib/rules/no-named-as-default-member.js
var require_no_named_as_default_member = __commonJS({
"../../node_modules/.pnpm/eslint-plugin-import-x@0.4.4_patch_hash=4oryti2zfrehz2qi62zyaaa334_eslint@9.4.0_typescript@5.4.5/node_modules/eslint-plugin-import-x/lib/rules/no-named-as-default-member.js"(exports, module) {
"use strict";
init_shims();
var utils_1 = require_utils2();
module.exports = (0, utils_1.createRule)({
name: "no-named-as-default-member",
meta: {
type: "suggestion",
docs: {
category: "Helpful warnings",
description: "Forbid use of exported name as property of default export."
},
schema: [],
messages: {
member: "Caution: `{{objectName}}` also has a named export `{{propName}}`. Check if you meant to write `import {{{propName}}} from '{{sourcePath}}'` instead."
}
},
defaultOptions: [],
create(context) {
const fileImports = /* @__PURE__ */ new Map();
const allPropertyLookups = /* @__PURE__ */ new Map();
function storePropertyLookup(objectName, propName, node2) {
const lookups = allPropertyLookups.get(objectName) || [];
lookups.push({ node: node2, propName });
allPropertyLookups.set(objectName, lookups);
}
return {
ImportDefaultSpecifier(node2) {
const declaration = (0, utils_1.importDeclaration)(context, node2);
const exportMap = utils_1.ExportMap.get(declaration.source.value, context);
if (exportMap == null) {
return;
}
if (exportMap.errors.length > 0) {
exportMap.reportErrors(context, declaration);
return;
}
fileImports.set(node2.local.name, {
exportMap,
sourcePath: declaration.source.value
});
},
MemberExpression(node2) {
if ("name" in node2.object && "name" in node2.property) {
storePropertyLookup(node2.object.name, node2.property.name, node2);
}
},
VariableDeclarator(node2) {
var _a;
const isDestructure = node2.id.type === "ObjectPattern" && ((_a = node2.init) === null || _a === void 0 ? void 0 : _a.type) === "Identifier";
if (!isDestructure || !node2.init || !("name" in node2.init) || !("properties" in node2.id)) {
return;
}
const objectName = node2.init.name;
for (const prop of node2.id.properties) {
if (!("key" in prop) || !("name" in prop.key)) {
continue;
}
storePropertyLookup(objectName, prop.key.name, prop.key);
}
},
"Program:exit"() {
for (const [objectName, lookups] of allPropertyLookups.entries()) {
const fileImport = fileImports.get(objectName);
if (fileImport == null) {
continue;
}
for (const { propName, node: node2 } of lookups) {
if (propName === "default") {
continue;
}
if (!fileImport.exportMap.namespace.has(propName)) {
continue;
}
context.report({
node: node2,
messageId: "member",
data: {
objectName,
propName,
sourcePath: fileImport.sourcePath
}
});
}
}
}
};
}
});
}
});
// ../../node_modules/.pnpm/eslint-plugin-import-x@0.4.4_patch_hash=4oryti2zfrehz2qi62zyaaa334_eslint@9.4.0_typescript@5.4.5/node_modules/eslint-plugin-import-x/lib/rules/no-named-default.js
var require_no_named_default = __commonJS({
"../../node_modules/.pnpm/eslint-plugin-import-x@0.4.4_patch_hash=4oryti2zfrehz2qi62zyaaa334_eslint@9.4.0_typescript@5.4.5/node_modules/eslint-plugin-import-x/lib/rules/no-named-default.js"(exports, module) {
"use strict";
init_shims();
var utils_1 = require_utils2();
module.exports = (0, utils_1.createRule)({
name: "no-named-default",
meta: {
type: "suggestion",
docs: {
category: "Style guide",
description: "Forbid named default exports."
},
schema: [],
messages: {
default: `Use default import syntax to import '{{importName}}'.`
}
},
defaultOptions: [],
create(context) {
return {
ImportDeclaration(node2) {
for (const im of node2.specifiers) {
if ("importKind" in im && (im.importKind === "type" || im.importKind === "typeof")) {
continue;
}
if (im.type === "ImportSpecifier" && (0, utils_1.getValue)(im.imported) === "default") {
context.report({
node: im.local,
messageId: "default",
data: {
importName: im.local.name
}
});
}
}
}
};
}
});
}
});
// ../../node_modules/.pnpm/eslint-plugin-import-x@0.4.4_patch_hash=4oryti2zfrehz2qi62zyaaa334_eslint@9.4.0_typescript@5.4.5/node_modules/eslint-plugin-import-x/lib/rules/no-named-export.js
var require_no_named_export = __commonJS({
"../../node_modules/.pnpm/eslint-plugin-import-x@0.4.4_patch_hash=4oryti2zfrehz2qi62zyaaa334_eslint@9.4.0_typescript@5.4.5/node_modules/eslint-plugin-import-x/lib/rules/no-named-export.js"(exports, module) {
"use strict";
init_shims();
var utils_1 = require_utils2();
module.exports = (0, utils_1.createRule)({
name: "no-named-export",
meta: {
type: "suggestion",
docs: {
category: "Style guide",
description: "Forbid named exports."
},
schema: [],
messages: {
noAllowed: "Named exports are not allowed."
}
},
defaultOptions: [],
create(context) {
if (context.parserOptions.sourceType !== "module") {
return {};
}
return {
ExportAllDeclaration(node2) {
context.report({ node: node2, messageId: "noAllowed" });
},
ExportNamedDeclaration(node2) {
if (node2.specifiers.length === 0) {
return context.report({ node: node2, messageId: "noAllowed" });
}
const someNamed = node2.specifiers.some((specifier) => (specifier.exported.name || "value" in specifier.exported && specifier.exported.value) !== "default");
if (someNamed) {
context.report({ node: node2, messageId: "noAllowed" });
}
}
};
}
});
}
});
// ../../node_modules/.pnpm/eslint-plugin-import-x@0.4.4_patch_hash=4oryti2zfrehz2qi62zyaaa334_eslint@9.4.0_typescript@5.4.5/node_modules/eslint-plugin-import-x/lib/rules/no-namespace.js
var require_no_namespace = __commonJS({
"../../node_modules/.pnpm/eslint-plugin-import-x@0.4.4_patch_hash=4oryti2zfrehz2qi62zyaaa334_eslint@9.4.0_typescript@5.4.5/node_modules/eslint-plugin-import-x/lib/rules/no-namespace.js"(exports, module) {
"use strict";
init_shims();
var eslint_compat_utils_1 = require_dist();
var minimatch_1 = require_cjs();
var utils_1 = require_utils2();
function usesNamespaceAsObject(namespaceIdentifiers) {
return !namespaceIdentifiers.every((identifier) => {
const parent = identifier.parent;
return parent && parent.type === "MemberExpression" && (parent.property.type === "Identifier" || parent.property.type === "Literal");
});
}
function getMemberPropertyName(memberExpression) {
return memberExpression.property.type === "Identifier" ? memberExpression.property.name : memberExpression.property.value;
}
function getVariableNamesInScope(scopeManager, node2) {
let currentNode = node2;
let scope = scopeManager.acquire(currentNode);
while (scope == null) {
currentNode = currentNode.parent;
scope = scopeManager.acquire(currentNode, true);
}
return new Set([...scope.variables, ...scope.upper.variables].map((variable) => variable.name));
}
function generateLocalNames(names, nameConflicts, namespaceName) {
const localNames = {};
for (const name of names) {
let localName;
if (!nameConflicts[name].has(name)) {
localName = name;
} else if (nameConflicts[name].has(`${namespaceName}_${name}`)) {
for (let i = 1; i < Number.POSITIVE_INFINITY; i++) {
if (!nameConflicts[name].has(`${namespaceName}_${name}_${i}`)) {
localName = `${namespaceName}_${name}_${i}`;
break;
}
}
} else {
localName = `${namespaceName}_${name}`;
}
localNames[name] = localName;
}
return localNames;
}
module.exports = (0, utils_1.createRule)({
name: "no-namespace",
meta: {
type: "suggestion",
docs: {
category: "Style guide",
description: 'Forbid namespace (a.k.a. "wildcard" `*`) imports.'
},
fixable: "code",
schema: [
{
type: "object",
properties: {
ignore: {
type: "array",
items: {
type: "string"
},
uniqueItems: true
}
}
}
],
messages: {
noNamespace: "Unexpected namespace import."
}
},
defaultOptions: [],
create(context) {
const firstOption = context.options[0] || {};
const ignoreGlobs = firstOption.ignore;
return {
ImportNamespaceSpecifier(node2) {
if (ignoreGlobs === null || ignoreGlobs === void 0 ? void 0 : ignoreGlobs.find((glob) => (0, minimatch_1.minimatch)(node2.parent.source.value, glob, { matchBase: true }))) {
return;
}
const scopeVariables = (0, utils_1.getScope)(context, node2).variables;
const namespaceVariable = scopeVariables.find((variable) => variable.defs[0].node === node2);
const namespaceReferences = namespaceVariable.references;
const namespaceIdentifiers = namespaceReferences.map((reference) => reference.identifier);
const canFix = namespaceIdentifiers.length > 0 && !usesNamespaceAsObject(namespaceIdentifiers);
context.report({
node: node2,
messageId: `noNamespace`,
fix: canFix ? (fixer) => {
const scopeManager = (0, eslint_compat_utils_1.getSourceCode)(context).scopeManager;
const fixes = [];
const importNameConflicts = {};
for (const identifier of namespaceIdentifiers) {
const parent = identifier.parent;
if (parent && parent.type === "MemberExpression") {
const importName = getMemberPropertyName(parent);
const localConflicts = getVariableNamesInScope(scopeManager, parent);
if (importNameConflicts[importName]) {
for (const c of localConflicts)
importNameConflicts[importName].add(c);
} else {
importNameConflicts[importName] = localConflicts;
}
}
}
const importNames = Object.keys(importNameConflicts);
const importLocalNames = generateLocalNames(importNames, importNameConflicts, namespaceVariable.name);
const namedImportSpecifiers = importNames.map((importName) => importName === importLocalNames[importName] ? importName : `${importName} as ${importLocalNames[importName]}`);
fixes.push(fixer.replaceText(node2, `{ ${namedImportSpecifiers.join(", ")} }`));
for (const identifier of namespaceIdentifiers) {
const parent = identifier.parent;
if (parent && parent.type === "MemberExpression") {
const importName = getMemberPropertyName(parent);
fixes.push(fixer.replaceText(parent, importLocalNames[importName]));
}
}
return fixes;
} : null
});
}
};
}
});
}
});
// ../../node_modules/.pnpm/eslint-plugin-import-x@0.4.4_patch_hash=4oryti2zfrehz2qi62zyaaa334_eslint@9.4.0_typescript@5.4.5/node_modules/eslint-plugin-import-x/lib/rules/no-nodejs-modules.js
var require_no_nodejs_modules = __commonJS({
"../../node_modules/.pnpm/eslint-plugin-import-x@0.4.4_patch_hash=4oryti2zfrehz2qi62zyaaa334_eslint@9.4.0_typescript@5.4.5/node_modules/eslint-plugin-import-x/lib/rules/no-nodejs-modules.js"(exports, module) {
"use strict";
init_shims();
var utils_1 = require_utils2();
module.exports = (0, utils_1.createRule)({
name: "no-nodejs-modules",
meta: {
type: "suggestion",
docs: {
category: "Module systems",
description: "Forbid Node.js builtin modules."
},
schema: [
{
type: "object",
properties: {
allow: {
type: "array",
uniqueItems: true,
items: {
type: "string"
}
}
},
additionalProperties: false
}
],
messages: {
builtin: 'Do not import Node.js builtin module "{{moduleName}}"'
}
},
defaultOptions: [],
create(context) {
const options = context.options[0] || {};
const allowed = options.allow || [];
return (0, utils_1.moduleVisitor)((source, node2) => {
const moduleName = source.value;
if (!allowed.includes(moduleName) && (0, utils_1.importType)(moduleName, context) === "builtin") {
context.report({
node: node2,
messageId: "builtin",
data: {
moduleName
}
});
}
}, { commonjs: true });
}
});
}
});
// ../../node_modules/.pnpm/eslint-plugin-import-x@0.4.4_patch_hash=4oryti2zfrehz2qi62zyaaa334_eslint@9.4.0_typescript@5.4.5/node_modules/eslint-plugin-import-x/lib/rules/no-relative-packages.js
var require_no_relative_packages = __commonJS({
"../../node_modules/.pnpm/eslint-plugin-import-x@0.4.4_patch_hash=4oryti2zfrehz2qi62zyaaa334_eslint@9.4.0_typescript@5.4.5/node_modules/eslint-plugin-import-x/lib/rules/no-relative-packages.js"(exports, module) {
"use strict";
init_shims();
var tslib_1 = (init_tslib_es6(), __toCommonJS(tslib_es6_exports));
var node_path_1 = tslib_1.__importDefault(__require("node:path"));
var eslint_compat_utils_1 = require_dist();
var utils_1 = require_utils2();
function toPosixPath(filePath) {
return filePath.replaceAll("\\", "/");
}
function findNamedPackage(filePath) {
const found = (0, utils_1.readPkgUp)({ cwd: filePath });
if (found.pkg && !found.pkg.name) {
return findNamedPackage(node_path_1.default.resolve(found.path, "../.."));
}
return found;
}
var potentialViolationTypes = /* @__PURE__ */ new Set(["parent", "index", "sibling"]);
function checkImportForRelativePackage(context, importPath, node2) {
if (!potentialViolationTypes.has((0, utils_1.importType)(importPath, context))) {
return;
}
const resolvedImport = (0, utils_1.resolve)(importPath, context);
const resolvedContext = (0, eslint_compat_utils_1.getPhysicalFilename)(context);
if (!resolvedImport || !resolvedContext) {
return;
}
const importPkg = findNamedPackage(resolvedImport);
const contextPkg = findNamedPackage(resolvedContext);
if (importPkg.pkg && contextPkg.pkg && importPkg.pkg.name !== contextPkg.pkg.name) {
const importBaseName = node_path_1.default.basename(importPath);
const importRoot = node_path_1.default.dirname(importPkg.path);
const properPath = node_path_1.default.relative(importRoot, resolvedImport);
const properImport = node_path_1.default.join(importPkg.pkg.name, node_path_1.default.dirname(properPath), importBaseName === node_path_1.default.basename(importRoot) ? "" : importBaseName);
context.report({
node: node2,
messageId: "noAllowed",
data: {
properImport,
importPath
},
fix: (fixer) => fixer.replaceText(node2, JSON.stringify(toPosixPath(properImport)))
});
}
}
module.exports = (0, utils_1.createRule)({
name: "no-relative-packages",
meta: {
type: "suggestion",
docs: {
category: "Static analysis",
description: "Forbid importing packages through relative paths."
},
fixable: "code",
schema: [(0, utils_1.makeOptionsSchema)()],
messages: {
noAllowed: "Relative import from another package is not allowed. Use `{{properImport}}` instead of `{{importPath}}`"
}
},
defaultOptions: [],
create(context) {
return (0, utils_1.moduleVisitor)((source) => checkImportForRelativePackage(context, source.value, source), context.options[0]);
}
});
}
});
// ../../node_modules/.pnpm/eslint-plugin-import-x@0.4.4_patch_hash=4oryti2zfrehz2qi62zyaaa334_eslint@9.4.0_typescript@5.4.5/node_modules/eslint-plugin-import-x/lib/rules/no-relative-parent-imports.js
var require_no_relative_parent_imports = __commonJS({
"../../node_modules/.pnpm/eslint-plugin-import-x@0.4.4_patch_hash=4oryti2zfrehz2qi62zyaaa334_eslint@9.4.0_typescript@5.4.5/node_modules/eslint-plugin-import-x/lib/rules/no-relative-parent-imports.js"(exports, module) {
"use strict";
init_shims();
var tslib_1 = (init_tslib_es6(), __toCommonJS(tslib_es6_exports));
var node_path_1 = tslib_1.__importDefault(__require("node:path"));
var eslint_compat_utils_1 = require_dist();
var utils_1 = require_utils2();
module.exports = (0, utils_1.createRule)({
name: "no-relative-parent-imports",
meta: {
type: "suggestion",
docs: {
category: "Static analysis",
description: "Forbid importing modules from parent directories."
},
schema: [(0, utils_1.makeOptionsSchema)()],
messages: {
noAllowed: "Relative imports from parent directories are not allowed. Please either pass what you're importing through at runtime (dependency injection), move `{{filename}}` to same directory as `{{depPath}}` or consider making `{{depPath}}` a package."
}
},
defaultOptions: [],
create(context) {
const filename = (0, eslint_compat_utils_1.getPhysicalFilename)(context);
if (filename === "<text>") {
return {};
}
return (0, utils_1.moduleVisitor)((sourceNode) => {
const depPath = sourceNode.value;
if ((0, utils_1.importType)(depPath, context) === "external") {
return;
}
const absDepPath = (0, utils_1.resolve)(depPath, context);
if (!absDepPath) {
return;
}
const relDepPath = node_path_1.default.relative(node_path_1.default.dirname(filename), absDepPath);
if ((0, utils_1.importType)(relDepPath, context) === "parent") {
context.report({
node: sourceNode,
messageId: "noAllowed",
data: {
filename: node_path_1.default.basename(filename),
depPath
}
});
}
}, context.options[0]);
}
});
}
});
// ../../node_modules/.pnpm/is-extglob@2.1.1/node_modules/is-extglob/index.js
var require_is_extglob = __commonJS({
"../../node_modules/.pnpm/is-extglob@2.1.1/node_modules/is-extglob/index.js"(exports, module) {
"use strict";
init_shims();
module.exports = function isExtglob(str) {
if (typeof str !== "string" || str === "") {
return false;
}
var match;
while (match = /(\\).|([@?!+*]\(.*\))/g.exec(str)) {
if (match[2]) return true;
str = str.slice(match.index + match[0].length);
}
return false;
};
}
});
// ../../node_modules/.pnpm/is-glob@4.0.3/node_modules/is-glob/index.js
var require_is_glob = __commonJS({
"../../node_modules/.pnpm/is-glob@4.0.3/node_modules/is-glob/index.js"(exports, module) {
"use strict";
init_shims();
var isExtglob = require_is_extglob();
var chars = { "{": "}", "(": ")", "[": "]" };
var strictCheck = function(str) {
if (str[0] === "!") {
return true;
}
var index = 0;
var pipeIndex = -2;
var closeSquareIndex = -2;
var closeCurlyIndex = -2;
var closeParenIndex = -2;
var backSlashIndex = -2;
while (index < str.length) {
if (str[index] === "*") {
return true;
}
if (str[index + 1] === "?" && /[\].+)]/.test(str[index])) {
return true;
}
if (closeSquareIndex !== -1 && str[index] === "[" && str[index + 1] !== "]") {
if (closeSquareIndex < index) {
closeSquareIndex = str.indexOf("]", index);
}
if (closeSquareIndex > index) {
if (backSlashIndex === -1 || backSlashIndex > closeSquareIndex) {
return true;
}
backSlashIndex = str.indexOf("\\", index);
if (backSlashIndex === -1 || backSlashIndex > closeSquareIndex) {
return true;
}
}
}
if (closeCurlyIndex !== -1 && str[index] === "{" && str[index + 1] !== "}") {
closeCurlyIndex = str.indexOf("}", index);
if (closeCurlyIndex > index) {
backSlashIndex = str.indexOf("\\", index);
if (backSlashIndex === -1 || backSlashIndex > closeCurlyIndex) {
return true;
}
}
}
if (closeParenIndex !== -1 && str[index] === "(" && str[index + 1] === "?" && /[:!=]/.test(str[index + 2]) && str[index + 3] !== ")") {
closeParenIndex = str.indexOf(")", index);
if (closeParenIndex > index) {
backSlashIndex = str.indexOf("\\", index);
if (backSlashIndex === -1 || backSlashIndex > closeParenIndex) {
return true;
}
}
}
if (pipeIndex !== -1 && str[index] === "(" && str[index + 1] !== "|") {
if (pipeIndex < index) {
pipeIndex = str.indexOf("|", index);
}
if (pipeIndex !== -1 && str[pipeIndex + 1] !== ")") {
closeParenIndex = str.indexOf(")", pipeIndex);
if (closeParenIndex > pipeIndex) {
backSlashIndex = str.indexOf("\\", pipeIndex);
if (backSlashIndex === -1 || backSlashIndex > closeParenIndex) {
return true;
}
}
}
}
if (str[index] === "\\") {
var open = str[index + 1];
index += 2;
var close = chars[open];
if (close) {
var n = str.indexOf(close, index);
if (n !== -1) {
index = n + 1;
}
}
if (str[index] === "!") {
return true;
}
} else {
index++;
}
}
return false;
};
var relaxedCheck = function(str) {
if (str[0] === "!") {
return true;
}
var index = 0;
while (index < str.length) {
if (/[*?{}()[\]]/.test(str[index])) {
return true;
}
if (str[index] === "\\") {
var open = str[index + 1];
index += 2;
var close = chars[open];
if (close) {
var n = str.indexOf(close, index);
if (n !== -1) {
index = n + 1;
}
}
if (str[index] === "!") {
return true;
}
} else {
index++;
}
}
return false;
};
module.exports = function isGlob(str, options) {
if (typeof str !== "string" || str === "") {
return false;
}
if (isExtglob(str)) {
return true;
}
var check = strictCheck;
if (options && options.strict === false) {
check = relaxedCheck;
}
return check(str);
};
}
});
// ../../node_modules/.pnpm/eslint-plugin-import-x@0.4.4_patch_hash=4oryti2zfrehz2qi62zyaaa334_eslint@9.4.0_typescript@5.4.5/node_modules/eslint-plugin-import-x/lib/rules/no-restricted-paths.js
var require_no_restricted_paths = __commonJS({
"../../node_modules/.pnpm/eslint-plugin-import-x@0.4.4_patch_hash=4oryti2zfrehz2qi62zyaaa334_eslint@9.4.0_typescript@5.4.5/node_modules/eslint-plugin-import-x/lib/rules/no-restricted-paths.js"(exports, module) {
"use strict";
init_shims();
var tslib_1 = (init_tslib_es6(), __toCommonJS(tslib_es6_exports));
var node_path_1 = tslib_1.__importDefault(__require("node:path"));
var eslint_compat_utils_1 = require_dist();
var is_glob_1 = tslib_1.__importDefault(require_is_glob());
var minimatch_1 = require_cjs();
var utils_1 = require_utils2();
var containsPath = (filepath, target) => {
const relative = node_path_1.default.relative(target, filepath);
return relative === "" || !relative.startsWith("..");
};
function isMatchingTargetPath(filename, targetPath) {
if ((0, is_glob_1.default)(targetPath)) {
const mm = new minimatch_1.Minimatch(targetPath);
return mm.match(filename);
}
return containsPath(filename, targetPath);
}
function areBothGlobPatternAndAbsolutePath(areGlobPatterns) {
return areGlobPatterns.some(Boolean) && areGlobPatterns.some((isGlob) => !isGlob);
}
module.exports = (0, utils_1.createRule)({
name: "no-restricted-paths",
meta: {
type: "problem",
docs: {
category: "Static analysis",
description: "Enforce which files can be imported in a given folder."
},
schema: [
{
type: "object",
properties: {
zones: {
type: "array",
minItems: 1,
items: {
type: "object",
properties: {
target: {
anyOf: [
{ type: "string" },
{
type: "array",
items: { type: "string" },
uniqueItems: true,
minLength: 1
}
]
},
from: {
anyOf: [
{ type: "string" },
{
type: "array",
items: { type: "string" },
uniqueItems: true,
minLength: 1
}
]
},
except: {
type: "array",
items: {
type: "string"
},
uniqueItems: true
},
message: { type: "string" }
},
additionalProperties: false
}
},
basePath: { type: "string" }
},
additionalProperties: false
}
],
messages: {
path: "Restricted path exceptions must be descendants of the configured `from` path for that zone.",
mixedGlob: "Restricted path `from` must contain either only glob patterns or none",
glob: "Restricted path exceptions must be glob patterns when `from` contains glob patterns",
zone: 'Unexpected path "{{importPath}}" imported in restricted zone.{{extra}}'
}
},
defaultOptions: [],
create(context) {
const options = context.options[0] || {};
const restrictedPaths = options.zones || [];
const basePath = options.basePath || process.cwd();
const currentFilename = (0, eslint_compat_utils_1.getPhysicalFilename)(context);
const matchingZones = restrictedPaths.filter((zone) => [zone.target].flat().map((target) => node_path_1.default.resolve(basePath, target)).some((targetPath) => isMatchingTargetPath(currentFilename, targetPath)));
function isValidExceptionPath(absoluteFromPath, absoluteExceptionPath) {
const relativeExceptionPath = node_path_1.default.relative(absoluteFromPath, absoluteExceptionPath);
return (0, utils_1.importType)(relativeExceptionPath, context) !== "parent";
}
function reportInvalidExceptionPath(node2) {
context.report({
node: node2,
messageId: "path"
});
}
function reportInvalidExceptionMixedGlobAndNonGlob(node2) {
context.report({
node: node2,
messageId: "mixedGlob"
});
}
function reportInvalidExceptionGlob(node2) {
context.report({
node: node2,
messageId: "glob"
});
}
function computeMixedGlobAndAbsolutePathValidator() {
return {
isPathRestricted: () => true,
hasValidExceptions: false,
reportInvalidException: reportInvalidExceptionMixedGlobAndNonGlob
};
}
function computeGlobPatternPathValidator(absoluteFrom, zoneExcept) {
let isPathException;
const mm = new minimatch_1.Minimatch(absoluteFrom);
const isPathRestricted = (absoluteImportPath) => mm.match(absoluteImportPath);
const hasValidExceptions = zoneExcept.every((it) => (0, is_glob_1.default)(it));
if (hasValidExceptions) {
const exceptionsMm = zoneExcept.map((except) => new minimatch_1.Minimatch(except));
isPathException = (absoluteImportPath) => exceptionsMm.some((mm2) => mm2.match(absoluteImportPath));
}
const reportInvalidException = reportInvalidExceptionGlob;
return {
isPathRestricted,
hasValidExceptions,
isPathException,
reportInvalidException
};
}
function computeAbsolutePathValidator(absoluteFrom, zoneExcept) {
let isPathException;
const isPathRestricted = (absoluteImportPath) => containsPath(absoluteImportPath, absoluteFrom);
const absoluteExceptionPaths = zoneExcept.map((exceptionPath) => node_path_1.default.resolve(absoluteFrom, exceptionPath));
const hasValidExceptions = absoluteExceptionPaths.every((absoluteExceptionPath) => isValidExceptionPath(absoluteFrom, absoluteExceptionPath));
if (hasValidExceptions) {
isPathException = (absoluteImportPath) => absoluteExceptionPaths.some((absoluteExceptionPath) => containsPath(absoluteImportPath, absoluteExceptionPath));
}
const reportInvalidException = reportInvalidExceptionPath;
return {
isPathRestricted,
hasValidExceptions,
isPathException,
reportInvalidException
};
}
function reportInvalidExceptions(validators2, node2) {
for (const validator of validators2)
validator.reportInvalidException(node2);
}
function reportImportsInRestrictedZone(validators2, node2, importPath, customMessage) {
for (const _ of validators2) {
context.report({
node: node2,
messageId: "zone",
data: {
importPath,
extra: customMessage ? ` ${customMessage}` : ""
}
});
}
}
const makePathValidators = (zoneFrom, zoneExcept = []) => {
const allZoneFrom = [zoneFrom].flat();
const areGlobPatterns = allZoneFrom.map((it) => (0, is_glob_1.default)(it));
if (areBothGlobPatternAndAbsolutePath(areGlobPatterns)) {
return [computeMixedGlobAndAbsolutePathValidator()];
}
const isGlobPattern = areGlobPatterns.every(Boolean);
return allZoneFrom.map((singleZoneFrom) => {
const absoluteFrom = node_path_1.default.resolve(basePath, singleZoneFrom);
if (isGlobPattern) {
return computeGlobPatternPathValidator(absoluteFrom, zoneExcept);
}
return computeAbsolutePathValidator(absoluteFrom, zoneExcept);
});
};
const validators = [];
return (0, utils_1.moduleVisitor)((source) => {
const importPath = source.value;
const absoluteImportPath = (0, utils_1.resolve)(importPath, context);
if (!absoluteImportPath) {
return;
}
for (const [index, zone] of matchingZones.entries()) {
if (!validators[index]) {
validators[index] = makePathValidators(zone.from, zone.except);
}
const applicableValidatorsForImportPath = validators[index].filter((validator) => validator.isPathRestricted(absoluteImportPath));
const validatorsWithInvalidExceptions = applicableValidatorsForImportPath.filter((validator) => !validator.hasValidExceptions);
reportInvalidExceptions(validatorsWithInvalidExceptions, source);
const applicableValidatorsForImportPathExcludingExceptions = applicableValidatorsForImportPath.filter((validator) => validator.hasValidExceptions && !validator.isPathException(absoluteImportPath));
reportImportsInRestrictedZone(applicableValidatorsForImportPathExcludingExceptions, source, importPath, zone.message);
}
}, { commonjs: true });
}
});
}
});
// ../../node_modules/.pnpm/eslint-plugin-import-x@0.4.4_patch_hash=4oryti2zfrehz2qi62zyaaa334_eslint@9.4.0_typescript@5.4.5/node_modules/eslint-plugin-import-x/lib/rules/no-self-import.js
var require_no_self_import = __commonJS({
"../../node_modules/.pnpm/eslint-plugin-import-x@0.4.4_patch_hash=4oryti2zfrehz2qi62zyaaa334_eslint@9.4.0_typescript@5.4.5/node_modules/eslint-plugin-import-x/lib/rules/no-self-import.js"(exports, module) {
"use strict";
init_shims();
var eslint_compat_utils_1 = require_dist();
var utils_1 = require_utils2();
function isImportingSelf(context, node2, requireName) {
const filePath = (0, eslint_compat_utils_1.getPhysicalFilename)(context);
if (filePath !== "<text>" && filePath === (0, utils_1.resolve)(requireName, context)) {
context.report({
node: node2,
messageId: "self"
});
}
}
module.exports = (0, utils_1.createRule)({
name: "no-self-import",
meta: {
type: "problem",
docs: {
category: "Static analysis",
description: "Forbid a module from importing itself.",
recommended: true
},
schema: [],
messages: {
self: "Module imports itself."
}
},
defaultOptions: [],
create(context) {
return (0, utils_1.moduleVisitor)((source, node2) => {
isImportingSelf(context, node2, source.value);
}, { commonjs: true });
}
});
}
});
// ../../node_modules/.pnpm/eslint-plugin-import-x@0.4.4_patch_hash=4oryti2zfrehz2qi62zyaaa334_eslint@9.4.0_typescript@5.4.5/node_modules/eslint-plugin-import-x/lib/rules/no-unassigned-import.js
var require_no_unassigned_import = __commonJS({
"../../node_modules/.pnpm/eslint-plugin-import-x@0.4.4_patch_hash=4oryti2zfrehz2qi62zyaaa334_eslint@9.4.0_typescript@5.4.5/node_modules/eslint-plugin-import-x/lib/rules/no-unassigned-import.js"(exports, module) {
"use strict";
init_shims();
var tslib_1 = (init_tslib_es6(), __toCommonJS(tslib_es6_exports));
var node_path_1 = tslib_1.__importDefault(__require("node:path"));
var eslint_compat_utils_1 = require_dist();
var minimatch_1 = require_cjs();
var utils_1 = require_utils2();
function testIsAllow(globs, filename, source) {
if (!Array.isArray(globs)) {
return false;
}
const filePath = source[0] !== "." && source[0] !== "/" ? source : node_path_1.default.resolve(node_path_1.default.dirname(filename), source);
return globs.some((glob) => (0, minimatch_1.minimatch)(filePath, glob) || (0, minimatch_1.minimatch)(filePath, node_path_1.default.resolve(glob)));
}
module.exports = (0, utils_1.createRule)({
name: "no-unassigned-import",
meta: {
type: "suggestion",
docs: {
category: "Style guide",
description: "Forbid unassigned imports."
},
schema: [
{
type: "object",
properties: {
devDependencies: { type: ["boolean", "array"] },
optionalDependencies: { type: ["boolean", "array"] },
peerDependencies: { type: ["boolean", "array"] },
allow: {
type: "array",
items: {
type: "string"
}
}
},
additionalProperties: false
}
],
messages: {
unassigned: "Imported module should be assigned"
}
},
defaultOptions: [],
create(context) {
const options = context.options[0] || {};
const filename = (0, eslint_compat_utils_1.getPhysicalFilename)(context);
const isAllow = (source) => testIsAllow(options.allow, filename, source);
return {
ImportDeclaration(node2) {
if (node2.specifiers.length === 0 && !isAllow(node2.source.value)) {
context.report({
node: node2,
messageId: "unassigned"
});
}
},
ExpressionStatement(node2) {
if (node2.expression.type === "CallExpression" && (0, utils_1.isStaticRequire)(node2.expression) && "value" in node2.expression.arguments[0] && typeof node2.expression.arguments[0].value === "string" && !isAllow(node2.expression.arguments[0].value)) {
context.report({
node: node2.expression,
messageId: "unassigned"
});
}
}
};
}
});
}
});
// ../../node_modules/.pnpm/eslint-plugin-import-x@0.4.4_patch_hash=4oryti2zfrehz2qi62zyaaa334_eslint@9.4.0_typescript@5.4.5/node_modules/eslint-plugin-import-x/lib/rules/no-unresolved.js
var require_no_unresolved = __commonJS({
"../../node_modules/.pnpm/eslint-plugin-import-x@0.4.4_patch_hash=4oryti2zfrehz2qi62zyaaa334_eslint@9.4.0_typescript@5.4.5/node_modules/eslint-plugin-import-x/lib/rules/no-unresolved.js"(exports, module) {
"use strict";
init_shims();
var utils_1 = require_utils2();
module.exports = (0, utils_1.createRule)({
name: "no-unresolved",
meta: {
type: "problem",
docs: {
category: "Static analysis",
description: "Ensure imports point to a file/module that can be resolved."
},
schema: [
(0, utils_1.makeOptionsSchema)({
caseSensitive: { type: "boolean", default: true },
caseSensitiveStrict: { type: "boolean" }
})
],
messages: {
unresolved: "Unable to resolve path to module '{{module}}'.",
casingMismatch: "Casing of {{module}} does not match the underlying filesystem."
}
},
defaultOptions: [],
create(context) {
const options = context.options[0] || {};
return (0, utils_1.moduleVisitor)(function checkSourceValue(source, node2) {
if ("importKind" in node2 && node2.importKind === "type" || "exportKind" in node2 && node2.exportKind === "type") {
return;
}
const caseSensitive = !utils_1.CASE_SENSITIVE_FS && options.caseSensitive !== false;
const caseSensitiveStrict = !utils_1.CASE_SENSITIVE_FS && options.caseSensitiveStrict;
const resolvedPath = (0, utils_1.resolve)(source.value, context);
if (resolvedPath === void 0) {
context.report({
node: source,
messageId: "unresolved",
data: {
module: source.value
}
});
} else if (caseSensitive || caseSensitiveStrict) {
const cacheSettings = utils_1.ModuleCache.getSettings(context.settings);
if (!(0, utils_1.fileExistsWithCaseSync)(resolvedPath, cacheSettings, caseSensitiveStrict)) {
context.report({
node: source,
messageId: "casingMismatch",
data: {
module: source.value
}
});
}
}
}, options);
}
});
}
});
// ../../node_modules/.pnpm/eslint-plugin-import-x@0.4.4_patch_hash=4oryti2zfrehz2qi62zyaaa334_eslint@9.4.0_typescript@5.4.5/node_modules/eslint-plugin-import-x/lib/rules/no-unused-modules.js
var require_no_unused_modules = __commonJS({
"../../node_modules/.pnpm/eslint-plugin-import-x@0.4.4_patch_hash=4oryti2zfrehz2qi62zyaaa334_eslint@9.4.0_typescript@5.4.5/node_modules/eslint-plugin-import-x/lib/rules/no-unused-modules.js"(exports, module) {
"use strict";
init_shims();
var tslib_1 = (init_tslib_es6(), __toCommonJS(tslib_es6_exports));
var node_path_1 = tslib_1.__importDefault(__require("node:path"));
var utils_1 = require_dist5();
var eslint_compat_utils_1 = require_dist();
var utils_2 = require_utils2();
function listFilesToProcess(src, extensions) {
let FileEnumerator;
try {
;
({ FileEnumerator } = __require("eslint/use-at-your-own-risk"));
} catch (_a) {
;
({ FileEnumerator } = __require("eslint/lib/cli-engine/file-enumerator"));
}
const enumerator = new FileEnumerator({
extensions
});
return Array.from(enumerator.iterateFiles(src), ({ filePath, ignored }) => ({
ignored,
filename: filePath
}));
}
var DEFAULT = "default";
var { AST_NODE_TYPES } = utils_1.TSESTree;
function forEachDeclarationIdentifier(declaration, cb) {
if (declaration) {
if (declaration.type === AST_NODE_TYPES.FunctionDeclaration || declaration.type === AST_NODE_TYPES.ClassDeclaration || declaration.type === AST_NODE_TYPES.TSInterfaceDeclaration || declaration.type === AST_NODE_TYPES.TSTypeAliasDeclaration || declaration.type === AST_NODE_TYPES.TSEnumDeclaration) {
cb(declaration.id.name);
} else if (declaration.type === AST_NODE_TYPES.VariableDeclaration) {
for (const { id } of declaration.declarations) {
if (id.type === AST_NODE_TYPES.ObjectPattern) {
(0, utils_2.recursivePatternCapture)(id, (pattern) => {
if (pattern.type === AST_NODE_TYPES.Identifier) {
cb(pattern.name);
}
});
} else if (id.type === AST_NODE_TYPES.ArrayPattern) {
for (const el of id.elements) {
if ((el === null || el === void 0 ? void 0 : el.type) === AST_NODE_TYPES.Identifier) {
cb(el.name);
}
}
} else {
cb(id.name);
}
}
}
}
}
var importList = /* @__PURE__ */ new Map();
var exportList = /* @__PURE__ */ new Map();
var visitorKeyMap = /* @__PURE__ */ new Map();
var ignoredFiles = /* @__PURE__ */ new Set();
var filesOutsideSrc = /* @__PURE__ */ new Set();
var isNodeModule = (path) => /([/\\])(node_modules)\1/.test(path);
var resolveFiles = (src, ignoreExports, context) => {
const extensions = [...(0, utils_2.getFileExtensions)(context.settings)];
const srcFileList = listFilesToProcess(src, extensions);
const ignoredFilesList = listFilesToProcess(ignoreExports, extensions);
for (const { filename } of ignoredFilesList)
ignoredFiles.add(filename);
return new Set(srcFileList.flatMap(({ filename }) => isNodeModule(filename) ? [] : filename));
};
var prepareImportsAndExports = (srcFiles2, context) => {
const exportAll = /* @__PURE__ */ new Map();
for (const file of srcFiles2) {
const exports2 = /* @__PURE__ */ new Map();
const imports2 = /* @__PURE__ */ new Map();
const currentExports = utils_2.ExportMap.get(file, context);
if (currentExports) {
const { dependencies, reexports, imports: localImportList, namespace, visitorKeys } = currentExports;
visitorKeyMap.set(file, visitorKeys);
const currentExportAll = /* @__PURE__ */ new Set();
for (const getDependency of dependencies) {
const dependency = getDependency();
if (dependency === null) {
continue;
}
currentExportAll.add(dependency.path);
}
exportAll.set(file, currentExportAll);
for (const [key, value] of reexports.entries()) {
if (key === DEFAULT) {
exports2.set(AST_NODE_TYPES.ImportDefaultSpecifier, {
whereUsed: /* @__PURE__ */ new Set()
});
} else {
exports2.set(key, { whereUsed: /* @__PURE__ */ new Set() });
}
const reexport = value.getImport();
if (!reexport) {
continue;
}
let localImport = imports2.get(reexport.path);
const currentValue = value.local === DEFAULT ? AST_NODE_TYPES.ImportDefaultSpecifier : value.local;
localImport = localImport === void 0 ? /* @__PURE__ */ new Set([currentValue]) : /* @__PURE__ */ new Set([...localImport, currentValue]);
imports2.set(reexport.path, localImport);
}
for (const [key, value] of localImportList.entries()) {
if (isNodeModule(key)) {
continue;
}
const localImport = imports2.get(key) || /* @__PURE__ */ new Set();
for (const { importedSpecifiers } of value.declarations) {
for (const specifier of importedSpecifiers) {
localImport.add(specifier);
}
}
imports2.set(key, localImport);
}
importList.set(file, imports2);
if (ignoredFiles.has(file)) {
continue;
}
for (const [key, _value] of namespace.entries()) {
if (key === DEFAULT) {
exports2.set(AST_NODE_TYPES.ImportDefaultSpecifier, {
whereUsed: /* @__PURE__ */ new Set()
});
} else {
exports2.set(key, { whereUsed: /* @__PURE__ */ new Set() });
}
}
}
exports2.set(AST_NODE_TYPES.ExportAllDeclaration, {
whereUsed: /* @__PURE__ */ new Set()
});
exports2.set(AST_NODE_TYPES.ImportNamespaceSpecifier, {
whereUsed: /* @__PURE__ */ new Set()
});
exportList.set(file, exports2);
}
for (const [key, value] of exportAll.entries()) {
for (const val of value) {
const currentExports = exportList.get(val);
if (currentExports) {
const currentExport = currentExports.get(AST_NODE_TYPES.ExportAllDeclaration);
currentExport.whereUsed.add(key);
}
}
}
};
var determineUsage = () => {
for (const [listKey, listValue] of importList.entries()) {
for (const [key, value] of listValue.entries()) {
const exports2 = exportList.get(key);
if (exports2 !== void 0) {
for (const currentImport of value) {
let specifier;
if (currentImport === AST_NODE_TYPES.ImportNamespaceSpecifier) {
specifier = AST_NODE_TYPES.ImportNamespaceSpecifier;
} else if (currentImport === AST_NODE_TYPES.ImportDefaultSpecifier) {
specifier = AST_NODE_TYPES.ImportDefaultSpecifier;
} else {
specifier = currentImport;
}
if (specifier !== void 0) {
const exportStatement = exports2.get(specifier);
if (exportStatement !== void 0) {
const { whereUsed } = exportStatement;
whereUsed.add(listKey);
exports2.set(specifier, { whereUsed });
}
}
}
}
}
}
};
var getSrc = (src) => {
if (src) {
return src;
}
return [process.cwd()];
};
var srcFiles;
var lastPrepareKey;
var doPreparation = (src = [], ignoreExports, context) => {
const prepareKey = JSON.stringify({
src: src.sort(),
ignoreExports: (ignoreExports || []).sort(),
extensions: [...(0, utils_2.getFileExtensions)(context.settings)].sort()
});
if (prepareKey === lastPrepareKey) {
return;
}
importList.clear();
exportList.clear();
ignoredFiles.clear();
filesOutsideSrc.clear();
srcFiles = resolveFiles(getSrc(src), ignoreExports, context);
prepareImportsAndExports(srcFiles, context);
determineUsage();
lastPrepareKey = prepareKey;
};
var newNamespaceImportExists = (specifiers) => specifiers.some(({ type }) => type === AST_NODE_TYPES.ImportNamespaceSpecifier);
var newDefaultImportExists = (specifiers) => specifiers.some(({ type }) => type === AST_NODE_TYPES.ImportDefaultSpecifier);
var fileIsInPkg = (file) => {
const { pkg, path: pkgPath } = (0, utils_2.readPkgUp)({ cwd: file });
const basePath = node_path_1.default.dirname(pkgPath);
const checkPkgFieldString = (pkgField) => {
if (node_path_1.default.join(basePath, pkgField) === file) {
return true;
}
};
const checkPkgFieldObject = (pkgField) => {
const pkgFieldFiles = Object.values(pkgField).flatMap((value) => typeof value === "boolean" ? [] : node_path_1.default.join(basePath, value));
if (pkgFieldFiles.includes(file)) {
return true;
}
};
const checkPkgField = (pkgField) => {
if (typeof pkgField === "string") {
return checkPkgFieldString(pkgField);
}
if (typeof pkgField === "object") {
return checkPkgFieldObject(pkgField);
}
};
if (!pkg) {
return false;
}
if (pkg.private === true) {
return false;
}
if (pkg.bin && checkPkgField(pkg.bin)) {
return true;
}
if (pkg.browser && checkPkgField(pkg.browser)) {
return true;
}
if (pkg.main && checkPkgFieldString(pkg.main)) {
return true;
}
return false;
};
module.exports = (0, utils_2.createRule)({
name: "no-unused-modules",
meta: {
type: "suggestion",
docs: {
category: "Helpful warnings",
description: "Forbid modules without exports, or exports without matching import in another module."
},
schema: [
{
properties: {
src: {
description: "files/paths to be analyzed (only for unused exports)",
type: "array",
uniqueItems: true,
items: {
type: "string",
minLength: 1
}
},
ignoreExports: {
description: "files/paths for which unused exports will not be reported (e.g module entry points)",
type: "array",
uniqueItems: true,
items: {
type: "string",
minLength: 1
}
},
missingExports: {
description: "report modules without any exports",
type: "boolean"
},
unusedExports: {
description: "report exports without any usage",
type: "boolean"
}
},
anyOf: [
{
properties: {
unusedExports: { enum: [true] },
src: {
minItems: 1
}
},
required: ["unusedExports"]
},
{
properties: {
missingExports: { enum: [true] }
},
required: ["missingExports"]
}
]
}
],
messages: {
notFound: "No exports found",
unused: "exported declaration '{{value}}' not used within other modules"
}
},
defaultOptions: [],
create(context) {
const { src, ignoreExports = [], missingExports, unusedExports } = context.options[0] || {};
if (unusedExports) {
doPreparation(src, ignoreExports, context);
}
const file = (0, eslint_compat_utils_1.getPhysicalFilename)(context);
const checkExportPresence = (node2) => {
var _a;
if (!missingExports) {
return;
}
if (ignoredFiles.has(file)) {
return;
}
const exportCount = exportList.get(file);
const exportAll = exportCount.get(AST_NODE_TYPES.ExportAllDeclaration);
const namespaceImports = exportCount.get(AST_NODE_TYPES.ImportNamespaceSpecifier);
exportCount.delete(AST_NODE_TYPES.ExportAllDeclaration);
exportCount.delete(AST_NODE_TYPES.ImportNamespaceSpecifier);
if (exportCount.size === 0) {
context.report({
node: (_a = node2.body[0]) !== null && _a !== void 0 ? _a : node2,
messageId: "notFound"
});
}
exportCount.set(AST_NODE_TYPES.ExportAllDeclaration, exportAll);
exportCount.set(AST_NODE_TYPES.ImportNamespaceSpecifier, namespaceImports);
};
const checkUsage = (node2, exportedValue) => {
if (!unusedExports) {
return;
}
if (ignoredFiles.has(file)) {
return;
}
if (fileIsInPkg(file)) {
return;
}
if (filesOutsideSrc.has(file)) {
return;
}
if (!srcFiles.has(file)) {
srcFiles = resolveFiles(getSrc(src), ignoreExports, context);
if (!srcFiles.has(file)) {
filesOutsideSrc.add(file);
return;
}
}
const exports2 = exportList.get(file);
if (!exports2) {
console.error(`file \`${file}\` has no exports. Please update to the latest, and if it still happens, report this on https://github.com/import-js/eslint-plugin-import/issues/2866!`);
return;
}
const exportAll = exports2.get(AST_NODE_TYPES.ExportAllDeclaration);
if (exportAll !== void 0 && exportedValue !== AST_NODE_TYPES.ImportDefaultSpecifier && exportAll.whereUsed.size > 0) {
return;
}
const namespaceImports = exports2.get(AST_NODE_TYPES.ImportNamespaceSpecifier);
if (namespaceImports !== void 0 && namespaceImports.whereUsed.size > 0) {
return;
}
const exportsKey = exportedValue === DEFAULT ? AST_NODE_TYPES.ImportDefaultSpecifier : exportedValue;
const exportStatement = exports2.get(exportsKey);
const value = exportsKey === AST_NODE_TYPES.ImportDefaultSpecifier ? DEFAULT : exportsKey;
if (exportStatement === void 0) {
context.report({
node: node2,
messageId: "unused",
data: {
value
}
});
} else {
if (exportStatement.whereUsed.size === 0) {
context.report({
node: node2,
messageId: "unused",
data: {
value
}
});
}
}
};
const updateExportUsage = (node2) => {
var _a, _b;
if (ignoredFiles.has(file)) {
return;
}
const exports2 = (_a = exportList.get(file)) !== null && _a !== void 0 ? _a : /* @__PURE__ */ new Map();
const newExports = /* @__PURE__ */ new Map();
const newExportIdentifiers = /* @__PURE__ */ new Set();
for (const s of node2.body) {
if (s.type === AST_NODE_TYPES.ExportDefaultDeclaration) {
newExportIdentifiers.add(AST_NODE_TYPES.ImportDefaultSpecifier);
}
if (s.type === AST_NODE_TYPES.ExportNamedDeclaration) {
if (s.specifiers.length > 0) {
for (const specifier of s.specifiers) {
if (specifier.exported) {
newExportIdentifiers.add((0, utils_2.getValue)(specifier.exported));
}
}
}
forEachDeclarationIdentifier(s.declaration, (name) => {
newExportIdentifiers.add(name);
});
}
}
for (const [key, value] of exports2.entries()) {
if (newExportIdentifiers.has(key)) {
newExports.set(key, value);
}
}
for (const key of newExportIdentifiers) {
if (!exports2.has(key)) {
newExports.set(key, { whereUsed: /* @__PURE__ */ new Set() });
}
}
const exportAll = exports2.get(AST_NODE_TYPES.ExportAllDeclaration);
const namespaceImports = (_b = exports2.get(AST_NODE_TYPES.ImportNamespaceSpecifier)) !== null && _b !== void 0 ? _b : { whereUsed: /* @__PURE__ */ new Set() };
newExports.set(AST_NODE_TYPES.ExportAllDeclaration, exportAll);
newExports.set(AST_NODE_TYPES.ImportNamespaceSpecifier, namespaceImports);
exportList.set(file, newExports);
};
const updateImportUsage = (node2) => {
var _a, _b;
if (!unusedExports) {
return;
}
const oldImportPaths = (_a = importList.get(file)) !== null && _a !== void 0 ? _a : /* @__PURE__ */ new Map();
const oldNamespaceImports = /* @__PURE__ */ new Set();
const newNamespaceImports = /* @__PURE__ */ new Set();
const oldExportAll = /* @__PURE__ */ new Set();
const newExportAll = /* @__PURE__ */ new Set();
const oldDefaultImports = /* @__PURE__ */ new Set();
const newDefaultImports = /* @__PURE__ */ new Set();
const oldImports = /* @__PURE__ */ new Map();
const newImports = /* @__PURE__ */ new Map();
for (const [key, value] of oldImportPaths.entries()) {
if (value.has(AST_NODE_TYPES.ExportAllDeclaration)) {
oldExportAll.add(key);
}
if (value.has(AST_NODE_TYPES.ImportNamespaceSpecifier)) {
oldNamespaceImports.add(key);
}
if (value.has(AST_NODE_TYPES.ImportDefaultSpecifier)) {
oldDefaultImports.add(key);
}
for (const val of value) {
if (val !== AST_NODE_TYPES.ImportNamespaceSpecifier && val !== AST_NODE_TYPES.ImportDefaultSpecifier) {
oldImports.set(val, key);
}
}
}
function processDynamicImport(source) {
if (source.type !== "Literal" || typeof source.value !== "string") {
return null;
}
const p = (0, utils_2.resolve)(source.value, context);
if (p == null) {
return null;
}
newNamespaceImports.add(p);
}
(0, utils_2.visit)(node2, visitorKeyMap.get(file), {
ImportExpression(child) {
processDynamicImport(child.source);
},
CallExpression(child_) {
const child = child_;
if (child.callee.type === "Import") {
processDynamicImport(child.arguments[0]);
}
}
});
for (const astNode of node2.body) {
let resolvedPath;
if (astNode.type === AST_NODE_TYPES.ExportNamedDeclaration && astNode.source) {
resolvedPath = (0, utils_2.resolve)(astNode.source.raw.replaceAll(/('|")/g, ""), context);
for (const specifier of astNode.specifiers) {
const name = (0, utils_2.getValue)(specifier.local);
if (name === DEFAULT) {
newDefaultImports.add(resolvedPath);
} else {
newImports.set(name, resolvedPath);
}
}
}
if (astNode.type === AST_NODE_TYPES.ExportAllDeclaration) {
resolvedPath = (0, utils_2.resolve)(astNode.source.raw.replaceAll(/('|")/g, ""), context);
newExportAll.add(resolvedPath);
}
if (astNode.type === AST_NODE_TYPES.ImportDeclaration) {
resolvedPath = (0, utils_2.resolve)(astNode.source.raw.replaceAll(/('|")/g, ""), context);
if (!resolvedPath) {
continue;
}
if (isNodeModule(resolvedPath)) {
continue;
}
if (newNamespaceImportExists(astNode.specifiers)) {
newNamespaceImports.add(resolvedPath);
}
if (newDefaultImportExists(astNode.specifiers)) {
newDefaultImports.add(resolvedPath);
}
for (const specifier of astNode.specifiers.filter((specifier2) => specifier2.type !== AST_NODE_TYPES.ImportDefaultSpecifier && specifier2.type !== AST_NODE_TYPES.ImportNamespaceSpecifier)) {
if ("imported" in specifier) {
newImports.set((0, utils_2.getValue)(specifier.imported), resolvedPath);
}
}
}
}
for (const value of newExportAll) {
if (!oldExportAll.has(value)) {
const imports2 = (_b = oldImportPaths.get(value)) !== null && _b !== void 0 ? _b : /* @__PURE__ */ new Set();
imports2.add(AST_NODE_TYPES.ExportAllDeclaration);
oldImportPaths.set(value, imports2);
let exports2 = exportList.get(value);
let currentExport;
if (exports2 === void 0) {
exports2 = /* @__PURE__ */ new Map();
exportList.set(value, exports2);
} else {
currentExport = exports2.get(AST_NODE_TYPES.ExportAllDeclaration);
}
if (currentExport === void 0) {
const whereUsed = /* @__PURE__ */ new Set();
whereUsed.add(file);
exports2.set(AST_NODE_TYPES.ExportAllDeclaration, {
whereUsed
});
} else {
currentExport.whereUsed.add(file);
}
}
}
for (const value of oldExportAll) {
if (!newExportAll.has(value)) {
const imports2 = oldImportPaths.get(value);
imports2.delete(AST_NODE_TYPES.ExportAllDeclaration);
const exports2 = exportList.get(value);
if (exports2 !== void 0) {
const currentExport = exports2.get(AST_NODE_TYPES.ExportAllDeclaration);
if (currentExport !== void 0) {
currentExport.whereUsed.delete(file);
}
}
}
}
for (const value of newDefaultImports) {
if (!oldDefaultImports.has(value)) {
let imports2 = oldImportPaths.get(value);
if (imports2 === void 0) {
imports2 = /* @__PURE__ */ new Set();
}
imports2.add(AST_NODE_TYPES.ImportDefaultSpecifier);
oldImportPaths.set(value, imports2);
let exports2 = exportList.get(value);
let currentExport;
if (exports2 === void 0) {
exports2 = /* @__PURE__ */ new Map();
exportList.set(value, exports2);
} else {
currentExport = exports2.get(AST_NODE_TYPES.ImportDefaultSpecifier);
}
if (currentExport === void 0) {
const whereUsed = /* @__PURE__ */ new Set();
whereUsed.add(file);
exports2.set(AST_NODE_TYPES.ImportDefaultSpecifier, {
whereUsed
});
} else {
currentExport.whereUsed.add(file);
}
}
}
for (const value of oldDefaultImports) {
if (!newDefaultImports.has(value)) {
const imports2 = oldImportPaths.get(value);
imports2.delete(AST_NODE_TYPES.ImportDefaultSpecifier);
const exports2 = exportList.get(value);
if (exports2 !== void 0) {
const currentExport = exports2.get(AST_NODE_TYPES.ImportDefaultSpecifier);
if (currentExport !== void 0) {
currentExport.whereUsed.delete(file);
}
}
}
}
for (const value of newNamespaceImports) {
if (!oldNamespaceImports.has(value)) {
let imports2 = oldImportPaths.get(value);
if (imports2 === void 0) {
imports2 = /* @__PURE__ */ new Set();
}
imports2.add(AST_NODE_TYPES.ImportNamespaceSpecifier);
oldImportPaths.set(value, imports2);
let exports2 = exportList.get(value);
let currentExport;
if (exports2 === void 0) {
exports2 = /* @__PURE__ */ new Map();
exportList.set(value, exports2);
} else {
currentExport = exports2.get(AST_NODE_TYPES.ImportNamespaceSpecifier);
}
if (currentExport === void 0) {
const whereUsed = /* @__PURE__ */ new Set();
whereUsed.add(file);
exports2.set(AST_NODE_TYPES.ImportNamespaceSpecifier, {
whereUsed
});
} else {
currentExport.whereUsed.add(file);
}
}
}
for (const value of oldNamespaceImports) {
if (!newNamespaceImports.has(value)) {
const imports2 = oldImportPaths.get(value);
imports2.delete(AST_NODE_TYPES.ImportNamespaceSpecifier);
const exports2 = exportList.get(value);
if (exports2 !== void 0) {
const currentExport = exports2.get(AST_NODE_TYPES.ImportNamespaceSpecifier);
if (currentExport !== void 0) {
currentExport.whereUsed.delete(file);
}
}
}
}
for (const [key, value] of newImports.entries()) {
if (!oldImports.has(key)) {
let imports2 = oldImportPaths.get(value);
if (imports2 === void 0) {
imports2 = /* @__PURE__ */ new Set();
}
imports2.add(key);
oldImportPaths.set(value, imports2);
let exports2 = exportList.get(value);
let currentExport;
if (exports2 === void 0) {
exports2 = /* @__PURE__ */ new Map();
exportList.set(value, exports2);
} else {
currentExport = exports2.get(key);
}
if (currentExport === void 0) {
const whereUsed = /* @__PURE__ */ new Set();
whereUsed.add(file);
exports2.set(key, { whereUsed });
} else {
currentExport.whereUsed.add(file);
}
}
}
for (const [key, value] of oldImports.entries()) {
if (!newImports.has(key)) {
const imports2 = oldImportPaths.get(value);
imports2.delete(key);
const exports2 = exportList.get(value);
if (exports2 !== void 0) {
const currentExport = exports2.get(key);
if (currentExport !== void 0) {
currentExport.whereUsed.delete(file);
}
}
}
}
};
return {
"Program:exit"(node2) {
updateExportUsage(node2);
updateImportUsage(node2);
checkExportPresence(node2);
},
ExportDefaultDeclaration(node2) {
checkUsage(node2, AST_NODE_TYPES.ImportDefaultSpecifier);
},
ExportNamedDeclaration(node2) {
for (const specifier of node2.specifiers) {
checkUsage(specifier, (0, utils_2.getValue)(specifier.exported));
}
forEachDeclarationIdentifier(node2.declaration, (name) => {
checkUsage(node2, name);
});
}
};
}
});
}
});
// ../../node_modules/.pnpm/eslint-plugin-import-x@0.4.4_patch_hash=4oryti2zfrehz2qi62zyaaa334_eslint@9.4.0_typescript@5.4.5/node_modules/eslint-plugin-import-x/lib/rules/no-useless-path-segments.js
var require_no_useless_path_segments = __commonJS({
"../../node_modules/.pnpm/eslint-plugin-import-x@0.4.4_patch_hash=4oryti2zfrehz2qi62zyaaa334_eslint@9.4.0_typescript@5.4.5/node_modules/eslint-plugin-import-x/lib/rules/no-useless-path-segments.js"(exports, module) {
"use strict";
init_shims();
var tslib_1 = (init_tslib_es6(), __toCommonJS(tslib_es6_exports));
var node_path_1 = tslib_1.__importDefault(__require("node:path"));
var eslint_compat_utils_1 = require_dist();
var utils_1 = require_utils2();
function toRelativePath(relativePath) {
const stripped = relativePath.replaceAll(/\/$/g, "");
return /^((\.\.)|(\.))($|\/)/.test(stripped) ? stripped : `./${stripped}`;
}
function normalize(filepath) {
return toRelativePath(node_path_1.default.posix.normalize(filepath));
}
function countRelativeParents(pathSegments) {
return pathSegments.filter((x) => x === "..").length;
}
module.exports = (0, utils_1.createRule)({
name: "no-useless-path-segments",
meta: {
type: "suggestion",
docs: {
category: "Static analysis",
description: "Forbid unnecessary path segments in import and require statements."
},
fixable: "code",
schema: [
{
type: "object",
properties: {
commonjs: { type: "boolean" },
noUselessIndex: { type: "boolean" }
},
additionalProperties: false
}
],
messages: {
useless: 'Useless path segments for "{{importPath}}", should be "{{proposedPath}}"'
}
},
defaultOptions: [],
create(context) {
const currentDir = node_path_1.default.dirname((0, eslint_compat_utils_1.getPhysicalFilename)(context));
const options = context.options[0] || {};
return (0, utils_1.moduleVisitor)((source) => {
const { value: importPath } = source;
function reportWithProposedPath(proposedPath) {
context.report({
node: source,
messageId: "useless",
data: {
importPath,
proposedPath
},
fix: (fixer) => proposedPath ? fixer.replaceText(source, JSON.stringify(proposedPath)) : null
});
}
if (!importPath.startsWith(".")) {
return;
}
const resolvedPath = (0, utils_1.resolve)(importPath, context);
const normedPath = normalize(importPath);
const resolvedNormedPath = (0, utils_1.resolve)(normedPath, context);
if (normedPath !== importPath && resolvedPath === resolvedNormedPath) {
return reportWithProposedPath(normedPath);
}
const fileExtensions = (0, utils_1.getFileExtensions)(context.settings);
const regexUnnecessaryIndex = new RegExp(`.*\\/index(\\${[...fileExtensions].join("|\\")})?$`);
if (options.noUselessIndex && regexUnnecessaryIndex.test(importPath)) {
const parentDirectory = node_path_1.default.dirname(importPath);
if (parentDirectory !== "." && parentDirectory !== "..") {
for (const fileExtension of fileExtensions) {
if ((0, utils_1.resolve)(`${parentDirectory}${fileExtension}`, context)) {
return reportWithProposedPath(`${parentDirectory}/`);
}
}
}
return reportWithProposedPath(parentDirectory);
}
if (importPath.startsWith("./")) {
return;
}
if (resolvedPath === void 0) {
return;
}
const expected = node_path_1.default.relative(currentDir, resolvedPath);
const expectedSplit = expected.split(node_path_1.default.sep);
const importPathSplit = importPath.replace(/^\.\//, "").split("/");
const countImportPathRelativeParents = countRelativeParents(importPathSplit);
const countExpectedRelativeParents = countRelativeParents(expectedSplit);
const diff = countImportPathRelativeParents - countExpectedRelativeParents;
if (diff <= 0) {
return;
}
return reportWithProposedPath(toRelativePath([
...importPathSplit.slice(0, countExpectedRelativeParents),
...importPathSplit.slice(countImportPathRelativeParents + diff)
].join("/")));
}, options);
}
});
}
});
// ../../node_modules/.pnpm/eslint-plugin-import-x@0.4.4_patch_hash=4oryti2zfrehz2qi62zyaaa334_eslint@9.4.0_typescript@5.4.5/node_modules/eslint-plugin-import-x/lib/rules/no-webpack-loader-syntax.js
var require_no_webpack_loader_syntax = __commonJS({
"../../node_modules/.pnpm/eslint-plugin-import-x@0.4.4_patch_hash=4oryti2zfrehz2qi62zyaaa334_eslint@9.4.0_typescript@5.4.5/node_modules/eslint-plugin-import-x/lib/rules/no-webpack-loader-syntax.js"(exports, module) {
"use strict";
init_shims();
var utils_1 = require_utils2();
module.exports = (0, utils_1.createRule)({
name: "no-webpack-loader-syntax",
meta: {
type: "problem",
docs: {
category: "Static analysis",
description: "Forbid webpack loader syntax in imports."
},
schema: [],
messages: {
unexpected: "Unexpected '!' in '{{name}}'. Do not use import syntax to configure webpack loaders."
}
},
defaultOptions: [],
create(context) {
return (0, utils_1.moduleVisitor)((source, node2) => {
var _a;
if ((_a = source.value) === null || _a === void 0 ? void 0 : _a.includes("!")) {
context.report({
node: node2,
messageId: "unexpected",
data: {
name: source.value
}
});
}
}, { commonjs: true });
}
});
}
});
// ../../node_modules/.pnpm/eslint-plugin-import-x@0.4.4_patch_hash=4oryti2zfrehz2qi62zyaaa334_eslint@9.4.0_typescript@5.4.5/node_modules/eslint-plugin-import-x/lib/rules/order.js
var require_order = __commonJS({
"../../node_modules/.pnpm/eslint-plugin-import-x@0.4.4_patch_hash=4oryti2zfrehz2qi62zyaaa334_eslint@9.4.0_typescript@5.4.5/node_modules/eslint-plugin-import-x/lib/rules/order.js"(exports, module) {
"use strict";
init_shims();
var eslint_compat_utils_1 = require_dist();
var minimatch_1 = require_cjs();
var utils_1 = require_utils2();
var groupBy = (array, grouper) => array.reduce((acc, curr, index) => {
const key = grouper(curr, index);
(acc[key] || (acc[key] = [])).push(curr);
return acc;
}, {});
var defaultGroups = [
"builtin",
"external",
"parent",
"sibling",
"index"
];
function reverse(array) {
return array.map(function(v) {
return Object.assign(Object.assign({}, v), { rank: -v.rank });
}).reverse();
}
function getTokensOrCommentsAfter(sourceCode, node2, count) {
let currentNodeOrToken = node2;
const result = [];
for (let i = 0; i < count; i++) {
currentNodeOrToken = sourceCode.getTokenAfter(currentNodeOrToken, {
includeComments: true
});
if (currentNodeOrToken == null) {
break;
}
result.push(currentNodeOrToken);
}
return result;
}
function getTokensOrCommentsBefore(sourceCode, node2, count) {
let currentNodeOrToken = node2;
const result = [];
for (let i = 0; i < count; i++) {
currentNodeOrToken = sourceCode.getTokenBefore(currentNodeOrToken, {
includeComments: true
});
if (currentNodeOrToken == null) {
break;
}
result.push(currentNodeOrToken);
}
return result.reverse();
}
function takeTokensAfterWhile(sourceCode, node2, condition) {
const tokens = getTokensOrCommentsAfter(sourceCode, node2, 100);
const result = [];
for (const token of tokens) {
if (condition(token)) {
result.push(token);
} else {
break;
}
}
return result;
}
function takeTokensBeforeWhile(sourceCode, node2, condition) {
const tokens = getTokensOrCommentsBefore(sourceCode, node2, 100);
const result = [];
for (let i = tokens.length - 1; i >= 0; i--) {
if (condition(tokens[i])) {
result.push(tokens[i]);
} else {
break;
}
}
return result.reverse();
}
function findOutOfOrder(imported) {
if (imported.length === 0) {
return [];
}
let maxSeenRankNode = imported[0];
return imported.filter(function(importedModule) {
const res = importedModule.rank < maxSeenRankNode.rank;
if (maxSeenRankNode.rank < importedModule.rank) {
maxSeenRankNode = importedModule;
}
return res;
});
}
function findRootNode(node2) {
let parent = node2;
while (parent.parent != null && (!("body" in parent.parent) || parent.parent.body == null)) {
parent = parent.parent;
}
return parent;
}
function findEndOfLineWithComments(sourceCode, node2) {
const tokensToEndOfLine = takeTokensAfterWhile(sourceCode, node2, commentOnSameLineAs(node2));
const endOfTokens = tokensToEndOfLine.length > 0 ? tokensToEndOfLine[tokensToEndOfLine.length - 1].range[1] : node2.range[1];
let result = endOfTokens;
for (let i = endOfTokens; i < sourceCode.text.length; i++) {
if (sourceCode.text[i] === "\n") {
result = i + 1;
break;
}
if (sourceCode.text[i] !== " " && sourceCode.text[i] !== " " && sourceCode.text[i] !== "\r") {
break;
}
result = i + 1;
}
return result;
}
function commentOnSameLineAs(node2) {
return (token) => (token.type === "Block" || token.type === "Line") && token.loc.start.line === token.loc.end.line && token.loc.end.line === node2.loc.end.line;
}
function findStartOfLineWithComments(sourceCode, node2) {
const tokensToEndOfLine = takeTokensBeforeWhile(sourceCode, node2, commentOnSameLineAs(node2));
const startOfTokens = tokensToEndOfLine.length > 0 ? tokensToEndOfLine[0].range[0] : node2.range[0];
let result = startOfTokens;
for (let i = startOfTokens - 1; i > 0; i--) {
if (sourceCode.text[i] !== " " && sourceCode.text[i] !== " ") {
break;
}
result = i;
}
return result;
}
function isRequireExpression(expr) {
return expr != null && expr.type === "CallExpression" && expr.callee != null && "name" in expr.callee && expr.callee.name === "require" && expr.arguments != null && expr.arguments.length === 1 && expr.arguments[0].type === "Literal";
}
function isSupportedRequireModule(node2) {
if (node2.type !== "VariableDeclaration") {
return false;
}
if (node2.declarations.length !== 1) {
return false;
}
const decl = node2.declarations[0];
const isPlainRequire = decl.id && (decl.id.type === "Identifier" || decl.id.type === "ObjectPattern") && isRequireExpression(decl.init);
const isRequireWithMemberExpression = decl.id && (decl.id.type === "Identifier" || decl.id.type === "ObjectPattern") && decl.init != null && decl.init.type === "CallExpression" && decl.init.callee != null && decl.init.callee.type === "MemberExpression" && isRequireExpression(decl.init.callee.object);
return isPlainRequire || isRequireWithMemberExpression;
}
function isPlainImportModule(node2) {
return node2.type === "ImportDeclaration" && node2.specifiers != null && node2.specifiers.length > 0;
}
function isPlainImportEquals(node2) {
return node2.type === "TSImportEqualsDeclaration" && "expression" in node2.moduleReference && !!node2.moduleReference.expression;
}
function canCrossNodeWhileReorder(node2) {
return isSupportedRequireModule(node2) || isPlainImportModule(node2) || isPlainImportEquals(node2);
}
function canReorderItems(firstNode, secondNode) {
const parent = firstNode.parent;
const [firstIndex, secondIndex] = [
parent.body.indexOf(firstNode),
parent.body.indexOf(secondNode)
].sort();
const nodesBetween = parent.body.slice(firstIndex, secondIndex + 1);
for (const nodeBetween of nodesBetween) {
if (!canCrossNodeWhileReorder(nodeBetween)) {
return false;
}
}
return true;
}
function makeImportDescription(node2) {
if ("importKind" in node2.node) {
if (node2.node.importKind === "type") {
return "type import";
}
if (node2.node.importKind === "typeof") {
return "typeof import";
}
}
return "import";
}
function fixOutOfOrder(context, firstNode, secondNode, order) {
const sourceCode = (0, eslint_compat_utils_1.getSourceCode)(context);
const firstRoot = findRootNode(firstNode.node);
const firstRootStart = findStartOfLineWithComments(sourceCode, firstRoot);
const firstRootEnd = findEndOfLineWithComments(sourceCode, firstRoot);
const secondRoot = findRootNode(secondNode.node);
const secondRootStart = findStartOfLineWithComments(sourceCode, secondRoot);
const secondRootEnd = findEndOfLineWithComments(sourceCode, secondRoot);
const canFix = canReorderItems(firstRoot, secondRoot);
let newCode = sourceCode.text.slice(secondRootStart, secondRootEnd);
if (newCode[newCode.length - 1] !== "\n") {
newCode = `${newCode}
`;
}
const firstImport = `${makeImportDescription(firstNode)} of \`${firstNode.displayName}\``;
const secondImport = `\`${secondNode.displayName}\` ${makeImportDescription(secondNode)}`;
context.report({
node: secondNode.node,
messageId: "order",
data: {
firstImport,
secondImport,
order
},
fix: canFix ? (fixer) => order === "before" ? fixer.replaceTextRange([firstRootStart, secondRootEnd], newCode + sourceCode.text.slice(firstRootStart, secondRootStart)) : fixer.replaceTextRange([secondRootStart, firstRootEnd], sourceCode.text.slice(secondRootEnd, firstRootEnd) + newCode) : null
});
}
function reportOutOfOrder(context, imported, outOfOrder, order) {
for (const imp of outOfOrder) {
fixOutOfOrder(context, imported.find((importedItem) => importedItem.rank > imp.rank), imp, order);
}
}
function makeOutOfOrderReport(context, imported) {
const outOfOrder = findOutOfOrder(imported);
if (outOfOrder.length === 0) {
return;
}
const reversedImported = reverse(imported);
const reversedOrder = findOutOfOrder(reversedImported);
if (reversedOrder.length < outOfOrder.length) {
reportOutOfOrder(context, reversedImported, reversedOrder, "after");
return;
}
reportOutOfOrder(context, imported, outOfOrder, "before");
}
var compareString = (a, b) => {
if (a < b) {
return -1;
}
if (a > b) {
return 1;
}
return 0;
};
var DEFAULT_IMPORT_KIND = "value";
var getNormalizedValue = (node2, toLowerCase) => {
const value = node2.value;
return toLowerCase ? String(value).toLowerCase() : value;
};
function getSorter(alphabetizeOptions) {
const multiplier = alphabetizeOptions.order === "asc" ? 1 : -1;
const orderImportKind = alphabetizeOptions.orderImportKind;
const multiplierImportKind = orderImportKind !== "ignore" && (alphabetizeOptions.orderImportKind === "asc" ? 1 : -1);
return (nodeA, nodeB) => {
const importA = getNormalizedValue(nodeA, alphabetizeOptions.caseInsensitive);
const importB = getNormalizedValue(nodeB, alphabetizeOptions.caseInsensitive);
let result = 0;
if (!importA.includes("/") && !importB.includes("/")) {
result = compareString(importA, importB);
} else {
const A = importA.split("/");
const B = importB.split("/");
const a = A.length;
const b = B.length;
for (let i = 0; i < Math.min(a, b); i++) {
result = compareString(A[i], B[i]);
if (result) {
break;
}
}
if (!result && a !== b) {
result = a < b ? -1 : 1;
}
}
result = result * multiplier;
if (!result && multiplierImportKind) {
result = multiplierImportKind * compareString("importKind" in nodeA.node && nodeA.node.importKind || DEFAULT_IMPORT_KIND, "importKind" in nodeB.node && nodeB.node.importKind || DEFAULT_IMPORT_KIND);
}
return result;
};
}
function mutateRanksToAlphabetize(imported, alphabetizeOptions) {
const groupedByRanks = groupBy(imported, (item) => item.rank);
const sorterFn = getSorter(alphabetizeOptions);
const groupRanks = Object.keys(groupedByRanks).sort((a, b) => +a - +b);
for (const groupRank of groupRanks) {
groupedByRanks[groupRank].sort(sorterFn);
}
let newRank = 0;
const alphabetizedRanks = groupRanks.reduce((acc, groupRank) => {
for (const importedItem of groupedByRanks[groupRank]) {
acc[`${importedItem.value}|${"importKind" in importedItem.node ? importedItem.node.importKind : ""}`] = Number.parseInt(groupRank, 10) + newRank;
newRank += 1;
}
return acc;
}, {});
for (const importedItem of imported) {
importedItem.rank = alphabetizedRanks[`${importedItem.value}|${"importKind" in importedItem.node ? importedItem.node.importKind : ""}`];
}
}
function computePathRank(ranks, pathGroups, path, maxPosition) {
for (let i = 0, l = pathGroups.length; i < l; i++) {
const { pattern, patternOptions, group, position = 1 } = pathGroups[i];
if ((0, minimatch_1.minimatch)(path, pattern, patternOptions || { nocomment: true })) {
return ranks[group] + position / maxPosition;
}
}
}
function computeRank(context, ranks, importEntry, excludedImportTypes) {
let impType;
let rank;
if (importEntry.type === "import:object") {
impType = "object";
} else if ("importKind" in importEntry.node && importEntry.node.importKind === "type" && !ranks.omittedTypes.includes("type")) {
impType = "type";
} else {
impType = (0, utils_1.importType)(importEntry.value, context);
}
if (!excludedImportTypes.has(impType)) {
rank = computePathRank(ranks.groups, ranks.pathGroups, importEntry.value, ranks.maxPosition);
}
if (rank === void 0) {
rank = ranks.groups[impType];
}
if (importEntry.type !== "import" && !importEntry.type.startsWith("import:")) {
rank += 100;
}
return rank;
}
function registerNode(context, importEntry, ranks, imported, excludedImportTypes) {
const rank = computeRank(context, ranks, importEntry, excludedImportTypes);
if (rank !== -1) {
imported.push(Object.assign(Object.assign({}, importEntry), { rank }));
}
}
function getRequireBlock(node2) {
var _a, _b, _c;
let n = node2;
while (n.parent && (n.parent.type === "MemberExpression" && n.parent.object === n || n.parent.type === "CallExpression" && n.parent.callee === n)) {
n = n.parent;
}
if (((_a = n.parent) === null || _a === void 0 ? void 0 : _a.type) === "VariableDeclarator" && ((_b = n.parent.parent) === null || _b === void 0 ? void 0 : _b.type) === "VariableDeclaration" && ((_c = n.parent.parent.parent) === null || _c === void 0 ? void 0 : _c.type) === "Program") {
return n.parent.parent.parent;
}
}
var types = [
"builtin",
"external",
"internal",
"unknown",
"parent",
"sibling",
"index",
"object",
"type"
];
function convertGroupsToRanks(groups) {
const rankObject = groups.reduce((res, group, index) => {
for (const groupItem of [group].flat()) {
if (!types.includes(groupItem)) {
throw new Error(`Incorrect configuration of the rule: Unknown type \`${JSON.stringify(groupItem)}\``);
}
if (res[groupItem] !== void 0) {
throw new Error(`Incorrect configuration of the rule: \`${groupItem}\` is duplicated`);
}
res[groupItem] = index * 2;
}
return res;
}, {});
const omittedTypes = types.filter(function(type) {
return rankObject[type] === void 0;
});
const ranks = omittedTypes.reduce(function(res, type) {
res[type] = groups.length * 2;
return res;
}, rankObject);
return { groups: ranks, omittedTypes };
}
function convertPathGroupsForRanks(pathGroups) {
const after = {};
const before = {};
const transformed = pathGroups.map((pathGroup, index) => {
const { group, position: positionString } = pathGroup;
let position = 0;
if (positionString === "after") {
if (!after[group]) {
after[group] = 1;
}
position = after[group]++;
} else if (positionString === "before") {
if (!before[group]) {
before[group] = [];
}
before[group].push(index);
}
return Object.assign(Object.assign({}, pathGroup), { position });
});
let maxPosition = 1;
for (const group of Object.keys(before)) {
const groupLength = before[group].length;
for (const [index, groupIndex] of before[group].entries()) {
transformed[groupIndex].position = -1 * (groupLength - index);
}
maxPosition = Math.max(maxPosition, groupLength);
}
for (const key of Object.keys(after)) {
const groupNextPosition = after[key];
maxPosition = Math.max(maxPosition, groupNextPosition - 1);
}
return {
pathGroups: transformed,
maxPosition: maxPosition > 10 ? Math.pow(10, Math.ceil(Math.log10(maxPosition))) : 10
};
}
function fixNewLineAfterImport(context, previousImport) {
const prevRoot = findRootNode(previousImport.node);
const tokensToEndOfLine = takeTokensAfterWhile((0, eslint_compat_utils_1.getSourceCode)(context), prevRoot, commentOnSameLineAs(prevRoot));
let endOfLine = prevRoot.range[1];
if (tokensToEndOfLine.length > 0) {
endOfLine = tokensToEndOfLine[tokensToEndOfLine.length - 1].range[1];
}
return (fixer) => fixer.insertTextAfterRange([prevRoot.range[0], endOfLine], "\n");
}
function removeNewLineAfterImport(context, currentImport, previousImport) {
const sourceCode = (0, eslint_compat_utils_1.getSourceCode)(context);
const prevRoot = findRootNode(previousImport.node);
const currRoot = findRootNode(currentImport.node);
const rangeToRemove = [
findEndOfLineWithComments(sourceCode, prevRoot),
findStartOfLineWithComments(sourceCode, currRoot)
];
if (/^\s*$/.test(sourceCode.text.slice(rangeToRemove[0], rangeToRemove[1]))) {
return (fixer) => fixer.removeRange(rangeToRemove);
}
}
function makeNewlinesBetweenReport(context, imported, newlinesBetweenImports, distinctGroup) {
const getNumberOfEmptyLinesBetween = (currentImport, previousImport2) => {
return context.getSourceCode().lines.slice(previousImport2.node.loc.end.line, currentImport.node.loc.start.line - 1).filter((line) => line.trim().length === 0).length;
};
const getIsStartOfDistinctGroup = (currentImport, previousImport2) => currentImport.rank - 1 >= previousImport2.rank;
let previousImport = imported[0];
for (const currentImport of imported.slice(1)) {
const emptyLinesBetween = getNumberOfEmptyLinesBetween(currentImport, previousImport);
const isStartOfDistinctGroup = getIsStartOfDistinctGroup(currentImport, previousImport);
if (newlinesBetweenImports === "always" || newlinesBetweenImports === "always-and-inside-groups") {
if (currentImport.rank !== previousImport.rank && emptyLinesBetween === 0) {
if (distinctGroup || !distinctGroup && isStartOfDistinctGroup) {
context.report({
node: previousImport.node,
messageId: "oneLineBetweenGroups",
fix: fixNewLineAfterImport(context, previousImport)
});
}
} else if (emptyLinesBetween > 0 && newlinesBetweenImports !== "always-and-inside-groups" && (distinctGroup && currentImport.rank === previousImport.rank || !distinctGroup && !isStartOfDistinctGroup)) {
context.report({
node: previousImport.node,
messageId: "noLineWithinGroup",
fix: removeNewLineAfterImport(context, currentImport, previousImport)
});
}
} else if (emptyLinesBetween > 0) {
context.report({
node: previousImport.node,
messageId: "noLineBetweenGroups",
fix: removeNewLineAfterImport(context, currentImport, previousImport)
});
}
previousImport = currentImport;
}
}
function getAlphabetizeConfig(options) {
const alphabetize = options.alphabetize || {};
const order = alphabetize.order || "ignore";
const orderImportKind = alphabetize.orderImportKind || "ignore";
const caseInsensitive = alphabetize.caseInsensitive || false;
return { order, orderImportKind, caseInsensitive };
}
var defaultDistinctGroup = true;
module.exports = (0, utils_1.createRule)({
name: "order",
meta: {
type: "suggestion",
docs: {
category: "Style guide",
description: "Enforce a convention in module import order."
},
fixable: "code",
schema: [
{
type: "object",
properties: {
groups: {
type: "array"
},
pathGroupsExcludedImportTypes: {
type: "array"
},
distinctGroup: {
type: "boolean",
default: defaultDistinctGroup
},
pathGroups: {
type: "array",
items: {
type: "object",
properties: {
pattern: {
type: "string"
},
patternOptions: {
type: "object"
},
group: {
type: "string",
enum: types
},
position: {
type: "string",
enum: ["after", "before"]
}
},
additionalProperties: false,
required: ["pattern", "group"]
}
},
"newlines-between": {
enum: ["ignore", "always", "always-and-inside-groups", "never"]
},
alphabetize: {
type: "object",
properties: {
caseInsensitive: {
type: "boolean",
default: false
},
order: {
enum: ["ignore", "asc", "desc"],
default: "ignore"
},
orderImportKind: {
enum: ["ignore", "asc", "desc"],
default: "ignore"
}
},
additionalProperties: false
},
warnOnUnassignedImports: {
type: "boolean",
default: false
}
},
additionalProperties: false
}
],
messages: {
error: "{{error}}",
noLineWithinGroup: "There should be no empty line within import group",
noLineBetweenGroups: "There should be no empty line between import groups",
oneLineBetweenGroups: "There should be at least one empty line between import groups",
order: "{{secondImport}} should occur {{order}} {{firstImport}}"
}
},
defaultOptions: [],
create(context) {
const options = context.options[0] || {};
const newlinesBetweenImports = options["newlines-between"] || "ignore";
const pathGroupsExcludedImportTypes = new Set(options.pathGroupsExcludedImportTypes || [
"builtin",
"external",
"object"
]);
const alphabetize = getAlphabetizeConfig(options);
const distinctGroup = options.distinctGroup == null ? defaultDistinctGroup : !!options.distinctGroup;
let ranks;
try {
const { pathGroups, maxPosition } = convertPathGroupsForRanks(options.pathGroups || []);
const { groups, omittedTypes } = convertGroupsToRanks(options.groups || defaultGroups);
ranks = {
groups,
omittedTypes,
pathGroups,
maxPosition
};
} catch (error) {
return {
Program(node2) {
context.report({
node: node2,
messageId: "error",
data: {
error: error.message
}
});
}
};
}
const importMap = /* @__PURE__ */ new Map();
function getBlockImports(node2) {
if (!importMap.has(node2)) {
importMap.set(node2, []);
}
return importMap.get(node2);
}
return {
ImportDeclaration(node2) {
if (node2.specifiers.length > 0 || options.warnOnUnassignedImports) {
const name = node2.source.value;
registerNode(context, {
node: node2,
value: name,
displayName: name,
type: "import"
}, ranks, getBlockImports(node2.parent), pathGroupsExcludedImportTypes);
}
},
TSImportEqualsDeclaration(node2) {
let displayName;
let value;
let type;
if (node2.isExport) {
return;
}
if (node2.moduleReference.type === "TSExternalModuleReference" && "value" in node2.moduleReference.expression && typeof node2.moduleReference.expression.value === "string") {
value = node2.moduleReference.expression.value;
displayName = value;
type = "import";
} else {
value = "";
displayName = (0, eslint_compat_utils_1.getSourceCode)(context).getText(node2.moduleReference);
type = "import:object";
}
registerNode(context, {
node: node2,
value,
displayName,
type
}, ranks, getBlockImports(node2.parent), pathGroupsExcludedImportTypes);
},
CallExpression(node2) {
if (!(0, utils_1.isStaticRequire)(node2)) {
return;
}
const block = getRequireBlock(node2);
const firstArg = node2.arguments[0];
if (!block || !("value" in firstArg) || typeof firstArg.value !== "string") {
return;
}
const name = firstArg.value;
registerNode(context, {
node: node2,
value: name,
displayName: name,
type: "require"
}, ranks, getBlockImports(block), pathGroupsExcludedImportTypes);
},
"Program:exit"() {
for (const imported of importMap.values()) {
if (newlinesBetweenImports !== "ignore") {
makeNewlinesBetweenReport(context, imported, newlinesBetweenImports, distinctGroup);
}
if (alphabetize.order !== "ignore") {
mutateRanksToAlphabetize(imported, alphabetize);
}
makeOutOfOrderReport(context, imported);
}
importMap.clear();
}
};
}
});
}
});
// ../../node_modules/.pnpm/eslint-plugin-import-x@0.4.4_patch_hash=4oryti2zfrehz2qi62zyaaa334_eslint@9.4.0_typescript@5.4.5/node_modules/eslint-plugin-import-x/lib/rules/prefer-default-export.js
var require_prefer_default_export = __commonJS({
"../../node_modules/.pnpm/eslint-plugin-import-x@0.4.4_patch_hash=4oryti2zfrehz2qi62zyaaa334_eslint@9.4.0_typescript@5.4.5/node_modules/eslint-plugin-import-x/lib/rules/prefer-default-export.js"(exports, module) {
"use strict";
init_shims();
var utils_1 = require_utils2();
module.exports = (0, utils_1.createRule)({
name: "prefer-default-export",
meta: {
type: "suggestion",
docs: {
category: "Style guide",
description: "Prefer a default export if module exports a single name or multiple names."
},
schema: [
{
type: "object",
properties: {
target: {
type: "string",
enum: ["single", "any"],
default: "single"
}
},
additionalProperties: false
}
],
messages: {
single: "Prefer default export on a file with single export.",
any: "Prefer default export to be present on every file that has export."
}
},
defaultOptions: [],
create(context) {
let specifierExportCount = 0;
let hasDefaultExport = false;
let hasStarExport = false;
let hasTypeExport = false;
let namedExportNode;
const { target = "single" } = context.options[0] || {};
function captureDeclaration(identifierOrPattern) {
if ((identifierOrPattern === null || identifierOrPattern === void 0 ? void 0 : identifierOrPattern.type) === "ObjectPattern") {
for (const property of identifierOrPattern.properties) {
captureDeclaration(property.value);
}
} else if ((identifierOrPattern === null || identifierOrPattern === void 0 ? void 0 : identifierOrPattern.type) === "ArrayPattern") {
for (const el of identifierOrPattern.elements) {
captureDeclaration(el);
}
} else {
specifierExportCount++;
}
}
return {
ExportDefaultSpecifier() {
hasDefaultExport = true;
},
ExportSpecifier(node2) {
if ((node2.exported.name || "value" in node2.exported && node2.exported.value) === "default") {
hasDefaultExport = true;
} else {
specifierExportCount++;
namedExportNode = node2;
}
},
ExportNamedDeclaration(node2) {
if (!node2.declaration) {
return;
}
const { type } = node2.declaration;
if (type === "TSTypeAliasDeclaration" || type === "TSInterfaceDeclaration" || type === "TypeAlias" || type === "InterfaceDeclaration") {
specifierExportCount++;
hasTypeExport = true;
return;
}
if ("declarations" in node2.declaration && node2.declaration.declarations) {
for (const declaration of node2.declaration.declarations) {
captureDeclaration(declaration.id);
}
} else {
specifierExportCount++;
}
namedExportNode = node2;
},
ExportDefaultDeclaration() {
hasDefaultExport = true;
},
ExportAllDeclaration() {
hasStarExport = true;
},
"Program:exit"() {
if (hasDefaultExport || hasStarExport || hasTypeExport) {
return;
}
if (target === "single" && specifierExportCount === 1) {
context.report({
node: namedExportNode,
messageId: "single"
});
} else if (target === "any" && specifierExportCount > 0) {
context.report({
node: namedExportNode,
messageId: "any"
});
}
}
};
}
});
}
});
// ../../node_modules/.pnpm/eslint-plugin-import-x@0.4.4_patch_hash=4oryti2zfrehz2qi62zyaaa334_eslint@9.4.0_typescript@5.4.5/node_modules/eslint-plugin-import-x/lib/rules/unambiguous.js
var require_unambiguous2 = __commonJS({
"../../node_modules/.pnpm/eslint-plugin-import-x@0.4.4_patch_hash=4oryti2zfrehz2qi62zyaaa334_eslint@9.4.0_typescript@5.4.5/node_modules/eslint-plugin-import-x/lib/rules/unambiguous.js"(exports, module) {
"use strict";
init_shims();
var utils_1 = require_utils2();
module.exports = (0, utils_1.createRule)({
name: "unambiguous",
meta: {
type: "suggestion",
docs: {
category: "Module systems",
description: "Forbid potentially ambiguous parse goal (`script` vs. `module`)."
},
schema: [],
messages: {
module: "This module could be parsed as a valid script."
}
},
defaultOptions: [],
create(context) {
if (context.parserOptions.sourceType !== "module") {
return {};
}
return {
Program(ast) {
if (!(0, utils_1.isUnambiguousModule)(ast)) {
context.report({
node: ast,
messageId: "module"
});
}
}
};
}
});
}
});
// ../../node_modules/.pnpm/eslint-plugin-import-x@0.4.4_patch_hash=4oryti2zfrehz2qi62zyaaa334_eslint@9.4.0_typescript@5.4.5/node_modules/eslint-plugin-import-x/lib/index.js
var require_lib5 = __commonJS({
"../../node_modules/.pnpm/eslint-plugin-import-x@0.4.4_patch_hash=4oryti2zfrehz2qi62zyaaa334_eslint@9.4.0_typescript@5.4.5/node_modules/eslint-plugin-import-x/lib/index.js"(exports, module) {
"use strict";
init_shims();
var tslib_1 = (init_tslib_es6(), __toCommonJS(tslib_es6_exports));
var electron_1 = tslib_1.__importDefault(require_electron());
var errors_1 = tslib_1.__importDefault(require_errors());
var react_1 = tslib_1.__importDefault(require_react());
var react_native_1 = tslib_1.__importDefault(require_react_native());
var recommended_1 = tslib_1.__importDefault(require_recommended());
var stage_0_1 = tslib_1.__importDefault(require_stage_0());
var typescript_1 = tslib_1.__importDefault(require_typescript());
var warnings_1 = tslib_1.__importDefault(require_warnings());
var consistent_type_specifier_style_1 = tslib_1.__importDefault(require_consistent_type_specifier_style());
var default_1 = tslib_1.__importDefault(require_default());
var dynamic_import_chunkname_1 = tslib_1.__importDefault(require_dynamic_import_chunkname());
var export_1 = tslib_1.__importDefault(require_export());
var exports_last_1 = tslib_1.__importDefault(require_exports_last());
var extensions_1 = tslib_1.__importDefault(require_extensions());
var first_1 = tslib_1.__importDefault(require_first());
var group_exports_1 = tslib_1.__importDefault(require_group_exports());
var imports_first_1 = tslib_1.__importDefault(require_imports_first());
var max_dependencies_1 = tslib_1.__importDefault(require_max_dependencies());
var named_1 = tslib_1.__importDefault(require_named());
var namespace_1 = tslib_1.__importDefault(require_namespace());
var newline_after_import_1 = tslib_1.__importDefault(require_newline_after_import());
var no_absolute_path_1 = tslib_1.__importDefault(require_no_absolute_path());
var no_amd_1 = tslib_1.__importDefault(require_no_amd());
var no_anonymous_default_export_1 = tslib_1.__importDefault(require_no_anonymous_default_export());
var no_commonjs_1 = tslib_1.__importDefault(require_no_commonjs());
var no_cycle_1 = tslib_1.__importDefault(require_no_cycle());
var no_default_export_1 = tslib_1.__importDefault(require_no_default_export());
var no_deprecated_1 = tslib_1.__importDefault(require_no_deprecated());
var no_duplicates_1 = tslib_1.__importDefault(require_no_duplicates());
var no_dynamic_require_1 = tslib_1.__importDefault(require_no_dynamic_require());
var no_empty_named_blocks_1 = tslib_1.__importDefault(require_no_empty_named_blocks());
var no_extraneous_dependencies_1 = tslib_1.__importDefault(require_no_extraneous_dependencies());
var no_import_module_exports_1 = tslib_1.__importDefault(require_no_import_module_exports());
var no_internal_modules_1 = tslib_1.__importDefault(require_no_internal_modules());
var no_mutable_exports_1 = tslib_1.__importDefault(require_no_mutable_exports());
var no_named_as_default_1 = tslib_1.__importDefault(require_no_named_as_default());
var no_named_as_default_member_1 = tslib_1.__importDefault(require_no_named_as_default_member());
var no_named_default_1 = tslib_1.__importDefault(require_no_named_default());
var no_named_export_1 = tslib_1.__importDefault(require_no_named_export());
var no_namespace_1 = tslib_1.__importDefault(require_no_namespace());
var no_nodejs_modules_1 = tslib_1.__importDefault(require_no_nodejs_modules());
var no_relative_packages_1 = tslib_1.__importDefault(require_no_relative_packages());
var no_relative_parent_imports_1 = tslib_1.__importDefault(require_no_relative_parent_imports());
var no_restricted_paths_1 = tslib_1.__importDefault(require_no_restricted_paths());
var no_self_import_1 = tslib_1.__importDefault(require_no_self_import());
var no_unassigned_import_1 = tslib_1.__importDefault(require_no_unassigned_import());
var no_unresolved_1 = tslib_1.__importDefault(require_no_unresolved());
var no_unused_modules_1 = tslib_1.__importDefault(require_no_unused_modules());
var no_useless_path_segments_1 = tslib_1.__importDefault(require_no_useless_path_segments());
var no_webpack_loader_syntax_1 = tslib_1.__importDefault(require_no_webpack_loader_syntax());
var order_1 = tslib_1.__importDefault(require_order());
var prefer_default_export_1 = tslib_1.__importDefault(require_prefer_default_export());
var unambiguous_1 = tslib_1.__importDefault(require_unambiguous2());
var configs = {
recommended: recommended_1.default,
errors: errors_1.default,
warnings: warnings_1.default,
"stage-0": stage_0_1.default,
react: react_1.default,
"react-native": react_native_1.default,
electron: electron_1.default,
typescript: typescript_1.default
};
var rules = {
"no-unresolved": no_unresolved_1.default,
named: named_1.default,
default: default_1.default,
namespace: namespace_1.default,
"no-namespace": no_namespace_1.default,
export: export_1.default,
"no-mutable-exports": no_mutable_exports_1.default,
extensions: extensions_1.default,
"no-restricted-paths": no_restricted_paths_1.default,
"no-internal-modules": no_internal_modules_1.default,
"group-exports": group_exports_1.default,
"no-relative-packages": no_relative_packages_1.default,
"no-relative-parent-imports": no_relative_parent_imports_1.default,
"consistent-type-specifier-style": consistent_type_specifier_style_1.default,
"no-self-import": no_self_import_1.default,
"no-cycle": no_cycle_1.default,
"no-named-default": no_named_default_1.default,
"no-named-as-default": no_named_as_default_1.default,
"no-named-as-default-member": no_named_as_default_member_1.default,
"no-anonymous-default-export": no_anonymous_default_export_1.default,
"no-unused-modules": no_unused_modules_1.default,
"no-commonjs": no_commonjs_1.default,
"no-amd": no_amd_1.default,
"no-duplicates": no_duplicates_1.default,
first: first_1.default,
"max-dependencies": max_dependencies_1.default,
"no-extraneous-dependencies": no_extraneous_dependencies_1.default,
"no-absolute-path": no_absolute_path_1.default,
"no-nodejs-modules": no_nodejs_modules_1.default,
"no-webpack-loader-syntax": no_webpack_loader_syntax_1.default,
order: order_1.default,
"newline-after-import": newline_after_import_1.default,
"prefer-default-export": prefer_default_export_1.default,
"no-default-export": no_default_export_1.default,
"no-named-export": no_named_export_1.default,
"no-dynamic-require": no_dynamic_require_1.default,
unambiguous: unambiguous_1.default,
"no-unassigned-import": no_unassigned_import_1.default,
"no-useless-path-segments": no_useless_path_segments_1.default,
"dynamic-import-chunkname": dynamic_import_chunkname_1.default,
"no-import-module-exports": no_import_module_exports_1.default,
"no-empty-named-blocks": no_empty_named_blocks_1.default,
"exports-last": exports_last_1.default,
"no-deprecated": no_deprecated_1.default,
"imports-first": imports_first_1.default
};
module.exports = {
configs,
rules
};
}
});
// src/index.ts
init_shims();
// src/configs/index.ts
init_shims();
// src/configs/comments.ts
init_shims();
// src/plugins.ts
init_shims();
var import_eslint_plugin_import_x = __toESM(require_lib5(), 1);
import { default as default2 } from "@eslint-community/eslint-plugin-eslint-comments";
import { default as default3 } from "@so1ve/eslint-plugin";
import { default as default4 } from "@so1ve/eslint-plugin-sort-imports";
import { default as default5 } from "eslint-plugin-array-func";
import { default as default7 } from "eslint-plugin-n";
import * as pluginNoAwaitInPromise from "eslint-plugin-no-await-in-promise";
import { default as default8 } from "eslint-plugin-only-error";
import { default as default9 } from "eslint-plugin-promise";
import * as pluginRegexp from "eslint-plugin-regexp";
import { default as default10 } from "eslint-plugin-unicorn";
import { default as default11 } from "eslint-plugin-unused-imports";
// src/configs/comments.ts
var comments = () => [
{
name: "so1ve/comments/setup",
plugins: {
"eslint-comments": default2
}
},
{
name: "so1ve/comments/rules",
rules: {
"eslint-comments/no-aggregating-enable": "error",
"eslint-comments/no-duplicate-disable": "error",
"eslint-comments/no-unused-enable": "error",
"eslint-comments/disable-enable-pair": "off",
"eslint-comments/no-unlimited-disable": "off"
}
}
];
// src/configs/formatting.ts
init_shims();
// src/globs.ts
init_shims();
var GLOB_SRC_EXT = "?([cm])[jt]s?(x)";
var GLOB_SRC = `**/*.${GLOB_SRC_EXT}`;
var GLOB_JS = "**/*.?([cm])js";
var GLOB_JSX = "**/*.?([cm])jsx";
var GLOB_TS = "**/*.?([cm])ts";
var GLOB_TSX = "**/*.?([cm])tsx";
var GLOB_DTS = "**/*.d.?([cm])tsx";
var GLOB_STYLE = "**/*.{c,le,sc}ss";
var GLOB_CSS = "**/*.css";
var GLOB_LESS = "**/*.less";
var GLOB_SCSS = "**/*.scss";
var GLOB_JSON = "**/*.json";
var GLOB_JSON5 = "**/*.json5";
var GLOB_JSONC = "**/*.jsonc";
var GLOB_ESLINTRC = "**/.eslintrc";
var GLOB_MARKDOWN = "**/*.md?(x)";
var GLOB_VUE = "**/*.vue";
var GLOB_YAML = "**/*.y?(a)ml";
var GLOB_TOML = "**/*.toml";
var GLOB_HTML = "**/*.htm?(l)";
var GLOB_PACKAGEJSON = "**/package.json";
var GLOB_TSCONFIG = ["**/tsconfig.json", "**/tsconfig.*.json"];
var GLOB_MARKDOWN_CODE = `${GLOB_MARKDOWN}/${GLOB_SRC}`;
var GLOB_TESTS = [
`**/__tests__/**/*.${GLOB_SRC_EXT}`,
`**/*.spec.${GLOB_SRC_EXT}`,
`**/*.test.${GLOB_SRC_EXT}`,
`**/*.bench.${GLOB_SRC_EXT}`,
`**/*.benchmark.${GLOB_SRC_EXT}`
];
var GLOB_ALL_SRC = [
GLOB_SRC,
GLOB_STYLE,
GLOB_JSON,
GLOB_JSON5,
GLOB_ESLINTRC,
GLOB_MARKDOWN,
GLOB_VUE,
GLOB_YAML,
GLOB_HTML
];
var GLOB_EXCLUDE = [
"**/node_modules",
"**/dist",
"**/out",
"**/output",
"**/package-lock.json",
"**/yarn.lock",
"**/pnpm-lock.yaml",
"**/bun.lockb",
"**/coverage",
"**/temp",
"**/.vitepress/cache",
"**/.nuxt",
"**/.nitro",
"**/.vercel",
"**/.netlify",
"**/.output",
"**/.vercel",
"**/.changeset",
"**/.idea",
"**/.vite-inspect",
"**/.yarn",
"**/CHANGELOG*.md",
"**/*.min.*",
"**/LICENSE*",
"**/__snapshots__",
"**/auto-import?(s).d.ts",
"**/components.d.ts",
// Volar
"**/*.vue.js",
"**/*.vue.jsx",
"**/*.vue.ts",
"**/*.vue.tsx"
];
// src/utils.ts
init_shims();
var renameRules = (rules, map) => Object.fromEntries(
Object.entries(rules).map(([key, value]) => {
for (const [from, to] of Object.entries(map)) {
if (key.startsWith(`${from}/`)) {
return [to + key.slice(from.length), value];
}
}
return [key, value];
})
);
async function interopDefault(m) {
const resolved = await m;
return resolved.default || resolved;
}
// src/configs/formatting.ts
async function formatting(options) {
const pluginStylistic = await interopDefault(
import("@stylistic/eslint-plugin")
);
return [
{
name: "so1ve/formatting/setup",
plugins: {
style: pluginStylistic
}
},
{
name: "so1ve/formatting/rules",
rules: {
"curly": ["error", "all"],
"so1ve/no-useless-template-string": "error",
"so1ve/no-negated-comparison": "error",
"so1ve/no-import-promises-as": "error",
"so1ve/pad-after-last-import": "error",
"so1ve/function-style": "error",
"style/quote-props": ["error", "consistent-as-needed"],
"style/padding-line-between-statements": [
"error",
{ blankLine: "always", prev: "*", next: "return" }
]
}
},
(options?.jsonc ?? true) && [
{
name: "so1ve/formatting/rules/sort-package-json",
files: [GLOB_PACKAGEJSON],
rules: {
"jsonc/sort-keys": [
"error",
{
pathPattern: "^exports$",
order: { type: "asc" }
},
{
pathPattern: "^exports.*$",
order: ["types", "require", "import", "default"]
}
]
}
},
{
name: "so1ve/formatting/rules/sort-tsconfig",
files: GLOB_TSCONFIG,
rules: {
"jsonc/sort-keys": [
"error",
{
order: [
"extends",
"compilerOptions",
"references",
"files",
"include",
"exclude"
],
pathPattern: "^$"
},
{
order: [
/* Projects */
"incremental",
"composite",
"tsBuildInfoFile",
"disableSourceOfProjectReferenceRedirect",
"disableSolutionSearching",
"disableReferencedProjectLoad",
/* Language and Environment */
"target",
"jsx",
"jsxFactory",
"jsxFragmentFactory",
"jsxImportSource",
"lib",
"moduleDetection",
"noLib",
"reactNamespace",
"useDefineForClassFields",
"emitDecoratorMetadata",
"experimentalDecorators",
/* Modules */
"baseUrl",
"rootDir",
"rootDirs",
"customConditions",
"module",
"moduleResolution",
"moduleSuffixes",
"noResolve",
"resolveJsonModule",
"resolvePackageJsonExports",
"resolvePackageJsonImports",
"typeRoots",
"types",
"allowArbitraryExtensions",
"allowImportingTsExtensions",
"allowUmdGlobalAccess",
/* JavaScript Support */
"allowJs",
"checkJs",
"maxNodeModuleJsDepth",
/* Type Checking */
"strict",
"strictBindCallApply",
"strictFunctionTypes",
"strictNullChecks",
"strictPropertyInitialization",
"allowUnreachableCode",
"allowUnusedLabels",
"alwaysStrict",
"exactOptionalPropertyTypes",
"noFallthroughCasesInSwitch",
"noImplicitAny",
"noImplicitOverride",
"noImplicitReturns",
"noImplicitThis",
"noPropertyAccessFromIndexSignature",
"noUncheckedIndexedAccess",
"noUnusedLocals",
"noUnusedParameters",
"useUnknownInCatchVariables",
/* Emit */
"declaration",
"declarationDir",
"declarationMap",
"downlevelIteration",
"emitBOM",
"emitDeclarationOnly",
"importHelpers",
"importsNotUsedAsValues",
"inlineSourceMap",
"inlineSources",
"mapRoot",
"newLine",
"noEmit",
"noEmitHelpers",
"noEmitOnError",
"outDir",
"outFile",
"preserveConstEnums",
"preserveValueImports",
"removeComments",
"sourceMap",
"sourceRoot",
"stripInternal",
/* Interop Constraints */
"allowSyntheticDefaultImports",
"esModuleInterop",
"forceConsistentCasingInFileNames",
"isolatedModules",
"preserveSymlinks",
"verbatimModuleSyntax",
/* Completeness */
"skipDefaultLibCheck",
"skipLibCheck",
/* Alias */
"paths"
],
pathPattern: "^compilerOptions$"
}
]
}
}
],
(options?.test ?? true) && {
name: "so1ve/formatting/rules/test",
files: GLOB_TESTS,
rules: {
"jest-formatting/padding-around-all": "error"
}
}
].flat().filter(Boolean);
}
// src/configs/html.ts
init_shims();
async function html() {
const parserHtml = await interopDefault(import("@html-eslint/parser"));
const pluginHtml = await interopDefault(import("@html-eslint/eslint-plugin"));
const pluginHtmlJsSupport = await interopDefault(
// @ts-expect-error No declaration
import("eslint-plugin-html")
);
return [
{
name: "so1ve/html/setup",
plugins: {
"html": pluginHtml,
"html-js-support": pluginHtmlJsSupport
}
},
{
name: "so1ve/html/rules",
languageOptions: {
parser: parserHtml
},
settings: {
"html/report-bad-indent": "off"
},
files: [GLOB_HTML],
rules: {
...renameRules(pluginHtml.configs.recommended.rules, {
"@html-eslint": "html"
}),
"html/indent": "off",
"html/no-trailing-spaces": "off",
"html/require-closing-tags": "off",
"html/no-extra-spacing-attrs": "off",
"html/quotes": "off"
}
}
];
}
// src/configs/ignores.ts
init_shims();
var ignores = () => [
{ name: "so1ve/ignores", ignores: GLOB_EXCLUDE }
];
// src/configs/imports.ts
init_shims();
var imports = (options = {}) => [
{
name: "so1ve/imports/setup",
plugins: {
import: import_eslint_plugin_import_x.default
}
},
{
name: "so1ve/imports/rules",
languageOptions: {
parserOptions: {
ecmaVersion: "latest",
sourceType: "module"
}
},
settings: {
"import/parsers": {
"espree": [".js", ".cjs", ".mjs", ".jsx"],
"@typescript-eslint/parser": [".ts", ".mts", ".cts", ".tsx", ".d.ts"]
},
"import/resolver": {
...options.typescript ? {
node: {
extensions: [".js", ".jsx", ".mjs", ".ts", ".tsx", ".d.ts"]
},
typescript: {
extensions: [".js", ".jsx", ".mjs", ".ts", ".tsx", ".d.ts"]
}
} : {
node: { extensions: [".js", ".mjs"] }
}
}
},
rules: {
"import/named": "error",
"import/default": "error",
"import/export": "error",
"import/first": "error",
"import/namespace": "off",
// Disable this for better performance
"import/no-mutable-exports": "error",
"import/no-useless-path-segments": ["error", { noUselessIndex: true }],
"import/no-named-as-default": "error",
"import/no-unresolved": "off",
"import/no-absolute-path": "off",
"import/no-duplicates": "error",
"import/no-named-default": "error",
"import/no-webpack-loader-syntax": "error",
"import/no-named-as-default-member": "off"
}
},
{
name: "so1ve/imports/rules/dts",
files: [GLOB_DTS],
rules: {
"import/no-duplicates": "off"
}
}
];
// src/configs/javascript.ts
init_shims();
import globals from "globals";
async function javascript({ overrides } = {}) {
const regexpRecommended = pluginRegexp.configs["flat/recommended"];
return [
{
name: "so1ve/javascript/setup",
plugins: {
"so1ve": await interopDefault(default3),
"unused-imports": default11,
"sort-imports": default4,
"array-func": default5,
"no-await-in-promise": pluginNoAwaitInPromise
}
},
{
name: "so1ve/javascript/rules",
languageOptions: {
ecmaVersion: 2022,
globals: {
...globals.browser,
...globals.es2021,
...globals.node,
document: "readonly",
navigator: "readonly",
window: "readonly"
},
parserOptions: {
ecmaFeatures: {
jsx: true
},
ecmaVersion: 2022,
sourceType: "module"
},
sourceType: "module"
},
linterOptions: {
reportUnusedDisableDirectives: true
},
rules: {
// Common
"array-bracket-newline": "off",
"array-element-newline": "off",
"arrow-body-style": "off",
"arrow-parens": "off",
"dot-notation": ["error", { allowKeywords: true }],
"function-call-argument-newline": "off",
"function-paren-newline": "off",
"generator-star": "off",
"implicit-arrow-linebreak": "off",
"indent": "off",
"indent-legacy": "off",
"jsx-quotes": "off",
"linebreak-style": "off",
"newline-per-chained-call": "off",
"no-arrow-condition": "off",
"no-comma-dangle": "off",
"no-confusing-arrow": "off",
"no-extra-semi": "off",
"no-reserved-keys": "off",
"no-spaced-func": "off",
"no-space-before-semi": "off",
"no-wrap-func": "off",
"nonblock-statement-body-position": "off",
"one-var-declaration-per-line": "off",
"switch-colon-spacing": "off",
"symbol-description": "off",
"wrap-regex": "off",
"unused-imports/no-unused-imports": "error",
"unused-imports/no-unused-vars": [
"error",
{
vars: "all",
varsIgnorePattern: "^_",
args: "after-used",
argsIgnorePattern: "^_",
ignoreRestSiblings: true
}
],
"accessor-pairs": [
"error",
{ setWithoutGet: true, enforceForClassMembers: true }
],
"constructor-super": "error",
"default-case-last": "error",
"lines-between-class-members": [
"error",
"always",
{ exceptAfterSingleLine: true }
],
"new-cap": [
"error",
{ newIsCap: true, capIsNew: false, properties: true }
],
"no-array-constructor": "error",
"no-async-promise-executor": "error",
"no-caller": "error",
"no-class-assign": "error",
"no-compare-neg-zero": "error",
"no-const-assign": "error",
"no-control-regex": "error",
"no-delete-var": "error",
"no-dupe-args": "error",
"no-dupe-class-members": "error",
"no-dupe-keys": "error",
"no-duplicate-case": "error",
"no-useless-backreference": "error",
"no-useless-call": "error",
"no-useless-computed-key": "error",
"no-useless-constructor": "error",
"no-useless-rename": "error",
"no-useless-return": "error",
"no-void": "error",
"no-empty": ["error", { allowEmptyCatch: true }],
"no-empty-character-class": "error",
"no-empty-pattern": "error",
"no-eval": "error",
"no-ex-assign": "error",
"no-extend-native": "error",
"no-extra-bind": "error",
"no-extra-boolean-cast": "error",
"no-extra-parens": ["error", "functions"],
"no-fallthrough": "error",
"no-func-assign": "error",
"no-global-assign": "error",
"no-implied-eval": "error",
"no-import-assign": "error",
"no-invalid-regexp": "error",
"no-irregular-whitespace": "error",
"no-iterator": "error",
"no-labels": ["error", { allowLoop: true, allowSwitch: false }],
"no-lone-blocks": "error",
"no-loss-of-precision": "error",
"no-misleading-character-class": "error",
"no-new-func": "error",
"no-new-object": "error",
"no-new-symbol": "error",
"no-new-wrappers": "error",
"no-prototype-builtins": "error",
"no-useless-catch": "error",
"no-param-reassign": "off",
"no-constant-condition": "error",
"no-debugger": "error",
"no-console": ["error", { allow: ["error", "warn", "table", "time"] }],
"no-cond-assign": ["error", "always"],
"no-restricted-syntax": [
"error",
"DebuggerStatement",
"LabeledStatement",
"WithStatement"
],
"no-restricted-globals": [
"error",
{ name: "global", message: "Use `globalThis` instead." },
{ name: "self", message: "Use `globalThis` instead." },
{ name: "isNaN", message: "Use `Number.isNaN` instead" },
{ name: "isFinite", message: "Use `Number.isFinite` instead" },
{ name: "parseFloat", message: "Use `Number.parseFloat` instead" },
{ name: "parseInt", message: "Use `Number.parseInt` instead" }
],
"no-restricted-properties": [
"error",
{
object: "globalThis",
property: "isNaN",
message: "Use `Number.isNaN` instead"
},
{
object: "globalThis",
property: "isFinite",
message: "Use `Number.isFinite` instead"
},
{
object: "globalThis",
property: "parseFloat",
message: "Use `Number.parseFloat` instead"
},
{
object: "globalThis",
property: "parseInt",
message: "Use `Number.parseInt` instead"
},
{
object: "window",
property: "isNaN",
message: "Use `Number.isNaN` instead"
},
{
object: "window",
property: "isFinite",
message: "Use `Number.isFinite` instead"
},
{
object: "window",
property: "parseFloat",
message: "Use `Number.parseFloat` instead"
},
{
object: "window",
property: "parseInt",
message: "Use `Number.parseInt` instead"
}
],
"no-obj-calls": "error",
"no-octal": "error",
"no-octal-escape": "error",
"no-proto": "error",
"no-redeclare": ["error", { builtinGlobals: false }],
"no-regex-spaces": "error",
"no-self-assign": ["error", { props: true }],
"no-self-compare": "error",
"no-sequences": "error",
"no-shadow-restricted-names": "error",
"no-template-curly-in-string": "error",
"no-this-before-super": "error",
"no-throw-literal": "error",
"no-undef": "error",
"no-undef-init": "error",
"no-unexpected-multiline": "error",
"no-unmodified-loop-condition": "error",
"no-unneeded-ternary": ["error", { defaultAssignment: false }],
"no-unreachable": "error",
"no-unreachable-loop": "error",
"no-unsafe-finally": "error",
"no-unsafe-negation": "error",
"no-return-await": "off",
// es6
"no-var": "error",
"prefer-const": [
"error",
{
destructuring: "all",
ignoreReadBeforeAssign: true
}
],
"prefer-arrow-callback": [
"error",
{
allowNamedFunctions: false,
allowUnboundThis: true
}
],
"one-var": ["error", "never"],
"object-shorthand": [
"error",
"always",
{
ignoreConstructors: false
}
],
"prefer-exponentiation-operator": "error",
"prefer-rest-params": "error",
"prefer-spread": "error",
"prefer-template": "error",
"prefer-promise-reject-errors": "error",
"prefer-regex-literals": ["error", { disallowRedundantWrapping: true }],
"yoda": ["error", "never"],
"spaced-comment": [
"error",
"always",
{
line: {
markers: ["/"],
exceptions: ["/", "#"]
},
block: {
markers: ["!"],
exceptions: ["*"],
balanced: true
}
}
],
// best-practice
"array-callback-return": "error",
"block-scoped-var": "error",
"no-unused-expressions": [
"error",
{
allowShortCircuit: true,
allowTernary: true,
allowTaggedTemplates: true
}
],
"no-unused-vars": [
"error",
{
args: "none",
caughtErrors: "none",
ignoreRestSiblings: true,
vars: "all"
}
],
"no-use-before-define": [
"error",
{ functions: false, classes: false, variables: true }
],
"consistent-return": "off",
"complexity": ["off", 11],
"eqeqeq": ["error", "smart"],
"no-alert": "error",
"no-case-declarations": "error",
"no-multi-str": "error",
"no-with": "error",
"no-invalid-this": "error",
"vars-on-top": "error",
"require-await": "off",
"use-isnan": [
"error",
{
enforceForSwitchCase: true,
enforceForIndexOf: true
}
],
"valid-typeof": ["error", { requireStringLiterals: true }],
// so1ve
"so1ve/import-dedupe": "error",
"so1ve/require-async-with-await": "error",
// Sort Imports
"sort-imports/imports": ["error"],
"sort-imports/exports": "error",
// array-func
"array-func/prefer-array-from": "off",
"array-func/prefer-flat": "off",
// Handled by unicorn
"array-func/from-map": "off",
// Conflicts with unicorn/prefer-spread
"array-func/no-unnecessary-this-arg": "error",
"array-func/avoid-reverse": "error",
"array-func/prefer-flat-map": "error",
// no-await-in-promise
"no-await-in-promise/no-await-in-promise": "error",
...overrides
}
},
{
...regexpRecommended,
name: "so1ve/javascript/regexp",
rules: {
...regexpRecommended.rules,
"regexp/no-unused-capturing-group": "off"
}
},
{
name: "so1ve/javascript/cli",
files: [`scripts/${GLOB_SRC}`, `cli.${GLOB_SRC_EXT}`],
rules: {
"no-console": "off"
}
}
];
}
// src/configs/jsonc.ts
init_shims();
async function jsonc() {
const parserJsonc = await interopDefault(import("jsonc-eslint-parser"));
const pluginJsonc = await interopDefault(import("eslint-plugin-jsonc"));
return [
{
name: "so1ve/jsonc/setup",
plugins: {
jsonc: pluginJsonc
}
},
{
name: "so1ve/jsonc/rules",
files: [GLOB_JSON, GLOB_JSON5, GLOB_JSONC, GLOB_ESLINTRC],
languageOptions: {
parser: parserJsonc
},
rules: {
...pluginJsonc.configs.base.overrides[0].rules,
...pluginJsonc.configs["recommended-with-jsonc"].rules,
"jsonc/no-octal-escape": "error",
"jsonc/quotes": "off",
"jsonc/quotes-props": "off"
}
}
];
}
// src/configs/mdx.ts
init_shims();
async function mdx({
componentExts = [],
overrides
} = {}) {
const pluginMdx = await interopDefault(import("eslint-plugin-mdx"));
return [
{
...pluginMdx.flat,
name: "so1ve/mdx/setup",
processor: pluginMdx.createRemarkProcessor({
lintCodeBlocks: true,
languageMapper: {}
})
},
{
...pluginMdx.flatCodeBlocks,
name: "so1ve/mdx/rules",
files: [
...pluginMdx.flatCodeBlocks.files,
...componentExts.map((ext) => `${GLOB_MARKDOWN}/*.${ext}`)
],
rules: {
...pluginMdx.flatCodeBlocks.rules,
"html/require-doctype": "off",
"ts/no-redeclare": "off",
"ts/no-unused-vars": "off",
"ts/no-use-before-define": "off",
"ts/no-var-requires": "off",
"ts/consistent-type-imports": "off",
"ts/no-namespace": "off",
"ts/no-require-imports": "off",
"import/no-unresolved": "off",
"unused-imports/no-unused-imports": "off",
"unused-imports/no-unused-vars": "off",
"no-alert": "off",
"no-console": "off",
"no-restricted-imports": "off",
"no-undef": "off",
"no-unused-expressions": "off",
...overrides
}
}
];
}
// src/configs/node.ts
init_shims();
var node = () => [
{
name: "so1ve/node/setup",
plugins: {
node: default7
}
},
{
name: "so1ve/node/rules",
rules: {
"node/no-callback-literal": "off",
"node/handle-callback-err": ["error", "^(err|error)$"],
"node/no-deprecated-api": "error",
"node/no-exports-assign": "error",
"node/no-new-require": "error",
"node/no-path-concat": "error",
"node/process-exit-as-throw": "error"
}
}
];
// src/configs/only-error.ts
init_shims();
var onlyError = () => [
{
name: "so1ve/only-error",
plugins: {
"only-error": default8
}
}
];
// src/configs/promise.ts
init_shims();
var promise = () => [
{
name: "so1ve/promise/setup",
plugins: {
promise: default9
}
},
{
name: "so1ve/promise/rules",
rules: { "promise/param-names": "error" }
}
];
// src/configs/solid.ts
init_shims();
async function solid({
overrides,
typescript: typescript2
} = {}) {
const pluginSolid = await interopDefault(import("eslint-plugin-solid"));
return [
{
name: "so1ve/solid/setup",
plugins: {
solid: pluginSolid
}
},
{
name: "so1ve/solid/rules",
languageOptions: {
sourceType: "module",
parserOptions: {
ecmaFeatures: {
jsx: true
}
}
},
rules: {
...pluginSolid.configs.recommended.rules,
...typescript2 ? pluginSolid.configs.typescript.rules : {},
...overrides
}
}
];
}
// src/configs/sort-imports.ts
init_shims();
var sortImports = () => [
{
name: "so1ve/sort-imports/setup",
plugins: {
"sort-imports": default4
}
},
{
name: "so1ve/sort-imports/rules",
rules: {
"sort-imports/imports": "error",
"sort-imports/exports": "error"
}
}
];
// src/configs/test.ts
init_shims();
async function test({ overrides } = {}) {
const pluginNoOnlyTests = await interopDefault(
// @ts-expect-error No declaration
import("eslint-plugin-no-only-tests")
);
const pluginVitest = await interopDefault(import("eslint-plugin-vitest"));
const pluginJestFormatting = await interopDefault(
// @ts-expect-error No declaration
import("eslint-plugin-jest-formatting")
);
return [
{
name: "so1ve/test/setup",
plugins: {
"no-only-tests": pluginNoOnlyTests,
"vitest": pluginVitest,
"jest-formatting": pluginJestFormatting
}
},
{
name: "so1ve/test/rules",
files: GLOB_TESTS,
rules: {
...pluginVitest.configs.recommended.rules,
"no-only-tests/no-only-tests": "error",
"vitest/expect-expect": "off",
"vitest/valid-title": "off",
"vitest/valid-describe-callback": "off",
"vitest/no-alias-methods": "error",
"vitest/no-interpolation-in-snapshots": "error",
"vitest/no-test-prefixes": "error",
"vitest/prefer-expect-resolves": "error",
"vitest/prefer-comparison-matcher": "error",
"vitest/prefer-mock-promise-shorthand": "error",
"vitest/prefer-spy-on": "error",
"vitest/prefer-to-be-falsy": "error",
"vitest/prefer-to-be-object": "error",
"vitest/prefer-to-be-truthy": "error",
"vitest/prefer-to-contain": "error",
"vitest/prefer-to-have-length": "error",
"vitest/prefer-todo": "error",
...overrides
}
}
];
}
// src/configs/toml.ts
init_shims();
async function toml({ overrides } = {}) {
const parserToml = await interopDefault(import("toml-eslint-parser"));
const pluginToml = await interopDefault(import("eslint-plugin-toml"));
return [
{
name: "so1ve/toml/setup",
plugins: {
toml: pluginToml
}
},
{
name: "so1ve/toml/rules",
languageOptions: {
parser: parserToml
},
files: [GLOB_TOML],
rules: {
...pluginToml.configs.recommended.rules,
"no-irregular-whitespace": "off",
"spaced-comment": "off",
...overrides
}
}
];
}
// src/configs/typescript.ts
init_shims();
import tseslint from "typescript-eslint";
async function typescript({
componentExts = [],
parserOptions,
overrides
} = {}) {
const typeAwareRules = {
"no-throw-literal": "off",
"ts/no-throw-literal": "error",
"no-implied-eval": "off",
"ts/no-implied-eval": "error",
"dot-notation": "off",
"ts/dot-notation": ["error", { allowKeywords: true }],
"no-void": ["error", { allowAsStatement: true }],
"ts/await-thenable": "error",
"ts/no-for-in-array": "error",
"ts/no-unnecessary-type-assertion": "error",
"ts/restrict-template-expressions": [
"error",
{
allowAny: true,
allowNumber: true,
allowBoolean: true
}
],
"ts/array-type": ["error", { default: "array", readonly: "array" }],
"ts/consistent-generic-constructors": "error",
"ts/consistent-type-exports": "error",
"ts/consistent-type-assertions": [
"error",
{ assertionStyle: "as", objectLiteralTypeAssertions: "allow" }
],
"ts/prefer-nullish-coalescing": "error",
"ts/prefer-optional-chain": "error",
"ts/prefer-return-this-type": "error",
"ts/no-unnecessary-type-arguments": "error",
"ts/non-nullable-type-assertion-style": "error"
};
return [
{
name: "so1ve/typescript/setup",
// Install the plugins without globs, so they can be configured separately.
plugins: {
import: import_eslint_plugin_import_x.default,
ts: tseslint.plugin
}
},
{
name: "so1ve/typescript/rules",
files: [GLOB_TS, GLOB_TSX, ...componentExts.map((ext) => `**/*.${ext}`)],
languageOptions: {
parser: tseslint.parser,
parserOptions: {
sourceType: "module",
extraFileExtensions: componentExts.map((ext) => `.${ext}`),
...parserOptions
}
},
settings: {
"import/resolver": {
node: { extensions: [".js", ".jsx", ".mjs", ".ts", ".tsx", ".d.ts"] },
typescript: {
extensions: [".js", ".jsx", ".mjs", ".ts", ".tsx", ".d.ts"]
}
}
},
rules: {
...renameRules(tseslint.configs.eslintRecommended.rules, {
"@typescript-eslint": "ts"
}),
...renameRules(
tseslint.configs.recommended.map((config) => config.rules).filter(Boolean).reduce((a, b) => ({ ...a, ...b }), {}),
{ "@typescript-eslint": "ts" }
),
"import/named": "off",
// TS
"ts/comma-dangle": "off",
"ts/brace-style": "off",
"ts/comma-spacing": "off",
"ts/func-call-spacing": "off",
"ts/indent": "off",
"ts/keyword-spacing": "off",
"ts/member-delimiter-style": "off",
"ts/no-extra-parens": "off",
"ts/no-extra-semi": "off",
"ts/quotes": "off",
"ts/semi": "off",
"ts/space-before-function-paren": "off",
"ts/type-annotation-spacing": "off",
"ts/ban-ts-comment": [
"error",
{
minimumDescriptionLength: 0
}
],
"ts/ban-types": [
"error",
{
extendDefaults: false,
types: {
String: {
message: "Use `string` instead.",
fixWith: "string"
},
Number: {
message: "Use `number` instead.",
fixWith: "number"
},
Boolean: {
message: "Use `boolean` instead.",
fixWith: "boolean"
},
Symbol: {
message: "Use `symbol` instead.",
fixWith: "symbol"
},
BigInt: {
message: "Use `bigint` instead.",
fixWith: "bigint"
},
Object: {
message: "The `Object` type is mostly the same as `unknown`. You probably want `Record<PropertyKey, unknown>` instead. See https://github.com/typescript-eslint/typescript-eslint/pull/848",
fixWith: "Record<PropertyKey, unknown>"
},
object: {
message: "The `object` type is hard to use. Use `Record<PropertyKey, unknown>` instead. See: https://github.com/typescript-eslint/typescript-eslint/pull/848",
fixWith: "Record<PropertyKey, unknown>"
},
Function: {
message: "Use `(...args: any[]) => any` instead.",
fixWith: "(...args: any[]) => any"
}
}
}
],
"ts/consistent-type-imports": [
"error",
{ prefer: "type-imports", disallowTypeAnnotations: false }
],
"ts/consistent-type-definitions": ["error", "interface"],
"ts/consistent-indexed-object-style": ["error", "record"],
"ts/prefer-ts-expect-error": "error",
"ts/prefer-for-of": "error",
"ts/no-duplicate-enum-values": "error",
"ts/no-non-null-asserted-nullish-coalescing": "error",
"ts/no-require-imports": "error",
"ts/method-signature-style": ["error", "property"],
"ts/explicit-member-accessibility": [
"error",
{
accessibility: "explicit",
overrides: {
constructors: "no-public"
}
}
],
// Override JS
"no-useless-constructor": "off",
"no-invalid-this": "off",
"ts/no-invalid-this": "error",
"no-redeclare": "off",
"ts/no-redeclare": "error",
"no-use-before-define": "off",
"ts/no-use-before-define": [
"error",
{ functions: false, classes: false, variables: true }
],
"object-curly-spacing": "off",
"space-before-blocks": "off",
"ts/space-before-blocks": "off",
"space-before-function-paren": "off",
"no-dupe-class-members": "off",
"ts/no-dupe-class-members": "error",
"no-loss-of-precision": "off",
"ts/no-loss-of-precision": "error",
"lines-between-class-members": "off",
"ts/lines-between-class-members": [
"error",
"always",
{ exceptAfterSingleLine: true }
],
// so1ve
"so1ve/no-inline-type-import": "error",
// off
"ts/camelcase": "off",
"ts/explicit-function-return-type": "off",
"ts/no-explicit-any": "off",
"ts/no-parameter-properties": "off",
"ts/no-empty-interface": "off",
"ts/ban-ts-ignore": "off",
"ts/no-empty-function": "off",
"ts/no-non-null-assertion": "off",
"ts/explicit-module-boundary-types": "off",
"ts/triple-slash-reference": "off",
// handled by unused-imports/no-unused-imports
"ts/no-unused-vars": "off",
...overrides
}
},
{
name: "so1ve/typescript/rules/markdown-codeblocks",
files: [GLOB_TS, GLOB_TSX, ...componentExts.map((ext) => `**/*.${ext}`)],
ignores: [GLOB_MARKDOWN_CODE],
languageOptions: {
parser: tseslint.parser,
parserOptions: {
sourceType: "module",
// EXPERIMENTAL_useProjectService: true,
project: true,
tsconfigRootDir: process.cwd()
}
},
settings: {
"import/resolver": {
node: {
extensions: [".js", ".jsx", ".mjs", ".ts", ".tsx", ".d.ts"]
},
typescript: {
extensions: [".js", ".jsx", ".mjs", ".ts", ".tsx", ".d.ts"]
}
}
},
rules: {
...typeAwareRules
}
},
{
name: "so1ve/typescript/rules/dts",
files: ["**/*.d.ts"],
rules: {
"eslint-comments/no-unlimited-disable": "off",
"import/no-duplicates": "off",
"unused-imports/no-unused-vars": "off"
}
},
{
name: "so1ve/typescript/rules/js",
files: ["**/*.js", "**/*.cjs"],
rules: {
"ts/no-require-imports": "off",
"ts/no-var-requires": "off"
}
}
];
}
// src/configs/unicorn.ts
init_shims();
var unicorn = () => [
{
name: "so1ve/unicorn/setup",
plugins: {
unicorn: default10
}
},
{
name: "so1ve/unicorn/rules",
rules: {
"unicorn/throw-new-error": "error",
"unicorn/relative-url-style": ["error", "always"],
"unicorn/switch-case-braces": "error",
"unicorn/number-literal-case": "error",
"unicorn/numeric-separators-style": "error",
"unicorn/new-for-builtins": "error",
"unicorn/error-message": "error",
"unicorn/escape-case": "error",
"unicorn/explicit-length-check": "error",
"unicorn/no-instanceof-array": "error",
"unicorn/no-new-buffer": "error",
"unicorn/no-new-array": "error",
"unicorn/no-array-for-each": "error",
"unicorn/no-array-method-this-argument": "error",
"unicorn/no-for-loop": "error",
"unicorn/no-lonely-if": "error",
"unicorn/no-negated-condition": "error",
"unicorn/no-useless-spread": "error",
"unicorn/prefer-ternary": "error",
"unicorn/prefer-query-selector": "error",
"unicorn/prefer-modern-dom-apis": "error",
"unicorn/prefer-modern-math-apis": "error",
"unicorn/prefer-json-parse-buffer": "error",
"unicorn/prefer-date-now": "error",
"unicorn/prefer-array-some": "error",
"unicorn/prefer-array-index-of": "error",
"unicorn/prefer-array-flat": "error",
"unicorn/prefer-array-find": "error",
"unicorn/prefer-spread": "error",
"unicorn/prefer-set-size": "error",
"unicorn/prefer-string-slice": "error",
"unicorn/prefer-includes": "error",
"unicorn/prefer-string-starts-ends-with": "error",
"unicorn/prefer-text-content": "error",
"unicorn/prefer-type-error": "error",
"unicorn/prefer-node-protocol": "error",
"unicorn/prefer-negative-index": "error",
"unicorn/prefer-regexp-test": "error",
"unicorn/prefer-optional-catch-binding": "error",
"unicorn/prefer-object-from-entries": "error",
"unicorn/prefer-prototype-methods": "error"
}
}
];
// src/configs/vue.ts
init_shims();
import tseslint2 from "typescript-eslint";
async function vue({
overrides,
typescript: typescript2
} = {}) {
const parserVue = await interopDefault(import("vue-eslint-parser"));
const pluginVue = await interopDefault(import("eslint-plugin-vue"));
return [
{
name: "so1ve/vue/setup",
plugins: {
vue: pluginVue
}
},
{
name: "so1ve/vue/rules",
files: [GLOB_VUE],
languageOptions: {
parser: parserVue,
parserOptions: {
ecmaFeatures: {
jsx: true
},
extraFileExtensions: [".vue"],
parser: typescript2 ? tseslint2.parser : null,
sourceType: "module"
}
},
processor: pluginVue.processors[".vue"],
rules: {
...pluginVue.configs.base.rules,
...pluginVue.configs["vue3-essential"].rules,
...pluginVue.configs["vue3-strongly-recommended"].rules,
...pluginVue.configs["vue3-recommended"].rules,
"no-unused-vars": "off",
"no-undef": "off",
"ts/no-unused-vars": "off",
"vue/no-v-html": "off",
"vue/require-prop-types": "off",
"vue/require-default-prop": "off",
"vue/multi-word-component-names": "off",
"vue/no-ref-object-reactivity-loss": "error",
"vue/no-setup-props-reactivity-loss": "error",
"vue/block-order": [
"error",
{
order: [
"script:not([setup])",
"script[setup]",
"template",
"style"
]
}
],
"vue/component-api-style": ["error", ["script-setup", "composition"]],
"vue/component-name-in-template-casing": [
"error",
"PascalCase",
{ registeredComponentsOnly: false }
],
"vue/component-options-name-casing": ["error", "PascalCase"],
"vue/custom-event-name-casing": ["error", "camelCase"],
"vue/define-macros-order": [
"error",
{
order: [
"defineOptions",
"defineEmits",
"defineProps",
"defineSlots"
]
}
],
"vue/html-comment-content-spacing": [
"error",
"always",
{ exceptions: ["-"] }
],
"vue/no-restricted-v-bind": ["error", "/^v-/"],
"vue/no-useless-v-bind": ["error", { ignoreIncludesComment: true }],
"vue/no-unused-refs": "error",
"vue/no-v-text-v-html-on-component": "error",
"vue/padding-line-between-blocks": ["error", "always"],
"vue/prefer-separate-static-class": "error",
// extensions
"vue/dot-location": ["error", "property"],
"vue/dot-notation": ["error", { allowKeywords: true }],
"vue/eqeqeq": ["error", "smart"],
"vue/no-constant-condition": "error",
"vue/no-empty-pattern": "error",
"vue/no-irregular-whitespace": "error",
"vue/no-loss-of-precision": "error",
"vue/no-restricted-syntax": [
"error",
"DebuggerStatement",
"LabeledStatement",
"WithStatement"
],
"vue/no-sparse-arrays": "error",
"vue/object-curly-newline": [
"error",
{ multiline: true, consistent: true }
],
"vue/object-property-newline": [
"error",
{ allowMultiplePropertiesPerLine: true }
],
"vue/object-shorthand": [
"error",
"always",
{ ignoreConstructors: false, avoidQuotes: true }
],
"vue/prefer-template": "error",
"vue/quote-props": ["error", "consistent-as-needed"],
"vue/block-lang": [
"error",
{
script: {
lang: ["js", "ts"]
},
template: {
lang: ["html", "jade", "pug", "ejs"]
},
style: {
lang: ["css", "sass", "scss", "less", "stylus", "postcss"]
}
}
],
"vue/require-macro-variable-name": [
"error",
{
defineProps: "props",
defineEmits: "emit",
defineSlots: "slots",
useSlots: "slots",
useAttrs: "attrs"
}
],
"vue/require-typed-ref": "error",
"vue/no-static-inline-styles": ["error", { allowBinding: true }],
"vue/no-console": [
"error",
{ allow: ["error", "warn", "table", "time"] }
],
"vue/camelcase": "error",
"vue/v-for-delimiter-style": ["error", "in"],
"vue/attributes-order": [
"error",
{
order: [
"DEFINITION",
"LIST_RENDERING",
"CONDITIONALS",
"RENDER_MODIFIERS",
"TWO_WAY_BINDING",
"OTHER_DIRECTIVES",
["UNIQUE", "SLOT"],
"GLOBAL",
"OTHER_ATTR",
"EVENTS",
"CONTENT"
],
alphabetical: true
}
],
"vue/prefer-true-attribute-shorthand": "error",
"vue/prefer-define-options": "error",
"vue/html-comment-content-newline": [
"error",
{ singleline: "ignore", multiline: "always" }
],
"vue/html-comment-indent": ["error", "tab"],
"vue/html-self-closing": [
"error",
{
html: {
void: "always",
normal: "always",
component: "always"
},
svg: "always",
math: "always"
}
],
"vue/no-useless-concat": "error",
// off
"vue/no-multiple-template-root": "off",
"vue/multiline-html-element-content-newline": "off",
"vue/singleline-html-element-content-newline": "off",
"vue/no-extra-parens": "off",
"vue/array-bracket-spacing": "off",
"vue/arrow-spacing": "off",
"vue/block-spacing": "off",
"vue/brace-style": "off",
"vue/comma-dangle": "off",
"vue/comma-spacing": "off",
"vue/comma-style": "off",
"vue/operator-linebreak": "off",
"vue/template-curly-spacing": "off",
"vue/key-spacing": "off",
"vue/keyword-spacing": "off",
"vue/html-quotes": "off",
"vue/html-indent": "off",
"vue/no-multi-spaces": "off",
"vue/max-attributes-per-line": "off",
"vue/html-closing-bracket-spacing": "off",
"vue/mustache-interpolation-spacing": "off",
...overrides
}
}
];
}
// src/configs/yaml.ts
init_shims();
async function yaml({ overrides } = {}) {
const parserYaml = await interopDefault(import("yaml-eslint-parser"));
const pluginYaml = await interopDefault(import("eslint-plugin-yml"));
return [
{
name: "so1ve/yaml/setup",
plugins: {
yaml: pluginYaml
}
},
{
name: "so1ve/yaml/rules",
languageOptions: {
parser: parserYaml
},
files: [GLOB_YAML],
rules: {
...renameRules(pluginYaml.configs.prettier.rules, { yml: "yaml" }),
...renameRules(pluginYaml.configs.recommended.rules, { yml: "yaml" }),
"yaml/no-empty-document": "off",
"spaced-comment": "off",
...overrides
}
}
];
}
// src/factory.ts
init_shims();
import fs from "node:fs";
import { FlatConfigComposer } from "eslint-flat-config-utils";
import { isPackageExists } from "local-pkg";
var flatConfigProps = [
"files",
"ignores",
"languageOptions",
"linterOptions",
"processor",
"plugins",
"rules",
"settings"
];
var VuePackages = ["vue", "nuxt", "vitepress", "@slidev/cli"];
var defaultPluginRenaming = {
"@stylistic": "style",
"@typescript-eslint": "ts",
"@html-eslint": "html",
"import-x": "import",
"n": "node",
"yml": "yaml"
};
function so1ve(options = {}, ...userConfigs) {
const {
vue: enableVue = VuePackages.some((i) => isPackageExists(i)),
solid: enableSolid = isPackageExists("solid-js"),
typescript: enableTypeScript = isPackageExists("typescript"),
gitignore: enableGitignore = true,
componentExts = []
} = options;
const configs = [];
if (enableGitignore) {
if (typeof enableGitignore === "boolean") {
if (fs.existsSync(".gitignore")) {
configs.push(
interopDefault(import("eslint-config-flat-gitignore")).then((r) => [
r()
])
);
}
} else {
configs.push(
interopDefault(import("eslint-config-flat-gitignore")).then((r) => [
r(enableGitignore)
])
);
}
}
configs.push(
ignores(),
javascript({
overrides: getOverrides(options, "javascript")
}),
comments(),
node(),
onlyError(),
promise(),
sortImports(),
imports(),
unicorn()
);
if (enableVue) {
componentExts.push("vue");
}
if (options.html ?? true) {
configs.push(html());
}
if (enableTypeScript) {
configs.push(
typescript({
componentExts,
overrides: getOverrides(options, "typescript")
})
);
}
if (options.test ?? true) {
configs.push(
test({
overrides: getOverrides(options, "test")
})
);
}
if (enableVue) {
configs.push(
vue({
overrides: getOverrides(options, "vue"),
typescript: !!enableTypeScript
})
);
}
if (enableSolid) {
configs.push(
solid({
overrides: getOverrides(options, "solid"),
typescript: !!enableTypeScript
})
);
}
if (options.jsonc ?? true) {
configs.push(jsonc());
}
if (options.toml ?? true) {
configs.push(
toml({
overrides: getOverrides(options, "toml")
})
);
}
if (options.yaml ?? true) {
configs.push(
yaml({
overrides: getOverrides(options, "yaml")
})
);
}
if (options.mdx ?? true) {
configs.push(
mdx({
componentExts,
overrides: getOverrides(options, "mdx")
})
);
}
if (options.formatting ?? true) {
configs.push(formatting(options));
}
const fusedConfig = flatConfigProps.reduce((acc, key) => {
if (key in options) {
acc[key] = options[key];
}
return acc;
}, {});
if (Object.keys(fusedConfig).length > 0) {
configs.push([fusedConfig]);
}
const composer = new FlatConfigComposer().append(...configs, ...userConfigs).renamePlugins(defaultPluginRenaming);
return composer;
}
var resolveSubOptions = (options, key) => typeof options[key] === "boolean" ? {} : options[key] || {};
function getOverrides(options, key) {
const sub = resolveSubOptions(options, key);
return {
...options.overrides?.[key],
..."overrides" in sub ? sub.overrides : {}
};
}
// src/types.ts
init_shims();
export {
GLOB_ALL_SRC,
GLOB_CSS,
GLOB_DTS,
GLOB_ESLINTRC,
GLOB_EXCLUDE,
GLOB_HTML,
GLOB_JS,
GLOB_JSON,
GLOB_JSON5,
GLOB_JSONC,
GLOB_JSX,
GLOB_LESS,
GLOB_MARKDOWN,
GLOB_MARKDOWN_CODE,
GLOB_PACKAGEJSON,
GLOB_SCSS,
GLOB_SRC,
GLOB_SRC_EXT,
GLOB_STYLE,
GLOB_TESTS,
GLOB_TOML,
GLOB_TS,
GLOB_TSCONFIG,
GLOB_TSX,
GLOB_VUE,
GLOB_YAML,
comments,
defaultPluginRenaming,
formatting,
getOverrides,
html,
ignores,
imports,
interopDefault,
javascript,
jsonc,
mdx,
node,
onlyError,
promise,
renameRules,
resolveSubOptions,
so1ve,
solid,
sortImports,
test,
toml,
typescript,
unicorn,
vue,
yaml
};
/*! Bundled license information:
is-extglob/index.js:
(*!
* is-extglob <https://github.com/jonschlinkert/is-extglob>
*
* Copyright (c) 2014-2016, Jon Schlinkert.
* Licensed under the MIT License.
*)
is-glob/index.js:
(*!
* is-glob <https://github.com/jonschlinkert/is-glob>
*
* Copyright (c) 2014-2017, Jon Schlinkert.
* Released under the MIT License.
*)
*/