市场夺宝奇兵
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

2409 lines
85 KiB

  1. import {
  2. __commonJS
  3. } from "./chunk-HKJ2B2AA.js";
  4. // node_modules/es-errors/type.js
  5. var require_type = __commonJS({
  6. "node_modules/es-errors/type.js"(exports, module) {
  7. "use strict";
  8. module.exports = TypeError;
  9. }
  10. });
  11. // (disabled):node_modules/object-inspect/util.inspect
  12. var require_util = __commonJS({
  13. "(disabled):node_modules/object-inspect/util.inspect"() {
  14. }
  15. });
  16. // node_modules/object-inspect/index.js
  17. var require_object_inspect = __commonJS({
  18. "node_modules/object-inspect/index.js"(exports, module) {
  19. var hasMap = typeof Map === "function" && Map.prototype;
  20. var mapSizeDescriptor = Object.getOwnPropertyDescriptor && hasMap ? Object.getOwnPropertyDescriptor(Map.prototype, "size") : null;
  21. var mapSize = hasMap && mapSizeDescriptor && typeof mapSizeDescriptor.get === "function" ? mapSizeDescriptor.get : null;
  22. var mapForEach = hasMap && Map.prototype.forEach;
  23. var hasSet = typeof Set === "function" && Set.prototype;
  24. var setSizeDescriptor = Object.getOwnPropertyDescriptor && hasSet ? Object.getOwnPropertyDescriptor(Set.prototype, "size") : null;
  25. var setSize = hasSet && setSizeDescriptor && typeof setSizeDescriptor.get === "function" ? setSizeDescriptor.get : null;
  26. var setForEach = hasSet && Set.prototype.forEach;
  27. var hasWeakMap = typeof WeakMap === "function" && WeakMap.prototype;
  28. var weakMapHas = hasWeakMap ? WeakMap.prototype.has : null;
  29. var hasWeakSet = typeof WeakSet === "function" && WeakSet.prototype;
  30. var weakSetHas = hasWeakSet ? WeakSet.prototype.has : null;
  31. var hasWeakRef = typeof WeakRef === "function" && WeakRef.prototype;
  32. var weakRefDeref = hasWeakRef ? WeakRef.prototype.deref : null;
  33. var booleanValueOf = Boolean.prototype.valueOf;
  34. var objectToString = Object.prototype.toString;
  35. var functionToString = Function.prototype.toString;
  36. var $match = String.prototype.match;
  37. var $slice = String.prototype.slice;
  38. var $replace = String.prototype.replace;
  39. var $toUpperCase = String.prototype.toUpperCase;
  40. var $toLowerCase = String.prototype.toLowerCase;
  41. var $test = RegExp.prototype.test;
  42. var $concat = Array.prototype.concat;
  43. var $join = Array.prototype.join;
  44. var $arrSlice = Array.prototype.slice;
  45. var $floor = Math.floor;
  46. var bigIntValueOf = typeof BigInt === "function" ? BigInt.prototype.valueOf : null;
  47. var gOPS = Object.getOwnPropertySymbols;
  48. var symToString = typeof Symbol === "function" && typeof Symbol.iterator === "symbol" ? Symbol.prototype.toString : null;
  49. var hasShammedSymbols = typeof Symbol === "function" && typeof Symbol.iterator === "object";
  50. var toStringTag = typeof Symbol === "function" && Symbol.toStringTag && (typeof Symbol.toStringTag === hasShammedSymbols ? "object" : "symbol") ? Symbol.toStringTag : null;
  51. var isEnumerable = Object.prototype.propertyIsEnumerable;
  52. var gPO = (typeof Reflect === "function" ? Reflect.getPrototypeOf : Object.getPrototypeOf) || ([].__proto__ === Array.prototype ? function(O) {
  53. return O.__proto__;
  54. } : null);
  55. function addNumericSeparator(num, str) {
  56. if (num === Infinity || num === -Infinity || num !== num || num && num > -1e3 && num < 1e3 || $test.call(/e/, str)) {
  57. return str;
  58. }
  59. var sepRegex = /[0-9](?=(?:[0-9]{3})+(?![0-9]))/g;
  60. if (typeof num === "number") {
  61. var int = num < 0 ? -$floor(-num) : $floor(num);
  62. if (int !== num) {
  63. var intStr = String(int);
  64. var dec = $slice.call(str, intStr.length + 1);
  65. return $replace.call(intStr, sepRegex, "$&_") + "." + $replace.call($replace.call(dec, /([0-9]{3})/g, "$&_"), /_$/, "");
  66. }
  67. }
  68. return $replace.call(str, sepRegex, "$&_");
  69. }
  70. var utilInspect = require_util();
  71. var inspectCustom = utilInspect.custom;
  72. var inspectSymbol = isSymbol(inspectCustom) ? inspectCustom : null;
  73. var quotes = {
  74. __proto__: null,
  75. "double": '"',
  76. single: "'"
  77. };
  78. var quoteREs = {
  79. __proto__: null,
  80. "double": /(["\\])/g,
  81. single: /(['\\])/g
  82. };
  83. module.exports = function inspect_(obj, options, depth, seen) {
  84. var opts = options || {};
  85. if (has(opts, "quoteStyle") && !has(quotes, opts.quoteStyle)) {
  86. throw new TypeError('option "quoteStyle" must be "single" or "double"');
  87. }
  88. if (has(opts, "maxStringLength") && (typeof opts.maxStringLength === "number" ? opts.maxStringLength < 0 && opts.maxStringLength !== Infinity : opts.maxStringLength !== null)) {
  89. throw new TypeError('option "maxStringLength", if provided, must be a positive integer, Infinity, or `null`');
  90. }
  91. var customInspect = has(opts, "customInspect") ? opts.customInspect : true;
  92. if (typeof customInspect !== "boolean" && customInspect !== "symbol") {
  93. throw new TypeError("option \"customInspect\", if provided, must be `true`, `false`, or `'symbol'`");
  94. }
  95. if (has(opts, "indent") && opts.indent !== null && opts.indent !== " " && !(parseInt(opts.indent, 10) === opts.indent && opts.indent > 0)) {
  96. throw new TypeError('option "indent" must be "\\t", an integer > 0, or `null`');
  97. }
  98. if (has(opts, "numericSeparator") && typeof opts.numericSeparator !== "boolean") {
  99. throw new TypeError('option "numericSeparator", if provided, must be `true` or `false`');
  100. }
  101. var numericSeparator = opts.numericSeparator;
  102. if (typeof obj === "undefined") {
  103. return "undefined";
  104. }
  105. if (obj === null) {
  106. return "null";
  107. }
  108. if (typeof obj === "boolean") {
  109. return obj ? "true" : "false";
  110. }
  111. if (typeof obj === "string") {
  112. return inspectString(obj, opts);
  113. }
  114. if (typeof obj === "number") {
  115. if (obj === 0) {
  116. return Infinity / obj > 0 ? "0" : "-0";
  117. }
  118. var str = String(obj);
  119. return numericSeparator ? addNumericSeparator(obj, str) : str;
  120. }
  121. if (typeof obj === "bigint") {
  122. var bigIntStr = String(obj) + "n";
  123. return numericSeparator ? addNumericSeparator(obj, bigIntStr) : bigIntStr;
  124. }
  125. var maxDepth = typeof opts.depth === "undefined" ? 5 : opts.depth;
  126. if (typeof depth === "undefined") {
  127. depth = 0;
  128. }
  129. if (depth >= maxDepth && maxDepth > 0 && typeof obj === "object") {
  130. return isArray(obj) ? "[Array]" : "[Object]";
  131. }
  132. var indent = getIndent(opts, depth);
  133. if (typeof seen === "undefined") {
  134. seen = [];
  135. } else if (indexOf(seen, obj) >= 0) {
  136. return "[Circular]";
  137. }
  138. function inspect(value, from, noIndent) {
  139. if (from) {
  140. seen = $arrSlice.call(seen);
  141. seen.push(from);
  142. }
  143. if (noIndent) {
  144. var newOpts = {
  145. depth: opts.depth
  146. };
  147. if (has(opts, "quoteStyle")) {
  148. newOpts.quoteStyle = opts.quoteStyle;
  149. }
  150. return inspect_(value, newOpts, depth + 1, seen);
  151. }
  152. return inspect_(value, opts, depth + 1, seen);
  153. }
  154. if (typeof obj === "function" && !isRegExp(obj)) {
  155. var name = nameOf(obj);
  156. var keys = arrObjKeys(obj, inspect);
  157. return "[Function" + (name ? ": " + name : " (anonymous)") + "]" + (keys.length > 0 ? " { " + $join.call(keys, ", ") + " }" : "");
  158. }
  159. if (isSymbol(obj)) {
  160. var symString = hasShammedSymbols ? $replace.call(String(obj), /^(Symbol\(.*\))_[^)]*$/, "$1") : symToString.call(obj);
  161. return typeof obj === "object" && !hasShammedSymbols ? markBoxed(symString) : symString;
  162. }
  163. if (isElement(obj)) {
  164. var s = "<" + $toLowerCase.call(String(obj.nodeName));
  165. var attrs = obj.attributes || [];
  166. for (var i = 0; i < attrs.length; i++) {
  167. s += " " + attrs[i].name + "=" + wrapQuotes(quote(attrs[i].value), "double", opts);
  168. }
  169. s += ">";
  170. if (obj.childNodes && obj.childNodes.length) {
  171. s += "...";
  172. }
  173. s += "</" + $toLowerCase.call(String(obj.nodeName)) + ">";
  174. return s;
  175. }
  176. if (isArray(obj)) {
  177. if (obj.length === 0) {
  178. return "[]";
  179. }
  180. var xs = arrObjKeys(obj, inspect);
  181. if (indent && !singleLineValues(xs)) {
  182. return "[" + indentedJoin(xs, indent) + "]";
  183. }
  184. return "[ " + $join.call(xs, ", ") + " ]";
  185. }
  186. if (isError(obj)) {
  187. var parts = arrObjKeys(obj, inspect);
  188. if (!("cause" in Error.prototype) && "cause" in obj && !isEnumerable.call(obj, "cause")) {
  189. return "{ [" + String(obj) + "] " + $join.call($concat.call("[cause]: " + inspect(obj.cause), parts), ", ") + " }";
  190. }
  191. if (parts.length === 0) {
  192. return "[" + String(obj) + "]";
  193. }
  194. return "{ [" + String(obj) + "] " + $join.call(parts, ", ") + " }";
  195. }
  196. if (typeof obj === "object" && customInspect) {
  197. if (inspectSymbol && typeof obj[inspectSymbol] === "function" && utilInspect) {
  198. return utilInspect(obj, { depth: maxDepth - depth });
  199. } else if (customInspect !== "symbol" && typeof obj.inspect === "function") {
  200. return obj.inspect();
  201. }
  202. }
  203. if (isMap(obj)) {
  204. var mapParts = [];
  205. if (mapForEach) {
  206. mapForEach.call(obj, function(value, key) {
  207. mapParts.push(inspect(key, obj, true) + " => " + inspect(value, obj));
  208. });
  209. }
  210. return collectionOf("Map", mapSize.call(obj), mapParts, indent);
  211. }
  212. if (isSet(obj)) {
  213. var setParts = [];
  214. if (setForEach) {
  215. setForEach.call(obj, function(value) {
  216. setParts.push(inspect(value, obj));
  217. });
  218. }
  219. return collectionOf("Set", setSize.call(obj), setParts, indent);
  220. }
  221. if (isWeakMap(obj)) {
  222. return weakCollectionOf("WeakMap");
  223. }
  224. if (isWeakSet(obj)) {
  225. return weakCollectionOf("WeakSet");
  226. }
  227. if (isWeakRef(obj)) {
  228. return weakCollectionOf("WeakRef");
  229. }
  230. if (isNumber(obj)) {
  231. return markBoxed(inspect(Number(obj)));
  232. }
  233. if (isBigInt(obj)) {
  234. return markBoxed(inspect(bigIntValueOf.call(obj)));
  235. }
  236. if (isBoolean(obj)) {
  237. return markBoxed(booleanValueOf.call(obj));
  238. }
  239. if (isString(obj)) {
  240. return markBoxed(inspect(String(obj)));
  241. }
  242. if (typeof window !== "undefined" && obj === window) {
  243. return "{ [object Window] }";
  244. }
  245. if (typeof globalThis !== "undefined" && obj === globalThis || typeof global !== "undefined" && obj === global) {
  246. return "{ [object globalThis] }";
  247. }
  248. if (!isDate(obj) && !isRegExp(obj)) {
  249. var ys = arrObjKeys(obj, inspect);
  250. var isPlainObject = gPO ? gPO(obj) === Object.prototype : obj instanceof Object || obj.constructor === Object;
  251. var protoTag = obj instanceof Object ? "" : "null prototype";
  252. var stringTag = !isPlainObject && toStringTag && Object(obj) === obj && toStringTag in obj ? $slice.call(toStr(obj), 8, -1) : protoTag ? "Object" : "";
  253. var constructorTag = isPlainObject || typeof obj.constructor !== "function" ? "" : obj.constructor.name ? obj.constructor.name + " " : "";
  254. var tag = constructorTag + (stringTag || protoTag ? "[" + $join.call($concat.call([], stringTag || [], protoTag || []), ": ") + "] " : "");
  255. if (ys.length === 0) {
  256. return tag + "{}";
  257. }
  258. if (indent) {
  259. return tag + "{" + indentedJoin(ys, indent) + "}";
  260. }
  261. return tag + "{ " + $join.call(ys, ", ") + " }";
  262. }
  263. return String(obj);
  264. };
  265. function wrapQuotes(s, defaultStyle, opts) {
  266. var style = opts.quoteStyle || defaultStyle;
  267. var quoteChar = quotes[style];
  268. return quoteChar + s + quoteChar;
  269. }
  270. function quote(s) {
  271. return $replace.call(String(s), /"/g, "&quot;");
  272. }
  273. function canTrustToString(obj) {
  274. return !toStringTag || !(typeof obj === "object" && (toStringTag in obj || typeof obj[toStringTag] !== "undefined"));
  275. }
  276. function isArray(obj) {
  277. return toStr(obj) === "[object Array]" && canTrustToString(obj);
  278. }
  279. function isDate(obj) {
  280. return toStr(obj) === "[object Date]" && canTrustToString(obj);
  281. }
  282. function isRegExp(obj) {
  283. return toStr(obj) === "[object RegExp]" && canTrustToString(obj);
  284. }
  285. function isError(obj) {
  286. return toStr(obj) === "[object Error]" && canTrustToString(obj);
  287. }
  288. function isString(obj) {
  289. return toStr(obj) === "[object String]" && canTrustToString(obj);
  290. }
  291. function isNumber(obj) {
  292. return toStr(obj) === "[object Number]" && canTrustToString(obj);
  293. }
  294. function isBoolean(obj) {
  295. return toStr(obj) === "[object Boolean]" && canTrustToString(obj);
  296. }
  297. function isSymbol(obj) {
  298. if (hasShammedSymbols) {
  299. return obj && typeof obj === "object" && obj instanceof Symbol;
  300. }
  301. if (typeof obj === "symbol") {
  302. return true;
  303. }
  304. if (!obj || typeof obj !== "object" || !symToString) {
  305. return false;
  306. }
  307. try {
  308. symToString.call(obj);
  309. return true;
  310. } catch (e) {
  311. }
  312. return false;
  313. }
  314. function isBigInt(obj) {
  315. if (!obj || typeof obj !== "object" || !bigIntValueOf) {
  316. return false;
  317. }
  318. try {
  319. bigIntValueOf.call(obj);
  320. return true;
  321. } catch (e) {
  322. }
  323. return false;
  324. }
  325. var hasOwn = Object.prototype.hasOwnProperty || function(key) {
  326. return key in this;
  327. };
  328. function has(obj, key) {
  329. return hasOwn.call(obj, key);
  330. }
  331. function toStr(obj) {
  332. return objectToString.call(obj);
  333. }
  334. function nameOf(f) {
  335. if (f.name) {
  336. return f.name;
  337. }
  338. var m = $match.call(functionToString.call(f), /^function\s*([\w$]+)/);
  339. if (m) {
  340. return m[1];
  341. }
  342. return null;
  343. }
  344. function indexOf(xs, x) {
  345. if (xs.indexOf) {
  346. return xs.indexOf(x);
  347. }
  348. for (var i = 0, l = xs.length; i < l; i++) {
  349. if (xs[i] === x) {
  350. return i;
  351. }
  352. }
  353. return -1;
  354. }
  355. function isMap(x) {
  356. if (!mapSize || !x || typeof x !== "object") {
  357. return false;
  358. }
  359. try {
  360. mapSize.call(x);
  361. try {
  362. setSize.call(x);
  363. } catch (s) {
  364. return true;
  365. }
  366. return x instanceof Map;
  367. } catch (e) {
  368. }
  369. return false;
  370. }
  371. function isWeakMap(x) {
  372. if (!weakMapHas || !x || typeof x !== "object") {
  373. return false;
  374. }
  375. try {
  376. weakMapHas.call(x, weakMapHas);
  377. try {
  378. weakSetHas.call(x, weakSetHas);
  379. } catch (s) {
  380. return true;
  381. }
  382. return x instanceof WeakMap;
  383. } catch (e) {
  384. }
  385. return false;
  386. }
  387. function isWeakRef(x) {
  388. if (!weakRefDeref || !x || typeof x !== "object") {
  389. return false;
  390. }
  391. try {
  392. weakRefDeref.call(x);
  393. return true;
  394. } catch (e) {
  395. }
  396. return false;
  397. }
  398. function isSet(x) {
  399. if (!setSize || !x || typeof x !== "object") {
  400. return false;
  401. }
  402. try {
  403. setSize.call(x);
  404. try {
  405. mapSize.call(x);
  406. } catch (m) {
  407. return true;
  408. }
  409. return x instanceof Set;
  410. } catch (e) {
  411. }
  412. return false;
  413. }
  414. function isWeakSet(x) {
  415. if (!weakSetHas || !x || typeof x !== "object") {
  416. return false;
  417. }
  418. try {
  419. weakSetHas.call(x, weakSetHas);
  420. try {
  421. weakMapHas.call(x, weakMapHas);
  422. } catch (s) {
  423. return true;
  424. }
  425. return x instanceof WeakSet;
  426. } catch (e) {
  427. }
  428. return false;
  429. }
  430. function isElement(x) {
  431. if (!x || typeof x !== "object") {
  432. return false;
  433. }
  434. if (typeof HTMLElement !== "undefined" && x instanceof HTMLElement) {
  435. return true;
  436. }
  437. return typeof x.nodeName === "string" && typeof x.getAttribute === "function";
  438. }
  439. function inspectString(str, opts) {
  440. if (str.length > opts.maxStringLength) {
  441. var remaining = str.length - opts.maxStringLength;
  442. var trailer = "... " + remaining + " more character" + (remaining > 1 ? "s" : "");
  443. return inspectString($slice.call(str, 0, opts.maxStringLength), opts) + trailer;
  444. }
  445. var quoteRE = quoteREs[opts.quoteStyle || "single"];
  446. quoteRE.lastIndex = 0;
  447. var s = $replace.call($replace.call(str, quoteRE, "\\$1"), /[\x00-\x1f]/g, lowbyte);
  448. return wrapQuotes(s, "single", opts);
  449. }
  450. function lowbyte(c) {
  451. var n = c.charCodeAt(0);
  452. var x = {
  453. 8: "b",
  454. 9: "t",
  455. 10: "n",
  456. 12: "f",
  457. 13: "r"
  458. }[n];
  459. if (x) {
  460. return "\\" + x;
  461. }
  462. return "\\x" + (n < 16 ? "0" : "") + $toUpperCase.call(n.toString(16));
  463. }
  464. function markBoxed(str) {
  465. return "Object(" + str + ")";
  466. }
  467. function weakCollectionOf(type) {
  468. return type + " { ? }";
  469. }
  470. function collectionOf(type, size, entries, indent) {
  471. var joinedEntries = indent ? indentedJoin(entries, indent) : $join.call(entries, ", ");
  472. return type + " (" + size + ") {" + joinedEntries + "}";
  473. }
  474. function singleLineValues(xs) {
  475. for (var i = 0; i < xs.length; i++) {
  476. if (indexOf(xs[i], "\n") >= 0) {
  477. return false;
  478. }
  479. }
  480. return true;
  481. }
  482. function getIndent(opts, depth) {
  483. var baseIndent;
  484. if (opts.indent === " ") {
  485. baseIndent = " ";
  486. } else if (typeof opts.indent === "number" && opts.indent > 0) {
  487. baseIndent = $join.call(Array(opts.indent + 1), " ");
  488. } else {
  489. return null;
  490. }
  491. return {
  492. base: baseIndent,
  493. prev: $join.call(Array(depth + 1), baseIndent)
  494. };
  495. }
  496. function indentedJoin(xs, indent) {
  497. if (xs.length === 0) {
  498. return "";
  499. }
  500. var lineJoiner = "\n" + indent.prev + indent.base;
  501. return lineJoiner + $join.call(xs, "," + lineJoiner) + "\n" + indent.prev;
  502. }
  503. function arrObjKeys(obj, inspect) {
  504. var isArr = isArray(obj);
  505. var xs = [];
  506. if (isArr) {
  507. xs.length = obj.length;
  508. for (var i = 0; i < obj.length; i++) {
  509. xs[i] = has(obj, i) ? inspect(obj[i], obj) : "";
  510. }
  511. }
  512. var syms = typeof gOPS === "function" ? gOPS(obj) : [];
  513. var symMap;
  514. if (hasShammedSymbols) {
  515. symMap = {};
  516. for (var k = 0; k < syms.length; k++) {
  517. symMap["$" + syms[k]] = syms[k];
  518. }
  519. }
  520. for (var key in obj) {
  521. if (!has(obj, key)) {
  522. continue;
  523. }
  524. if (isArr && String(Number(key)) === key && key < obj.length) {
  525. continue;
  526. }
  527. if (hasShammedSymbols && symMap["$" + key] instanceof Symbol) {
  528. continue;
  529. } else if ($test.call(/[^\w$]/, key)) {
  530. xs.push(inspect(key, obj) + ": " + inspect(obj[key], obj));
  531. } else {
  532. xs.push(key + ": " + inspect(obj[key], obj));
  533. }
  534. }
  535. if (typeof gOPS === "function") {
  536. for (var j = 0; j < syms.length; j++) {
  537. if (isEnumerable.call(obj, syms[j])) {
  538. xs.push("[" + inspect(syms[j]) + "]: " + inspect(obj[syms[j]], obj));
  539. }
  540. }
  541. }
  542. return xs;
  543. }
  544. }
  545. });
  546. // node_modules/side-channel-list/index.js
  547. var require_side_channel_list = __commonJS({
  548. "node_modules/side-channel-list/index.js"(exports, module) {
  549. "use strict";
  550. var inspect = require_object_inspect();
  551. var $TypeError = require_type();
  552. var listGetNode = function(list, key, isDelete) {
  553. var prev = list;
  554. var curr;
  555. for (; (curr = prev.next) != null; prev = curr) {
  556. if (curr.key === key) {
  557. prev.next = curr.next;
  558. if (!isDelete) {
  559. curr.next = /** @type {NonNullable<typeof list.next>} */
  560. list.next;
  561. list.next = curr;
  562. }
  563. return curr;
  564. }
  565. }
  566. };
  567. var listGet = function(objects, key) {
  568. if (!objects) {
  569. return void 0;
  570. }
  571. var node = listGetNode(objects, key);
  572. return node && node.value;
  573. };
  574. var listSet = function(objects, key, value) {
  575. var node = listGetNode(objects, key);
  576. if (node) {
  577. node.value = value;
  578. } else {
  579. objects.next = /** @type {import('./list.d.ts').ListNode<typeof value, typeof key>} */
  580. {
  581. // eslint-disable-line no-param-reassign, no-extra-parens
  582. key,
  583. next: objects.next,
  584. value
  585. };
  586. }
  587. };
  588. var listHas = function(objects, key) {
  589. if (!objects) {
  590. return false;
  591. }
  592. return !!listGetNode(objects, key);
  593. };
  594. var listDelete = function(objects, key) {
  595. if (objects) {
  596. return listGetNode(objects, key, true);
  597. }
  598. };
  599. module.exports = function getSideChannelList() {
  600. var $o;
  601. var channel = {
  602. assert: function(key) {
  603. if (!channel.has(key)) {
  604. throw new $TypeError("Side channel does not contain " + inspect(key));
  605. }
  606. },
  607. "delete": function(key) {
  608. var root = $o && $o.next;
  609. var deletedNode = listDelete($o, key);
  610. if (deletedNode && root && root === deletedNode) {
  611. $o = void 0;
  612. }
  613. return !!deletedNode;
  614. },
  615. get: function(key) {
  616. return listGet($o, key);
  617. },
  618. has: function(key) {
  619. return listHas($o, key);
  620. },
  621. set: function(key, value) {
  622. if (!$o) {
  623. $o = {
  624. next: void 0
  625. };
  626. }
  627. listSet(
  628. /** @type {NonNullable<typeof $o>} */
  629. $o,
  630. key,
  631. value
  632. );
  633. }
  634. };
  635. return channel;
  636. };
  637. }
  638. });
  639. // node_modules/es-object-atoms/index.js
  640. var require_es_object_atoms = __commonJS({
  641. "node_modules/es-object-atoms/index.js"(exports, module) {
  642. "use strict";
  643. module.exports = Object;
  644. }
  645. });
  646. // node_modules/es-errors/index.js
  647. var require_es_errors = __commonJS({
  648. "node_modules/es-errors/index.js"(exports, module) {
  649. "use strict";
  650. module.exports = Error;
  651. }
  652. });
  653. // node_modules/es-errors/eval.js
  654. var require_eval = __commonJS({
  655. "node_modules/es-errors/eval.js"(exports, module) {
  656. "use strict";
  657. module.exports = EvalError;
  658. }
  659. });
  660. // node_modules/es-errors/range.js
  661. var require_range = __commonJS({
  662. "node_modules/es-errors/range.js"(exports, module) {
  663. "use strict";
  664. module.exports = RangeError;
  665. }
  666. });
  667. // node_modules/es-errors/ref.js
  668. var require_ref = __commonJS({
  669. "node_modules/es-errors/ref.js"(exports, module) {
  670. "use strict";
  671. module.exports = ReferenceError;
  672. }
  673. });
  674. // node_modules/es-errors/syntax.js
  675. var require_syntax = __commonJS({
  676. "node_modules/es-errors/syntax.js"(exports, module) {
  677. "use strict";
  678. module.exports = SyntaxError;
  679. }
  680. });
  681. // node_modules/es-errors/uri.js
  682. var require_uri = __commonJS({
  683. "node_modules/es-errors/uri.js"(exports, module) {
  684. "use strict";
  685. module.exports = URIError;
  686. }
  687. });
  688. // node_modules/math-intrinsics/abs.js
  689. var require_abs = __commonJS({
  690. "node_modules/math-intrinsics/abs.js"(exports, module) {
  691. "use strict";
  692. module.exports = Math.abs;
  693. }
  694. });
  695. // node_modules/math-intrinsics/floor.js
  696. var require_floor = __commonJS({
  697. "node_modules/math-intrinsics/floor.js"(exports, module) {
  698. "use strict";
  699. module.exports = Math.floor;
  700. }
  701. });
  702. // node_modules/math-intrinsics/max.js
  703. var require_max = __commonJS({
  704. "node_modules/math-intrinsics/max.js"(exports, module) {
  705. "use strict";
  706. module.exports = Math.max;
  707. }
  708. });
  709. // node_modules/math-intrinsics/min.js
  710. var require_min = __commonJS({
  711. "node_modules/math-intrinsics/min.js"(exports, module) {
  712. "use strict";
  713. module.exports = Math.min;
  714. }
  715. });
  716. // node_modules/math-intrinsics/pow.js
  717. var require_pow = __commonJS({
  718. "node_modules/math-intrinsics/pow.js"(exports, module) {
  719. "use strict";
  720. module.exports = Math.pow;
  721. }
  722. });
  723. // node_modules/math-intrinsics/round.js
  724. var require_round = __commonJS({
  725. "node_modules/math-intrinsics/round.js"(exports, module) {
  726. "use strict";
  727. module.exports = Math.round;
  728. }
  729. });
  730. // node_modules/math-intrinsics/isNaN.js
  731. var require_isNaN = __commonJS({
  732. "node_modules/math-intrinsics/isNaN.js"(exports, module) {
  733. "use strict";
  734. module.exports = Number.isNaN || function isNaN2(a) {
  735. return a !== a;
  736. };
  737. }
  738. });
  739. // node_modules/math-intrinsics/sign.js
  740. var require_sign = __commonJS({
  741. "node_modules/math-intrinsics/sign.js"(exports, module) {
  742. "use strict";
  743. var $isNaN = require_isNaN();
  744. module.exports = function sign(number) {
  745. if ($isNaN(number) || number === 0) {
  746. return number;
  747. }
  748. return number < 0 ? -1 : 1;
  749. };
  750. }
  751. });
  752. // node_modules/gopd/gOPD.js
  753. var require_gOPD = __commonJS({
  754. "node_modules/gopd/gOPD.js"(exports, module) {
  755. "use strict";
  756. module.exports = Object.getOwnPropertyDescriptor;
  757. }
  758. });
  759. // node_modules/gopd/index.js
  760. var require_gopd = __commonJS({
  761. "node_modules/gopd/index.js"(exports, module) {
  762. "use strict";
  763. var $gOPD = require_gOPD();
  764. if ($gOPD) {
  765. try {
  766. $gOPD([], "length");
  767. } catch (e) {
  768. $gOPD = null;
  769. }
  770. }
  771. module.exports = $gOPD;
  772. }
  773. });
  774. // node_modules/es-define-property/index.js
  775. var require_es_define_property = __commonJS({
  776. "node_modules/es-define-property/index.js"(exports, module) {
  777. "use strict";
  778. var $defineProperty = Object.defineProperty || false;
  779. if ($defineProperty) {
  780. try {
  781. $defineProperty({}, "a", { value: 1 });
  782. } catch (e) {
  783. $defineProperty = false;
  784. }
  785. }
  786. module.exports = $defineProperty;
  787. }
  788. });
  789. // node_modules/has-symbols/shams.js
  790. var require_shams = __commonJS({
  791. "node_modules/has-symbols/shams.js"(exports, module) {
  792. "use strict";
  793. module.exports = function hasSymbols() {
  794. if (typeof Symbol !== "function" || typeof Object.getOwnPropertySymbols !== "function") {
  795. return false;
  796. }
  797. if (typeof Symbol.iterator === "symbol") {
  798. return true;
  799. }
  800. var obj = {};
  801. var sym = Symbol("test");
  802. var symObj = Object(sym);
  803. if (typeof sym === "string") {
  804. return false;
  805. }
  806. if (Object.prototype.toString.call(sym) !== "[object Symbol]") {
  807. return false;
  808. }
  809. if (Object.prototype.toString.call(symObj) !== "[object Symbol]") {
  810. return false;
  811. }
  812. var symVal = 42;
  813. obj[sym] = symVal;
  814. for (var _ in obj) {
  815. return false;
  816. }
  817. if (typeof Object.keys === "function" && Object.keys(obj).length !== 0) {
  818. return false;
  819. }
  820. if (typeof Object.getOwnPropertyNames === "function" && Object.getOwnPropertyNames(obj).length !== 0) {
  821. return false;
  822. }
  823. var syms = Object.getOwnPropertySymbols(obj);
  824. if (syms.length !== 1 || syms[0] !== sym) {
  825. return false;
  826. }
  827. if (!Object.prototype.propertyIsEnumerable.call(obj, sym)) {
  828. return false;
  829. }
  830. if (typeof Object.getOwnPropertyDescriptor === "function") {
  831. var descriptor = (
  832. /** @type {PropertyDescriptor} */
  833. Object.getOwnPropertyDescriptor(obj, sym)
  834. );
  835. if (descriptor.value !== symVal || descriptor.enumerable !== true) {
  836. return false;
  837. }
  838. }
  839. return true;
  840. };
  841. }
  842. });
  843. // node_modules/has-symbols/index.js
  844. var require_has_symbols = __commonJS({
  845. "node_modules/has-symbols/index.js"(exports, module) {
  846. "use strict";
  847. var origSymbol = typeof Symbol !== "undefined" && Symbol;
  848. var hasSymbolSham = require_shams();
  849. module.exports = function hasNativeSymbols() {
  850. if (typeof origSymbol !== "function") {
  851. return false;
  852. }
  853. if (typeof Symbol !== "function") {
  854. return false;
  855. }
  856. if (typeof origSymbol("foo") !== "symbol") {
  857. return false;
  858. }
  859. if (typeof Symbol("bar") !== "symbol") {
  860. return false;
  861. }
  862. return hasSymbolSham();
  863. };
  864. }
  865. });
  866. // node_modules/get-proto/Reflect.getPrototypeOf.js
  867. var require_Reflect_getPrototypeOf = __commonJS({
  868. "node_modules/get-proto/Reflect.getPrototypeOf.js"(exports, module) {
  869. "use strict";
  870. module.exports = typeof Reflect !== "undefined" && Reflect.getPrototypeOf || null;
  871. }
  872. });
  873. // node_modules/get-proto/Object.getPrototypeOf.js
  874. var require_Object_getPrototypeOf = __commonJS({
  875. "node_modules/get-proto/Object.getPrototypeOf.js"(exports, module) {
  876. "use strict";
  877. var $Object = require_es_object_atoms();
  878. module.exports = $Object.getPrototypeOf || null;
  879. }
  880. });
  881. // node_modules/function-bind/implementation.js
  882. var require_implementation = __commonJS({
  883. "node_modules/function-bind/implementation.js"(exports, module) {
  884. "use strict";
  885. var ERROR_MESSAGE = "Function.prototype.bind called on incompatible ";
  886. var toStr = Object.prototype.toString;
  887. var max = Math.max;
  888. var funcType = "[object Function]";
  889. var concatty = function concatty2(a, b) {
  890. var arr = [];
  891. for (var i = 0; i < a.length; i += 1) {
  892. arr[i] = a[i];
  893. }
  894. for (var j = 0; j < b.length; j += 1) {
  895. arr[j + a.length] = b[j];
  896. }
  897. return arr;
  898. };
  899. var slicy = function slicy2(arrLike, offset) {
  900. var arr = [];
  901. for (var i = offset || 0, j = 0; i < arrLike.length; i += 1, j += 1) {
  902. arr[j] = arrLike[i];
  903. }
  904. return arr;
  905. };
  906. var joiny = function(arr, joiner) {
  907. var str = "";
  908. for (var i = 0; i < arr.length; i += 1) {
  909. str += arr[i];
  910. if (i + 1 < arr.length) {
  911. str += joiner;
  912. }
  913. }
  914. return str;
  915. };
  916. module.exports = function bind(that) {
  917. var target = this;
  918. if (typeof target !== "function" || toStr.apply(target) !== funcType) {
  919. throw new TypeError(ERROR_MESSAGE + target);
  920. }
  921. var args = slicy(arguments, 1);
  922. var bound;
  923. var binder = function() {
  924. if (this instanceof bound) {
  925. var result = target.apply(
  926. this,
  927. concatty(args, arguments)
  928. );
  929. if (Object(result) === result) {
  930. return result;
  931. }
  932. return this;
  933. }
  934. return target.apply(
  935. that,
  936. concatty(args, arguments)
  937. );
  938. };
  939. var boundLength = max(0, target.length - args.length);
  940. var boundArgs = [];
  941. for (var i = 0; i < boundLength; i++) {
  942. boundArgs[i] = "$" + i;
  943. }
  944. bound = Function("binder", "return function (" + joiny(boundArgs, ",") + "){ return binder.apply(this,arguments); }")(binder);
  945. if (target.prototype) {
  946. var Empty = function Empty2() {
  947. };
  948. Empty.prototype = target.prototype;
  949. bound.prototype = new Empty();
  950. Empty.prototype = null;
  951. }
  952. return bound;
  953. };
  954. }
  955. });
  956. // node_modules/function-bind/index.js
  957. var require_function_bind = __commonJS({
  958. "node_modules/function-bind/index.js"(exports, module) {
  959. "use strict";
  960. var implementation = require_implementation();
  961. module.exports = Function.prototype.bind || implementation;
  962. }
  963. });
  964. // node_modules/call-bind-apply-helpers/functionCall.js
  965. var require_functionCall = __commonJS({
  966. "node_modules/call-bind-apply-helpers/functionCall.js"(exports, module) {
  967. "use strict";
  968. module.exports = Function.prototype.call;
  969. }
  970. });
  971. // node_modules/call-bind-apply-helpers/functionApply.js
  972. var require_functionApply = __commonJS({
  973. "node_modules/call-bind-apply-helpers/functionApply.js"(exports, module) {
  974. "use strict";
  975. module.exports = Function.prototype.apply;
  976. }
  977. });
  978. // node_modules/call-bind-apply-helpers/reflectApply.js
  979. var require_reflectApply = __commonJS({
  980. "node_modules/call-bind-apply-helpers/reflectApply.js"(exports, module) {
  981. "use strict";
  982. module.exports = typeof Reflect !== "undefined" && Reflect && Reflect.apply;
  983. }
  984. });
  985. // node_modules/call-bind-apply-helpers/actualApply.js
  986. var require_actualApply = __commonJS({
  987. "node_modules/call-bind-apply-helpers/actualApply.js"(exports, module) {
  988. "use strict";
  989. var bind = require_function_bind();
  990. var $apply = require_functionApply();
  991. var $call = require_functionCall();
  992. var $reflectApply = require_reflectApply();
  993. module.exports = $reflectApply || bind.call($call, $apply);
  994. }
  995. });
  996. // node_modules/call-bind-apply-helpers/index.js
  997. var require_call_bind_apply_helpers = __commonJS({
  998. "node_modules/call-bind-apply-helpers/index.js"(exports, module) {
  999. "use strict";
  1000. var bind = require_function_bind();
  1001. var $TypeError = require_type();
  1002. var $call = require_functionCall();
  1003. var $actualApply = require_actualApply();
  1004. module.exports = function callBindBasic(args) {
  1005. if (args.length < 1 || typeof args[0] !== "function") {
  1006. throw new $TypeError("a function is required");
  1007. }
  1008. return $actualApply(bind, $call, args);
  1009. };
  1010. }
  1011. });
  1012. // node_modules/dunder-proto/get.js
  1013. var require_get = __commonJS({
  1014. "node_modules/dunder-proto/get.js"(exports, module) {
  1015. "use strict";
  1016. var callBind = require_call_bind_apply_helpers();
  1017. var gOPD = require_gopd();
  1018. var hasProtoAccessor;
  1019. try {
  1020. hasProtoAccessor = /** @type {{ __proto__?: typeof Array.prototype }} */
  1021. [].__proto__ === Array.prototype;
  1022. } catch (e) {
  1023. if (!e || typeof e !== "object" || !("code" in e) || e.code !== "ERR_PROTO_ACCESS") {
  1024. throw e;
  1025. }
  1026. }
  1027. var desc = !!hasProtoAccessor && gOPD && gOPD(
  1028. Object.prototype,
  1029. /** @type {keyof typeof Object.prototype} */
  1030. "__proto__"
  1031. );
  1032. var $Object = Object;
  1033. var $getPrototypeOf = $Object.getPrototypeOf;
  1034. module.exports = desc && typeof desc.get === "function" ? callBind([desc.get]) : typeof $getPrototypeOf === "function" ? (
  1035. /** @type {import('./get')} */
  1036. function getDunder(value) {
  1037. return $getPrototypeOf(value == null ? value : $Object(value));
  1038. }
  1039. ) : false;
  1040. }
  1041. });
  1042. // node_modules/get-proto/index.js
  1043. var require_get_proto = __commonJS({
  1044. "node_modules/get-proto/index.js"(exports, module) {
  1045. "use strict";
  1046. var reflectGetProto = require_Reflect_getPrototypeOf();
  1047. var originalGetProto = require_Object_getPrototypeOf();
  1048. var getDunderProto = require_get();
  1049. module.exports = reflectGetProto ? function getProto(O) {
  1050. return reflectGetProto(O);
  1051. } : originalGetProto ? function getProto(O) {
  1052. if (!O || typeof O !== "object" && typeof O !== "function") {
  1053. throw new TypeError("getProto: not an object");
  1054. }
  1055. return originalGetProto(O);
  1056. } : getDunderProto ? function getProto(O) {
  1057. return getDunderProto(O);
  1058. } : null;
  1059. }
  1060. });
  1061. // node_modules/hasown/index.js
  1062. var require_hasown = __commonJS({
  1063. "node_modules/hasown/index.js"(exports, module) {
  1064. "use strict";
  1065. var call = Function.prototype.call;
  1066. var $hasOwn = Object.prototype.hasOwnProperty;
  1067. var bind = require_function_bind();
  1068. module.exports = bind.call(call, $hasOwn);
  1069. }
  1070. });
  1071. // node_modules/get-intrinsic/index.js
  1072. var require_get_intrinsic = __commonJS({
  1073. "node_modules/get-intrinsic/index.js"(exports, module) {
  1074. "use strict";
  1075. var undefined2;
  1076. var $Object = require_es_object_atoms();
  1077. var $Error = require_es_errors();
  1078. var $EvalError = require_eval();
  1079. var $RangeError = require_range();
  1080. var $ReferenceError = require_ref();
  1081. var $SyntaxError = require_syntax();
  1082. var $TypeError = require_type();
  1083. var $URIError = require_uri();
  1084. var abs = require_abs();
  1085. var floor = require_floor();
  1086. var max = require_max();
  1087. var min = require_min();
  1088. var pow = require_pow();
  1089. var round = require_round();
  1090. var sign = require_sign();
  1091. var $Function = Function;
  1092. var getEvalledConstructor = function(expressionSyntax) {
  1093. try {
  1094. return $Function('"use strict"; return (' + expressionSyntax + ").constructor;")();
  1095. } catch (e) {
  1096. }
  1097. };
  1098. var $gOPD = require_gopd();
  1099. var $defineProperty = require_es_define_property();
  1100. var throwTypeError = function() {
  1101. throw new $TypeError();
  1102. };
  1103. var ThrowTypeError = $gOPD ? (function() {
  1104. try {
  1105. arguments.callee;
  1106. return throwTypeError;
  1107. } catch (calleeThrows) {
  1108. try {
  1109. return $gOPD(arguments, "callee").get;
  1110. } catch (gOPDthrows) {
  1111. return throwTypeError;
  1112. }
  1113. }
  1114. })() : throwTypeError;
  1115. var hasSymbols = require_has_symbols()();
  1116. var getProto = require_get_proto();
  1117. var $ObjectGPO = require_Object_getPrototypeOf();
  1118. var $ReflectGPO = require_Reflect_getPrototypeOf();
  1119. var $apply = require_functionApply();
  1120. var $call = require_functionCall();
  1121. var needsEval = {};
  1122. var TypedArray = typeof Uint8Array === "undefined" || !getProto ? undefined2 : getProto(Uint8Array);
  1123. var INTRINSICS = {
  1124. __proto__: null,
  1125. "%AggregateError%": typeof AggregateError === "undefined" ? undefined2 : AggregateError,
  1126. "%Array%": Array,
  1127. "%ArrayBuffer%": typeof ArrayBuffer === "undefined" ? undefined2 : ArrayBuffer,
  1128. "%ArrayIteratorPrototype%": hasSymbols && getProto ? getProto([][Symbol.iterator]()) : undefined2,
  1129. "%AsyncFromSyncIteratorPrototype%": undefined2,
  1130. "%AsyncFunction%": needsEval,
  1131. "%AsyncGenerator%": needsEval,
  1132. "%AsyncGeneratorFunction%": needsEval,
  1133. "%AsyncIteratorPrototype%": needsEval,
  1134. "%Atomics%": typeof Atomics === "undefined" ? undefined2 : Atomics,
  1135. "%BigInt%": typeof BigInt === "undefined" ? undefined2 : BigInt,
  1136. "%BigInt64Array%": typeof BigInt64Array === "undefined" ? undefined2 : BigInt64Array,
  1137. "%BigUint64Array%": typeof BigUint64Array === "undefined" ? undefined2 : BigUint64Array,
  1138. "%Boolean%": Boolean,
  1139. "%DataView%": typeof DataView === "undefined" ? undefined2 : DataView,
  1140. "%Date%": Date,
  1141. "%decodeURI%": decodeURI,
  1142. "%decodeURIComponent%": decodeURIComponent,
  1143. "%encodeURI%": encodeURI,
  1144. "%encodeURIComponent%": encodeURIComponent,
  1145. "%Error%": $Error,
  1146. "%eval%": eval,
  1147. // eslint-disable-line no-eval
  1148. "%EvalError%": $EvalError,
  1149. "%Float16Array%": typeof Float16Array === "undefined" ? undefined2 : Float16Array,
  1150. "%Float32Array%": typeof Float32Array === "undefined" ? undefined2 : Float32Array,
  1151. "%Float64Array%": typeof Float64Array === "undefined" ? undefined2 : Float64Array,
  1152. "%FinalizationRegistry%": typeof FinalizationRegistry === "undefined" ? undefined2 : FinalizationRegistry,
  1153. "%Function%": $Function,
  1154. "%GeneratorFunction%": needsEval,
  1155. "%Int8Array%": typeof Int8Array === "undefined" ? undefined2 : Int8Array,
  1156. "%Int16Array%": typeof Int16Array === "undefined" ? undefined2 : Int16Array,
  1157. "%Int32Array%": typeof Int32Array === "undefined" ? undefined2 : Int32Array,
  1158. "%isFinite%": isFinite,
  1159. "%isNaN%": isNaN,
  1160. "%IteratorPrototype%": hasSymbols && getProto ? getProto(getProto([][Symbol.iterator]())) : undefined2,
  1161. "%JSON%": typeof JSON === "object" ? JSON : undefined2,
  1162. "%Map%": typeof Map === "undefined" ? undefined2 : Map,
  1163. "%MapIteratorPrototype%": typeof Map === "undefined" || !hasSymbols || !getProto ? undefined2 : getProto((/* @__PURE__ */ new Map())[Symbol.iterator]()),
  1164. "%Math%": Math,
  1165. "%Number%": Number,
  1166. "%Object%": $Object,
  1167. "%Object.getOwnPropertyDescriptor%": $gOPD,
  1168. "%parseFloat%": parseFloat,
  1169. "%parseInt%": parseInt,
  1170. "%Promise%": typeof Promise === "undefined" ? undefined2 : Promise,
  1171. "%Proxy%": typeof Proxy === "undefined" ? undefined2 : Proxy,
  1172. "%RangeError%": $RangeError,
  1173. "%ReferenceError%": $ReferenceError,
  1174. "%Reflect%": typeof Reflect === "undefined" ? undefined2 : Reflect,
  1175. "%RegExp%": RegExp,
  1176. "%Set%": typeof Set === "undefined" ? undefined2 : Set,
  1177. "%SetIteratorPrototype%": typeof Set === "undefined" || !hasSymbols || !getProto ? undefined2 : getProto((/* @__PURE__ */ new Set())[Symbol.iterator]()),
  1178. "%SharedArrayBuffer%": typeof SharedArrayBuffer === "undefined" ? undefined2 : SharedArrayBuffer,
  1179. "%String%": String,
  1180. "%StringIteratorPrototype%": hasSymbols && getProto ? getProto(""[Symbol.iterator]()) : undefined2,
  1181. "%Symbol%": hasSymbols ? Symbol : undefined2,
  1182. "%SyntaxError%": $SyntaxError,
  1183. "%ThrowTypeError%": ThrowTypeError,
  1184. "%TypedArray%": TypedArray,
  1185. "%TypeError%": $TypeError,
  1186. "%Uint8Array%": typeof Uint8Array === "undefined" ? undefined2 : Uint8Array,
  1187. "%Uint8ClampedArray%": typeof Uint8ClampedArray === "undefined" ? undefined2 : Uint8ClampedArray,
  1188. "%Uint16Array%": typeof Uint16Array === "undefined" ? undefined2 : Uint16Array,
  1189. "%Uint32Array%": typeof Uint32Array === "undefined" ? undefined2 : Uint32Array,
  1190. "%URIError%": $URIError,
  1191. "%WeakMap%": typeof WeakMap === "undefined" ? undefined2 : WeakMap,
  1192. "%WeakRef%": typeof WeakRef === "undefined" ? undefined2 : WeakRef,
  1193. "%WeakSet%": typeof WeakSet === "undefined" ? undefined2 : WeakSet,
  1194. "%Function.prototype.call%": $call,
  1195. "%Function.prototype.apply%": $apply,
  1196. "%Object.defineProperty%": $defineProperty,
  1197. "%Object.getPrototypeOf%": $ObjectGPO,
  1198. "%Math.abs%": abs,
  1199. "%Math.floor%": floor,
  1200. "%Math.max%": max,
  1201. "%Math.min%": min,
  1202. "%Math.pow%": pow,
  1203. "%Math.round%": round,
  1204. "%Math.sign%": sign,
  1205. "%Reflect.getPrototypeOf%": $ReflectGPO
  1206. };
  1207. if (getProto) {
  1208. try {
  1209. null.error;
  1210. } catch (e) {
  1211. errorProto = getProto(getProto(e));
  1212. INTRINSICS["%Error.prototype%"] = errorProto;
  1213. }
  1214. }
  1215. var errorProto;
  1216. var doEval = function doEval2(name) {
  1217. var value;
  1218. if (name === "%AsyncFunction%") {
  1219. value = getEvalledConstructor("async function () {}");
  1220. } else if (name === "%GeneratorFunction%") {
  1221. value = getEvalledConstructor("function* () {}");
  1222. } else if (name === "%AsyncGeneratorFunction%") {
  1223. value = getEvalledConstructor("async function* () {}");
  1224. } else if (name === "%AsyncGenerator%") {
  1225. var fn = doEval2("%AsyncGeneratorFunction%");
  1226. if (fn) {
  1227. value = fn.prototype;
  1228. }
  1229. } else if (name === "%AsyncIteratorPrototype%") {
  1230. var gen = doEval2("%AsyncGenerator%");
  1231. if (gen && getProto) {
  1232. value = getProto(gen.prototype);
  1233. }
  1234. }
  1235. INTRINSICS[name] = value;
  1236. return value;
  1237. };
  1238. var LEGACY_ALIASES = {
  1239. __proto__: null,
  1240. "%ArrayBufferPrototype%": ["ArrayBuffer", "prototype"],
  1241. "%ArrayPrototype%": ["Array", "prototype"],
  1242. "%ArrayProto_entries%": ["Array", "prototype", "entries"],
  1243. "%ArrayProto_forEach%": ["Array", "prototype", "forEach"],
  1244. "%ArrayProto_keys%": ["Array", "prototype", "keys"],
  1245. "%ArrayProto_values%": ["Array", "prototype", "values"],
  1246. "%AsyncFunctionPrototype%": ["AsyncFunction", "prototype"],
  1247. "%AsyncGenerator%": ["AsyncGeneratorFunction", "prototype"],
  1248. "%AsyncGeneratorPrototype%": ["AsyncGeneratorFunction", "prototype", "prototype"],
  1249. "%BooleanPrototype%": ["Boolean", "prototype"],
  1250. "%DataViewPrototype%": ["DataView", "prototype"],
  1251. "%DatePrototype%": ["Date", "prototype"],
  1252. "%ErrorPrototype%": ["Error", "prototype"],
  1253. "%EvalErrorPrototype%": ["EvalError", "prototype"],
  1254. "%Float32ArrayPrototype%": ["Float32Array", "prototype"],
  1255. "%Float64ArrayPrototype%": ["Float64Array", "prototype"],
  1256. "%FunctionPrototype%": ["Function", "prototype"],
  1257. "%Generator%": ["GeneratorFunction", "prototype"],
  1258. "%GeneratorPrototype%": ["GeneratorFunction", "prototype", "prototype"],
  1259. "%Int8ArrayPrototype%": ["Int8Array", "prototype"],
  1260. "%Int16ArrayPrototype%": ["Int16Array", "prototype"],
  1261. "%Int32ArrayPrototype%": ["Int32Array", "prototype"],
  1262. "%JSONParse%": ["JSON", "parse"],
  1263. "%JSONStringify%": ["JSON", "stringify"],
  1264. "%MapPrototype%": ["Map", "prototype"],
  1265. "%NumberPrototype%": ["Number", "prototype"],
  1266. "%ObjectPrototype%": ["Object", "prototype"],
  1267. "%ObjProto_toString%": ["Object", "prototype", "toString"],
  1268. "%ObjProto_valueOf%": ["Object", "prototype", "valueOf"],
  1269. "%PromisePrototype%": ["Promise", "prototype"],
  1270. "%PromiseProto_then%": ["Promise", "prototype", "then"],
  1271. "%Promise_all%": ["Promise", "all"],
  1272. "%Promise_reject%": ["Promise", "reject"],
  1273. "%Promise_resolve%": ["Promise", "resolve"],
  1274. "%RangeErrorPrototype%": ["RangeError", "prototype"],
  1275. "%ReferenceErrorPrototype%": ["ReferenceError", "prototype"],
  1276. "%RegExpPrototype%": ["RegExp", "prototype"],
  1277. "%SetPrototype%": ["Set", "prototype"],
  1278. "%SharedArrayBufferPrototype%": ["SharedArrayBuffer", "prototype"],
  1279. "%StringPrototype%": ["String", "prototype"],
  1280. "%SymbolPrototype%": ["Symbol", "prototype"],
  1281. "%SyntaxErrorPrototype%": ["SyntaxError", "prototype"],
  1282. "%TypedArrayPrototype%": ["TypedArray", "prototype"],
  1283. "%TypeErrorPrototype%": ["TypeError", "prototype"],
  1284. "%Uint8ArrayPrototype%": ["Uint8Array", "prototype"],
  1285. "%Uint8ClampedArrayPrototype%": ["Uint8ClampedArray", "prototype"],
  1286. "%Uint16ArrayPrototype%": ["Uint16Array", "prototype"],
  1287. "%Uint32ArrayPrototype%": ["Uint32Array", "prototype"],
  1288. "%URIErrorPrototype%": ["URIError", "prototype"],
  1289. "%WeakMapPrototype%": ["WeakMap", "prototype"],
  1290. "%WeakSetPrototype%": ["WeakSet", "prototype"]
  1291. };
  1292. var bind = require_function_bind();
  1293. var hasOwn = require_hasown();
  1294. var $concat = bind.call($call, Array.prototype.concat);
  1295. var $spliceApply = bind.call($apply, Array.prototype.splice);
  1296. var $replace = bind.call($call, String.prototype.replace);
  1297. var $strSlice = bind.call($call, String.prototype.slice);
  1298. var $exec = bind.call($call, RegExp.prototype.exec);
  1299. var rePropName = /[^%.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|%$))/g;
  1300. var reEscapeChar = /\\(\\)?/g;
  1301. var stringToPath = function stringToPath2(string) {
  1302. var first = $strSlice(string, 0, 1);
  1303. var last = $strSlice(string, -1);
  1304. if (first === "%" && last !== "%") {
  1305. throw new $SyntaxError("invalid intrinsic syntax, expected closing `%`");
  1306. } else if (last === "%" && first !== "%") {
  1307. throw new $SyntaxError("invalid intrinsic syntax, expected opening `%`");
  1308. }
  1309. var result = [];
  1310. $replace(string, rePropName, function(match, number, quote, subString) {
  1311. result[result.length] = quote ? $replace(subString, reEscapeChar, "$1") : number || match;
  1312. });
  1313. return result;
  1314. };
  1315. var getBaseIntrinsic = function getBaseIntrinsic2(name, allowMissing) {
  1316. var intrinsicName = name;
  1317. var alias;
  1318. if (hasOwn(LEGACY_ALIASES, intrinsicName)) {
  1319. alias = LEGACY_ALIASES[intrinsicName];
  1320. intrinsicName = "%" + alias[0] + "%";
  1321. }
  1322. if (hasOwn(INTRINSICS, intrinsicName)) {
  1323. var value = INTRINSICS[intrinsicName];
  1324. if (value === needsEval) {
  1325. value = doEval(intrinsicName);
  1326. }
  1327. if (typeof value === "undefined" && !allowMissing) {
  1328. throw new $TypeError("intrinsic " + name + " exists, but is not available. Please file an issue!");
  1329. }
  1330. return {
  1331. alias,
  1332. name: intrinsicName,
  1333. value
  1334. };
  1335. }
  1336. throw new $SyntaxError("intrinsic " + name + " does not exist!");
  1337. };
  1338. module.exports = function GetIntrinsic(name, allowMissing) {
  1339. if (typeof name !== "string" || name.length === 0) {
  1340. throw new $TypeError("intrinsic name must be a non-empty string");
  1341. }
  1342. if (arguments.length > 1 && typeof allowMissing !== "boolean") {
  1343. throw new $TypeError('"allowMissing" argument must be a boolean');
  1344. }
  1345. if ($exec(/^%?[^%]*%?$/, name) === null) {
  1346. throw new $SyntaxError("`%` may not be present anywhere but at the beginning and end of the intrinsic name");
  1347. }
  1348. var parts = stringToPath(name);
  1349. var intrinsicBaseName = parts.length > 0 ? parts[0] : "";
  1350. var intrinsic = getBaseIntrinsic("%" + intrinsicBaseName + "%", allowMissing);
  1351. var intrinsicRealName = intrinsic.name;
  1352. var value = intrinsic.value;
  1353. var skipFurtherCaching = false;
  1354. var alias = intrinsic.alias;
  1355. if (alias) {
  1356. intrinsicBaseName = alias[0];
  1357. $spliceApply(parts, $concat([0, 1], alias));
  1358. }
  1359. for (var i = 1, isOwn = true; i < parts.length; i += 1) {
  1360. var part = parts[i];
  1361. var first = $strSlice(part, 0, 1);
  1362. var last = $strSlice(part, -1);
  1363. if ((first === '"' || first === "'" || first === "`" || (last === '"' || last === "'" || last === "`")) && first !== last) {
  1364. throw new $SyntaxError("property names with quotes must have matching quotes");
  1365. }
  1366. if (part === "constructor" || !isOwn) {
  1367. skipFurtherCaching = true;
  1368. }
  1369. intrinsicBaseName += "." + part;
  1370. intrinsicRealName = "%" + intrinsicBaseName + "%";
  1371. if (hasOwn(INTRINSICS, intrinsicRealName)) {
  1372. value = INTRINSICS[intrinsicRealName];
  1373. } else if (value != null) {
  1374. if (!(part in value)) {
  1375. if (!allowMissing) {
  1376. throw new $TypeError("base intrinsic for " + name + " exists, but the property is not available.");
  1377. }
  1378. return void undefined2;
  1379. }
  1380. if ($gOPD && i + 1 >= parts.length) {
  1381. var desc = $gOPD(value, part);
  1382. isOwn = !!desc;
  1383. if (isOwn && "get" in desc && !("originalValue" in desc.get)) {
  1384. value = desc.get;
  1385. } else {
  1386. value = value[part];
  1387. }
  1388. } else {
  1389. isOwn = hasOwn(value, part);
  1390. value = value[part];
  1391. }
  1392. if (isOwn && !skipFurtherCaching) {
  1393. INTRINSICS[intrinsicRealName] = value;
  1394. }
  1395. }
  1396. }
  1397. return value;
  1398. };
  1399. }
  1400. });
  1401. // node_modules/call-bound/index.js
  1402. var require_call_bound = __commonJS({
  1403. "node_modules/call-bound/index.js"(exports, module) {
  1404. "use strict";
  1405. var GetIntrinsic = require_get_intrinsic();
  1406. var callBindBasic = require_call_bind_apply_helpers();
  1407. var $indexOf = callBindBasic([GetIntrinsic("%String.prototype.indexOf%")]);
  1408. module.exports = function callBoundIntrinsic(name, allowMissing) {
  1409. var intrinsic = (
  1410. /** @type {(this: unknown, ...args: unknown[]) => unknown} */
  1411. GetIntrinsic(name, !!allowMissing)
  1412. );
  1413. if (typeof intrinsic === "function" && $indexOf(name, ".prototype.") > -1) {
  1414. return callBindBasic(
  1415. /** @type {const} */
  1416. [intrinsic]
  1417. );
  1418. }
  1419. return intrinsic;
  1420. };
  1421. }
  1422. });
  1423. // node_modules/side-channel-map/index.js
  1424. var require_side_channel_map = __commonJS({
  1425. "node_modules/side-channel-map/index.js"(exports, module) {
  1426. "use strict";
  1427. var GetIntrinsic = require_get_intrinsic();
  1428. var callBound = require_call_bound();
  1429. var inspect = require_object_inspect();
  1430. var $TypeError = require_type();
  1431. var $Map = GetIntrinsic("%Map%", true);
  1432. var $mapGet = callBound("Map.prototype.get", true);
  1433. var $mapSet = callBound("Map.prototype.set", true);
  1434. var $mapHas = callBound("Map.prototype.has", true);
  1435. var $mapDelete = callBound("Map.prototype.delete", true);
  1436. var $mapSize = callBound("Map.prototype.size", true);
  1437. module.exports = !!$Map && /** @type {Exclude<import('.'), false>} */
  1438. function getSideChannelMap() {
  1439. var $m;
  1440. var channel = {
  1441. assert: function(key) {
  1442. if (!channel.has(key)) {
  1443. throw new $TypeError("Side channel does not contain " + inspect(key));
  1444. }
  1445. },
  1446. "delete": function(key) {
  1447. if ($m) {
  1448. var result = $mapDelete($m, key);
  1449. if ($mapSize($m) === 0) {
  1450. $m = void 0;
  1451. }
  1452. return result;
  1453. }
  1454. return false;
  1455. },
  1456. get: function(key) {
  1457. if ($m) {
  1458. return $mapGet($m, key);
  1459. }
  1460. },
  1461. has: function(key) {
  1462. if ($m) {
  1463. return $mapHas($m, key);
  1464. }
  1465. return false;
  1466. },
  1467. set: function(key, value) {
  1468. if (!$m) {
  1469. $m = new $Map();
  1470. }
  1471. $mapSet($m, key, value);
  1472. }
  1473. };
  1474. return channel;
  1475. };
  1476. }
  1477. });
  1478. // node_modules/side-channel-weakmap/index.js
  1479. var require_side_channel_weakmap = __commonJS({
  1480. "node_modules/side-channel-weakmap/index.js"(exports, module) {
  1481. "use strict";
  1482. var GetIntrinsic = require_get_intrinsic();
  1483. var callBound = require_call_bound();
  1484. var inspect = require_object_inspect();
  1485. var getSideChannelMap = require_side_channel_map();
  1486. var $TypeError = require_type();
  1487. var $WeakMap = GetIntrinsic("%WeakMap%", true);
  1488. var $weakMapGet = callBound("WeakMap.prototype.get", true);
  1489. var $weakMapSet = callBound("WeakMap.prototype.set", true);
  1490. var $weakMapHas = callBound("WeakMap.prototype.has", true);
  1491. var $weakMapDelete = callBound("WeakMap.prototype.delete", true);
  1492. module.exports = $WeakMap ? (
  1493. /** @type {Exclude<import('.'), false>} */
  1494. function getSideChannelWeakMap() {
  1495. var $wm;
  1496. var $m;
  1497. var channel = {
  1498. assert: function(key) {
  1499. if (!channel.has(key)) {
  1500. throw new $TypeError("Side channel does not contain " + inspect(key));
  1501. }
  1502. },
  1503. "delete": function(key) {
  1504. if ($WeakMap && key && (typeof key === "object" || typeof key === "function")) {
  1505. if ($wm) {
  1506. return $weakMapDelete($wm, key);
  1507. }
  1508. } else if (getSideChannelMap) {
  1509. if ($m) {
  1510. return $m["delete"](key);
  1511. }
  1512. }
  1513. return false;
  1514. },
  1515. get: function(key) {
  1516. if ($WeakMap && key && (typeof key === "object" || typeof key === "function")) {
  1517. if ($wm) {
  1518. return $weakMapGet($wm, key);
  1519. }
  1520. }
  1521. return $m && $m.get(key);
  1522. },
  1523. has: function(key) {
  1524. if ($WeakMap && key && (typeof key === "object" || typeof key === "function")) {
  1525. if ($wm) {
  1526. return $weakMapHas($wm, key);
  1527. }
  1528. }
  1529. return !!$m && $m.has(key);
  1530. },
  1531. set: function(key, value) {
  1532. if ($WeakMap && key && (typeof key === "object" || typeof key === "function")) {
  1533. if (!$wm) {
  1534. $wm = new $WeakMap();
  1535. }
  1536. $weakMapSet($wm, key, value);
  1537. } else if (getSideChannelMap) {
  1538. if (!$m) {
  1539. $m = getSideChannelMap();
  1540. }
  1541. $m.set(key, value);
  1542. }
  1543. }
  1544. };
  1545. return channel;
  1546. }
  1547. ) : getSideChannelMap;
  1548. }
  1549. });
  1550. // node_modules/side-channel/index.js
  1551. var require_side_channel = __commonJS({
  1552. "node_modules/side-channel/index.js"(exports, module) {
  1553. "use strict";
  1554. var $TypeError = require_type();
  1555. var inspect = require_object_inspect();
  1556. var getSideChannelList = require_side_channel_list();
  1557. var getSideChannelMap = require_side_channel_map();
  1558. var getSideChannelWeakMap = require_side_channel_weakmap();
  1559. var makeChannel = getSideChannelWeakMap || getSideChannelMap || getSideChannelList;
  1560. module.exports = function getSideChannel() {
  1561. var $channelData;
  1562. var channel = {
  1563. assert: function(key) {
  1564. if (!channel.has(key)) {
  1565. throw new $TypeError("Side channel does not contain " + inspect(key));
  1566. }
  1567. },
  1568. "delete": function(key) {
  1569. return !!$channelData && $channelData["delete"](key);
  1570. },
  1571. get: function(key) {
  1572. return $channelData && $channelData.get(key);
  1573. },
  1574. has: function(key) {
  1575. return !!$channelData && $channelData.has(key);
  1576. },
  1577. set: function(key, value) {
  1578. if (!$channelData) {
  1579. $channelData = makeChannel();
  1580. }
  1581. $channelData.set(key, value);
  1582. }
  1583. };
  1584. return channel;
  1585. };
  1586. }
  1587. });
  1588. // node_modules/qs/lib/formats.js
  1589. var require_formats = __commonJS({
  1590. "node_modules/qs/lib/formats.js"(exports, module) {
  1591. "use strict";
  1592. var replace = String.prototype.replace;
  1593. var percentTwenties = /%20/g;
  1594. var Format = {
  1595. RFC1738: "RFC1738",
  1596. RFC3986: "RFC3986"
  1597. };
  1598. module.exports = {
  1599. "default": Format.RFC3986,
  1600. formatters: {
  1601. RFC1738: function(value) {
  1602. return replace.call(value, percentTwenties, "+");
  1603. },
  1604. RFC3986: function(value) {
  1605. return String(value);
  1606. }
  1607. },
  1608. RFC1738: Format.RFC1738,
  1609. RFC3986: Format.RFC3986
  1610. };
  1611. }
  1612. });
  1613. // node_modules/qs/lib/utils.js
  1614. var require_utils = __commonJS({
  1615. "node_modules/qs/lib/utils.js"(exports, module) {
  1616. "use strict";
  1617. var formats = require_formats();
  1618. var has = Object.prototype.hasOwnProperty;
  1619. var isArray = Array.isArray;
  1620. var hexTable = (function() {
  1621. var array = [];
  1622. for (var i = 0; i < 256; ++i) {
  1623. array.push("%" + ((i < 16 ? "0" : "") + i.toString(16)).toUpperCase());
  1624. }
  1625. return array;
  1626. })();
  1627. var compactQueue = function compactQueue2(queue) {
  1628. while (queue.length > 1) {
  1629. var item = queue.pop();
  1630. var obj = item.obj[item.prop];
  1631. if (isArray(obj)) {
  1632. var compacted = [];
  1633. for (var j = 0; j < obj.length; ++j) {
  1634. if (typeof obj[j] !== "undefined") {
  1635. compacted.push(obj[j]);
  1636. }
  1637. }
  1638. item.obj[item.prop] = compacted;
  1639. }
  1640. }
  1641. };
  1642. var arrayToObject = function arrayToObject2(source, options) {
  1643. var obj = options && options.plainObjects ? { __proto__: null } : {};
  1644. for (var i = 0; i < source.length; ++i) {
  1645. if (typeof source[i] !== "undefined") {
  1646. obj[i] = source[i];
  1647. }
  1648. }
  1649. return obj;
  1650. };
  1651. var merge = function merge2(target, source, options) {
  1652. if (!source) {
  1653. return target;
  1654. }
  1655. if (typeof source !== "object" && typeof source !== "function") {
  1656. if (isArray(target)) {
  1657. target.push(source);
  1658. } else if (target && typeof target === "object") {
  1659. if (options && (options.plainObjects || options.allowPrototypes) || !has.call(Object.prototype, source)) {
  1660. target[source] = true;
  1661. }
  1662. } else {
  1663. return [target, source];
  1664. }
  1665. return target;
  1666. }
  1667. if (!target || typeof target !== "object") {
  1668. return [target].concat(source);
  1669. }
  1670. var mergeTarget = target;
  1671. if (isArray(target) && !isArray(source)) {
  1672. mergeTarget = arrayToObject(target, options);
  1673. }
  1674. if (isArray(target) && isArray(source)) {
  1675. source.forEach(function(item, i) {
  1676. if (has.call(target, i)) {
  1677. var targetItem = target[i];
  1678. if (targetItem && typeof targetItem === "object" && item && typeof item === "object") {
  1679. target[i] = merge2(targetItem, item, options);
  1680. } else {
  1681. target.push(item);
  1682. }
  1683. } else {
  1684. target[i] = item;
  1685. }
  1686. });
  1687. return target;
  1688. }
  1689. return Object.keys(source).reduce(function(acc, key) {
  1690. var value = source[key];
  1691. if (has.call(acc, key)) {
  1692. acc[key] = merge2(acc[key], value, options);
  1693. } else {
  1694. acc[key] = value;
  1695. }
  1696. return acc;
  1697. }, mergeTarget);
  1698. };
  1699. var assign = function assignSingleSource(target, source) {
  1700. return Object.keys(source).reduce(function(acc, key) {
  1701. acc[key] = source[key];
  1702. return acc;
  1703. }, target);
  1704. };
  1705. var decode = function(str, defaultDecoder, charset) {
  1706. var strWithoutPlus = str.replace(/\+/g, " ");
  1707. if (charset === "iso-8859-1") {
  1708. return strWithoutPlus.replace(/%[0-9a-f]{2}/gi, unescape);
  1709. }
  1710. try {
  1711. return decodeURIComponent(strWithoutPlus);
  1712. } catch (e) {
  1713. return strWithoutPlus;
  1714. }
  1715. };
  1716. var limit = 1024;
  1717. var encode = function encode2(str, defaultEncoder, charset, kind, format) {
  1718. if (str.length === 0) {
  1719. return str;
  1720. }
  1721. var string = str;
  1722. if (typeof str === "symbol") {
  1723. string = Symbol.prototype.toString.call(str);
  1724. } else if (typeof str !== "string") {
  1725. string = String(str);
  1726. }
  1727. if (charset === "iso-8859-1") {
  1728. return escape(string).replace(/%u[0-9a-f]{4}/gi, function($0) {
  1729. return "%26%23" + parseInt($0.slice(2), 16) + "%3B";
  1730. });
  1731. }
  1732. var out = "";
  1733. for (var j = 0; j < string.length; j += limit) {
  1734. var segment = string.length >= limit ? string.slice(j, j + limit) : string;
  1735. var arr = [];
  1736. for (var i = 0; i < segment.length; ++i) {
  1737. var c = segment.charCodeAt(i);
  1738. 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)) {
  1739. arr[arr.length] = segment.charAt(i);
  1740. continue;
  1741. }
  1742. if (c < 128) {
  1743. arr[arr.length] = hexTable[c];
  1744. continue;
  1745. }
  1746. if (c < 2048) {
  1747. arr[arr.length] = hexTable[192 | c >> 6] + hexTable[128 | c & 63];
  1748. continue;
  1749. }
  1750. if (c < 55296 || c >= 57344) {
  1751. arr[arr.length] = hexTable[224 | c >> 12] + hexTable[128 | c >> 6 & 63] + hexTable[128 | c & 63];
  1752. continue;
  1753. }
  1754. i += 1;
  1755. c = 65536 + ((c & 1023) << 10 | segment.charCodeAt(i) & 1023);
  1756. arr[arr.length] = hexTable[240 | c >> 18] + hexTable[128 | c >> 12 & 63] + hexTable[128 | c >> 6 & 63] + hexTable[128 | c & 63];
  1757. }
  1758. out += arr.join("");
  1759. }
  1760. return out;
  1761. };
  1762. var compact = function compact2(value) {
  1763. var queue = [{ obj: { o: value }, prop: "o" }];
  1764. var refs = [];
  1765. for (var i = 0; i < queue.length; ++i) {
  1766. var item = queue[i];
  1767. var obj = item.obj[item.prop];
  1768. var keys = Object.keys(obj);
  1769. for (var j = 0; j < keys.length; ++j) {
  1770. var key = keys[j];
  1771. var val = obj[key];
  1772. if (typeof val === "object" && val !== null && refs.indexOf(val) === -1) {
  1773. queue.push({ obj, prop: key });
  1774. refs.push(val);
  1775. }
  1776. }
  1777. }
  1778. compactQueue(queue);
  1779. return value;
  1780. };
  1781. var isRegExp = function isRegExp2(obj) {
  1782. return Object.prototype.toString.call(obj) === "[object RegExp]";
  1783. };
  1784. var isBuffer = function isBuffer2(obj) {
  1785. if (!obj || typeof obj !== "object") {
  1786. return false;
  1787. }
  1788. return !!(obj.constructor && obj.constructor.isBuffer && obj.constructor.isBuffer(obj));
  1789. };
  1790. var combine = function combine2(a, b) {
  1791. return [].concat(a, b);
  1792. };
  1793. var maybeMap = function maybeMap2(val, fn) {
  1794. if (isArray(val)) {
  1795. var mapped = [];
  1796. for (var i = 0; i < val.length; i += 1) {
  1797. mapped.push(fn(val[i]));
  1798. }
  1799. return mapped;
  1800. }
  1801. return fn(val);
  1802. };
  1803. module.exports = {
  1804. arrayToObject,
  1805. assign,
  1806. combine,
  1807. compact,
  1808. decode,
  1809. encode,
  1810. isBuffer,
  1811. isRegExp,
  1812. maybeMap,
  1813. merge
  1814. };
  1815. }
  1816. });
  1817. // node_modules/qs/lib/stringify.js
  1818. var require_stringify = __commonJS({
  1819. "node_modules/qs/lib/stringify.js"(exports, module) {
  1820. "use strict";
  1821. var getSideChannel = require_side_channel();
  1822. var utils = require_utils();
  1823. var formats = require_formats();
  1824. var has = Object.prototype.hasOwnProperty;
  1825. var arrayPrefixGenerators = {
  1826. brackets: function brackets(prefix) {
  1827. return prefix + "[]";
  1828. },
  1829. comma: "comma",
  1830. indices: function indices(prefix, key) {
  1831. return prefix + "[" + key + "]";
  1832. },
  1833. repeat: function repeat(prefix) {
  1834. return prefix;
  1835. }
  1836. };
  1837. var isArray = Array.isArray;
  1838. var push = Array.prototype.push;
  1839. var pushToArray = function(arr, valueOrArray) {
  1840. push.apply(arr, isArray(valueOrArray) ? valueOrArray : [valueOrArray]);
  1841. };
  1842. var toISO = Date.prototype.toISOString;
  1843. var defaultFormat = formats["default"];
  1844. var defaults = {
  1845. addQueryPrefix: false,
  1846. allowDots: false,
  1847. allowEmptyArrays: false,
  1848. arrayFormat: "indices",
  1849. charset: "utf-8",
  1850. charsetSentinel: false,
  1851. commaRoundTrip: false,
  1852. delimiter: "&",
  1853. encode: true,
  1854. encodeDotInKeys: false,
  1855. encoder: utils.encode,
  1856. encodeValuesOnly: false,
  1857. filter: void 0,
  1858. format: defaultFormat,
  1859. formatter: formats.formatters[defaultFormat],
  1860. // deprecated
  1861. indices: false,
  1862. serializeDate: function serializeDate(date) {
  1863. return toISO.call(date);
  1864. },
  1865. skipNulls: false,
  1866. strictNullHandling: false
  1867. };
  1868. var isNonNullishPrimitive = function isNonNullishPrimitive2(v) {
  1869. return typeof v === "string" || typeof v === "number" || typeof v === "boolean" || typeof v === "symbol" || typeof v === "bigint";
  1870. };
  1871. var sentinel = {};
  1872. var stringify = function stringify2(object, prefix, generateArrayPrefix, commaRoundTrip, allowEmptyArrays, strictNullHandling, skipNulls, encodeDotInKeys, encoder, filter, sort, allowDots, serializeDate, format, formatter, encodeValuesOnly, charset, sideChannel) {
  1873. var obj = object;
  1874. var tmpSc = sideChannel;
  1875. var step = 0;
  1876. var findFlag = false;
  1877. while ((tmpSc = tmpSc.get(sentinel)) !== void 0 && !findFlag) {
  1878. var pos = tmpSc.get(object);
  1879. step += 1;
  1880. if (typeof pos !== "undefined") {
  1881. if (pos === step) {
  1882. throw new RangeError("Cyclic object value");
  1883. } else {
  1884. findFlag = true;
  1885. }
  1886. }
  1887. if (typeof tmpSc.get(sentinel) === "undefined") {
  1888. step = 0;
  1889. }
  1890. }
  1891. if (typeof filter === "function") {
  1892. obj = filter(prefix, obj);
  1893. } else if (obj instanceof Date) {
  1894. obj = serializeDate(obj);
  1895. } else if (generateArrayPrefix === "comma" && isArray(obj)) {
  1896. obj = utils.maybeMap(obj, function(value2) {
  1897. if (value2 instanceof Date) {
  1898. return serializeDate(value2);
  1899. }
  1900. return value2;
  1901. });
  1902. }
  1903. if (obj === null) {
  1904. if (strictNullHandling) {
  1905. return encoder && !encodeValuesOnly ? encoder(prefix, defaults.encoder, charset, "key", format) : prefix;
  1906. }
  1907. obj = "";
  1908. }
  1909. if (isNonNullishPrimitive(obj) || utils.isBuffer(obj)) {
  1910. if (encoder) {
  1911. var keyValue = encodeValuesOnly ? prefix : encoder(prefix, defaults.encoder, charset, "key", format);
  1912. return [formatter(keyValue) + "=" + formatter(encoder(obj, defaults.encoder, charset, "value", format))];
  1913. }
  1914. return [formatter(prefix) + "=" + formatter(String(obj))];
  1915. }
  1916. var values = [];
  1917. if (typeof obj === "undefined") {
  1918. return values;
  1919. }
  1920. var objKeys;
  1921. if (generateArrayPrefix === "comma" && isArray(obj)) {
  1922. if (encodeValuesOnly && encoder) {
  1923. obj = utils.maybeMap(obj, encoder);
  1924. }
  1925. objKeys = [{ value: obj.length > 0 ? obj.join(",") || null : void 0 }];
  1926. } else if (isArray(filter)) {
  1927. objKeys = filter;
  1928. } else {
  1929. var keys = Object.keys(obj);
  1930. objKeys = sort ? keys.sort(sort) : keys;
  1931. }
  1932. var encodedPrefix = encodeDotInKeys ? String(prefix).replace(/\./g, "%2E") : String(prefix);
  1933. var adjustedPrefix = commaRoundTrip && isArray(obj) && obj.length === 1 ? encodedPrefix + "[]" : encodedPrefix;
  1934. if (allowEmptyArrays && isArray(obj) && obj.length === 0) {
  1935. return adjustedPrefix + "[]";
  1936. }
  1937. for (var j = 0; j < objKeys.length; ++j) {
  1938. var key = objKeys[j];
  1939. var value = typeof key === "object" && key && typeof key.value !== "undefined" ? key.value : obj[key];
  1940. if (skipNulls && value === null) {
  1941. continue;
  1942. }
  1943. var encodedKey = allowDots && encodeDotInKeys ? String(key).replace(/\./g, "%2E") : String(key);
  1944. var keyPrefix = isArray(obj) ? typeof generateArrayPrefix === "function" ? generateArrayPrefix(adjustedPrefix, encodedKey) : adjustedPrefix : adjustedPrefix + (allowDots ? "." + encodedKey : "[" + encodedKey + "]");
  1945. sideChannel.set(object, step);
  1946. var valueSideChannel = getSideChannel();
  1947. valueSideChannel.set(sentinel, sideChannel);
  1948. pushToArray(values, stringify2(
  1949. value,
  1950. keyPrefix,
  1951. generateArrayPrefix,
  1952. commaRoundTrip,
  1953. allowEmptyArrays,
  1954. strictNullHandling,
  1955. skipNulls,
  1956. encodeDotInKeys,
  1957. generateArrayPrefix === "comma" && encodeValuesOnly && isArray(obj) ? null : encoder,
  1958. filter,
  1959. sort,
  1960. allowDots,
  1961. serializeDate,
  1962. format,
  1963. formatter,
  1964. encodeValuesOnly,
  1965. charset,
  1966. valueSideChannel
  1967. ));
  1968. }
  1969. return values;
  1970. };
  1971. var normalizeStringifyOptions = function normalizeStringifyOptions2(opts) {
  1972. if (!opts) {
  1973. return defaults;
  1974. }
  1975. if (typeof opts.allowEmptyArrays !== "undefined" && typeof opts.allowEmptyArrays !== "boolean") {
  1976. throw new TypeError("`allowEmptyArrays` option can only be `true` or `false`, when provided");
  1977. }
  1978. if (typeof opts.encodeDotInKeys !== "undefined" && typeof opts.encodeDotInKeys !== "boolean") {
  1979. throw new TypeError("`encodeDotInKeys` option can only be `true` or `false`, when provided");
  1980. }
  1981. if (opts.encoder !== null && typeof opts.encoder !== "undefined" && typeof opts.encoder !== "function") {
  1982. throw new TypeError("Encoder has to be a function.");
  1983. }
  1984. var charset = opts.charset || defaults.charset;
  1985. if (typeof opts.charset !== "undefined" && opts.charset !== "utf-8" && opts.charset !== "iso-8859-1") {
  1986. throw new TypeError("The charset option must be either utf-8, iso-8859-1, or undefined");
  1987. }
  1988. var format = formats["default"];
  1989. if (typeof opts.format !== "undefined") {
  1990. if (!has.call(formats.formatters, opts.format)) {
  1991. throw new TypeError("Unknown format option provided.");
  1992. }
  1993. format = opts.format;
  1994. }
  1995. var formatter = formats.formatters[format];
  1996. var filter = defaults.filter;
  1997. if (typeof opts.filter === "function" || isArray(opts.filter)) {
  1998. filter = opts.filter;
  1999. }
  2000. var arrayFormat;
  2001. if (opts.arrayFormat in arrayPrefixGenerators) {
  2002. arrayFormat = opts.arrayFormat;
  2003. } else if ("indices" in opts) {
  2004. arrayFormat = opts.indices ? "indices" : "repeat";
  2005. } else {
  2006. arrayFormat = defaults.arrayFormat;
  2007. }
  2008. if ("commaRoundTrip" in opts && typeof opts.commaRoundTrip !== "boolean") {
  2009. throw new TypeError("`commaRoundTrip` must be a boolean, or absent");
  2010. }
  2011. var allowDots = typeof opts.allowDots === "undefined" ? opts.encodeDotInKeys === true ? true : defaults.allowDots : !!opts.allowDots;
  2012. return {
  2013. addQueryPrefix: typeof opts.addQueryPrefix === "boolean" ? opts.addQueryPrefix : defaults.addQueryPrefix,
  2014. allowDots,
  2015. allowEmptyArrays: typeof opts.allowEmptyArrays === "boolean" ? !!opts.allowEmptyArrays : defaults.allowEmptyArrays,
  2016. arrayFormat,
  2017. charset,
  2018. charsetSentinel: typeof opts.charsetSentinel === "boolean" ? opts.charsetSentinel : defaults.charsetSentinel,
  2019. commaRoundTrip: !!opts.commaRoundTrip,
  2020. delimiter: typeof opts.delimiter === "undefined" ? defaults.delimiter : opts.delimiter,
  2021. encode: typeof opts.encode === "boolean" ? opts.encode : defaults.encode,
  2022. encodeDotInKeys: typeof opts.encodeDotInKeys === "boolean" ? opts.encodeDotInKeys : defaults.encodeDotInKeys,
  2023. encoder: typeof opts.encoder === "function" ? opts.encoder : defaults.encoder,
  2024. encodeValuesOnly: typeof opts.encodeValuesOnly === "boolean" ? opts.encodeValuesOnly : defaults.encodeValuesOnly,
  2025. filter,
  2026. format,
  2027. formatter,
  2028. serializeDate: typeof opts.serializeDate === "function" ? opts.serializeDate : defaults.serializeDate,
  2029. skipNulls: typeof opts.skipNulls === "boolean" ? opts.skipNulls : defaults.skipNulls,
  2030. sort: typeof opts.sort === "function" ? opts.sort : null,
  2031. strictNullHandling: typeof opts.strictNullHandling === "boolean" ? opts.strictNullHandling : defaults.strictNullHandling
  2032. };
  2033. };
  2034. module.exports = function(object, opts) {
  2035. var obj = object;
  2036. var options = normalizeStringifyOptions(opts);
  2037. var objKeys;
  2038. var filter;
  2039. if (typeof options.filter === "function") {
  2040. filter = options.filter;
  2041. obj = filter("", obj);
  2042. } else if (isArray(options.filter)) {
  2043. filter = options.filter;
  2044. objKeys = filter;
  2045. }
  2046. var keys = [];
  2047. if (typeof obj !== "object" || obj === null) {
  2048. return "";
  2049. }
  2050. var generateArrayPrefix = arrayPrefixGenerators[options.arrayFormat];
  2051. var commaRoundTrip = generateArrayPrefix === "comma" && options.commaRoundTrip;
  2052. if (!objKeys) {
  2053. objKeys = Object.keys(obj);
  2054. }
  2055. if (options.sort) {
  2056. objKeys.sort(options.sort);
  2057. }
  2058. var sideChannel = getSideChannel();
  2059. for (var i = 0; i < objKeys.length; ++i) {
  2060. var key = objKeys[i];
  2061. var value = obj[key];
  2062. if (options.skipNulls && value === null) {
  2063. continue;
  2064. }
  2065. pushToArray(keys, stringify(
  2066. value,
  2067. key,
  2068. generateArrayPrefix,
  2069. commaRoundTrip,
  2070. options.allowEmptyArrays,
  2071. options.strictNullHandling,
  2072. options.skipNulls,
  2073. options.encodeDotInKeys,
  2074. options.encode ? options.encoder : null,
  2075. options.filter,
  2076. options.sort,
  2077. options.allowDots,
  2078. options.serializeDate,
  2079. options.format,
  2080. options.formatter,
  2081. options.encodeValuesOnly,
  2082. options.charset,
  2083. sideChannel
  2084. ));
  2085. }
  2086. var joined = keys.join(options.delimiter);
  2087. var prefix = options.addQueryPrefix === true ? "?" : "";
  2088. if (options.charsetSentinel) {
  2089. if (options.charset === "iso-8859-1") {
  2090. prefix += "utf8=%26%2310003%3B&";
  2091. } else {
  2092. prefix += "utf8=%E2%9C%93&";
  2093. }
  2094. }
  2095. return joined.length > 0 ? prefix + joined : "";
  2096. };
  2097. }
  2098. });
  2099. // node_modules/qs/lib/parse.js
  2100. var require_parse = __commonJS({
  2101. "node_modules/qs/lib/parse.js"(exports, module) {
  2102. "use strict";
  2103. var utils = require_utils();
  2104. var has = Object.prototype.hasOwnProperty;
  2105. var isArray = Array.isArray;
  2106. var defaults = {
  2107. allowDots: false,
  2108. allowEmptyArrays: false,
  2109. allowPrototypes: false,
  2110. allowSparse: false,
  2111. arrayLimit: 20,
  2112. charset: "utf-8",
  2113. charsetSentinel: false,
  2114. comma: false,
  2115. decodeDotInKeys: false,
  2116. decoder: utils.decode,
  2117. delimiter: "&",
  2118. depth: 5,
  2119. duplicates: "combine",
  2120. ignoreQueryPrefix: false,
  2121. interpretNumericEntities: false,
  2122. parameterLimit: 1e3,
  2123. parseArrays: true,
  2124. plainObjects: false,
  2125. strictDepth: false,
  2126. strictNullHandling: false,
  2127. throwOnLimitExceeded: false
  2128. };
  2129. var interpretNumericEntities = function(str) {
  2130. return str.replace(/&#(\d+);/g, function($0, numberStr) {
  2131. return String.fromCharCode(parseInt(numberStr, 10));
  2132. });
  2133. };
  2134. var parseArrayValue = function(val, options, currentArrayLength) {
  2135. if (val && typeof val === "string" && options.comma && val.indexOf(",") > -1) {
  2136. return val.split(",");
  2137. }
  2138. if (options.throwOnLimitExceeded && currentArrayLength >= options.arrayLimit) {
  2139. throw new RangeError("Array limit exceeded. Only " + options.arrayLimit + " element" + (options.arrayLimit === 1 ? "" : "s") + " allowed in an array.");
  2140. }
  2141. return val;
  2142. };
  2143. var isoSentinel = "utf8=%26%2310003%3B";
  2144. var charsetSentinel = "utf8=%E2%9C%93";
  2145. var parseValues = function parseQueryStringValues(str, options) {
  2146. var obj = { __proto__: null };
  2147. var cleanStr = options.ignoreQueryPrefix ? str.replace(/^\?/, "") : str;
  2148. cleanStr = cleanStr.replace(/%5B/gi, "[").replace(/%5D/gi, "]");
  2149. var limit = options.parameterLimit === Infinity ? void 0 : options.parameterLimit;
  2150. var parts = cleanStr.split(
  2151. options.delimiter,
  2152. options.throwOnLimitExceeded ? limit + 1 : limit
  2153. );
  2154. if (options.throwOnLimitExceeded && parts.length > limit) {
  2155. throw new RangeError("Parameter limit exceeded. Only " + limit + " parameter" + (limit === 1 ? "" : "s") + " allowed.");
  2156. }
  2157. var skipIndex = -1;
  2158. var i;
  2159. var charset = options.charset;
  2160. if (options.charsetSentinel) {
  2161. for (i = 0; i < parts.length; ++i) {
  2162. if (parts[i].indexOf("utf8=") === 0) {
  2163. if (parts[i] === charsetSentinel) {
  2164. charset = "utf-8";
  2165. } else if (parts[i] === isoSentinel) {
  2166. charset = "iso-8859-1";
  2167. }
  2168. skipIndex = i;
  2169. i = parts.length;
  2170. }
  2171. }
  2172. }
  2173. for (i = 0; i < parts.length; ++i) {
  2174. if (i === skipIndex) {
  2175. continue;
  2176. }
  2177. var part = parts[i];
  2178. var bracketEqualsPos = part.indexOf("]=");
  2179. var pos = bracketEqualsPos === -1 ? part.indexOf("=") : bracketEqualsPos + 1;
  2180. var key;
  2181. var val;
  2182. if (pos === -1) {
  2183. key = options.decoder(part, defaults.decoder, charset, "key");
  2184. val = options.strictNullHandling ? null : "";
  2185. } else {
  2186. key = options.decoder(part.slice(0, pos), defaults.decoder, charset, "key");
  2187. val = utils.maybeMap(
  2188. parseArrayValue(
  2189. part.slice(pos + 1),
  2190. options,
  2191. isArray(obj[key]) ? obj[key].length : 0
  2192. ),
  2193. function(encodedVal) {
  2194. return options.decoder(encodedVal, defaults.decoder, charset, "value");
  2195. }
  2196. );
  2197. }
  2198. if (val && options.interpretNumericEntities && charset === "iso-8859-1") {
  2199. val = interpretNumericEntities(String(val));
  2200. }
  2201. if (part.indexOf("[]=") > -1) {
  2202. val = isArray(val) ? [val] : val;
  2203. }
  2204. var existing = has.call(obj, key);
  2205. if (existing && options.duplicates === "combine") {
  2206. obj[key] = utils.combine(obj[key], val);
  2207. } else if (!existing || options.duplicates === "last") {
  2208. obj[key] = val;
  2209. }
  2210. }
  2211. return obj;
  2212. };
  2213. var parseObject = function(chain, val, options, valuesParsed) {
  2214. var currentArrayLength = 0;
  2215. if (chain.length > 0 && chain[chain.length - 1] === "[]") {
  2216. var parentKey = chain.slice(0, -1).join("");
  2217. currentArrayLength = Array.isArray(val) && val[parentKey] ? val[parentKey].length : 0;
  2218. }
  2219. var leaf = valuesParsed ? val : parseArrayValue(val, options, currentArrayLength);
  2220. for (var i = chain.length - 1; i >= 0; --i) {
  2221. var obj;
  2222. var root = chain[i];
  2223. if (root === "[]" && options.parseArrays) {
  2224. obj = options.allowEmptyArrays && (leaf === "" || options.strictNullHandling && leaf === null) ? [] : utils.combine([], leaf);
  2225. } else {
  2226. obj = options.plainObjects ? { __proto__: null } : {};
  2227. var cleanRoot = root.charAt(0) === "[" && root.charAt(root.length - 1) === "]" ? root.slice(1, -1) : root;
  2228. var decodedRoot = options.decodeDotInKeys ? cleanRoot.replace(/%2E/g, ".") : cleanRoot;
  2229. var index = parseInt(decodedRoot, 10);
  2230. if (!options.parseArrays && decodedRoot === "") {
  2231. obj = { 0: leaf };
  2232. } else if (!isNaN(index) && root !== decodedRoot && String(index) === decodedRoot && index >= 0 && (options.parseArrays && index <= options.arrayLimit)) {
  2233. obj = [];
  2234. obj[index] = leaf;
  2235. } else if (decodedRoot !== "__proto__") {
  2236. obj[decodedRoot] = leaf;
  2237. }
  2238. }
  2239. leaf = obj;
  2240. }
  2241. return leaf;
  2242. };
  2243. var parseKeys = function parseQueryStringKeys(givenKey, val, options, valuesParsed) {
  2244. if (!givenKey) {
  2245. return;
  2246. }
  2247. var key = options.allowDots ? givenKey.replace(/\.([^.[]+)/g, "[$1]") : givenKey;
  2248. var brackets = /(\[[^[\]]*])/;
  2249. var child = /(\[[^[\]]*])/g;
  2250. var segment = options.depth > 0 && brackets.exec(key);
  2251. var parent = segment ? key.slice(0, segment.index) : key;
  2252. var keys = [];
  2253. if (parent) {
  2254. if (!options.plainObjects && has.call(Object.prototype, parent)) {
  2255. if (!options.allowPrototypes) {
  2256. return;
  2257. }
  2258. }
  2259. keys.push(parent);
  2260. }
  2261. var i = 0;
  2262. while (options.depth > 0 && (segment = child.exec(key)) !== null && i < options.depth) {
  2263. i += 1;
  2264. if (!options.plainObjects && has.call(Object.prototype, segment[1].slice(1, -1))) {
  2265. if (!options.allowPrototypes) {
  2266. return;
  2267. }
  2268. }
  2269. keys.push(segment[1]);
  2270. }
  2271. if (segment) {
  2272. if (options.strictDepth === true) {
  2273. throw new RangeError("Input depth exceeded depth option of " + options.depth + " and strictDepth is true");
  2274. }
  2275. keys.push("[" + key.slice(segment.index) + "]");
  2276. }
  2277. return parseObject(keys, val, options, valuesParsed);
  2278. };
  2279. var normalizeParseOptions = function normalizeParseOptions2(opts) {
  2280. if (!opts) {
  2281. return defaults;
  2282. }
  2283. if (typeof opts.allowEmptyArrays !== "undefined" && typeof opts.allowEmptyArrays !== "boolean") {
  2284. throw new TypeError("`allowEmptyArrays` option can only be `true` or `false`, when provided");
  2285. }
  2286. if (typeof opts.decodeDotInKeys !== "undefined" && typeof opts.decodeDotInKeys !== "boolean") {
  2287. throw new TypeError("`decodeDotInKeys` option can only be `true` or `false`, when provided");
  2288. }
  2289. if (opts.decoder !== null && typeof opts.decoder !== "undefined" && typeof opts.decoder !== "function") {
  2290. throw new TypeError("Decoder has to be a function.");
  2291. }
  2292. if (typeof opts.charset !== "undefined" && opts.charset !== "utf-8" && opts.charset !== "iso-8859-1") {
  2293. throw new TypeError("The charset option must be either utf-8, iso-8859-1, or undefined");
  2294. }
  2295. if (typeof opts.throwOnLimitExceeded !== "undefined" && typeof opts.throwOnLimitExceeded !== "boolean") {
  2296. throw new TypeError("`throwOnLimitExceeded` option must be a boolean");
  2297. }
  2298. var charset = typeof opts.charset === "undefined" ? defaults.charset : opts.charset;
  2299. var duplicates = typeof opts.duplicates === "undefined" ? defaults.duplicates : opts.duplicates;
  2300. if (duplicates !== "combine" && duplicates !== "first" && duplicates !== "last") {
  2301. throw new TypeError("The duplicates option must be either combine, first, or last");
  2302. }
  2303. var allowDots = typeof opts.allowDots === "undefined" ? opts.decodeDotInKeys === true ? true : defaults.allowDots : !!opts.allowDots;
  2304. return {
  2305. allowDots,
  2306. allowEmptyArrays: typeof opts.allowEmptyArrays === "boolean" ? !!opts.allowEmptyArrays : defaults.allowEmptyArrays,
  2307. allowPrototypes: typeof opts.allowPrototypes === "boolean" ? opts.allowPrototypes : defaults.allowPrototypes,
  2308. allowSparse: typeof opts.allowSparse === "boolean" ? opts.allowSparse : defaults.allowSparse,
  2309. arrayLimit: typeof opts.arrayLimit === "number" ? opts.arrayLimit : defaults.arrayLimit,
  2310. charset,
  2311. charsetSentinel: typeof opts.charsetSentinel === "boolean" ? opts.charsetSentinel : defaults.charsetSentinel,
  2312. comma: typeof opts.comma === "boolean" ? opts.comma : defaults.comma,
  2313. decodeDotInKeys: typeof opts.decodeDotInKeys === "boolean" ? opts.decodeDotInKeys : defaults.decodeDotInKeys,
  2314. decoder: typeof opts.decoder === "function" ? opts.decoder : defaults.decoder,
  2315. delimiter: typeof opts.delimiter === "string" || utils.isRegExp(opts.delimiter) ? opts.delimiter : defaults.delimiter,
  2316. // eslint-disable-next-line no-implicit-coercion, no-extra-parens
  2317. depth: typeof opts.depth === "number" || opts.depth === false ? +opts.depth : defaults.depth,
  2318. duplicates,
  2319. ignoreQueryPrefix: opts.ignoreQueryPrefix === true,
  2320. interpretNumericEntities: typeof opts.interpretNumericEntities === "boolean" ? opts.interpretNumericEntities : defaults.interpretNumericEntities,
  2321. parameterLimit: typeof opts.parameterLimit === "number" ? opts.parameterLimit : defaults.parameterLimit,
  2322. parseArrays: opts.parseArrays !== false,
  2323. plainObjects: typeof opts.plainObjects === "boolean" ? opts.plainObjects : defaults.plainObjects,
  2324. strictDepth: typeof opts.strictDepth === "boolean" ? !!opts.strictDepth : defaults.strictDepth,
  2325. strictNullHandling: typeof opts.strictNullHandling === "boolean" ? opts.strictNullHandling : defaults.strictNullHandling,
  2326. throwOnLimitExceeded: typeof opts.throwOnLimitExceeded === "boolean" ? opts.throwOnLimitExceeded : false
  2327. };
  2328. };
  2329. module.exports = function(str, opts) {
  2330. var options = normalizeParseOptions(opts);
  2331. if (str === "" || str === null || typeof str === "undefined") {
  2332. return options.plainObjects ? { __proto__: null } : {};
  2333. }
  2334. var tempObj = typeof str === "string" ? parseValues(str, options) : str;
  2335. var obj = options.plainObjects ? { __proto__: null } : {};
  2336. var keys = Object.keys(tempObj);
  2337. for (var i = 0; i < keys.length; ++i) {
  2338. var key = keys[i];
  2339. var newObj = parseKeys(key, tempObj[key], options, typeof str === "string");
  2340. obj = utils.merge(obj, newObj, options);
  2341. }
  2342. if (options.allowSparse === true) {
  2343. return obj;
  2344. }
  2345. return utils.compact(obj);
  2346. };
  2347. }
  2348. });
  2349. // node_modules/qs/lib/index.js
  2350. var require_lib = __commonJS({
  2351. "node_modules/qs/lib/index.js"(exports, module) {
  2352. var stringify = require_stringify();
  2353. var parse = require_parse();
  2354. var formats = require_formats();
  2355. module.exports = {
  2356. formats,
  2357. parse,
  2358. stringify
  2359. };
  2360. }
  2361. });
  2362. export default require_lib();
  2363. //# sourceMappingURL=qs.js.map