col-browser 2.7.0 → 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
  }
@@ -69881,60 +69898,98 @@ html body {
69881
69898
  (data) => data.reduce((a, c) => (a[c.scope] = c, a), {})
69882
69899
  );
69883
69900
  const token = "%[a-f0-9]{2}";
69884
- const singleMatcher = new RegExp("(" + token + ")|([^%]+?)", "gi");
69885
- const multiMatcher = new RegExp("(" + token + ")+", "gi");
69886
- function decodeComponents(components2, split) {
69887
- try {
69888
- return [decodeURIComponent(components2.join(""))];
69889
- } 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;
69890
69906
  }
69891
- if (components2.length === 1) {
69892
- return components2;
69907
+ const digits = input.slice(position2 + 1, position2 + 3);
69908
+ if (!hexPair.test(digits)) {
69909
+ return;
69893
69910
  }
69894
- split = split || 1;
69895
- const left = components2.slice(0, split);
69896
- const right = components2.slice(split);
69897
- 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;
69898
69930
  }
69899
69931
  function decode$1(input) {
69900
69932
  try {
69901
69933
  return decodeURIComponent(input);
69902
69934
  } catch {
69903
- let tokens = input.match(singleMatcher) || [];
69904
- for (let i = 1; i < tokens.length; i++) {
69905
- input = decodeComponents(tokens, i).join("");
69906
- 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;
69907
69983
  }
69908
- return input;
69984
+ return output;
69909
69985
  }
69910
69986
  }
69911
69987
  function customDecodeURIComponent(input) {
69912
- const replaceMap = {
69913
- "%FE%FF": "��",
69914
- "%FF%FE": "��"
69915
- };
69916
- let match2 = multiMatcher.exec(input);
69917
- while (match2) {
69918
- try {
69919
- replaceMap[match2[0]] = decodeURIComponent(match2[0]);
69920
- } catch {
69921
- const result2 = decode$1(match2[0]);
69922
- if (result2 !== match2[0]) {
69923
- replaceMap[match2[0]] = result2;
69924
- }
69925
- }
69926
- match2 = multiMatcher.exec(input);
69927
- }
69928
- replaceMap["%C2"] = "�";
69929
- const entries2 = Object.keys(replaceMap);
69930
- for (const key2 of entries2) {
69931
- input = input.replace(new RegExp(key2, "g"), replaceMap[key2]);
69932
- }
69933
- return input;
69988
+ return input.replace(multiMatcher, (run2) => decode$1(run2));
69934
69989
  }
69935
69990
  function decodeUriComponent(encodedURI) {
69936
69991
  if (typeof encodedURI !== "string") {
69937
- 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}\``);
69938
69993
  }
69939
69994
  try {
69940
69995
  return decodeURIComponent(encodedURI);
@@ -69992,15 +70047,11 @@ html body {
69992
70047
  return result2;
69993
70048
  }
69994
70049
  if (value === null) {
69995
- return [
69996
- ...result2,
69997
- [encode(key2, options), "[", index2, "]"].join("")
69998
- ];
70050
+ result2.push([encode(key2, options), "[", index2, "]"].join(""));
70051
+ return result2;
69999
70052
  }
70000
- return [
70001
- ...result2,
70002
- [encode(key2, options), "[", encode(index2, options), "]=", encode(value, options)].join("")
70003
- ];
70053
+ result2.push([encode(key2, options), "[", encode(index2, options), "]=", encode(value, options)].join(""));
70054
+ return result2;
70004
70055
  };
70005
70056
  }
70006
70057
  case "bracket": {
@@ -70009,15 +70060,11 @@ html body {
70009
70060
  return result2;
70010
70061
  }
70011
70062
  if (value === null) {
70012
- return [
70013
- ...result2,
70014
- [encode(key2, options), "[]"].join("")
70015
- ];
70063
+ result2.push([encode(key2, options), "[]"].join(""));
70064
+ return result2;
70016
70065
  }
70017
- return [
70018
- ...result2,
70019
- [encode(key2, options), "[]=", encode(value, options)].join("")
70020
- ];
70066
+ result2.push([encode(key2, options), "[]=", encode(value, options)].join(""));
70067
+ return result2;
70021
70068
  };
70022
70069
  }
70023
70070
  case "colon-list-separator": {
@@ -70026,15 +70073,11 @@ html body {
70026
70073
  return result2;
70027
70074
  }
70028
70075
  if (value === null) {
70029
- return [
70030
- ...result2,
70031
- [encode(key2, options), ":list="].join("")
70032
- ];
70076
+ result2.push([encode(key2, options), ":list="].join(""));
70077
+ return result2;
70033
70078
  }
70034
- return [
70035
- ...result2,
70036
- [encode(key2, options), ":list=", encode(value, options)].join("")
70037
- ];
70079
+ result2.push([encode(key2, options), ":list=", encode(value, options)].join(""));
70080
+ return result2;
70038
70081
  };
70039
70082
  }
70040
70083
  case "comma":
@@ -70047,9 +70090,11 @@ html body {
70047
70090
  }
70048
70091
  value = value === null ? "" : value;
70049
70092
  if (result2.length === 0) {
70050
- return [[encode(key2, options), keyValueSeparator, encode(value, options)].join("")];
70093
+ result2.push([encode(key2, options), keyValueSeparator, encode(value, options)].join(""));
70094
+ return result2;
70051
70095
  }
70052
- return [[result2, encode(value, options)].join(options.arrayFormatSeparator)];
70096
+ result2.push(encode(value, options));
70097
+ return result2;
70053
70098
  };
70054
70099
  }
70055
70100
  default: {
@@ -70058,15 +70103,11 @@ html body {
70058
70103
  return result2;
70059
70104
  }
70060
70105
  if (value === null) {
70061
- return [
70062
- ...result2,
70063
- encode(key2, options)
70064
- ];
70106
+ result2.push(encode(key2, options));
70107
+ return result2;
70065
70108
  }
70066
- return [
70067
- ...result2,
70068
- [encode(key2, options), "=", encode(value, options)].join("")
70069
- ];
70109
+ result2.push([encode(key2, options), "=", encode(value, options)].join(""));
70110
+ return result2;
70070
70111
  };
70071
70112
  }
70072
70113
  }
@@ -70100,7 +70141,11 @@ html body {
70100
70141
  accumulator[key2] = [value];
70101
70142
  return;
70102
70143
  }
70103
- 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);
70104
70149
  };
70105
70150
  }
70106
70151
  case "colon-list-separator": {
@@ -70115,7 +70160,11 @@ html body {
70115
70160
  accumulator[key2] = [value];
70116
70161
  return;
70117
70162
  }
70118
- 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);
70119
70168
  };
70120
70169
  }
70121
70170
  case "comma":
@@ -70139,7 +70188,12 @@ html body {
70139
70188
  accumulator[key2] = arrayValue;
70140
70189
  return;
70141
70190
  }
70142
- 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
+ }
70143
70197
  };
70144
70198
  }
70145
70199
  default: {
@@ -70148,7 +70202,11 @@ html body {
70148
70202
  accumulator[key2] = value;
70149
70203
  return;
70150
70204
  }
70151
- 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];
70152
70210
  };
70153
70211
  }
70154
70212
  }
@@ -70194,6 +70252,10 @@ html body {
70194
70252
  }
70195
70253
  return hash2;
70196
70254
  }
70255
+ function getUrlWithoutQuery(url) {
70256
+ const queryStart = url.indexOf("?");
70257
+ return queryStart === -1 ? url : url.slice(0, queryStart);
70258
+ }
70197
70259
  function parseValue(value, options, type2) {
70198
70260
  if (type2 === "string" && typeof value === "string") {
70199
70261
  return value;
@@ -70256,10 +70318,23 @@ html body {
70256
70318
  if (!query) {
70257
70319
  return returnValue;
70258
70320
  }
70259
- for (const parameter of query.split("&")) {
70260
- 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] !== "&") {
70331
+ continue;
70332
+ }
70333
+ if (index2 === parameterStart) {
70334
+ parameterStart = index2 + 1;
70261
70335
  continue;
70262
70336
  }
70337
+ const parameter = query.slice(parameterStart, index2);
70263
70338
  const parameter_ = options.decode ? parameter.replaceAll("+", " ") : parameter;
70264
70339
  let [key2, value] = splitOnFirst(parameter_, "=");
70265
70340
  if (key2 === void 0) {
@@ -70267,6 +70342,7 @@ html body {
70267
70342
  }
70268
70343
  value = value === void 0 ? null : ["comma", "separator", "bracket-separator"].includes(options.arrayFormat) ? value : decode(value, options);
70269
70344
  formatter(decode(key2, options), value, returnValue);
70345
+ parameterStart = index2 + 1;
70270
70346
  }
70271
70347
  for (const [key2, value] of Object.entries(returnValue)) {
70272
70348
  if (typeof value === "object" && value !== null && options.types[key2] !== "string") {
@@ -70338,13 +70414,14 @@ html body {
70338
70414
  (item, index2) => options.replacer(`${key2}[${index2}]`, item)
70339
70415
  ).filter((item) => item !== void 0);
70340
70416
  }
70341
- 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);
70342
70420
  }
70343
70421
  return encode(key2, options) + "=" + encode(value, options);
70344
70422
  }).filter((x2) => x2.length > 0).join("&");
70345
70423
  }
70346
70424
  function parseUrl(url, options) {
70347
- var _a2;
70348
70425
  options = {
70349
70426
  decode: true,
70350
70427
  ...options
@@ -70354,7 +70431,7 @@ html body {
70354
70431
  url_ = url;
70355
70432
  }
70356
70433
  return {
70357
- url: ((_a2 = url_ == null ? void 0 : url_.split("?")) == null ? void 0 : _a2[0]) ?? "",
70434
+ url: getUrlWithoutQuery(url_ ?? ""),
70358
70435
  query: parse$1(extract(url), options),
70359
70436
  ...options && options.parseFragmentIdentifier && hash2 ? { fragmentIdentifier: decode(hash2, options) } : {}
70360
70437
  };
@@ -70366,7 +70443,7 @@ html body {
70366
70443
  [encodeFragmentIdentifier]: true,
70367
70444
  ...options
70368
70445
  };
70369
- const url = removeHash(object2.url).split("?")[0] || "";
70446
+ const url = getUrlWithoutQuery(removeHash(object2.url)) || "";
70370
70447
  const queryFromUrl = extract(object2.url);
70371
70448
  const query = {
70372
70449
  ...parse$1(queryFromUrl, { sort: false, ...options }),
@@ -70376,9 +70453,12 @@ html body {
70376
70453
  queryString2 && (queryString2 = `?${queryString2}`);
70377
70454
  let hash2 = getHash(object2.url);
70378
70455
  if (typeof object2.fragmentIdentifier === "string") {
70379
- const urlObjectForFragmentEncode = new URL(url);
70380
- urlObjectForFragmentEncode.hash = object2.fragmentIdentifier;
70381
- 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
+ }
70382
70462
  }
70383
70463
  return `${url}${queryString2}${hash2}`;
70384
70464
  }
@@ -70396,8 +70476,11 @@ html body {
70396
70476
  }, options);
70397
70477
  }
70398
70478
  function exclude(input, filter2, options) {
70399
- const exclusionFilter = Array.isArray(filter2) ? (key2) => !filter2.includes(key2) : (key2, value) => !filter2(key2, value);
70400
- 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);
70401
70484
  }
70402
70485
  const queryString = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
70403
70486
  __proto__: null,
