strapi-plugin-comments 3.0.0-beta.1 → 3.0.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (90) hide show
  1. package/README.md +81 -122
  2. package/dist/_chunks/{index-CY_AVWS-.js → index-B-ygLKrb.js} +417 -242
  3. package/dist/_chunks/{index-D3iNqWZT.mjs → index-BgN4aUMA.mjs} +5 -5
  4. package/dist/_chunks/{index-BBcsmSTs.mjs → index-Bx2boY6h.mjs} +420 -245
  5. package/dist/_chunks/{index-DJ32APz-.mjs → index-CIqMAf50.mjs} +1277 -1152
  6. package/dist/_chunks/{index-BXEk5PWx.js → index-CWfr5ejx.js} +20 -26
  7. package/dist/_chunks/{index-BFPteXuP.js → index-D8uskGzQ.js} +5 -5
  8. package/dist/_chunks/{index-Bcck91A8.js → index-DFAPx7Bl.js} +1290 -1144
  9. package/dist/_chunks/{index-D9MOkoQ2.mjs → index-Db2zwbpe.mjs} +20 -26
  10. package/dist/admin/index.js +1 -1
  11. package/dist/admin/index.mjs +1 -1
  12. package/dist/admin/src/api/client.d.ts +30 -50
  13. package/dist/admin/src/api/schemas.d.ts +432 -756
  14. package/dist/admin/src/components/UserAvatar/index.d.ts +1 -1
  15. package/dist/admin/src/hooks/useAPI.d.ts +30 -50
  16. package/dist/admin/src/hooks/useCommentsAll.d.ts +6 -10
  17. package/dist/admin/src/hooks/useReports.d.ts +6 -10
  18. package/dist/server/index.js +198 -144
  19. package/dist/server/index.mjs +198 -144
  20. package/dist/server/src/{@types-v5 → @types}/utils.d.ts +4 -0
  21. package/dist/server/src/bootstrap.d.ts +1 -1
  22. package/dist/server/src/config/index.d.ts +30 -0
  23. package/dist/server/src/content-types/index.d.ts +1 -1
  24. package/dist/server/src/controllers/admin.controller.d.ts +108 -29
  25. package/dist/server/src/controllers/client.controller.d.ts +117 -23
  26. package/dist/server/src/controllers/index.d.ts +297 -88
  27. package/dist/server/src/controllers/settings.controller.d.ts +33 -1
  28. package/dist/server/src/graphql/index.d.ts +1 -1
  29. package/dist/server/src/graphql/mutations/getCreateAbuseReport.d.ts +10 -4
  30. package/dist/server/src/graphql/mutations/getCreateComment.d.ts +10 -4
  31. package/dist/server/src/graphql/mutations/getRemoveComment.d.ts +10 -4
  32. package/dist/server/src/graphql/mutations/getUpdateComment.d.ts +10 -4
  33. package/dist/server/src/graphql/mutations/index.d.ts +2 -2
  34. package/dist/server/src/graphql/queries/findAllFlat.d.ts +18 -6
  35. package/dist/server/src/graphql/queries/findAllInHierarchy.d.ts +10 -4
  36. package/dist/server/src/graphql/queries/findAllPerAuthor.d.ts +18 -6
  37. package/dist/server/src/graphql/queries/index.d.ts +2 -2
  38. package/dist/server/src/graphql/types/getComment.d.ts +1 -1
  39. package/dist/server/src/graphql/types/getCommentAuthor.d.ts +1 -1
  40. package/dist/server/src/graphql/types/getCommentAuthorType.d.ts +1 -1
  41. package/dist/server/src/graphql/types/getCommentNested.d.ts +1 -1
  42. package/dist/server/src/graphql/types/getCreateComment.d.ts +1 -1
  43. package/dist/server/src/graphql/types/getCreateCommentAuthor.d.ts +1 -1
  44. package/dist/server/src/graphql/types/getCreateReport.d.ts +1 -1
  45. package/dist/server/src/graphql/types/getId.d.ts +1 -1
  46. package/dist/server/src/graphql/types/getIdentityAuthor.d.ts +1 -1
  47. package/dist/server/src/graphql/types/getRemoveComment.d.ts +1 -1
  48. package/dist/server/src/graphql/types/getReport.d.ts +1 -1
  49. package/dist/server/src/graphql/types/getReportReason.d.ts +1 -1
  50. package/dist/server/src/graphql/types/getResponseFindAll.d.ts +1 -1
  51. package/dist/server/src/graphql/types/getResponseFindAllPerAuthor.d.ts +1 -1
  52. package/dist/server/src/graphql/types/getResponseMeta.d.ts +1 -1
  53. package/dist/server/src/graphql/types/getResponsePagination.d.ts +1 -1
  54. package/dist/server/src/graphql/types/getUpdateComment.d.ts +1 -1
  55. package/dist/server/src/graphql/types/index.d.ts +1 -1
  56. package/dist/server/src/index.d.ts +921 -314
  57. package/dist/server/src/register/custom-fields/index.d.ts +1 -1
  58. package/dist/server/src/register/index.d.ts +1 -1
  59. package/dist/server/src/repositories/comment.repository.d.ts +10 -1
  60. package/dist/server/src/repositories/index.d.ts +0 -2
  61. package/dist/server/src/repositories/report.comment.repository.d.ts +38 -1
  62. package/dist/server/src/repositories/store.repository.d.ts +159 -3
  63. package/dist/server/src/repositories/utils.d.ts +1 -3
  64. package/dist/server/src/routes/admin.routes.d.ts +1 -1
  65. package/dist/server/src/routes/client.routes.d.ts +1 -1
  66. package/dist/server/src/routes/index.d.ts +2 -2
  67. package/dist/server/src/services/admin/admin.service.d.ts +232 -78
  68. package/dist/server/src/services/admin/utils.d.ts +1 -1
  69. package/dist/server/src/services/client.service.d.ts +177 -66
  70. package/dist/server/src/services/common.service.d.ts +60 -19
  71. package/dist/server/src/services/gql.service.d.ts +1 -1
  72. package/dist/server/src/services/index.d.ts +608 -222
  73. package/dist/server/src/services/settings.service.d.ts +25 -1
  74. package/dist/server/src/services/utils/functions.d.ts +1 -3
  75. package/dist/server/src/test/utils.d.ts +1 -0
  76. package/dist/server/src/utils/constants.d.ts +1 -1
  77. package/dist/server/src/utils/getConfig.d.ts +2 -2
  78. package/dist/server/src/utils/getPluginService.d.ts +2 -2
  79. package/dist/server/src/utils/throwError.d.ts +1 -1
  80. package/dist/server/src/validators/api/controllers/client.controller.validator.d.ts +10 -9
  81. package/dist/server/src/validators/api/controllers/settings.controller.validator.d.ts +4 -0
  82. package/dist/server/src/validators/repositories/comment.schema.d.ts +18 -3
  83. package/dist/server/src/validators/repositories/comment.validator.d.ts +384 -72
  84. package/dist/server/src/validators/repositories/reports.validator.d.ts +60 -18
  85. package/dist/server/src/validators/utils.d.ts +1 -1
  86. package/package.json +18 -12
  87. /package/dist/server/src/{@types-v5 → @types}/controllers.d.ts +0 -0
  88. /package/dist/server/src/{@types-v5 → @types}/index.d.ts +0 -0
  89. /package/dist/server/src/{@types-v5 → @types}/repositories.d.ts +0 -0
  90. /package/dist/server/src/{@types-v5 → @types}/routes.d.ts +0 -0
@@ -1,5 +1,5 @@
1
1
  import { jsx, jsxs } from "react/jsx-runtime";
2
- import { a8 as darkTheme, a9 as lightTheme, aa as DesignSystemProvider, ab as pluginPermissions, ac as __assign, ad as __rest, p as pluginId, ae as Dialog, F as Flex, af as ForwardRef$3, T as Typography, e as Button } from "./index-BBcsmSTs.mjs";
2
+ import { a8 as darkTheme, a9 as lightTheme, aa as DesignSystemProvider, ab as pluginPermissions, ac as __assign, ad as __rest, p as pluginId, ae as Dialog, F as Flex, af as ForwardRef$3, T as Typography, e as Button } from "./index-Bx2boY6h.mjs";
3
3
  import { useQuery, QueryClient, QueryClientProvider } from "@tanstack/react-query";
4
4
  import * as React from "react";
5
5
  import { useMemo, createContext, useState } from "react";
@@ -1158,7 +1158,7 @@ lodash.exports;
1158
1158
  function baseAt(object, paths) {
1159
1159
  var index = -1, length = paths.length, result2 = Array2(length), skip = object == null;
1160
1160
  while (++index < length) {
1161
- result2[index] = skip ? undefined$12 : get(object, paths[index]);
1161
+ result2[index] = skip ? undefined$12 : get2(object, paths[index]);
1162
1162
  }
1163
1163
  return result2;
1164
1164
  }
@@ -1603,7 +1603,7 @@ lodash.exports;
1603
1603
  return matchesStrictComparable(toKey(path), srcValue);
1604
1604
  }
1605
1605
  return function(object) {
1606
- var objValue = get(object, path);
1606
+ var objValue = get2(object, path);
1607
1607
  return objValue === undefined$12 && objValue === srcValue ? hasIn(object, path) : baseIsEqual(srcValue, objValue, COMPARE_PARTIAL_FLAG | COMPARE_UNORDERED_FLAG);
1608
1608
  };
1609
1609
  }
@@ -1930,7 +1930,7 @@ lodash.exports;
1930
1930
  return symbolToString ? symbolToString.call(value) : "";
1931
1931
  }
1932
1932
  var result2 = value + "";
1933
- return result2 == "0" && 1 / value == -INFINITY ? "-0" : result2;
1933
+ return result2 == "0" && 1 / value == -Infinity ? "-0" : result2;
1934
1934
  }
1935
1935
  function baseUniq(array, iteratee2, comparator) {
1936
1936
  var index = -1, includes2 = arrayIncludes, length = array.length, isCommon = true, result2 = [], seen = result2;
@@ -2482,7 +2482,7 @@ lodash.exports;
2482
2482
  bitmask |= isCurry ? WRAP_PARTIAL_FLAG : WRAP_PARTIAL_RIGHT_FLAG;
2483
2483
  bitmask &= ~(isCurry ? WRAP_PARTIAL_RIGHT_FLAG : WRAP_PARTIAL_FLAG);
2484
2484
  if (!(bitmask & WRAP_CURRY_BOUND_FLAG)) {
2485
- bitmask &= ~(WRAP_BIND_FLAG | WRAP_BIND_KEY_FLAG);
2485
+ bitmask &= -4;
2486
2486
  }
2487
2487
  var newData = [
2488
2488
  func,
@@ -2538,7 +2538,7 @@ lodash.exports;
2538
2538
  }
2539
2539
  var length = partials ? partials.length : 0;
2540
2540
  if (!length) {
2541
- bitmask &= ~(WRAP_PARTIAL_FLAG | WRAP_PARTIAL_RIGHT_FLAG);
2541
+ bitmask &= -97;
2542
2542
  partials = holders = undefined$12;
2543
2543
  }
2544
2544
  ary2 = ary2 === undefined$12 ? ary2 : nativeMax(toInteger(ary2), 0);
@@ -2571,7 +2571,7 @@ lodash.exports;
2571
2571
  holders = newData[4];
2572
2572
  arity = newData[9] = newData[9] === undefined$12 ? isBindKey ? 0 : func.length : nativeMax(newData[9] - length, 0);
2573
2573
  if (!arity && bitmask & (WRAP_CURRY_FLAG | WRAP_CURRY_RIGHT_FLAG)) {
2574
- bitmask &= ~(WRAP_CURRY_FLAG | WRAP_CURRY_RIGHT_FLAG);
2574
+ bitmask &= -25;
2575
2575
  }
2576
2576
  if (!bitmask || bitmask == WRAP_BIND_FLAG) {
2577
2577
  var result2 = createBind(func, bitmask, thisArg);
@@ -3137,7 +3137,7 @@ lodash.exports;
3137
3137
  return value;
3138
3138
  }
3139
3139
  var result2 = value + "";
3140
- return result2 == "0" && 1 / value == -INFINITY ? "-0" : result2;
3140
+ return result2 == "0" && 1 / value == -Infinity ? "-0" : result2;
3141
3141
  }
