col-browser 2.6.6 → 2.8.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.
@@ -9,6 +9,22 @@ var __publicField = (obj, key, value) => __defNormalProp(obj, typeof key !== "sy
9
9
  var setImmediate = typeof globalThis.setImmediate !== "undefined" ? globalThis.setImmediate : function(fn) {
10
10
  return setTimeout(fn, 0);
11
11
  };
12
+ function _interopNamespaceDefault(e2) {
13
+ const n2 = Object.create(null, { [Symbol.toStringTag]: { value: "Module" } });
14
+ if (e2) {
15
+ for (const k in e2) {
16
+ if (k !== "default") {
17
+ const d2 = Object.getOwnPropertyDescriptor(e2, k);
18
+ Object.defineProperty(n2, k, d2.get ? d2 : {
19
+ enumerable: true,
20
+ get: () => e2[k]
21
+ });
22
+ }
23
+ }
24
+ }
25
+ n2.default = e2;
26
+ return Object.freeze(n2);
27
+ }
12
28
  function _mergeNamespaces(n2, m2) {
13
29
  for (var i = 0; i < m2.length; i++) {
14
30
  const e2 = m2[i];
@@ -28,6 +44,7 @@ var __publicField = (obj, key, value) => __defNormalProp(obj, typeof key !== "sy
28
44
  }
29
45
  return Object.freeze(Object.defineProperty(n2, Symbol.toStringTag, { value: "Module" }));
30
46
  }
47
+ const maplibregl__namespace = /* @__PURE__ */ _interopNamespaceDefault(maplibregl);
31
48
  function getDefaultExportFromCjs(x2) {
32
49
  return x2 && x2.__esModule && Object.prototype.hasOwnProperty.call(x2, "default") ? x2["default"] : x2;
33
50
  }
@@ -68668,7 +68685,7 @@ html body {
68668
68685
  if (defaultExpandKey) {
68669
68686
  return this.expandToTaxon(defaultExpandKey);
68670
68687
  } else if (defaultTaxonKey) {
68671
- return this.expandToTaxon(defaultTaxonKey);
68688
+ return this.expandToTaxon(defaultTaxonKey, false);
68672
68689
  }
68673
68690
  }
68674
68691
  );
@@ -68685,7 +68702,7 @@ html body {
68685
68702
  });
68686
68703
  });
68687
68704
  });