@@ -78218,12 +78301,12 @@ html body {
78218
78301
  let cached = null;
78219
78302
  const probe = () => {
78220
78303
  var _a2, _b2;
78221
- if (typeof window === "undefined" || !window.WebGLRenderingContext) {
78304
+ if (typeof window === "undefined" || !window.WebGL2RenderingContext) {
78222
78305
  return false;
78223
78306
  }
78224
78307
  try {
78225
78308
  const canvas = document.createElement("canvas");
78226
- const ctx = canvas.getContext("webgl2") || canvas.getContext("webgl");
78309
+ const ctx = canvas.getContext("webgl2");
78227
78310
  if (!ctx || typeof ctx.getParameter !== "function") return false;
78228
78311
  (_b2 = (_a2 = ctx.getExtension) == null ? void 0 : _a2.call(ctx, "WEBGL_lose_context")) == null ? void 0 : _b2.loseContext();
78229
78312
  return true;
@@ -78479,7 +78562,7 @@ html body {
78479
78562
  if (!isWebglSupported()) return;
78480
78563
  let map;
78481
78564
  try {
78482
- map = new maplibregl.Map({
78565
+ map = new maplibregl__namespace.Map({
78483
78566
  container: containerRef.current,
78484
78567
  style: styleSpec,
78485
78568
  transformRequest: cartoTransformRequest(cartoKey),
@@ -78495,15 +78578,15 @@ html body {
78495
78578
  return;
78496
78579
  }
78497
78580
  map.addControl(
78498
- new maplibregl.AttributionControl({ compact: true }),
78581
+ new maplibregl__namespace.AttributionControl({ compact: true }),
78499
78582
  "bottom-right"
78500
78583
  );
78501
78584
  map.addControl(
78502
- new maplibregl.NavigationControl({ showCompass: false }),
78585
+ new maplibregl__namespace.NavigationControl({ showCompass: false }),
78503
78586
  "top-left"
78504
78587
  );
78505
78588
  map.addControl(
78506
- new maplibregl.FullscreenControl({ container: wrapperRef.current }),
78589
+ new maplibregl__namespace.FullscreenControl({ container: wrapperRef.current }),
78507
78590
  "top-right"
78508
78591
  );
78509
78592
  mapRef.current = map;
@@ -78621,7 +78704,7 @@ html body {
78621
78704
  const record = key2 ? recordMapRef.current.get(key2) : null;
78622
78705
  if (!record) return;
78623
78706
  if (popupRef.current) popupRef.current.remove();
78624
- 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);
78625
78708
  };
78626
78709
  const onMouseEnter = () => {
78627
78710
  const map = mapRef.current;
@@ -78761,7 +78844,7 @@ html body {
78761
78844
  const data = key2 ? descendantRecordMapRef.current.get(key2) : null;
78762
78845
  if (!data) return;
78763
78846
  if (popupRef.current) popupRef.current.remove();
78764
- 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);
78765
78848
  };
78766
78849
  reactExports.useEffect(() => {
78767
78850
  const map = mapRef.current;
@@ -79416,7 +79499,7 @@ html body {
79416
79499
  idx
79417
79500
  );
79418
79501
  });
79419
- /*! @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 */
79420
79503
  function _arrayLikeToArray(r2, a) {
79421
79504
  (null == a || a > r2.length) && (a = r2.length);
79422
79505
  for (var e2 = 0, n2 = Array(a); e2 < a; e2++) n2[e2] = r2[e2];
@@ -79447,6 +79530,7 @@ html body {
79447
79530
  function _nonIterableRest() {
79448
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.");
79449
79532
  }
79533
+ /*! regenerator-runtime -- Copyright (c) 2014-present, Facebook, Inc. -- license (MIT): https://github.com/babel/babel/blob/main/packages/babel-helpers/LICENSE */
79450
79534
  function _slicedToArray(r2, e2) {
79451
79535
  return _arrayWithHoles(r2) || _iterableToArrayLimit(r2, e2) || _unsupportedIterableToArray(r2, e2) || _nonIterableRest();
79452
79536
  }
@@ -79457,41 +79541,41 @@ html body {
79457
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;
79458
79542
  }
79459
79543
  }
79460
- const entries = Object.entries, setPrototypeOf = Object.setPrototypeOf, isFrozen = Object.isFrozen, getPrototypeOf = Object.getPrototypeOf, getOwnPropertyDescriptor = Object.getOwnPropertyDescriptor;
79461
- let freeze = Object.freeze, seal = Object.seal, create = Object.create;
79462
- let _ref = typeof Reflect !== "undefined" && Reflect, apply = _ref.apply, construct = _ref.construct;
79463
- if (!freeze) {
79464
- freeze = function freeze2(x2) {
79465
- return x2;
79466
- };
79467
- }
79468
- if (!seal) {
79469
- seal = function seal2(x2) {
79470
- return x2;
79471
- };
79472
- }
79473
- if (!apply) {
79474
- apply = function apply2(func, thisArg) {
79475
- for (var _len = arguments.length, args = new Array(_len > 2 ? _len - 2 : 0), _key = 2; _key < _len; _key++) {
79476
- args[_key - 2] = arguments[_key];
79477
- }
79478
- return func.apply(thisArg, args);
79479
- };
79480
- }
79481
- if (!construct) {
79482
- construct = function construct2(Func) {
79483
- for (var _len2 = arguments.length, args = new Array(_len2 > 1 ? _len2 - 1 : 0), _key2 = 1; _key2 < _len2; _key2++) {
79484
- args[_key2 - 1] = arguments[_key2];
79485
- }
79486
- return new Func(...args);
79487
- };
79488
- }
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
+ };
79489
79569
  const arrayForEach = unapply(Array.prototype.forEach);
79490
79570
  const arrayLastIndexOf = unapply(Array.prototype.lastIndexOf);
79491
79571
  const arrayPop = unapply(Array.prototype.pop);
79492
79572
  const arrayPush = unapply(Array.prototype.push);
79573
+ const arraySlice = unapply(Array.prototype.slice);
79493
79574
  const arraySplice = unapply(Array.prototype.splice);
79494
79575
  const arrayIsArray = Array.isArray;
79576
+ const setCreate = unconstruct(Set);
79577
+ const setAdd = unapply(Set.prototype.add);
79578
+ const setHas = unapply(Set.prototype.has);
79495
79579
  const stringToLowerCase = unapply(String.prototype.toLowerCase);
79496
79580
  const stringToString = unapply(String.prototype.toString);
79497
79581
  const stringMatch = unapply(String.prototype.match);
@@ -79508,40 +79592,28 @@ html body {
79508
79592
  const typeErrorCreate = unconstruct(TypeError);
79509
79593
  function unapply(func) {
79510
79594
  return function(thisArg) {
79511
- if (thisArg instanceof RegExp) {
79512
- thisArg.lastIndex = 0;
79513
- }
79514
- for (var _len3 = arguments.length, args = new Array(_len3 > 1 ? _len3 - 1 : 0), _key3 = 1; _key3 < _len3; _key3++) {
79515
- args[_key3 - 1] = arguments[_key3];
79516
- }
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];
79517
79597
  return apply(func, thisArg, args);
79518
79598
  };
79519
79599
  }
79520
79600
  function unconstruct(Func) {
79521
79601
  return function() {
79522
- for (var _len4 = arguments.length, args = new Array(_len4), _key4 = 0; _key4 < _len4; _key4++) {
79523
- args[_key4] = arguments[_key4];
79524
- }
79602
+ for (var _len4 = arguments.length, args = new Array(_len4), _key4 = 0; _key4 < _len4; _key4++) args[_key4] = arguments[_key4];
79525
79603
  return construct(Func, args);
79526
79604
  };
79527
79605
  }
79528
79606
  function addToSet(set2, array2) {
79529
79607
  let transformCaseFunc = arguments.length > 2 && arguments[2] !== void 0 ? arguments[2] : stringToLowerCase;
79530
- if (setPrototypeOf) {
79531
- setPrototypeOf(set2, null);
79532
- }
79533
- if (!arrayIsArray(array2)) {
79534
- return set2;
79535
- }
79608
+ if (setPrototypeOf) setPrototypeOf(set2, null);
79609
+ if (!arrayIsArray(array2)) return set2;
79536
79610
  let l2 = array2.length;
79537
79611
  while (l2--) {
79538
79612
  let element = array2[l2];
79539
79613
  if (typeof element === "string") {
79540
79614
  const lcElement = transformCaseFunc(element);
79541
79615
  if (lcElement !== element) {
79542
- if (!isFrozen(array2)) {
79543
- array2[l2] = lcElement;
79544
- }
79616
+ if (!isFrozen(array2)) array2[l2] = lcElement;
79545
79617
  element = lcElement;
79546
79618
  }
79547
79619
  }
@@ -79550,12 +79622,7 @@ html body {
79550
79622
  return set2;
79551
79623
  }
79552
79624
  function cleanArray(array2) {
79553
- for (let index2 = 0; index2 < array2.length; index2++) {
79554
- const isPropertyExist = objectHasOwnProperty(array2, index2);
79555
- if (!isPropertyExist) {
79556
- array2[index2] = null;
79557
- }
79558
- }
79625
+ for (let index2 = 0; index2 < array2.length; index2++) if (!objectHasOwnProperty(array2, index2)) array2[index2] = null;
79559
79626
  return array2;
79560
79627
  }
79561
79628
  function clone(object2) {
@@ -79564,44 +79631,31 @@ html body {
79564
79631
  var _ref3 = _slicedToArray(_ref2, 2);
79565
79632
  const property2 = _ref3[0];
79566
79633
  const value = _ref3[1];
79567
- const isPropertyExist = objectHasOwnProperty(object2, property2);
79568
- if (isPropertyExist) {
79569
- if (arrayIsArray(value)) {
79570
- newObject[property2] = cleanArray(value);
79571
- } else if (value && typeof value === "object" && value.constructor === Object) {
79572
- newObject[property2] = clone(value);
79573
- } else {
79574
- newObject[property2] = value;
79575
- }
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;
79576
79638
  }
79577
79639
  }
79578
79640
  return newObject;
79579
79641
  }
79580
79642
  function stringifyValue(value) {
79581
79643
  switch (typeof value) {
79582
- case "string": {
79644
+ case "string":
79583
79645
  return value;
79584
- }
79585
- case "number": {
79646
+ case "number":
79586
79647
  return numberToString(value);
79587
- }
79588
- case "boolean": {
79648
+ case "boolean":
79589
79649
  return booleanToString(value);
79590
- }
79591
- case "bigint": {
79650
+ case "bigint":
79592
79651
  return bigintToString ? bigintToString(value) : "0";
79593
- }
79594
- case "symbol": {
79652
+ case "symbol":
79595
79653
  return symbolToString ? symbolToString(value) : "Symbol()";
79596
- }
79597
- case "undefined": {
79654
+ case "undefined":
79598
79655
  return objectToString(value);
79599
- }
79600
79656
  case "function":
79601
79657
  case "object": {
79602
- if (value === null) {
79603
- return objectToString(value);
79604
- }
79658
+ if (value === null) return objectToString(value);
79605
79659
  const valueAsRecord = value;
79606
79660
  const valueToString = lookupGetter(valueAsRecord, "toString");
79607
79661
  if (typeof valueToString === "function") {
@@ -79610,21 +79664,16 @@ html body {
79610
79664
  }
79611
79665
  return objectToString(value);
79612
79666
  }
79613
- default: {
79667
+ default:
79614
79668
  return objectToString(value);
79615
- }
79616
79669
  }
79617
79670
  }
79618
79671
  function lookupGetter(object2, prop) {
79619
79672
  while (object2 !== null) {
79620
79673
  const desc = getOwnPropertyDescriptor(object2, prop);
79621
79674
  if (desc) {
79622
- if (desc.get) {
79623
- return unapply(desc.get);
79624
- }
79625
- if (typeof desc.value === "function") {
79626
- return unapply(desc.value);
79627
- }
79675
+ if (desc.get) return unapply(desc.get);
79676
+ if (typeof desc.value === "function") return unapply(desc.value);
79628
79677
  }
79629
79678
  object2 = getPrototypeOf(object2);
79630
79679
  }
@@ -79633,6 +79682,14 @@ html body {
79633
79682
  }
79634
79683
  return fallbackValue;
79635
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
+ }
79636
79693
  function isRegex(value) {
79637
79694
  try {
79638
79695
  regExpTest(value, "");
@@ -79641,62 +79698,700 @@ html body {
79641
79698
  return false;
79642
79699
  }
79643
79700
  }
79644
- 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"]);
79645
- 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"]);
79646
- 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"]);
79647
- 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"]);
79648
- 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"]);
79649
- 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
+ ]);
79650
79971
  const text = freeze(["#text"]);
79651
- 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"]);
79652
- 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"]);
79653
- 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"]);
79654
- 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
+ ]);
79655
80349
  const MUSTACHE_EXPR = seal(/{{[\w\W]*|^[\w\W]*}}/g);
79656
80350
  const ERB_EXPR = seal(/<%[\w\W]*|^[\w\W]*%>/g);
79657
80351
  const TMPLIT_EXPR = seal(/\${[\w\W]*/g);
79658
80352
  const DATA_ATTR = seal(/^data-[\-\w.\u00B7-\uFFFF]+$/);
79659
80353
  const ARIA_ATTR = seal(/^aria-[\-\w]+$/);
79660
- const IS_ALLOWED_URI = seal(
79661
- /^(?:(?:(?:f|ht)tps?|mailto|tel|callto|sms|cid|xmpp|matrix):|[^a-z]|[a-z+.\-]+(?:[^a-z+.\-:]|$))/i
79662
- // eslint-disable-line no-useless-escape
79663
- );
80354
+ const IS_ALLOWED_URI = seal(/^(?:(?:(?:f|ht)tps?|mailto|tel|callto|sms|cid|xmpp|matrix):|[^a-z]|[a-z+.\-]+(?:[^a-z+.\-:]|$))/i);
79664
80355
  const IS_SCRIPT_OR_DATA = seal(/^(?:\w+script|data):/i);
79665
- const ATTR_WHITESPACE = seal(
79666
- /[\u0000-\u0020\u00A0\u1680\u180E\u2000-\u2029\u205F\u3000]/g
79667
- // eslint-disable-line no-control-regex
79668
- );
80356
+ const ATTR_WHITESPACE = seal(/[\u0000-\u0020\u00A0\u1680\u180E\u2000-\u2029\u205F\u3000]/g);
79669
80357
  const DOCTYPE_NAME = seal(/^html$/i);
79670
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);
79671
80363
  const NODE_TYPE = {
79672
80364
  element: 1,
79673
80365
  attribute: 2,
79674
80366
  text: 3,
79675
80367
  cdataSection: 4,
79676
80368
  entityReference: 5,
79677
- // Deprecated
79678
80369
  entityNode: 6,
79679
- // Deprecated
79680
- progressingInstruction: 7,
80370
+ processingInstruction: 7,
79681
80371
  comment: 8,
79682
80372
  document: 9,
79683
80373
  documentType: 10,
79684
80374
  documentFragment: 11,
79685
80375
  notation: 12
79686
- // Deprecated
79687
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
+ ]));
79688
80387
  const getGlobal = function getGlobal2() {
79689
80388
  return typeof window === "undefined" ? null : window;
79690
80389
  };
79691
80390
  const _createTrustedTypesPolicy = function _createTrustedTypesPolicy2(trustedTypes, purifyHostElement) {
79692
- if (typeof trustedTypes !== "object" || typeof trustedTypes.createPolicy !== "function") {
79693
- return null;
79694
- }
80391
+ if (typeof trustedTypes !== "object" || typeof trustedTypes.createPolicy !== "function") return null;
79695
80392
  let suffix = null;
79696
80393
  const ATTR_NAME = "data-tt-policy-suffix";
79697
- if (purifyHostElement && purifyHostElement.hasAttribute(ATTR_NAME)) {
79698
- suffix = purifyHostElement.getAttribute(ATTR_NAME);
79699
- }
80394
+ if (purifyHostElement && purifyHostElement.hasAttribute(ATTR_NAME)) suffix = purifyHostElement.getAttribute(ATTR_NAME);
79700
80395
  const policyName = "dompurify" + (suffix ? "#" + suffix : "");
79701
80396
  try {
79702
80397
  return trustedTypes.createPolicy(policyName, {
@@ -79725,10 +80420,17 @@ html body {
79725
80420
  uponSanitizeShadowNode: []
79726
80421
  };
79727
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
+ };
79728
80430
  function createDOMPurify() {
79729
80431
  let window2 = arguments.length > 0 && arguments[0] !== void 0 ? arguments[0] : getGlobal();
79730
80432
  const DOMPurify = (root2) => createDOMPurify(root2);
79731
- DOMPurify.version = "3.4.6";
80433
+ DOMPurify.version = "3.4.17";
79732
80434
  DOMPurify.removed = [];
79733
80435
  if (!window2 || !window2.document || window2.document.nodeType !== NODE_TYPE.document || !window2.Element) {
79734
80436
  DOMPurify.isSupported = false;
@@ -79738,13 +80440,14 @@ html body {
79738
80440
  const originalDocument = document2;
79739
80441
  const currentScript = originalDocument.currentScript;
79740
80442
  window2.DocumentFragment;
79741
- const HTMLTemplateElement = window2.HTMLTemplateElement, Node = window2.Node, Element2 = window2.Element, NodeFilter = window2.NodeFilter, _window$NamedNodeMap = window2.NamedNodeMap;
79742
- _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);
79743
80445
  window2.HTMLFormElement;
79744
80446
  const DOMParser2 = window2.DOMParser, trustedTypes = window2.trustedTypes;
79745
80447
  const ElementPrototype = Element2.prototype;
79746
80448
  const cloneNode = lookupGetter(ElementPrototype, "cloneNode");
79747
80449
  const remove = lookupGetter(ElementPrototype, "remove");
80450
+ const removeAttributeNode = lookupGetter(ElementPrototype, "removeAttributeNode");
79748
80451
  const getNextSibling = lookupGetter(ElementPrototype, "nextSibling");
79749
80452
  const getChildNodes = lookupGetter(ElementPrototype, "childNodes");
79750
80453
  const getParentNode = lookupGetter(ElementPrototype, "parentNode");
@@ -79752,14 +80455,54 @@ html body {
79752
80455
  const getAttributes = lookupGetter(ElementPrototype, "attributes");
79753
80456
  const getNodeType = Node && Node.prototype ? lookupGetter(Node.prototype, "nodeType") : null;
79754
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
+ };
79755
80469
  if (typeof HTMLTemplateElement === "function") {
79756
80470
  const template = document2.createElement("template");
79757
- if (template.content && template.content.ownerDocument) {
79758
- document2 = template.content.ownerDocument;
79759
- }
80471
+ if (template.content && template.content.ownerDocument) document2 = template.content.ownerDocument;
79760
80472
  }
79761
80473
  let trustedTypesPolicy;
79762
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
+ };
79763
80506
  const _document = document2, implementation = _document.implementation, createNodeIterator = _document.createNodeIterator, createDocumentFragment = _document.createDocumentFragment, getElementsByTagName = _document.getElementsByTagName;
79764
80507
  const importNode = originalDocument.importNode;
79765
80508
  let hooks = _createHooksMap();
@@ -79767,9 +80510,20 @@ html body {
79767
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;
79768
80511
  let IS_ALLOWED_URI$1 = IS_ALLOWED_URI;
79769
80512
  let ALLOWED_TAGS = null;
79770
- 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
+ ]);
79771
80520
  let ALLOWED_ATTR = null;
79772
- const DEFAULT_ALLOWED_ATTR = addToSet({}, [...html, ...svg, ...mathMl, ...xml]);
80521
+ const DEFAULT_ALLOWED_ATTR = addToSet({}, [
80522
+ ...html,
80523
+ ...svg,
80524
+ ...mathMl,
80525
+ ...xml
80526
+ ]);
79773
80527
  let CUSTOM_ELEMENT_HANDLING = Object.seal(create(null, {
79774
80528
  tagNameCheck: {
79775
80529
  writable: true,
@@ -79814,6 +80568,8 @@ html body {
79814
80568
  let SAFE_FOR_XML = true;
79815
80569
  let WHOLE_DOCUMENT = false;
79816
80570
  let SET_CONFIG = false;
80571
+ let SET_CONFIG_ALLOWED_TAGS = null;
80572
+ let SET_CONFIG_ALLOWED_ATTR = null;
79817
80573
  let FORCE_BODY = false;
79818
80574
  let RETURN_DOM = false;
79819
80575
  let RETURN_DOM_FRAGMENT = false;
@@ -79823,23 +80579,91 @@ html body {
79823
80579
  const SANITIZE_NAMED_PROPS_PREFIX = "user-content-";
79824
80580
  let KEEP_CONTENT = true;
79825
80581
  let IN_PLACE = false;
80582
+ let IN_PLACE_VISITED = null;
79826
80583
  let USE_PROFILES = {};
79827
80584
  let FORBID_CONTENTS = null;
79828
- 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
+ ]);
79829
80613
  let DATA_URI_TAGS = null;
79830
- 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
+ ]);
79831
80622
  let URI_SAFE_ATTRIBUTES = null;
79832
- 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
+ ]);
79833
80639
  const MATHML_NAMESPACE = "http://www.w3.org/1998/Math/MathML";
79834
80640
  const SVG_NAMESPACE = "http://www.w3.org/2000/svg";
79835
80641
  const HTML_NAMESPACE = "http://www.w3.org/1999/xhtml";
79836
80642
  let NAMESPACE2 = HTML_NAMESPACE;
79837
80643
  let IS_EMPTY_INPUT = false;
79838
80644
  let ALLOWED_NAMESPACES = null;
79839
- const DEFAULT_ALLOWED_NAMESPACES = addToSet({}, [MATHML_NAMESPACE, SVG_NAMESPACE, HTML_NAMESPACE], stringToString);
79840
- let MATHML_TEXT_INTEGRATION_POINTS = addToSet({}, ["mi", "mo", "mn", "ms", "mtext"]);
79841
- let HTML_INTEGRATION_POINTS = addToSet({}, ["annotation-xml"]);
79842
- 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
+ ]);
79843
80667
  let PARSER_MEDIA_TYPE = null;
79844
80668
  const SUPPORTED_PARSER_MEDIA_TYPES = ["application/xhtml+xml", "text/html"];
79845
80669
  const DEFAULT_PARSER_MEDIA_TYPE = "text/html";
@@ -79851,24 +80675,25 @@ html body {
79851
80675
  };
79852
80676
  const _parseConfig = function _parseConfig2() {
79853
80677
  let cfg = arguments.length > 0 && arguments[0] !== void 0 ? arguments[0] : {};
79854
- if (CONFIG && CONFIG === cfg) {
79855
- return;
79856
- }
79857
- if (!cfg || typeof cfg !== "object") {
79858
- cfg = {};
79859
- }
80678
+ if (CONFIG && CONFIG === cfg) return;
80679
+ if (!cfg || typeof cfg !== "object") cfg = {};
79860
80680
  cfg = clone(cfg);
79861
- PARSER_MEDIA_TYPE = // eslint-disable-next-line unicorn/prefer-includes
79862
- 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;
79863
80682
  transformCaseFunc = PARSER_MEDIA_TYPE === "application/xhtml+xml" ? stringToString : stringToLowerCase;
79864
- ALLOWED_TAGS = objectHasOwnProperty(cfg, "ALLOWED_TAGS") && arrayIsArray(cfg.ALLOWED_TAGS) ? addToSet({}, cfg.ALLOWED_TAGS, transformCaseFunc) : DEFAULT_ALLOWED_TAGS;
79865
- ALLOWED_ATTR = objectHasOwnProperty(cfg, "ALLOWED_ATTR") && arrayIsArray(cfg.ALLOWED_ATTR) ? addToSet({}, cfg.ALLOWED_ATTR, transformCaseFunc) : DEFAULT_ALLOWED_ATTR;
79866
- ALLOWED_NAMESPACES = objectHasOwnProperty(cfg, "ALLOWED_NAMESPACES") && arrayIsArray(cfg.ALLOWED_NAMESPACES) ? addToSet({}, cfg.ALLOWED_NAMESPACES, stringToString) : DEFAULT_ALLOWED_NAMESPACES;
79867
- 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;
79868
- 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;
79869
- FORBID_CONTENTS = objectHasOwnProperty(cfg, "FORBID_CONTENTS") && arrayIsArray(cfg.FORBID_CONTENTS) ? addToSet({}, cfg.FORBID_CONTENTS, transformCaseFunc) : DEFAULT_FORBID_CONTENTS;
79870
- FORBID_TAGS = objectHasOwnProperty(cfg, "FORBID_TAGS") && arrayIsArray(cfg.FORBID_TAGS) ? addToSet({}, cfg.FORBID_TAGS, transformCaseFunc) : clone({});
79871
- 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 });
79872
80697
  USE_PROFILES = objectHasOwnProperty(cfg, "USE_PROFILES") ? cfg.USE_PROFILES && typeof cfg.USE_PROFILES === "object" ? clone(cfg.USE_PROFILES) : cfg.USE_PROFILES : false;
79873
80698
  ALLOW_ARIA_ATTR = cfg.ALLOW_ARIA_ATTR !== false;
79874
80699
  ALLOW_DATA_ATTR = cfg.ALLOW_DATA_ATTR !== false;
@@ -79887,25 +80712,16 @@ html body {
79887
80712
  IN_PLACE = cfg.IN_PLACE || false;
79888
80713
  IS_ALLOWED_URI$1 = isRegex(cfg.ALLOWED_URI_REGEXP) ? cfg.ALLOWED_URI_REGEXP : IS_ALLOWED_URI;
79889
80714
  NAMESPACE2 = typeof cfg.NAMESPACE === "string" ? cfg.NAMESPACE : HTML_NAMESPACE;
79890
- 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"]);
79891
- 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"]);
79892
- 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));
79893
80718
  CUSTOM_ELEMENT_HANDLING = create(null);
79894
- if (objectHasOwnProperty(customElementHandling, "tagNameCheck") && isRegexOrFunction(customElementHandling.tagNameCheck)) {
79895
- CUSTOM_ELEMENT_HANDLING.tagNameCheck = customElementHandling.tagNameCheck;
79896
- }
79897
- if (objectHasOwnProperty(customElementHandling, "attributeNameCheck") && isRegexOrFunction(customElementHandling.attributeNameCheck)) {
79898
- CUSTOM_ELEMENT_HANDLING.attributeNameCheck = customElementHandling.attributeNameCheck;
79899
- }
79900
- if (objectHasOwnProperty(customElementHandling, "allowCustomizedBuiltInElements") && typeof customElementHandling.allowCustomizedBuiltInElements === "boolean") {
79901
- CUSTOM_ELEMENT_HANDLING.allowCustomizedBuiltInElements = customElementHandling.allowCustomizedBuiltInElements;
79902
- }
79903
- if (SAFE_FOR_TEMPLATES) {
79904
- ALLOW_DATA_ATTR = false;
79905
- }
79906
- if (RETURN_DOM_FRAGMENT) {
79907
- RETURN_DOM = true;
79908
- }
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;
79909
80725
  if (USE_PROFILES) {
79910
80726
  ALLOWED_TAGS = addToSet({}, text);
79911
80727
  ALLOWED_ATTR = create(null);
@@ -79932,174 +80748,299 @@ html body {
79932
80748
  EXTRA_ELEMENT_HANDLING.tagCheck = null;
79933
80749
  EXTRA_ELEMENT_HANDLING.attributeCheck = null;
79934
80750
  if (objectHasOwnProperty(cfg, "ADD_TAGS")) {
79935
- if (typeof cfg.ADD_TAGS === "function") {
79936
- EXTRA_ELEMENT_HANDLING.tagCheck = cfg.ADD_TAGS;
79937
- } else if (arrayIsArray(cfg.ADD_TAGS)) {
79938
- if (ALLOWED_TAGS === DEFAULT_ALLOWED_TAGS) {
79939
- ALLOWED_TAGS = clone(ALLOWED_TAGS);
79940
- }
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);
79941
80754
  addToSet(ALLOWED_TAGS, cfg.ADD_TAGS, transformCaseFunc);
79942
80755
  }
79943
80756
  }
79944
80757
  if (objectHasOwnProperty(cfg, "ADD_ATTR")) {
79945
- if (typeof cfg.ADD_ATTR === "function") {
79946
- EXTRA_ELEMENT_HANDLING.attributeCheck = cfg.ADD_ATTR;
79947
- } else if (arrayIsArray(cfg.ADD_ATTR)) {
79948
- if (ALLOWED_ATTR === DEFAULT_ALLOWED_ATTR) {
79949
- ALLOWED_ATTR = clone(ALLOWED_ATTR);
79950
- }
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);
79951
80761
  addToSet(ALLOWED_ATTR, cfg.ADD_ATTR, transformCaseFunc);
79952
80762
  }
79953
80763
  }
79954
- if (objectHasOwnProperty(cfg, "ADD_URI_SAFE_ATTR") && arrayIsArray(cfg.ADD_URI_SAFE_ATTR)) {
79955
- addToSet(URI_SAFE_ATTRIBUTES, cfg.ADD_URI_SAFE_ATTR, transformCaseFunc);
79956
- }
79957
- if (objectHasOwnProperty(cfg, "FORBID_CONTENTS") && arrayIsArray(cfg.FORBID_CONTENTS)) {
79958
- if (FORBID_CONTENTS === DEFAULT_FORBID_CONTENTS) {
79959
- FORBID_CONTENTS = clone(FORBID_CONTENTS);
79960
- }
79961
- addToSet(FORBID_CONTENTS, cfg.FORBID_CONTENTS, transformCaseFunc);
79962
- }
79963
80764
  if (objectHasOwnProperty(cfg, "ADD_FORBID_CONTENTS") && arrayIsArray(cfg.ADD_FORBID_CONTENTS)) {
79964
- if (FORBID_CONTENTS === DEFAULT_FORBID_CONTENTS) {
79965
- FORBID_CONTENTS = clone(FORBID_CONTENTS);
79966
- }
80765
+ if (FORBID_CONTENTS === DEFAULT_FORBID_CONTENTS) FORBID_CONTENTS = clone(FORBID_CONTENTS);
79967
80766
  addToSet(FORBID_CONTENTS, cfg.ADD_FORBID_CONTENTS, transformCaseFunc);
79968
80767
  }
79969
- if (KEEP_CONTENT) {
79970
- ALLOWED_TAGS["#text"] = true;
79971
- }
79972
- if (WHOLE_DOCUMENT) {
79973
- addToSet(ALLOWED_TAGS, ["html", "head", "body"]);
79974
- }
80768
+ if (KEEP_CONTENT) ALLOWED_TAGS["#text"] = true;
80769
+ if (WHOLE_DOCUMENT) addToSet(ALLOWED_TAGS, [
80770
+ "html",
80771
+ "head",
80772
+ "body"
80773
+ ]);
79975
80774
  if (ALLOWED_TAGS.table) {
79976
80775
  addToSet(ALLOWED_TAGS, ["tbody"]);
79977
80776
  delete FORBID_TAGS.tbody;
79978
80777
  }
79979
80778
  if (cfg.TRUSTED_TYPES_POLICY) {
79980
- if (typeof cfg.TRUSTED_TYPES_POLICY.createHTML !== "function") {
79981
- throw typeErrorCreate('TRUSTED_TYPES_POLICY configuration option must provide a "createHTML" hook.');
79982
- }
79983
- if (typeof cfg.TRUSTED_TYPES_POLICY.createScriptURL !== "function") {
79984
- throw typeErrorCreate('TRUSTED_TYPES_POLICY configuration option must provide a "createScriptURL" hook.');
79985
- }
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;
79986
80782
  trustedTypesPolicy = cfg.TRUSTED_TYPES_POLICY;
79987
- emptyHTML = trustedTypesPolicy.createHTML("");
79988
- } else {
79989
- if (trustedTypesPolicy === void 0) {
79990
- trustedTypesPolicy = _createTrustedTypesPolicy(trustedTypes, currentScript);
79991
- }
79992
- if (trustedTypesPolicy !== null && typeof emptyHTML === "string") {
79993
- emptyHTML = trustedTypesPolicy.createHTML("");
80783
+ try {
80784
+ emptyHTML = _createTrustedHTML("");
80785
+ } catch (error) {
80786
+ trustedTypesPolicy = previousTrustedTypesPolicy;
80787
+ throw error;
79994
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("");
79995
80795
  }
79996
- if (freeze) {
79997
- freeze(cfg);
79998
- }
80796
+ if (freeze) freeze(cfg);
79999
80797
  CONFIG = cfg;
80000
80798
  };
80001
- const ALL_SVG_TAGS = addToSet({}, [...svg$1, ...svgFilters, ...svgDisallowed]);
80799
+ const ALL_SVG_TAGS = addToSet({}, [
80800
+ ...svg$1,
80801
+ ...svgFilters,
80802
+ ...svgDisallowed
80803
+ ]);
80002
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
+ };
80003
80820
  const _checkValidNamespace = function _checkValidNamespace2(element) {
80004
- let parent = getParentNode(element);
80005
- if (!parent || !parent.tagName) {
80006
- parent = {
80007
- namespaceURI: NAMESPACE2,
80008
- tagName: "template"
80009
- };
80010
- }
80011
- const tagName = stringToLowerCase(element.tagName);
80012
- const parentTagName = stringToLowerCase(parent.tagName);
80013
- if (!ALLOWED_NAMESPACES[element.namespaceURI]) {
80014
- 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");
80015
80847
  }
80016
- if (element.namespaceURI === SVG_NAMESPACE) {
80017
- if (parent.namespaceURI === HTML_NAMESPACE) {
80018
- return tagName === "svg";
80019
- }
80020
- if (parent.namespaceURI === MATHML_NAMESPACE) {
80021
- 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) {
80022
80856
  }
80023
- return Boolean(ALL_SVG_TAGS[tagName]);
80024
80857
  }
80025
- if (element.namespaceURI === MATHML_NAMESPACE) {
80026
- if (parent.namespaceURI === HTML_NAMESPACE) {
80027
- 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) {
80028
80866
  }
80029
- if (parent.namespaceURI === SVG_NAMESPACE) {
80030
- 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) {
80031
80892
  }
80032
- return Boolean(ALL_MATHML_TAGS[tagName]);
80033
80893
  }
80034
- if (element.namespaceURI === HTML_NAMESPACE) {
80035
- if (parent.namespaceURI === SVG_NAMESPACE && !HTML_INTEGRATION_POINTS[parentTagName]) {
80036
- return false;
80894
+ if (name === "is") {
80895
+ if (RETURN_DOM || RETURN_DOM_FRAGMENT) try {
80896
+ _forceRemove(element);
80897
+ } catch (_2) {
80037
80898
  }
80038
- if (parent.namespaceURI === MATHML_NAMESPACE && !MATHML_TEXT_INTEGRATION_POINTS[parentTagName]) {
80039
- return false;
80899
+ else try {
80900
+ element.setAttribute(name, "");
80901
+ } catch (_2) {
80040
80902
  }
80041
- return !ALL_MATHML_TAGS[tagName] && (COMMON_SVG_AND_HTML_ELEMENTS[tagName] || !ALL_SVG_TAGS[tagName]);
80042
80903
  }
80043
- if (PARSER_MEDIA_TYPE === "application/xhtml+xml" && ALLOWED_NAMESPACES[element.namespaceURI]) {
80044
- 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);
80045
80913
  }
80046
- return false;
80047
80914
  };
80048
- const _forceRemove = function _forceRemove2(node2) {
80049
- arrayPush(DOMPurify.removed, {
80050
- element: node2
80051
- });
80052
- try {
80053
- getParentNode(node2).removeChild(node2);
80054
- } catch (_2) {
80055
- 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]);
80056
80927
  }
80057
80928
  };
80058
- const _removeAttribute = function _removeAttribute2(name, element) {
80059
- try {
80060
- arrayPush(DOMPurify.removed, {
80061
- attribute: element.getAttributeNode(name),
80062
- 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);
80063
80981
  });
80064
- } catch (_2) {
80065
- arrayPush(DOMPurify.removed, {
80066
- attribute: null,
80067
- 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());
80068
80986
  });
80069
80987
  }
80070
- element.removeAttribute(name);
80071
- if (name === "is") {
80072
- 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)) {
80073
81013
  try {
80074
- _forceRemove(element);
81014
+ remove(node2);
80075
81015
  } catch (_2) {
80076
81016
  }
80077
- } else {
81017
+ return false;
81018
+ }
81019
+ if (nodeType === NODE_TYPE.element) {
81020
+ const element = node2;
81021
+ const lcTag = transformCaseFunc(_readNodeName(node2));
80078
81022
  try {
80079
- 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");
80080
81025
  } catch (_2) {
80081
81026
  }
80082
81027
  }
80083
- }
81028
+ return true;
81029
+ });
80084
81030
  };
