1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889909192939495969798991001011021031041051061071081091101111121131141151161171181191201211221231241251261271281291301311321331341351361371381391401411421431441451461471481491501511521531541551561571581591601611621631641651661671681691701711721731741751761771781791801811821831841851861871881891901911921931941951961971981992002012022032042052062072082092102112122132142152162172182192202212222232242252262272282292302312322332342352362372382392402412422432442452462472482492502512522532542552562572582592602612622632642652662672682692702712722732742752762772782792802812822832842852862872882892902912922932942952962972982993003013023033043053063073083093103113123133143153163173183193203213223233243253263273283293303313323333343353363373383393403413423433443453463473483493503513523533543553563573583593603613623633643653663673683693703713723733743753763773783793803813823833843853863873883893903913923933943953963973983994004014024034044054064074084094104114124134144154164174184194204214224234244254264274284294304314324334344354364374384394404414424434444454464474484494504514524534544554564574584594604614624634644654664674684694704714724734744754764774784794804814824834844854864874884894904914924934944954964974984995005015025035045055065075085095105115125135145155165175185195205215225235245255265275285295305315325335345355365375385395405415425435445455465475485495505515525535545555565575585595605615625635645655665675685695705715725735745755765775785795805815825835845855865875885895905915925935945955965975985996006016026036046056066076086096106116126136146156166176186196206216226236246256266276286296306316326336346356366376386396406416426436446456466476486496506516526536546556566576586596606616626636646656666676686696706716726736746756766776786796806816826836846856866876886896906916926936946956966976986997007017027037047057067077087097107117127137147157167177187197207217227237247257267277287297307317327337347357367377387397407417427437447457467477487497507517527537547557567577587597607617627637647657667677687697707717727737747757767777787797807817827837847857867877887897907917927937947957967977987998008018028038048058068078088098108118128138148158168178188198208218228238248258268278288298308318328338348358368378388398408418428438448458468478488498508518528538548558568578588598608618628638648658668678688698708718728738748758768778788798808818828838848858868878888898908918928938948958968978988999009019029039049059069079089099109119129139149159169179189199209219229239249259269279289299309319329339349359369379389399409419429439449459469479489499509519529539549559569579589599609619629639649659669679689699709719729739749759769779789799809819829839849859869879889899909919929939949959969979989991000100110021003100410051006100710081009101010111012101310141015101610171018101910201021102210231024102510261027102810291030103110321033103410351036103710381039104010411042104310441045104610471048104910501051105210531054105510561057105810591060106110621063106410651066106710681069107010711072107310741075107610771078107910801081108210831084108510861087108810891090109110921093109410951096109710981099110011011102110311041105110611071108110911101111111211131114111511161117111811191120112111221123112411251126112711281129113011311132113311341135113611371138113911401141114211431144114511461147114811491150115111521153115411551156115711581159116011611162116311641165116611671168116911701171117211731174117511761177117811791180118111821183118411851186118711881189119011911192119311941195119611971198119912001201120212031204120512061207120812091210121112121213121412151216121712181219122012211222122312241225122612271228122912301231123212331234123512361237123812391240124112421243124412451246124712481249125012511252125312541255125612571258125912601261126212631264126512661267126812691270127112721273127412751276127712781279128012811282128312841285128612871288128912901291129212931294129512961297129812991300130113021303130413051306130713081309131013111312131313141315131613171318131913201321132213231324132513261327132813291330133113321333133413351336133713381339134013411342134313441345134613471348134913501351135213531354135513561357135813591360136113621363136413651366136713681369137013711372137313741375137613771378137913801381138213831384138513861387138813891390139113921393139413951396139713981399140014011402140314041405140614071408140914101411141214131414141514161417141814191420142114221423142414251426142714281429143014311432143314341435143614371438143914401441144214431444144514461447144814491450145114521453145414551456145714581459146014611462146314641465146614671468146914701471147214731474147514761477147814791480148114821483148414851486148714881489149014911492149314941495149614971498149915001501150215031504150515061507150815091510151115121513151415151516151715181519152015211522152315241525152615271528152915301531153215331534153515361537153815391540154115421543154415451546154715481549155015511552155315541555155615571558155915601561156215631564156515661567156815691570157115721573157415751576157715781579158015811582158315841585158615871588158915901591159215931594159515961597159815991600160116021603160416051606160716081609161016111612161316141615161616171618161916201621162216231624162516261627162816291630163116321633163416351636163716381639164016411642164316441645164616471648164916501651165216531654165516561657165816591660166116621663166416651666166716681669167016711672167316741675167616771678167916801681168216831684168516861687168816891690169116921693169416951696169716981699170017011702170317041705170617071708170917101711171217131714171517161717171817191720172117221723172417251726172717281729173017311732173317341735173617371738173917401741174217431744174517461747174817491750175117521753175417551756175717581759176017611762176317641765176617671768176917701771177217731774177517761777177817791780178117821783178417851786178717881789179017911792179317941795179617971798179918001801180218031804180518061807180818091810181118121813181418151816181718181819182018211822182318241825182618271828182918301831183218331834183518361837183818391840184118421843184418451846184718481849185018511852185318541855185618571858185918601861186218631864186518661867186818691870187118721873187418751876187718781879188018811882188318841885188618871888188918901891189218931894189518961897189818991900190119021903190419051906190719081909191019111912191319141915191619171918191919201921192219231924192519261927192819291930193119321933193419351936193719381939194019411942194319441945194619471948194919501951195219531954195519561957195819591960196119621963196419651966196719681969197019711972197319741975197619771978197919801981198219831984198519861987198819891990199119921993199419951996199719981999200020012002200320042005200620072008200920102011201220132014201520162017201820192020202120222023202420252026202720282029203020312032203320342035203620372038203920402041204220432044204520462047204820492050205120522053205420552056205720582059206020612062206320642065206620672068206920702071207220732074207520762077207820792080208120822083208420852086208720882089209020912092209320942095209620972098209921002101210221032104210521062107210821092110211121122113211421152116211721182119212021212122212321242125212621272128212921302131213221332134213521362137213821392140214121422143214421452146214721482149215021512152215321542155215621572158215921602161216221632164216521662167216821692170217121722173217421752176217721782179218021812182218321842185218621872188218921902191219221932194219521962197219821992200220122022203220422052206220722082209221022112212221322142215221622172218221922202221222222232224222522262227222822292230223122322233223422352236223722382239224022412242224322442245224622472248224922502251225222532254225522562257225822592260226122622263226422652266226722682269227022712272227322742275227622772278227922802281228222832284228522862287228822892290229122922293229422952296229722982299230023012302230323042305230623072308230923102311231223132314231523162317231823192320232123222323232423252326232723282329233023312332233323342335233623372338233923402341234223432344234523462347234823492350235123522353235423552356235723582359236023612362236323642365236623672368236923702371237223732374237523762377237823792380238123822383238423852386238723882389239023912392239323942395239623972398239924002401240224032404240524062407240824092410241124122413241424152416241724182419242024212422242324242425242624272428242924302431243224332434243524362437243824392440244124422443244424452446244724482449245024512452245324542455245624572458245924602461246224632464246524662467246824692470247124722473247424752476247724782479248024812482248324842485248624872488248924902491249224932494249524962497249824992500250125022503250425052506250725082509251025112512251325142515251625172518251925202521252225232524252525262527252825292530253125322533253425352536253725382539254025412542254325442545254625472548254925502551255225532554255525562557255825592560256125622563256425652566256725682569257025712572257325742575257625772578257925802581258225832584258525862587258825892590259125922593259425952596259725982599260026012602260326042605260626072608260926102611261226132614261526162617261826192620262126222623262426252626262726282629263026312632263326342635263626372638263926402641264226432644264526462647264826492650265126522653265426552656265726582659266026612662266326642665266626672668266926702671267226732674267526762677267826792680268126822683268426852686268726882689269026912692269326942695269626972698269927002701270227032704270527062707270827092710271127122713271427152716271727182719272027212722272327242725272627272728 |
- import {
- __commonJS
- } from "./chunk-HM4MQYWN.js";
- // node_modules/has-symbols/shams.js
- var require_shams = __commonJS({
- "node_modules/has-symbols/shams.js"(exports, module) {
- "use strict";
- module.exports = function hasSymbols() {
- if (typeof Symbol !== "function" || typeof Object.getOwnPropertySymbols !== "function") {
- return false;
- }
- if (typeof Symbol.iterator === "symbol") {
- return true;
- }
- var obj = {};
- var sym = Symbol("test");
- var symObj = Object(sym);
- if (typeof sym === "string") {
- return false;
- }
- if (Object.prototype.toString.call(sym) !== "[object Symbol]") {
- return false;
- }
- if (Object.prototype.toString.call(symObj) !== "[object Symbol]") {
- return false;
- }
- var symVal = 42;
- obj[sym] = symVal;
- for (sym in obj) {
- return false;
- }
- if (typeof Object.keys === "function" && Object.keys(obj).length !== 0) {
- return false;
- }
- if (typeof Object.getOwnPropertyNames === "function" && Object.getOwnPropertyNames(obj).length !== 0) {
- return false;
- }
- var syms = Object.getOwnPropertySymbols(obj);
- if (syms.length !== 1 || syms[0] !== sym) {
- return false;
- }
- if (!Object.prototype.propertyIsEnumerable.call(obj, sym)) {
- return false;
- }
- if (typeof Object.getOwnPropertyDescriptor === "function") {
- var descriptor = Object.getOwnPropertyDescriptor(obj, sym);
- if (descriptor.value !== symVal || descriptor.enumerable !== true) {
- return false;
- }
- }
- return true;
- };
- }
- });
- // node_modules/has-symbols/index.js
- var require_has_symbols = __commonJS({
- "node_modules/has-symbols/index.js"(exports, module) {
- "use strict";
- var origSymbol = typeof Symbol !== "undefined" && Symbol;
- var hasSymbolSham = require_shams();
- module.exports = function hasNativeSymbols() {
- if (typeof origSymbol !== "function") {
- return false;
- }
- if (typeof Symbol !== "function") {
- return false;
- }
- if (typeof origSymbol("foo") !== "symbol") {
- return false;
- }
- if (typeof Symbol("bar") !== "symbol") {
- return false;
- }
- return hasSymbolSham();
- };
- }
- });
- // node_modules/has-proto/index.js
- var require_has_proto = __commonJS({
- "node_modules/has-proto/index.js"(exports, module) {
- "use strict";
- var test = {
- foo: {}
- };
- var $Object = Object;
- module.exports = function hasProto() {
- return { __proto__: test }.foo === test.foo && !({ __proto__: null } instanceof $Object);
- };
- }
- });
- // node_modules/function-bind/implementation.js
- var require_implementation = __commonJS({
- "node_modules/function-bind/implementation.js"(exports, module) {
- "use strict";
- var ERROR_MESSAGE = "Function.prototype.bind called on incompatible ";
- var toStr = Object.prototype.toString;
- var max = Math.max;
- var funcType = "[object Function]";
- var concatty = function concatty2(a, b) {
- var arr = [];
- for (var i = 0; i < a.length; i += 1) {
- arr[i] = a[i];
- }
- for (var j = 0; j < b.length; j += 1) {
- arr[j + a.length] = b[j];
- }
- return arr;
- };
- var slicy = function slicy2(arrLike, offset) {
- var arr = [];
- for (var i = offset || 0, j = 0; i < arrLike.length; i += 1, j += 1) {
- arr[j] = arrLike[i];
- }
- return arr;
- };
- var joiny = function(arr, joiner) {
- var str = "";
- for (var i = 0; i < arr.length; i += 1) {
- str += arr[i];
- if (i + 1 < arr.length) {
- str += joiner;
- }
- }
- return str;
- };
- module.exports = function bind(that) {
- var target = this;
- if (typeof target !== "function" || toStr.apply(target) !== funcType) {
- throw new TypeError(ERROR_MESSAGE + target);
- }
- var args = slicy(arguments, 1);
- var bound;
- var binder = function() {
- if (this instanceof bound) {
- var result = target.apply(
- this,
- concatty(args, arguments)
- );
- if (Object(result) === result) {
- return result;
- }
- return this;
- }
- return target.apply(
- that,
- concatty(args, arguments)
- );
- };
- var boundLength = max(0, target.length - args.length);
- var boundArgs = [];
- for (var i = 0; i < boundLength; i++) {
- boundArgs[i] = "$" + i;
- }
- bound = Function("binder", "return function (" + joiny(boundArgs, ",") + "){ return binder.apply(this,arguments); }")(binder);
- if (target.prototype) {
- var Empty = function Empty2() {
- };
- Empty.prototype = target.prototype;
- bound.prototype = new Empty();
- Empty.prototype = null;
- }
- return bound;
- };
- }
- });
- // node_modules/function-bind/index.js
- var require_function_bind = __commonJS({
- "node_modules/function-bind/index.js"(exports, module) {
- "use strict";
- var implementation = require_implementation();
- module.exports = Function.prototype.bind || implementation;
- }
- });
- // node_modules/hasown/index.js
- var require_hasown = __commonJS({
- "node_modules/hasown/index.js"(exports, module) {
- "use strict";
- var call = Function.prototype.call;
- var $hasOwn = Object.prototype.hasOwnProperty;
- var bind = require_function_bind();
- module.exports = bind.call(call, $hasOwn);
- }
- });
- // node_modules/get-intrinsic/index.js
- var require_get_intrinsic = __commonJS({
- "node_modules/get-intrinsic/index.js"(exports, module) {
- "use strict";
- var undefined2;
- var $SyntaxError = SyntaxError;
- var $Function = Function;
- var $TypeError = TypeError;
- var getEvalledConstructor = function(expressionSyntax) {
- try {
- return $Function('"use strict"; return (' + expressionSyntax + ").constructor;")();
- } catch (e) {
- }
- };
- var $gOPD = Object.getOwnPropertyDescriptor;
- if ($gOPD) {
- try {
- $gOPD({}, "");
- } catch (e) {
- $gOPD = null;
- }
- }
- var throwTypeError = function() {
- throw new $TypeError();
- };
- var ThrowTypeError = $gOPD ? function() {
- try {
- arguments.callee;
- return throwTypeError;
- } catch (calleeThrows) {
- try {
- return $gOPD(arguments, "callee").get;
- } catch (gOPDthrows) {
- return throwTypeError;
- }
- }
- }() : throwTypeError;
- var hasSymbols = require_has_symbols()();
- var hasProto = require_has_proto()();
- var getProto = Object.getPrototypeOf || (hasProto ? function(x) {
- return x.__proto__;
- } : null);
- var needsEval = {};
- var TypedArray = typeof Uint8Array === "undefined" || !getProto ? undefined2 : getProto(Uint8Array);
- var INTRINSICS = {
- "%AggregateError%": typeof AggregateError === "undefined" ? undefined2 : AggregateError,
- "%Array%": Array,
- "%ArrayBuffer%": typeof ArrayBuffer === "undefined" ? undefined2 : ArrayBuffer,
- "%ArrayIteratorPrototype%": hasSymbols && getProto ? getProto([][Symbol.iterator]()) : undefined2,
- "%AsyncFromSyncIteratorPrototype%": undefined2,
- "%AsyncFunction%": needsEval,
- "%AsyncGenerator%": needsEval,
- "%AsyncGeneratorFunction%": needsEval,
- "%AsyncIteratorPrototype%": needsEval,
- "%Atomics%": typeof Atomics === "undefined" ? undefined2 : Atomics,
- "%BigInt%": typeof BigInt === "undefined" ? undefined2 : BigInt,
- "%BigInt64Array%": typeof BigInt64Array === "undefined" ? undefined2 : BigInt64Array,
- "%BigUint64Array%": typeof BigUint64Array === "undefined" ? undefined2 : BigUint64Array,
- "%Boolean%": Boolean,
- "%DataView%": typeof DataView === "undefined" ? undefined2 : DataView,
- "%Date%": Date,
- "%decodeURI%": decodeURI,
- "%decodeURIComponent%": decodeURIComponent,
- "%encodeURI%": encodeURI,
- "%encodeURIComponent%": encodeURIComponent,
- "%Error%": Error,
- "%eval%": eval,
- // eslint-disable-line no-eval
- "%EvalError%": EvalError,
- "%Float32Array%": typeof Float32Array === "undefined" ? undefined2 : Float32Array,
- "%Float64Array%": typeof Float64Array === "undefined" ? undefined2 : Float64Array,
- "%FinalizationRegistry%": typeof FinalizationRegistry === "undefined" ? undefined2 : FinalizationRegistry,
- "%Function%": $Function,
- "%GeneratorFunction%": needsEval,
- "%Int8Array%": typeof Int8Array === "undefined" ? undefined2 : Int8Array,
- "%Int16Array%": typeof Int16Array === "undefined" ? undefined2 : Int16Array,
- "%Int32Array%": typeof Int32Array === "undefined" ? undefined2 : Int32Array,
- "%isFinite%": isFinite,
- "%isNaN%": isNaN,
- "%IteratorPrototype%": hasSymbols && getProto ? getProto(getProto([][Symbol.iterator]())) : undefined2,
- "%JSON%": typeof JSON === "object" ? JSON : undefined2,
- "%Map%": typeof Map === "undefined" ? undefined2 : Map,
- "%MapIteratorPrototype%": typeof Map === "undefined" || !hasSymbols || !getProto ? undefined2 : getProto((/* @__PURE__ */ new Map())[Symbol.iterator]()),
- "%Math%": Math,
- "%Number%": Number,
- "%Object%": Object,
- "%parseFloat%": parseFloat,
- "%parseInt%": parseInt,
- "%Promise%": typeof Promise === "undefined" ? undefined2 : Promise,
- "%Proxy%": typeof Proxy === "undefined" ? undefined2 : Proxy,
- "%RangeError%": RangeError,
- "%ReferenceError%": ReferenceError,
- "%Reflect%": typeof Reflect === "undefined" ? undefined2 : Reflect,
- "%RegExp%": RegExp,
- "%Set%": typeof Set === "undefined" ? undefined2 : Set,
- "%SetIteratorPrototype%": typeof Set === "undefined" || !hasSymbols || !getProto ? undefined2 : getProto((/* @__PURE__ */ new Set())[Symbol.iterator]()),
- "%SharedArrayBuffer%": typeof SharedArrayBuffer === "undefined" ? undefined2 : SharedArrayBuffer,
- "%String%": String,
- "%StringIteratorPrototype%": hasSymbols && getProto ? getProto(""[Symbol.iterator]()) : undefined2,
- "%Symbol%": hasSymbols ? Symbol : undefined2,
- "%SyntaxError%": $SyntaxError,
- "%ThrowTypeError%": ThrowTypeError,
- "%TypedArray%": TypedArray,
- "%TypeError%": $TypeError,
- "%Uint8Array%": typeof Uint8Array === "undefined" ? undefined2 : Uint8Array,
- "%Uint8ClampedArray%": typeof Uint8ClampedArray === "undefined" ? undefined2 : Uint8ClampedArray,
- "%Uint16Array%": typeof Uint16Array === "undefined" ? undefined2 : Uint16Array,
- "%Uint32Array%": typeof Uint32Array === "undefined" ? undefined2 : Uint32Array,
- "%URIError%": URIError,
- "%WeakMap%": typeof WeakMap === "undefined" ? undefined2 : WeakMap,
- "%WeakRef%": typeof WeakRef === "undefined" ? undefined2 : WeakRef,
- "%WeakSet%": typeof WeakSet === "undefined" ? undefined2 : WeakSet
- };
- if (getProto) {
- try {
- null.error;
- } catch (e) {
- errorProto = getProto(getProto(e));
- INTRINSICS["%Error.prototype%"] = errorProto;
- }
- }
- var errorProto;
- var doEval = function doEval2(name) {
- var value;
- if (name === "%AsyncFunction%") {
- value = getEvalledConstructor("async function () {}");
- } else if (name === "%GeneratorFunction%") {
- value = getEvalledConstructor("function* () {}");
- } else if (name === "%AsyncGeneratorFunction%") {
- value = getEvalledConstructor("async function* () {}");
- } else if (name === "%AsyncGenerator%") {
- var fn = doEval2("%AsyncGeneratorFunction%");
- if (fn) {
- value = fn.prototype;
- }
- } else if (name === "%AsyncIteratorPrototype%") {
- var gen = doEval2("%AsyncGenerator%");
- if (gen && getProto) {
- value = getProto(gen.prototype);
- }
- }
- INTRINSICS[name] = value;
- return value;
- };
- var LEGACY_ALIASES = {
- "%ArrayBufferPrototype%": ["ArrayBuffer", "prototype"],
- "%ArrayPrototype%": ["Array", "prototype"],
- "%ArrayProto_entries%": ["Array", "prototype", "entries"],
- "%ArrayProto_forEach%": ["Array", "prototype", "forEach"],
- "%ArrayProto_keys%": ["Array", "prototype", "keys"],
- "%ArrayProto_values%": ["Array", "prototype", "values"],
- "%AsyncFunctionPrototype%": ["AsyncFunction", "prototype"],
- "%AsyncGenerator%": ["AsyncGeneratorFunction", "prototype"],
- "%AsyncGeneratorPrototype%": ["AsyncGeneratorFunction", "prototype", "prototype"],
- "%BooleanPrototype%": ["Boolean", "prototype"],
- "%DataViewPrototype%": ["DataView", "prototype"],
- "%DatePrototype%": ["Date", "prototype"],
- "%ErrorPrototype%": ["Error", "prototype"],
- "%EvalErrorPrototype%": ["EvalError", "prototype"],
- "%Float32ArrayPrototype%": ["Float32Array", "prototype"],
- "%Float64ArrayPrototype%": ["Float64Array", "prototype"],
- "%FunctionPrototype%": ["Function", "prototype"],
- "%Generator%": ["GeneratorFunction", "prototype"],
- "%GeneratorPrototype%": ["GeneratorFunction", "prototype", "prototype"],
- "%Int8ArrayPrototype%": ["Int8Array", "prototype"],
- "%Int16ArrayPrototype%": ["Int16Array", "prototype"],
- "%Int32ArrayPrototype%": ["Int32Array", "prototype"],
- "%JSONParse%": ["JSON", "parse"],
- "%JSONStringify%": ["JSON", "stringify"],
- "%MapPrototype%": ["Map", "prototype"],
- "%NumberPrototype%": ["Number", "prototype"],
- "%ObjectPrototype%": ["Object", "prototype"],
- "%ObjProto_toString%": ["Object", "prototype", "toString"],
- "%ObjProto_valueOf%": ["Object", "prototype", "valueOf"],
- "%PromisePrototype%": ["Promise", "prototype"],
- "%PromiseProto_then%": ["Promise", "prototype", "then"],
- "%Promise_all%": ["Promise", "all"],
- "%Promise_reject%": ["Promise", "reject"],
- "%Promise_resolve%": ["Promise", "resolve"],
- "%RangeErrorPrototype%": ["RangeError", "prototype"],
- "%ReferenceErrorPrototype%": ["ReferenceError", "prototype"],
- "%RegExpPrototype%": ["RegExp", "prototype"],
- "%SetPrototype%": ["Set", "prototype"],
- "%SharedArrayBufferPrototype%": ["SharedArrayBuffer", "prototype"],
- "%StringPrototype%": ["String", "prototype"],
- "%SymbolPrototype%": ["Symbol", "prototype"],
- "%SyntaxErrorPrototype%": ["SyntaxError", "prototype"],
- "%TypedArrayPrototype%": ["TypedArray", "prototype"],
- "%TypeErrorPrototype%": ["TypeError", "prototype"],
- "%Uint8ArrayPrototype%": ["Uint8Array", "prototype"],
- "%Uint8ClampedArrayPrototype%": ["Uint8ClampedArray", "prototype"],
- "%Uint16ArrayPrototype%": ["Uint16Array", "prototype"],
- "%Uint32ArrayPrototype%": ["Uint32Array", "prototype"],
- "%URIErrorPrototype%": ["URIError", "prototype"],
- "%WeakMapPrototype%": ["WeakMap", "prototype"],
- "%WeakSetPrototype%": ["WeakSet", "prototype"]
- };
- var bind = require_function_bind();
- var hasOwn = require_hasown();
- var $concat = bind.call(Function.call, Array.prototype.concat);
- var $spliceApply = bind.call(Function.apply, Array.prototype.splice);
- var $replace = bind.call(Function.call, String.prototype.replace);
- var $strSlice = bind.call(Function.call, String.prototype.slice);
- var $exec = bind.call(Function.call, RegExp.prototype.exec);
- var rePropName = /[^%.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|%$))/g;
- var reEscapeChar = /\\(\\)?/g;
- var stringToPath = function stringToPath2(string) {
- var first = $strSlice(string, 0, 1);
- var last = $strSlice(string, -1);
- if (first === "%" && last !== "%") {
- throw new $SyntaxError("invalid intrinsic syntax, expected closing `%`");
- } else if (last === "%" && first !== "%") {
- throw new $SyntaxError("invalid intrinsic syntax, expected opening `%`");
- }
- var result = [];
- $replace(string, rePropName, function(match, number, quote, subString) {
- result[result.length] = quote ? $replace(subString, reEscapeChar, "$1") : number || match;
- });
- return result;
- };
- var getBaseIntrinsic = function getBaseIntrinsic2(name, allowMissing) {
- var intrinsicName = name;
- var alias;
- if (hasOwn(LEGACY_ALIASES, intrinsicName)) {
- alias = LEGACY_ALIASES[intrinsicName];
- intrinsicName = "%" + alias[0] + "%";
- }
- if (hasOwn(INTRINSICS, intrinsicName)) {
- var value = INTRINSICS[intrinsicName];
- if (value === needsEval) {
- value = doEval(intrinsicName);
- }
- if (typeof value === "undefined" && !allowMissing) {
- throw new $TypeError("intrinsic " + name + " exists, but is not available. Please file an issue!");
- }
- return {
- alias,
- name: intrinsicName,
- value
- };
- }
- throw new $SyntaxError("intrinsic " + name + " does not exist!");
- };
- module.exports = function GetIntrinsic(name, allowMissing) {
- if (typeof name !== "string" || name.length === 0) {
- throw new $TypeError("intrinsic name must be a non-empty string");
- }
- if (arguments.length > 1 && typeof allowMissing !== "boolean") {
- throw new $TypeError('"allowMissing" argument must be a boolean');
- }
- if ($exec(/^%?[^%]*%?$/, name) === null) {
- throw new $SyntaxError("`%` may not be present anywhere but at the beginning and end of the intrinsic name");
- }
- var parts = stringToPath(name);
- var intrinsicBaseName = parts.length > 0 ? parts[0] : "";
- var intrinsic = getBaseIntrinsic("%" + intrinsicBaseName + "%", allowMissing);
- var intrinsicRealName = intrinsic.name;
- var value = intrinsic.value;
- var skipFurtherCaching = false;
- var alias = intrinsic.alias;
- if (alias) {
- intrinsicBaseName = alias[0];
- $spliceApply(parts, $concat([0, 1], alias));
- }
- for (var i = 1, isOwn = true; i < parts.length; i += 1) {
- var part = parts[i];
- var first = $strSlice(part, 0, 1);
- var last = $strSlice(part, -1);
- if ((first === '"' || first === "'" || first === "`" || (last === '"' || last === "'" || last === "`")) && first !== last) {
- throw new $SyntaxError("property names with quotes must have matching quotes");
- }
- if (part === "constructor" || !isOwn) {
- skipFurtherCaching = true;
- }
- intrinsicBaseName += "." + part;
- intrinsicRealName = "%" + intrinsicBaseName + "%";
- if (hasOwn(INTRINSICS, intrinsicRealName)) {
- value = INTRINSICS[intrinsicRealName];
- } else if (value != null) {
- if (!(part in value)) {
- if (!allowMissing) {
- throw new $TypeError("base intrinsic for " + name + " exists, but the property is not available.");
- }
- return void 0;
- }
- if ($gOPD && i + 1 >= parts.length) {
- var desc = $gOPD(value, part);
- isOwn = !!desc;
- if (isOwn && "get" in desc && !("originalValue" in desc.get)) {
- value = desc.get;
- } else {
- value = value[part];
- }
- } else {
- isOwn = hasOwn(value, part);
- value = value[part];
- }
- if (isOwn && !skipFurtherCaching) {
- INTRINSICS[intrinsicRealName] = value;
- }
- }
- }
- return value;
- };
- }
- });
- // node_modules/es-errors/index.js
- var require_es_errors = __commonJS({
- "node_modules/es-errors/index.js"(exports, module) {
- "use strict";
- module.exports = Error;
- }
- });
- // node_modules/es-errors/eval.js
- var require_eval = __commonJS({
- "node_modules/es-errors/eval.js"(exports, module) {
- "use strict";
- module.exports = EvalError;
- }
- });
- // node_modules/es-errors/range.js
- var require_range = __commonJS({
- "node_modules/es-errors/range.js"(exports, module) {
- "use strict";
- module.exports = RangeError;
- }
- });
- // node_modules/es-errors/ref.js
- var require_ref = __commonJS({
- "node_modules/es-errors/ref.js"(exports, module) {
- "use strict";
- module.exports = ReferenceError;
- }
- });
- // node_modules/es-errors/syntax.js
- var require_syntax = __commonJS({
- "node_modules/es-errors/syntax.js"(exports, module) {
- "use strict";
- module.exports = SyntaxError;
- }
- });
- // node_modules/es-errors/type.js
- var require_type = __commonJS({
- "node_modules/es-errors/type.js"(exports, module) {
- "use strict";
- module.exports = TypeError;
- }
- });
- // node_modules/es-errors/uri.js
- var require_uri = __commonJS({
- "node_modules/es-errors/uri.js"(exports, module) {
- "use strict";
- module.exports = URIError;
- }
- });
- // node_modules/set-function-length/node_modules/get-intrinsic/index.js
- var require_get_intrinsic2 = __commonJS({
- "node_modules/set-function-length/node_modules/get-intrinsic/index.js"(exports, module) {
- "use strict";
- var undefined2;
- var $Error = require_es_errors();
- var $EvalError = require_eval();
- var $RangeError = require_range();
- var $ReferenceError = require_ref();
- var $SyntaxError = require_syntax();
- var $TypeError = require_type();
- var $URIError = require_uri();
- var $Function = Function;
- var getEvalledConstructor = function(expressionSyntax) {
- try {
- return $Function('"use strict"; return (' + expressionSyntax + ").constructor;")();
- } catch (e) {
- }
- };
- var $gOPD = Object.getOwnPropertyDescriptor;
- if ($gOPD) {
- try {
- $gOPD({}, "");
- } catch (e) {
- $gOPD = null;
- }
- }
- var throwTypeError = function() {
- throw new $TypeError();
- };
- var ThrowTypeError = $gOPD ? function() {
- try {
- arguments.callee;
- return throwTypeError;
- } catch (calleeThrows) {
- try {
- return $gOPD(arguments, "callee").get;
- } catch (gOPDthrows) {
- return throwTypeError;
- }
- }
- }() : throwTypeError;
- var hasSymbols = require_has_symbols()();
- var hasProto = require_has_proto()();
- var getProto = Object.getPrototypeOf || (hasProto ? function(x) {
- return x.__proto__;
- } : null);
- var needsEval = {};
- var TypedArray = typeof Uint8Array === "undefined" || !getProto ? undefined2 : getProto(Uint8Array);
- var INTRINSICS = {
- __proto__: null,
- "%AggregateError%": typeof AggregateError === "undefined" ? undefined2 : AggregateError,
- "%Array%": Array,
- "%ArrayBuffer%": typeof ArrayBuffer === "undefined" ? undefined2 : ArrayBuffer,
- "%ArrayIteratorPrototype%": hasSymbols && getProto ? getProto([][Symbol.iterator]()) : undefined2,
- "%AsyncFromSyncIteratorPrototype%": undefined2,
- "%AsyncFunction%": needsEval,
- "%AsyncGenerator%": needsEval,
- "%AsyncGeneratorFunction%": needsEval,
- "%AsyncIteratorPrototype%": needsEval,
- "%Atomics%": typeof Atomics === "undefined" ? undefined2 : Atomics,
- "%BigInt%": typeof BigInt === "undefined" ? undefined2 : BigInt,
- "%BigInt64Array%": typeof BigInt64Array === "undefined" ? undefined2 : BigInt64Array,
- "%BigUint64Array%": typeof BigUint64Array === "undefined" ? undefined2 : BigUint64Array,
- "%Boolean%": Boolean,
- "%DataView%": typeof DataView === "undefined" ? undefined2 : DataView,
- "%Date%": Date,
- "%decodeURI%": decodeURI,
- "%decodeURIComponent%": decodeURIComponent,
- "%encodeURI%": encodeURI,
- "%encodeURIComponent%": encodeURIComponent,
- "%Error%": $Error,
- "%eval%": eval,
- // eslint-disable-line no-eval
- "%EvalError%": $EvalError,
- "%Float32Array%": typeof Float32Array === "undefined" ? undefined2 : Float32Array,
- "%Float64Array%": typeof Float64Array === "undefined" ? undefined2 : Float64Array,
- "%FinalizationRegistry%": typeof FinalizationRegistry === "undefined" ? undefined2 : FinalizationRegistry,
- "%Function%": $Function,
- "%GeneratorFunction%": needsEval,
- "%Int8Array%": typeof Int8Array === "undefined" ? undefined2 : Int8Array,
- "%Int16Array%": typeof Int16Array === "undefined" ? undefined2 : Int16Array,
- "%Int32Array%": typeof Int32Array === "undefined" ? undefined2 : Int32Array,
- "%isFinite%": isFinite,
- "%isNaN%": isNaN,
- "%IteratorPrototype%": hasSymbols && getProto ? getProto(getProto([][Symbol.iterator]())) : undefined2,
- "%JSON%": typeof JSON === "object" ? JSON : undefined2,
- "%Map%": typeof Map === "undefined" ? undefined2 : Map,
- "%MapIteratorPrototype%": typeof Map === "undefined" || !hasSymbols || !getProto ? undefined2 : getProto((/* @__PURE__ */ new Map())[Symbol.iterator]()),
- "%Math%": Math,
- "%Number%": Number,
- "%Object%": Object,
- "%parseFloat%": parseFloat,
- "%parseInt%": parseInt,
- "%Promise%": typeof Promise === "undefined" ? undefined2 : Promise,
- "%Proxy%": typeof Proxy === "undefined" ? undefined2 : Proxy,
- "%RangeError%": $RangeError,
- "%ReferenceError%": $ReferenceError,
- "%Reflect%": typeof Reflect === "undefined" ? undefined2 : Reflect,
- "%RegExp%": RegExp,
- "%Set%": typeof Set === "undefined" ? undefined2 : Set,
- "%SetIteratorPrototype%": typeof Set === "undefined" || !hasSymbols || !getProto ? undefined2 : getProto((/* @__PURE__ */ new Set())[Symbol.iterator]()),
- "%SharedArrayBuffer%": typeof SharedArrayBuffer === "undefined" ? undefined2 : SharedArrayBuffer,
- "%String%": String,
- "%StringIteratorPrototype%": hasSymbols && getProto ? getProto(""[Symbol.iterator]()) : undefined2,
- "%Symbol%": hasSymbols ? Symbol : undefined2,
- "%SyntaxError%": $SyntaxError,
- "%ThrowTypeError%": ThrowTypeError,
- "%TypedArray%": TypedArray,
- "%TypeError%": $TypeError,
- "%Uint8Array%": typeof Uint8Array === "undefined" ? undefined2 : Uint8Array,
- "%Uint8ClampedArray%": typeof Uint8ClampedArray === "undefined" ? undefined2 : Uint8ClampedArray,
- "%Uint16Array%": typeof Uint16Array === "undefined" ? undefined2 : Uint16Array,
- "%Uint32Array%": typeof Uint32Array === "undefined" ? undefined2 : Uint32Array,
- "%URIError%": $URIError,
- "%WeakMap%": typeof WeakMap === "undefined" ? undefined2 : WeakMap,
- "%WeakRef%": typeof WeakRef === "undefined" ? undefined2 : WeakRef,
- "%WeakSet%": typeof WeakSet === "undefined" ? undefined2 : WeakSet
- };
- if (getProto) {
- try {
- null.error;
- } catch (e) {
- errorProto = getProto(getProto(e));
- INTRINSICS["%Error.prototype%"] = errorProto;
- }
- }
- var errorProto;
- var doEval = function doEval2(name) {
- var value;
- if (name === "%AsyncFunction%") {
- value = getEvalledConstructor("async function () {}");
- } else if (name === "%GeneratorFunction%") {
- value = getEvalledConstructor("function* () {}");
- } else if (name === "%AsyncGeneratorFunction%") {
- value = getEvalledConstructor("async function* () {}");
- } else if (name === "%AsyncGenerator%") {
- var fn = doEval2("%AsyncGeneratorFunction%");
- if (fn) {
- value = fn.prototype;
- }
- } else if (name === "%AsyncIteratorPrototype%") {
- var gen = doEval2("%AsyncGenerator%");
- if (gen && getProto) {
- value = getProto(gen.prototype);
- }
- }
- INTRINSICS[name] = value;
- return value;
- };
- var LEGACY_ALIASES = {
- __proto__: null,
- "%ArrayBufferPrototype%": ["ArrayBuffer", "prototype"],
- "%ArrayPrototype%": ["Array", "prototype"],
- "%ArrayProto_entries%": ["Array", "prototype", "entries"],
- "%ArrayProto_forEach%": ["Array", "prototype", "forEach"],
- "%ArrayProto_keys%": ["Array", "prototype", "keys"],
- "%ArrayProto_values%": ["Array", "prototype", "values"],
- "%AsyncFunctionPrototype%": ["AsyncFunction", "prototype"],
- "%AsyncGenerator%": ["AsyncGeneratorFunction", "prototype"],
- "%AsyncGeneratorPrototype%": ["AsyncGeneratorFunction", "prototype", "prototype"],
- "%BooleanPrototype%": ["Boolean", "prototype"],
- "%DataViewPrototype%": ["DataView", "prototype"],
- "%DatePrototype%": ["Date", "prototype"],
- "%ErrorPrototype%": ["Error", "prototype"],
- "%EvalErrorPrototype%": ["EvalError", "prototype"],
- "%Float32ArrayPrototype%": ["Float32Array", "prototype"],
- "%Float64ArrayPrototype%": ["Float64Array", "prototype"],
- "%FunctionPrototype%": ["Function", "prototype"],
- "%Generator%": ["GeneratorFunction", "prototype"],
- "%GeneratorPrototype%": ["GeneratorFunction", "prototype", "prototype"],
- "%Int8ArrayPrototype%": ["Int8Array", "prototype"],
- "%Int16ArrayPrototype%": ["Int16Array", "prototype"],
- "%Int32ArrayPrototype%": ["Int32Array", "prototype"],
- "%JSONParse%": ["JSON", "parse"],
- "%JSONStringify%": ["JSON", "stringify"],
- "%MapPrototype%": ["Map", "prototype"],
- "%NumberPrototype%": ["Number", "prototype"],
- "%ObjectPrototype%": ["Object", "prototype"],
- "%ObjProto_toString%": ["Object", "prototype", "toString"],
- "%ObjProto_valueOf%": ["Object", "prototype", "valueOf"],
- "%PromisePrototype%": ["Promise", "prototype"],
- "%PromiseProto_then%": ["Promise", "prototype", "then"],
- "%Promise_all%": ["Promise", "all"],
- "%Promise_reject%": ["Promise", "reject"],
- "%Promise_resolve%": ["Promise", "resolve"],
- "%RangeErrorPrototype%": ["RangeError", "prototype"],
- "%ReferenceErrorPrototype%": ["ReferenceError", "prototype"],
- "%RegExpPrototype%": ["RegExp", "prototype"],
- "%SetPrototype%": ["Set", "prototype"],
- "%SharedArrayBufferPrototype%": ["SharedArrayBuffer", "prototype"],
- "%StringPrototype%": ["String", "prototype"],
- "%SymbolPrototype%": ["Symbol", "prototype"],
- "%SyntaxErrorPrototype%": ["SyntaxError", "prototype"],
- "%TypedArrayPrototype%": ["TypedArray", "prototype"],
- "%TypeErrorPrototype%": ["TypeError", "prototype"],
- "%Uint8ArrayPrototype%": ["Uint8Array", "prototype"],
- "%Uint8ClampedArrayPrototype%": ["Uint8ClampedArray", "prototype"],
- "%Uint16ArrayPrototype%": ["Uint16Array", "prototype"],
- "%Uint32ArrayPrototype%": ["Uint32Array", "prototype"],
- "%URIErrorPrototype%": ["URIError", "prototype"],
- "%WeakMapPrototype%": ["WeakMap", "prototype"],
- "%WeakSetPrototype%": ["WeakSet", "prototype"]
- };
- var bind = require_function_bind();
- var hasOwn = require_hasown();
- var $concat = bind.call(Function.call, Array.prototype.concat);
- var $spliceApply = bind.call(Function.apply, Array.prototype.splice);
- var $replace = bind.call(Function.call, String.prototype.replace);
- var $strSlice = bind.call(Function.call, String.prototype.slice);
- var $exec = bind.call(Function.call, RegExp.prototype.exec);
- var rePropName = /[^%.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|%$))/g;
- var reEscapeChar = /\\(\\)?/g;
- var stringToPath = function stringToPath2(string) {
- var first = $strSlice(string, 0, 1);
- var last = $strSlice(string, -1);
- if (first === "%" && last !== "%") {
- throw new $SyntaxError("invalid intrinsic syntax, expected closing `%`");
- } else if (last === "%" && first !== "%") {
- throw new $SyntaxError("invalid intrinsic syntax, expected opening `%`");
- }
- var result = [];
- $replace(string, rePropName, function(match, number, quote, subString) {
- result[result.length] = quote ? $replace(subString, reEscapeChar, "$1") : number || match;
- });
- return result;
- };
- var getBaseIntrinsic = function getBaseIntrinsic2(name, allowMissing) {
- var intrinsicName = name;
- var alias;
- if (hasOwn(LEGACY_ALIASES, intrinsicName)) {
- alias = LEGACY_ALIASES[intrinsicName];
- intrinsicName = "%" + alias[0] + "%";
- }
- if (hasOwn(INTRINSICS, intrinsicName)) {
- var value = INTRINSICS[intrinsicName];
- if (value === needsEval) {
- value = doEval(intrinsicName);
- }
- if (typeof value === "undefined" && !allowMissing) {
- throw new $TypeError("intrinsic " + name + " exists, but is not available. Please file an issue!");
- }
- return {
- alias,
- name: intrinsicName,
- value
- };
- }
- throw new $SyntaxError("intrinsic " + name + " does not exist!");
- };
- module.exports = function GetIntrinsic(name, allowMissing) {
- if (typeof name !== "string" || name.length === 0) {
- throw new $TypeError("intrinsic name must be a non-empty string");
- }
- if (arguments.length > 1 && typeof allowMissing !== "boolean") {
- throw new $TypeError('"allowMissing" argument must be a boolean');
- }
- if ($exec(/^%?[^%]*%?$/, name) === null) {
- throw new $SyntaxError("`%` may not be present anywhere but at the beginning and end of the intrinsic name");
- }
- var parts = stringToPath(name);
- var intrinsicBaseName = parts.length > 0 ? parts[0] : "";
- var intrinsic = getBaseIntrinsic("%" + intrinsicBaseName + "%", allowMissing);
- var intrinsicRealName = intrinsic.name;
- var value = intrinsic.value;
- var skipFurtherCaching = false;
- var alias = intrinsic.alias;
- if (alias) {
- intrinsicBaseName = alias[0];
- $spliceApply(parts, $concat([0, 1], alias));
- }
- for (var i = 1, isOwn = true; i < parts.length; i += 1) {
- var part = parts[i];
- var first = $strSlice(part, 0, 1);
- var last = $strSlice(part, -1);
- if ((first === '"' || first === "'" || first === "`" || (last === '"' || last === "'" || last === "`")) && first !== last) {
- throw new $SyntaxError("property names with quotes must have matching quotes");
- }
- if (part === "constructor" || !isOwn) {
- skipFurtherCaching = true;
- }
- intrinsicBaseName += "." + part;
- intrinsicRealName = "%" + intrinsicBaseName + "%";
- if (hasOwn(INTRINSICS, intrinsicRealName)) {
- value = INTRINSICS[intrinsicRealName];
- } else if (value != null) {
- if (!(part in value)) {
- if (!allowMissing) {
- throw new $TypeError("base intrinsic for " + name + " exists, but the property is not available.");
- }
- return void 0;
- }
- if ($gOPD && i + 1 >= parts.length) {
- var desc = $gOPD(value, part);
- isOwn = !!desc;
- if (isOwn && "get" in desc && !("originalValue" in desc.get)) {
- value = desc.get;
- } else {
- value = value[part];
- }
- } else {
- isOwn = hasOwn(value, part);
- value = value[part];
- }
- if (isOwn && !skipFurtherCaching) {
- INTRINSICS[intrinsicRealName] = value;
- }
- }
- }
- return value;
- };
- }
- });
- // node_modules/es-define-property/node_modules/get-intrinsic/index.js
- var require_get_intrinsic3 = __commonJS({
- "node_modules/es-define-property/node_modules/get-intrinsic/index.js"(exports, module) {
- "use strict";
- var undefined2;
- var $Error = require_es_errors();
- var $EvalError = require_eval();
- var $RangeError = require_range();
- var $ReferenceError = require_ref();
- var $SyntaxError = require_syntax();
- var $TypeError = require_type();
- var $URIError = require_uri();
- var $Function = Function;
- var getEvalledConstructor = function(expressionSyntax) {
- try {
- return $Function('"use strict"; return (' + expressionSyntax + ").constructor;")();
- } catch (e) {
- }
- };
- var $gOPD = Object.getOwnPropertyDescriptor;
- if ($gOPD) {
- try {
- $gOPD({}, "");
- } catch (e) {
- $gOPD = null;
- }
- }
- var throwTypeError = function() {
- throw new $TypeError();
- };
- var ThrowTypeError = $gOPD ? function() {
- try {
- arguments.callee;
- return throwTypeError;
- } catch (calleeThrows) {
- try {
- return $gOPD(arguments, "callee").get;
- } catch (gOPDthrows) {
- return throwTypeError;
- }
- }
- }() : throwTypeError;
- var hasSymbols = require_has_symbols()();
- var hasProto = require_has_proto()();
- var getProto = Object.getPrototypeOf || (hasProto ? function(x) {
- return x.__proto__;
- } : null);
- var needsEval = {};
- var TypedArray = typeof Uint8Array === "undefined" || !getProto ? undefined2 : getProto(Uint8Array);
- var INTRINSICS = {
- __proto__: null,
- "%AggregateError%": typeof AggregateError === "undefined" ? undefined2 : AggregateError,
- "%Array%": Array,
- "%ArrayBuffer%": typeof ArrayBuffer === "undefined" ? undefined2 : ArrayBuffer,
- "%ArrayIteratorPrototype%": hasSymbols && getProto ? getProto([][Symbol.iterator]()) : undefined2,
- "%AsyncFromSyncIteratorPrototype%": undefined2,
- "%AsyncFunction%": needsEval,
- "%AsyncGenerator%": needsEval,
- "%AsyncGeneratorFunction%": needsEval,
- "%AsyncIteratorPrototype%": needsEval,
- "%Atomics%": typeof Atomics === "undefined" ? undefined2 : Atomics,
- "%BigInt%": typeof BigInt === "undefined" ? undefined2 : BigInt,
- "%BigInt64Array%": typeof BigInt64Array === "undefined" ? undefined2 : BigInt64Array,
- "%BigUint64Array%": typeof BigUint64Array === "undefined" ? undefined2 : BigUint64Array,
- "%Boolean%": Boolean,
- "%DataView%": typeof DataView === "undefined" ? undefined2 : DataView,
- "%Date%": Date,
- "%decodeURI%": decodeURI,
- "%decodeURIComponent%": decodeURIComponent,
- "%encodeURI%": encodeURI,
- "%encodeURIComponent%": encodeURIComponent,
- "%Error%": $Error,
- "%eval%": eval,
- // eslint-disable-line no-eval
- "%EvalError%": $EvalError,
- "%Float32Array%": typeof Float32Array === "undefined" ? undefined2 : Float32Array,
- "%Float64Array%": typeof Float64Array === "undefined" ? undefined2 : Float64Array,
- "%FinalizationRegistry%": typeof FinalizationRegistry === "undefined" ? undefined2 : FinalizationRegistry,
- "%Function%": $Function,
- "%GeneratorFunction%": needsEval,
- "%Int8Array%": typeof Int8Array === "undefined" ? undefined2 : Int8Array,
- "%Int16Array%": typeof Int16Array === "undefined" ? undefined2 : Int16Array,
- "%Int32Array%": typeof Int32Array === "undefined" ? undefined2 : Int32Array,
- "%isFinite%": isFinite,
- "%isNaN%": isNaN,
- "%IteratorPrototype%": hasSymbols && getProto ? getProto(getProto([][Symbol.iterator]())) : undefined2,
- "%JSON%": typeof JSON === "object" ? JSON : undefined2,
- "%Map%": typeof Map === "undefined" ? undefined2 : Map,
- "%MapIteratorPrototype%": typeof Map === "undefined" || !hasSymbols || !getProto ? undefined2 : getProto((/* @__PURE__ */ new Map())[Symbol.iterator]()),
- "%Math%": Math,
- "%Number%": Number,
- "%Object%": Object,
- "%parseFloat%": parseFloat,
- "%parseInt%": parseInt,
- "%Promise%": typeof Promise === "undefined" ? undefined2 : Promise,
- "%Proxy%": typeof Proxy === "undefined" ? undefined2 : Proxy,
- "%RangeError%": $RangeError,
- "%ReferenceError%": $ReferenceError,
- "%Reflect%": typeof Reflect === "undefined" ? undefined2 : Reflect,
- "%RegExp%": RegExp,
- "%Set%": typeof Set === "undefined" ? undefined2 : Set,
- "%SetIteratorPrototype%": typeof Set === "undefined" || !hasSymbols || !getProto ? undefined2 : getProto((/* @__PURE__ */ new Set())[Symbol.iterator]()),
- "%SharedArrayBuffer%": typeof SharedArrayBuffer === "undefined" ? undefined2 : SharedArrayBuffer,
- "%String%": String,
- "%StringIteratorPrototype%": hasSymbols && getProto ? getProto(""[Symbol.iterator]()) : undefined2,
- "%Symbol%": hasSymbols ? Symbol : undefined2,
- "%SyntaxError%": $SyntaxError,
- "%ThrowTypeError%": ThrowTypeError,
- "%TypedArray%": TypedArray,
- "%TypeError%": $TypeError,
- "%Uint8Array%": typeof Uint8Array === "undefined" ? undefined2 : Uint8Array,
- "%Uint8ClampedArray%": typeof Uint8ClampedArray === "undefined" ? undefined2 : Uint8ClampedArray,
- "%Uint16Array%": typeof Uint16Array === "undefined" ? undefined2 : Uint16Array,
- "%Uint32Array%": typeof Uint32Array === "undefined" ? undefined2 : Uint32Array,
- "%URIError%": $URIError,
- "%WeakMap%": typeof WeakMap === "undefined" ? undefined2 : WeakMap,
- "%WeakRef%": typeof WeakRef === "undefined" ? undefined2 : WeakRef,
- "%WeakSet%": typeof WeakSet === "undefined" ? undefined2 : WeakSet
- };
- if (getProto) {
- try {
- null.error;
- } catch (e) {
- errorProto = getProto(getProto(e));
- INTRINSICS["%Error.prototype%"] = errorProto;
- }
- }
- var errorProto;
- var doEval = function doEval2(name) {
- var value;
- if (name === "%AsyncFunction%") {
- value = getEvalledConstructor("async function () {}");
- } else if (name === "%GeneratorFunction%") {
- value = getEvalledConstructor("function* () {}");
- } else if (name === "%AsyncGeneratorFunction%") {
- value = getEvalledConstructor("async function* () {}");
- } else if (name === "%AsyncGenerator%") {
- var fn = doEval2("%AsyncGeneratorFunction%");
- if (fn) {
- value = fn.prototype;
- }
- } else if (name === "%AsyncIteratorPrototype%") {
- var gen = doEval2("%AsyncGenerator%");
- if (gen && getProto) {
- value = getProto(gen.prototype);
- }
- }
- INTRINSICS[name] = value;
- return value;
- };
- var LEGACY_ALIASES = {
- __proto__: null,
- "%ArrayBufferPrototype%": ["ArrayBuffer", "prototype"],
- "%ArrayPrototype%": ["Array", "prototype"],
- "%ArrayProto_entries%": ["Array", "prototype", "entries"],
- "%ArrayProto_forEach%": ["Array", "prototype", "forEach"],
- "%ArrayProto_keys%": ["Array", "prototype", "keys"],
- "%ArrayProto_values%": ["Array", "prototype", "values"],
- "%AsyncFunctionPrototype%": ["AsyncFunction", "prototype"],
- "%AsyncGenerator%": ["AsyncGeneratorFunction", "prototype"],
- "%AsyncGeneratorPrototype%": ["AsyncGeneratorFunction", "prototype", "prototype"],
- "%BooleanPrototype%": ["Boolean", "prototype"],
- "%DataViewPrototype%": ["DataView", "prototype"],
- "%DatePrototype%": ["Date", "prototype"],
- "%ErrorPrototype%": ["Error", "prototype"],
- "%EvalErrorPrototype%": ["EvalError", "prototype"],
- "%Float32ArrayPrototype%": ["Float32Array", "prototype"],
- "%Float64ArrayPrototype%": ["Float64Array", "prototype"],
- "%FunctionPrototype%": ["Function", "prototype"],
- "%Generator%": ["GeneratorFunction", "prototype"],
- "%GeneratorPrototype%": ["GeneratorFunction", "prototype", "prototype"],
- "%Int8ArrayPrototype%": ["Int8Array", "prototype"],
- "%Int16ArrayPrototype%": ["Int16Array", "prototype"],
- "%Int32ArrayPrototype%": ["Int32Array", "prototype"],
- "%JSONParse%": ["JSON", "parse"],
- "%JSONStringify%": ["JSON", "stringify"],
- "%MapPrototype%": ["Map", "prototype"],
- "%NumberPrototype%": ["Number", "prototype"],
- "%ObjectPrototype%": ["Object", "prototype"],
- "%ObjProto_toString%": ["Object", "prototype", "toString"],
- "%ObjProto_valueOf%": ["Object", "prototype", "valueOf"],
- "%PromisePrototype%": ["Promise", "prototype"],
- "%PromiseProto_then%": ["Promise", "prototype", "then"],
- "%Promise_all%": ["Promise", "all"],
- "%Promise_reject%": ["Promise", "reject"],
- "%Promise_resolve%": ["Promise", "resolve"],
- "%RangeErrorPrototype%": ["RangeError", "prototype"],
- "%ReferenceErrorPrototype%": ["ReferenceError", "prototype"],
- "%RegExpPrototype%": ["RegExp", "prototype"],
- "%SetPrototype%": ["Set", "prototype"],
- "%SharedArrayBufferPrototype%": ["SharedArrayBuffer", "prototype"],
- "%StringPrototype%": ["String", "prototype"],
- "%SymbolPrototype%": ["Symbol", "prototype"],
- "%SyntaxErrorPrototype%": ["SyntaxError", "prototype"],
- "%TypedArrayPrototype%": ["TypedArray", "prototype"],
- "%TypeErrorPrototype%": ["TypeError", "prototype"],
- "%Uint8ArrayPrototype%": ["Uint8Array", "prototype"],
- "%Uint8ClampedArrayPrototype%": ["Uint8ClampedArray", "prototype"],
- "%Uint16ArrayPrototype%": ["Uint16Array", "prototype"],
- "%Uint32ArrayPrototype%": ["Uint32Array", "prototype"],
- "%URIErrorPrototype%": ["URIError", "prototype"],
- "%WeakMapPrototype%": ["WeakMap", "prototype"],
- "%WeakSetPrototype%": ["WeakSet", "prototype"]
- };
- var bind = require_function_bind();
- var hasOwn = require_hasown();
- var $concat = bind.call(Function.call, Array.prototype.concat);
- var $spliceApply = bind.call(Function.apply, Array.prototype.splice);
- var $replace = bind.call(Function.call, String.prototype.replace);
- var $strSlice = bind.call(Function.call, String.prototype.slice);
- var $exec = bind.call(Function.call, RegExp.prototype.exec);
- var rePropName = /[^%.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|%$))/g;
- var reEscapeChar = /\\(\\)?/g;
- var stringToPath = function stringToPath2(string) {
- var first = $strSlice(string, 0, 1);
- var last = $strSlice(string, -1);
- if (first === "%" && last !== "%") {
- throw new $SyntaxError("invalid intrinsic syntax, expected closing `%`");
- } else if (last === "%" && first !== "%") {
- throw new $SyntaxError("invalid intrinsic syntax, expected opening `%`");
- }
- var result = [];
- $replace(string, rePropName, function(match, number, quote, subString) {
- result[result.length] = quote ? $replace(subString, reEscapeChar, "$1") : number || match;
- });
- return result;
- };
- var getBaseIntrinsic = function getBaseIntrinsic2(name, allowMissing) {
- var intrinsicName = name;
- var alias;
- if (hasOwn(LEGACY_ALIASES, intrinsicName)) {
- alias = LEGACY_ALIASES[intrinsicName];
- intrinsicName = "%" + alias[0] + "%";
- }
- if (hasOwn(INTRINSICS, intrinsicName)) {
- var value = INTRINSICS[intrinsicName];
- if (value === needsEval) {
- value = doEval(intrinsicName);
- }
- if (typeof value === "undefined" && !allowMissing) {
- throw new $TypeError("intrinsic " + name + " exists, but is not available. Please file an issue!");
- }
- return {
- alias,
- name: intrinsicName,
- value
- };
- }
- throw new $SyntaxError("intrinsic " + name + " does not exist!");
- };
- module.exports = function GetIntrinsic(name, allowMissing) {
- if (typeof name !== "string" || name.length === 0) {
- throw new $TypeError("intrinsic name must be a non-empty string");
- }
- if (arguments.length > 1 && typeof allowMissing !== "boolean") {
- throw new $TypeError('"allowMissing" argument must be a boolean');
- }
- if ($exec(/^%?[^%]*%?$/, name) === null) {
- throw new $SyntaxError("`%` may not be present anywhere but at the beginning and end of the intrinsic name");
- }
- var parts = stringToPath(name);
- var intrinsicBaseName = parts.length > 0 ? parts[0] : "";
- var intrinsic = getBaseIntrinsic("%" + intrinsicBaseName + "%", allowMissing);
- var intrinsicRealName = intrinsic.name;
- var value = intrinsic.value;
- var skipFurtherCaching = false;
- var alias = intrinsic.alias;
- if (alias) {
- intrinsicBaseName = alias[0];
- $spliceApply(parts, $concat([0, 1], alias));
- }
- for (var i = 1, isOwn = true; i < parts.length; i += 1) {
- var part = parts[i];
- var first = $strSlice(part, 0, 1);
- var last = $strSlice(part, -1);
- if ((first === '"' || first === "'" || first === "`" || (last === '"' || last === "'" || last === "`")) && first !== last) {
- throw new $SyntaxError("property names with quotes must have matching quotes");
- }
- if (part === "constructor" || !isOwn) {
- skipFurtherCaching = true;
- }
- intrinsicBaseName += "." + part;
- intrinsicRealName = "%" + intrinsicBaseName + "%";
- if (hasOwn(INTRINSICS, intrinsicRealName)) {
- value = INTRINSICS[intrinsicRealName];
- } else if (value != null) {
- if (!(part in value)) {
- if (!allowMissing) {
- throw new $TypeError("base intrinsic for " + name + " exists, but the property is not available.");
- }
- return void 0;
- }
- if ($gOPD && i + 1 >= parts.length) {
- var desc = $gOPD(value, part);
- isOwn = !!desc;
- if (isOwn && "get" in desc && !("originalValue" in desc.get)) {
- value = desc.get;
- } else {
- value = value[part];
- }
- } else {
- isOwn = hasOwn(value, part);
- value = value[part];
- }
- if (isOwn && !skipFurtherCaching) {
- INTRINSICS[intrinsicRealName] = value;
- }
- }
- }
- return value;
- };
- }
- });
- // node_modules/es-define-property/index.js
- var require_es_define_property = __commonJS({
- "node_modules/es-define-property/index.js"(exports, module) {
- "use strict";
- var GetIntrinsic = require_get_intrinsic3();
- var $defineProperty = GetIntrinsic("%Object.defineProperty%", true) || false;
- if ($defineProperty) {
- try {
- $defineProperty({}, "a", { value: 1 });
- } catch (e) {
- $defineProperty = false;
- }
- }
- module.exports = $defineProperty;
- }
- });
- // node_modules/gopd/index.js
- var require_gopd = __commonJS({
- "node_modules/gopd/index.js"(exports, module) {
- "use strict";
- var GetIntrinsic = require_get_intrinsic();
- var $gOPD = GetIntrinsic("%Object.getOwnPropertyDescriptor%", true);
- if ($gOPD) {
- try {
- $gOPD([], "length");
- } catch (e) {
- $gOPD = null;
- }
- }
- module.exports = $gOPD;
- }
- });
- // node_modules/define-data-property/index.js
- var require_define_data_property = __commonJS({
- "node_modules/define-data-property/index.js"(exports, module) {
- "use strict";
- var $defineProperty = require_es_define_property();
- var $SyntaxError = require_syntax();
- var $TypeError = require_type();
- var gopd = require_gopd();
- module.exports = function defineDataProperty(obj, property, value) {
- if (!obj || typeof obj !== "object" && typeof obj !== "function") {
- throw new $TypeError("`obj` must be an object or a function`");
- }
- if (typeof property !== "string" && typeof property !== "symbol") {
- throw new $TypeError("`property` must be a string or a symbol`");
- }
- if (arguments.length > 3 && typeof arguments[3] !== "boolean" && arguments[3] !== null) {
- throw new $TypeError("`nonEnumerable`, if provided, must be a boolean or null");
- }
- if (arguments.length > 4 && typeof arguments[4] !== "boolean" && arguments[4] !== null) {
- throw new $TypeError("`nonWritable`, if provided, must be a boolean or null");
- }
- if (arguments.length > 5 && typeof arguments[5] !== "boolean" && arguments[5] !== null) {
- throw new $TypeError("`nonConfigurable`, if provided, must be a boolean or null");
- }
- if (arguments.length > 6 && typeof arguments[6] !== "boolean") {
- throw new $TypeError("`loose`, if provided, must be a boolean");
- }
- var nonEnumerable = arguments.length > 3 ? arguments[3] : null;
- var nonWritable = arguments.length > 4 ? arguments[4] : null;
- var nonConfigurable = arguments.length > 5 ? arguments[5] : null;
- var loose = arguments.length > 6 ? arguments[6] : false;
- var desc = !!gopd && gopd(obj, property);
- if ($defineProperty) {
- $defineProperty(obj, property, {
- configurable: nonConfigurable === null && desc ? desc.configurable : !nonConfigurable,
- enumerable: nonEnumerable === null && desc ? desc.enumerable : !nonEnumerable,
- value,
- writable: nonWritable === null && desc ? desc.writable : !nonWritable
- });
- } else if (loose || !nonEnumerable && !nonWritable && !nonConfigurable) {
- obj[property] = value;
- } else {
- throw new $SyntaxError("This environment does not support defining a property as non-configurable, non-writable, or non-enumerable.");
- }
- };
- }
- });
- // node_modules/has-property-descriptors/index.js
- var require_has_property_descriptors = __commonJS({
- "node_modules/has-property-descriptors/index.js"(exports, module) {
- "use strict";
- var $defineProperty = require_es_define_property();
- var hasPropertyDescriptors = function hasPropertyDescriptors2() {
- return !!$defineProperty;
- };
- hasPropertyDescriptors.hasArrayLengthDefineBug = function hasArrayLengthDefineBug() {
- if (!$defineProperty) {
- return null;
- }
- try {
- return $defineProperty([], "length", { value: 1 }).length !== 1;
- } catch (e) {
- return true;
- }
- };
- module.exports = hasPropertyDescriptors;
- }
- });
- // node_modules/set-function-length/index.js
- var require_set_function_length = __commonJS({
- "node_modules/set-function-length/index.js"(exports, module) {
- "use strict";
- var GetIntrinsic = require_get_intrinsic2();
- var define = require_define_data_property();
- var hasDescriptors = require_has_property_descriptors()();
- var gOPD = require_gopd();
- var $TypeError = require_type();
- var $floor = GetIntrinsic("%Math.floor%");
- module.exports = function setFunctionLength(fn, length) {
- if (typeof fn !== "function") {
- throw new $TypeError("`fn` is not a function");
- }
- if (typeof length !== "number" || length < 0 || length > 4294967295 || $floor(length) !== length) {
- throw new $TypeError("`length` must be a positive 32-bit integer");
- }
- var loose = arguments.length > 2 && !!arguments[2];
- var functionLengthIsConfigurable = true;
- var functionLengthIsWritable = true;
- if ("length" in fn && gOPD) {
- var desc = gOPD(fn, "length");
- if (desc && !desc.configurable) {
- functionLengthIsConfigurable = false;
- }
- if (desc && !desc.writable) {
- functionLengthIsWritable = false;
- }
- }
- if (functionLengthIsConfigurable || functionLengthIsWritable || !loose) {
- if (hasDescriptors) {
- define(
- /** @type {Parameters<define>[0]} */
- fn,
- "length",
- length,
- true,
- true
- );
- } else {
- define(
- /** @type {Parameters<define>[0]} */
- fn,
- "length",
- length
- );
- }
- }
- return fn;
- };
- }
- });
- // node_modules/call-bind/index.js
- var require_call_bind = __commonJS({
- "node_modules/call-bind/index.js"(exports, module) {
- "use strict";
- var bind = require_function_bind();
- var GetIntrinsic = require_get_intrinsic();
- var setFunctionLength = require_set_function_length();
- var $TypeError = GetIntrinsic("%TypeError%");
- var $apply = GetIntrinsic("%Function.prototype.apply%");
- var $call = GetIntrinsic("%Function.prototype.call%");
- var $reflectApply = GetIntrinsic("%Reflect.apply%", true) || bind.call($call, $apply);
- var $defineProperty = GetIntrinsic("%Object.defineProperty%", true);
- var $max = GetIntrinsic("%Math.max%");
- if ($defineProperty) {
- try {
- $defineProperty({}, "a", { value: 1 });
- } catch (e) {
- $defineProperty = null;
- }
- }
- module.exports = function callBind(originalFunction) {
- if (typeof originalFunction !== "function") {
- throw new $TypeError("a function is required");
- }
- var func = $reflectApply(bind, $call, arguments);
- return setFunctionLength(
- func,
- 1 + $max(0, originalFunction.length - (arguments.length - 1)),
- true
- );
- };
- var applyBind = function applyBind2() {
- return $reflectApply(bind, $apply, arguments);
- };
- if ($defineProperty) {
- $defineProperty(module.exports, "apply", { value: applyBind });
- } else {
- module.exports.apply = applyBind;
- }
- }
- });
- // node_modules/call-bind/callBound.js
- var require_callBound = __commonJS({
- "node_modules/call-bind/callBound.js"(exports, module) {
- "use strict";
- var GetIntrinsic = require_get_intrinsic();
- var callBind = require_call_bind();
- var $indexOf = callBind(GetIntrinsic("String.prototype.indexOf"));
- module.exports = function callBoundIntrinsic(name, allowMissing) {
- var intrinsic = GetIntrinsic(name, !!allowMissing);
- if (typeof intrinsic === "function" && $indexOf(name, ".prototype.") > -1) {
- return callBind(intrinsic);
- }
- return intrinsic;
- };
- }
- });
- // (disabled):node_modules/object-inspect/util.inspect
- var require_util = __commonJS({
- "(disabled):node_modules/object-inspect/util.inspect"() {
- }
- });
- // node_modules/object-inspect/index.js
- var require_object_inspect = __commonJS({
- "node_modules/object-inspect/index.js"(exports, module) {
- var hasMap = typeof Map === "function" && Map.prototype;
- var mapSizeDescriptor = Object.getOwnPropertyDescriptor && hasMap ? Object.getOwnPropertyDescriptor(Map.prototype, "size") : null;
- var mapSize = hasMap && mapSizeDescriptor && typeof mapSizeDescriptor.get === "function" ? mapSizeDescriptor.get : null;
- var mapForEach = hasMap && Map.prototype.forEach;
- var hasSet = typeof Set === "function" && Set.prototype;
- var setSizeDescriptor = Object.getOwnPropertyDescriptor && hasSet ? Object.getOwnPropertyDescriptor(Set.prototype, "size") : null;
- var setSize = hasSet && setSizeDescriptor && typeof setSizeDescriptor.get === "function" ? setSizeDescriptor.get : null;
- var setForEach = hasSet && Set.prototype.forEach;
- var hasWeakMap = typeof WeakMap === "function" && WeakMap.prototype;
- var weakMapHas = hasWeakMap ? WeakMap.prototype.has : null;
- var hasWeakSet = typeof WeakSet === "function" && WeakSet.prototype;
- var weakSetHas = hasWeakSet ? WeakSet.prototype.has : null;
- var hasWeakRef = typeof WeakRef === "function" && WeakRef.prototype;
- var weakRefDeref = hasWeakRef ? WeakRef.prototype.deref : null;
- var booleanValueOf = Boolean.prototype.valueOf;
- var objectToString = Object.prototype.toString;
- var functionToString = Function.prototype.toString;
- var $match = String.prototype.match;
- var $slice = String.prototype.slice;
- var $replace = String.prototype.replace;
- var $toUpperCase = String.prototype.toUpperCase;
- var $toLowerCase = String.prototype.toLowerCase;
- var $test = RegExp.prototype.test;
- var $concat = Array.prototype.concat;
- var $join = Array.prototype.join;
- var $arrSlice = Array.prototype.slice;
- var $floor = Math.floor;
- var bigIntValueOf = typeof BigInt === "function" ? BigInt.prototype.valueOf : null;
- var gOPS = Object.getOwnPropertySymbols;
- var symToString = typeof Symbol === "function" && typeof Symbol.iterator === "symbol" ? Symbol.prototype.toString : null;
- var hasShammedSymbols = typeof Symbol === "function" && typeof Symbol.iterator === "object";
- var toStringTag = typeof Symbol === "function" && Symbol.toStringTag && (typeof Symbol.toStringTag === hasShammedSymbols ? "object" : "symbol") ? Symbol.toStringTag : null;
- var isEnumerable = Object.prototype.propertyIsEnumerable;
- var gPO = (typeof Reflect === "function" ? Reflect.getPrototypeOf : Object.getPrototypeOf) || ([].__proto__ === Array.prototype ? function(O) {
- return O.__proto__;
- } : null);
- function addNumericSeparator(num, str) {
- if (num === Infinity || num === -Infinity || num !== num || num && num > -1e3 && num < 1e3 || $test.call(/e/, str)) {
- return str;
- }
- var sepRegex = /[0-9](?=(?:[0-9]{3})+(?![0-9]))/g;
- if (typeof num === "number") {
- var int = num < 0 ? -$floor(-num) : $floor(num);
- if (int !== num) {
- var intStr = String(int);
- var dec = $slice.call(str, intStr.length + 1);
- return $replace.call(intStr, sepRegex, "$&_") + "." + $replace.call($replace.call(dec, /([0-9]{3})/g, "$&_"), /_$/, "");
- }
- }
- return $replace.call(str, sepRegex, "$&_");
- }
- var utilInspect = require_util();
- var inspectCustom = utilInspect.custom;
- var inspectSymbol = isSymbol(inspectCustom) ? inspectCustom : null;
- module.exports = function inspect_(obj, options, depth, seen) {
- var opts = options || {};
- if (has(opts, "quoteStyle") && (opts.quoteStyle !== "single" && opts.quoteStyle !== "double")) {
- throw new TypeError('option "quoteStyle" must be "single" or "double"');
- }
- if (has(opts, "maxStringLength") && (typeof opts.maxStringLength === "number" ? opts.maxStringLength < 0 && opts.maxStringLength !== Infinity : opts.maxStringLength !== null)) {
- throw new TypeError('option "maxStringLength", if provided, must be a positive integer, Infinity, or `null`');
- }
- var customInspect = has(opts, "customInspect") ? opts.customInspect : true;
- if (typeof customInspect !== "boolean" && customInspect !== "symbol") {
- throw new TypeError("option \"customInspect\", if provided, must be `true`, `false`, or `'symbol'`");
- }
- if (has(opts, "indent") && opts.indent !== null && opts.indent !== " " && !(parseInt(opts.indent, 10) === opts.indent && opts.indent > 0)) {
- throw new TypeError('option "indent" must be "\\t", an integer > 0, or `null`');
- }
- if (has(opts, "numericSeparator") && typeof opts.numericSeparator !== "boolean") {
- throw new TypeError('option "numericSeparator", if provided, must be `true` or `false`');
- }
- var numericSeparator = opts.numericSeparator;
- if (typeof obj === "undefined") {
- return "undefined";
- }
- if (obj === null) {
- return "null";
- }
- if (typeof obj === "boolean") {
- return obj ? "true" : "false";
- }
- if (typeof obj === "string") {
- return inspectString(obj, opts);
- }
- if (typeof obj === "number") {
- if (obj === 0) {
- return Infinity / obj > 0 ? "0" : "-0";
- }
- var str = String(obj);
- return numericSeparator ? addNumericSeparator(obj, str) : str;
- }
- if (typeof obj === "bigint") {
- var bigIntStr = String(obj) + "n";
- return numericSeparator ? addNumericSeparator(obj, bigIntStr) : bigIntStr;
- }
- var maxDepth = typeof opts.depth === "undefined" ? 5 : opts.depth;
- if (typeof depth === "undefined") {
- depth = 0;
- }
- if (depth >= maxDepth && maxDepth > 0 && typeof obj === "object") {
- return isArray(obj) ? "[Array]" : "[Object]";
- }
- var indent = getIndent(opts, depth);
- if (typeof seen === "undefined") {
- seen = [];
- } else if (indexOf(seen, obj) >= 0) {
- return "[Circular]";
- }
- function inspect(value, from, noIndent) {
- if (from) {
- seen = $arrSlice.call(seen);
- seen.push(from);
- }
- if (noIndent) {
- var newOpts = {
- depth: opts.depth
- };
- if (has(opts, "quoteStyle")) {
- newOpts.quoteStyle = opts.quoteStyle;
- }
- return inspect_(value, newOpts, depth + 1, seen);
- }
- return inspect_(value, opts, depth + 1, seen);
- }
- if (typeof obj === "function" && !isRegExp(obj)) {
- var name = nameOf(obj);
- var keys = arrObjKeys(obj, inspect);
- return "[Function" + (name ? ": " + name : " (anonymous)") + "]" + (keys.length > 0 ? " { " + $join.call(keys, ", ") + " }" : "");
- }
- if (isSymbol(obj)) {
- var symString = hasShammedSymbols ? $replace.call(String(obj), /^(Symbol\(.*\))_[^)]*$/, "$1") : symToString.call(obj);
- return typeof obj === "object" && !hasShammedSymbols ? markBoxed(symString) : symString;
- }
- if (isElement(obj)) {
- var s = "<" + $toLowerCase.call(String(obj.nodeName));
- var attrs = obj.attributes || [];
- for (var i = 0; i < attrs.length; i++) {
- s += " " + attrs[i].name + "=" + wrapQuotes(quote(attrs[i].value), "double", opts);
- }
- s += ">";
- if (obj.childNodes && obj.childNodes.length) {
- s += "...";
- }
- s += "</" + $toLowerCase.call(String(obj.nodeName)) + ">";
- return s;
- }
- if (isArray(obj)) {
- if (obj.length === 0) {
- return "[]";
- }
- var xs = arrObjKeys(obj, inspect);
- if (indent && !singleLineValues(xs)) {
- return "[" + indentedJoin(xs, indent) + "]";
- }
- return "[ " + $join.call(xs, ", ") + " ]";
- }
- if (isError(obj)) {
- var parts = arrObjKeys(obj, inspect);
- if (!("cause" in Error.prototype) && "cause" in obj && !isEnumerable.call(obj, "cause")) {
- return "{ [" + String(obj) + "] " + $join.call($concat.call("[cause]: " + inspect(obj.cause), parts), ", ") + " }";
- }
- if (parts.length === 0) {
- return "[" + String(obj) + "]";
- }
- return "{ [" + String(obj) + "] " + $join.call(parts, ", ") + " }";
- }
- if (typeof obj === "object" && customInspect) {
- if (inspectSymbol && typeof obj[inspectSymbol] === "function" && utilInspect) {
- return utilInspect(obj, { depth: maxDepth - depth });
- } else if (customInspect !== "symbol" && typeof obj.inspect === "function") {
- return obj.inspect();
- }
- }
- if (isMap(obj)) {
- var mapParts = [];
- if (mapForEach) {
- mapForEach.call(obj, function(value, key) {
- mapParts.push(inspect(key, obj, true) + " => " + inspect(value, obj));
- });
- }
- return collectionOf("Map", mapSize.call(obj), mapParts, indent);
- }
- if (isSet(obj)) {
- var setParts = [];
- if (setForEach) {
- setForEach.call(obj, function(value) {
- setParts.push(inspect(value, obj));
- });
- }
- return collectionOf("Set", setSize.call(obj), setParts, indent);
- }
- if (isWeakMap(obj)) {
- return weakCollectionOf("WeakMap");
- }
- if (isWeakSet(obj)) {
- return weakCollectionOf("WeakSet");
- }
- if (isWeakRef(obj)) {
- return weakCollectionOf("WeakRef");
- }
- if (isNumber(obj)) {
- return markBoxed(inspect(Number(obj)));
- }
- if (isBigInt(obj)) {
- return markBoxed(inspect(bigIntValueOf.call(obj)));
- }
- if (isBoolean(obj)) {
- return markBoxed(booleanValueOf.call(obj));
- }
- if (isString(obj)) {
- return markBoxed(inspect(String(obj)));
- }
- if (typeof window !== "undefined" && obj === window) {
- return "{ [object Window] }";
- }
- if (obj === global) {
- return "{ [object globalThis] }";
- }
- if (!isDate(obj) && !isRegExp(obj)) {
- var ys = arrObjKeys(obj, inspect);
- var isPlainObject = gPO ? gPO(obj) === Object.prototype : obj instanceof Object || obj.constructor === Object;
- var protoTag = obj instanceof Object ? "" : "null prototype";
- var stringTag = !isPlainObject && toStringTag && Object(obj) === obj && toStringTag in obj ? $slice.call(toStr(obj), 8, -1) : protoTag ? "Object" : "";
- var constructorTag = isPlainObject || typeof obj.constructor !== "function" ? "" : obj.constructor.name ? obj.constructor.name + " " : "";
- var tag = constructorTag + (stringTag || protoTag ? "[" + $join.call($concat.call([], stringTag || [], protoTag || []), ": ") + "] " : "");
- if (ys.length === 0) {
- return tag + "{}";
- }
- if (indent) {
- return tag + "{" + indentedJoin(ys, indent) + "}";
- }
- return tag + "{ " + $join.call(ys, ", ") + " }";
- }
- return String(obj);
- };
- function wrapQuotes(s, defaultStyle, opts) {
- var quoteChar = (opts.quoteStyle || defaultStyle) === "double" ? '"' : "'";
- return quoteChar + s + quoteChar;
- }
- function quote(s) {
- return $replace.call(String(s), /"/g, """);
- }
- function isArray(obj) {
- return toStr(obj) === "[object Array]" && (!toStringTag || !(typeof obj === "object" && toStringTag in obj));
- }
- function isDate(obj) {
- return toStr(obj) === "[object Date]" && (!toStringTag || !(typeof obj === "object" && toStringTag in obj));
- }
- function isRegExp(obj) {
- return toStr(obj) === "[object RegExp]" && (!toStringTag || !(typeof obj === "object" && toStringTag in obj));
- }
- function isError(obj) {
- return toStr(obj) === "[object Error]" && (!toStringTag || !(typeof obj === "object" && toStringTag in obj));
- }
- function isString(obj) {
- return toStr(obj) === "[object String]" && (!toStringTag || !(typeof obj === "object" && toStringTag in obj));
- }
- function isNumber(obj) {
- return toStr(obj) === "[object Number]" && (!toStringTag || !(typeof obj === "object" && toStringTag in obj));
- }
- function isBoolean(obj) {
- return toStr(obj) === "[object Boolean]" && (!toStringTag || !(typeof obj === "object" && toStringTag in obj));
- }
- function isSymbol(obj) {
- if (hasShammedSymbols) {
- return obj && typeof obj === "object" && obj instanceof Symbol;
- }
- if (typeof obj === "symbol") {
- return true;
- }
- if (!obj || typeof obj !== "object" || !symToString) {
- return false;
- }
- try {
- symToString.call(obj);
- return true;
- } catch (e) {
- }
- return false;
- }
- function isBigInt(obj) {
- if (!obj || typeof obj !== "object" || !bigIntValueOf) {
- return false;
- }
- try {
- bigIntValueOf.call(obj);
- return true;
- } catch (e) {
- }
- return false;
- }
- var hasOwn = Object.prototype.hasOwnProperty || function(key) {
- return key in this;
- };
- function has(obj, key) {
- return hasOwn.call(obj, key);
- }
- function toStr(obj) {
- return objectToString.call(obj);
- }
- function nameOf(f) {
- if (f.name) {
- return f.name;
- }
- var m = $match.call(functionToString.call(f), /^function\s*([\w$]+)/);
- if (m) {
- return m[1];
- }
- return null;
- }
- function indexOf(xs, x) {
- if (xs.indexOf) {
- return xs.indexOf(x);
- }
- for (var i = 0, l = xs.length; i < l; i++) {
- if (xs[i] === x) {
- return i;
- }
- }
- return -1;
- }
- function isMap(x) {
- if (!mapSize || !x || typeof x !== "object") {
- return false;
- }
- try {
- mapSize.call(x);
- try {
- setSize.call(x);
- } catch (s) {
- return true;
- }
- return x instanceof Map;
- } catch (e) {
- }
- return false;
- }
- function isWeakMap(x) {
- if (!weakMapHas || !x || typeof x !== "object") {
- return false;
- }
- try {
- weakMapHas.call(x, weakMapHas);
- try {
- weakSetHas.call(x, weakSetHas);
- } catch (s) {
- return true;
- }
- return x instanceof WeakMap;
- } catch (e) {
- }
- return false;
- }
- function isWeakRef(x) {
- if (!weakRefDeref || !x || typeof x !== "object") {
- return false;
- }
- try {
- weakRefDeref.call(x);
- return true;
- } catch (e) {
- }
- return false;
- }
- function isSet(x) {
- if (!setSize || !x || typeof x !== "object") {
- return false;
- }
- try {
- setSize.call(x);
- try {
- mapSize.call(x);
- } catch (m) {
- return true;
- }
- return x instanceof Set;
- } catch (e) {
- }
- return false;
- }
- function isWeakSet(x) {
- if (!weakSetHas || !x || typeof x !== "object") {
- return false;
- }
- try {
- weakSetHas.call(x, weakSetHas);
- try {
- weakMapHas.call(x, weakMapHas);
- } catch (s) {
- return true;
- }
- return x instanceof WeakSet;
- } catch (e) {
- }
- return false;
- }
- function isElement(x) {
- if (!x || typeof x !== "object") {
- return false;
- }
- if (typeof HTMLElement !== "undefined" && x instanceof HTMLElement) {
- return true;
- }
- return typeof x.nodeName === "string" && typeof x.getAttribute === "function";
- }
- function inspectString(str, opts) {
- if (str.length > opts.maxStringLength) {
- var remaining = str.length - opts.maxStringLength;
- var trailer = "... " + remaining + " more character" + (remaining > 1 ? "s" : "");
- return inspectString($slice.call(str, 0, opts.maxStringLength), opts) + trailer;
- }
- var s = $replace.call($replace.call(str, /(['\\])/g, "\\$1"), /[\x00-\x1f]/g, lowbyte);
- return wrapQuotes(s, "single", opts);
- }
- function lowbyte(c) {
- var n = c.charCodeAt(0);
- var x = {
- 8: "b",
- 9: "t",
- 10: "n",
- 12: "f",
- 13: "r"
- }[n];
- if (x) {
- return "\\" + x;
- }
- return "\\x" + (n < 16 ? "0" : "") + $toUpperCase.call(n.toString(16));
- }
- function markBoxed(str) {
- return "Object(" + str + ")";
- }
- function weakCollectionOf(type) {
- return type + " { ? }";
- }
- function collectionOf(type, size, entries, indent) {
- var joinedEntries = indent ? indentedJoin(entries, indent) : $join.call(entries, ", ");
- return type + " (" + size + ") {" + joinedEntries + "}";
- }
- function singleLineValues(xs) {
- for (var i = 0; i < xs.length; i++) {
- if (indexOf(xs[i], "\n") >= 0) {
- return false;
- }
- }
- return true;
- }
- function getIndent(opts, depth) {
- var baseIndent;
- if (opts.indent === " ") {
- baseIndent = " ";
- } else if (typeof opts.indent === "number" && opts.indent > 0) {
- baseIndent = $join.call(Array(opts.indent + 1), " ");
- } else {
- return null;
- }
- return {
- base: baseIndent,
- prev: $join.call(Array(depth + 1), baseIndent)
- };
- }
- function indentedJoin(xs, indent) {
- if (xs.length === 0) {
- return "";
- }
- var lineJoiner = "\n" + indent.prev + indent.base;
- return lineJoiner + $join.call(xs, "," + lineJoiner) + "\n" + indent.prev;
- }
- function arrObjKeys(obj, inspect) {
- var isArr = isArray(obj);
- var xs = [];
- if (isArr) {
- xs.length = obj.length;
- for (var i = 0; i < obj.length; i++) {
- xs[i] = has(obj, i) ? inspect(obj[i], obj) : "";
- }
- }
- var syms = typeof gOPS === "function" ? gOPS(obj) : [];
- var symMap;
- if (hasShammedSymbols) {
- symMap = {};
- for (var k = 0; k < syms.length; k++) {
- symMap["$" + syms[k]] = syms[k];
- }
- }
- for (var key in obj) {
- if (!has(obj, key)) {
- continue;
- }
- if (isArr && String(Number(key)) === key && key < obj.length) {
- continue;
- }
- if (hasShammedSymbols && symMap["$" + key] instanceof Symbol) {
- continue;
- } else if ($test.call(/[^\w$]/, key)) {
- xs.push(inspect(key, obj) + ": " + inspect(obj[key], obj));
- } else {
- xs.push(key + ": " + inspect(obj[key], obj));
- }
- }
- if (typeof gOPS === "function") {
- for (var j = 0; j < syms.length; j++) {
- if (isEnumerable.call(obj, syms[j])) {
- xs.push("[" + inspect(syms[j]) + "]: " + inspect(obj[syms[j]], obj));
- }
- }
- }
- return xs;
- }
- }
- });
- // node_modules/side-channel/index.js
- var require_side_channel = __commonJS({
- "node_modules/side-channel/index.js"(exports, module) {
- "use strict";
- var GetIntrinsic = require_get_intrinsic();
- var callBound = require_callBound();
- var inspect = require_object_inspect();
- var $TypeError = GetIntrinsic("%TypeError%");
- var $WeakMap = GetIntrinsic("%WeakMap%", true);
- var $Map = GetIntrinsic("%Map%", true);
- var $weakMapGet = callBound("WeakMap.prototype.get", true);
- var $weakMapSet = callBound("WeakMap.prototype.set", true);
- var $weakMapHas = callBound("WeakMap.prototype.has", true);
- var $mapGet = callBound("Map.prototype.get", true);
- var $mapSet = callBound("Map.prototype.set", true);
- var $mapHas = callBound("Map.prototype.has", true);
- var listGetNode = function(list, key) {
- for (var prev = list, curr; (curr = prev.next) !== null; prev = curr) {
- if (curr.key === key) {
- prev.next = curr.next;
- curr.next = list.next;
- list.next = curr;
- return curr;
- }
- }
- };
- var listGet = function(objects, key) {
- var node = listGetNode(objects, key);
- return node && node.value;
- };
- var listSet = function(objects, key, value) {
- var node = listGetNode(objects, key);
- if (node) {
- node.value = value;
- } else {
- objects.next = {
- // eslint-disable-line no-param-reassign
- key,
- next: objects.next,
- value
- };
- }
- };
- var listHas = function(objects, key) {
- return !!listGetNode(objects, key);
- };
- module.exports = function getSideChannel() {
- var $wm;
- var $m;
- var $o;
- var channel = {
- assert: function(key) {
- if (!channel.has(key)) {
- throw new $TypeError("Side channel does not contain " + inspect(key));
- }
- },
- get: function(key) {
- if ($WeakMap && key && (typeof key === "object" || typeof key === "function")) {
- if ($wm) {
- return $weakMapGet($wm, key);
- }
- } else if ($Map) {
- if ($m) {
- return $mapGet($m, key);
- }
- } else {
- if ($o) {
- return listGet($o, key);
- }
- }
- },
- has: function(key) {
- if ($WeakMap && key && (typeof key === "object" || typeof key === "function")) {
- if ($wm) {
- return $weakMapHas($wm, key);
- }
- } else if ($Map) {
- if ($m) {
- return $mapHas($m, key);
- }
- } else {
- if ($o) {
- return listHas($o, key);
- }
- }
- return false;
- },
- set: function(key, value) {
- if ($WeakMap && key && (typeof key === "object" || typeof key === "function")) {
- if (!$wm) {
- $wm = new $WeakMap();
- }
- $weakMapSet($wm, key, value);
- } else if ($Map) {
- if (!$m) {
- $m = new $Map();
- }
- $mapSet($m, key, value);
- } else {
- if (!$o) {
- $o = { key: {}, next: null };
- }
- listSet($o, key, value);
- }
- }
- };
- return channel;
- };
- }
- });
- // node_modules/qs/lib/formats.js
- var require_formats = __commonJS({
- "node_modules/qs/lib/formats.js"(exports, module) {
- "use strict";
- var replace = String.prototype.replace;
- var percentTwenties = /%20/g;
- var Format = {
- RFC1738: "RFC1738",
- RFC3986: "RFC3986"
- };
- module.exports = {
- "default": Format.RFC3986,
- formatters: {
- RFC1738: function(value) {
- return replace.call(value, percentTwenties, "+");
- },
- RFC3986: function(value) {
- return String(value);
- }
- },
- RFC1738: Format.RFC1738,
- RFC3986: Format.RFC3986
- };
- }
- });
- // node_modules/qs/lib/utils.js
- var require_utils = __commonJS({
- "node_modules/qs/lib/utils.js"(exports, module) {
- "use strict";
- var formats = require_formats();
- var has = Object.prototype.hasOwnProperty;
- var isArray = Array.isArray;
- var hexTable = function() {
- var array = [];
- for (var i = 0; i < 256; ++i) {
- array.push("%" + ((i < 16 ? "0" : "") + i.toString(16)).toUpperCase());
- }
- return array;
- }();
- var compactQueue = function compactQueue2(queue) {
- while (queue.length > 1) {
- var item = queue.pop();
- var obj = item.obj[item.prop];
- if (isArray(obj)) {
- var compacted = [];
- for (var j = 0; j < obj.length; ++j) {
- if (typeof obj[j] !== "undefined") {
- compacted.push(obj[j]);
- }
- }
- item.obj[item.prop] = compacted;
- }
- }
- };
- var arrayToObject = function arrayToObject2(source, options) {
- var obj = options && options.plainObjects ? /* @__PURE__ */ Object.create(null) : {};
- for (var i = 0; i < source.length; ++i) {
- if (typeof source[i] !== "undefined") {
- obj[i] = source[i];
- }
- }
- return obj;
- };
- var merge = function merge2(target, source, options) {
- if (!source) {
- return target;
- }
- if (typeof source !== "object") {
- if (isArray(target)) {
- target.push(source);
- } else if (target && typeof target === "object") {
- if (options && (options.plainObjects || options.allowPrototypes) || !has.call(Object.prototype, source)) {
- target[source] = true;
- }
- } else {
- return [target, source];
- }
- return target;
- }
- if (!target || typeof target !== "object") {
- return [target].concat(source);
- }
- var mergeTarget = target;
- if (isArray(target) && !isArray(source)) {
- mergeTarget = arrayToObject(target, options);
- }
- if (isArray(target) && isArray(source)) {
- source.forEach(function(item, i) {
- if (has.call(target, i)) {
- var targetItem = target[i];
- if (targetItem && typeof targetItem === "object" && item && typeof item === "object") {
- target[i] = merge2(targetItem, item, options);
- } else {
- target.push(item);
- }
- } else {
- target[i] = item;
- }
- });
- return target;
- }
- return Object.keys(source).reduce(function(acc, key) {
- var value = source[key];
- if (has.call(acc, key)) {
- acc[key] = merge2(acc[key], value, options);
- } else {
- acc[key] = value;
- }
- return acc;
- }, mergeTarget);
- };
- var assign = function assignSingleSource(target, source) {
- return Object.keys(source).reduce(function(acc, key) {
- acc[key] = source[key];
- return acc;
- }, target);
- };
- var decode = function(str, decoder, charset) {
- var strWithoutPlus = str.replace(/\+/g, " ");
- if (charset === "iso-8859-1") {
- return strWithoutPlus.replace(/%[0-9a-f]{2}/gi, unescape);
- }
- try {
- return decodeURIComponent(strWithoutPlus);
- } catch (e) {
- return strWithoutPlus;
- }
- };
- var encode = function encode2(str, defaultEncoder, charset, kind, format) {
- if (str.length === 0) {
- return str;
- }
- var string = str;
- if (typeof str === "symbol") {
- string = Symbol.prototype.toString.call(str);
- } else if (typeof str !== "string") {
- string = String(str);
- }
- if (charset === "iso-8859-1") {
- return escape(string).replace(/%u[0-9a-f]{4}/gi, function($0) {
- return "%26%23" + parseInt($0.slice(2), 16) + "%3B";
- });
- }
- var out = "";
- for (var i = 0; i < string.length; ++i) {
- var c = string.charCodeAt(i);
- if (c === 45 || c === 46 || c === 95 || c === 126 || c >= 48 && c <= 57 || c >= 65 && c <= 90 || c >= 97 && c <= 122 || format === formats.RFC1738 && (c === 40 || c === 41)) {
- out += string.charAt(i);
- continue;
- }
- if (c < 128) {
- out = out + hexTable[c];
- continue;
- }
- if (c < 2048) {
- out = out + (hexTable[192 | c >> 6] + hexTable[128 | c & 63]);
- continue;
- }
- if (c < 55296 || c >= 57344) {
- out = out + (hexTable[224 | c >> 12] + hexTable[128 | c >> 6 & 63] + hexTable[128 | c & 63]);
- continue;
- }
- i += 1;
- c = 65536 + ((c & 1023) << 10 | string.charCodeAt(i) & 1023);
- out += hexTable[240 | c >> 18] + hexTable[128 | c >> 12 & 63] + hexTable[128 | c >> 6 & 63] + hexTable[128 | c & 63];
- }
- return out;
- };
- var compact = function compact2(value) {
- var queue = [{ obj: { o: value }, prop: "o" }];
- var refs = [];
- for (var i = 0; i < queue.length; ++i) {
- var item = queue[i];
- var obj = item.obj[item.prop];
- var keys = Object.keys(obj);
- for (var j = 0; j < keys.length; ++j) {
- var key = keys[j];
- var val = obj[key];
- if (typeof val === "object" && val !== null && refs.indexOf(val) === -1) {
- queue.push({ obj, prop: key });
- refs.push(val);
- }
- }
- }
- compactQueue(queue);
- return value;
- };
- var isRegExp = function isRegExp2(obj) {
- return Object.prototype.toString.call(obj) === "[object RegExp]";
- };
- var isBuffer = function isBuffer2(obj) {
- if (!obj || typeof obj !== "object") {
- return false;
- }
- return !!(obj.constructor && obj.constructor.isBuffer && obj.constructor.isBuffer(obj));
- };
- var combine = function combine2(a, b) {
- return [].concat(a, b);
- };
- var maybeMap = function maybeMap2(val, fn) {
- if (isArray(val)) {
- var mapped = [];
- for (var i = 0; i < val.length; i += 1) {
- mapped.push(fn(val[i]));
- }
- return mapped;
- }
- return fn(val);
- };
- module.exports = {
- arrayToObject,
- assign,
- combine,
- compact,
- decode,
- encode,
- isBuffer,
- isRegExp,
- maybeMap,
- merge
- };
- }
- });
- // node_modules/qs/lib/stringify.js
- var require_stringify = __commonJS({
- "node_modules/qs/lib/stringify.js"(exports, module) {
- "use strict";
- var getSideChannel = require_side_channel();
- var utils = require_utils();
- var formats = require_formats();
- var has = Object.prototype.hasOwnProperty;
- var arrayPrefixGenerators = {
- brackets: function brackets(prefix) {
- return prefix + "[]";
- },
- comma: "comma",
- indices: function indices(prefix, key) {
- return prefix + "[" + key + "]";
- },
- repeat: function repeat(prefix) {
- return prefix;
- }
- };
- var isArray = Array.isArray;
- var push = Array.prototype.push;
- var pushToArray = function(arr, valueOrArray) {
- push.apply(arr, isArray(valueOrArray) ? valueOrArray : [valueOrArray]);
- };
- var toISO = Date.prototype.toISOString;
- var defaultFormat = formats["default"];
- var defaults = {
- addQueryPrefix: false,
- allowDots: false,
- charset: "utf-8",
- charsetSentinel: false,
- delimiter: "&",
- encode: true,
- encoder: utils.encode,
- encodeValuesOnly: false,
- format: defaultFormat,
- formatter: formats.formatters[defaultFormat],
- // deprecated
- indices: false,
- serializeDate: function serializeDate(date) {
- return toISO.call(date);
- },
- skipNulls: false,
- strictNullHandling: false
- };
- var isNonNullishPrimitive = function isNonNullishPrimitive2(v) {
- return typeof v === "string" || typeof v === "number" || typeof v === "boolean" || typeof v === "symbol" || typeof v === "bigint";
- };
- var sentinel = {};
- var stringify = function stringify2(object, prefix, generateArrayPrefix, commaRoundTrip, strictNullHandling, skipNulls, encoder, filter, sort, allowDots, serializeDate, format, formatter, encodeValuesOnly, charset, sideChannel) {
- var obj = object;
- var tmpSc = sideChannel;
- var step = 0;
- var findFlag = false;
- while ((tmpSc = tmpSc.get(sentinel)) !== void 0 && !findFlag) {
- var pos = tmpSc.get(object);
- step += 1;
- if (typeof pos !== "undefined") {
- if (pos === step) {
- throw new RangeError("Cyclic object value");
- } else {
- findFlag = true;
- }
- }
- if (typeof tmpSc.get(sentinel) === "undefined") {
- step = 0;
- }
- }
- if (typeof filter === "function") {
- obj = filter(prefix, obj);
- } else if (obj instanceof Date) {
- obj = serializeDate(obj);
- } else if (generateArrayPrefix === "comma" && isArray(obj)) {
- obj = utils.maybeMap(obj, function(value2) {
- if (value2 instanceof Date) {
- return serializeDate(value2);
- }
- return value2;
- });
- }
- if (obj === null) {
- if (strictNullHandling) {
- return encoder && !encodeValuesOnly ? encoder(prefix, defaults.encoder, charset, "key", format) : prefix;
- }
- obj = "";
- }
- if (isNonNullishPrimitive(obj) || utils.isBuffer(obj)) {
- if (encoder) {
- var keyValue = encodeValuesOnly ? prefix : encoder(prefix, defaults.encoder, charset, "key", format);
- return [formatter(keyValue) + "=" + formatter(encoder(obj, defaults.encoder, charset, "value", format))];
- }
- return [formatter(prefix) + "=" + formatter(String(obj))];
- }
- var values = [];
- if (typeof obj === "undefined") {
- return values;
- }
- var objKeys;
- if (generateArrayPrefix === "comma" && isArray(obj)) {
- if (encodeValuesOnly && encoder) {
- obj = utils.maybeMap(obj, encoder);
- }
- objKeys = [{ value: obj.length > 0 ? obj.join(",") || null : void 0 }];
- } else if (isArray(filter)) {
- objKeys = filter;
- } else {
- var keys = Object.keys(obj);
- objKeys = sort ? keys.sort(sort) : keys;
- }
- var adjustedPrefix = commaRoundTrip && isArray(obj) && obj.length === 1 ? prefix + "[]" : prefix;
- for (var j = 0; j < objKeys.length; ++j) {
- var key = objKeys[j];
- var value = typeof key === "object" && typeof key.value !== "undefined" ? key.value : obj[key];
- if (skipNulls && value === null) {
- continue;
- }
- var keyPrefix = isArray(obj) ? typeof generateArrayPrefix === "function" ? generateArrayPrefix(adjustedPrefix, key) : adjustedPrefix : adjustedPrefix + (allowDots ? "." + key : "[" + key + "]");
- sideChannel.set(object, step);
- var valueSideChannel = getSideChannel();
- valueSideChannel.set(sentinel, sideChannel);
- pushToArray(values, stringify2(
- value,
- keyPrefix,
- generateArrayPrefix,
- commaRoundTrip,
- strictNullHandling,
- skipNulls,
- generateArrayPrefix === "comma" && encodeValuesOnly && isArray(obj) ? null : encoder,
- filter,
- sort,
- allowDots,
- serializeDate,
- format,
- formatter,
- encodeValuesOnly,
- charset,
- valueSideChannel
- ));
- }
- return values;
- };
- var normalizeStringifyOptions = function normalizeStringifyOptions2(opts) {
- if (!opts) {
- return defaults;
- }
- if (opts.encoder !== null && typeof opts.encoder !== "undefined" && typeof opts.encoder !== "function") {
- throw new TypeError("Encoder has to be a function.");
- }
- var charset = opts.charset || defaults.charset;
- if (typeof opts.charset !== "undefined" && opts.charset !== "utf-8" && opts.charset !== "iso-8859-1") {
- throw new TypeError("The charset option must be either utf-8, iso-8859-1, or undefined");
- }
- var format = formats["default"];
- if (typeof opts.format !== "undefined") {
- if (!has.call(formats.formatters, opts.format)) {
- throw new TypeError("Unknown format option provided.");
- }
- format = opts.format;
- }
- var formatter = formats.formatters[format];
- var filter = defaults.filter;
- if (typeof opts.filter === "function" || isArray(opts.filter)) {
- filter = opts.filter;
- }
- return {
- addQueryPrefix: typeof opts.addQueryPrefix === "boolean" ? opts.addQueryPrefix : defaults.addQueryPrefix,
- allowDots: typeof opts.allowDots === "undefined" ? defaults.allowDots : !!opts.allowDots,
- charset,
- charsetSentinel: typeof opts.charsetSentinel === "boolean" ? opts.charsetSentinel : defaults.charsetSentinel,
- delimiter: typeof opts.delimiter === "undefined" ? defaults.delimiter : opts.delimiter,
- encode: typeof opts.encode === "boolean" ? opts.encode : defaults.encode,
- encoder: typeof opts.encoder === "function" ? opts.encoder : defaults.encoder,
- encodeValuesOnly: typeof opts.encodeValuesOnly === "boolean" ? opts.encodeValuesOnly : defaults.encodeValuesOnly,
- filter,
- format,
- formatter,
- serializeDate: typeof opts.serializeDate === "function" ? opts.serializeDate : defaults.serializeDate,
- skipNulls: typeof opts.skipNulls === "boolean" ? opts.skipNulls : defaults.skipNulls,
- sort: typeof opts.sort === "function" ? opts.sort : null,
- strictNullHandling: typeof opts.strictNullHandling === "boolean" ? opts.strictNullHandling : defaults.strictNullHandling
- };
- };
- module.exports = function(object, opts) {
- var obj = object;
- var options = normalizeStringifyOptions(opts);
- var objKeys;
- var filter;
- if (typeof options.filter === "function") {
- filter = options.filter;
- obj = filter("", obj);
- } else if (isArray(options.filter)) {
- filter = options.filter;
- objKeys = filter;
- }
- var keys = [];
- if (typeof obj !== "object" || obj === null) {
- return "";
- }
- var arrayFormat;
- if (opts && opts.arrayFormat in arrayPrefixGenerators) {
- arrayFormat = opts.arrayFormat;
- } else if (opts && "indices" in opts) {
- arrayFormat = opts.indices ? "indices" : "repeat";
- } else {
- arrayFormat = "indices";
- }
- var generateArrayPrefix = arrayPrefixGenerators[arrayFormat];
- if (opts && "commaRoundTrip" in opts && typeof opts.commaRoundTrip !== "boolean") {
- throw new TypeError("`commaRoundTrip` must be a boolean, or absent");
- }
- var commaRoundTrip = generateArrayPrefix === "comma" && opts && opts.commaRoundTrip;
- if (!objKeys) {
- objKeys = Object.keys(obj);
- }
- if (options.sort) {
- objKeys.sort(options.sort);
- }
- var sideChannel = getSideChannel();
- for (var i = 0; i < objKeys.length; ++i) {
- var key = objKeys[i];
- if (options.skipNulls && obj[key] === null) {
- continue;
- }
- pushToArray(keys, stringify(
- obj[key],
- key,
- generateArrayPrefix,
- commaRoundTrip,
- options.strictNullHandling,
- options.skipNulls,
- options.encode ? options.encoder : null,
- options.filter,
- options.sort,
- options.allowDots,
- options.serializeDate,
- options.format,
- options.formatter,
- options.encodeValuesOnly,
- options.charset,
- sideChannel
- ));
- }
- var joined = keys.join(options.delimiter);
- var prefix = options.addQueryPrefix === true ? "?" : "";
- if (options.charsetSentinel) {
- if (options.charset === "iso-8859-1") {
- prefix += "utf8=%26%2310003%3B&";
- } else {
- prefix += "utf8=%E2%9C%93&";
- }
- }
- return joined.length > 0 ? prefix + joined : "";
- };
- }
- });
- // node_modules/qs/lib/parse.js
- var require_parse = __commonJS({
- "node_modules/qs/lib/parse.js"(exports, module) {
- "use strict";
- var utils = require_utils();
- var has = Object.prototype.hasOwnProperty;
- var isArray = Array.isArray;
- var defaults = {
- allowDots: false,
- allowPrototypes: false,
- allowSparse: false,
- arrayLimit: 20,
- charset: "utf-8",
- charsetSentinel: false,
- comma: false,
- decoder: utils.decode,
- delimiter: "&",
- depth: 5,
- ignoreQueryPrefix: false,
- interpretNumericEntities: false,
- parameterLimit: 1e3,
- parseArrays: true,
- plainObjects: false,
- strictNullHandling: false
- };
- var interpretNumericEntities = function(str) {
- return str.replace(/&#(\d+);/g, function($0, numberStr) {
- return String.fromCharCode(parseInt(numberStr, 10));
- });
- };
- var parseArrayValue = function(val, options) {
- if (val && typeof val === "string" && options.comma && val.indexOf(",") > -1) {
- return val.split(",");
- }
- return val;
- };
- var isoSentinel = "utf8=%26%2310003%3B";
- var charsetSentinel = "utf8=%E2%9C%93";
- var parseValues = function parseQueryStringValues(str, options) {
- var obj = { __proto__: null };
- var cleanStr = options.ignoreQueryPrefix ? str.replace(/^\?/, "") : str;
- var limit = options.parameterLimit === Infinity ? void 0 : options.parameterLimit;
- var parts = cleanStr.split(options.delimiter, limit);
- var skipIndex = -1;
- var i;
- var charset = options.charset;
- if (options.charsetSentinel) {
- for (i = 0; i < parts.length; ++i) {
- if (parts[i].indexOf("utf8=") === 0) {
- if (parts[i] === charsetSentinel) {
- charset = "utf-8";
- } else if (parts[i] === isoSentinel) {
- charset = "iso-8859-1";
- }
- skipIndex = i;
- i = parts.length;
- }
- }
- }
- for (i = 0; i < parts.length; ++i) {
- if (i === skipIndex) {
- continue;
- }
- var part = parts[i];
- var bracketEqualsPos = part.indexOf("]=");
- var pos = bracketEqualsPos === -1 ? part.indexOf("=") : bracketEqualsPos + 1;
- var key, val;
- if (pos === -1) {
- key = options.decoder(part, defaults.decoder, charset, "key");
- val = options.strictNullHandling ? null : "";
- } else {
- key = options.decoder(part.slice(0, pos), defaults.decoder, charset, "key");
- val = utils.maybeMap(
- parseArrayValue(part.slice(pos + 1), options),
- function(encodedVal) {
- return options.decoder(encodedVal, defaults.decoder, charset, "value");
- }
- );
- }
- if (val && options.interpretNumericEntities && charset === "iso-8859-1") {
- val = interpretNumericEntities(val);
- }
- if (part.indexOf("[]=") > -1) {
- val = isArray(val) ? [val] : val;
- }
- if (has.call(obj, key)) {
- obj[key] = utils.combine(obj[key], val);
- } else {
- obj[key] = val;
- }
- }
- return obj;
- };
- var parseObject = function(chain, val, options, valuesParsed) {
- var leaf = valuesParsed ? val : parseArrayValue(val, options);
- for (var i = chain.length - 1; i >= 0; --i) {
- var obj;
- var root = chain[i];
- if (root === "[]" && options.parseArrays) {
- obj = [].concat(leaf);
- } else {
- obj = options.plainObjects ? /* @__PURE__ */ Object.create(null) : {};
- var cleanRoot = root.charAt(0) === "[" && root.charAt(root.length - 1) === "]" ? root.slice(1, -1) : root;
- var index = parseInt(cleanRoot, 10);
- if (!options.parseArrays && cleanRoot === "") {
- obj = { 0: leaf };
- } else if (!isNaN(index) && root !== cleanRoot && String(index) === cleanRoot && index >= 0 && (options.parseArrays && index <= options.arrayLimit)) {
- obj = [];
- obj[index] = leaf;
- } else if (cleanRoot !== "__proto__") {
- obj[cleanRoot] = leaf;
- }
- }
- leaf = obj;
- }
- return leaf;
- };
- var parseKeys = function parseQueryStringKeys(givenKey, val, options, valuesParsed) {
- if (!givenKey) {
- return;
- }
- var key = options.allowDots ? givenKey.replace(/\.([^.[]+)/g, "[$1]") : givenKey;
- var brackets = /(\[[^[\]]*])/;
- var child = /(\[[^[\]]*])/g;
- var segment = options.depth > 0 && brackets.exec(key);
- var parent = segment ? key.slice(0, segment.index) : key;
- var keys = [];
- if (parent) {
- if (!options.plainObjects && has.call(Object.prototype, parent)) {
- if (!options.allowPrototypes) {
- return;
- }
- }
- keys.push(parent);
- }
- var i = 0;
- while (options.depth > 0 && (segment = child.exec(key)) !== null && i < options.depth) {
- i += 1;
- if (!options.plainObjects && has.call(Object.prototype, segment[1].slice(1, -1))) {
- if (!options.allowPrototypes) {
- return;
- }
- }
- keys.push(segment[1]);
- }
- if (segment) {
- keys.push("[" + key.slice(segment.index) + "]");
- }
- return parseObject(keys, val, options, valuesParsed);
- };
- var normalizeParseOptions = function normalizeParseOptions2(opts) {
- if (!opts) {
- return defaults;
- }
- if (opts.decoder !== null && opts.decoder !== void 0 && typeof opts.decoder !== "function") {
- throw new TypeError("Decoder has to be a function.");
- }
- if (typeof opts.charset !== "undefined" && opts.charset !== "utf-8" && opts.charset !== "iso-8859-1") {
- throw new TypeError("The charset option must be either utf-8, iso-8859-1, or undefined");
- }
- var charset = typeof opts.charset === "undefined" ? defaults.charset : opts.charset;
- return {
- allowDots: typeof opts.allowDots === "undefined" ? defaults.allowDots : !!opts.allowDots,
- allowPrototypes: typeof opts.allowPrototypes === "boolean" ? opts.allowPrototypes : defaults.allowPrototypes,
- allowSparse: typeof opts.allowSparse === "boolean" ? opts.allowSparse : defaults.allowSparse,
- arrayLimit: typeof opts.arrayLimit === "number" ? opts.arrayLimit : defaults.arrayLimit,
- charset,
- charsetSentinel: typeof opts.charsetSentinel === "boolean" ? opts.charsetSentinel : defaults.charsetSentinel,
- comma: typeof opts.comma === "boolean" ? opts.comma : defaults.comma,
- decoder: typeof opts.decoder === "function" ? opts.decoder : defaults.decoder,
- delimiter: typeof opts.delimiter === "string" || utils.isRegExp(opts.delimiter) ? opts.delimiter : defaults.delimiter,
- // eslint-disable-next-line no-implicit-coercion, no-extra-parens
- depth: typeof opts.depth === "number" || opts.depth === false ? +opts.depth : defaults.depth,
- ignoreQueryPrefix: opts.ignoreQueryPrefix === true,
- interpretNumericEntities: typeof opts.interpretNumericEntities === "boolean" ? opts.interpretNumericEntities : defaults.interpretNumericEntities,
- parameterLimit: typeof opts.parameterLimit === "number" ? opts.parameterLimit : defaults.parameterLimit,
- parseArrays: opts.parseArrays !== false,
- plainObjects: typeof opts.plainObjects === "boolean" ? opts.plainObjects : defaults.plainObjects,
- strictNullHandling: typeof opts.strictNullHandling === "boolean" ? opts.strictNullHandling : defaults.strictNullHandling
- };
- };
- module.exports = function(str, opts) {
- var options = normalizeParseOptions(opts);
- if (str === "" || str === null || typeof str === "undefined") {
- return options.plainObjects ? /* @__PURE__ */ Object.create(null) : {};
- }
- var tempObj = typeof str === "string" ? parseValues(str, options) : str;
- var obj = options.plainObjects ? /* @__PURE__ */ Object.create(null) : {};
- var keys = Object.keys(tempObj);
- for (var i = 0; i < keys.length; ++i) {
- var key = keys[i];
- var newObj = parseKeys(key, tempObj[key], options, typeof str === "string");
- obj = utils.merge(obj, newObj, options);
- }
- if (options.allowSparse === true) {
- return obj;
- }
- return utils.compact(obj);
- };
- }
- });
- // node_modules/qs/lib/index.js
- var require_lib = __commonJS({
- "node_modules/qs/lib/index.js"(exports, module) {
- var stringify = require_stringify();
- var parse = require_parse();
- var formats = require_formats();
- module.exports = {
- formats,
- parse,
- stringify
- };
- }
- });
- export default require_lib();
- //# sourceMappingURL=qs.js.map
|