68688
- __publicField(this, "expandToTaxon", async (defaultExpandKey) => {
68705
+ __publicField(this, "expandToTaxon", async (defaultExpandKey, scrollToTaxon = true) => {
68689
68706
  const {
68690
68707
  showSourceTaxon,
68691
68708
  datasetKey,
@@ -68764,7 +68781,7 @@ html body {
68764
68781
  const loadedKeys = [...data.map((t2) => t2.id).reverse()];
68765
68782
  this.setState(
68766
68783
  { treeData },
68767
- () => this.reloadLoadedKeys(loadedKeys, defaultExpandKey)
68784
+ () => this.reloadLoadedKeys(loadedKeys, defaultExpandKey, true, scrollToTaxon)
68768
68785
  );
68769
68786
  });
68770
68787
  __publicField(this, "fetchChildPage", async (dataRef, reloadAll, dontUpdateState) => {
@@ -68893,7 +68910,7 @@ html body {
68893
68910
  }
68894
68911
  return node2;
68895
68912
  });
68896
- __publicField(this, "reloadLoadedKeys", async (keys2, expandKey, expandAll = true) => {
68913
+ __publicField(this, "reloadLoadedKeys", async (keys2, expandKey, expandAll = true, scrollToTaxon = true) => {
68897
68914
  this.setState({ rootLoading: true });
68898
68915
  const { loadedKeys: storedKeys } = this.state;
68899
68916
  let { treeData } = this.state;
@@ -68946,6 +68963,7 @@ html body {
68946
68963
  );
68947
68964
  if (targetNode) {
68948
68965
  this.setState({ treeData: [...this.state.treeData] }, () => {
68966
+ if (!scrollToTaxon) return;
68949
68967
  setTimeout(() => {
68950
68968
  const elmnt = document.getElementById(expandKey);
68951
68969
  elmnt.scrollIntoView({ behavior: "smooth", block: "center" });
@@ -68977,7 +68995,7 @@ html body {
68977
68995
  newState.expandedKeys = loadedKeys;
68978
68996
  }
68979
68997
  this.setState(newState, () => {
68980
- if (expandKey) {
68998
+ if (expandKey && scrollToTaxon) {
68981
68999
  setTimeout(() => {
68982
69000
  const elmnt = document.getElementById(expandKey);
68983
69001
  elmnt.scrollIntoView({ behavior: "smooth", block: "center" });
@@ -69638,7 +69656,8 @@ html body {
69638
69656
  linkToSpeciesPage,
69639
69657
  citation,
69640
69658
  type: type2,
69641
- insertPlaceholder = true
69659
+ insertPlaceholder = true,
69660
+ autoFocus
69642
69661
  } = this.props;
69643
69662
  const { hideExtinct, dataset } = this.state;
69644
69663
  const handleSelectName = (name) => {
@@ -69673,7 +69692,8 @@ html body {
69673
69692
  },
69674
69693
  defaultTaxonKey: expandedTaxonKey || null,
69675
69694
  onSelectName: handleSelectName,
69676
- onResetSearch: handleResetSearch
69695
+ onResetSearch: handleResetSearch,
69696
+ autoFocus
69677
69697
  }
69678
69698
  ) }),
69679
69699
  showTreeOptions && /* @__PURE__ */ jsxRuntimeExports.jsxs(Col, { style: { paddingLeft: "8px" }, children: [
@@ -69743,6 +69763,7 @@ html body {
69743
69763
  citation,
69744
69764
  type: type2,
69745
69765
  insertPlaceholder,
69766
+ autoFocus,
69746
69767
  auth,
69747
69768
  ...routerProps
69748
69769
  }) {
@@ -69758,6 +69779,7 @@ html body {
69758
69779
  citation,
69759
69780
  type: type2,
69760
69781
  insertPlaceholder,
69782
+ autoFocus,
69761
69783
  auth
69762
69784
  }
69763
69785
  ) });
@@ -69876,60 +69898,98 @@ html body {
69876
69898
  (data) => data.reduce((a, c) => (a[c.scope] = c, a), {})
69877
69899
  );
69878
69900
  const token = "%[a-f0-9]{2}";
69879
- const singleMatcher = new RegExp("(" + token + ")|([^%]+?)", "gi");
69880
- const multiMatcher = new RegExp("(" + token + ")+", "gi");
69881
- function decodeComponents(components2, split) {
69882
- try {
69883
- return [decodeURIComponent(components2.join(""))];
69884
- } catch {
69901
+ const multiMatcher = new RegExp(`(${token})+`, "gi");
69902
+ const hexPair = /^[a-f\d]{2}$/i;
69903
+ function parsePercentByte(input, position2) {
69904
+ if (input.codePointAt(position2) !== 37 || position2 + 3 > input.length) {
69905
+ return;
69885
69906
  }
69886
- if (components2.length === 1) {
69887
- return components2;
69907
+ const digits = input.slice(position2 + 1, position2 + 3);
69908
+ if (!hexPair.test(digits)) {
69909
+ return;
69888
69910
  }
69889
- split = split || 1;
69890
- const left = components2.slice(0, split);
69891
- const right = components2.slice(split);
69892
- return Array.prototype.concat.call([], decodeComponents(left), decodeComponents(right));
69911
+ return { byte: Number.parseInt(digits, 16), next: position2 + 3 };
69912
+ }
69913
+ function utf8SequenceLength(byte) {
69914
+ if (byte <= 127) {
69915
+ return 1;
69916
+ }
69917
+ if (byte >= 194 && byte <= 223) {
69918
+ return 2;
69919
+ }
69920
+ if (byte >= 224 && byte <= 239) {
69921
+ return 3;
69922
+ }
69923
+ if (byte >= 240 && byte <= 244) {
69924
+ return 4;
69925
+ }
69926
+ return 0;
69927
+ }
69928
+ function isContinuationByte(byte) {
69929
+ return byte >= 128 && byte <= 191;
69893
69930
  }
69894
69931
  function decode$1(input) {
69895
69932
  try {
69896
69933
  return decodeURIComponent(input);
69897
69934
  } catch {
69898
- let tokens = input.match(singleMatcher) || [];
69899
- for (let i = 1; i < tokens.length; i++) {
69900
- input = decodeComponents(tokens, i).join("");
69901
- tokens = input.match(singleMatcher) || [];
69935
+ let output = "";
69936
+ let position2 = 0;
69937
+ while (position2 < input.length) {
69938
+ if (input.codePointAt(position2) !== 37) {
69939
+ output += input.charAt(position2);
69940
+ position2++;
69941
+ continue;
69942
+ }
69943
+ const firstByte = parsePercentByte(input, position2);
69944
+ if (!firstByte) {
69945
+ output += input.charAt(position2);
69946
+ position2++;
69947
+ continue;
69948
+ }
69949
+ const sequenceLength = utf8SequenceLength(firstByte.byte);
69950
+ if (sequenceLength === 0) {
69951
+ const pair = input.slice(position2, position2 + 6);
69952
+ if (pair === "%FE%FF" || pair === "%FF%FE") {
69953
+ output += "��";
69954
+ position2 += 6;
69955
+ continue;
69956
+ }
69957
+ output += input.slice(position2, position2 + 3);
69958
+ position2 += 3;
69959
+ continue;
69960
+ }
69961
+ let end = firstByte.next;
69962
+ let validSequence = true;
69963
+ for (let index2 = 1; index2 < sequenceLength; index2++) {
69964
+ const nextByte = parsePercentByte(input, end);
69965
+ if (!nextByte || !isContinuationByte(nextByte.byte)) {
69966
+ validSequence = false;
69967
+ break;
69968
+ }
69969
+ end = nextByte.next;
69970
+ }
69971
+ if (validSequence) {
69972
+ const encodedSequence = input.slice(position2, end);
69973
+ try {
69974
+ output += decodeURIComponent(encodedSequence);
69975
+ position2 = end;
69976
+ continue;
69977
+ } catch {
69978
+ }
69979
+ }
69980
+ const literal = input.slice(position2, position2 + 3);
69981
+ output += literal === "%C2" ? "�" : literal;
69982
+ position2 += 3;
69902
69983
  }
69903
- return input;
69984
+ return output;
69904
69985
  }
69905
69986
  }
69906
69987
  function customDecodeURIComponent(input) {
69907
- const replaceMap = {
69908
- "%FE%FF": "��",
69909
- "%FF%FE": "��"
69910
- };
69911
- let match2 = multiMatcher.exec(input);
69912
- while (match2) {
69913
- try {
69914
- replaceMap[match2[0]] = decodeURIComponent(match2[0]);
69915
- } catch {
69916
- const result2 = decode$1(match2[0]);
69917
- if (result2 !== match2[0]) {
69918
- replaceMap[match2[0]] = result2;
69919
- }
69920
- }
69921
- match2 = multiMatcher.exec(input);
69922
- }
69923
- replaceMap["%C2"] = "�";
69924
- const entries2 = Object.keys(replaceMap);
69925
- for (const key2 of entries2) {
69926
- input = input.replace(new RegExp(key2, "g"), replaceMap[key2]);
69927
- }
69928
- return input;
69988
+ return input.replace(multiMatcher, (run2) => decode$1(run2));
69929
69989
  }
69930
69990
  function decodeUriComponent(encodedURI) {
69931
69991
  if (typeof encodedURI !== "string") {
69932
- throw new TypeError("Expected `encodedURI` to be of type `string`, got `" + typeof encodedURI + "`");
69992
+ throw new TypeError(`Expected \`encodedURI\` to be of type \`string\`, got \`${typeof encodedURI}\``);
69933
69993
  }
69934
69994
  try {
69935
69995
  return decodeURIComponent(encodedURI);
@@ -69987,15 +70047,11 @@ html body {
69987
70047
  return result2;
69988
70048
  }
69989
70049
  if (value === null) {
69990
- return [
69991
- ...result2,
69992
- [encode(key2, options), "[", index2, "]"].join("")
69993
- ];
70050
+ result2.push([encode(key2, options), "[", index2, "]"].join(""));
70051
+ return result2;
69994
70052
  }
69995
- return [
69996
- ...result2,
69997
- [encode(key2, options), "[", encode(index2, options), "]=", encode(value, options)].join("")
69998
- ];
70053
+ result2.push([encode(key2, options), "[", encode(index2, options), "]=", encode(value, options)].join(""));
70054
+ return result2;
69999
70055
  };
70000
70056
  }
70001
70057
  case "bracket": {
@@ -70004,15 +70060,11 @@ html body {
70004
70060
  return result2;
70005
70061
  }
70006
70062
  if (value === null) {
70007
- return [
70008
- ...result2,
70009
- [encode(key2, options), "[]"].join("")
70010
- ];
70063
+ result2.push([encode(key2, options), "[]"].join(""));
70064
+ return result2;
70011
70065
  }
70012
- return [
70013
- ...result2,
70014
- [encode(key2, options), "[]=", encode(value, options)].join("")
70015
- ];
70066
+ result2.push([encode(key2, options), "[]=", encode(value, options)].join(""));
70067
+ return result2;
70016
70068
  };
70017
70069
  }
70018
70070
  case "colon-list-separator": {
@@ -70021,15 +70073,11 @@ html body {
70021
70073
  return result2;
70022
70074
  }
70023
70075
  if (value === null) {
70024
- return [
70025
- ...result2,
70026
- [encode(key2, options), ":list="].join("")
70027
- ];
70076
+ result2.push([encode(key2, options), ":list="].join(""));
70077
+ return result2;
70028
70078
  }
70029
- return [
70030
- ...result2,
70031
- [encode(key2, options), ":list=", encode(value, options)].join("")
70032
- ];
70079
+ result2.push([encode(key2, options), ":list=", encode(value, options)].join(""));
70080
+ return result2;
70033
70081
  };
70034
70082
  }
70035
70083
  case "comma":
@@ -70042,9 +70090,11 @@ html body {
70042
70090
  }
70043
70091
  value = value === null ? "" : value;
70044
70092
  if (result2.length === 0) {
70045
- return [[encode(key2, options), keyValueSeparator, encode(value, options)].join("")];
70093
+ result2.push([encode(key2, options), keyValueSeparator, encode(value, options)].join(""));
70094
+ return result2;
70046
70095
  }
70047
- return [[result2, encode(value, options)].join(options.arrayFormatSeparator)];
70096
+ result2.push(encode(value, options));
70097
+ return result2;
70048
70098
  };
70049
70099
  }
70050
70100
  default: {
@@ -70053,15 +70103,11 @@ html body {
70053
70103
  return result2;
70054
70104
  }
70055
70105
  if (value === null) {
70056
- return [
70057
- ...result2,
70058
- encode(key2, options)
70059
- ];
70106
+ result2.push(encode(key2, options));
70107
+ return result2;
70060
70108
  }
70061
- return [
70062
- ...result2,
70063
- [encode(key2, options), "=", encode(value, options)].join("")
70064
- ];
70109
+ result2.push([encode(key2, options), "=", encode(value, options)].join(""));
70110
+ return result2;
70065
70111
  };
70066
70112
  }
70067
70113
  }
@@ -70095,7 +70141,11 @@ html body {
70095
70141
  accumulator[key2] = [value];
70096
70142
  return;
70097
70143
  }
70098
- accumulator[key2] = [...accumulator[key2], value];
70144
+ if (!Array.isArray(accumulator[key2])) {
70145
+ accumulator[key2] = [accumulator[key2], value];
70146
+ return;
70147
+ }
70148
+ accumulator[key2].push(value);
70099
70149
  };
70100
70150
  }
70101
70151
  case "colon-list-separator": {
@@ -70110,7 +70160,11 @@ html body {
70110
70160
  accumulator[key2] = [value];
70111
70161
  return;
70112
70162
  }
70113
- accumulator[key2] = [...accumulator[key2], value];
70163
+ if (!Array.isArray(accumulator[key2])) {
70164
+ accumulator[key2] = [accumulator[key2], value];
70165
+ return;
70166
+ }
70167
+ accumulator[key2].push(value);
70114
70168
  };
70115
70169
  }
70116
70170
  case "comma":
@@ -70134,7 +70188,12 @@ html body {
70134
70188
  accumulator[key2] = arrayValue;
70135
70189
  return;
70136
70190
  }
70137
- accumulator[key2] = [...accumulator[key2], ...arrayValue];
70191
+ if (!Array.isArray(accumulator[key2])) {
70192
+ accumulator[key2] = [accumulator[key2]];
70193
+ }
70194
+ for (const item of arrayValue) {
70195
+ accumulator[key2].push(item);
70196
+ }
70138
70197
  };
70139
70198
  }
70140
70199
  default: {
@@ -70143,7 +70202,11 @@ html body {
70143
70202
  accumulator[key2] = value;
70144
70203
  return;
70145
70204
  }
70146
- accumulator[key2] = [...[accumulator[key2]].flat(), value];
70205
+ if (Array.isArray(accumulator[key2])) {
70206
+ accumulator[key2].push(value);
70207
+ return;
70208
+ }
70209
+ accumulator[key2] = [accumulator[key2], value];
70147
70210
  };
70148
70211
  }
70149
70212
  }
@@ -70189,6 +70252,10 @@ html body {
70189
70252
  }
70190
70253
  return hash2;
70191
70254
  }
70255
+ function getUrlWithoutQuery(url) {
70256
+ const queryStart = url.indexOf("?");
70257
+ return queryStart === -1 ? url : url.slice(0, queryStart);
70258
+ }
70192
70259
  function parseValue(value, options, type2) {
70193
70260
  if (type2 === "string" && typeof value === "string") {
70194
70261
  return value;
@@ -70251,10 +70318,23 @@ html body {
70251
70318
  if (!query) {
70252
70319
  return returnValue;
70253
70320
  }
70254
- for (const parameter of query.split("&")) {
70255
- if (parameter === "") {
70321
+ if (/^&+$/.test(query)) {
70322
+ return returnValue;
70323
+ }
70324
+ let parameterStart = 0;
70325
+ let firstSeparator = query.indexOf("&");
70326
+ if (firstSeparator === -1) {
70327
+ firstSeparator = query.length;
70328
+ }
70329
+ for (let index2 = firstSeparator; index2 <= query.length; index2++) {
70330
+ if (index2 < query.length && query[index2] !== "&") {
70256
70331
  continue;
70257
70332
  }
70333
+ if (index2 === parameterStart) {
70334
+ parameterStart = index2 + 1;
70335
+ continue;
70336
+ }
70337
+ const parameter = query.slice(parameterStart, index2);
70258
70338
  const parameter_ = options.decode ? parameter.replaceAll("+", " ") : parameter;
70259
70339
  let [key2, value] = splitOnFirst(parameter_, "=");
70260
70340
  if (key2 === void 0) {
@@ -70262,6 +70342,7 @@ html body {
70262
70342
  }
70263
70343
  value = value === void 0 ? null : ["comma", "separator", "bracket-separator"].includes(options.arrayFormat) ? value : decode(value, options);
70264
70344
  formatter(decode(key2, options), value, returnValue);
70345
+ parameterStart = index2 + 1;
70265
70346
  }
70266
70347
  for (const [key2, value] of Object.entries(returnValue)) {
70267
70348
  if (typeof value === "object" && value !== null && options.types[key2] !== "string") {
@@ -70333,13 +70414,14 @@ html body {
70333
70414
  (item, index2) => options.replacer(`${key2}[${index2}]`, item)
70334
70415
  ).filter((item) => item !== void 0);
70335
70416
  }
70336
- return processedArray.reduce(formatter(key2), []).join("&");
70417
+ const result2 = processedArray.reduce(formatter(key2), []);
70418
+ const arrayFormatSeparator = ["comma", "separator", "bracket-separator"].includes(options.arrayFormat) ? options.arrayFormatSeparator : "&";
70419
+ return result2.join(arrayFormatSeparator);
70337
70420
  }
70338
70421
  return encode(key2, options) + "=" + encode(value, options);
70339
70422
  }).filter((x2) => x2.length > 0).join("&");
70340
70423
  }
70341
70424
  function parseUrl(url, options) {
70342
- var _a2;
70343
70425
  options = {
70344
70426
  decode: true,
70345
70427
  ...options
@@ -70349,7 +70431,7 @@ html body {
70349
70431
  url_ = url;
70350
70432
  }
70351
70433
  return {
70352
- url: ((_a2 = url_ == null ? void 0 : url_.split("?")) == null ? void 0 : _a2[0]) ?? "",
70434
+ url: getUrlWithoutQuery(url_ ?? ""),
70353
70435
  query: parse$1(extract(url), options),
70354
70436
  ...options && options.parseFragmentIdentifier && hash2 ? { fragmentIdentifier: decode(hash2, options) } : {}
70355
70437
  };
@@ -70361,7 +70443,7 @@ html body {
70361
70443
  [encodeFragmentIdentifier]: true,
70362
70444
  ...options
70363
70445
  };
70364
- const url = removeHash(object2.url).split("?")[0] || "";
70446
+ const url = getUrlWithoutQuery(removeHash(object2.url)) || "";
70365
70447
  const queryFromUrl = extract(object2.url);
70366
70448
  const query = {
70367
70449
  ...parse$1(queryFromUrl, { sort: false, ...options }),
@@ -70371,9 +70453,12 @@ html body {
70371
70453
  queryString2 && (queryString2 = `?${queryString2}`);
70372
70454
  let hash2 = getHash(object2.url);
70373
70455
  if (typeof object2.fragmentIdentifier === "string") {
70374
- const urlObjectForFragmentEncode = new URL(url);
70375
- urlObjectForFragmentEncode.hash = object2.fragmentIdentifier;
70376
- hash2 = options[encodeFragmentIdentifier] ? urlObjectForFragmentEncode.hash : `#${object2.fragmentIdentifier}`;
70456
+ hash2 = `#${object2.fragmentIdentifier}`;
70457
+ if (options[encodeFragmentIdentifier]) {
70458
+ const throwawayUrl = new URL("https://query-string.invalid");
70459
+ throwawayUrl.hash = hash2;
70460
+ hash2 = throwawayUrl.hash;
70461
+ }
70377
70462
  }
70378
70463
  return `${url}${queryString2}${hash2}`;
70379
70464
  }
@@ -70391,8 +70476,11 @@ html body {
70391
70476
  }, options);
70392
70477
  }
70393
70478
  function exclude(input, filter2, options) {
70394
- const exclusionFilter = Array.isArray(filter2) ? (key2) => !filter2.includes(key2) : (key2, value) => !filter2(key2, value);
70395
- return pick(input, exclusionFilter, options);
70479
+ if (Array.isArray(filter2)) {
70480
+ const filterSet = new Set(filter2);
70481
+ return pick(input, (key2) => !filterSet.has(key2), options);
70482
+ }
70483
+ return pick(input, (key2, value) => !filter2(key2, value), options);
70396
70484
  }
70397
70485
  const queryString = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
70398
70486
  __proto__: null,
@@ -77494,7 +77582,7 @@ html body {
77494
77582
  ] }) });
77495
77583
  };
77496
77584
  const TypeMaterial = ({ dataset, data, nameID, style: style2 }) => {
77497
- return data[nameID] ? /* @__PURE__ */ jsxRuntimeExports.jsx("div", { style: style2, children: data[nameID].map((s) => /* @__PURE__ */ jsxRuntimeExports.jsx(BorderedListItem$1, { children: /* @__PURE__ */ jsxRuntimeExports.jsxs(
77585
+ return data[nameID] ? /* @__PURE__ */ jsxRuntimeExports.jsx("div", { style: style2, children: data[nameID].map(({ status, nameId, typeMaterial: s }) => /* @__PURE__ */ jsxRuntimeExports.jsx(BorderedListItem$1, { children: /* @__PURE__ */ jsxRuntimeExports.jsxs(
77498
77586
  XrGutter,
77499
77587
  {
77500
77588
  merged: s.merged,
@@ -77503,7 +77591,7 @@ html body {
77503
77591
  verbatimSourceKey: s == null ? void 0 : s.verbatimSourceKey,
77504
77592
  sourceDatasetKey: s == null ? void 0 : s.sourceDatasetKey,
77505
77593
  children: [
77506
- /* @__PURE__ */ jsxRuntimeExports.jsx(Tag, { color: getTypeColor(s == null ? void 0 : s.status), children: s == null ? void 0 : s.status }),
77594
+ /* @__PURE__ */ jsxRuntimeExports.jsx(Tag, { color: getTypeColor(status), children: status }),
77507
77595
  " ",
77508
77596
  getLinks(dataset, s),
77509
77597
  " ",
@@ -77515,7 +77603,7 @@ html body {
77515
77603
  )
77516
77604
  ]
77517
77605
  }
77518
- ) }, s.id)) }) : null;
77606
+ ) }, `${s.id}-${nameId}`)) }) : null;
77519
77607
  };
77520
77608
  class TypeMaterialPopover extends React.Component {
77521
77609
  constructor(props) {
@@ -77539,8 +77627,8 @@ html body {
77539
77627
  const { typeMaterial, nameId } = this.props;
77540
77628
  const data = (typeMaterial == null ? void 0 : typeMaterial[nameId]) || [];
77541
77629
  if (data.length > 0) {
77542
- return /* @__PURE__ */ jsxRuntimeExports.jsx("div", { children: data.map((s) => /* @__PURE__ */ jsxRuntimeExports.jsx("div", { style: { marginBottom: "8px", paddingLeft: "18px" }, children: /* @__PURE__ */ jsxRuntimeExports.jsxs(XrGutter, { merged: s.merged, children: [
77543
- /* @__PURE__ */ jsxRuntimeExports.jsx(Tag, { color: getTypeColor(s == null ? void 0 : s.status), children: s == null ? void 0 : s.status }),
77630
+ return /* @__PURE__ */ jsxRuntimeExports.jsx("div", { children: data.map(({ status, nameId: nameId2, typeMaterial: s }) => /* @__PURE__ */ jsxRuntimeExports.jsx("div", { style: { marginBottom: "8px", paddingLeft: "18px" }, children: /* @__PURE__ */ jsxRuntimeExports.jsxs(XrGutter, { merged: s.merged, children: [
77631
+ /* @__PURE__ */ jsxRuntimeExports.jsx(Tag, { color: getTypeColor(status), children: status }),
77544
77632
  " ",
77545
77633
  (s == null ? void 0 : s.citation) && /* @__PURE__ */ jsxRuntimeExports.jsx(
77546
77634
  "span",
@@ -77550,7 +77638,7 @@ html body {
77550
77638
  }
77551
77639
  }
77552
77640
  )
77553
- ] }) }, s.id)) });
77641
+ ] }) }, `${s.id}-${nameId2}`)) });
77554
77642
  }
77555
77643
  });
77556
77644
  __publicField(this, "render", () => {
@@ -78213,12 +78301,12 @@ html body {
78213
78301
  let cached = null;
78214
78302
  const probe = () => {
78215
78303
  var _a2, _b2;
78216
- if (typeof window === "undefined" || !window.WebGLRenderingContext) {
78304
+ if (typeof window === "undefined" || !window.WebGL2RenderingContext) {
78217
78305
  return false;
78218
78306
  }
78219
78307
  try {
78220
78308
  const canvas = document.createElement("canvas");
78221
- const ctx = canvas.getContext("webgl2") || canvas.getContext("webgl");
78309
+ const ctx = canvas.getContext("webgl2");
78222
78310
  if (!ctx || typeof ctx.getParameter !== "function") return false;
78223
78311
  (_b2 = (_a2 = ctx.getExtension) == null ? void 0 : _a2.call(ctx, "WEBGL_lose_context")) == null ? void 0 : _b2.loseContext();
78224
78312
  return true;
@@ -78474,7 +78562,7 @@ html body {
78474
78562
  if (!isWebglSupported()) return;
78475
78563
  let map;
78476
78564
  try {
78477
- map = new maplibregl.Map({
78565
+ map = new maplibregl__namespace.Map({
78478
78566
  container: containerRef.current,
78479
78567
  style: styleSpec,
78480
78568
  transformRequest: cartoTransformRequest(cartoKey),
@@ -78490,15 +78578,15 @@ html body {
78490
78578
  return;
78491
78579
  }
78492
78580
  map.addControl(
78493
- new maplibregl.AttributionControl({ compact: true }),
78581
+ new maplibregl__namespace.AttributionControl({ compact: true }),
78494
78582
  "bottom-right"
78495
78583
  );
78496
78584
  map.addControl(
78497
- new maplibregl.NavigationControl({ showCompass: false }),
78585
+ new maplibregl__namespace.NavigationControl({ showCompass: false }),
78498
78586
  "top-left"
78499
78587
  );
78500
78588
  map.addControl(
78501
- new maplibregl.FullscreenControl({ container: wrapperRef.current }),
78589
+ new maplibregl__namespace.FullscreenControl({ container: wrapperRef.current }),
78502
78590
  "top-right"
78503
78591
  );
78504
78592
  mapRef.current = map;
@@ -78616,7 +78704,7 @@ html body {
78616
78704
  const record = key2 ? recordMapRef.current.get(key2) : null;
78617
78705
  if (!record) return;
78618
78706
  if (popupRef.current) popupRef.current.remove();
78619
- popupRef.current = new maplibregl.Popup({ closeButton: true, maxWidth: "320px" }).setLngLat(e2.lngLat).setHTML(popupHtml(record)).addTo(map);
78707
+ popupRef.current = new maplibregl__namespace.Popup({ closeButton: true, maxWidth: "320px" }).setLngLat(e2.lngLat).setHTML(popupHtml(record)).addTo(map);
78620
78708
  };
78621
78709
  const onMouseEnter = () => {
78622
78710
  const map = mapRef.current;
@@ -78756,7 +78844,7 @@ html body {
78756
78844
  const data = key2 ? descendantRecordMapRef.current.get(key2) : null;
78757
78845
  if (!data) return;
78758
78846
  if (popupRef.current) popupRef.current.remove();
78759
- popupRef.current = new maplibregl.Popup({ closeButton: true, maxWidth: "320px" }).setLngLat(e2.lngLat).setHTML(descendantPopupHtml(data.taxon, data.record)).addTo(map);
78847
+ popupRef.current = new maplibregl__namespace.Popup({ closeButton: true, maxWidth: "320px" }).setLngLat(e2.lngLat).setHTML(descendantPopupHtml(data.taxon, data.record)).addTo(map);
78760
78848
  };
78761
78849
  reactExports.useEffect(() => {
78762
78850
  const map = mapRef.current;
@@ -79411,7 +79499,7 @@ html body {
79411
79499
  idx
79412
79500
  );
79413
79501
  });
79414
- /*! @license DOMPurify 3.4.6 | (c) Cure53 and other contributors | Released under the Apache license 2.0 and Mozilla Public License 2.0 | github.com/cure53/DOMPurify/blob/3.4.6/LICENSE */
79502
+ /*! @license DOMPurify 3.4.17 | (c) Cure53 and other contributors | Released under the Apache license 2.0 and Mozilla Public License 2.0 | github.com/cure53/DOMPurify/blob/3.4.17/LICENSE */
79415
79503
  function _arrayLikeToArray(r2, a) {
79416
79504
  (null == a || a > r2.length) && (a = r2.length);
79417
79505
  for (var e2 = 0, n2 = Array(a); e2 < a; e2++) n2[e2] = r2[e2];
@@ -79442,6 +79530,7 @@ html body {
79442
79530
  function _nonIterableRest() {
79443
79531
  throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.");
79444
79532
  }
79533
+ /*! regenerator-runtime -- Copyright (c) 2014-present, Facebook, Inc. -- license (MIT): https://github.com/babel/babel/blob/main/packages/babel-helpers/LICENSE */
79445
79534
  function _slicedToArray(r2, e2) {
79446
79535
  return _arrayWithHoles(r2) || _iterableToArrayLimit(r2, e2) || _unsupportedIterableToArray(r2, e2) || _nonIterableRest();
79447
79536
  }
@@ -79452,41 +79541,41 @@ html body {
79452
79541
  return "Object" === t2 && r2.constructor && (t2 = r2.constructor.name), "Map" === t2 || "Set" === t2 ? Array.from(r2) : "Arguments" === t2 || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(t2) ? _arrayLikeToArray(r2, a) : void 0;
79453
79542
  }
79454
79543
  }
79455
- const entries = Object.entries, setPrototypeOf = Object.setPrototypeOf, isFrozen = Object.isFrozen, getPrototypeOf = Object.getPrototypeOf, getOwnPropertyDescriptor = Object.getOwnPropertyDescriptor;
79456
- let freeze = Object.freeze, seal = Object.seal, create = Object.create;
79457
- let _ref = typeof Reflect !== "undefined" && Reflect, apply = _ref.apply, construct = _ref.construct;
79458
- if (!freeze) {
79459
- freeze = function freeze2(x2) {
79460
- return x2;
79461
- };
79462
- }
79463
- if (!seal) {
79464
- seal = function seal2(x2) {
79465
- return x2;
79466
- };
79467
- }
79468
- if (!apply) {
79469
- apply = function apply2(func, thisArg) {
79470
- for (var _len = arguments.length, args = new Array(_len > 2 ? _len - 2 : 0), _key = 2; _key < _len; _key++) {
79471
- args[_key - 2] = arguments[_key];
79472
- }
79473
- return func.apply(thisArg, args);
79474
- };
79475
- }
79476
- if (!construct) {
79477
- construct = function construct2(Func) {
79478
- for (var _len2 = arguments.length, args = new Array(_len2 > 1 ? _len2 - 1 : 0), _key2 = 1; _key2 < _len2; _key2++) {
79479
- args[_key2 - 1] = arguments[_key2];
79480
- }
79481
- return new Func(...args);
79482
- };
79483
- }
79544
+ const entries = Object.entries;
79545
+ const setPrototypeOf = Object.setPrototypeOf;
79546
+ const isFrozen = Object.isFrozen;
79547
+ const getPrototypeOf = Object.getPrototypeOf;
79548
+ const getOwnPropertyDescriptor = Object.getOwnPropertyDescriptor;
79549
+ let freeze = Object.freeze;
79550
+ let seal = Object.seal;
79551
+ let create = Object.create;
79552
+ let _ref = typeof Reflect !== "undefined" && Reflect;
79553
+ let apply = _ref.apply;
79554
+ let construct = _ref.construct;
79555
+ if (!freeze) freeze = function freeze2(x2) {
79556
+ return x2;
79557
+ };
79558
+ if (!seal) seal = function seal2(x2) {
79559
+ return x2;
79560
+ };
79561
+ if (!apply) apply = function apply2(func, thisArg) {
79562
+ for (var _len = arguments.length, args = new Array(_len > 2 ? _len - 2 : 0), _key = 2; _key < _len; _key++) args[_key - 2] = arguments[_key];
79563
+ return func.apply(thisArg, args);
79564
+ };
79565
+ if (!construct) construct = function construct2(Func) {
79566
+ for (var _len2 = arguments.length, args = new Array(_len2 > 1 ? _len2 - 1 : 0), _key2 = 1; _key2 < _len2; _key2++) args[_key2 - 1] = arguments[_key2];
79567
+ return new Func(...args);
79568
+ };
79484
79569
  const arrayForEach = unapply(Array.prototype.forEach);
79485
79570
  const arrayLastIndexOf = unapply(Array.prototype.lastIndexOf);
79486
79571
  const arrayPop = unapply(Array.prototype.pop);
79487
79572
  const arrayPush = unapply(Array.prototype.push);
79573
+ const arraySlice = unapply(Array.prototype.slice);
79488
79574
  const arraySplice = unapply(Array.prototype.splice);
79489
79575
  const arrayIsArray = Array.isArray;
79576
+ const setCreate = unconstruct(Set);
79577
+ const setAdd = unapply(Set.prototype.add);
79578
+ const setHas = unapply(Set.prototype.has);
79490
79579
  const stringToLowerCase = unapply(String.prototype.toLowerCase);
79491
79580
  const stringToString = unapply(String.prototype.toString);
79492
79581
  const stringMatch = unapply(String.prototype.match);
@@ -79503,40 +79592,28 @@ html body {
79503
79592
  const typeErrorCreate = unconstruct(TypeError);
79504
79593
  function unapply(func) {
79505
79594
  return function(thisArg) {
79506
- if (thisArg instanceof RegExp) {
79507
- thisArg.lastIndex = 0;
79508
- }
79509
- for (var _len3 = arguments.length, args = new Array(_len3 > 1 ? _len3 - 1 : 0), _key3 = 1; _key3 < _len3; _key3++) {
79510
- args[_key3 - 1] = arguments[_key3];
79511
- }
79595
+ if (thisArg instanceof RegExp) thisArg.lastIndex = 0;
79596
+ for (var _len3 = arguments.length, args = new Array(_len3 > 1 ? _len3 - 1 : 0), _key3 = 1; _key3 < _len3; _key3++) args[_key3 - 1] = arguments[_key3];
79512
79597
  return apply(func, thisArg, args);
79513
79598
  };
79514
79599
  }
79515
79600
  function unconstruct(Func) {
79516
79601
  return function() {
79517
- for (var _len4 = arguments.length, args = new Array(_len4), _key4 = 0; _key4 < _len4; _key4++) {
79518
- args[_key4] = arguments[_key4];
79519
- }
79602
+ for (var _len4 = arguments.length, args = new Array(_len4), _key4 = 0; _key4 < _len4; _key4++) args[_key4] = arguments[_key4];
79520
79603
  return construct(Func, args);
79521
79604
  };
79522
79605
  }
79523
79606
  function addToSet(set2, array2) {
79524
79607
  let transformCaseFunc = arguments.length > 2 && arguments[2] !== void 0 ? arguments[2] : stringToLowerCase;
79525
- if (setPrototypeOf) {
79526
- setPrototypeOf(set2, null);
79527
- }
79528
- if (!arrayIsArray(array2)) {
79529
- return set2;
79530
- }
79608
+ if (setPrototypeOf) setPrototypeOf(set2, null);
79609
+ if (!arrayIsArray(array2)) return set2;
79531
79610
  let l2 = array2.length;
79532
79611
  while (l2--) {
79533
79612
  let element = array2[l2];
79534
79613
  if (typeof element === "string") {
79535
79614
  const lcElement = transformCaseFunc(element);
79536
79615
  if (lcElement !== element) {
79537
- if (!isFrozen(array2)) {
79538
- array2[l2] = lcElement;
79539
- }
79616
+ if (!isFrozen(array2)) array2[l2] = lcElement;
79540
79617
  element = lcElement;
79541
79618
  }
79542
79619
  }
@@ -79545,12 +79622,7 @@ html body {
79545
79622
  return set2;
79546
79623
  }
79547
79624
  function cleanArray(array2) {
79548
- for (let index2 = 0; index2 < array2.length; index2++) {
79549
- const isPropertyExist = objectHasOwnProperty(array2, index2);
79550
- if (!isPropertyExist) {
79551
- array2[index2] = null;
79552
- }
79553
- }
79625
+ for (let index2 = 0; index2 < array2.length; index2++) if (!objectHasOwnProperty(array2, index2)) array2[index2] = null;
79554
79626
  return array2;
79555
79627
  }
79556
79628
  function clone(object2) {
@@ -79559,44 +79631,31 @@ html body {
79559
79631
  var _ref3 = _slicedToArray(_ref2, 2);
79560
79632
  const property2 = _ref3[0];
79561
79633
  const value = _ref3[1];
79562
- const isPropertyExist = objectHasOwnProperty(object2, property2);
79563
- if (isPropertyExist) {
79564
- if (arrayIsArray(value)) {
79565
- newObject[property2] = cleanArray(value);
79566
- } else if (value && typeof value === "object" && value.constructor === Object) {
79567
- newObject[property2] = clone(value);
79568
- } else {
79569
- newObject[property2] = value;
79570
- }
79634
+ if (objectHasOwnProperty(object2, property2)) {
79635
+ if (arrayIsArray(value)) newObject[property2] = cleanArray(value);
79636
+ else if (value && typeof value === "object" && value.constructor === Object) newObject[property2] = clone(value);
79637
+ else newObject[property2] = value;
79571
79638
  }
79572
79639
  }
79573
79640
  return newObject;
79574
79641
  }
79575
79642
  function stringifyValue(value) {
79576
79643
  switch (typeof value) {
79577
- case "string": {
79644
+ case "string":
79578
79645
  return value;
79579
- }
79580
- case "number": {
79646
+ case "number":
79581
79647
  return numberToString(value);
79582
- }
79583
- case "boolean": {
79648
+ case "boolean":
79584
79649
  return booleanToString(value);
79585
- }
79586
- case "bigint": {
79650
+ case "bigint":
79587
79651
  return bigintToString ? bigintToString(value) : "0";
79588
- }
79589
- case "symbol": {
79652
+ case "symbol":
79590
79653
  return symbolToString ? symbolToString(value) : "Symbol()";
79591
- }
79592
- case "undefined": {
79654
+ case "undefined":
79593
79655
  return objectToString(value);
79594
- }
79595
79656
  case "function":
79596
79657
  case "object": {
79597
- if (value === null) {
79598
- return objectToString(value);
79599
- }
79658
+ if (value === null) return objectToString(value);
79600
79659
  const valueAsRecord = value;
79601
79660
  const valueToString = lookupGetter(valueAsRecord, "toString");
79602
79661
  if (typeof valueToString === "function") {
@@ -79605,21 +79664,16 @@ html body {
79605
79664
  }
79606
79665
  return objectToString(value);
79607
79666
  }
79608
- default: {
79667
+ default:
79609
79668
  return objectToString(value);
79610
- }
79611
79669
  }
79612
79670
  }
79613
79671
  function lookupGetter(object2, prop) {
79614
79672
  while (object2 !== null) {
79615
79673
  const desc = getOwnPropertyDescriptor(object2, prop);
79616
79674
  if (desc) {
79617
- if (desc.get) {
79618
- return unapply(desc.get);
79619
- }
79620
- if (typeof desc.value === "function") {
79621
- return unapply(desc.value);
79622
- }
79675
+ if (desc.get) return unapply(desc.get);
79676
+ if (typeof desc.value === "function") return unapply(desc.value);
79623
79677
  }
79624
79678
  object2 = getPrototypeOf(object2);
79625
79679
  }
@@ -79628,6 +79682,14 @@ html body {
79628
79682
  }
79629
79683
  return fallbackValue;
79630
79684
  }
79685
+ function lookupAccessor(object2, prop) {
79686
+ while (object2 !== null) {
79687
+ const desc = getOwnPropertyDescriptor(object2, prop);
79688
+ if (desc) return desc.get ? unapply(desc.get) : null;
79689
+ object2 = getPrototypeOf(object2);
79690
+ }
79691
+ return null;
79692
+ }
79631
79693
  function isRegex(value) {
79632
79694
  try {
79633
79695
  regExpTest(value, "");
@@ -79636,62 +79698,700 @@ html body {
79636
79698
  return false;
79637
79699
  }
79638
79700
  }
79639
- const html$1 = freeze(["a", "abbr", "acronym", "address", "area", "article", "aside", "audio", "b", "bdi", "bdo", "big", "blink", "blockquote", "body", "br", "button", "canvas", "caption", "center", "cite", "code", "col", "colgroup", "content", "data", "datalist", "dd", "decorator", "del", "details", "dfn", "dialog", "dir", "div", "dl", "dt", "element", "em", "fieldset", "figcaption", "figure", "font", "footer", "form", "h1", "h2", "h3", "h4", "h5", "h6", "head", "header", "hgroup", "hr", "html", "i", "img", "input", "ins", "kbd", "label", "legend", "li", "main", "map", "mark", "marquee", "menu", "menuitem", "meter", "nav", "nobr", "ol", "optgroup", "option", "output", "p", "picture", "pre", "progress", "q", "rp", "rt", "ruby", "s", "samp", "search", "section", "select", "shadow", "slot", "small", "source", "spacer", "span", "strike", "strong", "style", "sub", "summary", "sup", "table", "tbody", "td", "template", "textarea", "tfoot", "th", "thead", "time", "tr", "track", "tt", "u", "ul", "var", "video", "wbr"]);
79640
- const svg$1 = freeze(["svg", "a", "altglyph", "altglyphdef", "altglyphitem", "animatecolor", "animatemotion", "animatetransform", "circle", "clippath", "defs", "desc", "ellipse", "enterkeyhint", "exportparts", "filter", "font", "g", "glyph", "glyphref", "hkern", "image", "inputmode", "line", "lineargradient", "marker", "mask", "metadata", "mpath", "part", "path", "pattern", "polygon", "polyline", "radialgradient", "rect", "stop", "style", "switch", "symbol", "text", "textpath", "title", "tref", "tspan", "view", "vkern"]);
79641
- const svgFilters = freeze(["feBlend", "feColorMatrix", "feComponentTransfer", "feComposite", "feConvolveMatrix", "feDiffuseLighting", "feDisplacementMap", "feDistantLight", "feDropShadow", "feFlood", "feFuncA", "feFuncB", "feFuncG", "feFuncR", "feGaussianBlur", "feImage", "feMerge", "feMergeNode", "feMorphology", "feOffset", "fePointLight", "feSpecularLighting", "feSpotLight", "feTile", "feTurbulence"]);
79642
- const svgDisallowed = freeze(["animate", "color-profile", "cursor", "discard", "font-face", "font-face-format", "font-face-name", "font-face-src", "font-face-uri", "foreignobject", "hatch", "hatchpath", "mesh", "meshgradient", "meshpatch", "meshrow", "missing-glyph", "script", "set", "solidcolor", "unknown", "use"]);
79643
- const mathMl$1 = freeze(["math", "menclose", "merror", "mfenced", "mfrac", "mglyph", "mi", "mlabeledtr", "mmultiscripts", "mn", "mo", "mover", "mpadded", "mphantom", "mroot", "mrow", "ms", "mspace", "msqrt", "mstyle", "msub", "msup", "msubsup", "mtable", "mtd", "mtext", "mtr", "munder", "munderover", "mprescripts"]);
79644
- const mathMlDisallowed = freeze(["maction", "maligngroup", "malignmark", "mlongdiv", "mscarries", "mscarry", "msgroup", "mstack", "msline", "msrow", "semantics", "annotation", "annotation-xml", "mprescripts", "none"]);
79701
+ const html$1 = freeze([
79702
+ "a",
79703
+ "abbr",
79704
+ "acronym",
79705
+ "address",
79706
+ "area",
79707
+ "article",
79708
+ "aside",
79709
+ "audio",
79710
+ "b",
79711
+ "bdi",
79712
+ "bdo",
79713
+ "big",
79714
+ "blink",
79715
+ "blockquote",
79716
+ "body",
79717
+ "br",
79718
+ "button",
79719
+ "canvas",
79720
+ "caption",
79721
+ "center",
79722
+ "cite",
79723
+ "code",
79724
+ "col",
79725
+ "colgroup",
79726
+ "content",
79727
+ "data",
79728
+ "datalist",
79729
+ "dd",
79730
+ "decorator",
79731
+ "del",
79732
+ "details",
79733
+ "dfn",
79734
+ "dialog",
79735
+ "dir",
79736
+ "div",
79737
+ "dl",
79738
+ "dt",
79739
+ "element",
79740
+ "em",
79741
+ "fieldset",
79742
+ "figcaption",
79743
+ "figure",
79744
+ "font",
79745
+ "footer",
79746
+ "form",
79747
+ "h1",
79748
+ "h2",
79749
+ "h3",
79750
+ "h4",
79751
+ "h5",
79752
+ "h6",
79753
+ "head",
79754
+ "header",
79755
+ "hgroup",
79756
+ "hr",
79757
+ "html",
79758
+ "i",
79759
+ "img",
79760
+ "input",
79761
+ "ins",
79762
+ "kbd",
79763
+ "label",
79764
+ "legend",
79765
+ "li",
79766
+ "main",
79767
+ "map",
79768
+ "mark",
79769
+ "marquee",
79770
+ "menu",
79771
+ "menuitem",
79772
+ "meter",
79773
+ "nav",
79774
+ "nobr",
79775
+ "ol",
79776
+ "optgroup",
79777
+ "option",
79778
+ "output",
79779
+ "p",
79780
+ "picture",
79781
+ "pre",
79782
+ "progress",
79783
+ "q",
79784
+ "rp",
79785
+ "rt",
79786
+ "ruby",
79787
+ "s",
79788
+ "samp",
79789
+ "search",
79790
+ "section",
79791
+ "select",
79792
+ "shadow",
79793
+ "slot",
79794
+ "small",
79795
+ "source",
79796
+ "spacer",
79797
+ "span",
79798
+ "strike",
79799
+ "strong",
79800
+ "style",
79801
+ "sub",
79802
+ "summary",
79803
+ "sup",
79804
+ "table",
79805
+ "tbody",
79806
+ "td",
79807
+ "template",
79808
+ "textarea",
79809
+ "tfoot",
79810
+ "th",
79811
+ "thead",
79812
+ "time",
79813
+ "tr",
79814
+ "track",
79815
+ "tt",
79816
+ "u",
79817
+ "ul",
79818
+ "var",
79819
+ "video",
79820
+ "wbr"
79821
+ ]);
79822
+ const svg$1 = freeze([
79823
+ "svg",
79824
+ "a",
79825
+ "altglyph",
79826
+ "altglyphdef",
79827
+ "altglyphitem",
79828
+ "animatecolor",
79829
+ "animatemotion",
79830
+ "animatetransform",
79831
+ "circle",
79832
+ "clippath",
79833
+ "defs",
79834
+ "desc",
79835
+ "ellipse",
79836
+ "enterkeyhint",
79837
+ "exportparts",
79838
+ "filter",
79839
+ "font",
79840
+ "g",
79841
+ "glyph",
79842
+ "glyphref",
79843
+ "hkern",
79844
+ "image",
79845
+ "inputmode",
79846
+ "line",
79847
+ "lineargradient",
79848
+ "marker",
79849
+ "mask",
79850
+ "metadata",
79851
+ "mpath",
79852
+ "part",
79853
+ "path",
79854
+ "pattern",
79855
+ "polygon",
79856
+ "polyline",
79857
+ "radialgradient",
79858
+ "rect",
79859
+ "stop",
79860
+ "style",
79861
+ "switch",
79862
+ "symbol",
79863
+ "text",
79864
+ "textpath",
79865
+ "title",
79866
+ "tref",
79867
+ "tspan",
79868
+ "view",
79869
+ "vkern"
79870
+ ]);
79871
+ const svgFilters = freeze([
79872
+ "feBlend",
79873
+ "feColorMatrix",
79874
+ "feComponentTransfer",
79875
+ "feComposite",
79876
+ "feConvolveMatrix",
79877
+ "feDiffuseLighting",
79878
+ "feDisplacementMap",
79879
+ "feDistantLight",
79880
+ "feDropShadow",
79881
+ "feFlood",
79882
+ "feFuncA",
79883
+ "feFuncB",
79884
+ "feFuncG",
79885
+ "feFuncR",
79886
+ "feGaussianBlur",
79887
+ "feImage",
79888
+ "feMerge",
79889
+ "feMergeNode",
79890
+ "feMorphology",
79891
+ "feOffset",
79892
+ "fePointLight",
79893
+ "feSpecularLighting",
79894
+ "feSpotLight",
79895
+ "feTile",
79896
+ "feTurbulence"
79897
+ ]);
79898
+ const svgDisallowed = freeze([
79899
+ "animate",
79900
+ "color-profile",
79901
+ "cursor",
79902
+ "discard",
79903
+ "font-face",
79904
+ "font-face-format",
79905
+ "font-face-name",
79906
+ "font-face-src",
79907
+ "font-face-uri",
79908
+ "foreignobject",
79909
+ "hatch",
79910
+ "hatchpath",
79911
+ "mesh",
79912
+ "meshgradient",
79913
+ "meshpatch",
79914
+ "meshrow",
79915
+ "missing-glyph",
79916
+ "script",
79917
+ "set",
79918
+ "solidcolor",
79919
+ "unknown",
79920
+ "use"
79921
+ ]);
79922
+ const mathMl$1 = freeze([
79923
+ "math",
79924
+ "menclose",
79925
+ "merror",
79926
+ "mfenced",
79927
+ "mfrac",
79928
+ "mglyph",
79929
+ "mi",
79930
+ "mlabeledtr",
79931
+ "mmultiscripts",
79932
+ "mn",
79933
+ "mo",
79934
+ "mover",
79935
+ "mpadded",
79936
+ "mphantom",
79937
+ "mroot",
79938
+ "mrow",
79939
+ "ms",
79940
+ "mspace",
79941
+ "msqrt",
79942
+ "mstyle",
79943
+ "msub",
79944
+ "msup",
79945
+ "msubsup",
79946
+ "mtable",
79947
+ "mtd",
79948
+ "mtext",
79949
+ "mtr",
79950
+ "munder",
79951
+ "munderover",
79952
+ "mprescripts"
79953
+ ]);
79954
+ const mathMlDisallowed = freeze([
79955
+ "maction",
79956
+ "maligngroup",
79957
+ "malignmark",
79958
+ "mlongdiv",
79959
+ "mscarries",
79960
+ "mscarry",
79961
+ "msgroup",
79962
+ "mstack",
79963
+ "msline",
79964
+ "msrow",
79965
+ "semantics",
79966
+ "annotation",
79967
+ "annotation-xml",
79968
+ "mprescripts",
79969
+ "none"
79970
+ ]);
79645
79971
  const text = freeze(["#text"]);
79646
- const html = freeze(["accept", "action", "align", "alt", "autocapitalize", "autocomplete", "autopictureinpicture", "autoplay", "background", "bgcolor", "border", "capture", "cellpadding", "cellspacing", "checked", "cite", "class", "clear", "color", "cols", "colspan", "command", "commandfor", "controls", "controlslist", "coords", "crossorigin", "datetime", "decoding", "default", "dir", "disabled", "disablepictureinpicture", "disableremoteplayback", "download", "draggable", "enctype", "enterkeyhint", "exportparts", "face", "for", "headers", "height", "hidden", "high", "href", "hreflang", "id", "inert", "inputmode", "integrity", "ismap", "kind", "label", "lang", "list", "loading", "loop", "low", "max", "maxlength", "media", "method", "min", "minlength", "multiple", "muted", "name", "nonce", "noshade", "novalidate", "nowrap", "open", "optimum", "part", "pattern", "placeholder", "playsinline", "popover", "popovertarget", "popovertargetaction", "poster", "preload", "pubdate", "radiogroup", "readonly", "rel", "required", "rev", "reversed", "role", "rows", "rowspan", "spellcheck", "scope", "selected", "shape", "size", "sizes", "slot", "span", "srclang", "start", "src", "srcset", "step", "style", "summary", "tabindex", "title", "translate", "type", "usemap", "valign", "value", "width", "wrap", "xmlns"]);
79647
- const svg = freeze(["accent-height", "accumulate", "additive", "alignment-baseline", "amplitude", "ascent", "attributename", "attributetype", "azimuth", "basefrequency", "baseline-shift", "begin", "bias", "by", "class", "clip", "clippathunits", "clip-path", "clip-rule", "color", "color-interpolation", "color-interpolation-filters", "color-profile", "color-rendering", "cx", "cy", "d", "dx", "dy", "diffuseconstant", "direction", "display", "divisor", "dur", "edgemode", "elevation", "end", "exponent", "fill", "fill-opacity", "fill-rule", "filter", "filterunits", "flood-color", "flood-opacity", "font-family", "font-size", "font-size-adjust", "font-stretch", "font-style", "font-variant", "font-weight", "fx", "fy", "g1", "g2", "glyph-name", "glyphref", "gradientunits", "gradienttransform", "height", "href", "id", "image-rendering", "in", "in2", "intercept", "k", "k1", "k2", "k3", "k4", "kerning", "keypoints", "keysplines", "keytimes", "lang", "lengthadjust", "letter-spacing", "kernelmatrix", "kernelunitlength", "lighting-color", "local", "marker-end", "marker-mid", "marker-start", "markerheight", "markerunits", "markerwidth", "maskcontentunits", "maskunits", "max", "mask", "mask-type", "media", "method", "mode", "min", "name", "numoctaves", "offset", "operator", "opacity", "order", "orient", "orientation", "origin", "overflow", "paint-order", "path", "pathlength", "patterncontentunits", "patterntransform", "patternunits", "points", "preservealpha", "preserveaspectratio", "primitiveunits", "r", "rx", "ry", "radius", "refx", "refy", "repeatcount", "repeatdur", "restart", "result", "rotate", "scale", "seed", "shape-rendering", "slope", "specularconstant", "specularexponent", "spreadmethod", "startoffset", "stddeviation", "stitchtiles", "stop-color", "stop-opacity", "stroke-dasharray", "stroke-dashoffset", "stroke-linecap", "stroke-linejoin", "stroke-miterlimit", "stroke-opacity", "stroke", "stroke-width", "style", "surfacescale", "systemlanguage", "tabindex", "tablevalues", "targetx", "targety", "transform", "transform-origin", "text-anchor", "text-decoration", "text-rendering", "textlength", "type", "u1", "u2", "unicode", "values", "viewbox", "visibility", "version", "vert-adv-y", "vert-origin-x", "vert-origin-y", "width", "word-spacing", "wrap", "writing-mode", "xchannelselector", "ychannelselector", "x", "x1", "x2", "xmlns", "y", "y1", "y2", "z", "zoomandpan"]);
79648
- const mathMl = freeze(["accent", "accentunder", "align", "bevelled", "close", "columnalign", "columnlines", "columnspacing", "columnspan", "denomalign", "depth", "dir", "display", "displaystyle", "encoding", "fence", "frame", "height", "href", "id", "largeop", "length", "linethickness", "lquote", "lspace", "mathbackground", "mathcolor", "mathsize", "mathvariant", "maxsize", "minsize", "movablelimits", "notation", "numalign", "open", "rowalign", "rowlines", "rowspacing", "rowspan", "rspace", "rquote", "scriptlevel", "scriptminsize", "scriptsizemultiplier", "selection", "separator", "separators", "stretchy", "subscriptshift", "supscriptshift", "symmetric", "voffset", "width", "xmlns"]);
79649
- const xml = freeze(["xlink:href", "xml:id", "xlink:title", "xml:space", "xmlns:xlink"]);
79972
+ const html = freeze([
79973
+ "accept",
79974
+ "action",
79975
+ "align",
79976
+ "alt",
79977
+ "autocapitalize",
79978
+ "autocomplete",
79979
+ "autopictureinpicture",
79980
+ "autoplay",
79981
+ "background",
79982
+ "bgcolor",
79983
+ "border",
79984
+ "capture",
79985
+ "cellpadding",
79986
+ "cellspacing",
79987
+ "checked",
79988
+ "cite",
79989
+ "class",
79990
+ "clear",
79991
+ "color",
79992
+ "cols",
79993
+ "colspan",
79994
+ "command",
79995
+ "commandfor",
79996
+ "controls",
79997
+ "controlslist",
79998
+ "coords",
79999
+ "crossorigin",
80000
+ "datetime",
80001
+ "decoding",
80002
+ "default",
80003
+ "dir",
80004
+ "disabled",
80005
+ "disablepictureinpicture",
80006
+ "disableremoteplayback",
80007
+ "download",
80008
+ "draggable",
80009
+ "enctype",
80010
+ "enterkeyhint",
80011
+ "exportparts",
80012
+ "face",
80013
+ "for",
80014
+ "headers",
80015
+ "height",
80016
+ "hidden",
80017
+ "high",
80018
+ "href",
80019
+ "hreflang",
80020
+ "id",
80021
+ "inert",
80022
+ "inputmode",
80023
+ "integrity",
80024
+ "ismap",
80025
+ "kind",
80026
+ "label",
80027
+ "lang",
80028
+ "list",
80029
+ "loading",
80030
+ "loop",
80031
+ "low",
80032
+ "max",
80033
+ "maxlength",
80034
+ "media",
80035
+ "method",
80036
+ "min",
80037
+ "minlength",
80038
+ "multiple",
80039
+ "muted",
80040
+ "name",
80041
+ "nonce",
80042
+ "noshade",
80043
+ "novalidate",
80044
+ "nowrap",
80045
+ "open",
80046
+ "optimum",
80047
+ "part",
80048
+ "pattern",
80049
+ "placeholder",
80050
+ "playsinline",
80051
+ "popover",
80052
+ "popovertarget",
80053
+ "popovertargetaction",
80054
+ "poster",
80055
+ "preload",
80056
+ "pubdate",
80057
+ "radiogroup",
80058
+ "readonly",
80059
+ "rel",
80060
+ "required",
80061
+ "rev",
80062
+ "reversed",
80063
+ "role",
80064
+ "rows",
80065
+ "rowspan",
80066
+ "spellcheck",
80067
+ "scope",
80068
+ "selected",
80069
+ "shape",
80070
+ "size",
80071
+ "sizes",
80072
+ "slot",
80073
+ "span",
80074
+ "srclang",
80075
+ "start",
80076
+ "src",
80077
+ "srcset",
80078
+ "step",
80079
+ "style",
80080
+ "summary",
80081
+ "tabindex",
80082
+ "title",
80083
+ "translate",
80084
+ "type",
80085
+ "usemap",
80086
+ "valign",
80087
+ "value",
80088
+ "width",
80089
+ "wrap",
80090
+ "xmlns"
80091
+ ]);
80092
+ const svg = freeze([
80093
+ "accent-height",
80094
+ "accumulate",
80095
+ "additive",
80096
+ "alignment-baseline",
80097
+ "amplitude",
80098
+ "ascent",
80099
+ "attributename",
80100
+ "attributetype",
80101
+ "azimuth",
80102
+ "basefrequency",
80103
+ "baseline-shift",
80104
+ "begin",
80105
+ "bias",
80106
+ "by",
80107
+ "class",
80108
+ "clip",
80109
+ "clippathunits",
80110
+ "clip-path",
80111
+ "clip-rule",
80112
+ "color",
80113
+ "color-interpolation",
80114
+ "color-interpolation-filters",
80115
+ "color-profile",
80116
+ "color-rendering",
80117
+ "cx",
80118
+ "cy",
80119
+ "d",
80120
+ "dx",
80121
+ "dy",
80122
+ "diffuseconstant",
80123
+ "direction",
80124
+ "display",
80125
+ "divisor",
80126
+ "dominant-baseline",
80127
+ "dur",
80128
+ "edgemode",
80129
+ "elevation",
80130
+ "end",
80131
+ "exponent",
80132
+ "fill",
80133
+ "fill-opacity",
80134
+ "fill-rule",
80135
+ "filter",
80136
+ "filterunits",
80137
+ "flood-color",
80138
+ "flood-opacity",
80139
+ "font-family",
80140
+ "font-size",
80141
+ "font-size-adjust",
80142
+ "font-stretch",
80143
+ "font-style",
80144
+ "font-variant",
80145
+ "font-weight",
80146
+ "fx",
80147
+ "fy",
80148
+ "g1",
80149
+ "g2",
80150
+ "glyph-name",
80151
+ "glyphref",
80152
+ "gradientunits",
80153
+ "gradienttransform",
80154
+ "height",
80155
+ "href",
80156
+ "id",
80157
+ "image-rendering",
80158
+ "in",
80159
+ "in2",
80160
+ "intercept",
80161
+ "k",
80162
+ "k1",
80163
+ "k2",
80164
+ "k3",
80165
+ "k4",
80166
+ "kerning",
80167
+ "keypoints",
80168
+ "keysplines",
80169
+ "keytimes",
80170
+ "lang",
80171
+ "lengthadjust",
80172
+ "letter-spacing",
80173
+ "kernelmatrix",
80174
+ "kernelunitlength",
80175
+ "lighting-color",
80176
+ "local",
80177
+ "marker-end",
80178
+ "marker-mid",
80179
+ "marker-start",
80180
+ "markerheight",
80181
+ "markerunits",
80182
+ "markerwidth",
80183
+ "maskcontentunits",
80184
+ "maskunits",
80185
+ "max",
80186
+ "mask",
80187
+ "mask-type",
80188
+ "media",
80189
+ "method",
80190
+ "mode",
80191
+ "min",
80192
+ "name",
80193
+ "numoctaves",
80194
+ "offset",
80195
+ "operator",
80196
+ "opacity",
80197
+ "order",
80198
+ "orient",
80199
+ "orientation",
80200
+ "origin",
80201
+ "overflow",
80202
+ "paint-order",
80203
+ "path",
80204
+ "pathlength",
80205
+ "patterncontentunits",
80206
+ "patterntransform",
80207
+ "patternunits",
80208
+ "pointer-events",
80209
+ "points",
80210
+ "preservealpha",
80211
+ "preserveaspectratio",
80212
+ "primitiveunits",
80213
+ "r",
80214
+ "rx",
80215
+ "ry",
80216
+ "radius",
80217
+ "refx",
80218
+ "refy",
80219
+ "repeatcount",
80220
+ "repeatdur",
80221
+ "restart",
80222
+ "result",
80223
+ "rotate",
80224
+ "scale",
80225
+ "seed",
80226
+ "shape-rendering",
80227
+ "slope",
80228
+ "specularconstant",
80229
+ "specularexponent",
80230
+ "spreadmethod",
80231
+ "startoffset",
80232
+ "stddeviation",
80233
+ "stitchtiles",
80234
+ "stop-color",
80235
+ "stop-opacity",
80236
+ "stroke-dasharray",
80237
+ "stroke-dashoffset",
80238
+ "stroke-linecap",
80239
+ "stroke-linejoin",
80240
+ "stroke-miterlimit",
80241
+ "stroke-opacity",
80242
+ "stroke",
80243
+ "stroke-width",
80244
+ "style",
80245
+ "surfacescale",
80246
+ "systemlanguage",
80247
+ "tabindex",
80248
+ "tablevalues",
80249
+ "targetx",
80250
+ "targety",
80251
+ "transform",
80252
+ "transform-origin",
80253
+ "text-anchor",
80254
+ "text-decoration",
80255
+ "text-orientation",
80256
+ "text-rendering",
80257
+ "textlength",
80258
+ "type",
80259
+ "u1",
80260
+ "u2",
80261
+ "unicode",
80262
+ "values",
80263
+ "vector-effect",
80264
+ "viewbox",
80265
+ "visibility",
80266
+ "version",
80267
+ "vert-adv-y",
80268
+ "vert-origin-x",
80269
+ "vert-origin-y",
80270
+ "width",
80271
+ "word-spacing",
80272
+ "wrap",
80273
+ "writing-mode",
80274
+ "xchannelselector",
80275
+ "ychannelselector",
80276
+ "x",
80277
+ "x1",
80278
+ "x2",
80279
+ "xmlns",
80280
+ "y",
80281
+ "y1",
80282
+ "y2",
80283
+ "z",
80284
+ "zoomandpan"
80285
+ ]);
80286
+ const mathMl = freeze([
80287
+ "accent",
80288
+ "accentunder",
80289
+ "align",
80290
+ "bevelled",
80291
+ "close",
80292
+ "columnalign",
80293
+ "columnlines",
80294
+ "columnspacing",
80295
+ "columnspan",
80296
+ "denomalign",
80297
+ "depth",
80298
+ "dir",
80299
+ "display",
80300
+ "displaystyle",
80301
+ "encoding",
80302
+ "fence",
80303
+ "frame",
80304
+ "height",
80305
+ "href",
80306
+ "id",
80307
+ "largeop",
80308
+ "length",
80309
+ "linethickness",
80310
+ "lquote",
80311
+ "lspace",
80312
+ "mathbackground",
80313
+ "mathcolor",
80314
+ "mathsize",
80315
+ "mathvariant",
80316
+ "maxsize",
80317
+ "minsize",
80318
+ "movablelimits",
80319
+ "notation",
80320
+ "numalign",
80321
+ "open",
80322
+ "rowalign",
80323
+ "rowlines",
80324
+ "rowspacing",
80325
+ "rowspan",
80326
+ "rspace",
80327
+ "rquote",
80328
+ "scriptlevel",
80329
+ "scriptminsize",
80330
+ "scriptsizemultiplier",
80331
+ "selection",
80332
+ "separator",
80333
+ "separators",
80334
+ "stretchy",
80335
+ "subscriptshift",
80336
+ "supscriptshift",
80337
+ "symmetric",
80338
+ "voffset",
80339
+ "width",
80340
+ "xmlns"
80341
+ ]);
80342
+ const xml = freeze([
80343
+ "xlink:href",
80344
+ "xml:id",
80345
+ "xlink:title",
80346
+ "xml:space",
80347
+ "xmlns:xlink"
80348
+ ]);
79650
80349
  const MUSTACHE_EXPR = seal(/{{[\w\W]*|^[\w\W]*}}/g);
79651
80350
  const ERB_EXPR = seal(/<%[\w\W]*|^[\w\W]*%>/g);
79652
80351
  const TMPLIT_EXPR = seal(/\${[\w\W]*/g);
79653
80352
  const DATA_ATTR = seal(/^data-[\-\w.\u00B7-\uFFFF]+$/);
79654
80353
  const ARIA_ATTR = seal(/^aria-[\-\w]+$/);
79655
- const IS_ALLOWED_URI = seal(
79656
- /^(?:(?:(?:f|ht)tps?|mailto|tel|callto|sms|cid|xmpp|matrix):|[^a-z]|[a-z+.\-]+(?:[^a-z+.\-:]|$))/i
79657
- // eslint-disable-line no-useless-escape
79658
- );
80354
+ const IS_ALLOWED_URI = seal(/^(?:(?:(?:f|ht)tps?|mailto|tel|callto|sms|cid|xmpp|matrix):|[^a-z]|[a-z+.\-]+(?:[^a-z+.\-:]|$))/i);
79659
80355
  const IS_SCRIPT_OR_DATA = seal(/^(?:\w+script|data):/i);
79660
- const ATTR_WHITESPACE = seal(
79661
- /[\u0000-\u0020\u00A0\u1680\u180E\u2000-\u2029\u205F\u3000]/g
79662
- // eslint-disable-line no-control-regex
79663
- );
80356
+ const ATTR_WHITESPACE = seal(/[\u0000-\u0020\u00A0\u1680\u180E\u2000-\u2029\u205F\u3000]/g);
79664
80357
  const DOCTYPE_NAME = seal(/^html$/i);
79665
80358
  const CUSTOM_ELEMENT = seal(/^[a-z][.\w]*(-[.\w]+)+$/i);
80359
+ const ELEMENT_MARKUP_PROBE = seal(/<[/\w!]/g);
80360
+ const COMMENT_MARKUP_PROBE = seal(/<[/\w]/g);
80361
+ const FALLBACK_TAG_CLOSE = seal(/<\/no(script|embed|frames)/i);
80362
+ const SELF_CLOSING_TAG = seal(/\/>/i);
79666
80363
  const NODE_TYPE = {
79667
80364
  element: 1,
79668
80365
  attribute: 2,
79669
80366
  text: 3,
79670
80367
  cdataSection: 4,
79671
80368
  entityReference: 5,
79672
- // Deprecated
79673
80369
  entityNode: 6,
79674
- // Deprecated
79675
- progressingInstruction: 7,
80370
+ processingInstruction: 7,
79676
80371
  comment: 8,
79677
80372
  document: 9,
79678
80373
  documentType: 10,
79679
80374
  documentFragment: 11,
79680
80375
  notation: 12
79681
- // Deprecated
79682
80376
  };
80377
+ const LITERAL_TEXT_ELEMENTS = freeze(addToSet({}, [
80378
+ "style",
80379
+ "script",
80380
+ "xmp",
80381
+ "iframe",
80382
+ "noembed",
80383
+ "noframes",
80384
+ "plaintext",
80385
+ "noscript"
80386
+ ]));
79683
80387
  const getGlobal = function getGlobal2() {
79684
80388
  return typeof window === "undefined" ? null : window;
79685
80389
  };
79686
80390
  const _createTrustedTypesPolicy = function _createTrustedTypesPolicy2(trustedTypes, purifyHostElement) {
79687
- if (typeof trustedTypes !== "object" || typeof trustedTypes.createPolicy !== "function") {
79688
- return null;
79689
- }
80391
+ if (typeof trustedTypes !== "object" || typeof trustedTypes.createPolicy !== "function") return null;
79690
80392
  let suffix = null;
79691
80393
  const ATTR_NAME = "data-tt-policy-suffix";
79692
- if (purifyHostElement && purifyHostElement.hasAttribute(ATTR_NAME)) {
79693
- suffix = purifyHostElement.getAttribute(ATTR_NAME);
79694
- }
80394
+ if (purifyHostElement && purifyHostElement.hasAttribute(ATTR_NAME)) suffix = purifyHostElement.getAttribute(ATTR_NAME);
79695
80395
  const policyName = "dompurify" + (suffix ? "#" + suffix : "");
79696
80396
  try {
79697
80397
  return trustedTypes.createPolicy(policyName, {
@@ -79720,10 +80420,17 @@ html body {
79720
80420
  uponSanitizeShadowNode: []
79721
80421
  };
79722
80422
  };
80423
+ const _resolveSetOption = function _resolveSetOption2(cfg, key2, fallback, options) {
80424
+ return objectHasOwnProperty(cfg, key2) && arrayIsArray(cfg[key2]) ? addToSet(options.base ? clone(options.base) : {}, cfg[key2], options.transform) : fallback;
80425
+ };
80426
+ const _resolveObjectOption = function _resolveObjectOption2(cfg, key2, makeFallback) {
80427
+ const value = objectHasOwnProperty(cfg, key2) ? cfg[key2] : void 0;
80428
+ return value && typeof value === "object" ? clone(value) : makeFallback();
80429
+ };
79723
80430
  function createDOMPurify() {
79724
80431
  let window2 = arguments.length > 0 && arguments[0] !== void 0 ? arguments[0] : getGlobal();
79725
80432
  const DOMPurify = (root2) => createDOMPurify(root2);
79726
- DOMPurify.version = "3.4.6";
80433
+ DOMPurify.version = "3.4.17";
79727
80434
  DOMPurify.removed = [];
79728
80435
  if (!window2 || !window2.document || window2.document.nodeType !== NODE_TYPE.document || !window2.Element) {
79729
80436
  DOMPurify.isSupported = false;
@@ -79733,13 +80440,14 @@ html body {
79733
80440
  const originalDocument = document2;
79734
80441
  const currentScript = originalDocument.currentScript;
79735
80442
  window2.DocumentFragment;
79736
- const HTMLTemplateElement = window2.HTMLTemplateElement, Node = window2.Node, Element2 = window2.Element, NodeFilter = window2.NodeFilter, _window$NamedNodeMap = window2.NamedNodeMap;
79737
- _window$NamedNodeMap === void 0 ? window2.NamedNodeMap || window2.MozNamedAttrMap : _window$NamedNodeMap;
80443
+ const HTMLTemplateElement = window2.HTMLTemplateElement, Node = window2.Node, Element2 = window2.Element, NodeFilter = window2.NodeFilter;
80444
+ window2.NamedNodeMap === void 0 && (window2.NamedNodeMap || window2.MozNamedAttrMap);
79738
80445
  window2.HTMLFormElement;
79739
80446
  const DOMParser2 = window2.DOMParser, trustedTypes = window2.trustedTypes;
79740
80447
  const ElementPrototype = Element2.prototype;
79741
80448
  const cloneNode = lookupGetter(ElementPrototype, "cloneNode");
79742
80449
  const remove = lookupGetter(ElementPrototype, "remove");
80450
+ const removeAttributeNode = lookupGetter(ElementPrototype, "removeAttributeNode");
79743
80451
  const getNextSibling = lookupGetter(ElementPrototype, "nextSibling");
79744
80452
  const getChildNodes = lookupGetter(ElementPrototype, "childNodes");
79745
80453
  const getParentNode = lookupGetter(ElementPrototype, "parentNode");
@@ -79747,14 +80455,54 @@ html body {
79747
80455
  const getAttributes = lookupGetter(ElementPrototype, "attributes");
79748
80456
  const getNodeType = Node && Node.prototype ? lookupGetter(Node.prototype, "nodeType") : null;
79749
80457
  const getNodeName = Node && Node.prototype ? lookupGetter(Node.prototype, "nodeName") : null;
80458
+ const getOwnerDocument = Node && Node.prototype ? lookupGetter(Node.prototype, "ownerDocument") : null;
80459
+ const _readNodeType = function _readNodeType2(node2) {
80460
+ return getNodeType ? getNodeType(node2) : node2.nodeType;
80461
+ };
80462
+ const _readNodeName = function _readNodeName2(node2) {
80463
+ return getNodeName ? getNodeName(node2) : node2.nodeName;
80464
+ };
80465
+ const getNamespaceURI = lookupAccessor(ElementPrototype, "namespaceURI");
80466
+ const _readNamespaceURI = function _readNamespaceURI2(element) {
80467
+ return getNamespaceURI ? getNamespaceURI(element) : element.namespaceURI;
80468
+ };
79750
80469
  if (typeof HTMLTemplateElement === "function") {
79751
80470
  const template = document2.createElement("template");
79752
- if (template.content && template.content.ownerDocument) {
79753
- document2 = template.content.ownerDocument;
79754
- }
80471
+ if (template.content && template.content.ownerDocument) document2 = template.content.ownerDocument;
79755
80472
  }
79756
80473
  let trustedTypesPolicy;
79757
80474
  let emptyHTML = "";
80475
+ let defaultTrustedTypesPolicy;
80476
+ let defaultTrustedTypesPolicyResolved = false;
80477
+ let IN_TRUSTED_TYPES_POLICY = 0;
80478
+ const _assertNotInTrustedTypesPolicy = function _assertNotInTrustedTypesPolicy2() {
80479
+ if (IN_TRUSTED_TYPES_POLICY > 0) throw typeErrorCreate('A configured TRUSTED_TYPES_POLICY callback (createHTML or createScriptURL) must not call DOMPurify.sanitize, as that causes infinite recursion. Do not pass a policy whose callbacks wrap DOMPurify as TRUSTED_TYPES_POLICY; see the "DOMPurify and Trusted Types" section of the README.');
80480
+ };
80481
+ const _createTrustedHTML = function _createTrustedHTML2(html2) {
80482
+ _assertNotInTrustedTypesPolicy();
80483
+ IN_TRUSTED_TYPES_POLICY++;
80484
+ try {
80485
+ return trustedTypesPolicy.createHTML(html2);
80486
+ } finally {
80487
+ IN_TRUSTED_TYPES_POLICY--;
80488
+ }
80489
+ };
80490
+ const _createTrustedScriptURL = function _createTrustedScriptURL2(scriptUrl) {
80491
+ _assertNotInTrustedTypesPolicy();
80492
+ IN_TRUSTED_TYPES_POLICY++;
80493
+ try {
80494
+ return trustedTypesPolicy.createScriptURL(scriptUrl);
80495
+ } finally {
80496
+ IN_TRUSTED_TYPES_POLICY--;
80497
+ }
80498
+ };
80499
+ const _getDefaultTrustedTypesPolicy = function _getDefaultTrustedTypesPolicy2() {
80500
+ if (!defaultTrustedTypesPolicyResolved) {
80501
+ defaultTrustedTypesPolicy = _createTrustedTypesPolicy(trustedTypes, currentScript);
80502
+ defaultTrustedTypesPolicyResolved = true;
80503
+ }
80504
+ return defaultTrustedTypesPolicy;
80505
+ };
79758
80506
  const _document = document2, implementation = _document.implementation, createNodeIterator = _document.createNodeIterator, createDocumentFragment = _document.createDocumentFragment, getElementsByTagName = _document.getElementsByTagName;
79759
80507
  const importNode = originalDocument.importNode;
79760
80508
  let hooks = _createHooksMap();
@@ -79762,9 +80510,20 @@ html body {
79762
80510
  const MUSTACHE_EXPR$1 = MUSTACHE_EXPR, ERB_EXPR$1 = ERB_EXPR, TMPLIT_EXPR$1 = TMPLIT_EXPR, DATA_ATTR$1 = DATA_ATTR, ARIA_ATTR$1 = ARIA_ATTR, IS_SCRIPT_OR_DATA$1 = IS_SCRIPT_OR_DATA, ATTR_WHITESPACE$1 = ATTR_WHITESPACE, CUSTOM_ELEMENT$1 = CUSTOM_ELEMENT;
79763
80511
  let IS_ALLOWED_URI$1 = IS_ALLOWED_URI;
79764
80512
  let ALLOWED_TAGS = null;
79765
- const DEFAULT_ALLOWED_TAGS = addToSet({}, [...html$1, ...svg$1, ...svgFilters, ...mathMl$1, ...text]);
80513
+ const DEFAULT_ALLOWED_TAGS = addToSet({}, [
80514
+ ...html$1,
80515
+ ...svg$1,
80516
+ ...svgFilters,
80517
+ ...mathMl$1,
80518
+ ...text
80519
+ ]);
79766
80520
  let ALLOWED_ATTR = null;
79767
- const DEFAULT_ALLOWED_ATTR = addToSet({}, [...html, ...svg, ...mathMl, ...xml]);
80521
+ const DEFAULT_ALLOWED_ATTR = addToSet({}, [
80522
+ ...html,
80523
+ ...svg,
80524
+ ...mathMl,
80525
+ ...xml
80526
+ ]);
79768
80527
  let CUSTOM_ELEMENT_HANDLING = Object.seal(create(null, {
79769
80528
  tagNameCheck: {
79770
80529
  writable: true,
@@ -79809,6 +80568,8 @@ html body {
79809
80568
  let SAFE_FOR_XML = true;
79810
80569
  let WHOLE_DOCUMENT = false;
79811
80570
  let SET_CONFIG = false;
80571
+ let SET_CONFIG_ALLOWED_TAGS = null;
80572
+ let SET_CONFIG_ALLOWED_ATTR = null;
79812
80573
  let FORCE_BODY = false;
79813
80574
  let RETURN_DOM = false;
79814
80575
  let RETURN_DOM_FRAGMENT = false;
@@ -79818,23 +80579,91 @@ html body {
79818
80579
  const SANITIZE_NAMED_PROPS_PREFIX = "user-content-";
79819
80580
  let KEEP_CONTENT = true;
79820
80581
  let IN_PLACE = false;
80582
+ let IN_PLACE_VISITED = null;
79821
80583
  let USE_PROFILES = {};
79822
80584
  let FORBID_CONTENTS = null;
79823
- const DEFAULT_FORBID_CONTENTS = addToSet({}, ["annotation-xml", "audio", "colgroup", "desc", "foreignobject", "head", "iframe", "math", "mi", "mn", "mo", "ms", "mtext", "noembed", "noframes", "noscript", "plaintext", "script", "style", "svg", "template", "thead", "title", "video", "xmp"]);
80585
+ const DEFAULT_FORBID_CONTENTS = addToSet({}, [
80586
+ "annotation-xml",
80587
+ "audio",
80588
+ "colgroup",
80589
+ "desc",
80590
+ "foreignobject",
80591
+ "head",
80592
+ "iframe",
80593
+ "math",
80594
+ "mi",
80595
+ "mn",
80596
+ "mo",
80597
+ "ms",
80598
+ "mtext",
80599
+ "noembed",
80600
+ "noframes",
80601
+ "noscript",
80602
+ "plaintext",
80603
+ "script",
80604
+ "selectedcontent",
80605
+ "style",
80606
+ "svg",
80607
+ "template",
80608
+ "thead",
80609
+ "title",
80610
+ "video",
80611
+ "xmp"
80612
+ ]);
79824
80613
  let DATA_URI_TAGS = null;
79825
- const DEFAULT_DATA_URI_TAGS = addToSet({}, ["audio", "video", "img", "source", "image", "track"]);
80614
+ const DEFAULT_DATA_URI_TAGS = addToSet({}, [
80615
+ "audio",
80616
+ "video",
80617
+ "img",
80618
+ "source",
80619
+ "image",
80620
+ "track"
80621
+ ]);
79826
80622
  let URI_SAFE_ATTRIBUTES = null;
79827
- const DEFAULT_URI_SAFE_ATTRIBUTES = addToSet({}, ["alt", "class", "for", "id", "label", "name", "pattern", "placeholder", "role", "summary", "title", "value", "style", "xmlns"]);
80623
+ const DEFAULT_URI_SAFE_ATTRIBUTES = addToSet({}, [
80624
+ "alt",
80625
+ "class",
80626
+ "for",
80627
+ "id",
80628
+ "label",
80629
+ "name",
80630
+ "pattern",
80631
+ "placeholder",
80632
+ "role",
80633
+ "summary",
80634
+ "title",
80635
+ "value",
80636
+ "style",
80637
+ "xmlns"
80638
+ ]);
79828
80639
  const MATHML_NAMESPACE = "http://www.w3.org/1998/Math/MathML";
79829
80640
  const SVG_NAMESPACE = "http://www.w3.org/2000/svg";
79830
80641
  const HTML_NAMESPACE = "http://www.w3.org/1999/xhtml";
79831
80642
  let NAMESPACE2 = HTML_NAMESPACE;
79832
80643
  let IS_EMPTY_INPUT = false;
79833
80644
  let ALLOWED_NAMESPACES = null;
79834
- const DEFAULT_ALLOWED_NAMESPACES = addToSet({}, [MATHML_NAMESPACE, SVG_NAMESPACE, HTML_NAMESPACE], stringToString);
79835
- let MATHML_TEXT_INTEGRATION_POINTS = addToSet({}, ["mi", "mo", "mn", "ms", "mtext"]);
79836
- let HTML_INTEGRATION_POINTS = addToSet({}, ["annotation-xml"]);
79837
- const COMMON_SVG_AND_HTML_ELEMENTS = addToSet({}, ["title", "style", "font", "a", "script"]);
80645
+ const DEFAULT_ALLOWED_NAMESPACES = addToSet({}, [
80646
+ MATHML_NAMESPACE,
80647
+ SVG_NAMESPACE,
80648
+ HTML_NAMESPACE
80649
+ ], stringToString);
80650
+ const DEFAULT_MATHML_TEXT_INTEGRATION_POINTS = freeze([
80651
+ "mi",
80652
+ "mo",
80653
+ "mn",
80654
+ "ms",
80655
+ "mtext"
80656
+ ]);
80657
+ let MATHML_TEXT_INTEGRATION_POINTS = addToSet({}, DEFAULT_MATHML_TEXT_INTEGRATION_POINTS);
80658
+ const DEFAULT_HTML_INTEGRATION_POINTS = freeze(["annotation-xml"]);
80659
+ let HTML_INTEGRATION_POINTS = addToSet({}, DEFAULT_HTML_INTEGRATION_POINTS);
80660
+ const COMMON_SVG_AND_HTML_ELEMENTS = addToSet({}, [
80661
+ "title",
80662
+ "style",
80663
+ "font",
80664
+ "a",
80665
+ "script"
80666
+ ]);
79838
80667
  let PARSER_MEDIA_TYPE = null;
79839
80668
  const SUPPORTED_PARSER_MEDIA_TYPES = ["application/xhtml+xml", "text/html"];
79840
80669
  const DEFAULT_PARSER_MEDIA_TYPE = "text/html";
@@ -79846,24 +80675,25 @@ html body {
79846
80675
  };
79847
80676
  const _parseConfig = function _parseConfig2() {
79848
80677
  let cfg = arguments.length > 0 && arguments[0] !== void 0 ? arguments[0] : {};
79849
- if (CONFIG && CONFIG === cfg) {
79850
- return;
79851
- }
79852
- if (!cfg || typeof cfg !== "object") {
79853
- cfg = {};
79854
- }
80678
+ if (CONFIG && CONFIG === cfg) return;
80679
+ if (!cfg || typeof cfg !== "object") cfg = {};
79855
80680
  cfg = clone(cfg);
79856
- PARSER_MEDIA_TYPE = // eslint-disable-next-line unicorn/prefer-includes
79857
- SUPPORTED_PARSER_MEDIA_TYPES.indexOf(cfg.PARSER_MEDIA_TYPE) === -1 ? DEFAULT_PARSER_MEDIA_TYPE : cfg.PARSER_MEDIA_TYPE;
80681
+ PARSER_MEDIA_TYPE = SUPPORTED_PARSER_MEDIA_TYPES.indexOf(cfg.PARSER_MEDIA_TYPE) === -1 ? DEFAULT_PARSER_MEDIA_TYPE : cfg.PARSER_MEDIA_TYPE;
79858
80682
  transformCaseFunc = PARSER_MEDIA_TYPE === "application/xhtml+xml" ? stringToString : stringToLowerCase;
79859
- ALLOWED_TAGS = objectHasOwnProperty(cfg, "ALLOWED_TAGS") && arrayIsArray(cfg.ALLOWED_TAGS) ? addToSet({}, cfg.ALLOWED_TAGS, transformCaseFunc) : DEFAULT_ALLOWED_TAGS;
79860
- ALLOWED_ATTR = objectHasOwnProperty(cfg, "ALLOWED_ATTR") && arrayIsArray(cfg.ALLOWED_ATTR) ? addToSet({}, cfg.ALLOWED_ATTR, transformCaseFunc) : DEFAULT_ALLOWED_ATTR;
79861
- ALLOWED_NAMESPACES = objectHasOwnProperty(cfg, "ALLOWED_NAMESPACES") && arrayIsArray(cfg.ALLOWED_NAMESPACES) ? addToSet({}, cfg.ALLOWED_NAMESPACES, stringToString) : DEFAULT_ALLOWED_NAMESPACES;
79862
- URI_SAFE_ATTRIBUTES = objectHasOwnProperty(cfg, "ADD_URI_SAFE_ATTR") && arrayIsArray(cfg.ADD_URI_SAFE_ATTR) ? addToSet(clone(DEFAULT_URI_SAFE_ATTRIBUTES), cfg.ADD_URI_SAFE_ATTR, transformCaseFunc) : DEFAULT_URI_SAFE_ATTRIBUTES;
79863
- DATA_URI_TAGS = objectHasOwnProperty(cfg, "ADD_DATA_URI_TAGS") && arrayIsArray(cfg.ADD_DATA_URI_TAGS) ? addToSet(clone(DEFAULT_DATA_URI_TAGS), cfg.ADD_DATA_URI_TAGS, transformCaseFunc) : DEFAULT_DATA_URI_TAGS;
79864
- FORBID_CONTENTS = objectHasOwnProperty(cfg, "FORBID_CONTENTS") && arrayIsArray(cfg.FORBID_CONTENTS) ? addToSet({}, cfg.FORBID_CONTENTS, transformCaseFunc) : DEFAULT_FORBID_CONTENTS;
79865
- FORBID_TAGS = objectHasOwnProperty(cfg, "FORBID_TAGS") && arrayIsArray(cfg.FORBID_TAGS) ? addToSet({}, cfg.FORBID_TAGS, transformCaseFunc) : clone({});
79866
- FORBID_ATTR = objectHasOwnProperty(cfg, "FORBID_ATTR") && arrayIsArray(cfg.FORBID_ATTR) ? addToSet({}, cfg.FORBID_ATTR, transformCaseFunc) : clone({});
80683
+ ALLOWED_TAGS = _resolveSetOption(cfg, "ALLOWED_TAGS", DEFAULT_ALLOWED_TAGS, { transform: transformCaseFunc });
80684
+ ALLOWED_ATTR = _resolveSetOption(cfg, "ALLOWED_ATTR", DEFAULT_ALLOWED_ATTR, { transform: transformCaseFunc });
80685
+ ALLOWED_NAMESPACES = _resolveSetOption(cfg, "ALLOWED_NAMESPACES", DEFAULT_ALLOWED_NAMESPACES, { transform: stringToString });
80686
+ URI_SAFE_ATTRIBUTES = _resolveSetOption(cfg, "ADD_URI_SAFE_ATTR", DEFAULT_URI_SAFE_ATTRIBUTES, {
80687
+ transform: transformCaseFunc,
80688
+ base: DEFAULT_URI_SAFE_ATTRIBUTES
80689
+ });
80690
+ DATA_URI_TAGS = _resolveSetOption(cfg, "ADD_DATA_URI_TAGS", DEFAULT_DATA_URI_TAGS, {
80691
+ transform: transformCaseFunc,
80692
+ base: DEFAULT_DATA_URI_TAGS
80693
+ });
80694
+ FORBID_CONTENTS = _resolveSetOption(cfg, "FORBID_CONTENTS", DEFAULT_FORBID_CONTENTS, { transform: transformCaseFunc });
80695
+ FORBID_TAGS = _resolveSetOption(cfg, "FORBID_TAGS", clone({}), { transform: transformCaseFunc });
80696
+ FORBID_ATTR = _resolveSetOption(cfg, "FORBID_ATTR", clone({}), { transform: transformCaseFunc });
79867
80697
  USE_PROFILES = objectHasOwnProperty(cfg, "USE_PROFILES") ? cfg.USE_PROFILES && typeof cfg.USE_PROFILES === "object" ? clone(cfg.USE_PROFILES) : cfg.USE_PROFILES : false;
79868
80698
  ALLOW_ARIA_ATTR = cfg.ALLOW_ARIA_ATTR !== false;
79869
80699
  ALLOW_DATA_ATTR = cfg.ALLOW_DATA_ATTR !== false;
@@ -79882,25 +80712,16 @@ html body {
79882
80712
  IN_PLACE = cfg.IN_PLACE || false;
79883
80713
  IS_ALLOWED_URI$1 = isRegex(cfg.ALLOWED_URI_REGEXP) ? cfg.ALLOWED_URI_REGEXP : IS_ALLOWED_URI;
79884
80714
  NAMESPACE2 = typeof cfg.NAMESPACE === "string" ? cfg.NAMESPACE : HTML_NAMESPACE;
79885
- MATHML_TEXT_INTEGRATION_POINTS = objectHasOwnProperty(cfg, "MATHML_TEXT_INTEGRATION_POINTS") && cfg.MATHML_TEXT_INTEGRATION_POINTS && typeof cfg.MATHML_TEXT_INTEGRATION_POINTS === "object" ? clone(cfg.MATHML_TEXT_INTEGRATION_POINTS) : addToSet({}, ["mi", "mo", "mn", "ms", "mtext"]);
79886
- HTML_INTEGRATION_POINTS = objectHasOwnProperty(cfg, "HTML_INTEGRATION_POINTS") && cfg.HTML_INTEGRATION_POINTS && typeof cfg.HTML_INTEGRATION_POINTS === "object" ? clone(cfg.HTML_INTEGRATION_POINTS) : addToSet({}, ["annotation-xml"]);
79887
- const customElementHandling = objectHasOwnProperty(cfg, "CUSTOM_ELEMENT_HANDLING") && cfg.CUSTOM_ELEMENT_HANDLING && typeof cfg.CUSTOM_ELEMENT_HANDLING === "object" ? clone(cfg.CUSTOM_ELEMENT_HANDLING) : create(null);
80715
+ MATHML_TEXT_INTEGRATION_POINTS = _resolveObjectOption(cfg, "MATHML_TEXT_INTEGRATION_POINTS", () => addToSet({}, DEFAULT_MATHML_TEXT_INTEGRATION_POINTS));
80716
+ HTML_INTEGRATION_POINTS = _resolveObjectOption(cfg, "HTML_INTEGRATION_POINTS", () => addToSet({}, DEFAULT_HTML_INTEGRATION_POINTS));
80717
+ const customElementHandling = _resolveObjectOption(cfg, "CUSTOM_ELEMENT_HANDLING", () => create(null));
79888
80718
  CUSTOM_ELEMENT_HANDLING = create(null);
79889
- if (objectHasOwnProperty(customElementHandling, "tagNameCheck") && isRegexOrFunction(customElementHandling.tagNameCheck)) {
79890
- CUSTOM_ELEMENT_HANDLING.tagNameCheck = customElementHandling.tagNameCheck;
79891
- }
79892
- if (objectHasOwnProperty(customElementHandling, "attributeNameCheck") && isRegexOrFunction(customElementHandling.attributeNameCheck)) {
79893
- CUSTOM_ELEMENT_HANDLING.attributeNameCheck = customElementHandling.attributeNameCheck;
79894
- }
79895
- if (objectHasOwnProperty(customElementHandling, "allowCustomizedBuiltInElements") && typeof customElementHandling.allowCustomizedBuiltInElements === "boolean") {
79896
- CUSTOM_ELEMENT_HANDLING.allowCustomizedBuiltInElements = customElementHandling.allowCustomizedBuiltInElements;
79897
- }
79898
- if (SAFE_FOR_TEMPLATES) {
79899
- ALLOW_DATA_ATTR = false;
79900
- }
79901
- if (RETURN_DOM_FRAGMENT) {
79902
- RETURN_DOM = true;
79903
- }
80719
+ if (objectHasOwnProperty(customElementHandling, "tagNameCheck") && isRegexOrFunction(customElementHandling.tagNameCheck)) CUSTOM_ELEMENT_HANDLING.tagNameCheck = customElementHandling.tagNameCheck;
80720
+ if (objectHasOwnProperty(customElementHandling, "attributeNameCheck") && isRegexOrFunction(customElementHandling.attributeNameCheck)) CUSTOM_ELEMENT_HANDLING.attributeNameCheck = customElementHandling.attributeNameCheck;
80721
+ if (objectHasOwnProperty(customElementHandling, "allowCustomizedBuiltInElements") && typeof customElementHandling.allowCustomizedBuiltInElements === "boolean") CUSTOM_ELEMENT_HANDLING.allowCustomizedBuiltInElements = customElementHandling.allowCustomizedBuiltInElements;
80722
+ seal(CUSTOM_ELEMENT_HANDLING);
80723
+ if (SAFE_FOR_TEMPLATES) ALLOW_DATA_ATTR = false;
80724
+ if (RETURN_DOM_FRAGMENT) RETURN_DOM = true;
79904
80725
  if (USE_PROFILES) {
79905
80726
  ALLOWED_TAGS = addToSet({}, text);
79906
80727
  ALLOWED_ATTR = create(null);
@@ -79927,174 +80748,299 @@ html body {
79927
80748
  EXTRA_ELEMENT_HANDLING.tagCheck = null;
79928
80749
  EXTRA_ELEMENT_HANDLING.attributeCheck = null;
79929
80750
  if (objectHasOwnProperty(cfg, "ADD_TAGS")) {
79930
- if (typeof cfg.ADD_TAGS === "function") {
79931
- EXTRA_ELEMENT_HANDLING.tagCheck = cfg.ADD_TAGS;
79932
- } else if (arrayIsArray(cfg.ADD_TAGS)) {
79933
- if (ALLOWED_TAGS === DEFAULT_ALLOWED_TAGS) {
79934
- ALLOWED_TAGS = clone(ALLOWED_TAGS);
79935
- }
80751
+ if (typeof cfg.ADD_TAGS === "function") EXTRA_ELEMENT_HANDLING.tagCheck = cfg.ADD_TAGS;
80752
+ else if (arrayIsArray(cfg.ADD_TAGS)) {
80753
+ if (ALLOWED_TAGS === DEFAULT_ALLOWED_TAGS) ALLOWED_TAGS = clone(ALLOWED_TAGS);
79936
80754
  addToSet(ALLOWED_TAGS, cfg.ADD_TAGS, transformCaseFunc);
79937
80755
  }
79938
80756
  }
79939
80757
  if (objectHasOwnProperty(cfg, "ADD_ATTR")) {
79940
- if (typeof cfg.ADD_ATTR === "function") {
79941
- EXTRA_ELEMENT_HANDLING.attributeCheck = cfg.ADD_ATTR;
79942
- } else if (arrayIsArray(cfg.ADD_ATTR)) {
79943
- if (ALLOWED_ATTR === DEFAULT_ALLOWED_ATTR) {
79944
- ALLOWED_ATTR = clone(ALLOWED_ATTR);
79945
- }
80758
+ if (typeof cfg.ADD_ATTR === "function") EXTRA_ELEMENT_HANDLING.attributeCheck = cfg.ADD_ATTR;
80759
+ else if (arrayIsArray(cfg.ADD_ATTR)) {
80760
+ if (ALLOWED_ATTR === DEFAULT_ALLOWED_ATTR) ALLOWED_ATTR = clone(ALLOWED_ATTR);
79946
80761
  addToSet(ALLOWED_ATTR, cfg.ADD_ATTR, transformCaseFunc);
79947
80762
  }
79948
80763
  }
79949
- if (objectHasOwnProperty(cfg, "ADD_URI_SAFE_ATTR") && arrayIsArray(cfg.ADD_URI_SAFE_ATTR)) {
79950
- addToSet(URI_SAFE_ATTRIBUTES, cfg.ADD_URI_SAFE_ATTR, transformCaseFunc);
79951
- }
79952
- if (objectHasOwnProperty(cfg, "FORBID_CONTENTS") && arrayIsArray(cfg.FORBID_CONTENTS)) {
79953
- if (FORBID_CONTENTS === DEFAULT_FORBID_CONTENTS) {
79954
- FORBID_CONTENTS = clone(FORBID_CONTENTS);
79955
- }
79956
- addToSet(FORBID_CONTENTS, cfg.FORBID_CONTENTS, transformCaseFunc);
79957
- }
79958
80764
  if (objectHasOwnProperty(cfg, "ADD_FORBID_CONTENTS") && arrayIsArray(cfg.ADD_FORBID_CONTENTS)) {
79959
- if (FORBID_CONTENTS === DEFAULT_FORBID_CONTENTS) {
79960
- FORBID_CONTENTS = clone(FORBID_CONTENTS);
79961
- }
80765
+ if (FORBID_CONTENTS === DEFAULT_FORBID_CONTENTS) FORBID_CONTENTS = clone(FORBID_CONTENTS);
79962
80766
  addToSet(FORBID_CONTENTS, cfg.ADD_FORBID_CONTENTS, transformCaseFunc);
79963
80767
  }
79964
- if (KEEP_CONTENT) {
79965
- ALLOWED_TAGS["#text"] = true;
79966
- }
79967
- if (WHOLE_DOCUMENT) {
79968
- addToSet(ALLOWED_TAGS, ["html", "head", "body"]);
79969
- }
80768
+ if (KEEP_CONTENT) ALLOWED_TAGS["#text"] = true;
80769
+ if (WHOLE_DOCUMENT) addToSet(ALLOWED_TAGS, [
80770
+ "html",
80771
+ "head",
80772
+ "body"
80773
+ ]);
79970
80774
  if (ALLOWED_TAGS.table) {
79971
80775
  addToSet(ALLOWED_TAGS, ["tbody"]);
79972
80776
  delete FORBID_TAGS.tbody;
79973
80777
  }
79974
80778
  if (cfg.TRUSTED_TYPES_POLICY) {
79975
- if (typeof cfg.TRUSTED_TYPES_POLICY.createHTML !== "function") {
79976
- throw typeErrorCreate('TRUSTED_TYPES_POLICY configuration option must provide a "createHTML" hook.');
79977
- }
79978
- if (typeof cfg.TRUSTED_TYPES_POLICY.createScriptURL !== "function") {
79979
- throw typeErrorCreate('TRUSTED_TYPES_POLICY configuration option must provide a "createScriptURL" hook.');
79980
- }
80779
+ if (typeof cfg.TRUSTED_TYPES_POLICY.createHTML !== "function") throw typeErrorCreate('TRUSTED_TYPES_POLICY configuration option must provide a "createHTML" hook.');
80780
+ if (typeof cfg.TRUSTED_TYPES_POLICY.createScriptURL !== "function") throw typeErrorCreate('TRUSTED_TYPES_POLICY configuration option must provide a "createScriptURL" hook.');
80781
+ const previousTrustedTypesPolicy = trustedTypesPolicy;
79981
80782
  trustedTypesPolicy = cfg.TRUSTED_TYPES_POLICY;
79982
- emptyHTML = trustedTypesPolicy.createHTML("");
79983
- } else {
79984
- if (trustedTypesPolicy === void 0) {
79985
- trustedTypesPolicy = _createTrustedTypesPolicy(trustedTypes, currentScript);
79986
- }
79987
- if (trustedTypesPolicy !== null && typeof emptyHTML === "string") {
79988
- emptyHTML = trustedTypesPolicy.createHTML("");
80783
+ try {
80784
+ emptyHTML = _createTrustedHTML("");
80785
+ } catch (error) {
80786
+ trustedTypesPolicy = previousTrustedTypesPolicy;
80787
+ throw error;
79989
80788
  }
80789
+ } else if (cfg.TRUSTED_TYPES_POLICY === null) {
80790
+ trustedTypesPolicy = void 0;
80791
+ emptyHTML = "";
80792
+ } else {
80793
+ if (trustedTypesPolicy === void 0) trustedTypesPolicy = _getDefaultTrustedTypesPolicy();
80794
+ if (trustedTypesPolicy && typeof emptyHTML === "string") emptyHTML = _createTrustedHTML("");
79990
80795
  }
79991
- if (freeze) {
79992
- freeze(cfg);
79993
- }
80796
+ if (freeze) freeze(cfg);
79994
80797
  CONFIG = cfg;
79995
80798
  };
79996
- const ALL_SVG_TAGS = addToSet({}, [...svg$1, ...svgFilters, ...svgDisallowed]);
80799
+ const ALL_SVG_TAGS = addToSet({}, [
80800
+ ...svg$1,
80801
+ ...svgFilters,
80802
+ ...svgDisallowed
80803
+ ]);
79997
80804
  const ALL_MATHML_TAGS = addToSet({}, [...mathMl$1, ...mathMlDisallowed]);
80805
+ const _checkSvgNamespace = function _checkSvgNamespace2(tagName, parent, parentTagName) {
80806
+ if (parent.namespaceURI === HTML_NAMESPACE) return tagName === "svg";
80807
+ if (parent.namespaceURI === MATHML_NAMESPACE) return tagName === "svg" && (parentTagName === "annotation-xml" || MATHML_TEXT_INTEGRATION_POINTS[parentTagName]);
80808
+ return Boolean(ALL_SVG_TAGS[tagName]);
80809
+ };
80810
+ const _checkMathMlNamespace = function _checkMathMlNamespace2(tagName, parent, parentTagName) {
80811
+ if (parent.namespaceURI === HTML_NAMESPACE) return tagName === "math";
80812
+ if (parent.namespaceURI === SVG_NAMESPACE) return tagName === "math" && HTML_INTEGRATION_POINTS[parentTagName];
80813
+ return Boolean(ALL_MATHML_TAGS[tagName]);
80814
+ };
80815
+ const _checkHtmlNamespace = function _checkHtmlNamespace2(tagName, parent, parentTagName) {
80816
+ if (parent.namespaceURI === SVG_NAMESPACE && !HTML_INTEGRATION_POINTS[parentTagName]) return false;
80817
+ if (parent.namespaceURI === MATHML_NAMESPACE && !MATHML_TEXT_INTEGRATION_POINTS[parentTagName]) return false;
80818
+ return !ALL_MATHML_TAGS[tagName] && (COMMON_SVG_AND_HTML_ELEMENTS[tagName] || !ALL_SVG_TAGS[tagName]);
80819
+ };
79998
80820
  const _checkValidNamespace = function _checkValidNamespace2(element) {
79999
- let parent = getParentNode(element);
80000
- if (!parent || !parent.tagName) {
80001
- parent = {
80002
- namespaceURI: NAMESPACE2,
80003
- tagName: "template"
80004
- };
80005
- }
80006
- const tagName = stringToLowerCase(element.tagName);
80007
- const parentTagName = stringToLowerCase(parent.tagName);
80008
- if (!ALLOWED_NAMESPACES[element.namespaceURI]) {
80009
- return false;
80821
+ const elementNamespace = _readNamespaceURI(element);
80822
+ const tagName = stringToLowerCase(_readNodeName(element));
80823
+ const parentNode = getParentNode(element);
80824
+ let parent;
80825
+ let parentTagName;
80826
+ if (parentNode && _readNodeType(parentNode) === NODE_TYPE.element) {
80827
+ parent = { namespaceURI: _readNamespaceURI(parentNode) };
80828
+ parentTagName = stringToLowerCase(_readNodeName(parentNode));
80829
+ } else {
80830
+ parent = { namespaceURI: NAMESPACE2 };
80831
+ parentTagName = "template";
80832
+ }
80833
+ if (!ALLOWED_NAMESPACES[elementNamespace]) return false;
80834
+ if (elementNamespace === SVG_NAMESPACE) return _checkSvgNamespace(tagName, parent, parentTagName);
80835
+ if (elementNamespace === MATHML_NAMESPACE) return _checkMathMlNamespace(tagName, parent, parentTagName);
80836
+ if (elementNamespace === HTML_NAMESPACE) return _checkHtmlNamespace(tagName, parent, parentTagName);
80837
+ if (PARSER_MEDIA_TYPE === "application/xhtml+xml" && ALLOWED_NAMESPACES[elementNamespace]) return true;
80838
+ return false;
80839
+ };
80840
+ const _forceRemove = function _forceRemove2(node2) {
80841
+ arrayPush(DOMPurify.removed, { element: node2 });
80842
+ try {
80843
+ getParentNode(node2).removeChild(node2);
80844
+ } catch (_2) {
80845
+ remove(node2);
80846
+ if (!getParentNode(node2)) throw typeErrorCreate("a node selected for removal could not be detached from its tree and cannot be safely returned; refusing to sanitize in place");
80010
80847
  }
80011
- if (element.namespaceURI === SVG_NAMESPACE) {
80012
- if (parent.namespaceURI === HTML_NAMESPACE) {
80013
- return tagName === "svg";
80014
- }
80015
- if (parent.namespaceURI === MATHML_NAMESPACE) {
80016
- return tagName === "svg" && (parentTagName === "annotation-xml" || MATHML_TEXT_INTEGRATION_POINTS[parentTagName]);
80848
+ };
80849
+ const _stripAttributeNode = function _stripAttributeNode2(element, attribute, name) {
80850
+ try {
80851
+ removeAttributeNode(element, attribute);
80852
+ } catch (_2) {
80853
+ try {
80854
+ element.removeAttribute(name);
80855
+ } catch (_3) {
80017
80856
  }
80018
- return Boolean(ALL_SVG_TAGS[tagName]);
80019
80857
  }
80020
- if (element.namespaceURI === MATHML_NAMESPACE) {
80021
- if (parent.namespaceURI === HTML_NAMESPACE) {
80022
- return tagName === "math";
80858
+ };
80859
+ const _neutralizeRoot = function _neutralizeRoot2(root2) {
80860
+ _neutralizeSubtree(root2);
80861
+ const childNodes = getChildNodes(root2);
80862
+ if (childNodes) arrayForEach(arraySlice(childNodes), (child) => {
80863
+ try {
80864
+ remove(child);
80865
+ } catch (_2) {
80023
80866
  }
80024
- if (parent.namespaceURI === SVG_NAMESPACE) {
80025
- return tagName === "math" && HTML_INTEGRATION_POINTS[parentTagName];
80867
+ });
80868
+ const attributes2 = _readNodeType(root2) === NODE_TYPE.element ? getAttributes(root2) : null;
80869
+ if (attributes2) for (let i = attributes2.length - 1; i >= 0; --i) {
80870
+ const attribute = attributes2[i];
80871
+ const name = attribute && attribute.name;
80872
+ if (typeof name === "string") _stripAttributeNode(root2, attribute, name);
80873
+ }
80874
+ };
80875
+ const _removeAttribute = function _removeAttribute2(name, element, attr) {
80876
+ if (!attr) try {
80877
+ attr = element.getAttributeNode(name);
80878
+ } catch (_2) {
80879
+ attr = null;
80880
+ }
80881
+ arrayPush(DOMPurify.removed, {
80882
+ attribute: attr || null,
80883
+ from: element
80884
+ });
80885
+ try {
80886
+ if (attr) removeAttributeNode(element, attr);
80887
+ else element.removeAttribute(name);
80888
+ } catch (_2) {
80889
+ try {
80890
+ element.removeAttribute(name);
80891
+ } catch (_3) {
80026
80892
  }
80027
- return Boolean(ALL_MATHML_TAGS[tagName]);
80028
80893
  }
80029
- if (element.namespaceURI === HTML_NAMESPACE) {
80030
- if (parent.namespaceURI === SVG_NAMESPACE && !HTML_INTEGRATION_POINTS[parentTagName]) {
80031
- return false;
80894
+ if (name === "is") {
80895
+ if (RETURN_DOM || RETURN_DOM_FRAGMENT) try {
80896
+ _forceRemove(element);
80897
+ } catch (_2) {
80032
80898
  }
80033
- if (parent.namespaceURI === MATHML_NAMESPACE && !MATHML_TEXT_INTEGRATION_POINTS[parentTagName]) {
80034
- return false;
80899
+ else try {
80900
+ element.setAttribute(name, "");
80901
+ } catch (_2) {
80035
80902
  }
80036
- return !ALL_MATHML_TAGS[tagName] && (COMMON_SVG_AND_HTML_ELEMENTS[tagName] || !ALL_SVG_TAGS[tagName]);
80037
80903
  }
80038
- if (PARSER_MEDIA_TYPE === "application/xhtml+xml" && ALLOWED_NAMESPACES[element.namespaceURI]) {
80039
- return true;
80904
+ };
80905
+ const _stripDisallowedAttributes = function _stripDisallowedAttributes2(element) {
80906
+ const attributes2 = getAttributes(element);
80907
+ if (!attributes2) return;
80908
+ for (let i = attributes2.length - 1; i >= 0; --i) {
80909
+ const attribute = attributes2[i];
80910
+ const name = attribute && attribute.name;
80911
+ if (typeof name !== "string" || ALLOWED_ATTR[transformCaseFunc(name)]) continue;
80912
+ _stripAttributeNode(element, attribute, name);
80040
80913
  }
80041
- return false;
80042
80914
  };
80043
- const _forceRemove = function _forceRemove2(node2) {
80044
- arrayPush(DOMPurify.removed, {
80045
- element: node2
80046
- });
80047
- try {
80048
- getParentNode(node2).removeChild(node2);
80049
- } catch (_2) {
80050
- remove(node2);
80915
+ const _walkTree = function _walkTree2(root2, visit) {
80916
+ let intoShadow = arguments.length > 2 && arguments[2] !== void 0 ? arguments[2] : false;
80917
+ const stack2 = [root2];
80918
+ while (stack2.length > 0) {
80919
+ const node2 = stack2.pop();
80920
+ if (visit(node2) === false) continue;
80921
+ if (intoShadow && _readNodeType(node2) === NODE_TYPE.element) {
80922
+ const shadowRoot = getShadowRoot2(node2);
80923
+ if (_isDocumentFragment(shadowRoot)) stack2.push(shadowRoot);
80924
+ }
80925
+ const childNodes = getChildNodes(node2);
80926
+ if (childNodes) for (let i = childNodes.length - 1; i >= 0; --i) stack2.push(childNodes[i]);
80051
80927
  }
80052
80928
  };
80053
- const _removeAttribute = function _removeAttribute2(name, element) {
80054
- try {
80055
- arrayPush(DOMPurify.removed, {
80056
- attribute: element.getAttributeNode(name),
80057
- from: element
80929
+ const _neutralizeSubtree = function _neutralizeSubtree2(root2) {
80930
+ _walkTree(root2, (node2) => {
80931
+ if (_readNodeType(node2) === NODE_TYPE.element) _stripDisallowedAttributes(node2);
80932
+ });
80933
+ };
80934
+ const _collectLiveNodes = function _collectLiveNodes2(root2) {
80935
+ const nodes = [];
80936
+ _walkTree(root2, (node2) => {
80937
+ nodes.push(node2);
80938
+ }, true);
80939
+ return nodes;
80940
+ };
80941
+ const _neutralizeEscapedElements = function _neutralizeEscapedElements2(root2, before) {
80942
+ const reachable = setCreate();
80943
+ arrayForEach(_collectLiveNodes(root2), (node2) => {
80944
+ if (_readNodeType(node2) === NODE_TYPE.element) setAdd(reachable, node2);
80945
+ });
80946
+ arrayForEach(before, (node2) => {
80947
+ if (_readNodeType(node2) === NODE_TYPE.element && !setHas(reachable, node2)) _stripDisallowedAttributes(node2);
80948
+ });
80949
+ };
80950
+ const _neutralizeDiscarded = function _neutralizeDiscarded2(root2, before) {
80951
+ let rootRemoved = false;
80952
+ arrayForEach(DOMPurify.removed, (entry) => {
80953
+ if (entry.element) {
80954
+ rootRemoved = rootRemoved || entry.element === root2;
80955
+ _neutralizeSubtree(entry.element);
80956
+ }
80957
+ });
80958
+ _neutralizeEscapedElements(root2, before);
80959
+ return rootRemoved;
80960
+ };
80961
+ const MAX_UNVISITED_ROUNDS = 8;
80962
+ const _sanitizeUnvisitedNodes = function _sanitizeUnvisitedNodes2(root2, before) {
80963
+ const visited = IN_PLACE_VISITED;
80964
+ let original = null;
80965
+ const getOriginal = () => {
80966
+ if (!original) {
80967
+ original = setCreate();
80968
+ arrayForEach(before, (beforeNode) => {
80969
+ setAdd(original, beforeNode);
80970
+ });
80971
+ }
80972
+ return original;
80973
+ };
80974
+ for (let round2 = 0; ; round2++) {
80975
+ const live = _collectLiveNodes(root2);
80976
+ const containers = [root2];
80977
+ let pending = false;
80978
+ arrayForEach(live, (node2) => {
80979
+ if (_readNodeType(node2) === NODE_TYPE.documentFragment) arrayPush(containers, node2);
80980
+ else if (!pending && !setHas(visited, node2)) pending = setHas(getOriginal(), node2);
80058
80981
  });
80059
- } catch (_2) {
80060
- arrayPush(DOMPurify.removed, {
80061
- attribute: null,
80062
- from: element
80982
+ if (!pending) return;
80983
+ if (round2 >= MAX_UNVISITED_ROUNDS) throw typeErrorCreate("the tree kept changing during in-place sanitization; refusing to return it");
80984
+ arrayForEach(containers, (container, index2) => {
80985
+ _sanitizeUnvisitedIn(container, index2 > 0, root2, getOriginal());
80063
80986
  });
80064
80987
  }
80065
- element.removeAttribute(name);
80066
- if (name === "is") {
80067
- if (RETURN_DOM || RETURN_DOM_FRAGMENT) {
80988
+ };
80989
+ const _sanitizeUnvisitedIn = function _sanitizeUnvisitedIn2(container, inShadow2, root2, original) {
80990
+ const iterator = _createNodeIterator(container);
80991
+ let node2;
80992
+ while (node2 = iterator.nextNode()) {
80993
+ if (!setHas(original, node2) || setHas(IN_PLACE_VISITED, node2)) continue;
80994
+ if (inShadow2) _executeHooks(hooks.uponSanitizeShadowNode, node2, null);
80995
+ _sanitizeElements(node2, root2);
80996
+ _sanitizeAttributes(node2, root2);
80997
+ if (_isDocumentFragment(node2.content)) _sanitizeShadowDOM2(node2.content);
80998
+ }
80999
+ };
81000
+ const _markVisited = function _markVisited2(node2) {
81001
+ if (IN_PLACE_VISITED) setAdd(IN_PLACE_VISITED, node2);
81002
+ };
81003
+ const _isPatchLinkageAttribute = function _isPatchLinkageAttribute2(lcName, lcTag) {
81004
+ if (!SAFE_FOR_XML) return false;
81005
+ if (lcName === "patchsrc") return true;
81006
+ return lcName === "for" && lcTag !== "label" && lcTag !== "output";
81007
+ };
81008
+ const _neutralizePatchLinkage = function _neutralizePatchLinkage2(root2) {
81009
+ if (!SAFE_FOR_XML) return;
81010
+ _walkTree(root2, (node2) => {
81011
+ const nodeType = _readNodeType(node2);
81012
+ if (nodeType === NODE_TYPE.processingInstruction || nodeType === NODE_TYPE.comment && regExpTest(COMMENT_MARKUP_PROBE, node2.data)) {
80068
81013
  try {
80069
- _forceRemove(element);
81014
+ remove(node2);
80070
81015
  } catch (_2) {
80071
81016
  }
80072
- } else {
81017
+ return false;
81018
+ }
81019
+ if (nodeType === NODE_TYPE.element) {
81020
+ const element = node2;
81021
+ const lcTag = transformCaseFunc(_readNodeName(node2));
80073
81022
  try {
80074
- element.setAttribute(name, "");
81023
+ if (element.hasAttribute && element.hasAttribute("patchsrc")) element.removeAttribute("patchsrc");
81024
+ if (element.hasAttribute && element.hasAttribute("for") && _isPatchLinkageAttribute("for", lcTag)) element.removeAttribute("for");
80075
81025
  } catch (_2) {
80076
81026
  }
80077
81027
  }
80078
- }
81028
+ return true;
81029
+ });
80079
81030
  };
80080
81031
  const _initDocument = function _initDocument2(dirty) {
80081
81032
  let doc = null;
80082
81033
  let leadingWhitespace = null;
80083
- if (FORCE_BODY) {
80084
- dirty = "<remove></remove>" + dirty;
80085
- } else {
81034
+ if (FORCE_BODY) dirty = "<remove></remove>" + dirty;
81035
+ else {
80086
81036
  const matches = stringMatch(dirty, /^[\r\n\t ]+/);
80087
81037
  leadingWhitespace = matches && matches[0];
80088
81038
  }
80089
- if (PARSER_MEDIA_TYPE === "application/xhtml+xml" && NAMESPACE2 === HTML_NAMESPACE) {
80090
- dirty = '<html xmlns="http://www.w3.org/1999/xhtml"><head></head><body>' + dirty + "</body></html>";
80091
- }
80092
- const dirtyPayload = trustedTypesPolicy ? trustedTypesPolicy.createHTML(dirty) : dirty;
80093
- if (NAMESPACE2 === HTML_NAMESPACE) {
80094
- try {
80095
- doc = new DOMParser2().parseFromString(dirtyPayload, PARSER_MEDIA_TYPE);
80096
- } catch (_2) {
80097
- }
81039
+ if (PARSER_MEDIA_TYPE === "application/xhtml+xml" && NAMESPACE2 === HTML_NAMESPACE) dirty = '<html xmlns="http://www.w3.org/1999/xhtml"><head></head><body>' + dirty + "</body></html>";
81040
+ const dirtyPayload = trustedTypesPolicy ? _createTrustedHTML(dirty) : dirty;
81041
+ if (NAMESPACE2 === HTML_NAMESPACE) try {
81042
+ doc = new DOMParser2().parseFromString(dirtyPayload, PARSER_MEDIA_TYPE);
81043
+ } catch (_2) {
80098
81044
  }
80099
81045
  if (!doc || !doc.documentElement) {
80100
81046
  doc = implementation.createDocument(NAMESPACE2, "template", null);
@@ -80104,72 +81050,46 @@ html body {
80104
81050
  }
80105
81051
  }
80106
81052
  const body = doc.body || doc.documentElement;
80107
- if (dirty && leadingWhitespace) {
80108
- body.insertBefore(document2.createTextNode(leadingWhitespace), body.childNodes[0] || null);
80109
- }
80110
- if (NAMESPACE2 === HTML_NAMESPACE) {
80111
- return getElementsByTagName.call(doc, WHOLE_DOCUMENT ? "html" : "body")[0];
80112
- }
81053
+ if (dirty && leadingWhitespace) body.insertBefore(document2.createTextNode(leadingWhitespace), body.childNodes[0] || null);
81054
+ if (NAMESPACE2 === HTML_NAMESPACE) return getElementsByTagName.call(doc, WHOLE_DOCUMENT ? "html" : "body")[0];
80113
81055
  return WHOLE_DOCUMENT ? doc.documentElement : body;
80114
81056
  };
80115
81057
  const _createNodeIterator = function _createNodeIterator2(root2) {
80116
- return createNodeIterator.call(
80117
- root2.ownerDocument || root2,
80118
- root2,
80119
- // eslint-disable-next-line no-bitwise
80120
- NodeFilter.SHOW_ELEMENT | NodeFilter.SHOW_COMMENT | NodeFilter.SHOW_TEXT | NodeFilter.SHOW_PROCESSING_INSTRUCTION | NodeFilter.SHOW_CDATA_SECTION,
80121
- null
80122
- );
81058
+ const doc = getOwnerDocument ? getOwnerDocument(root2) : root2.ownerDocument;
81059
+ return createNodeIterator.call(doc || root2, root2, NodeFilter.SHOW_ELEMENT | NodeFilter.SHOW_COMMENT | NodeFilter.SHOW_TEXT | NodeFilter.SHOW_PROCESSING_INSTRUCTION | NodeFilter.SHOW_CDATA_SECTION, null);
81060
+ };
81061
+ const _stripTemplateExpressions = function _stripTemplateExpressions2(value) {
81062
+ value = stringReplace(value, MUSTACHE_EXPR$1, " ");
81063
+ value = stringReplace(value, ERB_EXPR$1, " ");
81064
+ value = stringReplace(value, TMPLIT_EXPR$1, " ");
81065
+ return value;
81066
+ };
81067
+ const _scrubTemplateExpressions2 = function _scrubTemplateExpressions(node2) {
81068
+ var _node$querySelectorAl;
81069
+ _scrubOwnCharacterData(node2);
81070
+ const templates = (_node$querySelectorAl = node2.querySelectorAll) === null || _node$querySelectorAl === void 0 ? void 0 : _node$querySelectorAl.call(node2, "template");
81071
+ if (templates) arrayForEach(templates, (tmpl) => {
81072
+ if (_isDocumentFragment(tmpl.content)) _scrubTemplateExpressions2(tmpl.content);
81073
+ });
80123
81074
  };
80124
- const _scrubTemplateExpressions = function _scrubTemplateExpressions2(node2) {
81075
+ const _scrubOwnCharacterData = function _scrubOwnCharacterData2(node2) {
80125
81076
  node2.normalize();
80126
- const walker = createNodeIterator.call(
80127
- node2.ownerDocument || node2,
80128
- node2,
80129
- // eslint-disable-next-line no-bitwise
80130
- NodeFilter.SHOW_TEXT | NodeFilter.SHOW_COMMENT | NodeFilter.SHOW_CDATA_SECTION | NodeFilter.SHOW_PROCESSING_INSTRUCTION,
80131
- null
80132
- );
81077
+ const doc = getOwnerDocument ? getOwnerDocument(node2) : node2.ownerDocument;
81078
+ const walker = createNodeIterator.call(doc || node2, node2, NodeFilter.SHOW_TEXT | NodeFilter.SHOW_COMMENT | NodeFilter.SHOW_CDATA_SECTION | NodeFilter.SHOW_PROCESSING_INSTRUCTION, null);
80133
81079
  let currentNode = walker.nextNode();
80134
81080
  while (currentNode) {
80135
- let data = currentNode.data;
80136
- arrayForEach([MUSTACHE_EXPR$1, ERB_EXPR$1, TMPLIT_EXPR$1], (expr) => {
80137
- data = stringReplace(data, expr, " ");
80138
- });
80139
- currentNode.data = data;
81081
+ currentNode.data = _stripTemplateExpressions(currentNode.data);
80140
81082
  currentNode = walker.nextNode();
80141
81083
  }
80142
81084
  };
80143
81085
  const _isClobbered = function _isClobbered2(element) {
80144
81086
  const realTagName = getNodeName ? getNodeName(element) : null;
80145
- if (typeof realTagName !== "string") {
80146
- return false;
80147
- }
80148
- if (transformCaseFunc(realTagName) !== "form") {
80149
- return false;
80150
- }
80151
- return typeof element.nodeName !== "string" || typeof element.textContent !== "string" || typeof element.removeChild !== "function" || // Realm-safe NamedNodeMap detection: equality against the cached
80152
- // prototype getter. Clobbered .attributes (e.g. <input name="attributes">)
80153
- // makes the direct read diverge from the cached read; a clean form
80154
- // (same-realm OR foreign-realm) has both reads pointing at the same
80155
- // canonical NamedNodeMap.
80156
- element.attributes !== getAttributes(element) || typeof element.removeAttribute !== "function" || typeof element.setAttribute !== "function" || typeof element.namespaceURI !== "string" || typeof element.insertBefore !== "function" || typeof element.hasChildNodes !== "function" || // HTMLFormElement has [LegacyOverrideBuiltIns]: a descendant named
80157
- // "childNodes" shadows the prototype getter. Direct reads of
80158
- // form.childNodes from a clobbered form return the named child
80159
- // instead of the real NodeList, so any walk that reads it directly
80160
- // skips the form's real children. Compare the direct read to the
80161
- // cached Node.prototype getter — when the form's named-property
80162
- // getter intercepts the read, the two values differ and we flag
80163
- // the form. This catches every clobbering child type (input,
80164
- // select, etc.) regardless of whether the named child happens to
80165
- // carry a numeric .length, which a typeof-based probe would miss
80166
- // (e.g. HTMLSelectElement.length is a defined unsigned-long).
80167
- element.childNodes !== getChildNodes(element);
81087
+ if (typeof realTagName !== "string") return false;
81088
+ if (transformCaseFunc(realTagName) !== "form") return false;
81089
+ return typeof element.nodeName !== "string" || typeof element.textContent !== "string" || typeof element.removeChild !== "function" || element.attributes !== getAttributes(element) || typeof element.removeAttribute !== "function" || typeof element.removeAttributeNode !== "function" || typeof element.getAttributeNode !== "function" || typeof element.setAttribute !== "function" || typeof element.namespaceURI !== "string" || typeof element.insertBefore !== "function" || typeof element.hasChildNodes !== "function" || element.nodeType !== getNodeType(element) || element.childNodes !== getChildNodes(element);
80168
81090
  };
80169
81091
  const _isDocumentFragment = function _isDocumentFragment2(value) {
80170
- if (!getNodeType || typeof value !== "object" || value === null) {
80171
- return false;
80172
- }
81092
+ if (!getNodeType || typeof value !== "object" || value === null) return false;
80173
81093
  try {
80174
81094
  return getNodeType(value) === NODE_TYPE.documentFragment;
80175
81095
  } catch (_2) {
@@ -80177,9 +81097,7 @@ html body {
80177
81097
  }
80178
81098
  };
80179
81099
  const _isNode = function _isNode2(value) {
80180
- if (!getNodeType || typeof value !== "object" || value === null) {
80181
- return false;
80182
- }
81100
+ if (!getNodeType || typeof value !== "object" || value === null) return false;
80183
81101
  try {
80184
81102
  return typeof getNodeType(value) === "number";
80185
81103
  } catch (_2) {
@@ -80187,126 +81105,156 @@ html body {
80187
81105
  }
80188
81106
  };
80189
81107
  function _executeHooks(hooks2, currentNode, data) {
81108
+ if (hooks2.length === 0) return;
80190
81109
  arrayForEach(hooks2, (hook) => {
80191
81110
  hook.call(DOMPurify, currentNode, data, CONFIG);
80192
81111
  });
80193
81112
  }
80194
- const _sanitizeElements = function _sanitizeElements2(currentNode) {
80195
- let content = null;
81113
+ const _isUnsafeNode = function _isUnsafeNode2(currentNode, tagName) {
81114
+ if (SAFE_FOR_XML && currentNode.hasChildNodes() && !_isNode(currentNode.firstElementChild) && regExpTest(ELEMENT_MARKUP_PROBE, currentNode.textContent) && regExpTest(ELEMENT_MARKUP_PROBE, currentNode.innerHTML)) return true;
81115
+ if (SAFE_FOR_XML && LITERAL_TEXT_ELEMENTS[tagName] && _readNodeType(currentNode) === NODE_TYPE.element && _readNamespaceURI(currentNode) === HTML_NAMESPACE && (_isNode(currentNode.firstElementChild) || typeof currentNode.textContent === "string" && regExpTest(ELEMENT_MARKUP_PROBE, currentNode.textContent))) return true;
81116
+ if (currentNode.nodeType === NODE_TYPE.processingInstruction) return true;
81117
+ if (SAFE_FOR_XML && currentNode.nodeType === NODE_TYPE.comment && regExpTest(COMMENT_MARKUP_PROBE, currentNode.data)) return true;
81118
+ return false;
81119
+ };
81120
+ const _matchesNameCheck = function _matchesNameCheck2(check, name) {
81121
+ if (check instanceof RegExp) return regExpTest(check, name);
81122
+ if (check instanceof Function) {
81123
+ for (var _len = arguments.length, args = new Array(_len > 2 ? _len - 2 : 0), _key = 2; _key < _len; _key++) args[_key - 2] = arguments[_key];
81124
+ return Boolean(check(name, ...args));
81125
+ }
81126
+ return false;
81127
+ };
81128
+ const _sanitizeDisallowedNode = function _sanitizeDisallowedNode2(currentNode, tagName, root2) {
81129
+ if (!FORBID_TAGS[tagName] && _isBasicCustomElement(tagName) && _matchesNameCheck(CUSTOM_ELEMENT_HANDLING.tagNameCheck, tagName)) return false;
81130
+ if (KEEP_CONTENT && !FORBID_CONTENTS[tagName] && !FORBID_CONTENTS[stringToLowerCase(tagName)]) {
81131
+ const parentNode = getParentNode(currentNode);
81132
+ const childNodes = getChildNodes(currentNode);
81133
+ if (childNodes && parentNode) {
81134
+ const childCount = childNodes.length;
81135
+ for (let i = childCount - 1; i >= 0; --i) {
81136
+ const hoisted = currentNode === root2 ? cloneNode(childNodes[i], true) : childNodes[i];
81137
+ parentNode.insertBefore(hoisted, getNextSibling(currentNode));
81138
+ }
81139
+ }
81140
+ }
81141
+ _forceRemove(currentNode);
81142
+ return true;
81143
+ };
81144
+ const _forkSharedAllowlist = function _forkSharedAllowlist2(hookList, set2, defaultSet, setConfigSet) {
81145
+ if (hookList.length === 0) return set2;
81146
+ return set2 === defaultSet || set2 === setConfigSet ? clone(set2) : set2;
81147
+ };
81148
+ const _handleHookDetachedNode = function _handleHookDetachedNode2(currentNode, root2) {
81149
+ if (currentNode === root2 || getParentNode(currentNode) !== null) return false;
81150
+ if (IN_PLACE) _neutralizeSubtree(currentNode);
81151
+ return true;
81152
+ };
81153
+ const _sanitizeElements = function _sanitizeElements2(currentNode, root2) {
81154
+ _markVisited(currentNode);
80196
81155
  _executeHooks(hooks.beforeSanitizeElements, currentNode, null);
81156
+ if (_handleHookDetachedNode(currentNode, root2)) return true;
80197
81157
  if (_isClobbered(currentNode)) {
80198
81158
  _forceRemove(currentNode);
80199
81159
  return true;
80200
81160
  }
80201
- const tagName = transformCaseFunc(currentNode.nodeName);
81161
+ const tagName = transformCaseFunc(_readNodeName(currentNode));
81162
+ ALLOWED_TAGS = _forkSharedAllowlist(hooks.uponSanitizeElement, ALLOWED_TAGS, DEFAULT_ALLOWED_TAGS, SET_CONFIG_ALLOWED_TAGS);
80202
81163
  _executeHooks(hooks.uponSanitizeElement, currentNode, {
80203
81164
  tagName,
80204
81165
  allowedTags: ALLOWED_TAGS
80205
81166
  });
80206
- if (SAFE_FOR_XML && currentNode.hasChildNodes() && !_isNode(currentNode.firstElementChild) && regExpTest(/<[/\w!]/g, currentNode.innerHTML) && regExpTest(/<[/\w!]/g, currentNode.textContent)) {
80207
- _forceRemove(currentNode);
80208
- return true;
80209
- }
80210
- if (SAFE_FOR_XML && currentNode.namespaceURI === HTML_NAMESPACE && tagName === "style" && _isNode(currentNode.firstElementChild)) {
80211
- _forceRemove(currentNode);
80212
- return true;
80213
- }
80214
- if (currentNode.nodeType === NODE_TYPE.progressingInstruction) {
80215
- _forceRemove(currentNode);
80216
- return true;
80217
- }
80218
- if (SAFE_FOR_XML && currentNode.nodeType === NODE_TYPE.comment && regExpTest(/<[/\w]/g, currentNode.data)) {
81167
+ if (_handleHookDetachedNode(currentNode, root2)) return true;
81168
+ if (_isUnsafeNode(currentNode, tagName)) {
80219
81169
  _forceRemove(currentNode);
80220
81170
  return true;
80221
81171
  }
80222
81172
  if (FORBID_TAGS[tagName] || !(EXTRA_ELEMENT_HANDLING.tagCheck instanceof Function && EXTRA_ELEMENT_HANDLING.tagCheck(tagName)) && !ALLOWED_TAGS[tagName]) {
80223
- if (!FORBID_TAGS[tagName] && _isBasicCustomElement(tagName)) {
80224
- if (CUSTOM_ELEMENT_HANDLING.tagNameCheck instanceof RegExp && regExpTest(CUSTOM_ELEMENT_HANDLING.tagNameCheck, tagName)) {
80225
- return false;
80226
- }
80227
- if (CUSTOM_ELEMENT_HANDLING.tagNameCheck instanceof Function && CUSTOM_ELEMENT_HANDLING.tagNameCheck(tagName)) {
80228
- return false;
80229
- }
80230
- }
80231
- if (KEEP_CONTENT && !FORBID_CONTENTS[tagName]) {
80232
- const parentNode = getParentNode(currentNode) || currentNode.parentNode;
80233
- const childNodes = getChildNodes(currentNode) || currentNode.childNodes;
80234
- if (childNodes && parentNode) {
80235
- const childCount = childNodes.length;
80236
- for (let i = childCount - 1; i >= 0; --i) {
80237
- const childClone = cloneNode(childNodes[i], true);
80238
- parentNode.insertBefore(childClone, getNextSibling(currentNode));
80239
- }
80240
- }
81173
+ const removed = _sanitizeDisallowedNode(currentNode, tagName, root2);
81174
+ if (removed === false) {
81175
+ _executeHooks(hooks.afterSanitizeElements, currentNode, null);
81176
+ if (_handleHookDetachedNode(currentNode, root2)) return true;
80241
81177
  }
80242
- _forceRemove(currentNode);
80243
- return true;
81178
+ return removed;
80244
81179
  }
80245
- const nt2 = getNodeType ? getNodeType(currentNode) : currentNode.nodeType;
80246
- if (nt2 === NODE_TYPE.element && !_checkValidNamespace(currentNode)) {
81180
+ if (_readNodeType(currentNode) === NODE_TYPE.element && !_checkValidNamespace(currentNode)) {
80247
81181
  _forceRemove(currentNode);
80248
81182
  return true;
80249
81183
  }
80250
- if ((tagName === "noscript" || tagName === "noembed" || tagName === "noframes") && regExpTest(/<\/no(script|embed|frames)/i, currentNode.innerHTML)) {
81184
+ if ((tagName === "noscript" || tagName === "noembed" || tagName === "noframes") && regExpTest(FALLBACK_TAG_CLOSE, currentNode.innerHTML)) {
80251
81185
  _forceRemove(currentNode);
80252
81186
  return true;
80253
81187
  }
80254
81188
  if (SAFE_FOR_TEMPLATES && currentNode.nodeType === NODE_TYPE.text) {
80255
- content = currentNode.textContent;
80256
- arrayForEach([MUSTACHE_EXPR$1, ERB_EXPR$1, TMPLIT_EXPR$1], (expr) => {
80257
- content = stringReplace(content, expr, " ");
80258
- });
81189
+ const content = _stripTemplateExpressions(currentNode.textContent);
80259
81190
  if (currentNode.textContent !== content) {
80260
- arrayPush(DOMPurify.removed, {
80261
- element: currentNode.cloneNode()
80262
- });
81191
+ arrayPush(DOMPurify.removed, { element: currentNode.cloneNode() });
80263
81192
  currentNode.textContent = content;
80264
81193
  }
80265
81194
  }
80266
81195
  _executeHooks(hooks.afterSanitizeElements, currentNode, null);
80267
- return false;
81196
+ return _handleHookDetachedNode(currentNode, root2);
80268
81197
  };
80269
81198
  const _isValidAttribute = function _isValidAttribute2(lcTag, lcName, value) {
80270
- if (FORBID_ATTR[lcName]) {
80271
- return false;
80272
- }
80273
- if (SANITIZE_DOM && (lcName === "id" || lcName === "name") && (value in document2 || value in formElement)) {
80274
- return false;
80275
- }
81199
+ if (FORBID_ATTR[lcName]) return false;
81200
+ if (_isPatchLinkageAttribute(lcName, lcTag)) return false;
81201
+ if (SANITIZE_DOM && (lcName === "id" || lcName === "name") && (value in document2 || value in formElement)) return false;
80276
81202
  const nameIsPermitted = ALLOWED_ATTR[lcName] || EXTRA_ELEMENT_HANDLING.attributeCheck instanceof Function && EXTRA_ELEMENT_HANDLING.attributeCheck(lcName, lcTag);
80277
- if (ALLOW_DATA_ATTR && !FORBID_ATTR[lcName] && regExpTest(DATA_ATTR$1, lcName)) ;
80278
- else if (ALLOW_ARIA_ATTR && regExpTest(ARIA_ATTR$1, lcName)) ;
80279
- else if (!nameIsPermitted || FORBID_ATTR[lcName]) {
80280
- if (
80281
- // First condition does a very basic check if a) it's basically a valid custom element tagname AND
80282
- // b) if the tagName passes whatever the user has configured for CUSTOM_ELEMENT_HANDLING.tagNameCheck
80283
- // and c) if the attribute name passes whatever the user has configured for CUSTOM_ELEMENT_HANDLING.attributeNameCheck
80284
- _isBasicCustomElement(lcTag) && (CUSTOM_ELEMENT_HANDLING.tagNameCheck instanceof RegExp && regExpTest(CUSTOM_ELEMENT_HANDLING.tagNameCheck, lcTag) || CUSTOM_ELEMENT_HANDLING.tagNameCheck instanceof Function && CUSTOM_ELEMENT_HANDLING.tagNameCheck(lcTag)) && (CUSTOM_ELEMENT_HANDLING.attributeNameCheck instanceof RegExp && regExpTest(CUSTOM_ELEMENT_HANDLING.attributeNameCheck, lcName) || CUSTOM_ELEMENT_HANDLING.attributeNameCheck instanceof Function && CUSTOM_ELEMENT_HANDLING.attributeNameCheck(lcName, lcTag)) || // Alternative, second condition checks if it's an `is`-attribute, AND
80285
- // the value passes whatever the user has configured for CUSTOM_ELEMENT_HANDLING.tagNameCheck
80286
- lcName === "is" && CUSTOM_ELEMENT_HANDLING.allowCustomizedBuiltInElements && (CUSTOM_ELEMENT_HANDLING.tagNameCheck instanceof RegExp && regExpTest(CUSTOM_ELEMENT_HANDLING.tagNameCheck, value) || CUSTOM_ELEMENT_HANDLING.tagNameCheck instanceof Function && CUSTOM_ELEMENT_HANDLING.tagNameCheck(value))
80287
- ) ;
80288
- else {
81203
+ if (ALLOW_DATA_ATTR && regExpTest(DATA_ATTR$1, lcName)) return true;
81204
+ if (ALLOW_ARIA_ATTR && regExpTest(ARIA_ATTR$1, lcName)) return true;
81205
+ if (!nameIsPermitted) return _isBasicCustomElement(lcTag) && _matchesNameCheck(CUSTOM_ELEMENT_HANDLING.tagNameCheck, lcTag) && _matchesNameCheck(CUSTOM_ELEMENT_HANDLING.attributeNameCheck, lcName, lcTag) || lcName === "is" && CUSTOM_ELEMENT_HANDLING.allowCustomizedBuiltInElements && _matchesNameCheck(CUSTOM_ELEMENT_HANDLING.tagNameCheck, value);
81206
+ if (URI_SAFE_ATTRIBUTES[lcName]) return true;
81207
+ if (regExpTest(IS_ALLOWED_URI$1, stringReplace(value, ATTR_WHITESPACE$1, ""))) return true;
81208
+ if ((lcName === "src" || lcName === "xlink:href" || lcName === "href") && lcTag !== "script" && stringIndexOf(value, "data:") === 0 && DATA_URI_TAGS[lcTag]) return true;
81209
+ if (ALLOW_UNKNOWN_PROTOCOLS && !regExpTest(IS_SCRIPT_OR_DATA$1, stringReplace(value, ATTR_WHITESPACE$1, ""))) return true;
81210
+ return !value;
81211
+ };
81212
+ const RESERVED_CUSTOM_ELEMENT_NAMES = addToSet({}, [
81213
+ "annotation-xml",
81214
+ "color-profile",
81215
+ "font-face",
81216
+ "font-face-format",
81217
+ "font-face-name",
81218
+ "font-face-src",
81219
+ "font-face-uri",
81220
+ "missing-glyph"
81221
+ ]);
81222
+ const _isBasicCustomElement = function _isBasicCustomElement2(tagName) {
81223
+ return !RESERVED_CUSTOM_ELEMENT_NAMES[stringToLowerCase(tagName)] && regExpTest(CUSTOM_ELEMENT$1, tagName);
81224
+ };
81225
+ const _applyTrustedTypesToAttribute = function _applyTrustedTypesToAttribute2(lcTag, lcName, namespaceURI, value) {
81226
+ if (trustedTypesPolicy && typeof trustedTypes === "object" && typeof trustedTypes.getAttributeType === "function" && !namespaceURI) switch (trustedTypes.getAttributeType(lcTag, lcName)) {
81227
+ case "TrustedHTML":
81228
+ return _createTrustedHTML(value);
81229
+ case "TrustedScriptURL":
81230
+ return _createTrustedScriptURL(value);
81231
+ }
81232
+ return value;
81233
+ };
81234
+ const _setAttributeValue = function _setAttributeValue2(currentNode, name, namespaceURI, value) {
81235
+ try {
81236
+ if (namespaceURI) currentNode.setAttributeNS(namespaceURI, name, value);
81237
+ else currentNode.setAttribute(name, value);
81238
+ if (_isClobbered(currentNode)) {
81239
+ _forceRemove(currentNode);
80289
81240
  return false;
80290
81241
  }
80291
- } else if (URI_SAFE_ATTRIBUTES[lcName]) ;
80292
- else if (regExpTest(IS_ALLOWED_URI$1, stringReplace(value, ATTR_WHITESPACE$1, ""))) ;
80293
- else if ((lcName === "src" || lcName === "xlink:href" || lcName === "href") && lcTag !== "script" && stringIndexOf(value, "data:") === 0 && DATA_URI_TAGS[lcTag]) ;
80294
- else if (ALLOW_UNKNOWN_PROTOCOLS && !regExpTest(IS_SCRIPT_OR_DATA$1, stringReplace(value, ATTR_WHITESPACE$1, ""))) ;
80295
- else if (value) {
81242
+ return true;
81243
+ } catch (_2) {
81244
+ _removeAttribute(name, currentNode);
80296
81245
  return false;
80297
- } else ;
80298
- return true;
81246
+ }
80299
81247
  };
80300
- const RESERVED_CUSTOM_ELEMENT_NAMES = addToSet({}, ["annotation-xml", "color-profile", "font-face", "font-face-format", "font-face-name", "font-face-src", "font-face-uri", "missing-glyph"]);
80301
- const _isBasicCustomElement = function _isBasicCustomElement2(tagName) {
80302
- return !RESERVED_CUSTOM_ELEMENT_NAMES[stringToLowerCase(tagName)] && regExpTest(CUSTOM_ELEMENT$1, tagName);
81248
+ const _isUnsafeAttributeValue = function _isUnsafeAttributeValue2(name, value) {
81249
+ if (SAFE_FOR_XML && regExpTest(/((--!?|])>)|<\/(style|script|title|xmp|textarea|noscript|iframe|noembed|noframes)/i, value)) return true;
81250
+ return stringToLowerCase(name) === "attributename" && stringMatch(value, "href") !== null;
80303
81251
  };
80304
- const _sanitizeAttributes = function _sanitizeAttributes2(currentNode) {
81252
+ const _sanitizeAttributes = function _sanitizeAttributes2(currentNode, root2) {
80305
81253
  _executeHooks(hooks.beforeSanitizeAttributes, currentNode, null);
81254
+ if (_handleHookDetachedNode(currentNode, root2)) return;
80306
81255
  const attributes2 = currentNode.attributes;
80307
- if (!attributes2 || _isClobbered(currentNode)) {
80308
- return;
80309
- }
81256
+ if (!attributes2 || _isClobbered(currentNode)) return;
81257
+ ALLOWED_ATTR = _forkSharedAllowlist(hooks.uponSanitizeAttribute, ALLOWED_ATTR, DEFAULT_ALLOWED_ATTR, SET_CONFIG_ALLOWED_ATTR);
80310
81258
  const hookEvent = {
80311
81259
  attrName: "",
80312
81260
  attrValue: "",
@@ -80315,12 +81263,14 @@ html body {
80315
81263
  forceKeepAttr: void 0
80316
81264
  };
80317
81265
  let l2 = attributes2.length;
81266
+ const lcTag = transformCaseFunc(currentNode.nodeName);
80318
81267
  while (l2--) {
80319
81268
  const attr = attributes2[l2];
80320
81269
  const name = attr.name, namespaceURI = attr.namespaceURI, attrValue = attr.value;
80321
81270
  const lcName = transformCaseFunc(name);
80322
81271
  const initValue = attrValue;
80323
81272
  let value = name === "value" ? initValue : stringTrim(initValue);
81273
+ let recreatedNamedProp = false;
80324
81274
  hookEvent.attrName = lcName;
80325
81275
  hookEvent.attrValue = value;
80326
81276
  hookEvent.keepAttr = true;
@@ -80328,71 +81278,35 @@ html body {
80328
81278
  _executeHooks(hooks.uponSanitizeAttribute, currentNode, hookEvent);
80329
81279
  value = hookEvent.attrValue;
80330
81280
  if (SANITIZE_NAMED_PROPS && (lcName === "id" || lcName === "name") && stringIndexOf(value, SANITIZE_NAMED_PROPS_PREFIX) !== 0) {
80331
- _removeAttribute(name, currentNode);
81281
+ _removeAttribute(name, currentNode, attr);
80332
81282
  value = SANITIZE_NAMED_PROPS_PREFIX + value;
81283
+ recreatedNamedProp = true;
80333
81284
  }
80334
- if (SAFE_FOR_XML && regExpTest(/((--!?|])>)|<\/(style|script|title|xmp|textarea|noscript|iframe|noembed|noframes)/i, value)) {
80335
- _removeAttribute(name, currentNode);
80336
- continue;
80337
- }
80338
- if (lcName === "attributename" && stringMatch(value, "href")) {
80339
- _removeAttribute(name, currentNode);
80340
- continue;
80341
- }
80342
- if (hookEvent.forceKeepAttr) {
81285
+ if (_isUnsafeAttributeValue(name, value)) {
81286
+ _removeAttribute(name, currentNode, attr);
80343
81287
  continue;
80344
81288
  }
81289
+ if (hookEvent.forceKeepAttr) continue;
80345
81290
  if (!hookEvent.keepAttr) {
80346
- _removeAttribute(name, currentNode);
81291
+ _removeAttribute(name, currentNode, attr);
80347
81292
  continue;
80348
81293
  }
80349
- if (!ALLOW_SELF_CLOSE_IN_ATTR && regExpTest(/\/>/i, value)) {
80350
- _removeAttribute(name, currentNode);
81294
+ if (!ALLOW_SELF_CLOSE_IN_ATTR && regExpTest(SELF_CLOSING_TAG, value)) {
81295
+ _removeAttribute(name, currentNode, attr);
80351
81296
  continue;
80352
81297
  }
80353
- if (SAFE_FOR_TEMPLATES) {
80354
- arrayForEach([MUSTACHE_EXPR$1, ERB_EXPR$1, TMPLIT_EXPR$1], (expr) => {
80355
- value = stringReplace(value, expr, " ");
80356
- });
80357
- }
80358
- const lcTag = transformCaseFunc(currentNode.nodeName);
81298
+ if (SAFE_FOR_TEMPLATES) value = _stripTemplateExpressions(value);
80359
81299
  if (!_isValidAttribute(lcTag, lcName, value)) {
80360
- _removeAttribute(name, currentNode);
81300
+ _removeAttribute(name, currentNode, attr);
80361
81301
  continue;
80362
81302
  }
80363
- if (trustedTypesPolicy && typeof trustedTypes === "object" && typeof trustedTypes.getAttributeType === "function") {
80364
- if (namespaceURI) ;
80365
- else {
80366
- switch (trustedTypes.getAttributeType(lcTag, lcName)) {
80367
- case "TrustedHTML": {
80368
- value = trustedTypesPolicy.createHTML(value);
80369
- break;
80370
- }
80371
- case "TrustedScriptURL": {
80372
- value = trustedTypesPolicy.createScriptURL(value);
80373
- break;
80374
- }
80375
- }
80376
- }
80377
- }
81303
+ value = _applyTrustedTypesToAttribute(lcTag, lcName, namespaceURI, value);
80378
81304
  if (value !== initValue) {
80379
- try {
80380
- if (namespaceURI) {
80381
- currentNode.setAttributeNS(namespaceURI, name, value);
80382
- } else {
80383
- currentNode.setAttribute(name, value);
80384
- }
80385
- if (_isClobbered(currentNode)) {
80386
- _forceRemove(currentNode);
80387
- } else {
80388
- arrayPop(DOMPurify.removed);
80389
- }
80390
- } catch (_2) {
80391
- _removeAttribute(name, currentNode);
80392
- }
81305
+ if (_setAttributeValue(currentNode, name, namespaceURI, value) && recreatedNamedProp) arrayPop(DOMPurify.removed);
80393
81306
  }
80394
81307
  }
80395
81308
  _executeHooks(hooks.afterSanitizeAttributes, currentNode, null);
81309
+ _handleHookDetachedNode(currentNode, root2);
80396
81310
  };
80397
81311
  const _sanitizeShadowDOM2 = function _sanitizeShadowDOM(fragment) {
80398
81312
  let shadowNode = null;
@@ -80400,33 +81314,58 @@ html body {
80400
81314
  _executeHooks(hooks.beforeSanitizeShadowDOM, fragment, null);
80401
81315
  while (shadowNode = shadowIterator.nextNode()) {
80402
81316
  _executeHooks(hooks.uponSanitizeShadowNode, shadowNode, null);
80403
- _sanitizeElements(shadowNode);
80404
- _sanitizeAttributes(shadowNode);
80405
- if (_isDocumentFragment(shadowNode.content)) {
80406
- _sanitizeShadowDOM2(shadowNode.content);
81317
+ _sanitizeElements(shadowNode, fragment);
81318
+ _sanitizeAttributes(shadowNode, fragment);
81319
+ if (_isDocumentFragment(shadowNode.content)) _sanitizeShadowDOM2(shadowNode.content);
81320
+ if (_readNodeType(shadowNode) === NODE_TYPE.element) {
81321
+ const innerSr = getShadowRoot2(shadowNode);
81322
+ if (_isDocumentFragment(innerSr)) {
81323
+ _sanitizeAttachedShadowRoots(innerSr);
81324
+ _sanitizeShadowDOM2(innerSr);
81325
+ }
80407
81326
  }
80408
81327
  }
81328
+ if (SAFE_FOR_TEMPLATES) _scrubOwnCharacterData(fragment);
80409
81329
  _executeHooks(hooks.afterSanitizeShadowDOM, fragment, null);
80410
81330
  };
80411
- const _sanitizeAttachedShadowRoots2 = function _sanitizeAttachedShadowRoots(root2) {
80412
- const nodeType = getNodeType ? getNodeType(root2) : root2.nodeType;
80413
- if (nodeType === NODE_TYPE.element) {
80414
- const sr = getShadowRoot2 ? getShadowRoot2(root2) : root2.shadowRoot;
80415
- if (_isDocumentFragment(sr)) {
80416
- _sanitizeAttachedShadowRoots2(sr);
80417
- _sanitizeShadowDOM2(sr);
81331
+ const _sanitizeAttachedShadowRoots = function _sanitizeAttachedShadowRoots2(root2) {
81332
+ const stack2 = [{
81333
+ node: root2,
81334
+ shadow: null
81335
+ }];
81336
+ while (stack2.length > 0) {
81337
+ const item = stack2.pop();
81338
+ if (item.shadow) {
81339
+ _sanitizeShadowDOM2(item.shadow);
81340
+ continue;
81341
+ }
81342
+ const node2 = item.node;
81343
+ const isElement = _readNodeType(node2) === NODE_TYPE.element;
81344
+ const childNodes = getChildNodes(node2);
81345
+ if (childNodes) for (let i = childNodes.length - 1; i >= 0; --i) stack2.push({
81346
+ node: childNodes[i],
81347
+ shadow: null
81348
+ });
81349
+ if (isElement) {
81350
+ const rootName = getNodeName ? getNodeName(node2) : null;
81351
+ if (typeof rootName === "string" && transformCaseFunc(rootName) === "template") {
81352
+ const content = node2.content;
81353
+ if (_isDocumentFragment(content)) stack2.push({
81354
+ node: content,
81355
+ shadow: null
81356
+ });
81357
+ }
81358
+ }
81359
+ if (isElement) {
81360
+ const sr = getShadowRoot2(node2);
81361
+ if (_isDocumentFragment(sr)) stack2.push({
81362
+ node: null,
81363
+ shadow: sr
81364
+ }, {
81365
+ node: sr,
81366
+ shadow: null
81367
+ });
80418
81368
  }
80419
- }
80420
- const childNodes = getChildNodes ? getChildNodes(root2) : root2.childNodes;
80421
- if (!childNodes) {
80422
- return;
80423
- }
80424
- const snapshot = [];
80425
- arrayForEach(childNodes, (child) => {
80426
- arrayPush(snapshot, child);
80427
- });
80428
- for (const child of snapshot) {
80429
- _sanitizeAttachedShadowRoots2(child);
80430
81369
  }
80431
81370
  };
80432
81371
  DOMPurify.sanitize = function(dirty) {
@@ -80436,127 +81375,118 @@ html body {
80436
81375
  let currentNode = null;
80437
81376
  let returnNode = null;
80438
81377
  IS_EMPTY_INPUT = !dirty;
80439
- if (IS_EMPTY_INPUT) {
80440
- dirty = "<!-->";
80441
- }
81378
+ if (IS_EMPTY_INPUT) dirty = "<!-->";
80442
81379
  if (typeof dirty !== "string" && !_isNode(dirty)) {
80443
81380
  dirty = stringifyValue(dirty);
80444
- if (typeof dirty !== "string") {
80445
- throw typeErrorCreate("dirty is not a string, aborting");
80446
- }
80447
- }
80448
- if (!DOMPurify.isSupported) {
80449
- return dirty;
80450
- }
80451
- if (!SET_CONFIG) {
80452
- _parseConfig(cfg);
80453
- }
81381
+ if (typeof dirty !== "string") throw typeErrorCreate("dirty is not a string, aborting");
81382
+ }
81383
+ if (!DOMPurify.isSupported) return dirty;
81384
+ if (SET_CONFIG) {
81385
+ ALLOWED_TAGS = SET_CONFIG_ALLOWED_TAGS;
81386
+ ALLOWED_ATTR = SET_CONFIG_ALLOWED_ATTR;
81387
+ } else _parseConfig(cfg);
81388
+ if (hooks.uponSanitizeElement.length > 0 || hooks.uponSanitizeAttribute.length > 0) ALLOWED_TAGS = clone(ALLOWED_TAGS);
81389
+ if (hooks.uponSanitizeAttribute.length > 0) ALLOWED_ATTR = clone(ALLOWED_ATTR);
80454
81390
  DOMPurify.removed = [];
80455
- if (typeof dirty === "string") {
80456
- IN_PLACE = false;
80457
- }
80458
- if (IN_PLACE) {
80459
- const nn = getNodeName ? getNodeName(dirty) : dirty.nodeName;
81391
+ const inPlace = IN_PLACE && typeof dirty !== "string" && _isNode(dirty);
81392
+ let inPlaceNodes = [];
81393
+ const outerVisited = IN_PLACE_VISITED;
81394
+ if (inPlace) {
81395
+ _neutralizePatchLinkage(dirty);
81396
+ const nn = _readNodeName(dirty);
80460
81397
  if (typeof nn === "string") {
80461
81398
  const tagName = transformCaseFunc(nn);
80462
81399
  if (!ALLOWED_TAGS[tagName] || FORBID_TAGS[tagName]) {
81400
+ _neutralizeRoot(dirty);
80463
81401
  throw typeErrorCreate("root node is forbidden and cannot be sanitized in-place");
80464
81402
  }
80465
81403
  }
80466
81404
  if (_isClobbered(dirty)) {
81405
+ _neutralizeRoot(dirty);
80467
81406
  throw typeErrorCreate("root node is clobbered and cannot be sanitized in-place");
80468
81407
  }
80469
- _sanitizeAttachedShadowRoots2(dirty);
81408
+ inPlaceNodes = _collectLiveNodes(dirty);
81409
+ IN_PLACE_VISITED = setCreate();
80470
81410
  } else if (_isNode(dirty)) {
80471
81411
  body = _initDocument("<!---->");
80472
81412
  importedNode = body.ownerDocument.importNode(dirty, true);
80473
- if (importedNode.nodeType === NODE_TYPE.element && importedNode.nodeName === "BODY") {
80474
- body = importedNode;
80475
- } else if (importedNode.nodeName === "HTML") {
80476
- body = importedNode;
80477
- } else {
80478
- body.appendChild(importedNode);
80479
- }
80480
- _sanitizeAttachedShadowRoots2(importedNode);
81413
+ if (importedNode.nodeType === NODE_TYPE.element && importedNode.nodeName === "BODY") body = importedNode;
81414
+ else if (importedNode.nodeName === "HTML") body = importedNode;
81415
+ else body.appendChild(importedNode);
81416
+ _sanitizeAttachedShadowRoots(body);
80481
81417
  } else {
80482
- if (!RETURN_DOM && !SAFE_FOR_TEMPLATES && !WHOLE_DOCUMENT && // eslint-disable-next-line unicorn/prefer-includes
80483
- dirty.indexOf("<") === -1) {
80484
- return trustedTypesPolicy && RETURN_TRUSTED_TYPE ? trustedTypesPolicy.createHTML(dirty) : dirty;
80485
- }
81418
+ if (!RETURN_DOM && !SAFE_FOR_TEMPLATES && !WHOLE_DOCUMENT && dirty.indexOf("<") === -1) return trustedTypesPolicy && RETURN_TRUSTED_TYPE ? _createTrustedHTML(dirty) : dirty;
80486
81419
  body = _initDocument(dirty);
80487
- if (!body) {
80488
- return RETURN_DOM ? null : RETURN_TRUSTED_TYPE ? emptyHTML : "";
80489
- }
81420
+ if (!body) return RETURN_DOM ? null : RETURN_TRUSTED_TYPE ? emptyHTML : "";
80490
81421
  }
80491
- if (body && FORCE_BODY) {
80492
- _forceRemove(body.firstChild);
80493
- }
80494
- const nodeIterator = _createNodeIterator(IN_PLACE ? dirty : body);
80495
- while (currentNode = nodeIterator.nextNode()) {
80496
- _sanitizeElements(currentNode);
80497
- _sanitizeAttributes(currentNode);
80498
- if (_isDocumentFragment(currentNode.content)) {
80499
- _sanitizeShadowDOM2(currentNode.content);
81422
+ if (body && FORCE_BODY) _forceRemove(body.firstChild);
81423
+ const walkRoot = inPlace ? dirty : body;
81424
+ try {
81425
+ if (inPlace) _sanitizeAttachedShadowRoots(dirty);
81426
+ const nodeIterator = _createNodeIterator(walkRoot);
81427
+ while (currentNode = nodeIterator.nextNode()) {
81428
+ _sanitizeElements(currentNode, walkRoot);
81429
+ _sanitizeAttributes(currentNode, walkRoot);
81430
+ if (_isDocumentFragment(currentNode.content)) _sanitizeShadowDOM2(currentNode.content);
81431
+ }
81432
+ if (inPlace) _sanitizeUnvisitedNodes(dirty, inPlaceNodes);
81433
+ } catch (error) {
81434
+ if (inPlace) {
81435
+ _neutralizeRoot(dirty);
81436
+ _neutralizeDiscarded(dirty, inPlaceNodes);
80500
81437
  }
81438
+ throw error;
81439
+ } finally {
81440
+ IN_PLACE_VISITED = outerVisited;
80501
81441
  }
80502
- if (IN_PLACE) {
80503
- if (SAFE_FOR_TEMPLATES) {
80504
- _scrubTemplateExpressions(dirty);
80505
- }
81442
+ if (inPlace) {
81443
+ if (_neutralizeDiscarded(dirty, inPlaceNodes)) throw typeErrorCreate("a node selected for removal could not be safely returned; refusing to sanitize in place");
81444
+ if (SAFE_FOR_TEMPLATES) _scrubTemplateExpressions2(dirty);
80506
81445
  return dirty;
80507
81446
  }
80508
81447
  if (RETURN_DOM) {
80509
- if (SAFE_FOR_TEMPLATES) {
80510
- _scrubTemplateExpressions(body);
80511
- }
81448
+ if (SAFE_FOR_TEMPLATES) _scrubTemplateExpressions2(body);
80512
81449
  if (RETURN_DOM_FRAGMENT) {
80513
81450
  returnNode = createDocumentFragment.call(body.ownerDocument);
80514
- while (body.firstChild) {
80515
- returnNode.appendChild(body.firstChild);
80516
- }
80517
- } else {
80518
- returnNode = body;
80519
- }
80520
- if (ALLOWED_ATTR.shadowroot || ALLOWED_ATTR.shadowrootmode) {
80521
- returnNode = importNode.call(originalDocument, returnNode, true);
80522
- }
81451
+ while (body.firstChild) returnNode.appendChild(body.firstChild);
81452
+ } else returnNode = body;
81453
+ if (ALLOWED_ATTR.shadowroot || ALLOWED_ATTR.shadowrootmode) returnNode = importNode.call(originalDocument, returnNode, true);
80523
81454
  return returnNode;
80524
81455
  }
80525
81456
  let serializedHTML = WHOLE_DOCUMENT ? body.outerHTML : body.innerHTML;
80526
- if (WHOLE_DOCUMENT && ALLOWED_TAGS["!doctype"] && body.ownerDocument && body.ownerDocument.doctype && body.ownerDocument.doctype.name && regExpTest(DOCTYPE_NAME, body.ownerDocument.doctype.name)) {
80527
- serializedHTML = "<!DOCTYPE " + body.ownerDocument.doctype.name + ">\n" + serializedHTML;
80528
- }
80529
- if (SAFE_FOR_TEMPLATES) {
80530
- arrayForEach([MUSTACHE_EXPR$1, ERB_EXPR$1, TMPLIT_EXPR$1], (expr) => {
80531
- serializedHTML = stringReplace(serializedHTML, expr, " ");
80532
- });
80533
- }
80534
- return trustedTypesPolicy && RETURN_TRUSTED_TYPE ? trustedTypesPolicy.createHTML(serializedHTML) : serializedHTML;
81457
+ if (WHOLE_DOCUMENT && ALLOWED_TAGS["!doctype"] && body.ownerDocument && body.ownerDocument.doctype && body.ownerDocument.doctype.name && regExpTest(DOCTYPE_NAME, body.ownerDocument.doctype.name)) serializedHTML = "<!DOCTYPE " + body.ownerDocument.doctype.name + ">\n" + serializedHTML;
81458
+ if (SAFE_FOR_TEMPLATES) serializedHTML = _stripTemplateExpressions(serializedHTML);
81459
+ return trustedTypesPolicy && RETURN_TRUSTED_TYPE ? _createTrustedHTML(serializedHTML) : serializedHTML;
80535
81460
  };
80536
81461
  DOMPurify.setConfig = function() {
80537
81462
  let cfg = arguments.length > 0 && arguments[0] !== void 0 ? arguments[0] : {};
80538
81463
  _parseConfig(cfg);
80539
81464
  SET_CONFIG = true;
81465
+ SET_CONFIG_ALLOWED_TAGS = ALLOWED_TAGS;
81466
+ SET_CONFIG_ALLOWED_ATTR = ALLOWED_ATTR;
80540
81467
  };
80541
81468
  DOMPurify.clearConfig = function() {
80542
81469
  CONFIG = null;
80543
81470
  SET_CONFIG = false;
81471
+ SET_CONFIG_ALLOWED_TAGS = null;
81472
+ SET_CONFIG_ALLOWED_ATTR = null;
81473
+ trustedTypesPolicy = defaultTrustedTypesPolicy;
81474
+ emptyHTML = "";
80544
81475
  };
80545
81476
  DOMPurify.isValidAttribute = function(tag, attr, value) {
80546
- if (!CONFIG) {
80547
- _parseConfig({});
80548
- }
81477
+ if (!CONFIG) _parseConfig({});
80549
81478
  const lcTag = transformCaseFunc(tag);
80550
81479
  const lcName = transformCaseFunc(attr);
81480
+ if (typeof value === "string" && (_isUnsafeAttributeValue(attr, value) || !ALLOW_SELF_CLOSE_IN_ATTR && regExpTest(SELF_CLOSING_TAG, value))) return false;
80551
81481
  return _isValidAttribute(lcTag, lcName, value);
80552
81482
  };
80553
81483
  DOMPurify.addHook = function(entryPoint, hookFunction) {
80554
- if (typeof hookFunction !== "function") {
80555
- return;
80556
- }
81484
+ if (typeof hookFunction !== "function") return;
81485
+ if (!objectHasOwnProperty(hooks, entryPoint)) return;
80557
81486
  arrayPush(hooks[entryPoint], hookFunction);
80558
81487
  };
80559
81488
  DOMPurify.removeHook = function(entryPoint, hookFunction) {
81489
+ if (!objectHasOwnProperty(hooks, entryPoint)) return;
80560
81490
  if (hookFunction !== void 0) {
80561
81491
  const index2 = arrayLastIndexOf(hooks[entryPoint], hookFunction);
80562
81492
  return index2 === -1 ? void 0 : arraySplice(hooks[entryPoint], index2, 1)[0];
@@ -80564,6 +81494,7 @@ html body {
80564
81494
  return arrayPop(hooks[entryPoint]);
80565
81495
  };
80566
81496
  DOMPurify.removeHooks = function(entryPoint) {
81497
+ if (!objectHasOwnProperty(hooks, entryPoint)) return;
80567
81498
  hooks[entryPoint] = [];
80568
81499
  };
80569
81500
  DOMPurify.removeAllHooks = function() {
@@ -80571,7 +81502,7 @@ html body {
80571
81502
  };
80572
81503
  return DOMPurify;
80573
81504
  }
80574
- var purify = createDOMPurify();
81505
+ var purify_default = createDOMPurify();
80575
81506
  const ReferencesTable = ({
80576
81507
  data,
80577
81508
  referenceIndexMap,
@@ -80598,7 +81529,7 @@ html body {
80598
81529
  {
80599
81530
  id: `col-reference-${s.id}`,
80600
81531
  dangerouslySetInnerHTML: {
80601
- __html: linkifyHtml(purify.sanitize(s.citation))
81532
+ __html: linkifyHtml(purify_default.sanitize(s.citation))
80602
81533
  }
80603
81534
  }
80604
81535
  ),
@@ -80774,7 +81705,7 @@ html body {
80774
81705
  hasRequiredHighcharts = 1;
80775
81706
  (function(module2, exports2) {
80776
81707
  !/**
80777
- * Highcharts JS v12.6.0 (2026-04-13)
81708
+ * Highcharts JS v12.6.2 (2026-09-21)
80778
81709
  * @module highcharts/highcharts
80779
81710
  *
80780
81711
  * (c) 2009-2026 Highsoft AS
@@ -80792,7 +81723,7 @@ html body {
80792
81723
  for (var i10 in e10) I2.o(e10, i10) && !I2.o(t10, i10) && Object.defineProperty(t10, i10, { enumerable: true, get: e10[i10] });
80793
81724
  }, I2.o = (t10, e10) => Object.prototype.hasOwnProperty.call(t10, e10);
80794
81725
  var D2 = {};
80795
- I2.d(D2, { default: () => on }), (a = f || (f = {})).SVG_NS = "http://www.w3.org/2000/svg", a.product = "Highcharts", a.version = "12.6.0", a.win = "u" > typeof window ? window : {}, a.doc = a.win.document, a.svg = !!((_c = (_b2 = (_a2 = a.doc) == null ? void 0 : _a2.createElementNS) == null ? void 0 : _b2.call(_a2, a.SVG_NS, "svg")) == null ? void 0 : _c.createSVGRect), a.pageLang = (_f = (_e2 = (_d = a.doc) == null ? void 0 : _d.documentElement) == null ? void 0 : _e2.closest("[lang]")) == null ? void 0 : _f.lang, a.userAgent = ((_g = a.win.navigator) == null ? void 0 : _g.userAgent) || "", a.isChrome = a.win.chrome, a.isFirefox = -1 !== a.userAgent.indexOf("Firefox"), a.isMS = /(edge|msie|trident)/i.test(a.userAgent) && !a.win.opera, a.isSafari = !a.isChrome && -1 !== a.userAgent.indexOf("Safari"), a.isTouchDevice = /(Mobile|Android|Windows Phone)/.test(a.userAgent), a.isWebKit = -1 !== a.userAgent.indexOf("AppleWebKit"), a.deg2rad = 2 * Math.PI / 360, a.marginNames = ["plotTop", "marginRight", "marginBottom", "plotLeft"], a.noop = function() {
81726
+ I2.d(D2, { default: () => on }), (a = f || (f = {})).SVG_NS = "http://www.w3.org/2000/svg", a.product = "Highcharts", a.version = "12.6.2", a.win = "u" > typeof window ? window : {}, a.doc = a.win.document, a.svg = !!((_c = (_b2 = (_a2 = a.doc) == null ? void 0 : _a2.createElementNS) == null ? void 0 : _b2.call(_a2, a.SVG_NS, "svg")) == null ? void 0 : _c.createSVGRect), a.pageLang = (_f = (_e2 = (_d = a.doc) == null ? void 0 : _d.documentElement) == null ? void 0 : _e2.closest("[lang]")) == null ? void 0 : _f.lang, a.userAgent = ((_g = a.win.navigator) == null ? void 0 : _g.userAgent) || "", a.isChrome = a.win.chrome, a.isFirefox = -1 !== a.userAgent.indexOf("Firefox"), a.isMS = /(edge|msie|trident)/i.test(a.userAgent) && !a.win.opera, a.isSafari = !a.isChrome && -1 !== a.userAgent.indexOf("Safari"), a.isTouchDevice = /(Mobile|Android|Windows Phone)/.test(a.userAgent), a.isWebKit = -1 !== a.userAgent.indexOf("AppleWebKit"), a.deg2rad = 2 * Math.PI / 360, a.marginNames = ["plotTop", "marginRight", "marginBottom", "plotLeft"], a.noop = function() {
80796
81727
  }, a.supportsPassiveEvents = (function() {
80797
81728
  let t10 = false;
80798
81729
  if (!a.isMS) {
@@ -80857,11 +81788,11 @@ html body {
80857
81788
  s10 !== e10 && (s10 == null ? void 0 : s10.destroy) && s10.destroy(), ((s10 == null ? void 0 : s10.destroy) || !i10) && delete t10[o3];
80858
81789
  });
80859
81790
  }
80860
- function Z2(t10) {
81791
+ function _2(t10) {
80861
81792
  var _a3;
80862
81793
  (_a3 = t10 == null ? void 0 : t10.parentElement) == null ? void 0 : _a3.removeChild(t10);
80863
81794
  }
80864
- function _2(t10, e10, i10, s10) {
81795
+ function Z2(t10, e10, i10, s10) {
80865
81796
  let o3 = {};
80866
81797
  return !(function t11(e11, o4, r3, a2) {
80867
81798
  let n3 = i10 ? o4 : e11;
@@ -81280,7 +82211,7 @@ html body {
81280
82211
  } }, { regex: /^#([a-f0-9]{2})([a-f0-9]{2})([a-f0-9]{2})([a-f0-9]{2})?$/i, parse: function(t10) {
81281
82212
  return [tv(t10[1], 16), tv(t10[2], 16), tv(t10[3], 16), V2(t10[4]) ? tv(t10[4], 16) / 255 : 1];
81282
82213
  } }], tU.useColorMix = (_h = tj.CSS) == null ? void 0 : _h.supports("color", "color-mix(in srgb,red,blue 9%)"), tU.None = new tU("");
81283
- let { parse: tZ } = tU, { win: t_ } = B2;
82214
+ let { parse: t_ } = tU, { win: tZ } = B2;
81284
82215
  class tK {
81285
82216
  constructor(t10, e10, i10) {
81286
82217
  this.pos = NaN, this.options = e10, this.elem = t10, this.prop = i10;
@@ -81306,7 +82237,7 @@ html body {
81306
82237
  run(t10, e10, i10) {
81307
82238
  let s10 = this, o3 = s10.options, r3 = function(t11) {
81308
82239
  return !r3.stopped && s10.step(t11);
81309
- }, a2 = t_.requestAnimationFrame || function(t11) {
82240
+ }, a2 = tZ.requestAnimationFrame || function(t11) {
81310
82241
  setTimeout(t11, 13);
81311
82242
  }, n3 = function() {
81312
82243
  for (let t11 = 0; t11 < tK.timers.length; t11++) tK.timers[t11]() || tK.timers.splice(t11--, 1);
@@ -81360,7 +82291,7 @@ html body {
81360
82291
  tK.prototype.strokeSetter.apply(this, arguments);
81361
82292
  }
81362
82293
  strokeSetter() {
81363
- this.elem.attr(this.prop, tZ(this.start).tweenTo(tZ(this.end), this.pos), void 0, true);
82294
+ this.elem.attr(this.prop, t_(this.start).tweenTo(t_(this.end), this.pos), void 0, true);
81364
82295
  }
81365
82296
  }
81366
82297
  function tq(t10) {
@@ -81389,7 +82320,7 @@ html body {
81389
82320
  static filterUserAttributes(t10) {
81390
82321
  return tm(t10, (e10, i10) => {
81391
82322
  let s10 = true;
81392
- -1 === t6.allowedAttributes.indexOf(i10) && (s10 = false), -1 !== ["background", "dynsrc", "href", "lowsrc", "src"].indexOf(i10) && (s10 = td(e10) && t6.allowedReferences.some((t11) => 0 === e10.indexOf(t11))), s10 || (tE(33, false, void 0, { "Invalid attribute in config": `${i10}` }), delete t10[i10]), td(e10) && t10[i10] && (t10[i10] = e10.replace(/</g, "&lt;"));
82323
+ -1 === t6.allowedAttributes.indexOf(i10) && (s10 = false), -1 !== ["background", "dynsrc", "href", "lowsrc", "src", "xlink:href"].indexOf(i10) && (s10 = td(e10) && t6.allowedReferences.some((t11) => 0 === e10.indexOf(t11))), s10 || (tE(33, false, void 0, { "Invalid attribute in config": `${i10}` }), delete t10[i10]), td(e10) && t10[i10] && (t10[i10] = e10.replace(/</g, "&lt;"));
81393
82324
  }), t10;
81394
82325
  }
81395
82326
  static parseStyle(t10) {
@@ -81426,11 +82357,12 @@ html body {
81426
82357
  try {
81427
82358
  e10 = new DOMParser().parseFromString(t3 ? t3.createHTML(t10) : t10, "text/html");
81428
82359
  } catch {
82360
+ try {
82361
+ e10 = new DOMParser().parseFromString(t10, "text/html");
82362
+ } catch {
82363
+ }
81429
82364
  }
81430
- if (!e10) {
81431
- let i11 = Y2("div");
81432
- i11.innerHTML = t10, e10 = { body: i11 };
81433
- }
82365
+ e10 || ((e10 = B2.doc.implementation.createHTMLDocument("")).body.innerHTML = t10);
81434
82366
  let s10 = (t11, e11) => {
81435
82367
  let i11 = t11.nodeName.toLowerCase(), o3 = { tagName: i11 };
81436
82368
  "#text" === i11 && (o3.textContent = t11.textContent || "");
@@ -82071,7 +83003,7 @@ html body {
82071
83003
  let n3, h2;
82072
83004
  this.x = 0, this.y = 0;
82073
83005
  const l3 = this.createElement("svg").attr({ version: "1.1", class: "highcharts-root" }), d3 = l3.element;
82074
- a2 || l3.css(this.getStyle(s10 || {})), t10.appendChild(d3), X2(t10, "dir", "ltr"), -1 === t10.innerHTML.indexOf("xmlns") && X2(d3, "xmlns", this.SVG_NS), this.box = d3, this.boxWrapper = l3, this.alignedObjects = [], this.url = this.getReferenceURL(), this.createElement("desc").add().element.appendChild(eO.createTextNode("Created with Highcharts 12.6.0")), this.defs = this.createElement("defs").add(), this.allowHTML = r3, this.forExport = o3, this.styledMode = a2, this.gradients = {}, this.cache = {}, this.cacheKeys = [], this.asyncCounter = 0, this.rootFontSize = l3.getStyle("font-size"), this.setSize(e10, i10, false), eE && t10.getBoundingClientRect && ((n3 = function() {
83006
+ a2 || l3.css(this.getStyle(s10 || {})), t10.appendChild(d3), X2(t10, "dir", "ltr"), -1 === t10.innerHTML.indexOf("xmlns") && X2(d3, "xmlns", this.SVG_NS), this.box = d3, this.boxWrapper = l3, this.alignedObjects = [], this.url = this.getReferenceURL(), this.createElement("desc").add().element.appendChild(eO.createTextNode("Created with Highcharts 12.6.2")), this.defs = this.createElement("defs").add(), this.allowHTML = r3, this.forExport = o3, this.styledMode = a2, this.gradients = {}, this.cache = {}, this.cacheKeys = [], this.asyncCounter = 0, this.rootFontSize = l3.getStyle("font-size"), this.setSize(e10, i10, false), eE && t10.getBoundingClientRect && ((n3 = function() {
82075
83007
  $2(t10, { left: 0, top: 0 }), h2 = t10.getBoundingClientRect(), $2(t10, { left: Math.ceil(h2.left) - h2.left + "px", top: Math.ceil(h2.top) - h2.top + "px" });
82076
83008
  })(), this.unSubPixelFix = R(eR, "resize", n3));
82077
83009
  }
@@ -82355,7 +83287,7 @@ html body {
82355
83287
  t10.eventOptions[i10] !== e11 && (t10.eventOptions[i10] && (tS(t10, i10, t10.eventOptions[i10]), delete t10.eventOptions[i10]), tp(e11) && (t10.eventOptions[i10] = e11, R(t10, i10, e11, { order: 0 })));
82356
83288
  });
82357
83289
  };
82358
- let eV = b2, { deg2rad: eU } = B2, eZ = class {
83290
+ let eV = b2, { deg2rad: eU } = B2, e_ = class {
82359
83291
  constructor(t10, e10, i10, s10, o3) {
82360
83292
  this.isNew = true, this.isNewLabel = true, this.axis = t10, this.pos = e10, this.type = i10 || "", this.parameters = o3 || {}, this.tickmarkOffset = this.parameters.tickmarkOffset, this.options = this.parameters.options, Q2(this, "init"), i10 || s10 || this.addLabel();
82361
83293
  }
@@ -82424,7 +83356,7 @@ html body {
82424
83356
  let t10 = this.label, e10 = this.axis;
82425
83357
  t10 && !this.isNew && (t10.animate({ opacity: 0 }, void 0, t10.destroy), delete this.label), e10.isDirty = true, this.label = this.movedLabel, delete this.movedLabel;
82426
83358
  }
82427
- }, { animObject: e_ } = tQ, { xAxis: eK, yAxis: eq2 } = e$, { defaultOptions: eJ } = tY, { registerEventOptions: eQ } = eV, { deg2rad: e0 } = B2, e1 = (t10, e10) => tf(e10, void 0, void 0, tb(t10.options.allowDecimals, e10 < 0.5 || void 0 !== t10.tickAmount), !!t10.tickAmount);
83359
+ }, { animObject: eZ } = tQ, { xAxis: eK, yAxis: eq2 } = e$, { defaultOptions: eJ } = tY, { registerEventOptions: eQ } = eV, { deg2rad: e0 } = B2, e1 = (t10, e10) => tf(e10, void 0, void 0, tb(t10.options.allowDecimals, e10 < 0.5 || void 0 !== t10.tickAmount), !!t10.tickAmount);
82428
83360
  q2(eJ, { xAxis: eK, yAxis: tu(eK, eq2) });
82429
83361
  class e22 {
82430
83362
  constructor(t10, e10, i10) {
@@ -82764,7 +83696,7 @@ html body {
82764
83696
  }
82765
83697
  generateTick(t10) {
82766
83698
  let e10 = this.ticks;
82767
- e10[t10] ? e10[t10].addLabel() : e10[t10] = new eZ(this, t10);
83699
+ e10[t10] ? e10[t10].addLabel() : e10[t10] = new e_(this, t10);
82768
83700
  }
82769
83701
  createGroups() {
82770
83702
  let { axisParent: t10, chart: e10, coll: i10, options: s10 } = this, o3 = e10.renderer, r3 = (e11, r4, a2) => o3.g(e11).attr({ zIndex: a2 }).addClass(`highcharts-${i10.toLowerCase()}${r4} ` + (this.isRadial ? `highcharts-radial-axis${r4} ` : "") + (s10.className || "")).add(t10);
@@ -82799,15 +83731,15 @@ html body {
82799
83731
  }
82800
83732
  renderMinorTick(t10, e10) {
82801
83733
  let i10 = this.minorTicks;
82802
- i10[t10] || (i10[t10] = new eZ(this, t10, "minor")), e10 && i10[t10].isNew && i10[t10].render(null, true), i10[t10].render(null, false, 1);
83734
+ i10[t10] || (i10[t10] = new e_(this, t10, "minor")), e10 && i10[t10].isNew && i10[t10].render(null, true), i10[t10].render(null, false, 1);
82803
83735
  }
82804
83736
  renderTick(t10, e10, i10) {
82805
83737
  var _a3;
82806
83738
  let s10 = this.isLinked, o3 = this.ticks;
82807
- (!s10 || t10 >= this.min && t10 <= this.max || ((_a3 = this.grid) == null ? void 0 : _a3.isColumn)) && (o3[t10] || (o3[t10] = new eZ(this, t10)), i10 && o3[t10].isNew && o3[t10].render(e10, true, -1), o3[t10].render(e10));
83739
+ (!s10 || t10 >= this.min && t10 <= this.max || ((_a3 = this.grid) == null ? void 0 : _a3.isColumn)) && (o3[t10] || (o3[t10] = new e_(this, t10)), i10 && o3[t10].isNew && o3[t10].render(e10, true, -1), o3[t10].render(e10));
82808
83740
  }
82809
83741
  render() {
82810
- let t10, e10, i10 = this, s10 = i10.chart, o3 = i10.logarithmic, r3 = s10.renderer, a2 = i10.options, n3 = i10.isLinked, h2 = i10.tickPositions, l3 = i10.axisTitle, d3 = i10.ticks, c2 = i10.minorTicks, p2 = i10.alternateBands, g3 = a2.stackLabels, u2 = a2.alternateGridColor, f2 = a2.crossing, m3 = i10.tickmarkOffset, x3 = i10.axisLine, y3 = i10.showAxis, b3 = e_(r3.globalAnimation);
83742
+ let t10, e10, i10 = this, s10 = i10.chart, o3 = i10.logarithmic, r3 = s10.renderer, a2 = i10.options, n3 = i10.isLinked, h2 = i10.tickPositions, l3 = i10.axisTitle, d3 = i10.ticks, c2 = i10.minorTicks, p2 = i10.alternateBands, g3 = a2.stackLabels, u2 = a2.alternateGridColor, f2 = a2.crossing, m3 = i10.tickmarkOffset, x3 = i10.axisLine, y3 = i10.showAxis, b3 = eZ(r3.globalAnimation);
82811
83743
  if (i10.labelEdge.length = 0, i10.overlap = false, [d3, c2, p2].forEach(function(t11) {
82812
83744
  tm(t11, function(t12) {
82813
83745
  t12.isActive = false;
@@ -82825,7 +83757,7 @@ html body {
82825
83757
  i10.renderMinorTick(t11, r4);
82826
83758
  }), h2.length && (h2.forEach(function(t11, e11) {
82827
83759
  i10.renderTick(t11, e11, r4);
82828
- }), m3 && (0 === i10.min || i10.single) && (d3[-1] || (d3[-1] = new eZ(i10, -1, null, true)), d3[-1].render(-1))), u2 && h2.forEach(function(r5, a3) {
83760
+ }), m3 && (0 === i10.min || i10.single) && (d3[-1] || (d3[-1] = new e_(i10, -1, null, true)), d3[-1].render(-1))), u2 && h2.forEach(function(r5, a3) {
82829
83761
  e10 = void 0 !== h2[a3 + 1] ? h2[a3 + 1] + m3 : i10.max - m3, a3 % 2 == 0 && r5 < i10.max && e10 <= i10.max + (s10.polar ? -m3 : m3) && (p2[r5] || (p2[r5] = new B2.PlotLineOrBand(i10, {})), t10 = r5 + m3, p2[r5].options = { from: o3 ? o3.lin2log(t10) : t10, to: o3 ? o3.lin2log(e10) : e10, color: u2, className: "highcharts-alternate-grid" }, p2[r5].render(), p2[r5].isActive = true);
82830
83762
  }), i10._addedPlotLB || (i10._addedPlotLB = true, (a2.plotLines || []).concat(a2.plotBands || []).forEach(function(t11) {
82831
83763
  i10.addPlotBandOrLine(t11);
@@ -82873,7 +83805,7 @@ html body {
82873
83805
  if (clearTimeout(this.crossShowTimer), n3 ? V2(e10) && (s10 = tb("colorAxis" !== this.coll ? e10.crosshairPos : null, this.isXAxis ? e10.plotX : this.len - e10.plotY)) : s10 = t10 && (this.horiz ? t10.chartX - this.pos : this.len - t10.chartY + this.pos), V2(s10) && (r3 = { value: e10 && (this.isXAxis ? e10.x : tb(e10.stackY, e10.y)), translatedValue: s10 }, h2.polar && q2(r3, { isCrosshair: true, chartX: t10 == null ? void 0 : t10.chartX, chartY: t10 == null ? void 0 : t10.chartY, point: e10 }), i10 = this.getPlotLinePath(r3) || null), !V2(i10)) return void this.hideCrosshair();
82874
83806
  o3 = this.categories && !this.isRadial, this.crossShowTimer = tA(() => {
82875
83807
  let e11 = this.cross;
82876
- e11 || (this.cross = e11 = h2.renderer.path().addClass("highcharts-crosshair highcharts-crosshair-" + (o3 ? "category " : "thin ") + (a2.className || "")).attr({ zIndex: tb(a2.zIndex, 2) }).add(), !h2.styledMode && (e11.attr({ stroke: a2.color || (o3 ? tU.parse("#ccd3ff").setOpacity(0.25).get() : "#cccccc"), "stroke-width": tb(a2.width, 1) }).css({ "pointer-events": "none" }), a2.dashStyle && e11.attr({ dashstyle: a2.dashStyle }))), e11.show().animate({ d: i10 }, e_(a2 == null ? void 0 : a2.animation)), o3 && !a2.width && e11.attr({ "stroke-width": this.transA }), this.cross && (this.cross.e = t10);
83808
+ e11 || (this.cross = e11 = h2.renderer.path().addClass("highcharts-crosshair highcharts-crosshair-" + (o3 ? "category " : "thin ") + (a2.className || "")).attr({ zIndex: tb(a2.zIndex, 2) }).add(), !h2.styledMode && (e11.attr({ stroke: a2.color || (o3 ? tU.parse("#ccd3ff").setOpacity(0.25).get() : "#cccccc"), "stroke-width": tb(a2.width, 1) }).css({ "pointer-events": "none" }), a2.dashStyle && e11.attr({ dashstyle: a2.dashStyle }))), e11.show().animate({ d: i10 }, eZ(a2 == null ? void 0 : a2.animation)), o3 && !a2.width && e11.attr({ "stroke-width": this.transA }), this.cross && (this.cross.e = t10);
82877
83809
  }, (!l3 || "hidden" === l3.attr("visibility")) && a2.showDelay || 0);
82878
83810
  } else this.hideCrosshair();
82879
83811
  Q2(this, "afterDrawCrosshair", { e: t10, point: e10 });
@@ -83096,7 +84028,7 @@ html body {
83096
84028
  return (e10 = (e10 = [t10.headerFooterFormatter(i10[0])]).concat(t10.bodyFormatter(i10))).push(t10.headerFooterFormatter(i10[0], true)), e10;
83097
84029
  }
83098
84030
  destroy() {
83099
- this.label && (this.label = this.label.destroy()), this.split && (this.cleanSplit(true), this.tt && (this.tt = this.tt.destroy())), this.renderer && (this.renderer = this.renderer.destroy(), Z2(this.container)), ta2(this.hideTimer), io(this);
84031
+ this.label && (this.label = this.label.destroy()), this.split && (this.cleanSplit(true), this.tt && (this.tt = this.tt.destroy())), this.renderer && (this.renderer = this.renderer.destroy(), _2(this.container)), ta2(this.hideTimer), io(this);
83100
84032
  }
83101
84033
  getAnchor(t10, e10) {
83102
84034
  var _a3;
@@ -83419,9 +84351,10 @@ html body {
83419
84351
  delete this.nonZonedColor, t10.options.colorByPoint ? (i10 || (s10 = (o3 = t10.options.colors || t10.chart.options.colors)[t10.colorCounter], r3 = o3.length), a2 = t10.colorCounter, t10.colorCounter++, t10.colorCounter === r3 && (t10.colorCounter = 0)) : (i10 || (s10 = t10.color), a2 = t10.colorIndex), this.colorIndex = tb(this.options.colorIndex, a2), this.color = tb(this.options.color, s10);
83420
84352
  }
83421
84353
  setNestedProperty(t10, e10, i10) {
83422
- return i10.split(".").reduce(function(t11, i11, s10, o3) {
83423
- let r3 = o3.length - 1 === s10;
83424
- return t11[i11] = r3 ? e10 : tg(t11[i11], true) ? t11[i11] : {}, t11[i11];
84354
+ let s10 = i10.split(".");
84355
+ return s10.some((t11) => "__proto__" === t11 || "constructor" === t11) || s10.reduce(function(t11, i11, s11, o3) {
84356
+ let r3 = o3.length - 1 === s11;
84357
+ return t11[i11] = r3 ? e10 : tg(t11[i11], true) && Object.hasOwnProperty.call(t11, i11) ? t11[i11] : {}, t11[i11];
83425
84358
  }, t10), t10;
83426
84359
  }
83427
84360
  shouldDraw() {
@@ -84007,7 +84940,7 @@ html body {
84007
84940
  let e12 = p2.reduce((t11, e13) => (t11[e13] = [], t11), {});
84008
84941
  for (m3 = 0; m3 < k2; m3++) {
84009
84942
  let i11 = this.pointClass.prototype.applyOptions.apply({ series: this }, [t10[m3]]);
84010
- for (let t11 of p2) e12[t11][m3] = i11[t11];
84943
+ for (let t11 of p2) "__proto__" !== t11 && "constructor" !== t11 && (e12[t11][m3] = i11[t11]);
84011
84944
  }
84012
84945
  c2.setColumns(e12);
84013
84946
  }
@@ -84324,7 +85257,7 @@ html body {
84324
85257
  }
84325
85258
  update(t10, e10) {
84326
85259
  var _a3, _b3;
84327
- Q2(this, "update", { options: t10 = _2(t10, this.userOptions) });
85260
+ Q2(this, "update", { options: t10 = Z2(t10, this.userOptions) });
84328
85261
  let i10 = this, s10 = i10.chart, o3 = i10.userOptions, r3 = i10.initialType || i10.type, a2 = s10.options.plotOptions, n3 = iR[r3].prototype, h2 = i10.finishedAnimating && { animation: false }, l3 = {}, d3, c2, p2 = iH.keepProps.slice(), g3 = t10.type || o3.type || s10.options.chart.type, u2 = !(this.hasDerivedData || g3 && g3 !== this.type || void 0 !== t10.keys || void 0 !== t10.pointStart || void 0 !== t10.pointInterval || void 0 !== t10.relativeXValue || t10.joinBy || t10.mapData || ["dataGrouping", "pointStart", "pointInterval", "pointIntervalUnit", "keys"].some((t11) => i10.hasOptionChanged(t11)));
84329
85262
  g3 = g3 || r3, u2 ? (p2.push.apply(p2, iH.keepPropsForPoints), false !== t10.visible && p2.push("area", "graph"), i10.parallelArrays.forEach(function(t11) {
84330
85263
  p2.push(t11 + "Data");
@@ -84421,7 +85354,7 @@ html body {
84421
85354
  return "number" != typeof this.y ? "" : t10(this.y, -1);
84422
85355
  }, padding: 5, style: { fontSize: "0.7em", fontWeight: "bold", color: "contrast", textOutline: "1px contrast" }, verticalAlign: "bottom", x: 0, y: 0 }, cropThreshold: 300, opacity: 1, pointRange: 0, softThreshold: true, states: { normal: { animation: true }, hover: { animation: { duration: 150 }, lineWidthPlus: 1, marker: {}, halo: { size: 10, opacity: 0.25 } }, select: { animation: { duration: 0 } }, inactive: { animation: { duration: 150 }, opacity: 0.2 } }, stickyTracking: true, turboThreshold: 1e3, findNearestPointBy: "x" }, iH.types = iO.seriesTypes, iH.registerType = iO.registerSeriesType, iH.keepProps = ["colorIndex", "eventOptions", "navigatorSeries", "symbolIndex", "baseSeries"], iH.keepPropsForPoints = ["data", "isDirtyData", "isDirtyCanvas", "points", "dataTable", "processedData", "xIncrement", "cropped", "_hasPointMarkers", "hasDataLabels", "nodes", "layout", "level", "mapMap", "mapData", "minY", "maxY", "minX", "maxX", "transformGroups"], q2(iH.prototype, { axisTypes: ["xAxis", "yAxis"], coll: "series", colorCounter: 0, directTouch: false, invertible: true, isCartesian: true, kdAxisArray: ["clientX", "plotY"], parallelArrays: ["x", "y"], pointClass: ip, requireSorting: true, sorted: true }), iO.series = iH;
84423
85356
  let iX = iH, { animObject: iG, setAnimation: iF } = tQ, { registerEventOptions: iY } = eV, { composed: ij, marginNames: i$ } = B2, { distribute: iV } = er, { format: iU } = es;
84424
- class iZ {
85357
+ class i_ {
84425
85358
  constructor(t10, e10) {
84426
85359
  this.allItems = [], this.initialItemY = 0, this.itemHeight = 0, this.itemMarginBottom = 0, this.itemMarginTop = 0, this.itemX = 0, this.itemY = 0, this.lastItemY = 0, this.lastLineHeight = 0, this.legendHeight = 0, this.legendWidth = 0, this.maxItemWidth = 0, this.maxLegendWidth = 0, this.offsetWidth = 0, this.padding = 0, this.pages = [], this.symbolHeight = 0, this.symbolWidth = 0, this.titleHeight = 0, this.totalItemWidth = 0, this.widthOption = 0, this.chart = t10, this.setOptions(e10), e10.enabled && (this.render(), iY(this, e10), R(this.chart, "endResize", function() {
84427
85360
  this.legend.positionCheckboxes();
@@ -84462,7 +85395,7 @@ html body {
84462
85395
  destroyItem(t10) {
84463
85396
  let e10 = t10.legendItem || {};
84464
85397
  for (let t11 of ["group", "label", "line", "symbol"]) e10[t11] && (e10[t11] = e10[t11].destroy());
84465
- t10.checkbox = Z2(t10.checkbox), t10.legendItem = void 0;
85398
+ t10.checkbox = _2(t10.checkbox), t10.legendItem = void 0;
84466
85399
  }
84467
85400
  destroy() {
84468
85401
  for (let t10 of this.getAllItems()) this.destroyItem(t10);
@@ -84587,12 +85520,12 @@ html body {
84587
85520
  });
84588
85521
  }
84589
85522
  }
84590
- (c = iZ || (iZ = {})).compose = function(t10) {
85523
+ (c = i_ || (i_ = {})).compose = function(t10) {
84591
85524
  tk2(ij, "Core.Legend") && R(t10, "beforeMargins", function() {
84592
85525
  this.legend = new c(this, this.options.legend);
84593
85526
  });
84594
85527
  };
84595
- let i_ = iZ, { animate: iK, animObject: iq, setAnimation: iJ } = tQ, { defaultOptions: iQ } = tY, { numberFormat: i0 } = es, { registerEventOptions: i1 } = eV, { charts: i2, doc: i3, marginNames: i5, svg: i6, win: i9 } = B2, { seriesTypes: i4 } = iO;
85528
+ let iZ = i_, { animate: iK, animObject: iq, setAnimation: iJ } = tQ, { defaultOptions: iQ } = tY, { numberFormat: i0 } = es, { registerEventOptions: i1 } = eV, { charts: i2, doc: i3, marginNames: i5, svg: i6, win: i9 } = B2, { seriesTypes: i4 } = iO;
84596
85529
  class i8 {
84597
85530
  static chart(t10, e10, i10) {
84598
85531
  return new i8(t10, e10, i10);
@@ -84784,7 +85717,7 @@ html body {
84784
85717
  }), t10.setChartSize();
84785
85718
  }
84786
85719
  getOptions() {
84787
- return _2(this.userOptions, iQ);
85720
+ return Z2(this.userOptions, iQ);
84788
85721
  }
84789
85722
  reflow(t10) {
84790
85723
  var _a3, _b3;
@@ -84874,7 +85807,7 @@ html body {
84874
85807
  let { options: t11 } = e11, { labels: i11 } = t11;
84875
85808
  if (this.hasCartesianSeries && e11.horiz && e11.visible && i11.enabled && e11.series.length && "colorAxis" !== e11.coll && !this.polar) {
84876
85809
  r3 = t11.tickLength, e11.createGroups();
84877
- let s11 = new eZ(e11, 0, "", true), o4 = s11.createLabel("x", i11);
85810
+ let s11 = new e_(e11, 0, "", true), o4 = s11.createLabel("x", i11);
84878
85811
  if (s11.destroy(), o4 && tb(i11.reserveSpace, !tl(t11.crossing)) && (r3 = o4.getBBox().height + i11.distance + Math.max(t11.offset || 0, 0)), r3) {
84879
85812
  o4 == null ? void 0 : o4.destroy();
84880
85813
  break;
@@ -84898,13 +85831,16 @@ html body {
84898
85831
  addCredits(t10) {
84899
85832
  var _a3;
84900
85833
  let e10 = this, i10 = tu(true, this.options.credits, t10);
84901
- i10.enabled && !this.credits && (this.credits = this.renderer.text(i10.text + (this.mapCredits || ""), 0, 0).addClass("highcharts-credits").on("click", function(t11) {
84902
- Q2(e10, "creditsClick", t11, () => {
84903
- i10.href && (i9.location.href = i10.href);
84904
- });
84905
- }).attr({ align: i10.position.align, zIndex: 8 }), ((_a3 = i10.events) == null ? void 0 : _a3.click) && R(e10, "creditsClick", i10.events.click), e10.styledMode || this.credits.css(i10.style), this.credits.add().align(i10.position), this.credits.update = function(t11) {
84906
- e10.credits = e10.credits.destroy(), e10.addCredits(t11);
84907
- });
85834
+ if (i10.enabled && !this.credits) {
85835
+ let t11 = i10.href ? t6.filterUserAttributes({ href: i10.href }).href : void 0;
85836
+ this.credits = this.renderer.text(i10.text + (this.mapCredits || ""), 0, 0).addClass("highcharts-credits").on("click", function(i11) {
85837
+ Q2(e10, "creditsClick", i11, () => {
85838
+ t11 && (i9.location.href = t11);
85839
+ });
85840
+ }).attr({ align: i10.position.align, zIndex: 8 }), ((_a3 = i10.events) == null ? void 0 : _a3.click) && R(e10, "creditsClick", i10.events.click), e10.styledMode || this.credits.css(i10.style), this.credits.add().align(i10.position), this.credits.update = function(t12) {
85841
+ e10.credits = e10.credits.destroy(), e10.addCredits(t12);
85842
+ };
85843
+ }
84908
85844
  }
84909
85845
  destroy() {
84910
85846
  var _a3, _b3;
@@ -84914,7 +85850,7 @@ html body {
84914
85850
  ["title", "subtitle", "chartBackground", "plotBackground", "plotBGImage", "plotBorder", "seriesGroup", "clipRect", "credits", "pointer", "rangeSelector", "legend", "resetZoomButton", "tooltip", "renderer"].forEach((t11) => {
84915
85851
  var _a4, _b4;
84916
85852
  e10[t11] = (_b4 = (_a4 = e10[t11]) == null ? void 0 : _a4.destroy) == null ? void 0 : _b4.call(_a4);
84917
- }), o3 && (o3.innerHTML = t6.emptyHTML, tS(o3), r3 && Z2(o3)), tm(e10, function(t11, i11) {
85853
+ }), o3 && (o3.innerHTML = t6.emptyHTML, tS(o3), r3 && _2(o3)), tm(e10, function(t11, i11) {
84918
85854
  delete e10[i11];
84919
85855
  });
84920
85856
  }
@@ -84970,7 +85906,7 @@ html body {
84970
85906
  }
84971
85907
  update(t10, e10, i10, s10) {
84972
85908
  let o3, r3, a2, n3 = this, h2 = { credits: "addCredits", title: "setTitle", subtitle: "setSubtitle", caption: "setCaption" }, l3 = t10.isResponsiveOptions, d3 = [];
84973
- Q2(n3, "update", { options: t10 }), l3 || n3.setResponsive(false, true), t10 = _2(t10, n3.options), n3.userOptions = tu(n3.userOptions, t10);
85909
+ Q2(n3, "update", { options: t10 }), l3 || n3.setResponsive(false, true), t10 = Z2(t10, n3.options), n3.userOptions = tu(n3.userOptions, t10);
84974
85910
  let c2 = t10.chart;
84975
85911
  c2 && (tu(true, n3.options.chart, c2), this.setZoomOptions(), "className" in c2 && n3.setClassName(c2.className), ("inverted" in c2 || "polar" in c2 || "type" in c2) && (n3.propFromSeries(), o3 = true), "alignTicks" in c2 && (o3 = true), "events" in c2 && i1(this, c2), tm(c2, function(t11, e11) {
84976
85912
  -1 !== n3.propsRequireUpdateSeries.indexOf("chart." + e11) && (r3 = true), -1 !== n3.propsRequireDirtyBox.indexOf(e11) && (n3.isDirtyBox = true), -1 !== n3.propsRequireReflow.indexOf(e11) && (n3.isDirtyBox = true, l3 || (a2 = true));
@@ -85625,7 +86561,7 @@ html body {
85625
86561
  let x3 = [["M", u2, f2]];
85626
86562
  return (g3 ? m3 <= u2 && m3 >= o3.x : m3 >= u2 && m3 <= o3.x) && x3.push(["L", m3, f2]), x3.push(["L", o3.x, o3.y], ["L", r3.x, r3.y]), x3;
85627
86563
  } } });
85628
- let { getStartAndEndRadians: sZ } = s$, { noop: s_ } = B2;
86564
+ let { getStartAndEndRadians: s_ } = s$, { noop: sZ } = B2;
85629
86565
  class sK extends iX {
85630
86566
  animate(t10) {
85631
86567
  let e10 = this, i10 = e10.points, s10 = e10.startAngleRad;
@@ -85668,7 +86604,7 @@ html body {
85668
86604
  }
85669
86605
  translate(t10) {
85670
86606
  Q2(this, "translate"), this.generatePoints();
85671
- let e10 = this.options, i10 = e10.slicedOffset, s10 = sZ(e10.startAngle, e10.endAngle), o3 = this.startAngleRad = s10.start, r3 = (this.endAngleRad = s10.end) - o3, a2 = this.points, n3 = e10.ignoreHiddenPoint, h2 = a2.length, l3, d3, c2, p2, g3, u2, f2, m3 = 0;
86607
+ let e10 = this.options, i10 = e10.slicedOffset, s10 = s_(e10.startAngle, e10.endAngle), o3 = this.startAngleRad = s10.start, r3 = (this.endAngleRad = s10.end) - o3, a2 = this.points, n3 = e10.ignoreHiddenPoint, h2 = a2.length, l3, d3, c2, p2, g3, u2, f2, m3 = 0;
85672
86608
  for (t10 || (this.center = t10 = this.getCenter()), u2 = 0; u2 < h2; u2++) {
85673
86609
  f2 = a2[u2], l3 = o3 + m3 * r3, f2.isValid() && (!n3 || f2.visible) && (m3 += f2.percentage / 100), d3 = o3 + m3 * r3;
85674
86610
  let e11 = { x: t10[0], y: t10[1], r: t10[2] / 2, innerR: t10[3] / 2, start: l3, end: d3 };
@@ -85684,7 +86620,7 @@ html body {
85684
86620
  }
85685
86621
  sK.defaultOptions = tu(iX.defaultOptions, { borderRadius: 3, center: [null, null], clip: false, colorByPoint: true, dataLabels: { connectorPadding: 5, connectorShape: "crookedLine", crookDistance: void 0, distance: 30, enabled: true, formatter: function() {
85686
86622
  return this.isNull ? void 0 : this.name;
85687
- }, softConnector: true, x: 0 }, fillColor: void 0, ignoreHiddenPoint: true, inactiveOtherPoints: true, legendType: "point", marker: null, size: null, showInLegend: false, slicedOffset: 10, stickyTracking: false, tooltip: { followPointer: true }, borderColor: "#ffffff", borderWidth: 1, lineWidth: void 0, states: { hover: { brightness: 0.1 } } }), q2(sK.prototype, { axisTypes: [], directTouch: true, drawGraph: void 0, drawTracker: sI.prototype.drawTracker, getCenter: s$.getCenter, getSymbol: s_, invertible: false, isCartesian: false, noSharedTooltip: true, pointAttribs: sI.prototype.pointAttribs, pointClass: sU, requireSorting: false, searchPoint: s_, trackerGroups: ["group", "dataLabelsGroup"] }), iO.registerSeriesType("pie", sK);
86623
+ }, softConnector: true, x: 0 }, fillColor: void 0, ignoreHiddenPoint: true, inactiveOtherPoints: true, legendType: "point", marker: null, size: null, showInLegend: false, slicedOffset: 10, stickyTracking: false, tooltip: { followPointer: true }, borderColor: "#ffffff", borderWidth: 1, lineWidth: void 0, states: { hover: { brightness: 0.1 } } }), q2(sK.prototype, { axisTypes: [], directTouch: true, drawGraph: void 0, drawTracker: sI.prototype.drawTracker, getCenter: s$.getCenter, getSymbol: sZ, invertible: false, isCartesian: false, noSharedTooltip: true, pointAttribs: sI.prototype.pointAttribs, pointClass: sU, requireSorting: false, searchPoint: sZ, trackerGroups: ["group", "dataLabelsGroup"] }), iO.registerSeriesType("pie", sK);
85688
86624
  let { composed: sq, noop: sJ } = B2, { distribute: sQ } = er, { series: s0 } = iO;
85689
86625
  !(function(t10) {
85690
86626
  let e10 = { radialDistributionY: function(t11, e11) {
@@ -85887,14 +86823,14 @@ html body {
85887
86823
  let a2 = tu(...o3.map((t11) => tr2((i10 == null ? void 0 : i10.rules) || [], (e11) => e11._id === t11)).map((t11) => t11 == null ? void 0 : t11.chartOptions));
85888
86824
  a2.isResponsiveOptions = true, o3 = o3.toString() || void 0;
85889
86825
  let n3 = s10 == null ? void 0 : s10.ruleIds;
85890
- o3 !== n3 && (s10 && (this.currentResponsive = void 0, this.updatingResponsive = true, this.update(s10.undoOptions, t10, true), this.updatingResponsive = false), o3 ? ((r3 = _2(a2, this.options, true, this.collectionsWithUpdate)).isResponsiveOptions = true, this.currentResponsive = { ruleIds: o3, mergedOptions: a2, undoOptions: r3 }, this.updatingResponsive || this.update(a2, t10, true)) : this.currentResponsive = void 0);
86826
+ o3 !== n3 && (s10 && (this.currentResponsive = void 0, this.updatingResponsive = true, this.update(s10.undoOptions, t10, true), this.updatingResponsive = false), o3 ? ((r3 = Z2(a2, this.options, true, this.collectionsWithUpdate)).isResponsiveOptions = true, this.currentResponsive = { ruleIds: o3, mergedOptions: a2, undoOptions: r3 }, this.updatingResponsive || this.update(a2, t10, true)) : this.currentResponsive = void 0);
85891
86827
  }
85892
86828
  (E2 || (E2 = {})).compose = function(t10) {
85893
86829
  let e10 = t10.prototype;
85894
86830
  return e10.matchResponsiveRule || q2(e10, { matchResponsiveRule: oo, setResponsive: or }), t10;
85895
86831
  };
85896
86832
  let oa = E2;
85897
- B2.AST = t6, B2.Axis = e22, B2.Chart = i8, B2.Color = tU, B2.DataLabel = sN, B2.DataTableCore = iM, B2.Fx = tK, B2.HTMLElement = eY, B2.Legend = i_, B2.LegendSymbol = iC, B2.PlotLineOrBand = e9, B2.Point = ip, B2.Pointer = iv, B2.RendererRegistry = eo, B2.Series = iX, B2.SeriesRegistry = iO, B2.StackItem = sa, B2.SVGElement = em, B2.SVGRenderer = eW, B2.Templating = es, B2.Tick = eZ, B2.Time = tH, B2.Tooltip = ia, B2.addEvent = R, B2.animObject = tQ.animObject, B2.animate = tQ.animate, B2.arrayMax = H2, B2.arrayMin = W2, B2.attr = X2, B2.chart = i8.chart, B2.clamp = G, B2.color = tU.parse, B2.correctFloat = F2, B2.createElement = Y2, B2.css = $2, B2.dateFormat = es.dateFormat, B2.defaultOptions = tY.defaultOptions, B2.defined = V2, B2.destroyObjectProperties = U2, B2.diffObjects = _2, B2.discardElement = Z2, B2.distribute = er.distribute, B2.erase = K2, B2.error = tE, B2.extend = q2, B2.extendClass = J2, B2.find = tr2, B2.fireEvent = Q2, B2.format = es.format, B2.getDeferredAnimation = tQ.getDeferredAnimation, B2.getMagnitude = ti, B2.getOptions = tY.getOptions, B2.getStyle = to, B2.insertItem = tI, B2.isArray = tc, B2.isClass = th, B2.isDOMElement = tn, B2.isFunction = tp, B2.isNumber = tl, B2.isObject = tg, B2.isString = td, B2.merge = tu, B2.normalizeTickInterval = tf, B2.numberFormat = es.numberFormat, B2.objectEach = tm, B2.offset = tx, B2.pad = ty, B2.pick = tb, B2.pInt = tv, B2.relativeLength = tw, B2.removeEvent = tS, B2.seriesType = iO.seriesType, B2.setAnimation = tQ.setAnimation, B2.setOptions = tY.setOptions, B2.splat = tT, B2.stableSort = tC, B2.stop = tQ.stop, B2.syncTimeout = tA, B2.time = tY.defaultTime, B2.timers = tK.timers, B2.timeUnits = tD, B2.uniqueKey = tB, B2.useSerialIds = function(e10) {
86833
+ B2.AST = t6, B2.Axis = e22, B2.Chart = i8, B2.Color = tU, B2.DataLabel = sN, B2.DataTableCore = iM, B2.Fx = tK, B2.HTMLElement = eY, B2.Legend = iZ, B2.LegendSymbol = iC, B2.PlotLineOrBand = e9, B2.Point = ip, B2.Pointer = iv, B2.RendererRegistry = eo, B2.Series = iX, B2.SeriesRegistry = iO, B2.StackItem = sa, B2.SVGElement = em, B2.SVGRenderer = eW, B2.Templating = es, B2.Tick = e_, B2.Time = tH, B2.Tooltip = ia, B2.addEvent = R, B2.animObject = tQ.animObject, B2.animate = tQ.animate, B2.arrayMax = H2, B2.arrayMin = W2, B2.attr = X2, B2.chart = i8.chart, B2.clamp = G, B2.color = tU.parse, B2.correctFloat = F2, B2.createElement = Y2, B2.css = $2, B2.dateFormat = es.dateFormat, B2.defaultOptions = tY.defaultOptions, B2.defined = V2, B2.destroyObjectProperties = U2, B2.diffObjects = Z2, B2.discardElement = _2, B2.distribute = er.distribute, B2.erase = K2, B2.error = tE, B2.extend = q2, B2.extendClass = J2, B2.find = tr2, B2.fireEvent = Q2, B2.format = es.format, B2.getDeferredAnimation = tQ.getDeferredAnimation, B2.getMagnitude = ti, B2.getOptions = tY.getOptions, B2.getStyle = to, B2.insertItem = tI, B2.isArray = tc, B2.isClass = th, B2.isDOMElement = tn, B2.isFunction = tp, B2.isNumber = tl, B2.isObject = tg, B2.isString = td, B2.merge = tu, B2.normalizeTickInterval = tf, B2.numberFormat = es.numberFormat, B2.objectEach = tm, B2.offset = tx, B2.pad = ty, B2.pick = tb, B2.pInt = tv, B2.relativeLength = tw, B2.removeEvent = tS, B2.seriesType = iO.seriesType, B2.setAnimation = tQ.setAnimation, B2.setOptions = tY.setOptions, B2.splat = tT, B2.stableSort = tC, B2.stop = tQ.stop, B2.syncTimeout = tA, B2.time = tY.defaultTime, B2.timers = tK.timers, B2.timeUnits = tD, B2.uniqueKey = tB, B2.useSerialIds = function(e10) {
85898
86834
  return t2 = tb(e10, t2);
85899
86835
  }, B2.wrap = function(t10, e10, i10) {
85900
86836
  let s10 = t10[e10];
@@ -85910,7 +86846,7 @@ html body {
85910
86846
  let o3 = i10.prototype.symbols;
85911
86847
  R(t10, "afterColumnTranslate", ot, { order: 9 }), R(s10, "afterTranslate", oi), e10.symbolCustomAttribs.push("borderRadius", "brBoxHeight", "brBoxY", "brEnd", "brStart"), s4 = o3.arc, s8 = o3.roundedRect, o3.arc = s7, o3.roundedRect = os;
85912
86848
  }
85913
- }, optionsToObject: oe2 }.compose(B2.Series, B2.SVGElement, B2.SVGRenderer), sH.compose(B2.Series.types.column), sN.compose(B2.Series), e3.compose(B2.Axis), eY.compose(B2.SVGRenderer), i_.compose(B2.Chart), e5.compose(B2.Axis), (r2 = (u = B2.Chart).prototype).hideOverlappingLabels || (r2.hideOverlappingLabels = function(t10) {
86849
+ }, optionsToObject: oe2 }.compose(B2.Series, B2.SVGElement, B2.SVGRenderer), sH.compose(B2.Series.types.column), sN.compose(B2.Series), e3.compose(B2.Axis), eY.compose(B2.SVGRenderer), iZ.compose(B2.Chart), e5.compose(B2.Axis), (r2 = (u = B2.Chart).prototype).hideOverlappingLabels || (r2.hideOverlappingLabels = function(t10) {
85914
86850
  let e10 = t10.length, i10 = (t11, e11) => !(e11.x >= t11.x + t11.width || e11.x + e11.width <= t11.x || e11.y >= t11.y + t11.height || e11.y + e11.height <= t11.y), s10 = (t11, e11) => {
85915
86851
  for (let i11 of t11) if (s2({ x: i11[0], y: i11[1] }, e11)) return true;
85916
86852
  return false;
@@ -85977,7 +86913,7 @@ html body {
85977
86913
  hasRequiredExporting = 1;
85978
86914
  (function(module2, exports2) {
85979
86915
  !/**
85980
- * Highcharts JS v12.6.0 (2026-04-13)
86916
+ * Highcharts JS v12.6.2 (2026-09-21)
85981
86917
  * @module highcharts/modules/exporting
85982
86918
  * @requires highcharts
85983
86919
  *
@@ -86052,7 +86988,7 @@ html body {
86052
86988
  w2.location.href = e3;
86053
86989
  }
86054
86990
  }
86055
- let { isTouchDevice: E2 } = h(), C = { exporting: { allowTableSorting: true, libURL: "https://code.highcharts.com/12.6.0/lib/", local: true, type: "image/png", url: `https://export-svg.highcharts.com?v=${h().version}`, pdfFont: { normal: void 0, bold: void 0, bolditalic: void 0, italic: void 0 }, printMaxWidth: 780, scale: 2, buttons: { contextButton: { className: "highcharts-contextbutton", menuClassName: "highcharts-contextmenu", symbol: "menu", titleKey: "contextButtonTitle", menuItems: ["viewFullscreen", "printChart", "separator", "downloadPNG", "downloadJPEG", "downloadSVG"] } }, menuItemDefinitions: { viewFullscreen: { textKey: "viewFullscreen", onclick: function() {
86991
+ let { isTouchDevice: E2 } = h(), C = { exporting: { allowTableSorting: true, libURL: "https://code.highcharts.com/12.6.2/lib/", local: true, type: "image/png", url: `https://export-svg.highcharts.com?v=${h().version}`, pdfFont: { normal: void 0, bold: void 0, bolditalic: void 0, italic: void 0 }, printMaxWidth: 780, scale: 2, buttons: { contextButton: { className: "highcharts-contextbutton", menuClassName: "highcharts-contextmenu", symbol: "menu", titleKey: "contextButtonTitle", menuItems: ["viewFullscreen", "printChart", "separator", "downloadPNG", "downloadJPEG", "downloadSVG"] } }, menuItemDefinitions: { viewFullscreen: { textKey: "viewFullscreen", onclick: function() {
86056
86992
  var _a2;
86057
86993
  (_a2 = this.fullscreen) == null ? void 0 : _a2.toggle();
86058
86994
  } }, printChart: { textKey: "printChart", onclick: function() {
@@ -86837,38 +87773,19 @@ html body {
86837
87773
  const HighchartsReact = /* @__PURE__ */ getDefaultExportFromCjs(highchartsReact_minExports);
86838
87774
  const BREAKDOWN_LEVEL_KEY = "breakdown-level";
86839
87775
  const MAX_SLICES_PER_RING = 100;
86840
- const canonicalRanks = [
86841
- "kingdom",
86842
- "phylum",
86843
- "class",
86844
- "order",
86845
- "family",
86846
- "genus",
86847
- "species"
86848
- ];
86849
87776
  const notAssignedLabel = (rk) => rk ? `Not assigned ${rk}` : "Not assigned";
86850
- const sortAndClip = (nodes) => {
86851
- if (!nodes || nodes.length === 0) return [];
86852
- const sorted = [...nodes].sort((a, b2) => (b2.species || 0) - (a.species || 0));
86853
- return sorted.length <= MAX_SLICES_PER_RING ? sorted : sorted.slice(0, MAX_SLICES_PER_RING);
86854
- };
86855
- const padNotAssigned = (kids, parentSpecies) => {
86856
- const sorted = sortAndClip(kids || []);
86857
- const sum = sorted.reduce((a, n2) => a + (n2.species || 0), 0);
86858
- if (sum >= parentSpecies) return sorted;
86859
- return [
86860
- ...sorted,
86861
- {
86862
- name: notAssignedLabel(get(sorted, "[0].rank", "")),
86863
- species: parentSpecies - sum,
86864
- children: []
86865
- }
86866
- ];
87777
+ const ringNodes = (nodes, parentCount) => {
87778
+ const named = (nodes || []).filter((n2) => n2.id).sort((a, b2) => (b2.count || 0) - (a.count || 0)).slice(0, MAX_SLICES_PER_RING);
87779
+ const sum = named.reduce((a, n2) => a + (n2.count || 0), 0);
87780
+ const rank = get(nodes, "[0].rank", "");
87781
+ return sum < parentCount ? [
87782
+ ...named,
87783
+ { name: notAssignedLabel(rank), count: parentCount - sum, children: [] }
87784
+ ] : named;
86867
87785
  };
86868
87786
  const TaxonBreakdown$1 = ({
86869
87787
  taxon,
86870
87788
  datasetKey,
86871
- rank = [],
86872
87789
  dataset,
86873
87790
  level = 1,
86874
87791
  showLevelSwitch = false,
@@ -86892,57 +87809,29 @@ html body {
86892
87809
  getData();
86893
87810
  }
86894
87811
  }, [taxon, datasetKey, activeLevel]);
86895
- const getOverView = async () => {
86896
- const res = await client(
86897
- `${config.dataApi}dataset/${datasetKey}/nameusage/search?TAXON_ID=${encodeURIComponent(
86898
- taxon.id
86899
- )}&facet=rank&status=accepted&status=provisionally%20accepted&limit=0`
86900
- );
86901
- return keyBy(get(res, "data.facets.rank", []), "value");
86902
- };
86903
87812
  const getData = async () => {
86904
87813
  setLoading(true);
86905
87814
  try {
86906
- const counts = await getOverView();
86907
- const ranks2 = canonicalRanks;
86908
- let taxonRankIdx = ranks2.indexOf(get(taxon, "name.rank"));
86909
- if (taxonRankIdx === -1) {
86910
- let rankIndex2 = rank.indexOf(get(taxon, "name.rank")) + 1;
86911
- while (taxonRankIdx === -1 && rankIndex2 < rank.length - 1) {
86912
- const canonicalRankIndex = ranks2.indexOf(rank[rankIndex2]);
86913
- if (canonicalRankIndex > -1) {
86914
- taxonRankIdx = canonicalRankIndex - 1;
86915
- }
86916
- rankIndex2++;
86917
- }
86918
- }
86919
- let childRank;
86920
- let childRankIndex = taxonRankIdx + 1;
86921
- while (!childRank && childRankIndex < ranks2.length) {
86922
- const nextRank = get(ranks2, `[${childRankIndex}]`);
86923
- if (nextRank && get(counts, `${nextRank}.count`, 0) > 0) {
86924
- childRank = nextRank;
86925
- } else {
86926
- childRankIndex++;
86927
- }
86928
- }
86929
- if (!childRank) {
86930
- setInvalid(true);
86931
- setLoading(false);
86932
- return;
86933
- }
86934
87815
  const res = await client(
86935
- `${config.dataApi}dataset/${datasetKey}/taxon/${taxon.id}/breakdown?level=${activeLevel}`
87816
+ `${config.dataApi}dataset/${datasetKey}/taxon/${encodeURIComponent(
87817
+ taxon.id
87818
+ )}/breakdown?level=${activeLevel}`
86936
87819
  );
86937
- const children = res.data || [];
86938
- const totalSpecies = get(counts, "species.count", 0);
87820
+ const bd = res.data || {};
86939
87821
  setLoading(false);
86940
- buildChart(children, totalSpecies);
87822
+ if (!bd.countRank || !bd.children || bd.children.length === 0) {
87823
+ setInvalid(true);
87824
+ return;
87825
+ }
87826
+ setInvalid(false);
87827
+ buildChart(bd);
86941
87828
  } catch (err) {
86942
87829
  setLoading(false);
87830
+ setInvalid(true);
86943
87831
  }
86944
87832
  };
86945
- const buildChart = (children, totalSpecies) => {
87833
+ const buildChart = ({ children, total, countRank }) => {
87834
+ const seriesName = startCase(countRank === "genus" ? "genera" : countRank);
86946
87835
  const DOI = dataset.doi ? "https://doi.org/" + dataset.doi : null;
86947
87836
  const baseColors = Highcharts.getOptions().colors;
86948
87837
  const prefersDark = typeof darkMode === "boolean" ? darkMode : typeof window !== "undefined" && typeof window.matchMedia === "function" && window.matchMedia("(prefers-color-scheme: dark)").matches;
@@ -86954,33 +87843,33 @@ html body {
86954
87843
  }
86955
87844
  }
86956
87845
  };
86957
- const innerNodes = padNotAssigned(children, totalSpecies);
87846
+ const innerNodes = ringNodes(children, total);
86958
87847
  const innerData = innerNodes.map((n2, i) => ({
86959
87848
  name: n2.name,
86960
- y: n2.species,
87849
+ y: n2.count,
86961
87850
  _id: n2.id,
86962
87851
  color: baseColors[i % baseColors.length],
86963
87852
  _kids: n2.children
86964
87853
  }));
86965
87854
  const outerData = [];
86966
- const hasOuterData = activeLevel >= 2 && innerData.some((s) => s._kids && s._kids.length > 0);
87855
+ const hasOuterData = innerData.some((s) => s._kids && s._kids.length > 0);
86967
87856
  if (hasOuterData) {
86968
87857
  innerData.forEach((slice2) => {
86969
- const sorted = sortAndClip(slice2._kids || []);
86970
- const sum = sorted.reduce((a, n2) => a + (n2.species || 0), 0);
87858
+ const sorted = (slice2._kids || []).filter((n2) => n2.id).sort((a, b2) => (b2.count || 0) - (a.count || 0)).slice(0, MAX_SLICES_PER_RING);
87859
+ const sum = sorted.reduce((a, n2) => a + (n2.count || 0), 0);
86971
87860
  sorted.forEach((g2, j2) => {
86972
87861
  const t2 = sorted.length > 1 ? j2 / (sorted.length - 1) : 0;
86973
87862
  const shift = -0.1 + t2 * 0.4;
86974
87863
  outerData.push({
86975
87864
  name: g2.name,
86976
- y: g2.species,
87865
+ y: g2.count,
86977
87866
  _id: g2.id,
86978
87867
  color: Highcharts.color(slice2.color).brighten(shift).get()
86979
87868
  });
86980
87869
  });
86981
87870
  if (sum < slice2.y) {
86982
87871
  outerData.push({
86983
- name: notAssignedLabel(get(sorted, "[0].rank", "")),
87872
+ name: notAssignedLabel(get(slice2._kids, "[0].rank", "")),
86984
87873
  y: slice2.y - sum,
86985
87874
  color: gapColor,
86986
87875
  borderColor: gapColor,
@@ -86991,7 +87880,7 @@ html body {
86991
87880
  });
86992
87881
  }
86993
87882
  const clean = (rows) => rows.map(({ _kids, ...rest }) => rest);
86994
- const grandTotal = totalSpecies || innerData.reduce((a, s) => a + s.y, 0);
87883
+ const grandTotal = total || innerData.reduce((a, s) => a + s.y, 0);
86995
87884
  const innerLabelStyle = {
86996
87885
  color: "contrast",
86997
87886
  textOutline: "1px contrast",
@@ -87005,12 +87894,12 @@ html body {
87005
87894
  style: innerLabelStyle
87006
87895
  } : {
87007
87896
  formatter: function() {
87008
- return this.y > 1 ? "<b>" + this.point.name + ":</b> " + this.y.toLocaleString("en-GB") : null;
87897
+ return this.y > 0 ? "<b>" + this.point.name + ":</b> " + this.y.toLocaleString("en-GB") : null;
87009
87898
  }
87010
87899
  };
87011
87900
  const series = [
87012
87901
  {
87013
- name: "Species",
87902
+ name: seriesName,
87014
87903
  data: clean(innerData),
87015
87904
  size: hasOuterData ? "60%" : "85%",
87016
87905
  dataLabels: innerDataLabels,
@@ -87019,13 +87908,13 @@ html body {
87019
87908
  ];
87020
87909
  if (hasOuterData) {
87021
87910
  series.push({
87022
- name: "Species",
87911
+ name: seriesName,
87023
87912
  data: outerData,
87024
87913
  size: "85%",
87025
87914
  innerSize: "60%",
87026
87915
  dataLabels: {
87027
87916
  formatter: function() {
87028
- return this.y > 1 ? "<b>" + this.point.name + ":</b> " + this.y.toLocaleString("en-GB") : null;
87917
+ return this.y > 0 ? "<b>" + this.point.name + ":</b> " + this.y.toLocaleString("en-GB") : null;
87029
87918
  }
87030
87919
  },
87031
87920
  point: { events: taxonClickHandler }
@@ -87086,6 +87975,14 @@ html body {
87086
87975
  ] }) : /* @__PURE__ */ jsxRuntimeExports.jsx(HighchartsReact, { highcharts: Highcharts, options })
87087
87976
  ] });
87088
87977
  };
87978
+ const groupBySource = (secondarySources) => Object.values(
87979
+ Object.entries(secondarySources || {}).reduce((groups, [key2, src]) => {
87980
+ const id = `${src.datasetKey}:${src.id}`;
87981
+ groups[id] = groups[id] || { id, src, keys: [] };
87982
+ groups[id].keys.push(key2);
87983
+ return groups;
87984
+ }, {})
87985
+ );
87089
87986
  const SecondarySources = ({ info, datasetKey }) => {
87090
87987
  var _a2, _b2;
87091
87988
  const [datasets, setDatasets] = reactExports.useState({});
@@ -87113,20 +88010,20 @@ html body {
87113
88010
  }
87114
88011
  setDatasets(data);
87115
88012
  };
87116
- return ((_a2 = info == null ? void 0 : info.source) == null ? void 0 : _a2.secondarySources) ? Object.keys(((_b2 = info == null ? void 0 : info.source) == null ? void 0 : _b2.secondarySources) || {}).map((key2) => {
87117
- var _a3, _b3, _c, _d, _e2, _f, _g, _h, _i, _j, _k, _l, _m;
88013
+ return ((_a2 = info == null ? void 0 : info.source) == null ? void 0 : _a2.secondarySources) ? groupBySource((_b2 = info == null ? void 0 : info.source) == null ? void 0 : _b2.secondarySources).map(({ id, src, keys: keys2 }) => {
88014
+ var _a3;
87118
88015
  return /* @__PURE__ */ jsxRuntimeExports.jsxs(React.Fragment, { children: [
87119
- startCase(key2),
88016
+ keys2.map((key2) => startCase(key2)).join(", "),
87120
88017
  ":",
87121
88018
  " ",
87122
88019
  /* @__PURE__ */ jsxRuntimeExports.jsx(
87123
88020
  "a",
87124
88021
  {
87125
- href: `https://www.checklistbank.org/dataset/${(_c = (_b3 = (_a3 = info == null ? void 0 : info.source) == null ? void 0 : _a3.secondarySources) == null ? void 0 : _b3[key2]) == null ? void 0 : _c.datasetKey}/taxon/${encodeURIComponent((_f = (_e2 = (_d = info == null ? void 0 : info.source) == null ? void 0 : _d.secondarySources) == null ? void 0 : _e2[key2]) == null ? void 0 : _f.id)}`,
87126
- children: ((_j = datasets[(_i = (_h = (_g = info == null ? void 0 : info.source) == null ? void 0 : _g.secondarySources) == null ? void 0 : _h[key2]) == null ? void 0 : _i.datasetKey]) == null ? void 0 : _j.title) || ((_m = (_l = (_k = info == null ? void 0 : info.source) == null ? void 0 : _k.secondarySources) == null ? void 0 : _l[key2]) == null ? void 0 : _m.datasetKey)
88022
+ href: `https://www.checklistbank.org/dataset/${src.datasetKey}/taxon/${encodeURIComponent(src.id)}`,
88023
+ children: ((_a3 = datasets[src.datasetKey]) == null ? void 0 : _a3.title) || src.datasetKey
87127
88024
  }
87128
88025
  )
87129
- ] }, key2);
88026
+ ] }, id);
87130
88027
  }) : null;
87131
88028
  };
87132
88029
  staticMethods.config({
@@ -88443,7 +89340,7 @@ Please report this to https://github.com/markedjs/marked.`, e2) {
88443
89340
  "span",
88444
89341
  {
88445
89342
  dangerouslySetInnerHTML: {
88446
- __html: purify.sanitize(g.parse(source))
89343
+ __html: purify_default.sanitize(g.parse(source))
88447
89344
  }
88448
89345
  }
88449
89346
  );
@@ -88619,15 +89516,24 @@ Please report this to https://github.com/markedjs/marked.`, e2) {
88619
89516
  (res) => this.setState({ rank: res.data.map((r2) => r2.name) })
88620
89517
  );
88621
89518
  });
89519
+ // Accepted descendants by rank. Read from the taxon metrics, a single row
89520
+ // lookup; only datasets without metrics (projects) fall back to a rank
89521
+ // facet search, which costs elasticsearch a lot more.
88622
89522
  __publicField(this, "getIncludes", (taxonKey) => {
88623
89523
  const { datasetKey } = this.props;
88624
- client(
88625
- `${config.dataApi}dataset/${datasetKey}/nameusage/search?TAXON_ID=${taxonKey}&facet=rank&status=accepted&status=provisionally%20accepted&limit=0`
88626
- ).then((res) => {
88627
- this.setState({
88628
- includesLoading: false,
88629
- includes: get(res, "data.facets.rank") || []
88630
- });
89524
+ const base = `${config.dataApi}dataset/${datasetKey}`;
89525
+ client(`${base}/taxon/${encodeURIComponent(taxonKey)}/metrics`).then(
89526
+ (res) => Object.entries(get(res, "data.taxaByRankCount") || {}).map(
89527
+ ([value, count]) => ({ value, count })
89528
+ )
89529
+ ).catch(
89530
+ () => client(
89531
+ `${base}/nameusage/search?TAXON_ID=${encodeURIComponent(
89532
+ taxonKey
89533
+ )}&facet=rank&facetLimit=500&status=accepted&status=provisionally%20accepted&limit=0`
89534
+ ).then((res) => get(res, "data.facets.rank") || [])
89535
+ ).then((includes2) => {
89536
+ this.setState({ includesLoading: false, includes: includes2 });
88631
89537
  }).catch((err) => {
88632
89538
  this.setState({
88633
89539
  includesLoading: false,
@@ -88846,7 +89752,7 @@ Please report this to https://github.com/markedjs/marked.`, e2) {
88846
89752
  {
88847
89753
  dangerouslySetInnerHTML: {
88848
89754
  __html: linkifyHtml(
88849
- purify.sanitize(get(taxon, "name.publishedIn.citation"))
89755
+ purify_default.sanitize(get(taxon, "name.publishedIn.citation"))
88850
89756
  )
88851
89757
  }
88852
89758
  }
@@ -88956,12 +89862,11 @@ Please report this to https://github.com/markedjs/marked.`, e2) {
88956
89862
  {
88957
89863
  taxon,
88958
89864
  datasetKey,
88959
- rank,
88960
89865
  dataset: catalogue,
88961
89866
  showLevelSwitch: true
88962
89867
  }
88963
89868
  ) }),
88964
- !isSynonym && includes2.length > 1 && rank && taxon && /* @__PURE__ */ jsxRuntimeExports.jsx(PresentationItem$1, { md, label: "Statistics", children: /* @__PURE__ */ jsxRuntimeExports.jsx(
89869
+ !isSynonym && rank && taxon && includes2.some((t2) => t2.value !== get(taxon, "name.rank")) && /* @__PURE__ */ jsxRuntimeExports.jsx(PresentationItem$1, { md, label: "Statistics", children: /* @__PURE__ */ jsxRuntimeExports.jsx(
88965
89870
  IncludesTable,
88966
89871
  {
88967
89872
  style: { marginTop: "-3px", marginLeft: "-3px" },
@@ -89549,7 +90454,7 @@ Please report this to https://github.com/markedjs/marked.`, e2) {
89549
90454
  "span",
89550
90455
  {
89551
90456
  dangerouslySetInnerHTML: {
89552
- __html: purify.sanitize(g.parse(data.description))
90457
+ __html: purify_default.sanitize(g.parse(data.description))
89553
90458
  }
89554
90459
  }
89555
90460
  ) : "" }),
@@ -90044,29 +90949,21 @@ Please report this to https://github.com/markedjs/marked.`, e2) {
90044
90949
  setAuth(auth);
90045
90950
  const [taxon, setTaxon] = reactExports.useState(null);
90046
90951
  const [dataset, setDataset] = reactExports.useState(null);
90047
- const [rank, setRank] = reactExports.useState([]);
90048
90952
  reactExports.useEffect(() => {
90049
90953
  if (taxonId && datasetKey) getTaxon();
90050
- if (datasetKey) {
90051
- getDataset2();
90052
- getRank();
90053
- }
90954
+ if (datasetKey) getDataset2();
90054
90955
  }, [taxonId, datasetKey]);
90055
- const getRank = () => client(`${config.dataApi}vocab/rank`).then(
90056
- (res) => setRank(res.data.map((r2) => r2.name))
90057
- );
90058
90956
  const getTaxon = () => client(`${config.dataApi}dataset/${datasetKey}/taxon/${taxonId}`).then(
90059
90957
  (res) => setTaxon(res.data)
90060
90958
  );
90061
90959
  const getDataset2 = () => client(`${config.dataApi}dataset/${datasetKey}`).then(
90062
90960
  (res) => setDataset(res.data)
90063
90961
  );
90064
- return /* @__PURE__ */ jsxRuntimeExports.jsx(RouterContext.Provider, { value: buildRouter(routerProps), children: !!taxon && !!dataset && rank.length > 0 ? /* @__PURE__ */ jsxRuntimeExports.jsx(
90962
+ return /* @__PURE__ */ jsxRuntimeExports.jsx(RouterContext.Provider, { value: buildRouter(routerProps), children: !!taxon && !!dataset ? /* @__PURE__ */ jsxRuntimeExports.jsx(
90065
90963
  TaxonBreakdown$1,
90066
90964
  {
90067
90965
  taxon,
90068
90966
  datasetKey,
90069
- rank,
90070
90967
  dataset,
90071
90968
  level,
90072
90969
  showLevelSwitch,