80085
81031
  const _initDocument = function _initDocument2(dirty) {
80086
81032
  let doc = null;
80087
81033
  let leadingWhitespace = null;
80088
- if (FORCE_BODY) {
80089
- dirty = "<remove></remove>" + dirty;
80090
- } else {
81034
+ if (FORCE_BODY) dirty = "<remove></remove>" + dirty;
81035
+ else {
80091
81036
  const matches = stringMatch(dirty, /^[\r\n\t ]+/);
80092
81037
  leadingWhitespace = matches && matches[0];
80093
81038
  }
80094
- if (PARSER_MEDIA_TYPE === "application/xhtml+xml" && NAMESPACE2 === HTML_NAMESPACE) {
80095
- dirty = '<html xmlns="http://www.w3.org/1999/xhtml"><head></head><body>' + dirty + "</body></html>";
80096
- }
80097
- const dirtyPayload = trustedTypesPolicy ? trustedTypesPolicy.createHTML(dirty) : dirty;
80098
- if (NAMESPACE2 === HTML_NAMESPACE) {
80099
- try {
80100
- doc = new DOMParser2().parseFromString(dirtyPayload, PARSER_MEDIA_TYPE);
80101
- } catch (_2) {
80102
- }
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) {
80103
81044
  }
80104
81045
  if (!doc || !doc.documentElement) {
80105
81046
  doc = implementation.createDocument(NAMESPACE2, "template", null);
@@ -80109,72 +81050,46 @@ html body {
80109
81050
  }
80110
81051
  }
80111
81052
  const body = doc.body || doc.documentElement;
80112
- if (dirty && leadingWhitespace) {
80113
- body.insertBefore(document2.createTextNode(leadingWhitespace), body.childNodes[0] || null);
80114
- }
80115
- if (NAMESPACE2 === HTML_NAMESPACE) {
80116
- return getElementsByTagName.call(doc, WHOLE_DOCUMENT ? "html" : "body")[0];
80117
- }
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];
80118
81055
  return WHOLE_DOCUMENT ? doc.documentElement : body;
80119
81056
  };
