@svgedit/svgcanvas 7.2.2 → 7.2.3

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.
package/dist/svgcanvas.js CHANGED
@@ -2130,14 +2130,14 @@ function findPos(obj) {
2130
2130
  top: curtop
2131
2131
  };
2132
2132
  }
2133
- function isObject$a(item) {
2133
+ function isObject$c(item) {
2134
2134
  return item && typeof item === 'object' && !Array.isArray(item);
2135
2135
  }
2136
2136
  function mergeDeep(target, source) {
2137
2137
  const output = Object.assign({}, target);
2138
- if (isObject$a(target) && isObject$a(source)) {
2138
+ if (isObject$c(target) && isObject$c(source)) {
2139
2139
  Object.keys(source).forEach(key => {
2140
- if (isObject$a(source[key])) {
2140
+ if (isObject$c(source[key])) {
2141
2141
  if (!(key in target)) {
2142
2142
  Object.assign(output, {
2143
2143
  [key]: source[key]
@@ -2163,7 +2163,7 @@ function mergeDeep(target, source) {
2163
2163
  */
2164
2164
  function getClosest(elem, selector) {
2165
2165
  const firstChar = selector.charAt(0);
2166
- const supports = ('classList' in document.documentElement);
2166
+ const supports = 'classList' in document.documentElement;
2167
2167
  let attribute;
2168
2168
  let value;
2169
2169
  // If selector is a data attribute, split attribute from value
@@ -2259,11 +2259,10 @@ function getParents(elem, selector) {
2259
2259
  function getParentsUntil(elem, parent, selector) {
2260
2260
  const parents = [];
2261
2261
  const parentType = parent?.charAt(0);
2262
- const selectorType = selector?.selector.charAt(0);
2263
2262
  // Get matches
2264
2263
  for (; elem && elem !== document; elem = elem.parentNode) {
2265
2264
  // Check if parent has been reached
2266
- if (parent) {
2265
+ {
2267
2266
  // If parent is a class
2268
2267
  if (parentType === '.') {
2269
2268
  if (elem.classList.contains(parent.substr(1))) {
@@ -2287,30 +2286,7 @@ function getParentsUntil(elem, parent, selector) {
2287
2286
  break;
2288
2287
  }
2289
2288
  }
2290
- if (selector) {
2291
- // If selector is a class
2292
- if (selectorType === '.') {
2293
- if (elem.classList.contains(selector.substr(1))) {
2294
- parents.push(elem);
2295
- }
2296
- }
2297
- // If selector is an ID
2298
- if (selectorType === '#') {
2299
- if (elem.id === selector.substr(1)) {
2300
- parents.push(elem);
2301
- }
2302
- }
2303
- // If selector is a data attribute
2304
- if (selectorType === '[') {
2305
- if (elem.hasAttribute(selector.substr(1, selector.length - 1))) {
2306
- parents.push(elem);
2307
- }
2308
- }
2309
- // If selector is a tag
2310
- if (elem.tagName.toLowerCase() === selector) {
2311
- parents.push(elem);
2312
- }
2313
- } else {
2289
+ {
2314
2290
  parents.push(elem);
2315
2291
  }
2316
2292
  }
@@ -7563,6 +7539,16 @@ function findLayerNameInGroup(group) {
7563
7539
  return sel ? sel.textContent : '';
7564
7540
  }
7565
7541
 
7542
+ /**
7543
+ * Verify the classList of the given element : if the classList contains 'layer', return true, then return false
7544
+ *
7545
+ * @param {Element} element - The given element
7546
+ * @returns {boolean} Return true if the classList contains 'layer' then return false
7547
+ */
7548
+ function isLayerElement(element) {
7549
+ return element.classList.contains('layer');
7550
+ }
7551
+
7566
7552
  /**
7567
7553
  * Given a set of names, return a new unique name.
7568
7554
  * @param {string[]} existingLayerNames - Existing layer names.
@@ -7582,69 +7568,69 @@ function getNewLayerName(existingLayerNames) {
7582
7568
  */
7583
7569
  class Drawing {
7584
7570
  /**
7585
- * @param {SVGSVGElement} svgElem - The SVG DOM Element that this JS object
7586
- * encapsulates. If the svgElem has a se:nonce attribute on it, then
7587
- * IDs will use the nonce as they are generated.
7588
- * @param {string} [optIdPrefix=svg_] - The ID prefix to use.
7589
- * @throws {Error} If not initialized with an SVG element
7590
- */
7571
+ * @param {SVGSVGElement} svgElem - The SVG DOM Element that this JS object
7572
+ * encapsulates. If the svgElem has a se:nonce attribute on it, then
7573
+ * IDs will use the nonce as they are generated.
7574
+ * @param {string} [optIdPrefix=svg_] - The ID prefix to use.
7575
+ * @throws {Error} If not initialized with an SVG element
7576
+ */
7591
7577
  constructor(svgElem, optIdPrefix) {
7592
7578
  if (!svgElem || !svgElem.tagName || !svgElem.namespaceURI || svgElem.tagName !== 'svg' || svgElem.namespaceURI !== NS.SVG) {
7593
7579
  throw new Error('Error: svgedit.draw.Drawing instance initialized without a <svg> element');
7594
7580
  }
7595
7581
 
7596
7582
  /**
7597
- * The SVG DOM Element that represents this drawing.
7598
- * @type {SVGSVGElement}
7599
- */
7583
+ * The SVG DOM Element that represents this drawing.
7584
+ * @type {SVGSVGElement}
7585
+ */
7600
7586
  this.svgElem_ = svgElem;
7601
7587
 
7602
7588
  /**
7603
- * The latest object number used in this drawing.
7604
- * @type {Integer}
7605
- */
7589
+ * The latest object number used in this drawing.
7590
+ * @type {Integer}
7591
+ */
7606
7592
  this.obj_num = 0;
7607
7593
 
7608
7594
  /**
7609
- * The prefix to prepend to each element id in the drawing.
7610
- * @type {string}
7611
- */
7595
+ * The prefix to prepend to each element id in the drawing.
7596
+ * @type {string}
7597
+ */
7612
7598
  this.idPrefix = optIdPrefix || 'svg_';
7613
7599
 
7614
7600
  /**
7615
- * An array of released element ids to immediately reuse.
7616
- * @type {Integer[]}
7617
- */
7601
+ * An array of released element ids to immediately reuse.
7602
+ * @type {Integer[]}
7603
+ */
7618
7604
  this.releasedNums = [];
7619
7605
 
7620
7606
  /**
7621
- * The z-ordered array of Layer objects. Each layer has a name
7622
- * and group element.
7623
- * The first layer is the one at the bottom of the rendering.
7624
- * @type {Layer[]}
7625
- */
7607
+ * The z-ordered array of Layer objects. Each layer has a name
7608
+ * and group element.
7609
+ * The first layer is the one at the bottom of the rendering.
7610
+ * @type {Layer[]}
7611
+ */
7626
7612
  this.all_layers = [];
7627
7613
 
7628
7614
  /**
7629
- * Map of all_layers by name.
7630
- *
7631
- * Note: Layers are ordered, but referenced externally by name; so, we need both container
7632
- * types depending on which function is called (i.e. all_layers and layer_map).
7633
- *
7634
- * @type {PlainObject<string, Layer>}
7635
- */
7615
+ * Map of all_layers by name.
7616
+ *
7617
+ * Note: Layers are ordered, but referenced externally by name; so, we need both container
7618
+ * types depending on which function is called (i.e. all_layers and layer_map).
7619
+ *
7620
+ * @type {PlainObject<string, Layer>}
7621
+ */
7636
7622
  this.layer_map = {};
7637
7623
 
7638
7624
  /**
7639
- * The current layer being used.
7640
- * @type {Layer}
7641
- */
7625
+ * The current layer being used.
7626
+ * @type {Layer}
7627
+ */
7642
7628
  this.current_layer = null;
7643
7629
 
7644
7630
  /**
7645
- * The nonce to use to uniquely identify elements across drawings.
7646
- * @type {!string}
7647
- */
7631
+ * The nonce to use to uniquely identify elements across drawings.
7632
+ * @type {!string}
7633
+ */
7648
7634
  this.nonce_ = '';
7649
7635
  const n = this.svgElem_.getAttributeNS(NS.SE, 'nonce');
7650
7636
  // If already set in the DOM, use the nonce throughout the document
@@ -7659,7 +7645,7 @@ class Drawing {
7659
7645
  /**
7660
7646
  * @param {string} id Element ID to retrieve
7661
7647
  * @returns {Element} SVG element within the root SVGSVGElement
7662
- */
7648
+ */
7663
7649
  getElem_(id) {
7664
7650
  if (this.svgElem_.querySelector) {
7665
7651
  // querySelector lookup
@@ -7753,7 +7739,7 @@ class Drawing {
7753
7739
  * that client code will do this.
7754
7740
  * @param {string} id - The id to release.
7755
7741
  * @returns {boolean} True if the id was valid to be released, false otherwise.
7756
- */
7742
+ */
7757
7743
  releaseId(id) {
7758
7744
  // confirm if this is a valid id for this Document, else return false
7759
7745
  const front = this.idPrefix + (this.nonce_ ? this.nonce_ + '_' : '');
@@ -7777,7 +7763,7 @@ class Drawing {
7777
7763
  /**
7778
7764
  * Returns the number of layers in the current drawing.
7779
7765
  * @returns {Integer} The number of layers in the current drawing.
7780
- */
7766
+ */
7781
7767
  getNumLayers() {
7782
7768
  return this.all_layers.length;
7783
7769
  }
@@ -7786,7 +7772,7 @@ class Drawing {
7786
7772
  * Check if layer with given name already exists.
7787
7773
  * @param {string} name - The layer name to check
7788
7774
  * @returns {boolean}
7789
- */
7775
+ */
7790
7776
  hasLayer(name) {
7791
7777
  return this.layer_map[name] !== undefined;
7792
7778
  }
@@ -7795,7 +7781,7 @@ class Drawing {
7795
7781
  * Returns the name of the ith layer. If the index is out of range, an empty string is returned.
7796
7782
  * @param {Integer} i - The zero-based index of the layer you are querying.
7797
7783
  * @returns {string} The name of the ith layer (or the empty string if none found)
7798
- */
7784
+ */
7799
7785
  getLayerName(i) {
7800
7786
  return i >= 0 && i < this.getNumLayers() ? this.all_layers[i].getName() : '';
7801
7787
  }
@@ -7821,7 +7807,7 @@ class Drawing {
7821
7807
  * Returns the name of the currently selected layer. If an error occurs, an empty string
7822
7808
  * is returned.
7823
7809
  * @returns {string} The name of the currently active layer (or the empty string if none found).
7824
- */
7810
+ */
7825
7811
  getCurrentLayerName() {
7826
7812
  return this.current_layer ? this.current_layer.getName() : '';
7827
7813
  }
@@ -7883,9 +7869,9 @@ class Drawing {
7883
7869
  }
7884
7870
 
7885
7871
  /**
7886
- * @param {module:history.HistoryRecordingService} hrService
7887
- * @returns {void}
7888
- */
7872
+ * @param {module:history.HistoryRecordingService} hrService
7873
+ * @returns {void}
7874
+ */
7889
7875
  mergeLayer(hrService) {
7890
7876
  const currentGroup = this.current_layer.getGroup();
7891
7877
  const prevGroup = currentGroup.previousElementSibling;
@@ -7921,9 +7907,9 @@ class Drawing {
7921
7907
  }
7922
7908
 
7923
7909
  /**
7924
- * @param {module:history.HistoryRecordingService} hrService
7925
- * @returns {void}
7926
- */
7910
+ * @param {module:history.HistoryRecordingService} hrService
7911
+ * @returns {void}
7912
+ */
7927
7913
  mergeAllLayers(hrService) {
7928
7914
  // Set the current layer to the last layer.
7929
7915
  this.current_layer = this.all_layers[this.all_layers.length - 1];
@@ -7984,7 +7970,7 @@ class Drawing {
7984
7970
  * Updates layer system and sets the current layer to the
7985
7971
  * top-most layer (last `<g>` child of this drawing).
7986
7972
  * @returns {void}
7987
- */
7973
+ */
7988
7974
  identifyLayers() {
7989
7975
  this.all_layers = [];
7990
7976
  this.layer_map = {};
@@ -8000,8 +7986,8 @@ class Drawing {
8000
7986
  if (child?.nodeType === 1) {
8001
7987
  if (child.tagName === 'g') {
8002
7988
  childgroups = true;
8003
- const name = findLayerNameInGroup(child);
8004
- if (name) {
7989
+ if (isLayerElement(child)) {
7990
+ const name = findLayerNameInGroup(child);
8005
7991
  layernames.push(name);
8006
7992
  layer = new Layer(name, child);
8007
7993
  this.all_layers.push(layer);
@@ -8036,7 +8022,7 @@ class Drawing {
8036
8022
  * @param {module:history.HistoryRecordingService} hrService - History recording service
8037
8023
  * @returns {SVGGElement} The SVGGElement of the new layer, which is
8038
8024
  * also the current layer of this drawing.
8039
- */
8025
+ */
8040
8026
  createLayer(name, hrService) {
8041
8027
  if (this.current_layer) {
8042
8028
  this.current_layer.deactivate();
@@ -8066,7 +8052,7 @@ class Drawing {
8066
8052
  * @param {module:history.HistoryRecordingService} hrService - History recording service
8067
8053
  * @returns {SVGGElement} The SVGGElement of the new layer, which is
8068
8054
  * also the current layer of this drawing.
8069
- */
8055
+ */
8070
8056
  cloneLayer(name, hrService) {
8071
8057
  if (!this.current_layer) {
8072
8058
  return null;
@@ -8113,7 +8099,7 @@ class Drawing {
8113
8099
  * then this function returns `false`.
8114
8100
  * @param {string} layerName - The name of the layer which you want to query.
8115
8101
  * @returns {boolean} The visibility state of the layer, or `false` if the layer name was invalid.
8116
- */
8102
+ */
8117
8103
  getLayerVisibility(layerName) {
8118
8104
  const layer = this.layer_map[layerName];
8119
8105
  return layer ? layer.isVisible() : false;
@@ -8127,7 +8113,7 @@ class Drawing {
8127
8113
  * @param {boolean} bVisible - Whether the layer should be visible
8128
8114
  * @returns {?SVGGElement} The SVGGElement representing the layer if the
8129
8115
  * `layerName` was valid, otherwise `null`.
8130
- */
8116
+ */
8131
8117
  setLayerVisibility(layerName, bVisible) {
8132
8118
  if (typeof bVisible !== 'boolean') {
8133
8119
  return null;
@@ -8145,7 +8131,7 @@ class Drawing {
8145
8131
  * @param {string} layerName - name of the layer on which to get the opacity
8146
8132
  * @returns {?Float} The opacity value of the given layer. This will be a value between 0.0 and 1.0, or `null`
8147
8133
  * if `layerName` is not a valid layer
8148
- */
8134
+ */
8149
8135
  getLayerOpacity(layerName) {
8150
8136
  const layer = this.layer_map[layerName];
8151
8137
  if (!layer) {
@@ -8165,7 +8151,7 @@ class Drawing {
8165
8151
  * @param {string} layerName - Name of the layer on which to set the opacity
8166
8152
  * @param {Float} opacity - A float value in the range 0.0-1.0
8167
8153
  * @returns {void}
8168
- */
8154
+ */
8169
8155
  setLayerOpacity(layerName, opacity) {
8170
8156
  if (typeof opacity !== 'number' || opacity < 0.0 || opacity > 1.0) {
8171
8157
  return;
@@ -8210,8 +8196,8 @@ const randomizeIds = function (enableRandomization, currentDrawing) {
8210
8196
  // Layer API Functions
8211
8197
 
8212
8198
  /**
8213
- * Group: Layers.
8214
- */
8199
+ * Group: Layers.
8200
+ */
8215
8201
 
8216
8202
  /**
8217
8203
  * @see {@link https://api.jquery.com/jQuery.data/}
@@ -8231,11 +8217,11 @@ const randomizeIds = function (enableRandomization, currentDrawing) {
8231
8217
  * @function module:draw.DrawCanvasInit#setCurrentGroup
8232
8218
  * @param {Element} cg
8233
8219
  * @returns {void}
8234
- */
8220
+ */
8235
8221
  /**
8236
8222
  * @function module:draw.DrawCanvasInit#getSelectedElements
8237
8223
  * @returns {Element[]} the array with selected DOM elements
8238
- */
8224
+ */
8239
8225
  /**
8240
8226
  * @function module:draw.DrawCanvasInit#getSvgContent
8241
8227
  * @returns {SVGSVGElement}
@@ -8248,7 +8234,7 @@ const randomizeIds = function (enableRandomization, currentDrawing) {
8248
8234
  * @function module:draw.DrawCanvasInit#clearSelection
8249
8235
  * @param {boolean} [noCall] - When `true`, does not call the "selected" handler
8250
8236
  * @returns {void}
8251
- */
8237
+ */
8252
8238
  /**
8253
8239
  * Run the callback function associated with the given event.
8254
8240
  * @function module:draw.DrawCanvasInit#call
@@ -8262,7 +8248,7 @@ const randomizeIds = function (enableRandomization, currentDrawing) {
8262
8248
  * @function module:draw.DrawCanvasInit#addCommandToHistory
8263
8249
  * @param {Command} cmd
8264
8250
  * @returns {void}
8265
- */
8251
+ */
8266
8252
  /**
8267
8253
  * @function module:draw.DrawCanvasInit#changeSvgContent
8268
8254
  * @returns {void}
@@ -8270,43 +8256,43 @@ const randomizeIds = function (enableRandomization, currentDrawing) {
8270
8256
 
8271
8257
  let svgCanvas$e;
8272
8258
  /**
8273
- * @function module:draw.init
8274
- * @param {module:draw.DrawCanvasInit} canvas
8275
- * @returns {void}
8276
- */
8259
+ * @function module:draw.init
8260
+ * @param {module:draw.DrawCanvasInit} canvas
8261
+ * @returns {void}
8262
+ */
8277
8263
  const init$f = canvas => {
8278
8264
  svgCanvas$e = canvas;
8279
8265
  };
8280
8266
 
8281
8267
  /**
8282
- * Updates layer system.
8283
- * @function module:draw.identifyLayers
8284
- * @returns {void}
8285
- */
8268
+ * Updates layer system.
8269
+ * @function module:draw.identifyLayers
8270
+ * @returns {void}
8271
+ */
8286
8272
  const identifyLayers = () => {
8287
8273
  leaveContext();
8288
8274
  svgCanvas$e.getCurrentDrawing().identifyLayers();
8289
8275
  };
8290
8276
 
8291
8277
  /**
8292
- * get current index
8293
- * @function module:draw.identifyLayers
8294
- * @returns {void}
8295
- */
8278
+ * get current index
8279
+ * @function module:draw.identifyLayers
8280
+ * @returns {void}
8281
+ */
8296
8282
  const indexCurrentLayer = () => {
8297
8283
  return svgCanvas$e.getCurrentDrawing().indexCurrentLayer();
8298
8284
  };
8299
8285
 
8300
8286
  /**
8301
- * Creates a new top-level layer in the drawing with the given name, sets the current layer
8302
- * to it, and then clears the selection. This function then calls the 'changed' handler.
8303
- * This is an undoable action.
8304
- * @function module:draw.createLayer
8305
- * @param {string} name - The given name
8306
- * @param {module:history.HistoryRecordingService} hrService
8307
- * @fires module:svgcanvas.SvgCanvas#event:changed
8308
- * @returns {void}
8309
- */
8287
+ * Creates a new top-level layer in the drawing with the given name, sets the current layer
8288
+ * to it, and then clears the selection. This function then calls the 'changed' handler.
8289
+ * This is an undoable action.
8290
+ * @function module:draw.createLayer
8291
+ * @param {string} name - The given name
8292
+ * @param {module:history.HistoryRecordingService} hrService
8293
+ * @fires module:svgcanvas.SvgCanvas#event:changed
8294
+ * @returns {void}
8295
+ */
8310
8296
  const createLayer = (name, hrService) => {
8311
8297
  const newLayer = svgCanvas$e.getCurrentDrawing().createLayer(name, historyRecordingService(hrService));
8312
8298
  svgCanvas$e.clearSelection();
@@ -8332,12 +8318,12 @@ const cloneLayer = (name, hrService) => {
8332
8318
  };
8333
8319
 
8334
8320
  /**
8335
- * Deletes the current layer from the drawing and then clears the selection. This function
8336
- * then calls the 'changed' handler. This is an undoable action.
8337
- * @function module:draw.deleteCurrentLayer
8338
- * @fires module:svgcanvas.SvgCanvas#event:changed
8339
- * @returns {boolean} `true` if an old layer group was found to delete
8340
- */
8321
+ * Deletes the current layer from the drawing and then clears the selection. This function
8322
+ * then calls the 'changed' handler. This is an undoable action.
8323
+ * @function module:draw.deleteCurrentLayer
8324
+ * @fires module:svgcanvas.SvgCanvas#event:changed
8325
+ * @returns {boolean} `true` if an old layer group was found to delete
8326
+ */
8341
8327
  const deleteCurrentLayer = () => {
8342
8328
  const {
8343
8329
  BatchCommand,
@@ -8362,12 +8348,12 @@ const deleteCurrentLayer = () => {
8362
8348
  };
8363
8349
 
8364
8350
  /**
8365
- * Sets the current layer. If the name is not a valid layer name, then this function returns
8366
- * false. Otherwise it returns true. This is not an undo-able action.
8367
- * @function module:draw.setCurrentLayer
8368
- * @param {string} name - The name of the layer you want to switch to.
8369
- * @returns {boolean} true if the current layer was switched, otherwise false
8370
- */
8351
+ * Sets the current layer. If the name is not a valid layer name, then this function returns
8352
+ * false. Otherwise it returns true. This is not an undo-able action.
8353
+ * @function module:draw.setCurrentLayer
8354
+ * @param {string} name - The name of the layer you want to switch to.
8355
+ * @returns {boolean} true if the current layer was switched, otherwise false
8356
+ */
8371
8357
  const setCurrentLayer = name => {
8372
8358
  const result = svgCanvas$e.getCurrentDrawing().setCurrentLayer(toXml(name));
8373
8359
  if (result) {
@@ -8377,14 +8363,14 @@ const setCurrentLayer = name => {
8377
8363
  };
8378
8364
 
8379
8365
  /**
8380
- * Renames the current layer. If the layer name is not valid (i.e. unique), then this function
8381
- * does nothing and returns `false`, otherwise it returns `true`. This is an undo-able action.
8382
- * @function module:draw.renameCurrentLayer
8383
- * @param {string} newName - the new name you want to give the current layer. This name must
8384
- * be unique among all layer names.
8385
- * @fires module:svgcanvas.SvgCanvas#event:changed
8386
- * @returns {boolean} Whether the rename succeeded
8387
- */
8366
+ * Renames the current layer. If the layer name is not valid (i.e. unique), then this function
8367
+ * does nothing and returns `false`, otherwise it returns `true`. This is an undo-able action.
8368
+ * @function module:draw.renameCurrentLayer
8369
+ * @param {string} newName - the new name you want to give the current layer. This name must
8370
+ * be unique among all layer names.
8371
+ * @fires module:svgcanvas.SvgCanvas#event:changed
8372
+ * @returns {boolean} Whether the rename succeeded
8373
+ */
8388
8374
  const renameCurrentLayer = newName => {
8389
8375
  const drawing = svgCanvas$e.getCurrentDrawing();
8390
8376
  const layer = drawing.getCurrentLayer();
@@ -8399,14 +8385,14 @@ const renameCurrentLayer = newName => {
8399
8385
  };
8400
8386
 
8401
8387
  /**
8402
- * Changes the position of the current layer to the new value. If the new index is not valid,
8403
- * this function does nothing and returns false, otherwise it returns true. This is an
8404
- * undo-able action.
8405
- * @function module:draw.setCurrentLayerPosition
8406
- * @param {Integer} newPos - The zero-based index of the new position of the layer. This should be between
8407
- * 0 and (number of layers - 1)
8408
- * @returns {boolean} `true` if the current layer position was changed, `false` otherwise.
8409
- */
8388
+ * Changes the position of the current layer to the new value. If the new index is not valid,
8389
+ * this function does nothing and returns false, otherwise it returns true. This is an
8390
+ * undo-able action.
8391
+ * @function module:draw.setCurrentLayerPosition
8392
+ * @param {Integer} newPos - The zero-based index of the new position of the layer. This should be between
8393
+ * 0 and (number of layers - 1)
8394
+ * @returns {boolean} `true` if the current layer position was changed, `false` otherwise.
8395
+ */
8410
8396
  const setCurrentLayerPosition = newPos => {
8411
8397
  const {
8412
8398
  MoveElementCommand
@@ -8421,13 +8407,13 @@ const setCurrentLayerPosition = newPos => {
8421
8407
  };
8422
8408
 
8423
8409
  /**
8424
- * Sets the visibility of the layer. If the layer name is not valid, this function return
8425
- * `false`, otherwise it returns `true`. This is an undo-able action.
8426
- * @function module:draw.setLayerVisibility
8427
- * @param {string} layerName - The name of the layer to change the visibility
8428
- * @param {boolean} bVisible - Whether the layer should be visible
8429
- * @returns {boolean} true if the layer's visibility was set, false otherwise
8430
- */
8410
+ * Sets the visibility of the layer. If the layer name is not valid, this function return
8411
+ * `false`, otherwise it returns `true`. This is an undo-able action.
8412
+ * @function module:draw.setLayerVisibility
8413
+ * @param {string} layerName - The name of the layer to change the visibility
8414
+ * @param {boolean} bVisible - Whether the layer should be visible
8415
+ * @returns {boolean} true if the layer's visibility was set, false otherwise
8416
+ */
8431
8417
  const setLayerVisibility = (layerName, bVisible) => {
8432
8418
  const {
8433
8419
  ChangeElementCommand
@@ -8452,12 +8438,12 @@ const setLayerVisibility = (layerName, bVisible) => {
8452
8438
  };
8453
8439
 
8454
8440
  /**
8455
- * Moves the selected elements to layerName. If the name is not a valid layer name, then `false`
8456
- * is returned. Otherwise it returns `true`. This is an undo-able action.
8457
- * @function module:draw.moveSelectedToLayer
8458
- * @param {string} layerName - The name of the layer you want to which you want to move the selected elements
8459
- * @returns {boolean} Whether the selected elements were moved to the layer.
8460
- */
8441
+ * Moves the selected elements to layerName. If the name is not a valid layer name, then `false`
8442
+ * is returned. Otherwise it returns `true`. This is an undo-able action.
8443
+ * @function module:draw.moveSelectedToLayer
8444
+ * @param {string} layerName - The name of the layer you want to which you want to move the selected elements
8445
+ * @returns {boolean} Whether the selected elements were moved to the layer.
8446
+ */
8461
8447
  const moveSelectedToLayer = layerName => {
8462
8448
  const {
8463
8449
  BatchCommand,
@@ -8490,10 +8476,10 @@ const moveSelectedToLayer = layerName => {
8490
8476
  };
8491
8477
 
8492
8478
  /**
8493
- * @function module:draw.mergeLayer
8494
- * @param {module:history.HistoryRecordingService} hrService
8495
- * @returns {void}
8496
- */
8479
+ * @function module:draw.mergeLayer
8480
+ * @param {module:history.HistoryRecordingService} hrService
8481
+ * @returns {void}
8482
+ */
8497
8483
  const mergeLayer = hrService => {
8498
8484
  svgCanvas$e.getCurrentDrawing().mergeLayer(historyRecordingService(hrService));
8499
8485
  svgCanvas$e.clearSelection();
@@ -8502,10 +8488,10 @@ const mergeLayer = hrService => {
8502
8488
  };
8503
8489
 
8504
8490
  /**
8505
- * @function module:draw.mergeAllLayers
8506
- * @param {module:history.HistoryRecordingService} hrService
8507
- * @returns {void}
8508
- */
8491
+ * @function module:draw.mergeAllLayers
8492
+ * @param {module:history.HistoryRecordingService} hrService
8493
+ * @returns {void}
8494
+ */
8509
8495
  const mergeAllLayers = hrService => {
8510
8496
  svgCanvas$e.getCurrentDrawing().mergeAllLayers(historyRecordingService(hrService));
8511
8497
  svgCanvas$e.clearSelection();
@@ -8514,12 +8500,12 @@ const mergeAllLayers = hrService => {
8514
8500
  };
8515
8501
 
8516
8502
  /**
8517
- * Return from a group context to the regular kind, make any previously
8518
- * disabled elements enabled again.
8519
- * @function module:draw.leaveContext
8520
- * @fires module:svgcanvas.SvgCanvas#event:contextset
8521
- * @returns {void}
8522
- */
8503
+ * Return from a group context to the regular kind, make any previously
8504
+ * disabled elements enabled again.
8505
+ * @function module:draw.leaveContext
8506
+ * @fires module:svgcanvas.SvgCanvas#event:contextset
8507
+ * @returns {void}
8508
+ */
8523
8509
  const leaveContext = () => {
8524
8510
  const len = disabledElems.length;
8525
8511
  const dataStorage = svgCanvas$e.getDataStorage();
@@ -8542,12 +8528,12 @@ const leaveContext = () => {
8542
8528
  };
8543
8529
 
8544
8530
  /**
8545
- * Set the current context (for in-group editing).
8546
- * @function module:draw.setContext
8547
- * @param {Element} elem
8548
- * @fires module:svgcanvas.SvgCanvas#event:contextset
8549
- * @returns {void}
8550
- */
8531
+ * Set the current context (for in-group editing).
8532
+ * @function module:draw.setContext
8533
+ * @param {Element} elem
8534
+ * @fires module:svgcanvas.SvgCanvas#event:contextset
8535
+ * @returns {void}
8536
+ */
8551
8537
  const setContext = elem => {
8552
8538
  const dataStorage = svgCanvas$e.getDataStorage();
8553
8539
  leaveContext();
@@ -8800,14 +8786,14 @@ const svgRootElement = function (svgdoc, dimensions) {
8800
8786
 
8801
8787
  const NSSVG = 'http://www.w3.org/2000/svg';
8802
8788
  const {
8803
- userAgent: userAgent$4
8789
+ userAgent: userAgent$6
8804
8790
  } = navigator;
8805
8791
 
8806
8792
  // Note: Browser sniffing should only be used if no other detection method is possible
8807
- const isWebkit_ = userAgent$4.includes('AppleWebKit');
8808
- const isGecko_ = userAgent$4.includes('Gecko/');
8809
- const isChrome_ = userAgent$4.includes('Chrome/');
8810
- userAgent$4.includes('Macintosh');
8793
+ const isWebkit_ = userAgent$6.includes('AppleWebKit');
8794
+ const isGecko_ = userAgent$6.includes('Gecko/');
8795
+ const isChrome_ = userAgent$6.includes('Chrome/');
8796
+ userAgent$6.includes('Macintosh');
8811
8797
 
8812
8798
  // text character positioning (for IE9 and now Chrome)
8813
8799
  const supportsGoodTextCharPos_ = function () {
@@ -10743,7 +10729,9 @@ const mouseUpEvent = evt => {
10743
10729
  const width = element.getAttribute('width');
10744
10730
  const height = element.getAttribute('height');
10745
10731
  // Image should be kept regardless of size (use inherit dimensions later)
10746
- keep = width || height || svgCanvas$9.getCurrentMode() === 'image';
10732
+ const widthNum = Number(width);
10733
+ const heightNum = Number(height);
10734
+ keep = widthNum >= 1 || heightNum >= 1 || svgCanvas$9.getCurrentMode() === 'image';
10747
10735
  }
10748
10736
  break;
10749
10737
  case 'circle':
@@ -10913,8 +10901,8 @@ const mouseUpEvent = evt => {
10913
10901
  if (svgCanvas$9.getCurrentMode() === 'path') {
10914
10902
  svgCanvas$9.pathActions.toEditMode(element);
10915
10903
  } else if (svgCanvas$9.getCurConfig().selectNew) {
10916
- const modes = ['circle', 'ellipse', 'square', 'rect', 'fhpath', 'line', 'fhellipse', 'fhrect', 'star', 'polygon'];
10917
- if (modes.indexOf(svgCanvas$9.getCurrentMode()) !== -1) {
10904
+ const modes = ['circle', 'ellipse', 'square', 'rect', 'fhpath', 'line', 'fhellipse', 'fhrect', 'star', 'polygon', 'shapelib'];
10905
+ if (modes.indexOf(svgCanvas$9.getCurrentMode()) !== -1 && !evt.altKey) {
10918
10906
  svgCanvas$9.setMode('select');
10919
10907
  }
10920
10908
  svgCanvas$9.selectOnly([element], true);
@@ -11507,7 +11495,7 @@ const addSVGElementsFromJson = data => {
11507
11495
  assignAttributes(shape, {
11508
11496
  fill: curShape.fill,
11509
11497
  stroke: curShape.stroke,
11510
- 'stroke-width': curShape.strokeWidth,
11498
+ 'stroke-width': curShape.stroke_width,
11511
11499
  'stroke-dasharray': curShape.stroke_dasharray,
11512
11500
  'stroke-linejoin': curShape.stroke_linejoin,
11513
11501
  'stroke-linecap': curShape.stroke_linecap,
@@ -15413,7 +15401,7 @@ var flm = /*#__PURE__*/hMap(flt, 9, 0),
15413
15401
  var fdm = /*#__PURE__*/hMap(fdt, 5, 0),
15414
15402
  fdrm = /*#__PURE__*/hMap(fdt, 5, 1);
15415
15403
  // find max of array
15416
- var max$3 = function (a) {
15404
+ var max$2 = function (a) {
15417
15405
  var m = a[0];
15418
15406
  for (var i = 1; i < a.length; ++i) {
15419
15407
  if (a[i] > m) m = a[i];
@@ -15437,7 +15425,6 @@ var shft = function (p) {
15437
15425
  // typed array slice - allows garbage collector to free original reference,
15438
15426
  // while being more compatible than .slice
15439
15427
  var slc = function (v, s, e) {
15440
- if (s == null || s < 0) s = 0;
15441
15428
  if (e == null || e > v.length) e = v.length;
15442
15429
  // can't use .constructor in case user-supplied
15443
15430
  var n = new (v instanceof u16 ? u16 : v instanceof u32 ? u32 : u8)(e - s);
@@ -15515,7 +15502,7 @@ var inflt = function (dat, buf, st) {
15515
15502
  }
15516
15503
  pos += hcLen * 3;
15517
15504
  // code lengths bits
15518
- var clb = max$3(clt),
15505
+ var clb = max$2(clt),
15519
15506
  clbmsk = (1 << clb) - 1;
15520
15507
  if (!noSt && pos + tl * (clb + 7) > tbts) break;
15521
15508
  // code lengths map
@@ -15541,9 +15528,9 @@ var inflt = function (dat, buf, st) {
15541
15528
  var lt = ldt.subarray(0, hLit),
15542
15529
  dt = ldt.subarray(hLit);
15543
15530
  // max length bits
15544
- lbt = max$3(lt);
15531
+ lbt = max$2(lt);
15545
15532
  // max dist bits
15546
- dbt = max$3(dt);
15533
+ dbt = max$2(dt);
15547
15534
  lm = hMap(lt, lbt, 1);
15548
15535
  dm = hMap(dt, dbt, 1);
15549
15536
  } else throw 'invalid block type';
@@ -15837,8 +15824,6 @@ var wblk = function (dat, out, final, syms, lf, df, eb, li, bs, bl, p) {
15837
15824
  };
15838
15825
  // deflate options (nice << 13) | chain
15839
15826
  var deo = /*#__PURE__*/new u32([65540, 131080, 131088, 131104, 262176, 1048704, 1048832, 2114560, 2117632]);
15840
- // empty
15841
- var et$2 = /*#__PURE__*/new u8(0);
15842
15827
  // compresses data into a raw DEFLATE buffer
15843
15828
  var dflt = function (dat, lvl, plvl, pre, post, lst) {
15844
15829
  var s = dat.length;
@@ -15961,8 +15946,6 @@ var dflt = function (dat, lvl, plvl, pre, post, lst) {
15961
15946
  }
15962
15947
  }
15963
15948
  pos = wblk(dat, w, lst, syms, lf, df, eb, li, bs, i - bs, pos);
15964
- // this is the easiest way to avoid needing to maintain state
15965
- if (!lst) pos = wfblk(w, pos, et$2);
15966
15949
  }
15967
15950
  return slc(o, 0, pre + shft(pos) + post);
15968
15951
  };
@@ -27923,7 +27906,6 @@ function scanSegment(state) {
27923
27906
  for (i = need_params; i > 0; i--) {
27924
27907
  if (is_arc && (i === 3 || i === 4)) scanFlag(state);else scanParam(state);
27925
27908
  if (state.err.length) {
27926
- finalizeSegment(state);
27927
27909
  return;
27928
27910
  }
27929
27911
  state.data.push(state.param);
@@ -27965,7 +27947,9 @@ var path_parse = function pathParse(svgPath) {
27965
27947
  while (state.index < max && !state.err.length) {
27966
27948
  scanSegment(state);
27967
27949
  }
27968
- if (state.result.length) {
27950
+ if (state.err.length) {
27951
+ state.result = [];
27952
+ } else if (state.result.length) {
27969
27953
  if ('mM'.indexOf(state.result[0][0]) < 0) {
27970
27954
  state.err = 'SvgPath: string should start with `M` or `m`';
27971
27955
  state.result = [];
@@ -28576,38 +28560,24 @@ SvgPath.prototype.__evaluateStack = function () {
28576
28560
  // Convert processed SVG Path back to string
28577
28561
  //
28578
28562
  SvgPath.prototype.toString = function () {
28579
- var result = '',
28580
- prevCmd = '',
28581
- cmdSkipped = false;
28563
+ var elements = [],
28564
+ skipCmd,
28565
+ cmd;
28582
28566
  this.__evaluateStack();
28583
- for (var i = 0, len = this.segments.length; i < len; i++) {
28584
- var segment = this.segments[i];
28585
- var cmd = segment[0];
28586
-
28587
- // Command not repeating => store
28588
- if (cmd !== prevCmd || cmd === 'm' || cmd === 'M') {
28589
- // workaround for FontForge SVG importing bug, keep space between "z m".
28590
- if (cmd === 'm' && prevCmd === 'z') result += ' ';
28591
- result += cmd;
28592
- cmdSkipped = false;
28593
- } else {
28594
- cmdSkipped = true;
28595
- }
28596
-
28597
- // Store segment params
28598
- for (var pos = 1; pos < segment.length; pos++) {
28599
- var val = segment[pos];
28600
- // Space can be skipped
28601
- // 1. After command (always)
28602
- // 2. For negative value (with '-' at start)
28603
- if (pos === 1) {
28604
- if (cmdSkipped && val >= 0) result += ' ';
28605
- } else if (val >= 0) result += ' ';
28606
- result += val;
28607
- }
28608
- prevCmd = cmd;
28609
- }
28610
- return result;
28567
+ for (var i = 0; i < this.segments.length; i++) {
28568
+ // remove repeating commands names
28569
+ cmd = this.segments[i][0];
28570
+ skipCmd = i > 0 && cmd !== 'm' && cmd !== 'M' && cmd === this.segments[i - 1][0];
28571
+ elements = elements.concat(skipCmd ? this.segments[i].slice(1) : this.segments[i]);
28572
+ }
28573
+ return elements.join(' ')
28574
+ // Optimizations: remove spaces around commands & before `-`
28575
+ //
28576
+ // We could also remove leading zeros for `0.5`-like values,
28577
+ // but their count is too small to spend time for.
28578
+ .replace(/ ?([achlmqrstvz]) ?/gi, '$1').replace(/ \-/g, '-')
28579
+ // workaround for FontForge SVG importing bug
28580
+ .replace(/zm/g, 'z m');
28611
28581
  };
28612
28582
 
28613
28583
  // Translate path to (x [, y])
@@ -29278,7 +29248,7 @@ function c$2(t, e, r, i) {
29278
29248
  t(e);
29279
29249
  })).then(s, o);
29280
29250
  }
29281
- l((i = i.apply(t, e || [])).next());
29251
+ l((i = i.apply(t, [])).next());
29282
29252
  });
29283
29253
  }
29284
29254
  function p$1(t, e) {
@@ -30282,7 +30252,7 @@ var ut = function (t) {
30282
30252
  });
30283
30253
  }, e.prototype.getBoundingBoxCore = function (t) {
30284
30254
  var e = this.getCachedPath(t);
30285
- if (!e) return [0, 0, 0, 0];
30255
+ if (!e || !e.segments.length) return [0, 0, 0, 0];
30286
30256
  for (var r = Number.POSITIVE_INFINITY, i = Number.POSITIVE_INFINITY, n = Number.NEGATIVE_INFINITY, a = Number.NEGATIVE_INFINITY, s = 0, o = 0, l = 0; l < e.segments.length; l++) {
30287
30257
  var u = e.segments[l];
30288
30258
  (u instanceof C || u instanceof F || u instanceof A) && (s = u.x, o = u.y), u instanceof A ? (r = Math.min(r, s, u.x1, u.x2, u.x), n = Math.max(n, s, u.x1, u.x2, u.x), i = Math.min(i, o, u.y1, u.y2, u.y), a = Math.max(a, o, u.y1, u.y2, u.y)) : (r = Math.min(r, s), n = Math.max(n, s), i = Math.min(i, o), a = Math.max(a, o));
@@ -31443,7 +31413,7 @@ var html2canvas$2 = {exports: {}};
31443
31413
  function step(result) {
31444
31414
  result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected);
31445
31415
  }
31446
- step((generator = generator.apply(thisArg, _arguments || [])).next());
31416
+ step((generator = generator.apply(thisArg, [])).next());
31447
31417
  });
31448
31418
  }
31449
31419
  function __generator(thisArg, body) {
@@ -31535,7 +31505,7 @@ var html2canvas$2 = {exports: {}};
31535
31505
  }
31536
31506
  }
31537
31507
  function __spreadArray(to, from, pack) {
31538
- if (pack || arguments.length === 2) for (var i = 0, l = from.length, ar; i < l; i++) {
31508
+ if (arguments.length === 2) for (var i = 0, l = from.length, ar; i < l; i++) {
31539
31509
  if (ar || !(i in from)) {
31540
31510
  if (!ar) ar = Array.prototype.slice.call(from, 0, i);
31541
31511
  ar[i] = from[i];
@@ -35931,7 +35901,7 @@ var html2canvas$2 = {exports: {}};
35931
35901
  return value;
35932
35902
  },
35933
35903
  get SUPPORT_CORS_XHR() {
35934
- var value = ('withCredentials' in new XMLHttpRequest());
35904
+ var value = 'withCredentials' in new XMLHttpRequest();
35935
35905
  Object.defineProperty(FEATURES, 'SUPPORT_CORS_XHR', {
35936
35906
  value: value
35937
35907
  });
@@ -41102,6 +41072,9 @@ class SvgCanvas {
41102
41072
  this.contentW = this.getResolution().w;
41103
41073
  this.contentH = this.getResolution().h;
41104
41074
  this.clear();
41075
+
41076
+ // creates custom modeEvent for editor
41077
+ this.modeChangeEvent();
41105
41078
  } // End constructor
41106
41079
 
41107
41080
  getSvgOption() {
@@ -41508,6 +41481,11 @@ class SvgCanvas {
41508
41481
  this.textActions.clear();
41509
41482
  this.curProperties = this.selectedElements[0]?.nodeName === 'text' ? this.curText : this.curShape;
41510
41483
  this.currentMode = name;
41484
+
41485
+ // fires modeChange event for the editor
41486
+ if (this.modeEvent) {
41487
+ document.dispatchEvent(this.modeEvent);
41488
+ }
41511
41489
  }
41512
41490
 
41513
41491
  /**
@@ -41946,6 +41924,7 @@ class SvgCanvas {
41946
41924
  this.hasMatrixTransform = hasMatrixTransform;
41947
41925
  this.transformListToTransform = transformListToTransform;
41948
41926
  this.convertToNum = convertToNum;
41927
+ this.convertUnit = convertUnit;
41949
41928
  this.findDefs = findDefs;
41950
41929
  this.getUrlFromAttr = getUrlFromAttr;
41951
41930
  this.getHref = getHref;
@@ -41991,6 +41970,18 @@ class SvgCanvas {
41991
41970
  this.decode64 = decode64;
41992
41971
  this.mergeDeep = mergeDeep;
41993
41972
  }
41973
+
41974
+ /**
41975
+ * Creates modeChange event, adds it as an svgCanvas property
41976
+ * **/
41977
+ modeChangeEvent() {
41978
+ const modeEvent = new CustomEvent('modeChange', {
41979
+ detail: {
41980
+ getMode: () => this.getMode()
41981
+ }
41982
+ });
41983
+ this.modeEvent = modeEvent;
41984
+ }
41994
41985
  } // End class
41995
41986
 
41996
41987
  // attach utilities function to the class that are used by SvgEdit so
@@ -42013,78 +42004,21 @@ SvgCanvas.convertUnit = convertUnit;
42013
42004
 
42014
42005
  var purify$2 = {exports: {}};
42015
42006
 
42016
- /*! @license DOMPurify 2.4.7 | (c) Cure53 and other contributors | Released under the Apache license 2.0 and Mozilla Public License 2.0 | github.com/cure53/DOMPurify/blob/2.4.7/LICENSE */
42007
+ /*! @license DOMPurify | (c) Cure53 and other contributors | Released under the Apache license 2.0 and Mozilla Public License 2.0 | github.com/cure53/DOMPurify/blob/2.2.2/LICENSE */
42017
42008
  (function (module, exports) {
42018
42009
  (function (global, factory) {
42019
42010
  module.exports = factory() ;
42020
42011
  })(commonjsGlobal, function () {
42021
42012
 
42022
- function _typeof(obj) {
42023
- "@babel/helpers - typeof";
42024
-
42025
- return _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (obj) {
42026
- return typeof obj;
42027
- } : function (obj) {
42028
- return obj && "function" == typeof Symbol && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj;
42029
- }, _typeof(obj);
42030
- }
42031
- function _setPrototypeOf(o, p) {
42032
- _setPrototypeOf = Object.setPrototypeOf || function _setPrototypeOf(o, p) {
42033
- o.__proto__ = p;
42034
- return o;
42035
- };
42036
- return _setPrototypeOf(o, p);
42037
- }
42038
- function _isNativeReflectConstruct() {
42039
- if (typeof Reflect === "undefined" || !Reflect.construct) return false;
42040
- if (Reflect.construct.sham) return false;
42041
- if (typeof Proxy === "function") return true;
42042
- try {
42043
- Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function () {}));
42044
- return true;
42045
- } catch (e) {
42046
- return false;
42047
- }
42048
- }
42049
- function _construct(Parent, args, Class) {
42050
- if (_isNativeReflectConstruct()) {
42051
- _construct = Reflect.construct;
42013
+ function _toConsumableArray(arr) {
42014
+ if (Array.isArray(arr)) {
42015
+ for (var i = 0, arr2 = Array(arr.length); i < arr.length; i++) {
42016
+ arr2[i] = arr[i];
42017
+ }
42018
+ return arr2;
42052
42019
  } else {
42053
- _construct = function _construct(Parent, args, Class) {
42054
- var a = [null];
42055
- a.push.apply(a, args);
42056
- var Constructor = Function.bind.apply(Parent, a);
42057
- var instance = new Constructor();
42058
- if (Class) _setPrototypeOf(instance, Class.prototype);
42059
- return instance;
42060
- };
42020
+ return Array.from(arr);
42061
42021
  }
42062
- return _construct.apply(null, arguments);
42063
- }
42064
- function _toConsumableArray(arr) {
42065
- return _arrayWithoutHoles(arr) || _iterableToArray(arr) || _unsupportedIterableToArray(arr) || _nonIterableSpread();
42066
- }
42067
- function _arrayWithoutHoles(arr) {
42068
- if (Array.isArray(arr)) return _arrayLikeToArray(arr);
42069
- }
42070
- function _iterableToArray(iter) {
42071
- if (typeof Symbol !== "undefined" && iter[Symbol.iterator] != null || iter["@@iterator"] != null) return Array.from(iter);
42072
- }
42073
- function _unsupportedIterableToArray(o, minLen) {
42074
- if (!o) return;
42075
- if (typeof o === "string") return _arrayLikeToArray(o, minLen);
42076
- var n = Object.prototype.toString.call(o).slice(8, -1);
42077
- if (n === "Object" && o.constructor) n = o.constructor.name;
42078
- if (n === "Map" || n === "Set") return Array.from(o);
42079
- if (n === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return _arrayLikeToArray(o, minLen);
42080
- }
42081
- function _arrayLikeToArray(arr, len) {
42082
- if (len == null || len > arr.length) len = arr.length;
42083
- for (var i = 0, arr2 = new Array(len); i < len; i++) arr2[i] = arr[i];
42084
- return arr2;
42085
- }
42086
- function _nonIterableSpread() {
42087
- throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.");
42088
42022
  }
42089
42023
  var hasOwnProperty = Object.hasOwnProperty,
42090
42024
  setPrototypeOf = Object.setPrototypeOf,
@@ -42115,14 +42049,13 @@ var purify$2 = {exports: {}};
42115
42049
  }
42116
42050
  if (!construct) {
42117
42051
  construct = function construct(Func, args) {
42118
- return _construct(Func, _toConsumableArray(args));
42052
+ return new (Function.prototype.bind.apply(Func, [null].concat(_toConsumableArray(args))))();
42119
42053
  };
42120
42054
  }
42121
42055
  var arrayForEach = unapply(Array.prototype.forEach);
42122
42056
  var arrayPop = unapply(Array.prototype.pop);
42123
42057
  var arrayPush = unapply(Array.prototype.push);
42124
42058
  var stringToLowerCase = unapply(String.prototype.toLowerCase);
42125
- var stringToString = unapply(String.prototype.toString);
42126
42059
  var stringMatch = unapply(String.prototype.match);
42127
42060
  var stringReplace = unapply(String.prototype.replace);
42128
42061
  var stringIndexOf = unapply(String.prototype.indexOf);
@@ -42131,7 +42064,7 @@ var purify$2 = {exports: {}};
42131
42064
  var typeErrorCreate = unconstruct(TypeError);
42132
42065
  function unapply(func) {
42133
42066
  return function (thisArg) {
42134
- for (var _len = arguments.length, args = new Array(_len > 1 ? _len - 1 : 0), _key = 1; _key < _len; _key++) {
42067
+ for (var _len = arguments.length, args = Array(_len > 1 ? _len - 1 : 0), _key = 1; _key < _len; _key++) {
42135
42068
  args[_key - 1] = arguments[_key];
42136
42069
  }
42137
42070
  return apply(func, thisArg, args);
@@ -42139,17 +42072,15 @@ var purify$2 = {exports: {}};
42139
42072
  }
42140
42073
  function unconstruct(func) {
42141
42074
  return function () {
42142
- for (var _len2 = arguments.length, args = new Array(_len2), _key2 = 0; _key2 < _len2; _key2++) {
42075
+ for (var _len2 = arguments.length, args = Array(_len2), _key2 = 0; _key2 < _len2; _key2++) {
42143
42076
  args[_key2] = arguments[_key2];
42144
42077
  }
42145
42078
  return construct(func, args);
42146
42079
  };
42147
42080
  }
42148
- /* Add properties to a lookup table */
42149
42081
 
42150
- function addToSet(set, array, transformCaseFunc) {
42151
- var _transformCaseFunc;
42152
- transformCaseFunc = (_transformCaseFunc = transformCaseFunc) !== null && _transformCaseFunc !== void 0 ? _transformCaseFunc : stringToLowerCase;
42082
+ /* Add properties to a lookup table */
42083
+ function addToSet(set, array) {
42153
42084
  if (setPrototypeOf) {
42154
42085
  // Make 'in' and truthy checks like Boolean(set.constructor)
42155
42086
  // independent of any properties defined on Object.prototype.
@@ -42160,7 +42091,7 @@ var purify$2 = {exports: {}};
42160
42091
  while (l--) {
42161
42092
  var element = array[l];
42162
42093
  if (typeof element === 'string') {
42163
- var lcElement = transformCaseFunc(element);
42094
+ var lcElement = stringToLowerCase(element);
42164
42095
  if (lcElement !== element) {
42165
42096
  // Config presets (e.g. tags.js, attrs.js) are immutable.
42166
42097
  if (!isFrozen(array)) {
@@ -42173,23 +42104,23 @@ var purify$2 = {exports: {}};
42173
42104
  }
42174
42105
  return set;
42175
42106
  }
42176
- /* Shallow clone an object */
42177
42107
 
42108
+ /* Shallow clone an object */
42178
42109
  function clone(object) {
42179
42110
  var newObject = create(null);
42180
- var property;
42111
+ var property = void 0;
42181
42112
  for (property in object) {
42182
- if (apply(hasOwnProperty, object, [property]) === true) {
42113
+ if (apply(hasOwnProperty, object, [property])) {
42183
42114
  newObject[property] = object[property];
42184
42115
  }
42185
42116
  }
42186
42117
  return newObject;
42187
42118
  }
42119
+
42188
42120
  /* IE10 doesn't support __lookupGetter__ so lets'
42189
42121
  * simulate it. It also automatically checks
42190
42122
  * if the prop is function or getter and behaves
42191
42123
  * accordingly. */
42192
-
42193
42124
  function lookupGetter(object, prop) {
42194
42125
  while (object !== null) {
42195
42126
  var desc = getOwnPropertyDescriptor(object, prop);
@@ -42203,47 +42134,59 @@ var purify$2 = {exports: {}};
42203
42134
  }
42204
42135
  object = getPrototypeOf(object);
42205
42136
  }
42206
- function fallbackValue(element) {
42207
- console.warn('fallback value for', element);
42208
- return null;
42209
- }
42210
- return fallbackValue;
42137
+ return null;
42211
42138
  }
42212
- var 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', 'section', 'select', 'shadow', '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']); // SVG
42139
+ var html = 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', 'section', 'select', 'shadow', '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']);
42140
+
42141
+ // SVG
42142
+ var svg = freeze(['svg', 'a', 'altglyph', 'altglyphdef', 'altglyphitem', 'animatecolor', 'animatemotion', 'animatetransform', 'circle', 'clippath', 'defs', 'desc', 'ellipse', 'filter', 'font', 'g', 'glyph', 'glyphref', 'hkern', 'image', 'line', 'lineargradient', 'marker', 'mask', 'metadata', 'mpath', 'path', 'pattern', 'polygon', 'polyline', 'radialgradient', 'rect', 'stop', 'style', 'switch', 'symbol', 'text', 'textpath', 'title', 'tref', 'tspan', 'view', 'vkern']);
42143
+ var svgFilters = freeze(['feBlend', 'feColorMatrix', 'feComponentTransfer', 'feComposite', 'feConvolveMatrix', 'feDiffuseLighting', 'feDisplacementMap', 'feDistantLight', 'feFlood', 'feFuncA', 'feFuncB', 'feFuncG', 'feFuncR', 'feGaussianBlur', 'feMerge', 'feMergeNode', 'feMorphology', 'feOffset', 'fePointLight', 'feSpecularLighting', 'feSpotLight', 'feTile', 'feTurbulence']);
42213
42144
 
42214
- var svg$1 = freeze(['svg', 'a', 'altglyph', 'altglyphdef', 'altglyphitem', 'animatecolor', 'animatemotion', 'animatetransform', 'circle', 'clippath', 'defs', 'desc', 'ellipse', 'filter', 'font', 'g', 'glyph', 'glyphref', 'hkern', 'image', 'line', 'lineargradient', 'marker', 'mask', 'metadata', 'mpath', 'path', 'pattern', 'polygon', 'polyline', 'radialgradient', 'rect', 'stop', 'style', 'switch', 'symbol', 'text', 'textpath', 'title', 'tref', 'tspan', 'view', 'vkern']);
42215
- var svgFilters = freeze(['feBlend', 'feColorMatrix', 'feComponentTransfer', 'feComposite', 'feConvolveMatrix', 'feDiffuseLighting', 'feDisplacementMap', 'feDistantLight', 'feFlood', 'feFuncA', 'feFuncB', 'feFuncG', 'feFuncR', 'feGaussianBlur', 'feImage', 'feMerge', 'feMergeNode', 'feMorphology', 'feOffset', 'fePointLight', 'feSpecularLighting', 'feSpotLight', 'feTile', 'feTurbulence']); // List of SVG elements that are disallowed by default.
42145
+ // List of SVG elements that are disallowed by default.
42216
42146
  // We still need to know them so that we can do namespace
42217
42147
  // checks properly in case one wants to add them to
42218
42148
  // allow-list.
42149
+ var svgDisallowed = freeze(['animate', 'color-profile', 'cursor', 'discard', 'fedropshadow', 'feimage', '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']);
42150
+ var mathMl = 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']);
42219
42151
 
42220
- var svgDisallowed = freeze(['animate', 'color-profile', 'cursor', 'discard', 'fedropshadow', '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']);
42221
- var 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']); // Similarly to SVG, we want to know all MathML elements,
42152
+ // Similarly to SVG, we want to know all MathML elements,
42222
42153
  // even those that we disallow by default.
42223
-
42224
42154
  var mathMlDisallowed = freeze(['maction', 'maligngroup', 'malignmark', 'mlongdiv', 'mscarries', 'mscarry', 'msgroup', 'mstack', 'msline', 'msrow', 'semantics', 'annotation', 'annotation-xml', 'mprescripts', 'none']);
42225
42155
  var text = freeze(['#text']);
42226
- var html = freeze(['accept', 'action', 'align', 'alt', 'autocapitalize', 'autocomplete', 'autopictureinpicture', 'autoplay', 'background', 'bgcolor', 'border', 'capture', 'cellpadding', 'cellspacing', 'checked', 'cite', 'class', 'clear', 'color', 'cols', 'colspan', 'controls', 'controlslist', 'coords', 'crossorigin', 'datetime', 'decoding', 'default', 'dir', 'disabled', 'disablepictureinpicture', 'disableremoteplayback', 'download', 'draggable', 'enctype', 'enterkeyhint', 'face', 'for', 'headers', 'height', 'hidden', 'high', 'href', 'hreflang', 'id', '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', 'pattern', 'placeholder', 'playsinline', 'poster', 'preload', 'pubdate', 'radiogroup', 'readonly', 'rel', 'required', 'rev', 'reversed', 'role', 'rows', 'rowspan', 'spellcheck', 'scope', 'selected', 'shape', 'size', 'sizes', 'span', 'srclang', 'start', 'src', 'srcset', 'step', 'style', 'summary', 'tabindex', 'title', 'translate', 'type', 'usemap', 'valign', 'value', 'width', 'xmlns', 'slot']);
42227
- var svg = freeze(['accent-height', 'accumulate', 'additive', 'alignment-baseline', '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', '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', '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', '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', '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', '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']);
42228
- var mathMl = freeze(['accent', 'accentunder', 'align', 'bevelled', 'close', 'columnsalign', 'columnlines', 'columnspan', 'denomalign', 'depth', 'dir', 'display', 'displaystyle', 'encoding', 'fence', 'frame', 'height', 'href', 'id', 'largeop', 'length', 'linethickness', 'lspace', 'lquote', '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']);
42156
+ var html$1 = freeze(['accept', 'action', 'align', 'alt', 'autocapitalize', 'autocomplete', 'autopictureinpicture', 'autoplay', 'background', 'bgcolor', 'border', 'capture', 'cellpadding', 'cellspacing', 'checked', 'cite', 'class', 'clear', 'color', 'cols', 'colspan', 'controls', 'controlslist', 'coords', 'crossorigin', 'datetime', 'decoding', 'default', 'dir', 'disabled', 'disablepictureinpicture', 'disableremoteplayback', 'download', 'draggable', 'enctype', 'enterkeyhint', 'face', 'for', 'headers', 'height', 'hidden', 'high', 'href', 'hreflang', 'id', 'inputmode', 'integrity', 'ismap', 'kind', 'label', 'lang', 'list', 'loading', 'loop', 'low', 'max', 'maxlength', 'media', 'method', 'min', 'minlength', 'multiple', 'muted', 'name', 'noshade', 'novalidate', 'nowrap', 'open', 'optimum', 'pattern', 'placeholder', 'playsinline', 'poster', 'preload', 'pubdate', 'radiogroup', 'readonly', 'rel', 'required', 'rev', 'reversed', 'role', 'rows', 'rowspan', 'spellcheck', 'scope', 'selected', 'shape', 'size', 'sizes', 'span', 'srclang', 'start', 'src', 'srcset', 'step', 'style', 'summary', 'tabindex', 'title', 'translate', 'type', 'usemap', 'valign', 'value', 'width', 'xmlns']);
42157
+ var svg$1 = freeze(['accent-height', 'accumulate', 'additive', 'alignment-baseline', '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', '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', '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', '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', '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', 'targetx', 'targety', 'transform', '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']);
42158
+ var mathMl$1 = freeze(['accent', 'accentunder', 'align', 'bevelled', 'close', 'columnsalign', 'columnlines', 'columnspan', 'denomalign', 'depth', 'dir', 'display', 'displaystyle', 'encoding', 'fence', 'frame', 'height', 'href', 'id', 'largeop', 'length', 'linethickness', 'lspace', 'lquote', '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']);
42229
42159
  var xml = freeze(['xlink:href', 'xml:id', 'xlink:title', 'xml:space', 'xmlns:xlink']);
42230
- var MUSTACHE_EXPR = seal(/\{\{[\w\W]*|[\w\W]*\}\}/gm); // Specify template detection regex for SAFE_FOR_TEMPLATES mode
42231
42160
 
42232
- var ERB_EXPR = seal(/<%[\w\W]*|[\w\W]*%>/gm);
42233
- var TMPLIT_EXPR = seal(/\${[\w\W]*}/gm);
42161
+ // eslint-disable-next-line unicorn/better-regex
42162
+ var MUSTACHE_EXPR = seal(/\{\{[\s\S]*|[\s\S]*\}\}/gm); // Specify template detection regex for SAFE_FOR_TEMPLATES mode
42163
+ var ERB_EXPR = seal(/<%[\s\S]*|[\s\S]*%>/gm);
42234
42164
  var DATA_ATTR = seal(/^data-[\-\w.\u00B7-\uFFFF]/); // eslint-disable-line no-useless-escape
42235
-
42236
42165
  var ARIA_ATTR = seal(/^aria-[\-\w]+$/); // eslint-disable-line no-useless-escape
42237
-
42238
42166
  var IS_ALLOWED_URI = seal(/^(?:(?:(?:f|ht)tps?|mailto|tel|callto|cid|xmpp):|[^a-z]|[a-z+.\-]+(?:[^a-z+.\-:]|$))/i // eslint-disable-line no-useless-escape
42239
42167
  );
42240
42168
  var IS_SCRIPT_OR_DATA = seal(/^(?:\w+script|data):/i);
42241
42169
  var ATTR_WHITESPACE = seal(/[\u0000-\u0020\u00A0\u1680\u180E\u2000-\u2029\u205F\u3000]/g // eslint-disable-line no-control-regex
42242
42170
  );
42243
- var DOCTYPE_NAME = seal(/^html$/i);
42171
+ var _typeof = typeof Symbol === "function" && typeof Symbol.iterator === "symbol" ? function (obj) {
42172
+ return typeof obj;
42173
+ } : function (obj) {
42174
+ return obj && typeof Symbol === "function" && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj;
42175
+ };
42176
+ function _toConsumableArray$1(arr) {
42177
+ if (Array.isArray(arr)) {
42178
+ for (var i = 0, arr2 = Array(arr.length); i < arr.length; i++) {
42179
+ arr2[i] = arr[i];
42180
+ }
42181
+ return arr2;
42182
+ } else {
42183
+ return Array.from(arr);
42184
+ }
42185
+ }
42244
42186
  var getGlobal = function getGlobal() {
42245
42187
  return typeof window === 'undefined' ? null : window;
42246
42188
  };
42189
+
42247
42190
  /**
42248
42191
  * Creates a no-op policy for internal use only.
42249
42192
  * Don't export this function outside this module!
@@ -42252,14 +42195,14 @@ var purify$2 = {exports: {}};
42252
42195
  * @return {?TrustedTypePolicy} The policy created (or null, if Trusted Types
42253
42196
  * are not supported).
42254
42197
  */
42255
-
42256
42198
  var _createTrustedTypesPolicy = function _createTrustedTypesPolicy(trustedTypes, document) {
42257
- if (_typeof(trustedTypes) !== 'object' || typeof trustedTypes.createPolicy !== 'function') {
42199
+ if ((typeof trustedTypes === 'undefined' ? 'undefined' : _typeof(trustedTypes)) !== 'object' || typeof trustedTypes.createPolicy !== 'function') {
42258
42200
  return null;
42259
- } // Allow the callers to control the unique policy name
42201
+ }
42202
+
42203
+ // Allow the callers to control the unique policy name
42260
42204
  // by adding a data-tt-policy-suffix to the script element with the DOMPurify.
42261
42205
  // Policy creation with duplicate names throws in Trusted Types.
42262
-
42263
42206
  var suffix = null;
42264
42207
  var ATTR_NAME = 'data-tt-policy-suffix';
42265
42208
  if (document.currentScript && document.currentScript.hasAttribute(ATTR_NAME)) {
@@ -42268,11 +42211,8 @@ var purify$2 = {exports: {}};
42268
42211
  var policyName = 'dompurify' + (suffix ? '#' + suffix : '');
42269
42212
  try {
42270
42213
  return trustedTypes.createPolicy(policyName, {
42271
- createHTML: function createHTML(html) {
42272
- return html;
42273
- },
42274
- createScriptURL: function createScriptURL(scriptUrl) {
42275
- return scriptUrl;
42214
+ createHTML: function createHTML(html$$1) {
42215
+ return html$$1;
42276
42216
  }
42277
42217
  });
42278
42218
  } catch (_) {
@@ -42288,17 +42228,17 @@ var purify$2 = {exports: {}};
42288
42228
  var DOMPurify = function DOMPurify(root) {
42289
42229
  return createDOMPurify(root);
42290
42230
  };
42231
+
42291
42232
  /**
42292
42233
  * Version label, exposed for easier checks
42293
42234
  * if DOMPurify is up to date or not
42294
42235
  */
42236
+ DOMPurify.version = '2.2.6';
42295
42237
 
42296
- DOMPurify.version = '2.4.7';
42297
42238
  /**
42298
42239
  * Array of elements that DOMPurify removed during sanitation.
42299
42240
  * Empty if nothing was removed.
42300
42241
  */
42301
-
42302
42242
  DOMPurify.removed = [];
42303
42243
  if (!window || !window.document || window.document.nodeType !== 9) {
42304
42244
  // Not running in a browser, provide a factory function
@@ -42314,21 +42254,23 @@ var purify$2 = {exports: {}};
42314
42254
  Element = window.Element,
42315
42255
  NodeFilter = window.NodeFilter,
42316
42256
  _window$NamedNodeMap = window.NamedNodeMap,
42317
- NamedNodeMap = _window$NamedNodeMap === void 0 ? window.NamedNodeMap || window.MozNamedAttrMap : _window$NamedNodeMap,
42318
- HTMLFormElement = window.HTMLFormElement,
42257
+ NamedNodeMap = _window$NamedNodeMap === undefined ? window.NamedNodeMap || window.MozNamedAttrMap : _window$NamedNodeMap,
42258
+ Text = window.Text,
42259
+ Comment = window.Comment,
42319
42260
  DOMParser = window.DOMParser,
42320
42261
  trustedTypes = window.trustedTypes;
42321
42262
  var ElementPrototype = Element.prototype;
42322
42263
  var cloneNode = lookupGetter(ElementPrototype, 'cloneNode');
42323
42264
  var getNextSibling = lookupGetter(ElementPrototype, 'nextSibling');
42324
42265
  var getChildNodes = lookupGetter(ElementPrototype, 'childNodes');
42325
- var getParentNode = lookupGetter(ElementPrototype, 'parentNode'); // As per issue #47, the web-components registry is inherited by a
42266
+ var getParentNode = lookupGetter(ElementPrototype, 'parentNode');
42267
+
42268
+ // As per issue #47, the web-components registry is inherited by a
42326
42269
  // new document created via createHTMLDocument. As per the spec
42327
42270
  // (http://w3c.github.io/webcomponents/spec/custom/#creating-and-passing-registries)
42328
42271
  // a new empty registry is used when creating a template contents owner
42329
42272
  // document, so we use that as our parent document to ensure nothing
42330
42273
  // is inherited.
42331
-
42332
42274
  if (typeof HTMLTemplateElement === 'function') {
42333
42275
  var template = document.createElement('template');
42334
42276
  if (template.content && template.content.ownerDocument) {
@@ -42336,31 +42278,31 @@ var purify$2 = {exports: {}};
42336
42278
  }
42337
42279
  }
42338
42280
  var trustedTypesPolicy = _createTrustedTypesPolicy(trustedTypes, originalDocument);
42339
- var emptyHTML = trustedTypesPolicy ? trustedTypesPolicy.createHTML('') : '';
42281
+ var emptyHTML = trustedTypesPolicy && RETURN_TRUSTED_TYPE ? trustedTypesPolicy.createHTML('') : '';
42340
42282
  var _document = document,
42341
42283
  implementation = _document.implementation,
42342
42284
  createNodeIterator = _document.createNodeIterator,
42343
- createDocumentFragment = _document.createDocumentFragment,
42344
- getElementsByTagName = _document.getElementsByTagName;
42285
+ getElementsByTagName = _document.getElementsByTagName,
42286
+ createDocumentFragment = _document.createDocumentFragment;
42345
42287
  var importNode = originalDocument.importNode;
42346
42288
  var documentMode = {};
42347
42289
  try {
42348
42290
  documentMode = clone(document).documentMode ? document.documentMode : {};
42349
42291
  } catch (_) {}
42350
42292
  var hooks = {};
42293
+
42351
42294
  /**
42352
42295
  * Expose whether this browser supports running the full DOMPurify.
42353
42296
  */
42297
+ DOMPurify.isSupported = implementation && typeof implementation.createHTMLDocument !== 'undefined' && documentMode !== 9;
42298
+ var MUSTACHE_EXPR$$1 = MUSTACHE_EXPR,
42299
+ ERB_EXPR$$1 = ERB_EXPR,
42300
+ DATA_ATTR$$1 = DATA_ATTR,
42301
+ ARIA_ATTR$$1 = ARIA_ATTR,
42302
+ IS_SCRIPT_OR_DATA$$1 = IS_SCRIPT_OR_DATA,
42303
+ ATTR_WHITESPACE$$1 = ATTR_WHITESPACE;
42304
+ var IS_ALLOWED_URI$$1 = IS_ALLOWED_URI;
42354
42305
 
42355
- DOMPurify.isSupported = typeof getParentNode === 'function' && implementation && implementation.createHTMLDocument !== undefined && documentMode !== 9;
42356
- var MUSTACHE_EXPR$1 = MUSTACHE_EXPR,
42357
- ERB_EXPR$1 = ERB_EXPR,
42358
- TMPLIT_EXPR$1 = TMPLIT_EXPR,
42359
- DATA_ATTR$1 = DATA_ATTR,
42360
- ARIA_ATTR$1 = ARIA_ATTR,
42361
- IS_SCRIPT_OR_DATA$1 = IS_SCRIPT_OR_DATA,
42362
- ATTR_WHITESPACE$1 = ATTR_WHITESPACE;
42363
- var IS_ALLOWED_URI$1 = IS_ALLOWED_URI;
42364
42306
  /**
42365
42307
  * We consider the elements and attributes below to be safe. Ideally
42366
42308
  * don't add any new ones but feel free to remove unwanted ones.
@@ -42369,337 +42311,227 @@ var purify$2 = {exports: {}};
42369
42311
  /* allowed element names */
42370
42312
 
42371
42313
  var ALLOWED_TAGS = null;
42372
- var DEFAULT_ALLOWED_TAGS = addToSet({}, [].concat(_toConsumableArray(html$1), _toConsumableArray(svg$1), _toConsumableArray(svgFilters), _toConsumableArray(mathMl$1), _toConsumableArray(text)));
42373
- /* Allowed attribute names */
42314
+ var DEFAULT_ALLOWED_TAGS = addToSet({}, [].concat(_toConsumableArray$1(html), _toConsumableArray$1(svg), _toConsumableArray$1(svgFilters), _toConsumableArray$1(mathMl), _toConsumableArray$1(text)));
42374
42315
 
42316
+ /* Allowed attribute names */
42375
42317
  var ALLOWED_ATTR = null;
42376
- var DEFAULT_ALLOWED_ATTR = addToSet({}, [].concat(_toConsumableArray(html), _toConsumableArray(svg), _toConsumableArray(mathMl), _toConsumableArray(xml)));
42377
- /*
42378
- * Configure how DOMPUrify should handle custom elements and their attributes as well as customized built-in elements.
42379
- * @property {RegExp|Function|null} tagNameCheck one of [null, regexPattern, predicate]. Default: `null` (disallow any custom elements)
42380
- * @property {RegExp|Function|null} attributeNameCheck one of [null, regexPattern, predicate]. Default: `null` (disallow any attributes not on the allow list)
42381
- * @property {boolean} allowCustomizedBuiltInElements allow custom elements derived from built-ins if they pass CUSTOM_ELEMENT_HANDLING.tagNameCheck. Default: `false`.
42382
- */
42318
+ var DEFAULT_ALLOWED_ATTR = addToSet({}, [].concat(_toConsumableArray$1(html$1), _toConsumableArray$1(svg$1), _toConsumableArray$1(mathMl$1), _toConsumableArray$1(xml)));
42383
42319
 
42384
- var CUSTOM_ELEMENT_HANDLING = Object.seal(Object.create(null, {
42385
- tagNameCheck: {
42386
- writable: true,
42387
- configurable: false,
42388
- enumerable: true,
42389
- value: null
42390
- },
42391
- attributeNameCheck: {
42392
- writable: true,
42393
- configurable: false,
42394
- enumerable: true,
42395
- value: null
42396
- },
42397
- allowCustomizedBuiltInElements: {
42398
- writable: true,
42399
- configurable: false,
42400
- enumerable: true,
42401
- value: false
42402
- }
42403
- }));
42404
42320
  /* Explicitly forbidden tags (overrides ALLOWED_TAGS/ADD_TAGS) */
42405
-
42406
42321
  var FORBID_TAGS = null;
42407
- /* Explicitly forbidden attributes (overrides ALLOWED_ATTR/ADD_ATTR) */
42408
42322
 
42323
+ /* Explicitly forbidden attributes (overrides ALLOWED_ATTR/ADD_ATTR) */
42409
42324
  var FORBID_ATTR = null;
42410
- /* Decide if ARIA attributes are okay */
42411
42325
 
42326
+ /* Decide if ARIA attributes are okay */
42412
42327
  var ALLOW_ARIA_ATTR = true;
42413
- /* Decide if custom data attributes are okay */
42414
42328
 
42329
+ /* Decide if custom data attributes are okay */
42415
42330
  var ALLOW_DATA_ATTR = true;
42416
- /* Decide if unknown protocols are okay */
42417
42331
 
42332
+ /* Decide if unknown protocols are okay */
42418
42333
  var ALLOW_UNKNOWN_PROTOCOLS = false;
42419
- /* Decide if self-closing tags in attributes are allowed.
42420
- * Usually removed due to a mXSS issue in jQuery 3.0 */
42421
42334
 
42422
- var ALLOW_SELF_CLOSE_IN_ATTR = true;
42423
42335
  /* Output should be safe for common template engines.
42424
42336
  * This means, DOMPurify removes data attributes, mustaches and ERB
42425
42337
  */
42426
-
42427
42338
  var SAFE_FOR_TEMPLATES = false;
42428
- /* Decide if document with <html>... should be returned */
42429
42339
 
42340
+ /* Decide if document with <html>... should be returned */
42430
42341
  var WHOLE_DOCUMENT = false;
42431
- /* Track whether config is already set on this instance of DOMPurify. */
42432
42342
 
42343
+ /* Track whether config is already set on this instance of DOMPurify. */
42433
42344
  var SET_CONFIG = false;
42345
+
42434
42346
  /* Decide if all elements (e.g. style, script) must be children of
42435
42347
  * document.body. By default, browsers might move them to document.head */
42436
-
42437
42348
  var FORCE_BODY = false;
42349
+
42438
42350
  /* Decide if a DOM `HTMLBodyElement` should be returned, instead of a html
42439
42351
  * string (or a TrustedHTML object if Trusted Types are supported).
42440
42352
  * If `WHOLE_DOCUMENT` is enabled a `HTMLHtmlElement` will be returned instead
42441
42353
  */
42442
-
42443
42354
  var RETURN_DOM = false;
42355
+
42444
42356
  /* Decide if a DOM `DocumentFragment` should be returned, instead of a html
42445
42357
  * string (or a TrustedHTML object if Trusted Types are supported) */
42446
-
42447
42358
  var RETURN_DOM_FRAGMENT = false;
42359
+
42360
+ /* If `RETURN_DOM` or `RETURN_DOM_FRAGMENT` is enabled, decide if the returned DOM
42361
+ * `Node` is imported into the current `Document`. If this flag is not enabled the
42362
+ * `Node` will belong (its ownerDocument) to a fresh `HTMLDocument`, created by
42363
+ * DOMPurify.
42364
+ *
42365
+ * This defaults to `true` starting DOMPurify 2.2.0. Note that setting it to `false`
42366
+ * might cause XSS from attacks hidden in closed shadowroots in case the browser
42367
+ * supports Declarative Shadow: DOM https://web.dev/declarative-shadow-dom/
42368
+ */
42369
+ var RETURN_DOM_IMPORT = true;
42370
+
42448
42371
  /* Try to return a Trusted Type object instead of a string, return a string in
42449
42372
  * case Trusted Types are not supported */
42450
-
42451
42373
  var RETURN_TRUSTED_TYPE = false;
42452
- /* Output should be free from DOM clobbering attacks?
42453
- * This sanitizes markups named with colliding, clobberable built-in DOM APIs.
42454
- */
42455
42374
 
42375
+ /* Output should be free from DOM clobbering attacks? */
42456
42376
  var SANITIZE_DOM = true;
42457
- /* Achieve full DOM Clobbering protection by isolating the namespace of named
42458
- * properties and JS variables, mitigating attacks that abuse the HTML/DOM spec rules.
42459
- *
42460
- * HTML/DOM spec rules that enable DOM Clobbering:
42461
- * - Named Access on Window (§7.3.3)
42462
- * - DOM Tree Accessors (§3.1.5)
42463
- * - Form Element Parent-Child Relations (§4.10.3)
42464
- * - Iframe srcdoc / Nested WindowProxies (§4.8.5)
42465
- * - HTMLCollection (§4.2.10.2)
42466
- *
42467
- * Namespace isolation is implemented by prefixing `id` and `name` attributes
42468
- * with a constant string, i.e., `user-content-`
42469
- */
42470
42377
 
42471
- var SANITIZE_NAMED_PROPS = false;
42472
- var SANITIZE_NAMED_PROPS_PREFIX = 'user-content-';
42473
42378
  /* Keep element content when removing element? */
42474
-
42475
42379
  var KEEP_CONTENT = true;
42380
+
42476
42381
  /* If a `Node` is passed to sanitize(), then performs sanitization in-place instead
42477
42382
  * of importing it into a new Document and returning a sanitized copy */
42478
-
42479
42383
  var IN_PLACE = false;
42480
- /* Allow usage of profiles like html, svg and mathMl */
42481
42384
 
42385
+ /* Allow usage of profiles like html, svg and mathMl */
42482
42386
  var USE_PROFILES = {};
42387
+
42483
42388
  /* Tags to ignore content of when KEEP_CONTENT is true */
42389
+ var 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']);
42484
42390
 
42485
- var FORBID_CONTENTS = null;
42486
- var 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']);
42487
42391
  /* Tags that are safe for data: URIs */
42488
-
42489
42392
  var DATA_URI_TAGS = null;
42490
42393
  var DEFAULT_DATA_URI_TAGS = addToSet({}, ['audio', 'video', 'img', 'source', 'image', 'track']);
42491
- /* Attributes safe for values like "javascript:" */
42492
42394
 
42395
+ /* Attributes safe for values like "javascript:" */
42493
42396
  var URI_SAFE_ATTRIBUTES = null;
42494
- var DEFAULT_URI_SAFE_ATTRIBUTES = addToSet({}, ['alt', 'class', 'for', 'id', 'label', 'name', 'pattern', 'placeholder', 'role', 'summary', 'title', 'value', 'style', 'xmlns']);
42495
- var MATHML_NAMESPACE = 'http://www.w3.org/1998/Math/MathML';
42496
- var SVG_NAMESPACE = 'http://www.w3.org/2000/svg';
42497
- var HTML_NAMESPACE = 'http://www.w3.org/1999/xhtml';
42498
- /* Document namespace */
42499
-
42500
- var NAMESPACE = HTML_NAMESPACE;
42501
- var IS_EMPTY_INPUT = false;
42502
- /* Allowed XHTML+XML namespaces */
42503
-
42504
- var ALLOWED_NAMESPACES = null;
42505
- var DEFAULT_ALLOWED_NAMESPACES = addToSet({}, [MATHML_NAMESPACE, SVG_NAMESPACE, HTML_NAMESPACE], stringToString);
42506
- /* Parsing of strict XHTML documents */
42397
+ var DEFAULT_URI_SAFE_ATTRIBUTES = addToSet({}, ['alt', 'class', 'for', 'id', 'label', 'name', 'pattern', 'placeholder', 'summary', 'title', 'value', 'style', 'xmlns']);
42507
42398
 
42508
- var PARSER_MEDIA_TYPE;
42509
- var SUPPORTED_PARSER_MEDIA_TYPES = ['application/xhtml+xml', 'text/html'];
42510
- var DEFAULT_PARSER_MEDIA_TYPE = 'text/html';
42511
- var transformCaseFunc;
42512
42399
  /* Keep a reference to config to pass to hooks */
42513
-
42514
42400
  var CONFIG = null;
42515
- /* Ideally, do not touch anything below this line */
42516
42401
 
42402
+ /* Ideally, do not touch anything below this line */
42517
42403
  /* ______________________________________________ */
42518
42404
 
42519
42405
  var formElement = document.createElement('form');
42520
- var isRegexOrFunction = function isRegexOrFunction(testValue) {
42521
- return testValue instanceof RegExp || testValue instanceof Function;
42522
- };
42406
+
42523
42407
  /**
42524
42408
  * _parseConfig
42525
42409
  *
42526
42410
  * @param {Object} cfg optional config literal
42527
42411
  */
42528
42412
  // eslint-disable-next-line complexity
42529
-
42530
42413
  var _parseConfig = function _parseConfig(cfg) {
42531
42414
  if (CONFIG && CONFIG === cfg) {
42532
42415
  return;
42533
42416
  }
42534
- /* Shield configuration object from tampering */
42535
42417
 
42536
- if (!cfg || _typeof(cfg) !== 'object') {
42418
+ /* Shield configuration object from tampering */
42419
+ if (!cfg || (typeof cfg === 'undefined' ? 'undefined' : _typeof(cfg)) !== 'object') {
42537
42420
  cfg = {};
42538
42421
  }
42539
- /* Shield configuration object from prototype pollution */
42540
42422
 
42423
+ /* Shield configuration object from prototype pollution */
42541
42424
  cfg = clone(cfg);
42542
- PARSER_MEDIA_TYPE =
42543
- // eslint-disable-next-line unicorn/prefer-includes
42544
- SUPPORTED_PARSER_MEDIA_TYPES.indexOf(cfg.PARSER_MEDIA_TYPE) === -1 ? PARSER_MEDIA_TYPE = DEFAULT_PARSER_MEDIA_TYPE : PARSER_MEDIA_TYPE = cfg.PARSER_MEDIA_TYPE; // HTML tags and attributes are not case-sensitive, converting to lowercase. Keeping XHTML as is.
42545
42425
 
42546
- transformCaseFunc = PARSER_MEDIA_TYPE === 'application/xhtml+xml' ? stringToString : stringToLowerCase;
42547
42426
  /* Set configuration parameters */
42548
-
42549
- ALLOWED_TAGS = 'ALLOWED_TAGS' in cfg ? addToSet({}, cfg.ALLOWED_TAGS, transformCaseFunc) : DEFAULT_ALLOWED_TAGS;
42550
- ALLOWED_ATTR = 'ALLOWED_ATTR' in cfg ? addToSet({}, cfg.ALLOWED_ATTR, transformCaseFunc) : DEFAULT_ALLOWED_ATTR;
42551
- ALLOWED_NAMESPACES = 'ALLOWED_NAMESPACES' in cfg ? addToSet({}, cfg.ALLOWED_NAMESPACES, stringToString) : DEFAULT_ALLOWED_NAMESPACES;
42552
- URI_SAFE_ATTRIBUTES = 'ADD_URI_SAFE_ATTR' in cfg ? addToSet(clone(DEFAULT_URI_SAFE_ATTRIBUTES),
42553
- // eslint-disable-line indent
42554
- cfg.ADD_URI_SAFE_ATTR,
42555
- // eslint-disable-line indent
42556
- transformCaseFunc // eslint-disable-line indent
42557
- ) // eslint-disable-line indent
42558
- : DEFAULT_URI_SAFE_ATTRIBUTES;
42559
- DATA_URI_TAGS = 'ADD_DATA_URI_TAGS' in cfg ? addToSet(clone(DEFAULT_DATA_URI_TAGS),
42560
- // eslint-disable-line indent
42561
- cfg.ADD_DATA_URI_TAGS,
42562
- // eslint-disable-line indent
42563
- transformCaseFunc // eslint-disable-line indent
42564
- ) // eslint-disable-line indent
42565
- : DEFAULT_DATA_URI_TAGS;
42566
- FORBID_CONTENTS = 'FORBID_CONTENTS' in cfg ? addToSet({}, cfg.FORBID_CONTENTS, transformCaseFunc) : DEFAULT_FORBID_CONTENTS;
42567
- FORBID_TAGS = 'FORBID_TAGS' in cfg ? addToSet({}, cfg.FORBID_TAGS, transformCaseFunc) : {};
42568
- FORBID_ATTR = 'FORBID_ATTR' in cfg ? addToSet({}, cfg.FORBID_ATTR, transformCaseFunc) : {};
42427
+ ALLOWED_TAGS = 'ALLOWED_TAGS' in cfg ? addToSet({}, cfg.ALLOWED_TAGS) : DEFAULT_ALLOWED_TAGS;
42428
+ ALLOWED_ATTR = 'ALLOWED_ATTR' in cfg ? addToSet({}, cfg.ALLOWED_ATTR) : DEFAULT_ALLOWED_ATTR;
42429
+ URI_SAFE_ATTRIBUTES = 'ADD_URI_SAFE_ATTR' in cfg ? addToSet(clone(DEFAULT_URI_SAFE_ATTRIBUTES), cfg.ADD_URI_SAFE_ATTR) : DEFAULT_URI_SAFE_ATTRIBUTES;
42430
+ DATA_URI_TAGS = 'ADD_DATA_URI_TAGS' in cfg ? addToSet(clone(DEFAULT_DATA_URI_TAGS), cfg.ADD_DATA_URI_TAGS) : DEFAULT_DATA_URI_TAGS;
42431
+ FORBID_TAGS = 'FORBID_TAGS' in cfg ? addToSet({}, cfg.FORBID_TAGS) : {};
42432
+ FORBID_ATTR = 'FORBID_ATTR' in cfg ? addToSet({}, cfg.FORBID_ATTR) : {};
42569
42433
  USE_PROFILES = 'USE_PROFILES' in cfg ? cfg.USE_PROFILES : false;
42570
42434
  ALLOW_ARIA_ATTR = cfg.ALLOW_ARIA_ATTR !== false; // Default true
42571
-
42572
42435
  ALLOW_DATA_ATTR = cfg.ALLOW_DATA_ATTR !== false; // Default true
42573
-
42574
42436
  ALLOW_UNKNOWN_PROTOCOLS = cfg.ALLOW_UNKNOWN_PROTOCOLS || false; // Default false
42575
-
42576
- ALLOW_SELF_CLOSE_IN_ATTR = cfg.ALLOW_SELF_CLOSE_IN_ATTR !== false; // Default true
42577
-
42578
42437
  SAFE_FOR_TEMPLATES = cfg.SAFE_FOR_TEMPLATES || false; // Default false
42579
-
42580
42438
  WHOLE_DOCUMENT = cfg.WHOLE_DOCUMENT || false; // Default false
42581
-
42582
42439
  RETURN_DOM = cfg.RETURN_DOM || false; // Default false
42583
-
42584
42440
  RETURN_DOM_FRAGMENT = cfg.RETURN_DOM_FRAGMENT || false; // Default false
42585
-
42441
+ RETURN_DOM_IMPORT = cfg.RETURN_DOM_IMPORT !== false; // Default true
42586
42442
  RETURN_TRUSTED_TYPE = cfg.RETURN_TRUSTED_TYPE || false; // Default false
42587
-
42588
42443
  FORCE_BODY = cfg.FORCE_BODY || false; // Default false
42589
-
42590
42444
  SANITIZE_DOM = cfg.SANITIZE_DOM !== false; // Default true
42591
-
42592
- SANITIZE_NAMED_PROPS = cfg.SANITIZE_NAMED_PROPS || false; // Default false
42593
-
42594
42445
  KEEP_CONTENT = cfg.KEEP_CONTENT !== false; // Default true
42595
-
42596
42446
  IN_PLACE = cfg.IN_PLACE || false; // Default false
42597
-
42598
- IS_ALLOWED_URI$1 = cfg.ALLOWED_URI_REGEXP || IS_ALLOWED_URI$1;
42599
- NAMESPACE = cfg.NAMESPACE || HTML_NAMESPACE;
42600
- CUSTOM_ELEMENT_HANDLING = cfg.CUSTOM_ELEMENT_HANDLING || {};
42601
- if (cfg.CUSTOM_ELEMENT_HANDLING && isRegexOrFunction(cfg.CUSTOM_ELEMENT_HANDLING.tagNameCheck)) {
42602
- CUSTOM_ELEMENT_HANDLING.tagNameCheck = cfg.CUSTOM_ELEMENT_HANDLING.tagNameCheck;
42603
- }
42604
- if (cfg.CUSTOM_ELEMENT_HANDLING && isRegexOrFunction(cfg.CUSTOM_ELEMENT_HANDLING.attributeNameCheck)) {
42605
- CUSTOM_ELEMENT_HANDLING.attributeNameCheck = cfg.CUSTOM_ELEMENT_HANDLING.attributeNameCheck;
42606
- }
42607
- if (cfg.CUSTOM_ELEMENT_HANDLING && typeof cfg.CUSTOM_ELEMENT_HANDLING.allowCustomizedBuiltInElements === 'boolean') {
42608
- CUSTOM_ELEMENT_HANDLING.allowCustomizedBuiltInElements = cfg.CUSTOM_ELEMENT_HANDLING.allowCustomizedBuiltInElements;
42609
- }
42447
+ IS_ALLOWED_URI$$1 = cfg.ALLOWED_URI_REGEXP || IS_ALLOWED_URI$$1;
42610
42448
  if (SAFE_FOR_TEMPLATES) {
42611
42449
  ALLOW_DATA_ATTR = false;
42612
42450
  }
42613
42451
  if (RETURN_DOM_FRAGMENT) {
42614
42452
  RETURN_DOM = true;
42615
42453
  }
42616
- /* Parse profile info */
42617
42454
 
42455
+ /* Parse profile info */
42618
42456
  if (USE_PROFILES) {
42619
- ALLOWED_TAGS = addToSet({}, _toConsumableArray(text));
42457
+ ALLOWED_TAGS = addToSet({}, [].concat(_toConsumableArray$1(text)));
42620
42458
  ALLOWED_ATTR = [];
42621
42459
  if (USE_PROFILES.html === true) {
42622
- addToSet(ALLOWED_TAGS, html$1);
42623
- addToSet(ALLOWED_ATTR, html);
42460
+ addToSet(ALLOWED_TAGS, html);
42461
+ addToSet(ALLOWED_ATTR, html$1);
42624
42462
  }
42625
42463
  if (USE_PROFILES.svg === true) {
42626
- addToSet(ALLOWED_TAGS, svg$1);
42627
- addToSet(ALLOWED_ATTR, svg);
42464
+ addToSet(ALLOWED_TAGS, svg);
42465
+ addToSet(ALLOWED_ATTR, svg$1);
42628
42466
  addToSet(ALLOWED_ATTR, xml);
42629
42467
  }
42630
42468
  if (USE_PROFILES.svgFilters === true) {
42631
42469
  addToSet(ALLOWED_TAGS, svgFilters);
42632
- addToSet(ALLOWED_ATTR, svg);
42470
+ addToSet(ALLOWED_ATTR, svg$1);
42633
42471
  addToSet(ALLOWED_ATTR, xml);
42634
42472
  }
42635
42473
  if (USE_PROFILES.mathMl === true) {
42636
- addToSet(ALLOWED_TAGS, mathMl$1);
42637
- addToSet(ALLOWED_ATTR, mathMl);
42474
+ addToSet(ALLOWED_TAGS, mathMl);
42475
+ addToSet(ALLOWED_ATTR, mathMl$1);
42638
42476
  addToSet(ALLOWED_ATTR, xml);
42639
42477
  }
42640
42478
  }
42641
- /* Merge configuration parameters */
42642
42479
 
42480
+ /* Merge configuration parameters */
42643
42481
  if (cfg.ADD_TAGS) {
42644
42482
  if (ALLOWED_TAGS === DEFAULT_ALLOWED_TAGS) {
42645
42483
  ALLOWED_TAGS = clone(ALLOWED_TAGS);
42646
42484
  }
42647
- addToSet(ALLOWED_TAGS, cfg.ADD_TAGS, transformCaseFunc);
42485
+ addToSet(ALLOWED_TAGS, cfg.ADD_TAGS);
42648
42486
  }
42649
42487
  if (cfg.ADD_ATTR) {
42650
42488
  if (ALLOWED_ATTR === DEFAULT_ALLOWED_ATTR) {
42651
42489
  ALLOWED_ATTR = clone(ALLOWED_ATTR);
42652
42490
  }
42653
- addToSet(ALLOWED_ATTR, cfg.ADD_ATTR, transformCaseFunc);
42491
+ addToSet(ALLOWED_ATTR, cfg.ADD_ATTR);
42654
42492
  }
42655
42493
  if (cfg.ADD_URI_SAFE_ATTR) {
42656
- addToSet(URI_SAFE_ATTRIBUTES, cfg.ADD_URI_SAFE_ATTR, transformCaseFunc);
42494
+ addToSet(URI_SAFE_ATTRIBUTES, cfg.ADD_URI_SAFE_ATTR);
42657
42495
  }
42658
- if (cfg.FORBID_CONTENTS) {
42659
- if (FORBID_CONTENTS === DEFAULT_FORBID_CONTENTS) {
42660
- FORBID_CONTENTS = clone(FORBID_CONTENTS);
42661
- }
42662
- addToSet(FORBID_CONTENTS, cfg.FORBID_CONTENTS, transformCaseFunc);
42663
- }
42664
- /* Add #text in case KEEP_CONTENT is set to true */
42665
42496
 
42497
+ /* Add #text in case KEEP_CONTENT is set to true */
42666
42498
  if (KEEP_CONTENT) {
42667
42499
  ALLOWED_TAGS['#text'] = true;
42668
42500
  }
42669
- /* Add html, head and body to ALLOWED_TAGS in case WHOLE_DOCUMENT is true */
42670
42501
 
42502
+ /* Add html, head and body to ALLOWED_TAGS in case WHOLE_DOCUMENT is true */
42671
42503
  if (WHOLE_DOCUMENT) {
42672
42504
  addToSet(ALLOWED_TAGS, ['html', 'head', 'body']);
42673
42505
  }
42674
- /* Add tbody to ALLOWED_TAGS in case tables are permitted, see #286, #365 */
42675
42506
 
42507
+ /* Add tbody to ALLOWED_TAGS in case tables are permitted, see #286, #365 */
42676
42508
  if (ALLOWED_TAGS.table) {
42677
42509
  addToSet(ALLOWED_TAGS, ['tbody']);
42678
42510
  delete FORBID_TAGS.tbody;
42679
- } // Prevent further manipulation of configuration.
42680
- // Not available in IE8, Safari 5, etc.
42511
+ }
42681
42512
 
42513
+ // Prevent further manipulation of configuration.
42514
+ // Not available in IE8, Safari 5, etc.
42682
42515
  if (freeze) {
42683
42516
  freeze(cfg);
42684
42517
  }
42685
42518
  CONFIG = cfg;
42686
42519
  };
42687
42520
  var MATHML_TEXT_INTEGRATION_POINTS = addToSet({}, ['mi', 'mo', 'mn', 'ms', 'mtext']);
42688
- var HTML_INTEGRATION_POINTS = addToSet({}, ['foreignobject', 'desc', 'title', 'annotation-xml']); // Certain elements are allowed in both SVG and HTML
42689
- // namespace. We need to specify them explicitly
42690
- // so that they don't get erroneously deleted from
42691
- // HTML namespace.
42521
+ var HTML_INTEGRATION_POINTS = addToSet({}, ['foreignobject', 'desc', 'title', 'annotation-xml']);
42692
42522
 
42693
- var COMMON_SVG_AND_HTML_ELEMENTS = addToSet({}, ['title', 'style', 'font', 'a', 'script']);
42694
42523
  /* Keep track of all possible SVG and MathML tags
42695
42524
  * so that we can perform the namespace checks
42696
42525
  * correctly. */
42697
-
42698
- var ALL_SVG_TAGS = addToSet({}, svg$1);
42526
+ var ALL_SVG_TAGS = addToSet({}, svg);
42699
42527
  addToSet(ALL_SVG_TAGS, svgFilters);
42700
42528
  addToSet(ALL_SVG_TAGS, svgDisallowed);
42701
- var ALL_MATHML_TAGS = addToSet({}, mathMl$1);
42529
+ var ALL_MATHML_TAGS = addToSet({}, mathMl);
42702
42530
  addToSet(ALL_MATHML_TAGS, mathMlDisallowed);
42531
+ var MATHML_NAMESPACE = 'http://www.w3.org/1998/Math/MathML';
42532
+ var SVG_NAMESPACE = 'http://www.w3.org/2000/svg';
42533
+ var HTML_NAMESPACE = 'http://www.w3.org/1999/xhtml';
42534
+
42703
42535
  /**
42704
42536
  *
42705
42537
  *
@@ -42708,37 +42540,36 @@ var purify$2 = {exports: {}};
42708
42540
  * namespace that a spec-compliant parser would never
42709
42541
  * return. Return true otherwise.
42710
42542
  */
42711
-
42712
42543
  var _checkValidNamespace = function _checkValidNamespace(element) {
42713
- var parent = getParentNode(element); // In JSDOM, if we're inside shadow DOM, then parentNode
42714
- // can be null. We just simulate parent in this case.
42544
+ var parent = getParentNode(element);
42715
42545
 
42546
+ // In JSDOM, if we're inside shadow DOM, then parentNode
42547
+ // can be null. We just simulate parent in this case.
42716
42548
  if (!parent || !parent.tagName) {
42717
42549
  parent = {
42718
- namespaceURI: NAMESPACE,
42550
+ namespaceURI: HTML_NAMESPACE,
42719
42551
  tagName: 'template'
42720
42552
  };
42721
42553
  }
42722
42554
  var tagName = stringToLowerCase(element.tagName);
42723
42555
  var parentTagName = stringToLowerCase(parent.tagName);
42724
- if (!ALLOWED_NAMESPACES[element.namespaceURI]) {
42725
- return false;
42726
- }
42727
42556
  if (element.namespaceURI === SVG_NAMESPACE) {
42728
42557
  // The only way to switch from HTML namespace to SVG
42729
42558
  // is via <svg>. If it happens via any other tag, then
42730
42559
  // it should be killed.
42731
42560
  if (parent.namespaceURI === HTML_NAMESPACE) {
42732
42561
  return tagName === 'svg';
42733
- } // The only way to switch from MathML to SVG is via`
42562
+ }
42563
+
42564
+ // The only way to switch from MathML to SVG is via
42734
42565
  // svg if parent is either <annotation-xml> or MathML
42735
42566
  // text integration points.
42736
-
42737
42567
  if (parent.namespaceURI === MATHML_NAMESPACE) {
42738
42568
  return tagName === 'svg' && (parentTagName === 'annotation-xml' || MATHML_TEXT_INTEGRATION_POINTS[parentTagName]);
42739
- } // We only allow elements that are defined in SVG
42740
- // spec. All others are disallowed in SVG namespace.
42569
+ }
42741
42570
 
42571
+ // We only allow elements that are defined in SVG
42572
+ // spec. All others are disallowed in SVG namespace.
42742
42573
  return Boolean(ALL_SVG_TAGS[tagName]);
42743
42574
  }
42744
42575
  if (element.namespaceURI === MATHML_NAMESPACE) {
@@ -42747,14 +42578,16 @@ var purify$2 = {exports: {}};
42747
42578
  // it should be killed.
42748
42579
  if (parent.namespaceURI === HTML_NAMESPACE) {
42749
42580
  return tagName === 'math';
42750
- } // The only way to switch from SVG to MathML is via
42751
- // <math> and HTML integration points
42581
+ }
42752
42582
 
42583
+ // The only way to switch from SVG to MathML is via
42584
+ // <math> and HTML integration points
42753
42585
  if (parent.namespaceURI === SVG_NAMESPACE) {
42754
42586
  return tagName === 'math' && HTML_INTEGRATION_POINTS[parentTagName];
42755
- } // We only allow elements that are defined in MathML
42756
- // spec. All others are disallowed in MathML namespace.
42587
+ }
42757
42588
 
42589
+ // We only allow elements that are defined in MathML
42590
+ // spec. All others are disallowed in MathML namespace.
42758
42591
  return Boolean(ALL_MATHML_TAGS[tagName]);
42759
42592
  }
42760
42593
  if (element.namespaceURI === HTML_NAMESPACE) {
@@ -42766,33 +42599,35 @@ var purify$2 = {exports: {}};
42766
42599
  }
42767
42600
  if (parent.namespaceURI === MATHML_NAMESPACE && !MATHML_TEXT_INTEGRATION_POINTS[parentTagName]) {
42768
42601
  return false;
42769
- } // We disallow tags that are specific for MathML
42770
- // or SVG and should never appear in HTML namespace
42602
+ }
42771
42603
 
42772
- return !ALL_MATHML_TAGS[tagName] && (COMMON_SVG_AND_HTML_ELEMENTS[tagName] || !ALL_SVG_TAGS[tagName]);
42773
- } // For XHTML and XML documents that support custom namespaces
42604
+ // Certain elements are allowed in both SVG and HTML
42605
+ // namespace. We need to specify them explicitly
42606
+ // so that they don't get erronously deleted from
42607
+ // HTML namespace.
42608
+ var commonSvgAndHTMLElements = addToSet({}, ['title', 'style', 'font', 'a', 'script']);
42774
42609
 
42775
- if (PARSER_MEDIA_TYPE === 'application/xhtml+xml' && ALLOWED_NAMESPACES[element.namespaceURI]) {
42776
- return true;
42777
- } // The code should never reach this place (this means
42778
- // that the element somehow got namespace that is not
42779
- // HTML, SVG, MathML or allowed via ALLOWED_NAMESPACES).
42780
- // Return false just in case.
42610
+ // We disallow tags that are specific for MathML
42611
+ // or SVG and should never appear in HTML namespace
42612
+ return !ALL_MATHML_TAGS[tagName] && (commonSvgAndHTMLElements[tagName] || !ALL_SVG_TAGS[tagName]);
42613
+ }
42781
42614
 
42615
+ // The code should never reach this place (this means
42616
+ // that the element somehow got namespace that is not
42617
+ // HTML, SVG or MathML). Return false just in case.
42782
42618
  return false;
42783
42619
  };
42620
+
42784
42621
  /**
42785
42622
  * _forceRemove
42786
42623
  *
42787
42624
  * @param {Node} node a DOM node
42788
42625
  */
42789
-
42790
42626
  var _forceRemove = function _forceRemove(node) {
42791
42627
  arrayPush(DOMPurify.removed, {
42792
42628
  element: node
42793
42629
  });
42794
42630
  try {
42795
- // eslint-disable-next-line unicorn/prefer-dom-node-remove
42796
42631
  node.parentNode.removeChild(node);
42797
42632
  } catch (_) {
42798
42633
  try {
@@ -42802,13 +42637,13 @@ var purify$2 = {exports: {}};
42802
42637
  }
42803
42638
  }
42804
42639
  };
42640
+
42805
42641
  /**
42806
42642
  * _removeAttribute
42807
42643
  *
42808
42644
  * @param {String} name an Attribute name
42809
42645
  * @param {Node} node a DOM node
42810
42646
  */
42811
-
42812
42647
  var _removeAttribute = function _removeAttribute(name, node) {
42813
42648
  try {
42814
42649
  arrayPush(DOMPurify.removed, {
@@ -42821,31 +42656,19 @@ var purify$2 = {exports: {}};
42821
42656
  from: node
42822
42657
  });
42823
42658
  }
42824
- node.removeAttribute(name); // We void attribute values for unremovable "is"" attributes
42825
-
42826
- if (name === 'is' && !ALLOWED_ATTR[name]) {
42827
- if (RETURN_DOM || RETURN_DOM_FRAGMENT) {
42828
- try {
42829
- _forceRemove(node);
42830
- } catch (_) {}
42831
- } else {
42832
- try {
42833
- node.setAttribute(name, '');
42834
- } catch (_) {}
42835
- }
42836
- }
42659
+ node.removeAttribute(name);
42837
42660
  };
42661
+
42838
42662
  /**
42839
42663
  * _initDocument
42840
42664
  *
42841
42665
  * @param {String} dirty a string of dirty markup
42842
42666
  * @return {Document} a DOM, filled with the dirty markup
42843
42667
  */
42844
-
42845
42668
  var _initDocument = function _initDocument(dirty) {
42846
42669
  /* Create a HTML document */
42847
- var doc;
42848
- var leadingWhitespace;
42670
+ var doc = void 0;
42671
+ var leadingWhitespace = void 0;
42849
42672
  if (FORCE_BODY) {
42850
42673
  dirty = '<remove></remove>' + dirty;
42851
42674
  } else {
@@ -42853,73 +42676,66 @@ var purify$2 = {exports: {}};
42853
42676
  var matches = stringMatch(dirty, /^[\r\n\t ]+/);
42854
42677
  leadingWhitespace = matches && matches[0];
42855
42678
  }
42856
- if (PARSER_MEDIA_TYPE === 'application/xhtml+xml' && NAMESPACE === HTML_NAMESPACE) {
42857
- // Root of XHTML doc must contain xmlns declaration (see https://www.w3.org/TR/xhtml1/normative.html#strict)
42858
- dirty = '<html xmlns="http://www.w3.org/1999/xhtml"><head></head><body>' + dirty + '</body></html>';
42859
- }
42860
42679
  var dirtyPayload = trustedTypesPolicy ? trustedTypesPolicy.createHTML(dirty) : dirty;
42861
- /*
42862
- * Use the DOMParser API by default, fallback later if needs be
42863
- * DOMParser not work for svg when has multiple root element.
42864
- */
42680
+ /* Use the DOMParser API by default, fallback later if needs be */
42681
+ try {
42682
+ doc = new DOMParser().parseFromString(dirtyPayload, 'text/html');
42683
+ } catch (_) {}
42865
42684
 
42866
- if (NAMESPACE === HTML_NAMESPACE) {
42867
- try {
42868
- doc = new DOMParser().parseFromString(dirtyPayload, PARSER_MEDIA_TYPE);
42869
- } catch (_) {}
42870
- }
42871
42685
  /* Use createHTMLDocument in case DOMParser is not available */
42872
-
42873
42686
  if (!doc || !doc.documentElement) {
42874
- doc = implementation.createDocument(NAMESPACE, 'template', null);
42875
- try {
42876
- doc.documentElement.innerHTML = IS_EMPTY_INPUT ? emptyHTML : dirtyPayload;
42877
- } catch (_) {// Syntax error if dirtyPayload is invalid xml
42878
- }
42687
+ doc = implementation.createHTMLDocument('');
42688
+ var _doc = doc,
42689
+ body = _doc.body;
42690
+ body.parentNode.removeChild(body.parentNode.firstElementChild);
42691
+ body.outerHTML = dirtyPayload;
42879
42692
  }
42880
- var body = doc.body || doc.documentElement;
42881
42693
  if (dirty && leadingWhitespace) {
42882
- body.insertBefore(document.createTextNode(leadingWhitespace), body.childNodes[0] || null);
42694
+ doc.body.insertBefore(document.createTextNode(leadingWhitespace), doc.body.childNodes[0] || null);
42883
42695
  }
42884
- /* Work on whole document or just its body */
42885
42696
 
42886
- if (NAMESPACE === HTML_NAMESPACE) {
42887
- return getElementsByTagName.call(doc, WHOLE_DOCUMENT ? 'html' : 'body')[0];
42888
- }
42889
- return WHOLE_DOCUMENT ? doc.documentElement : body;
42697
+ /* Work on whole document or just its body */
42698
+ return getElementsByTagName.call(doc, WHOLE_DOCUMENT ? 'html' : 'body')[0];
42890
42699
  };
42700
+
42891
42701
  /**
42892
42702
  * _createIterator
42893
42703
  *
42894
42704
  * @param {Document} root document/fragment to create iterator for
42895
42705
  * @return {Iterator} iterator instance
42896
42706
  */
42897
-
42898
42707
  var _createIterator = function _createIterator(root) {
42899
- return createNodeIterator.call(root.ownerDocument || root, root,
42900
- // eslint-disable-next-line no-bitwise
42901
- NodeFilter.SHOW_ELEMENT | NodeFilter.SHOW_COMMENT | NodeFilter.SHOW_TEXT, null, false);
42708
+ return createNodeIterator.call(root.ownerDocument || root, root, NodeFilter.SHOW_ELEMENT | NodeFilter.SHOW_COMMENT | NodeFilter.SHOW_TEXT, function () {
42709
+ return NodeFilter.FILTER_ACCEPT;
42710
+ }, false);
42902
42711
  };
42712
+
42903
42713
  /**
42904
42714
  * _isClobbered
42905
42715
  *
42906
42716
  * @param {Node} elm element to check for clobbering attacks
42907
42717
  * @return {Boolean} true if clobbered, false if safe
42908
42718
  */
42909
-
42910
42719
  var _isClobbered = function _isClobbered(elm) {
42911
- return elm instanceof HTMLFormElement && (typeof elm.nodeName !== 'string' || typeof elm.textContent !== 'string' || typeof elm.removeChild !== 'function' || !(elm.attributes instanceof NamedNodeMap) || typeof elm.removeAttribute !== 'function' || typeof elm.setAttribute !== 'function' || typeof elm.namespaceURI !== 'string' || typeof elm.insertBefore !== 'function' || typeof elm.hasChildNodes !== 'function');
42720
+ if (elm instanceof Text || elm instanceof Comment) {
42721
+ return false;
42722
+ }
42723
+ if (typeof elm.nodeName !== 'string' || typeof elm.textContent !== 'string' || typeof elm.removeChild !== 'function' || !(elm.attributes instanceof NamedNodeMap) || typeof elm.removeAttribute !== 'function' || typeof elm.setAttribute !== 'function' || typeof elm.namespaceURI !== 'string' || typeof elm.insertBefore !== 'function') {
42724
+ return true;
42725
+ }
42726
+ return false;
42912
42727
  };
42728
+
42913
42729
  /**
42914
42730
  * _isNode
42915
42731
  *
42916
42732
  * @param {Node} obj object to check whether it's a DOM node
42917
42733
  * @return {Boolean} true is object is a DOM node
42918
42734
  */
42919
-
42920
42735
  var _isNode = function _isNode(object) {
42921
- return _typeof(Node) === 'object' ? object instanceof Node : object && _typeof(object) === 'object' && typeof object.nodeType === 'number' && typeof object.nodeName === 'string';
42736
+ return (typeof Node === 'undefined' ? 'undefined' : _typeof(Node)) === 'object' ? object instanceof Node : object && (typeof object === 'undefined' ? 'undefined' : _typeof(object)) === 'object' && typeof object.nodeType === 'number' && typeof object.nodeName === 'string';
42922
42737
  };
42738
+
42923
42739
  /**
42924
42740
  * _executeHook
42925
42741
  * Execute user configurable hooks
@@ -42928,7 +42744,6 @@ var purify$2 = {exports: {}};
42928
42744
  * @param {Node} currentNode node to work on with the hook
42929
42745
  * @param {Object} data additional hook parameters
42930
42746
  */
42931
-
42932
42747
  var _executeHook = function _executeHook(entryPoint, currentNode, data) {
42933
42748
  if (!hooks[entryPoint]) {
42934
42749
  return;
@@ -42937,6 +42752,7 @@ var purify$2 = {exports: {}};
42937
42752
  hook.call(DOMPurify, currentNode, data, CONFIG);
42938
42753
  });
42939
42754
  };
42755
+
42940
42756
  /**
42941
42757
  * _sanitizeElements
42942
42758
  *
@@ -42947,88 +42763,70 @@ var purify$2 = {exports: {}};
42947
42763
  * @param {Node} currentNode to check for permission to exist
42948
42764
  * @return {Boolean} true if node was killed, false if left alive
42949
42765
  */
42950
-
42951
42766
  var _sanitizeElements = function _sanitizeElements(currentNode) {
42952
- var content;
42953
- /* Execute a hook if present */
42767
+ var content = void 0;
42954
42768
 
42769
+ /* Execute a hook if present */
42955
42770
  _executeHook('beforeSanitizeElements', currentNode, null);
42956
- /* Check if element is clobbered or can clobber */
42957
42771
 
42772
+ /* Check if element is clobbered or can clobber */
42958
42773
  if (_isClobbered(currentNode)) {
42959
42774
  _forceRemove(currentNode);
42960
42775
  return true;
42961
42776
  }
42962
- /* Check if tagname contains Unicode */
42963
42777
 
42964
- if (regExpTest(/[\u0080-\uFFFF]/, currentNode.nodeName)) {
42778
+ /* Check if tagname contains Unicode */
42779
+ if (stringMatch(currentNode.nodeName, /[\u0080-\uFFFF]/)) {
42965
42780
  _forceRemove(currentNode);
42966
42781
  return true;
42967
42782
  }
42783
+
42968
42784
  /* Now let's check the element's type and name */
42785
+ var tagName = stringToLowerCase(currentNode.nodeName);
42969
42786
 
42970
- var tagName = transformCaseFunc(currentNode.nodeName);
42971
42787
  /* Execute a hook if present */
42972
-
42973
42788
  _executeHook('uponSanitizeElement', currentNode, {
42974
42789
  tagName: tagName,
42975
42790
  allowedTags: ALLOWED_TAGS
42976
42791
  });
42977
- /* Detect mXSS attempts abusing namespace confusion */
42978
42792
 
42979
- if (currentNode.hasChildNodes() && !_isNode(currentNode.firstElementChild) && (!_isNode(currentNode.content) || !_isNode(currentNode.content.firstElementChild)) && regExpTest(/<[/\w]/g, currentNode.innerHTML) && regExpTest(/<[/\w]/g, currentNode.textContent)) {
42793
+ /* Detect mXSS attempts abusing namespace confusion */
42794
+ if (!_isNode(currentNode.firstElementChild) && (!_isNode(currentNode.content) || !_isNode(currentNode.content.firstElementChild)) && regExpTest(/<[/\w]/g, currentNode.innerHTML) && regExpTest(/<[/\w]/g, currentNode.textContent)) {
42980
42795
  _forceRemove(currentNode);
42981
42796
  return true;
42982
42797
  }
42983
- /* Mitigate a problem with templates inside select */
42984
42798
 
42985
- if (tagName === 'select' && regExpTest(/<template/i, currentNode.innerHTML)) {
42986
- _forceRemove(currentNode);
42987
- return true;
42988
- }
42989
42799
  /* Remove element if anything forbids its presence */
42990
-
42991
42800
  if (!ALLOWED_TAGS[tagName] || FORBID_TAGS[tagName]) {
42992
- /* Check if we have a custom element to handle */
42993
- if (!FORBID_TAGS[tagName] && _basicCustomElementTest(tagName)) {
42994
- if (CUSTOM_ELEMENT_HANDLING.tagNameCheck instanceof RegExp && regExpTest(CUSTOM_ELEMENT_HANDLING.tagNameCheck, tagName)) return false;
42995
- if (CUSTOM_ELEMENT_HANDLING.tagNameCheck instanceof Function && CUSTOM_ELEMENT_HANDLING.tagNameCheck(tagName)) return false;
42996
- }
42997
42801
  /* Keep content except for bad-listed elements */
42998
-
42999
42802
  if (KEEP_CONTENT && !FORBID_CONTENTS[tagName]) {
43000
- var parentNode = getParentNode(currentNode) || currentNode.parentNode;
43001
- var childNodes = getChildNodes(currentNode) || currentNode.childNodes;
43002
- if (childNodes && parentNode) {
43003
- var childCount = childNodes.length;
43004
- for (var i = childCount - 1; i >= 0; --i) {
43005
- parentNode.insertBefore(cloneNode(childNodes[i], true), getNextSibling(currentNode));
43006
- }
42803
+ var parentNode = getParentNode(currentNode);
42804
+ var childNodes = getChildNodes(currentNode);
42805
+ var childCount = childNodes.length;
42806
+ for (var i = childCount - 1; i >= 0; --i) {
42807
+ parentNode.insertBefore(cloneNode(childNodes[i], true), getNextSibling(currentNode));
43007
42808
  }
43008
42809
  }
43009
42810
  _forceRemove(currentNode);
43010
42811
  return true;
43011
42812
  }
43012
- /* Check whether element has a valid namespace */
43013
42813
 
42814
+ /* Check whether element has a valid namespace */
43014
42815
  if (currentNode instanceof Element && !_checkValidNamespace(currentNode)) {
43015
42816
  _forceRemove(currentNode);
43016
42817
  return true;
43017
42818
  }
43018
- /* Make sure that older browsers don't get fallback-tag mXSS */
43019
-
43020
- if ((tagName === 'noscript' || tagName === 'noembed' || tagName === 'noframes') && regExpTest(/<\/no(script|embed|frames)/i, currentNode.innerHTML)) {
42819
+ if ((tagName === 'noscript' || tagName === 'noembed') && regExpTest(/<\/no(script|embed)/i, currentNode.innerHTML)) {
43021
42820
  _forceRemove(currentNode);
43022
42821
  return true;
43023
42822
  }
43024
- /* Sanitize element content to be template-safe */
43025
42823
 
42824
+ /* Sanitize element content to be template-safe */
43026
42825
  if (SAFE_FOR_TEMPLATES && currentNode.nodeType === 3) {
43027
42826
  /* Get the element's text content */
43028
42827
  content = currentNode.textContent;
43029
- content = stringReplace(content, MUSTACHE_EXPR$1, ' ');
43030
- content = stringReplace(content, ERB_EXPR$1, ' ');
43031
- content = stringReplace(content, TMPLIT_EXPR$1, ' ');
42828
+ content = stringReplace(content, MUSTACHE_EXPR$$1, ' ');
42829
+ content = stringReplace(content, ERB_EXPR$$1, ' ');
43032
42830
  if (currentNode.textContent !== content) {
43033
42831
  arrayPush(DOMPurify.removed, {
43034
42832
  element: currentNode.cloneNode()
@@ -43036,11 +42834,12 @@ var purify$2 = {exports: {}};
43036
42834
  currentNode.textContent = content;
43037
42835
  }
43038
42836
  }
43039
- /* Execute a hook if present */
43040
42837
 
42838
+ /* Execute a hook if present */
43041
42839
  _executeHook('afterSanitizeElements', currentNode, null);
43042
42840
  return false;
43043
42841
  };
42842
+
43044
42843
  /**
43045
42844
  * _isValidAttribute
43046
42845
  *
@@ -43050,44 +42849,26 @@ var purify$2 = {exports: {}};
43050
42849
  * @return {Boolean} Returns true if `value` is valid, otherwise false.
43051
42850
  */
43052
42851
  // eslint-disable-next-line complexity
43053
-
43054
42852
  var _isValidAttribute = function _isValidAttribute(lcTag, lcName, value) {
43055
42853
  /* Make sure attribute cannot clobber */
43056
42854
  if (SANITIZE_DOM && (lcName === 'id' || lcName === 'name') && (value in document || value in formElement)) {
43057
42855
  return false;
43058
42856
  }
42857
+
43059
42858
  /* Allow valid data-* attributes: At least one character after "-"
43060
42859
  (https://html.spec.whatwg.org/multipage/dom.html#embedding-custom-non-visible-data-with-the-data-*-attributes)
43061
42860
  XML-compatible (https://html.spec.whatwg.org/multipage/infrastructure.html#xml-compatible and http://www.w3.org/TR/xml/#d0e804)
43062
42861
  We don't need to check the value; it's always URI safe. */
42862
+ if (ALLOW_DATA_ATTR && regExpTest(DATA_ATTR$$1, lcName)) ;else if (ALLOW_ARIA_ATTR && regExpTest(ARIA_ATTR$$1, lcName)) ;else if (!ALLOWED_ATTR[lcName] || FORBID_ATTR[lcName]) {
42863
+ return false;
43063
42864
 
43064
- if (ALLOW_DATA_ATTR && !FORBID_ATTR[lcName] && regExpTest(DATA_ATTR$1, lcName)) ;else if (ALLOW_ARIA_ATTR && regExpTest(ARIA_ATTR$1, lcName)) ;else if (!ALLOWED_ATTR[lcName] || FORBID_ATTR[lcName]) {
43065
- if (
43066
- // First condition does a very basic check if a) it's basically a valid custom element tagname AND
43067
- // b) if the tagName passes whatever the user has configured for CUSTOM_ELEMENT_HANDLING.tagNameCheck
43068
- // and c) if the attribute name passes whatever the user has configured for CUSTOM_ELEMENT_HANDLING.attributeNameCheck
43069
- _basicCustomElementTest(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)) ||
43070
- // Alternative, second condition checks if it's an `is`-attribute, AND
43071
- // the value passes whatever the user has configured for CUSTOM_ELEMENT_HANDLING.tagNameCheck
43072
- 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))) ;else {
43073
- return false;
43074
- }
43075
42865
  /* Check value is safe. First, is attr inert? If so, is safe */
43076
- } else if (URI_SAFE_ATTRIBUTES[lcName]) ;else if (regExpTest(IS_ALLOWED_URI$1, stringReplace(value, ATTR_WHITESPACE$1, ''))) ;else if ((lcName === 'src' || lcName === 'xlink:href' || lcName === 'href') && lcTag !== 'script' && stringIndexOf(value, 'data:') === 0 && DATA_URI_TAGS[lcTag]) ;else if (ALLOW_UNKNOWN_PROTOCOLS && !regExpTest(IS_SCRIPT_OR_DATA$1, stringReplace(value, ATTR_WHITESPACE$1, ''))) ;else if (value) {
42866
+ } else if (URI_SAFE_ATTRIBUTES[lcName]) ;else if (regExpTest(IS_ALLOWED_URI$$1, stringReplace(value, ATTR_WHITESPACE$$1, ''))) ;else if ((lcName === 'src' || lcName === 'xlink:href' || lcName === 'href') && lcTag !== 'script' && stringIndexOf(value, 'data:') === 0 && DATA_URI_TAGS[lcTag]) ;else if (ALLOW_UNKNOWN_PROTOCOLS && !regExpTest(IS_SCRIPT_OR_DATA$$1, stringReplace(value, ATTR_WHITESPACE$$1, ''))) ;else if (!value) ;else {
43077
42867
  return false;
43078
- } else ;
42868
+ }
43079
42869
  return true;
43080
42870
  };
43081
- /**
43082
- * _basicCustomElementCheck
43083
- * checks if at least one dash is included in tagName, and it's not the first char
43084
- * for more sophisticated checking see https://github.com/sindresorhus/validate-element-name
43085
- * @param {string} tagName name of the tag of the node to sanitize
43086
- */
43087
42871
 
43088
- var _basicCustomElementTest = function _basicCustomElementTest(tagName) {
43089
- return tagName.indexOf('-') > 0;
43090
- };
43091
42872
  /**
43092
42873
  * _sanitizeAttributes
43093
42874
  *
@@ -43098,16 +42879,15 @@ var purify$2 = {exports: {}};
43098
42879
  *
43099
42880
  * @param {Node} currentNode to sanitize
43100
42881
  */
43101
-
43102
42882
  var _sanitizeAttributes = function _sanitizeAttributes(currentNode) {
43103
- var attr;
43104
- var value;
43105
- var lcName;
43106
- var l;
42883
+ var attr = void 0;
42884
+ var value = void 0;
42885
+ var lcName = void 0;
42886
+ var l = void 0;
43107
42887
  /* Execute a hook if present */
43108
-
43109
42888
  _executeHook('beforeSanitizeAttributes', currentNode, null);
43110
42889
  var attributes = currentNode.attributes;
42890
+
43111
42891
  /* Check if we have attributes; if not we might have a text node */
43112
42892
 
43113
42893
  if (!attributes) {
@@ -43120,86 +42900,55 @@ var purify$2 = {exports: {}};
43120
42900
  allowedAttributes: ALLOWED_ATTR
43121
42901
  };
43122
42902
  l = attributes.length;
43123
- /* Go backwards over all attributes; safely remove bad ones */
43124
42903
 
42904
+ /* Go backwards over all attributes; safely remove bad ones */
43125
42905
  while (l--) {
43126
42906
  attr = attributes[l];
43127
42907
  var _attr = attr,
43128
42908
  name = _attr.name,
43129
42909
  namespaceURI = _attr.namespaceURI;
43130
- value = name === 'value' ? attr.value : stringTrim(attr.value);
43131
- lcName = transformCaseFunc(name);
43132
- /* Execute a hook if present */
42910
+ value = stringTrim(attr.value);
42911
+ lcName = stringToLowerCase(name);
43133
42912
 
42913
+ /* Execute a hook if present */
43134
42914
  hookEvent.attrName = lcName;
43135
42915
  hookEvent.attrValue = value;
43136
42916
  hookEvent.keepAttr = true;
43137
42917
  hookEvent.forceKeepAttr = undefined; // Allows developers to see this is a property they can set
43138
-
43139
42918
  _executeHook('uponSanitizeAttribute', currentNode, hookEvent);
43140
42919
  value = hookEvent.attrValue;
43141
42920
  /* Did the hooks approve of the attribute? */
43142
-
43143
42921
  if (hookEvent.forceKeepAttr) {
43144
42922
  continue;
43145
42923
  }
43146
- /* Remove attribute */
43147
42924
 
42925
+ /* Remove attribute */
43148
42926
  _removeAttribute(name, currentNode);
43149
- /* Did the hooks approve of the attribute? */
43150
42927
 
42928
+ /* Did the hooks approve of the attribute? */
43151
42929
  if (!hookEvent.keepAttr) {
43152
42930
  continue;
43153
42931
  }
43154
- /* Work around a security issue in jQuery 3.0 */
43155
42932
 
43156
- if (!ALLOW_SELF_CLOSE_IN_ATTR && regExpTest(/\/>/i, value)) {
42933
+ /* Work around a security issue in jQuery 3.0 */
42934
+ if (regExpTest(/\/>/i, value)) {
43157
42935
  _removeAttribute(name, currentNode);
43158
42936
  continue;
43159
42937
  }
43160
- /* Sanitize attribute content to be template-safe */
43161
42938
 
42939
+ /* Sanitize attribute content to be template-safe */
43162
42940
  if (SAFE_FOR_TEMPLATES) {
43163
- value = stringReplace(value, MUSTACHE_EXPR$1, ' ');
43164
- value = stringReplace(value, ERB_EXPR$1, ' ');
43165
- value = stringReplace(value, TMPLIT_EXPR$1, ' ');
42941
+ value = stringReplace(value, MUSTACHE_EXPR$$1, ' ');
42942
+ value = stringReplace(value, ERB_EXPR$$1, ' ');
43166
42943
  }
43167
- /* Is `value` valid for this attribute? */
43168
42944
 
43169
- var lcTag = transformCaseFunc(currentNode.nodeName);
42945
+ /* Is `value` valid for this attribute? */
42946
+ var lcTag = currentNode.nodeName.toLowerCase();
43170
42947
  if (!_isValidAttribute(lcTag, lcName, value)) {
43171
42948
  continue;
43172
42949
  }
43173
- /* Full DOM Clobbering protection via namespace isolation,
43174
- * Prefix id and name attributes with `user-content-`
43175
- */
43176
-
43177
- if (SANITIZE_NAMED_PROPS && (lcName === 'id' || lcName === 'name')) {
43178
- // Remove the attribute with this value
43179
- _removeAttribute(name, currentNode); // Prefix the value and later re-create the attribute with the sanitized value
43180
-
43181
- value = SANITIZE_NAMED_PROPS_PREFIX + value;
43182
- }
43183
- /* Handle attributes that require Trusted Types */
43184
42950
 
43185
- if (trustedTypesPolicy && _typeof(trustedTypes) === 'object' && typeof trustedTypes.getAttributeType === 'function') {
43186
- if (namespaceURI) ;else {
43187
- switch (trustedTypes.getAttributeType(lcTag, lcName)) {
43188
- case 'TrustedHTML':
43189
- {
43190
- value = trustedTypesPolicy.createHTML(value);
43191
- break;
43192
- }
43193
- case 'TrustedScriptURL':
43194
- {
43195
- value = trustedTypesPolicy.createScriptURL(value);
43196
- break;
43197
- }
43198
- }
43199
- }
43200
- }
43201
42951
  /* Handle invalid data-* attribute set by try-catching it */
43202
-
43203
42952
  try {
43204
42953
  if (namespaceURI) {
43205
42954
  currentNode.setAttributeNS(namespaceURI, name, value);
@@ -43210,43 +42959,44 @@ var purify$2 = {exports: {}};
43210
42959
  arrayPop(DOMPurify.removed);
43211
42960
  } catch (_) {}
43212
42961
  }
43213
- /* Execute a hook if present */
43214
42962
 
42963
+ /* Execute a hook if present */
43215
42964
  _executeHook('afterSanitizeAttributes', currentNode, null);
43216
42965
  };
42966
+
43217
42967
  /**
43218
42968
  * _sanitizeShadowDOM
43219
42969
  *
43220
42970
  * @param {DocumentFragment} fragment to iterate over recursively
43221
42971
  */
43222
-
43223
42972
  var _sanitizeShadowDOM = function _sanitizeShadowDOM(fragment) {
43224
- var shadowNode;
42973
+ var shadowNode = void 0;
43225
42974
  var shadowIterator = _createIterator(fragment);
43226
- /* Execute a hook if present */
43227
42975
 
42976
+ /* Execute a hook if present */
43228
42977
  _executeHook('beforeSanitizeShadowDOM', fragment, null);
43229
42978
  while (shadowNode = shadowIterator.nextNode()) {
43230
42979
  /* Execute a hook if present */
43231
42980
  _executeHook('uponSanitizeShadowNode', shadowNode, null);
43232
- /* Sanitize tags and elements */
43233
42981
 
42982
+ /* Sanitize tags and elements */
43234
42983
  if (_sanitizeElements(shadowNode)) {
43235
42984
  continue;
43236
42985
  }
43237
- /* Deep shadow DOM detected */
43238
42986
 
42987
+ /* Deep shadow DOM detected */
43239
42988
  if (shadowNode.content instanceof DocumentFragment) {
43240
42989
  _sanitizeShadowDOM(shadowNode.content);
43241
42990
  }
43242
- /* Check attributes, sanitize if necessary */
43243
42991
 
42992
+ /* Check attributes, sanitize if necessary */
43244
42993
  _sanitizeAttributes(shadowNode);
43245
42994
  }
43246
- /* Execute a hook if present */
43247
42995
 
42996
+ /* Execute a hook if present */
43248
42997
  _executeHook('afterSanitizeShadowDOM', fragment, null);
43249
42998
  };
42999
+
43250
43000
  /**
43251
43001
  * Sanitize
43252
43002
  * Public method providing core sanitation functionality
@@ -43255,36 +43005,33 @@ var purify$2 = {exports: {}};
43255
43005
  * @param {Object} configuration object
43256
43006
  */
43257
43007
  // eslint-disable-next-line complexity
43258
-
43259
- DOMPurify.sanitize = function (dirty) {
43260
- var cfg = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {};
43261
- var body;
43262
- var importedNode;
43263
- var currentNode;
43264
- var oldNode;
43265
- var returnNode;
43008
+ DOMPurify.sanitize = function (dirty, cfg) {
43009
+ var body = void 0;
43010
+ var importedNode = void 0;
43011
+ var currentNode = void 0;
43012
+ var oldNode = void 0;
43013
+ var returnNode = void 0;
43266
43014
  /* Make sure we have a string to sanitize.
43267
43015
  DO NOT return early, as this will return the wrong type if
43268
43016
  the user has requested a DOM object rather than a string */
43269
-
43270
- IS_EMPTY_INPUT = !dirty;
43271
- if (IS_EMPTY_INPUT) {
43017
+ if (!dirty) {
43272
43018
  dirty = '<!-->';
43273
43019
  }
43274
- /* Stringify, in case dirty is an object */
43275
43020
 
43021
+ /* Stringify, in case dirty is an object */
43276
43022
  if (typeof dirty !== 'string' && !_isNode(dirty)) {
43277
- if (typeof dirty.toString === 'function') {
43023
+ // eslint-disable-next-line no-negated-condition
43024
+ if (typeof dirty.toString !== 'function') {
43025
+ throw typeErrorCreate('toString is not a function');
43026
+ } else {
43278
43027
  dirty = dirty.toString();
43279
43028
  if (typeof dirty !== 'string') {
43280
43029
  throw typeErrorCreate('dirty is not a string, aborting');
43281
43030
  }
43282
- } else {
43283
- throw typeErrorCreate('toString is not a function');
43284
43031
  }
43285
43032
  }
43286
- /* Check we can run. Otherwise fall back or ignore */
43287
43033
 
43034
+ /* Check we can run. Otherwise fall back or ignore */
43288
43035
  if (!DOMPurify.isSupported) {
43289
43036
  if (_typeof(window.toStaticHTML) === 'object' || typeof window.toStaticHTML === 'function') {
43290
43037
  if (typeof dirty === 'string') {
@@ -43296,28 +43043,20 @@ var purify$2 = {exports: {}};
43296
43043
  }
43297
43044
  return dirty;
43298
43045
  }
43299
- /* Assign config vars */
43300
43046
 
43047
+ /* Assign config vars */
43301
43048
  if (!SET_CONFIG) {
43302
43049
  _parseConfig(cfg);
43303
43050
  }
43304
- /* Clean up removed elements */
43305
43051
 
43052
+ /* Clean up removed elements */
43306
43053
  DOMPurify.removed = [];
43307
- /* Check if dirty is correctly typed for IN_PLACE */
43308
43054
 
43055
+ /* Check if dirty is correctly typed for IN_PLACE */
43309
43056
  if (typeof dirty === 'string') {
43310
43057
  IN_PLACE = false;
43311
43058
  }
43312
- if (IN_PLACE) {
43313
- /* Do some early pre-sanitization to avoid unsafe root nodes */
43314
- if (dirty.nodeName) {
43315
- var tagName = transformCaseFunc(dirty.nodeName);
43316
- if (!ALLOWED_TAGS[tagName] || FORBID_TAGS[tagName]) {
43317
- throw typeErrorCreate('root node is forbidden and cannot be sanitized in-place');
43318
- }
43319
- }
43320
- } else if (dirty instanceof Node) {
43059
+ if (IN_PLACE) ;else if (dirty instanceof Node) {
43321
43060
  /* If dirty is a DOM element, append to an empty document to avoid
43322
43061
  elements being stripped by the parser */
43323
43062
  body = _initDocument('<!---->');
@@ -43328,7 +43067,7 @@ var purify$2 = {exports: {}};
43328
43067
  } else if (importedNode.nodeName === 'HTML') {
43329
43068
  body = importedNode;
43330
43069
  } else {
43331
- // eslint-disable-next-line unicorn/prefer-dom-node-append
43070
+ // eslint-disable-next-line unicorn/prefer-node-append
43332
43071
  body.appendChild(importedNode);
43333
43072
  }
43334
43073
  } else {
@@ -43338,64 +43077,64 @@ var purify$2 = {exports: {}};
43338
43077
  dirty.indexOf('<') === -1) {
43339
43078
  return trustedTypesPolicy && RETURN_TRUSTED_TYPE ? trustedTypesPolicy.createHTML(dirty) : dirty;
43340
43079
  }
43341
- /* Initialize the document to work on */
43342
43080
 
43081
+ /* Initialize the document to work on */
43343
43082
  body = _initDocument(dirty);
43344
- /* Check we have a DOM node from the data */
43345
43083
 
43084
+ /* Check we have a DOM node from the data */
43346
43085
  if (!body) {
43347
- return RETURN_DOM ? null : RETURN_TRUSTED_TYPE ? emptyHTML : '';
43086
+ return RETURN_DOM ? null : emptyHTML;
43348
43087
  }
43349
43088
  }
43350
- /* Remove first element node (ours) if FORCE_BODY is set */
43351
43089
 
43090
+ /* Remove first element node (ours) if FORCE_BODY is set */
43352
43091
  if (body && FORCE_BODY) {
43353
43092
  _forceRemove(body.firstChild);
43354
43093
  }
43355
- /* Get node iterator */
43356
43094
 
43095
+ /* Get node iterator */
43357
43096
  var nodeIterator = _createIterator(IN_PLACE ? dirty : body);
43358
- /* Now start iterating over the created document */
43359
43097
 
43098
+ /* Now start iterating over the created document */
43360
43099
  while (currentNode = nodeIterator.nextNode()) {
43361
43100
  /* Fix IE's strange behavior with manipulated textNodes #89 */
43362
43101
  if (currentNode.nodeType === 3 && currentNode === oldNode) {
43363
43102
  continue;
43364
43103
  }
43365
- /* Sanitize tags and elements */
43366
43104
 
43105
+ /* Sanitize tags and elements */
43367
43106
  if (_sanitizeElements(currentNode)) {
43368
43107
  continue;
43369
43108
  }
43370
- /* Shadow DOM detected, sanitize it */
43371
43109
 
43110
+ /* Shadow DOM detected, sanitize it */
43372
43111
  if (currentNode.content instanceof DocumentFragment) {
43373
43112
  _sanitizeShadowDOM(currentNode.content);
43374
43113
  }
43375
- /* Check attributes, sanitize if necessary */
43376
43114
 
43115
+ /* Check attributes, sanitize if necessary */
43377
43116
  _sanitizeAttributes(currentNode);
43378
43117
  oldNode = currentNode;
43379
43118
  }
43380
43119
  oldNode = null;
43381
- /* If we sanitized `dirty` in-place, return it. */
43382
43120
 
43121
+ /* If we sanitized `dirty` in-place, return it. */
43383
43122
  if (IN_PLACE) {
43384
43123
  return dirty;
43385
43124
  }
43386
- /* Return sanitized string or DOM */
43387
43125
 
43126
+ /* Return sanitized string or DOM */
43388
43127
  if (RETURN_DOM) {
43389
43128
  if (RETURN_DOM_FRAGMENT) {
43390
43129
  returnNode = createDocumentFragment.call(body.ownerDocument);
43391
43130
  while (body.firstChild) {
43392
- // eslint-disable-next-line unicorn/prefer-dom-node-append
43131
+ // eslint-disable-next-line unicorn/prefer-node-append
43393
43132
  returnNode.appendChild(body.firstChild);
43394
43133
  }
43395
43134
  } else {
43396
43135
  returnNode = body;
43397
43136
  }
43398
- if (ALLOWED_ATTR.shadowroot || ALLOWED_ATTR.shadowrootmod) {
43137
+ if (RETURN_DOM_IMPORT) {
43399
43138
  /*
43400
43139
  AdoptNode() is not used because internal state is not reset
43401
43140
  (e.g. the past names map of a HTMLFormElement), this is safe
@@ -43408,41 +43147,36 @@ var purify$2 = {exports: {}};
43408
43147
  return returnNode;
43409
43148
  }
43410
43149
  var serializedHTML = WHOLE_DOCUMENT ? body.outerHTML : body.innerHTML;
43411
- /* Serialize doctype if allowed */
43412
43150
 
43413
- if (WHOLE_DOCUMENT && ALLOWED_TAGS['!doctype'] && body.ownerDocument && body.ownerDocument.doctype && body.ownerDocument.doctype.name && regExpTest(DOCTYPE_NAME, body.ownerDocument.doctype.name)) {
43414
- serializedHTML = '<!DOCTYPE ' + body.ownerDocument.doctype.name + '>\n' + serializedHTML;
43415
- }
43416
43151
  /* Sanitize final string template-safe */
43417
-
43418
43152
  if (SAFE_FOR_TEMPLATES) {
43419
- serializedHTML = stringReplace(serializedHTML, MUSTACHE_EXPR$1, ' ');
43420
- serializedHTML = stringReplace(serializedHTML, ERB_EXPR$1, ' ');
43421
- serializedHTML = stringReplace(serializedHTML, TMPLIT_EXPR$1, ' ');
43153
+ serializedHTML = stringReplace(serializedHTML, MUSTACHE_EXPR$$1, ' ');
43154
+ serializedHTML = stringReplace(serializedHTML, ERB_EXPR$$1, ' ');
43422
43155
  }
43423
43156
  return trustedTypesPolicy && RETURN_TRUSTED_TYPE ? trustedTypesPolicy.createHTML(serializedHTML) : serializedHTML;
43424
43157
  };
43158
+
43425
43159
  /**
43426
43160
  * Public method to set the configuration once
43427
43161
  * setConfig
43428
43162
  *
43429
43163
  * @param {Object} cfg configuration object
43430
43164
  */
43431
-
43432
43165
  DOMPurify.setConfig = function (cfg) {
43433
43166
  _parseConfig(cfg);
43434
43167
  SET_CONFIG = true;
43435
43168
  };
43169
+
43436
43170
  /**
43437
43171
  * Public method to remove the configuration
43438
43172
  * clearConfig
43439
43173
  *
43440
43174
  */
43441
-
43442
43175
  DOMPurify.clearConfig = function () {
43443
43176
  CONFIG = null;
43444
43177
  SET_CONFIG = false;
43445
43178
  };
43179
+
43446
43180
  /**
43447
43181
  * Public method to check if an attribute value is valid.
43448
43182
  * Uses last set config, if any. Otherwise, uses config defaults.
@@ -43453,16 +43187,16 @@ var purify$2 = {exports: {}};
43453
43187
  * @param {string} value Attribute value.
43454
43188
  * @return {Boolean} Returns true if `value` is valid. Otherwise, returns false.
43455
43189
  */
43456
-
43457
43190
  DOMPurify.isValidAttribute = function (tag, attr, value) {
43458
43191
  /* Initialize shared config vars if necessary. */
43459
43192
  if (!CONFIG) {
43460
43193
  _parseConfig({});
43461
43194
  }
43462
- var lcTag = transformCaseFunc(tag);
43463
- var lcName = transformCaseFunc(attr);
43195
+ var lcTag = stringToLowerCase(tag);
43196
+ var lcName = stringToLowerCase(attr);
43464
43197
  return _isValidAttribute(lcTag, lcName, value);
43465
43198
  };
43199
+
43466
43200
  /**
43467
43201
  * AddHook
43468
43202
  * Public method to add DOMPurify hooks
@@ -43470,7 +43204,6 @@ var purify$2 = {exports: {}};
43470
43204
  * @param {String} entryPoint entry point for the hook to add
43471
43205
  * @param {Function} hookFunction function to execute
43472
43206
  */
43473
-
43474
43207
  DOMPurify.addHook = function (entryPoint, hookFunction) {
43475
43208
  if (typeof hookFunction !== 'function') {
43476
43209
  return;
@@ -43478,38 +43211,37 @@ var purify$2 = {exports: {}};
43478
43211
  hooks[entryPoint] = hooks[entryPoint] || [];
43479
43212
  arrayPush(hooks[entryPoint], hookFunction);
43480
43213
  };
43214
+
43481
43215
  /**
43482
43216
  * RemoveHook
43483
43217
  * Public method to remove a DOMPurify hook at a given entryPoint
43484
43218
  * (pops it from the stack of hooks if more are present)
43485
43219
  *
43486
43220
  * @param {String} entryPoint entry point for the hook to remove
43487
- * @return {Function} removed(popped) hook
43488
43221
  */
43489
-
43490
43222
  DOMPurify.removeHook = function (entryPoint) {
43491
43223
  if (hooks[entryPoint]) {
43492
- return arrayPop(hooks[entryPoint]);
43224
+ arrayPop(hooks[entryPoint]);
43493
43225
  }
43494
43226
  };
43227
+
43495
43228
  /**
43496
43229
  * RemoveHooks
43497
43230
  * Public method to remove all DOMPurify hooks at a given entryPoint
43498
43231
  *
43499
43232
  * @param {String} entryPoint entry point for the hooks to remove
43500
43233
  */
43501
-
43502
43234
  DOMPurify.removeHooks = function (entryPoint) {
43503
43235
  if (hooks[entryPoint]) {
43504
43236
  hooks[entryPoint] = [];
43505
43237
  }
43506
43238
  };
43239
+
43507
43240
  /**
43508
43241
  * RemoveAllHooks
43509
43242
  * Public method to remove all DOMPurify hooks
43510
43243
  *
43511
43244
  */
43512
-
43513
43245
  DOMPurify.removeAllHooks = function () {
43514
43246
  hooks = {};
43515
43247
  };
@@ -43532,7 +43264,7 @@ var check = function (it) {
43532
43264
  };
43533
43265
 
43534
43266
  // https://github.com/zloirock/core-js/issues/86#issuecomment-115759028
43535
- var global$l =
43267
+ var globalThis_1 =
43536
43268
  // eslint-disable-next-line es/no-global-this -- safe
43537
43269
  check(typeof globalThis == 'object' && globalThis) ||
43538
43270
  check(typeof window == 'object' && window) ||
@@ -43594,7 +43326,7 @@ objectPropertyIsEnumerable.f = NASHORN_BUG ? function propertyIsEnumerable(V) {
43594
43326
  return !!descriptor && descriptor.enumerable;
43595
43327
  } : $propertyIsEnumerable;
43596
43328
 
43597
- var createPropertyDescriptor$4 = function (bitmap, value) {
43329
+ var createPropertyDescriptor$3 = function (bitmap, value) {
43598
43330
  return {
43599
43331
  enumerable: !(bitmap & 1),
43600
43332
  configurable: !(bitmap & 2),
@@ -43615,21 +43347,21 @@ var functionUncurryThis = NATIVE_BIND$2 ? uncurryThisWithBind : function (fn) {
43615
43347
  };
43616
43348
  };
43617
43349
 
43618
- var uncurryThis$p = functionUncurryThis;
43350
+ var uncurryThis$o = functionUncurryThis;
43619
43351
 
43620
- var toString$b = uncurryThis$p({}.toString);
43621
- var stringSlice$7 = uncurryThis$p(''.slice);
43352
+ var toString$b = uncurryThis$o({}.toString);
43353
+ var stringSlice$7 = uncurryThis$o(''.slice);
43622
43354
 
43623
43355
  var classofRaw$2 = function (it) {
43624
43356
  return stringSlice$7(toString$b(it), 8, -1);
43625
43357
  };
43626
43358
 
43627
- var uncurryThis$o = functionUncurryThis;
43359
+ var uncurryThis$n = functionUncurryThis;
43628
43360
  var fails$i = fails$l;
43629
43361
  var classof$8 = classofRaw$2;
43630
43362
 
43631
43363
  var $Object$4 = Object;
43632
- var split = uncurryThis$o(''.split);
43364
+ var split = uncurryThis$n(''.split);
43633
43365
 
43634
43366
  // fallback for non-array-like ES3 and non-enumerable old V8 strings
43635
43367
  var indexedObject = fails$i(function () {
@@ -43652,75 +43384,64 @@ var $TypeError$f = TypeError;
43652
43384
 
43653
43385
  // `RequireObjectCoercible` abstract operation
43654
43386
  // https://tc39.es/ecma262/#sec-requireobjectcoercible
43655
- var requireObjectCoercible$a = function (it) {
43387
+ var requireObjectCoercible$b = function (it) {
43656
43388
  if (isNullOrUndefined$6(it)) throw new $TypeError$f("Can't call method on " + it);
43657
43389
  return it;
43658
43390
  };
43659
43391
 
43660
43392
  // toObject with fallback for non-array-like ES3 strings
43661
43393
  var IndexedObject$1 = indexedObject;
43662
- var requireObjectCoercible$9 = requireObjectCoercible$a;
43394
+ var requireObjectCoercible$a = requireObjectCoercible$b;
43663
43395
 
43664
43396
  var toIndexedObject$5 = function (it) {
43665
- return IndexedObject$1(requireObjectCoercible$9(it));
43397
+ return IndexedObject$1(requireObjectCoercible$a(it));
43666
43398
  };
43667
43399
 
43668
- var documentAll$2 = typeof document == 'object' && document.all;
43669
-
43670
43400
  // https://tc39.es/ecma262/#sec-IsHTMLDDA-internal-slot
43671
- // eslint-disable-next-line unicorn/no-typeof-undefined -- required for testing
43672
- var IS_HTMLDDA = typeof documentAll$2 == 'undefined' && documentAll$2 !== undefined;
43673
-
43674
- var documentAll_1 = {
43675
- all: documentAll$2,
43676
- IS_HTMLDDA: IS_HTMLDDA
43677
- };
43678
-
43679
- var $documentAll$1 = documentAll_1;
43680
-
43681
- var documentAll$1 = $documentAll$1.all;
43401
+ var documentAll = typeof document == 'object' && document.all;
43682
43402
 
43683
43403
  // `IsCallable` abstract operation
43684
43404
  // https://tc39.es/ecma262/#sec-iscallable
43685
- var isCallable$m = $documentAll$1.IS_HTMLDDA ? function (argument) {
43686
- return typeof argument == 'function' || argument === documentAll$1;
43405
+ // eslint-disable-next-line unicorn/no-typeof-undefined -- required for testing
43406
+ var isCallable$l = typeof documentAll == 'undefined' && documentAll !== undefined ? function (argument) {
43407
+ return typeof argument == 'function' || argument === documentAll;
43687
43408
  } : function (argument) {
43688
43409
  return typeof argument == 'function';
43689
43410
  };
43690
43411
 
43691
- var isCallable$l = isCallable$m;
43692
- var $documentAll = documentAll_1;
43412
+ var isCallable$k = isCallable$l;
43693
43413
 
43694
- var documentAll = $documentAll.all;
43695
-
43696
- var isObject$9 = $documentAll.IS_HTMLDDA ? function (it) {
43697
- return typeof it == 'object' ? it !== null : isCallable$l(it) || it === documentAll;
43698
- } : function (it) {
43699
- return typeof it == 'object' ? it !== null : isCallable$l(it);
43414
+ var isObject$b = function (it) {
43415
+ return typeof it == 'object' ? it !== null : isCallable$k(it);
43700
43416
  };
43701
43417
 
43702
- var global$k = global$l;
43703
- var isCallable$k = isCallable$m;
43418
+ var globalThis$m = globalThis_1;
43419
+ var isCallable$j = isCallable$l;
43704
43420
 
43705
43421
  var aFunction = function (argument) {
43706
- return isCallable$k(argument) ? argument : undefined;
43422
+ return isCallable$j(argument) ? argument : undefined;
43707
43423
  };
43708
43424
 
43709
43425
  var getBuiltIn$7 = function (namespace, method) {
43710
- return arguments.length < 2 ? aFunction(global$k[namespace]) : global$k[namespace] && global$k[namespace][method];
43426
+ return arguments.length < 2 ? aFunction(globalThis$m[namespace]) : globalThis$m[namespace] && globalThis$m[namespace][method];
43711
43427
  };
43712
43428
 
43713
- var uncurryThis$n = functionUncurryThis;
43429
+ var uncurryThis$m = functionUncurryThis;
43430
+
43431
+ var objectIsPrototypeOf = uncurryThis$m({}.isPrototypeOf);
43714
43432
 
43715
- var objectIsPrototypeOf = uncurryThis$n({}.isPrototypeOf);
43433
+ var globalThis$l = globalThis_1;
43716
43434
 
43717
- var engineUserAgent = typeof navigator != 'undefined' && String(navigator.userAgent) || '';
43435
+ var navigator$1 = globalThis$l.navigator;
43436
+ var userAgent$5 = navigator$1 && navigator$1.userAgent;
43718
43437
 
43719
- var global$j = global$l;
43720
- var userAgent$3 = engineUserAgent;
43438
+ var environmentUserAgent = userAgent$5 ? String(userAgent$5) : '';
43721
43439
 
43722
- var process$4 = global$j.process;
43723
- var Deno$1 = global$j.Deno;
43440
+ var globalThis$k = globalThis_1;
43441
+ var userAgent$4 = environmentUserAgent;
43442
+
43443
+ var process$4 = globalThis$k.process;
43444
+ var Deno$1 = globalThis$k.Deno;
43724
43445
  var versions = process$4 && process$4.versions || Deno$1 && Deno$1.version;
43725
43446
  var v8 = versions && versions.v8;
43726
43447
  var match, version;
@@ -43734,22 +43455,22 @@ if (v8) {
43734
43455
 
43735
43456
  // BrowserFS NodeJS `process` polyfill incorrectly set `.v8` to `0.0`
43736
43457
  // so check `userAgent` even if `.v8` exists, but 0
43737
- if (!version && userAgent$3) {
43738
- match = userAgent$3.match(/Edge\/(\d+)/);
43458
+ if (!version && userAgent$4) {
43459
+ match = userAgent$4.match(/Edge\/(\d+)/);
43739
43460
  if (!match || match[1] >= 74) {
43740
- match = userAgent$3.match(/Chrome\/(\d+)/);
43461
+ match = userAgent$4.match(/Chrome\/(\d+)/);
43741
43462
  if (match) version = +match[1];
43742
43463
  }
43743
43464
  }
43744
43465
 
43745
- var engineV8Version = version;
43466
+ var environmentV8Version = version;
43746
43467
 
43747
43468
  /* eslint-disable es/no-symbol -- required for testing */
43748
- var V8_VERSION$1 = engineV8Version;
43469
+ var V8_VERSION$1 = environmentV8Version;
43749
43470
  var fails$h = fails$l;
43750
- var global$i = global$l;
43471
+ var globalThis$j = globalThis_1;
43751
43472
 
43752
- var $String$5 = global$i.String;
43473
+ var $String$5 = globalThis$j.String;
43753
43474
 
43754
43475
  // eslint-disable-next-line es/no-object-getownpropertysymbols -- required for testing
43755
43476
  var symbolConstructorDetection = !!Object.getOwnPropertySymbols && !fails$h(function () {
@@ -43771,7 +43492,7 @@ var useSymbolAsUid = NATIVE_SYMBOL$1
43771
43492
  && typeof Symbol.iterator == 'symbol';
43772
43493
 
43773
43494
  var getBuiltIn$6 = getBuiltIn$7;
43774
- var isCallable$j = isCallable$m;
43495
+ var isCallable$i = isCallable$l;
43775
43496
  var isPrototypeOf$3 = objectIsPrototypeOf;
43776
43497
  var USE_SYMBOL_AS_UID$1 = useSymbolAsUid;
43777
43498
 
@@ -43781,7 +43502,7 @@ var isSymbol$2 = USE_SYMBOL_AS_UID$1 ? function (it) {
43781
43502
  return typeof it == 'symbol';
43782
43503
  } : function (it) {
43783
43504
  var $Symbol = getBuiltIn$6('Symbol');
43784
- return isCallable$j($Symbol) && isPrototypeOf$3($Symbol.prototype, $Object$3(it));
43505
+ return isCallable$i($Symbol) && isPrototypeOf$3($Symbol.prototype, $Object$3(it));
43785
43506
  };
43786
43507
 
43787
43508
  var $String$4 = String;
@@ -43794,14 +43515,14 @@ var tryToString$4 = function (argument) {
43794
43515
  }
43795
43516
  };
43796
43517
 
43797
- var isCallable$i = isCallable$m;
43518
+ var isCallable$h = isCallable$l;
43798
43519
  var tryToString$3 = tryToString$4;
43799
43520
 
43800
43521
  var $TypeError$e = TypeError;
43801
43522
 
43802
43523
  // `Assert: IsCallable(argument) is true`
43803
43524
  var aCallable$9 = function (argument) {
43804
- if (isCallable$i(argument)) return argument;
43525
+ if (isCallable$h(argument)) return argument;
43805
43526
  throw new $TypeError$e(tryToString$3(argument) + ' is not a function');
43806
43527
  };
43807
43528
 
@@ -43816,8 +43537,8 @@ var getMethod$6 = function (V, P) {
43816
43537
  };
43817
43538
 
43818
43539
  var call$h = functionCall;
43819
- var isCallable$h = isCallable$m;
43820
- var isObject$8 = isObject$9;
43540
+ var isCallable$g = isCallable$l;
43541
+ var isObject$a = isObject$b;
43821
43542
 
43822
43543
  var $TypeError$d = TypeError;
43823
43544
 
@@ -43825,63 +43546,63 @@ var $TypeError$d = TypeError;
43825
43546
  // https://tc39.es/ecma262/#sec-ordinarytoprimitive
43826
43547
  var ordinaryToPrimitive$1 = function (input, pref) {
43827
43548
  var fn, val;
43828
- if (pref === 'string' && isCallable$h(fn = input.toString) && !isObject$8(val = call$h(fn, input))) return val;
43829
- if (isCallable$h(fn = input.valueOf) && !isObject$8(val = call$h(fn, input))) return val;
43830
- if (pref !== 'string' && isCallable$h(fn = input.toString) && !isObject$8(val = call$h(fn, input))) return val;
43549
+ if (pref === 'string' && isCallable$g(fn = input.toString) && !isObject$a(val = call$h(fn, input))) return val;
43550
+ if (isCallable$g(fn = input.valueOf) && !isObject$a(val = call$h(fn, input))) return val;
43551
+ if (pref !== 'string' && isCallable$g(fn = input.toString) && !isObject$a(val = call$h(fn, input))) return val;
43831
43552
  throw new $TypeError$d("Can't convert object to primitive value");
43832
43553
  };
43833
43554
 
43834
- var shared$4 = {exports: {}};
43555
+ var sharedStore = {exports: {}};
43835
43556
 
43836
- var global$h = global$l;
43557
+ var globalThis$i = globalThis_1;
43837
43558
 
43838
43559
  // eslint-disable-next-line es/no-object-defineproperty -- safe
43839
43560
  var defineProperty$5 = Object.defineProperty;
43840
43561
 
43841
43562
  var defineGlobalProperty$3 = function (key, value) {
43842
43563
  try {
43843
- defineProperty$5(global$h, key, { value: value, configurable: true, writable: true });
43564
+ defineProperty$5(globalThis$i, key, { value: value, configurable: true, writable: true });
43844
43565
  } catch (error) {
43845
- global$h[key] = value;
43566
+ globalThis$i[key] = value;
43846
43567
  } return value;
43847
43568
  };
43848
43569
 
43849
- var global$g = global$l;
43570
+ var globalThis$h = globalThis_1;
43850
43571
  var defineGlobalProperty$2 = defineGlobalProperty$3;
43851
43572
 
43852
43573
  var SHARED = '__core-js_shared__';
43853
- var store$3 = global$g[SHARED] || defineGlobalProperty$2(SHARED, {});
43854
-
43855
- var sharedStore = store$3;
43574
+ var store$3 = sharedStore.exports = globalThis$h[SHARED] || defineGlobalProperty$2(SHARED, {});
43856
43575
 
43857
- var store$2 = sharedStore;
43858
-
43859
- (shared$4.exports = function (key, value) {
43860
- return store$2[key] || (store$2[key] = value !== undefined ? value : {});
43861
- })('versions', []).push({
43862
- version: '3.34.0',
43576
+ (store$3.versions || (store$3.versions = [])).push({
43577
+ version: '3.38.0',
43863
43578
  mode: 'global',
43864
- copyright: '© 2014-2023 Denis Pushkarev (zloirock.ru)',
43865
- license: 'https://github.com/zloirock/core-js/blob/v3.34.0/LICENSE',
43579
+ copyright: '© 2014-2024 Denis Pushkarev (zloirock.ru)',
43580
+ license: 'https://github.com/zloirock/core-js/blob/v3.38.0/LICENSE',
43866
43581
  source: 'https://github.com/zloirock/core-js'
43867
43582
  });
43868
43583
 
43869
- var sharedExports = shared$4.exports;
43584
+ var sharedStoreExports = sharedStore.exports;
43585
+
43586
+ var store$2 = sharedStoreExports;
43870
43587
 
43871
- var requireObjectCoercible$8 = requireObjectCoercible$a;
43588
+ var shared$4 = function (key, value) {
43589
+ return store$2[key] || (store$2[key] = value || {});
43590
+ };
43591
+
43592
+ var requireObjectCoercible$9 = requireObjectCoercible$b;
43872
43593
 
43873
43594
  var $Object$2 = Object;
43874
43595
 
43875
43596
  // `ToObject` abstract operation
43876
43597
  // https://tc39.es/ecma262/#sec-toobject
43877
43598
  var toObject$4 = function (argument) {
43878
- return $Object$2(requireObjectCoercible$8(argument));
43599
+ return $Object$2(requireObjectCoercible$9(argument));
43879
43600
  };
43880
43601
 
43881
- var uncurryThis$m = functionUncurryThis;
43602
+ var uncurryThis$l = functionUncurryThis;
43882
43603
  var toObject$3 = toObject$4;
43883
43604
 
43884
- var hasOwnProperty = uncurryThis$m({}.hasOwnProperty);
43605
+ var hasOwnProperty = uncurryThis$l({}.hasOwnProperty);
43885
43606
 
43886
43607
  // `HasOwnProperty` abstract operation
43887
43608
  // https://tc39.es/ecma262/#sec-hasownproperty
@@ -43890,24 +43611,24 @@ var hasOwnProperty_1 = Object.hasOwn || function hasOwn(it, key) {
43890
43611
  return hasOwnProperty(toObject$3(it), key);
43891
43612
  };
43892
43613
 
43893
- var uncurryThis$l = functionUncurryThis;
43614
+ var uncurryThis$k = functionUncurryThis;
43894
43615
 
43895
43616
  var id$1 = 0;
43896
43617
  var postfix = Math.random();
43897
- var toString$a = uncurryThis$l(1.0.toString);
43618
+ var toString$a = uncurryThis$k(1.0.toString);
43898
43619
 
43899
43620
  var uid$2 = function (key) {
43900
43621
  return 'Symbol(' + (key === undefined ? '' : key) + ')_' + toString$a(++id$1 + postfix, 36);
43901
43622
  };
43902
43623
 
43903
- var global$f = global$l;
43904
- var shared$3 = sharedExports;
43624
+ var globalThis$g = globalThis_1;
43625
+ var shared$3 = shared$4;
43905
43626
  var hasOwn$a = hasOwnProperty_1;
43906
43627
  var uid$1 = uid$2;
43907
43628
  var NATIVE_SYMBOL = symbolConstructorDetection;
43908
43629
  var USE_SYMBOL_AS_UID = useSymbolAsUid;
43909
43630
 
43910
- var Symbol$1 = global$f.Symbol;
43631
+ var Symbol$1 = globalThis$g.Symbol;
43911
43632
  var WellKnownSymbolsStore = shared$3('wks');
43912
43633
  var createWellKnownSymbol = USE_SYMBOL_AS_UID ? Symbol$1['for'] || Symbol$1 : Symbol$1 && Symbol$1.withoutSetter || uid$1;
43913
43634
 
@@ -43920,7 +43641,7 @@ var wellKnownSymbol$i = function (name) {
43920
43641
  };
43921
43642
 
43922
43643
  var call$g = functionCall;
43923
- var isObject$7 = isObject$9;
43644
+ var isObject$9 = isObject$b;
43924
43645
  var isSymbol$1 = isSymbol$2;
43925
43646
  var getMethod$5 = getMethod$6;
43926
43647
  var ordinaryToPrimitive = ordinaryToPrimitive$1;
@@ -43931,57 +43652,57 @@ var TO_PRIMITIVE = wellKnownSymbol$h('toPrimitive');
43931
43652
 
43932
43653
  // `ToPrimitive` abstract operation
43933
43654
  // https://tc39.es/ecma262/#sec-toprimitive
43934
- var toPrimitive$1 = function (input, pref) {
43935
- if (!isObject$7(input) || isSymbol$1(input)) return input;
43655
+ var toPrimitive$2 = function (input, pref) {
43656
+ if (!isObject$9(input) || isSymbol$1(input)) return input;
43936
43657
  var exoticToPrim = getMethod$5(input, TO_PRIMITIVE);
43937
43658
  var result;
43938
43659
  if (exoticToPrim) {
43939
43660
  if (pref === undefined) pref = 'default';
43940
43661
  result = call$g(exoticToPrim, input, pref);
43941
- if (!isObject$7(result) || isSymbol$1(result)) return result;
43662
+ if (!isObject$9(result) || isSymbol$1(result)) return result;
43942
43663
  throw new $TypeError$c("Can't convert object to primitive value");
43943
43664
  }
43944
43665
  if (pref === undefined) pref = 'number';
43945
43666
  return ordinaryToPrimitive(input, pref);
43946
43667
  };
43947
43668
 
43948
- var toPrimitive = toPrimitive$1;
43669
+ var toPrimitive$1 = toPrimitive$2;
43949
43670
  var isSymbol = isSymbol$2;
43950
43671
 
43951
43672
  // `ToPropertyKey` abstract operation
43952
43673
  // https://tc39.es/ecma262/#sec-topropertykey
43953
43674
  var toPropertyKey$3 = function (argument) {
43954
- var key = toPrimitive(argument, 'string');
43675
+ var key = toPrimitive$1(argument, 'string');
43955
43676
  return isSymbol(key) ? key : key + '';
43956
43677
  };
43957
43678
 
43958
- var global$e = global$l;
43959
- var isObject$6 = isObject$9;
43679
+ var globalThis$f = globalThis_1;
43680
+ var isObject$8 = isObject$b;
43960
43681
 
43961
- var document$3 = global$e.document;
43682
+ var document$3 = globalThis$f.document;
43962
43683
  // typeof document.createElement is 'object' in old IE
43963
- var EXISTS$1 = isObject$6(document$3) && isObject$6(document$3.createElement);
43684
+ var EXISTS$1 = isObject$8(document$3) && isObject$8(document$3.createElement);
43964
43685
 
43965
43686
  var documentCreateElement$2 = function (it) {
43966
43687
  return EXISTS$1 ? document$3.createElement(it) : {};
43967
43688
  };
43968
43689
 
43969
- var DESCRIPTORS$9 = descriptors;
43690
+ var DESCRIPTORS$a = descriptors;
43970
43691
  var fails$g = fails$l;
43971
43692
  var createElement$1 = documentCreateElement$2;
43972
43693
 
43973
43694
  // Thanks to IE8 for its funny defineProperty
43974
- var ie8DomDefine = !DESCRIPTORS$9 && !fails$g(function () {
43695
+ var ie8DomDefine = !DESCRIPTORS$a && !fails$g(function () {
43975
43696
  // eslint-disable-next-line es/no-object-defineproperty -- required for testing
43976
43697
  return Object.defineProperty(createElement$1('div'), 'a', {
43977
43698
  get: function () { return 7; }
43978
43699
  }).a !== 7;
43979
43700
  });
43980
43701
 
43981
- var DESCRIPTORS$8 = descriptors;
43702
+ var DESCRIPTORS$9 = descriptors;
43982
43703
  var call$f = functionCall;
43983
43704
  var propertyIsEnumerableModule = objectPropertyIsEnumerable;
43984
- var createPropertyDescriptor$3 = createPropertyDescriptor$4;
43705
+ var createPropertyDescriptor$2 = createPropertyDescriptor$3;
43985
43706
  var toIndexedObject$4 = toIndexedObject$5;
43986
43707
  var toPropertyKey$2 = toPropertyKey$3;
43987
43708
  var hasOwn$9 = hasOwnProperty_1;
@@ -43992,23 +43713,23 @@ var $getOwnPropertyDescriptor$1 = Object.getOwnPropertyDescriptor;
43992
43713
 
43993
43714
  // `Object.getOwnPropertyDescriptor` method
43994
43715
  // https://tc39.es/ecma262/#sec-object.getownpropertydescriptor
43995
- objectGetOwnPropertyDescriptor.f = DESCRIPTORS$8 ? $getOwnPropertyDescriptor$1 : function getOwnPropertyDescriptor(O, P) {
43716
+ objectGetOwnPropertyDescriptor.f = DESCRIPTORS$9 ? $getOwnPropertyDescriptor$1 : function getOwnPropertyDescriptor(O, P) {
43996
43717
  O = toIndexedObject$4(O);
43997
43718
  P = toPropertyKey$2(P);
43998
43719
  if (IE8_DOM_DEFINE$1) try {
43999
43720
  return $getOwnPropertyDescriptor$1(O, P);
44000
43721
  } catch (error) { /* empty */ }
44001
- if (hasOwn$9(O, P)) return createPropertyDescriptor$3(!call$f(propertyIsEnumerableModule.f, O, P), O[P]);
43722
+ if (hasOwn$9(O, P)) return createPropertyDescriptor$2(!call$f(propertyIsEnumerableModule.f, O, P), O[P]);
44002
43723
  };
44003
43724
 
44004
43725
  var objectDefineProperty = {};
44005
43726
 
44006
- var DESCRIPTORS$7 = descriptors;
43727
+ var DESCRIPTORS$8 = descriptors;
44007
43728
  var fails$f = fails$l;
44008
43729
 
44009
43730
  // V8 ~ Chrome 36-
44010
43731
  // https://bugs.chromium.org/p/v8/issues/detail?id=3334
44011
- var v8PrototypeDefineBug = DESCRIPTORS$7 && fails$f(function () {
43732
+ var v8PrototypeDefineBug = DESCRIPTORS$8 && fails$f(function () {
44012
43733
  // eslint-disable-next-line es/no-object-defineproperty -- required for testing
44013
43734
  return Object.defineProperty(function () { /* empty */ }, 'prototype', {
44014
43735
  value: 42,
@@ -44016,21 +43737,21 @@ var v8PrototypeDefineBug = DESCRIPTORS$7 && fails$f(function () {
44016
43737
  }).prototype !== 42;
44017
43738
  });
44018
43739
 
44019
- var isObject$5 = isObject$9;
43740
+ var isObject$7 = isObject$b;
44020
43741
 
44021
43742
  var $String$3 = String;
44022
43743
  var $TypeError$b = TypeError;
44023
43744
 
44024
43745
  // `Assert: Type(argument) is Object`
44025
- var anObject$g = function (argument) {
44026
- if (isObject$5(argument)) return argument;
43746
+ var anObject$f = function (argument) {
43747
+ if (isObject$7(argument)) return argument;
44027
43748
  throw new $TypeError$b($String$3(argument) + ' is not an object');
44028
43749
  };
44029
43750
 
44030
- var DESCRIPTORS$6 = descriptors;
43751
+ var DESCRIPTORS$7 = descriptors;
44031
43752
  var IE8_DOM_DEFINE = ie8DomDefine;
44032
43753
  var V8_PROTOTYPE_DEFINE_BUG$1 = v8PrototypeDefineBug;
44033
- var anObject$f = anObject$g;
43754
+ var anObject$e = anObject$f;
44034
43755
  var toPropertyKey$1 = toPropertyKey$3;
44035
43756
 
44036
43757
  var $TypeError$a = TypeError;
@@ -44044,10 +43765,10 @@ var WRITABLE = 'writable';
44044
43765
 
44045
43766
  // `Object.defineProperty` method
44046
43767
  // https://tc39.es/ecma262/#sec-object.defineproperty
44047
- objectDefineProperty.f = DESCRIPTORS$6 ? V8_PROTOTYPE_DEFINE_BUG$1 ? function defineProperty(O, P, Attributes) {
44048
- anObject$f(O);
43768
+ objectDefineProperty.f = DESCRIPTORS$7 ? V8_PROTOTYPE_DEFINE_BUG$1 ? function defineProperty(O, P, Attributes) {
43769
+ anObject$e(O);
44049
43770
  P = toPropertyKey$1(P);
44050
- anObject$f(Attributes);
43771
+ anObject$e(Attributes);
44051
43772
  if (typeof O === 'function' && P === 'prototype' && 'value' in Attributes && WRITABLE in Attributes && !Attributes[WRITABLE]) {
44052
43773
  var current = $getOwnPropertyDescriptor(O, P);
44053
43774
  if (current && current[WRITABLE]) {
@@ -44060,9 +43781,9 @@ objectDefineProperty.f = DESCRIPTORS$6 ? V8_PROTOTYPE_DEFINE_BUG$1 ? function de
44060
43781
  }
44061
43782
  } return $defineProperty(O, P, Attributes);
44062
43783
  } : $defineProperty : function defineProperty(O, P, Attributes) {
44063
- anObject$f(O);
43784
+ anObject$e(O);
44064
43785
  P = toPropertyKey$1(P);
44065
- anObject$f(Attributes);
43786
+ anObject$e(Attributes);
44066
43787
  if (IE8_DOM_DEFINE) try {
44067
43788
  return $defineProperty(O, P, Attributes);
44068
43789
  } catch (error) { /* empty */ }
@@ -44071,12 +43792,12 @@ objectDefineProperty.f = DESCRIPTORS$6 ? V8_PROTOTYPE_DEFINE_BUG$1 ? function de
44071
43792
  return O;
44072
43793
  };
44073
43794
 
44074
- var DESCRIPTORS$5 = descriptors;
44075
- var definePropertyModule$4 = objectDefineProperty;
44076
- var createPropertyDescriptor$2 = createPropertyDescriptor$4;
43795
+ var DESCRIPTORS$6 = descriptors;
43796
+ var definePropertyModule$3 = objectDefineProperty;
43797
+ var createPropertyDescriptor$1 = createPropertyDescriptor$3;
44077
43798
 
44078
- var createNonEnumerableProperty$5 = DESCRIPTORS$5 ? function (object, key, value) {
44079
- return definePropertyModule$4.f(object, key, createPropertyDescriptor$2(1, value));
43799
+ var createNonEnumerableProperty$5 = DESCRIPTORS$6 ? function (object, key, value) {
43800
+ return definePropertyModule$3.f(object, key, createPropertyDescriptor$1(1, value));
44080
43801
  } : function (object, key, value) {
44081
43802
  object[key] = value;
44082
43803
  return object;
@@ -44084,17 +43805,17 @@ var createNonEnumerableProperty$5 = DESCRIPTORS$5 ? function (object, key, value
44084
43805
 
44085
43806
  var makeBuiltIn$3 = {exports: {}};
44086
43807
 
44087
- var DESCRIPTORS$4 = descriptors;
43808
+ var DESCRIPTORS$5 = descriptors;
44088
43809
  var hasOwn$8 = hasOwnProperty_1;
44089
43810
 
44090
43811
  var FunctionPrototype$1 = Function.prototype;
44091
43812
  // eslint-disable-next-line es/no-object-getownpropertydescriptor -- safe
44092
- var getDescriptor = DESCRIPTORS$4 && Object.getOwnPropertyDescriptor;
43813
+ var getDescriptor = DESCRIPTORS$5 && Object.getOwnPropertyDescriptor;
44093
43814
 
44094
43815
  var EXISTS = hasOwn$8(FunctionPrototype$1, 'name');
44095
43816
  // additional protection from minified / mangled / dropped function names
44096
43817
  var PROPER = EXISTS && (function something() { /* empty */ }).name === 'something';
44097
- var CONFIGURABLE = EXISTS && (!DESCRIPTORS$4 || (DESCRIPTORS$4 && getDescriptor(FunctionPrototype$1, 'name').configurable));
43818
+ var CONFIGURABLE = EXISTS && (!DESCRIPTORS$5 || (DESCRIPTORS$5 && getDescriptor(FunctionPrototype$1, 'name').configurable));
44098
43819
 
44099
43820
  var functionName = {
44100
43821
  EXISTS: EXISTS,
@@ -44102,14 +43823,14 @@ var functionName = {
44102
43823
  CONFIGURABLE: CONFIGURABLE
44103
43824
  };
44104
43825
 
44105
- var uncurryThis$k = functionUncurryThis;
44106
- var isCallable$g = isCallable$m;
44107
- var store$1 = sharedStore;
43826
+ var uncurryThis$j = functionUncurryThis;
43827
+ var isCallable$f = isCallable$l;
43828
+ var store$1 = sharedStoreExports;
44108
43829
 
44109
- var functionToString = uncurryThis$k(Function.toString);
43830
+ var functionToString = uncurryThis$j(Function.toString);
44110
43831
 
44111
43832
  // this helper broken in `core-js@3.4.1-3.4.4`, so we can't use `shared` helper
44112
- if (!isCallable$g(store$1.inspectSource)) {
43833
+ if (!isCallable$f(store$1.inspectSource)) {
44113
43834
  store$1.inspectSource = function (it) {
44114
43835
  return functionToString(it);
44115
43836
  };
@@ -44117,14 +43838,14 @@ if (!isCallable$g(store$1.inspectSource)) {
44117
43838
 
44118
43839
  var inspectSource$3 = store$1.inspectSource;
44119
43840
 
44120
- var global$d = global$l;
44121
- var isCallable$f = isCallable$m;
43841
+ var globalThis$e = globalThis_1;
43842
+ var isCallable$e = isCallable$l;
44122
43843
 
44123
- var WeakMap$2 = global$d.WeakMap;
43844
+ var WeakMap$2 = globalThis$e.WeakMap;
44124
43845
 
44125
- var weakMapBasicDetection = isCallable$f(WeakMap$2) && /native code/.test(String(WeakMap$2));
43846
+ var weakMapBasicDetection = isCallable$e(WeakMap$2) && /native code/.test(String(WeakMap$2));
44126
43847
 
44127
- var shared$2 = sharedExports;
43848
+ var shared$2 = shared$4;
44128
43849
  var uid = uid$2;
44129
43850
 
44130
43851
  var keys = shared$2('keys');
@@ -44136,17 +43857,17 @@ var sharedKey$3 = function (key) {
44136
43857
  var hiddenKeys$4 = {};
44137
43858
 
44138
43859
  var NATIVE_WEAK_MAP = weakMapBasicDetection;
44139
- var global$c = global$l;
44140
- var isObject$4 = isObject$9;
43860
+ var globalThis$d = globalThis_1;
43861
+ var isObject$6 = isObject$b;
44141
43862
  var createNonEnumerableProperty$4 = createNonEnumerableProperty$5;
44142
43863
  var hasOwn$7 = hasOwnProperty_1;
44143
- var shared$1 = sharedStore;
43864
+ var shared$1 = sharedStoreExports;
44144
43865
  var sharedKey$2 = sharedKey$3;
44145
43866
  var hiddenKeys$3 = hiddenKeys$4;
44146
43867
 
44147
43868
  var OBJECT_ALREADY_INITIALIZED = 'Object already initialized';
44148
- var TypeError$2 = global$c.TypeError;
44149
- var WeakMap$1 = global$c.WeakMap;
43869
+ var TypeError$2 = globalThis$d.TypeError;
43870
+ var WeakMap$1 = globalThis$d.WeakMap;
44150
43871
  var set$1, get, has;
44151
43872
 
44152
43873
  var enforce = function (it) {
@@ -44156,7 +43877,7 @@ var enforce = function (it) {
44156
43877
  var getterFor = function (TYPE) {
44157
43878
  return function (it) {
44158
43879
  var state;
44159
- if (!isObject$4(it) || (state = get(it)).type !== TYPE) {
43880
+ if (!isObject$6(it) || (state = get(it)).type !== TYPE) {
44160
43881
  throw new TypeError$2('Incompatible receiver, ' + TYPE + ' required');
44161
43882
  } return state;
44162
43883
  };
@@ -44206,11 +43927,11 @@ var internalState = {
44206
43927
  getterFor: getterFor
44207
43928
  };
44208
43929
 
44209
- var uncurryThis$j = functionUncurryThis;
43930
+ var uncurryThis$i = functionUncurryThis;
44210
43931
  var fails$e = fails$l;
44211
- var isCallable$e = isCallable$m;
43932
+ var isCallable$d = isCallable$l;
44212
43933
  var hasOwn$6 = hasOwnProperty_1;
44213
- var DESCRIPTORS$3 = descriptors;
43934
+ var DESCRIPTORS$4 = descriptors;
44214
43935
  var CONFIGURABLE_FUNCTION_NAME$1 = functionName.CONFIGURABLE;
44215
43936
  var inspectSource$2 = inspectSource$3;
44216
43937
  var InternalStateModule$2 = internalState;
@@ -44220,11 +43941,11 @@ var getInternalState$2 = InternalStateModule$2.get;
44220
43941
  var $String$2 = String;
44221
43942
  // eslint-disable-next-line es/no-object-defineproperty -- safe
44222
43943
  var defineProperty$4 = Object.defineProperty;
44223
- var stringSlice$6 = uncurryThis$j(''.slice);
44224
- var replace$3 = uncurryThis$j(''.replace);
44225
- var join = uncurryThis$j([].join);
43944
+ var stringSlice$6 = uncurryThis$i(''.slice);
43945
+ var replace$3 = uncurryThis$i(''.replace);
43946
+ var join = uncurryThis$i([].join);
44226
43947
 
44227
- var CONFIGURABLE_LENGTH = DESCRIPTORS$3 && !fails$e(function () {
43948
+ var CONFIGURABLE_LENGTH = DESCRIPTORS$4 && !fails$e(function () {
44228
43949
  return defineProperty$4(function () { /* empty */ }, 'length', { value: 8 }).length !== 8;
44229
43950
  });
44230
43951
 
@@ -44232,12 +43953,12 @@ var TEMPLATE = String(String).split('String');
44232
43953
 
44233
43954
  var makeBuiltIn$2 = makeBuiltIn$3.exports = function (value, name, options) {
44234
43955
  if (stringSlice$6($String$2(name), 0, 7) === 'Symbol(') {
44235
- name = '[' + replace$3($String$2(name), /^Symbol\(([^)]*)\)/, '$1') + ']';
43956
+ name = '[' + replace$3($String$2(name), /^Symbol\(([^)]*)\).*$/, '$1') + ']';
44236
43957
  }
44237
43958
  if (options && options.getter) name = 'get ' + name;
44238
43959
  if (options && options.setter) name = 'set ' + name;
44239
43960
  if (!hasOwn$6(value, 'name') || (CONFIGURABLE_FUNCTION_NAME$1 && value.name !== name)) {
44240
- if (DESCRIPTORS$3) defineProperty$4(value, 'name', { value: name, configurable: true });
43961
+ if (DESCRIPTORS$4) defineProperty$4(value, 'name', { value: name, configurable: true });
44241
43962
  else value.name = name;
44242
43963
  }
44243
43964
  if (CONFIGURABLE_LENGTH && options && hasOwn$6(options, 'arity') && value.length !== options.arity) {
@@ -44245,7 +43966,7 @@ var makeBuiltIn$2 = makeBuiltIn$3.exports = function (value, name, options) {
44245
43966
  }
44246
43967
  try {
44247
43968
  if (options && hasOwn$6(options, 'constructor') && options.constructor) {
44248
- if (DESCRIPTORS$3) defineProperty$4(value, 'prototype', { writable: false });
43969
+ if (DESCRIPTORS$4) defineProperty$4(value, 'prototype', { writable: false });
44249
43970
  // in V8 ~ Chrome 53, prototypes of some methods, like `Array.prototype.values`, are non-writable
44250
43971
  } else if (value.prototype) value.prototype = undefined;
44251
43972
  } catch (error) { /* empty */ }
@@ -44258,13 +43979,13 @@ var makeBuiltIn$2 = makeBuiltIn$3.exports = function (value, name, options) {
44258
43979
  // add fake Function#toString for correct work wrapped methods / constructors with methods like LoDash isNative
44259
43980
  // eslint-disable-next-line no-extend-native -- required
44260
43981
  Function.prototype.toString = makeBuiltIn$2(function toString() {
44261
- return isCallable$e(this) && getInternalState$2(this).source || inspectSource$2(this);
43982
+ return isCallable$d(this) && getInternalState$2(this).source || inspectSource$2(this);
44262
43983
  }, 'toString');
44263
43984
 
44264
43985
  var makeBuiltInExports = makeBuiltIn$3.exports;
44265
43986
 
44266
- var isCallable$d = isCallable$m;
44267
- var definePropertyModule$3 = objectDefineProperty;
43987
+ var isCallable$c = isCallable$l;
43988
+ var definePropertyModule$2 = objectDefineProperty;
44268
43989
  var makeBuiltIn$1 = makeBuiltInExports;
44269
43990
  var defineGlobalProperty$1 = defineGlobalProperty$3;
44270
43991
 
@@ -44272,7 +43993,7 @@ var defineBuiltIn$7 = function (O, key, value, options) {
44272
43993
  if (!options) options = {};
44273
43994
  var simple = options.enumerable;
44274
43995
  var name = options.name !== undefined ? options.name : key;
44275
- if (isCallable$d(value)) makeBuiltIn$1(value, name, options);
43996
+ if (isCallable$c(value)) makeBuiltIn$1(value, name, options);
44276
43997
  if (options.global) {
44277
43998
  if (simple) O[key] = value;
44278
43999
  else defineGlobalProperty$1(key, value);
@@ -44282,7 +44003,7 @@ var defineBuiltIn$7 = function (O, key, value, options) {
44282
44003
  else if (O[key]) simple = true;
44283
44004
  } catch (error) { /* empty */ }
44284
44005
  if (simple) O[key] = value;
44285
- else definePropertyModule$3.f(O, key, {
44006
+ else definePropertyModule$2.f(O, key, {
44286
44007
  value: value,
44287
44008
  enumerable: false,
44288
44009
  configurable: !options.nonConfigurable,
@@ -44316,15 +44037,15 @@ var toIntegerOrInfinity$4 = function (argument) {
44316
44037
 
44317
44038
  var toIntegerOrInfinity$3 = toIntegerOrInfinity$4;
44318
44039
 
44319
- var max$2 = Math.max;
44040
+ var max$1 = Math.max;
44320
44041
  var min$5 = Math.min;
44321
44042
 
44322
44043
  // Helper for a popular repeating case of the spec:
44323
44044
  // Let integer be ? ToInteger(index).
44324
44045
  // If integer < 0, let result be max((length + integer), 0); else let result be min(integer, length).
44325
- var toAbsoluteIndex$2 = function (index, length) {
44046
+ var toAbsoluteIndex$1 = function (index, length) {
44326
44047
  var integer = toIntegerOrInfinity$3(index);
44327
- return integer < 0 ? max$2(integer + length, 0) : min$5(integer, length);
44048
+ return integer < 0 ? max$1(integer + length, 0) : min$5(integer, length);
44328
44049
  };
44329
44050
 
44330
44051
  var toIntegerOrInfinity$2 = toIntegerOrInfinity$4;
@@ -44334,27 +44055,29 @@ var min$4 = Math.min;
44334
44055
  // `ToLength` abstract operation
44335
44056
  // https://tc39.es/ecma262/#sec-tolength
44336
44057
  var toLength$6 = function (argument) {
44337
- return argument > 0 ? min$4(toIntegerOrInfinity$2(argument), 0x1FFFFFFFFFFFFF) : 0; // 2 ** 53 - 1 == 9007199254740991
44058
+ var len = toIntegerOrInfinity$2(argument);
44059
+ return len > 0 ? min$4(len, 0x1FFFFFFFFFFFFF) : 0; // 2 ** 53 - 1 == 9007199254740991
44338
44060
  };
44339
44061
 
44340
44062
  var toLength$5 = toLength$6;
44341
44063
 
44342
44064
  // `LengthOfArrayLike` abstract operation
44343
44065
  // https://tc39.es/ecma262/#sec-lengthofarraylike
44344
- var lengthOfArrayLike$4 = function (obj) {
44066
+ var lengthOfArrayLike$3 = function (obj) {
44345
44067
  return toLength$5(obj.length);
44346
44068
  };
44347
44069
 
44348
44070
  var toIndexedObject$3 = toIndexedObject$5;
44349
- var toAbsoluteIndex$1 = toAbsoluteIndex$2;
44350
- var lengthOfArrayLike$3 = lengthOfArrayLike$4;
44071
+ var toAbsoluteIndex = toAbsoluteIndex$1;
44072
+ var lengthOfArrayLike$2 = lengthOfArrayLike$3;
44351
44073
 
44352
44074
  // `Array.prototype.{ indexOf, includes }` methods implementation
44353
44075
  var createMethod$3 = function (IS_INCLUDES) {
44354
44076
  return function ($this, el, fromIndex) {
44355
44077
  var O = toIndexedObject$3($this);
44356
- var length = lengthOfArrayLike$3(O);
44357
- var index = toAbsoluteIndex$1(fromIndex, length);
44078
+ var length = lengthOfArrayLike$2(O);
44079
+ if (length === 0) return !IS_INCLUDES && -1;
44080
+ var index = toAbsoluteIndex(fromIndex, length);
44358
44081
  var value;
44359
44082
  // Array#includes uses SameValueZero equality algorithm
44360
44083
  // eslint-disable-next-line no-self-compare -- NaN check
@@ -44378,13 +44101,13 @@ var arrayIncludes = {
44378
44101
  indexOf: createMethod$3(false)
44379
44102
  };
44380
44103
 
44381
- var uncurryThis$i = functionUncurryThis;
44104
+ var uncurryThis$h = functionUncurryThis;
44382
44105
  var hasOwn$5 = hasOwnProperty_1;
44383
44106
  var toIndexedObject$2 = toIndexedObject$5;
44384
44107
  var indexOf$1 = arrayIncludes.indexOf;
44385
44108
  var hiddenKeys$2 = hiddenKeys$4;
44386
44109
 
44387
- var push$2 = uncurryThis$i([].push);
44110
+ var push$2 = uncurryThis$h([].push);
44388
44111
 
44389
44112
  var objectKeysInternal = function (object, names) {
44390
44113
  var O = toIndexedObject$2(object);
@@ -44428,16 +44151,16 @@ var objectGetOwnPropertySymbols = {};
44428
44151
  objectGetOwnPropertySymbols.f = Object.getOwnPropertySymbols;
44429
44152
 
44430
44153
  var getBuiltIn$5 = getBuiltIn$7;
44431
- var uncurryThis$h = functionUncurryThis;
44154
+ var uncurryThis$g = functionUncurryThis;
44432
44155
  var getOwnPropertyNamesModule = objectGetOwnPropertyNames;
44433
44156
  var getOwnPropertySymbolsModule = objectGetOwnPropertySymbols;
44434
- var anObject$e = anObject$g;
44157
+ var anObject$d = anObject$f;
44435
44158
 
44436
- var concat$1 = uncurryThis$h([].concat);
44159
+ var concat$1 = uncurryThis$g([].concat);
44437
44160
 
44438
44161
  // all object keys, includes non-enumerable and symbols
44439
44162
  var ownKeys$4 = getBuiltIn$5('Reflect', 'ownKeys') || function ownKeys(it) {
44440
- var keys = getOwnPropertyNamesModule.f(anObject$e(it));
44163
+ var keys = getOwnPropertyNamesModule.f(anObject$d(it));
44441
44164
  var getOwnPropertySymbols = getOwnPropertySymbolsModule.f;
44442
44165
  return getOwnPropertySymbols ? concat$1(keys, getOwnPropertySymbols(it)) : keys;
44443
44166
  };
@@ -44445,11 +44168,11 @@ var ownKeys$4 = getBuiltIn$5('Reflect', 'ownKeys') || function ownKeys(it) {
44445
44168
  var hasOwn$4 = hasOwnProperty_1;
44446
44169
  var ownKeys$3 = ownKeys$4;
44447
44170
  var getOwnPropertyDescriptorModule = objectGetOwnPropertyDescriptor;
44448
- var definePropertyModule$2 = objectDefineProperty;
44171
+ var definePropertyModule$1 = objectDefineProperty;
44449
44172
 
44450
44173
  var copyConstructorProperties$1 = function (target, source, exceptions) {
44451
44174
  var keys = ownKeys$3(source);
44452
- var defineProperty = definePropertyModule$2.f;
44175
+ var defineProperty = definePropertyModule$1.f;
44453
44176
  var getOwnPropertyDescriptor = getOwnPropertyDescriptorModule.f;
44454
44177
  for (var i = 0; i < keys.length; i++) {
44455
44178
  var key = keys[i];
@@ -44460,7 +44183,7 @@ var copyConstructorProperties$1 = function (target, source, exceptions) {
44460
44183
  };
44461
44184
 
44462
44185
  var fails$d = fails$l;
44463
- var isCallable$c = isCallable$m;
44186
+ var isCallable$b = isCallable$l;
44464
44187
 
44465
44188
  var replacement = /#|\.prototype\./;
44466
44189
 
@@ -44468,7 +44191,7 @@ var isForced$2 = function (feature, detection) {
44468
44191
  var value = data[normalize(feature)];
44469
44192
  return value === POLYFILL ? true
44470
44193
  : value === NATIVE ? false
44471
- : isCallable$c(detection) ? fails$d(detection)
44194
+ : isCallable$b(detection) ? fails$d(detection)
44472
44195
  : !!detection;
44473
44196
  };
44474
44197
 
@@ -44482,7 +44205,7 @@ var POLYFILL = isForced$2.POLYFILL = 'P';
44482
44205
 
44483
44206
  var isForced_1 = isForced$2;
44484
44207
 
44485
- var global$b = global$l;
44208
+ var globalThis$c = globalThis_1;
44486
44209
  var getOwnPropertyDescriptor$3 = objectGetOwnPropertyDescriptor.f;
44487
44210
  var createNonEnumerableProperty$3 = createNonEnumerableProperty$5;
44488
44211
  var defineBuiltIn$6 = defineBuiltIn$7;
@@ -44511,11 +44234,11 @@ var _export = function (options, source) {
44511
44234
  var STATIC = options.stat;
44512
44235
  var FORCED, target, key, targetProperty, sourceProperty, descriptor;
44513
44236
  if (GLOBAL) {
44514
- target = global$b;
44237
+ target = globalThis$c;
44515
44238
  } else if (STATIC) {
44516
- target = global$b[TARGET] || defineGlobalProperty(TARGET, {});
44239
+ target = globalThis$c[TARGET] || defineGlobalProperty(TARGET, {});
44517
44240
  } else {
44518
- target = (global$b[TARGET] || {}).prototype;
44241
+ target = globalThis$c[TARGET] && globalThis$c[TARGET].prototype;
44519
44242
  }
44520
44243
  if (target) for (key in source) {
44521
44244
  sourceProperty = source[key];
@@ -44537,34 +44260,61 @@ var _export = function (options, source) {
44537
44260
  }
44538
44261
  };
44539
44262
 
44540
- var global$a = global$l;
44263
+ /* global Bun, Deno -- detection */
44264
+ var globalThis$b = globalThis_1;
44265
+ var userAgent$3 = environmentUserAgent;
44541
44266
  var classof$7 = classofRaw$2;
44542
44267
 
44543
- var engineIsNode = classof$7(global$a.process) === 'process';
44268
+ var userAgentStartsWith = function (string) {
44269
+ return userAgent$3.slice(0, string.length) === string;
44270
+ };
44544
44271
 
44545
- var uncurryThis$g = functionUncurryThis;
44272
+ var environment = (function () {
44273
+ if (userAgentStartsWith('Bun/')) return 'BUN';
44274
+ if (userAgentStartsWith('Cloudflare-Workers')) return 'CLOUDFLARE';
44275
+ if (userAgentStartsWith('Deno/')) return 'DENO';
44276
+ if (userAgentStartsWith('Node.js/')) return 'NODE';
44277
+ if (globalThis$b.Bun && typeof Bun.version == 'string') return 'BUN';
44278
+ if (globalThis$b.Deno && typeof Deno.version == 'object') return 'DENO';
44279
+ if (classof$7(globalThis$b.process) === 'process') return 'NODE';
44280
+ if (globalThis$b.window && globalThis$b.document) return 'BROWSER';
44281
+ return 'REST';
44282
+ })();
44283
+
44284
+ var ENVIRONMENT$1 = environment;
44285
+
44286
+ var environmentIsNode = ENVIRONMENT$1 === 'NODE';
44287
+
44288
+ var uncurryThis$f = functionUncurryThis;
44546
44289
  var aCallable$7 = aCallable$9;
44547
44290
 
44548
44291
  var functionUncurryThisAccessor = function (object, key, method) {
44549
44292
  try {
44550
44293
  // eslint-disable-next-line es/no-object-getownpropertydescriptor -- safe
44551
- return uncurryThis$g(aCallable$7(Object.getOwnPropertyDescriptor(object, key)[method]));
44294
+ return uncurryThis$f(aCallable$7(Object.getOwnPropertyDescriptor(object, key)[method]));
44552
44295
  } catch (error) { /* empty */ }
44553
44296
  };
44554
44297
 
44555
- var isCallable$b = isCallable$m;
44298
+ var isObject$5 = isObject$b;
44299
+
44300
+ var isPossiblePrototype$1 = function (argument) {
44301
+ return isObject$5(argument) || argument === null;
44302
+ };
44303
+
44304
+ var isPossiblePrototype = isPossiblePrototype$1;
44556
44305
 
44557
44306
  var $String$1 = String;
44558
44307
  var $TypeError$9 = TypeError;
44559
44308
 
44560
44309
  var aPossiblePrototype$1 = function (argument) {
44561
- if (typeof argument == 'object' || isCallable$b(argument)) return argument;
44310
+ if (isPossiblePrototype(argument)) return argument;
44562
44311
  throw new $TypeError$9("Can't set " + $String$1(argument) + ' as a prototype');
44563
44312
  };
44564
44313
 
44565
44314
  /* eslint-disable no-proto -- safe */
44566
44315
  var uncurryThisAccessor = functionUncurryThisAccessor;
44567
- var anObject$d = anObject$g;
44316
+ var isObject$4 = isObject$b;
44317
+ var requireObjectCoercible$8 = requireObjectCoercible$b;
44568
44318
  var aPossiblePrototype = aPossiblePrototype$1;
44569
44319
 
44570
44320
  // `Object.setPrototypeOf` method
@@ -44581,8 +44331,9 @@ var objectSetPrototypeOf = Object.setPrototypeOf || ('__proto__' in {} ? functio
44581
44331
  CORRECT_SETTER = test instanceof Array;
44582
44332
  } catch (error) { /* empty */ }
44583
44333
  return function setPrototypeOf(O, proto) {
44584
- anObject$d(O);
44334
+ requireObjectCoercible$8(O);
44585
44335
  aPossiblePrototype(proto);
44336
+ if (!isObject$4(O)) return O;
44586
44337
  if (CORRECT_SETTER) setter(O, proto);
44587
44338
  else O.__proto__ = proto;
44588
44339
  return O;
@@ -44614,14 +44365,14 @@ var defineBuiltInAccessor$1 = function (target, name, descriptor) {
44614
44365
  var getBuiltIn$4 = getBuiltIn$7;
44615
44366
  var defineBuiltInAccessor = defineBuiltInAccessor$1;
44616
44367
  var wellKnownSymbol$f = wellKnownSymbol$i;
44617
- var DESCRIPTORS$2 = descriptors;
44368
+ var DESCRIPTORS$3 = descriptors;
44618
44369
 
44619
44370
  var SPECIES$3 = wellKnownSymbol$f('species');
44620
44371
 
44621
44372
  var setSpecies$1 = function (CONSTRUCTOR_NAME) {
44622
44373
  var Constructor = getBuiltIn$4(CONSTRUCTOR_NAME);
44623
44374
 
44624
- if (DESCRIPTORS$2 && Constructor && !Constructor[SPECIES$3]) {
44375
+ if (DESCRIPTORS$3 && Constructor && !Constructor[SPECIES$3]) {
44625
44376
  defineBuiltInAccessor(Constructor, SPECIES$3, {
44626
44377
  configurable: true,
44627
44378
  get: function () { return this; }
@@ -44648,7 +44399,7 @@ test$1[TO_STRING_TAG$1] = 'z';
44648
44399
  var toStringTagSupport = String(test$1) === '[object z]';
44649
44400
 
44650
44401
  var TO_STRING_TAG_SUPPORT = toStringTagSupport;
44651
- var isCallable$a = isCallable$m;
44402
+ var isCallable$a = isCallable$l;
44652
44403
  var classofRaw$1 = classofRaw$2;
44653
44404
  var wellKnownSymbol$d = wellKnownSymbol$i;
44654
44405
 
@@ -44677,24 +44428,23 @@ var classof$6 = TO_STRING_TAG_SUPPORT ? classofRaw$1 : function (it) {
44677
44428
  : (result = classofRaw$1(O)) === 'Object' && isCallable$a(O.callee) ? 'Arguments' : result;
44678
44429
  };
44679
44430
 
44680
- var uncurryThis$f = functionUncurryThis;
44431
+ var uncurryThis$e = functionUncurryThis;
44681
44432
  var fails$c = fails$l;
44682
- var isCallable$9 = isCallable$m;
44433
+ var isCallable$9 = isCallable$l;
44683
44434
  var classof$5 = classof$6;
44684
44435
  var getBuiltIn$3 = getBuiltIn$7;
44685
44436
  var inspectSource$1 = inspectSource$3;
44686
44437
 
44687
44438
  var noop$1 = function () { /* empty */ };
44688
- var empty = [];
44689
44439
  var construct = getBuiltIn$3('Reflect', 'construct');
44690
44440
  var constructorRegExp = /^\s*(?:class|function)\b/;
44691
- var exec$2 = uncurryThis$f(constructorRegExp.exec);
44441
+ var exec$1 = uncurryThis$e(constructorRegExp.exec);
44692
44442
  var INCORRECT_TO_STRING = !constructorRegExp.test(noop$1);
44693
44443
 
44694
44444
  var isConstructorModern = function isConstructor(argument) {
44695
44445
  if (!isCallable$9(argument)) return false;
44696
44446
  try {
44697
- construct(noop$1, empty, argument);
44447
+ construct(noop$1, [], argument);
44698
44448
  return true;
44699
44449
  } catch (error) {
44700
44450
  return false;
@@ -44712,7 +44462,7 @@ var isConstructorLegacy = function isConstructor(argument) {
44712
44462
  // we can't check .prototype since constructors produced by .bind haven't it
44713
44463
  // `Function#toString` throws on some built-it function in some legacy engines
44714
44464
  // (for example, `DOMQuad` and similar in FF41-)
44715
- return INCORRECT_TO_STRING || !!exec$2(constructorRegExp, inspectSource$1(argument));
44465
+ return INCORRECT_TO_STRING || !!exec$1(constructorRegExp, inspectSource$1(argument));
44716
44466
  } catch (error) {
44717
44467
  return true;
44718
44468
  }
@@ -44741,7 +44491,7 @@ var aConstructor$1 = function (argument) {
44741
44491
  throw new $TypeError$7(tryToString$2(argument) + ' is not a constructor');
44742
44492
  };
44743
44493
 
44744
- var anObject$c = anObject$g;
44494
+ var anObject$c = anObject$f;
44745
44495
  var aConstructor = aConstructor$1;
44746
44496
  var isNullOrUndefined$4 = isNullOrUndefined$7;
44747
44497
  var wellKnownSymbol$c = wellKnownSymbol$i;
@@ -44759,29 +44509,29 @@ var speciesConstructor$2 = function (O, defaultConstructor) {
44759
44509
  var NATIVE_BIND$1 = functionBindNative;
44760
44510
 
44761
44511
  var FunctionPrototype = Function.prototype;
44762
- var apply$3 = FunctionPrototype.apply;
44512
+ var apply$2 = FunctionPrototype.apply;
44763
44513
  var call$e = FunctionPrototype.call;
44764
44514
 
44765
44515
  // eslint-disable-next-line es/no-reflect -- safe
44766
- var functionApply = typeof Reflect == 'object' && Reflect.apply || (NATIVE_BIND$1 ? call$e.bind(apply$3) : function () {
44767
- return call$e.apply(apply$3, arguments);
44516
+ var functionApply = typeof Reflect == 'object' && Reflect.apply || (NATIVE_BIND$1 ? call$e.bind(apply$2) : function () {
44517
+ return call$e.apply(apply$2, arguments);
44768
44518
  });
44769
44519
 
44770
44520
  var classofRaw = classofRaw$2;
44771
- var uncurryThis$e = functionUncurryThis;
44521
+ var uncurryThis$d = functionUncurryThis;
44772
44522
 
44773
44523
  var functionUncurryThisClause = function (fn) {
44774
44524
  // Nashorn bug:
44775
44525
  // https://github.com/zloirock/core-js/issues/1128
44776
44526
  // https://github.com/zloirock/core-js/issues/1130
44777
- if (classofRaw(fn) === 'Function') return uncurryThis$e(fn);
44527
+ if (classofRaw(fn) === 'Function') return uncurryThis$d(fn);
44778
44528
  };
44779
44529
 
44780
- var uncurryThis$d = functionUncurryThisClause;
44530
+ var uncurryThis$c = functionUncurryThisClause;
44781
44531
  var aCallable$6 = aCallable$9;
44782
44532
  var NATIVE_BIND = functionBindNative;
44783
44533
 
44784
- var bind$4 = uncurryThis$d(uncurryThis$d.bind);
44534
+ var bind$4 = uncurryThis$c(uncurryThis$c.bind);
44785
44535
 
44786
44536
  // optional / simple context binding
44787
44537
  var functionBindContext = function (fn, that) {
@@ -44795,9 +44545,9 @@ var getBuiltIn$2 = getBuiltIn$7;
44795
44545
 
44796
44546
  var html$2 = getBuiltIn$2('document', 'documentElement');
44797
44547
 
44798
- var uncurryThis$c = functionUncurryThis;
44548
+ var uncurryThis$b = functionUncurryThis;
44799
44549
 
44800
- var arraySlice$2 = uncurryThis$c([].slice);
44550
+ var arraySlice$1 = uncurryThis$b([].slice);
44801
44551
 
44802
44552
  var $TypeError$6 = TypeError;
44803
44553
 
@@ -44806,31 +44556,31 @@ var validateArgumentsLength$1 = function (passed, required) {
44806
44556
  return passed;
44807
44557
  };
44808
44558
 
44809
- var userAgent$2 = engineUserAgent;
44559
+ var userAgent$2 = environmentUserAgent;
44810
44560
 
44811
44561
  // eslint-disable-next-line redos/no-vulnerable -- safe
44812
- var engineIsIos = /(?:ipad|iphone|ipod).*applewebkit/i.test(userAgent$2);
44562
+ var environmentIsIos = /(?:ipad|iphone|ipod).*applewebkit/i.test(userAgent$2);
44813
44563
 
44814
- var global$9 = global$l;
44815
- var apply$2 = functionApply;
44564
+ var globalThis$a = globalThis_1;
44565
+ var apply$1 = functionApply;
44816
44566
  var bind$3 = functionBindContext;
44817
- var isCallable$8 = isCallable$m;
44567
+ var isCallable$8 = isCallable$l;
44818
44568
  var hasOwn$2 = hasOwnProperty_1;
44819
44569
  var fails$b = fails$l;
44820
44570
  var html$1 = html$2;
44821
- var arraySlice$1 = arraySlice$2;
44571
+ var arraySlice = arraySlice$1;
44822
44572
  var createElement = documentCreateElement$2;
44823
44573
  var validateArgumentsLength = validateArgumentsLength$1;
44824
- var IS_IOS$1 = engineIsIos;
44825
- var IS_NODE$4 = engineIsNode;
44826
-
44827
- var set = global$9.setImmediate;
44828
- var clear = global$9.clearImmediate;
44829
- var process$3 = global$9.process;
44830
- var Dispatch = global$9.Dispatch;
44831
- var Function$1 = global$9.Function;
44832
- var MessageChannel = global$9.MessageChannel;
44833
- var String$1 = global$9.String;
44574
+ var IS_IOS$1 = environmentIsIos;
44575
+ var IS_NODE$3 = environmentIsNode;
44576
+
44577
+ var set = globalThis$a.setImmediate;
44578
+ var clear = globalThis$a.clearImmediate;
44579
+ var process$3 = globalThis$a.process;
44580
+ var Dispatch = globalThis$a.Dispatch;
44581
+ var Function$1 = globalThis$a.Function;
44582
+ var MessageChannel = globalThis$a.MessageChannel;
44583
+ var String$1 = globalThis$a.String;
44834
44584
  var counter = 0;
44835
44585
  var queue$3 = {};
44836
44586
  var ONREADYSTATECHANGE = 'onreadystatechange';
@@ -44838,7 +44588,7 @@ var $location, defer, channel, port;
44838
44588
 
44839
44589
  fails$b(function () {
44840
44590
  // Deno throws a ReferenceError on `location` access without `--location` flag
44841
- $location = global$9.location;
44591
+ $location = globalThis$a.location;
44842
44592
  });
44843
44593
 
44844
44594
  var run = function (id) {
@@ -44861,7 +44611,7 @@ var eventListener = function (event) {
44861
44611
 
44862
44612
  var globalPostMessageDefer = function (id) {
44863
44613
  // old engines have not location.origin
44864
- global$9.postMessage(String$1(id), $location.protocol + '//' + $location.host);
44614
+ globalThis$a.postMessage(String$1(id), $location.protocol + '//' + $location.host);
44865
44615
  };
44866
44616
 
44867
44617
  // Node.js 0.9+ & IE10+ has setImmediate, otherwise:
@@ -44869,9 +44619,9 @@ if (!set || !clear) {
44869
44619
  set = function setImmediate(handler) {
44870
44620
  validateArgumentsLength(arguments.length, 1);
44871
44621
  var fn = isCallable$8(handler) ? handler : Function$1(handler);
44872
- var args = arraySlice$1(arguments, 1);
44622
+ var args = arraySlice(arguments, 1);
44873
44623
  queue$3[++counter] = function () {
44874
- apply$2(fn, undefined, args);
44624
+ apply$1(fn, undefined, args);
44875
44625
  };
44876
44626
  defer(counter);
44877
44627
  return counter;
@@ -44880,7 +44630,7 @@ if (!set || !clear) {
44880
44630
  delete queue$3[id];
44881
44631
  };
44882
44632
  // Node.js 0.8-
44883
- if (IS_NODE$4) {
44633
+ if (IS_NODE$3) {
44884
44634
  defer = function (id) {
44885
44635
  process$3.nextTick(runner(id));
44886
44636
  };
@@ -44899,14 +44649,14 @@ if (!set || !clear) {
44899
44649
  // Browsers with postMessage, skip WebWorkers
44900
44650
  // IE8 has postMessage, but it's sync & typeof its postMessage is 'object'
44901
44651
  } else if (
44902
- global$9.addEventListener &&
44903
- isCallable$8(global$9.postMessage) &&
44904
- !global$9.importScripts &&
44652
+ globalThis$a.addEventListener &&
44653
+ isCallable$8(globalThis$a.postMessage) &&
44654
+ !globalThis$a.importScripts &&
44905
44655
  $location && $location.protocol !== 'file:' &&
44906
44656
  !fails$b(globalPostMessageDefer)
44907
44657
  ) {
44908
44658
  defer = globalPostMessageDefer;
44909
- global$9.addEventListener('message', eventListener, false);
44659
+ globalThis$a.addEventListener('message', eventListener, false);
44910
44660
  // IE8-
44911
44661
  } else if (ONREADYSTATECHANGE in createElement('script')) {
44912
44662
  defer = function (id) {
@@ -44928,6 +44678,19 @@ var task$1 = {
44928
44678
  clear: clear
44929
44679
  };
44930
44680
 
44681
+ var globalThis$9 = globalThis_1;
44682
+ var DESCRIPTORS$2 = descriptors;
44683
+
44684
+ // eslint-disable-next-line es/no-object-getownpropertydescriptor -- safe
44685
+ var getOwnPropertyDescriptor$2 = Object.getOwnPropertyDescriptor;
44686
+
44687
+ // Avoid NodeJS experimental warning
44688
+ var safeGetBuiltIn$1 = function (name) {
44689
+ if (!DESCRIPTORS$2) return globalThis$9[name];
44690
+ var descriptor = getOwnPropertyDescriptor$2(globalThis$9, name);
44691
+ return descriptor && descriptor.value;
44692
+ };
44693
+
44931
44694
  var Queue$2 = function () {
44932
44695
  this.head = null;
44933
44696
  this.tail = null;
@@ -44953,31 +44716,29 @@ Queue$2.prototype = {
44953
44716
 
44954
44717
  var queue$2 = Queue$2;
44955
44718
 
44956
- var userAgent$1 = engineUserAgent;
44719
+ var userAgent$1 = environmentUserAgent;
44957
44720
 
44958
- var engineIsIosPebble = /ipad|iphone|ipod/i.test(userAgent$1) && typeof Pebble != 'undefined';
44721
+ var environmentIsIosPebble = /ipad|iphone|ipod/i.test(userAgent$1) && typeof Pebble != 'undefined';
44959
44722
 
44960
- var userAgent = engineUserAgent;
44723
+ var userAgent = environmentUserAgent;
44961
44724
 
44962
- var engineIsWebosWebkit = /web0s(?!.*chrome)/i.test(userAgent);
44725
+ var environmentIsWebosWebkit = /web0s(?!.*chrome)/i.test(userAgent);
44963
44726
 
44964
- var global$8 = global$l;
44727
+ var globalThis$8 = globalThis_1;
44728
+ var safeGetBuiltIn = safeGetBuiltIn$1;
44965
44729
  var bind$2 = functionBindContext;
44966
- var getOwnPropertyDescriptor$2 = objectGetOwnPropertyDescriptor.f;
44967
44730
  var macrotask = task$1.set;
44968
44731
  var Queue$1 = queue$2;
44969
- var IS_IOS = engineIsIos;
44970
- var IS_IOS_PEBBLE = engineIsIosPebble;
44971
- var IS_WEBOS_WEBKIT = engineIsWebosWebkit;
44972
- var IS_NODE$3 = engineIsNode;
44973
-
44974
- var MutationObserver$1 = global$8.MutationObserver || global$8.WebKitMutationObserver;
44975
- var document$2 = global$8.document;
44976
- var process$2 = global$8.process;
44977
- var Promise$1 = global$8.Promise;
44978
- // Node.js 11 shows ExperimentalWarning on getting `queueMicrotask`
44979
- var queueMicrotaskDescriptor = getOwnPropertyDescriptor$2(global$8, 'queueMicrotask');
44980
- var microtask$1 = queueMicrotaskDescriptor && queueMicrotaskDescriptor.value;
44732
+ var IS_IOS = environmentIsIos;
44733
+ var IS_IOS_PEBBLE = environmentIsIosPebble;
44734
+ var IS_WEBOS_WEBKIT = environmentIsWebosWebkit;
44735
+ var IS_NODE$2 = environmentIsNode;
44736
+
44737
+ var MutationObserver$1 = globalThis$8.MutationObserver || globalThis$8.WebKitMutationObserver;
44738
+ var document$2 = globalThis$8.document;
44739
+ var process$2 = globalThis$8.process;
44740
+ var Promise$1 = globalThis$8.Promise;
44741
+ var microtask$1 = safeGetBuiltIn('queueMicrotask');
44981
44742
  var notify$1, toggle, node$1, promise, then;
44982
44743
 
44983
44744
  // modern engines have queueMicrotask method
@@ -44986,7 +44747,7 @@ if (!microtask$1) {
44986
44747
 
44987
44748
  var flush = function () {
44988
44749
  var parent, fn;
44989
- if (IS_NODE$3 && (parent = process$2.domain)) parent.exit();
44750
+ if (IS_NODE$2 && (parent = process$2.domain)) parent.exit();
44990
44751
  while (fn = queue$1.get()) try {
44991
44752
  fn();
44992
44753
  } catch (error) {
@@ -44998,7 +44759,7 @@ if (!microtask$1) {
44998
44759
 
44999
44760
  // browsers with MutationObserver, except iOS - https://github.com/zloirock/core-js/issues/339
45000
44761
  // also except WebOS Webkit https://github.com/zloirock/core-js/issues/898
45001
- if (!IS_IOS && !IS_NODE$3 && !IS_WEBOS_WEBKIT && MutationObserver$1 && document$2) {
44762
+ if (!IS_IOS && !IS_NODE$2 && !IS_WEBOS_WEBKIT && MutationObserver$1 && document$2) {
45002
44763
  toggle = true;
45003
44764
  node$1 = document$2.createTextNode('');
45004
44765
  new MutationObserver$1(flush).observe(node$1, { characterData: true });
@@ -45016,7 +44777,7 @@ if (!microtask$1) {
45016
44777
  then(flush);
45017
44778
  };
45018
44779
  // Node.js without promises
45019
- } else if (IS_NODE$3) {
44780
+ } else if (IS_NODE$2) {
45020
44781
  notify$1 = function () {
45021
44782
  process$2.nextTick(flush);
45022
44783
  };
@@ -45028,7 +44789,7 @@ if (!microtask$1) {
45028
44789
  // - setTimeout
45029
44790
  } else {
45030
44791
  // `webpack` dev server bug on IE global methods - use bind(fn, global)
45031
- macrotask = bind$2(macrotask, global$8);
44792
+ macrotask = bind$2(macrotask, globalThis$8);
45032
44793
  notify$1 = function () {
45033
44794
  macrotask(flush);
45034
44795
  };
@@ -45057,34 +44818,23 @@ var perform$3 = function (exec) {
45057
44818
  }
45058
44819
  };
45059
44820
 
45060
- var global$7 = global$l;
45061
-
45062
- var promiseNativeConstructor = global$7.Promise;
45063
-
45064
- /* global Deno -- Deno case */
45065
- var engineIsDeno = typeof Deno == 'object' && Deno && typeof Deno.version == 'object';
44821
+ var globalThis$7 = globalThis_1;
45066
44822
 
45067
- var IS_DENO$1 = engineIsDeno;
45068
- var IS_NODE$2 = engineIsNode;
44823
+ var promiseNativeConstructor = globalThis$7.Promise;
45069
44824
 
45070
- var engineIsBrowser = !IS_DENO$1 && !IS_NODE$2
45071
- && typeof window == 'object'
45072
- && typeof document == 'object';
45073
-
45074
- var global$6 = global$l;
44825
+ var globalThis$6 = globalThis_1;
45075
44826
  var NativePromiseConstructor$3 = promiseNativeConstructor;
45076
- var isCallable$7 = isCallable$m;
44827
+ var isCallable$7 = isCallable$l;
45077
44828
  var isForced = isForced_1;
45078
44829
  var inspectSource = inspectSource$3;
45079
44830
  var wellKnownSymbol$b = wellKnownSymbol$i;
45080
- var IS_BROWSER = engineIsBrowser;
45081
- var IS_DENO = engineIsDeno;
45082
- var V8_VERSION = engineV8Version;
44831
+ var ENVIRONMENT = environment;
44832
+ var V8_VERSION = environmentV8Version;
45083
44833
 
45084
44834
  NativePromiseConstructor$3 && NativePromiseConstructor$3.prototype;
45085
44835
  var SPECIES$1 = wellKnownSymbol$b('species');
45086
44836
  var SUBCLASSING = false;
45087
- var NATIVE_PROMISE_REJECTION_EVENT$1 = isCallable$7(global$6.PromiseRejectionEvent);
44837
+ var NATIVE_PROMISE_REJECTION_EVENT$1 = isCallable$7(globalThis$6.PromiseRejectionEvent);
45088
44838
 
45089
44839
  var FORCED_PROMISE_CONSTRUCTOR$5 = isForced('Promise', function () {
45090
44840
  var PROMISE_CONSTRUCTOR_SOURCE = inspectSource(NativePromiseConstructor$3);
@@ -45107,7 +44857,7 @@ var FORCED_PROMISE_CONSTRUCTOR$5 = isForced('Promise', function () {
45107
44857
  SUBCLASSING = promise.then(function () { /* empty */ }) instanceof FakePromise;
45108
44858
  if (!SUBCLASSING) return true;
45109
44859
  // Unhandled rejections tracking support, NodeJS Promise without it fails @@species test
45110
- } return !GLOBAL_CORE_JS_PROMISE && (IS_BROWSER || IS_DENO) && !NATIVE_PROMISE_REJECTION_EVENT$1;
44860
+ } return !GLOBAL_CORE_JS_PROMISE && (ENVIRONMENT === 'BROWSER' || ENVIRONMENT === 'DENO') && !NATIVE_PROMISE_REJECTION_EVENT$1;
45111
44861
  });
45112
44862
 
45113
44863
  var promiseConstructorDetection = {
@@ -45140,16 +44890,16 @@ newPromiseCapability$2.f = function (C) {
45140
44890
  };
45141
44891
 
45142
44892
  var $$e = _export;
45143
- var IS_NODE$1 = engineIsNode;
45144
- var global$5 = global$l;
44893
+ var IS_NODE$1 = environmentIsNode;
44894
+ var globalThis$5 = globalThis_1;
45145
44895
  var call$d = functionCall;
45146
44896
  var defineBuiltIn$5 = defineBuiltIn$7;
45147
44897
  var setPrototypeOf$1 = objectSetPrototypeOf;
45148
44898
  var setToStringTag$3 = setToStringTag$4;
45149
44899
  var setSpecies = setSpecies$1;
45150
44900
  var aCallable$4 = aCallable$9;
45151
- var isCallable$6 = isCallable$m;
45152
- var isObject$3 = isObject$9;
44901
+ var isCallable$6 = isCallable$l;
44902
+ var isObject$3 = isObject$b;
45153
44903
  var anInstance = anInstance$1;
45154
44904
  var speciesConstructor$1 = speciesConstructor$2;
45155
44905
  var task = task$1.set;
@@ -45171,13 +44921,13 @@ var setInternalState$1 = InternalStateModule$1.set;
45171
44921
  var NativePromisePrototype$1 = NativePromiseConstructor$2 && NativePromiseConstructor$2.prototype;
45172
44922
  var PromiseConstructor = NativePromiseConstructor$2;
45173
44923
  var PromisePrototype = NativePromisePrototype$1;
45174
- var TypeError$1 = global$5.TypeError;
45175
- var document$1 = global$5.document;
45176
- var process$1 = global$5.process;
44924
+ var TypeError$1 = globalThis$5.TypeError;
44925
+ var document$1 = globalThis$5.document;
44926
+ var process$1 = globalThis$5.process;
45177
44927
  var newPromiseCapability$1 = newPromiseCapabilityModule$3.f;
45178
44928
  var newGenericPromiseCapability = newPromiseCapability$1;
45179
44929
 
45180
- var DISPATCH_EVENT = !!(document$1 && document$1.createEvent && global$5.dispatchEvent);
44930
+ var DISPATCH_EVENT = !!(document$1 && document$1.createEvent && globalThis$5.dispatchEvent);
45181
44931
  var UNHANDLED_REJECTION = 'unhandledrejection';
45182
44932
  var REJECTION_HANDLED = 'rejectionhandled';
45183
44933
  var PENDING = 0;
@@ -45250,14 +45000,14 @@ var dispatchEvent = function (name, promise, reason) {
45250
45000
  event.promise = promise;
45251
45001
  event.reason = reason;
45252
45002
  event.initEvent(name, false, true);
45253
- global$5.dispatchEvent(event);
45003
+ globalThis$5.dispatchEvent(event);
45254
45004
  } else event = { promise: promise, reason: reason };
45255
- if (!NATIVE_PROMISE_REJECTION_EVENT && (handler = global$5['on' + name])) handler(event);
45005
+ if (!NATIVE_PROMISE_REJECTION_EVENT && (handler = globalThis$5['on' + name])) handler(event);
45256
45006
  else if (name === UNHANDLED_REJECTION) hostReportErrors('Unhandled promise rejection', reason);
45257
45007
  };
45258
45008
 
45259
45009
  var onUnhandled = function (state) {
45260
- call$d(task, global$5, function () {
45010
+ call$d(task, globalThis$5, function () {
45261
45011
  var promise = state.facade;
45262
45012
  var value = state.value;
45263
45013
  var IS_UNHANDLED = isUnhandled(state);
@@ -45280,7 +45030,7 @@ var isUnhandled = function (state) {
45280
45030
  };
45281
45031
 
45282
45032
  var onHandleUnhandled = function (state) {
45283
- call$d(task, global$5, function () {
45033
+ call$d(task, globalThis$5, function () {
45284
45034
  var promise = state.facade;
45285
45035
  if (IS_NODE$1) {
45286
45036
  process$1.emit('rejectionHandled', promise);
@@ -45455,7 +45205,7 @@ var getIteratorMethod$2 = function (it) {
45455
45205
 
45456
45206
  var call$c = functionCall;
45457
45207
  var aCallable$3 = aCallable$9;
45458
- var anObject$b = anObject$g;
45208
+ var anObject$b = anObject$f;
45459
45209
  var tryToString$1 = tryToString$4;
45460
45210
  var getIteratorMethod$1 = getIteratorMethod$2;
45461
45211
 
@@ -45468,7 +45218,7 @@ var getIterator$1 = function (argument, usingIterator) {
45468
45218
  };
45469
45219
 
45470
45220
  var call$b = functionCall;
45471
- var anObject$a = anObject$g;
45221
+ var anObject$a = anObject$f;
45472
45222
  var getMethod$3 = getMethod$6;
45473
45223
 
45474
45224
  var iteratorClose$1 = function (iterator, kind, value) {
@@ -45493,10 +45243,10 @@ var iteratorClose$1 = function (iterator, kind, value) {
45493
45243
 
45494
45244
  var bind = functionBindContext;
45495
45245
  var call$a = functionCall;
45496
- var anObject$9 = anObject$g;
45246
+ var anObject$9 = anObject$f;
45497
45247
  var tryToString = tryToString$4;
45498
45248
  var isArrayIteratorMethod = isArrayIteratorMethod$1;
45499
- var lengthOfArrayLike$2 = lengthOfArrayLike$4;
45249
+ var lengthOfArrayLike$1 = lengthOfArrayLike$3;
45500
45250
  var isPrototypeOf$1 = objectIsPrototypeOf;
45501
45251
  var getIterator = getIterator$1;
45502
45252
  var getIteratorMethod = getIteratorMethod$2;
@@ -45541,7 +45291,7 @@ var iterate$2 = function (iterable, unboundFunction, options) {
45541
45291
  if (!iterFn) throw new $TypeError$3(tryToString(iterable) + ' is not iterable');
45542
45292
  // optimisation for array iterators
45543
45293
  if (isArrayIteratorMethod(iterFn)) {
45544
- for (index = 0, length = lengthOfArrayLike$2(iterable); length > index; index++) {
45294
+ for (index = 0, length = lengthOfArrayLike$1(iterable); length > index; index++) {
45545
45295
  result = callFn(iterable[index]);
45546
45296
  if (result && isPrototypeOf$1(ResultPrototype, result)) return result;
45547
45297
  } return new Result(false);
@@ -45652,7 +45402,7 @@ var $$c = _export;
45652
45402
  var FORCED_PROMISE_CONSTRUCTOR$2 = promiseConstructorDetection.CONSTRUCTOR;
45653
45403
  var NativePromiseConstructor = promiseNativeConstructor;
45654
45404
  var getBuiltIn$1 = getBuiltIn$7;
45655
- var isCallable$5 = isCallable$m;
45405
+ var isCallable$5 = isCallable$l;
45656
45406
  var defineBuiltIn$4 = defineBuiltIn$7;
45657
45407
 
45658
45408
  var NativePromisePrototype = NativePromiseConstructor && NativePromiseConstructor.prototype;
@@ -45700,7 +45450,6 @@ $$b({ target: 'Promise', stat: true, forced: PROMISE_STATICS_INCORRECT_ITERATION
45700
45450
  });
45701
45451
 
45702
45452
  var $$a = _export;
45703
- var call$7 = functionCall;
45704
45453
  var newPromiseCapabilityModule = newPromiseCapability$2;
45705
45454
  var FORCED_PROMISE_CONSTRUCTOR$1 = promiseConstructorDetection.CONSTRUCTOR;
45706
45455
 
@@ -45709,13 +45458,14 @@ var FORCED_PROMISE_CONSTRUCTOR$1 = promiseConstructorDetection.CONSTRUCTOR;
45709
45458
  $$a({ target: 'Promise', stat: true, forced: FORCED_PROMISE_CONSTRUCTOR$1 }, {
45710
45459
  reject: function reject(r) {
45711
45460
  var capability = newPromiseCapabilityModule.f(this);
45712
- call$7(capability.reject, undefined, r);
45461
+ var capabilityReject = capability.reject;
45462
+ capabilityReject(r);
45713
45463
  return capability.promise;
45714
45464
  }
45715
45465
  });
45716
45466
 
45717
- var anObject$8 = anObject$g;
45718
- var isObject$2 = isObject$9;
45467
+ var anObject$8 = anObject$f;
45468
+ var isObject$2 = isObject$b;
45719
45469
  var newPromiseCapability = newPromiseCapability$2;
45720
45470
 
45721
45471
  var promiseResolve$1 = function (C, x) {
@@ -45742,33 +45492,28 @@ $$9({ target: 'Promise', stat: true, forced: FORCED_PROMISE_CONSTRUCTOR }, {
45742
45492
  }
45743
45493
  });
45744
45494
 
45745
- function asyncGeneratorStep(gen, resolve, reject, _next, _throw, key, arg) {
45495
+ function asyncGeneratorStep(n, t, e, r, o, a, c) {
45746
45496
  try {
45747
- var info = gen[key](arg);
45748
- var value = info.value;
45749
- } catch (error) {
45750
- reject(error);
45751
- return;
45752
- }
45753
- if (info.done) {
45754
- resolve(value);
45755
- } else {
45756
- Promise.resolve(value).then(_next, _throw);
45497
+ var i = n[a](c),
45498
+ u = i.value;
45499
+ } catch (n) {
45500
+ return void e(n);
45757
45501
  }
45502
+ i.done ? t(u) : Promise.resolve(u).then(r, o);
45758
45503
  }
45759
- function _asyncToGenerator(fn) {
45504
+ function _asyncToGenerator(n) {
45760
45505
  return function () {
45761
- var self = this,
45762
- args = arguments;
45763
- return new Promise(function (resolve, reject) {
45764
- var gen = fn.apply(self, args);
45765
- function _next(value) {
45766
- asyncGeneratorStep(gen, resolve, reject, _next, _throw, "next", value);
45506
+ var t = this,
45507
+ e = arguments;
45508
+ return new Promise(function (r, o) {
45509
+ var a = n.apply(t, e);
45510
+ function _next(n) {
45511
+ asyncGeneratorStep(a, r, o, _next, _throw, "next", n);
45767
45512
  }
45768
- function _throw(err) {
45769
- asyncGeneratorStep(gen, resolve, reject, _next, _throw, "throw", err);
45513
+ function _throw(n) {
45514
+ asyncGeneratorStep(a, r, o, _next, _throw, "throw", n);
45770
45515
  }
45771
- _next(undefined);
45516
+ _next(void 0);
45772
45517
  });
45773
45518
  };
45774
45519
  }
@@ -45782,7 +45527,7 @@ var toString$9 = function (argument) {
45782
45527
  return $String(argument);
45783
45528
  };
45784
45529
 
45785
- var anObject$7 = anObject$g;
45530
+ var anObject$7 = anObject$f;
45786
45531
 
45787
45532
  // `RegExp.prototype.flags` getter implementation
45788
45533
  // https://tc39.es/ecma262/#sec-get-regexp.prototype.flags
@@ -45801,10 +45546,10 @@ var regexpFlags$1 = function () {
45801
45546
  };
45802
45547
 
45803
45548
  var fails$a = fails$l;
45804
- var global$4 = global$l;
45549
+ var globalThis$4 = globalThis_1;
45805
45550
 
45806
45551
  // babel-minify and Closure Compiler transpiles RegExp('a', 'y') -> /a/y and it causes SyntaxError
45807
- var $RegExp$2 = global$4.RegExp;
45552
+ var $RegExp$2 = globalThis$4.RegExp;
45808
45553
 
45809
45554
  var UNSUPPORTED_Y$2 = fails$a(function () {
45810
45555
  var re = $RegExp$2('a', 'y');
@@ -45845,8 +45590,8 @@ var objectKeys$1 = Object.keys || function keys(O) {
45845
45590
 
45846
45591
  var DESCRIPTORS$1 = descriptors;
45847
45592
  var V8_PROTOTYPE_DEFINE_BUG = v8PrototypeDefineBug;
45848
- var definePropertyModule$1 = objectDefineProperty;
45849
- var anObject$6 = anObject$g;
45593
+ var definePropertyModule = objectDefineProperty;
45594
+ var anObject$6 = anObject$f;
45850
45595
  var toIndexedObject$1 = toIndexedObject$5;
45851
45596
  var objectKeys = objectKeys$1;
45852
45597
 
@@ -45860,12 +45605,12 @@ objectDefineProperties.f = DESCRIPTORS$1 && !V8_PROTOTYPE_DEFINE_BUG ? Object.de
45860
45605
  var length = keys.length;
45861
45606
  var index = 0;
45862
45607
  var key;
45863
- while (length > index) definePropertyModule$1.f(O, key = keys[index++], props[key]);
45608
+ while (length > index) definePropertyModule.f(O, key = keys[index++], props[key]);
45864
45609
  return O;
45865
45610
  };
45866
45611
 
45867
45612
  /* global ActiveXObject -- old IE, WSH */
45868
- var anObject$5 = anObject$g;
45613
+ var anObject$5 = anObject$f;
45869
45614
  var definePropertiesModule = objectDefineProperties;
45870
45615
  var enumBugKeys = enumBugKeys$3;
45871
45616
  var hiddenKeys = hiddenKeys$4;
@@ -45890,7 +45635,8 @@ var NullProtoObjectViaActiveX = function (activeXDocument) {
45890
45635
  activeXDocument.write(scriptTag(''));
45891
45636
  activeXDocument.close();
45892
45637
  var temp = activeXDocument.parentWindow.Object;
45893
- activeXDocument = null; // avoid memory leak
45638
+ // eslint-disable-next-line no-useless-assignment -- avoid memory leak
45639
+ activeXDocument = null;
45894
45640
  return temp;
45895
45641
  };
45896
45642
 
@@ -45949,10 +45695,10 @@ var objectCreate = Object.create || function create(O, Properties) {
45949
45695
  };
45950
45696
 
45951
45697
  var fails$9 = fails$l;
45952
- var global$3 = global$l;
45698
+ var globalThis$3 = globalThis_1;
45953
45699
 
45954
45700
  // babel-minify and Closure Compiler transpiles RegExp('.', 's') -> /./s and it causes SyntaxError
45955
- var $RegExp$1 = global$3.RegExp;
45701
+ var $RegExp$1 = globalThis$3.RegExp;
45956
45702
 
45957
45703
  var regexpUnsupportedDotAll = fails$9(function () {
45958
45704
  var re = $RegExp$1('.', 's');
@@ -45960,10 +45706,10 @@ var regexpUnsupportedDotAll = fails$9(function () {
45960
45706
  });
45961
45707
 
45962
45708
  var fails$8 = fails$l;
45963
- var global$2 = global$l;
45709
+ var globalThis$2 = globalThis_1;
45964
45710
 
45965
45711
  // babel-minify and Closure Compiler transpiles RegExp('(?<a>b)', 'g') -> /(?<a>b)/g and it causes SyntaxError
45966
- var $RegExp = global$2.RegExp;
45712
+ var $RegExp = globalThis$2.RegExp;
45967
45713
 
45968
45714
  var regexpUnsupportedNcg = fails$8(function () {
45969
45715
  var re = $RegExp('(?<a>b)', 'g');
@@ -45973,12 +45719,12 @@ var regexpUnsupportedNcg = fails$8(function () {
45973
45719
 
45974
45720
  /* eslint-disable regexp/no-empty-capturing-group, regexp/no-empty-group, regexp/no-lazy-ends -- testing */
45975
45721
  /* eslint-disable regexp/no-useless-quantifier -- testing */
45976
- var call$6 = functionCall;
45977
- var uncurryThis$b = functionUncurryThis;
45722
+ var call$7 = functionCall;
45723
+ var uncurryThis$a = functionUncurryThis;
45978
45724
  var toString$8 = toString$9;
45979
45725
  var regexpFlags = regexpFlags$1;
45980
45726
  var stickyHelpers$1 = regexpStickyHelpers;
45981
- var shared = sharedExports;
45727
+ var shared = shared$4;
45982
45728
  var create$2 = objectCreate;
45983
45729
  var getInternalState$1 = internalState.get;
45984
45730
  var UNSUPPORTED_DOT_ALL = regexpUnsupportedDotAll;
@@ -45987,16 +45733,16 @@ var UNSUPPORTED_NCG = regexpUnsupportedNcg;
45987
45733
  var nativeReplace = shared('native-string-replace', String.prototype.replace);
45988
45734
  var nativeExec = RegExp.prototype.exec;
45989
45735
  var patchedExec = nativeExec;
45990
- var charAt$3 = uncurryThis$b(''.charAt);
45991
- var indexOf = uncurryThis$b(''.indexOf);
45992
- var replace$2 = uncurryThis$b(''.replace);
45993
- var stringSlice$5 = uncurryThis$b(''.slice);
45736
+ var charAt$3 = uncurryThis$a(''.charAt);
45737
+ var indexOf = uncurryThis$a(''.indexOf);
45738
+ var replace$2 = uncurryThis$a(''.replace);
45739
+ var stringSlice$5 = uncurryThis$a(''.slice);
45994
45740
 
45995
45741
  var UPDATES_LAST_INDEX_WRONG = (function () {
45996
45742
  var re1 = /a/;
45997
45743
  var re2 = /b*/g;
45998
- call$6(nativeExec, re1, 'a');
45999
- call$6(nativeExec, re2, 'a');
45744
+ call$7(nativeExec, re1, 'a');
45745
+ call$7(nativeExec, re2, 'a');
46000
45746
  return re1.lastIndex !== 0 || re2.lastIndex !== 0;
46001
45747
  })();
46002
45748
 
@@ -46017,14 +45763,14 @@ if (PATCH) {
46017
45763
 
46018
45764
  if (raw) {
46019
45765
  raw.lastIndex = re.lastIndex;
46020
- result = call$6(patchedExec, raw, str);
45766
+ result = call$7(patchedExec, raw, str);
46021
45767
  re.lastIndex = raw.lastIndex;
46022
45768
  return result;
46023
45769
  }
46024
45770
 
46025
45771
  var groups = state.groups;
46026
45772
  var sticky = UNSUPPORTED_Y$1 && re.sticky;
46027
- var flags = call$6(regexpFlags, re);
45773
+ var flags = call$7(regexpFlags, re);
46028
45774
  var source = re.source;
46029
45775
  var charsAdded = 0;
46030
45776
  var strCopy = str;
@@ -46052,7 +45798,7 @@ if (PATCH) {
46052
45798
  }
46053
45799
  if (UPDATES_LAST_INDEX_WRONG) lastIndex = re.lastIndex;
46054
45800
 
46055
- match = call$6(nativeExec, sticky ? reCopy : re, strCopy);
45801
+ match = call$7(nativeExec, sticky ? reCopy : re, strCopy);
46056
45802
 
46057
45803
  if (sticky) {
46058
45804
  if (match) {
@@ -46067,7 +45813,7 @@ if (PATCH) {
46067
45813
  if (NPCG_INCLUDED && match && match.length > 1) {
46068
45814
  // Fix browsers whose `exec` methods don't consistently return `undefined`
46069
45815
  // for NPCG, like IE8. NOTE: This doesn't work for /(.?)?/
46070
- call$6(nativeReplace, match[0], reCopy, function () {
45816
+ call$7(nativeReplace, match[0], reCopy, function () {
46071
45817
  for (i = 1; i < arguments.length - 2; i++) {
46072
45818
  if (arguments[i] === undefined) match[i] = undefined;
46073
45819
  }
@@ -46086,22 +45832,22 @@ if (PATCH) {
46086
45832
  };
46087
45833
  }
46088
45834
 
46089
- var regexpExec$3 = patchedExec;
45835
+ var regexpExec$2 = patchedExec;
46090
45836
 
46091
45837
  var $$8 = _export;
46092
- var exec$1 = regexpExec$3;
45838
+ var exec = regexpExec$2;
46093
45839
 
46094
45840
  // `RegExp.prototype.exec` method
46095
45841
  // https://tc39.es/ecma262/#sec-regexp.prototype.exec
46096
- $$8({ target: 'RegExp', proto: true, forced: /./.exec !== exec$1 }, {
46097
- exec: exec$1
45842
+ $$8({ target: 'RegExp', proto: true, forced: /./.exec !== exec }, {
45843
+ exec: exec
46098
45844
  });
46099
45845
 
46100
45846
  // TODO: Remove from `core-js@4` since it's moved to entry points
46101
45847
 
46102
- var uncurryThis$a = functionUncurryThisClause;
45848
+ var call$6 = functionCall;
46103
45849
  var defineBuiltIn$3 = defineBuiltIn$7;
46104
- var regexpExec$2 = regexpExec$3;
45850
+ var regexpExec$1 = regexpExec$2;
46105
45851
  var fails$7 = fails$l;
46106
45852
  var wellKnownSymbol$7 = wellKnownSymbol$i;
46107
45853
  var createNonEnumerableProperty$2 = createNonEnumerableProperty$5;
@@ -46113,7 +45859,7 @@ var fixRegexpWellKnownSymbolLogic = function (KEY, exec, FORCED, SHAM) {
46113
45859
  var SYMBOL = wellKnownSymbol$7(KEY);
46114
45860
 
46115
45861
  var DELEGATES_TO_SYMBOL = !fails$7(function () {
46116
- // String methods call symbol-named RegEp methods
45862
+ // String methods call symbol-named RegExp methods
46117
45863
  var O = {};
46118
45864
  O[SYMBOL] = function () { return 7; };
46119
45865
  return ''[KEY](O) !== 7;
@@ -46151,18 +45897,17 @@ var fixRegexpWellKnownSymbolLogic = function (KEY, exec, FORCED, SHAM) {
46151
45897
  !DELEGATES_TO_EXEC ||
46152
45898
  FORCED
46153
45899
  ) {
46154
- var uncurriedNativeRegExpMethod = uncurryThis$a(/./[SYMBOL]);
45900
+ var nativeRegExpMethod = /./[SYMBOL];
46155
45901
  var methods = exec(SYMBOL, ''[KEY], function (nativeMethod, regexp, str, arg2, forceStringMethod) {
46156
- var uncurriedNativeMethod = uncurryThis$a(nativeMethod);
46157
45902
  var $exec = regexp.exec;
46158
- if ($exec === regexpExec$2 || $exec === RegExpPrototype$2.exec) {
45903
+ if ($exec === regexpExec$1 || $exec === RegExpPrototype$2.exec) {
46159
45904
  if (DELEGATES_TO_SYMBOL && !forceStringMethod) {
46160
45905
  // The native String method already delegates to @@method (this
46161
45906
  // polyfilled function), leasing to infinite recursion.
46162
45907
  // We avoid it by directly calling the native @@method method.
46163
- return { done: true, value: uncurriedNativeRegExpMethod(regexp, str, arg2) };
45908
+ return { done: true, value: call$6(nativeRegExpMethod, regexp, str, arg2) };
46164
45909
  }
46165
- return { done: true, value: uncurriedNativeMethod(str, regexp, arg2) };
45910
+ return { done: true, value: call$6(nativeMethod, str, regexp, arg2) };
46166
45911
  }
46167
45912
  return { done: false };
46168
45913
  });
@@ -46177,7 +45922,7 @@ var fixRegexpWellKnownSymbolLogic = function (KEY, exec, FORCED, SHAM) {
46177
45922
  var uncurryThis$9 = functionUncurryThis;
46178
45923
  var toIntegerOrInfinity$1 = toIntegerOrInfinity$4;
46179
45924
  var toString$7 = toString$9;
46180
- var requireObjectCoercible$7 = requireObjectCoercible$a;
45925
+ var requireObjectCoercible$7 = requireObjectCoercible$b;
46181
45926
 
46182
45927
  var charAt$2 = uncurryThis$9(''.charAt);
46183
45928
  var charCodeAt = uncurryThis$9(''.charCodeAt);
@@ -46220,10 +45965,10 @@ var advanceStringIndex$3 = function (S, index, unicode) {
46220
45965
  };
46221
45966
 
46222
45967
  var call$5 = functionCall;
46223
- var anObject$4 = anObject$g;
46224
- var isCallable$4 = isCallable$m;
45968
+ var anObject$4 = anObject$f;
45969
+ var isCallable$4 = isCallable$l;
46225
45970
  var classof$2 = classofRaw$2;
46226
- var regexpExec$1 = regexpExec$3;
45971
+ var regexpExec = regexpExec$2;
46227
45972
 
46228
45973
  var $TypeError$2 = TypeError;
46229
45974
 
@@ -46236,20 +45981,20 @@ var regexpExecAbstract = function (R, S) {
46236
45981
  if (result !== null) anObject$4(result);
46237
45982
  return result;
46238
45983
  }
46239
- if (classof$2(R) === 'RegExp') return call$5(regexpExec$1, R, S);
45984
+ if (classof$2(R) === 'RegExp') return call$5(regexpExec, R, S);
46240
45985
  throw new $TypeError$2('RegExp#exec called on incompatible receiver');
46241
45986
  };
46242
45987
 
46243
45988
  var call$4 = functionCall;
46244
45989
  var fixRegExpWellKnownSymbolLogic$2 = fixRegexpWellKnownSymbolLogic;
46245
- var anObject$3 = anObject$g;
45990
+ var anObject$3 = anObject$f;
46246
45991
  var isNullOrUndefined$2 = isNullOrUndefined$7;
46247
45992
  var toLength$4 = toLength$6;
46248
45993
  var toString$6 = toString$9;
46249
- var requireObjectCoercible$6 = requireObjectCoercible$a;
45994
+ var requireObjectCoercible$6 = requireObjectCoercible$b;
46250
45995
  var getMethod$2 = getMethod$6;
46251
45996
  var advanceStringIndex$2 = advanceStringIndex$3;
46252
- var regExpExec$1 = regexpExecAbstract;
45997
+ var regExpExec$2 = regexpExecAbstract;
46253
45998
 
46254
45999
  // @@match logic
46255
46000
  fixRegExpWellKnownSymbolLogic$2('match', function (MATCH, nativeMatch, maybeCallNative) {
@@ -46270,14 +46015,14 @@ fixRegExpWellKnownSymbolLogic$2('match', function (MATCH, nativeMatch, maybeCall
46270
46015
 
46271
46016
  if (res.done) return res.value;
46272
46017
 
46273
- if (!rx.global) return regExpExec$1(rx, S);
46018
+ if (!rx.global) return regExpExec$2(rx, S);
46274
46019
 
46275
46020
  var fullUnicode = rx.unicode;
46276
46021
  rx.lastIndex = 0;
46277
46022
  var A = [];
46278
46023
  var n = 0;
46279
46024
  var result;
46280
- while ((result = regExpExec$1(rx, S)) !== null) {
46025
+ while ((result = regExpExec$2(rx, S)) !== null) {
46281
46026
  var matchStr = toString$6(result[0]);
46282
46027
  A[n] = matchStr;
46283
46028
  if (matchStr === '') rx.lastIndex = advanceStringIndex$2(S, toLength$4(rx.lastIndex), fullUnicode);
@@ -46334,26 +46079,26 @@ var getSubstitution$1 = function (matched, str, position, captures, namedCapture
46334
46079
  });
46335
46080
  };
46336
46081
 
46337
- var apply$1 = functionApply;
46082
+ var apply = functionApply;
46338
46083
  var call$3 = functionCall;
46339
46084
  var uncurryThis$7 = functionUncurryThis;
46340
46085
  var fixRegExpWellKnownSymbolLogic$1 = fixRegexpWellKnownSymbolLogic;
46341
46086
  var fails$6 = fails$l;
46342
- var anObject$2 = anObject$g;
46343
- var isCallable$3 = isCallable$m;
46087
+ var anObject$2 = anObject$f;
46088
+ var isCallable$3 = isCallable$l;
46344
46089
  var isNullOrUndefined$1 = isNullOrUndefined$7;
46345
46090
  var toIntegerOrInfinity = toIntegerOrInfinity$4;
46346
46091
  var toLength$3 = toLength$6;
46347
46092
  var toString$5 = toString$9;
46348
- var requireObjectCoercible$5 = requireObjectCoercible$a;
46093
+ var requireObjectCoercible$5 = requireObjectCoercible$b;
46349
46094
  var advanceStringIndex$1 = advanceStringIndex$3;
46350
46095
  var getMethod$1 = getMethod$6;
46351
46096
  var getSubstitution = getSubstitution$1;
46352
- var regExpExec = regexpExecAbstract;
46097
+ var regExpExec$1 = regexpExecAbstract;
46353
46098
  var wellKnownSymbol$6 = wellKnownSymbol$i;
46354
46099
 
46355
46100
  var REPLACE = wellKnownSymbol$6('replace');
46356
- var max$1 = Math.max;
46101
+ var max = Math.max;
46357
46102
  var min$3 = Math.min;
46358
46103
  var concat = uncurryThis$7([].concat);
46359
46104
  var push$1 = uncurryThis$7([].push);
@@ -46432,7 +46177,7 @@ fixRegExpWellKnownSymbolLogic$1('replace', function (_, nativeReplace, maybeCall
46432
46177
  var results = [];
46433
46178
  var result;
46434
46179
  while (true) {
46435
- result = regExpExec(rx, S);
46180
+ result = regExpExec$1(rx, S);
46436
46181
  if (result === null) break;
46437
46182
 
46438
46183
  push$1(results, result);
@@ -46448,7 +46193,7 @@ fixRegExpWellKnownSymbolLogic$1('replace', function (_, nativeReplace, maybeCall
46448
46193
  result = results[i];
46449
46194
 
46450
46195
  var matched = toString$5(result[0]);
46451
- var position = max$1(min$3(toIntegerOrInfinity(result.index), S.length), 0);
46196
+ var position = max(min$3(toIntegerOrInfinity(result.index), S.length), 0);
46452
46197
  var captures = [];
46453
46198
  var replacement;
46454
46199
  // NOTE: This is equivalent to
@@ -46461,7 +46206,7 @@ fixRegExpWellKnownSymbolLogic$1('replace', function (_, nativeReplace, maybeCall
46461
46206
  if (functionalReplace) {
46462
46207
  var replacerArgs = concat([matched], captures, position, S);
46463
46208
  if (namedCaptures !== undefined) push$1(replacerArgs, namedCaptures);
46464
- replacement = toString$5(apply$1(replaceValue, undefined, replacerArgs));
46209
+ replacement = toString$5(apply(replaceValue, undefined, replacerArgs));
46465
46210
  } else {
46466
46211
  replacement = getSubstitution(matched, S, position, captures, namedCaptures, replaceValue);
46467
46212
  }
@@ -46476,7 +46221,7 @@ fixRegExpWellKnownSymbolLogic$1('replace', function (_, nativeReplace, maybeCall
46476
46221
  ];
46477
46222
  }, !REPLACE_SUPPORTS_NAMED_GROUPS || !REPLACE_KEEPS_$0 || REGEXP_REPLACE_SUBSTITUTES_UNDEFINED_CAPTURE);
46478
46223
 
46479
- var isObject$1 = isObject$9;
46224
+ var isObject$1 = isObject$b;
46480
46225
  var classof$1 = classofRaw$2;
46481
46226
  var wellKnownSymbol$5 = wellKnownSymbol$i;
46482
46227
 
@@ -46489,12 +46234,12 @@ var isRegexp = function (it) {
46489
46234
  return isObject$1(it) && ((isRegExp = it[MATCH$1]) !== undefined ? !!isRegExp : classof$1(it) === 'RegExp');
46490
46235
  };
46491
46236
 
46492
- var isRegExp$1 = isRegexp;
46237
+ var isRegExp = isRegexp;
46493
46238
 
46494
46239
  var $TypeError$1 = TypeError;
46495
46240
 
46496
46241
  var notARegexp = function (it) {
46497
- if (isRegExp$1(it)) {
46242
+ if (isRegExp(it)) {
46498
46243
  throw new $TypeError$1("The method doesn't accept regular expressions");
46499
46244
  } return it;
46500
46245
  };
@@ -46521,11 +46266,9 @@ var getOwnPropertyDescriptor$1 = objectGetOwnPropertyDescriptor.f;
46521
46266
  var toLength$2 = toLength$6;
46522
46267
  var toString$4 = toString$9;
46523
46268
  var notARegExp$2 = notARegexp;
46524
- var requireObjectCoercible$4 = requireObjectCoercible$a;
46269
+ var requireObjectCoercible$4 = requireObjectCoercible$b;
46525
46270
  var correctIsRegExpLogic$2 = correctIsRegexpLogic;
46526
46271
 
46527
- // eslint-disable-next-line es/no-string-prototype-startswith -- safe
46528
- var nativeStartsWith = uncurryThis$6(''.startsWith);
46529
46272
  var stringSlice$1 = uncurryThis$6(''.slice);
46530
46273
  var min$2 = Math.min;
46531
46274
 
@@ -46544,9 +46287,7 @@ $$7({ target: 'String', proto: true, forced: !MDN_POLYFILL_BUG$1 && !CORRECT_IS_
46544
46287
  notARegExp$2(searchString);
46545
46288
  var index = toLength$2(min$2(arguments.length > 1 ? arguments[1] : undefined, that.length));
46546
46289
  var search = toString$4(searchString);
46547
- return nativeStartsWith
46548
- ? nativeStartsWith(that, search, index)
46549
- : stringSlice$1(that, index, index + search.length) === search;
46290
+ return stringSlice$1(that, index, index + search.length) === search;
46550
46291
  }
46551
46292
  });
46552
46293
 
@@ -46581,7 +46322,7 @@ var correctPrototypeGetter = !fails$5(function () {
46581
46322
  });
46582
46323
 
46583
46324
  var hasOwn$1 = hasOwnProperty_1;
46584
- var isCallable$2 = isCallable$m;
46325
+ var isCallable$2 = isCallable$l;
46585
46326
  var toObject$1 = toObject$4;
46586
46327
  var sharedKey = sharedKey$3;
46587
46328
  var CORRECT_PROTOTYPE_GETTER = correctPrototypeGetter;
@@ -46603,8 +46344,8 @@ var objectGetPrototypeOf = CORRECT_PROTOTYPE_GETTER ? $Object.getPrototypeOf : f
46603
46344
  };
46604
46345
 
46605
46346
  var fails$4 = fails$l;
46606
- var isCallable$1 = isCallable$m;
46607
- var isObject = isObject$9;
46347
+ var isCallable$1 = isCallable$l;
46348
+ var isObject = isObject$b;
46608
46349
  var getPrototypeOf$1 = objectGetPrototypeOf;
46609
46350
  var defineBuiltIn$2 = defineBuiltIn$7;
46610
46351
  var wellKnownSymbol$2 = wellKnownSymbol$i;
@@ -46650,7 +46391,7 @@ var iteratorsCore = {
46650
46391
 
46651
46392
  var IteratorPrototype$1 = iteratorsCore.IteratorPrototype;
46652
46393
  var create = objectCreate;
46653
- var createPropertyDescriptor$1 = createPropertyDescriptor$4;
46394
+ var createPropertyDescriptor = createPropertyDescriptor$3;
46654
46395
  var setToStringTag$2 = setToStringTag$4;
46655
46396
  var Iterators$2 = iterators;
46656
46397
 
@@ -46658,7 +46399,7 @@ var returnThis$1 = function () { return this; };
46658
46399
 
46659
46400
  var iteratorCreateConstructor = function (IteratorConstructor, NAME, next, ENUMERABLE_NEXT) {
46660
46401
  var TO_STRING_TAG = NAME + ' Iterator';
46661
- IteratorConstructor.prototype = create(IteratorPrototype$1, { next: createPropertyDescriptor$1(+!ENUMERABLE_NEXT, next) });
46402
+ IteratorConstructor.prototype = create(IteratorPrototype$1, { next: createPropertyDescriptor(+!ENUMERABLE_NEXT, next) });
46662
46403
  setToStringTag$2(IteratorConstructor, TO_STRING_TAG, false);
46663
46404
  Iterators$2[TO_STRING_TAG] = returnThis$1;
46664
46405
  return IteratorConstructor;
@@ -46667,7 +46408,7 @@ var iteratorCreateConstructor = function (IteratorConstructor, NAME, next, ENUME
46667
46408
  var $$6 = _export;
46668
46409
  var call$2 = functionCall;
46669
46410
  var FunctionName = functionName;
46670
- var isCallable = isCallable$m;
46411
+ var isCallable = isCallable$l;
46671
46412
  var createIteratorConstructor = iteratorCreateConstructor;
46672
46413
  var getPrototypeOf = objectGetPrototypeOf;
46673
46414
  var setPrototypeOf = objectSetPrototypeOf;
@@ -46875,7 +46616,7 @@ var DOMTokenListPrototype$1 = classList && classList.constructor && classList.co
46875
46616
 
46876
46617
  var domTokenListPrototype = DOMTokenListPrototype$1 === Object.prototype ? undefined : DOMTokenListPrototype$1;
46877
46618
 
46878
- var global$1 = global$l;
46619
+ var globalThis$1 = globalThis_1;
46879
46620
  var DOMIterables = domIterables;
46880
46621
  var DOMTokenListPrototype = domTokenListPrototype;
46881
46622
  var ArrayIteratorMethods = es_array_iterator;
@@ -46907,56 +46648,53 @@ var handlePrototype = function (CollectionPrototype, COLLECTION_NAME) {
46907
46648
  };
46908
46649
 
46909
46650
  for (var COLLECTION_NAME in DOMIterables) {
46910
- handlePrototype(global$1[COLLECTION_NAME] && global$1[COLLECTION_NAME].prototype, COLLECTION_NAME);
46651
+ handlePrototype(globalThis$1[COLLECTION_NAME] && globalThis$1[COLLECTION_NAME].prototype, COLLECTION_NAME);
46911
46652
  }
46912
46653
 
46913
46654
  handlePrototype(DOMTokenListPrototype, 'DOMTokenList');
46914
46655
 
46915
- function _toPrimitive(input, hint) {
46916
- if (_typeof$1(input) !== "object" || input === null) return input;
46917
- var prim = input[Symbol.toPrimitive];
46918
- if (prim !== undefined) {
46919
- var res = prim.call(input, hint || "default");
46920
- if (_typeof$1(res) !== "object") return res;
46656
+ function toPrimitive(t, r) {
46657
+ if ("object" != _typeof$1(t) || !t) return t;
46658
+ var e = t[Symbol.toPrimitive];
46659
+ if (void 0 !== e) {
46660
+ var i = e.call(t, r || "default");
46661
+ if ("object" != _typeof$1(i)) return i;
46921
46662
  throw new TypeError("@@toPrimitive must return a primitive value.");
46922
46663
  }
46923
- return (hint === "string" ? String : Number)(input);
46664
+ return ("string" === r ? String : Number)(t);
46924
46665
  }
46925
46666
 
46926
- function _toPropertyKey(arg) {
46927
- var key = _toPrimitive(arg, "string");
46928
- return _typeof$1(key) === "symbol" ? key : String(key);
46667
+ function toPropertyKey(t) {
46668
+ var i = toPrimitive(t, "string");
46669
+ return "symbol" == _typeof$1(i) ? i : i + "";
46929
46670
  }
46930
46671
 
46931
- function _defineProperty(obj, key, value) {
46932
- key = _toPropertyKey(key);
46933
- if (key in obj) {
46934
- Object.defineProperty(obj, key, {
46935
- value: value,
46936
- enumerable: true,
46937
- configurable: true,
46938
- writable: true
46939
- });
46940
- } else {
46941
- obj[key] = value;
46942
- }
46943
- return obj;
46672
+ function _defineProperty(e, r, t) {
46673
+ return (r = toPropertyKey(r)) in e ? Object.defineProperty(e, r, {
46674
+ value: t,
46675
+ enumerable: !0,
46676
+ configurable: !0,
46677
+ writable: !0
46678
+ }) : e[r] = t, e;
46944
46679
  }
46945
46680
 
46946
46681
  var aCallable = aCallable$9;
46947
46682
  var toObject = toObject$4;
46948
46683
  var IndexedObject = indexedObject;
46949
- var lengthOfArrayLike$1 = lengthOfArrayLike$4;
46684
+ var lengthOfArrayLike = lengthOfArrayLike$3;
46950
46685
 
46951
46686
  var $TypeError = TypeError;
46952
46687
 
46688
+ var REDUCE_EMPTY = 'Reduce of empty array with no initial value';
46689
+
46953
46690
  // `Array.prototype.{ reduce, reduceRight }` methods implementation
46954
46691
  var createMethod$1 = function (IS_RIGHT) {
46955
46692
  return function (that, callbackfn, argumentsLength, memo) {
46956
46693
  var O = toObject(that);
46957
46694
  var self = IndexedObject(O);
46958
- var length = lengthOfArrayLike$1(O);
46695
+ var length = lengthOfArrayLike(O);
46959
46696
  aCallable(callbackfn);
46697
+ if (length === 0 && argumentsLength < 2) throw new $TypeError(REDUCE_EMPTY);
46960
46698
  var index = IS_RIGHT ? length - 1 : 0;
46961
46699
  var i = IS_RIGHT ? -1 : 1;
46962
46700
  if (argumentsLength < 2) while (true) {
@@ -46967,7 +46705,7 @@ var createMethod$1 = function (IS_RIGHT) {
46967
46705
  }
46968
46706
  index += i;
46969
46707
  if (IS_RIGHT ? index < 0 : length <= index) {
46970
- throw new $TypeError('Reduce of empty array with no initial value');
46708
+ throw new $TypeError(REDUCE_EMPTY);
46971
46709
  }
46972
46710
  }
46973
46711
  for (;IS_RIGHT ? index >= 0 : length > index; index += i) if (index in self) {
@@ -46999,8 +46737,8 @@ var arrayMethodIsStrict$2 = function (METHOD_NAME, argument) {
46999
46737
  var $$5 = _export;
47000
46738
  var $reduce = arrayReduce.left;
47001
46739
  var arrayMethodIsStrict$1 = arrayMethodIsStrict$2;
47002
- var CHROME_VERSION = engineV8Version;
47003
- var IS_NODE = engineIsNode;
46740
+ var CHROME_VERSION = environmentV8Version;
46741
+ var IS_NODE = environmentIsNode;
47004
46742
 
47005
46743
  // Chrome 80-82 has a critical bug
47006
46744
  // https://bugs.chromium.org/p/chromium/issues/detail?id=1049982
@@ -47022,11 +46760,9 @@ var getOwnPropertyDescriptor = objectGetOwnPropertyDescriptor.f;
47022
46760
  var toLength$1 = toLength$6;
47023
46761
  var toString$3 = toString$9;
47024
46762
  var notARegExp$1 = notARegexp;
47025
- var requireObjectCoercible$3 = requireObjectCoercible$a;
46763
+ var requireObjectCoercible$3 = requireObjectCoercible$b;
47026
46764
  var correctIsRegExpLogic$1 = correctIsRegexpLogic;
47027
46765
 
47028
- // eslint-disable-next-line es/no-string-prototype-endswith -- safe
47029
- var nativeEndsWith = uncurryThis$5(''.endsWith);
47030
46766
  var slice = uncurryThis$5(''.slice);
47031
46767
  var min$1 = Math.min;
47032
46768
 
@@ -47047,65 +46783,29 @@ $$4({ target: 'String', proto: true, forced: !MDN_POLYFILL_BUG && !CORRECT_IS_RE
47047
46783
  var len = that.length;
47048
46784
  var end = endPosition === undefined ? len : min$1(toLength$1(endPosition), len);
47049
46785
  var search = toString$3(searchString);
47050
- return nativeEndsWith
47051
- ? nativeEndsWith(that, search, end)
47052
- : slice(that, end - search.length, end) === search;
46786
+ return slice(that, end - search.length, end) === search;
47053
46787
  }
47054
46788
  });
47055
46789
 
47056
- var toPropertyKey = toPropertyKey$3;
47057
- var definePropertyModule = objectDefineProperty;
47058
- var createPropertyDescriptor = createPropertyDescriptor$4;
47059
-
47060
- var createProperty$1 = function (object, key, value) {
47061
- var propertyKey = toPropertyKey(key);
47062
- if (propertyKey in object) definePropertyModule.f(object, propertyKey, createPropertyDescriptor(0, value));
47063
- else object[propertyKey] = value;
47064
- };
47065
-
47066
- var toAbsoluteIndex = toAbsoluteIndex$2;
47067
- var lengthOfArrayLike = lengthOfArrayLike$4;
47068
- var createProperty = createProperty$1;
47069
-
47070
- var $Array = Array;
47071
- var max = Math.max;
47072
-
47073
- var arraySliceSimple = function (O, start, end) {
47074
- var length = lengthOfArrayLike(O);
47075
- var k = toAbsoluteIndex(start, length);
47076
- var fin = toAbsoluteIndex(end === undefined ? length : end, length);
47077
- var result = $Array(max(fin - k, 0));
47078
- var n = 0;
47079
- for (; k < fin; k++, n++) createProperty(result, n, O[k]);
47080
- result.length = n;
47081
- return result;
47082
- };
47083
-
47084
- var apply = functionApply;
47085
46790
  var call$1 = functionCall;
47086
46791
  var uncurryThis$4 = functionUncurryThis;
47087
46792
  var fixRegExpWellKnownSymbolLogic = fixRegexpWellKnownSymbolLogic;
47088
- var anObject$1 = anObject$g;
46793
+ var anObject$1 = anObject$f;
47089
46794
  var isNullOrUndefined = isNullOrUndefined$7;
47090
- var isRegExp = isRegexp;
47091
- var requireObjectCoercible$2 = requireObjectCoercible$a;
46795
+ var requireObjectCoercible$2 = requireObjectCoercible$b;
47092
46796
  var speciesConstructor = speciesConstructor$2;
47093
46797
  var advanceStringIndex = advanceStringIndex$3;
47094
46798
  var toLength = toLength$6;
47095
46799
  var toString$2 = toString$9;
47096
46800
  var getMethod = getMethod$6;
47097
- var arraySlice = arraySliceSimple;
47098
- var callRegExpExec = regexpExecAbstract;
47099
- var regexpExec = regexpExec$3;
46801
+ var regExpExec = regexpExecAbstract;
47100
46802
  var stickyHelpers = regexpStickyHelpers;
47101
46803
  var fails$2 = fails$l;
47102
46804
 
47103
46805
  var UNSUPPORTED_Y = stickyHelpers.UNSUPPORTED_Y;
47104
46806
  var MAX_UINT32 = 0xFFFFFFFF;
47105
46807
  var min = Math.min;
47106
- var $push = [].push;
47107
- var exec = uncurryThis$4(/./.exec);
47108
- var push = uncurryThis$4($push);
46808
+ var push = uncurryThis$4([].push);
47109
46809
  var stringSlice = uncurryThis$4(''.slice);
47110
46810
 
47111
46811
  // Chrome 51 has a buggy "split" implementation when RegExp#exec !== nativeExec
@@ -47119,60 +46819,20 @@ var SPLIT_WORKS_WITH_OVERWRITTEN_EXEC = !fails$2(function () {
47119
46819
  return result.length !== 2 || result[0] !== 'a' || result[1] !== 'b';
47120
46820
  });
47121
46821
 
46822
+ var BUGGY = 'abbc'.split(/(b)*/)[1] === 'c' ||
46823
+ // eslint-disable-next-line regexp/no-empty-group -- required for testing
46824
+ 'test'.split(/(?:)/, -1).length !== 4 ||
46825
+ 'ab'.split(/(?:ab)*/).length !== 2 ||
46826
+ '.'.split(/(.?)(.?)/).length !== 4 ||
46827
+ // eslint-disable-next-line regexp/no-empty-capturing-group, regexp/no-empty-group -- required for testing
46828
+ '.'.split(/()()/).length > 1 ||
46829
+ ''.split(/.?/).length;
46830
+
47122
46831
  // @@split logic
47123
46832
  fixRegExpWellKnownSymbolLogic('split', function (SPLIT, nativeSplit, maybeCallNative) {
47124
- var internalSplit;
47125
- if (
47126
- 'abbc'.split(/(b)*/)[1] === 'c' ||
47127
- // eslint-disable-next-line regexp/no-empty-group -- required for testing
47128
- 'test'.split(/(?:)/, -1).length !== 4 ||
47129
- 'ab'.split(/(?:ab)*/).length !== 2 ||
47130
- '.'.split(/(.?)(.?)/).length !== 4 ||
47131
- // eslint-disable-next-line regexp/no-empty-capturing-group, regexp/no-empty-group -- required for testing
47132
- '.'.split(/()()/).length > 1 ||
47133
- ''.split(/.?/).length
47134
- ) {
47135
- // based on es5-shim implementation, need to rework it
47136
- internalSplit = function (separator, limit) {
47137
- var string = toString$2(requireObjectCoercible$2(this));
47138
- var lim = limit === undefined ? MAX_UINT32 : limit >>> 0;
47139
- if (lim === 0) return [];
47140
- if (separator === undefined) return [string];
47141
- // If `separator` is not a regex, use native split
47142
- if (!isRegExp(separator)) {
47143
- return call$1(nativeSplit, string, separator, lim);
47144
- }
47145
- var output = [];
47146
- var flags = (separator.ignoreCase ? 'i' : '') +
47147
- (separator.multiline ? 'm' : '') +
47148
- (separator.unicode ? 'u' : '') +
47149
- (separator.sticky ? 'y' : '');
47150
- var lastLastIndex = 0;
47151
- // Make `global` and avoid `lastIndex` issues by working with a copy
47152
- var separatorCopy = new RegExp(separator.source, flags + 'g');
47153
- var match, lastIndex, lastLength;
47154
- while (match = call$1(regexpExec, separatorCopy, string)) {
47155
- lastIndex = separatorCopy.lastIndex;
47156
- if (lastIndex > lastLastIndex) {
47157
- push(output, stringSlice(string, lastLastIndex, match.index));
47158
- if (match.length > 1 && match.index < string.length) apply($push, output, arraySlice(match, 1));
47159
- lastLength = match[0].length;
47160
- lastLastIndex = lastIndex;
47161
- if (output.length >= lim) break;
47162
- }
47163
- if (separatorCopy.lastIndex === match.index) separatorCopy.lastIndex++; // Avoid an infinite loop
47164
- }
47165
- if (lastLastIndex === string.length) {
47166
- if (lastLength || !exec(separatorCopy, '')) push(output, '');
47167
- } else push(output, stringSlice(string, lastLastIndex));
47168
- return output.length > lim ? arraySlice(output, 0, lim) : output;
47169
- };
47170
- // Chakra, V8
47171
- } else if ('0'.split(undefined, 0).length) {
47172
- internalSplit = function (separator, limit) {
47173
- return separator === undefined && limit === 0 ? [] : call$1(nativeSplit, this, separator, limit);
47174
- };
47175
- } else internalSplit = nativeSplit;
46833
+ var internalSplit = '0'.split(undefined, 0).length ? function (separator, limit) {
46834
+ return separator === undefined && limit === 0 ? [] : call$1(nativeSplit, this, separator, limit);
46835
+ } : nativeSplit;
47176
46836
 
47177
46837
  return [
47178
46838
  // `String.prototype.split` method
@@ -47192,30 +46852,30 @@ fixRegExpWellKnownSymbolLogic('split', function (SPLIT, nativeSplit, maybeCallNa
47192
46852
  function (string, limit) {
47193
46853
  var rx = anObject$1(this);
47194
46854
  var S = toString$2(string);
47195
- var res = maybeCallNative(internalSplit, rx, S, limit, internalSplit !== nativeSplit);
47196
46855
 
47197
- if (res.done) return res.value;
46856
+ if (!BUGGY) {
46857
+ var res = maybeCallNative(internalSplit, rx, S, limit, internalSplit !== nativeSplit);
46858
+ if (res.done) return res.value;
46859
+ }
47198
46860
 
47199
46861
  var C = speciesConstructor(rx, RegExp);
47200
-
47201
46862
  var unicodeMatching = rx.unicode;
47202
46863
  var flags = (rx.ignoreCase ? 'i' : '') +
47203
46864
  (rx.multiline ? 'm' : '') +
47204
46865
  (rx.unicode ? 'u' : '') +
47205
46866
  (UNSUPPORTED_Y ? 'g' : 'y');
47206
-
47207
46867
  // ^(? + rx + ) is needed, in combination with some S slicing, to
47208
46868
  // simulate the 'y' flag.
47209
46869
  var splitter = new C(UNSUPPORTED_Y ? '^(?:' + rx.source + ')' : rx, flags);
47210
46870
  var lim = limit === undefined ? MAX_UINT32 : limit >>> 0;
47211
46871
  if (lim === 0) return [];
47212
- if (S.length === 0) return callRegExpExec(splitter, S) === null ? [S] : [];
46872
+ if (S.length === 0) return regExpExec(splitter, S) === null ? [S] : [];
47213
46873
  var p = 0;
47214
46874
  var q = 0;
47215
46875
  var A = [];
47216
46876
  while (q < S.length) {
47217
46877
  splitter.lastIndex = UNSUPPORTED_Y ? 0 : q;
47218
- var z = callRegExpExec(splitter, UNSUPPORTED_Y ? stringSlice(S, q) : S);
46878
+ var z = regExpExec(splitter, UNSUPPORTED_Y ? stringSlice(S, q) : S);
47219
46879
  var e;
47220
46880
  if (
47221
46881
  z === null ||
@@ -47236,7 +46896,7 @@ fixRegExpWellKnownSymbolLogic('split', function (SPLIT, nativeSplit, maybeCallNa
47236
46896
  return A;
47237
46897
  }
47238
46898
  ];
47239
- }, !SPLIT_WORKS_WITH_OVERWRITTEN_EXEC, UNSUPPORTED_Y);
46899
+ }, BUGGY || !SPLIT_WORKS_WITH_OVERWRITTEN_EXEC, UNSUPPORTED_Y);
47240
46900
 
47241
46901
  var raf$1 = {exports: {}};
47242
46902
 
@@ -47356,7 +47016,7 @@ var whitespaces$2 = '\u0009\u000A\u000B\u000C\u000D\u0020\u00A0\u1680\u2000\u200
47356
47016
  '\u2003\u2004\u2005\u2006\u2007\u2008\u2009\u200A\u202F\u205F\u3000\u2028\u2029\uFEFF';
47357
47017
 
47358
47018
  var uncurryThis$3 = functionUncurryThis;
47359
- var requireObjectCoercible$1 = requireObjectCoercible$a;
47019
+ var requireObjectCoercible$1 = requireObjectCoercible$b;
47360
47020
  var toString$1 = toString$9;
47361
47021
  var whitespaces$1 = whitespaces$2;
47362
47022
 
@@ -47708,7 +47368,7 @@ $$2({ target: 'Array', proto: true, forced: FORCED }, {
47708
47368
  var $$1 = _export;
47709
47369
  var uncurryThis$1 = functionUncurryThis;
47710
47370
  var notARegExp = notARegexp;
47711
- var requireObjectCoercible = requireObjectCoercible$a;
47371
+ var requireObjectCoercible = requireObjectCoercible$b;
47712
47372
  var toString = toString$9;
47713
47373
  var correctIsRegExpLogic = correctIsRegexpLogic;
47714
47374
 
@@ -47850,7 +47510,6 @@ function p(t, r, e, i) {
47850
47510
  u = 6 * (o - n),
47851
47511
  h = 3 * n;
47852
47512
  return Math.abs(s) < a ? [-h / u] : function (t, r, e) {
47853
- void 0 === e && (e = 1e-6);
47854
47513
  var i = t * t / 4 - r;
47855
47514
  if (i < -e) return [];
47856
47515
  if (i <= e) return [-t / 2];
@@ -48275,7 +47934,7 @@ var regexpGetFlags = function (R) {
48275
47934
 
48276
47935
  var PROPER_FUNCTION_NAME = functionName.PROPER;
48277
47936
  var defineBuiltIn = defineBuiltIn$7;
48278
- var anObject = anObject$g;
47937
+ var anObject = anObject$f;
48279
47938
  var $toString = toString$9;
48280
47939
  var fails = fails$l;
48281
47940
  var getRegExpFlags = regexpGetFlags;
@@ -48291,7 +47950,7 @@ var INCORRECT_NAME = PROPER_FUNCTION_NAME && nativeToString.name !== TO_STRING;
48291
47950
  // `RegExp.prototype.toString` method
48292
47951
  // https://tc39.es/ecma262/#sec-regexp.prototype.tostring
48293
47952
  if (NOT_GENERIC || INCORRECT_NAME) {
48294
- defineBuiltIn(RegExp.prototype, TO_STRING, function toString() {
47953
+ defineBuiltIn(RegExpPrototype, TO_STRING, function toString() {
48295
47954
  var R = anObject(this);
48296
47955
  var pattern = $toString(R.source);
48297
47956
  var flags = $toString(getRegExpFlags(R));