@enos5/enos-vue-default 1.8.12 → 1.8.14

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (32) hide show
  1. package/dist/components/CustomSelect.vue.d.ts +0 -9
  2. package/dist/components/InputGroup.vue.d.ts +0 -9
  3. package/dist/components/SelectInput.vue.d.ts +0 -9
  4. package/dist/{index-G1cAlO5C.js → index-1G1T4Qrv.js} +373 -203
  5. package/dist/index-1G1T4Qrv.js.map +1 -0
  6. package/dist/{index-Ch9hFG6f.js → index-BBGZQp5w.js} +17 -6
  7. package/dist/{index-Ch9hFG6f.js.map → index-BBGZQp5w.js.map} +1 -1
  8. package/dist/{index-BHTvTOGk.js → index-BR_u7CCm.js} +4 -2
  9. package/dist/{index-BHTvTOGk.js.map → index-BR_u7CCm.js.map} +1 -1
  10. package/dist/{index-6eLEqodC.js → index-Bsqrrc8R.js} +35 -4
  11. package/dist/index-Bsqrrc8R.js.map +1 -0
  12. package/dist/index-CiFpmPug.js.map +1 -1
  13. package/dist/{index-Cjhk16SP.js → index-CuSlJQwq.js} +10 -8
  14. package/dist/index-CuSlJQwq.js.map +1 -0
  15. package/dist/{index-D7sesyMc.js → index-D72Leh_x.js} +4 -4
  16. package/dist/{index-D7sesyMc.js.map → index-D72Leh_x.js.map} +1 -1
  17. package/dist/{index-BPcdR1qv.js → index-ukywSRmc.js} +10 -9
  18. package/dist/index-ukywSRmc.js.map +1 -0
  19. package/dist/index.js +1 -1
  20. package/dist/index.node.js +1 -1
  21. package/dist/{plugin-BB5Wpvyp.js → plugin-2Tim-PB2.js} +16 -31
  22. package/dist/plugin-2Tim-PB2.js.map +1 -0
  23. package/dist/styles.css +1603 -143
  24. package/dist/{tinymce-WPdeGquX.js → tinymce-Dg510HCs.js} +659 -388
  25. package/dist/tinymce-Dg510HCs.js.map +1 -0
  26. package/package.json +36 -36
  27. package/dist/index-6eLEqodC.js.map +0 -1
  28. package/dist/index-BPcdR1qv.js.map +0 -1
  29. package/dist/index-Cjhk16SP.js.map +0 -1
  30. package/dist/index-G1cAlO5C.js.map +0 -1
  31. package/dist/plugin-BB5Wpvyp.js.map +0 -1
  32. package/dist/tinymce-WPdeGquX.js.map +0 -1
@@ -10589,6 +10589,7 @@ function requireTheme() {
10589
10589
  if (extras !== void 0 && extras.onOpen !== void 0) {
10590
10590
  extras.onOpen(component, menu2);
10591
10591
  }
10592
+ tieredMenu.repositionMenus(menu2);
10592
10593
  };
10593
10594
  const onClose = (component, menu2) => {
10594
10595
  ariaControls.unlink(hotspot.element);
@@ -10923,7 +10924,7 @@ function requireTheme() {
10923
10924
  },
10924
10925
  domModification: {
10925
10926
  attributes: {
10926
- role: "group"
10927
+ role: "toolbar"
10927
10928
  }
10928
10929
  }
10929
10930
  };
@@ -11699,6 +11700,7 @@ function requireTheme() {
11699
11700
  defaulted("useTabstopAt", always),
11700
11701
  defaulted("firstTabstop", 0),
11701
11702
  defaulted("eventOrder", {}),
11703
+ defaultedStringEnum("role", "dialog", ["dialog", "alertdialog"]),
11702
11704
  field("modalBehaviours", [Keying]),
11703
11705
  onKeyboardHandler("onExecute"),
11704
11706
  onStrictKeyboardHandler("onEscape")
@@ -11832,7 +11834,7 @@ function requireTheme() {
11832
11834
  eventOrder,
11833
11835
  domModification: {
11834
11836
  attributes: {
11835
- "role": "dialog",
11837
+ "role": detail.role,
11836
11838
  "aria-modal": "true"
11837
11839
  }
11838
11840
  },
@@ -11852,10 +11854,12 @@ function requireTheme() {
11852
11854
  runOnAttached((c) => {
11853
11855
  const titleElm = getPartOrDie(c, detail, "title").element;
11854
11856
  const title2 = get$6(titleElm);
11855
- if (browser2.os.isMacOS() && isNonNullable(title2)) {
11856
- set$9(c.element, "aria-label", title2);
11857
- } else {
11858
- labelledBy(c.element, titleElm);
11857
+ if (isNonNullable(title2) && title2 !== "") {
11858
+ if (browser2.os.isMacOS()) {
11859
+ set$9(c.element, "aria-label", title2);
11860
+ } else {
11861
+ labelledBy(c.element, titleElm);
11862
+ }
11859
11863
  }
11860
11864
  })
11861
11865
  ])
@@ -12871,7 +12875,7 @@ function requireTheme() {
12871
12875
  ]),
12872
12876
  domModification: {
12873
12877
  attributes: {
12874
- role: "toolbar"
12878
+ role: "group"
12875
12879
  }
12876
12880
  }
12877
12881
  });