80120
81057
  const _createNodeIterator = function _createNodeIterator2(root2) {
80121
- return createNodeIterator.call(
80122
- root2.ownerDocument || root2,
80123
- root2,
80124
- // eslint-disable-next-line no-bitwise
80125
- NodeFilter.SHOW_ELEMENT | NodeFilter.SHOW_COMMENT | NodeFilter.SHOW_TEXT | NodeFilter.SHOW_PROCESSING_INSTRUCTION | NodeFilter.SHOW_CDATA_SECTION,
80126
- null
80127
- );
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);
80128
81060
  };
80129
- const _scrubTemplateExpressions = function _scrubTemplateExpressions2(node2) {
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
+ });
81074
+ };
81075
+ const _scrubOwnCharacterData = function _scrubOwnCharacterData2(node2) {
80130
81076
  node2.normalize();
80131
- const walker = createNodeIterator.call(
80132
- node2.ownerDocument || node2,
80133
- node2,
80134
- // eslint-disable-next-line no-bitwise
80135
- NodeFilter.SHOW_TEXT | NodeFilter.SHOW_COMMENT | NodeFilter.SHOW_CDATA_SECTION | NodeFilter.SHOW_PROCESSING_INSTRUCTION,
80136
- null
80137
- );
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);
80138
81079
  let currentNode = walker.nextNode();