3142
3142
  function toSource(func) {
3143
3143
  if (func != null) {
@@ -4170,7 +4170,7 @@ lodash.exports;
4170
4170
  customizer = typeof customizer == "function" ? customizer : undefined$12;
4171
4171
  return baseIsMatch(object, source, getMatchData(source), customizer);
4172
4172
  }
4173
- function isNaN2(value) {
4173
+ function isNaN3(value) {
4174
4174
  return isNumber2(value) && value != +value;
4175
4175
  }
4176
4176
  function isNative(value) {
@@ -4201,7 +4201,7 @@ lodash.exports;
4201
4201
  }
4202
4202
  var isRegExp3 = nodeIsRegExp ? baseUnary(nodeIsRegExp) : baseIsRegExp;
4203
4203
  function isSafeInteger(value) {
4204
- return isInteger(value) && value >= -MAX_SAFE_INTEGER && value <= MAX_SAFE_INTEGER;
4204
+ return isInteger(value) && value >= -9007199254740991 && value <= MAX_SAFE_INTEGER;
4205
4205
  }
4206
4206
  var isSet2 = nodeIsSet ? baseUnary(nodeIsSet) : baseIsSet;
4207
4207
  function isString2(value) {
@@ -4242,9 +4242,9 @@ lodash.exports;
4242
4242
  return value === 0 ? value : 0;
4243
4243
  }
4244
4244
  value = toNumber(value);
4245
- if (value === INFINITY || value === -INFINITY) {
4246
- var sign = value < 0 ? -1 : 1;
4247
- return sign * MAX_INTEGER;
4245
+ if (value === INFINITY || value === -Infinity) {
4246
+ var sign3 = value < 0 ? -1 : 1;
4247
+ return sign3 * MAX_INTEGER;
4248
4248
  }
4249
4249
  return value === value ? value : 0;
4250
4250
  }
@@ -4277,7 +4277,7 @@ lodash.exports;
4277
4277
  return copyObject(value, keysIn(value));
4278
4278
  }
4279
4279
  function toSafeInteger(value) {
4280
- return value ? baseClamp(toInteger(value), -MAX_SAFE_INTEGER, MAX_SAFE_INTEGER) : value === 0 ? value : 0;
4280
+ return value ? baseClamp(toInteger(value), -9007199254740991, MAX_SAFE_INTEGER) : value === 0 ? value : 0;
4281
4281
  }
4282
4282
  function toString(value) {
4283
4283
  return value == null ? "" : baseToString(value);
@@ -4358,7 +4358,7 @@ lodash.exports;
4358
4358
  function functionsIn(object) {
4359
4359
  return object == null ? [] : baseFunctions(object, keysIn(object));
4360
4360
  }
4361
- function get(object, path, defaultValue) {
4361
+ function get2(object, path, defaultValue) {
4362
4362
  var result2 = object == null ? undefined$12 : baseGet(object, path);
4363
4363
  return result2 === undefined$12 ? defaultValue : result2;
4364
4364
  }
@@ -4998,7 +4998,7 @@ lodash.exports;
4998
4998
  var divide = createMathOperation(function(dividend, divisor) {
4999
4999
  return dividend / divisor;
5000
5000
  }, 1);
5001
- var floor = createRound("floor");
5001
+ var floor2 = createRound("floor");
5002
5002
  function max2(array) {
5003
5003
  return array && array.length ? baseExtremum(array, identity, baseGt) : undefined$12;
5004
5004
  }
@@ -5011,7 +5011,7 @@ lodash.exports;
5011
5011
  function meanBy(array, iteratee2) {
5012
5012
  return baseMean(array, getIteratee(iteratee2, 2));
5013
5013
  }
5014
- function min(array) {
5014
+ function min2(array) {
5015
5015
  return array && array.length ? baseExtremum(array, identity, baseLt) : undefined$12;
5016
5016
  }
5017
5017
  function minBy(array, iteratee2) {
@@ -5020,7 +5020,7 @@ lodash.exports;
5020
5020
  var multiply = createMathOperation(function(multiplier, multiplicand) {
5021
5021
  return multiplier * multiplicand;
5022
5022
  }, 1);
5023
- var round = createRound("round");
5023
+ var round2 = createRound("round");
5024
5024
  var subtract = createMathOperation(function(minuend, subtrahend) {
5025
5025
  return minuend - subtrahend;
5026
5026
  }, 0);
@@ -5209,14 +5209,14 @@ lodash.exports;
5209
5209
  lodash2.findLast = findLast;
5210
5210
  lodash2.findLastIndex = findLastIndex;
5211
5211
  lodash2.findLastKey = findLastKey;
5212
- lodash2.floor = floor;
5212
+ lodash2.floor = floor2;
5213
5213
  lodash2.forEach = forEach;
5214
5214
  lodash2.forEachRight = forEachRight;
5215
5215
  lodash2.forIn = forIn;
5216
5216
  lodash2.forInRight = forInRight;
5217
5217
  lodash2.forOwn = forOwn;
5218
5218
  lodash2.forOwnRight = forOwnRight;
5219
- lodash2.get = get;
5219
+ lodash2.get = get2;
5220
5220
  lodash2.gt = gt;
5221
5221
  lodash2.gte = gte;
5222
5222
  lodash2.has = has2;
@@ -5247,7 +5247,7 @@ lodash.exports;
5247
5247
  lodash2.isMap = isMap2;
5248
5248
  lodash2.isMatch = isMatch;
5249
5249
  lodash2.isMatchWith = isMatchWith;
5250
- lodash2.isNaN = isNaN2;
5250
+ lodash2.isNaN = isNaN3;
5251
5251
  lodash2.isNative = isNative;
5252
5252
  lodash2.isNil = isNil;
5253
5253
  lodash2.isNull = isNull;
@@ -5276,7 +5276,7 @@ lodash.exports;
5276
5276
  lodash2.maxBy = maxBy;
5277
5277
  lodash2.mean = mean;
5278
5278
  lodash2.meanBy = meanBy;
5279
- lodash2.min = min;
5279
+ lodash2.min = min2;
5280
5280
  lodash2.minBy = minBy;
5281
5281
  lodash2.stubArray = stubArray;
5282
5282
  lodash2.stubFalse = stubFalse;
@@ -5298,7 +5298,7 @@ lodash.exports;
5298
5298
  lodash2.repeat = repeat2;
5299
5299
  lodash2.replace = replace2;
5300
5300
  lodash2.result = result;
5301
- lodash2.round = round;
5301
+ lodash2.round = round2;
5302
5302
  lodash2.runInContext = runInContext2;
5303
5303
  lodash2.sample = sample;
5304
5304
  lodash2.size = size;
@@ -5515,824 +5515,196 @@ lodash.exports;
5515
5515
  }).call(commonjsGlobal);
5516
5516
  })(lodash, lodash.exports);
5517
5517
  var lodashExports = lodash.exports;
5518
- var esErrors = Error;
5519
- var _eval = EvalError;
5520
- var range = RangeError;
5521
- var ref = ReferenceError;
5522
- var syntax = SyntaxError;
5523
5518
  var type = TypeError;
5524
- var uri = URIError;
5525
- var shams = function hasSymbols() {
5526
- if (typeof Symbol !== "function" || typeof Object.getOwnPropertySymbols !== "function") {
5527
- return false;
5519
+ const __viteBrowserExternal = {};
5520
+ const __viteBrowserExternal$1 = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
5521
+ __proto__: null,
5522
+ default: __viteBrowserExternal
5523
+ }, Symbol.toStringTag, { value: "Module" }));
5524
+ const require$$0 = /* @__PURE__ */ getAugmentedNamespace(__viteBrowserExternal$1);
5525
+ var hasMap = typeof Map === "function" && Map.prototype;
5526
+ var mapSizeDescriptor = Object.getOwnPropertyDescriptor && hasMap ? Object.getOwnPropertyDescriptor(Map.prototype, "size") : null;
5527
+ var mapSize = hasMap && mapSizeDescriptor && typeof mapSizeDescriptor.get === "function" ? mapSizeDescriptor.get : null;
5528
+ var mapForEach = hasMap && Map.prototype.forEach;
5529
+ var hasSet = typeof Set === "function" && Set.prototype;
5530
+ var setSizeDescriptor = Object.getOwnPropertyDescriptor && hasSet ? Object.getOwnPropertyDescriptor(Set.prototype, "size") : null;
5531
+ var setSize = hasSet && setSizeDescriptor && typeof setSizeDescriptor.get === "function" ? setSizeDescriptor.get : null;
5532
+ var setForEach = hasSet && Set.prototype.forEach;
5533
+ var hasWeakMap = typeof WeakMap === "function" && WeakMap.prototype;
5534
+ var weakMapHas = hasWeakMap ? WeakMap.prototype.has : null;
5535
+ var hasWeakSet = typeof WeakSet === "function" && WeakSet.prototype;
5536
+ var weakSetHas = hasWeakSet ? WeakSet.prototype.has : null;
5537
+ var hasWeakRef = typeof WeakRef === "function" && WeakRef.prototype;
5538
+ var weakRefDeref = hasWeakRef ? WeakRef.prototype.deref : null;
5539
+ var booleanValueOf = Boolean.prototype.valueOf;
5540
+ var objectToString = Object.prototype.toString;
5541
+ var functionToString = Function.prototype.toString;
5542
+ var $match = String.prototype.match;
5543
+ var $slice = String.prototype.slice;
5544
+ var $replace$1 = String.prototype.replace;
5545
+ var $toUpperCase = String.prototype.toUpperCase;
5546
+ var $toLowerCase = String.prototype.toLowerCase;
5547
+ var $test = RegExp.prototype.test;
5548
+ var $concat$1 = Array.prototype.concat;
5549
+ var $join = Array.prototype.join;
5550
+ var $arrSlice = Array.prototype.slice;
5551
+ var $floor = Math.floor;
5552
+ var bigIntValueOf = typeof BigInt === "function" ? BigInt.prototype.valueOf : null;
5553
+ var gOPS = Object.getOwnPropertySymbols;
5554
+ var symToString = typeof Symbol === "function" && typeof Symbol.iterator === "symbol" ? Symbol.prototype.toString : null;
5555
+ var hasShammedSymbols = typeof Symbol === "function" && typeof Symbol.iterator === "object";
5556
+ var toStringTag = typeof Symbol === "function" && Symbol.toStringTag && (typeof Symbol.toStringTag === hasShammedSymbols ? "object" : "symbol") ? Symbol.toStringTag : null;
5557
+ var isEnumerable = Object.prototype.propertyIsEnumerable;
5558
+ var gPO = (typeof Reflect === "function" ? Reflect.getPrototypeOf : Object.getPrototypeOf) || ([].__proto__ === Array.prototype ? function(O) {
5559
+ return O.__proto__;
5560
+ } : null);
5561
+ function addNumericSeparator(num, str) {
5562
+ if (num === Infinity || num === -Infinity || num !== num || num && num > -1e3 && num < 1e3 || $test.call(/e/, str)) {
5563
+ return str;
5528
5564
  }
5529
- if (typeof Symbol.iterator === "symbol") {
5530
- return true;
5565
+ var sepRegex = /[0-9](?=(?:[0-9]{3})+(?![0-9]))/g;
5566
+ if (typeof num === "number") {
5567
+ var int = num < 0 ? -$floor(-num) : $floor(num);
5568
+ if (int !== num) {
5569
+ var intStr = String(int);
5570
+ var dec = $slice.call(str, intStr.length + 1);
5571
+ return $replace$1.call(intStr, sepRegex, "$&_") + "." + $replace$1.call($replace$1.call(dec, /([0-9]{3})/g, "$&_"), /_$/, "");
5572
+ }
5531
5573
  }
5532
- var obj = {};
5533
- var sym = Symbol("test");
5534
- var symObj = Object(sym);
5535
- if (typeof sym === "string") {
5536
- return false;
5574
+ return $replace$1.call(str, sepRegex, "$&_");
5575
+ }
5576
+ var utilInspect = require$$0;
5577
+ var inspectCustom = utilInspect.custom;
5578
+ var inspectSymbol = isSymbol(inspectCustom) ? inspectCustom : null;
5579
+ var quotes = {
5580
+ __proto__: null,
5581
+ "double": '"',
5582
+ single: "'"
5583
+ };
5584
+ var quoteREs = {
5585
+ __proto__: null,
5586
+ "double": /(["\\])/g,
5587
+ single: /(['\\])/g
5588
+ };
5589
+ var objectInspect = function inspect_(obj, options, depth, seen) {
5590
+ var opts = options || {};
5591
+ if (has$3(opts, "quoteStyle") && !has$3(quotes, opts.quoteStyle)) {
5592
+ throw new TypeError('option "quoteStyle" must be "single" or "double"');
5537
5593
  }
5538
- if (Object.prototype.toString.call(sym) !== "[object Symbol]") {
5539
- return false;
5594
+ if (has$3(opts, "maxStringLength") && (typeof opts.maxStringLength === "number" ? opts.maxStringLength < 0 && opts.maxStringLength !== Infinity : opts.maxStringLength !== null)) {
5595
+ throw new TypeError('option "maxStringLength", if provided, must be a positive integer, Infinity, or `null`');
5540
5596
  }
5541
- if (Object.prototype.toString.call(symObj) !== "[object Symbol]") {
5542
- return false;
5597
+ var customInspect = has$3(opts, "customInspect") ? opts.customInspect : true;
5598
+ if (typeof customInspect !== "boolean" && customInspect !== "symbol") {
5599
+ throw new TypeError("option \"customInspect\", if provided, must be `true`, `false`, or `'symbol'`");
5543
5600
  }
5544
- var symVal = 42;
5545
- obj[sym] = symVal;
5546
- for (sym in obj) {
5547
- return false;
5601
+ if (has$3(opts, "indent") && opts.indent !== null && opts.indent !== " " && !(parseInt(opts.indent, 10) === opts.indent && opts.indent > 0)) {
5602
+ throw new TypeError('option "indent" must be "\\t", an integer > 0, or `null`');
5548
5603
  }
5549
- if (typeof Object.keys === "function" && Object.keys(obj).length !== 0) {
5550
- return false;
5604
+ if (has$3(opts, "numericSeparator") && typeof opts.numericSeparator !== "boolean") {
5605
+ throw new TypeError('option "numericSeparator", if provided, must be `true` or `false`');
5551
5606
  }
5552
- if (typeof Object.getOwnPropertyNames === "function" && Object.getOwnPropertyNames(obj).length !== 0) {
5553
- return false;
5607
+ var numericSeparator = opts.numericSeparator;
5608
+ if (typeof obj === "undefined") {
5609
+ return "undefined";
5554
5610
  }
5555
- var syms = Object.getOwnPropertySymbols(obj);
5556
- if (syms.length !== 1 || syms[0] !== sym) {
5557
- return false;
5611
+ if (obj === null) {
5612
+ return "null";
5558
5613
  }
5559
- if (!Object.prototype.propertyIsEnumerable.call(obj, sym)) {
5560
- return false;
5614
+ if (typeof obj === "boolean") {
5615
+ return obj ? "true" : "false";
5561
5616
  }
5562
- if (typeof Object.getOwnPropertyDescriptor === "function") {
5563
- var descriptor = Object.getOwnPropertyDescriptor(obj, sym);
5564
- if (descriptor.value !== symVal || descriptor.enumerable !== true) {
5565
- return false;
5617
+ if (typeof obj === "string") {
5618
+ return inspectString(obj, opts);
5619
+ }
5620
+ if (typeof obj === "number") {
5621
+ if (obj === 0) {
5622
+ return Infinity / obj > 0 ? "0" : "-0";
5566
5623
  }
5624
+ var str = String(obj);
5625
+ return numericSeparator ? addNumericSeparator(obj, str) : str;
5567
5626
  }
5568
- return true;
5569
- };
5570
- var origSymbol = typeof Symbol !== "undefined" && Symbol;
5571
- var hasSymbolSham = shams;
5572
- var hasSymbols$1 = function hasNativeSymbols() {
5573
- if (typeof origSymbol !== "function") {
5574
- return false;
5627
+ if (typeof obj === "bigint") {
5628
+ var bigIntStr = String(obj) + "n";
5629
+ return numericSeparator ? addNumericSeparator(obj, bigIntStr) : bigIntStr;
5575
5630
  }
5576
- if (typeof Symbol !== "function") {
5577
- return false;
5631
+ var maxDepth = typeof opts.depth === "undefined" ? 5 : opts.depth;
5632
+ if (typeof depth === "undefined") {
5633
+ depth = 0;
5578
5634
  }
5579
- if (typeof origSymbol("foo") !== "symbol") {
5580
- return false;
5635
+ if (depth >= maxDepth && maxDepth > 0 && typeof obj === "object") {
5636
+ return isArray$3(obj) ? "[Array]" : "[Object]";
5581
5637
  }
5582
- if (typeof Symbol("bar") !== "symbol") {
5583
- return false;
5638
+ var indent = getIndent(opts, depth);
5639
+ if (typeof seen === "undefined") {
5640
+ seen = [];
5641
+ } else if (indexOf(seen, obj) >= 0) {
5642
+ return "[Circular]";
5584
5643
  }
5585
- return hasSymbolSham();
5586
- };
5587
- var test = {
5588
- __proto__: null,
5589
- foo: {}
5590
- };
5591
- var $Object = Object;
5592
- var hasProto$1 = function hasProto() {
5593
- return { __proto__: test }.foo === test.foo && !(test instanceof $Object);
5594
- };
5595
- var ERROR_MESSAGE = "Function.prototype.bind called on incompatible ";
5596
- var toStr$1 = Object.prototype.toString;
5597
- var max = Math.max;
5598
- var funcType = "[object Function]";
5599
- var concatty = function concatty2(a, b) {
5600
- var arr = [];
5601
- for (var i = 0; i < a.length; i += 1) {
5602
- arr[i] = a[i];
5644
+ function inspect2(value, from, noIndent) {
5645
+ if (from) {
5646
+ seen = $arrSlice.call(seen);
5647
+ seen.push(from);
5648
+ }
5649
+ if (noIndent) {
5650
+ var newOpts = {
5651
+ depth: opts.depth
5652
+ };
5653
+ if (has$3(opts, "quoteStyle")) {
5654
+ newOpts.quoteStyle = opts.quoteStyle;
5655
+ }
5656
+ return inspect_(value, newOpts, depth + 1, seen);
5657
+ }
5658
+ return inspect_(value, opts, depth + 1, seen);
5603
5659
  }
5604
- for (var j = 0; j < b.length; j += 1) {
5605
- arr[j + a.length] = b[j];
5660
+ if (typeof obj === "function" && !isRegExp$1(obj)) {
5661
+ var name = nameOf(obj);
5662
+ var keys = arrObjKeys(obj, inspect2);
5663
+ return "[Function" + (name ? ": " + name : " (anonymous)") + "]" + (keys.length > 0 ? " { " + $join.call(keys, ", ") + " }" : "");
5606
5664
  }
5607
- return arr;
5608
- };
5609
- var slicy = function slicy2(arrLike, offset) {
5610
- var arr = [];
5611
- for (var i = offset, j = 0; i < arrLike.length; i += 1, j += 1) {
5612
- arr[j] = arrLike[i];
5665
+ if (isSymbol(obj)) {
5666
+ var symString = hasShammedSymbols ? $replace$1.call(String(obj), /^(Symbol\(.*\))_[^)]*$/, "$1") : symToString.call(obj);
5667
+ return typeof obj === "object" && !hasShammedSymbols ? markBoxed(symString) : symString;
5613
5668
  }
5614
- return arr;
5615
- };
5616
- var joiny = function(arr, joiner) {
5617
- var str = "";
5618
- for (var i = 0; i < arr.length; i += 1) {
5619
- str += arr[i];
5620
- if (i + 1 < arr.length) {
5621
- str += joiner;
5669
+ if (isElement(obj)) {
5670
+ var s = "<" + $toLowerCase.call(String(obj.nodeName));
5671
+ var attrs = obj.attributes || [];
5672
+ for (var i = 0; i < attrs.length; i++) {
5673
+ s += " " + attrs[i].name + "=" + wrapQuotes(quote(attrs[i].value), "double", opts);
5674
+ }
5675
+ s += ">";
5676
+ if (obj.childNodes && obj.childNodes.length) {
5677
+ s += "...";
5622
5678
  }
5679
+ s += "</" + $toLowerCase.call(String(obj.nodeName)) + ">";
5680
+ return s;
5623
5681
  }
5624
- return str;
5625
- };
5626
- var implementation$1 = function bind(that) {
5627
- var target = this;
5628
- if (typeof target !== "function" || toStr$1.apply(target) !== funcType) {
5629
- throw new TypeError(ERROR_MESSAGE + target);
5682
+ if (isArray$3(obj)) {
5683
+ if (obj.length === 0) {
5684
+ return "[]";
5685
+ }
5686
+ var xs = arrObjKeys(obj, inspect2);
5687
+ if (indent && !singleLineValues(xs)) {
5688
+ return "[" + indentedJoin(xs, indent) + "]";
5689
+ }
5690
+ return "[ " + $join.call(xs, ", ") + " ]";
5630
5691
  }
5631
- var args = slicy(arguments, 1);
5632
- var bound;
5633
- var binder = function() {
5634
- if (this instanceof bound) {
5635
- var result = target.apply(
5636
- this,
5637
- concatty(args, arguments)
5638
- );
5639
- if (Object(result) === result) {
5640
- return result;
5641
- }
5642
- return this;
5692
+ if (isError(obj)) {
5693
+ var parts = arrObjKeys(obj, inspect2);
5694
+ if (!("cause" in Error.prototype) && "cause" in obj && !isEnumerable.call(obj, "cause")) {
5695
+ return "{ [" + String(obj) + "] " + $join.call($concat$1.call("[cause]: " + inspect2(obj.cause), parts), ", ") + " }";
5643
5696
  }
5644
- return target.apply(
5645
- that,
5646
- concatty(args, arguments)
5647
- );
5648
- };
5649
- var boundLength = max(0, target.length - args.length);
5650
- var boundArgs = [];
5651
- for (var i = 0; i < boundLength; i++) {
5652
- boundArgs[i] = "$" + i;
5697
+ if (parts.length === 0) {
5698
+ return "[" + String(obj) + "]";
5699
+ }
5700
+ return "{ [" + String(obj) + "] " + $join.call(parts, ", ") + " }";
5653
5701
  }
5654
- bound = Function("binder", "return function (" + joiny(boundArgs, ",") + "){ return binder.apply(this,arguments); }")(binder);
5655
- if (target.prototype) {
5656
- var Empty = function Empty2() {
5657
- };
5658
- Empty.prototype = target.prototype;
5659
- bound.prototype = new Empty();
5660
- Empty.prototype = null;
5661
- }
5662
- return bound;
5663
- };
5664
- var implementation = implementation$1;
5665
- var functionBind = Function.prototype.bind || implementation;
5666
- var call = Function.prototype.call;
5667
- var $hasOwn = Object.prototype.hasOwnProperty;
5668
- var bind$1 = functionBind;
5669
- var hasown = bind$1.call(call, $hasOwn);
5670
- var undefined$1;
5671
- var $Error = esErrors;
5672
- var $EvalError = _eval;
5673
- var $RangeError = range;
5674
- var $ReferenceError = ref;
5675
- var $SyntaxError$1 = syntax;
5676
- var $TypeError$3 = type;
5677
- var $URIError = uri;
5678
- var $Function = Function;
5679
- var getEvalledConstructor = function(expressionSyntax) {
5680
- try {
5681
- return $Function('"use strict"; return (' + expressionSyntax + ").constructor;")();
5682
- } catch (e) {
5683
- }
5684
- };
5685
- var $gOPD$1 = Object.getOwnPropertyDescriptor;
5686
- if ($gOPD$1) {
5687
- try {
5688
- $gOPD$1({}, "");
5689
- } catch (e) {
5690
- $gOPD$1 = null;
5691
- }
5692
- }
5693
- var throwTypeError = function() {
5694
- throw new $TypeError$3();
5695
- };
5696
- var ThrowTypeError = $gOPD$1 ? function() {
5697
- try {
5698
- arguments.callee;
5699
- return throwTypeError;
5700
- } catch (calleeThrows) {
5701
- try {
5702
- return $gOPD$1(arguments, "callee").get;
5703
- } catch (gOPDthrows) {
5704
- return throwTypeError;
5705
- }
5706
- }
5707
- }() : throwTypeError;
5708
- var hasSymbols2 = hasSymbols$1();
5709
- var hasProto2 = hasProto$1();
5710
- var getProto = Object.getPrototypeOf || (hasProto2 ? function(x) {
5711
- return x.__proto__;
5712
- } : null);
5713
- var needsEval = {};
5714
- var TypedArray = typeof Uint8Array === "undefined" || !getProto ? undefined$1 : getProto(Uint8Array);
5715
- var INTRINSICS = {
5716
- __proto__: null,
5717
- "%AggregateError%": typeof AggregateError === "undefined" ? undefined$1 : AggregateError,
5718
- "%Array%": Array,
5719
- "%ArrayBuffer%": typeof ArrayBuffer === "undefined" ? undefined$1 : ArrayBuffer,
5720
- "%ArrayIteratorPrototype%": hasSymbols2 && getProto ? getProto([][Symbol.iterator]()) : undefined$1,
5721
- "%AsyncFromSyncIteratorPrototype%": undefined$1,
5722
- "%AsyncFunction%": needsEval,
5723
- "%AsyncGenerator%": needsEval,
5724
- "%AsyncGeneratorFunction%": needsEval,
5725
- "%AsyncIteratorPrototype%": needsEval,
5726
- "%Atomics%": typeof Atomics === "undefined" ? undefined$1 : Atomics,
5727
- "%BigInt%": typeof BigInt === "undefined" ? undefined$1 : BigInt,
5728
- "%BigInt64Array%": typeof BigInt64Array === "undefined" ? undefined$1 : BigInt64Array,
5729
- "%BigUint64Array%": typeof BigUint64Array === "undefined" ? undefined$1 : BigUint64Array,
5730
- "%Boolean%": Boolean,
5731
- "%DataView%": typeof DataView === "undefined" ? undefined$1 : DataView,
5732
- "%Date%": Date,
5733
- "%decodeURI%": decodeURI,
5734
- "%decodeURIComponent%": decodeURIComponent,
5735
- "%encodeURI%": encodeURI,
5736
- "%encodeURIComponent%": encodeURIComponent,
5737
- "%Error%": $Error,
5738
- "%eval%": eval,
5739
- // eslint-disable-line no-eval
5740
- "%EvalError%": $EvalError,
5741
- "%Float32Array%": typeof Float32Array === "undefined" ? undefined$1 : Float32Array,
5742
- "%Float64Array%": typeof Float64Array === "undefined" ? undefined$1 : Float64Array,
5743
- "%FinalizationRegistry%": typeof FinalizationRegistry === "undefined" ? undefined$1 : FinalizationRegistry,
5744
- "%Function%": $Function,
5745
- "%GeneratorFunction%": needsEval,
5746
- "%Int8Array%": typeof Int8Array === "undefined" ? undefined$1 : Int8Array,
5747
- "%Int16Array%": typeof Int16Array === "undefined" ? undefined$1 : Int16Array,
5748
- "%Int32Array%": typeof Int32Array === "undefined" ? undefined$1 : Int32Array,
5749
- "%isFinite%": isFinite,
5750
- "%isNaN%": isNaN,
5751
- "%IteratorPrototype%": hasSymbols2 && getProto ? getProto(getProto([][Symbol.iterator]())) : undefined$1,
5752
- "%JSON%": typeof JSON === "object" ? JSON : undefined$1,
5753
- "%Map%": typeof Map === "undefined" ? undefined$1 : Map,
5754
- "%MapIteratorPrototype%": typeof Map === "undefined" || !hasSymbols2 || !getProto ? undefined$1 : getProto((/* @__PURE__ */ new Map())[Symbol.iterator]()),
5755
- "%Math%": Math,
5756
- "%Number%": Number,
5757
- "%Object%": Object,
5758
- "%parseFloat%": parseFloat,
5759
- "%parseInt%": parseInt,
5760
- "%Promise%": typeof Promise === "undefined" ? undefined$1 : Promise,
5761
- "%Proxy%": typeof Proxy === "undefined" ? undefined$1 : Proxy,
5762
- "%RangeError%": $RangeError,
5763
- "%ReferenceError%": $ReferenceError,
5764
- "%Reflect%": typeof Reflect === "undefined" ? undefined$1 : Reflect,
5765
- "%RegExp%": RegExp,
5766
- "%Set%": typeof Set === "undefined" ? undefined$1 : Set,
5767
- "%SetIteratorPrototype%": typeof Set === "undefined" || !hasSymbols2 || !getProto ? undefined$1 : getProto((/* @__PURE__ */ new Set())[Symbol.iterator]()),
5768
- "%SharedArrayBuffer%": typeof SharedArrayBuffer === "undefined" ? undefined$1 : SharedArrayBuffer,
5769
- "%String%": String,
5770
- "%StringIteratorPrototype%": hasSymbols2 && getProto ? getProto(""[Symbol.iterator]()) : undefined$1,
5771
- "%Symbol%": hasSymbols2 ? Symbol : undefined$1,
5772
- "%SyntaxError%": $SyntaxError$1,
5773
- "%ThrowTypeError%": ThrowTypeError,
5774
- "%TypedArray%": TypedArray,
5775
- "%TypeError%": $TypeError$3,
5776
- "%Uint8Array%": typeof Uint8Array === "undefined" ? undefined$1 : Uint8Array,
5777
- "%Uint8ClampedArray%": typeof Uint8ClampedArray === "undefined" ? undefined$1 : Uint8ClampedArray,
5778
- "%Uint16Array%": typeof Uint16Array === "undefined" ? undefined$1 : Uint16Array,
5779
- "%Uint32Array%": typeof Uint32Array === "undefined" ? undefined$1 : Uint32Array,
5780
- "%URIError%": $URIError,
5781
- "%WeakMap%": typeof WeakMap === "undefined" ? undefined$1 : WeakMap,
5782
- "%WeakRef%": typeof WeakRef === "undefined" ? undefined$1 : WeakRef,
5783
- "%WeakSet%": typeof WeakSet === "undefined" ? undefined$1 : WeakSet
5784
- };
5785
- if (getProto) {
5786
- try {
5787
- null.error;
5788
- } catch (e) {
5789
- var errorProto = getProto(getProto(e));
5790
- INTRINSICS["%Error.prototype%"] = errorProto;
5791
- }
5792
- }
5793
- var doEval = function doEval2(name) {
5794
- var value;
5795
- if (name === "%AsyncFunction%") {
5796
- value = getEvalledConstructor("async function () {}");
5797
- } else if (name === "%GeneratorFunction%") {
5798
- value = getEvalledConstructor("function* () {}");
5799
- } else if (name === "%AsyncGeneratorFunction%") {
5800
- value = getEvalledConstructor("async function* () {}");
5801
- } else if (name === "%AsyncGenerator%") {
5802
- var fn = doEval2("%AsyncGeneratorFunction%");
5803
- if (fn) {
5804
- value = fn.prototype;
5805
- }
5806
- } else if (name === "%AsyncIteratorPrototype%") {
5807
- var gen = doEval2("%AsyncGenerator%");
5808
- if (gen && getProto) {
5809
- value = getProto(gen.prototype);
5810
- }
5811
- }
5812
- INTRINSICS[name] = value;
5813
- return value;
5814
- };
5815
- var LEGACY_ALIASES = {
5816
- __proto__: null,
5817
- "%ArrayBufferPrototype%": ["ArrayBuffer", "prototype"],
5818
- "%ArrayPrototype%": ["Array", "prototype"],
5819
- "%ArrayProto_entries%": ["Array", "prototype", "entries"],
5820
- "%ArrayProto_forEach%": ["Array", "prototype", "forEach"],
5821
- "%ArrayProto_keys%": ["Array", "prototype", "keys"],
5822
- "%ArrayProto_values%": ["Array", "prototype", "values"],
5823
- "%AsyncFunctionPrototype%": ["AsyncFunction", "prototype"],
5824
- "%AsyncGenerator%": ["AsyncGeneratorFunction", "prototype"],
5825
- "%AsyncGeneratorPrototype%": ["AsyncGeneratorFunction", "prototype", "prototype"],
5826
- "%BooleanPrototype%": ["Boolean", "prototype"],
5827
- "%DataViewPrototype%": ["DataView", "prototype"],
5828
- "%DatePrototype%": ["Date", "prototype"],
5829
- "%ErrorPrototype%": ["Error", "prototype"],
5830
- "%EvalErrorPrototype%": ["EvalError", "prototype"],
5831
- "%Float32ArrayPrototype%": ["Float32Array", "prototype"],
5832
- "%Float64ArrayPrototype%": ["Float64Array", "prototype"],
5833
- "%FunctionPrototype%": ["Function", "prototype"],
5834
- "%Generator%": ["GeneratorFunction", "prototype"],
5835
- "%GeneratorPrototype%": ["GeneratorFunction", "prototype", "prototype"],
5836
- "%Int8ArrayPrototype%": ["Int8Array", "prototype"],
5837
- "%Int16ArrayPrototype%": ["Int16Array", "prototype"],
5838
- "%Int32ArrayPrototype%": ["Int32Array", "prototype"],
5839
- "%JSONParse%": ["JSON", "parse"],
5840
- "%JSONStringify%": ["JSON", "stringify"],
5841
- "%MapPrototype%": ["Map", "prototype"],
5842
- "%NumberPrototype%": ["Number", "prototype"],
5843
- "%ObjectPrototype%": ["Object", "prototype"],
5844
- "%ObjProto_toString%": ["Object", "prototype", "toString"],
5845
- "%ObjProto_valueOf%": ["Object", "prototype", "valueOf"],
5846
- "%PromisePrototype%": ["Promise", "prototype"],
5847
- "%PromiseProto_then%": ["Promise", "prototype", "then"],
5848
- "%Promise_all%": ["Promise", "all"],
5849
- "%Promise_reject%": ["Promise", "reject"],
5850
- "%Promise_resolve%": ["Promise", "resolve"],
5851
- "%RangeErrorPrototype%": ["RangeError", "prototype"],
5852
- "%ReferenceErrorPrototype%": ["ReferenceError", "prototype"],
5853
- "%RegExpPrototype%": ["RegExp", "prototype"],
5854
- "%SetPrototype%": ["Set", "prototype"],
5855
- "%SharedArrayBufferPrototype%": ["SharedArrayBuffer", "prototype"],
5856
- "%StringPrototype%": ["String", "prototype"],
5857
- "%SymbolPrototype%": ["Symbol", "prototype"],
5858
- "%SyntaxErrorPrototype%": ["SyntaxError", "prototype"],
5859
- "%TypedArrayPrototype%": ["TypedArray", "prototype"],
5860
- "%TypeErrorPrototype%": ["TypeError", "prototype"],
5861
- "%Uint8ArrayPrototype%": ["Uint8Array", "prototype"],
5862
- "%Uint8ClampedArrayPrototype%": ["Uint8ClampedArray", "prototype"],
5863
- "%Uint16ArrayPrototype%": ["Uint16Array", "prototype"],
5864
- "%Uint32ArrayPrototype%": ["Uint32Array", "prototype"],
5865
- "%URIErrorPrototype%": ["URIError", "prototype"],
5866
- "%WeakMapPrototype%": ["WeakMap", "prototype"],
5867
- "%WeakSetPrototype%": ["WeakSet", "prototype"]
5868
- };
5869
- var bind2 = functionBind;
5870
- var hasOwn$1 = hasown;
5871
- var $concat$1 = bind2.call(Function.call, Array.prototype.concat);
5872
- var $spliceApply = bind2.call(Function.apply, Array.prototype.splice);
5873
- var $replace$1 = bind2.call(Function.call, String.prototype.replace);
5874
- var $strSlice = bind2.call(Function.call, String.prototype.slice);
5875
- var $exec = bind2.call(Function.call, RegExp.prototype.exec);
5876
- var rePropName = /[^%.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|%$))/g;
5877
- var reEscapeChar = /\\(\\)?/g;
5878
- var stringToPath = function stringToPath2(string) {
5879
- var first = $strSlice(string, 0, 1);
5880
- var last = $strSlice(string, -1);
5881
- if (first === "%" && last !== "%") {
5882
- throw new $SyntaxError$1("invalid intrinsic syntax, expected closing `%`");
5883
- } else if (last === "%" && first !== "%") {
5884
- throw new $SyntaxError$1("invalid intrinsic syntax, expected opening `%`");
5885
- }
5886
- var result = [];
5887
- $replace$1(string, rePropName, function(match, number, quote2, subString) {
5888
- result[result.length] = quote2 ? $replace$1(subString, reEscapeChar, "$1") : number || match;
5889
- });
5890
- return result;
5891
- };
5892
- var getBaseIntrinsic = function getBaseIntrinsic2(name, allowMissing) {
5893
- var intrinsicName = name;
5894
- var alias;
5895
- if (hasOwn$1(LEGACY_ALIASES, intrinsicName)) {
5896
- alias = LEGACY_ALIASES[intrinsicName];
5897
- intrinsicName = "%" + alias[0] + "%";
5898
- }
5899
- if (hasOwn$1(INTRINSICS, intrinsicName)) {
5900
- var value = INTRINSICS[intrinsicName];
5901
- if (value === needsEval) {
5902
- value = doEval(intrinsicName);
5903
- }
5904
- if (typeof value === "undefined" && !allowMissing) {
5905
- throw new $TypeError$3("intrinsic " + name + " exists, but is not available. Please file an issue!");
5906
- }
5907
- return {
5908
- alias,
5909
- name: intrinsicName,
5910
- value
5911
- };
5912
- }
5913
- throw new $SyntaxError$1("intrinsic " + name + " does not exist!");
5914
- };
5915
- var getIntrinsic = function GetIntrinsic(name, allowMissing) {
5916
- if (typeof name !== "string" || name.length === 0) {
5917
- throw new $TypeError$3("intrinsic name must be a non-empty string");
5918
- }
5919
- if (arguments.length > 1 && typeof allowMissing !== "boolean") {
5920
- throw new $TypeError$3('"allowMissing" argument must be a boolean');
5921
- }
5922
- if ($exec(/^%?[^%]*%?$/, name) === null) {
5923
- throw new $SyntaxError$1("`%` may not be present anywhere but at the beginning and end of the intrinsic name");
5924
- }
5925
- var parts = stringToPath(name);
5926
- var intrinsicBaseName = parts.length > 0 ? parts[0] : "";
5927
- var intrinsic = getBaseIntrinsic("%" + intrinsicBaseName + "%", allowMissing);
5928
- var intrinsicRealName = intrinsic.name;
5929
- var value = intrinsic.value;
5930
- var skipFurtherCaching = false;
5931
- var alias = intrinsic.alias;
5932
- if (alias) {
5933
- intrinsicBaseName = alias[0];
5934
- $spliceApply(parts, $concat$1([0, 1], alias));
5935
- }
5936
- for (var i = 1, isOwn = true; i < parts.length; i += 1) {
5937
- var part = parts[i];
5938
- var first = $strSlice(part, 0, 1);
5939
- var last = $strSlice(part, -1);
5940
- if ((first === '"' || first === "'" || first === "`" || (last === '"' || last === "'" || last === "`")) && first !== last) {
5941
- throw new $SyntaxError$1("property names with quotes must have matching quotes");
5942
- }
5943
- if (part === "constructor" || !isOwn) {
5944
- skipFurtherCaching = true;
5945
- }
5946
- intrinsicBaseName += "." + part;
5947
- intrinsicRealName = "%" + intrinsicBaseName + "%";
5948
- if (hasOwn$1(INTRINSICS, intrinsicRealName)) {
5949
- value = INTRINSICS[intrinsicRealName];
5950
- } else if (value != null) {
5951
- if (!(part in value)) {
5952
- if (!allowMissing) {
5953
- throw new $TypeError$3("base intrinsic for " + name + " exists, but the property is not available.");
5954
- }
5955
- return void 0;
5956
- }
5957
- if ($gOPD$1 && i + 1 >= parts.length) {
5958
- var desc = $gOPD$1(value, part);
5959
- isOwn = !!desc;
5960
- if (isOwn && "get" in desc && !("originalValue" in desc.get)) {
5961
- value = desc.get;
5962
- } else {
5963
- value = value[part];
5964
- }
5965
- } else {
5966
- isOwn = hasOwn$1(value, part);
5967
- value = value[part];
5968
- }
5969
- if (isOwn && !skipFurtherCaching) {
5970
- INTRINSICS[intrinsicRealName] = value;
5971
- }
5972
- }
5973
- }
5974
- return value;
5975
- };
5976
- var callBind$1 = { exports: {} };
5977
- var esDefineProperty;
5978
- var hasRequiredEsDefineProperty;
5979
- function requireEsDefineProperty() {
5980
- if (hasRequiredEsDefineProperty) return esDefineProperty;
5981
- hasRequiredEsDefineProperty = 1;
5982
- var GetIntrinsic3 = getIntrinsic;
5983
- var $defineProperty2 = GetIntrinsic3("%Object.defineProperty%", true) || false;
5984
- if ($defineProperty2) {
5985
- try {
5986
- $defineProperty2({}, "a", { value: 1 });
5987
- } catch (e) {
5988
- $defineProperty2 = false;
5989
- }
5990
- }
5991
- esDefineProperty = $defineProperty2;
5992
- return esDefineProperty;
5993
- }
5994
- var GetIntrinsic$3 = getIntrinsic;
5995
- var $gOPD = GetIntrinsic$3("%Object.getOwnPropertyDescriptor%", true);
5996
- if ($gOPD) {
5997
- try {
5998
- $gOPD([], "length");
5999
- } catch (e) {
6000
- $gOPD = null;
6001
- }
6002
- }
6003
- var gopd$1 = $gOPD;
6004
- var $defineProperty$1 = requireEsDefineProperty();
6005
- var $SyntaxError = syntax;
6006
- var $TypeError$2 = type;
6007
- var gopd = gopd$1;
6008
- var defineDataProperty = function defineDataProperty2(obj, property, value) {
6009
- if (!obj || typeof obj !== "object" && typeof obj !== "function") {
6010
- throw new $TypeError$2("`obj` must be an object or a function`");
6011
- }
6012
- if (typeof property !== "string" && typeof property !== "symbol") {
6013
- throw new $TypeError$2("`property` must be a string or a symbol`");
6014
- }
6015
- if (arguments.length > 3 && typeof arguments[3] !== "boolean" && arguments[3] !== null) {
6016
- throw new $TypeError$2("`nonEnumerable`, if provided, must be a boolean or null");
6017
- }
6018
- if (arguments.length > 4 && typeof arguments[4] !== "boolean" && arguments[4] !== null) {
6019
- throw new $TypeError$2("`nonWritable`, if provided, must be a boolean or null");
6020
- }
6021
- if (arguments.length > 5 && typeof arguments[5] !== "boolean" && arguments[5] !== null) {
6022
- throw new $TypeError$2("`nonConfigurable`, if provided, must be a boolean or null");
6023
- }
6024
- if (arguments.length > 6 && typeof arguments[6] !== "boolean") {
6025
- throw new $TypeError$2("`loose`, if provided, must be a boolean");
6026
- }
6027
- var nonEnumerable = arguments.length > 3 ? arguments[3] : null;
6028
- var nonWritable = arguments.length > 4 ? arguments[4] : null;
6029
- var nonConfigurable = arguments.length > 5 ? arguments[5] : null;
6030
- var loose = arguments.length > 6 ? arguments[6] : false;
6031
- var desc = !!gopd && gopd(obj, property);
6032
- if ($defineProperty$1) {
6033
- $defineProperty$1(obj, property, {
6034
- configurable: nonConfigurable === null && desc ? desc.configurable : !nonConfigurable,
6035
- enumerable: nonEnumerable === null && desc ? desc.enumerable : !nonEnumerable,
6036
- value,
6037
- writable: nonWritable === null && desc ? desc.writable : !nonWritable
6038
- });
6039
- } else if (loose || !nonEnumerable && !nonWritable && !nonConfigurable) {
6040
- obj[property] = value;
6041
- } else {
6042
- throw new $SyntaxError("This environment does not support defining a property as non-configurable, non-writable, or non-enumerable.");
6043
- }
6044
- };
6045
- var $defineProperty = requireEsDefineProperty();
6046
- var hasPropertyDescriptors = function hasPropertyDescriptors2() {
6047
- return !!$defineProperty;
6048
- };
6049
- hasPropertyDescriptors.hasArrayLengthDefineBug = function hasArrayLengthDefineBug() {
6050
- if (!$defineProperty) {
6051
- return null;
6052
- }
6053
- try {
6054
- return $defineProperty([], "length", { value: 1 }).length !== 1;
6055
- } catch (e) {
6056
- return true;
6057
- }
6058
- };
6059
- var hasPropertyDescriptors_1 = hasPropertyDescriptors;
6060
- var GetIntrinsic$2 = getIntrinsic;
6061
- var define = defineDataProperty;
6062
- var hasDescriptors = hasPropertyDescriptors_1();
6063
- var gOPD = gopd$1;
6064
- var $TypeError$1 = type;
6065
- var $floor$1 = GetIntrinsic$2("%Math.floor%");
6066
- var setFunctionLength = function setFunctionLength2(fn, length) {
6067
- if (typeof fn !== "function") {
6068
- throw new $TypeError$1("`fn` is not a function");
6069
- }
6070
- if (typeof length !== "number" || length < 0 || length > 4294967295 || $floor$1(length) !== length) {
6071
- throw new $TypeError$1("`length` must be a positive 32-bit integer");
6072
- }
6073
- var loose = arguments.length > 2 && !!arguments[2];
6074
- var functionLengthIsConfigurable = true;
6075
- var functionLengthIsWritable = true;
6076
- if ("length" in fn && gOPD) {
6077
- var desc = gOPD(fn, "length");
6078
- if (desc && !desc.configurable) {
6079
- functionLengthIsConfigurable = false;
6080
- }
6081
- if (desc && !desc.writable) {
6082
- functionLengthIsWritable = false;
6083
- }
6084
- }
6085
- if (functionLengthIsConfigurable || functionLengthIsWritable || !loose) {
6086
- if (hasDescriptors) {
6087
- define(
6088
- /** @type {Parameters<define>[0]} */
6089
- fn,
6090
- "length",
6091
- length,
6092
- true,
6093
- true
6094
- );
6095
- } else {
6096
- define(
6097
- /** @type {Parameters<define>[0]} */
6098
- fn,
6099
- "length",
6100
- length
6101
- );
6102
- }
6103
- }
6104
- return fn;
6105
- };
6106
- (function(module) {
6107
- var bind3 = functionBind;
6108
- var GetIntrinsic3 = getIntrinsic;
6109
- var setFunctionLength$1 = setFunctionLength;
6110
- var $TypeError2 = type;
6111
- var $apply = GetIntrinsic3("%Function.prototype.apply%");
6112
- var $call = GetIntrinsic3("%Function.prototype.call%");
6113
- var $reflectApply = GetIntrinsic3("%Reflect.apply%", true) || bind3.call($call, $apply);
6114
- var $defineProperty2 = requireEsDefineProperty();
6115
- var $max = GetIntrinsic3("%Math.max%");
6116
- module.exports = function callBind2(originalFunction) {
6117
- if (typeof originalFunction !== "function") {
6118
- throw new $TypeError2("a function is required");
6119
- }
6120
- var func = $reflectApply(bind3, $call, arguments);
6121
- return setFunctionLength$1(
6122
- func,
6123
- 1 + $max(0, originalFunction.length - (arguments.length - 1)),
6124
- true
6125
- );
6126
- };
6127
- var applyBind = function applyBind2() {
6128
- return $reflectApply(bind3, $apply, arguments);
6129
- };
6130
- if ($defineProperty2) {
6131
- $defineProperty2(module.exports, "apply", { value: applyBind });
6132
- } else {
6133
- module.exports.apply = applyBind;
6134
- }
6135
- })(callBind$1);
6136
- var callBindExports = callBind$1.exports;
6137
- var GetIntrinsic$1 = getIntrinsic;
6138
- var callBind = callBindExports;
6139
- var $indexOf = callBind(GetIntrinsic$1("String.prototype.indexOf"));
6140
- var callBound$1 = function callBoundIntrinsic(name, allowMissing) {
6141
- var intrinsic = GetIntrinsic$1(name, !!allowMissing);
6142
- if (typeof intrinsic === "function" && $indexOf(name, ".prototype.") > -1) {
6143
- return callBind(intrinsic);
6144
- }
6145
- return intrinsic;
6146
- };
6147
- const __viteBrowserExternal = {};
6148
- const __viteBrowserExternal$1 = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
6149
- __proto__: null,
6150
- default: __viteBrowserExternal
6151
- }, Symbol.toStringTag, { value: "Module" }));
6152
- const require$$0 = /* @__PURE__ */ getAugmentedNamespace(__viteBrowserExternal$1);
6153
- var hasMap = typeof Map === "function" && Map.prototype;
6154
- var mapSizeDescriptor = Object.getOwnPropertyDescriptor && hasMap ? Object.getOwnPropertyDescriptor(Map.prototype, "size") : null;
6155
- var mapSize = hasMap && mapSizeDescriptor && typeof mapSizeDescriptor.get === "function" ? mapSizeDescriptor.get : null;
6156
- var mapForEach = hasMap && Map.prototype.forEach;
6157
- var hasSet = typeof Set === "function" && Set.prototype;
6158
- var setSizeDescriptor = Object.getOwnPropertyDescriptor && hasSet ? Object.getOwnPropertyDescriptor(Set.prototype, "size") : null;
6159
- var setSize = hasSet && setSizeDescriptor && typeof setSizeDescriptor.get === "function" ? setSizeDescriptor.get : null;
6160
- var setForEach = hasSet && Set.prototype.forEach;
6161
- var hasWeakMap = typeof WeakMap === "function" && WeakMap.prototype;
6162
- var weakMapHas = hasWeakMap ? WeakMap.prototype.has : null;
6163
- var hasWeakSet = typeof WeakSet === "function" && WeakSet.prototype;
6164
- var weakSetHas = hasWeakSet ? WeakSet.prototype.has : null;
6165
- var hasWeakRef = typeof WeakRef === "function" && WeakRef.prototype;
6166
- var weakRefDeref = hasWeakRef ? WeakRef.prototype.deref : null;
6167
- var booleanValueOf = Boolean.prototype.valueOf;
6168
- var objectToString = Object.prototype.toString;
6169
- var functionToString = Function.prototype.toString;
6170
- var $match = String.prototype.match;
6171
- var $slice = String.prototype.slice;
6172
- var $replace = String.prototype.replace;
6173
- var $toUpperCase = String.prototype.toUpperCase;
6174
- var $toLowerCase = String.prototype.toLowerCase;
6175
- var $test = RegExp.prototype.test;
6176
- var $concat = Array.prototype.concat;
6177
- var $join = Array.prototype.join;
6178
- var $arrSlice = Array.prototype.slice;
6179
- var $floor = Math.floor;
6180
- var bigIntValueOf = typeof BigInt === "function" ? BigInt.prototype.valueOf : null;
6181
- var gOPS = Object.getOwnPropertySymbols;
6182
- var symToString = typeof Symbol === "function" && typeof Symbol.iterator === "symbol" ? Symbol.prototype.toString : null;
6183
- var hasShammedSymbols = typeof Symbol === "function" && typeof Symbol.iterator === "object";
6184
- var toStringTag = typeof Symbol === "function" && Symbol.toStringTag && (typeof Symbol.toStringTag === hasShammedSymbols ? "object" : "symbol") ? Symbol.toStringTag : null;
6185
- var isEnumerable = Object.prototype.propertyIsEnumerable;
6186
- var gPO = (typeof Reflect === "function" ? Reflect.getPrototypeOf : Object.getPrototypeOf) || ([].__proto__ === Array.prototype ? function(O) {
6187
- return O.__proto__;
6188
- } : null);
6189
- function addNumericSeparator(num, str) {
6190
- if (num === Infinity || num === -Infinity || num !== num || num && num > -1e3 && num < 1e3 || $test.call(/e/, str)) {
6191
- return str;
6192
- }
6193
- var sepRegex = /[0-9](?=(?:[0-9]{3})+(?![0-9]))/g;
6194
- if (typeof num === "number") {
6195
- var int = num < 0 ? -$floor(-num) : $floor(num);
6196
- if (int !== num) {
6197
- var intStr = String(int);
6198
- var dec = $slice.call(str, intStr.length + 1);
6199
- return $replace.call(intStr, sepRegex, "$&_") + "." + $replace.call($replace.call(dec, /([0-9]{3})/g, "$&_"), /_$/, "");
6200
- }
6201
- }
6202
- return $replace.call(str, sepRegex, "$&_");
6203
- }
6204
- var utilInspect = require$$0;
6205
- var inspectCustom = utilInspect.custom;
6206
- var inspectSymbol = isSymbol(inspectCustom) ? inspectCustom : null;
6207
- var quotes = {
6208
- __proto__: null,
6209
- "double": '"',
6210
- single: "'"
6211
- };
6212
- var quoteREs = {
6213
- __proto__: null,
6214
- "double": /(["\\])/g,
6215
- single: /(['\\])/g
6216
- };
6217
- var objectInspect = function inspect_(obj, options, depth, seen) {
6218
- var opts = options || {};
6219
- if (has$3(opts, "quoteStyle") && !has$3(quotes, opts.quoteStyle)) {
6220
- throw new TypeError('option "quoteStyle" must be "single" or "double"');
6221
- }
6222
- if (has$3(opts, "maxStringLength") && (typeof opts.maxStringLength === "number" ? opts.maxStringLength < 0 && opts.maxStringLength !== Infinity : opts.maxStringLength !== null)) {
6223
- throw new TypeError('option "maxStringLength", if provided, must be a positive integer, Infinity, or `null`');
6224
- }
6225
- var customInspect = has$3(opts, "customInspect") ? opts.customInspect : true;
6226
- if (typeof customInspect !== "boolean" && customInspect !== "symbol") {
6227
- throw new TypeError("option \"customInspect\", if provided, must be `true`, `false`, or `'symbol'`");
6228
- }
6229
- if (has$3(opts, "indent") && opts.indent !== null && opts.indent !== " " && !(parseInt(opts.indent, 10) === opts.indent && opts.indent > 0)) {
6230
- throw new TypeError('option "indent" must be "\\t", an integer > 0, or `null`');
6231
- }
6232
- if (has$3(opts, "numericSeparator") && typeof opts.numericSeparator !== "boolean") {
6233
- throw new TypeError('option "numericSeparator", if provided, must be `true` or `false`');
6234
- }
6235
- var numericSeparator = opts.numericSeparator;
6236
- if (typeof obj === "undefined") {
6237
- return "undefined";
6238
- }
6239
- if (obj === null) {
6240
- return "null";
6241
- }
6242
- if (typeof obj === "boolean") {
6243
- return obj ? "true" : "false";
6244
- }
6245
- if (typeof obj === "string") {
6246
- return inspectString(obj, opts);
6247
- }
6248
- if (typeof obj === "number") {
6249
- if (obj === 0) {
6250
- return Infinity / obj > 0 ? "0" : "-0";
6251
- }
6252
- var str = String(obj);
6253
- return numericSeparator ? addNumericSeparator(obj, str) : str;
6254
- }
6255
- if (typeof obj === "bigint") {
6256
- var bigIntStr = String(obj) + "n";
6257
- return numericSeparator ? addNumericSeparator(obj, bigIntStr) : bigIntStr;
6258
- }
6259
- var maxDepth = typeof opts.depth === "undefined" ? 5 : opts.depth;
6260
- if (typeof depth === "undefined") {
6261
- depth = 0;
6262
- }
6263
- if (depth >= maxDepth && maxDepth > 0 && typeof obj === "object") {
6264
- return isArray$3(obj) ? "[Array]" : "[Object]";
6265
- }
6266
- var indent = getIndent(opts, depth);
6267
- if (typeof seen === "undefined") {
6268
- seen = [];
6269
- } else if (indexOf(seen, obj) >= 0) {
6270
- return "[Circular]";
6271
- }
6272
- function inspect2(value, from, noIndent) {
6273
- if (from) {
6274
- seen = $arrSlice.call(seen);
6275
- seen.push(from);
6276
- }
6277
- if (noIndent) {
6278
- var newOpts = {
6279
- depth: opts.depth
6280
- };
6281
- if (has$3(opts, "quoteStyle")) {
6282
- newOpts.quoteStyle = opts.quoteStyle;
6283
- }
6284
- return inspect_(value, newOpts, depth + 1, seen);
6285
- }
6286
- return inspect_(value, opts, depth + 1, seen);
6287
- }
6288
- if (typeof obj === "function" && !isRegExp$1(obj)) {
6289
- var name = nameOf(obj);
6290
- var keys = arrObjKeys(obj, inspect2);
6291
- return "[Function" + (name ? ": " + name : " (anonymous)") + "]" + (keys.length > 0 ? " { " + $join.call(keys, ", ") + " }" : "");
6292
- }
6293
- if (isSymbol(obj)) {
6294
- var symString = hasShammedSymbols ? $replace.call(String(obj), /^(Symbol\(.*\))_[^)]*$/, "$1") : symToString.call(obj);
6295
- return typeof obj === "object" && !hasShammedSymbols ? markBoxed(symString) : symString;
6296
- }
6297
- if (isElement(obj)) {
6298
- var s = "<" + $toLowerCase.call(String(obj.nodeName));
6299
- var attrs = obj.attributes || [];
6300
- for (var i = 0; i < attrs.length; i++) {
6301
- s += " " + attrs[i].name + "=" + wrapQuotes(quote(attrs[i].value), "double", opts);
6302
- }
6303
- s += ">";
6304
- if (obj.childNodes && obj.childNodes.length) {
6305
- s += "...";
6306
- }
6307
- s += "</" + $toLowerCase.call(String(obj.nodeName)) + ">";
6308
- return s;
6309
- }
6310
- if (isArray$3(obj)) {
6311
- if (obj.length === 0) {
6312
- return "[]";
6313
- }
6314
- var xs = arrObjKeys(obj, inspect2);
6315
- if (indent && !singleLineValues(xs)) {
6316
- return "[" + indentedJoin(xs, indent) + "]";
6317
- }
6318
- return "[ " + $join.call(xs, ", ") + " ]";
6319
- }
6320
- if (isError(obj)) {
6321
- var parts = arrObjKeys(obj, inspect2);
6322
- if (!("cause" in Error.prototype) && "cause" in obj && !isEnumerable.call(obj, "cause")) {
6323
- return "{ [" + String(obj) + "] " + $join.call($concat.call("[cause]: " + inspect2(obj.cause), parts), ", ") + " }";
6324
- }
6325
- if (parts.length === 0) {
6326
- return "[" + String(obj) + "]";
6327
- }
6328
- return "{ [" + String(obj) + "] " + $join.call(parts, ", ") + " }";
6329
- }
6330
- if (typeof obj === "object" && customInspect) {
6331
- if (inspectSymbol && typeof obj[inspectSymbol] === "function" && utilInspect) {
6332
- return utilInspect(obj, { depth: maxDepth - depth });
6333
- } else if (customInspect !== "symbol" && typeof obj.inspect === "function") {
6334
- return obj.inspect();
6335
- }
5702
+ if (typeof obj === "object" && customInspect) {
5703
+ if (inspectSymbol && typeof obj[inspectSymbol] === "function" && utilInspect) {
5704
+ return utilInspect(obj, { depth: maxDepth - depth });
5705
+ } else if (customInspect !== "symbol" && typeof obj.inspect === "function") {
5706
+ return obj.inspect();
5707
+ }
6336
5708
  }
6337
5709
  if (isMap(obj)) {
6338
5710
  var mapParts = [];
@@ -6370,412 +5742,1169 @@ var objectInspect = function inspect_(obj, options, depth, seen) {
6370
5742
  if (isBoolean(obj)) {
6371
5743
  return markBoxed(booleanValueOf.call(obj));
6372
5744
  }
6373
- if (isString(obj)) {
6374
- return markBoxed(inspect2(String(obj)));
5745
+ if (isString(obj)) {
5746
+ return markBoxed(inspect2(String(obj)));
5747
+ }
5748
+ if (typeof window !== "undefined" && obj === window) {
5749
+ return "{ [object Window] }";
5750
+ }
5751
+ if (typeof globalThis !== "undefined" && obj === globalThis || typeof commonjsGlobal !== "undefined" && obj === commonjsGlobal) {
5752
+ return "{ [object globalThis] }";
5753
+ }
5754
+ if (!isDate(obj) && !isRegExp$1(obj)) {
5755
+ var ys = arrObjKeys(obj, inspect2);
5756
+ var isPlainObject = gPO ? gPO(obj) === Object.prototype : obj instanceof Object || obj.constructor === Object;
5757
+ var protoTag = obj instanceof Object ? "" : "null prototype";
5758
+ var stringTag = !isPlainObject && toStringTag && Object(obj) === obj && toStringTag in obj ? $slice.call(toStr$1(obj), 8, -1) : protoTag ? "Object" : "";
5759
+ var constructorTag = isPlainObject || typeof obj.constructor !== "function" ? "" : obj.constructor.name ? obj.constructor.name + " " : "";
5760
+ var tag = constructorTag + (stringTag || protoTag ? "[" + $join.call($concat$1.call([], stringTag || [], protoTag || []), ": ") + "] " : "");
5761
+ if (ys.length === 0) {
5762
+ return tag + "{}";
5763
+ }
5764
+ if (indent) {
5765
+ return tag + "{" + indentedJoin(ys, indent) + "}";
5766
+ }
5767
+ return tag + "{ " + $join.call(ys, ", ") + " }";
5768
+ }
5769
+ return String(obj);
5770
+ };
5771
+ function wrapQuotes(s, defaultStyle, opts) {
5772
+ var style = opts.quoteStyle || defaultStyle;
5773
+ var quoteChar = quotes[style];
5774
+ return quoteChar + s + quoteChar;
5775
+ }
5776
+ function quote(s) {
5777
+ return $replace$1.call(String(s), /"/g, "&quot;");
5778
+ }
5779
+ function isArray$3(obj) {
5780
+ return toStr$1(obj) === "[object Array]" && (!toStringTag || !(typeof obj === "object" && toStringTag in obj));
5781
+ }
5782
+ function isDate(obj) {
5783
+ return toStr$1(obj) === "[object Date]" && (!toStringTag || !(typeof obj === "object" && toStringTag in obj));
5784
+ }
5785
+ function isRegExp$1(obj) {
5786
+ return toStr$1(obj) === "[object RegExp]" && (!toStringTag || !(typeof obj === "object" && toStringTag in obj));
5787
+ }
5788
+ function isError(obj) {
5789
+ return toStr$1(obj) === "[object Error]" && (!toStringTag || !(typeof obj === "object" && toStringTag in obj));
5790
+ }
5791
+ function isString(obj) {
5792
+ return toStr$1(obj) === "[object String]" && (!toStringTag || !(typeof obj === "object" && toStringTag in obj));
5793
+ }
5794
+ function isNumber(obj) {
5795
+ return toStr$1(obj) === "[object Number]" && (!toStringTag || !(typeof obj === "object" && toStringTag in obj));
5796
+ }
5797
+ function isBoolean(obj) {
5798
+ return toStr$1(obj) === "[object Boolean]" && (!toStringTag || !(typeof obj === "object" && toStringTag in obj));
5799
+ }
5800
+ function isSymbol(obj) {
5801
+ if (hasShammedSymbols) {
5802
+ return obj && typeof obj === "object" && obj instanceof Symbol;
5803
+ }
5804
+ if (typeof obj === "symbol") {
5805
+ return true;
5806
+ }
5807
+ if (!obj || typeof obj !== "object" || !symToString) {
5808
+ return false;
5809
+ }
5810
+ try {
5811
+ symToString.call(obj);
5812
+ return true;
5813
+ } catch (e) {
5814
+ }
5815
+ return false;
5816
+ }
5817
+ function isBigInt(obj) {
5818
+ if (!obj || typeof obj !== "object" || !bigIntValueOf) {
5819
+ return false;
5820
+ }
5821
+ try {
5822
+ bigIntValueOf.call(obj);
5823
+ return true;
5824
+ } catch (e) {
5825
+ }
5826
+ return false;
5827
+ }
5828
+ var hasOwn$1 = Object.prototype.hasOwnProperty || function(key) {
5829
+ return key in this;
5830
+ };
5831
+ function has$3(obj, key) {
5832
+ return hasOwn$1.call(obj, key);
5833
+ }
5834
+ function toStr$1(obj) {
5835
+ return objectToString.call(obj);
5836
+ }
5837
+ function nameOf(f) {
5838
+ if (f.name) {
5839
+ return f.name;
5840
+ }
5841
+ var m = $match.call(functionToString.call(f), /^function\s*([\w$]+)/);
5842
+ if (m) {
5843
+ return m[1];
5844
+ }
5845
+ return null;
5846
+ }
5847
+ function indexOf(xs, x) {
5848
+ if (xs.indexOf) {
5849
+ return xs.indexOf(x);
5850
+ }
5851
+ for (var i = 0, l = xs.length; i < l; i++) {
5852
+ if (xs[i] === x) {
5853
+ return i;
5854
+ }
5855
+ }
5856
+ return -1;
5857
+ }
5858
+ function isMap(x) {
5859
+ if (!mapSize || !x || typeof x !== "object") {
5860
+ return false;
5861
+ }
5862
+ try {
5863
+ mapSize.call(x);
5864
+ try {
5865
+ setSize.call(x);
5866
+ } catch (s) {
5867
+ return true;
5868
+ }
5869
+ return x instanceof Map;
5870
+ } catch (e) {
5871
+ }
5872
+ return false;
5873
+ }
5874
+ function isWeakMap(x) {
5875
+ if (!weakMapHas || !x || typeof x !== "object") {
5876
+ return false;
5877
+ }
5878
+ try {
5879
+ weakMapHas.call(x, weakMapHas);
5880
+ try {
5881
+ weakSetHas.call(x, weakSetHas);
5882
+ } catch (s) {
5883
+ return true;
5884
+ }
5885
+ return x instanceof WeakMap;
5886
+ } catch (e) {
5887
+ }
5888
+ return false;
5889
+ }
5890
+ function isWeakRef(x) {
5891
+ if (!weakRefDeref || !x || typeof x !== "object") {
5892
+ return false;
5893
+ }
5894
+ try {
5895
+ weakRefDeref.call(x);
5896
+ return true;
5897
+ } catch (e) {
5898
+ }
5899
+ return false;
5900
+ }
5901
+ function isSet(x) {
5902
+ if (!setSize || !x || typeof x !== "object") {
5903
+ return false;
5904
+ }
5905
+ try {
5906
+ setSize.call(x);
5907
+ try {
5908
+ mapSize.call(x);
5909
+ } catch (m) {
5910
+ return true;
5911
+ }
5912
+ return x instanceof Set;
5913
+ } catch (e) {
5914
+ }
5915
+ return false;
5916
+ }
5917
+ function isWeakSet(x) {
5918
+ if (!weakSetHas || !x || typeof x !== "object") {
5919
+ return false;
5920
+ }
5921
+ try {
5922
+ weakSetHas.call(x, weakSetHas);
5923
+ try {
5924
+ weakMapHas.call(x, weakMapHas);
5925
+ } catch (s) {
5926
+ return true;
5927
+ }
5928
+ return x instanceof WeakSet;
5929
+ } catch (e) {
5930
+ }
5931
+ return false;
5932
+ }
5933
+ function isElement(x) {
5934
+ if (!x || typeof x !== "object") {
5935
+ return false;
5936
+ }
5937
+ if (typeof HTMLElement !== "undefined" && x instanceof HTMLElement) {
5938
+ return true;
5939
+ }
5940
+ return typeof x.nodeName === "string" && typeof x.getAttribute === "function";
5941
+ }
5942
+ function inspectString(str, opts) {
5943
+ if (str.length > opts.maxStringLength) {
5944
+ var remaining = str.length - opts.maxStringLength;
5945
+ var trailer = "... " + remaining + " more character" + (remaining > 1 ? "s" : "");
5946
+ return inspectString($slice.call(str, 0, opts.maxStringLength), opts) + trailer;
5947
+ }
5948
+ var quoteRE = quoteREs[opts.quoteStyle || "single"];
5949
+ quoteRE.lastIndex = 0;
5950
+ var s = $replace$1.call($replace$1.call(str, quoteRE, "\\$1"), /[\x00-\x1f]/g, lowbyte);
5951
+ return wrapQuotes(s, "single", opts);
5952
+ }
5953
+ function lowbyte(c) {
5954
+ var n = c.charCodeAt(0);
5955
+ var x = {
5956
+ 8: "b",
5957
+ 9: "t",
5958
+ 10: "n",
5959
+ 12: "f",
5960
+ 13: "r"
5961
+ }[n];
5962
+ if (x) {
5963
+ return "\\" + x;
5964
+ }
5965
+ return "\\x" + (n < 16 ? "0" : "") + $toUpperCase.call(n.toString(16));
5966
+ }
5967
+ function markBoxed(str) {
5968
+ return "Object(" + str + ")";
5969
+ }
5970
+ function weakCollectionOf(type2) {
5971
+ return type2 + " { ? }";
5972
+ }
5973
+ function collectionOf(type2, size, entries, indent) {
5974
+ var joinedEntries = indent ? indentedJoin(entries, indent) : $join.call(entries, ", ");
5975
+ return type2 + " (" + size + ") {" + joinedEntries + "}";
5976
+ }
5977
+ function singleLineValues(xs) {
5978
+ for (var i = 0; i < xs.length; i++) {
5979
+ if (indexOf(xs[i], "\n") >= 0) {
5980
+ return false;
5981
+ }
5982
+ }
5983
+ return true;
5984
+ }
5985
+ function getIndent(opts, depth) {
5986
+ var baseIndent;
5987
+ if (opts.indent === " ") {
5988
+ baseIndent = " ";
5989
+ } else if (typeof opts.indent === "number" && opts.indent > 0) {
5990
+ baseIndent = $join.call(Array(opts.indent + 1), " ");
5991
+ } else {
5992
+ return null;
5993
+ }
5994
+ return {
5995
+ base: baseIndent,
5996
+ prev: $join.call(Array(depth + 1), baseIndent)
5997
+ };
5998
+ }
5999
+ function indentedJoin(xs, indent) {
6000
+ if (xs.length === 0) {
6001
+ return "";
6002
+ }
6003
+ var lineJoiner = "\n" + indent.prev + indent.base;
6004
+ return lineJoiner + $join.call(xs, "," + lineJoiner) + "\n" + indent.prev;
6005
+ }
6006
+ function arrObjKeys(obj, inspect2) {
6007
+ var isArr = isArray$3(obj);
6008
+ var xs = [];
6009
+ if (isArr) {
6010
+ xs.length = obj.length;
6011
+ for (var i = 0; i < obj.length; i++) {
6012
+ xs[i] = has$3(obj, i) ? inspect2(obj[i], obj) : "";
6013
+ }
6375
6014
  }
6376
- if (typeof window !== "undefined" && obj === window) {
6377
- return "{ [object Window] }";
6015
+ var syms = typeof gOPS === "function" ? gOPS(obj) : [];
6016
+ var symMap;
6017
+ if (hasShammedSymbols) {
6018
+ symMap = {};
6019
+ for (var k = 0; k < syms.length; k++) {
6020
+ symMap["$" + syms[k]] = syms[k];
6021
+ }
6378
6022
  }
6379
- if (typeof globalThis !== "undefined" && obj === globalThis || typeof commonjsGlobal !== "undefined" && obj === commonjsGlobal) {
6380
- return "{ [object globalThis] }";
6023
+ for (var key in obj) {
6024
+ if (!has$3(obj, key)) {
6025
+ continue;
6026
+ }
6027
+ if (isArr && String(Number(key)) === key && key < obj.length) {
6028
+ continue;
6029
+ }
6030
+ if (hasShammedSymbols && symMap["$" + key] instanceof Symbol) {
6031
+ continue;
6032
+ } else if ($test.call(/[^\w$]/, key)) {
6033
+ xs.push(inspect2(key, obj) + ": " + inspect2(obj[key], obj));
6034
+ } else {
6035
+ xs.push(key + ": " + inspect2(obj[key], obj));
6036
+ }
6381
6037
  }
6382
- if (!isDate(obj) && !isRegExp$1(obj)) {
6383
- var ys = arrObjKeys(obj, inspect2);
6384
- var isPlainObject = gPO ? gPO(obj) === Object.prototype : obj instanceof Object || obj.constructor === Object;
6385
- var protoTag = obj instanceof Object ? "" : "null prototype";
6386
- var stringTag = !isPlainObject && toStringTag && Object(obj) === obj && toStringTag in obj ? $slice.call(toStr(obj), 8, -1) : protoTag ? "Object" : "";
6387
- var constructorTag = isPlainObject || typeof obj.constructor !== "function" ? "" : obj.constructor.name ? obj.constructor.name + " " : "";
6388
- var tag = constructorTag + (stringTag || protoTag ? "[" + $join.call($concat.call([], stringTag || [], protoTag || []), ": ") + "] " : "");
6389
- if (ys.length === 0) {
6390
- return tag + "{}";
6038
+ if (typeof gOPS === "function") {
6039
+ for (var j = 0; j < syms.length; j++) {
6040
+ if (isEnumerable.call(obj, syms[j])) {
6041
+ xs.push("[" + inspect2(syms[j]) + "]: " + inspect2(obj[syms[j]], obj));
6042
+ }
6391
6043
  }
6392
- if (indent) {
6393
- return tag + "{" + indentedJoin(ys, indent) + "}";
6044
+ }
6045
+ return xs;
6046
+ }
6047
+ var inspect$3 = objectInspect;
6048
+ var $TypeError$5 = type;
6049
+ var listGetNode = function(list, key, isDelete) {
6050
+ var prev = list;
6051
+ var curr;
6052
+ for (; (curr = prev.next) != null; prev = curr) {
6053
+ if (curr.key === key) {
6054
+ prev.next = curr.next;
6055
+ if (!isDelete) {
6056
+ curr.next = /** @type {NonNullable<typeof list.next>} */
6057
+ list.next;
6058
+ list.next = curr;
6059
+ }
6060
+ return curr;
6394
6061
  }
6395
- return tag + "{ " + $join.call(ys, ", ") + " }";
6396
6062
  }
6397
- return String(obj);
6398
6063
  };
6399
- function wrapQuotes(s, defaultStyle, opts) {
6400
- var style = opts.quoteStyle || defaultStyle;
6401
- var quoteChar = quotes[style];
6402
- return quoteChar + s + quoteChar;
6403
- }
6404
- function quote(s) {
6405
- return $replace.call(String(s), /"/g, "&quot;");
6406
- }
6407
- function isArray$3(obj) {
6408
- return toStr(obj) === "[object Array]" && (!toStringTag || !(typeof obj === "object" && toStringTag in obj));
6409
- }
6410
- function isDate(obj) {
6411
- return toStr(obj) === "[object Date]" && (!toStringTag || !(typeof obj === "object" && toStringTag in obj));
6412
- }
6413
- function isRegExp$1(obj) {
6414
- return toStr(obj) === "[object RegExp]" && (!toStringTag || !(typeof obj === "object" && toStringTag in obj));
6415
- }
6416
- function isError(obj) {
6417
- return toStr(obj) === "[object Error]" && (!toStringTag || !(typeof obj === "object" && toStringTag in obj));
6418
- }
6419
- function isString(obj) {
6420
- return toStr(obj) === "[object String]" && (!toStringTag || !(typeof obj === "object" && toStringTag in obj));
6421
- }
6422
- function isNumber(obj) {
6423
- return toStr(obj) === "[object Number]" && (!toStringTag || !(typeof obj === "object" && toStringTag in obj));
6424
- }
6425
- function isBoolean(obj) {
6426
- return toStr(obj) === "[object Boolean]" && (!toStringTag || !(typeof obj === "object" && toStringTag in obj));
6427
- }
6428
- function isSymbol(obj) {
6429
- if (hasShammedSymbols) {
6430
- return obj && typeof obj === "object" && obj instanceof Symbol;
6064
+ var listGet = function(objects, key) {
6065
+ if (!objects) {
6066
+ return void 0;
6431
6067
  }
6432
- if (typeof obj === "symbol") {
6433
- return true;
6068
+ var node = listGetNode(objects, key);
6069
+ return node && node.value;
6070
+ };
6071
+ var listSet = function(objects, key, value) {
6072
+ var node = listGetNode(objects, key);
6073
+ if (node) {
6074
+ node.value = value;
6075
+ } else {
6076
+ objects.next = /** @type {import('./list.d.ts').ListNode<typeof value, typeof key>} */
6077
+ {
6078
+ // eslint-disable-line no-param-reassign, no-extra-parens
6079
+ key,
6080
+ next: objects.next,
6081
+ value
6082
+ };
6434
6083
  }
6435
- if (!obj || typeof obj !== "object" || !symToString) {
6084
+ };
6085
+ var listHas = function(objects, key) {
6086
+ if (!objects) {
6436
6087
  return false;
6437
6088
  }
6089
+ return !!listGetNode(objects, key);
6090
+ };
6091
+ var listDelete = function(objects, key) {
6092
+ if (objects) {
6093
+ return listGetNode(objects, key, true);
6094
+ }
6095
+ };
6096
+ var sideChannelList = function getSideChannelList() {
6097
+ var $o;
6098
+ var channel = {
6099
+ assert: function(key) {
6100
+ if (!channel.has(key)) {
6101
+ throw new $TypeError$5("Side channel does not contain " + inspect$3(key));
6102
+ }
6103
+ },
6104
+ "delete": function(key) {
6105
+ var root = $o && $o.next;
6106
+ var deletedNode = listDelete($o, key);
6107
+ if (deletedNode && root && root === deletedNode) {
6108
+ $o = void 0;
6109
+ }
6110
+ return !!deletedNode;
6111
+ },
6112
+ get: function(key) {
6113
+ return listGet($o, key);
6114
+ },
6115
+ has: function(key) {
6116
+ return listHas($o, key);
6117
+ },
6118
+ set: function(key, value) {
6119
+ if (!$o) {
6120
+ $o = {
6121
+ next: void 0
6122
+ };
6123
+ }
6124
+ listSet(
6125
+ /** @type {NonNullable<typeof $o>} */
6126
+ $o,
6127
+ key,
6128
+ value
6129
+ );
6130
+ }
6131
+ };
6132
+ return channel;
6133
+ };
6134
+ var esObjectAtoms = Object;
6135
+ var esErrors = Error;
6136
+ var _eval = EvalError;
6137
+ var range = RangeError;
6138
+ var ref = ReferenceError;
6139
+ var syntax = SyntaxError;
6140
+ var uri = URIError;
6141
+ var abs$1 = Math.abs;
6142
+ var floor$1 = Math.floor;
6143
+ var max$2 = Math.max;
6144
+ var min$1 = Math.min;
6145
+ var pow$1 = Math.pow;
6146
+ var round$1 = Math.round;
6147
+ var _isNaN = Number.isNaN || function isNaN2(a) {
6148
+ return a !== a;
6149
+ };
6150
+ var $isNaN = _isNaN;
6151
+ var sign$1 = function sign(number) {
6152
+ if ($isNaN(number) || number === 0) {
6153
+ return number;
6154
+ }
6155
+ return number < 0 ? -1 : 1;
6156
+ };
6157
+ var gOPD = Object.getOwnPropertyDescriptor;
6158
+ var $gOPD$1 = gOPD;
6159
+ if ($gOPD$1) {
6438
6160
  try {
6439
- symToString.call(obj);
6440
- return true;
6161
+ $gOPD$1([], "length");
6441
6162
  } catch (e) {
6163
+ $gOPD$1 = null;
6442
6164
  }
6443
- return false;
6444
6165
  }
6445
- function isBigInt(obj) {
6446
- if (!obj || typeof obj !== "object" || !bigIntValueOf) {
6447
- return false;
6448
- }
6166
+ var gopd = $gOPD$1;
6167
+ var $defineProperty$1 = Object.defineProperty || false;
6168
+ if ($defineProperty$1) {
6449
6169
  try {
6450
- bigIntValueOf.call(obj);
6451
- return true;
6170
+ $defineProperty$1({}, "a", { value: 1 });
6452
6171
  } catch (e) {
6172
+ $defineProperty$1 = false;
6453
6173
  }
6454
- return false;
6455
6174
  }
6456
- var hasOwn = Object.prototype.hasOwnProperty || function(key) {
6457
- return key in this;
6458
- };
6459
- function has$3(obj, key) {
6460
- return hasOwn.call(obj, key);
6175
+ var esDefineProperty = $defineProperty$1;
6176
+ var shams;
6177
+ var hasRequiredShams;
6178
+ function requireShams() {
6179
+ if (hasRequiredShams) return shams;
6180
+ hasRequiredShams = 1;
6181
+ shams = function hasSymbols2() {
6182
+ if (typeof Symbol !== "function" || typeof Object.getOwnPropertySymbols !== "function") {
6183
+ return false;
6184
+ }
6185
+ if (typeof Symbol.iterator === "symbol") {
6186
+ return true;
6187
+ }
6188
+ var obj = {};
6189
+ var sym = Symbol("test");
6190
+ var symObj = Object(sym);
6191
+ if (typeof sym === "string") {
6192
+ return false;
6193
+ }
6194
+ if (Object.prototype.toString.call(sym) !== "[object Symbol]") {
6195
+ return false;
6196
+ }
6197
+ if (Object.prototype.toString.call(symObj) !== "[object Symbol]") {
6198
+ return false;
6199
+ }
6200
+ var symVal = 42;
6201
+ obj[sym] = symVal;
6202
+ for (var _ in obj) {
6203
+ return false;
6204
+ }
6205
+ if (typeof Object.keys === "function" && Object.keys(obj).length !== 0) {
6206
+ return false;
6207
+ }
6208
+ if (typeof Object.getOwnPropertyNames === "function" && Object.getOwnPropertyNames(obj).length !== 0) {
6209
+ return false;
6210
+ }
6211
+ var syms = Object.getOwnPropertySymbols(obj);
6212
+ if (syms.length !== 1 || syms[0] !== sym) {
6213
+ return false;
6214
+ }
6215
+ if (!Object.prototype.propertyIsEnumerable.call(obj, sym)) {
6216
+ return false;
6217
+ }
6218
+ if (typeof Object.getOwnPropertyDescriptor === "function") {
6219
+ var descriptor = (
6220
+ /** @type {PropertyDescriptor} */
6221
+ Object.getOwnPropertyDescriptor(obj, sym)
6222
+ );
6223
+ if (descriptor.value !== symVal || descriptor.enumerable !== true) {
6224
+ return false;
6225
+ }
6226
+ }
6227
+ return true;
6228
+ };
6229
+ return shams;
6461
6230
  }
6462
- function toStr(obj) {
6463
- return objectToString.call(obj);
6231
+ var hasSymbols$1;
6232
+ var hasRequiredHasSymbols;
6233
+ function requireHasSymbols() {
6234
+ if (hasRequiredHasSymbols) return hasSymbols$1;
6235
+ hasRequiredHasSymbols = 1;
6236
+ var origSymbol = typeof Symbol !== "undefined" && Symbol;
6237
+ var hasSymbolSham = requireShams();
6238
+ hasSymbols$1 = function hasNativeSymbols() {
6239
+ if (typeof origSymbol !== "function") {
6240
+ return false;
6241
+ }
6242
+ if (typeof Symbol !== "function") {
6243
+ return false;
6244
+ }
6245
+ if (typeof origSymbol("foo") !== "symbol") {
6246
+ return false;
6247
+ }
6248
+ if (typeof Symbol("bar") !== "symbol") {
6249
+ return false;
6250
+ }
6251
+ return hasSymbolSham();
6252
+ };
6253
+ return hasSymbols$1;
6464
6254
  }
6465
- function nameOf(f) {
6466
- if (f.name) {
6467
- return f.name;
6255
+ var Reflect_getPrototypeOf;
6256
+ var hasRequiredReflect_getPrototypeOf;
6257
+ function requireReflect_getPrototypeOf() {
6258
+ if (hasRequiredReflect_getPrototypeOf) return Reflect_getPrototypeOf;
6259
+ hasRequiredReflect_getPrototypeOf = 1;
6260
+ Reflect_getPrototypeOf = typeof Reflect !== "undefined" && Reflect.getPrototypeOf || null;
6261
+ return Reflect_getPrototypeOf;
6262
+ }
6263
+ var Object_getPrototypeOf;
6264
+ var hasRequiredObject_getPrototypeOf;
6265
+ function requireObject_getPrototypeOf() {
6266
+ if (hasRequiredObject_getPrototypeOf) return Object_getPrototypeOf;
6267
+ hasRequiredObject_getPrototypeOf = 1;
6268
+ var $Object2 = esObjectAtoms;
6269
+ Object_getPrototypeOf = $Object2.getPrototypeOf || null;
6270
+ return Object_getPrototypeOf;
6271
+ }
6272
+ var ERROR_MESSAGE = "Function.prototype.bind called on incompatible ";
6273
+ var toStr = Object.prototype.toString;
6274
+ var max$1 = Math.max;
6275
+ var funcType = "[object Function]";
6276
+ var concatty = function concatty2(a, b) {
6277
+ var arr = [];
6278
+ for (var i = 0; i < a.length; i += 1) {
6279
+ arr[i] = a[i];
6468
6280
  }
6469
- var m = $match.call(functionToString.call(f), /^function\s*([\w$]+)/);
6470
- if (m) {
6471
- return m[1];
6281
+ for (var j = 0; j < b.length; j += 1) {
6282
+ arr[j + a.length] = b[j];
6472
6283
  }
6473
- return null;
6474
- }
6475
- function indexOf(xs, x) {
6476
- if (xs.indexOf) {
6477
- return xs.indexOf(x);
6284
+ return arr;
6285
+ };
6286
+ var slicy = function slicy2(arrLike, offset) {
6287
+ var arr = [];
6288
+ for (var i = offset, j = 0; i < arrLike.length; i += 1, j += 1) {
6289
+ arr[j] = arrLike[i];
6478
6290
  }
6479
- for (var i = 0, l = xs.length; i < l; i++) {
6480
- if (xs[i] === x) {
6481
- return i;
6291
+ return arr;
6292
+ };
6293
+ var joiny = function(arr, joiner) {
6294
+ var str = "";
6295
+ for (var i = 0; i < arr.length; i += 1) {
6296
+ str += arr[i];
6297
+ if (i + 1 < arr.length) {
6298
+ str += joiner;
6482
6299
  }
6483
6300
  }
6484
- return -1;
6485
- }
6486
- function isMap(x) {
6487
- if (!mapSize || !x || typeof x !== "object") {
6488
- return false;
6301
+ return str;
6302
+ };
6303
+ var implementation$1 = function bind(that) {
6304
+ var target = this;
6305
+ if (typeof target !== "function" || toStr.apply(target) !== funcType) {
6306
+ throw new TypeError(ERROR_MESSAGE + target);
6489
6307
  }
6490
- try {
6491
- mapSize.call(x);
6492
- try {
6493
- setSize.call(x);
6494
- } catch (s) {
6495
- return true;
6308
+ var args = slicy(arguments, 1);
6309
+ var bound;
6310
+ var binder = function() {
6311
+ if (this instanceof bound) {
6312
+ var result = target.apply(
6313
+ this,
6314
+ concatty(args, arguments)
6315
+ );
6316
+ if (Object(result) === result) {
6317
+ return result;
6318
+ }
6319
+ return this;
6496
6320
  }
6497
- return x instanceof Map;
6498
- } catch (e) {
6321
+ return target.apply(
6322
+ that,
6323
+ concatty(args, arguments)
6324
+ );
6325
+ };
6326
+ var boundLength = max$1(0, target.length - args.length);
6327
+ var boundArgs = [];
6328
+ for (var i = 0; i < boundLength; i++) {
6329
+ boundArgs[i] = "$" + i;
6499
6330
  }
6500
- return false;
6501
- }
6502
- function isWeakMap(x) {
6503
- if (!weakMapHas || !x || typeof x !== "object") {
6504
- return false;
6331
+ bound = Function("binder", "return function (" + joiny(boundArgs, ",") + "){ return binder.apply(this,arguments); }")(binder);
6332
+ if (target.prototype) {
6333
+ var Empty = function Empty2() {
6334
+ };
6335
+ Empty.prototype = target.prototype;
6336
+ bound.prototype = new Empty();
6337
+ Empty.prototype = null;
6505
6338
  }
6339
+ return bound;
6340
+ };
6341
+ var implementation = implementation$1;
6342
+ var functionBind = Function.prototype.bind || implementation;
6343
+ var functionCall = Function.prototype.call;
6344
+ var functionApply;
6345
+ var hasRequiredFunctionApply;
6346
+ function requireFunctionApply() {
6347
+ if (hasRequiredFunctionApply) return functionApply;
6348
+ hasRequiredFunctionApply = 1;
6349
+ functionApply = Function.prototype.apply;
6350
+ return functionApply;
6351
+ }
6352
+ var reflectApply = typeof Reflect !== "undefined" && Reflect && Reflect.apply;
6353
+ var bind$2 = functionBind;
6354
+ var $apply$1 = requireFunctionApply();
6355
+ var $call$2 = functionCall;
6356
+ var $reflectApply = reflectApply;
6357
+ var actualApply = $reflectApply || bind$2.call($call$2, $apply$1);
6358
+ var bind$1 = functionBind;
6359
+ var $TypeError$4 = type;
6360
+ var $call$1 = functionCall;
6361
+ var $actualApply = actualApply;
6362
+ var callBindApplyHelpers = function callBindBasic(args) {
6363
+ if (args.length < 1 || typeof args[0] !== "function") {
6364
+ throw new $TypeError$4("a function is required");
6365
+ }
6366
+ return $actualApply(bind$1, $call$1, args);
6367
+ };
6368
+ var get;
6369
+ var hasRequiredGet;
6370
+ function requireGet() {
6371
+ if (hasRequiredGet) return get;
6372
+ hasRequiredGet = 1;
6373
+ var callBind = callBindApplyHelpers;
6374
+ var gOPD2 = gopd;
6375
+ var hasProtoAccessor;
6506
6376
  try {
6507
- weakMapHas.call(x, weakMapHas);
6508
- try {
6509
- weakSetHas.call(x, weakSetHas);
6510
- } catch (s) {
6511
- return true;
6512
- }
6513
- return x instanceof WeakMap;
6377
+ hasProtoAccessor = /** @type {{ __proto__?: typeof Array.prototype }} */
6378
+ [].__proto__ === Array.prototype;
6514
6379
  } catch (e) {
6380
+ if (!e || typeof e !== "object" || !("code" in e) || e.code !== "ERR_PROTO_ACCESS") {
6381
+ throw e;
6382
+ }
6515
6383
  }
6516
- return false;
6384
+ var desc = !!hasProtoAccessor && gOPD2 && gOPD2(
6385
+ Object.prototype,
6386
+ /** @type {keyof typeof Object.prototype} */
6387
+ "__proto__"
6388
+ );
6389
+ var $Object2 = Object;
6390
+ var $getPrototypeOf = $Object2.getPrototypeOf;
6391
+ get = desc && typeof desc.get === "function" ? callBind([desc.get]) : typeof $getPrototypeOf === "function" ? (
6392
+ /** @type {import('./get')} */
6393
+ function getDunder(value) {
6394
+ return $getPrototypeOf(value == null ? value : $Object2(value));
6395
+ }
6396
+ ) : false;
6397
+ return get;
6517
6398
  }
6518
- function isWeakRef(x) {
6519
- if (!weakRefDeref || !x || typeof x !== "object") {
6520
- return false;
6521
- }
6399
+ var getProto$1;
6400
+ var hasRequiredGetProto;
6401
+ function requireGetProto() {
6402
+ if (hasRequiredGetProto) return getProto$1;
6403
+ hasRequiredGetProto = 1;
6404
+ var reflectGetProto = requireReflect_getPrototypeOf();
6405
+ var originalGetProto = requireObject_getPrototypeOf();
6406
+ var getDunderProto = requireGet();
6407
+ getProto$1 = reflectGetProto ? function getProto2(O) {
6408
+ return reflectGetProto(O);
6409
+ } : originalGetProto ? function getProto2(O) {
6410
+ if (!O || typeof O !== "object" && typeof O !== "function") {
6411
+ throw new TypeError("getProto: not an object");
6412
+ }
6413
+ return originalGetProto(O);
6414
+ } : getDunderProto ? function getProto2(O) {
6415
+ return getDunderProto(O);
6416
+ } : null;
6417
+ return getProto$1;
6418
+ }
6419
+ var hasown;
6420
+ var hasRequiredHasown;
6421
+ function requireHasown() {
6422
+ if (hasRequiredHasown) return hasown;
6423
+ hasRequiredHasown = 1;
6424
+ var call = Function.prototype.call;
6425
+ var $hasOwn = Object.prototype.hasOwnProperty;
6426
+ var bind3 = functionBind;
6427
+ hasown = bind3.call(call, $hasOwn);
6428
+ return hasown;
6429
+ }
6430
+ var undefined$1;
6431
+ var $Object = esObjectAtoms;
6432
+ var $Error = esErrors;
6433
+ var $EvalError = _eval;
6434
+ var $RangeError = range;
6435
+ var $ReferenceError = ref;
6436
+ var $SyntaxError = syntax;
6437
+ var $TypeError$3 = type;
6438
+ var $URIError = uri;
6439
+ var abs = abs$1;
6440
+ var floor = floor$1;
6441
+ var max = max$2;
6442
+ var min = min$1;
6443
+ var pow = pow$1;
6444
+ var round = round$1;
6445
+ var sign2 = sign$1;
6446
+ var $Function = Function;
6447
+ var getEvalledConstructor = function(expressionSyntax) {
6522
6448
  try {
6523
- weakRefDeref.call(x);
6524
- return true;
6449
+ return $Function('"use strict"; return (' + expressionSyntax + ").constructor;")();
6525
6450
  } catch (e) {
6526
6451
  }
6527
- return false;
6528
- }
6529
- function isSet(x) {
6530
- if (!setSize || !x || typeof x !== "object") {
6531
- return false;
6532
- }
6452
+ };
6453
+ var $gOPD = gopd;
6454
+ var $defineProperty = esDefineProperty;
6455
+ var throwTypeError = function() {
6456
+ throw new $TypeError$3();
6457
+ };
6458
+ var ThrowTypeError = $gOPD ? function() {
6533
6459
  try {
6534
- setSize.call(x);
6460
+ arguments.callee;
6461
+ return throwTypeError;
6462
+ } catch (calleeThrows) {
6535
6463
  try {
6536
- mapSize.call(x);
6537
- } catch (m) {
6538
- return true;
6464
+ return $gOPD(arguments, "callee").get;
6465
+ } catch (gOPDthrows) {
6466
+ return throwTypeError;
6539
6467
  }
6540
- return x instanceof Set;
6541
- } catch (e) {
6542
- }
6543
- return false;
6544
- }
6545
- function isWeakSet(x) {
6546
- if (!weakSetHas || !x || typeof x !== "object") {
6547
- return false;
6548
6468
  }
6469
+ }() : throwTypeError;
6470
+ var hasSymbols = requireHasSymbols()();
6471
+ var getProto = requireGetProto();
6472
+ var $ObjectGPO = requireObject_getPrototypeOf();
6473
+ var $ReflectGPO = requireReflect_getPrototypeOf();
6474
+ var $apply = requireFunctionApply();
6475
+ var $call = functionCall;
6476
+ var needsEval = {};
6477
+ var TypedArray = typeof Uint8Array === "undefined" || !getProto ? undefined$1 : getProto(Uint8Array);
6478
+ var INTRINSICS = {
6479
+ __proto__: null,
6480
+ "%AggregateError%": typeof AggregateError === "undefined" ? undefined$1 : AggregateError,
6481
+ "%Array%": Array,
6482
+ "%ArrayBuffer%": typeof ArrayBuffer === "undefined" ? undefined$1 : ArrayBuffer,
6483
+ "%ArrayIteratorPrototype%": hasSymbols && getProto ? getProto([][Symbol.iterator]()) : undefined$1,
6484
+ "%AsyncFromSyncIteratorPrototype%": undefined$1,
6485
+ "%AsyncFunction%": needsEval,
6486
+ "%AsyncGenerator%": needsEval,
6487
+ "%AsyncGeneratorFunction%": needsEval,
6488
+ "%AsyncIteratorPrototype%": needsEval,
6489
+ "%Atomics%": typeof Atomics === "undefined" ? undefined$1 : Atomics,
6490
+ "%BigInt%": typeof BigInt === "undefined" ? undefined$1 : BigInt,
6491
+ "%BigInt64Array%": typeof BigInt64Array === "undefined" ? undefined$1 : BigInt64Array,
6492
+ "%BigUint64Array%": typeof BigUint64Array === "undefined" ? undefined$1 : BigUint64Array,
6493
+ "%Boolean%": Boolean,
6494
+ "%DataView%": typeof DataView === "undefined" ? undefined$1 : DataView,
6495
+ "%Date%": Date,
6496
+ "%decodeURI%": decodeURI,
6497
+ "%decodeURIComponent%": decodeURIComponent,
6498
+ "%encodeURI%": encodeURI,
6499
+ "%encodeURIComponent%": encodeURIComponent,
6500
+ "%Error%": $Error,
6501
+ "%eval%": eval,
6502
+ // eslint-disable-line no-eval
6503
+ "%EvalError%": $EvalError,
6504
+ "%Float32Array%": typeof Float32Array === "undefined" ? undefined$1 : Float32Array,
6505
+ "%Float64Array%": typeof Float64Array === "undefined" ? undefined$1 : Float64Array,
6506
+ "%FinalizationRegistry%": typeof FinalizationRegistry === "undefined" ? undefined$1 : FinalizationRegistry,
6507
+ "%Function%": $Function,
6508
+ "%GeneratorFunction%": needsEval,
6509
+ "%Int8Array%": typeof Int8Array === "undefined" ? undefined$1 : Int8Array,
6510
+ "%Int16Array%": typeof Int16Array === "undefined" ? undefined$1 : Int16Array,
6511
+ "%Int32Array%": typeof Int32Array === "undefined" ? undefined$1 : Int32Array,
6512
+ "%isFinite%": isFinite,
6513
+ "%isNaN%": isNaN,
6514
+ "%IteratorPrototype%": hasSymbols && getProto ? getProto(getProto([][Symbol.iterator]())) : undefined$1,
6515
+ "%JSON%": typeof JSON === "object" ? JSON : undefined$1,
6516
+ "%Map%": typeof Map === "undefined" ? undefined$1 : Map,
6517
+ "%MapIteratorPrototype%": typeof Map === "undefined" || !hasSymbols || !getProto ? undefined$1 : getProto((/* @__PURE__ */ new Map())[Symbol.iterator]()),
6518
+ "%Math%": Math,
6519
+ "%Number%": Number,
6520
+ "%Object%": $Object,
6521
+ "%Object.getOwnPropertyDescriptor%": $gOPD,
6522
+ "%parseFloat%": parseFloat,
6523
+ "%parseInt%": parseInt,
6524
+ "%Promise%": typeof Promise === "undefined" ? undefined$1 : Promise,
6525
+ "%Proxy%": typeof Proxy === "undefined" ? undefined$1 : Proxy,
6526
+ "%RangeError%": $RangeError,
6527
+ "%ReferenceError%": $ReferenceError,
6528
+ "%Reflect%": typeof Reflect === "undefined" ? undefined$1 : Reflect,
6529
+ "%RegExp%": RegExp,
6530
+ "%Set%": typeof Set === "undefined" ? undefined$1 : Set,
6531
+ "%SetIteratorPrototype%": typeof Set === "undefined" || !hasSymbols || !getProto ? undefined$1 : getProto((/* @__PURE__ */ new Set())[Symbol.iterator]()),
6532
+ "%SharedArrayBuffer%": typeof SharedArrayBuffer === "undefined" ? undefined$1 : SharedArrayBuffer,
6533
+ "%String%": String,
6534
+ "%StringIteratorPrototype%": hasSymbols && getProto ? getProto(""[Symbol.iterator]()) : undefined$1,
6535
+ "%Symbol%": hasSymbols ? Symbol : undefined$1,
6536
+ "%SyntaxError%": $SyntaxError,
6537
+ "%ThrowTypeError%": ThrowTypeError,
6538
+ "%TypedArray%": TypedArray,
6539
+ "%TypeError%": $TypeError$3,
6540
+ "%Uint8Array%": typeof Uint8Array === "undefined" ? undefined$1 : Uint8Array,
6541
+ "%Uint8ClampedArray%": typeof Uint8ClampedArray === "undefined" ? undefined$1 : Uint8ClampedArray,
6542
+ "%Uint16Array%": typeof Uint16Array === "undefined" ? undefined$1 : Uint16Array,
6543
+ "%Uint32Array%": typeof Uint32Array === "undefined" ? undefined$1 : Uint32Array,
6544
+ "%URIError%": $URIError,
6545
+ "%WeakMap%": typeof WeakMap === "undefined" ? undefined$1 : WeakMap,
6546
+ "%WeakRef%": typeof WeakRef === "undefined" ? undefined$1 : WeakRef,
6547
+ "%WeakSet%": typeof WeakSet === "undefined" ? undefined$1 : WeakSet,
6548
+ "%Function.prototype.call%": $call,
6549
+ "%Function.prototype.apply%": $apply,
6550
+ "%Object.defineProperty%": $defineProperty,
6551
+ "%Object.getPrototypeOf%": $ObjectGPO,
6552
+ "%Math.abs%": abs,
6553
+ "%Math.floor%": floor,
6554
+ "%Math.max%": max,
6555
+ "%Math.min%": min,
6556
+ "%Math.pow%": pow,
6557
+ "%Math.round%": round,
6558
+ "%Math.sign%": sign2,
6559
+ "%Reflect.getPrototypeOf%": $ReflectGPO
6560
+ };
6561
+ if (getProto) {
6549
6562
  try {
6550
- weakSetHas.call(x, weakSetHas);
6551
- try {
6552
- weakMapHas.call(x, weakMapHas);
6553
- } catch (s) {
6554
- return true;
6555
- }
6556
- return x instanceof WeakSet;
6563
+ null.error;
6557
6564
  } catch (e) {
6565
+ var errorProto = getProto(getProto(e));
6566
+ INTRINSICS["%Error.prototype%"] = errorProto;
6558
6567
  }
6559
- return false;
6560
6568
  }
6561
- function isElement(x) {
6562
- if (!x || typeof x !== "object") {
6563
- return false;
6564
- }
6565
- if (typeof HTMLElement !== "undefined" && x instanceof HTMLElement) {
6566
- return true;
6569
+ var doEval = function doEval2(name) {
6570
+ var value;
6571
+ if (name === "%AsyncFunction%") {
6572
+ value = getEvalledConstructor("async function () {}");
6573
+ } else if (name === "%GeneratorFunction%") {
6574
+ value = getEvalledConstructor("function* () {}");
6575
+ } else if (name === "%AsyncGeneratorFunction%") {
6576
+ value = getEvalledConstructor("async function* () {}");
6577
+ } else if (name === "%AsyncGenerator%") {
6578
+ var fn = doEval2("%AsyncGeneratorFunction%");
6579
+ if (fn) {
6580
+ value = fn.prototype;
6581
+ }
6582
+ } else if (name === "%AsyncIteratorPrototype%") {
6583
+ var gen = doEval2("%AsyncGenerator%");
6584
+ if (gen && getProto) {
6585
+ value = getProto(gen.prototype);
6586
+ }
6567
6587
  }
6568
- return typeof x.nodeName === "string" && typeof x.getAttribute === "function";
6569
- }
6570
- function inspectString(str, opts) {
6571
- if (str.length > opts.maxStringLength) {
6572
- var remaining = str.length - opts.maxStringLength;
6573
- var trailer = "... " + remaining + " more character" + (remaining > 1 ? "s" : "");
6574
- return inspectString($slice.call(str, 0, opts.maxStringLength), opts) + trailer;
6588
+ INTRINSICS[name] = value;
6589
+ return value;
6590
+ };
6591
+ var LEGACY_ALIASES = {
6592
+ __proto__: null,
6593
+ "%ArrayBufferPrototype%": ["ArrayBuffer", "prototype"],
6594
+ "%ArrayPrototype%": ["Array", "prototype"],
6595
+ "%ArrayProto_entries%": ["Array", "prototype", "entries"],
6596
+ "%ArrayProto_forEach%": ["Array", "prototype", "forEach"],
6597
+ "%ArrayProto_keys%": ["Array", "prototype", "keys"],
6598
+ "%ArrayProto_values%": ["Array", "prototype", "values"],
6599
+ "%AsyncFunctionPrototype%": ["AsyncFunction", "prototype"],
6600
+ "%AsyncGenerator%": ["AsyncGeneratorFunction", "prototype"],
6601
+ "%AsyncGeneratorPrototype%": ["AsyncGeneratorFunction", "prototype", "prototype"],
6602
+ "%BooleanPrototype%": ["Boolean", "prototype"],
6603
+ "%DataViewPrototype%": ["DataView", "prototype"],
6604
+ "%DatePrototype%": ["Date", "prototype"],
6605
+ "%ErrorPrototype%": ["Error", "prototype"],
6606
+ "%EvalErrorPrototype%": ["EvalError", "prototype"],
6607
+ "%Float32ArrayPrototype%": ["Float32Array", "prototype"],
6608
+ "%Float64ArrayPrototype%": ["Float64Array", "prototype"],
6609
+ "%FunctionPrototype%": ["Function", "prototype"],
6610
+ "%Generator%": ["GeneratorFunction", "prototype"],
6611
+ "%GeneratorPrototype%": ["GeneratorFunction", "prototype", "prototype"],
6612
+ "%Int8ArrayPrototype%": ["Int8Array", "prototype"],
6613
+ "%Int16ArrayPrototype%": ["Int16Array", "prototype"],
6614
+ "%Int32ArrayPrototype%": ["Int32Array", "prototype"],
6615
+ "%JSONParse%": ["JSON", "parse"],
6616
+ "%JSONStringify%": ["JSON", "stringify"],
6617
+ "%MapPrototype%": ["Map", "prototype"],
6618
+ "%NumberPrototype%": ["Number", "prototype"],
6619
+ "%ObjectPrototype%": ["Object", "prototype"],
6620
+ "%ObjProto_toString%": ["Object", "prototype", "toString"],
6621
+ "%ObjProto_valueOf%": ["Object", "prototype", "valueOf"],
6622
+ "%PromisePrototype%": ["Promise", "prototype"],
6623
+ "%PromiseProto_then%": ["Promise", "prototype", "then"],
6624
+ "%Promise_all%": ["Promise", "all"],
6625
+ "%Promise_reject%": ["Promise", "reject"],
6626
+ "%Promise_resolve%": ["Promise", "resolve"],
6627
+ "%RangeErrorPrototype%": ["RangeError", "prototype"],
6628
+ "%ReferenceErrorPrototype%": ["ReferenceError", "prototype"],
6629
+ "%RegExpPrototype%": ["RegExp", "prototype"],
6630
+ "%SetPrototype%": ["Set", "prototype"],
6631
+ "%SharedArrayBufferPrototype%": ["SharedArrayBuffer", "prototype"],
6632
+ "%StringPrototype%": ["String", "prototype"],
6633
+ "%SymbolPrototype%": ["Symbol", "prototype"],
6634
+ "%SyntaxErrorPrototype%": ["SyntaxError", "prototype"],
6635
+ "%TypedArrayPrototype%": ["TypedArray", "prototype"],
6636
+ "%TypeErrorPrototype%": ["TypeError", "prototype"],
6637
+ "%Uint8ArrayPrototype%": ["Uint8Array", "prototype"],
6638
+ "%Uint8ClampedArrayPrototype%": ["Uint8ClampedArray", "prototype"],
6639
+ "%Uint16ArrayPrototype%": ["Uint16Array", "prototype"],
6640
+ "%Uint32ArrayPrototype%": ["Uint32Array", "prototype"],
6641
+ "%URIErrorPrototype%": ["URIError", "prototype"],
6642
+ "%WeakMapPrototype%": ["WeakMap", "prototype"],
6643
+ "%WeakSetPrototype%": ["WeakSet", "prototype"]
6644
+ };
6645
+ var bind2 = functionBind;
6646
+ var hasOwn = requireHasown();
6647
+ var $concat = bind2.call($call, Array.prototype.concat);
6648
+ var $spliceApply = bind2.call($apply, Array.prototype.splice);
6649
+ var $replace = bind2.call($call, String.prototype.replace);
6650
+ var $strSlice = bind2.call($call, String.prototype.slice);
6651
+ var $exec = bind2.call($call, RegExp.prototype.exec);
6652
+ var rePropName = /[^%.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|%$))/g;
6653
+ var reEscapeChar = /\\(\\)?/g;
6654
+ var stringToPath = function stringToPath2(string) {
6655
+ var first = $strSlice(string, 0, 1);
6656
+ var last = $strSlice(string, -1);
6657
+ if (first === "%" && last !== "%") {
6658
+ throw new $SyntaxError("invalid intrinsic syntax, expected closing `%`");
6659
+ } else if (last === "%" && first !== "%") {
6660
+ throw new $SyntaxError("invalid intrinsic syntax, expected opening `%`");
6575
6661
  }
6576
- var quoteRE = quoteREs[opts.quoteStyle || "single"];
6577
- quoteRE.lastIndex = 0;
6578
- var s = $replace.call($replace.call(str, quoteRE, "\\$1"), /[\x00-\x1f]/g, lowbyte);
6579
- return wrapQuotes(s, "single", opts);
6580
- }
6581
- function lowbyte(c) {
6582
- var n = c.charCodeAt(0);
6583
- var x = {
6584
- 8: "b",
6585
- 9: "t",
6586
- 10: "n",
6587
- 12: "f",
6588
- 13: "r"
6589
- }[n];
6590
- if (x) {
6591
- return "\\" + x;
6662
+ var result = [];
6663
+ $replace(string, rePropName, function(match, number, quote2, subString) {
6664
+ result[result.length] = quote2 ? $replace(subString, reEscapeChar, "$1") : number || match;
6665
+ });
6666
+ return result;
6667
+ };
6668
+ var getBaseIntrinsic = function getBaseIntrinsic2(name, allowMissing) {
6669
+ var intrinsicName = name;
6670
+ var alias;
6671
+ if (hasOwn(LEGACY_ALIASES, intrinsicName)) {
6672
+ alias = LEGACY_ALIASES[intrinsicName];
6673
+ intrinsicName = "%" + alias[0] + "%";
6592
6674
  }
6593
- return "\\x" + (n < 16 ? "0" : "") + $toUpperCase.call(n.toString(16));
6594
- }
6595
- function markBoxed(str) {
6596
- return "Object(" + str + ")";
6597
- }
6598
- function weakCollectionOf(type2) {
6599
- return type2 + " { ? }";
6600
- }
6601
- function collectionOf(type2, size, entries, indent) {
6602
- var joinedEntries = indent ? indentedJoin(entries, indent) : $join.call(entries, ", ");
6603
- return type2 + " (" + size + ") {" + joinedEntries + "}";
6604
- }
6605
- function singleLineValues(xs) {
6606
- for (var i = 0; i < xs.length; i++) {
6607
- if (indexOf(xs[i], "\n") >= 0) {
6608
- return false;
6675
+ if (hasOwn(INTRINSICS, intrinsicName)) {
6676
+ var value = INTRINSICS[intrinsicName];
6677
+ if (value === needsEval) {
6678
+ value = doEval(intrinsicName);
6679
+ }
6680
+ if (typeof value === "undefined" && !allowMissing) {
6681
+ throw new $TypeError$3("intrinsic " + name + " exists, but is not available. Please file an issue!");
6609
6682
  }
6683
+ return {
6684
+ alias,
6685
+ name: intrinsicName,
6686
+ value
6687
+ };
6610
6688
  }
6611
- return true;
6612
- }
6613
- function getIndent(opts, depth) {
6614
- var baseIndent;
6615
- if (opts.indent === " ") {
6616
- baseIndent = " ";
6617
- } else if (typeof opts.indent === "number" && opts.indent > 0) {
6618
- baseIndent = $join.call(Array(opts.indent + 1), " ");
6619
- } else {
6620
- return null;
6689
+ throw new $SyntaxError("intrinsic " + name + " does not exist!");
6690
+ };
6691
+ var getIntrinsic = function GetIntrinsic(name, allowMissing) {
6692
+ if (typeof name !== "string" || name.length === 0) {
6693
+ throw new $TypeError$3("intrinsic name must be a non-empty string");
6621
6694
  }
6622
- return {
6623
- base: baseIndent,
6624
- prev: $join.call(Array(depth + 1), baseIndent)
6625
- };
6626
- }
6627
- function indentedJoin(xs, indent) {
6628
- if (xs.length === 0) {
6629
- return "";
6695
+ if (arguments.length > 1 && typeof allowMissing !== "boolean") {
6696
+ throw new $TypeError$3('"allowMissing" argument must be a boolean');
6630
6697
  }
6631
- var lineJoiner = "\n" + indent.prev + indent.base;
6632
- return lineJoiner + $join.call(xs, "," + lineJoiner) + "\n" + indent.prev;
6633
- }
6634
- function arrObjKeys(obj, inspect2) {
6635
- var isArr = isArray$3(obj);
6636
- var xs = [];
6637
- if (isArr) {
6638
- xs.length = obj.length;
6639
- for (var i = 0; i < obj.length; i++) {
6640
- xs[i] = has$3(obj, i) ? inspect2(obj[i], obj) : "";
6641
- }
6698
+ if ($exec(/^%?[^%]*%?$/, name) === null) {
6699
+ throw new $SyntaxError("`%` may not be present anywhere but at the beginning and end of the intrinsic name");
6642
6700
  }
6643
- var syms = typeof gOPS === "function" ? gOPS(obj) : [];
6644
- var symMap;
6645
- if (hasShammedSymbols) {
6646
- symMap = {};
6647
- for (var k = 0; k < syms.length; k++) {
6648
- symMap["$" + syms[k]] = syms[k];
6649
- }
6701
+ var parts = stringToPath(name);
6702
+ var intrinsicBaseName = parts.length > 0 ? parts[0] : "";
6703
+ var intrinsic = getBaseIntrinsic("%" + intrinsicBaseName + "%", allowMissing);
6704
+ var intrinsicRealName = intrinsic.name;
6705
+ var value = intrinsic.value;
6706
+ var skipFurtherCaching = false;
6707
+ var alias = intrinsic.alias;
6708
+ if (alias) {
6709
+ intrinsicBaseName = alias[0];
6710
+ $spliceApply(parts, $concat([0, 1], alias));
6650
6711
  }
6651
- for (var key in obj) {
6652
- if (!has$3(obj, key)) {
6653
- continue;
6654
- }
6655
- if (isArr && String(Number(key)) === key && key < obj.length) {
6656
- continue;
6712
+ for (var i = 1, isOwn = true; i < parts.length; i += 1) {
6713
+ var part = parts[i];
6714
+ var first = $strSlice(part, 0, 1);
6715
+ var last = $strSlice(part, -1);
6716
+ if ((first === '"' || first === "'" || first === "`" || (last === '"' || last === "'" || last === "`")) && first !== last) {
6717
+ throw new $SyntaxError("property names with quotes must have matching quotes");
6657
6718
  }
6658
- if (hasShammedSymbols && symMap["$" + key] instanceof Symbol) {
6659
- continue;
6660
- } else if ($test.call(/[^\w$]/, key)) {
6661
- xs.push(inspect2(key, obj) + ": " + inspect2(obj[key], obj));
6662
- } else {
6663
- xs.push(key + ": " + inspect2(obj[key], obj));
6719
+ if (part === "constructor" || !isOwn) {
6720
+ skipFurtherCaching = true;
6664
6721
  }
6665
- }
6666
- if (typeof gOPS === "function") {
6667
- for (var j = 0; j < syms.length; j++) {
6668
- if (isEnumerable.call(obj, syms[j])) {
6669
- xs.push("[" + inspect2(syms[j]) + "]: " + inspect2(obj[syms[j]], obj));
6722
+ intrinsicBaseName += "." + part;
6723
+ intrinsicRealName = "%" + intrinsicBaseName + "%";
6724
+ if (hasOwn(INTRINSICS, intrinsicRealName)) {
6725
+ value = INTRINSICS[intrinsicRealName];
6726
+ } else if (value != null) {
6727
+ if (!(part in value)) {
6728
+ if (!allowMissing) {
6729
+ throw new $TypeError$3("base intrinsic for " + name + " exists, but the property is not available.");
6730
+ }
6731
+ return void 0;
6732
+ }
6733
+ if ($gOPD && i + 1 >= parts.length) {
6734
+ var desc = $gOPD(value, part);
6735
+ isOwn = !!desc;
6736
+ if (isOwn && "get" in desc && !("originalValue" in desc.get)) {
6737
+ value = desc.get;
6738
+ } else {
6739
+ value = value[part];
6740
+ }
6741
+ } else {
6742
+ isOwn = hasOwn(value, part);
6743
+ value = value[part];
6744
+ }
6745
+ if (isOwn && !skipFurtherCaching) {
6746
+ INTRINSICS[intrinsicRealName] = value;
6670
6747
  }
6671
6748
  }
6672
6749
  }
6673
- return xs;
6674
- }
6675
- var GetIntrinsic2 = getIntrinsic;
6676
- var callBound = callBound$1;
6677
- var inspect = objectInspect;
6678
- var $TypeError = type;
6679
- var $WeakMap = GetIntrinsic2("%WeakMap%", true);
6680
- var $Map = GetIntrinsic2("%Map%", true);
6681
- var $weakMapGet = callBound("WeakMap.prototype.get", true);
6682
- var $weakMapSet = callBound("WeakMap.prototype.set", true);
6683
- var $weakMapHas = callBound("WeakMap.prototype.has", true);
6684
- var $mapGet = callBound("Map.prototype.get", true);
6685
- var $mapSet = callBound("Map.prototype.set", true);
6686
- var $mapHas = callBound("Map.prototype.has", true);
6687
- var listGetNode = function(list, key) {
6688
- var prev = list;
6689
- var curr;
6690
- for (; (curr = prev.next) !== null; prev = curr) {
6691
- if (curr.key === key) {
6692
- prev.next = curr.next;
6693
- curr.next = /** @type {NonNullable<typeof list.next>} */
6694
- list.next;
6695
- list.next = curr;
6696
- return curr;
6697
- }
6698
- }
6699
- };
6700
- var listGet = function(objects, key) {
6701
- var node = listGetNode(objects, key);
6702
- return node && node.value;
6750
+ return value;
6703
6751
  };
6704
- var listSet = function(objects, key, value) {
6705
- var node = listGetNode(objects, key);
6706
- if (node) {
6707
- node.value = value;
6708
- } else {
6709
- objects.next = /** @type {import('.').ListNode<typeof value>} */
6710
- {
6711
- // eslint-disable-line no-param-reassign, no-extra-parens
6712
- key,
6713
- next: objects.next,
6714
- value
6715
- };
6752
+ var GetIntrinsic$2 = getIntrinsic;
6753
+ var callBindBasic2 = callBindApplyHelpers;
6754
+ var $indexOf = callBindBasic2([GetIntrinsic$2("%String.prototype.indexOf%")]);
6755
+ var callBound$2 = function callBoundIntrinsic(name, allowMissing) {
6756
+ var intrinsic = (
6757
+ /** @type {Parameters<typeof callBindBasic>[0][0]} */
6758
+ GetIntrinsic$2(name, !!allowMissing)
6759
+ );
6760
+ if (typeof intrinsic === "function" && $indexOf(name, ".prototype.") > -1) {
6761
+ return callBindBasic2([intrinsic]);
6716
6762
  }
6763
+ return intrinsic;
6717
6764
  };
6718
- var listHas = function(objects, key) {
6719
- return !!listGetNode(objects, key);
6720
- };
6721
- var sideChannel = function getSideChannel() {
6722
- var $wm;
6765
+ var GetIntrinsic$1 = getIntrinsic;
6766
+ var callBound$1 = callBound$2;
6767
+ var inspect$2 = objectInspect;
6768
+ var $TypeError$2 = type;
6769
+ var $Map = GetIntrinsic$1("%Map%", true);
6770
+ var $mapGet = callBound$1("Map.prototype.get", true);
6771
+ var $mapSet = callBound$1("Map.prototype.set", true);
6772
+ var $mapHas = callBound$1("Map.prototype.has", true);
6773
+ var $mapDelete = callBound$1("Map.prototype.delete", true);
6774
+ var $mapSize = callBound$1("Map.prototype.size", true);
6775
+ var sideChannelMap = !!$Map && /** @type {Exclude<import('.'), false>} */
6776
+ function getSideChannelMap() {
6723
6777
  var $m;
6724
- var $o;
6725
6778
  var channel = {
6726
6779
  assert: function(key) {
6727
6780
  if (!channel.has(key)) {
6728
- throw new $TypeError("Side channel does not contain " + inspect(key));
6781
+ throw new $TypeError$2("Side channel does not contain " + inspect$2(key));
6729
6782
  }
6730
6783
  },
6731
- get: function(key) {
6732
- if ($WeakMap && key && (typeof key === "object" || typeof key === "function")) {
6733
- if ($wm) {
6734
- return $weakMapGet($wm, key);
6735
- }
6736
- } else if ($Map) {
6737
- if ($m) {
6738
- return $mapGet($m, key);
6739
- }
6740
- } else {
6741
- if ($o) {
6742
- return listGet($o, key);
6784
+ "delete": function(key) {
6785
+ if ($m) {
6786
+ var result = $mapDelete($m, key);
6787
+ if ($mapSize($m) === 0) {
6788
+ $m = void 0;
6743
6789
  }
6790
+ return result;
6791
+ }
6792
+ return false;
6793
+ },
6794
+ get: function(key) {
6795
+ if ($m) {
6796
+ return $mapGet($m, key);
6744
6797
  }
6745
6798
  },
6746
6799
  has: function(key) {
6747
- if ($WeakMap && key && (typeof key === "object" || typeof key === "function")) {
6748
- if ($wm) {
6749
- return $weakMapHas($wm, key);
6750
- }
6751
- } else if ($Map) {
6752
- if ($m) {
6753
- return $mapHas($m, key);
6754
- }
6755
- } else {
6756
- if ($o) {
6757
- return listHas($o, key);
6758
- }
6800
+ if ($m) {
6801
+ return $mapHas($m, key);
6759
6802
  }
6760
6803
  return false;
6761
6804
  },
6762
6805
  set: function(key, value) {
6763
- if ($WeakMap && key && (typeof key === "object" || typeof key === "function")) {
6764
- if (!$wm) {
6765
- $wm = new $WeakMap();
6806
+ if (!$m) {
6807
+ $m = new $Map();
6808
+ }
6809
+ $mapSet($m, key, value);
6810
+ }
6811
+ };
6812
+ return channel;
6813
+ };
6814
+ var GetIntrinsic2 = getIntrinsic;
6815
+ var callBound = callBound$2;
6816
+ var inspect$1 = objectInspect;
6817
+ var getSideChannelMap$1 = sideChannelMap;
6818
+ var $TypeError$1 = type;
6819
+ var $WeakMap = GetIntrinsic2("%WeakMap%", true);
6820
+ var $weakMapGet = callBound("WeakMap.prototype.get", true);
6821
+ var $weakMapSet = callBound("WeakMap.prototype.set", true);
6822
+ var $weakMapHas = callBound("WeakMap.prototype.has", true);
6823
+ var $weakMapDelete = callBound("WeakMap.prototype.delete", true);
6824
+ var sideChannelWeakmap = $WeakMap ? (
6825
+ /** @type {Exclude<import('.'), false>} */
6826
+ function getSideChannelWeakMap() {
6827
+ var $wm;
6828
+ var $m;
6829
+ var channel = {
6830
+ assert: function(key) {
6831
+ if (!channel.has(key)) {
6832
+ throw new $TypeError$1("Side channel does not contain " + inspect$1(key));
6766
6833
  }
6767
- $weakMapSet($wm, key, value);
6768
- } else if ($Map) {
6769
- if (!$m) {
6770
- $m = new $Map();
6834
+ },
6835
+ "delete": function(key) {
6836
+ if ($WeakMap && key && (typeof key === "object" || typeof key === "function")) {
6837
+ if ($wm) {
6838
+ return $weakMapDelete($wm, key);
6839
+ }
6840
+ } else if (getSideChannelMap$1) {
6841
+ if ($m) {
6842
+ return $m["delete"](key);
6843
+ }
6771
6844
  }
6772
- $mapSet($m, key, value);
6773
- } else {
6774
- if (!$o) {
6775
- $o = { key: {}, next: null };
6845
+ return false;
6846
+ },
6847
+ get: function(key) {
6848
+ if ($WeakMap && key && (typeof key === "object" || typeof key === "function")) {
6849
+ if ($wm) {
6850
+ return $weakMapGet($wm, key);
6851
+ }
6852
+ }
6853
+ return $m && $m.get(key);
6854
+ },
6855
+ has: function(key) {
6856
+ if ($WeakMap && key && (typeof key === "object" || typeof key === "function")) {
6857
+ if ($wm) {
6858
+ return $weakMapHas($wm, key);
6859
+ }
6860
+ }
6861
+ return !!$m && $m.has(key);
6862
+ },
6863
+ set: function(key, value) {
6864
+ if ($WeakMap && key && (typeof key === "object" || typeof key === "function")) {
6865
+ if (!$wm) {
6866
+ $wm = new $WeakMap();
6867
+ }
6868
+ $weakMapSet($wm, key, value);
6869
+ } else if (getSideChannelMap$1) {
6870
+ if (!$m) {
6871
+ $m = getSideChannelMap$1();
6872
+ }
6873
+ $m.set(key, value);
6776
6874
  }
6777
- listSet($o, key, value);
6778
6875
  }
6876
+ };
6877
+ return channel;
6878
+ }
6879
+ ) : getSideChannelMap$1;
6880
+ var $TypeError = type;
6881
+ var inspect = objectInspect;
6882
+ var getSideChannelList2 = sideChannelList;
6883
+ var getSideChannelMap2 = sideChannelMap;
6884
+ var getSideChannelWeakMap2 = sideChannelWeakmap;
6885
+ var makeChannel = getSideChannelWeakMap2 || getSideChannelMap2 || getSideChannelList2;
6886
+ var sideChannel = function getSideChannel() {
6887
+ var $channelData;
6888
+ var channel = {
6889
+ assert: function(key) {
6890
+ if (!channel.has(key)) {
6891
+ throw new $TypeError("Side channel does not contain " + inspect(key));
6892
+ }
6893
+ },
6894
+ "delete": function(key) {
6895
+ return !!$channelData && $channelData["delete"](key);
6896
+ },
6897
+ get: function(key) {
6898
+ return $channelData && $channelData.get(key);
6899
+ },
6900
+ has: function(key) {
6901
+ return !!$channelData && $channelData.has(key);
6902
+ },
6903
+ set: function(key, value) {
6904
+ if (!$channelData) {
6905
+ $channelData = makeChannel();
6906
+ }
6907
+ $channelData.set(key, value);
6779
6908
  }
6780
6909
  };
6781
6910
  return channel;
@@ -7510,25 +7639,21 @@ const relatedSchema = z.intersection(
7510
7639
  );
7511
7640
  const authorSchema = z.object({
7512
7641
  id: z.union([z.number(), z.string()]),
7513
- name: z.string(),
7642
+ name: z.string().optional(),
7514
7643
  email: z.string(),
7515
7644
  avatar: z.union([
7516
7645
  z.object({
7517
- url: z.string().nullable(),
7646
+ url: z.string()
7647
+ }),
7648
+ z.object({
7649
+ url: z.string(),
7518
7650
  formats: z.object({
7519
7651
  thumbnail: z.object({
7520
7652
  url: z.string()
7521
7653
  }).nullable()
7522
7654
  })
7523
- }),
7524
- z.object({
7525
- id: z.string(),
7526
- name: z.string(),
7527
- email: z.string(),
7528
- url: z.string().nullable(),
7529
- avatar: z.string().nullable()
7530
7655
  })
7531
- ]).nullable()
7656
+ ]).nullable().optional()
7532
7657
  });
7533
7658
  const approvalStatusSchema = z.union([
7534
7659
  z.literal(COMMENT_STATUS.PENDING),