@@ -13961,6 +13965,9 @@ function requireTheme() {
13961
13965
  registerOption("sidebar_show", {
13962
13966
  processor: "string"
13963
13967
  });
13968
+ registerOption("view_show", {
13969
+ processor: "string"
13970
+ });
13964
13971
  registerOption("help_accessibility", {
13965
13972
  processor: "boolean",
13966
13973
  default: editor.hasPlugin("help")
@@ -14006,6 +14013,7 @@ function requireTheme() {
14006
14013
  const getResize = option$2("resize");
14007
14014
  const getPasteAsText = option$2("paste_as_text");
14008
14015
  const getSidebarShow = option$2("sidebar_show");
14016
+ const getViewShow = option$2("view_show");
14009
14017
  const promotionEnabled = option$2("promotion");
14010
14018
  const useHelpAccessibility = option$2("help_accessibility");
14011
14019
  const getDefaultFontStack = option$2("default_font_stack");
@@ -14132,6 +14140,7 @@ function requireTheme() {
14132
14140
  getResize,
14133
14141
  getPasteAsText,
14134
14142
  getSidebarShow,
14143
+ getViewShow,
14135
14144
  useHelpAccessibility,
14136
14145
  getDefaultFontStack
14137
14146
  });
@@ -14168,22 +14177,49 @@ function requireTheme() {
14168
14177
  ];
14169
14178
  return sc.isFullscreen() ? win() : constrainByMany(box$1(sc.element), scrollableBoxes);
14170
14179
  };
14171
- const {
14172
- entries,
14173
- setPrototypeOf,
14174
- isFrozen,
14175
- getPrototypeOf,
14176
- getOwnPropertyDescriptor
14177
- } = Object;
14178
- let {
14179
- freeze,
14180
- seal,
14181
- create: create$1
14182
- } = Object;
14183
- let {
14184
- apply,
14185
- construct
14186
- } = typeof Reflect !== "undefined" && Reflect;
14180
+ function _arrayLikeToArray(r2, a) {
14181
+ (null == a || a > r2.length) && (a = r2.length);
14182
+ for (var e = 0, n = Array(a); e < a; e++) n[e] = r2[e];
14183
+ return n;
14184
+ }
14185
+ function _arrayWithHoles(r2) {
14186
+ if (Array.isArray(r2)) return r2;
14187
+ }
14188
+ function _iterableToArrayLimit(r2, l2) {
14189
+ var t2 = null == r2 ? null : "undefined" != typeof Symbol && r2[Symbol.iterator] || r2["@@iterator"];
14190
+ if (null != t2) {
14191
+ var e, n, i, u, a = [], f2 = true, o = false;
14192
+ try {
14193
+ if (i = (t2 = t2.call(r2)).next, 0 === l2) ;
14194
+ else for (; !(f2 = (e = i.call(t2)).done) && (a.push(e.value), a.length !== l2); f2 = true) ;
14195
+ } catch (r3) {
14196
+ o = true, n = r3;
14197
+ } finally {
14198
+ try {
14199
+ if (!f2 && null != t2.return && (u = t2.return(), Object(u) !== u)) return;
14200
+ } finally {
14201
+ if (o) throw n;
14202
+ }
14203
+ }
14204
+ return a;
14205
+ }
14206
+ }
14207
+ function _nonIterableRest() {
14208
+ throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.");
14209
+ }
14210
+ function _slicedToArray(r2, e) {
14211
+ return _arrayWithHoles(r2) || _iterableToArrayLimit(r2, e) || _unsupportedIterableToArray(r2, e) || _nonIterableRest();
14212
+ }
14213
+ function _unsupportedIterableToArray(r2, a) {
14214
+ if (r2) {
14215
+ if ("string" == typeof r2) return _arrayLikeToArray(r2, a);
14216
+ var t2 = {}.toString.call(r2).slice(8, -1);
14217
+ return "Object" === t2 && r2.constructor && (t2 = r2.constructor.name), "Map" === t2 || "Set" === t2 ? Array.from(r2) : "Arguments" === t2 || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(t2) ? _arrayLikeToArray(r2, a) : void 0;
14218
+ }
14219
+ }
14220
+ const entries = Object.entries, setPrototypeOf = Object.setPrototypeOf, isFrozen = Object.isFrozen, getPrototypeOf = Object.getPrototypeOf, getOwnPropertyDescriptor = Object.getOwnPropertyDescriptor;
14221
+ let freeze = Object.freeze, seal = Object.seal, create$1 = Object.create;
14222
+ let _ref = typeof Reflect !== "undefined" && Reflect, apply = _ref.apply, construct = _ref.construct;
14187
14223
  if (!freeze) {
14188
14224
  freeze = function freeze2(x) {
14189
14225
  return x;
@@ -14195,12 +14231,18 @@ function requireTheme() {
14195
14231
  };
14196
14232
  }
14197
14233
  if (!apply) {
14198
- apply = function apply2(fun, thisValue, args) {
14199
- return fun.apply(thisValue, args);
14234
+ apply = function apply2(func, thisArg) {
14235
+ for (var _len = arguments.length, args = new Array(_len > 2 ? _len - 2 : 0), _key = 2; _key < _len; _key++) {
14236
+ args[_key - 2] = arguments[_key];
14237
+ }
14238
+ return func.apply(thisArg, args);
14200
14239
  };
14201
14240
  }
14202
14241
  if (!construct) {
14203
- construct = function construct2(Func, args) {
14242
+ construct = function construct2(Func) {
14243
+ for (var _len2 = arguments.length, args = new Array(_len2 > 1 ? _len2 - 1 : 0), _key2 = 1; _key2 < _len2; _key2++) {
14244
+ args[_key2 - 1] = arguments[_key2];
14245
+ }
14204
14246
  return new Func(...args);
14205
14247
  };
14206
14248
  }
@@ -14209,13 +14251,19 @@ function requireTheme() {
14209
14251
  const arrayPop = unapply(Array.prototype.pop);
14210
14252
  const arrayPush = unapply(Array.prototype.push);
14211
14253
  const arraySplice = unapply(Array.prototype.splice);
14254
+ const arrayIsArray = Array.isArray;
14212
14255
  const stringToLowerCase = unapply(String.prototype.toLowerCase);
14213
14256
  const stringToString = unapply(String.prototype.toString);
14214
14257
  const stringMatch = unapply(String.prototype.match);
14215
14258
  const stringReplace = unapply(String.prototype.replace);
14216
14259
  const stringIndexOf = unapply(String.prototype.indexOf);
14217
14260
  const stringTrim = unapply(String.prototype.trim);
14261
+ const numberToString = unapply(Number.prototype.toString);
14262
+ const booleanToString = unapply(Boolean.prototype.toString);
14263
+ const bigintToString = typeof BigInt === "undefined" ? null : unapply(BigInt.prototype.toString);
14264
+ const symbolToString = typeof Symbol === "undefined" ? null : unapply(Symbol.prototype.toString);
14218
14265
  const objectHasOwnProperty = unapply(Object.prototype.hasOwnProperty);
14266
+ const objectToString = unapply(Object.prototype.toString);
14219
14267
  const regExpTest = unapply(RegExp.prototype.test);
14220
14268
  const typeErrorCreate = unconstruct(TypeError);
14221
14269
  function unapply(func) {
@@ -14223,18 +14271,18 @@ function requireTheme() {
14223
14271
  if (thisArg instanceof RegExp) {
14224
14272
  thisArg.lastIndex = 0;
14225
14273
  }
14226
- for (var _len = arguments.length, args = new Array(_len > 1 ? _len - 1 : 0), _key = 1; _key < _len; _key++) {
14227
- args[_key - 1] = arguments[_key];
14274
+ for (var _len3 = arguments.length, args = new Array(_len3 > 1 ? _len3 - 1 : 0), _key3 = 1; _key3 < _len3; _key3++) {
14275
+ args[_key3 - 1] = arguments[_key3];
14228
14276
  }
14229
14277
  return apply(func, thisArg, args);
14230
14278
  };
14231
14279
  }
14232
- function unconstruct(func) {
14280
+ function unconstruct(Func) {
14233
14281
  return function() {
14234
- for (var _len2 = arguments.length, args = new Array(_len2), _key2 = 0; _key2 < _len2; _key2++) {
14235
- args[_key2] = arguments[_key2];
14282
+ for (var _len4 = arguments.length, args = new Array(_len4), _key4 = 0; _key4 < _len4; _key4++) {
14283
+ args[_key4] = arguments[_key4];
14236
14284
  }
14237
- return construct(func, args);
14285
+ return construct(Func, args);
14238
14286
  };
14239
14287
  }
14240
14288
  function addToSet(set2, array) {
@@ -14242,6 +14290,9 @@ function requireTheme() {
14242
14290
  if (setPrototypeOf) {
14243
14291
  setPrototypeOf(set2, null);
14244
14292
  }
14293
+ if (!arrayIsArray(array)) {
14294
+ return set2;
14295
+ }
14245
14296
  let l2 = array.length;
14246
14297
  while (l2--) {
14247
14298
  let element2 = array[l2];
@@ -14269,10 +14320,13 @@ function requireTheme() {
14269
14320
  }
14270
14321
  function clone(object) {
14271
14322
  const newObject = create$1(null);
14272
- for (const [property, value2] of entries(object)) {
14323
+ for (const _ref2 of entries(object)) {
14324
+ var _ref3 = _slicedToArray(_ref2, 2);
14325
+ const property = _ref3[0];
14326
+ const value2 = _ref3[1];
14273
14327
  const isPropertyExist = objectHasOwnProperty(object, property);
14274
14328
  if (isPropertyExist) {
14275
- if (Array.isArray(value2)) {
14329
+ if (arrayIsArray(value2)) {
14276
14330
  newObject[property] = cleanArray(value2);
14277
14331
  } else if (value2 && typeof value2 === "object" && value2.constructor === Object) {
14278
14332
  newObject[property] = clone(value2);
@@ -14283,6 +14337,44 @@ function requireTheme() {
14283
14337
  }
14284
14338
  return newObject;
14285
14339
  }
14340
+ function stringifyValue(value2) {
14341
+ switch (typeof value2) {
14342
+ case "string": {
14343
+ return value2;
14344
+ }
14345
+ case "number": {
14346
+ return numberToString(value2);
14347
+ }
14348
+ case "boolean": {
14349
+ return booleanToString(value2);
14350
+ }
14351
+ case "bigint": {
14352
+ return bigintToString ? bigintToString(value2) : "0";
14353
+ }
14354
+ case "symbol": {
14355
+ return symbolToString ? symbolToString(value2) : "Symbol()";
14356
+ }
14357
+ case "undefined": {
14358
+ return objectToString(value2);
14359
+ }
14360
+ case "function":
14361
+ case "object": {
14362
+ if (value2 === null) {
14363
+ return objectToString(value2);
14364
+ }
14365
+ const valueAsRecord = value2;
14366
+ const valueToString = lookupGetter(valueAsRecord, "toString");
14367
+ if (typeof valueToString === "function") {
14368
+ const stringified = valueToString(valueAsRecord);
14369
+ return typeof stringified === "string" ? stringified : objectToString(stringified);
14370
+ }
14371
+ return objectToString(value2);
14372
+ }
14373
+ default: {
14374
+ return objectToString(value2);
14375
+ }
14376
+ }
14377
+ }
14286
14378
  function lookupGetter(object, prop) {
14287
14379
  while (object !== null) {
14288
14380
  const desc = getOwnPropertyDescriptor(object, prop);
@@ -14301,20 +14393,28 @@ function requireTheme() {
14301
14393
  }
14302
14394
  return fallbackValue;
14303
14395
  }
14304
- const html$1 = freeze(["a", "abbr", "acronym", "address", "area", "article", "aside", "audio", "b", "bdi", "bdo", "big", "blink", "blockquote", "body", "br", "button", "canvas", "caption", "center", "cite", "code", "col", "colgroup", "content", "data", "datalist", "dd", "decorator", "del", "details", "dfn", "dialog", "dir", "div", "dl", "dt", "element", "em", "fieldset", "figcaption", "figure", "font", "footer", "form", "h1", "h2", "h3", "h4", "h5", "h6", "head", "header", "hgroup", "hr", "html", "i", "img", "input", "ins", "kbd", "label", "legend", "li", "main", "map", "mark", "marquee", "menu", "menuitem", "meter", "nav", "nobr", "ol", "optgroup", "option", "output", "p", "picture", "pre", "progress", "q", "rp", "rt", "ruby", "s", "samp", "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"]);
14305
- const 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"]);
14396
+ function isRegex(value2) {
14397
+ try {
14398
+ regExpTest(value2, "");
14399
+ return true;
14400
+ } catch (_unused) {
14401
+ return false;
14402
+ }
14403
+ }
14404
+ const html$1 = freeze(["a", "abbr", "acronym", "address", "area", "article", "aside", "audio", "b", "bdi", "bdo", "big", "blink", "blockquote", "body", "br", "button", "canvas", "caption", "center", "cite", "code", "col", "colgroup", "content", "data", "datalist", "dd", "decorator", "del", "details", "dfn", "dialog", "dir", "div", "dl", "dt", "element", "em", "fieldset", "figcaption", "figure", "font", "footer", "form", "h1", "h2", "h3", "h4", "h5", "h6", "head", "header", "hgroup", "hr", "html", "i", "img", "input", "ins", "kbd", "label", "legend", "li", "main", "map", "mark", "marquee", "menu", "menuitem", "meter", "nav", "nobr", "ol", "optgroup", "option", "output", "p", "picture", "pre", "progress", "q", "rp", "rt", "ruby", "s", "samp", "search", "section", "select", "shadow", "slot", "small", "source", "spacer", "span", "strike", "strong", "style", "sub", "summary", "sup", "table", "tbody", "td", "template", "textarea", "tfoot", "th", "thead", "time", "tr", "track", "tt", "u", "ul", "var", "video", "wbr"]);
14405
+ const svg$1 = freeze(["svg", "a", "altglyph", "altglyphdef", "altglyphitem", "animatecolor", "animatemotion", "animatetransform", "circle", "clippath", "defs", "desc", "ellipse", "enterkeyhint", "exportparts", "filter", "font", "g", "glyph", "glyphref", "hkern", "image", "inputmode", "line", "lineargradient", "marker", "mask", "metadata", "mpath", "part", "path", "pattern", "polygon", "polyline", "radialgradient", "rect", "stop", "style", "switch", "symbol", "text", "textpath", "title", "tref", "tspan", "view", "vkern"]);
14306
14406
  const svgFilters = freeze(["feBlend", "feColorMatrix", "feComponentTransfer", "feComposite", "feConvolveMatrix", "feDiffuseLighting", "feDisplacementMap", "feDistantLight", "feDropShadow", "feFlood", "feFuncA", "feFuncB", "feFuncG", "feFuncR", "feGaussianBlur", "feImage", "feMerge", "feMergeNode", "feMorphology", "feOffset", "fePointLight", "feSpecularLighting", "feSpotLight", "feTile", "feTurbulence"]);
14307
14407
  const svgDisallowed = freeze(["animate", "color-profile", "cursor", "discard", "font-face", "font-face-format", "font-face-name", "font-face-src", "font-face-uri", "foreignobject", "hatch", "hatchpath", "mesh", "meshgradient", "meshpatch", "meshrow", "missing-glyph", "script", "set", "solidcolor", "unknown", "use"]);
14308
14408
  const mathMl$1 = freeze(["math", "menclose", "merror", "mfenced", "mfrac", "mglyph", "mi", "mlabeledtr", "mmultiscripts", "mn", "mo", "mover", "mpadded", "mphantom", "mroot", "mrow", "ms", "mspace", "msqrt", "mstyle", "msub", "msup", "msubsup", "mtable", "mtd", "mtext", "mtr", "munder", "munderover", "mprescripts"]);
14309
14409
  const mathMlDisallowed = freeze(["maction", "maligngroup", "malignmark", "mlongdiv", "mscarries", "mscarry", "msgroup", "mstack", "msline", "msrow", "semantics", "annotation", "annotation-xml", "mprescripts", "none"]);
14310
14410
  const text$1 = freeze(["#text"]);
14311
- const 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", "popover", "popovertarget", "popovertargetaction", "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", "wrap", "xmlns", "slot"]);
14312
- const svg = freeze(["accent-height", "accumulate", "additive", "alignment-baseline", "amplitude", "ascent", "attributename", "attributetype", "azimuth", "basefrequency", "baseline-shift", "begin", "bias", "by", "class", "clip", "clippathunits", "clip-path", "clip-rule", "color", "color-interpolation", "color-interpolation-filters", "color-profile", "color-rendering", "cx", "cy", "d", "dx", "dy", "diffuseconstant", "direction", "display", "divisor", "dur", "edgemode", "elevation", "end", "exponent", "fill", "fill-opacity", "fill-rule", "filter", "filterunits", "flood-color", "flood-opacity", "font-family", "font-size", "font-size-adjust", "font-stretch", "font-style", "font-variant", "font-weight", "fx", "fy", "g1", "g2", "glyph-name", "glyphref", "gradientunits", "gradienttransform", "height", "href", "id", "image-rendering", "in", "in2", "intercept", "k", "k1", "k2", "k3", "k4", "kerning", "keypoints", "keysplines", "keytimes", "lang", "lengthadjust", "letter-spacing", "kernelmatrix", "kernelunitlength", "lighting-color", "local", "marker-end", "marker-mid", "marker-start", "markerheight", "markerunits", "markerwidth", "maskcontentunits", "maskunits", "max", "mask", "media", "method", "mode", "min", "name", "numoctaves", "offset", "operator", "opacity", "order", "orient", "orientation", "origin", "overflow", "paint-order", "path", "pathlength", "patterncontentunits", "patterntransform", "patternunits", "points", "preservealpha", "preserveaspectratio", "primitiveunits", "r", "rx", "ry", "radius", "refx", "refy", "repeatcount", "repeatdur", "restart", "result", "rotate", "scale", "seed", "shape-rendering", "slope", "specularconstant", "specularexponent", "spreadmethod", "startoffset", "stddeviation", "stitchtiles", "stop-color", "stop-opacity", "stroke-dasharray", "stroke-dashoffset", "stroke-linecap", "stroke-linejoin", "stroke-miterlimit", "stroke-opacity", "stroke", "stroke-width", "style", "surfacescale", "systemlanguage", "tabindex", "tablevalues", "targetx", "targety", "transform", "transform-origin", "text-anchor", "text-decoration", "text-rendering", "textlength", "type", "u1", "u2", "unicode", "values", "viewbox", "visibility", "version", "vert-adv-y", "vert-origin-x", "vert-origin-y", "width", "word-spacing", "wrap", "writing-mode", "xchannelselector", "ychannelselector", "x", "x1", "x2", "xmlns", "y", "y1", "y2", "z", "zoomandpan"]);
14313
- const 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"]);
14411
+ const html = freeze(["accept", "action", "align", "alt", "autocapitalize", "autocomplete", "autopictureinpicture", "autoplay", "background", "bgcolor", "border", "capture", "cellpadding", "cellspacing", "checked", "cite", "class", "clear", "color", "cols", "colspan", "command", "commandfor", "controls", "controlslist", "coords", "crossorigin", "datetime", "decoding", "default", "dir", "disabled", "disablepictureinpicture", "disableremoteplayback", "download", "draggable", "enctype", "enterkeyhint", "exportparts", "face", "for", "headers", "height", "hidden", "high", "href", "hreflang", "id", "inert", "inputmode", "integrity", "ismap", "kind", "label", "lang", "list", "loading", "loop", "low", "max", "maxlength", "media", "method", "min", "minlength", "multiple", "muted", "name", "nonce", "noshade", "novalidate", "nowrap", "open", "optimum", "part", "pattern", "placeholder", "playsinline", "popover", "popovertarget", "popovertargetaction", "poster", "preload", "pubdate", "radiogroup", "readonly", "rel", "required", "rev", "reversed", "role", "rows", "rowspan", "spellcheck", "scope", "selected", "shape", "size", "sizes", "slot", "span", "srclang", "start", "src", "srcset", "step", "style", "summary", "tabindex", "title", "translate", "type", "usemap", "valign", "value", "width", "wrap", "xmlns"]);
14412
+ const svg = freeze(["accent-height", "accumulate", "additive", "alignment-baseline", "amplitude", "ascent", "attributename", "attributetype", "azimuth", "basefrequency", "baseline-shift", "begin", "bias", "by", "class", "clip", "clippathunits", "clip-path", "clip-rule", "color", "color-interpolation", "color-interpolation-filters", "color-profile", "color-rendering", "cx", "cy", "d", "dx", "dy", "diffuseconstant", "direction", "display", "divisor", "dur", "edgemode", "elevation", "end", "exponent", "fill", "fill-opacity", "fill-rule", "filter", "filterunits", "flood-color", "flood-opacity", "font-family", "font-size", "font-size-adjust", "font-stretch", "font-style", "font-variant", "font-weight", "fx", "fy", "g1", "g2", "glyph-name", "glyphref", "gradientunits", "gradienttransform", "height", "href", "id", "image-rendering", "in", "in2", "intercept", "k", "k1", "k2", "k3", "k4", "kerning", "keypoints", "keysplines", "keytimes", "lang", "lengthadjust", "letter-spacing", "kernelmatrix", "kernelunitlength", "lighting-color", "local", "marker-end", "marker-mid", "marker-start", "markerheight", "markerunits", "markerwidth", "maskcontentunits", "maskunits", "max", "mask", "mask-type", "media", "method", "mode", "min", "name", "numoctaves", "offset", "operator", "opacity", "order", "orient", "orientation", "origin", "overflow", "paint-order", "path", "pathlength", "patterncontentunits", "patterntransform", "patternunits", "points", "preservealpha", "preserveaspectratio", "primitiveunits", "r", "rx", "ry", "radius", "refx", "refy", "repeatcount", "repeatdur", "restart", "result", "rotate", "scale", "seed", "shape-rendering", "slope", "specularconstant", "specularexponent", "spreadmethod", "startoffset", "stddeviation", "stitchtiles", "stop-color", "stop-opacity", "stroke-dasharray", "stroke-dashoffset", "stroke-linecap", "stroke-linejoin", "stroke-miterlimit", "stroke-opacity", "stroke", "stroke-width", "style", "surfacescale", "systemlanguage", "tabindex", "tablevalues", "targetx", "targety", "transform", "transform-origin", "text-anchor", "text-decoration", "text-rendering", "textlength", "type", "u1", "u2", "unicode", "values", "viewbox", "visibility", "version", "vert-adv-y", "vert-origin-x", "vert-origin-y", "width", "word-spacing", "wrap", "writing-mode", "xchannelselector", "ychannelselector", "x", "x1", "x2", "xmlns", "y", "y1", "y2", "z", "zoomandpan"]);
14413
+ const mathMl = freeze(["accent", "accentunder", "align", "bevelled", "close", "columnalign", "columnlines", "columnspacing", "columnspan", "denomalign", "depth", "dir", "display", "displaystyle", "encoding", "fence", "frame", "height", "href", "id", "largeop", "length", "linethickness", "lquote", "lspace", "mathbackground", "mathcolor", "mathsize", "mathvariant", "maxsize", "minsize", "movablelimits", "notation", "numalign", "open", "rowalign", "rowlines", "rowspacing", "rowspan", "rspace", "rquote", "scriptlevel", "scriptminsize", "scriptsizemultiplier", "selection", "separator", "separators", "stretchy", "subscriptshift", "supscriptshift", "symmetric", "voffset", "width", "xmlns"]);
14314
14414
  const xml = freeze(["xlink:href", "xml:id", "xlink:title", "xml:space", "xmlns:xlink"]);
14315
- const MUSTACHE_EXPR = seal(/\{\{[\w\W]*|[\w\W]*\}\}/gm);
14316
- const ERB_EXPR = seal(/<%[\w\W]*|[\w\W]*%>/gm);
14317
- const TMPLIT_EXPR = seal(/\$\{[\w\W]*/gm);
14415
+ const MUSTACHE_EXPR = seal(/{{[\w\W]*|^[\w\W]*}}/g);
14416
+ const ERB_EXPR = seal(/<%[\w\W]*|^[\w\W]*%>/g);
14417
+ const TMPLIT_EXPR = seal(/\${[\w\W]*/g);
14318
14418
  const DATA_ATTR = seal(/^data-[\-\w.\u00B7-\uFFFF]+$/);
14319
14419
  const ARIA_ATTR = seal(/^aria-[\-\w]+$/);
14320
14420
  const IS_ALLOWED_URI = seal(
@@ -14328,19 +14428,6 @@ function requireTheme() {
14328
14428
  );
14329
14429
  const DOCTYPE_NAME = seal(/^html$/i);
14330
14430
  const CUSTOM_ELEMENT = seal(/^[a-z][.\w]*(-[.\w]+)+$/i);
14331
- var EXPRESSIONS = /* @__PURE__ */ Object.freeze({
14332
- __proto__: null,
14333
- ARIA_ATTR,
14334
- ATTR_WHITESPACE,
14335
- CUSTOM_ELEMENT,
14336
- DATA_ATTR,
14337
- DOCTYPE_NAME,
14338
- ERB_EXPR,
14339
- IS_ALLOWED_URI,
14340
- IS_SCRIPT_OR_DATA,
14341
- MUSTACHE_EXPR,
14342
- TMPLIT_EXPR
14343
- });
14344
14431
  const NODE_TYPE = {
14345
14432
  element: 1,
14346
14433
  text: 3,
@@ -14392,34 +14479,23 @@ function requireTheme() {
14392
14479
  function createDOMPurify() {
14393
14480
  let window2 = arguments.length > 0 && arguments[0] !== void 0 ? arguments[0] : getGlobal();
14394
14481
  const DOMPurify = (root) => createDOMPurify(root);
14395
- DOMPurify.version = "3.2.6";
14482
+ DOMPurify.version = "3.4.5";
14396
14483
  DOMPurify.removed = [];
14397
14484
  if (!window2 || !window2.document || window2.document.nodeType !== NODE_TYPE.document || !window2.Element) {
14398
14485
  DOMPurify.isSupported = false;
14399
14486
  return DOMPurify;
14400
14487
  }
14401
- let {
14402
- document: document2
14403
- } = window2;
14488
+ let document2 = window2.document;
14404
14489
  const originalDocument = document2;
14405
14490
  const currentScript = originalDocument.currentScript;
14406
- const {
14407
- DocumentFragment,
14408
- HTMLTemplateElement,
14409
- Node,
14410
- Element,
14411
- NodeFilter,
14412
- NamedNodeMap = window2.NamedNodeMap || window2.MozNamedAttrMap,
14413
- HTMLFormElement,
14414
- DOMParser,
14415
- trustedTypes
14416
- } = window2;
14491
+ const DocumentFragment = window2.DocumentFragment, HTMLTemplateElement = window2.HTMLTemplateElement, Node = window2.Node, Element = window2.Element, NodeFilter = window2.NodeFilter, _window$NamedNodeMap = window2.NamedNodeMap, NamedNodeMap = _window$NamedNodeMap === void 0 ? window2.NamedNodeMap || window2.MozNamedAttrMap : _window$NamedNodeMap, HTMLFormElement = window2.HTMLFormElement, DOMParser = window2.DOMParser, trustedTypes = window2.trustedTypes;
14417
14492
  const ElementPrototype = Element.prototype;
14418
14493
  const cloneNode = lookupGetter(ElementPrototype, "cloneNode");
14419
14494
  const remove2 = lookupGetter(ElementPrototype, "remove");
14420
14495
  const getNextSibling = lookupGetter(ElementPrototype, "nextSibling");
14421
14496
  const getChildNodes = lookupGetter(ElementPrototype, "childNodes");
14422
14497
  const getParentNode = lookupGetter(ElementPrototype, "parentNode");
14498
+ const getNodeType = Node && Node.prototype ? lookupGetter(Node.prototype, "nodeType") : null;
14423
14499
  if (typeof HTMLTemplateElement === "function") {
14424
14500
  const template = document2.createElement("template");
14425
14501
  if (template.content && template.content.ownerDocument) {
@@ -14428,30 +14504,12 @@ function requireTheme() {
14428
14504
  }
14429
14505
  let trustedTypesPolicy;
14430
14506
  let emptyHTML = "";
14431
- const {
14432
- implementation,
14433
- createNodeIterator,
14434
- createDocumentFragment,
14435
- getElementsByTagName
14436
- } = document2;
14437
- const {
14438
- importNode
14439
- } = originalDocument;
14507
+ const _document = document2, implementation = _document.implementation, createNodeIterator = _document.createNodeIterator, createDocumentFragment = _document.createDocumentFragment, getElementsByTagName = _document.getElementsByTagName;
14508
+ const importNode = originalDocument.importNode;
14440
14509
  let hooks = _createHooksMap();
14441
14510
  DOMPurify.isSupported = typeof entries === "function" && typeof getParentNode === "function" && implementation && implementation.createHTMLDocument !== void 0;
14442
- const {
14443
- MUSTACHE_EXPR: MUSTACHE_EXPR2,
14444
- ERB_EXPR: ERB_EXPR2,
14445
- TMPLIT_EXPR: TMPLIT_EXPR2,
14446
- DATA_ATTR: DATA_ATTR2,
14447
- ARIA_ATTR: ARIA_ATTR2,
14448
- IS_SCRIPT_OR_DATA: IS_SCRIPT_OR_DATA2,
14449
- ATTR_WHITESPACE: ATTR_WHITESPACE2,
14450
- CUSTOM_ELEMENT: CUSTOM_ELEMENT2
14451
- } = EXPRESSIONS;
14452
- let {
14453
- IS_ALLOWED_URI: IS_ALLOWED_URI$1
14454
- } = EXPRESSIONS;
14511
+ const MUSTACHE_EXPR$1 = MUSTACHE_EXPR, ERB_EXPR$1 = ERB_EXPR, TMPLIT_EXPR$1 = TMPLIT_EXPR, DATA_ATTR$1 = DATA_ATTR, ARIA_ATTR$1 = ARIA_ATTR, IS_SCRIPT_OR_DATA$1 = IS_SCRIPT_OR_DATA, ATTR_WHITESPACE$1 = ATTR_WHITESPACE, CUSTOM_ELEMENT$1 = CUSTOM_ELEMENT;
14512
+ let IS_ALLOWED_URI$1 = IS_ALLOWED_URI;
14455
14513
  let ALLOWED_TAGS = null;
14456
14514
  const DEFAULT_ALLOWED_TAGS = addToSet({}, [...html$1, ...svg$1, ...svgFilters, ...mathMl$1, ...text$1]);
14457
14515
  let ALLOWED_ATTR = null;
@@ -14478,6 +14536,20 @@ function requireTheme() {
14478
14536
  }));
14479
14537
  let FORBID_TAGS = null;
14480
14538
  let FORBID_ATTR = null;
14539
+ const EXTRA_ELEMENT_HANDLING = Object.seal(create$1(null, {
14540
+ tagCheck: {
14541
+ writable: true,
14542
+ configurable: false,
14543
+ enumerable: true,
14544
+ value: null
14545
+ },
14546
+ attributeCheck: {
14547
+ writable: true,
14548
+ configurable: false,
14549
+ enumerable: true,
14550
+ value: null
14551
+ }
14552
+ }));
14481
14553
  let ALLOW_ARIA_ATTR = true;
14482
14554
  let ALLOW_DATA_ATTR = true;
14483
14555
  let ALLOW_UNKNOWN_PROTOCOLS = false;
@@ -14533,15 +14605,15 @@ function requireTheme() {
14533
14605
  PARSER_MEDIA_TYPE = // eslint-disable-next-line unicorn/prefer-includes
14534
14606
  SUPPORTED_PARSER_MEDIA_TYPES.indexOf(cfg.PARSER_MEDIA_TYPE) === -1 ? DEFAULT_PARSER_MEDIA_TYPE : cfg.PARSER_MEDIA_TYPE;
14535
14607
  transformCaseFunc = PARSER_MEDIA_TYPE === "application/xhtml+xml" ? stringToString : stringToLowerCase;
14536
- ALLOWED_TAGS = objectHasOwnProperty(cfg, "ALLOWED_TAGS") ? addToSet({}, cfg.ALLOWED_TAGS, transformCaseFunc) : DEFAULT_ALLOWED_TAGS;
14537
- ALLOWED_ATTR = objectHasOwnProperty(cfg, "ALLOWED_ATTR") ? addToSet({}, cfg.ALLOWED_ATTR, transformCaseFunc) : DEFAULT_ALLOWED_ATTR;
14538
- ALLOWED_NAMESPACES = objectHasOwnProperty(cfg, "ALLOWED_NAMESPACES") ? addToSet({}, cfg.ALLOWED_NAMESPACES, stringToString) : DEFAULT_ALLOWED_NAMESPACES;
14539
- URI_SAFE_ATTRIBUTES = objectHasOwnProperty(cfg, "ADD_URI_SAFE_ATTR") ? addToSet(clone(DEFAULT_URI_SAFE_ATTRIBUTES), cfg.ADD_URI_SAFE_ATTR, transformCaseFunc) : DEFAULT_URI_SAFE_ATTRIBUTES;
14540
- DATA_URI_TAGS = objectHasOwnProperty(cfg, "ADD_DATA_URI_TAGS") ? addToSet(clone(DEFAULT_DATA_URI_TAGS), cfg.ADD_DATA_URI_TAGS, transformCaseFunc) : DEFAULT_DATA_URI_TAGS;
14541
- FORBID_CONTENTS = objectHasOwnProperty(cfg, "FORBID_CONTENTS") ? addToSet({}, cfg.FORBID_CONTENTS, transformCaseFunc) : DEFAULT_FORBID_CONTENTS;
14542
- FORBID_TAGS = objectHasOwnProperty(cfg, "FORBID_TAGS") ? addToSet({}, cfg.FORBID_TAGS, transformCaseFunc) : clone({});
14543
- FORBID_ATTR = objectHasOwnProperty(cfg, "FORBID_ATTR") ? addToSet({}, cfg.FORBID_ATTR, transformCaseFunc) : clone({});
14544
- USE_PROFILES = objectHasOwnProperty(cfg, "USE_PROFILES") ? cfg.USE_PROFILES : false;
14608
+ ALLOWED_TAGS = objectHasOwnProperty(cfg, "ALLOWED_TAGS") && arrayIsArray(cfg.ALLOWED_TAGS) ? addToSet({}, cfg.ALLOWED_TAGS, transformCaseFunc) : DEFAULT_ALLOWED_TAGS;
14609
+ ALLOWED_ATTR = objectHasOwnProperty(cfg, "ALLOWED_ATTR") && arrayIsArray(cfg.ALLOWED_ATTR) ? addToSet({}, cfg.ALLOWED_ATTR, transformCaseFunc) : DEFAULT_ALLOWED_ATTR;
14610
+ ALLOWED_NAMESPACES = objectHasOwnProperty(cfg, "ALLOWED_NAMESPACES") && arrayIsArray(cfg.ALLOWED_NAMESPACES) ? addToSet({}, cfg.ALLOWED_NAMESPACES, stringToString) : DEFAULT_ALLOWED_NAMESPACES;
14611
+ URI_SAFE_ATTRIBUTES = objectHasOwnProperty(cfg, "ADD_URI_SAFE_ATTR") && arrayIsArray(cfg.ADD_URI_SAFE_ATTR) ? addToSet(clone(DEFAULT_URI_SAFE_ATTRIBUTES), cfg.ADD_URI_SAFE_ATTR, transformCaseFunc) : DEFAULT_URI_SAFE_ATTRIBUTES;
14612
+ DATA_URI_TAGS = objectHasOwnProperty(cfg, "ADD_DATA_URI_TAGS") && arrayIsArray(cfg.ADD_DATA_URI_TAGS) ? addToSet(clone(DEFAULT_DATA_URI_TAGS), cfg.ADD_DATA_URI_TAGS, transformCaseFunc) : DEFAULT_DATA_URI_TAGS;
14613
+ FORBID_CONTENTS = objectHasOwnProperty(cfg, "FORBID_CONTENTS") && arrayIsArray(cfg.FORBID_CONTENTS) ? addToSet({}, cfg.FORBID_CONTENTS, transformCaseFunc) : DEFAULT_FORBID_CONTENTS;
14614
+ FORBID_TAGS = objectHasOwnProperty(cfg, "FORBID_TAGS") && arrayIsArray(cfg.FORBID_TAGS) ? addToSet({}, cfg.FORBID_TAGS, transformCaseFunc) : clone({});
14615
+ FORBID_ATTR = objectHasOwnProperty(cfg, "FORBID_ATTR") && arrayIsArray(cfg.FORBID_ATTR) ? addToSet({}, cfg.FORBID_ATTR, transformCaseFunc) : clone({});
14616
+ USE_PROFILES = objectHasOwnProperty(cfg, "USE_PROFILES") ? cfg.USE_PROFILES && typeof cfg.USE_PROFILES === "object" ? clone(cfg.USE_PROFILES) : cfg.USE_PROFILES : false;
14545
14617
  ALLOW_ARIA_ATTR = cfg.ALLOW_ARIA_ATTR !== false;
14546
14618
  ALLOW_DATA_ATTR = cfg.ALLOW_DATA_ATTR !== false;
14547
14619
  ALLOW_UNKNOWN_PROTOCOLS = cfg.ALLOW_UNKNOWN_PROTOCOLS || false;
@@ -14557,19 +14629,20 @@ function requireTheme() {
14557
14629
  SANITIZE_NAMED_PROPS = cfg.SANITIZE_NAMED_PROPS || false;
14558
14630
  KEEP_CONTENT = cfg.KEEP_CONTENT !== false;
14559
14631
  IN_PLACE = cfg.IN_PLACE || false;
14560
- IS_ALLOWED_URI$1 = cfg.ALLOWED_URI_REGEXP || IS_ALLOWED_URI;
14561
- NAMESPACE = cfg.NAMESPACE || HTML_NAMESPACE;
14562
- MATHML_TEXT_INTEGRATION_POINTS = cfg.MATHML_TEXT_INTEGRATION_POINTS || MATHML_TEXT_INTEGRATION_POINTS;
14563
- HTML_INTEGRATION_POINTS = cfg.HTML_INTEGRATION_POINTS || HTML_INTEGRATION_POINTS;
14564
- CUSTOM_ELEMENT_HANDLING = cfg.CUSTOM_ELEMENT_HANDLING || {};
14565
- if (cfg.CUSTOM_ELEMENT_HANDLING && isRegexOrFunction(cfg.CUSTOM_ELEMENT_HANDLING.tagNameCheck)) {
14566
- CUSTOM_ELEMENT_HANDLING.tagNameCheck = cfg.CUSTOM_ELEMENT_HANDLING.tagNameCheck;
14632
+ IS_ALLOWED_URI$1 = isRegex(cfg.ALLOWED_URI_REGEXP) ? cfg.ALLOWED_URI_REGEXP : IS_ALLOWED_URI;
14633
+ NAMESPACE = typeof cfg.NAMESPACE === "string" ? cfg.NAMESPACE : HTML_NAMESPACE;
14634
+ MATHML_TEXT_INTEGRATION_POINTS = objectHasOwnProperty(cfg, "MATHML_TEXT_INTEGRATION_POINTS") && cfg.MATHML_TEXT_INTEGRATION_POINTS && typeof cfg.MATHML_TEXT_INTEGRATION_POINTS === "object" ? clone(cfg.MATHML_TEXT_INTEGRATION_POINTS) : addToSet({}, ["mi", "mo", "mn", "ms", "mtext"]);
14635
+ HTML_INTEGRATION_POINTS = objectHasOwnProperty(cfg, "HTML_INTEGRATION_POINTS") && cfg.HTML_INTEGRATION_POINTS && typeof cfg.HTML_INTEGRATION_POINTS === "object" ? clone(cfg.HTML_INTEGRATION_POINTS) : addToSet({}, ["annotation-xml"]);
14636
+ const customElementHandling = objectHasOwnProperty(cfg, "CUSTOM_ELEMENT_HANDLING") && cfg.CUSTOM_ELEMENT_HANDLING && typeof cfg.CUSTOM_ELEMENT_HANDLING === "object" ? clone(cfg.CUSTOM_ELEMENT_HANDLING) : create$1(null);
14637
+ CUSTOM_ELEMENT_HANDLING = create$1(null);
14638
+ if (objectHasOwnProperty(customElementHandling, "tagNameCheck") && isRegexOrFunction(customElementHandling.tagNameCheck)) {
14639
+ CUSTOM_ELEMENT_HANDLING.tagNameCheck = customElementHandling.tagNameCheck;
14567
14640
  }
14568
- if (cfg.CUSTOM_ELEMENT_HANDLING && isRegexOrFunction(cfg.CUSTOM_ELEMENT_HANDLING.attributeNameCheck)) {
14569
- CUSTOM_ELEMENT_HANDLING.attributeNameCheck = cfg.CUSTOM_ELEMENT_HANDLING.attributeNameCheck;
14641
+ if (objectHasOwnProperty(customElementHandling, "attributeNameCheck") && isRegexOrFunction(customElementHandling.attributeNameCheck)) {
14642
+ CUSTOM_ELEMENT_HANDLING.attributeNameCheck = customElementHandling.attributeNameCheck;
14570
14643
  }
14571
- if (cfg.CUSTOM_ELEMENT_HANDLING && typeof cfg.CUSTOM_ELEMENT_HANDLING.allowCustomizedBuiltInElements === "boolean") {
14572
- CUSTOM_ELEMENT_HANDLING.allowCustomizedBuiltInElements = cfg.CUSTOM_ELEMENT_HANDLING.allowCustomizedBuiltInElements;
14644
+ if (objectHasOwnProperty(customElementHandling, "allowCustomizedBuiltInElements") && typeof customElementHandling.allowCustomizedBuiltInElements === "boolean") {
14645
+ CUSTOM_ELEMENT_HANDLING.allowCustomizedBuiltInElements = customElementHandling.allowCustomizedBuiltInElements;
14573
14646
  }
14574
14647
  if (SAFE_FOR_TEMPLATES) {
14575
14648
  ALLOW_DATA_ATTR = false;
@@ -14579,7 +14652,7 @@ function requireTheme() {
14579
14652
  }
14580
14653
  if (USE_PROFILES) {
14581
14654
  ALLOWED_TAGS = addToSet({}, text$1);
14582
- ALLOWED_ATTR = [];
14655
+ ALLOWED_ATTR = create$1(null);
14583
14656
  if (USE_PROFILES.html === true) {
14584
14657
  addToSet(ALLOWED_TAGS, html$1);
14585
14658
  addToSet(ALLOWED_ATTR, html);
@@ -14600,27 +14673,43 @@ function requireTheme() {
14600
14673
  addToSet(ALLOWED_ATTR, xml);
14601
14674
  }
14602
14675
  }
14603
- if (cfg.ADD_TAGS) {
14604
- if (ALLOWED_TAGS === DEFAULT_ALLOWED_TAGS) {
14605
- ALLOWED_TAGS = clone(ALLOWED_TAGS);
14676
+ EXTRA_ELEMENT_HANDLING.tagCheck = null;
14677
+ EXTRA_ELEMENT_HANDLING.attributeCheck = null;
14678
+ if (objectHasOwnProperty(cfg, "ADD_TAGS")) {
14679
+ if (typeof cfg.ADD_TAGS === "function") {
14680
+ EXTRA_ELEMENT_HANDLING.tagCheck = cfg.ADD_TAGS;
14681
+ } else if (arrayIsArray(cfg.ADD_TAGS)) {
14682
+ if (ALLOWED_TAGS === DEFAULT_ALLOWED_TAGS) {
14683
+ ALLOWED_TAGS = clone(ALLOWED_TAGS);
14684
+ }
14685
+ addToSet(ALLOWED_TAGS, cfg.ADD_TAGS, transformCaseFunc);
14606
14686
  }
14607
- addToSet(ALLOWED_TAGS, cfg.ADD_TAGS, transformCaseFunc);
14608
14687
  }
14609
- if (cfg.ADD_ATTR) {
14610
- if (ALLOWED_ATTR === DEFAULT_ALLOWED_ATTR) {
14611
- ALLOWED_ATTR = clone(ALLOWED_ATTR);
14688
+ if (objectHasOwnProperty(cfg, "ADD_ATTR")) {
14689
+ if (typeof cfg.ADD_ATTR === "function") {
14690
+ EXTRA_ELEMENT_HANDLING.attributeCheck = cfg.ADD_ATTR;
14691
+ } else if (arrayIsArray(cfg.ADD_ATTR)) {
14692
+ if (ALLOWED_ATTR === DEFAULT_ALLOWED_ATTR) {
14693
+ ALLOWED_ATTR = clone(ALLOWED_ATTR);
14694
+ }
14695
+ addToSet(ALLOWED_ATTR, cfg.ADD_ATTR, transformCaseFunc);
14612
14696
  }
14613
- addToSet(ALLOWED_ATTR, cfg.ADD_ATTR, transformCaseFunc);
14614
14697
  }
14615
- if (cfg.ADD_URI_SAFE_ATTR) {
14698
+ if (objectHasOwnProperty(cfg, "ADD_URI_SAFE_ATTR") && arrayIsArray(cfg.ADD_URI_SAFE_ATTR)) {
14616
14699
  addToSet(URI_SAFE_ATTRIBUTES, cfg.ADD_URI_SAFE_ATTR, transformCaseFunc);
14617
14700
  }
14618
- if (cfg.FORBID_CONTENTS) {
14701
+ if (objectHasOwnProperty(cfg, "FORBID_CONTENTS") && arrayIsArray(cfg.FORBID_CONTENTS)) {
14619
14702
  if (FORBID_CONTENTS === DEFAULT_FORBID_CONTENTS) {
14620
14703
  FORBID_CONTENTS = clone(FORBID_CONTENTS);
14621
14704
  }
14622
14705
  addToSet(FORBID_CONTENTS, cfg.FORBID_CONTENTS, transformCaseFunc);
14623
14706
  }
14707
+ if (objectHasOwnProperty(cfg, "ADD_FORBID_CONTENTS") && arrayIsArray(cfg.ADD_FORBID_CONTENTS)) {
14708
+ if (FORBID_CONTENTS === DEFAULT_FORBID_CONTENTS) {
14709
+ FORBID_CONTENTS = clone(FORBID_CONTENTS);
14710
+ }
14711
+ addToSet(FORBID_CONTENTS, cfg.ADD_FORBID_CONTENTS, transformCaseFunc);
14712
+ }
14624
14713
  if (KEEP_CONTENT) {
14625
14714
  ALLOWED_TAGS["#text"] = true;
14626
14715
  }
@@ -14781,11 +14870,37 @@ function requireTheme() {
14781
14870
  null
14782
14871
  );
14783
14872
  };
14873
+ const _scrubTemplateExpressions = function _scrubTemplateExpressions2(node) {
14874
+ node.normalize();
14875
+ const walker = createNodeIterator.call(
14876
+ node.ownerDocument || node,
14877
+ node,
14878
+ // eslint-disable-next-line no-bitwise
14879
+ NodeFilter.SHOW_TEXT | NodeFilter.SHOW_COMMENT | NodeFilter.SHOW_CDATA_SECTION | NodeFilter.SHOW_PROCESSING_INSTRUCTION,
14880
+ null
14881
+ );
14882
+ let currentNode = walker.nextNode();
14883
+ while (currentNode) {
14884
+ let data = currentNode.data;
14885
+ arrayForEach([MUSTACHE_EXPR$1, ERB_EXPR$1, TMPLIT_EXPR$1], (expr) => {
14886
+ data = stringReplace(data, expr, " ");
14887
+ });
14888
+ currentNode.data = data;
14889
+ currentNode = walker.nextNode();
14890
+ }
14891
+ };
14784
14892
  const _isClobbered = function _isClobbered2(element2) {
14785
14893
  return element2 instanceof HTMLFormElement && (typeof element2.nodeName !== "string" || typeof element2.textContent !== "string" || typeof element2.removeChild !== "function" || !(element2.attributes instanceof NamedNodeMap) || typeof element2.removeAttribute !== "function" || typeof element2.setAttribute !== "function" || typeof element2.namespaceURI !== "string" || typeof element2.insertBefore !== "function" || typeof element2.hasChildNodes !== "function");
14786
14894
  };
14787
14895
  const _isNode = function _isNode2(value2) {
14788
- return typeof Node === "function" && value2 instanceof Node;
14896
+ if (!getNodeType || typeof value2 !== "object" || value2 === null) {
14897
+ return false;
14898
+ }
14899
+ try {
14900
+ return typeof getNodeType(value2) === "number";
14901
+ } catch (_) {
14902
+ return false;
14903
+ }
14789
14904
  };
14790
14905
  function _executeHooks(hooks2, currentNode, data) {
14791
14906
  arrayForEach(hooks2, (hook) => {
@@ -14808,6 +14923,10 @@ function requireTheme() {
14808
14923
  _forceRemove(currentNode);
14809
14924
  return true;
14810
14925
  }
14926
+ if (SAFE_FOR_XML && currentNode.namespaceURI === HTML_NAMESPACE && tagName === "style" && _isNode(currentNode.firstElementChild)) {
14927
+ _forceRemove(currentNode);
14928
+ return true;
14929
+ }
14811
14930
  if (currentNode.nodeType === NODE_TYPE.progressingInstruction) {
14812
14931
  _forceRemove(currentNode);
14813
14932
  return true;
@@ -14816,7 +14935,7 @@ function requireTheme() {
14816
14935
  _forceRemove(currentNode);
14817
14936
  return true;
14818
14937
  }
14819
- if (!ALLOWED_TAGS[tagName] || FORBID_TAGS[tagName]) {
14938
+ if (FORBID_TAGS[tagName] || !(EXTRA_ELEMENT_HANDLING.tagCheck instanceof Function && EXTRA_ELEMENT_HANDLING.tagCheck(tagName)) && !ALLOWED_TAGS[tagName]) {
14820
14939
  if (!FORBID_TAGS[tagName] && _isBasicCustomElement(tagName)) {
14821
14940
  if (CUSTOM_ELEMENT_HANDLING.tagNameCheck instanceof RegExp && regExpTest(CUSTOM_ELEMENT_HANDLING.tagNameCheck, tagName)) {
14822
14941
  return false;
@@ -14832,7 +14951,6 @@ function requireTheme() {
14832
14951
  const childCount = childNodes.length;
14833
14952
  for (let i = childCount - 1; i >= 0; --i) {
14834
14953
  const childClone = cloneNode(childNodes[i], true);
14835
- childClone.__removalCount = (currentNode.__removalCount || 0) + 1;
14836
14954
  parentNode2.insertBefore(childClone, getNextSibling(currentNode));
14837
14955
  }
14838
14956
  }
@@ -14850,7 +14968,7 @@ function requireTheme() {
14850
14968
  }
14851
14969
  if (SAFE_FOR_TEMPLATES && currentNode.nodeType === NODE_TYPE.text) {
14852
14970
  content = currentNode.textContent;
14853
- arrayForEach([MUSTACHE_EXPR2, ERB_EXPR2, TMPLIT_EXPR2], (expr) => {
14971
+ arrayForEach([MUSTACHE_EXPR$1, ERB_EXPR$1, TMPLIT_EXPR$1], (expr) => {
14854
14972
  content = stringReplace(content, expr, " ");
14855
14973
  });
14856
14974
  if (currentNode.textContent !== content) {
@@ -14864,17 +14982,21 @@ function requireTheme() {
14864
14982
  return false;
14865
14983
  };
14866
14984
  const _isValidAttribute = function _isValidAttribute2(lcTag, lcName, value2) {
14985
+ if (FORBID_ATTR[lcName]) {
14986
+ return false;
14987
+ }
14867
14988
  if (SANITIZE_DOM && (lcName === "id" || lcName === "name") && (value2 in document2 || value2 in formElement)) {
14868
14989
  return false;
14869
14990
  }
14870
- if (ALLOW_DATA_ATTR && !FORBID_ATTR[lcName] && regExpTest(DATA_ATTR2, lcName)) ;
14871
- else if (ALLOW_ARIA_ATTR && regExpTest(ARIA_ATTR2, lcName)) ;
14872
- else if (!ALLOWED_ATTR[lcName] || FORBID_ATTR[lcName]) {
14991
+ const nameIsPermitted = ALLOWED_ATTR[lcName] || EXTRA_ELEMENT_HANDLING.attributeCheck instanceof Function && EXTRA_ELEMENT_HANDLING.attributeCheck(lcName, lcTag);
14992
+ if (ALLOW_DATA_ATTR && !FORBID_ATTR[lcName] && regExpTest(DATA_ATTR$1, lcName)) ;
14993
+ else if (ALLOW_ARIA_ATTR && regExpTest(ARIA_ATTR$1, lcName)) ;
14994
+ else if (!nameIsPermitted || FORBID_ATTR[lcName]) {
14873
14995
  if (
14874
14996
  // First condition does a very basic check if a) it's basically a valid custom element tagname AND
14875
14997
  // b) if the tagName passes whatever the user has configured for CUSTOM_ELEMENT_HANDLING.tagNameCheck
14876
14998
  // and c) if the attribute name passes whatever the user has configured for CUSTOM_ELEMENT_HANDLING.attributeNameCheck
14877
- _isBasicCustomElement(lcTag) && (CUSTOM_ELEMENT_HANDLING.tagNameCheck instanceof RegExp && regExpTest(CUSTOM_ELEMENT_HANDLING.tagNameCheck, lcTag) || CUSTOM_ELEMENT_HANDLING.tagNameCheck instanceof Function && CUSTOM_ELEMENT_HANDLING.tagNameCheck(lcTag)) && (CUSTOM_ELEMENT_HANDLING.attributeNameCheck instanceof RegExp && regExpTest(CUSTOM_ELEMENT_HANDLING.attributeNameCheck, lcName) || CUSTOM_ELEMENT_HANDLING.attributeNameCheck instanceof Function && CUSTOM_ELEMENT_HANDLING.attributeNameCheck(lcName)) || // Alternative, second condition checks if it's an `is`-attribute, AND
14999
+ _isBasicCustomElement(lcTag) && (CUSTOM_ELEMENT_HANDLING.tagNameCheck instanceof RegExp && regExpTest(CUSTOM_ELEMENT_HANDLING.tagNameCheck, lcTag) || CUSTOM_ELEMENT_HANDLING.tagNameCheck instanceof Function && CUSTOM_ELEMENT_HANDLING.tagNameCheck(lcTag)) && (CUSTOM_ELEMENT_HANDLING.attributeNameCheck instanceof RegExp && regExpTest(CUSTOM_ELEMENT_HANDLING.attributeNameCheck, lcName) || CUSTOM_ELEMENT_HANDLING.attributeNameCheck instanceof Function && CUSTOM_ELEMENT_HANDLING.attributeNameCheck(lcName, lcTag)) || // Alternative, second condition checks if it's an `is`-attribute, AND
14878
15000
  // the value passes whatever the user has configured for CUSTOM_ELEMENT_HANDLING.tagNameCheck
14879
15001
  lcName === "is" && CUSTOM_ELEMENT_HANDLING.allowCustomizedBuiltInElements && (CUSTOM_ELEMENT_HANDLING.tagNameCheck instanceof RegExp && regExpTest(CUSTOM_ELEMENT_HANDLING.tagNameCheck, value2) || CUSTOM_ELEMENT_HANDLING.tagNameCheck instanceof Function && CUSTOM_ELEMENT_HANDLING.tagNameCheck(value2))
14880
15002
  ) ;
@@ -14882,22 +15004,21 @@ function requireTheme() {
14882
15004
  return false;
14883
15005
  }
14884
15006
  } else if (URI_SAFE_ATTRIBUTES[lcName]) ;
14885
- else if (regExpTest(IS_ALLOWED_URI$1, stringReplace(value2, ATTR_WHITESPACE2, ""))) ;
15007
+ else if (regExpTest(IS_ALLOWED_URI$1, stringReplace(value2, ATTR_WHITESPACE$1, ""))) ;
14886
15008
  else if ((lcName === "src" || lcName === "xlink:href" || lcName === "href") && lcTag !== "script" && stringIndexOf(value2, "data:") === 0 && DATA_URI_TAGS[lcTag]) ;
14887
- else if (ALLOW_UNKNOWN_PROTOCOLS && !regExpTest(IS_SCRIPT_OR_DATA2, stringReplace(value2, ATTR_WHITESPACE2, ""))) ;
15009
+ else if (ALLOW_UNKNOWN_PROTOCOLS && !regExpTest(IS_SCRIPT_OR_DATA$1, stringReplace(value2, ATTR_WHITESPACE$1, ""))) ;
14888
15010
  else if (value2) {
14889
15011
  return false;
14890
15012
  } else ;
14891
15013
  return true;
14892
15014
  };
15015
+ const RESERVED_CUSTOM_ELEMENT_NAMES = addToSet({}, ["annotation-xml", "color-profile", "font-face", "font-face-format", "font-face-name", "font-face-src", "font-face-uri", "missing-glyph"]);
14893
15016
  const _isBasicCustomElement = function _isBasicCustomElement2(tagName) {
14894
- return tagName !== "annotation-xml" && stringMatch(tagName, CUSTOM_ELEMENT2);
15017
+ return !RESERVED_CUSTOM_ELEMENT_NAMES[stringToLowerCase(tagName)] && regExpTest(CUSTOM_ELEMENT$1, tagName);
14895
15018
  };
14896
15019
  const _sanitizeAttributes = function _sanitizeAttributes2(currentNode) {
14897
15020
  _executeHooks(hooks.beforeSanitizeAttributes, currentNode, null);
14898
- const {
14899
- attributes
14900
- } = currentNode;
15021
+ const attributes = currentNode.attributes;
14901
15022
  if (!attributes || _isClobbered(currentNode)) {
14902
15023
  return;
14903
15024
  }
@@ -14911,11 +15032,7 @@ function requireTheme() {
14911
15032
  let l2 = attributes.length;
14912
15033
  while (l2--) {
14913
15034
  const attr = attributes[l2];
14914
- const {
14915
- name: name2,
14916
- namespaceURI,
14917
- value: attrValue
14918
- } = attr;
15035
+ const name2 = attr.name, namespaceURI = attr.namespaceURI, attrValue = attr.value;
14919
15036
  const lcName = transformCaseFunc(name2);
14920
15037
  const initValue = attrValue;
14921
15038
  let value2 = name2 === "value" ? initValue : stringTrim(initValue);
@@ -14925,11 +15042,15 @@ function requireTheme() {
14925
15042
  hookEvent.forceKeepAttr = void 0;
14926
15043
  _executeHooks(hooks.uponSanitizeAttribute, currentNode, hookEvent);
14927
15044
  value2 = hookEvent.attrValue;
14928
- if (SANITIZE_NAMED_PROPS && (lcName === "id" || lcName === "name")) {
15045
+ if (SANITIZE_NAMED_PROPS && (lcName === "id" || lcName === "name") && stringIndexOf(value2, SANITIZE_NAMED_PROPS_PREFIX) !== 0) {
14929
15046
  _removeAttribute(name2, currentNode);
14930
15047
  value2 = SANITIZE_NAMED_PROPS_PREFIX + value2;
14931
15048
  }
14932
- if (SAFE_FOR_XML && regExpTest(/((--!?|])>)|<\/(style|title)/i, value2)) {
15049
+ if (SAFE_FOR_XML && regExpTest(/((--!?|])>)|<\/(style|script|title|xmp|textarea|noscript|iframe|noembed|noframes)/i, value2)) {
15050
+ _removeAttribute(name2, currentNode);
15051
+ continue;
15052
+ }
15053
+ if (lcName === "attributename" && stringMatch(value2, "href")) {
14933
15054
  _removeAttribute(name2, currentNode);
14934
15055
  continue;
14935
15056
  }
@@ -14945,7 +15066,7 @@ function requireTheme() {
14945
15066
  continue;
14946
15067
  }
14947
15068
  if (SAFE_FOR_TEMPLATES) {
14948
- arrayForEach([MUSTACHE_EXPR2, ERB_EXPR2, TMPLIT_EXPR2], (expr) => {
15069
+ arrayForEach([MUSTACHE_EXPR$1, ERB_EXPR$1, TMPLIT_EXPR$1], (expr) => {
14949
15070
  value2 = stringReplace(value2, expr, " ");
14950
15071
  });
14951
15072
  }
@@ -14988,7 +15109,7 @@ function requireTheme() {
14988
15109
  }
14989
15110
  _executeHooks(hooks.afterSanitizeAttributes, currentNode, null);
14990
15111
  };
14991
- const _sanitizeShadowDOM = function _sanitizeShadowDOM2(fragment) {
15112
+ const _sanitizeShadowDOM2 = function _sanitizeShadowDOM(fragment) {
14992
15113
  let shadowNode = null;
14993
15114
  const shadowIterator = _createNodeIterator(fragment);
14994
15115
  _executeHooks(hooks.beforeSanitizeShadowDOM, fragment, null);
@@ -15002,6 +15123,24 @@ function requireTheme() {
15002
15123
  }
15003
15124
  _executeHooks(hooks.afterSanitizeShadowDOM, fragment, null);
15004
15125
  };
15126
+ const _sanitizeAttachedShadowRoots2 = function _sanitizeAttachedShadowRoots(root) {
15127
+ if (root.nodeType === NODE_TYPE.element && root.shadowRoot instanceof DocumentFragment) {
15128
+ const sr = root.shadowRoot;
15129
+ _sanitizeAttachedShadowRoots2(sr);
15130
+ _sanitizeShadowDOM2(sr);
15131
+ }
15132
+ const childNodes = root.childNodes;
15133
+ if (!childNodes) {
15134
+ return;
15135
+ }
15136
+ const snapshot2 = [];
15137
+ arrayForEach(childNodes, (child2) => {
15138
+ arrayPush(snapshot2, child2);
15139
+ });
15140
+ for (const child2 of snapshot2) {
15141
+ _sanitizeAttachedShadowRoots2(child2);
15142
+ }
15143
+ };
15005
15144
  DOMPurify.sanitize = function(dirty) {
15006
15145
  let cfg = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : {};
15007
15146
  let body2 = null;
@@ -15013,13 +15152,9 @@ function requireTheme() {
15013
15152
  dirty = "<!-->";
15014
15153
  }
15015
15154
  if (typeof dirty !== "string" && !_isNode(dirty)) {
15016
- if (typeof dirty.toString === "function") {
15017
- dirty = dirty.toString();
15018
- if (typeof dirty !== "string") {
15019
- throw typeErrorCreate("dirty is not a string, aborting");
15020
- }
15021
- } else {
15022
- throw typeErrorCreate("toString is not a function");
15155
+ dirty = stringifyValue(dirty);
15156
+ if (typeof dirty !== "string") {
15157
+ throw typeErrorCreate("dirty is not a string, aborting");
15023
15158
  }
15024
15159
  }
15025
15160
  if (!DOMPurify.isSupported) {
@@ -15033,13 +15168,15 @@ function requireTheme() {
15033
15168
  IN_PLACE = false;
15034
15169
  }
15035
15170
  if (IN_PLACE) {
15036
- if (dirty.nodeName) {
15037
- const tagName = transformCaseFunc(dirty.nodeName);
15171
+ const nn = dirty.nodeName;
15172
+ if (typeof nn === "string") {
15173
+ const tagName = transformCaseFunc(nn);
15038
15174
  if (!ALLOWED_TAGS[tagName] || FORBID_TAGS[tagName]) {
15039
15175
  throw typeErrorCreate("root node is forbidden and cannot be sanitized in-place");
15040
15176
  }
15041
15177
  }
15042
- } else if (dirty instanceof Node) {
15178
+ _sanitizeAttachedShadowRoots2(dirty);
15179
+ } else if (_isNode(dirty)) {
15043
15180
  body2 = _initDocument("<!---->");
15044
15181
  importedNode = body2.ownerDocument.importNode(dirty, true);
15045
15182
  if (importedNode.nodeType === NODE_TYPE.element && importedNode.nodeName === "BODY") {
@@ -15049,6 +15186,7 @@ function requireTheme() {
15049
15186
  } else {
15050
15187
  body2.appendChild(importedNode);
15051
15188
  }
15189
+ _sanitizeAttachedShadowRoots2(importedNode);
15052
15190
  } else {
15053
15191
  if (!RETURN_DOM && !SAFE_FOR_TEMPLATES && !WHOLE_DOCUMENT && // eslint-disable-next-line unicorn/prefer-includes
15054
15192
  dirty.indexOf("<") === -1) {
@@ -15067,13 +15205,19 @@ function requireTheme() {
15067
15205
  _sanitizeElements(currentNode);
15068
15206
  _sanitizeAttributes(currentNode);
15069
15207
  if (currentNode.content instanceof DocumentFragment) {
15070
- _sanitizeShadowDOM(currentNode.content);
15208
+ _sanitizeShadowDOM2(currentNode.content);
15071
15209
  }
15072
15210
  }
15073
15211
  if (IN_PLACE) {
15212
+ if (SAFE_FOR_TEMPLATES) {
15213
+ _scrubTemplateExpressions(dirty);
15214
+ }
15074
15215
  return dirty;
15075
15216
  }
15076
15217
  if (RETURN_DOM) {
15218
+ if (SAFE_FOR_TEMPLATES) {
15219
+ _scrubTemplateExpressions(body2);
15220
+ }
15077
15221
  if (RETURN_DOM_FRAGMENT) {
15078
15222
  returnNode = createDocumentFragment.call(body2.ownerDocument);
15079
15223
  while (body2.firstChild) {
@@ -15092,7 +15236,7 @@ function requireTheme() {
15092
15236
  serializedHTML = "<!DOCTYPE " + body2.ownerDocument.doctype.name + ">\n" + serializedHTML;
15093
15237
  }
15094
15238
  if (SAFE_FOR_TEMPLATES) {
15095
- arrayForEach([MUSTACHE_EXPR2, ERB_EXPR2, TMPLIT_EXPR2], (expr) => {
15239
+ arrayForEach([MUSTACHE_EXPR$1, ERB_EXPR$1, TMPLIT_EXPR$1], (expr) => {
15096
15240
  serializedHTML = stringReplace(serializedHTML, expr, " ");
15097
15241
  });
15098
15242
  }
@@ -16237,7 +16381,8 @@ function requireTheme() {
16237
16381
  optionString("dropAreaLabel"),
16238
16382
  optionString("buttonLabel"),
16239
16383
  optionString("allowedFileTypes"),
16240
- optionArrayOf("allowedFileExtensions", string)
16384
+ optionArrayOf("allowedFileExtensions", string),
16385
+ defaultedFunction("onInvalidFiles", () => Promise.resolve())
16241
16386
  ]);
16242
16387
  const dropZoneSchema = objOf(dropZoneFields);
16243
16388
  const dropZoneDataProcessor = arrOfVal();
@@ -20048,8 +20193,14 @@ function requireTheme() {
20048
20193
  };
20049
20194
  const handleFiles = (component, files) => {
20050
20195
  if (files) {
20051
- Representing.setValue(component, filterByExtension(files, providersBackstage, spec.allowedFileExtensions));
20196
+ const filteredFiles = filterByExtension(files, providersBackstage, spec.allowedFileExtensions);
20197
+ Representing.setValue(component, filteredFiles);
20052
20198
  emitWith(component, formChangeEvent, { name: spec.name });
20199
+ if (filteredFiles.length === 0) {
20200
+ spec.onInvalidFiles().finally(() => {
20201
+ component.element.dom.focus();
20202
+ }).catch(noop);
20203
+ }
20053
20204
  }
20054
20205
  };
20055
20206
  const memInput = record({
@@ -23951,7 +24102,7 @@ function requireTheme() {
23951
24102
  });
23952
24103
  };
23953
24104
  const renderToolbarGroupCommon = (toolbarGroup) => {
23954
- const attributes = toolbarGroup.label.isNone() ? toolbarGroup.title.fold(() => ({}), (title2) => ({ attributes: { "aria-label": title2 } })) : toolbarGroup.label.fold(() => ({}), (label2) => ({ attributes: { "aria-label": label2 } }));
24105
+ const attributes = toolbarGroup.label.or(toolbarGroup.title).fold(() => ({}), (label2) => ({ attributes: { "aria-label": label2 } }));
23955
24106
  return {
23956
24107
  dom: {
23957
24108
  tag: "div",
@@ -24516,10 +24667,14 @@ function requireTheme() {
24516
24667
  SilverMenubar.focus(menubar);
24517
24668
  });
24518
24669
  },
24519
- setViews: (comp, viewConfigs) => {
24670
+ setViews: (comp, viewConfigs, showView) => {
24520
24671
  parts$g.getPart(comp, detail, "viewWrapper").each((wrapper) => {
24521
24672
  ViewWrapper.setViews(wrapper, viewConfigs);
24522
24673
  });
24674
+ const configKey = showView?.toLowerCase();
24675
+ if (isString(configKey) && has$2(viewConfigs, configKey)) {
24676
+ apis.toggleView(comp, configKey);
24677
+ }
24523
24678
  },
24524
24679
  toggleView: (comp, name2) => {
24525
24680
  return parts$g.getPart(comp, detail, "viewWrapper").exists((wrapper) => ViewWrapper.toggleView(wrapper, () => apis.showMainView(comp), () => apis.hideMainView(comp), name2));
@@ -24777,8 +24932,8 @@ function requireTheme() {
24777
24932
  focusToolbar: (apis, comp) => {
24778
24933
  apis.focusToolbar(comp);
24779
24934
  },
24780
- setViews: (apis, comp, views) => {
24781
- apis.setViews(comp, views);
24935
+ setViews: (apis, comp, views, showView) => {
24936
+ apis.setViews(comp, views, showView);
24782
24937
  },
24783
24938
  toggleView: (apis, comp, name2) => {
24784
24939
  return apis.toggleView(comp, name2);
@@ -24795,7 +24950,7 @@ function requireTheme() {
24795
24950
  view: { title: "View", items: "code suggestededits revisionhistory | visualaid visualchars visualblocks | spellchecker | preview fullscreen | showcomments" },
24796
24951
  insert: { title: "Insert", items: "image video link media addcomment pageembed inserttemplate codesample inserttable accordion math | charmap emoticons hr | pagebreak nonbreaking anchor tableofcontents footnotes | mergetags | insertdatetime" },
24797
24952
  format: { title: "Format", items: "bold italic underline strikethrough superscript subscript codeformat | styles blocks fontfamily fontsize align lineheight | forecolor backcolor | language | removeformat" },
24798
- tools: { title: "Tools", items: "aidialog aishortcuts | spellchecker spellcheckerlanguage | autocorrect capitalization | a11ycheck code typography wordcount addtemplate" },
24953
+ tools: { title: "Tools", items: "tinymceai-chat tinymceai-review tinymceai-quickactions aidialog aishortcuts | spellchecker spellcheckerlanguage | autocorrect capitalization | a11ycheck code typography wordcount addtemplate" },
24799
24954
  table: { title: "Table", items: "inserttable | cell row column | advtablesort | tableprops deletetable" },
24800
24955
  help: { title: "Help", items: "help" }
24801
24956
  };
@@ -24926,22 +25081,17 @@ function requireTheme() {
24926
25081
  const loadUiContentCSS = (editor, isInline, skinUrl) => {
24927
25082
  const filenameBase = isInline ? "content.inline" : "content";
24928
25083
  const decision = determineCSSDecision(editor, filenameBase, skinUrl);
25084
+ if (!skinUrl) {
25085
+ return Promise.resolve();
25086
+ }
24929
25087
  switch (decision._kind) {
24930
25088
  case "load-raw":
24931
- const { key, css } = decision;
24932
- if (isInline) {
24933
- loadRawCss(editor, key, css, editor.ui.styleSheetLoader);
24934
- } else {
24935
- editor.on("PostRender", () => {
24936
- loadRawCss(editor, key, css, editor.dom.styleSheetLoader);
24937
- });
24938
- }
25089
+ const { key } = decision;
25090
+ editor.contentCSS.push(key);
24939
25091
  return Promise.resolve();
24940
25092
  case "load-stylesheet":
24941
25093
  const { url: url2 } = decision;
24942
- if (skinUrl) {
24943
- editor.contentCSS.push(url2);
24944
- }
25094
+ editor.contentCSS.push(url2);
24945
25095
  return Promise.resolve();
24946
25096
  default:
24947
25097
  return Promise.resolve();
@@ -26186,7 +26336,7 @@ function requireTheme() {
26186
26336
  },
26187
26337
  {
26188
26338
  name: "ai",
26189
- items: ["aidialog", "aishortcuts"]
26339
+ items: ["tinymceai-chat", "tinymceai-review", "tinymceai-quickactions", "aidialog", "aishortcuts"]
26190
26340
  },
26191
26341
  {
26192
26342
  name: "styles",
@@ -26394,8 +26544,8 @@ function requireTheme() {
26394
26544
  attachUiMotherships(editor, uiRoot, uiRefs);
26395
26545
  editor.on("PostRender", () => {
26396
26546
  OuterContainer.setSidebar(outerContainer, rawUiConfig.sidebar, getSidebarShow(editor));
26397
- OuterContainer.setViews(outerContainer, rawUiConfig.views);
26398
- });
26547
+ OuterContainer.setViews(outerContainer, rawUiConfig.views, getViewShow(editor));
26548
+ }, true);
26399
26549
  editor.on("SkinLoaded", () => {
26400
26550
  setToolbar(editor, uiRefs, rawUiConfig, backstage);
26401
26551
  lastToolbarWidth.set(editor.getWin().innerWidth);
@@ -28826,7 +28976,8 @@ function requireTheme() {
28826
28976
  tag: "div",
28827
28977
  classes: ["tox-statusbar__path"],
28828
28978
  attributes: {
28829
- role: "navigation"
28979
+ "role": "group",
28980
+ "aria-label": providersBackstage.translate("Element Path")
28830
28981
  }
28831
28982
  },
28832
28983
  behaviours: derive$1([
@@ -29965,6 +30116,7 @@ function requireTheme() {
29965
30116
  const blockerBackdropClass = blockerClass + "__backdrop";
29966
30117
  const scrollLockClass = dialogClass + "__disable-scroll";
29967
30118
  return ModalDialog.sketch({
30119
+ role: spec.role,
29968
30120
  lazySink: spec.lazySink,
29969
30121
  onEscape: (comp) => {
29970
30122
  spec.onEscape(comp);
@@ -30218,7 +30370,22 @@ function requireTheme() {
30218
30370
  }
30219
30371
  return acc;
30220
30372
  }, {});
30221
- const initCommonEvents = (fireApiEvent, extras) => [
30373
+ const focusFirstTabbable = (getSink2, component) => {
30374
+ const focusIn2 = () => component.getSystem().isConnected() ? Keying.focusIn(component) : void 0;
30375
+ const isDisabled2 = (focused) => has$1(focused, "disabled") || getOpt(focused, "aria-disabled").exists((val) => val === "true");
30376
+ const rootNode = getRootNode(component.element);
30377
+ const current = active$1(rootNode);
30378
+ active$1(rootNode).fold(focusIn2, (focused) => {
30379
+ if (isDisabled2(focused)) {
30380
+ focusIn2();
30381
+ } else if (current.exists((cur) => contains(focused, cur) && isDisabled2(cur))) {
30382
+ focusIn2();
30383
+ } else {
30384
+ getSink2().toOptional().filter((sink) => !contains(sink.element, focused)).each(focusIn2);
30385
+ }
30386
+ });
30387
+ };
30388
+ const initCommonEvents = (fireApiEvent, extras, getSink2) => [
30222
30389
  // When focus moves onto a tab-placeholder, skip to the next thing in the tab sequence
30223
30390
  runWithTarget(focusin(), onFocus),
30224
30391
  // TODO: Test if disabled first.
@@ -30234,10 +30401,13 @@ function requireTheme() {
30234
30401
  spec.onCancel(api2);
30235
30402
  emit(self2, formCloseEvent);
30236
30403
  }),
30237
- run$1(formUnblockEvent, (_c, _se) => extras.onUnblock()),
30404
+ run$1(formUnblockEvent, (component, _se) => {
30405
+ extras.onUnblock();
30406
+ focusFirstTabbable(getSink2, component);
30407
+ }),
30238
30408
  run$1(formBlockEvent, (_c, se) => extras.onBlock(se.event))
30239
30409
  ];
30240
- const initUrlDialog = (getInstanceApi, extras) => {
30410
+ const initUrlDialog = (getInstanceApi, extras, getSink2) => {
30241
30411
  const fireApiEvent = (eventName, f2) => run$1(eventName, (c, se) => {
30242
30412
  withSpec(c, (spec, _c) => {
30243
30413
  f2(getInstanceApi(), spec, se.event, c);
@@ -30249,7 +30419,7 @@ function requireTheme() {
30249
30419
  });
30250
30420
  };
30251
30421
  return [
30252
- ...initCommonEvents(fireApiEvent, extras),
30422
+ ...initCommonEvents(fireApiEvent, extras, getSink2),
30253
30423
  fireApiEvent(formActionEvent, (api2, spec, event) => {
30254
30424
  spec.onAction(api2, { name: event.name });
30255
30425
  })
@@ -30267,26 +30437,14 @@ function requireTheme() {
30267
30437
  });
30268
30438
  };
30269
30439
  return [
30270
- ...initCommonEvents(fireApiEvent, extras),
30440
+ ...initCommonEvents(fireApiEvent, extras, getSink2),
30271
30441
  fireApiEvent(formSubmitEvent, (api2, spec) => spec.onSubmit(api2)),
30272
30442
  fireApiEvent(formChangeEvent, (api2, spec, event) => {
30273
30443
  spec.onChange(api2, { name: event.name });
30274
30444
  }),
30275
30445
  fireApiEvent(formActionEvent, (api2, spec, event, component) => {
30276
- const focusIn2 = () => component.getSystem().isConnected() ? Keying.focusIn(component) : void 0;
30277
- const isDisabled2 = (focused) => has$1(focused, "disabled") || getOpt(focused, "aria-disabled").exists((val) => val === "true");
30278
- const rootNode = getRootNode(component.element);
30279
- const current = active$1(rootNode);
30280
30446
  spec.onAction(api2, { name: event.name, value: event.value });
30281
- active$1(rootNode).fold(focusIn2, (focused) => {
30282
- if (isDisabled2(focused)) {
30283
- focusIn2();
30284
- } else if (current.exists((cur) => contains(focused, cur) && isDisabled2(cur))) {
30285
- focusIn2();
30286
- } else {
30287
- getSink2().toOptional().filter((sink) => !contains(sink.element, focused)).each(focusIn2);
30288
- }
30289
- });
30447
+ focusFirstTabbable(getSink2, component);
30290
30448
  }),
30291
30449
  fireApiEvent(formTabChangeEvent, (api2, spec, event) => {
30292
30450
  spec.onTabChange(api2, { newTabName: event.name, oldTabName: event.oldName });
@@ -30705,7 +30863,7 @@ function requireTheme() {
30705
30863
  return Optional.some(renderModalFooter({ buttons }, dialogId, backstage));
30706
30864
  }
30707
30865
  });
30708
- const dialogEvents = initUrlDialog(() => instanceApi, getEventExtras(() => dialog, backstage.shared.providers, extra));
30866
+ const dialogEvents = initUrlDialog(() => instanceApi, getEventExtras(() => dialog, backstage.shared.providers, extra), backstage.shared.getSink);
30709
30867
  const styles = {
30710
30868
  ...internalDialog.height.fold(() => ({}), (height2) => ({ "height": height2 + "px", "max-height": height2 + "px" })),
30711
30869
  ...internalDialog.width.fold(() => ({}), (width2) => ({ "width": width2 + "px", "max-width": width2 + "px" }))
@@ -30793,6 +30951,7 @@ function requireTheme() {
30793
30951
  const titleSpec = pUntitled();
30794
30952
  const closeSpec = pClose(closeDialog, sharedBackstage.providers);
30795
30953
  const alertDialog = build$1(renderDialog$1({
30954
+ role: "alertdialog",
30796
30955
  lazySink: () => sharedBackstage.getSink(),
30797
30956
  header: hiddenHeader(titleSpec, closeSpec),
30798
30957
  body: pBodyMessage(message, sharedBackstage.providers),
@@ -30804,7 +30963,11 @@ function requireTheme() {
30804
30963
  extraBehaviours: [],
30805
30964
  extraStyles: {},
30806
30965
  dialogEvents: [
30807
- run$1(formCancelEvent, closeDialog)
30966
+ run$1(formCancelEvent, closeDialog),
30967
+ runOnAttached((c) => {
30968
+ const bodyElm = ModalDialog.getBody(c);
30969
+ describedBy(c.element, bodyElm.element);
30970
+ })
30808
30971
  ],
30809
30972
  eventOrder: {}
30810
30973
  }));
@@ -30846,6 +31009,7 @@ function requireTheme() {
30846
31009
  const titleSpec = pUntitled();
30847
31010
  const closeSpec = pClose(() => closeDialog(false), sharedBackstage.providers);
30848
31011
  const confirmDialog = build$1(renderDialog$1({
31012
+ role: "alertdialog",
30849
31013
  lazySink: () => sharedBackstage.getSink(),
30850
31014
  header: hiddenHeader(titleSpec, closeSpec),
30851
31015
  body: pBodyMessage(message, sharedBackstage.providers),
@@ -30859,7 +31023,11 @@ function requireTheme() {
30859
31023
  extraStyles: {},
30860
31024
  dialogEvents: [
30861
31025
  run$1(formCancelEvent, () => closeDialog(false)),
30862
- run$1(formSubmitEvent, () => closeDialog(true))
31026
+ run$1(formSubmitEvent, () => closeDialog(true)),
31027
+ runOnAttached((c) => {
31028
+ const bodyElm = ModalDialog.getBody(c);
31029
+ describedBy(c.element, bodyElm.element);
31030
+ })
30863
31031
  ],
30864
31032
  eventOrder: {}
30865
31033
  }));
@@ -31172,11 +31340,13 @@ function requireTheme() {
31172
31340
  const getPromotionElement = () => {
31173
31341
  return descendant(SugarElement.fromDom(editor.getContainer()), ".tox-promotion").map((promotion) => promotion.dom).getOrNull();
31174
31342
  };
31343
+ const getSinkElement = (type2) => type2 === "dialog" ? dialogs.getMothership().element.dom : popups.getMothership().element.dom;
31175
31344
  return {
31176
31345
  renderUI,
31177
31346
  getWindowManagerImpl: constant$1(windowMgr),
31178
31347
  getNotificationManagerImpl,
31179
- getPromotionElement
31348
+ getPromotionElement,
31349
+ getSinkElement
31180
31350
  };
31181
31351
  });
31182
31352
  };
@@ -31200,4 +31370,4 @@ const index$1 = /* @__PURE__ */ _mergeNamespaces({
31200
31370
  export {
31201
31371
  index$1 as i
31202
31372
  };
31203
- //# sourceMappingURL=index-G1cAlO5C.js.map
31373
+ //# sourceMappingURL=index-1G1T4Qrv.js.map