80139
81080
  while (currentNode) {
80140
- let data = currentNode.data;
80141
- arrayForEach([MUSTACHE_EXPR$1, ERB_EXPR$1, TMPLIT_EXPR$1], (expr) => {
80142
- data = stringReplace(data, expr, " ");
80143
- });
80144
- currentNode.data = data;
81081
+ currentNode.data = _stripTemplateExpressions(currentNode.data);
80145
81082
  currentNode = walker.nextNode();
80146
81083
  }
80147
81084
  };
80148
81085
  const _isClobbered = function _isClobbered2(element) {
80149
81086
  const realTagName = getNodeName ? getNodeName(element) : null;
80150
- if (typeof realTagName !== "string") {
80151
- return false;
80152
- }
80153
- if (transformCaseFunc(realTagName) !== "form") {
80154
- return false;
80155
- }
80156
- return typeof element.nodeName !== "string" || typeof element.textContent !== "string" || typeof element.removeChild !== "function" || // Realm-safe NamedNodeMap detection: equality against the cached
80157
- // prototype getter. Clobbered .attributes (e.g. <input name="attributes">)
80158
- // makes the direct read diverge from the cached read; a clean form
80159
- // (same-realm OR foreign-realm) has both reads pointing at the same
80160
- // canonical NamedNodeMap.
80161
- 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
80162
- // "childNodes" shadows the prototype getter. Direct reads of
80163
- // form.childNodes from a clobbered form return the named child
80164
- // instead of the real NodeList, so any walk that reads it directly
80165
- // skips the form's real children. Compare the direct read to the
80166
- // cached Node.prototype getter — when the form's named-property
80167
- // getter intercepts the read, the two values differ and we flag
80168
- // the form. This catches every clobbering child type (input,
80169
- // select, etc.) regardless of whether the named child happens to
80170
- // carry a numeric .length, which a typeof-based probe would miss
80171
- // (e.g. HTMLSelectElement.length is a defined unsigned-long).
80172
- 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);
80173
81090
  };
80174
81091
  const _isDocumentFragment = function _isDocumentFragment2(value) {
80175
- if (!getNodeType || typeof value !== "object" || value === null) {
80176
- return false;
80177
- }
81092
+ if (!getNodeType || typeof value !== "object" || value === null) return false;
80178
81093
  try {
80179
81094
  return getNodeType(value) === NODE_TYPE.documentFragment;
80180
81095
  } catch (_2) {
@@ -80182,9 +81097,7 @@ html body {
80182
81097
  }
80183
81098
  };
80184
81099
  const _isNode = function _isNode2(value) {
80185
- if (!getNodeType || typeof value !== "object" || value === null) {
80186
- return false;
80187
- }
81100
+ if (!getNodeType || typeof value !== "object" || value === null) return false;
80188
81101
  try {
80189
81102
  return typeof getNodeType(value) === "number";
80190
81103
  } catch (_2) {
@@ -80192,126 +81105,156 @@ html body {
80192
81105
  }
80193
81106
  };
80194
81107
  function _executeHooks(hooks2, currentNode, data) {
81108
+ if (hooks2.length === 0) return;
80195
81109
  arrayForEach(hooks2, (hook) => {
80196
81110
  hook.call(DOMPurify, currentNode, data, CONFIG);
80197
81111
  });
80198
81112
  }
80199
- const _sanitizeElements = function _sanitizeElements2(currentNode) {
80200
- 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);
80201
81155
  _executeHooks(hooks.beforeSanitizeElements, currentNode, null);
81156
+ if (_handleHookDetachedNode(currentNode, root2)) return true;
80202
81157
  if (_isClobbered(currentNode)) {
80203
81158
  _forceRemove(currentNode);
80204
81159
  return true;
80205
81160
  }
80206
- 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);
80207
81163
  _executeHooks(hooks.uponSanitizeElement, currentNode, {
80208
81164
  tagName,
80209
81165
  allowedTags: ALLOWED_TAGS
80210
81166
  });
80211
- if (SAFE_FOR_XML && currentNode.hasChildNodes() && !_isNode(currentNode.firstElementChild) && regExpTest(/<[/\w!]/g, currentNode.innerHTML) && regExpTest(/<[/\w!]/g, currentNode.textContent)) {
80212
- _forceRemove(currentNode);
80213
- return true;
80214
- }
80215
- if (SAFE_FOR_XML && currentNode.namespaceURI === HTML_NAMESPACE && tagName === "style" && _isNode(currentNode.firstElementChild)) {
80216
- _forceRemove(currentNode);
80217
- return true;
80218
- }
80219
- if (currentNode.nodeType === NODE_TYPE.progressingInstruction) {
80220
- _forceRemove(currentNode);
80221
- return true;
80222
- }
80223
- 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)) {
80224
81169
  _forceRemove(currentNode);
80225
81170
  return true;
80226
81171
  }
80227
81172
  if (FORBID_TAGS[tagName] || !(EXTRA_ELEMENT_HANDLING.tagCheck instanceof Function && EXTRA_ELEMENT_HANDLING.tagCheck(tagName)) && !ALLOWED_TAGS[tagName]) {
80228
- if (!FORBID_TAGS[tagName] && _isBasicCustomElement(tagName)) {
80229
- if (CUSTOM_ELEMENT_HANDLING.tagNameCheck instanceof RegExp && regExpTest(CUSTOM_ELEMENT_HANDLING.tagNameCheck, tagName)) {
80230
- return false;
80231
- }
80232
- if (CUSTOM_ELEMENT_HANDLING.tagNameCheck instanceof Function && CUSTOM_ELEMENT_HANDLING.tagNameCheck(tagName)) {
80233
- return false;
80234
- }
81173
+ const removed = _sanitizeDisallowedNode(currentNode, tagName, root2);
81174
+ if (removed === false) {
81175
+ _executeHooks(hooks.afterSanitizeElements, currentNode, null);
81176
+ if (_handleHookDetachedNode(currentNode, root2)) return true;
80235
81177
  }
80236
- if (KEEP_CONTENT && !FORBID_CONTENTS[tagName]) {
80237
- const parentNode = getParentNode(currentNode) || currentNode.parentNode;
80238
- const childNodes = getChildNodes(currentNode) || currentNode.childNodes;
80239
- if (childNodes && parentNode) {
80240
- const childCount = childNodes.length;
80241
- for (let i = childCount - 1; i >= 0; --i) {
80242
- const childClone = cloneNode(childNodes[i], true);
80243
- parentNode.insertBefore(childClone, getNextSibling(currentNode));
80244
- }
80245
- }
80246
- }
80247
- _forceRemove(currentNode);
80248
- return true;
81178
+ return removed;
80249
81179
  }
80250
- const nt2 = getNodeType ? getNodeType(currentNode) : currentNode.nodeType;
80251
- if (nt2 === NODE_TYPE.element && !_checkValidNamespace(currentNode)) {
81180
+ if (_readNodeType(currentNode) === NODE_TYPE.element && !_checkValidNamespace(currentNode)) {
80252
81181
  _forceRemove(currentNode);
80253
81182
  return true;
80254
81183
  }
80255
- 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)) {
80256
81185
  _forceRemove(currentNode);
80257
81186
  return true;
80258
81187
  }
80259
81188
  if (SAFE_FOR_TEMPLATES && currentNode.nodeType === NODE_TYPE.text) {
80260
- content = currentNode.textContent;
80261
- arrayForEach([MUSTACHE_EXPR$1, ERB_EXPR$1, TMPLIT_EXPR$1], (expr) => {
80262
- content = stringReplace(content, expr, " ");
80263
- });
81189
+ const content = _stripTemplateExpressions(currentNode.textContent);
80264
81190
  if (currentNode.textContent !== content) {
80265
- arrayPush(DOMPurify.removed, {
80266
- element: currentNode.cloneNode()
80267
- });
81191
+ arrayPush(DOMPurify.removed, { element: currentNode.cloneNode() });
80268
81192
  currentNode.textContent = content;
80269
81193
  }
80270
81194
  }
80271
81195
  _executeHooks(hooks.afterSanitizeElements, currentNode, null);
80272
- return false;
81196
+ return _handleHookDetachedNode(currentNode, root2);
80273
81197
  };
80274
81198
  const _isValidAttribute = function _isValidAttribute2(lcTag, lcName, value) {
80275
- if (FORBID_ATTR[lcName]) {
80276
- return false;
80277
- }
80278
- if (SANITIZE_DOM && (lcName === "id" || lcName === "name") && (value in document2 || value in formElement)) {
80279
- return false;
80280
- }
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;
80281
81202
  const nameIsPermitted = ALLOWED_ATTR[lcName] || EXTRA_ELEMENT_HANDLING.attributeCheck instanceof Function && EXTRA_ELEMENT_HANDLING.attributeCheck(lcName, lcTag);
80282
- if (ALLOW_DATA_ATTR && !FORBID_ATTR[lcName] && regExpTest(DATA_ATTR$1, lcName)) ;
80283
- else if (ALLOW_ARIA_ATTR && regExpTest(ARIA_ATTR$1, lcName)) ;
80284
- else if (!nameIsPermitted || FORBID_ATTR[lcName]) {
80285
- if (
80286
- // First condition does a very basic check if a) it's basically a valid custom element tagname AND
80287
- // b) if the tagName passes whatever the user has configured for CUSTOM_ELEMENT_HANDLING.tagNameCheck
80288
- // and c) if the attribute name passes whatever the user has configured for CUSTOM_ELEMENT_HANDLING.attributeNameCheck
80289
- _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
80290
- // the value passes whatever the user has configured for CUSTOM_ELEMENT_HANDLING.tagNameCheck
80291
- 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))
80292
- ) ;
80293
- 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);
80294
81240
  return false;
80295
81241
  }
80296
- } else if (URI_SAFE_ATTRIBUTES[lcName]) ;
80297
- else if (regExpTest(IS_ALLOWED_URI$1, stringReplace(value, ATTR_WHITESPACE$1, ""))) ;
80298
- else if ((lcName === "src" || lcName === "xlink:href" || lcName === "href") && lcTag !== "script" && stringIndexOf(value, "data:") === 0 && DATA_URI_TAGS[lcTag]) ;
80299
- else if (ALLOW_UNKNOWN_PROTOCOLS && !regExpTest(IS_SCRIPT_OR_DATA$1, stringReplace(value, ATTR_WHITESPACE$1, ""))) ;
80300
- else if (value) {
81242
+ return true;
81243
+ } catch (_2) {
81244
+ _removeAttribute(name, currentNode);
80301
81245
  return false;
80302
- } else ;
80303
- return true;
81246
+ }
80304
81247
  };
80305
- 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"]);
80306
- const _isBasicCustomElement = function _isBasicCustomElement2(tagName) {
80307
- 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;
80308
81251
  };
80309
- const _sanitizeAttributes = function _sanitizeAttributes2(currentNode) {
81252
+ const _sanitizeAttributes = function _sanitizeAttributes2(currentNode, root2) {
80310
81253
  _executeHooks(hooks.beforeSanitizeAttributes, currentNode, null);
81254
+ if (_handleHookDetachedNode(currentNode, root2)) return;
80311
81255
  const attributes2 = currentNode.attributes;
80312
- if (!attributes2 || _isClobbered(currentNode)) {
80313
- return;
80314
- }
81256
+ if (!attributes2 || _isClobbered(currentNode)) return;
81257
+ ALLOWED_ATTR = _forkSharedAllowlist(hooks.uponSanitizeAttribute, ALLOWED_ATTR, DEFAULT_ALLOWED_ATTR, SET_CONFIG_ALLOWED_ATTR);
80315
81258
  const hookEvent = {
80316
81259
  attrName: "",
80317
81260
  attrValue: "",
@@ -80320,12 +81263,14 @@ html body {
80320
81263
  forceKeepAttr: void 0
80321
81264
  };
80322
81265
  let l2 = attributes2.length;
81266
+ const lcTag = transformCaseFunc(currentNode.nodeName);
80323
81267
  while (l2--) {
80324
81268
  const attr = attributes2[l2];
80325
81269
  const name = attr.name, namespaceURI = attr.namespaceURI, attrValue = attr.value;
80326
81270
  const lcName = transformCaseFunc(name);
80327
81271
  const initValue = attrValue;
80328
81272
  let value = name === "value" ? initValue : stringTrim(initValue);
81273
+ let recreatedNamedProp = false;
80329
81274
  hookEvent.attrName = lcName;
80330
81275
  hookEvent.attrValue = value;
80331
81276
  hookEvent.keepAttr = true;
@@ -80333,71 +81278,35 @@ html body {
80333
81278
  _executeHooks(hooks.uponSanitizeAttribute, currentNode, hookEvent);
80334
81279
  value = hookEvent.attrValue;
80335
81280
  if (SANITIZE_NAMED_PROPS && (lcName === "id" || lcName === "name") && stringIndexOf(value, SANITIZE_NAMED_PROPS_PREFIX) !== 0) {
80336
- _removeAttribute(name, currentNode);
81281
+ _removeAttribute(name, currentNode, attr);
80337
81282
  value = SANITIZE_NAMED_PROPS_PREFIX + value;
81283
+ recreatedNamedProp = true;
80338
81284
  }
80339
- if (SAFE_FOR_XML && regExpTest(/((--!?|])>)|<\/(style|script|title|xmp|textarea|noscript|iframe|noembed|noframes)/i, value)) {
80340
- _removeAttribute(name, currentNode);
80341
- continue;
80342
- }
80343
- if (lcName === "attributename" && stringMatch(value, "href")) {
80344
- _removeAttribute(name, currentNode);
80345
- continue;
80346
- }
80347
- if (hookEvent.forceKeepAttr) {
81285
+ if (_isUnsafeAttributeValue(name, value)) {
81286
+ _removeAttribute(name, currentNode, attr);
80348
81287
  continue;
80349
81288
  }
81289
+ if (hookEvent.forceKeepAttr) continue;
80350
81290
  if (!hookEvent.keepAttr) {
80351
- _removeAttribute(name, currentNode);
81291
+ _removeAttribute(name, currentNode, attr);
80352
81292
  continue;
80353
81293
  }
80354
- if (!ALLOW_SELF_CLOSE_IN_ATTR && regExpTest(/\/>/i, value)) {
80355
- _removeAttribute(name, currentNode);
81294
+ if (!ALLOW_SELF_CLOSE_IN_ATTR && regExpTest(SELF_CLOSING_TAG, value)) {
81295
+ _removeAttribute(name, currentNode, attr);
80356
81296
  continue;
80357
81297
  }
80358
- if (SAFE_FOR_TEMPLATES) {
80359
- arrayForEach([MUSTACHE_EXPR$1, ERB_EXPR$1, TMPLIT_EXPR$1], (expr) => {
80360
- value = stringReplace(value, expr, " ");
80361
- });
80362
- }
80363
- const lcTag = transformCaseFunc(currentNode.nodeName);
81298
+ if (SAFE_FOR_TEMPLATES) value = _stripTemplateExpressions(value);
80364
81299
  if (!_isValidAttribute(lcTag, lcName, value)) {
80365
- _removeAttribute(name, currentNode);
81300
+ _removeAttribute(name, currentNode, attr);
80366
81301
  continue;
80367
81302
  }
80368
- if (trustedTypesPolicy && typeof trustedTypes === "object" && typeof trustedTypes.getAttributeType === "function") {
80369
- if (namespaceURI) ;
80370
- else {
80371
- switch (trustedTypes.getAttributeType(lcTag, lcName)) {
80372
- case "TrustedHTML": {
80373
- value = trustedTypesPolicy.createHTML(value);
80374
- break;
80375
- }
80376
- case "TrustedScriptURL": {
80377
- value = trustedTypesPolicy.createScriptURL(value);
80378
- break;
80379
- }
80380
- }
80381
- }
80382
- }
81303
+ value = _applyTrustedTypesToAttribute(lcTag, lcName, namespaceURI, value);
80383
81304
  if (value !== initValue) {
80384
- try {
80385
- if (namespaceURI) {
80386
- currentNode.setAttributeNS(namespaceURI, name, value);
80387
- } else {
80388
- currentNode.setAttribute(name, value);
80389
- }
80390
- if (_isClobbered(currentNode)) {
80391
- _forceRemove(currentNode);
80392
- } else {
80393
- arrayPop(DOMPurify.removed);
80394
- }
80395
- } catch (_2) {
80396
- _removeAttribute(name, currentNode);
80397
- }
81305
+ if (_setAttributeValue(currentNode, name, namespaceURI, value) && recreatedNamedProp) arrayPop(DOMPurify.removed);
80398
81306
  }
80399
81307
  }
80400
81308
  _executeHooks(hooks.afterSanitizeAttributes, currentNode, null);
81309
+ _handleHookDetachedNode(currentNode, root2);
80401
81310
  };
80402
81311
  const _sanitizeShadowDOM2 = function _sanitizeShadowDOM(fragment) {
80403
81312
  let shadowNode = null;
@@ -80405,33 +81314,58 @@ html body {
80405
81314
  _executeHooks(hooks.beforeSanitizeShadowDOM, fragment, null);
80406
81315
  while (shadowNode = shadowIterator.nextNode()) {
80407
81316
  _executeHooks(hooks.uponSanitizeShadowNode, shadowNode, null);
80408
- _sanitizeElements(shadowNode);
80409
- _sanitizeAttributes(shadowNode);
80410
- if (_isDocumentFragment(shadowNode.content)) {
80411
- _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
+ }
80412
81326
  }
80413
81327
  }
81328
+ if (SAFE_FOR_TEMPLATES) _scrubOwnCharacterData(fragment);
80414
81329
  _executeHooks(hooks.afterSanitizeShadowDOM, fragment, null);
80415
81330
  };
80416
- const _sanitizeAttachedShadowRoots2 = function _sanitizeAttachedShadowRoots(root2) {
80417
- const nodeType = getNodeType ? getNodeType(root2) : root2.nodeType;
80418
- if (nodeType === NODE_TYPE.element) {
80419
- const sr = getShadowRoot2 ? getShadowRoot2(root2) : root2.shadowRoot;
80420
- if (_isDocumentFragment(sr)) {
80421
- _sanitizeAttachedShadowRoots2(sr);
80422
- _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
+ });
80423
81368
  }
80424
- }
80425
- const childNodes = getChildNodes ? getChildNodes(root2) : root2.childNodes;
80426
- if (!childNodes) {
80427
- return;
80428
- }
80429
- const snapshot = [];
80430
- arrayForEach(childNodes, (child) => {
80431
- arrayPush(snapshot, child);
80432
- });
80433
- for (const child of snapshot) {
80434
- _sanitizeAttachedShadowRoots2(child);
80435
81369
  }
80436
81370
  };
80437
81371
  DOMPurify.sanitize = function(dirty) {
@@ -80441,127 +81375,118 @@ html body {
80441
81375
  let currentNode = null;
80442
81376
  let returnNode = null;
80443
81377
  IS_EMPTY_INPUT = !dirty;
80444
- if (IS_EMPTY_INPUT) {
80445
- dirty = "<!-->";
80446
- }
81378
+ if (IS_EMPTY_INPUT) dirty = "<!-->";
80447
81379
  if (typeof dirty !== "string" && !_isNode(dirty)) {
80448
81380
  dirty = stringifyValue(dirty);
80449
- if (typeof dirty !== "string") {
80450
- throw typeErrorCreate("dirty is not a string, aborting");
80451
- }
80452
- }
80453
- if (!DOMPurify.isSupported) {
80454
- return dirty;
80455
- }
80456
- if (!SET_CONFIG) {
80457
- _parseConfig(cfg);
80458
- }
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);
80459
81390
  DOMPurify.removed = [];
80460
- if (typeof dirty === "string") {
80461
- IN_PLACE = false;
80462
- }
80463
- if (IN_PLACE) {
80464
- 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);
80465
81397
  if (typeof nn === "string") {
80466
81398
  const tagName = transformCaseFunc(nn);
80467
81399
  if (!ALLOWED_TAGS[tagName] || FORBID_TAGS[tagName]) {
81400
+ _neutralizeRoot(dirty);
80468
81401
  throw typeErrorCreate("root node is forbidden and cannot be sanitized in-place");
80469
81402
  }
80470
81403
  }
80471
81404
  if (_isClobbered(dirty)) {
81405
+ _neutralizeRoot(dirty);
80472
81406
  throw typeErrorCreate("root node is clobbered and cannot be sanitized in-place");
80473
81407
  }
80474
- _sanitizeAttachedShadowRoots2(dirty);
81408
+ inPlaceNodes = _collectLiveNodes(dirty);
81409
+ IN_PLACE_VISITED = setCreate();
80475
81410
  } else if (_isNode(dirty)) {
80476
81411
  body = _initDocument("<!---->");
80477
81412
  importedNode = body.ownerDocument.importNode(dirty, true);
80478
- if (importedNode.nodeType === NODE_TYPE.element && importedNode.nodeName === "BODY") {
80479
- body = importedNode;
80480
- } else if (importedNode.nodeName === "HTML") {
80481
- body = importedNode;
80482
- } else {
80483
- body.appendChild(importedNode);
80484
- }
80485
- _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);
80486
81417
  } else {
80487
- if (!RETURN_DOM && !SAFE_FOR_TEMPLATES && !WHOLE_DOCUMENT && // eslint-disable-next-line unicorn/prefer-includes
80488
- dirty.indexOf("<") === -1) {
80489
- return trustedTypesPolicy && RETURN_TRUSTED_TYPE ? trustedTypesPolicy.createHTML(dirty) : dirty;
80490
- }
81418
+ if (!RETURN_DOM && !SAFE_FOR_TEMPLATES && !WHOLE_DOCUMENT && dirty.indexOf("<") === -1) return trustedTypesPolicy && RETURN_TRUSTED_TYPE ? _createTrustedHTML(dirty) : dirty;
80491
81419
  body = _initDocument(dirty);
80492
- if (!body) {
80493
- return RETURN_DOM ? null : RETURN_TRUSTED_TYPE ? emptyHTML : "";
80494
- }
81420
+ if (!body) return RETURN_DOM ? null : RETURN_TRUSTED_TYPE ? emptyHTML : "";
80495
81421
  }
80496
- if (body && FORCE_BODY) {
80497
- _forceRemove(body.firstChild);
80498
- }
80499
- const nodeIterator = _createNodeIterator(IN_PLACE ? dirty : body);
80500
- while (currentNode = nodeIterator.nextNode()) {
80501
- _sanitizeElements(currentNode);
80502
- _sanitizeAttributes(currentNode);
80503
- if (_isDocumentFragment(currentNode.content)) {
80504
- _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);
80505
81437
  }
81438
+ throw error;
81439
+ } finally {
81440
+ IN_PLACE_VISITED = outerVisited;
80506
81441
  }
80507
- if (IN_PLACE) {
80508
- if (SAFE_FOR_TEMPLATES) {
80509
- _scrubTemplateExpressions(dirty);
80510
- }
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);
80511
81445
  return dirty;
80512
81446
  }
80513
81447
  if (RETURN_DOM) {
80514
- if (SAFE_FOR_TEMPLATES) {
80515
- _scrubTemplateExpressions(body);
80516
- }
81448
+ if (SAFE_FOR_TEMPLATES) _scrubTemplateExpressions2(body);
80517
81449
  if (RETURN_DOM_FRAGMENT) {
80518
81450
  returnNode = createDocumentFragment.call(body.ownerDocument);
80519
- while (body.firstChild) {
80520
- returnNode.appendChild(body.firstChild);
80521
- }
80522
- } else {
80523
- returnNode = body;
80524
- }
80525
- if (ALLOWED_ATTR.shadowroot || ALLOWED_ATTR.shadowrootmode) {
80526
- returnNode = importNode.call(originalDocument, returnNode, true);
80527
- }
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);
80528
81454
  return returnNode;
80529
81455
  }
80530
81456
  let serializedHTML = WHOLE_DOCUMENT ? body.outerHTML : body.innerHTML;
80531
- if (WHOLE_DOCUMENT && ALLOWED_TAGS["!doctype"] && body.ownerDocument && body.ownerDocument.doctype && body.ownerDocument.doctype.name && regExpTest(DOCTYPE_NAME, body.ownerDocument.doctype.name)) {
80532
- serializedHTML = "<!DOCTYPE " + body.ownerDocument.doctype.name + ">\n" + serializedHTML;
80533
- }
80534
- if (SAFE_FOR_TEMPLATES) {
80535
- arrayForEach([MUSTACHE_EXPR$1, ERB_EXPR$1, TMPLIT_EXPR$1], (expr) => {
80536
- serializedHTML = stringReplace(serializedHTML, expr, " ");
80537
- });
80538
- }
80539
- 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;
80540
81460
  };
80541
81461
  DOMPurify.setConfig = function() {
80542
81462
  let cfg = arguments.length > 0 && arguments[0] !== void 0 ? arguments[0] : {};
80543
81463
  _parseConfig(cfg);
80544
81464
  SET_CONFIG = true;
81465
+ SET_CONFIG_ALLOWED_TAGS = ALLOWED_TAGS;
81466
+ SET_CONFIG_ALLOWED_ATTR = ALLOWED_ATTR;
80545
81467
  };
80546
81468
  DOMPurify.clearConfig = function() {
80547
81469
  CONFIG = null;
80548
81470
  SET_CONFIG = false;
81471
+ SET_CONFIG_ALLOWED_TAGS = null;
81472
+ SET_CONFIG_ALLOWED_ATTR = null;
81473
+ trustedTypesPolicy = defaultTrustedTypesPolicy;
81474
+ emptyHTML = "";
80549
81475
  };
80550
81476
  DOMPurify.isValidAttribute = function(tag, attr, value) {
80551
- if (!CONFIG) {
80552
- _parseConfig({});
80553
- }
81477
+ if (!CONFIG) _parseConfig({});
80554
81478
  const lcTag = transformCaseFunc(tag);
80555
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;
80556
81481
  return _isValidAttribute(lcTag, lcName, value);
80557
81482
  };
80558
81483
  DOMPurify.addHook = function(entryPoint, hookFunction) {
80559
- if (typeof hookFunction !== "function") {
80560
- return;
80561
- }
81484
+ if (typeof hookFunction !== "function") return;
81485
+ if (!objectHasOwnProperty(hooks, entryPoint)) return;
80562
81486
  arrayPush(hooks[entryPoint], hookFunction);
80563
81487
  };
80564
81488
  DOMPurify.removeHook = function(entryPoint, hookFunction) {
81489
+ if (!objectHasOwnProperty(hooks, entryPoint)) return;
80565
81490
  if (hookFunction !== void 0) {
80566
81491
  const index2 = arrayLastIndexOf(hooks[entryPoint], hookFunction);
80567
81492
  return index2 === -1 ? void 0 : arraySplice(hooks[entryPoint], index2, 1)[0];
@@ -80569,6 +81494,7 @@ html body {
80569
81494
  return arrayPop(hooks[entryPoint]);
80570
81495
  };
80571
81496
  DOMPurify.removeHooks = function(entryPoint) {
81497
+ if (!objectHasOwnProperty(hooks, entryPoint)) return;
80572
81498
  hooks[entryPoint] = [];
80573
81499
  };
80574
81500
  DOMPurify.removeAllHooks = function() {
@@ -80576,7 +81502,7 @@ html body {
80576
81502
  };
80577
81503
  return DOMPurify;
80578
81504
  }
80579
- var purify = createDOMPurify();
81505
+ var purify_default = createDOMPurify();
80580
81506
  const ReferencesTable = ({
80581
81507
  data,
80582
81508
  referenceIndexMap,
@@ -80603,7 +81529,7 @@ html body {
80603
81529
  {
80604
81530
  id: `col-reference-${s.id}`,
80605
81531
  dangerouslySetInnerHTML: {
80606
- __html: linkifyHtml(purify.sanitize(s.citation))
81532
+ __html: linkifyHtml(purify_default.sanitize(s.citation))
80607
81533
  }
80608
81534
  }
80609
81535
  ),
@@ -80779,7 +81705,7 @@ html body {
80779
81705
  hasRequiredHighcharts = 1;
80780
81706
  (function(module2, exports2) {
80781
81707
  !/**
80782
- * Highcharts JS v12.6.0 (2026-04-13)
81708
+ * Highcharts JS v12.6.2 (2026-09-21)
80783
81709
  * @module highcharts/highcharts
80784
81710
  *
80785
81711
  * (c) 2009-2026 Highsoft AS
@@ -80797,7 +81723,7 @@ html body {
80797
81723
  for (var i10 in e10) I2.o(e10, i10) && !I2.o(t10, i10) && Object.defineProperty(t10, i10, { enumerable: true, get: e10[i10] });
80798
81724
  }, I2.o = (t10, e10) => Object.prototype.hasOwnProperty.call(t10, e10);
80799
81725
  var D2 = {};
80800
- 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() {
80801
81727
  }, a.supportsPassiveEvents = (function() {
80802
81728
  let t10 = false;
80803
81729
  if (!a.isMS) {
@@ -80862,11 +81788,11 @@ html body {
80862
81788
  s10 !== e10 && (s10 == null ? void 0 : s10.destroy) && s10.destroy(), ((s10 == null ? void 0 : s10.destroy) || !i10) && delete t10[o3];
80863
81789
  });
80864
81790
  }
80865
- function Z2(t10) {
81791
+ function _2(t10) {
80866
81792
  var _a3;
80867
81793
  (_a3 = t10 == null ? void 0 : t10.parentElement) == null ? void 0 : _a3.removeChild(t10);
80868
81794
  }
80869
- function _2(t10, e10, i10, s10) {
81795
+ function Z2(t10, e10, i10, s10) {
80870
81796
  let o3 = {};
80871
81797
  return !(function t11(e11, o4, r3, a2) {
80872
81798
  let n3 = i10 ? o4 : e11;
@@ -81285,7 +82211,7 @@ html body {
81285
82211
  } }, { regex: /^#([a-f0-9]{2})([a-f0-9]{2})([a-f0-9]{2})([a-f0-9]{2})?$/i, parse: function(t10) {
81286
82212
  return [tv(t10[1], 16), tv(t10[2], 16), tv(t10[3], 16), V2(t10[4]) ? tv(t10[4], 16) / 255 : 1];
81287
82213
  } }], tU.useColorMix = (_h = tj.CSS) == null ? void 0 : _h.supports("color", "color-mix(in srgb,red,blue 9%)"), tU.None = new tU("");
81288
- let { parse: tZ } = tU, { win: t_ } = B2;
82214
+ let { parse: t_ } = tU, { win: tZ } = B2;
81289
82215
  class tK {
81290
82216
  constructor(t10, e10, i10) {
81291
82217
  this.pos = NaN, this.options = e10, this.elem = t10, this.prop = i10;
@@ -81311,7 +82237,7 @@ html body {
81311
82237
  run(t10, e10, i10) {
81312
82238
  let s10 = this, o3 = s10.options, r3 = function(t11) {
81313
82239
  return !r3.stopped && s10.step(t11);
81314
- }, a2 = t_.requestAnimationFrame || function(t11) {
82240
+ }, a2 = tZ.requestAnimationFrame || function(t11) {
81315
82241
  setTimeout(t11, 13);
81316
82242
  }, n3 = function() {
81317
82243
  for (let t11 = 0; t11 < tK.timers.length; t11++) tK.timers[t11]() || tK.timers.splice(t11--, 1);
@@ -81365,7 +82291,7 @@ html body {
81365
82291
  tK.prototype.strokeSetter.apply(this, arguments);
81366
82292
  }
81367
82293
  strokeSetter() {
81368
- 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);
81369
82295
  }
81370
82296
  }
81371
82297
  function tq(t10) {
@@ -81394,7 +82320,7 @@ html body {
81394
82320
  static filterUserAttributes(t10) {
81395
82321
  return tm(t10, (e10, i10) => {
81396
82322
  let s10 = true;
81397
- -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;"));
81398
82324
  }), t10;
81399
82325
  }
81400
82326
  static parseStyle(t10) {
@@ -81431,11 +82357,12 @@ html body {
81431
82357
  try {
81432
82358
  e10 = new DOMParser().parseFromString(t3 ? t3.createHTML(t10) : t10, "text/html");
81433
82359
  } catch {
82360
+ try {
82361
+ e10 = new DOMParser().parseFromString(t10, "text/html");
82362
+ } catch {
82363
+ }
81434
82364
  }
81435
- if (!e10) {
81436
- let i11 = Y2("div");
81437
- i11.innerHTML = t10, e10 = { body: i11 };
81438
- }
82365
+ e10 || ((e10 = B2.doc.implementation.createHTMLDocument("")).body.innerHTML = t10);
81439
82366
  let s10 = (t11, e11) => {
81440
82367
  let i11 = t11.nodeName.toLowerCase(), o3 = { tagName: i11 };
81441
82368
  "#text" === i11 && (o3.textContent = t11.textContent || "");
@@ -82076,7 +83003,7 @@ html body {
82076
83003
  let n3, h2;
82077
83004
  this.x = 0, this.y = 0;
82078
83005
  const l3 = this.createElement("svg").attr({ version: "1.1", class: "highcharts-root" }), d3 = l3.element;
82079
- 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() {
82080
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" });
82081
83008
  })(), this.unSubPixelFix = R(eR, "resize", n3));
82082
83009
  }
@@ -82360,7 +83287,7 @@ html body {
82360
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 })));
82361
83288
  });
82362
83289
  };
82363
- let eV = b2, { deg2rad: eU } = B2, eZ = class {
83290
+ let eV = b2, { deg2rad: eU } = B2, e_ = class {
82364
83291
  constructor(t10, e10, i10, s10, o3) {
82365
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();
82366
83293
  }
@@ -82429,7 +83356,7 @@ html body {
82429
83356
  let t10 = this.label, e10 = this.axis;
82430
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;
82431
83358
  }
82432
- }, { 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);
82433
83360
  q2(eJ, { xAxis: eK, yAxis: tu(eK, eq2) });
82434
83361
  class e22 {
82435
83362
  constructor(t10, e10, i10) {
@@ -82769,7 +83696,7 @@ html body {
82769
83696
  }
82770
83697
  generateTick(t10) {
82771
83698
  let e10 = this.ticks;
82772
- e10[t10] ? e10[t10].addLabel() : e10[t10] = new eZ(this, t10);
83699
+ e10[t10] ? e10[t10].addLabel() : e10[t10] = new e_(this, t10);
82773
83700
  }
82774
83701
  createGroups() {
82775
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);
@@ -82804,15 +83731,15 @@ html body {
82804
83731
  }
82805
83732
  renderMinorTick(t10, e10) {
82806
83733
  let i10 = this.minorTicks;
82807
- 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);
82808
83735
  }
82809
83736
  renderTick(t10, e10, i10) {
82810
83737
  var _a3;
82811
83738
  let s10 = this.isLinked, o3 = this.ticks;
82812
- (!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));
82813
83740
  }
82814
83741
  render() {
82815
- 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);
82816
83743
  if (i10.labelEdge.length = 0, i10.overlap = false, [d3, c2, p2].forEach(function(t11) {
82817
83744
  tm(t11, function(t12) {
82818
83745
  t12.isActive = false;
@@ -82830,7 +83757,7 @@ html body {
82830
83757
  i10.renderMinorTick(t11, r4);
82831
83758
  }), h2.length && (h2.forEach(function(t11, e11) {
82832
83759
  i10.renderTick(t11, e11, r4);
82833
- }), 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) {
82834
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);
82835
83762
  }), i10._addedPlotLB || (i10._addedPlotLB = true, (a2.plotLines || []).concat(a2.plotBands || []).forEach(function(t11) {
82836
83763
  i10.addPlotBandOrLine(t11);
@@ -82878,7 +83805,7 @@ html body {
82878
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();
82879
83806
  o3 = this.categories && !this.isRadial, this.crossShowTimer = tA(() => {
82880
83807
  let e11 = this.cross;
82881
- 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);
82882
83809
  }, (!l3 || "hidden" === l3.attr("visibility")) && a2.showDelay || 0);
82883
83810
  } else this.hideCrosshair();
82884
83811
  Q2(this, "afterDrawCrosshair", { e: t10, point: e10 });
@@ -83101,7 +84028,7 @@ html body {
83101
84028
  return (e10 = (e10 = [t10.headerFooterFormatter(i10[0])]).concat(t10.bodyFormatter(i10))).push(t10.headerFooterFormatter(i10[0], true)), e10;
83102
84029
  }
83103
84030
  destroy() {
83104
- 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);
83105
84032
  }
83106
84033
  getAnchor(t10, e10) {
83107
84034
  var _a3;
@@ -83424,9 +84351,10 @@ html body {
83424
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);
83425
84352
  }
83426
84353
  setNestedProperty(t10, e10, i10) {
83427
- return i10.split(".").reduce(function(t11, i11, s10, o3) {
83428
- let r3 = o3.length - 1 === s10;
83429
- 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];
83430
84358
  }, t10), t10;
83431
84359
  }
83432
84360
  shouldDraw() {
@@ -84012,7 +84940,7 @@ html body {
84012
84940
  let e12 = p2.reduce((t11, e13) => (t11[e13] = [], t11), {});
84013
84941
  for (m3 = 0; m3 < k2; m3++) {
84014
84942
  let i11 = this.pointClass.prototype.applyOptions.apply({ series: this }, [t10[m3]]);
84015
- 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]);
84016
84944
  }
84017
84945
  c2.setColumns(e12);
84018
84946
  }
@@ -84329,7 +85257,7 @@ html body {
84329
85257
  }
84330
85258
  update(t10, e10) {
84331
85259
  var _a3, _b3;
84332
- Q2(this, "update", { options: t10 = _2(t10, this.userOptions) });
85260
+ Q2(this, "update", { options: t10 = Z2(t10, this.userOptions) });
84333
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)));
84334
85262
  g3 = g3 || r3, u2 ? (p2.push.apply(p2, iH.keepPropsForPoints), false !== t10.visible && p2.push("area", "graph"), i10.parallelArrays.forEach(function(t11) {
84335
85263
  p2.push(t11 + "Data");
@@ -84426,7 +85354,7 @@ html body {
84426
85354
  return "number" != typeof this.y ? "" : t10(this.y, -1);
84427
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;
84428
85356
  let iX = iH, { animObject: iG, setAnimation: iF } = tQ, { registerEventOptions: iY } = eV, { composed: ij, marginNames: i$ } = B2, { distribute: iV } = er, { format: iU } = es;
84429
- class iZ {
85357
+ class i_ {
84430
85358
  constructor(t10, e10) {
84431
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() {
84432
85360
  this.legend.positionCheckboxes();
@@ -84467,7 +85395,7 @@ html body {
84467
85395
  destroyItem(t10) {
84468
85396
  let e10 = t10.legendItem || {};
84469
85397
  for (let t11 of ["group", "label", "line", "symbol"]) e10[t11] && (e10[t11] = e10[t11].destroy());
84470
- t10.checkbox = Z2(t10.checkbox), t10.legendItem = void 0;
85398
+ t10.checkbox = _2(t10.checkbox), t10.legendItem = void 0;
84471
85399
  }
84472
85400
  destroy() {
84473
85401
  for (let t10 of this.getAllItems()) this.destroyItem(t10);
@@ -84592,12 +85520,12 @@ html body {
84592
85520
  });
84593
85521
  }
84594
85522
  }
84595
- (c = iZ || (iZ = {})).compose = function(t10) {
85523
+ (c = i_ || (i_ = {})).compose = function(t10) {
84596
85524
  tk2(ij, "Core.Legend") && R(t10, "beforeMargins", function() {
84597
85525
  this.legend = new c(this, this.options.legend);
84598
85526
  });
84599
85527
  };
84600
- 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;
84601
85529
  class i8 {
84602
85530
  static chart(t10, e10, i10) {
84603
85531
  return new i8(t10, e10, i10);
@@ -84789,7 +85717,7 @@ html body {
84789
85717
  }), t10.setChartSize();
84790
85718
  }
84791
85719
  getOptions() {
84792
- return _2(this.userOptions, iQ);
85720
+ return Z2(this.userOptions, iQ);
84793
85721
  }
84794
85722
  reflow(t10) {
84795
85723
  var _a3, _b3;
@@ -84879,7 +85807,7 @@ html body {
84879
85807
  let { options: t11 } = e11, { labels: i11 } = t11;
84880
85808
  if (this.hasCartesianSeries && e11.horiz && e11.visible && i11.enabled && e11.series.length && "colorAxis" !== e11.coll && !this.polar) {
84881
85809
  r3 = t11.tickLength, e11.createGroups();
84882
- 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);
84883
85811
  if (s11.destroy(), o4 && tb(i11.reserveSpace, !tl(t11.crossing)) && (r3 = o4.getBBox().height + i11.distance + Math.max(t11.offset || 0, 0)), r3) {
84884
85812
  o4 == null ? void 0 : o4.destroy();
84885
85813
  break;
@@ -84903,13 +85831,16 @@ html body {
84903
85831
  addCredits(t10) {
84904
85832
  var _a3;
84905
85833
  let e10 = this, i10 = tu(true, this.options.credits, t10);
84906
- i10.enabled && !this.credits && (this.credits = this.renderer.text(i10.text + (this.mapCredits || ""), 0, 0).addClass("highcharts-credits").on("click", function(t11) {
84907
- Q2(e10, "creditsClick", t11, () => {
84908
- i10.href && (i9.location.href = i10.href);
84909
- });
84910
- }).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) {
84911
- e10.credits = e10.credits.destroy(), e10.addCredits(t11);
84912
- });
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
+ }
84913
85844
  }
84914
85845
  destroy() {
84915
85846
  var _a3, _b3;
@@ -84919,7 +85850,7 @@ html body {
84919
85850
  ["title", "subtitle", "chartBackground", "plotBackground", "plotBGImage", "plotBorder", "seriesGroup", "clipRect", "credits", "pointer", "rangeSelector", "legend", "resetZoomButton", "tooltip", "renderer"].forEach((t11) => {
84920
85851
  var _a4, _b4;
84921
85852
  e10[t11] = (_b4 = (_a4 = e10[t11]) == null ? void 0 : _a4.destroy) == null ? void 0 : _b4.call(_a4);
84922
- }), 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) {
84923
85854
  delete e10[i11];
84924
85855
  });
84925
85856
  }
@@ -84975,7 +85906,7 @@ html body {
84975
85906
  }
84976
85907
  update(t10, e10, i10, s10) {
84977
85908
  let o3, r3, a2, n3 = this, h2 = { credits: "addCredits", title: "setTitle", subtitle: "setSubtitle", caption: "setCaption" }, l3 = t10.isResponsiveOptions, d3 = [];
84978
- 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);
84979
85910
  let c2 = t10.chart;
84980
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) {
84981
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));
@@ -85630,7 +86561,7 @@ html body {
85630
86561
  let x3 = [["M", u2, f2]];
85631
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;
85632
86563
  } } });
85633
- let { getStartAndEndRadians: sZ } = s$, { noop: s_ } = B2;
86564
+ let { getStartAndEndRadians: s_ } = s$, { noop: sZ } = B2;
85634
86565
  class sK extends iX {
85635
86566
  animate(t10) {
85636
86567
  let e10 = this, i10 = e10.points, s10 = e10.startAngleRad;
@@ -85673,7 +86604,7 @@ html body {
85673
86604
  }
85674
86605
  translate(t10) {
85675
86606
  Q2(this, "translate"), this.generatePoints();
85676
- 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;
85677
86608
  for (t10 || (this.center = t10 = this.getCenter()), u2 = 0; u2 < h2; u2++) {
85678
86609
  f2 = a2[u2], l3 = o3 + m3 * r3, f2.isValid() && (!n3 || f2.visible) && (m3 += f2.percentage / 100), d3 = o3 + m3 * r3;
85679
86610
  let e11 = { x: t10[0], y: t10[1], r: t10[2] / 2, innerR: t10[3] / 2, start: l3, end: d3 };
@@ -85689,7 +86620,7 @@ html body {
85689
86620
  }
85690
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() {
85691
86622
  return this.isNull ? void 0 : this.name;
85692
- }, 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);
85693
86624
  let { composed: sq, noop: sJ } = B2, { distribute: sQ } = er, { series: s0 } = iO;
85694
86625
  !(function(t10) {
85695
86626
  let e10 = { radialDistributionY: function(t11, e11) {
@@ -85892,14 +86823,14 @@ html body {
85892
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));
85893
86824
  a2.isResponsiveOptions = true, o3 = o3.toString() || void 0;
85894
86825
  let n3 = s10 == null ? void 0 : s10.ruleIds;
85895
- 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);
85896
86827
  }
85897
86828
  (E2 || (E2 = {})).compose = function(t10) {
85898
86829
  let e10 = t10.prototype;
85899
86830
  return e10.matchResponsiveRule || q2(e10, { matchResponsiveRule: oo, setResponsive: or }), t10;
85900
86831
  };
85901
86832
  let oa = E2;
85902
- 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) {
85903
86834
  return t2 = tb(e10, t2);
85904
86835
  }, B2.wrap = function(t10, e10, i10) {
85905
86836
  let s10 = t10[e10];
@@ -85915,7 +86846,7 @@ html body {
85915
86846
  let o3 = i10.prototype.symbols;
85916
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;
85917
86848
  }
85918
- }, 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) {
85919
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) => {
85920
86851
  for (let i11 of t11) if (s2({ x: i11[0], y: i11[1] }, e11)) return true;
85921
86852
  return false;
@@ -85982,7 +86913,7 @@ html body {
85982
86913
  hasRequiredExporting = 1;
85983
86914
  (function(module2, exports2) {
85984
86915
  !/**
85985
- * Highcharts JS v12.6.0 (2026-04-13)
86916
+ * Highcharts JS v12.6.2 (2026-09-21)
85986
86917
  * @module highcharts/modules/exporting
85987
86918
  * @requires highcharts
85988
86919
  *
@@ -86057,7 +86988,7 @@ html body {
86057
86988
  w2.location.href = e3;
86058
86989
  }
86059
86990
  }
86060
- 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() {
86061
86992
  var _a2;
86062
86993
  (_a2 = this.fullscreen) == null ? void 0 : _a2.toggle();
86063
86994
  } }, printChart: { textKey: "printChart", onclick: function() {
@@ -88409,7 +89340,7 @@ Please report this to https://github.com/markedjs/marked.`, e2) {
88409
89340
  "span",
88410
89341
  {
88411
89342
  dangerouslySetInnerHTML: {
88412
- __html: purify.sanitize(g.parse(source))
89343
+ __html: purify_default.sanitize(g.parse(source))
88413
89344
  }
88414
89345
  }
88415
89346
  );
@@ -88821,7 +89752,7 @@ Please report this to https://github.com/markedjs/marked.`, e2) {
88821
89752
  {
88822
89753
  dangerouslySetInnerHTML: {
88823
89754
  __html: linkifyHtml(
88824
- purify.sanitize(get(taxon, "name.publishedIn.citation"))
89755
+ purify_default.sanitize(get(taxon, "name.publishedIn.citation"))
88825
89756
  )
88826
89757
  }
88827
89758
  }
@@ -89523,7 +90454,7 @@ Please report this to https://github.com/markedjs/marked.`, e2) {
89523
90454
  "span",
89524
90455
  {
89525
90456
  dangerouslySetInnerHTML: {
89526
- __html: purify.sanitize(g.parse(data.description))
90457
+ __html: purify_default.sanitize(g.parse(data.description))
89527
90458
  }
89528
90459
  }
89529
90460
  ) : "" }),