@pie-element/mc-populated-blank 0.3.3-next.20261007184841 → 0.3.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.
@@ -1 +1 @@
1
- {"version":3,"file":"McPopulatedBlank-C0cMqim4.js","names":["e","e","t","n","e","t"],"sources":["../../../../../node_modules/.bun/dompurify@3.4.16/node_modules/dompurify/dist/purify.es.mjs","../../../../shared/utils/dist/index.js","../../src/delivery/computeAudioMode.ts","../../../../shared/translator/dist/en.js","../../../../shared/translator/dist/es.js","../../../../../node_modules/.bun/i18next@25.10.10+1fb4c65d43e298b9/node_modules/i18next/dist/esm/i18next.js","../../../../shared/translator/dist/index.js","../../src/delivery/i18n.ts","../../src/delivery/AudioPlayer.svelte","../../src/delivery/ClozeMarker.svelte","../../src/delivery/ChoiceRow.svelte","../../src/delivery/TeacherInstructions.svelte","../../src/delivery/computeChoiceCorrectness.ts","../../src/delivery/computeLayoutProfile.ts","../../src/delivery/computeLayoutStyle.ts","../../src/delivery/assets/audioButtonSkinAssets.ts","../../src/delivery/computeDisplayState.ts","../../src/delivery/variant-css-map.ts","../../src/delivery/McPopulatedBlank.svelte"],"sourcesContent":["/*! @license DOMPurify 3.4.16 | (c) Cure53 and other contributors | Released under the Apache license 2.0 and Mozilla Public License 2.0 | github.com/cure53/DOMPurify/blob/3.4.16/LICENSE */\nfunction _OverloadYield(e, d) {\n\tthis.v = e, this.k = d;\n}\nfunction _arrayLikeToArray(r, a) {\n\t(null == a || a > r.length) && (a = r.length);\n\tfor (var e = 0, n = Array(a); e < a; e++) n[e] = r[e];\n\treturn n;\n}\nfunction _arrayWithHoles(r) {\n\tif (Array.isArray(r)) return r;\n}\nfunction _iterableToArrayLimit(r, l) {\n\tvar t = null == r ? null : \"undefined\" != typeof Symbol && r[Symbol.iterator] || r[\"@@iterator\"];\n\tif (null != t) {\n\t\tvar e, n, i, u, a = [], f = !0, o = !1;\n\t\ttry {\n\t\t\tif (i = (t = t.call(r)).next, 0 === l) {\n\t\t\t\tif (Object(t) !== t) return;\n\t\t\t\tf = !1;\n\t\t\t} else for (; !(f = (e = i.call(t)).done) && (a.push(e.value), a.length !== l); f = !0);\n\t\t} catch (r) {\n\t\t\to = !0, n = r;\n\t\t} finally {\n\t\t\ttry {\n\t\t\t\tif (!f && null != t.return && (u = t.return(), Object(u) !== u)) return;\n\t\t\t} finally {\n\t\t\t\tif (o) throw n;\n\t\t\t}\n\t\t}\n\t\treturn a;\n\t}\n}\nfunction _nonIterableRest() {\n\tthrow new TypeError(\"Invalid attempt to destructure non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.\");\n}\n/*! regenerator-runtime -- Copyright (c) 2014-present, Facebook, Inc. -- license (MIT): https://github.com/babel/babel/blob/main/packages/babel-helpers/LICENSE */\nfunction _slicedToArray(r, e) {\n\treturn _arrayWithHoles(r) || _iterableToArrayLimit(r, e) || _unsupportedIterableToArray(r, e) || _nonIterableRest();\n}\nfunction _unsupportedIterableToArray(r, a) {\n\tif (r) {\n\t\tif (\"string\" == typeof r) return _arrayLikeToArray(r, a);\n\t\tvar t = {}.toString.call(r).slice(8, -1);\n\t\treturn \"Object\" === t && r.constructor && (t = r.constructor.name), \"Map\" === t || \"Set\" === t ? Array.from(r) : \"Arguments\" === t || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(t) ? _arrayLikeToArray(r, a) : void 0;\n\t}\n}\nfunction AsyncGenerator(e) {\n\tvar t, n;\n\tfunction resume(t, n) {\n\t\ttry {\n\t\t\tvar r = e[t](n), o = r.value, u = o instanceof _OverloadYield;\n\t\t\tPromise.resolve(u ? o.v : o).then(function(n) {\n\t\t\t\tif (u) {\n\t\t\t\t\tvar i = \"return\" === t && o.k ? t : \"next\";\n\t\t\t\t\tif (!o.k || n.done) return resume(i, n);\n\t\t\t\t\tn = e[i](n).value;\n\t\t\t\t}\n\t\t\t\tsettle(!!r.done, n);\n\t\t\t}, function(e) {\n\t\t\t\tresume(\"throw\", e);\n\t\t\t});\n\t\t} catch (e) {\n\t\t\tsettle(2, e);\n\t\t}\n\t}\n\tfunction settle(e, r) {\n\t\t2 === e ? t.reject(r) : t.resolve({\n\t\t\tvalue: r,\n\t\t\tdone: e\n\t\t}), (t = t.next) ? resume(t.key, t.arg) : n = null;\n\t}\n\tthis._invoke = function(e, r) {\n\t\treturn new Promise(function(o, u) {\n\t\t\tvar i = {\n\t\t\t\tkey: e,\n\t\t\t\targ: r,\n\t\t\t\tresolve: o,\n\t\t\t\treject: u,\n\t\t\t\tnext: null\n\t\t\t};\n\t\t\tn ? n = n.next = i : (t = n = i, resume(e, r));\n\t\t});\n\t}, \"function\" != typeof e.return && (this.return = void 0);\n}\nAsyncGenerator.prototype[\"function\" == typeof Symbol && Symbol.asyncIterator || \"@@asyncIterator\"] = function() {\n\treturn this;\n}, AsyncGenerator.prototype.next = function(e) {\n\treturn this._invoke(\"next\", e);\n}, AsyncGenerator.prototype.throw = function(e) {\n\treturn this._invoke(\"throw\", e);\n}, AsyncGenerator.prototype.return = function(e) {\n\treturn this._invoke(\"return\", e);\n};\nconst entries = Object.entries;\nconst setPrototypeOf = Object.setPrototypeOf;\nconst isFrozen = Object.isFrozen;\nconst getPrototypeOf = Object.getPrototypeOf;\nconst getOwnPropertyDescriptor = Object.getOwnPropertyDescriptor;\nlet freeze = Object.freeze;\nlet seal = Object.seal;\nlet create = Object.create;\nlet _ref = typeof Reflect !== \"undefined\" && Reflect;\nlet apply = _ref.apply;\nlet construct = _ref.construct;\nif (!freeze) freeze = function freeze(x) {\n\treturn x;\n};\nif (!seal) seal = function seal(x) {\n\treturn x;\n};\nif (!apply) apply = function apply(func, thisArg) {\n\tfor (var _len = arguments.length, args = new Array(_len > 2 ? _len - 2 : 0), _key = 2; _key < _len; _key++) args[_key - 2] = arguments[_key];\n\treturn func.apply(thisArg, args);\n};\nif (!construct) construct = function construct(Func) {\n\tfor (var _len2 = arguments.length, args = new Array(_len2 > 1 ? _len2 - 1 : 0), _key2 = 1; _key2 < _len2; _key2++) args[_key2 - 1] = arguments[_key2];\n\treturn new Func(...args);\n};\nconst arrayForEach = unapply(Array.prototype.forEach);\nArray.prototype.indexOf;\nconst arrayLastIndexOf = unapply(Array.prototype.lastIndexOf);\nconst arrayPop = unapply(Array.prototype.pop);\nconst arrayPush = unapply(Array.prototype.push);\nArray.prototype.slice;\nconst arraySplice = unapply(Array.prototype.splice);\nconst arrayIsArray = Array.isArray;\nconst stringToLowerCase = unapply(String.prototype.toLowerCase);\nconst stringToString = unapply(String.prototype.toString);\nconst stringMatch = unapply(String.prototype.match);\nconst stringReplace = unapply(String.prototype.replace);\nconst stringIndexOf = unapply(String.prototype.indexOf);\nconst stringTrim = unapply(String.prototype.trim);\nconst numberToString = unapply(Number.prototype.toString);\nconst booleanToString = unapply(Boolean.prototype.toString);\nconst bigintToString = typeof BigInt === \"undefined\" ? null : unapply(BigInt.prototype.toString);\nconst symbolToString = typeof Symbol === \"undefined\" ? null : unapply(Symbol.prototype.toString);\nconst objectHasOwnProperty = unapply(Object.prototype.hasOwnProperty);\nconst objectToString = unapply(Object.prototype.toString);\nconst regExpTest = unapply(RegExp.prototype.test);\nconst typeErrorCreate = unconstruct(TypeError);\n/**\n* Creates a new function that calls the given function with a specified thisArg and arguments.\n*\n* @param func - The function to be wrapped and called.\n* @returns A new function that calls the given function with a specified thisArg and arguments.\n*/\nfunction unapply(func) {\n\treturn function(thisArg) {\n\t\tif (thisArg instanceof RegExp) thisArg.lastIndex = 0;\n\t\tfor (var _len3 = arguments.length, args = new Array(_len3 > 1 ? _len3 - 1 : 0), _key3 = 1; _key3 < _len3; _key3++) args[_key3 - 1] = arguments[_key3];\n\t\treturn apply(func, thisArg, args);\n\t};\n}\n/**\n* Creates a new function that constructs an instance of the given constructor function with the provided arguments.\n*\n* @param func - The constructor function to be wrapped and called.\n* @returns A new function that constructs an instance of the given constructor function with the provided arguments.\n*/\nfunction unconstruct(Func) {\n\treturn function() {\n\t\tfor (var _len4 = arguments.length, args = new Array(_len4), _key4 = 0; _key4 < _len4; _key4++) args[_key4] = arguments[_key4];\n\t\treturn construct(Func, args);\n\t};\n}\n/**\n* Add properties to a lookup table\n*\n* @param set - The set to which elements will be added.\n* @param array - The array containing elements to be added to the set.\n* @param transformCaseFunc - An optional function to transform the case of each element before adding to the set.\n* @returns The modified set with added elements.\n*/\nfunction addToSet(set, array) {\n\tlet transformCaseFunc = arguments.length > 2 && arguments[2] !== void 0 ? arguments[2] : stringToLowerCase;\n\tif (setPrototypeOf) setPrototypeOf(set, null);\n\tif (!arrayIsArray(array)) return set;\n\tlet l = array.length;\n\twhile (l--) {\n\t\tlet element = array[l];\n\t\tif (typeof element === \"string\") {\n\t\t\tconst lcElement = transformCaseFunc(element);\n\t\t\tif (lcElement !== element) {\n\t\t\t\tif (!isFrozen(array)) array[l] = lcElement;\n\t\t\t\telement = lcElement;\n\t\t\t}\n\t\t}\n\t\tset[element] = true;\n\t}\n\treturn set;\n}\n/**\n* Clean up an array to harden against CSPP\n*\n* @param array - The array to be cleaned.\n* @returns The cleaned version of the array\n*/\nfunction cleanArray(array) {\n\tfor (let index = 0; index < array.length; index++) if (!objectHasOwnProperty(array, index)) array[index] = null;\n\treturn array;\n}\n/**\n* Shallow clone an object\n*\n* @param object - The object to be cloned.\n* @returns A new object that copies the original.\n*/\nfunction clone(object) {\n\tconst newObject = create(null);\n\tfor (const _ref2 of entries(object)) {\n\t\tvar _ref3 = _slicedToArray(_ref2, 2);\n\t\tconst property = _ref3[0];\n\t\tconst value = _ref3[1];\n\t\tif (objectHasOwnProperty(object, property)) {\n\t\t\tif (arrayIsArray(value)) newObject[property] = cleanArray(value);\n\t\t\telse if (value && typeof value === \"object\" && value.constructor === Object) newObject[property] = clone(value);\n\t\t\telse newObject[property] = value;\n\t\t}\n\t}\n\treturn newObject;\n}\n/**\n* Convert non-node values into strings without depending on direct property access.\n*\n* @param value - The value to stringify.\n* @returns A string representation of the provided value.\n*/\nfunction stringifyValue(value) {\n\tswitch (typeof value) {\n\t\tcase \"string\": return value;\n\t\tcase \"number\": return numberToString(value);\n\t\tcase \"boolean\": return booleanToString(value);\n\t\tcase \"bigint\": return bigintToString ? bigintToString(value) : \"0\";\n\t\tcase \"symbol\": return symbolToString ? symbolToString(value) : \"Symbol()\";\n\t\tcase \"undefined\": return objectToString(value);\n\t\tcase \"function\":\n\t\tcase \"object\": {\n\t\t\tif (value === null) return objectToString(value);\n\t\t\tconst valueAsRecord = value;\n\t\t\tconst valueToString = lookupGetter(valueAsRecord, \"toString\");\n\t\t\tif (typeof valueToString === \"function\") {\n\t\t\t\tconst stringified = valueToString(valueAsRecord);\n\t\t\t\treturn typeof stringified === \"string\" ? stringified : objectToString(stringified);\n\t\t\t}\n\t\t\treturn objectToString(value);\n\t\t}\n\t\tdefault: return objectToString(value);\n\t}\n}\n/**\n* This method automatically checks if the prop is function or getter and behaves accordingly.\n*\n* @param object - The object to look up the getter function in its prototype chain.\n* @param prop - The property name for which to find the getter function.\n* @returns The getter function found in the prototype chain or a fallback function.\n*/\nfunction lookupGetter(object, prop) {\n\twhile (object !== null) {\n\t\tconst desc = getOwnPropertyDescriptor(object, prop);\n\t\tif (desc) {\n\t\t\tif (desc.get) return unapply(desc.get);\n\t\t\tif (typeof desc.value === \"function\") return unapply(desc.value);\n\t\t}\n\t\tobject = getPrototypeOf(object);\n\t}\n\tfunction fallbackValue() {\n\t\treturn null;\n\t}\n\treturn fallbackValue;\n}\nfunction isRegex(value) {\n\ttry {\n\t\tregExpTest(value, \"\");\n\t\treturn true;\n\t} catch (_unused) {\n\t\treturn false;\n\t}\n}\nconst html$1 = freeze([\n\t\"a\",\n\t\"abbr\",\n\t\"acronym\",\n\t\"address\",\n\t\"area\",\n\t\"article\",\n\t\"aside\",\n\t\"audio\",\n\t\"b\",\n\t\"bdi\",\n\t\"bdo\",\n\t\"big\",\n\t\"blink\",\n\t\"blockquote\",\n\t\"body\",\n\t\"br\",\n\t\"button\",\n\t\"canvas\",\n\t\"caption\",\n\t\"center\",\n\t\"cite\",\n\t\"code\",\n\t\"col\",\n\t\"colgroup\",\n\t\"content\",\n\t\"data\",\n\t\"datalist\",\n\t\"dd\",\n\t\"decorator\",\n\t\"del\",\n\t\"details\",\n\t\"dfn\",\n\t\"dialog\",\n\t\"dir\",\n\t\"div\",\n\t\"dl\",\n\t\"dt\",\n\t\"element\",\n\t\"em\",\n\t\"fieldset\",\n\t\"figcaption\",\n\t\"figure\",\n\t\"font\",\n\t\"footer\",\n\t\"form\",\n\t\"h1\",\n\t\"h2\",\n\t\"h3\",\n\t\"h4\",\n\t\"h5\",\n\t\"h6\",\n\t\"head\",\n\t\"header\",\n\t\"hgroup\",\n\t\"hr\",\n\t\"html\",\n\t\"i\",\n\t\"img\",\n\t\"input\",\n\t\"ins\",\n\t\"kbd\",\n\t\"label\",\n\t\"legend\",\n\t\"li\",\n\t\"main\",\n\t\"map\",\n\t\"mark\",\n\t\"marquee\",\n\t\"menu\",\n\t\"menuitem\",\n\t\"meter\",\n\t\"nav\",\n\t\"nobr\",\n\t\"ol\",\n\t\"optgroup\",\n\t\"option\",\n\t\"output\",\n\t\"p\",\n\t\"picture\",\n\t\"pre\",\n\t\"progress\",\n\t\"q\",\n\t\"rp\",\n\t\"rt\",\n\t\"ruby\",\n\t\"s\",\n\t\"samp\",\n\t\"search\",\n\t\"section\",\n\t\"select\",\n\t\"shadow\",\n\t\"slot\",\n\t\"small\",\n\t\"source\",\n\t\"spacer\",\n\t\"span\",\n\t\"strike\",\n\t\"strong\",\n\t\"style\",\n\t\"sub\",\n\t\"summary\",\n\t\"sup\",\n\t\"table\",\n\t\"tbody\",\n\t\"td\",\n\t\"template\",\n\t\"textarea\",\n\t\"tfoot\",\n\t\"th\",\n\t\"thead\",\n\t\"time\",\n\t\"tr\",\n\t\"track\",\n\t\"tt\",\n\t\"u\",\n\t\"ul\",\n\t\"var\",\n\t\"video\",\n\t\"wbr\"\n]);\nconst svg$1 = freeze([\n\t\"svg\",\n\t\"a\",\n\t\"altglyph\",\n\t\"altglyphdef\",\n\t\"altglyphitem\",\n\t\"animatecolor\",\n\t\"animatemotion\",\n\t\"animatetransform\",\n\t\"circle\",\n\t\"clippath\",\n\t\"defs\",\n\t\"desc\",\n\t\"ellipse\",\n\t\"enterkeyhint\",\n\t\"exportparts\",\n\t\"filter\",\n\t\"font\",\n\t\"g\",\n\t\"glyph\",\n\t\"glyphref\",\n\t\"hkern\",\n\t\"image\",\n\t\"inputmode\",\n\t\"line\",\n\t\"lineargradient\",\n\t\"marker\",\n\t\"mask\",\n\t\"metadata\",\n\t\"mpath\",\n\t\"part\",\n\t\"path\",\n\t\"pattern\",\n\t\"polygon\",\n\t\"polyline\",\n\t\"radialgradient\",\n\t\"rect\",\n\t\"stop\",\n\t\"style\",\n\t\"switch\",\n\t\"symbol\",\n\t\"text\",\n\t\"textpath\",\n\t\"title\",\n\t\"tref\",\n\t\"tspan\",\n\t\"view\",\n\t\"vkern\"\n]);\nconst svgFilters = freeze([\n\t\"feBlend\",\n\t\"feColorMatrix\",\n\t\"feComponentTransfer\",\n\t\"feComposite\",\n\t\"feConvolveMatrix\",\n\t\"feDiffuseLighting\",\n\t\"feDisplacementMap\",\n\t\"feDistantLight\",\n\t\"feDropShadow\",\n\t\"feFlood\",\n\t\"feFuncA\",\n\t\"feFuncB\",\n\t\"feFuncG\",\n\t\"feFuncR\",\n\t\"feGaussianBlur\",\n\t\"feImage\",\n\t\"feMerge\",\n\t\"feMergeNode\",\n\t\"feMorphology\",\n\t\"feOffset\",\n\t\"fePointLight\",\n\t\"feSpecularLighting\",\n\t\"feSpotLight\",\n\t\"feTile\",\n\t\"feTurbulence\"\n]);\nconst svgDisallowed = freeze([\n\t\"animate\",\n\t\"color-profile\",\n\t\"cursor\",\n\t\"discard\",\n\t\"font-face\",\n\t\"font-face-format\",\n\t\"font-face-name\",\n\t\"font-face-src\",\n\t\"font-face-uri\",\n\t\"foreignobject\",\n\t\"hatch\",\n\t\"hatchpath\",\n\t\"mesh\",\n\t\"meshgradient\",\n\t\"meshpatch\",\n\t\"meshrow\",\n\t\"missing-glyph\",\n\t\"script\",\n\t\"set\",\n\t\"solidcolor\",\n\t\"unknown\",\n\t\"use\"\n]);\nconst mathMl$1 = freeze([\n\t\"math\",\n\t\"menclose\",\n\t\"merror\",\n\t\"mfenced\",\n\t\"mfrac\",\n\t\"mglyph\",\n\t\"mi\",\n\t\"mlabeledtr\",\n\t\"mmultiscripts\",\n\t\"mn\",\n\t\"mo\",\n\t\"mover\",\n\t\"mpadded\",\n\t\"mphantom\",\n\t\"mroot\",\n\t\"mrow\",\n\t\"ms\",\n\t\"mspace\",\n\t\"msqrt\",\n\t\"mstyle\",\n\t\"msub\",\n\t\"msup\",\n\t\"msubsup\",\n\t\"mtable\",\n\t\"mtd\",\n\t\"mtext\",\n\t\"mtr\",\n\t\"munder\",\n\t\"munderover\",\n\t\"mprescripts\"\n]);\nconst mathMlDisallowed = freeze([\n\t\"maction\",\n\t\"maligngroup\",\n\t\"malignmark\",\n\t\"mlongdiv\",\n\t\"mscarries\",\n\t\"mscarry\",\n\t\"msgroup\",\n\t\"mstack\",\n\t\"msline\",\n\t\"msrow\",\n\t\"semantics\",\n\t\"annotation\",\n\t\"annotation-xml\",\n\t\"mprescripts\",\n\t\"none\"\n]);\nconst text = freeze([\"#text\"]);\nconst html = freeze([\n\t\"accept\",\n\t\"action\",\n\t\"align\",\n\t\"alt\",\n\t\"autocapitalize\",\n\t\"autocomplete\",\n\t\"autopictureinpicture\",\n\t\"autoplay\",\n\t\"background\",\n\t\"bgcolor\",\n\t\"border\",\n\t\"capture\",\n\t\"cellpadding\",\n\t\"cellspacing\",\n\t\"checked\",\n\t\"cite\",\n\t\"class\",\n\t\"clear\",\n\t\"color\",\n\t\"cols\",\n\t\"colspan\",\n\t\"command\",\n\t\"commandfor\",\n\t\"controls\",\n\t\"controlslist\",\n\t\"coords\",\n\t\"crossorigin\",\n\t\"datetime\",\n\t\"decoding\",\n\t\"default\",\n\t\"dir\",\n\t\"disabled\",\n\t\"disablepictureinpicture\",\n\t\"disableremoteplayback\",\n\t\"download\",\n\t\"draggable\",\n\t\"enctype\",\n\t\"enterkeyhint\",\n\t\"exportparts\",\n\t\"face\",\n\t\"for\",\n\t\"headers\",\n\t\"height\",\n\t\"hidden\",\n\t\"high\",\n\t\"href\",\n\t\"hreflang\",\n\t\"id\",\n\t\"inert\",\n\t\"inputmode\",\n\t\"integrity\",\n\t\"ismap\",\n\t\"kind\",\n\t\"label\",\n\t\"lang\",\n\t\"list\",\n\t\"loading\",\n\t\"loop\",\n\t\"low\",\n\t\"max\",\n\t\"maxlength\",\n\t\"media\",\n\t\"method\",\n\t\"min\",\n\t\"minlength\",\n\t\"multiple\",\n\t\"muted\",\n\t\"name\",\n\t\"nonce\",\n\t\"noshade\",\n\t\"novalidate\",\n\t\"nowrap\",\n\t\"open\",\n\t\"optimum\",\n\t\"part\",\n\t\"pattern\",\n\t\"placeholder\",\n\t\"playsinline\",\n\t\"popover\",\n\t\"popovertarget\",\n\t\"popovertargetaction\",\n\t\"poster\",\n\t\"preload\",\n\t\"pubdate\",\n\t\"radiogroup\",\n\t\"readonly\",\n\t\"rel\",\n\t\"required\",\n\t\"rev\",\n\t\"reversed\",\n\t\"role\",\n\t\"rows\",\n\t\"rowspan\",\n\t\"spellcheck\",\n\t\"scope\",\n\t\"selected\",\n\t\"shape\",\n\t\"size\",\n\t\"sizes\",\n\t\"slot\",\n\t\"span\",\n\t\"srclang\",\n\t\"start\",\n\t\"src\",\n\t\"srcset\",\n\t\"step\",\n\t\"style\",\n\t\"summary\",\n\t\"tabindex\",\n\t\"title\",\n\t\"translate\",\n\t\"type\",\n\t\"usemap\",\n\t\"valign\",\n\t\"value\",\n\t\"width\",\n\t\"wrap\",\n\t\"xmlns\"\n]);\nconst svg = freeze([\n\t\"accent-height\",\n\t\"accumulate\",\n\t\"additive\",\n\t\"alignment-baseline\",\n\t\"amplitude\",\n\t\"ascent\",\n\t\"attributename\",\n\t\"attributetype\",\n\t\"azimuth\",\n\t\"basefrequency\",\n\t\"baseline-shift\",\n\t\"begin\",\n\t\"bias\",\n\t\"by\",\n\t\"class\",\n\t\"clip\",\n\t\"clippathunits\",\n\t\"clip-path\",\n\t\"clip-rule\",\n\t\"color\",\n\t\"color-interpolation\",\n\t\"color-interpolation-filters\",\n\t\"color-profile\",\n\t\"color-rendering\",\n\t\"cx\",\n\t\"cy\",\n\t\"d\",\n\t\"dx\",\n\t\"dy\",\n\t\"diffuseconstant\",\n\t\"direction\",\n\t\"display\",\n\t\"divisor\",\n\t\"dominant-baseline\",\n\t\"dur\",\n\t\"edgemode\",\n\t\"elevation\",\n\t\"end\",\n\t\"exponent\",\n\t\"fill\",\n\t\"fill-opacity\",\n\t\"fill-rule\",\n\t\"filter\",\n\t\"filterunits\",\n\t\"flood-color\",\n\t\"flood-opacity\",\n\t\"font-family\",\n\t\"font-size\",\n\t\"font-size-adjust\",\n\t\"font-stretch\",\n\t\"font-style\",\n\t\"font-variant\",\n\t\"font-weight\",\n\t\"fx\",\n\t\"fy\",\n\t\"g1\",\n\t\"g2\",\n\t\"glyph-name\",\n\t\"glyphref\",\n\t\"gradientunits\",\n\t\"gradienttransform\",\n\t\"height\",\n\t\"href\",\n\t\"id\",\n\t\"image-rendering\",\n\t\"in\",\n\t\"in2\",\n\t\"intercept\",\n\t\"k\",\n\t\"k1\",\n\t\"k2\",\n\t\"k3\",\n\t\"k4\",\n\t\"kerning\",\n\t\"keypoints\",\n\t\"keysplines\",\n\t\"keytimes\",\n\t\"lang\",\n\t\"lengthadjust\",\n\t\"letter-spacing\",\n\t\"kernelmatrix\",\n\t\"kernelunitlength\",\n\t\"lighting-color\",\n\t\"local\",\n\t\"marker-end\",\n\t\"marker-mid\",\n\t\"marker-start\",\n\t\"markerheight\",\n\t\"markerunits\",\n\t\"markerwidth\",\n\t\"maskcontentunits\",\n\t\"maskunits\",\n\t\"max\",\n\t\"mask\",\n\t\"mask-type\",\n\t\"media\",\n\t\"method\",\n\t\"mode\",\n\t\"min\",\n\t\"name\",\n\t\"numoctaves\",\n\t\"offset\",\n\t\"operator\",\n\t\"opacity\",\n\t\"order\",\n\t\"orient\",\n\t\"orientation\",\n\t\"origin\",\n\t\"overflow\",\n\t\"paint-order\",\n\t\"path\",\n\t\"pathlength\",\n\t\"patterncontentunits\",\n\t\"patterntransform\",\n\t\"patternunits\",\n\t\"pointer-events\",\n\t\"points\",\n\t\"preservealpha\",\n\t\"preserveaspectratio\",\n\t\"primitiveunits\",\n\t\"r\",\n\t\"rx\",\n\t\"ry\",\n\t\"radius\",\n\t\"refx\",\n\t\"refy\",\n\t\"repeatcount\",\n\t\"repeatdur\",\n\t\"restart\",\n\t\"result\",\n\t\"rotate\",\n\t\"scale\",\n\t\"seed\",\n\t\"shape-rendering\",\n\t\"slope\",\n\t\"specularconstant\",\n\t\"specularexponent\",\n\t\"spreadmethod\",\n\t\"startoffset\",\n\t\"stddeviation\",\n\t\"stitchtiles\",\n\t\"stop-color\",\n\t\"stop-opacity\",\n\t\"stroke-dasharray\",\n\t\"stroke-dashoffset\",\n\t\"stroke-linecap\",\n\t\"stroke-linejoin\",\n\t\"stroke-miterlimit\",\n\t\"stroke-opacity\",\n\t\"stroke\",\n\t\"stroke-width\",\n\t\"style\",\n\t\"surfacescale\",\n\t\"systemlanguage\",\n\t\"tabindex\",\n\t\"tablevalues\",\n\t\"targetx\",\n\t\"targety\",\n\t\"transform\",\n\t\"transform-origin\",\n\t\"text-anchor\",\n\t\"text-decoration\",\n\t\"text-orientation\",\n\t\"text-rendering\",\n\t\"textlength\",\n\t\"type\",\n\t\"u1\",\n\t\"u2\",\n\t\"unicode\",\n\t\"values\",\n\t\"vector-effect\",\n\t\"viewbox\",\n\t\"visibility\",\n\t\"version\",\n\t\"vert-adv-y\",\n\t\"vert-origin-x\",\n\t\"vert-origin-y\",\n\t\"width\",\n\t\"word-spacing\",\n\t\"wrap\",\n\t\"writing-mode\",\n\t\"xchannelselector\",\n\t\"ychannelselector\",\n\t\"x\",\n\t\"x1\",\n\t\"x2\",\n\t\"xmlns\",\n\t\"y\",\n\t\"y1\",\n\t\"y2\",\n\t\"z\",\n\t\"zoomandpan\"\n]);\nconst mathMl = freeze([\n\t\"accent\",\n\t\"accentunder\",\n\t\"align\",\n\t\"bevelled\",\n\t\"close\",\n\t\"columnalign\",\n\t\"columnlines\",\n\t\"columnspacing\",\n\t\"columnspan\",\n\t\"denomalign\",\n\t\"depth\",\n\t\"dir\",\n\t\"display\",\n\t\"displaystyle\",\n\t\"encoding\",\n\t\"fence\",\n\t\"frame\",\n\t\"height\",\n\t\"href\",\n\t\"id\",\n\t\"largeop\",\n\t\"length\",\n\t\"linethickness\",\n\t\"lquote\",\n\t\"lspace\",\n\t\"mathbackground\",\n\t\"mathcolor\",\n\t\"mathsize\",\n\t\"mathvariant\",\n\t\"maxsize\",\n\t\"minsize\",\n\t\"movablelimits\",\n\t\"notation\",\n\t\"numalign\",\n\t\"open\",\n\t\"rowalign\",\n\t\"rowlines\",\n\t\"rowspacing\",\n\t\"rowspan\",\n\t\"rspace\",\n\t\"rquote\",\n\t\"scriptlevel\",\n\t\"scriptminsize\",\n\t\"scriptsizemultiplier\",\n\t\"selection\",\n\t\"separator\",\n\t\"separators\",\n\t\"stretchy\",\n\t\"subscriptshift\",\n\t\"supscriptshift\",\n\t\"symmetric\",\n\t\"voffset\",\n\t\"width\",\n\t\"xmlns\"\n]);\nconst xml = freeze([\n\t\"xlink:href\",\n\t\"xml:id\",\n\t\"xlink:title\",\n\t\"xml:space\",\n\t\"xmlns:xlink\"\n]);\nconst MUSTACHE_EXPR = seal(/{{[\\w\\W]*|^[\\w\\W]*}}/g);\nconst ERB_EXPR = seal(/<%[\\w\\W]*|^[\\w\\W]*%>/g);\nconst TMPLIT_EXPR = seal(/\\${[\\w\\W]*/g);\nconst DATA_ATTR = seal(/^data-[\\-\\w.\\u00B7-\\uFFFF]+$/);\nconst ARIA_ATTR = seal(/^aria-[\\-\\w]+$/);\nconst IS_ALLOWED_URI = seal(/^(?:(?:(?:f|ht)tps?|mailto|tel|callto|sms|cid|xmpp|matrix):|[^a-z]|[a-z+.\\-]+(?:[^a-z+.\\-:]|$))/i);\nconst IS_SCRIPT_OR_DATA = seal(/^(?:\\w+script|data):/i);\nconst ATTR_WHITESPACE = seal(/[\\u0000-\\u0020\\u00A0\\u1680\\u180E\\u2000-\\u2029\\u205F\\u3000]/g);\nconst DOCTYPE_NAME = seal(/^html$/i);\nconst CUSTOM_ELEMENT = seal(/^[a-z][.\\w]*(-[.\\w]+)+$/i);\nconst ELEMENT_MARKUP_PROBE = seal(/<[/\\w!]/g);\nconst COMMENT_MARKUP_PROBE = seal(/<[/\\w]/g);\nconst FALLBACK_TAG_CLOSE = seal(/<\\/no(script|embed|frames)/i);\nconst SELF_CLOSING_TAG = seal(/\\/>/i);\nconst NODE_TYPE = {\n\telement: 1,\n\tattribute: 2,\n\ttext: 3,\n\tcdataSection: 4,\n\tentityReference: 5,\n\tentityNode: 6,\n\tprocessingInstruction: 7,\n\tcomment: 8,\n\tdocument: 9,\n\tdocumentType: 10,\n\tdocumentFragment: 11,\n\tnotation: 12\n};\nconst LITERAL_TEXT_ELEMENT_NAMES = [\n\t\"style\",\n\t\"script\",\n\t\"xmp\",\n\t\"iframe\",\n\t\"noembed\",\n\t\"noframes\",\n\t\"plaintext\",\n\t\"noscript\"\n];\nconst LITERAL_TEXT_ELEMENTS = freeze(addToSet({}, LITERAL_TEXT_ELEMENT_NAMES));\nconst LITERAL_TEXT_CLOSE = function() {\n\tconst map = {};\n\tarrayForEach(LITERAL_TEXT_ELEMENT_NAMES, (name) => {\n\t\tmap[name] = seal(new RegExp(\"</\" + name + \"(?=[\\\\t\\\\n\\\\f\\\\r />])\", \"i\"));\n\t});\n\treturn freeze(map);\n}();\nconst getGlobal = function getGlobal() {\n\treturn typeof window === \"undefined\" ? null : window;\n};\n/**\n* Creates a no-op policy for internal use only.\n* Don't export this function outside this module!\n* @param trustedTypes The policy factory.\n* @param purifyHostElement The Script element used to load DOMPurify (to determine policy name suffix).\n* @return The policy created (or null, if Trusted Types\n* are not supported or creating the policy failed).\n*/\nconst _createTrustedTypesPolicy = function _createTrustedTypesPolicy(trustedTypes, purifyHostElement) {\n\tif (typeof trustedTypes !== \"object\" || typeof trustedTypes.createPolicy !== \"function\") return null;\n\tlet suffix = null;\n\tconst ATTR_NAME = \"data-tt-policy-suffix\";\n\tif (purifyHostElement && purifyHostElement.hasAttribute(ATTR_NAME)) suffix = purifyHostElement.getAttribute(ATTR_NAME);\n\tconst policyName = \"dompurify\" + (suffix ? \"#\" + suffix : \"\");\n\ttry {\n\t\treturn trustedTypes.createPolicy(policyName, {\n\t\t\tcreateHTML(html) {\n\t\t\t\treturn html;\n\t\t\t},\n\t\t\tcreateScriptURL(scriptUrl) {\n\t\t\t\treturn scriptUrl;\n\t\t\t}\n\t\t});\n\t} catch (_) {\n\t\tconsole.warn(\"TrustedTypes policy \" + policyName + \" could not be created.\");\n\t\treturn null;\n\t}\n};\nconst _createHooksMap = function _createHooksMap() {\n\treturn {\n\t\tafterSanitizeAttributes: [],\n\t\tafterSanitizeElements: [],\n\t\tafterSanitizeShadowDOM: [],\n\t\tbeforeSanitizeAttributes: [],\n\t\tbeforeSanitizeElements: [],\n\t\tbeforeSanitizeShadowDOM: [],\n\t\tuponSanitizeAttribute: [],\n\t\tuponSanitizeElement: [],\n\t\tuponSanitizeShadowNode: []\n\t};\n};\n/**\n* Resolve a set-valued configuration option: a fresh set built from\n* cfg[key] when it is an own array property (seeded with a clone of\n* options.base when given, case-normalized via options.transform),\n* the fallback set otherwise.\n*\n* @param cfg the cloned, prototype-free configuration object\n* @param key the configuration property to read\n* @param fallback the set to use when the option is absent or not an array\n* @param options transform and optional base set to merge into\n* @returns the resolved set\n*/\nconst _resolveSetOption = function _resolveSetOption(cfg, key, fallback, options) {\n\treturn objectHasOwnProperty(cfg, key) && arrayIsArray(cfg[key]) ? addToSet(options.base ? clone(options.base) : {}, cfg[key], options.transform) : fallback;\n};\n/**\n* Resolve an object-valued configuration option: a prototype-free clone\n* of cfg[key] when it is an own, truthy object property, else a fresh\n* fallback built by makeFallback (fresh on every parse, so a previous\n* parse can never leak state into the next one).\n*\n* @param cfg the cloned, prototype-free configuration object\n* @param key the configuration property to read\n* @param makeFallback builds the fallback value when the option is absent\n* @returns the resolved object\n*/\nconst _resolveObjectOption = function _resolveObjectOption(cfg, key, makeFallback) {\n\tconst value = objectHasOwnProperty(cfg, key) ? cfg[key] : void 0;\n\treturn value && typeof value === \"object\" ? clone(value) : makeFallback();\n};\nfunction createDOMPurify() {\n\tlet window = arguments.length > 0 && arguments[0] !== void 0 ? arguments[0] : getGlobal();\n\tconst DOMPurify = (root) => createDOMPurify(root);\n\tDOMPurify.version = \"3.4.16\";\n\tDOMPurify.removed = [];\n\tif (!window || !window.document || window.document.nodeType !== NODE_TYPE.document || !window.Element) {\n\t\tDOMPurify.isSupported = false;\n\t\treturn DOMPurify;\n\t}\n\tlet document = window.document;\n\tconst originalDocument = document;\n\tconst currentScript = originalDocument.currentScript;\n\twindow.DocumentFragment;\n\tconst HTMLTemplateElement = window.HTMLTemplateElement, Node = window.Node, Element = window.Element, NodeFilter = window.NodeFilter;\n\twindow.NamedNodeMap === void 0 && (window.NamedNodeMap || window.MozNamedAttrMap);\n\twindow.HTMLFormElement;\n\tconst DOMParser = window.DOMParser, trustedTypes = window.trustedTypes;\n\tconst ElementPrototype = Element.prototype;\n\tconst cloneNode = lookupGetter(ElementPrototype, \"cloneNode\");\n\tconst remove = lookupGetter(ElementPrototype, \"remove\");\n\tconst removeAttributeNode = lookupGetter(ElementPrototype, \"removeAttributeNode\");\n\tconst getNextSibling = lookupGetter(ElementPrototype, \"nextSibling\");\n\tconst getChildNodes = lookupGetter(ElementPrototype, \"childNodes\");\n\tconst getParentNode = lookupGetter(ElementPrototype, \"parentNode\");\n\tconst getShadowRoot = lookupGetter(ElementPrototype, \"shadowRoot\");\n\tconst getAttributes = lookupGetter(ElementPrototype, \"attributes\");\n\tconst getNodeType = Node && Node.prototype ? lookupGetter(Node.prototype, \"nodeType\") : null;\n\tconst getNodeName = Node && Node.prototype ? lookupGetter(Node.prototype, \"nodeName\") : null;\n\tconst getOwnerDocument = Node && Node.prototype ? lookupGetter(Node.prototype, \"ownerDocument\") : null;\n\tconst _readNodeType = function _readNodeType(node) {\n\t\treturn getNodeType ? getNodeType(node) : node.nodeType;\n\t};\n\tconst _readNodeName = function _readNodeName(node) {\n\t\treturn getNodeName ? getNodeName(node) : node.nodeName;\n\t};\n\tif (typeof HTMLTemplateElement === \"function\") {\n\t\tconst template = document.createElement(\"template\");\n\t\tif (template.content && template.content.ownerDocument) document = template.content.ownerDocument;\n\t}\n\tlet trustedTypesPolicy;\n\tlet emptyHTML = \"\";\n\tlet defaultTrustedTypesPolicy;\n\tlet defaultTrustedTypesPolicyResolved = false;\n\tlet IN_TRUSTED_TYPES_POLICY = 0;\n\tconst _assertNotInTrustedTypesPolicy = function _assertNotInTrustedTypesPolicy() {\n\t\tif (IN_TRUSTED_TYPES_POLICY > 0) throw typeErrorCreate(\"A configured TRUSTED_TYPES_POLICY callback (createHTML or createScriptURL) must not call DOMPurify.sanitize, as that causes infinite recursion. Do not pass a policy whose callbacks wrap DOMPurify as TRUSTED_TYPES_POLICY; see the \\\"DOMPurify and Trusted Types\\\" section of the README.\");\n\t};\n\tconst _createTrustedHTML = function _createTrustedHTML(html) {\n\t\t_assertNotInTrustedTypesPolicy();\n\t\tIN_TRUSTED_TYPES_POLICY++;\n\t\ttry {\n\t\t\treturn trustedTypesPolicy.createHTML(html);\n\t\t} finally {\n\t\t\tIN_TRUSTED_TYPES_POLICY--;\n\t\t}\n\t};\n\tconst _createTrustedScriptURL = function _createTrustedScriptURL(scriptUrl) {\n\t\t_assertNotInTrustedTypesPolicy();\n\t\tIN_TRUSTED_TYPES_POLICY++;\n\t\ttry {\n\t\t\treturn trustedTypesPolicy.createScriptURL(scriptUrl);\n\t\t} finally {\n\t\t\tIN_TRUSTED_TYPES_POLICY--;\n\t\t}\n\t};\n\tconst _getDefaultTrustedTypesPolicy = function _getDefaultTrustedTypesPolicy() {\n\t\tif (!defaultTrustedTypesPolicyResolved) {\n\t\t\tdefaultTrustedTypesPolicy = _createTrustedTypesPolicy(trustedTypes, currentScript);\n\t\t\tdefaultTrustedTypesPolicyResolved = true;\n\t\t}\n\t\treturn defaultTrustedTypesPolicy;\n\t};\n\tconst _document = document, implementation = _document.implementation, createNodeIterator = _document.createNodeIterator, createDocumentFragment = _document.createDocumentFragment, getElementsByTagName = _document.getElementsByTagName;\n\tconst importNode = originalDocument.importNode;\n\tlet hooks = _createHooksMap();\n\t/**\n\t* Expose whether this browser supports running the full DOMPurify.\n\t*/\n\tDOMPurify.isSupported = typeof entries === \"function\" && typeof getParentNode === \"function\" && implementation && implementation.createHTMLDocument !== void 0;\n\tconst 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;\n\tlet IS_ALLOWED_URI$1 = IS_ALLOWED_URI;\n\t/**\n\t* We consider the elements and attributes below to be safe. Ideally\n\t* don't add any new ones but feel free to remove unwanted ones.\n\t*/\n\tlet ALLOWED_TAGS = null;\n\tconst DEFAULT_ALLOWED_TAGS = addToSet({}, [\n\t\t...html$1,\n\t\t...svg$1,\n\t\t...svgFilters,\n\t\t...mathMl$1,\n\t\t...text\n\t]);\n\tlet ALLOWED_ATTR = null;\n\tconst DEFAULT_ALLOWED_ATTR = addToSet({}, [\n\t\t...html,\n\t\t...svg,\n\t\t...mathMl,\n\t\t...xml\n\t]);\n\tlet CUSTOM_ELEMENT_HANDLING = Object.seal(create(null, {\n\t\ttagNameCheck: {\n\t\t\twritable: true,\n\t\t\tconfigurable: false,\n\t\t\tenumerable: true,\n\t\t\tvalue: null\n\t\t},\n\t\tattributeNameCheck: {\n\t\t\twritable: true,\n\t\t\tconfigurable: false,\n\t\t\tenumerable: true,\n\t\t\tvalue: null\n\t\t},\n\t\tallowCustomizedBuiltInElements: {\n\t\t\twritable: true,\n\t\t\tconfigurable: false,\n\t\t\tenumerable: true,\n\t\t\tvalue: false\n\t\t}\n\t}));\n\tlet FORBID_TAGS = null;\n\tlet FORBID_ATTR = null;\n\tconst EXTRA_ELEMENT_HANDLING = Object.seal(create(null, {\n\t\ttagCheck: {\n\t\t\twritable: true,\n\t\t\tconfigurable: false,\n\t\t\tenumerable: true,\n\t\t\tvalue: null\n\t\t},\n\t\tattributeCheck: {\n\t\t\twritable: true,\n\t\t\tconfigurable: false,\n\t\t\tenumerable: true,\n\t\t\tvalue: null\n\t\t}\n\t}));\n\tlet ALLOW_ARIA_ATTR = true;\n\tlet ALLOW_DATA_ATTR = true;\n\tlet ALLOW_UNKNOWN_PROTOCOLS = false;\n\tlet ALLOW_SELF_CLOSE_IN_ATTR = true;\n\tlet SAFE_FOR_TEMPLATES = false;\n\tlet SAFE_FOR_XML = true;\n\tlet WHOLE_DOCUMENT = false;\n\tlet SET_CONFIG = false;\n\tlet SET_CONFIG_ALLOWED_TAGS = null;\n\tlet SET_CONFIG_ALLOWED_ATTR = null;\n\tlet FORCE_BODY = false;\n\tlet RETURN_DOM = false;\n\tlet RETURN_DOM_FRAGMENT = false;\n\tlet RETURN_TRUSTED_TYPE = false;\n\tlet SANITIZE_DOM = true;\n\tlet SANITIZE_NAMED_PROPS = false;\n\tconst SANITIZE_NAMED_PROPS_PREFIX = \"user-content-\";\n\tlet KEEP_CONTENT = true;\n\tlet IN_PLACE = false;\n\tlet USE_PROFILES = {};\n\tlet FORBID_CONTENTS = null;\n\tconst DEFAULT_FORBID_CONTENTS = addToSet({}, [\n\t\t\"annotation-xml\",\n\t\t\"audio\",\n\t\t\"colgroup\",\n\t\t\"desc\",\n\t\t\"foreignobject\",\n\t\t\"head\",\n\t\t\"iframe\",\n\t\t\"math\",\n\t\t\"mi\",\n\t\t\"mn\",\n\t\t\"mo\",\n\t\t\"ms\",\n\t\t\"mtext\",\n\t\t\"noembed\",\n\t\t\"noframes\",\n\t\t\"noscript\",\n\t\t\"plaintext\",\n\t\t\"script\",\n\t\t\"selectedcontent\",\n\t\t\"style\",\n\t\t\"svg\",\n\t\t\"template\",\n\t\t\"thead\",\n\t\t\"title\",\n\t\t\"video\",\n\t\t\"xmp\"\n\t]);\n\tlet DATA_URI_TAGS = null;\n\tconst DEFAULT_DATA_URI_TAGS = addToSet({}, [\n\t\t\"audio\",\n\t\t\"video\",\n\t\t\"img\",\n\t\t\"source\",\n\t\t\"image\",\n\t\t\"track\"\n\t]);\n\tlet URI_SAFE_ATTRIBUTES = null;\n\tconst DEFAULT_URI_SAFE_ATTRIBUTES = addToSet({}, [\n\t\t\"alt\",\n\t\t\"class\",\n\t\t\"for\",\n\t\t\"id\",\n\t\t\"label\",\n\t\t\"name\",\n\t\t\"pattern\",\n\t\t\"placeholder\",\n\t\t\"role\",\n\t\t\"summary\",\n\t\t\"title\",\n\t\t\"value\",\n\t\t\"style\",\n\t\t\"xmlns\"\n\t]);\n\tconst MATHML_NAMESPACE = \"http://www.w3.org/1998/Math/MathML\";\n\tconst SVG_NAMESPACE = \"http://www.w3.org/2000/svg\";\n\tconst HTML_NAMESPACE = \"http://www.w3.org/1999/xhtml\";\n\tlet NAMESPACE = HTML_NAMESPACE;\n\tlet IS_EMPTY_INPUT = false;\n\tlet ALLOWED_NAMESPACES = null;\n\tconst DEFAULT_ALLOWED_NAMESPACES = addToSet({}, [\n\t\tMATHML_NAMESPACE,\n\t\tSVG_NAMESPACE,\n\t\tHTML_NAMESPACE\n\t], stringToString);\n\tconst DEFAULT_MATHML_TEXT_INTEGRATION_POINTS = freeze([\n\t\t\"mi\",\n\t\t\"mo\",\n\t\t\"mn\",\n\t\t\"ms\",\n\t\t\"mtext\"\n\t]);\n\tlet MATHML_TEXT_INTEGRATION_POINTS = addToSet({}, DEFAULT_MATHML_TEXT_INTEGRATION_POINTS);\n\tconst DEFAULT_HTML_INTEGRATION_POINTS = freeze([\"annotation-xml\"]);\n\tlet HTML_INTEGRATION_POINTS = addToSet({}, DEFAULT_HTML_INTEGRATION_POINTS);\n\tconst COMMON_SVG_AND_HTML_ELEMENTS = addToSet({}, [\n\t\t\"title\",\n\t\t\"style\",\n\t\t\"font\",\n\t\t\"a\",\n\t\t\"script\"\n\t]);\n\tlet PARSER_MEDIA_TYPE = null;\n\tconst SUPPORTED_PARSER_MEDIA_TYPES = [\"application/xhtml+xml\", \"text/html\"];\n\tconst DEFAULT_PARSER_MEDIA_TYPE = \"text/html\";\n\tlet transformCaseFunc = null;\n\tlet CONFIG = null;\n\tconst formElement = document.createElement(\"form\");\n\tconst isRegexOrFunction = function isRegexOrFunction(testValue) {\n\t\treturn testValue instanceof RegExp || testValue instanceof Function;\n\t};\n\t/**\n\t* _parseConfig\n\t*\n\t* @param cfg optional config literal\n\t*/\n\tconst _parseConfig = function _parseConfig() {\n\t\tlet cfg = arguments.length > 0 && arguments[0] !== void 0 ? arguments[0] : {};\n\t\tif (CONFIG && CONFIG === cfg) return;\n\t\tif (!cfg || typeof cfg !== \"object\") cfg = {};\n\t\tcfg = clone(cfg);\n\t\tPARSER_MEDIA_TYPE = SUPPORTED_PARSER_MEDIA_TYPES.indexOf(cfg.PARSER_MEDIA_TYPE) === -1 ? DEFAULT_PARSER_MEDIA_TYPE : cfg.PARSER_MEDIA_TYPE;\n\t\ttransformCaseFunc = PARSER_MEDIA_TYPE === \"application/xhtml+xml\" ? stringToString : stringToLowerCase;\n\t\tALLOWED_TAGS = _resolveSetOption(cfg, \"ALLOWED_TAGS\", DEFAULT_ALLOWED_TAGS, { transform: transformCaseFunc });\n\t\tALLOWED_ATTR = _resolveSetOption(cfg, \"ALLOWED_ATTR\", DEFAULT_ALLOWED_ATTR, { transform: transformCaseFunc });\n\t\tALLOWED_NAMESPACES = _resolveSetOption(cfg, \"ALLOWED_NAMESPACES\", DEFAULT_ALLOWED_NAMESPACES, { transform: stringToString });\n\t\tURI_SAFE_ATTRIBUTES = _resolveSetOption(cfg, \"ADD_URI_SAFE_ATTR\", DEFAULT_URI_SAFE_ATTRIBUTES, {\n\t\t\ttransform: transformCaseFunc,\n\t\t\tbase: DEFAULT_URI_SAFE_ATTRIBUTES\n\t\t});\n\t\tDATA_URI_TAGS = _resolveSetOption(cfg, \"ADD_DATA_URI_TAGS\", DEFAULT_DATA_URI_TAGS, {\n\t\t\ttransform: transformCaseFunc,\n\t\t\tbase: DEFAULT_DATA_URI_TAGS\n\t\t});\n\t\tFORBID_CONTENTS = _resolveSetOption(cfg, \"FORBID_CONTENTS\", DEFAULT_FORBID_CONTENTS, { transform: transformCaseFunc });\n\t\tFORBID_TAGS = _resolveSetOption(cfg, \"FORBID_TAGS\", clone({}), { transform: transformCaseFunc });\n\t\tFORBID_ATTR = _resolveSetOption(cfg, \"FORBID_ATTR\", clone({}), { transform: transformCaseFunc });\n\t\tUSE_PROFILES = objectHasOwnProperty(cfg, \"USE_PROFILES\") ? cfg.USE_PROFILES && typeof cfg.USE_PROFILES === \"object\" ? clone(cfg.USE_PROFILES) : cfg.USE_PROFILES : false;\n\t\tALLOW_ARIA_ATTR = cfg.ALLOW_ARIA_ATTR !== false;\n\t\tALLOW_DATA_ATTR = cfg.ALLOW_DATA_ATTR !== false;\n\t\tALLOW_UNKNOWN_PROTOCOLS = cfg.ALLOW_UNKNOWN_PROTOCOLS || false;\n\t\tALLOW_SELF_CLOSE_IN_ATTR = cfg.ALLOW_SELF_CLOSE_IN_ATTR !== false;\n\t\tSAFE_FOR_TEMPLATES = cfg.SAFE_FOR_TEMPLATES || false;\n\t\tSAFE_FOR_XML = cfg.SAFE_FOR_XML !== false;\n\t\tWHOLE_DOCUMENT = cfg.WHOLE_DOCUMENT || false;\n\t\tRETURN_DOM = cfg.RETURN_DOM || false;\n\t\tRETURN_DOM_FRAGMENT = cfg.RETURN_DOM_FRAGMENT || false;\n\t\tRETURN_TRUSTED_TYPE = cfg.RETURN_TRUSTED_TYPE || false;\n\t\tFORCE_BODY = cfg.FORCE_BODY || false;\n\t\tSANITIZE_DOM = cfg.SANITIZE_DOM !== false;\n\t\tSANITIZE_NAMED_PROPS = cfg.SANITIZE_NAMED_PROPS || false;\n\t\tKEEP_CONTENT = cfg.KEEP_CONTENT !== false;\n\t\tIN_PLACE = cfg.IN_PLACE || false;\n\t\tIS_ALLOWED_URI$1 = isRegex(cfg.ALLOWED_URI_REGEXP) ? cfg.ALLOWED_URI_REGEXP : IS_ALLOWED_URI;\n\t\tNAMESPACE = typeof cfg.NAMESPACE === \"string\" ? cfg.NAMESPACE : HTML_NAMESPACE;\n\t\tMATHML_TEXT_INTEGRATION_POINTS = _resolveObjectOption(cfg, \"MATHML_TEXT_INTEGRATION_POINTS\", () => addToSet({}, DEFAULT_MATHML_TEXT_INTEGRATION_POINTS));\n\t\tHTML_INTEGRATION_POINTS = _resolveObjectOption(cfg, \"HTML_INTEGRATION_POINTS\", () => addToSet({}, DEFAULT_HTML_INTEGRATION_POINTS));\n\t\tconst customElementHandling = _resolveObjectOption(cfg, \"CUSTOM_ELEMENT_HANDLING\", () => create(null));\n\t\tCUSTOM_ELEMENT_HANDLING = create(null);\n\t\tif (objectHasOwnProperty(customElementHandling, \"tagNameCheck\") && isRegexOrFunction(customElementHandling.tagNameCheck)) CUSTOM_ELEMENT_HANDLING.tagNameCheck = customElementHandling.tagNameCheck;\n\t\tif (objectHasOwnProperty(customElementHandling, \"attributeNameCheck\") && isRegexOrFunction(customElementHandling.attributeNameCheck)) CUSTOM_ELEMENT_HANDLING.attributeNameCheck = customElementHandling.attributeNameCheck;\n\t\tif (objectHasOwnProperty(customElementHandling, \"allowCustomizedBuiltInElements\") && typeof customElementHandling.allowCustomizedBuiltInElements === \"boolean\") CUSTOM_ELEMENT_HANDLING.allowCustomizedBuiltInElements = customElementHandling.allowCustomizedBuiltInElements;\n\t\tseal(CUSTOM_ELEMENT_HANDLING);\n\t\tif (SAFE_FOR_TEMPLATES) ALLOW_DATA_ATTR = false;\n\t\tif (RETURN_DOM_FRAGMENT) RETURN_DOM = true;\n\t\tif (USE_PROFILES) {\n\t\t\tALLOWED_TAGS = addToSet({}, text);\n\t\t\tALLOWED_ATTR = create(null);\n\t\t\tif (USE_PROFILES.html === true) {\n\t\t\t\taddToSet(ALLOWED_TAGS, html$1);\n\t\t\t\taddToSet(ALLOWED_ATTR, html);\n\t\t\t}\n\t\t\tif (USE_PROFILES.svg === true) {\n\t\t\t\taddToSet(ALLOWED_TAGS, svg$1);\n\t\t\t\taddToSet(ALLOWED_ATTR, svg);\n\t\t\t\taddToSet(ALLOWED_ATTR, xml);\n\t\t\t}\n\t\t\tif (USE_PROFILES.svgFilters === true) {\n\t\t\t\taddToSet(ALLOWED_TAGS, svgFilters);\n\t\t\t\taddToSet(ALLOWED_ATTR, svg);\n\t\t\t\taddToSet(ALLOWED_ATTR, xml);\n\t\t\t}\n\t\t\tif (USE_PROFILES.mathMl === true) {\n\t\t\t\taddToSet(ALLOWED_TAGS, mathMl$1);\n\t\t\t\taddToSet(ALLOWED_ATTR, mathMl);\n\t\t\t\taddToSet(ALLOWED_ATTR, xml);\n\t\t\t}\n\t\t}\n\t\tEXTRA_ELEMENT_HANDLING.tagCheck = null;\n\t\tEXTRA_ELEMENT_HANDLING.attributeCheck = null;\n\t\tif (objectHasOwnProperty(cfg, \"ADD_TAGS\")) {\n\t\t\tif (typeof cfg.ADD_TAGS === \"function\") EXTRA_ELEMENT_HANDLING.tagCheck = cfg.ADD_TAGS;\n\t\t\telse if (arrayIsArray(cfg.ADD_TAGS)) {\n\t\t\t\tif (ALLOWED_TAGS === DEFAULT_ALLOWED_TAGS) ALLOWED_TAGS = clone(ALLOWED_TAGS);\n\t\t\t\taddToSet(ALLOWED_TAGS, cfg.ADD_TAGS, transformCaseFunc);\n\t\t\t}\n\t\t}\n\t\tif (objectHasOwnProperty(cfg, \"ADD_ATTR\")) {\n\t\t\tif (typeof cfg.ADD_ATTR === \"function\") EXTRA_ELEMENT_HANDLING.attributeCheck = cfg.ADD_ATTR;\n\t\t\telse if (arrayIsArray(cfg.ADD_ATTR)) {\n\t\t\t\tif (ALLOWED_ATTR === DEFAULT_ALLOWED_ATTR) ALLOWED_ATTR = clone(ALLOWED_ATTR);\n\t\t\t\taddToSet(ALLOWED_ATTR, cfg.ADD_ATTR, transformCaseFunc);\n\t\t\t}\n\t\t}\n\t\tif (objectHasOwnProperty(cfg, \"ADD_FORBID_CONTENTS\") && arrayIsArray(cfg.ADD_FORBID_CONTENTS)) {\n\t\t\tif (FORBID_CONTENTS === DEFAULT_FORBID_CONTENTS) FORBID_CONTENTS = clone(FORBID_CONTENTS);\n\t\t\taddToSet(FORBID_CONTENTS, cfg.ADD_FORBID_CONTENTS, transformCaseFunc);\n\t\t}\n\t\tif (KEEP_CONTENT) ALLOWED_TAGS[\"#text\"] = true;\n\t\tif (WHOLE_DOCUMENT) addToSet(ALLOWED_TAGS, [\n\t\t\t\"html\",\n\t\t\t\"head\",\n\t\t\t\"body\"\n\t\t]);\n\t\tif (ALLOWED_TAGS.table) {\n\t\t\taddToSet(ALLOWED_TAGS, [\"tbody\"]);\n\t\t\tdelete FORBID_TAGS.tbody;\n\t\t}\n\t\tif (cfg.TRUSTED_TYPES_POLICY) {\n\t\t\tif (typeof cfg.TRUSTED_TYPES_POLICY.createHTML !== \"function\") throw typeErrorCreate(\"TRUSTED_TYPES_POLICY configuration option must provide a \\\"createHTML\\\" hook.\");\n\t\t\tif (typeof cfg.TRUSTED_TYPES_POLICY.createScriptURL !== \"function\") throw typeErrorCreate(\"TRUSTED_TYPES_POLICY configuration option must provide a \\\"createScriptURL\\\" hook.\");\n\t\t\tconst previousTrustedTypesPolicy = trustedTypesPolicy;\n\t\t\ttrustedTypesPolicy = cfg.TRUSTED_TYPES_POLICY;\n\t\t\ttry {\n\t\t\t\temptyHTML = _createTrustedHTML(\"\");\n\t\t\t} catch (error) {\n\t\t\t\ttrustedTypesPolicy = previousTrustedTypesPolicy;\n\t\t\t\tthrow error;\n\t\t\t}\n\t\t} else if (cfg.TRUSTED_TYPES_POLICY === null) {\n\t\t\ttrustedTypesPolicy = void 0;\n\t\t\temptyHTML = \"\";\n\t\t} else {\n\t\t\tif (trustedTypesPolicy === void 0) trustedTypesPolicy = _getDefaultTrustedTypesPolicy();\n\t\t\tif (trustedTypesPolicy && typeof emptyHTML === \"string\") emptyHTML = _createTrustedHTML(\"\");\n\t\t}\n\t\tif (freeze) freeze(cfg);\n\t\tCONFIG = cfg;\n\t};\n\tconst ALL_SVG_TAGS = addToSet({}, [\n\t\t...svg$1,\n\t\t...svgFilters,\n\t\t...svgDisallowed\n\t]);\n\tconst ALL_MATHML_TAGS = addToSet({}, [...mathMl$1, ...mathMlDisallowed]);\n\t/**\n\t* Namespace rules for an element in the SVG namespace.\n\t*\n\t* @param tagName the element's lowercase tag name\n\t* @param parent the (possibly simulated) parent node\n\t* @param parentTagName the parent's lowercase tag name\n\t* @returns true if a spec-compliant parser could produce this element\n\t*/\n\tconst _checkSvgNamespace = function _checkSvgNamespace(tagName, parent, parentTagName) {\n\t\tif (parent.namespaceURI === HTML_NAMESPACE) return tagName === \"svg\";\n\t\tif (parent.namespaceURI === MATHML_NAMESPACE) return tagName === \"svg\" && (parentTagName === \"annotation-xml\" || MATHML_TEXT_INTEGRATION_POINTS[parentTagName]);\n\t\treturn Boolean(ALL_SVG_TAGS[tagName]);\n\t};\n\t/**\n\t* Namespace rules for an element in the MathML namespace.\n\t*\n\t* @param tagName the element's lowercase tag name\n\t* @param parent the (possibly simulated) parent node\n\t* @param parentTagName the parent's lowercase tag name\n\t* @returns true if a spec-compliant parser could produce this element\n\t*/\n\tconst _checkMathMlNamespace = function _checkMathMlNamespace(tagName, parent, parentTagName) {\n\t\tif (parent.namespaceURI === HTML_NAMESPACE) return tagName === \"math\";\n\t\tif (parent.namespaceURI === SVG_NAMESPACE) return tagName === \"math\" && HTML_INTEGRATION_POINTS[parentTagName];\n\t\treturn Boolean(ALL_MATHML_TAGS[tagName]);\n\t};\n\t/**\n\t* Namespace rules for an element in the HTML namespace.\n\t*\n\t* @param tagName the element's lowercase tag name\n\t* @param parent the (possibly simulated) parent node\n\t* @param parentTagName the parent's lowercase tag name\n\t* @returns true if a spec-compliant parser could produce this element\n\t*/\n\tconst _checkHtmlNamespace = function _checkHtmlNamespace(tagName, parent, parentTagName) {\n\t\tif (parent.namespaceURI === SVG_NAMESPACE && !HTML_INTEGRATION_POINTS[parentTagName]) return false;\n\t\tif (parent.namespaceURI === MATHML_NAMESPACE && !MATHML_TEXT_INTEGRATION_POINTS[parentTagName]) return false;\n\t\treturn !ALL_MATHML_TAGS[tagName] && (COMMON_SVG_AND_HTML_ELEMENTS[tagName] || !ALL_SVG_TAGS[tagName]);\n\t};\n\t/**\n\t* @param element a DOM element whose namespace is being checked\n\t* @returns Return false if the element has a\n\t* namespace that a spec-compliant parser would never\n\t* return. Return true otherwise.\n\t*/\n\tconst _checkValidNamespace = function _checkValidNamespace(element) {\n\t\tlet parent = getParentNode(element);\n\t\tif (!parent || !parent.tagName) parent = {\n\t\t\tnamespaceURI: NAMESPACE,\n\t\t\ttagName: \"template\"\n\t\t};\n\t\tconst tagName = stringToLowerCase(element.tagName);\n\t\tconst parentTagName = stringToLowerCase(parent.tagName);\n\t\tif (!ALLOWED_NAMESPACES[element.namespaceURI]) return false;\n\t\tif (element.namespaceURI === SVG_NAMESPACE) return _checkSvgNamespace(tagName, parent, parentTagName);\n\t\tif (element.namespaceURI === MATHML_NAMESPACE) return _checkMathMlNamespace(tagName, parent, parentTagName);\n\t\tif (element.namespaceURI === HTML_NAMESPACE) return _checkHtmlNamespace(tagName, parent, parentTagName);\n\t\tif (PARSER_MEDIA_TYPE === \"application/xhtml+xml\" && ALLOWED_NAMESPACES[element.namespaceURI]) return true;\n\t\treturn false;\n\t};\n\t/**\n\t* _forceRemove\n\t*\n\t* @param node a DOM node\n\t*/\n\tconst _forceRemove = function _forceRemove(node) {\n\t\tarrayPush(DOMPurify.removed, { element: node });\n\t\ttry {\n\t\t\tgetParentNode(node).removeChild(node);\n\t\t} catch (_) {\n\t\t\tremove(node);\n\t\t\tif (!getParentNode(node)) throw typeErrorCreate(\"a node selected for removal could not be detached from its tree and cannot be safely returned; refusing to sanitize in place\");\n\t\t}\n\t};\n\t/**\n\t* _stripAttributeNode\n\t*\n\t* Remove a single Attr node case/namespace-exactly on an attribute-teardown\n\t* path. Name-based removeAttribute() ASCII-lowercases its lookup key for an\n\t* HTML element in an HTML document and so silently misses a case-preserved\n\t* handler (e.g. `ONERROR` off an XML/XHTML import) - the same defect\n\t* _removeAttribute() was fixed for, which a name-based call would reintroduce\n\t* on these IN_PLACE teardown paths. Unlike _removeAttribute this does not\n\t* record into DOMPurify.removed: the neutralize passes intentionally do not\n\t* book-keep. A clobbered/detached node falls back to best-effort name-based\n\t* removal.\n\t*\n\t* @param element the element to strip the attribute from\n\t* @param attribute the Attr node to remove\n\t* @param name the attribute's name, for the fallback path\n\t*/\n\tconst _stripAttributeNode = function _stripAttributeNode(element, attribute, name) {\n\t\ttry {\n\t\t\tremoveAttributeNode(element, attribute);\n\t\t} catch (_) {\n\t\t\ttry {\n\t\t\t\telement.removeAttribute(name);\n\t\t\t} catch (_) {}\n\t\t}\n\t};\n\t/**\n\t* _neutralizeRoot\n\t*\n\t* Fail-closed teardown of an in-place root after the sanitize walk aborts\n\t* (campaign-3 F2). An internal throw mid-walk — e.g. a page-registered\n\t* custom element's reaction detaches a node so `_forceRemove`'s deliberate\n\t* parentless guard throws, or any other re-entrant engine mutation — would\n\t* otherwise leave the caller's *live* tree half-sanitized, with everything\n\t* after the abort point still carrying its handlers. There is no safe way\n\t* to resume the walk (the tree mutated under us), so we strip the root bare:\n\t* remove every child and every attribute, then let the caller's catch see\n\t* the original error. Clobber-safe (cached `remove`/`childNodes`/`attributes`\n\t* getters; the root was already clobber-pre-flighted at the IN_PLACE entry).\n\t*\n\t* @param root the in-place root to empty\n\t*/\n\tconst _neutralizeRoot = function _neutralizeRoot(root) {\n\t\t_neutralizeSubtree(root);\n\t\tconst childNodes = getChildNodes(root);\n\t\tif (childNodes) {\n\t\t\tconst snapshot = [];\n\t\t\tarrayForEach(childNodes, (child) => {\n\t\t\t\tarrayPush(snapshot, child);\n\t\t\t});\n\t\t\tarrayForEach(snapshot, (child) => {\n\t\t\t\ttry {\n\t\t\t\t\tremove(child);\n\t\t\t\t} catch (_) {}\n\t\t\t});\n\t\t}\n\t\tconst attributes = getAttributes(root);\n\t\tif (attributes) for (let i = attributes.length - 1; i >= 0; --i) {\n\t\t\tconst attribute = attributes[i];\n\t\t\tconst name = attribute && attribute.name;\n\t\t\tif (typeof name === \"string\") _stripAttributeNode(root, attribute, name);\n\t\t}\n\t};\n\t/**\n\t* _removeAttribute\n\t*\n\t* Name-based getAttributeNode()/removeAttribute() ASCII-lowercase their\n\t* lookup key for HTML elements in an HTML document, so they silently miss an\n\t* attribute whose stored qualified name still contains uppercase ASCII\n\t* letters. That happens when the node came from a case-preserving source\n\t* (an XML/XHTML document imported via importNode(), or createAttributeNS()),\n\t* where e.g. `ONERROR` survives the walk: the policy check lowercases to\n\t* `onerror` and rejects it, but `removeAttribute('ONERROR')` looks up\n\t* `onerror` and finds nothing. Remove the exact Attr node instead, which is\n\t* case- and namespace-exact, and fall back to name-based removal only when\n\t* the caller could not supply the node.\n\t*\n\t* @param name an Attribute name\n\t* @param element a DOM node\n\t* @param attr the exact Attr node to remove, when the caller has it\n\t*/\n\tconst _removeAttribute = function _removeAttribute(name, element, attr) {\n\t\tif (!attr) try {\n\t\t\tattr = element.getAttributeNode(name);\n\t\t} catch (_) {\n\t\t\tattr = null;\n\t\t}\n\t\tarrayPush(DOMPurify.removed, {\n\t\t\tattribute: attr || null,\n\t\t\tfrom: element\n\t\t});\n\t\ttry {\n\t\t\tif (attr) removeAttributeNode(element, attr);\n\t\t\telse element.removeAttribute(name);\n\t\t} catch (_) {\n\t\t\ttry {\n\t\t\t\telement.removeAttribute(name);\n\t\t\t} catch (_) {}\n\t\t}\n\t\tif (name === \"is\") {\n\t\t\tif (RETURN_DOM || RETURN_DOM_FRAGMENT) try {\n\t\t\t\t_forceRemove(element);\n\t\t\t} catch (_) {}\n\t\t\telse try {\n\t\t\t\telement.setAttribute(name, \"\");\n\t\t\t} catch (_) {}\n\t\t}\n\t};\n\t/**\n\t* _stripDisallowedAttributes\n\t*\n\t* Removes every attribute the active configuration does not allow from a\n\t* single element, using the same allowlist as the main attribute pass (so\n\t* `on*` handlers go, but no `/^on/` blocklist is introduced). Used only to\n\t* neutralise nodes that are being discarded from an in-place tree.\n\t*\n\t* @param element the element to strip\n\t*/\n\tconst _stripDisallowedAttributes = function _stripDisallowedAttributes(element) {\n\t\tconst attributes = getAttributes(element);\n\t\tif (!attributes) return;\n\t\tfor (let i = attributes.length - 1; i >= 0; --i) {\n\t\t\tconst attribute = attributes[i];\n\t\t\tconst name = attribute && attribute.name;\n\t\t\tif (typeof name !== \"string\" || ALLOWED_ATTR[transformCaseFunc(name)]) continue;\n\t\t\t_stripAttributeNode(element, attribute, name);\n\t\t}\n\t};\n\t/**\n\t* _neutralizeSubtree\n\t*\n\t* Completes the audit-5 F1 fix across every removal path. The KEEP_CONTENT\n\t* move-hoist neutralises only disallowed-tag removals; clobber, mXSS-canary,\n\t* namespace, comment, processing-instruction and KEEP_CONTENT:false removals\n\t* all drop their subtree wholesale via `_forceRemove`. On the IN_PLACE path\n\t* those dropped nodes are detached from the caller's LIVE tree but a\n\t* handler-bearing original among them (an `<img onerror>`/`<video>` that was\n\t* loading) keeps its queued resource event, which fires in page scope after\n\t* sanitize returns. This walks a removed subtree and strips every attribute\n\t* the active configuration does not allow — so `on*` handlers are cancelled\n\t* through the SAME allowlist that governs kept nodes, not a separate `/^on/`\n\t* blocklist. Run synchronously before sanitize returns, i.e. before any\n\t* queued event can fire. Hook-free by design: these nodes leave the output,\n\t* so firing attribute hooks for them would be surprising. Clobber-safe reads;\n\t* a doomed clobbered node may shadow `removeAttribute` (its own attributes are\n\t* irrelevant — it is discarded — while its non-clobbered descendants, e.g.\n\t* the `<img>`, are reached and scrubbed).\n\t*\n\t* @param root the root of a removed subtree to neutralise\n\t*/\n\tconst _neutralizeSubtree = function _neutralizeSubtree(root) {\n\t\tconst stack = [root];\n\t\twhile (stack.length > 0) {\n\t\t\tconst node = stack.pop();\n\t\t\tif (_readNodeType(node) === NODE_TYPE.element) _stripDisallowedAttributes(node);\n\t\t\tconst childNodes = getChildNodes(node);\n\t\t\tif (childNodes) for (let i = childNodes.length - 1; i >= 0; --i) stack.push(childNodes[i]);\n\t\t}\n\t};\n\t/**\n\t* _neutralizePatchLinkage\n\t*\n\t* IN_PLACE entry pre-pass (declarative-partial-updates / streaming\n\t* hardening, https://github.com/WICG/declarative-partial-updates).\n\t*\n\t* The main walk strips patch linkage (`for`/`patchsrc`) and removes range\n\t* markers (PIs / markup comments) node-by-node, in document order, AS it\n\t* reaches each node. On a live in-place root that leaves a window: from the\n\t* moment the root is connected until the walk arrives at a given node, that\n\t* node's linkage is live. A patch applied on connection/stream can fire as\n\t* a microtask during the walk and inject or teleport an unsanitized DOM\n\t* range into a region the iterator has already passed and will not revisit,\n\t* so the post-return \"tree is sanitized\" contract is violated. Sweep the\n\t* whole tree once up front and sever every linkage before the walk begins,\n\t* closing that window.\n\t*\n\t* This CANNOT undo a patch that already fired before sanitize ran — that is\n\t* the irreducible \"do not IN_PLACE a live-connected attacker tree\" caveat —\n\t* but it closes everything from sanitize-start onward. Gated on SAFE_FOR_XML\n\t* to group with the rest of the declarative-partial-updates handling and\n\t* stay overridable, consistent with the codebase.\n\t*\n\t* Clobber-safe traversal (cached childNodes getter); per-node try/catch so a\n\t* clobbered root cannot defeat the sweep of its non-clobbered descendants.\n\t*\n\t* NOTE (pending real-Chrome confirmation, see test/declarative-patch-probe\n\t* .html Q1): this mirrors the existing policy of keeping `for` on\n\t* <label>/<output>. If the shipping feature can drive a patch through a\n\t* surviving `for`-on-label/output + `id` pair, this pre-pass and the\n\t* attribute check at _isBasicCustomElement's caller must additionally drop\n\t* that pair on the IN_PLACE path. Left as-is until the taxonomy is verified.\n\t*\n\t* @param root the in-place root to sweep\n\t*/\n\t/**\n\t* Central policy for declarative-partial-updates patch-linkage attributes,\n\t* shared by the _neutralizePatchLinkage pre-pass and _isValidAttribute so\n\t* the two sites cannot drift: `patchsrc` always links, `for` links\n\t* everywhere except on <label>/<output>, and the whole policy is gated on\n\t* SAFE_FOR_XML (see the rationale block in _isValidAttribute).\n\t*\n\t* @param lcName the transformCaseFunc'd attribute name\n\t* @param lcTag the transformCaseFunc'd tag name of the carrying element\n\t* @return true if the attribute is patch linkage and must be dropped\n\t*/\n\tconst _isPatchLinkageAttribute = function _isPatchLinkageAttribute(lcName, lcTag) {\n\t\tif (!SAFE_FOR_XML) return false;\n\t\tif (lcName === \"patchsrc\") return true;\n\t\treturn lcName === \"for\" && lcTag !== \"label\" && lcTag !== \"output\";\n\t};\n\tconst _neutralizePatchLinkage = function _neutralizePatchLinkage(root) {\n\t\tif (!SAFE_FOR_XML) return;\n\t\tconst stack = [root];\n\t\twhile (stack.length > 0) {\n\t\t\tconst node = stack.pop();\n\t\t\tconst nodeType = _readNodeType(node);\n\t\t\tif (nodeType === NODE_TYPE.processingInstruction || nodeType === NODE_TYPE.comment && regExpTest(COMMENT_MARKUP_PROBE, node.data)) {\n\t\t\t\ttry {\n\t\t\t\t\tremove(node);\n\t\t\t\t} catch (_) {}\n\t\t\t\tcontinue;\n\t\t\t}\n\t\t\tif (nodeType === NODE_TYPE.element) {\n\t\t\t\tconst element = node;\n\t\t\t\tconst lcTag = transformCaseFunc(_readNodeName(node));\n\t\t\t\ttry {\n\t\t\t\t\tif (element.hasAttribute && element.hasAttribute(\"patchsrc\")) element.removeAttribute(\"patchsrc\");\n\t\t\t\t\tif (element.hasAttribute && element.hasAttribute(\"for\") && _isPatchLinkageAttribute(\"for\", lcTag)) element.removeAttribute(\"for\");\n\t\t\t\t} catch (_) {}\n\t\t\t}\n\t\t\tconst childNodes = getChildNodes(node);\n\t\t\tif (childNodes) for (let i = childNodes.length - 1; i >= 0; --i) stack.push(childNodes[i]);\n\t\t}\n\t};\n\t/**\n\t* _initDocument\n\t*\n\t* @param dirty - a string of dirty markup\n\t* @return a DOM, filled with the dirty markup\n\t*/\n\tconst _initDocument = function _initDocument(dirty) {\n\t\tlet doc = null;\n\t\tlet leadingWhitespace = null;\n\t\tif (FORCE_BODY) dirty = \"<remove></remove>\" + dirty;\n\t\telse {\n\t\t\tconst matches = stringMatch(dirty, /^[\\r\\n\\t ]+/);\n\t\t\tleadingWhitespace = matches && matches[0];\n\t\t}\n\t\tif (PARSER_MEDIA_TYPE === \"application/xhtml+xml\" && NAMESPACE === HTML_NAMESPACE) dirty = \"<html xmlns=\\\"http://www.w3.org/1999/xhtml\\\"><head></head><body>\" + dirty + \"</body></html>\";\n\t\tconst dirtyPayload = trustedTypesPolicy ? _createTrustedHTML(dirty) : dirty;\n\t\tif (NAMESPACE === HTML_NAMESPACE) try {\n\t\t\tdoc = new DOMParser().parseFromString(dirtyPayload, PARSER_MEDIA_TYPE);\n\t\t} catch (_) {}\n\t\tif (!doc || !doc.documentElement) {\n\t\t\tdoc = implementation.createDocument(NAMESPACE, \"template\", null);\n\t\t\ttry {\n\t\t\t\tdoc.documentElement.innerHTML = IS_EMPTY_INPUT ? emptyHTML : dirtyPayload;\n\t\t\t} catch (_) {}\n\t\t}\n\t\tconst body = doc.body || doc.documentElement;\n\t\tif (dirty && leadingWhitespace) body.insertBefore(document.createTextNode(leadingWhitespace), body.childNodes[0] || null);\n\t\tif (NAMESPACE === HTML_NAMESPACE) return getElementsByTagName.call(doc, WHOLE_DOCUMENT ? \"html\" : \"body\")[0];\n\t\treturn WHOLE_DOCUMENT ? doc.documentElement : body;\n\t};\n\t/**\n\t* Creates a NodeIterator object that you can use to traverse filtered lists of nodes or elements in a document.\n\t*\n\t* @param root The root element or node to start traversing on.\n\t* @return The created NodeIterator\n\t*/\n\tconst _createNodeIterator = function _createNodeIterator(root) {\n\t\tconst doc = getOwnerDocument ? getOwnerDocument(root) : root.ownerDocument;\n\t\treturn createNodeIterator.call(doc || root, root, NodeFilter.SHOW_ELEMENT | NodeFilter.SHOW_COMMENT | NodeFilter.SHOW_TEXT | NodeFilter.SHOW_PROCESSING_INSTRUCTION | NodeFilter.SHOW_CDATA_SECTION, null);\n\t};\n\t/**\n\t* Replace template expression syntax (mustache, ERB, template\n\t* literal) with a space; shared by all SAFE_FOR_TEMPLATES scrub\n\t* sites. Order matters: mustache, then ERB, then template literal.\n\t*\n\t* @param value the string to scrub\n\t* @returns the scrubbed string\n\t*/\n\tconst _stripTemplateExpressions = function _stripTemplateExpressions(value) {\n\t\tvalue = stringReplace(value, MUSTACHE_EXPR$1, \" \");\n\t\tvalue = stringReplace(value, ERB_EXPR$1, \" \");\n\t\tvalue = stringReplace(value, TMPLIT_EXPR$1, \" \");\n\t\treturn value;\n\t};\n\t/**\n\t* Strip template-engine expressions ({{...}}, ${...}, <%...%>) from the\n\t* character data of an element subtree. Used as the final safety net for\n\t* SAFE_FOR_TEMPLATES on every DOM-returning code path so that expressions\n\t* which only form after text-node normalization (e.g. fragments split across\n\t* stripped elements) cannot survive into a template-evaluating framework.\n\t*\n\t* Walks text/comment/CDATA/processing-instruction nodes and mutates `.data`\n\t* in place rather than round-tripping through innerHTML. This preserves\n\t* descendant node references (important for IN_PLACE callers), avoids a\n\t* serialize/reparse cycle, and reads literal character data — which means\n\t* `<%...%>` in text content matches the ERB regex against its real bytes\n\t* instead of the HTML-entity-escaped form innerHTML would produce.\n\t*\n\t* Attribute values are not visited here; SAFE_FOR_TEMPLATES handling for\n\t* attributes is performed during the per-node `_sanitizeAttributes` pass.\n\t*\n\t* @param node The root element whose character data should be scrubbed.\n\t*/\n\tconst _scrubTemplateExpressions2 = function _scrubTemplateExpressions(node) {\n\t\tvar _node$querySelectorAl;\n\t\tnode.normalize();\n\t\tconst doc = getOwnerDocument ? getOwnerDocument(node) : node.ownerDocument;\n\t\tconst walker = createNodeIterator.call(doc || node, node, NodeFilter.SHOW_TEXT | NodeFilter.SHOW_COMMENT | NodeFilter.SHOW_CDATA_SECTION | NodeFilter.SHOW_PROCESSING_INSTRUCTION, null);\n\t\tlet currentNode = walker.nextNode();\n\t\twhile (currentNode) {\n\t\t\tcurrentNode.data = _stripTemplateExpressions(currentNode.data);\n\t\t\tcurrentNode = walker.nextNode();\n\t\t}\n\t\tconst templates = (_node$querySelectorAl = node.querySelectorAll) === null || _node$querySelectorAl === void 0 ? void 0 : _node$querySelectorAl.call(node, \"template\");\n\t\tif (templates) arrayForEach(templates, (tmpl) => {\n\t\t\tif (_isDocumentFragment(tmpl.content)) _scrubTemplateExpressions2(tmpl.content);\n\t\t});\n\t};\n\t/**\n\t* _isClobbered\n\t*\n\t* Detect DOM-clobbering on HTMLFormElement nodes. Form is the only HTML\n\t* interface with [LegacyOverrideBuiltIns]; a descendant element with a\n\t* `name` attribute matching a prototype property shadows that property\n\t* on direct reads. We use this check at the IN_PLACE entry-point and\n\t* during attribute sanitization to refuse clobbered forms.\n\t*\n\t* @param element element to check for clobbering attacks\n\t* @return true if clobbered, false if safe\n\t*/\n\tconst _isClobbered = function _isClobbered(element) {\n\t\tconst realTagName = getNodeName ? getNodeName(element) : null;\n\t\tif (typeof realTagName !== \"string\") return false;\n\t\tif (transformCaseFunc(realTagName) !== \"form\") return false;\n\t\treturn typeof element.nodeName !== \"string\" || typeof element.textContent !== \"string\" || typeof element.removeChild !== \"function\" || element.attributes !== getAttributes(element) || typeof element.removeAttribute !== \"function\" || typeof element.removeAttributeNode !== \"function\" || typeof element.getAttributeNode !== \"function\" || typeof element.setAttribute !== \"function\" || typeof element.namespaceURI !== \"string\" || typeof element.insertBefore !== \"function\" || typeof element.hasChildNodes !== \"function\" || element.nodeType !== getNodeType(element) || element.childNodes !== getChildNodes(element);\n\t};\n\t/**\n\t* Checks whether the given value is a DocumentFragment from any realm.\n\t*\n\t* The realm-independent replacement reads `nodeType` through the cached\n\t* Node.prototype getter and compares to the DOCUMENT_FRAGMENT_NODE\n\t* constant (11). nodeType is a numeric value resolved from the node's\n\t* internal slot, identical across realms for the same kind of node.\n\t*\n\t* @param value object to check\n\t* @return true if value is a DocumentFragment-shaped node from any realm\n\t*/\n\tconst _isDocumentFragment = function _isDocumentFragment(value) {\n\t\tif (!getNodeType || typeof value !== \"object\" || value === null) return false;\n\t\ttry {\n\t\t\treturn getNodeType(value) === NODE_TYPE.documentFragment;\n\t\t} catch (_) {\n\t\t\treturn false;\n\t\t}\n\t};\n\t/**\n\t* Checks whether the given object is a DOM node, including nodes that\n\t* originate from a different window/realm (e.g. an iframe's\n\t* contentDocument). The previous `value instanceof Node` check was\n\t* realm-bound: nodes from a different window failed it, causing\n\t* sanitize() to silently stringify them and reset IN_PLACE to false,\n\t* returning the original node unsanitized. See GHSA-4w3q-35jp-p934.\n\t*\n\t* @param value object to check whether it's a DOM node\n\t* @return true if value is a DOM node from any realm\n\t*/\n\tconst _isNode = function _isNode(value) {\n\t\tif (!getNodeType || typeof value !== \"object\" || value === null) return false;\n\t\ttry {\n\t\t\treturn typeof getNodeType(value) === \"number\";\n\t\t} catch (_) {\n\t\t\treturn false;\n\t\t}\n\t};\n\tfunction _executeHooks(hooks, currentNode, data) {\n\t\tif (hooks.length === 0) return;\n\t\tarrayForEach(hooks, (hook) => {\n\t\t\thook.call(DOMPurify, currentNode, data, CONFIG);\n\t\t});\n\t}\n\t/**\n\t* Structural-threat checks that condemn a node regardless of the\n\t* allowlists: mXSS via namespace confusion, risky CSS construction,\n\t* processing instructions, markup-bearing comments. Pure predicate;\n\t* the caller removes. Check order is load-bearing.\n\t*\n\t* @param currentNode the node to inspect\n\t* @param tagName the node's transformCaseFunc'd tag name\n\t* @return true if the node must be removed\n\t*/\n\tconst _isUnsafeNode = function _isUnsafeNode(currentNode, tagName) {\n\t\tif (SAFE_FOR_XML && currentNode.hasChildNodes() && !_isNode(currentNode.firstElementChild) && regExpTest(ELEMENT_MARKUP_PROBE, currentNode.textContent) && regExpTest(ELEMENT_MARKUP_PROBE, currentNode.innerHTML)) return true;\n\t\tif (SAFE_FOR_XML && currentNode.namespaceURI === HTML_NAMESPACE && LITERAL_TEXT_ELEMENTS[tagName] && (_isNode(currentNode.firstElementChild) || typeof currentNode.textContent === \"string\" && regExpTest(LITERAL_TEXT_CLOSE[tagName], currentNode.textContent))) return true;\n\t\tif (currentNode.nodeType === NODE_TYPE.processingInstruction) return true;\n\t\tif (SAFE_FOR_XML && currentNode.nodeType === NODE_TYPE.comment && regExpTest(COMMENT_MARKUP_PROBE, currentNode.data)) return true;\n\t\treturn false;\n\t};\n\t/**\n\t* Evaluate a CUSTOM_ELEMENT_HANDLING check (a RegExp or a predicate\n\t* function, per the validation in _parseConfig) against a name.\n\t* Additional arguments are forwarded to predicate functions - the\n\t* attributeNameCheck predicate receives the tag name as its second\n\t* argument. A null/absent check never matches.\n\t*\n\t* @param check the configured tagNameCheck / attributeNameCheck value\n\t* @param name the name to test\n\t* @param args extra arguments forwarded to a predicate function\n\t* @return true if the check matches the name\n\t*/\n\tconst _matchesNameCheck = function _matchesNameCheck(check, name) {\n\t\tif (check instanceof RegExp) return regExpTest(check, name);\n\t\tif (check instanceof Function) {\n\t\t\tfor (var _len = arguments.length, args = new Array(_len > 2 ? _len - 2 : 0), _key = 2; _key < _len; _key++) args[_key - 2] = arguments[_key];\n\t\t\treturn Boolean(check(name, ...args));\n\t\t}\n\t\treturn false;\n\t};\n\t/**\n\t* Handle a node whose tag is forbidden or not allowlisted: keep\n\t* allowed custom elements (false return exits _sanitizeElements\n\t* early - the namespace and fallback-tag removal checks are\n\t* intentionally skipped for kept custom elements), else hoist\n\t* content per KEEP_CONTENT and remove.\n\t*\n\t* A kept custom element is the ONLY case in which this function\n\t* returns false, so the caller uses that return value to run the\n\t* afterSanitizeElements hook on the kept element and keep the\n\t* element-hook lifecycle consistent with normal allowlisted\n\t* elements (GHSA-c2j3-45gr-mqc4).\n\t*\n\t* @param currentNode the disallowed node\n\t* @param tagName the node's transformCaseFunc'd tag name\n\t* @return true if the node was removed, false if kept\n\t*/\n\tconst _sanitizeDisallowedNode = function _sanitizeDisallowedNode(currentNode, tagName, root) {\n\t\tif (!FORBID_TAGS[tagName] && _isBasicCustomElement(tagName) && _matchesNameCheck(CUSTOM_ELEMENT_HANDLING.tagNameCheck, tagName)) return false;\n\t\tif (KEEP_CONTENT && !FORBID_CONTENTS[tagName]) {\n\t\t\tconst parentNode = getParentNode(currentNode);\n\t\t\tconst childNodes = getChildNodes(currentNode);\n\t\t\tif (childNodes && parentNode) {\n\t\t\t\tconst childCount = childNodes.length;\n\t\t\t\tfor (let i = childCount - 1; i >= 0; --i) {\n\t\t\t\t\tconst hoisted = currentNode === root ? cloneNode(childNodes[i], true) : childNodes[i];\n\t\t\t\t\tparentNode.insertBefore(hoisted, getNextSibling(currentNode));\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\t_forceRemove(currentNode);\n\t\treturn true;\n\t};\n\t/**\n\t* Fork a hook-mutable allowlist off its shared binding the first time a\n\t* (possibly lazily-installed) uponSanitize* hook is about to see it, so the\n\t* hook cannot widen the per-instance default or the setConfig binding by\n\t* reference and leak past the call. Returns the set unchanged once it is\n\t* already call-local, so repeated calls across elements are idempotent.\n\t*\n\t* @param hookList the uponSanitize* hook array for this event\n\t* @param set the current ALLOWED_TAGS / ALLOWED_ATTR binding\n\t* @param defaultSet the per-instance DEFAULT_ALLOWED_* constant\n\t* @param setConfigSet the captured setConfig() binding, or null\n\t* @return a call-local clone if a hook is present and set is still shared,\n\t* else set unchanged\n\t*/\n\tconst _forkSharedAllowlist = function _forkSharedAllowlist(hookList, set, defaultSet, setConfigSet) {\n\t\tif (hookList.length === 0) return set;\n\t\treturn set === defaultSet || set === setConfigSet ? clone(set) : set;\n\t};\n\t/**\n\t* Shared guard for a node that a hook has detached from the walk tree,\n\t* used after each element-hook site in _sanitizeElements. Detaching is a\n\t* long-standing user pattern (issue #469; draw.io-style foreignObject\n\t* filtering). Per the cached, unclobberable parentNode getter the node is\n\t* genuinely out of the tree, so it can reach neither the serialized\n\t* output nor an IN_PLACE live tree; treat it as removed and stop\n\t* processing it. Without this guard, the unsafe-node / namespace checks\n\t* would call _forceRemove on a parentless node and hit the REPORT-3\n\t* fail-closed throw — which exists for nodes DOMPurify wants gone but\n\t* *cannot* detach (clobbered / parentless roots), the opposite of a node\n\t* that is already safely gone. The walk root is exempt: a detached\n\t* IN_PLACE root is legitimate input and must still be fully sanitized,\n\t* and a kill-decision on it must keep hitting the REPORT-3 throw.\n\t*\n\t* Nodes detached by hooks stay the hook's responsibility for placement:\n\t* they are not recorded in DOMPurify.removed, so the post-walk IN_PLACE\n\t* pass (which iterates DOMPurify.removed) does not reach them. But a\n\t* hook-detached subtree can still hold a queued resource-event handler -\n\t* e.g. an <img onload> that began loading when the caller built the live\n\t* tree - which fires in page scope after sanitize returns even though the\n\t* handler never reached the returned tree. That is the audit-5 F1 hazard,\n\t* and the documented node.remove() hook pattern walks straight into it.\n\t* So on the IN_PLACE path we neutralize the detached subtree inline,\n\t* stripping its non-allow-listed attributes before returning, exactly as\n\t* the post-walk pass does for _forceRemove'd subtrees.\n\t*\n\t* @param currentNode the node a hook may have detached\n\t* @param root the current walk root\n\t* @return true if the node is detached and now handled, false otherwise\n\t*/\n\tconst _handleHookDetachedNode = function _handleHookDetachedNode(currentNode, root) {\n\t\tif (currentNode === root || getParentNode(currentNode) !== null) return false;\n\t\tif (IN_PLACE) _neutralizeSubtree(currentNode);\n\t\treturn true;\n\t};\n\t/**\n\t* _sanitizeElements\n\t*\n\t* @protect nodeName\n\t* @protect textContent\n\t* @protect removeChild\n\t* @param currentNode to check for permission to exist\n\t* @return true if node was killed, false if left alive\n\t*/\n\tconst _sanitizeElements = function _sanitizeElements(currentNode, root) {\n\t\t_executeHooks(hooks.beforeSanitizeElements, currentNode, null);\n\t\tif (_handleHookDetachedNode(currentNode, root)) return true;\n\t\tif (_isClobbered(currentNode)) {\n\t\t\t_forceRemove(currentNode);\n\t\t\treturn true;\n\t\t}\n\t\tconst tagName = transformCaseFunc(_readNodeName(currentNode));\n\t\tALLOWED_TAGS = _forkSharedAllowlist(hooks.uponSanitizeElement, ALLOWED_TAGS, DEFAULT_ALLOWED_TAGS, SET_CONFIG_ALLOWED_TAGS);\n\t\t_executeHooks(hooks.uponSanitizeElement, currentNode, {\n\t\t\ttagName,\n\t\t\tallowedTags: ALLOWED_TAGS\n\t\t});\n\t\tif (_handleHookDetachedNode(currentNode, root)) return true;\n\t\tif (_isUnsafeNode(currentNode, tagName)) {\n\t\t\t_forceRemove(currentNode);\n\t\t\treturn true;\n\t\t}\n\t\tif (FORBID_TAGS[tagName] || !(EXTRA_ELEMENT_HANDLING.tagCheck instanceof Function && EXTRA_ELEMENT_HANDLING.tagCheck(tagName)) && !ALLOWED_TAGS[tagName]) {\n\t\t\tconst removed = _sanitizeDisallowedNode(currentNode, tagName, root);\n\t\t\tif (removed === false) {\n\t\t\t\t_executeHooks(hooks.afterSanitizeElements, currentNode, null);\n\t\t\t\tif (_handleHookDetachedNode(currentNode, root)) return true;\n\t\t\t}\n\t\t\treturn removed;\n\t\t}\n\t\tif (_readNodeType(currentNode) === NODE_TYPE.element && !_checkValidNamespace(currentNode)) {\n\t\t\t_forceRemove(currentNode);\n\t\t\treturn true;\n\t\t}\n\t\tif ((tagName === \"noscript\" || tagName === \"noembed\" || tagName === \"noframes\") && regExpTest(FALLBACK_TAG_CLOSE, currentNode.innerHTML)) {\n\t\t\t_forceRemove(currentNode);\n\t\t\treturn true;\n\t\t}\n\t\tif (SAFE_FOR_TEMPLATES && currentNode.nodeType === NODE_TYPE.text) {\n\t\t\tconst content = _stripTemplateExpressions(currentNode.textContent);\n\t\t\tif (currentNode.textContent !== content) {\n\t\t\t\tarrayPush(DOMPurify.removed, { element: currentNode.cloneNode() });\n\t\t\t\tcurrentNode.textContent = content;\n\t\t\t}\n\t\t}\n\t\t_executeHooks(hooks.afterSanitizeElements, currentNode, null);\n\t\treturn _handleHookDetachedNode(currentNode, root);\n\t};\n\t/**\n\t* _isValidAttribute\n\t*\n\t* @param lcTag Lowercase tag name of containing element.\n\t* @param lcName Lowercase attribute name.\n\t* @param value Attribute value.\n\t* @return Returns true if `value` is valid, otherwise false.\n\t*/\n\tconst _isValidAttribute = function _isValidAttribute(lcTag, lcName, value) {\n\t\tif (FORBID_ATTR[lcName]) return false;\n\t\tif (_isPatchLinkageAttribute(lcName, lcTag)) return false;\n\t\tif (SANITIZE_DOM && (lcName === \"id\" || lcName === \"name\") && (value in document || value in formElement)) return false;\n\t\tconst nameIsPermitted = ALLOWED_ATTR[lcName] || EXTRA_ELEMENT_HANDLING.attributeCheck instanceof Function && EXTRA_ELEMENT_HANDLING.attributeCheck(lcName, lcTag);\n\t\tif (ALLOW_DATA_ATTR && regExpTest(DATA_ATTR$1, lcName)) return true;\n\t\tif (ALLOW_ARIA_ATTR && regExpTest(ARIA_ATTR$1, lcName)) return true;\n\t\tif (!nameIsPermitted) return _isBasicCustomElement(lcTag) && _matchesNameCheck(CUSTOM_ELEMENT_HANDLING.tagNameCheck, lcTag) && _matchesNameCheck(CUSTOM_ELEMENT_HANDLING.attributeNameCheck, lcName, lcTag) || lcName === \"is\" && CUSTOM_ELEMENT_HANDLING.allowCustomizedBuiltInElements && _matchesNameCheck(CUSTOM_ELEMENT_HANDLING.tagNameCheck, value);\n\t\tif (URI_SAFE_ATTRIBUTES[lcName]) return true;\n\t\tif (regExpTest(IS_ALLOWED_URI$1, stringReplace(value, ATTR_WHITESPACE$1, \"\"))) return true;\n\t\tif ((lcName === \"src\" || lcName === \"xlink:href\" || lcName === \"href\") && lcTag !== \"script\" && stringIndexOf(value, \"data:\") === 0 && DATA_URI_TAGS[lcTag]) return true;\n\t\tif (ALLOW_UNKNOWN_PROTOCOLS && !regExpTest(IS_SCRIPT_OR_DATA$1, stringReplace(value, ATTR_WHITESPACE$1, \"\"))) return true;\n\t\treturn !value;\n\t};\n\tconst RESERVED_CUSTOM_ELEMENT_NAMES = addToSet({}, [\n\t\t\"annotation-xml\",\n\t\t\"color-profile\",\n\t\t\"font-face\",\n\t\t\"font-face-format\",\n\t\t\"font-face-name\",\n\t\t\"font-face-src\",\n\t\t\"font-face-uri\",\n\t\t\"missing-glyph\"\n\t]);\n\t/**\n\t* _isBasicCustomElement\n\t* checks if at least one dash is included in tagName, and it's not the first char\n\t* for more sophisticated checking see https://github.com/sindresorhus/validate-element-name\n\t*\n\t* @param tagName name of the tag of the node to sanitize\n\t* @returns Returns true if the tag name meets the basic criteria for a custom element, otherwise false.\n\t*/\n\tconst _isBasicCustomElement = function _isBasicCustomElement(tagName) {\n\t\treturn !RESERVED_CUSTOM_ELEMENT_NAMES[stringToLowerCase(tagName)] && regExpTest(CUSTOM_ELEMENT$1, tagName);\n\t};\n\t/**\n\t* Wrap an attribute value in the matching Trusted Types object when\n\t* the active policy requires it. Namespaced attributes pass through\n\t* unchanged (no TT support yet, see\n\t* https://bugs.chromium.org/p/chromium/issues/detail?id=1305293).\n\t*\n\t* @param lcTag lowercase tag name of the containing element\n\t* @param lcName lowercase attribute name\n\t* @param namespaceURI the attribute's namespace, if any\n\t* @param value the attribute value to wrap\n\t* @return the value, wrapped when Trusted Types demand it\n\t*/\n\tconst _applyTrustedTypesToAttribute = function _applyTrustedTypesToAttribute(lcTag, lcName, namespaceURI, value) {\n\t\tif (trustedTypesPolicy && typeof trustedTypes === \"object\" && typeof trustedTypes.getAttributeType === \"function\" && !namespaceURI) switch (trustedTypes.getAttributeType(lcTag, lcName)) {\n\t\t\tcase \"TrustedHTML\": return _createTrustedHTML(value);\n\t\t\tcase \"TrustedScriptURL\": return _createTrustedScriptURL(value);\n\t\t}\n\t\treturn value;\n\t};\n\t/**\n\t* Write a modified attribute value back onto the element. On\n\t* success, re-probe for clobbering introduced by the new value and\n\t* remove the element when found; otherwise, when this writeback is the\n\t* recreate half of the SANITIZE_NAMED_PROPS remove-and-recreate, pop the\n\t* removal entry that path recorded so it does not show as removed. On\n\t* failure, remove the attribute instead.\n\t*\n\t* Returns true only on a clean write (the value was set and the new value\n\t* introduced no clobbering). The caller uses that, together with its own\n\t* knowledge of whether this attribute pushed a DOMPurify.removed record, to\n\t* decide whether to pop that record. The pop must happen ONLY for the\n\t* named-prop remove-and-recreate; popping on any other value change (trim,\n\t* template scrubbing, Trusted Types) would consume an unrelated _forceRemove\n\t* subtree-cleanup record and let that detached subtree keep a live event\n\t* handler through the IN_PLACE neutralization pass (SO-001).\n\t*\n\t* @param currentNode the element carrying the attribute\n\t* @param name the attribute name as present on the element\n\t* @param namespaceURI the attribute's namespace, if any\n\t* @param value the new attribute value\n\t* @return true if the value was written without introducing clobbering\n\t*/\n\tconst _setAttributeValue = function _setAttributeValue(currentNode, name, namespaceURI, value) {\n\t\ttry {\n\t\t\tif (namespaceURI) currentNode.setAttributeNS(namespaceURI, name, value);\n\t\t\telse currentNode.setAttribute(name, value);\n\t\t\tif (_isClobbered(currentNode)) {\n\t\t\t\t_forceRemove(currentNode);\n\t\t\t\treturn false;\n\t\t\t}\n\t\t\treturn true;\n\t\t} catch (_) {\n\t\t\t_removeAttribute(name, currentNode);\n\t\t\treturn false;\n\t\t}\n\t};\n\t/**\n\t* _sanitizeAttributes\n\t*\n\t* @protect attributes\n\t* @protect nodeName\n\t* @protect removeAttribute\n\t* @protect setAttribute\n\t*\n\t* @param currentNode to sanitize\n\t* @param root the current walk root\n\t*/\n\tconst _sanitizeAttributes = function _sanitizeAttributes(currentNode, root) {\n\t\t_executeHooks(hooks.beforeSanitizeAttributes, currentNode, null);\n\t\tif (_handleHookDetachedNode(currentNode, root)) return;\n\t\tconst attributes = currentNode.attributes;\n\t\tif (!attributes || _isClobbered(currentNode)) return;\n\t\tALLOWED_ATTR = _forkSharedAllowlist(hooks.uponSanitizeAttribute, ALLOWED_ATTR, DEFAULT_ALLOWED_ATTR, SET_CONFIG_ALLOWED_ATTR);\n\t\tconst hookEvent = {\n\t\t\tattrName: \"\",\n\t\t\tattrValue: \"\",\n\t\t\tkeepAttr: true,\n\t\t\tallowedAttributes: ALLOWED_ATTR,\n\t\t\tforceKeepAttr: void 0\n\t\t};\n\t\tlet l = attributes.length;\n\t\tconst lcTag = transformCaseFunc(currentNode.nodeName);\n\t\twhile (l--) {\n\t\t\tconst attr = attributes[l];\n\t\t\tconst name = attr.name, namespaceURI = attr.namespaceURI, attrValue = attr.value;\n\t\t\tconst lcName = transformCaseFunc(name);\n\t\t\tconst initValue = attrValue;\n\t\t\tlet value = name === \"value\" ? initValue : stringTrim(initValue);\n\t\t\tlet recreatedNamedProp = false;\n\t\t\thookEvent.attrName = lcName;\n\t\t\thookEvent.attrValue = value;\n\t\t\thookEvent.keepAttr = true;\n\t\t\thookEvent.forceKeepAttr = void 0;\n\t\t\t_executeHooks(hooks.uponSanitizeAttribute, currentNode, hookEvent);\n\t\t\tvalue = hookEvent.attrValue;\n\t\t\tif (SANITIZE_NAMED_PROPS && (lcName === \"id\" || lcName === \"name\") && stringIndexOf(value, SANITIZE_NAMED_PROPS_PREFIX) !== 0) {\n\t\t\t\t_removeAttribute(name, currentNode, attr);\n\t\t\t\tvalue = SANITIZE_NAMED_PROPS_PREFIX + value;\n\t\t\t\trecreatedNamedProp = true;\n\t\t\t}\n\t\t\tif (SAFE_FOR_XML && regExpTest(/((--!?|])>)|<\\/(style|script|title|xmp|textarea|noscript|iframe|noembed|noframes)/i, value)) {\n\t\t\t\t_removeAttribute(name, currentNode, attr);\n\t\t\t\tcontinue;\n\t\t\t}\n\t\t\tif (lcName === \"attributename\" && stringMatch(value, \"href\")) {\n\t\t\t\t_removeAttribute(name, currentNode, attr);\n\t\t\t\tcontinue;\n\t\t\t}\n\t\t\tif (hookEvent.forceKeepAttr) continue;\n\t\t\tif (!hookEvent.keepAttr) {\n\t\t\t\t_removeAttribute(name, currentNode, attr);\n\t\t\t\tcontinue;\n\t\t\t}\n\t\t\tif (!ALLOW_SELF_CLOSE_IN_ATTR && regExpTest(SELF_CLOSING_TAG, value)) {\n\t\t\t\t_removeAttribute(name, currentNode, attr);\n\t\t\t\tcontinue;\n\t\t\t}\n\t\t\tif (SAFE_FOR_TEMPLATES) value = _stripTemplateExpressions(value);\n\t\t\tif (!_isValidAttribute(lcTag, lcName, value)) {\n\t\t\t\t_removeAttribute(name, currentNode, attr);\n\t\t\t\tcontinue;\n\t\t\t}\n\t\t\tvalue = _applyTrustedTypesToAttribute(lcTag, lcName, namespaceURI, value);\n\t\t\tif (value !== initValue) {\n\t\t\t\tif (_setAttributeValue(currentNode, name, namespaceURI, value) && recreatedNamedProp) arrayPop(DOMPurify.removed);\n\t\t\t}\n\t\t}\n\t\t_executeHooks(hooks.afterSanitizeAttributes, currentNode, null);\n\t\t_handleHookDetachedNode(currentNode, root);\n\t};\n\t/**\n\t* _sanitizeShadowDOM\n\t*\n\t* @param fragment to iterate over recursively\n\t*/\n\tconst _sanitizeShadowDOM2 = function _sanitizeShadowDOM(fragment) {\n\t\tlet shadowNode = null;\n\t\tconst shadowIterator = _createNodeIterator(fragment);\n\t\t_executeHooks(hooks.beforeSanitizeShadowDOM, fragment, null);\n\t\twhile (shadowNode = shadowIterator.nextNode()) {\n\t\t\t_executeHooks(hooks.uponSanitizeShadowNode, shadowNode, null);\n\t\t\t_sanitizeElements(shadowNode, fragment);\n\t\t\t_sanitizeAttributes(shadowNode, fragment);\n\t\t\tif (_isDocumentFragment(shadowNode.content)) _sanitizeShadowDOM2(shadowNode.content);\n\t\t\tif (_readNodeType(shadowNode) === NODE_TYPE.element) {\n\t\t\t\tconst innerSr = getShadowRoot(shadowNode);\n\t\t\t\tif (_isDocumentFragment(innerSr)) {\n\t\t\t\t\t_sanitizeAttachedShadowRoots(innerSr);\n\t\t\t\t\t_sanitizeShadowDOM2(innerSr);\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\t_executeHooks(hooks.afterSanitizeShadowDOM, fragment, null);\n\t};\n\t/**\n\t* _sanitizeAttachedShadowRoots\n\t*\n\t* Walks `root` and feeds every attached shadow root we encounter into\n\t* the existing _sanitizeShadowDOM pipeline. The default node iterator\n\t* does not descend into shadow trees, so nodes inside an attached\n\t* shadow root would otherwise be skipped entirely.\n\t*\n\t* Two real input paths put attached shadow roots in front of us:\n\t* 1. IN_PLACE on a DOM node that already has shadow roots attached.\n\t* 2. DOM-node input where importNode(dirty, true) deep-clones the\n\t* shadow root because it was created with `clonable: true`.\n\t*\n\t* This pass runs once, up front, so the main iteration loop (and the\n\t* existing _sanitizeShadowDOM template-content recursion) stay\n\t* untouched — string-input paths are not affected.\n\t*\n\t* @param root the subtree root to walk for attached shadow roots\n\t*/\n\tconst _sanitizeAttachedShadowRoots = function _sanitizeAttachedShadowRoots(root) {\n\t\tconst stack = [{\n\t\t\tnode: root,\n\t\t\tshadow: null\n\t\t}];\n\t\twhile (stack.length > 0) {\n\t\t\tconst item = stack.pop();\n\t\t\tif (item.shadow) {\n\t\t\t\t_sanitizeShadowDOM2(item.shadow);\n\t\t\t\tcontinue;\n\t\t\t}\n\t\t\tconst node = item.node;\n\t\t\tconst isElement = _readNodeType(node) === NODE_TYPE.element;\n\t\t\tconst childNodes = getChildNodes(node);\n\t\t\tif (childNodes) for (let i = childNodes.length - 1; i >= 0; --i) stack.push({\n\t\t\t\tnode: childNodes[i],\n\t\t\t\tshadow: null\n\t\t\t});\n\t\t\tif (isElement) {\n\t\t\t\tconst rootName = getNodeName ? getNodeName(node) : null;\n\t\t\t\tif (typeof rootName === \"string\" && transformCaseFunc(rootName) === \"template\") {\n\t\t\t\t\tconst content = node.content;\n\t\t\t\t\tif (_isDocumentFragment(content)) stack.push({\n\t\t\t\t\t\tnode: content,\n\t\t\t\t\t\tshadow: null\n\t\t\t\t\t});\n\t\t\t\t}\n\t\t\t}\n\t\t\tif (isElement) {\n\t\t\t\tconst sr = getShadowRoot(node);\n\t\t\t\tif (_isDocumentFragment(sr)) stack.push({\n\t\t\t\t\tnode: null,\n\t\t\t\t\tshadow: sr\n\t\t\t\t}, {\n\t\t\t\t\tnode: sr,\n\t\t\t\t\tshadow: null\n\t\t\t\t});\n\t\t\t}\n\t\t}\n\t};\n\tDOMPurify.sanitize = function(dirty) {\n\t\tlet cfg = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : {};\n\t\tlet body = null;\n\t\tlet importedNode = null;\n\t\tlet currentNode = null;\n\t\tlet returnNode = null;\n\t\tIS_EMPTY_INPUT = !dirty;\n\t\tif (IS_EMPTY_INPUT) dirty = \"<!-->\";\n\t\tif (typeof dirty !== \"string\" && !_isNode(dirty)) {\n\t\t\tdirty = stringifyValue(dirty);\n\t\t\tif (typeof dirty !== \"string\") throw typeErrorCreate(\"dirty is not a string, aborting\");\n\t\t}\n\t\tif (!DOMPurify.isSupported) return dirty;\n\t\tif (SET_CONFIG) {\n\t\t\tALLOWED_TAGS = SET_CONFIG_ALLOWED_TAGS;\n\t\t\tALLOWED_ATTR = SET_CONFIG_ALLOWED_ATTR;\n\t\t} else _parseConfig(cfg);\n\t\tif (hooks.uponSanitizeElement.length > 0 || hooks.uponSanitizeAttribute.length > 0) ALLOWED_TAGS = clone(ALLOWED_TAGS);\n\t\tif (hooks.uponSanitizeAttribute.length > 0) ALLOWED_ATTR = clone(ALLOWED_ATTR);\n\t\tDOMPurify.removed = [];\n\t\tconst inPlace = IN_PLACE && typeof dirty !== \"string\" && _isNode(dirty);\n\t\tif (inPlace) {\n\t\t\t_neutralizePatchLinkage(dirty);\n\t\t\tconst nn = _readNodeName(dirty);\n\t\t\tif (typeof nn === \"string\") {\n\t\t\t\tconst tagName = transformCaseFunc(nn);\n\t\t\t\tif (!ALLOWED_TAGS[tagName] || FORBID_TAGS[tagName]) {\n\t\t\t\t\t_neutralizeRoot(dirty);\n\t\t\t\t\tthrow typeErrorCreate(\"root node is forbidden and cannot be sanitized in-place\");\n\t\t\t\t}\n\t\t\t}\n\t\t\tif (_isClobbered(dirty)) {\n\t\t\t\t_neutralizeRoot(dirty);\n\t\t\t\tthrow typeErrorCreate(\"root node is clobbered and cannot be sanitized in-place\");\n\t\t\t}\n\t\t\ttry {\n\t\t\t\t_sanitizeAttachedShadowRoots(dirty);\n\t\t\t} catch (error) {\n\t\t\t\t_neutralizeRoot(dirty);\n\t\t\t\tthrow error;\n\t\t\t}\n\t\t} else if (_isNode(dirty)) {\n\t\t\tbody = _initDocument(\"<!---->\");\n\t\t\timportedNode = body.ownerDocument.importNode(dirty, true);\n\t\t\tif (importedNode.nodeType === NODE_TYPE.element && importedNode.nodeName === \"BODY\") body = importedNode;\n\t\t\telse if (importedNode.nodeName === \"HTML\") body = importedNode;\n\t\t\telse body.appendChild(importedNode);\n\t\t\t_sanitizeAttachedShadowRoots(body);\n\t\t} else {\n\t\t\tif (!RETURN_DOM && !SAFE_FOR_TEMPLATES && !WHOLE_DOCUMENT && dirty.indexOf(\"<\") === -1) return trustedTypesPolicy && RETURN_TRUSTED_TYPE ? _createTrustedHTML(dirty) : dirty;\n\t\t\tbody = _initDocument(dirty);\n\t\t\tif (!body) return RETURN_DOM ? null : RETURN_TRUSTED_TYPE ? emptyHTML : \"\";\n\t\t}\n\t\tif (body && FORCE_BODY) _forceRemove(body.firstChild);\n\t\tconst walkRoot = inPlace ? dirty : body;\n\t\ttry {\n\t\t\tconst nodeIterator = _createNodeIterator(walkRoot);\n\t\t\twhile (currentNode = nodeIterator.nextNode()) {\n\t\t\t\t_sanitizeElements(currentNode, walkRoot);\n\t\t\t\t_sanitizeAttributes(currentNode, walkRoot);\n\t\t\t\tif (_isDocumentFragment(currentNode.content)) _sanitizeShadowDOM2(currentNode.content);\n\t\t\t}\n\t\t} catch (error) {\n\t\t\tif (inPlace) {\n\t\t\t\t_neutralizeRoot(dirty);\n\t\t\t\tarrayForEach(DOMPurify.removed, (entry) => {\n\t\t\t\t\tif (entry.element) _neutralizeSubtree(entry.element);\n\t\t\t\t});\n\t\t\t}\n\t\t\tthrow error;\n\t\t}\n\t\tif (inPlace) {\n\t\t\tlet rootWasRemoved = false;\n\t\t\tarrayForEach(DOMPurify.removed, (entry) => {\n\t\t\t\tif (entry.element) {\n\t\t\t\t\tif (entry.element === dirty) rootWasRemoved = true;\n\t\t\t\t\t_neutralizeSubtree(entry.element);\n\t\t\t\t}\n\t\t\t});\n\t\t\tif (rootWasRemoved) throw typeErrorCreate(\"a node selected for removal could not be safely returned; refusing to sanitize in place\");\n\t\t\tif (SAFE_FOR_TEMPLATES) _scrubTemplateExpressions2(dirty);\n\t\t\treturn dirty;\n\t\t}\n\t\tif (RETURN_DOM) {\n\t\t\tif (SAFE_FOR_TEMPLATES) _scrubTemplateExpressions2(body);\n\t\t\tif (RETURN_DOM_FRAGMENT) {\n\t\t\t\treturnNode = createDocumentFragment.call(body.ownerDocument);\n\t\t\t\twhile (body.firstChild) returnNode.appendChild(body.firstChild);\n\t\t\t} else returnNode = body;\n\t\t\tif (ALLOWED_ATTR.shadowroot || ALLOWED_ATTR.shadowrootmode) returnNode = importNode.call(originalDocument, returnNode, true);\n\t\t\treturn returnNode;\n\t\t}\n\t\tlet serializedHTML = WHOLE_DOCUMENT ? body.outerHTML : body.innerHTML;\n\t\tif (WHOLE_DOCUMENT && ALLOWED_TAGS[\"!doctype\"] && body.ownerDocument && body.ownerDocument.doctype && body.ownerDocument.doctype.name && regExpTest(DOCTYPE_NAME, body.ownerDocument.doctype.name)) serializedHTML = \"<!DOCTYPE \" + body.ownerDocument.doctype.name + \">\\n\" + serializedHTML;\n\t\tif (SAFE_FOR_TEMPLATES) serializedHTML = _stripTemplateExpressions(serializedHTML);\n\t\treturn trustedTypesPolicy && RETURN_TRUSTED_TYPE ? _createTrustedHTML(serializedHTML) : serializedHTML;\n\t};\n\tDOMPurify.setConfig = function() {\n\t\tlet cfg = arguments.length > 0 && arguments[0] !== void 0 ? arguments[0] : {};\n\t\t_parseConfig(cfg);\n\t\tSET_CONFIG = true;\n\t\tSET_CONFIG_ALLOWED_TAGS = ALLOWED_TAGS;\n\t\tSET_CONFIG_ALLOWED_ATTR = ALLOWED_ATTR;\n\t};\n\tDOMPurify.clearConfig = function() {\n\t\tCONFIG = null;\n\t\tSET_CONFIG = false;\n\t\tSET_CONFIG_ALLOWED_TAGS = null;\n\t\tSET_CONFIG_ALLOWED_ATTR = null;\n\t\ttrustedTypesPolicy = defaultTrustedTypesPolicy;\n\t\temptyHTML = \"\";\n\t};\n\tDOMPurify.isValidAttribute = function(tag, attr, value) {\n\t\tif (!CONFIG) _parseConfig({});\n\t\tconst lcTag = transformCaseFunc(tag);\n\t\tconst lcName = transformCaseFunc(attr);\n\t\treturn _isValidAttribute(lcTag, lcName, value);\n\t};\n\tDOMPurify.addHook = function(entryPoint, hookFunction) {\n\t\tif (typeof hookFunction !== \"function\") return;\n\t\tif (!objectHasOwnProperty(hooks, entryPoint)) return;\n\t\tarrayPush(hooks[entryPoint], hookFunction);\n\t};\n\tDOMPurify.removeHook = function(entryPoint, hookFunction) {\n\t\tif (!objectHasOwnProperty(hooks, entryPoint)) return;\n\t\tif (hookFunction !== void 0) {\n\t\t\tconst index = arrayLastIndexOf(hooks[entryPoint], hookFunction);\n\t\t\treturn index === -1 ? void 0 : arraySplice(hooks[entryPoint], index, 1)[0];\n\t\t}\n\t\treturn arrayPop(hooks[entryPoint]);\n\t};\n\tDOMPurify.removeHooks = function(entryPoint) {\n\t\tif (!objectHasOwnProperty(hooks, entryPoint)) return;\n\t\thooks[entryPoint] = [];\n\t};\n\tDOMPurify.removeAllHooks = function() {\n\t\thooks = _createHooksMap();\n\t};\n\treturn DOMPurify;\n}\nvar purify_default = createDOMPurify();\nexport { purify_default as default };\n\n//# sourceMappingURL=purify.es.mjs.map","import e from \"dompurify\";\n//#region src/utils.ts\nfunction t(e) {\n\tlet t = typeof process < \"u\" && process.env?.DEBUG?.includes(e);\n\treturn (...n) => {\n\t\tt && console.log(`[${e}]`, ...n);\n\t};\n}\nfunction n(e) {\n\treturn !e || typeof e == \"object\" && Object.keys(e).length === 0;\n}\nfunction r(e, t) {\n\treturn e.mode === \"evaluate\" && t;\n}\nfunction i(e, t) {\n\treturn e.mode === \"evaluate\" && t && e.role === \"instructor\";\n}\nfunction a(e, t, n) {\n\treturn Math.min(Math.max(e, t), n);\n}\nfunction o() {\n\treturn crypto.randomUUID();\n}\nfunction s(e, t) {\n\tlet n;\n\treturn (...r) => {\n\t\tclearTimeout(n), n = setTimeout(() => e(...r), t);\n\t};\n}\nfunction c(e, t) {\n\tlet n = [...e], r = t ? l(t) : Math.random;\n\tfor (let e = n.length - 1; e > 0; e--) {\n\t\tlet t = Math.floor(r() * (e + 1));\n\t\t[n[e], n[t]] = [n[t], n[e]];\n\t}\n\treturn n;\n}\nfunction l(e) {\n\tlet t = e;\n\treturn () => (t = (t * 9301 + 49297) % 233280, t / 233280);\n}\nfunction u(e, t, n = {}) {\n\tlet { skipUndefined: r = !0 } = n;\n\tfor (let [n, i] of Object.entries(t)) r && i === void 0 || (e[n] = i);\n}\nfunction d(e, t) {\n\tif (e === t) return !0;\n\tif (!e || !t || typeof e != \"object\" || typeof t != \"object\") return e === t;\n\tlet n = e, r = t;\n\tif (\"answers\" in n && \"answers\" in r) {\n\t\tlet e = n.answers, t = r.answers;\n\t\treturn !Array.isArray(e) || !Array.isArray(t) || e.length !== t.length ? !1 : JSON.stringify(e) === JSON.stringify(t);\n\t}\n\tif (\"value\" in n && \"value\" in r) {\n\t\tlet e = n.value, t = r.value;\n\t\treturn Array.isArray(e) && Array.isArray(t) ? e.length === t.length ? e.length === 0 || typeof e[0] != \"object\" ? e.every((e, n) => e === t[n]) : JSON.stringify(e) === JSON.stringify(t) : !1 : typeof e == \"object\" && typeof t == \"object\" ? JSON.stringify(e) === JSON.stringify(t) : e === t;\n\t}\n\treturn JSON.stringify(e) === JSON.stringify(t);\n}\n//#endregion\n//#region src/authored-colors.ts\nvar f = \"data-pie-authored-ink\", p = \"data-pie-authored-fill\", m = \"data-pie-authored-border\", h = [\n\t\"border-top-color\",\n\t\"border-right-color\",\n\t\"border-bottom-color\",\n\t\"border-left-color\"\n], g = /* @__PURE__ */ new Set([\n\t\"currentcolor\",\n\t\"inherit\",\n\t\"initial\",\n\t\"unset\",\n\t\"revert\",\n\t\"revert-layer\",\n\t\"transparent\"\n]);\nfunction _(e) {\n\tlet t = e?.trim().toLowerCase();\n\treturn !t || g.has(t) || t.includes(\"var(\") ? !1 : b(t)?.a !== 0;\n}\nfunction ee(e) {\n\tlet t = b(e);\n\tif (!t) return \"shade\";\n\tlet n = (e) => (e * t.a + 255 * (1 - t.a)) / 255, [r, i, a] = [\n\t\tn(t.r),\n\t\tn(t.g),\n\t\tn(t.b)\n\t], o = .2126 * B(r) + .7152 * B(i) + .0722 * B(a), s = Math.max(r, i, a) - Math.min(r, i, a);\n\treturn o >= .85 && s <= .08 ? \"light\" : \"shade\";\n}\nfunction v(e) {\n\te.removeAttribute(f), e.removeAttribute(p), e.removeAttribute(m);\n\tlet t = e.hasAttribute(\"style\") ? e.style : void 0, n = (e) => t?.getPropertyValue(e).trim() ?? \"\", r = [], i = n(\"color\"), a = e.localName === \"font\" ? e.getAttribute(\"color\") : null;\n\t_(i || a) && (e.setAttribute(f, \"\"), i && r.push(\"color\"));\n\tlet o = n(\"background-color\"), s = o || y(e.getAttribute(\"bgcolor\"));\n\t_(s) && (e.setAttribute(p, ee(s)), o && r.push(\"background-color\"));\n\tlet c = h.filter((e) => _(n(e)));\n\tc.length && (e.setAttribute(m, \"\"), r.push(...c));\n\tfor (let e of r) t?.getPropertyPriority(e) === \"important\" && t.setProperty(e, t.getPropertyValue(e));\n}\nfunction y(e) {\n\tlet t = e?.trim() ?? \"\";\n\treturn /^(?:[\\da-f]{3}|[\\da-f]{6})$/i.test(t) ? `#${t}` : t;\n}\nfunction b(e) {\n\tlet t = e.trim().toLowerCase();\n\tif (t === \"transparent\") return {\n\t\tr: 0,\n\t\tg: 0,\n\t\tb: 0,\n\t\ta: 0\n\t};\n\tlet n = S().get(t);\n\tif (n) return C(n);\n\tif (t.startsWith(\"#\")) return C(t.slice(1));\n\tlet r = /^([a-z]+)\\(([^()]*)\\)$/.exec(t);\n\tif (!r) return null;\n\tlet i = r[2].trim().split(/\\s*[\\s,/]\\s*/);\n\tif (i.length !== 3 && i.length !== 4) return null;\n\tlet [a, o, s, c] = i, l = D(c), u;\n\tswitch (r[1]) {\n\t\tcase \"rgb\":\n\t\tcase \"rgba\":\n\t\t\tu = [\n\t\t\t\ta,\n\t\t\t\to,\n\t\t\t\ts\n\t\t\t].map((e) => T(e, 255) / 255);\n\t\t\tbreak;\n\t\tcase \"hsl\":\n\t\tcase \"hsla\":\n\t\t\tu = k(E(a), T(o, 100) / 100, T(s, 100) / 100);\n\t\t\tbreak;\n\t\tcase \"hwb\":\n\t\t\tu = A(E(a), T(o, 100) / 100, T(s, 100) / 100);\n\t\t\tbreak;\n\t\tcase \"lab\":\n\t\t\tu = I(T(a, 100), T(o, 125), T(s, 125));\n\t\t\tbreak;\n\t\tcase \"lch\":\n\t\t\tu = I(T(a, 100), ...O(T(o, 150), E(s)));\n\t\t\tbreak;\n\t\tcase \"oklab\":\n\t\t\tu = L(T(a, 1), T(o, .4), T(s, .4));\n\t\t\tbreak;\n\t\tcase \"oklch\":\n\t\t\tu = L(T(a, 1), ...O(T(o, .4), E(s)));\n\t\t\tbreak;\n\t\tdefault: return null;\n\t}\n\tif (Number.isNaN(l) || u.some(Number.isNaN)) return null;\n\tlet [d, f, p] = u.map((e) => V(e, 0, 1) * 255);\n\treturn {\n\t\tr: d,\n\t\tg: f,\n\t\tb: p,\n\t\ta: l\n\t};\n}\nvar x;\nfunction S() {\n\treturn x ??= new Map(\"aliceblue:f0f8ff antiquewhite:faebd7 aqua:00ffff aquamarine:7fffd4 azure:f0ffff beige:f5f5dc bisque:ffe4c4 black:000000 blanchedalmond:ffebcd blue:0000ff blueviolet:8a2be2 brown:a52a2a burlywood:deb887 cadetblue:5f9ea0 chartreuse:7fff00 chocolate:d2691e coral:ff7f50 cornflowerblue:6495ed cornsilk:fff8dc crimson:dc143c cyan:00ffff darkblue:00008b darkcyan:008b8b darkgoldenrod:b8860b darkgray:a9a9a9 darkgreen:006400 darkgrey:a9a9a9 darkkhaki:bdb76b darkmagenta:8b008b darkolivegreen:556b2f darkorange:ff8c00 darkorchid:9932cc darkred:8b0000 darksalmon:e9967a darkseagreen:8fbc8f darkslateblue:483d8b darkslategray:2f4f4f darkslategrey:2f4f4f darkturquoise:00ced1 darkviolet:9400d3 deeppink:ff1493 deepskyblue:00bfff dimgray:696969 dimgrey:696969 dodgerblue:1e90ff firebrick:b22222 floralwhite:fffaf0 forestgreen:228b22 fuchsia:ff00ff gainsboro:dcdcdc ghostwhite:f8f8ff gold:ffd700 goldenrod:daa520 gray:808080 green:008000 greenyellow:adff2f grey:808080 honeydew:f0fff0 hotpink:ff69b4 indianred:cd5c5c indigo:4b0082 ivory:fffff0 khaki:f0e68c lavender:e6e6fa lavenderblush:fff0f5 lawngreen:7cfc00 lemonchiffon:fffacd lightblue:add8e6 lightcoral:f08080 lightcyan:e0ffff lightgoldenrodyellow:fafad2 lightgray:d3d3d3 lightgreen:90ee90 lightgrey:d3d3d3 lightpink:ffb6c1 lightsalmon:ffa07a lightseagreen:20b2aa lightskyblue:87cefa lightslategray:778899 lightslategrey:778899 lightsteelblue:b0c4de lightyellow:ffffe0 lime:00ff00 limegreen:32cd32 linen:faf0e6 magenta:ff00ff maroon:800000 mediumaquamarine:66cdaa mediumblue:0000cd mediumorchid:ba55d3 mediumpurple:9370db mediumseagreen:3cb371 mediumslateblue:7b68ee mediumspringgreen:00fa9a mediumturquoise:48d1cc mediumvioletred:c71585 midnightblue:191970 mintcream:f5fffa mistyrose:ffe4e1 moccasin:ffe4b5 navajowhite:ffdead navy:000080 oldlace:fdf5e6 olive:808000 olivedrab:6b8e23 orange:ffa500 orangered:ff4500 orchid:da70d6 palegoldenrod:eee8aa palegreen:98fb98 paleturquoise:afeeee palevioletred:db7093 papayawhip:ffefd5 peachpuff:ffdab9 peru:cd853f pink:ffc0cb plum:dda0dd powderblue:b0e0e6 purple:800080 rebeccapurple:663399 red:ff0000 rosybrown:bc8f8f royalblue:4169e1 saddlebrown:8b4513 salmon:fa8072 sandybrown:f4a460 seagreen:2e8b57 seashell:fff5ee sienna:a0522d silver:c0c0c0 skyblue:87ceeb slateblue:6a5acd slategray:708090 slategrey:708090 snow:fffafa springgreen:00ff7f steelblue:4682b4 tan:d2b48c teal:008080 thistle:d8bfd8 tomato:ff6347 turquoise:40e0d0 violet:ee82ee wheat:f5deb3 white:ffffff whitesmoke:f5f5f5 yellow:ffff00 yellowgreen:9acd32\".split(\" \").map((e) => e.split(\":\"))), x;\n}\nfunction C(e) {\n\tif (!/^(?:[\\da-f]{3,4}|[\\da-f]{6}|[\\da-f]{8})$/.test(e)) return null;\n\tlet [t, n, r, i = 255] = (e.length <= 4 ? [...e].map((e) => e + e) : e.match(/../g) ?? []).map((e) => Number.parseInt(e, 16));\n\treturn {\n\t\tr: t,\n\t\tg: n,\n\t\tb: r,\n\t\ta: i / 255\n\t};\n}\nvar w = /^([+-]?(?:\\d+\\.?\\d*|\\.\\d+)(?:e[+-]?\\d+)?)(%|deg|rad|grad|turn)?$/;\nfunction T(e, t) {\n\tif (e === \"none\") return 0;\n\tlet n = w.exec(e);\n\treturn !n || n[2] && n[2] !== \"%\" ? NaN : n[2] ? Number(n[1]) / 100 * t : Number(n[1]);\n}\nfunction E(e) {\n\tif (e === \"none\") return 0;\n\tlet t = w.exec(e);\n\tif (!t || t[2] === \"%\") return NaN;\n\tlet n = Number(t[1]);\n\treturn ((t[2] === \"rad\" ? n * 180 / Math.PI : t[2] === \"grad\" ? n * .9 : t[2] === \"turn\" ? n * 360 : n) % 360 + 360) % 360;\n}\nfunction D(e) {\n\treturn e === void 0 ? 1 : V(T(e, 1), 0, 1);\n}\nfunction O(e, t) {\n\tlet n = Math.max(0, e), r = t * Math.PI / 180;\n\treturn [n * Math.cos(r), n * Math.sin(r)];\n}\nfunction k(e, t, n) {\n\tlet r = V(t, 0, 1), i = V(n, 0, 1), a = (t) => {\n\t\tlet n = (t + e / 30) % 12, a = r * Math.min(i, 1 - i);\n\t\treturn i - a * Math.max(-1, Math.min(n - 3, 9 - n, 1));\n\t};\n\treturn [\n\t\ta(0),\n\t\ta(8),\n\t\ta(4)\n\t];\n}\nfunction A(e, t, n) {\n\tlet r = V(t, 0, 1), i = V(n, 0, 1);\n\treturn r + i >= 1 ? [\n\t\t,\n\t\t,\n\t\t,\n\t].fill(r / (r + i)) : k(e, 1, .5).map((e) => e * (1 - r - i) + r);\n}\nvar j = 24389 / 27, M = 216 / 24389, N = [\n\t.3457 / .3585,\n\t1,\n\t.2958 / .3585\n], P = [\n\t[\n\t\t.955473421488075,\n\t\t-.02309845494876471,\n\t\t.06325924320057072\n\t],\n\t[\n\t\t-.0283697093338637,\n\t\t1.0099953980813041,\n\t\t.021041441191917323\n\t],\n\t[\n\t\t.012314014864481998,\n\t\t-.020507649298898964,\n\t\t1.330365926242124\n\t]\n], F = [\n\t[\n\t\t12831 / 3959,\n\t\t-329 / 214,\n\t\t-1974 / 3959\n\t],\n\t[\n\t\t-851781 / 878810,\n\t\t1648619 / 878810,\n\t\t36519 / 878810\n\t],\n\t[\n\t\t705 / 12673,\n\t\t-2585 / 12673,\n\t\t705 / 667\n\t]\n];\nfunction I(e, t, n) {\n\tlet r = V(e, 0, 100), i = (r + 16) / 116, a = t / 500 + i, o = i - n / 200;\n\treturn R(F, R(P, [\n\t\ta ** 3 > M ? a ** 3 : (116 * a - 16) / j,\n\t\tr > j * M ? i ** 3 : r / j,\n\t\to ** 3 > M ? o ** 3 : (116 * o - 16) / j\n\t].map((e, t) => e * N[t]))).map(z);\n}\nfunction L(e, t, n) {\n\tlet r = V(e, 0, 1);\n\treturn R([\n\t\t[\n\t\t\t4.0767416621,\n\t\t\t-3.3077115913,\n\t\t\t.2309699292\n\t\t],\n\t\t[\n\t\t\t-1.2684380046,\n\t\t\t2.6097574011,\n\t\t\t-.3413193965\n\t\t],\n\t\t[\n\t\t\t-.0041960863,\n\t\t\t-.7034186147,\n\t\t\t1.707614701\n\t\t]\n\t], [\n\t\tr + .3963377774 * t + .2158037573 * n,\n\t\tr - .1055613458 * t - .0638541728 * n,\n\t\tr - .0894841775 * t - 1.291485548 * n\n\t].map((e) => e ** 3)).map(z);\n}\nfunction R(e, t) {\n\treturn e.map((e) => e[0] * t[0] + e[1] * t[1] + e[2] * t[2]);\n}\nfunction z(e) {\n\tlet t = V(e, 0, 1);\n\treturn t <= .0031308 ? 12.92 * t : 1.055 * t ** (1 / 2.4) - .055;\n}\nfunction B(e) {\n\treturn e <= .04045 ? e / 12.92 : ((e + .055) / 1.055) ** 2.4;\n}\nfunction V(e, t, n) {\n\treturn Math.min(n, Math.max(t, e));\n}\n//#endregion\n//#region src/sanitize-model-html.ts\nvar H = [\n\t\"script\",\n\t\"embed\",\n\t\"base\",\n\t\"form\",\n\t\"meta\",\n\t\"link\",\n\t\"style\",\n\t\"foreignobject\"\n], U = [\n\t\"onerror\",\n\t\"onload\",\n\t\"onclick\",\n\t\"onmouseover\",\n\t\"onmouseout\",\n\t\"onmouseenter\",\n\t\"onmouseleave\",\n\t\"onfocus\",\n\t\"onblur\",\n\t\"onkeydown\",\n\t\"onkeyup\",\n\t\"onkeypress\",\n\t\"onsubmit\",\n\t\"onchange\",\n\t\"onbeforeunload\",\n\t\"formaction\",\n\t\"xlink:href\"\n], W = /* @__PURE__ */ new Set([\n\t\"iframe\",\n\t\"object\",\n\t\"mstack\",\n\t\"mlongdiv\",\n\t\"msgroup\",\n\t\"msrow\",\n\t\"msline\",\n\t\"mscarries\",\n\t\"mscarry\",\n\t\"semantics\",\n\t\"annotation\",\n\t\"none\"\n]), G = /^[a-z_][\\w.-]*:[a-z][\\w.-]*$/, K = [\n\t\"alignment\",\n\t\"target\",\n\t\"allow\",\n\t\"allowfullscreen\",\n\t\"frameborder\",\n\t\"scrolling\",\n\t\"data\",\n\t\"stackalign\",\n\t\"charalign\",\n\t\"charspacing\",\n\t\"longdivstyle\",\n\t\"position\",\n\t\"shift\",\n\t\"location\",\n\t\"crossout\",\n\t\"leftoverhang\",\n\t\"rightoverhang\",\n\t\"mslinethickness\",\n\t\"linebreak\"\n], q = /^\\s*document\\.getElementById\\((['\"])([^'\"]+)\\1\\)\\.play\\(\\)\\s*;?\\s*(?:return\\s+false\\s*;?\\s*)?$/, J = \"data-pie-play-audio\", Y = {\n\tADD_TAGS: (e) => W.has(e) || G.test(e),\n\tADD_ATTR: K,\n\tFORBID_TAGS: H,\n\tFORBID_ATTR: U,\n\tALLOW_UNKNOWN_PROTOCOLS: !1,\n\tRETURN_TRUSTED_TYPE: !1\n}, te = !1;\nfunction ne(e) {\n\tfor (let t of e.composedPath()) {\n\t\tif (!(t instanceof Element)) continue;\n\t\tlet n = t.getAttribute(J);\n\t\tif (n === null) continue;\n\t\te.preventDefault();\n\t\tlet r = t.getRootNode().getElementById?.(n) ?? document.getElementById(n);\n\t\tr instanceof HTMLMediaElement && r.play()?.catch(() => void 0);\n\t\treturn;\n\t}\n}\nvar X = null;\nfunction re() {\n\treturn X || (X = e(window), X.addHook(\"beforeSanitizeAttributes\", (e) => {\n\t\tif (e.nodeName !== \"A\") return;\n\t\tlet t = q.exec(e.getAttribute(\"onclick\") ?? \"\")?.[2];\n\t\tt !== void 0 && (e.removeAttribute(\"onclick\"), e.setAttribute(J, t), te ||= (document.addEventListener(\"click\", ne), !0));\n\t}), X.addHook(\"afterSanitizeAttributes\", v), X);\n}\nvar Z = 1e6, Q = /* @__PURE__ */ new Map(), $ = 0;\nfunction ie(t) {\n\tif (t == null || t === \"\" || !e.isSupported) return \"\";\n\tlet n = typeof t == \"string\" ? t : String(t), r = Q.get(n);\n\tif (r !== void 0) return r;\n\tlet i = String(re().sanitize(n, Y)), a = n.length + i.length;\n\tif (a > Z) return i;\n\tfor (let [e, t] of Q) {\n\t\tif ($ + a <= Z) break;\n\t\tQ.delete(e), $ -= e.length + t.length;\n\t}\n\treturn Q.set(n, i), $ += a, i;\n}\n//#endregion\nexport { m as AUTHORED_BORDER_ATTR, p as AUTHORED_FILL_ATTR, f as AUTHORED_INK_ATTR, U as MODEL_HTML_FORBIDDEN_ATTRS, H as MODEL_HTML_FORBIDDEN_TAGS, J as PLAY_AUDIO_ATTR, u as assignProps, a as clamp, s as debounce, t as debug, n as isEmpty, v as markAuthoredColors, ie as sanitizeModelHtml, d as sessionsEqual, r as showFeedback, i as showRationale, c as shuffle, o as uuid };\n","export type AudioMode = 'feature-button' | 'controls' | 'error' | 'none';\n\nexport function computeAudioMode(params: {\n hasAudio: boolean;\n audioUrl: string | undefined;\n useFeatureButtonAudio: boolean;\n}): AudioMode {\n if (!params.hasAudio) return 'none';\n if (!params.audioUrl) return 'error';\n return params.useFeatureButtonAudio ? 'feature-button' : 'controls';\n}\n","//#region src/en.ts\nvar e = {\n\ttranslation: {\n\t\tcategorize: {\n\t\t\tlimitMaxChoicesPerCategory: \"You've reached the limit of {{maxChoicesPerCategory}} responses per area. To add another response, one must first be removed.\",\n\t\t\tmaxChoicesPerCategoryRestriction: \"To change this value to {{maxChoicesPerCategory}}, each category must have {{maxChoicesPerCategory}} or fewer answer choice[s].\"\n\t\t},\n\t\tdragInTheBlank: { blank: \"Blank {{index}}\" },\n\t\tebsr: {\n\t\t\tpart: \"Part {{index}}\",\n\t\t\ttwoPartQuestion: \"Two-Part Question\"\n\t\t},\n\t\teditableHtml: {\n\t\t\tresponseAreaToolbar: \"Response area\",\n\t\t\ttoolbar: \"Editing tools\",\n\t\t\tbuttons: {\n\t\t\t\tinsertTable: \"Insert table\",\n\t\t\t\taddTableRow: \"Add table row\",\n\t\t\t\tremoveTableRow: \"Remove table row\",\n\t\t\t\taddTableColumn: \"Add table column\",\n\t\t\t\tremoveTableColumn: \"Remove table column\",\n\t\t\t\tremoveTable: \"Remove table\",\n\t\t\t\ttableBorders: \"Table borders\",\n\t\t\t\tbold: \"Bold\",\n\t\t\t\titalic: \"Italic\",\n\t\t\t\tstrikethrough: \"Strikethrough\",\n\t\t\t\tcode: \"Code\",\n\t\t\t\tunderline: \"Underline\",\n\t\t\t\tsubscript: \"Subscript\",\n\t\t\t\tsuperscript: \"Superscript\",\n\t\t\t\tinsertImage: \"Insert image\",\n\t\t\t\tinsertVideo: \"Insert video\",\n\t\t\t\tinsertAudio: \"Insert audio\",\n\t\t\t\tcssClasses: \"CSS classes\",\n\t\t\t\tblockquote: \"Blockquote\",\n\t\t\t\theading: \"Heading\",\n\t\t\t\tinsertMath: \"Insert math\",\n\t\t\t\tspanishCharacters: \"Spanish characters (ñ)\",\n\t\t\t\tspecialCharacters: \"Special characters (€)\",\n\t\t\t\ttextAlignment: \"Text alignment\",\n\t\t\t\tbulletedList: \"Bulleted list\",\n\t\t\t\tnumberedList: \"Numbered list\",\n\t\t\t\tdone: \"Done\"\n\t\t\t}\n\t\t},\n\t\texplicitConstructedResponse: {\n\t\t\tfillInTheBlankQuestion: \"Fill in the Blank Question\",\n\t\t\tresponse: \"Response {{index}} of {{total}}\"\n\t\t},\n\t\textendedTextEntry: {\n\t\t\tcomment: \"Comment\",\n\t\t\tconstructedResponseQuestion: \"Constructed Response Question\",\n\t\t\tresponse: \"Your response\",\n\t\t\twrittenResponseQuestion: \"Written Response Question\"\n\t\t},\n\t\tfractionModel: {\n\t\t\tmodelLabel_one: \"Model {{index}} of {{total}}: {{selected}} of {{count}} part selected\",\n\t\t\tmodelLabel_other: \"Model {{index}} of {{total}}: {{selected}} of {{count}} parts selected\"\n\t\t},\n\t\tnumberLine: {\n\t\t\taddElementLimit_one: \"You can only add {{count}} element\",\n\t\t\taddElementLimit_other: \"You can only add {{count}} elements\",\n\t\t\tclearAll: \"Clear all\",\n\t\t\tclosedEnd: \"closed\",\n\t\t\telementCorrect: \"Correct.\",\n\t\t\telementIncorrect: \"Incorrect.\",\n\t\t\tgraphLabel: \"Number line from {{min}} to {{max}}, with a tick every {{interval}}\",\n\t\t\tline: \"Line from {{left}} ({{leftEnd}}) to {{right}} ({{rightEnd}}).\",\n\t\t\topenEnd: \"open\",\n\t\t\tplottedNone: \"Nothing is plotted.\",\n\t\t\tpointClosed: \"Closed point at {{position}}.\",\n\t\t\tpointOpen: \"Open point at {{position}}.\",\n\t\t\trayLeft: \"Ray from {{position}} ({{end}}) to the left.\",\n\t\t\trayRight: \"Ray from {{position}} ({{end}}) to the right.\"\n\t\t},\n\t\thotspot: {\n\t\t\tcorrectlySelected: \"Correctly selected\",\n\t\t\timage_one: \"Image with {{count}} hotspot\",\n\t\t\timage_other: \"Image with {{count}} hotspots\",\n\t\t\tshape: \"Hotspot {{index}} of {{total}}\",\n\t\t\tshouldHaveBeenSelected: \"Should have been selected\",\n\t\t\tshouldNotHaveBeenSelected: \"Should not have been selected\"\n\t\t},\n\t\timageClozeAssociation: {\n\t\t\tanswerChoice: \"Answer choice {{index}} of {{total}}\",\n\t\t\timage_one: \"Image with {{count}} response area\",\n\t\t\timage_other: \"Image with {{count}} response areas\",\n\t\t\treachedLimit_one: \"You’ve reached the limit of {{count}} response per area. To add another response, one must first be removed.\",\n\t\t\treachedLimit_other: \"Full\",\n\t\t\tresponseArea: \"Response area {{index}} of {{total}}\"\n\t\t},\n\t\tinlineDropdown: {\n\t\t\tinlineDropdownQuestion: \"Inline Dropdown Question\",\n\t\t\tquery: \"Query\",\n\t\t\tqueryNumber: \"Query {{index}}\",\n\t\t\tshowRationaleForChoices: \"Show Rationale for choices\",\n\t\t\thideRationaleForChoices: \"Hide Rationale for choices\"\n\t\t},\n\t\tdrawingResponse: {\n\t\t\tfillColor: \"Fill color\",\n\t\t\toutlineColor: \"Outline color\",\n\t\t\tnoFill: \"No fill\",\n\t\t\tlightblue: \"Light blue\",\n\t\t\tlightyellow: \"Light yellow\",\n\t\t\tred: \"Red\",\n\t\t\torange: \"Orange\",\n\t\t\tyellow: \"Yellow\",\n\t\t\tviolet: \"Violet\",\n\t\t\tblue: \"Blue\",\n\t\t\tgreen: \"Green\",\n\t\t\twhite: \"White\",\n\t\t\tblack: \"Black\",\n\t\t\tonDoubleClick: \"Double click to edit this text. Press Enter to submit.\",\n\t\t\tdrawingArea: \"Drawing area\",\n\t\t\tdrawingAreaOverImage: \"Drawing area over a background image\",\n\t\t\ttools: {\n\t\t\t\tselect: \"Select\",\n\t\t\t\tfreeDraw: \"Free Draw\",\n\t\t\t\tline: \"Line\",\n\t\t\t\trectangle: \"Rectangle\",\n\t\t\t\tcircle: \"Circle\",\n\t\t\t\ttextEntry: \"Text Entry\",\n\t\t\t\teraser: \"Eraser\"\n\t\t\t}\n\t\t},\n\t\tcharting: {\n\t\t\taddCategory: \"Add category\",\n\t\t\tactions: \"Actions\",\n\t\t\tadd: \"Add\",\n\t\t\tdelete: \"Delete\",\n\t\t\tnewLabel: \"New label\",\n\t\t\tcategoryLabel: \"Category {{index}} label\",\n\t\t\tcategoryLabelValue: \"Category {{index}} label: {{label}}\",\n\t\t\tcategory: \"Category {{index}}\",\n\t\t\treachedLimit_other: \"There can't be more than {{count}} categories.\",\n\t\t\tkeyLegend: {\n\t\t\t\tincorrectAnswer: \"Student incorrect answer\",\n\t\t\t\tcorrectAnswer: \"Student correct answer\",\n\t\t\t\tcorrectKeyAnswer: \"Answer key correct\"\n\t\t\t},\n\t\t\tchartTypes: {\n\t\t\t\tbar: \"Bar chart\",\n\t\t\t\thistogram: \"Histogram\",\n\t\t\t\tlineDot: \"Line chart with dots\",\n\t\t\t\tlineCross: \"Line chart with crosses\",\n\t\t\t\tdotPlot: \"Dot plot\",\n\t\t\t\tlinePlot: \"Line plot\"\n\t\t\t},\n\t\t\tcategories_zero: \"No categories.\",\n\t\t\tcategories_one: \"{{count}} category: {{categories}}.\",\n\t\t\tcategories_other: \"{{count}} categories: {{categories}}.\",\n\t\t\tvalueRange: \"Values from {{min}} to {{max}}.\",\n\t\t\tlabelledValueRange: \"{{label}} from {{min}} to {{max}}.\"\n\t\t},\n\t\tgraphing: {\n\t\t\tgraph: \"Coordinate graph\",\n\t\t\taxisRange: \"{{axis}} axis from {{min}} to {{max}}.\",\n\t\t\tplotted_zero: \"Nothing plotted.\",\n\t\t\tplotted_one: \"{{count}} object plotted: {{marks}}.\",\n\t\t\tplotted_other: \"{{count}} objects plotted: {{marks}}.\",\n\t\t\tshadedRegion: \"Shaded region\",\n\t\t\tpoint: \"Point\",\n\t\t\tcircle: \"Circle\",\n\t\t\tline: \"Line\",\n\t\t\tparabola: \"Parabola\",\n\t\t\tabsolute: \"Absolute Value\",\n\t\t\texponential: \"Exponential\",\n\t\t\tpolygon: \"Polygon\",\n\t\t\tray: \"Ray\",\n\t\t\tsegment: \"Segment\",\n\t\t\tsine: \"Sine\",\n\t\t\tvector: \"Vector\",\n\t\t\tlabel: \"Label\",\n\t\t\tmarkLabel: \"Label at ({{x}}, {{y}})\",\n\t\t\tcorrectMarkLabel: \"Correct label at ({{x}}, {{y}})\",\n\t\t\tredo: \"Redo\",\n\t\t\treset: \"Reset\",\n\t\t\tkeyLegend: {\n\t\t\t\tmissingRequiredLabel: \"Missing Required Label\",\n\t\t\t\tanswerKeyCorrect: \"Answer Key Correct\",\n\t\t\t\tanswerKeyCorrectLabel: \"Answer Key Correct Label\",\n\t\t\t\tstudentIncorrect: \"Student Incorrect\",\n\t\t\t\tincorrectStudentLabel: \"Incorrect Student Label\",\n\t\t\t\tstudentCorrect: \"Student Correct\",\n\t\t\t\tstudentCorrectLabel: \"Student Correct Label\"\n\t\t\t}\n\t\t},\n\t\tmathInline: {\n\t\t\tkeypadInstructions: \"This field supports both keypad and keyboard input. Use the keyboard to access and interact with the on-screen math keypad, which accepts LaTeX markup. Use the down arrow key to open the keypad and navigate its buttons. Use the escape key to close the keypad and return to the input field.\",\n\t\t\tmathEquationResponseQuestion: \"Math Equation Response Question\",\n\t\t\tmathResponseQuestion: \"Math Response Question\",\n\t\t\tprimaryCorrectWithAlternates: \"Note: The answer shown above is the primary correct answer specified by the author for this item, but other answers may also be recognized as correct.\"\n\t\t},\n\t\tmathInput: { enterAnswer: \"Enter answer\" },\n\t\tmcPopulatedBlank: {\n\t\t\tanswerChoices: \"Answer choices\",\n\t\t\tblankLabel: \"blank\",\n\t\t\temptyBlank: \"(blank)\",\n\t\t\tblankPreSelectionHint: \"The answer you choose will appear on the blank line above.\",\n\t\t\tcorrectAnswerSelected: \"Correct answer selected\",\n\t\t\tincorrectAnswerSelected: \"Incorrect answer selected\",\n\t\t\tselectedAnswerImage: \"Selected answer image\",\n\t\t\tchoiceImage: \"Choice {{id}}\",\n\t\t\tclickToEnableAutoplay: \"Click to enable audio autoplay\",\n\t\t\taudioResourceUnavailable: \"Audio is enabled but no playable audio URL is configured.\",\n\t\t\tlisten: \"Listen\",\n\t\t\tlistenSilentAlt: \"Repeat instructions\",\n\t\t\tlistenPlayingAlt: \"Instructions are playing\",\n\t\t\tprintAudio: \"Audio:\",\n\t\t\tprintTranscript: \"Transcript:\"\n\t\t},\n\t\tmultipleChoice: {\n\t\t\tminSelections: \"Select at least {{minSelections}}.\",\n\t\t\tmaxSelections_one: \"Only {{maxSelections}} answer is allowed.\",\n\t\t\tmaxSelections_other: \"Only {{maxSelections}} answers are allowed.\",\n\t\t\tminmaxSelections_equal: \"Select {{minSelections}}.\",\n\t\t\tminmaxSelections_range: \"Select between {{minSelections}} and {{maxSelections}}.\",\n\t\t\tmultipleChoiceQuestion: \"Multiple Choice Question\",\n\t\t\tmultipleCorrectAnswerQuestion: \"Multiple Correct Answer Question\",\n\t\t\tmultipleSelectQuestion: \"Multiple Select Question\"\n\t\t},\n\t\trubric: {\n\t\t\trubric: \"Rubric\",\n\t\t\tshowRubric: \"Show Rubric\",\n\t\t\thideRubric: \"Hide Rubric\"\n\t\t},\n\t\tselectText: {\n\t\t\tcorrectAnswerSelected: \"Correct\",\n\t\t\tcorrectAnswerNotSelected: \"Correct Answer Not Selected\",\n\t\t\tincorrectSelection: \"Incorrect Selection\",\n\t\t\tkey: \"Key\",\n\t\t\ttextGroup: \"Selectable text\",\n\t\t\ttextGroupWithLimit: \"Selectable text, select up to {{max}}\",\n\t\t\ttokenPosition: \"{{index}} of {{total}}\"\n\t\t},\n\t\tsimpleCloze: {\n\t\t\tcorrectAnswerShown: \"Correct answer\",\n\t\t\tcorrect: \"Correct\",\n\t\t\tincorrect: \"Incorrect\",\n\t\t\tunanswered: \"No answer\",\n\t\t\tplaceholder: \"Enter your answer...\",\n\t\t\tanswerInput: \"Your answer\",\n\t\t\tprintCorrectAnswer: \"Correct answer:\",\n\t\t\tprintAnswerBlank: \"Answer blank\"\n\t\t},\n\t\tvennClassification: {\n\t\t\ttray: \"Tiles to classify\",\n\t\t\tunknownTarget: \"unknown\",\n\t\t\tcancelled: \"Cancelled\",\n\t\t\treturnedToTray: \"{{name}} returned to tray\",\n\t\t\tplacedIn: \"{{name}} placed in {{target}}\",\n\t\t\tpickedUp: \"Picked up {{name}}\",\n\t\t\tpickedUpWithKeyboard: \"Picked up {{name}}, drop target: {{target}}. Use arrow keys to choose a drop target, Enter to drop, Escape to cancel.\",\n\t\t\tdropTarget: \"Drop target: {{target}}\",\n\t\t\tunsupportedCircles_one: \"This diagram cannot be shown: it has {{count}} circle, and only {{supported}} are supported.\",\n\t\t\tunsupportedCircles_other: \"This diagram cannot be shown: it has {{count}} circles, and only {{supported}} are supported.\",\n\t\t\tsetNumber: \"Set {{number}}\",\n\t\t\tregionOnly: \"{{set}} only\",\n\t\t\tregionNeither: \"Neither {{first}} nor {{second}}\",\n\t\t\tregionNoneOf: \"None of {{sets}}\",\n\t\t\tregionAndSeparator: \" and \",\n\t\t\ttileFallbackName: \"Tile\",\n\t\t\ttileNotPlaced: \"not placed\",\n\t\t\ttileInRegion: \"in {{region}}\",\n\t\t\ttileCorrect: \"correct\",\n\t\t\ttileIncorrect: \"incorrect\"\n\t\t}\n\t},\n\tcommon: {\n\t\tundo: \"Undo\",\n\t\tclearAll: \"Clear all\",\n\t\tcorrect: \"Correct\",\n\t\tincorrect: \"Incorrect\",\n\t\tshowCorrectAnswer: \"Show correct answer\",\n\t\thideCorrectAnswer: \"Hide correct answer\",\n\t\tshowTeacherInstructions: \"Show Teacher Instructions\",\n\t\thideTeacherInstructions: \"Hide Teacher Instructions\",\n\t\tshow: \"Show\",\n\t\thide: \"Hide\",\n\t\tshowRationale: \"Show Rationale\",\n\t\thideRationale: \"Hide Rationale\",\n\t\tcommonCorrectAnswerWithAlternates: \"Note: The answer shown above is the most common correct answer for this item. One or more additional correct answers are also defined, and will also be recognized as correct.\",\n\t\twarning: \"Warning\",\n\t\tshowNote: \"Show Note\",\n\t\thideNote: \"Hide Note\",\n\t\tcancel: \"Cancel\",\n\t\tplayAudio: \"Play audio\"\n\t}\n};\n//#endregion\nexport { e as default };\n","//#region src/es.ts\nvar e = {\n\ttranslation: {\n\t\tcategorize: {\n\t\t\tlimitMaxChoicesPerCategory: \"Has alcanzado el límite de {{maxChoicesPerCategory}} respuestas por área. Para agregar otra respuesta, primero se debe eliminar una respuesta.\",\n\t\t\tmaxChoicesPerCategoryRestriction: \"Para cambiar este valor a {{maxChoicesPerCategory}}, cada categoría debe tener {{maxChoicesPerCategory}} o menos opciones de respuesta\"\n\t\t},\n\t\tdragInTheBlank: { blank: \"Espacio en blanco {{index}}\" },\n\t\tebsr: {\n\t\t\tpart: \"Parte {{index}}\",\n\t\t\ttwoPartQuestion: \"Pregunta de dos partes\"\n\t\t},\n\t\teditableHtml: {\n\t\t\tresponseAreaToolbar: \"Área de respuesta\",\n\t\t\ttoolbar: \"Herramientas de edición\",\n\t\t\tbuttons: {\n\t\t\t\tinsertTable: \"Insertar tabla\",\n\t\t\t\taddTableRow: \"Agregar fila a la tabla\",\n\t\t\t\tremoveTableRow: \"Eliminar fila de la tabla\",\n\t\t\t\taddTableColumn: \"Agregar columna a la tabla\",\n\t\t\t\tremoveTableColumn: \"Eliminar columna de la tabla\",\n\t\t\t\tremoveTable: \"Eliminar tabla\",\n\t\t\t\ttableBorders: \"Bordes de la tabla\",\n\t\t\t\tbold: \"Negrita\",\n\t\t\t\titalic: \"Cursiva\",\n\t\t\t\tstrikethrough: \"Tachado\",\n\t\t\t\tcode: \"Código\",\n\t\t\t\tunderline: \"Subrayado\",\n\t\t\t\tsubscript: \"Subíndice\",\n\t\t\t\tsuperscript: \"Superíndice\",\n\t\t\t\tinsertImage: \"Insertar imagen\",\n\t\t\t\tinsertVideo: \"Insertar video\",\n\t\t\t\tinsertAudio: \"Insertar audio\",\n\t\t\t\tcssClasses: \"Clases CSS\",\n\t\t\t\tblockquote: \"Cita en bloque\",\n\t\t\t\theading: \"Encabezado\",\n\t\t\t\tinsertMath: \"Insertar expresión matemática\",\n\t\t\t\tspanishCharacters: \"Caracteres del español (ñ)\",\n\t\t\t\tspecialCharacters: \"Caracteres especiales (€)\",\n\t\t\t\ttextAlignment: \"Alineación del texto\",\n\t\t\t\tbulletedList: \"Lista con viñetas\",\n\t\t\t\tnumberedList: \"Lista numerada\",\n\t\t\t\tdone: \"Listo\"\n\t\t\t}\n\t\t},\n\t\texplicitConstructedResponse: {\n\t\t\tfillInTheBlankQuestion: \"Pregunta para completar espacios en blanco\",\n\t\t\tresponse: \"Respuesta {{index}} de {{total}}\"\n\t\t},\n\t\textendedTextEntry: {\n\t\t\tcomment: \"Comentario\",\n\t\t\tconstructedResponseQuestion: \"Pregunta de respuesta construida\",\n\t\t\tresponse: \"Tu respuesta\",\n\t\t\twrittenResponseQuestion: \"Pregunta de respuesta escrita\"\n\t\t},\n\t\tfractionModel: {\n\t\t\tmodelLabel_one: \"Modelo {{index}} de {{total}}: {{selected}} de {{count}} parte seleccionada\",\n\t\t\tmodelLabel_other: \"Modelo {{index}} de {{total}}: {{selected}} de {{count}} partes seleccionadas\"\n\t\t},\n\t\tnumberLine: {\n\t\t\taddElementLimit_one: \"Solo puedes agregar {{count}} elemento\",\n\t\t\taddElementLimit_other: \"Solo puedes agregar {{count}} elementos\",\n\t\t\tclearAll: \"Borrar todo\",\n\t\t\tclosedEnd: \"cerrado\",\n\t\t\telementCorrect: \"Correcto.\",\n\t\t\telementIncorrect: \"Incorrecto.\",\n\t\t\tgraphLabel: \"Recta numérica de {{min}} a {{max}}, con una marca cada {{interval}}\",\n\t\t\tline: \"Línea de {{left}} ({{leftEnd}}) a {{right}} ({{rightEnd}}).\",\n\t\t\topenEnd: \"abierto\",\n\t\t\tplottedNone: \"No hay nada marcado en la recta.\",\n\t\t\tpointClosed: \"Punto cerrado en {{position}}.\",\n\t\t\tpointOpen: \"Punto abierto en {{position}}.\",\n\t\t\trayLeft: \"Rayo desde {{position}} ({{end}}) hacia la izquierda.\",\n\t\t\trayRight: \"Rayo desde {{position}} ({{end}}) hacia la derecha.\"\n\t\t},\n\t\thotspot: {\n\t\t\tcorrectlySelected: \"Seleccionada correctamente\",\n\t\t\timage_one: \"Imagen con {{count}} zona activa\",\n\t\t\timage_other: \"Imagen con {{count}} zonas activas\",\n\t\t\tshape: \"Zona activa {{index}} de {{total}}\",\n\t\t\tshouldHaveBeenSelected: \"Debía seleccionarse\",\n\t\t\tshouldNotHaveBeenSelected: \"No debía seleccionarse\"\n\t\t},\n\t\timageClozeAssociation: {\n\t\t\tanswerChoice: \"Opción de respuesta {{index}} de {{total}}\",\n\t\t\timage_one: \"Imagen con {{count}} área de respuesta\",\n\t\t\timage_other: \"Imagen con {{count}} áreas de respuesta\",\n\t\t\treachedLimit_one: \"Has alcanzado el límite de {{count}} respuesta por área. Para agregar otra respuesta, primero se debe eliminar una respuesta.\",\n\t\t\treachedLimit_other: \"Lleno\",\n\t\t\tresponseArea: \"Área de respuesta {{index}} de {{total}}\"\n\t\t},\n\t\tinlineDropdown: {\n\t\t\tinlineDropdownQuestion: \"Pregunta con menú desplegable\",\n\t\t\tquery: \"Consulta\",\n\t\t\tqueryNumber: \"Consulta {{index}}\",\n\t\t\tshowRationaleForChoices: \"Mostrar justificación de las opciones\",\n\t\t\thideRationaleForChoices: \"Ocultar justificación de las opciones\"\n\t\t},\n\t\tdrawingResponse: {\n\t\t\tfillColor: \"Color de relleno\",\n\t\t\toutlineColor: \"Color del contorno\",\n\t\t\tnoFill: \"Sin relleno\",\n\t\t\tlightblue: \"Azul claro\",\n\t\t\tlightyellow: \"Amarillo claro\",\n\t\t\tred: \"Rojo\",\n\t\t\torange: \"Naranja\",\n\t\t\tyellow: \"Amarillo\",\n\t\t\tviolet: \"Violeta\",\n\t\t\tblue: \"Azul\",\n\t\t\tgreen: \"Verde\",\n\t\t\twhite: \"Blanco\",\n\t\t\tblack: \"Negro\",\n\t\t\tonDoubleClick: \"Haz doble clic para revisar este texto. Presiona el botón de ingreso para enviar\",\n\t\t\tdrawingArea: \"Área de dibujo\",\n\t\t\tdrawingAreaOverImage: \"Área de dibujo sobre una imagen de fondo\",\n\t\t\ttools: {\n\t\t\t\tselect: \"Seleccionar\",\n\t\t\t\tfreeDraw: \"Dibujo libre\",\n\t\t\t\tline: \"Línea\",\n\t\t\t\trectangle: \"Rectángulo\",\n\t\t\t\tcircle: \"Círculo\",\n\t\t\t\ttextEntry: \"Entrada de texto\",\n\t\t\t\teraser: \"Borrador\"\n\t\t\t}\n\t\t},\n\t\tcharting: {\n\t\t\taddCategory: \"Añadir categoría\",\n\t\t\tactions: \"Acciones\",\n\t\t\tadd: \"Añadir\",\n\t\t\tdelete: \"Eliminar\",\n\t\t\tnewLabel: \"Nueva etiqueta\",\n\t\t\tcategoryLabel: \"Etiqueta de la categoría {{index}}\",\n\t\t\tcategoryLabelValue: \"Etiqueta de la categoría {{index}}: {{label}}\",\n\t\t\tcategory: \"Categoría {{index}}\",\n\t\t\treachedLimit_other: \"No puede haber más de {{count}} categorías.\",\n\t\t\tkeyLegend: {\n\t\t\t\tincorrectAnswer: \"Respuesta incorrecta del estudiante\",\n\t\t\t\tcorrectAnswer: \"Respuesta correcta del estudiante\",\n\t\t\t\tcorrectKeyAnswer: \"Clave de respuesta correcta\"\n\t\t\t},\n\t\t\tchartTypes: {\n\t\t\t\tbar: \"Gráfico de barras\",\n\t\t\t\thistogram: \"Histograma\",\n\t\t\t\tlineDot: \"Gráfico de líneas con puntos\",\n\t\t\t\tlineCross: \"Gráfico de líneas con cruces\",\n\t\t\t\tdotPlot: \"Diagrama de puntos\",\n\t\t\t\tlinePlot: \"Diagrama de líneas\"\n\t\t\t},\n\t\t\tcategories_zero: \"Sin categorías.\",\n\t\t\tcategories_one: \"{{count}} categoría: {{categories}}.\",\n\t\t\tcategories_other: \"{{count}} categorías: {{categories}}.\",\n\t\t\tvalueRange: \"Valores de {{min}} a {{max}}.\",\n\t\t\tlabelledValueRange: \"{{label}} de {{min}} a {{max}}.\"\n\t\t},\n\t\tgraphing: {\n\t\t\tgraph: \"Gráfica de coordenadas\",\n\t\t\taxisRange: \"Eje {{axis}} de {{min}} a {{max}}.\",\n\t\t\tplotted_zero: \"Nada trazado.\",\n\t\t\tplotted_one: \"{{count}} objeto trazado: {{marks}}.\",\n\t\t\tplotted_other: \"{{count}} objetos trazados: {{marks}}.\",\n\t\t\tshadedRegion: \"Región sombreada\",\n\t\t\tpoint: \"Punto\",\n\t\t\tcircle: \"Circulo\",\n\t\t\tline: \"Línea\",\n\t\t\tparabola: \"Parábola\",\n\t\t\tabsolute: \"Valor absoluto\",\n\t\t\texponential: \"Exponencial\",\n\t\t\tpolygon: \"Polígono\",\n\t\t\tray: \"Semirrecta\",\n\t\t\tsegment: \"Segmento \",\n\t\t\tsine: \"Seno\",\n\t\t\tvector: \"Vector\",\n\t\t\tlabel: \"Etiqueta\",\n\t\t\tmarkLabel: \"Etiqueta en ({{x}}, {{y}})\",\n\t\t\tcorrectMarkLabel: \"Etiqueta correcta en ({{x}}, {{y}})\",\n\t\t\tredo: \"Rehacer\",\n\t\t\treset: \"Reiniciar\",\n\t\t\tkeyLegend: {\n\t\t\t\tmissingRequiredLabel: \"Falta una etiqueta obligatoria\",\n\t\t\t\tanswerKeyCorrect: \"Clave de respuesta correcta\",\n\t\t\t\tanswerKeyCorrectLabel: \"Etiqueta correcta de la clave de respuesta\",\n\t\t\t\tstudentIncorrect: \"Respuesta incorrecta del estudiante\",\n\t\t\t\tincorrectStudentLabel: \"Etiqueta incorrecta del estudiante\",\n\t\t\t\tstudentCorrect: \"Respuesta correcta del estudiante\",\n\t\t\t\tstudentCorrectLabel: \"Etiqueta correcta del estudiante\"\n\t\t\t}\n\t\t},\n\t\tmathInline: {\n\t\t\tkeypadInstructions: \"Este campo admite la entrada con el teclado en pantalla y con el teclado físico. Usa el teclado físico para acceder al teclado matemático en pantalla e interactuar con él; este acepta notación LaTeX. Usa la tecla de flecha hacia abajo para abrir el teclado en pantalla y recorrer sus botones. Usa la tecla Escape para cerrar el teclado en pantalla y volver al campo de entrada.\",\n\t\t\tmathEquationResponseQuestion: \"Pregunta de respuesta con ecuación matemática\",\n\t\t\tmathResponseQuestion: \"Pregunta de respuesta matemática\",\n\t\t\tprimaryCorrectWithAlternates: \"Nota: La respuesta que se muestra arriba es la respuesta correcta principal especificada por el autor para esta pregunta, pero también se pueden reconocer otras respuestas como correctas.\"\n\t\t},\n\t\tmathInput: { enterAnswer: \"Escribe la respuesta\" },\n\t\tmcPopulatedBlank: {\n\t\t\tanswerChoices: \"Opciones de respuesta\",\n\t\t\tblankLabel: \"espacio en blanco\",\n\t\t\temptyBlank: \"(en blanco)\",\n\t\t\tblankPreSelectionHint: \"La respuesta que elijas aparecerá en la línea en blanco de arriba.\",\n\t\t\tcorrectAnswerSelected: \"Respuesta correcta seleccionada\",\n\t\t\tincorrectAnswerSelected: \"Respuesta incorrecta seleccionada\",\n\t\t\tselectedAnswerImage: \"Imagen de la respuesta seleccionada\",\n\t\t\tchoiceImage: \"Opción {{id}}\",\n\t\t\tclickToEnableAutoplay: \"Haz clic para activar la reproducción automática del audio\",\n\t\t\taudioResourceUnavailable: \"El audio está activado, pero no hay una URL de audio reproducible configurada.\",\n\t\t\tlisten: \"Escuchar\",\n\t\t\tlistenSilentAlt: \"Escuchar. Repetir las instrucciones.\",\n\t\t\tlistenPlayingAlt: \"Escuchar. Estas son las instrucciones.\",\n\t\t\tprintAudio: \"Audio:\",\n\t\t\tprintTranscript: \"Transcripción:\"\n\t\t},\n\t\tmultipleChoice: {\n\t\t\tminSelections: \"Seleccione al menos {{minSelections}}.\",\n\t\t\tmaxSelections_one: \"Sólo se permite {{maxSelections}} respuesta.\",\n\t\t\tmaxSelections_other: \"Sólo se permiten {{maxSelections}} respuestas.\",\n\t\t\tminmaxSelections_equal: \"Seleccione {{minSelections}}.\",\n\t\t\tminmaxSelections_range: \"Seleccione entre {{minSelections}} y {{maxSelections}}.\",\n\t\t\tmultipleChoiceQuestion: \"Pregunta de opción múltiple\",\n\t\t\tmultipleCorrectAnswerQuestion: \"Pregunta con varias respuestas correctas\",\n\t\t\tmultipleSelectQuestion: \"Pregunta de selección múltiple\"\n\t\t},\n\t\trubric: {\n\t\t\trubric: \"Rúbrica\",\n\t\t\tshowRubric: \"Mostrar rúbrica\",\n\t\t\thideRubric: \"Ocultar rúbrica\"\n\t\t},\n\t\tselectText: {\n\t\t\tcorrectAnswerSelected: \"Respuesta Correcta\",\n\t\t\tcorrectAnswerNotSelected: \"Respuesta Correcta No Seleccionada\",\n\t\t\tincorrectSelection: \"Selección Incorrecta\",\n\t\t\tkey: \"Clave\",\n\t\t\ttextGroup: \"Texto seleccionable\",\n\t\t\ttextGroupWithLimit: \"Texto seleccionable, selecciona hasta {{max}}\",\n\t\t\ttokenPosition: \"{{index}} de {{total}}\"\n\t\t},\n\t\tsimpleCloze: {\n\t\t\tcorrectAnswerShown: \"Respuesta correcta\",\n\t\t\tcorrect: \"Correcto\",\n\t\t\tincorrect: \"Incorrecto\",\n\t\t\tunanswered: \"Sin respuesta\",\n\t\t\tplaceholder: \"Escribe tu respuesta...\",\n\t\t\tanswerInput: \"Tu respuesta\",\n\t\t\tprintCorrectAnswer: \"Respuesta correcta:\",\n\t\t\tprintAnswerBlank: \"Espacio para la respuesta\"\n\t\t},\n\t\tvennClassification: {\n\t\t\ttray: \"Fichas para clasificar\",\n\t\t\tunknownTarget: \"desconocido\",\n\t\t\tcancelled: \"Cancelado\",\n\t\t\treturnedToTray: \"Se devolvió {{name}} a la bandeja\",\n\t\t\tplacedIn: \"Se colocó {{name}} en {{target}}\",\n\t\t\tpickedUp: \"Se tomó {{name}}\",\n\t\t\tpickedUpWithKeyboard: \"Se tomó {{name}}, destino: {{target}}. Usa las flechas para elegir un destino, Enter para soltar y Escape para cancelar.\",\n\t\t\tdropTarget: \"Destino: {{target}}\",\n\t\t\tunsupportedCircles_one: \"No se puede mostrar este diagrama: tiene {{count}} círculo, y solo se admiten {{supported}}.\",\n\t\t\tunsupportedCircles_other: \"No se puede mostrar este diagrama: tiene {{count}} círculos, y solo se admiten {{supported}}.\",\n\t\t\tsetNumber: \"Conjunto {{number}}\",\n\t\t\tregionOnly: \"Solo {{set}}\",\n\t\t\tregionNeither: \"Ni {{first}} ni {{second}}\",\n\t\t\tregionNoneOf: \"Ninguno de {{sets}}\",\n\t\t\tregionAndSeparator: \" y \",\n\t\t\ttileFallbackName: \"Ficha\",\n\t\t\ttileNotPlaced: \"sin colocar\",\n\t\t\ttileInRegion: \"en {{region}}\",\n\t\t\ttileCorrect: \"correcta\",\n\t\t\ttileIncorrect: \"incorrecta\"\n\t\t}\n\t},\n\tcommon: {\n\t\tundo: \"Deshacer\",\n\t\tclearAll: \"Borrar todo\",\n\t\tcorrect: \"Correcto\",\n\t\tincorrect: \"Incorrecto\",\n\t\tshowCorrectAnswer: \"Mostrar respuesta correcta\",\n\t\thideCorrectAnswer: \"Ocultar respuesta correcta\",\n\t\tshowTeacherInstructions: \"Mostrar instrucciones para el maestro\",\n\t\thideTeacherInstructions: \"Ocultar instrucciones para el maestro\",\n\t\tshow: \"Mostrar\",\n\t\thide: \"Ocultar\",\n\t\tshowRationale: \"Mostrar justificación\",\n\t\thideRationale: \"Ocultar justificación\",\n\t\tcommonCorrectAnswerWithAlternates: \"Nota: La respuesta que se muestra arriba es la respuesta correcta más común para esta pregunta. También se definen una o más respuestas correctas adicionales, y también se reconocerán como correctas.\",\n\t\twarning: \"Advertencia\",\n\t\tshowNote: \"Mostrar Nota\",\n\t\thideNote: \"Ocultar Nota\",\n\t\tcancel: \"Cancelar\",\n\t\tplayAudio: \"Reproducir audio\"\n\t}\n};\n//#endregion\nexport { e as default };\n","const isString = obj => typeof obj === 'string';\nconst defer = () => {\n let res;\n let rej;\n const promise = new Promise((resolve, reject) => {\n res = resolve;\n rej = reject;\n });\n promise.resolve = res;\n promise.reject = rej;\n return promise;\n};\nconst makeString = object => {\n if (object == null) return '';\n return '' + object;\n};\nconst copy = (a, s, t) => {\n a.forEach(m => {\n if (s[m]) t[m] = s[m];\n });\n};\nconst lastOfPathSeparatorRegExp = /###/g;\nconst cleanKey = key => key && key.indexOf('###') > -1 ? key.replace(lastOfPathSeparatorRegExp, '.') : key;\nconst canNotTraverseDeeper = object => !object || isString(object);\nconst getLastOfPath = (object, path, Empty) => {\n const stack = !isString(path) ? path : path.split('.');\n let stackIndex = 0;\n while (stackIndex < stack.length - 1) {\n if (canNotTraverseDeeper(object)) return {};\n const key = cleanKey(stack[stackIndex]);\n if (!object[key] && Empty) object[key] = new Empty();\n if (Object.prototype.hasOwnProperty.call(object, key)) {\n object = object[key];\n } else {\n object = {};\n }\n ++stackIndex;\n }\n if (canNotTraverseDeeper(object)) return {};\n return {\n obj: object,\n k: cleanKey(stack[stackIndex])\n };\n};\nconst setPath = (object, path, newValue) => {\n const {\n obj,\n k\n } = getLastOfPath(object, path, Object);\n if (obj !== undefined || path.length === 1) {\n obj[k] = newValue;\n return;\n }\n let e = path[path.length - 1];\n let p = path.slice(0, path.length - 1);\n let last = getLastOfPath(object, p, Object);\n while (last.obj === undefined && p.length) {\n e = `${p[p.length - 1]}.${e}`;\n p = p.slice(0, p.length - 1);\n last = getLastOfPath(object, p, Object);\n if (last?.obj && typeof last.obj[`${last.k}.${e}`] !== 'undefined') {\n last.obj = undefined;\n }\n }\n last.obj[`${last.k}.${e}`] = newValue;\n};\nconst pushPath = (object, path, newValue, concat) => {\n const {\n obj,\n k\n } = getLastOfPath(object, path, Object);\n obj[k] = obj[k] || [];\n obj[k].push(newValue);\n};\nconst getPath = (object, path) => {\n const {\n obj,\n k\n } = getLastOfPath(object, path);\n if (!obj) return undefined;\n if (!Object.prototype.hasOwnProperty.call(obj, k)) return undefined;\n return obj[k];\n};\nconst getPathWithDefaults = (data, defaultData, key) => {\n const value = getPath(data, key);\n if (value !== undefined) {\n return value;\n }\n return getPath(defaultData, key);\n};\nconst deepExtend = (target, source, overwrite) => {\n for (const prop in source) {\n if (prop !== '__proto__' && prop !== 'constructor') {\n if (prop in target) {\n if (isString(target[prop]) || target[prop] instanceof String || isString(source[prop]) || source[prop] instanceof String) {\n if (overwrite) target[prop] = source[prop];\n } else {\n deepExtend(target[prop], source[prop], overwrite);\n }\n } else {\n target[prop] = source[prop];\n }\n }\n }\n return target;\n};\nconst regexEscape = str => str.replace(/[\\-\\[\\]\\/\\{\\}\\(\\)\\*\\+\\?\\.\\\\\\^\\$\\|]/g, '\\\\$&');\nvar _entityMap = {\n '&': '&amp;',\n '<': '&lt;',\n '>': '&gt;',\n '\"': '&quot;',\n \"'\": '&#39;',\n '/': '&#x2F;'\n};\nconst escape = data => {\n if (isString(data)) {\n return data.replace(/[&<>\"'\\/]/g, s => _entityMap[s]);\n }\n return data;\n};\nclass RegExpCache {\n constructor(capacity) {\n this.capacity = capacity;\n this.regExpMap = new Map();\n this.regExpQueue = [];\n }\n getRegExp(pattern) {\n const regExpFromCache = this.regExpMap.get(pattern);\n if (regExpFromCache !== undefined) {\n return regExpFromCache;\n }\n const regExpNew = new RegExp(pattern);\n if (this.regExpQueue.length === this.capacity) {\n this.regExpMap.delete(this.regExpQueue.shift());\n }\n this.regExpMap.set(pattern, regExpNew);\n this.regExpQueue.push(pattern);\n return regExpNew;\n }\n}\nconst chars = [' ', ',', '?', '!', ';'];\nconst looksLikeObjectPathRegExpCache = new RegExpCache(20);\nconst looksLikeObjectPath = (key, nsSeparator, keySeparator) => {\n nsSeparator = nsSeparator || '';\n keySeparator = keySeparator || '';\n const possibleChars = chars.filter(c => nsSeparator.indexOf(c) < 0 && keySeparator.indexOf(c) < 0);\n if (possibleChars.length === 0) return true;\n const r = looksLikeObjectPathRegExpCache.getRegExp(`(${possibleChars.map(c => c === '?' ? '\\\\?' : c).join('|')})`);\n let matched = !r.test(key);\n if (!matched) {\n const ki = key.indexOf(keySeparator);\n if (ki > 0 && !r.test(key.substring(0, ki))) {\n matched = true;\n }\n }\n return matched;\n};\nconst deepFind = (obj, path, keySeparator = '.') => {\n if (!obj) return undefined;\n if (obj[path]) {\n if (!Object.prototype.hasOwnProperty.call(obj, path)) return undefined;\n return obj[path];\n }\n const tokens = path.split(keySeparator);\n let current = obj;\n for (let i = 0; i < tokens.length;) {\n if (!current || typeof current !== 'object') {\n return undefined;\n }\n let next;\n let nextPath = '';\n for (let j = i; j < tokens.length; ++j) {\n if (j !== i) {\n nextPath += keySeparator;\n }\n nextPath += tokens[j];\n next = current[nextPath];\n if (next !== undefined) {\n if (['string', 'number', 'boolean'].indexOf(typeof next) > -1 && j < tokens.length - 1) {\n continue;\n }\n i += j - i + 1;\n break;\n }\n }\n current = next;\n }\n return current;\n};\nconst getCleanedCode = code => code?.replace(/_/g, '-');\n\nconst consoleLogger = {\n type: 'logger',\n log(args) {\n this.output('log', args);\n },\n warn(args) {\n this.output('warn', args);\n },\n error(args) {\n this.output('error', args);\n },\n output(type, args) {\n console?.[type]?.apply?.(console, args);\n }\n};\nclass Logger {\n constructor(concreteLogger, options = {}) {\n this.init(concreteLogger, options);\n }\n init(concreteLogger, options = {}) {\n this.prefix = options.prefix || 'i18next:';\n this.logger = concreteLogger || consoleLogger;\n this.options = options;\n this.debug = options.debug;\n }\n log(...args) {\n return this.forward(args, 'log', '', true);\n }\n warn(...args) {\n return this.forward(args, 'warn', '', true);\n }\n error(...args) {\n return this.forward(args, 'error', '');\n }\n deprecate(...args) {\n return this.forward(args, 'warn', 'WARNING DEPRECATED: ', true);\n }\n forward(args, lvl, prefix, debugOnly) {\n if (debugOnly && !this.debug) return null;\n if (isString(args[0])) args[0] = `${prefix}${this.prefix} ${args[0]}`;\n return this.logger[lvl](args);\n }\n create(moduleName) {\n return new Logger(this.logger, {\n ...{\n prefix: `${this.prefix}:${moduleName}:`\n },\n ...this.options\n });\n }\n clone(options) {\n options = options || this.options;\n options.prefix = options.prefix || this.prefix;\n return new Logger(this.logger, options);\n }\n}\nvar baseLogger = new Logger();\n\nclass EventEmitter {\n constructor() {\n this.observers = {};\n }\n on(events, listener) {\n events.split(' ').forEach(event => {\n if (!this.observers[event]) this.observers[event] = new Map();\n const numListeners = this.observers[event].get(listener) || 0;\n this.observers[event].set(listener, numListeners + 1);\n });\n return this;\n }\n off(event, listener) {\n if (!this.observers[event]) return;\n if (!listener) {\n delete this.observers[event];\n return;\n }\n this.observers[event].delete(listener);\n }\n emit(event, ...args) {\n if (this.observers[event]) {\n const cloned = Array.from(this.observers[event].entries());\n cloned.forEach(([observer, numTimesAdded]) => {\n for (let i = 0; i < numTimesAdded; i++) {\n observer(...args);\n }\n });\n }\n if (this.observers['*']) {\n const cloned = Array.from(this.observers['*'].entries());\n cloned.forEach(([observer, numTimesAdded]) => {\n for (let i = 0; i < numTimesAdded; i++) {\n observer.apply(observer, [event, ...args]);\n }\n });\n }\n }\n}\n\nclass ResourceStore extends EventEmitter {\n constructor(data, options = {\n ns: ['translation'],\n defaultNS: 'translation'\n }) {\n super();\n this.data = data || {};\n this.options = options;\n if (this.options.keySeparator === undefined) {\n this.options.keySeparator = '.';\n }\n if (this.options.ignoreJSONStructure === undefined) {\n this.options.ignoreJSONStructure = true;\n }\n }\n addNamespaces(ns) {\n if (this.options.ns.indexOf(ns) < 0) {\n this.options.ns.push(ns);\n }\n }\n removeNamespaces(ns) {\n const index = this.options.ns.indexOf(ns);\n if (index > -1) {\n this.options.ns.splice(index, 1);\n }\n }\n getResource(lng, ns, key, options = {}) {\n const keySeparator = options.keySeparator !== undefined ? options.keySeparator : this.options.keySeparator;\n const ignoreJSONStructure = options.ignoreJSONStructure !== undefined ? options.ignoreJSONStructure : this.options.ignoreJSONStructure;\n let path;\n if (lng.indexOf('.') > -1) {\n path = lng.split('.');\n } else {\n path = [lng, ns];\n if (key) {\n if (Array.isArray(key)) {\n path.push(...key);\n } else if (isString(key) && keySeparator) {\n path.push(...key.split(keySeparator));\n } else {\n path.push(key);\n }\n }\n }\n const result = getPath(this.data, path);\n if (!result && !ns && !key && lng.indexOf('.') > -1) {\n lng = path[0];\n ns = path[1];\n key = path.slice(2).join('.');\n }\n if (result || !ignoreJSONStructure || !isString(key)) return result;\n return deepFind(this.data?.[lng]?.[ns], key, keySeparator);\n }\n addResource(lng, ns, key, value, options = {\n silent: false\n }) {\n const keySeparator = options.keySeparator !== undefined ? options.keySeparator : this.options.keySeparator;\n let path = [lng, ns];\n if (key) path = path.concat(keySeparator ? key.split(keySeparator) : key);\n if (lng.indexOf('.') > -1) {\n path = lng.split('.');\n value = ns;\n ns = path[1];\n }\n this.addNamespaces(ns);\n setPath(this.data, path, value);\n if (!options.silent) this.emit('added', lng, ns, key, value);\n }\n addResources(lng, ns, resources, options = {\n silent: false\n }) {\n for (const m in resources) {\n if (isString(resources[m]) || Array.isArray(resources[m])) this.addResource(lng, ns, m, resources[m], {\n silent: true\n });\n }\n if (!options.silent) this.emit('added', lng, ns, resources);\n }\n addResourceBundle(lng, ns, resources, deep, overwrite, options = {\n silent: false,\n skipCopy: false\n }) {\n let path = [lng, ns];\n if (lng.indexOf('.') > -1) {\n path = lng.split('.');\n deep = resources;\n resources = ns;\n ns = path[1];\n }\n this.addNamespaces(ns);\n let pack = getPath(this.data, path) || {};\n if (!options.skipCopy) resources = JSON.parse(JSON.stringify(resources));\n if (deep) {\n deepExtend(pack, resources, overwrite);\n } else {\n pack = {\n ...pack,\n ...resources\n };\n }\n setPath(this.data, path, pack);\n if (!options.silent) this.emit('added', lng, ns, resources);\n }\n removeResourceBundle(lng, ns) {\n if (this.hasResourceBundle(lng, ns)) {\n delete this.data[lng][ns];\n }\n this.removeNamespaces(ns);\n this.emit('removed', lng, ns);\n }\n hasResourceBundle(lng, ns) {\n return this.getResource(lng, ns) !== undefined;\n }\n getResourceBundle(lng, ns) {\n if (!ns) ns = this.options.defaultNS;\n return this.getResource(lng, ns);\n }\n getDataByLanguage(lng) {\n return this.data[lng];\n }\n hasLanguageSomeTranslations(lng) {\n const data = this.getDataByLanguage(lng);\n const n = data && Object.keys(data) || [];\n return !!n.find(v => data[v] && Object.keys(data[v]).length > 0);\n }\n toJSON() {\n return this.data;\n }\n}\n\nvar postProcessor = {\n processors: {},\n addPostProcessor(module) {\n this.processors[module.name] = module;\n },\n handle(processors, value, key, options, translator) {\n processors.forEach(processor => {\n value = this.processors[processor]?.process(value, key, options, translator) ?? value;\n });\n return value;\n }\n};\n\nconst PATH_KEY = Symbol('i18next/PATH_KEY');\nfunction createProxy() {\n const state = [];\n const handler = Object.create(null);\n let proxy;\n handler.get = (target, key) => {\n proxy?.revoke?.();\n if (key === PATH_KEY) return state;\n state.push(key);\n proxy = Proxy.revocable(target, handler);\n return proxy.proxy;\n };\n return Proxy.revocable(Object.create(null), handler).proxy;\n}\nfunction keysFromSelector(selector, opts) {\n const {\n [PATH_KEY]: path\n } = selector(createProxy());\n const keySeparator = opts?.keySeparator ?? '.';\n const nsSeparator = opts?.nsSeparator ?? ':';\n if (path.length > 1 && nsSeparator) {\n const ns = opts?.ns;\n const nsArray = Array.isArray(ns) ? ns : null;\n if (nsArray && nsArray.length > 1 && nsArray.slice(1).includes(path[0])) {\n return `${path[0]}${nsSeparator}${path.slice(1).join(keySeparator)}`;\n }\n }\n return path.join(keySeparator);\n}\n\nconst checkedLoadedFor = {};\nconst shouldHandleAsObject = res => !isString(res) && typeof res !== 'boolean' && typeof res !== 'number';\nclass Translator extends EventEmitter {\n constructor(services, options = {}) {\n super();\n copy(['resourceStore', 'languageUtils', 'pluralResolver', 'interpolator', 'backendConnector', 'i18nFormat', 'utils'], services, this);\n this.options = options;\n if (this.options.keySeparator === undefined) {\n this.options.keySeparator = '.';\n }\n this.logger = baseLogger.create('translator');\n }\n changeLanguage(lng) {\n if (lng) this.language = lng;\n }\n exists(key, o = {\n interpolation: {}\n }) {\n const opt = {\n ...o\n };\n if (key == null) return false;\n const resolved = this.resolve(key, opt);\n if (resolved?.res === undefined) return false;\n const isObject = shouldHandleAsObject(resolved.res);\n if (opt.returnObjects === false && isObject) {\n return false;\n }\n return true;\n }\n extractFromKey(key, opt) {\n let nsSeparator = opt.nsSeparator !== undefined ? opt.nsSeparator : this.options.nsSeparator;\n if (nsSeparator === undefined) nsSeparator = ':';\n const keySeparator = opt.keySeparator !== undefined ? opt.keySeparator : this.options.keySeparator;\n let namespaces = opt.ns || this.options.defaultNS || [];\n const wouldCheckForNsInKey = nsSeparator && key.indexOf(nsSeparator) > -1;\n const seemsNaturalLanguage = !this.options.userDefinedKeySeparator && !opt.keySeparator && !this.options.userDefinedNsSeparator && !opt.nsSeparator && !looksLikeObjectPath(key, nsSeparator, keySeparator);\n if (wouldCheckForNsInKey && !seemsNaturalLanguage) {\n const m = key.match(this.interpolator.nestingRegexp);\n if (m && m.length > 0) {\n return {\n key,\n namespaces: isString(namespaces) ? [namespaces] : namespaces\n };\n }\n const parts = key.split(nsSeparator);\n if (nsSeparator !== keySeparator || nsSeparator === keySeparator && this.options.ns.indexOf(parts[0]) > -1) namespaces = parts.shift();\n key = parts.join(keySeparator);\n }\n return {\n key,\n namespaces: isString(namespaces) ? [namespaces] : namespaces\n };\n }\n translate(keys, o, lastKey) {\n let opt = typeof o === 'object' ? {\n ...o\n } : o;\n if (typeof opt !== 'object' && this.options.overloadTranslationOptionHandler) {\n opt = this.options.overloadTranslationOptionHandler(arguments);\n }\n if (typeof opt === 'object') opt = {\n ...opt\n };\n if (!opt) opt = {};\n if (keys == null) return '';\n if (typeof keys === 'function') keys = keysFromSelector(keys, {\n ...this.options,\n ...opt\n });\n if (!Array.isArray(keys)) keys = [String(keys)];\n keys = keys.map(k => typeof k === 'function' ? keysFromSelector(k, {\n ...this.options,\n ...opt\n }) : String(k));\n const returnDetails = opt.returnDetails !== undefined ? opt.returnDetails : this.options.returnDetails;\n const keySeparator = opt.keySeparator !== undefined ? opt.keySeparator : this.options.keySeparator;\n const {\n key,\n namespaces\n } = this.extractFromKey(keys[keys.length - 1], opt);\n const namespace = namespaces[namespaces.length - 1];\n let nsSeparator = opt.nsSeparator !== undefined ? opt.nsSeparator : this.options.nsSeparator;\n if (nsSeparator === undefined) nsSeparator = ':';\n const lng = opt.lng || this.language;\n const appendNamespaceToCIMode = opt.appendNamespaceToCIMode || this.options.appendNamespaceToCIMode;\n if (lng?.toLowerCase() === 'cimode') {\n if (appendNamespaceToCIMode) {\n if (returnDetails) {\n return {\n res: `${namespace}${nsSeparator}${key}`,\n usedKey: key,\n exactUsedKey: key,\n usedLng: lng,\n usedNS: namespace,\n usedParams: this.getUsedParamsDetails(opt)\n };\n }\n return `${namespace}${nsSeparator}${key}`;\n }\n if (returnDetails) {\n return {\n res: key,\n usedKey: key,\n exactUsedKey: key,\n usedLng: lng,\n usedNS: namespace,\n usedParams: this.getUsedParamsDetails(opt)\n };\n }\n return key;\n }\n const resolved = this.resolve(keys, opt);\n let res = resolved?.res;\n const resUsedKey = resolved?.usedKey || key;\n const resExactUsedKey = resolved?.exactUsedKey || key;\n const noObject = ['[object Number]', '[object Function]', '[object RegExp]'];\n const joinArrays = opt.joinArrays !== undefined ? opt.joinArrays : this.options.joinArrays;\n const handleAsObjectInI18nFormat = !this.i18nFormat || this.i18nFormat.handleAsObject;\n const needsPluralHandling = opt.count !== undefined && !isString(opt.count);\n const hasDefaultValue = Translator.hasDefaultValue(opt);\n const defaultValueSuffix = needsPluralHandling ? this.pluralResolver.getSuffix(lng, opt.count, opt) : '';\n const defaultValueSuffixOrdinalFallback = opt.ordinal && needsPluralHandling ? this.pluralResolver.getSuffix(lng, opt.count, {\n ordinal: false\n }) : '';\n const needsZeroSuffixLookup = needsPluralHandling && !opt.ordinal && opt.count === 0;\n const defaultValue = needsZeroSuffixLookup && opt[`defaultValue${this.options.pluralSeparator}zero`] || opt[`defaultValue${defaultValueSuffix}`] || opt[`defaultValue${defaultValueSuffixOrdinalFallback}`] || opt.defaultValue;\n let resForObjHndl = res;\n if (handleAsObjectInI18nFormat && !res && hasDefaultValue) {\n resForObjHndl = defaultValue;\n }\n const handleAsObject = shouldHandleAsObject(resForObjHndl);\n const resType = Object.prototype.toString.apply(resForObjHndl);\n if (handleAsObjectInI18nFormat && resForObjHndl && handleAsObject && noObject.indexOf(resType) < 0 && !(isString(joinArrays) && Array.isArray(resForObjHndl))) {\n if (!opt.returnObjects && !this.options.returnObjects) {\n if (!this.options.returnedObjectHandler) {\n this.logger.warn('accessing an object - but returnObjects options is not enabled!');\n }\n const r = this.options.returnedObjectHandler ? this.options.returnedObjectHandler(resUsedKey, resForObjHndl, {\n ...opt,\n ns: namespaces\n }) : `key '${key} (${this.language})' returned an object instead of string.`;\n if (returnDetails) {\n resolved.res = r;\n resolved.usedParams = this.getUsedParamsDetails(opt);\n return resolved;\n }\n return r;\n }\n if (keySeparator) {\n const resTypeIsArray = Array.isArray(resForObjHndl);\n const copy = resTypeIsArray ? [] : {};\n const newKeyToUse = resTypeIsArray ? resExactUsedKey : resUsedKey;\n for (const m in resForObjHndl) {\n if (Object.prototype.hasOwnProperty.call(resForObjHndl, m)) {\n const deepKey = `${newKeyToUse}${keySeparator}${m}`;\n if (hasDefaultValue && !res) {\n copy[m] = this.translate(deepKey, {\n ...opt,\n defaultValue: shouldHandleAsObject(defaultValue) ? defaultValue[m] : undefined,\n ...{\n joinArrays: false,\n ns: namespaces\n }\n });\n } else {\n copy[m] = this.translate(deepKey, {\n ...opt,\n ...{\n joinArrays: false,\n ns: namespaces\n }\n });\n }\n if (copy[m] === deepKey) copy[m] = resForObjHndl[m];\n }\n }\n res = copy;\n }\n } else if (handleAsObjectInI18nFormat && isString(joinArrays) && Array.isArray(res)) {\n res = res.join(joinArrays);\n if (res) res = this.extendTranslation(res, keys, opt, lastKey);\n } else {\n let usedDefault = false;\n let usedKey = false;\n if (!this.isValidLookup(res) && hasDefaultValue) {\n usedDefault = true;\n res = defaultValue;\n }\n if (!this.isValidLookup(res)) {\n usedKey = true;\n res = key;\n }\n const missingKeyNoValueFallbackToKey = opt.missingKeyNoValueFallbackToKey || this.options.missingKeyNoValueFallbackToKey;\n const resForMissing = missingKeyNoValueFallbackToKey && usedKey ? undefined : res;\n const updateMissing = hasDefaultValue && defaultValue !== res && this.options.updateMissing;\n if (usedKey || usedDefault || updateMissing) {\n this.logger.log(updateMissing ? 'updateKey' : 'missingKey', lng, namespace, key, updateMissing ? defaultValue : res);\n if (keySeparator) {\n const fk = this.resolve(key, {\n ...opt,\n keySeparator: false\n });\n if (fk && fk.res) this.logger.warn('Seems the loaded translations were in flat JSON format instead of nested. Either set keySeparator: false on init or make sure your translations are published in nested format.');\n }\n let lngs = [];\n const fallbackLngs = this.languageUtils.getFallbackCodes(this.options.fallbackLng, opt.lng || this.language);\n if (this.options.saveMissingTo === 'fallback' && fallbackLngs && fallbackLngs[0]) {\n for (let i = 0; i < fallbackLngs.length; i++) {\n lngs.push(fallbackLngs[i]);\n }\n } else if (this.options.saveMissingTo === 'all') {\n lngs = this.languageUtils.toResolveHierarchy(opt.lng || this.language);\n } else {\n lngs.push(opt.lng || this.language);\n }\n const send = (l, k, specificDefaultValue) => {\n const defaultForMissing = hasDefaultValue && specificDefaultValue !== res ? specificDefaultValue : resForMissing;\n if (this.options.missingKeyHandler) {\n this.options.missingKeyHandler(l, namespace, k, defaultForMissing, updateMissing, opt);\n } else if (this.backendConnector?.saveMissing) {\n this.backendConnector.saveMissing(l, namespace, k, defaultForMissing, updateMissing, opt);\n }\n this.emit('missingKey', l, namespace, k, res);\n };\n if (this.options.saveMissing) {\n if (this.options.saveMissingPlurals && needsPluralHandling) {\n lngs.forEach(language => {\n const suffixes = this.pluralResolver.getSuffixes(language, opt);\n if (needsZeroSuffixLookup && opt[`defaultValue${this.options.pluralSeparator}zero`] && suffixes.indexOf(`${this.options.pluralSeparator}zero`) < 0) {\n suffixes.push(`${this.options.pluralSeparator}zero`);\n }\n suffixes.forEach(suffix => {\n send([language], key + suffix, opt[`defaultValue${suffix}`] || defaultValue);\n });\n });\n } else {\n send(lngs, key, defaultValue);\n }\n }\n }\n res = this.extendTranslation(res, keys, opt, resolved, lastKey);\n if (usedKey && res === key && this.options.appendNamespaceToMissingKey) {\n res = `${namespace}${nsSeparator}${key}`;\n }\n if ((usedKey || usedDefault) && this.options.parseMissingKeyHandler) {\n res = this.options.parseMissingKeyHandler(this.options.appendNamespaceToMissingKey ? `${namespace}${nsSeparator}${key}` : key, usedDefault ? res : undefined, opt);\n }\n }\n if (returnDetails) {\n resolved.res = res;\n resolved.usedParams = this.getUsedParamsDetails(opt);\n return resolved;\n }\n return res;\n }\n extendTranslation(res, key, opt, resolved, lastKey) {\n if (this.i18nFormat?.parse) {\n res = this.i18nFormat.parse(res, {\n ...this.options.interpolation.defaultVariables,\n ...opt\n }, opt.lng || this.language || resolved.usedLng, resolved.usedNS, resolved.usedKey, {\n resolved\n });\n } else if (!opt.skipInterpolation) {\n if (opt.interpolation) this.interpolator.init({\n ...opt,\n ...{\n interpolation: {\n ...this.options.interpolation,\n ...opt.interpolation\n }\n }\n });\n const skipOnVariables = isString(res) && (opt?.interpolation?.skipOnVariables !== undefined ? opt.interpolation.skipOnVariables : this.options.interpolation.skipOnVariables);\n let nestBef;\n if (skipOnVariables) {\n const nb = res.match(this.interpolator.nestingRegexp);\n nestBef = nb && nb.length;\n }\n let data = opt.replace && !isString(opt.replace) ? opt.replace : opt;\n if (this.options.interpolation.defaultVariables) data = {\n ...this.options.interpolation.defaultVariables,\n ...data\n };\n res = this.interpolator.interpolate(res, data, opt.lng || this.language || resolved.usedLng, opt);\n if (skipOnVariables) {\n const na = res.match(this.interpolator.nestingRegexp);\n const nestAft = na && na.length;\n if (nestBef < nestAft) opt.nest = false;\n }\n if (!opt.lng && resolved && resolved.res) opt.lng = this.language || resolved.usedLng;\n if (opt.nest !== false) res = this.interpolator.nest(res, (...args) => {\n if (lastKey?.[0] === args[0] && !opt.context) {\n this.logger.warn(`It seems you are nesting recursively key: ${args[0]} in key: ${key[0]}`);\n return null;\n }\n return this.translate(...args, key);\n }, opt);\n if (opt.interpolation) this.interpolator.reset();\n }\n const postProcess = opt.postProcess || this.options.postProcess;\n const postProcessorNames = isString(postProcess) ? [postProcess] : postProcess;\n if (res != null && postProcessorNames?.length && opt.applyPostProcessor !== false) {\n res = postProcessor.handle(postProcessorNames, res, key, this.options && this.options.postProcessPassResolved ? {\n i18nResolved: {\n ...resolved,\n usedParams: this.getUsedParamsDetails(opt)\n },\n ...opt\n } : opt, this);\n }\n return res;\n }\n resolve(keys, opt = {}) {\n let found;\n let usedKey;\n let exactUsedKey;\n let usedLng;\n let usedNS;\n if (isString(keys)) keys = [keys];\n if (Array.isArray(keys)) keys = keys.map(k => typeof k === 'function' ? keysFromSelector(k, {\n ...this.options,\n ...opt\n }) : k);\n keys.forEach(k => {\n if (this.isValidLookup(found)) return;\n const extracted = this.extractFromKey(k, opt);\n const key = extracted.key;\n usedKey = key;\n let namespaces = extracted.namespaces;\n if (this.options.fallbackNS) namespaces = namespaces.concat(this.options.fallbackNS);\n const needsPluralHandling = opt.count !== undefined && !isString(opt.count);\n const needsZeroSuffixLookup = needsPluralHandling && !opt.ordinal && opt.count === 0;\n const needsContextHandling = opt.context !== undefined && (isString(opt.context) || typeof opt.context === 'number') && opt.context !== '';\n const codes = opt.lngs ? opt.lngs : this.languageUtils.toResolveHierarchy(opt.lng || this.language, opt.fallbackLng);\n namespaces.forEach(ns => {\n if (this.isValidLookup(found)) return;\n usedNS = ns;\n if (!checkedLoadedFor[`${codes[0]}-${ns}`] && this.utils?.hasLoadedNamespace && !this.utils?.hasLoadedNamespace(usedNS)) {\n checkedLoadedFor[`${codes[0]}-${ns}`] = true;\n this.logger.warn(`key \"${usedKey}\" for languages \"${codes.join(', ')}\" won't get resolved as namespace \"${usedNS}\" was not yet loaded`, 'This means something IS WRONG in your setup. You access the t function before i18next.init / i18next.loadNamespace / i18next.changeLanguage was done. Wait for the callback or Promise to resolve before accessing it!!!');\n }\n codes.forEach(code => {\n if (this.isValidLookup(found)) return;\n usedLng = code;\n const finalKeys = [key];\n if (this.i18nFormat?.addLookupKeys) {\n this.i18nFormat.addLookupKeys(finalKeys, key, code, ns, opt);\n } else {\n let pluralSuffix;\n if (needsPluralHandling) pluralSuffix = this.pluralResolver.getSuffix(code, opt.count, opt);\n const zeroSuffix = `${this.options.pluralSeparator}zero`;\n const ordinalPrefix = `${this.options.pluralSeparator}ordinal${this.options.pluralSeparator}`;\n if (needsPluralHandling) {\n if (opt.ordinal && pluralSuffix.indexOf(ordinalPrefix) === 0) {\n finalKeys.push(key + pluralSuffix.replace(ordinalPrefix, this.options.pluralSeparator));\n }\n finalKeys.push(key + pluralSuffix);\n if (needsZeroSuffixLookup) {\n finalKeys.push(key + zeroSuffix);\n }\n }\n if (needsContextHandling) {\n const contextKey = `${key}${this.options.contextSeparator || '_'}${opt.context}`;\n finalKeys.push(contextKey);\n if (needsPluralHandling) {\n if (opt.ordinal && pluralSuffix.indexOf(ordinalPrefix) === 0) {\n finalKeys.push(contextKey + pluralSuffix.replace(ordinalPrefix, this.options.pluralSeparator));\n }\n finalKeys.push(contextKey + pluralSuffix);\n if (needsZeroSuffixLookup) {\n finalKeys.push(contextKey + zeroSuffix);\n }\n }\n }\n }\n let possibleKey;\n while (possibleKey = finalKeys.pop()) {\n if (!this.isValidLookup(found)) {\n exactUsedKey = possibleKey;\n found = this.getResource(code, ns, possibleKey, opt);\n }\n }\n });\n });\n });\n return {\n res: found,\n usedKey,\n exactUsedKey,\n usedLng,\n usedNS\n };\n }\n isValidLookup(res) {\n return res !== undefined && !(!this.options.returnNull && res === null) && !(!this.options.returnEmptyString && res === '');\n }\n getResource(code, ns, key, options = {}) {\n if (this.i18nFormat?.getResource) return this.i18nFormat.getResource(code, ns, key, options);\n return this.resourceStore.getResource(code, ns, key, options);\n }\n getUsedParamsDetails(options = {}) {\n const optionsKeys = ['defaultValue', 'ordinal', 'context', 'replace', 'lng', 'lngs', 'fallbackLng', 'ns', 'keySeparator', 'nsSeparator', 'returnObjects', 'returnDetails', 'joinArrays', 'postProcess', 'interpolation'];\n const useOptionsReplaceForData = options.replace && !isString(options.replace);\n let data = useOptionsReplaceForData ? options.replace : options;\n if (useOptionsReplaceForData && typeof options.count !== 'undefined') {\n data.count = options.count;\n }\n if (this.options.interpolation.defaultVariables) {\n data = {\n ...this.options.interpolation.defaultVariables,\n ...data\n };\n }\n if (!useOptionsReplaceForData) {\n data = {\n ...data\n };\n for (const key of optionsKeys) {\n delete data[key];\n }\n }\n return data;\n }\n static hasDefaultValue(options) {\n const prefix = 'defaultValue';\n for (const option in options) {\n if (Object.prototype.hasOwnProperty.call(options, option) && prefix === option.substring(0, prefix.length) && undefined !== options[option]) {\n return true;\n }\n }\n return false;\n }\n}\n\nclass LanguageUtil {\n constructor(options) {\n this.options = options;\n this.supportedLngs = this.options.supportedLngs || false;\n this.logger = baseLogger.create('languageUtils');\n }\n getScriptPartFromCode(code) {\n code = getCleanedCode(code);\n if (!code || code.indexOf('-') < 0) return null;\n const p = code.split('-');\n if (p.length === 2) return null;\n p.pop();\n if (p[p.length - 1].toLowerCase() === 'x') return null;\n return this.formatLanguageCode(p.join('-'));\n }\n getLanguagePartFromCode(code) {\n code = getCleanedCode(code);\n if (!code || code.indexOf('-') < 0) return code;\n const p = code.split('-');\n return this.formatLanguageCode(p[0]);\n }\n formatLanguageCode(code) {\n if (isString(code) && code.indexOf('-') > -1) {\n let formattedCode;\n try {\n formattedCode = Intl.getCanonicalLocales(code)[0];\n } catch (e) {}\n if (formattedCode && this.options.lowerCaseLng) {\n formattedCode = formattedCode.toLowerCase();\n }\n if (formattedCode) return formattedCode;\n if (this.options.lowerCaseLng) {\n return code.toLowerCase();\n }\n return code;\n }\n return this.options.cleanCode || this.options.lowerCaseLng ? code.toLowerCase() : code;\n }\n isSupportedCode(code) {\n if (this.options.load === 'languageOnly' || this.options.nonExplicitSupportedLngs) {\n code = this.getLanguagePartFromCode(code);\n }\n return !this.supportedLngs || !this.supportedLngs.length || this.supportedLngs.indexOf(code) > -1;\n }\n getBestMatchFromCodes(codes) {\n if (!codes) return null;\n let found;\n codes.forEach(code => {\n if (found) return;\n const cleanedLng = this.formatLanguageCode(code);\n if (!this.options.supportedLngs || this.isSupportedCode(cleanedLng)) found = cleanedLng;\n });\n if (!found && this.options.supportedLngs) {\n codes.forEach(code => {\n if (found) return;\n const lngScOnly = this.getScriptPartFromCode(code);\n if (this.isSupportedCode(lngScOnly)) return found = lngScOnly;\n const lngOnly = this.getLanguagePartFromCode(code);\n if (this.isSupportedCode(lngOnly)) return found = lngOnly;\n found = this.options.supportedLngs.find(supportedLng => {\n if (supportedLng === lngOnly) return supportedLng;\n if (supportedLng.indexOf('-') < 0 && lngOnly.indexOf('-') < 0) return;\n if (supportedLng.indexOf('-') > 0 && lngOnly.indexOf('-') < 0 && supportedLng.substring(0, supportedLng.indexOf('-')) === lngOnly) return supportedLng;\n if (supportedLng.indexOf(lngOnly) === 0 && lngOnly.length > 1) return supportedLng;\n });\n });\n }\n if (!found) found = this.getFallbackCodes(this.options.fallbackLng)[0];\n return found;\n }\n getFallbackCodes(fallbacks, code) {\n if (!fallbacks) return [];\n if (typeof fallbacks === 'function') fallbacks = fallbacks(code);\n if (isString(fallbacks)) fallbacks = [fallbacks];\n if (Array.isArray(fallbacks)) return fallbacks;\n if (!code) return fallbacks.default || [];\n let found = fallbacks[code];\n if (!found) found = fallbacks[this.getScriptPartFromCode(code)];\n if (!found) found = fallbacks[this.formatLanguageCode(code)];\n if (!found) found = fallbacks[this.getLanguagePartFromCode(code)];\n if (!found) found = fallbacks.default;\n return found || [];\n }\n toResolveHierarchy(code, fallbackCode) {\n const fallbackCodes = this.getFallbackCodes((fallbackCode === false ? [] : fallbackCode) || this.options.fallbackLng || [], code);\n const codes = [];\n const addCode = c => {\n if (!c) return;\n if (this.isSupportedCode(c)) {\n codes.push(c);\n } else {\n this.logger.warn(`rejecting language code not found in supportedLngs: ${c}`);\n }\n };\n if (isString(code) && (code.indexOf('-') > -1 || code.indexOf('_') > -1)) {\n if (this.options.load !== 'languageOnly') addCode(this.formatLanguageCode(code));\n if (this.options.load !== 'languageOnly' && this.options.load !== 'currentOnly') addCode(this.getScriptPartFromCode(code));\n if (this.options.load !== 'currentOnly') addCode(this.getLanguagePartFromCode(code));\n } else if (isString(code)) {\n addCode(this.formatLanguageCode(code));\n }\n fallbackCodes.forEach(fc => {\n if (codes.indexOf(fc) < 0) addCode(this.formatLanguageCode(fc));\n });\n return codes;\n }\n}\n\nconst suffixesOrder = {\n zero: 0,\n one: 1,\n two: 2,\n few: 3,\n many: 4,\n other: 5\n};\nconst dummyRule = {\n select: count => count === 1 ? 'one' : 'other',\n resolvedOptions: () => ({\n pluralCategories: ['one', 'other']\n })\n};\nclass PluralResolver {\n constructor(languageUtils, options = {}) {\n this.languageUtils = languageUtils;\n this.options = options;\n this.logger = baseLogger.create('pluralResolver');\n this.pluralRulesCache = {};\n }\n clearCache() {\n this.pluralRulesCache = {};\n }\n getRule(code, options = {}) {\n const cleanedCode = getCleanedCode(code === 'dev' ? 'en' : code);\n const type = options.ordinal ? 'ordinal' : 'cardinal';\n const cacheKey = JSON.stringify({\n cleanedCode,\n type\n });\n if (cacheKey in this.pluralRulesCache) {\n return this.pluralRulesCache[cacheKey];\n }\n let rule;\n try {\n rule = new Intl.PluralRules(cleanedCode, {\n type\n });\n } catch (err) {\n if (typeof Intl === 'undefined') {\n this.logger.error('No Intl support, please use an Intl polyfill!');\n return dummyRule;\n }\n if (!code.match(/-|_/)) return dummyRule;\n const lngPart = this.languageUtils.getLanguagePartFromCode(code);\n rule = this.getRule(lngPart, options);\n }\n this.pluralRulesCache[cacheKey] = rule;\n return rule;\n }\n needsPlural(code, options = {}) {\n let rule = this.getRule(code, options);\n if (!rule) rule = this.getRule('dev', options);\n return rule?.resolvedOptions().pluralCategories.length > 1;\n }\n getPluralFormsOfKey(code, key, options = {}) {\n return this.getSuffixes(code, options).map(suffix => `${key}${suffix}`);\n }\n getSuffixes(code, options = {}) {\n let rule = this.getRule(code, options);\n if (!rule) rule = this.getRule('dev', options);\n if (!rule) return [];\n return rule.resolvedOptions().pluralCategories.sort((pluralCategory1, pluralCategory2) => suffixesOrder[pluralCategory1] - suffixesOrder[pluralCategory2]).map(pluralCategory => `${this.options.prepend}${options.ordinal ? `ordinal${this.options.prepend}` : ''}${pluralCategory}`);\n }\n getSuffix(code, count, options = {}) {\n const rule = this.getRule(code, options);\n if (rule) {\n return `${this.options.prepend}${options.ordinal ? `ordinal${this.options.prepend}` : ''}${rule.select(count)}`;\n }\n this.logger.warn(`no plural rule found for: ${code}`);\n return this.getSuffix('dev', count, options);\n }\n}\n\nconst deepFindWithDefaults = (data, defaultData, key, keySeparator = '.', ignoreJSONStructure = true) => {\n let path = getPathWithDefaults(data, defaultData, key);\n if (!path && ignoreJSONStructure && isString(key)) {\n path = deepFind(data, key, keySeparator);\n if (path === undefined) path = deepFind(defaultData, key, keySeparator);\n }\n return path;\n};\nconst regexSafe = val => val.replace(/\\$/g, '$$$$');\nclass Interpolator {\n constructor(options = {}) {\n this.logger = baseLogger.create('interpolator');\n this.options = options;\n this.format = options?.interpolation?.format || (value => value);\n this.init(options);\n }\n init(options = {}) {\n if (!options.interpolation) options.interpolation = {\n escapeValue: true\n };\n const {\n escape: escape$1,\n escapeValue,\n useRawValueToEscape,\n prefix,\n prefixEscaped,\n suffix,\n suffixEscaped,\n formatSeparator,\n unescapeSuffix,\n unescapePrefix,\n nestingPrefix,\n nestingPrefixEscaped,\n nestingSuffix,\n nestingSuffixEscaped,\n nestingOptionsSeparator,\n maxReplaces,\n alwaysFormat\n } = options.interpolation;\n this.escape = escape$1 !== undefined ? escape$1 : escape;\n this.escapeValue = escapeValue !== undefined ? escapeValue : true;\n this.useRawValueToEscape = useRawValueToEscape !== undefined ? useRawValueToEscape : false;\n this.prefix = prefix ? regexEscape(prefix) : prefixEscaped || '{{';\n this.suffix = suffix ? regexEscape(suffix) : suffixEscaped || '}}';\n this.formatSeparator = formatSeparator || ',';\n this.unescapePrefix = unescapeSuffix ? '' : unescapePrefix || '-';\n this.unescapeSuffix = this.unescapePrefix ? '' : unescapeSuffix || '';\n this.nestingPrefix = nestingPrefix ? regexEscape(nestingPrefix) : nestingPrefixEscaped || regexEscape('$t(');\n this.nestingSuffix = nestingSuffix ? regexEscape(nestingSuffix) : nestingSuffixEscaped || regexEscape(')');\n this.nestingOptionsSeparator = nestingOptionsSeparator || ',';\n this.maxReplaces = maxReplaces || 1000;\n this.alwaysFormat = alwaysFormat !== undefined ? alwaysFormat : false;\n this.resetRegExp();\n }\n reset() {\n if (this.options) this.init(this.options);\n }\n resetRegExp() {\n const getOrResetRegExp = (existingRegExp, pattern) => {\n if (existingRegExp?.source === pattern) {\n existingRegExp.lastIndex = 0;\n return existingRegExp;\n }\n return new RegExp(pattern, 'g');\n };\n this.regexp = getOrResetRegExp(this.regexp, `${this.prefix}(.+?)${this.suffix}`);\n this.regexpUnescape = getOrResetRegExp(this.regexpUnescape, `${this.prefix}${this.unescapePrefix}(.+?)${this.unescapeSuffix}${this.suffix}`);\n this.nestingRegexp = getOrResetRegExp(this.nestingRegexp, `${this.nestingPrefix}((?:[^()\"']+|\"[^\"]*\"|'[^']*'|\\\\((?:[^()]|\"[^\"]*\"|'[^']*')*\\\\))*?)${this.nestingSuffix}`);\n }\n interpolate(str, data, lng, options) {\n let match;\n let value;\n let replaces;\n const defaultData = this.options && this.options.interpolation && this.options.interpolation.defaultVariables || {};\n const handleFormat = key => {\n if (key.indexOf(this.formatSeparator) < 0) {\n const path = deepFindWithDefaults(data, defaultData, key, this.options.keySeparator, this.options.ignoreJSONStructure);\n return this.alwaysFormat ? this.format(path, undefined, lng, {\n ...options,\n ...data,\n interpolationkey: key\n }) : path;\n }\n const p = key.split(this.formatSeparator);\n const k = p.shift().trim();\n const f = p.join(this.formatSeparator).trim();\n return this.format(deepFindWithDefaults(data, defaultData, k, this.options.keySeparator, this.options.ignoreJSONStructure), f, lng, {\n ...options,\n ...data,\n interpolationkey: k\n });\n };\n this.resetRegExp();\n const missingInterpolationHandler = options?.missingInterpolationHandler || this.options.missingInterpolationHandler;\n const skipOnVariables = options?.interpolation?.skipOnVariables !== undefined ? options.interpolation.skipOnVariables : this.options.interpolation.skipOnVariables;\n const todos = [{\n regex: this.regexpUnescape,\n safeValue: val => regexSafe(val)\n }, {\n regex: this.regexp,\n safeValue: val => this.escapeValue ? regexSafe(this.escape(val)) : regexSafe(val)\n }];\n todos.forEach(todo => {\n replaces = 0;\n while (match = todo.regex.exec(str)) {\n const matchedVar = match[1].trim();\n value = handleFormat(matchedVar);\n if (value === undefined) {\n if (typeof missingInterpolationHandler === 'function') {\n const temp = missingInterpolationHandler(str, match, options);\n value = isString(temp) ? temp : '';\n } else if (options && Object.prototype.hasOwnProperty.call(options, matchedVar)) {\n value = '';\n } else if (skipOnVariables) {\n value = match[0];\n continue;\n } else {\n this.logger.warn(`missed to pass in variable ${matchedVar} for interpolating ${str}`);\n value = '';\n }\n } else if (!isString(value) && !this.useRawValueToEscape) {\n value = makeString(value);\n }\n const safeValue = todo.safeValue(value);\n str = str.replace(match[0], safeValue);\n if (skipOnVariables) {\n todo.regex.lastIndex += value.length;\n todo.regex.lastIndex -= match[0].length;\n } else {\n todo.regex.lastIndex = 0;\n }\n replaces++;\n if (replaces >= this.maxReplaces) {\n break;\n }\n }\n });\n return str;\n }\n nest(str, fc, options = {}) {\n let match;\n let value;\n let clonedOptions;\n const handleHasOptions = (key, inheritedOptions) => {\n const sep = this.nestingOptionsSeparator;\n if (key.indexOf(sep) < 0) return key;\n const c = key.split(new RegExp(`${regexEscape(sep)}[ ]*{`));\n let optionsString = `{${c[1]}`;\n key = c[0];\n optionsString = this.interpolate(optionsString, clonedOptions);\n const matchedSingleQuotes = optionsString.match(/'/g);\n const matchedDoubleQuotes = optionsString.match(/\"/g);\n if ((matchedSingleQuotes?.length ?? 0) % 2 === 0 && !matchedDoubleQuotes || (matchedDoubleQuotes?.length ?? 0) % 2 !== 0) {\n optionsString = optionsString.replace(/'/g, '\"');\n }\n try {\n clonedOptions = JSON.parse(optionsString);\n if (inheritedOptions) clonedOptions = {\n ...inheritedOptions,\n ...clonedOptions\n };\n } catch (e) {\n this.logger.warn(`failed parsing options string in nesting for key ${key}`, e);\n return `${key}${sep}${optionsString}`;\n }\n if (clonedOptions.defaultValue && clonedOptions.defaultValue.indexOf(this.prefix) > -1) delete clonedOptions.defaultValue;\n return key;\n };\n while (match = this.nestingRegexp.exec(str)) {\n let formatters = [];\n clonedOptions = {\n ...options\n };\n clonedOptions = clonedOptions.replace && !isString(clonedOptions.replace) ? clonedOptions.replace : clonedOptions;\n clonedOptions.applyPostProcessor = false;\n delete clonedOptions.defaultValue;\n const keyEndIndex = /{.*}/.test(match[1]) ? match[1].lastIndexOf('}') + 1 : match[1].indexOf(this.formatSeparator);\n if (keyEndIndex !== -1) {\n formatters = match[1].slice(keyEndIndex).split(this.formatSeparator).map(elem => elem.trim()).filter(Boolean);\n match[1] = match[1].slice(0, keyEndIndex);\n }\n value = fc(handleHasOptions.call(this, match[1].trim(), clonedOptions), clonedOptions);\n if (value && match[0] === str && !isString(value)) return value;\n if (!isString(value)) value = makeString(value);\n if (!value) {\n this.logger.warn(`missed to resolve ${match[1]} for nesting ${str}`);\n value = '';\n }\n if (formatters.length) {\n value = formatters.reduce((v, f) => this.format(v, f, options.lng, {\n ...options,\n interpolationkey: match[1].trim()\n }), value.trim());\n }\n str = str.replace(match[0], value);\n this.regexp.lastIndex = 0;\n }\n return str;\n }\n}\n\nconst parseFormatStr = formatStr => {\n let formatName = formatStr.toLowerCase().trim();\n const formatOptions = {};\n if (formatStr.indexOf('(') > -1) {\n const p = formatStr.split('(');\n formatName = p[0].toLowerCase().trim();\n const optStr = p[1].substring(0, p[1].length - 1);\n if (formatName === 'currency' && optStr.indexOf(':') < 0) {\n if (!formatOptions.currency) formatOptions.currency = optStr.trim();\n } else if (formatName === 'relativetime' && optStr.indexOf(':') < 0) {\n if (!formatOptions.range) formatOptions.range = optStr.trim();\n } else {\n const opts = optStr.split(';');\n opts.forEach(opt => {\n if (opt) {\n const [key, ...rest] = opt.split(':');\n const val = rest.join(':').trim().replace(/^'+|'+$/g, '');\n const trimmedKey = key.trim();\n if (!formatOptions[trimmedKey]) formatOptions[trimmedKey] = val;\n if (val === 'false') formatOptions[trimmedKey] = false;\n if (val === 'true') formatOptions[trimmedKey] = true;\n if (!isNaN(val)) formatOptions[trimmedKey] = parseInt(val, 10);\n }\n });\n }\n }\n return {\n formatName,\n formatOptions\n };\n};\nconst createCachedFormatter = fn => {\n const cache = {};\n return (v, l, o) => {\n let optForCache = o;\n if (o && o.interpolationkey && o.formatParams && o.formatParams[o.interpolationkey] && o[o.interpolationkey]) {\n optForCache = {\n ...optForCache,\n [o.interpolationkey]: undefined\n };\n }\n const key = l + JSON.stringify(optForCache);\n let frm = cache[key];\n if (!frm) {\n frm = fn(getCleanedCode(l), o);\n cache[key] = frm;\n }\n return frm(v);\n };\n};\nconst createNonCachedFormatter = fn => (v, l, o) => fn(getCleanedCode(l), o)(v);\nclass Formatter {\n constructor(options = {}) {\n this.logger = baseLogger.create('formatter');\n this.options = options;\n this.init(options);\n }\n init(services, options = {\n interpolation: {}\n }) {\n this.formatSeparator = options.interpolation.formatSeparator || ',';\n const cf = options.cacheInBuiltFormats ? createCachedFormatter : createNonCachedFormatter;\n this.formats = {\n number: cf((lng, opt) => {\n const formatter = new Intl.NumberFormat(lng, {\n ...opt\n });\n return val => formatter.format(val);\n }),\n currency: cf((lng, opt) => {\n const formatter = new Intl.NumberFormat(lng, {\n ...opt,\n style: 'currency'\n });\n return val => formatter.format(val);\n }),\n datetime: cf((lng, opt) => {\n const formatter = new Intl.DateTimeFormat(lng, {\n ...opt\n });\n return val => formatter.format(val);\n }),\n relativetime: cf((lng, opt) => {\n const formatter = new Intl.RelativeTimeFormat(lng, {\n ...opt\n });\n return val => formatter.format(val, opt.range || 'day');\n }),\n list: cf((lng, opt) => {\n const formatter = new Intl.ListFormat(lng, {\n ...opt\n });\n return val => formatter.format(val);\n })\n };\n }\n add(name, fc) {\n this.formats[name.toLowerCase().trim()] = fc;\n }\n addCached(name, fc) {\n this.formats[name.toLowerCase().trim()] = createCachedFormatter(fc);\n }\n format(value, format, lng, options = {}) {\n const formats = format.split(this.formatSeparator);\n if (formats.length > 1 && formats[0].indexOf('(') > 1 && formats[0].indexOf(')') < 0 && formats.find(f => f.indexOf(')') > -1)) {\n const lastIndex = formats.findIndex(f => f.indexOf(')') > -1);\n formats[0] = [formats[0], ...formats.splice(1, lastIndex)].join(this.formatSeparator);\n }\n const result = formats.reduce((mem, f) => {\n const {\n formatName,\n formatOptions\n } = parseFormatStr(f);\n if (this.formats[formatName]) {\n let formatted = mem;\n try {\n const valOptions = options?.formatParams?.[options.interpolationkey] || {};\n const l = valOptions.locale || valOptions.lng || options.locale || options.lng || lng;\n formatted = this.formats[formatName](mem, l, {\n ...formatOptions,\n ...options,\n ...valOptions\n });\n } catch (error) {\n this.logger.warn(error);\n }\n return formatted;\n } else {\n this.logger.warn(`there was no format function for ${formatName}`);\n }\n return mem;\n }, value);\n return result;\n }\n}\n\nconst removePending = (q, name) => {\n if (q.pending[name] !== undefined) {\n delete q.pending[name];\n q.pendingCount--;\n }\n};\nclass Connector extends EventEmitter {\n constructor(backend, store, services, options = {}) {\n super();\n this.backend = backend;\n this.store = store;\n this.services = services;\n this.languageUtils = services.languageUtils;\n this.options = options;\n this.logger = baseLogger.create('backendConnector');\n this.waitingReads = [];\n this.maxParallelReads = options.maxParallelReads || 10;\n this.readingCalls = 0;\n this.maxRetries = options.maxRetries >= 0 ? options.maxRetries : 5;\n this.retryTimeout = options.retryTimeout >= 1 ? options.retryTimeout : 350;\n this.state = {};\n this.queue = [];\n this.backend?.init?.(services, options.backend, options);\n }\n queueLoad(languages, namespaces, options, callback) {\n const toLoad = {};\n const pending = {};\n const toLoadLanguages = {};\n const toLoadNamespaces = {};\n languages.forEach(lng => {\n let hasAllNamespaces = true;\n namespaces.forEach(ns => {\n const name = `${lng}|${ns}`;\n if (!options.reload && this.store.hasResourceBundle(lng, ns)) {\n this.state[name] = 2;\n } else if (this.state[name] < 0) ; else if (this.state[name] === 1) {\n if (pending[name] === undefined) pending[name] = true;\n } else {\n this.state[name] = 1;\n hasAllNamespaces = false;\n if (pending[name] === undefined) pending[name] = true;\n if (toLoad[name] === undefined) toLoad[name] = true;\n if (toLoadNamespaces[ns] === undefined) toLoadNamespaces[ns] = true;\n }\n });\n if (!hasAllNamespaces) toLoadLanguages[lng] = true;\n });\n if (Object.keys(toLoad).length || Object.keys(pending).length) {\n this.queue.push({\n pending,\n pendingCount: Object.keys(pending).length,\n loaded: {},\n errors: [],\n callback\n });\n }\n return {\n toLoad: Object.keys(toLoad),\n pending: Object.keys(pending),\n toLoadLanguages: Object.keys(toLoadLanguages),\n toLoadNamespaces: Object.keys(toLoadNamespaces)\n };\n }\n loaded(name, err, data) {\n const s = name.split('|');\n const lng = s[0];\n const ns = s[1];\n if (err) this.emit('failedLoading', lng, ns, err);\n if (!err && data) {\n this.store.addResourceBundle(lng, ns, data, undefined, undefined, {\n skipCopy: true\n });\n }\n this.state[name] = err ? -1 : 2;\n if (err && data) this.state[name] = 0;\n const loaded = {};\n this.queue.forEach(q => {\n pushPath(q.loaded, [lng], ns);\n removePending(q, name);\n if (err) q.errors.push(err);\n if (q.pendingCount === 0 && !q.done) {\n Object.keys(q.loaded).forEach(l => {\n if (!loaded[l]) loaded[l] = {};\n const loadedKeys = q.loaded[l];\n if (loadedKeys.length) {\n loadedKeys.forEach(n => {\n if (loaded[l][n] === undefined) loaded[l][n] = true;\n });\n }\n });\n q.done = true;\n if (q.errors.length) {\n q.callback(q.errors);\n } else {\n q.callback();\n }\n }\n });\n this.emit('loaded', loaded);\n this.queue = this.queue.filter(q => !q.done);\n }\n read(lng, ns, fcName, tried = 0, wait = this.retryTimeout, callback) {\n if (!lng.length) return callback(null, {});\n if (this.readingCalls >= this.maxParallelReads) {\n this.waitingReads.push({\n lng,\n ns,\n fcName,\n tried,\n wait,\n callback\n });\n return;\n }\n this.readingCalls++;\n const resolver = (err, data) => {\n this.readingCalls--;\n if (this.waitingReads.length > 0) {\n const next = this.waitingReads.shift();\n this.read(next.lng, next.ns, next.fcName, next.tried, next.wait, next.callback);\n }\n if (err && data && tried < this.maxRetries) {\n setTimeout(() => {\n this.read.call(this, lng, ns, fcName, tried + 1, wait * 2, callback);\n }, wait);\n return;\n }\n callback(err, data);\n };\n const fc = this.backend[fcName].bind(this.backend);\n if (fc.length === 2) {\n try {\n const r = fc(lng, ns);\n if (r && typeof r.then === 'function') {\n r.then(data => resolver(null, data)).catch(resolver);\n } else {\n resolver(null, r);\n }\n } catch (err) {\n resolver(err);\n }\n return;\n }\n return fc(lng, ns, resolver);\n }\n prepareLoading(languages, namespaces, options = {}, callback) {\n if (!this.backend) {\n this.logger.warn('No backend was added via i18next.use. Will not load resources.');\n return callback && callback();\n }\n if (isString(languages)) languages = this.languageUtils.toResolveHierarchy(languages);\n if (isString(namespaces)) namespaces = [namespaces];\n const toLoad = this.queueLoad(languages, namespaces, options, callback);\n if (!toLoad.toLoad.length) {\n if (!toLoad.pending.length) callback();\n return null;\n }\n toLoad.toLoad.forEach(name => {\n this.loadOne(name);\n });\n }\n load(languages, namespaces, callback) {\n this.prepareLoading(languages, namespaces, {}, callback);\n }\n reload(languages, namespaces, callback) {\n this.prepareLoading(languages, namespaces, {\n reload: true\n }, callback);\n }\n loadOne(name, prefix = '') {\n const s = name.split('|');\n const lng = s[0];\n const ns = s[1];\n this.read(lng, ns, 'read', undefined, undefined, (err, data) => {\n if (err) this.logger.warn(`${prefix}loading namespace ${ns} for language ${lng} failed`, err);\n if (!err && data) this.logger.log(`${prefix}loaded namespace ${ns} for language ${lng}`, data);\n this.loaded(name, err, data);\n });\n }\n saveMissing(languages, namespace, key, fallbackValue, isUpdate, options = {}, clb = () => {}) {\n if (this.services?.utils?.hasLoadedNamespace && !this.services?.utils?.hasLoadedNamespace(namespace)) {\n this.logger.warn(`did not save key \"${key}\" as the namespace \"${namespace}\" was not yet loaded`, 'This means something IS WRONG in your setup. You access the t function before i18next.init / i18next.loadNamespace / i18next.changeLanguage was done. Wait for the callback or Promise to resolve before accessing it!!!');\n return;\n }\n if (key === undefined || key === null || key === '') return;\n if (this.backend?.create) {\n const opts = {\n ...options,\n isUpdate\n };\n const fc = this.backend.create.bind(this.backend);\n if (fc.length < 6) {\n try {\n let r;\n if (fc.length === 5) {\n r = fc(languages, namespace, key, fallbackValue, opts);\n } else {\n r = fc(languages, namespace, key, fallbackValue);\n }\n if (r && typeof r.then === 'function') {\n r.then(data => clb(null, data)).catch(clb);\n } else {\n clb(null, r);\n }\n } catch (err) {\n clb(err);\n }\n } else {\n fc(languages, namespace, key, fallbackValue, clb, opts);\n }\n }\n if (!languages || !languages[0]) return;\n this.store.addResource(languages[0], namespace, key, fallbackValue);\n }\n}\n\nconst get = () => ({\n debug: false,\n initAsync: true,\n ns: ['translation'],\n defaultNS: ['translation'],\n fallbackLng: ['dev'],\n fallbackNS: false,\n supportedLngs: false,\n nonExplicitSupportedLngs: false,\n load: 'all',\n preload: false,\n simplifyPluralSuffix: true,\n keySeparator: '.',\n nsSeparator: ':',\n pluralSeparator: '_',\n contextSeparator: '_',\n partialBundledLanguages: false,\n saveMissing: false,\n updateMissing: false,\n saveMissingTo: 'fallback',\n saveMissingPlurals: true,\n missingKeyHandler: false,\n missingInterpolationHandler: false,\n postProcess: false,\n postProcessPassResolved: false,\n returnNull: false,\n returnEmptyString: true,\n returnObjects: false,\n joinArrays: false,\n returnedObjectHandler: false,\n parseMissingKeyHandler: false,\n appendNamespaceToMissingKey: false,\n appendNamespaceToCIMode: false,\n overloadTranslationOptionHandler: args => {\n let ret = {};\n if (typeof args[1] === 'object') ret = args[1];\n if (isString(args[1])) ret.defaultValue = args[1];\n if (isString(args[2])) ret.tDescription = args[2];\n if (typeof args[2] === 'object' || typeof args[3] === 'object') {\n const options = args[3] || args[2];\n Object.keys(options).forEach(key => {\n ret[key] = options[key];\n });\n }\n return ret;\n },\n interpolation: {\n escapeValue: true,\n format: value => value,\n prefix: '{{',\n suffix: '}}',\n formatSeparator: ',',\n unescapePrefix: '-',\n nestingPrefix: '$t(',\n nestingSuffix: ')',\n nestingOptionsSeparator: ',',\n maxReplaces: 1000,\n skipOnVariables: true\n },\n cacheInBuiltFormats: true\n});\nconst transformOptions = options => {\n if (isString(options.ns)) options.ns = [options.ns];\n if (isString(options.fallbackLng)) options.fallbackLng = [options.fallbackLng];\n if (isString(options.fallbackNS)) options.fallbackNS = [options.fallbackNS];\n if (options.supportedLngs?.indexOf?.('cimode') < 0) {\n options.supportedLngs = options.supportedLngs.concat(['cimode']);\n }\n if (typeof options.initImmediate === 'boolean') options.initAsync = options.initImmediate;\n return options;\n};\n\nconst noop = () => {};\nconst bindMemberFunctions = inst => {\n const mems = Object.getOwnPropertyNames(Object.getPrototypeOf(inst));\n mems.forEach(mem => {\n if (typeof inst[mem] === 'function') {\n inst[mem] = inst[mem].bind(inst);\n }\n });\n};\nconst SUPPORT_NOTICE_KEY = '__i18next_supportNoticeShown';\nconst getSupportNoticeShown = () => {\n if (typeof globalThis !== 'undefined' && !!globalThis[SUPPORT_NOTICE_KEY]) return true;\n if (typeof process !== 'undefined' && process.env && process.env.I18NEXT_NO_SUPPORT_NOTICE) return true;\n if (typeof process !== 'undefined' && process.env && process.env.NODE_ENV === 'production') return true;\n return false;\n};\nconst setSupportNoticeShown = () => {\n if (typeof globalThis !== 'undefined') globalThis[SUPPORT_NOTICE_KEY] = true;\n};\nconst usesLocize = inst => {\n if (inst?.modules?.backend?.name?.indexOf('Locize') > 0) return true;\n if (inst?.modules?.backend?.constructor?.name?.indexOf('Locize') > 0) return true;\n if (inst?.options?.backend?.backends) {\n if (inst.options.backend.backends.some(b => b?.name?.indexOf('Locize') > 0 || b?.constructor?.name?.indexOf('Locize') > 0)) return true;\n }\n if (inst?.options?.backend?.projectId) return true;\n if (inst?.options?.backend?.backendOptions) {\n if (inst.options.backend.backendOptions.some(b => b?.projectId)) return true;\n }\n return false;\n};\nclass I18n extends EventEmitter {\n constructor(options = {}, callback) {\n super();\n this.options = transformOptions(options);\n this.services = {};\n this.logger = baseLogger;\n this.modules = {\n external: []\n };\n bindMemberFunctions(this);\n if (callback && !this.isInitialized && !options.isClone) {\n if (!this.options.initAsync) {\n this.init(options, callback);\n return this;\n }\n setTimeout(() => {\n this.init(options, callback);\n }, 0);\n }\n }\n init(options = {}, callback) {\n this.isInitializing = true;\n if (typeof options === 'function') {\n callback = options;\n options = {};\n }\n if (options.defaultNS == null && options.ns) {\n if (isString(options.ns)) {\n options.defaultNS = options.ns;\n } else if (options.ns.indexOf('translation') < 0) {\n options.defaultNS = options.ns[0];\n }\n }\n const defOpts = get();\n this.options = {\n ...defOpts,\n ...this.options,\n ...transformOptions(options)\n };\n this.options.interpolation = {\n ...defOpts.interpolation,\n ...this.options.interpolation\n };\n if (options.keySeparator !== undefined) {\n this.options.userDefinedKeySeparator = options.keySeparator;\n }\n if (options.nsSeparator !== undefined) {\n this.options.userDefinedNsSeparator = options.nsSeparator;\n }\n if (typeof this.options.overloadTranslationOptionHandler !== 'function') {\n this.options.overloadTranslationOptionHandler = defOpts.overloadTranslationOptionHandler;\n }\n if (this.options.showSupportNotice !== false && !usesLocize(this) && !getSupportNoticeShown()) {\n if (typeof console !== 'undefined' && typeof console.info !== 'undefined') console.info('🌐 i18next is made possible by our own product, Locize — consider powering your project with managed localization (AI, CDN, integrations): https://locize.com 💙');\n setSupportNoticeShown();\n }\n const createClassOnDemand = ClassOrObject => {\n if (!ClassOrObject) return null;\n if (typeof ClassOrObject === 'function') return new ClassOrObject();\n return ClassOrObject;\n };\n if (!this.options.isClone) {\n if (this.modules.logger) {\n baseLogger.init(createClassOnDemand(this.modules.logger), this.options);\n } else {\n baseLogger.init(null, this.options);\n }\n let formatter;\n if (this.modules.formatter) {\n formatter = this.modules.formatter;\n } else {\n formatter = Formatter;\n }\n const lu = new LanguageUtil(this.options);\n this.store = new ResourceStore(this.options.resources, this.options);\n const s = this.services;\n s.logger = baseLogger;\n s.resourceStore = this.store;\n s.languageUtils = lu;\n s.pluralResolver = new PluralResolver(lu, {\n prepend: this.options.pluralSeparator,\n simplifyPluralSuffix: this.options.simplifyPluralSuffix\n });\n const usingLegacyFormatFunction = this.options.interpolation.format && this.options.interpolation.format !== defOpts.interpolation.format;\n if (usingLegacyFormatFunction) {\n this.logger.deprecate(`init: you are still using the legacy format function, please use the new approach: https://www.i18next.com/translation-function/formatting`);\n }\n if (formatter && (!this.options.interpolation.format || this.options.interpolation.format === defOpts.interpolation.format)) {\n s.formatter = createClassOnDemand(formatter);\n if (s.formatter.init) s.formatter.init(s, this.options);\n this.options.interpolation.format = s.formatter.format.bind(s.formatter);\n }\n s.interpolator = new Interpolator(this.options);\n s.utils = {\n hasLoadedNamespace: this.hasLoadedNamespace.bind(this)\n };\n s.backendConnector = new Connector(createClassOnDemand(this.modules.backend), s.resourceStore, s, this.options);\n s.backendConnector.on('*', (event, ...args) => {\n this.emit(event, ...args);\n });\n if (this.modules.languageDetector) {\n s.languageDetector = createClassOnDemand(this.modules.languageDetector);\n if (s.languageDetector.init) s.languageDetector.init(s, this.options.detection, this.options);\n }\n if (this.modules.i18nFormat) {\n s.i18nFormat = createClassOnDemand(this.modules.i18nFormat);\n if (s.i18nFormat.init) s.i18nFormat.init(this);\n }\n this.translator = new Translator(this.services, this.options);\n this.translator.on('*', (event, ...args) => {\n this.emit(event, ...args);\n });\n this.modules.external.forEach(m => {\n if (m.init) m.init(this);\n });\n }\n this.format = this.options.interpolation.format;\n if (!callback) callback = noop;\n if (this.options.fallbackLng && !this.services.languageDetector && !this.options.lng) {\n const codes = this.services.languageUtils.getFallbackCodes(this.options.fallbackLng);\n if (codes.length > 0 && codes[0] !== 'dev') this.options.lng = codes[0];\n }\n if (!this.services.languageDetector && !this.options.lng) {\n this.logger.warn('init: no languageDetector is used and no lng is defined');\n }\n const storeApi = ['getResource', 'hasResourceBundle', 'getResourceBundle', 'getDataByLanguage'];\n storeApi.forEach(fcName => {\n this[fcName] = (...args) => this.store[fcName](...args);\n });\n const storeApiChained = ['addResource', 'addResources', 'addResourceBundle', 'removeResourceBundle'];\n storeApiChained.forEach(fcName => {\n this[fcName] = (...args) => {\n this.store[fcName](...args);\n return this;\n };\n });\n const deferred = defer();\n const load = () => {\n const finish = (err, t) => {\n this.isInitializing = false;\n if (this.isInitialized && !this.initializedStoreOnce) this.logger.warn('init: i18next is already initialized. You should call init just once!');\n this.isInitialized = true;\n if (!this.options.isClone) this.logger.log('initialized', this.options);\n this.emit('initialized', this.options);\n deferred.resolve(t);\n callback(err, t);\n };\n if (this.languages && !this.isInitialized) return finish(null, this.t.bind(this));\n this.changeLanguage(this.options.lng, finish);\n };\n if (this.options.resources || !this.options.initAsync) {\n load();\n } else {\n setTimeout(load, 0);\n }\n return deferred;\n }\n loadResources(language, callback = noop) {\n let usedCallback = callback;\n const usedLng = isString(language) ? language : this.language;\n if (typeof language === 'function') usedCallback = language;\n if (!this.options.resources || this.options.partialBundledLanguages) {\n if (usedLng?.toLowerCase() === 'cimode' && (!this.options.preload || this.options.preload.length === 0)) return usedCallback();\n const toLoad = [];\n const append = lng => {\n if (!lng) return;\n if (lng === 'cimode') return;\n const lngs = this.services.languageUtils.toResolveHierarchy(lng);\n lngs.forEach(l => {\n if (l === 'cimode') return;\n if (toLoad.indexOf(l) < 0) toLoad.push(l);\n });\n };\n if (!usedLng) {\n const fallbacks = this.services.languageUtils.getFallbackCodes(this.options.fallbackLng);\n fallbacks.forEach(l => append(l));\n } else {\n append(usedLng);\n }\n this.options.preload?.forEach?.(l => append(l));\n this.services.backendConnector.load(toLoad, this.options.ns, e => {\n if (!e && !this.resolvedLanguage && this.language) this.setResolvedLanguage(this.language);\n usedCallback(e);\n });\n } else {\n usedCallback(null);\n }\n }\n reloadResources(lngs, ns, callback) {\n const deferred = defer();\n if (typeof lngs === 'function') {\n callback = lngs;\n lngs = undefined;\n }\n if (typeof ns === 'function') {\n callback = ns;\n ns = undefined;\n }\n if (!lngs) lngs = this.languages;\n if (!ns) ns = this.options.ns;\n if (!callback) callback = noop;\n this.services.backendConnector.reload(lngs, ns, err => {\n deferred.resolve();\n callback(err);\n });\n return deferred;\n }\n use(module) {\n if (!module) throw new Error('You are passing an undefined module! Please check the object you are passing to i18next.use()');\n if (!module.type) throw new Error('You are passing a wrong module! Please check the object you are passing to i18next.use()');\n if (module.type === 'backend') {\n this.modules.backend = module;\n }\n if (module.type === 'logger' || module.log && module.warn && module.error) {\n this.modules.logger = module;\n }\n if (module.type === 'languageDetector') {\n this.modules.languageDetector = module;\n }\n if (module.type === 'i18nFormat') {\n this.modules.i18nFormat = module;\n }\n if (module.type === 'postProcessor') {\n postProcessor.addPostProcessor(module);\n }\n if (module.type === 'formatter') {\n this.modules.formatter = module;\n }\n if (module.type === '3rdParty') {\n this.modules.external.push(module);\n }\n return this;\n }\n setResolvedLanguage(l) {\n if (!l || !this.languages) return;\n if (['cimode', 'dev'].indexOf(l) > -1) return;\n for (let li = 0; li < this.languages.length; li++) {\n const lngInLngs = this.languages[li];\n if (['cimode', 'dev'].indexOf(lngInLngs) > -1) continue;\n if (this.store.hasLanguageSomeTranslations(lngInLngs)) {\n this.resolvedLanguage = lngInLngs;\n break;\n }\n }\n if (!this.resolvedLanguage && this.languages.indexOf(l) < 0 && this.store.hasLanguageSomeTranslations(l)) {\n this.resolvedLanguage = l;\n this.languages.unshift(l);\n }\n }\n changeLanguage(lng, callback) {\n this.isLanguageChangingTo = lng;\n const deferred = defer();\n this.emit('languageChanging', lng);\n const setLngProps = l => {\n this.language = l;\n this.languages = this.services.languageUtils.toResolveHierarchy(l);\n this.resolvedLanguage = undefined;\n this.setResolvedLanguage(l);\n };\n const done = (err, l) => {\n if (l) {\n if (this.isLanguageChangingTo === lng) {\n setLngProps(l);\n this.translator.changeLanguage(l);\n this.isLanguageChangingTo = undefined;\n this.emit('languageChanged', l);\n this.logger.log('languageChanged', l);\n }\n } else {\n this.isLanguageChangingTo = undefined;\n }\n deferred.resolve((...args) => this.t(...args));\n if (callback) callback(err, (...args) => this.t(...args));\n };\n const setLng = lngs => {\n if (!lng && !lngs && this.services.languageDetector) lngs = [];\n const fl = isString(lngs) ? lngs : lngs && lngs[0];\n const l = this.store.hasLanguageSomeTranslations(fl) ? fl : this.services.languageUtils.getBestMatchFromCodes(isString(lngs) ? [lngs] : lngs);\n if (l) {\n if (!this.language) {\n setLngProps(l);\n }\n if (!this.translator.language) this.translator.changeLanguage(l);\n this.services.languageDetector?.cacheUserLanguage?.(l);\n }\n this.loadResources(l, err => {\n done(err, l);\n });\n };\n if (!lng && this.services.languageDetector && !this.services.languageDetector.async) {\n setLng(this.services.languageDetector.detect());\n } else if (!lng && this.services.languageDetector && this.services.languageDetector.async) {\n if (this.services.languageDetector.detect.length === 0) {\n this.services.languageDetector.detect().then(setLng);\n } else {\n this.services.languageDetector.detect(setLng);\n }\n } else {\n setLng(lng);\n }\n return deferred;\n }\n getFixedT(lng, ns, keyPrefix) {\n const fixedT = (key, opts, ...rest) => {\n let o;\n if (typeof opts !== 'object') {\n o = this.options.overloadTranslationOptionHandler([key, opts].concat(rest));\n } else {\n o = {\n ...opts\n };\n }\n o.lng = o.lng || fixedT.lng;\n o.lngs = o.lngs || fixedT.lngs;\n o.ns = o.ns || fixedT.ns;\n if (o.keyPrefix !== '') o.keyPrefix = o.keyPrefix || keyPrefix || fixedT.keyPrefix;\n const selectorOpts = {\n ...this.options,\n ...o\n };\n if (typeof o.keyPrefix === 'function') o.keyPrefix = keysFromSelector(o.keyPrefix, selectorOpts);\n const keySeparator = this.options.keySeparator || '.';\n let resultKey;\n if (o.keyPrefix && Array.isArray(key)) {\n resultKey = key.map(k => {\n if (typeof k === 'function') k = keysFromSelector(k, selectorOpts);\n return `${o.keyPrefix}${keySeparator}${k}`;\n });\n } else {\n if (typeof key === 'function') key = keysFromSelector(key, selectorOpts);\n resultKey = o.keyPrefix ? `${o.keyPrefix}${keySeparator}${key}` : key;\n }\n return this.t(resultKey, o);\n };\n if (isString(lng)) {\n fixedT.lng = lng;\n } else {\n fixedT.lngs = lng;\n }\n fixedT.ns = ns;\n fixedT.keyPrefix = keyPrefix;\n return fixedT;\n }\n t(...args) {\n return this.translator?.translate(...args);\n }\n exists(...args) {\n return this.translator?.exists(...args);\n }\n setDefaultNamespace(ns) {\n this.options.defaultNS = ns;\n }\n hasLoadedNamespace(ns, options = {}) {\n if (!this.isInitialized) {\n this.logger.warn('hasLoadedNamespace: i18next was not initialized', this.languages);\n return false;\n }\n if (!this.languages || !this.languages.length) {\n this.logger.warn('hasLoadedNamespace: i18n.languages were undefined or empty', this.languages);\n return false;\n }\n const lng = options.lng || this.resolvedLanguage || this.languages[0];\n const fallbackLng = this.options ? this.options.fallbackLng : false;\n const lastLng = this.languages[this.languages.length - 1];\n if (lng.toLowerCase() === 'cimode') return true;\n const loadNotPending = (l, n) => {\n const loadState = this.services.backendConnector.state[`${l}|${n}`];\n return loadState === -1 || loadState === 0 || loadState === 2;\n };\n if (options.precheck) {\n const preResult = options.precheck(this, loadNotPending);\n if (preResult !== undefined) return preResult;\n }\n if (this.hasResourceBundle(lng, ns)) return true;\n if (!this.services.backendConnector.backend || this.options.resources && !this.options.partialBundledLanguages) return true;\n if (loadNotPending(lng, ns) && (!fallbackLng || loadNotPending(lastLng, ns))) return true;\n return false;\n }\n loadNamespaces(ns, callback) {\n const deferred = defer();\n if (!this.options.ns) {\n if (callback) callback();\n return Promise.resolve();\n }\n if (isString(ns)) ns = [ns];\n ns.forEach(n => {\n if (this.options.ns.indexOf(n) < 0) this.options.ns.push(n);\n });\n this.loadResources(err => {\n deferred.resolve();\n if (callback) callback(err);\n });\n return deferred;\n }\n loadLanguages(lngs, callback) {\n const deferred = defer();\n if (isString(lngs)) lngs = [lngs];\n const preloaded = this.options.preload || [];\n const newLngs = lngs.filter(lng => preloaded.indexOf(lng) < 0 && this.services.languageUtils.isSupportedCode(lng));\n if (!newLngs.length) {\n if (callback) callback();\n return Promise.resolve();\n }\n this.options.preload = preloaded.concat(newLngs);\n this.loadResources(err => {\n deferred.resolve();\n if (callback) callback(err);\n });\n return deferred;\n }\n dir(lng) {\n if (!lng) lng = this.resolvedLanguage || (this.languages?.length > 0 ? this.languages[0] : this.language);\n if (!lng) return 'rtl';\n try {\n const l = new Intl.Locale(lng);\n if (l && l.getTextInfo) {\n const ti = l.getTextInfo();\n if (ti && ti.direction) return ti.direction;\n }\n } catch (e) {}\n const rtlLngs = ['ar', 'shu', 'sqr', 'ssh', 'xaa', 'yhd', 'yud', 'aao', 'abh', 'abv', 'acm', 'acq', 'acw', 'acx', 'acy', 'adf', 'ads', 'aeb', 'aec', 'afb', 'ajp', 'apc', 'apd', 'arb', 'arq', 'ars', 'ary', 'arz', 'auz', 'avl', 'ayh', 'ayl', 'ayn', 'ayp', 'bbz', 'pga', 'he', 'iw', 'ps', 'pbt', 'pbu', 'pst', 'prp', 'prd', 'ug', 'ur', 'ydd', 'yds', 'yih', 'ji', 'yi', 'hbo', 'men', 'xmn', 'fa', 'jpr', 'peo', 'pes', 'prs', 'dv', 'sam', 'ckb'];\n const languageUtils = this.services?.languageUtils || new LanguageUtil(get());\n if (lng.toLowerCase().indexOf('-latn') > 1) return 'ltr';\n return rtlLngs.indexOf(languageUtils.getLanguagePartFromCode(lng)) > -1 || lng.toLowerCase().indexOf('-arab') > 1 ? 'rtl' : 'ltr';\n }\n static createInstance(options = {}, callback) {\n const instance = new I18n(options, callback);\n instance.createInstance = I18n.createInstance;\n return instance;\n }\n cloneInstance(options = {}, callback = noop) {\n const forkResourceStore = options.forkResourceStore;\n if (forkResourceStore) delete options.forkResourceStore;\n const mergedOptions = {\n ...this.options,\n ...options,\n ...{\n isClone: true\n }\n };\n const clone = new I18n(mergedOptions);\n if (options.debug !== undefined || options.prefix !== undefined) {\n clone.logger = clone.logger.clone(options);\n }\n const membersToCopy = ['store', 'services', 'language'];\n membersToCopy.forEach(m => {\n clone[m] = this[m];\n });\n clone.services = {\n ...this.services\n };\n clone.services.utils = {\n hasLoadedNamespace: clone.hasLoadedNamespace.bind(clone)\n };\n if (forkResourceStore) {\n const clonedData = Object.keys(this.store.data).reduce((prev, l) => {\n prev[l] = {\n ...this.store.data[l]\n };\n prev[l] = Object.keys(prev[l]).reduce((acc, n) => {\n acc[n] = {\n ...prev[l][n]\n };\n return acc;\n }, prev[l]);\n return prev;\n }, {});\n clone.store = new ResourceStore(clonedData, mergedOptions);\n clone.services.resourceStore = clone.store;\n }\n if (options.interpolation) {\n const defOpts = get();\n const mergedInterpolation = {\n ...defOpts.interpolation,\n ...this.options.interpolation,\n ...options.interpolation\n };\n const mergedForInterpolator = {\n ...mergedOptions,\n interpolation: mergedInterpolation\n };\n clone.services.interpolator = new Interpolator(mergedForInterpolator);\n }\n clone.translator = new Translator(clone.services, mergedOptions);\n clone.translator.on('*', (event, ...args) => {\n clone.emit(event, ...args);\n });\n clone.init(mergedOptions, callback);\n clone.translator.options = mergedOptions;\n clone.translator.backendConnector.services.utils = {\n hasLoadedNamespace: clone.hasLoadedNamespace.bind(clone)\n };\n return clone;\n }\n toJSON() {\n return {\n options: this.options,\n store: this.store,\n language: this.language,\n languages: this.languages,\n resolvedLanguage: this.resolvedLanguage\n };\n }\n}\nconst instance = I18n.createInstance();\n\nconst createInstance = instance.createInstance;\nconst dir = instance.dir;\nconst init = instance.init;\nconst loadResources = instance.loadResources;\nconst reloadResources = instance.reloadResources;\nconst use = instance.use;\nconst changeLanguage = instance.changeLanguage;\nconst getFixedT = instance.getFixedT;\nconst t = instance.t;\nconst exists = instance.exists;\nconst setDefaultNamespace = instance.setDefaultNamespace;\nconst hasLoadedNamespace = instance.hasLoadedNamespace;\nconst loadNamespaces = instance.loadNamespaces;\nconst loadLanguages = instance.loadLanguages;\n\nexport { changeLanguage, createInstance, instance as default, dir, exists, getFixedT, hasLoadedNamespace, init, keysFromSelector as keyFromSelector, loadLanguages, loadNamespaces, loadResources, reloadResources, setDefaultNamespace, t, use };\n","import e from \"./en.js\";\nimport t from \"./es.js\";\nimport n from \"i18next\";\n//#region src/index.ts\nn.init({\n\tfallbackLng: \"en\",\n\tlng: \"en\",\n\tshowSupportNotice: !1,\n\tresources: {\n\t\ten: e,\n\t\tes: t\n\t}\n});\nvar r = {\n\ttranslator: {\n\t\t...n,\n\t\tt: (e, t) => {\n\t\t\tlet { lng: r } = t;\n\t\t\tswitch (r) {\n\t\t\t\tcase \"en_US\":\n\t\t\t\tcase \"en-US\":\n\t\t\t\t\tt.lng = \"en\";\n\t\t\t\t\tbreak;\n\t\t\t\tcase \"es_ES\":\n\t\t\t\tcase \"es-ES\":\n\t\t\t\tcase \"es_MX\":\n\t\t\t\tcase \"es-MX\":\n\t\t\t\t\tt.lng = \"es\";\n\t\t\t\t\tbreak;\n\t\t\t\tdefault: break;\n\t\t\t}\n\t\t\treturn n.t(e, {\n\t\t\t\tlng: r,\n\t\t\t\t...t\n\t\t\t});\n\t\t}\n\t},\n\tlanguageOptions: [{\n\t\tvalue: \"en_US\",\n\t\tlabel: \"English (US)\"\n\t}, {\n\t\tvalue: \"es_ES\",\n\t\tlabel: \"Spanish\"\n\t}]\n};\n//#endregion\nexport { r as default };\n","import Translator from '@pie-lib/translator';\n\nconst { translator } = Translator;\n\n/**\n * A learner-facing string in `language`, the model's `language` as the\n * controller emits it. i18next falls back to English for a language or key it\n * does not hold. Values are not HTML-escaped: Svelte escapes what it renders.\n */\nexport function t(key: string, language?: string, values: Record<string, unknown> = {}): string {\n return translator.t(`translation:mcPopulatedBlank:${key}`, {\n lng: language,\n ...values,\n interpolation: { escapeValue: false },\n });\n}\n\n/** A string shared across elements, such as the correct-answer toggle's labels. */\nexport function tCommon(key: string, language?: string): string {\n return translator.t(`common:${key}`, { lng: language });\n}\n","<script lang=\"ts\">\nimport { computeAudioMode } from './computeAudioMode';\nimport { t } from './i18n';\n\ninterface AudioButtonSkin {\n silentUrl: string;\n playingUrl: string;\n}\n\nconst AUDIO_PLAYBACK = {\n IDLE: 'idle',\n PLAYING: 'playing',\n BLOCKED: 'blocked',\n PAUSED: 'paused',\n} as const;\ntype AudioPlaybackState = (typeof AUDIO_PLAYBACK)[keyof typeof AUDIO_PLAYBACK];\n\nlet {\n hasAudio = false,\n audioUrl,\n useFeatureButtonAudio = false,\n autoplayEnabled = false,\n featureAudioSkin,\n language,\n onaudiostarted,\n onaudioended,\n}: {\n hasAudio?: boolean;\n audioUrl?: string;\n useFeatureButtonAudio?: boolean;\n autoplayEnabled?: boolean;\n featureAudioSkin: AudioButtonSkin;\n language?: string;\n onaudiostarted?: () => void;\n onaudioended?: () => void;\n} = $props();\n\nlet audioEl = $state<HTMLAudioElement | null>(null);\nlet featureAudioButtonEl = $state<HTMLButtonElement | null>(null);\nlet autoplayEnableButtonEl = $state<HTMLButtonElement | null>(null);\nlet audioPlaybackState = $state<AudioPlaybackState>(AUDIO_PLAYBACK.IDLE);\n\nconst audioMode = $derived(computeAudioMode({ hasAudio, audioUrl, useFeatureButtonAudio }));\nconst isMediaPlaying = $derived(audioPlaybackState === AUDIO_PLAYBACK.PLAYING);\nconst autoPlayPromptOpen = $derived(audioPlaybackState === AUDIO_PLAYBACK.BLOCKED);\nconst audioErrorMessage = $derived(\n audioMode === 'error' ? t('audioResourceUnavailable', language) : ''\n);\n\n// Reset playback state when audioUrl changes so autoplay re-fires for a new question.\n$effect(() => {\n audioUrl;\n audioPlaybackState = AUDIO_PLAYBACK.IDLE;\n});\n\nfunction playFeatureAudio() {\n if (audioMode !== 'none' && audioMode !== 'error' && audioEl) {\n audioEl.play().catch(() => {});\n }\n}\n\nfunction handleEnableAutoplayClick() {\n if (audioMode !== 'none' && audioMode !== 'error' && audioEl) {\n audioEl.play().finally(() => {\n if (audioPlaybackState === AUDIO_PLAYBACK.BLOCKED) audioPlaybackState = AUDIO_PLAYBACK.PAUSED;\n });\n }\n}\n\nfunction useListener<K extends keyof HTMLElementEventMap>(\n getEl: () => EventTarget | null | undefined,\n event: K,\n handler: (e: HTMLElementEventMap[K]) => void\n) {\n $effect(() => {\n const el = getEl();\n if (!el) return;\n el.addEventListener(event, handler as EventListener);\n return () => el.removeEventListener(event, handler as EventListener);\n });\n}\n\nuseListener(\n () => audioEl,\n 'playing',\n () => {\n audioPlaybackState = AUDIO_PLAYBACK.PLAYING;\n onaudiostarted?.();\n }\n);\n\nuseListener(\n () => audioEl,\n 'ended',\n () => {\n audioPlaybackState = AUDIO_PLAYBACK.PAUSED;\n onaudioended?.();\n }\n);\n\nuseListener(\n () => featureAudioButtonEl,\n 'click',\n () => playFeatureAudio()\n);\nuseListener(\n () => autoplayEnableButtonEl,\n 'click',\n () => handleEnableAutoplayClick()\n);\n\n$effect(() => {\n if (!autoplayEnabled || audioMode === 'none' || audioMode === 'error') return;\n if (audioPlaybackState !== AUDIO_PLAYBACK.IDLE) return;\n if (audioEl && audioUrl) {\n audioPlaybackState = AUDIO_PLAYBACK.PAUSED;\n audioEl.play().catch(() => {\n audioPlaybackState = AUDIO_PLAYBACK.BLOCKED;\n });\n }\n});\n</script>\n\n{#if audioMode !== 'none'}\n <div class=\"audio-container pie-audio-container\">\n {#if audioMode === 'feature-button'}\n <audio\n bind:this={audioEl}\n class=\"sr-only pie-audio-player\"\n preload=\"metadata\"\n src={audioUrl}\n aria-hidden=\"true\"\n tabindex=\"-1\"\n ></audio>\n <button\n bind:this={featureAudioButtonEl}\n class=\"listen-button pie-listen-button rli-feature-audio\"\n type=\"button\"\n aria-label={t('listen', language)}\n >\n <img\n class={`listen-feature-icon pie-listen-icon rli-feature-listen ${isMediaPlaying ? '' : 'listen-active'}`}\n src={featureAudioSkin.silentUrl}\n alt={t('listenSilentAlt', language)}\n />\n <img\n class={`listen-feature-icon pie-listen-icon rli-feature-listen ${isMediaPlaying ? 'listen-active' : ''}`}\n src={featureAudioSkin.playingUrl}\n alt={t('listenPlayingAlt', language)}\n />\n </button>\n {:else if audioMode === 'controls'}\n <audio\n bind:this={audioEl}\n controls\n class=\"audio-controls pie-audio-player\"\n preload=\"metadata\"\n src={audioUrl}\n >\n <track kind=\"captions\" />\n </audio>\n {#if autoPlayPromptOpen}\n <button\n bind:this={autoplayEnableButtonEl}\n class=\"autoplay-enable pie-audio-autoplay-enable\"\n type=\"button\"\n >\n {t('clickToEnableAutoplay', language)}\n </button>\n {/if}\n {:else if audioMode === 'error'}\n <p class=\"audio-error pie-audio-error\" role=\"alert\">{audioErrorMessage}</p>\n {/if}\n </div>\n{/if}\n\n<style>\n .audio-container {\n margin-bottom: 1rem;\n }\n\n .audio-controls {\n display: block;\n width: 100%;\n max-width: 28rem;\n }\n\n .autoplay-enable {\n margin-top: 0.5rem;\n padding: 0;\n border: 0;\n background: transparent;\n font: inherit;\n font-size: 0.875rem;\n line-height: calc(1.25 / 0.875);\n color: inherit;\n text-decoration-line: underline;\n }\n\n .audio-error {\n margin: 0;\n font-size: 0.875rem;\n line-height: calc(1.25 / 0.875);\n color: var(--pie-incorrect-icon, #c10007);\n }\n\n .listen-button {\n width: var(--mpb-listen-button-size, 128px);\n height: var(--mpb-listen-button-size, 128px);\n border: 0;\n padding: 0;\n /*\n * Fixed light plates, at rest and on hover: the artwork's outlines and baked \"Listen\" label are\n * dark literals an <img> cannot theme, down to 1.2:1 on a dark scheme's page.\n */\n background-color: #ffffff;\n cursor: pointer;\n z-index: 1;\n }\n\n .listen-button:hover {\n background-color: #e2f1fe;\n }\n\n .listen-feature-icon {\n width: var(--mpb-listen-button-size, 128px);\n height: var(--mpb-listen-button-size, 128px);\n object-fit: contain;\n display: none;\n }\n\n .listen-feature-icon.listen-active {\n display: block;\n }\n\n .sr-only {\n position: absolute;\n width: 1px;\n height: 1px;\n padding: 0;\n margin: -1px;\n overflow: hidden;\n clip: rect(0, 0, 0, 0);\n white-space: nowrap;\n border: 0;\n }\n</style>\n","<script lang=\"ts\">\nimport { sanitizeModelHtml } from '@pie-element/shared-utils';\nimport { t } from './i18n';\n\ninterface DisplayChoice {\n imageUrl?: string;\n imageAlt?: string;\n labelHtml?: string;\n}\n\nlet {\n choiceMode = 'text',\n displayChoice = undefined,\n displayChoiceLabelHtml = '',\n isStandalone = false,\n blankWidth,\n blankBorderWidth,\n ariaLabel,\n language,\n}: {\n choiceMode?: 'text' | 'image';\n displayChoice?: DisplayChoice;\n displayChoiceLabelHtml?: string;\n isStandalone?: boolean;\n blankWidth: string;\n blankBorderWidth: string;\n ariaLabel: string;\n language?: string;\n} = $props();\n</script>\n\n<span\n class={`cloze-marker pie-blank-slot ${isStandalone ? 'cloze-marker-standalone pie-blank-slot-standalone' : ''}`}\n style={`width:${blankWidth};border-bottom-width:${blankBorderWidth};`}\n role=\"status\"\n aria-live=\"polite\"\n aria-atomic=\"true\"\n aria-label={ariaLabel}\n>\n {#if choiceMode === 'image' && displayChoice?.imageUrl}\n <img\n src={displayChoice.imageUrl}\n alt={displayChoice.imageAlt || t('selectedAnswerImage', language)}\n class=\"cloze-marker-image pie-blank-image\"\n style=\"max-width:var(--mpb-choice-image-max-width, 9.375rem);max-height:var(--mpb-choice-image-max-height, 9.375rem);\"\n />\n {:else if displayChoiceLabelHtml}\n <span class=\"cloze-marker-value pie-blank-value\">{@html sanitizeModelHtml(displayChoiceLabelHtml)}</span>\n {:else}\n <span class=\"cloze-marker-empty\">\n <span aria-hidden=\"true\">&nbsp;</span>\n <span class=\"sr-only\">{t('emptyBlank', language)}</span>\n </span>\n {/if}\n</span>\n\n<style>\n /* The underline width comes from the inline style (layoutLimits); the colour\n follows the text. */\n .cloze-marker {\n display: inline-flex;\n align-items: center;\n justify-content: center;\n text-align: center;\n vertical-align: baseline;\n padding-inline: 0.5rem;\n border-bottom: 2px solid currentColor;\n }\n\n .cloze-marker:focus-within {\n outline: 2px solid var(--mpb-focus-ring, #1565c0);\n outline-offset: 2px;\n }\n\n .cloze-marker-standalone {\n width: var(--mpb-blank-standalone-width, 7rem);\n }\n\n .cloze-marker-image {\n object-fit: contain;\n }\n\n .cloze-marker-empty {\n display: inline-block;\n min-width: 4ch;\n }\n\n .cloze-marker-value {\n width: 100%;\n display: inline-flex;\n align-items: center;\n justify-content: center;\n text-align: center;\n }\n\n .cloze-marker-value :global(p) {\n margin: 0;\n }\n\n /* Same 150x150 content-element constraint as ChoiceRow.svelte's .choice-html\n img — the selected choice's raw labelHtml can carry an embedded <img> here\n too, regardless of customType. See CONTOOL-3159. */\n .cloze-marker-value :global(img) {\n width: 150px;\n height: 150px;\n }\n\n .sr-only {\n position: absolute;\n width: 1px;\n height: 1px;\n padding: 0;\n margin: -1px;\n overflow: hidden;\n clip: rect(0, 0, 0, 0);\n white-space: nowrap;\n border: 0;\n }\n</style>\n","<script lang=\"ts\">\nimport { sanitizeModelHtml } from '@pie-element/shared-utils';\nimport { t } from './i18n';\n\ninterface Choice {\n id: string;\n labelHtml?: string;\n imageUrl?: string;\n imageAlt?: string;\n}\n\nlet {\n choice,\n choiceMode = 'text',\n isHorizontal = false,\n isSelected = false,\n isDisabled = false,\n correctness = undefined,\n isEvaluateMode = false,\n instanceId,\n radioGroupName,\n language,\n}: {\n choice: Choice;\n choiceMode?: 'text' | 'image';\n isHorizontal?: boolean;\n isSelected?: boolean;\n isDisabled?: boolean;\n correctness?: 'correct' | 'incorrect' | undefined;\n isEvaluateMode?: boolean;\n instanceId: string;\n radioGroupName: string;\n language?: string;\n} = $props();\n</script>\n\n<div\n class={`choice-row pie-choice ${isHorizontal ? 'choice-row-horizontal pie-choice-horizontal' : ''} ${isSelected ? 'is-selected pie-choice-selected' : ''} ${correctness ? `choice-${correctness} pie-choice-${correctness}` : ''}`}\n style=\"gap:var(--mpb-choice-row-gap, 0.5rem);\"\n>\n {#if isHorizontal}\n <label\n for={`${instanceId}-opt-${choice.id}`}\n class=\"choice-tile pie-choice-tile\"\n >\n <span class=\"choice-tile-content pie-choice-tile-content\">\n {#if choiceMode === 'image' && choice.imageUrl}\n <img\n src={choice.imageUrl}\n alt={choice.imageAlt || t('choiceImage', language, { id: choice.id })}\n class=\"choice-image pie-choice-image\"\n style=\"max-width:var(--mpb-choice-image-max-width, 9.375rem);max-height:var(--mpb-choice-image-max-height, 9.375rem);\"\n />\n {:else}\n <span class=\"choice-html pie-choice-label\">{@html sanitizeModelHtml(choice.labelHtml)}</span>\n {/if}\n </span>\n <input\n type=\"radio\"\n name={radioGroupName}\n id={`${instanceId}-opt-${choice.id}`}\n value={choice.id}\n checked={isSelected}\n disabled={isDisabled}\n class=\"choice-radio-bottom pie-choice-radio pie-choice-radio-bottom\"\n />\n </label>\n {:else}\n <input\n type=\"radio\"\n name={radioGroupName}\n id={`${instanceId}-opt-${choice.id}`}\n value={choice.id}\n checked={isSelected}\n disabled={isDisabled}\n class=\"choice-radio-inline pie-choice-radio pie-choice-radio-inline\"\n />\n <label for={`${instanceId}-opt-${choice.id}`} class=\"choice-label-wrap pie-choice-label-wrap\">\n {#if choiceMode === 'image' && choice.imageUrl}\n <img\n src={choice.imageUrl}\n alt={choice.imageAlt || t('choiceImage', language, { id: choice.id })}\n class=\"choice-image pie-choice-image\"\n style=\"max-height:var(--mpb-choice-image-max-height, 5rem);\"\n />\n {:else}\n <span class=\"choice-html pie-choice-label\">{@html sanitizeModelHtml(choice.labelHtml)}</span>\n {/if}\n </label>\n {/if}\n {#if isEvaluateMode && correctness}\n <span\n class={`pie-choice-feedback-badge ${correctness === 'correct' ? 'pie-choice-feedback-correct' : 'pie-choice-feedback-incorrect'}`}\n aria-hidden=\"true\"\n >\n {correctness === 'correct' ? '✓' : '✕'}\n </span>\n {/if}\n</div>\n\n<style>\n .choice-row {\n display: flex;\n align-items: flex-start;\n }\n\n .choice-row-horizontal {\n flex-direction: column;\n align-items: center;\n width: min(var(--mpb-choice-width-px, 170px), var(--mpb-choice-width-vw, 30vw));\n min-height: var(--mpb-choice-tile-min-height, 11rem);\n gap: 0;\n }\n\n .choice-tile {\n display: flex;\n flex-direction: column;\n justify-content: space-between;\n align-items: center;\n width: 100%;\n min-height: var(--mpb-choice-tile-min-height, 11rem);\n padding: 0.8rem 0.65rem 0.5rem;\n border-radius: 8px;\n background: transparent;\n transition: background-color 120ms ease-in-out;\n cursor: pointer;\n text-align: center;\n }\n\n .choice-tile-content {\n width: 100%;\n display: flex;\n align-items: center;\n justify-content: center;\n min-height: var(--mpb-choice-content-min-height, 7.5rem);\n }\n\n .choice-image {\n display: block;\n object-fit: contain;\n }\n\n .choice-label-wrap {\n flex: 1 1 0%;\n cursor: pointer;\n }\n\n /* Every background painted here carries its own text colour: a variant that\n pins a light surface (the CQT sheets' #fcfcd3) would otherwise sit under\n the scheme's text colour, which is near-white in a dark scheme. With neither\n the hook nor --pie-text defined the declaration is invalid at computed-value\n time and the colour inherits. */\n .choice-row-horizontal:hover .choice-tile {\n background: var(--mpb-choice-hover-bg, var(--pie-background-dark, #ecedf1));\n color: var(--mpb-choice-hover-color, var(--pie-text));\n }\n\n .pie-choice-horizontal:not(.is-selected):not(:hover) .pie-choice-tile {\n background: transparent;\n }\n\n .choice-row-horizontal.is-selected .choice-tile {\n background: var(--mpb-choice-selected-bg, var(--pie-secondary-background, rgba(241, 241, 241, 1)));\n color: var(--mpb-choice-selected-color, var(--pie-text));\n }\n\n .choice-row-horizontal.is-selected:hover .choice-tile {\n background: var(--mpb-choice-selected-bg, var(--pie-secondary-background, rgba(241, 241, 241, 1)));\n color: var(--mpb-choice-selected-color, var(--pie-text));\n }\n\n .pie-choice:not(.pie-choice-horizontal):hover .pie-choice-label-wrap {\n background: var(--pie-background-dark, #ecedf1);\n color: var(--pie-text);\n }\n\n .pie-choice:not(.pie-choice-horizontal):not(.is-selected):not(:hover) .pie-choice-label-wrap {\n background: transparent;\n }\n\n .pie-choice:not(.pie-choice-horizontal).is-selected .pie-choice-label-wrap {\n background: var(--pie-secondary-background, rgba(241, 241, 241, 1));\n color: var(--pie-text);\n border-radius: 6px;\n }\n\n .pie-choice:not(.pie-choice-horizontal).is-selected:hover .pie-choice-label-wrap {\n background: var(--pie-secondary-background, rgba(241, 241, 241, 1));\n color: var(--pie-text);\n }\n\n .pie-choice.choice-correct {\n border-left: 3px solid var(--pie-correct-tertiary, #0ea449);\n }\n\n .pie-choice.choice-incorrect {\n border-left: 3px solid var(--pie-incorrect-icon, #bf0d00);\n }\n\n .pie-choice-horizontal.choice-correct .choice-tile {\n background: var(--pie-correct-secondary, #e8f5e9);\n color: var(--pie-text);\n }\n\n .pie-choice-horizontal.choice-incorrect .choice-tile {\n background: var(--pie-incorrect-secondary, #ffebee);\n color: var(--pie-text);\n }\n\n .pie-choice-feedback-badge {\n margin-left: auto;\n display: inline-flex;\n align-items: center;\n justify-content: center;\n width: 1.1rem;\n height: 1.1rem;\n border-radius: 9999px;\n font-size: 0.72rem;\n line-height: 1;\n font-weight: 700;\n color: var(--pie-background, #ffffff);\n }\n\n .pie-choice-feedback-correct {\n background: var(--pie-correct-icon, #087d38);\n }\n\n .pie-choice-feedback-incorrect {\n background: var(--pie-incorrect-icon, #bf0d00);\n }\n\n .choice-row-horizontal :global(p) {\n margin: 0;\n text-align: center;\n }\n\n .choice-html :global(p) {\n margin: 0;\n }\n\n .choice-html {\n width: 100%;\n display: inline-flex;\n align-items: center;\n justify-content: center;\n text-align: center;\n }\n\n /* Choices carrying raw <img> markup in labelHtml (rather than the dedicated\n imageUrl/imageAlt fields) render unconstrained at their authored size\n otherwise — 3rd-party/CQT-sourced content is typically authored well above\n the platform's 150x150 content-element spec. Applies regardless of\n customType, unlike the r1-CQT-specific cqt-css overlays. See CONTOOL-3159. */\n .choice-html :global(img) {\n width: 150px;\n height: 150px;\n }\n\n /* Only the top margin is spaced; the browser's own radio side margins would\n otherwise offset the control from its label (the demo app's preflight zeroed them).\n 24px is the WCAG 2.5.8 minimum target size; the native radio scales its circle to the box. */\n .choice-radio-bottom {\n margin: var(--mpb-horizontal-choice-radio-top-margin, 0.5rem) 0 0;\n padding: var(--mpb-choice-radio-padding, 0px);\n width: 24px;\n height: 24px;\n }\n\n .choice-radio-inline {\n margin: var(--mpb-horizontal-choice-radio-top-margin, 0.5rem) 0 0;\n width: 24px;\n height: 24px;\n flex-shrink: 0;\n }\n</style>\n","<script lang=\"ts\">\nimport { sanitizeModelHtml } from '@pie-element/shared-utils';\nimport { tCommon } from './i18n';\n\nlet { html, language }: { html: string; language?: string } = $props();\n\nlet expanded = $state(false);\nconst panelId = `mpb-teacher-instructions-${Math.random().toString(36).slice(2, 10)}`;\n</script>\n\n<!-- Collapsed by default, as multiple-choice shows them; the controller sends them to instructors only. -->\n<div class=\"teacher-instructions pie-teacher-instructions\">\n <button\n type=\"button\"\n class=\"teacher-instructions-toggle pie-teacher-instructions-toggle\"\n aria-expanded={expanded}\n aria-controls={panelId}\n onclick={() => (expanded = !expanded)}\n >\n {tCommon(expanded ? 'hideTeacherInstructions' : 'showTeacherInstructions', language)}\n </button>\n <div id={panelId} class=\"teacher-instructions-content pie-teacher-instructions-content\" hidden={!expanded}>\n {@html sanitizeModelHtml(html)}\n </div>\n</div>\n\n<style>\n .teacher-instructions {\n margin-bottom: 1rem;\n }\n\n .teacher-instructions-toggle {\n padding: 0;\n border: 0;\n border-bottom: 1px dotted currentColor;\n background: transparent;\n font: inherit;\n color: var(--pie-primary, #3f51b5);\n cursor: pointer;\n }\n\n .teacher-instructions-toggle:focus-visible {\n outline: 2px solid var(--mpb-focus-ring, var(--pie-focus-outline, #1565c0));\n outline-offset: 2px;\n }\n\n .teacher-instructions-content {\n padding-top: 1rem;\n }\n</style>\n","export interface ChoiceCorrectnessParams {\n isEvaluateMode: boolean;\n correctChoiceId: string;\n selectedId: string;\n showCorrectAnswer: boolean;\n}\n\n/**\n * Computes which choice ids should display a correctness badge and what kind.\n *\n * Reveal mode (showCorrectAnswer=true) shows only the canonical correct answer —\n * the student's wrong selection is deliberately suppressed so the UI only\n * highlights what to remember, not what to regret.\n *\n * Unanswered-in-evaluate (selectedId='') treats the correct choice as missed\n * (incorrect badge) rather than triggering the two-badge wrong-answer path.\n */\nexport function computeChoiceCorrectness(\n params: ChoiceCorrectnessParams\n): Map<string, 'correct' | 'incorrect'> {\n const map = new Map<string, 'correct' | 'incorrect'>();\n const { isEvaluateMode, correctChoiceId, selectedId, showCorrectAnswer } = params;\n\n if (!isEvaluateMode || !correctChoiceId) {\n return map;\n }\n if (showCorrectAnswer) {\n map.set(correctChoiceId, 'correct');\n return map;\n }\n if (!selectedId) {\n map.set(correctChoiceId, 'incorrect');\n return map;\n }\n if (selectedId === correctChoiceId) {\n map.set(correctChoiceId, 'correct');\n return map;\n }\n map.set(selectedId, 'incorrect');\n map.set(correctChoiceId, 'incorrect');\n return map;\n}\n","const BLANK_TOKEN = '{{blank}}';\n\nexport interface LayoutProfileParams {\n interactionMode?: string;\n template?: string;\n choiceLayout?: string;\n layoutProfile?: string;\n hasAudio?: boolean;\n useFeatureButtonAudio?: boolean | null;\n prompt?: string;\n}\n\nexport interface LayoutProfileResult {\n isAudioOnlyMode: boolean;\n isBlankOnlyTemplate: boolean;\n choiceLayout: 'horizontal' | 'vertical';\n isHorizontalChoices: boolean;\n hasInlineSentenceAudioLayout: boolean;\n useFeatureButtonAudio: boolean;\n hasVisiblePrompt: boolean;\n}\n\n// Media that shows without any text beside it, such as a picture-only passage.\nconst VISIBLE_MEDIA = /<(img|svg|video|audio|iframe|object|embed|canvas|picture|math)\\b/i;\n\n/**\n * Whether authored HTML shows anything. Imported items carry empty prompt\n * wrappers (`<div class=\"iat-html-container\"></div>`), which render nothing but\n * would still take a grid row and label the choices with an empty name.\n */\nexport function hasVisibleHtmlContent(html: string | undefined): boolean {\n if (!html) return false;\n if (VISIBLE_MEDIA.test(html)) return true;\n return (\n html\n .replace(/<[^>]*>/g, '')\n .replace(/&nbsp;|&#160;|&#xa0;/gi, ' ')\n .trim() !== ''\n );\n}\n\nconst FEATURE_BUTTON_PROFILES = new Set([\n 'audio_blank_only',\n 'stimulus_image_blank',\n 'token_sequence',\n]);\n\nexport function computeLayoutProfile(params: LayoutProfileParams): LayoutProfileResult {\n const {\n interactionMode = '',\n template = '',\n choiceLayout: configuredChoiceLayout,\n layoutProfile = '',\n hasAudio = false,\n useFeatureButtonAudio: configuredFeatureButton,\n prompt,\n } = params;\n\n const isAudioOnlyMode = interactionMode === 'audio_mc_only';\n\n const isBlankOnlyTemplate = (() => {\n if (!template) return false;\n const plain = template\n .replace(/<[^>]+>/g, '')\n .replace(/&nbsp;/g, ' ')\n .trim();\n return plain === BLANK_TOKEN;\n })();\n\n const choiceLayout: 'horizontal' | 'vertical' =\n configuredChoiceLayout === 'horizontal' || configuredChoiceLayout === 'vertical'\n ? (configuredChoiceLayout as 'horizontal' | 'vertical')\n : isAudioOnlyMode || isBlankOnlyTemplate\n ? 'horizontal'\n : 'vertical';\n\n const isHorizontalChoices = choiceLayout === 'horizontal';\n\n const hasInlineSentenceAudioLayout = layoutProfile === 'inline_sentence' && hasAudio;\n\n const useFeatureButtonAudio =\n typeof configuredFeatureButton === 'boolean'\n ? configuredFeatureButton\n : hasAudio && FEATURE_BUTTON_PROFILES.has(layoutProfile);\n\n return {\n isAudioOnlyMode,\n isBlankOnlyTemplate,\n choiceLayout,\n isHorizontalChoices,\n hasInlineSentenceAudioLayout,\n useFeatureButtonAudio,\n hasVisiblePrompt: hasVisibleHtmlContent(prompt),\n };\n}\n","import { type LayoutLimits, DEFAULT_LAYOUT_LIMITS } from '../shared/layoutLimits.js';\nexport type { LayoutLimits };\nexport { DEFAULT_LAYOUT_LIMITS };\n\n/**\n * Maps every LayoutLimits key (except legendMaxChars, which is a return value not a CSS var)\n * to its --mpb-* CSS variable name and CSS unit.\n * Add a single entry here when adding a new layout limit.\n */\nexport const CSS_VAR_SPEC: Record<\n Exclude<keyof LayoutLimits, 'legendMaxChars'>,\n { varName: string; unit: string }\n> = {\n blankStandaloneWidthRem: { varName: '--mpb-blank-standalone-width', unit: 'rem' },\n blankWideWidthRem: { varName: '--mpb-blank-wide-width', unit: 'rem' },\n blankUnderlineWidthPx: { varName: '--mpb-blank-underline-width', unit: 'px' },\n blankUnderlineWideWidthPx: { varName: '--mpb-blank-underline-wide-width', unit: 'px' },\n horizontalChoiceWidthPx: { varName: '--mpb-choice-width-px', unit: 'px' },\n horizontalChoiceWidthVw: { varName: '--mpb-choice-width-vw', unit: 'vw' },\n horizontalChoiceTileMinHeightRem: { varName: '--mpb-choice-tile-min-height', unit: 'rem' },\n horizontalChoiceContentMinHeightRem: { varName: '--mpb-choice-content-min-height', unit: 'rem' },\n choiceImageMaxHeightRem: { varName: '--mpb-choice-image-max-height', unit: 'rem' },\n choiceImageMaxWidthRem: { varName: '--mpb-choice-image-max-width', unit: 'rem' },\n choiceGroupGapRem: { varName: '--mpb-choice-group-gap', unit: 'rem' },\n choiceRowGapRem: { varName: '--mpb-choice-row-gap', unit: 'rem' },\n horizontalChoiceRadioTopMarginRem: {\n varName: '--mpb-horizontal-choice-radio-top-margin',\n unit: 'rem',\n },\n toggleButtonGapRem: { varName: '--mpb-toggle-button-gap', unit: 'rem' },\n listenButtonSizePx: { varName: '--mpb-listen-button-size', unit: 'px' },\n audioBlankTemplateMarginTopRem: { varName: '--mpb-audio-blank-template-margin-top', unit: 'rem' },\n audioBlankTemplateMarginBottomRem: {\n varName: '--mpb-audio-blank-template-margin-bottom',\n unit: 'rem',\n },\n audioInstructionsMaxWidthPx: { varName: '--mpb-audio-instructions-max-width', unit: 'px' },\n stimulusMinColumnPx: { varName: '--mpb-stimulus-min-column', unit: 'px' },\n textMinColumnPx: { varName: '--mpb-text-min-column', unit: 'px' },\n stimulusGridColumnGapRem: { varName: '--mpb-stimulus-grid-column-gap', unit: 'rem' },\n stimulusGridRowGapRem: { varName: '--mpb-stimulus-grid-row-gap', unit: 'rem' },\n stimulusSentenceMarginTopRem: { varName: '--mpb-stimulus-sentence-margin-top', unit: 'rem' },\n stimulusChoicesMarginTopRem: { varName: '--mpb-stimulus-choices-margin-top', unit: 'rem' },\n tokenGridColumnGapRem: { varName: '--mpb-token-grid-column-gap', unit: 'rem' },\n tokenGridRowGapRem: { varName: '--mpb-token-grid-row-gap', unit: 'rem' },\n tokenTemplateMarginTopRem: { varName: '--mpb-token-template-margin-top', unit: 'rem' },\n tokenInlineTokenGapRem: { varName: '--mpb-token-inline-token-gap', unit: 'rem' },\n tokenChoicesMarginTopRem: { varName: '--mpb-token-choices-margin-top', unit: 'rem' },\n inlineGridColumnGapRem: { varName: '--mpb-inline-grid-column-gap', unit: 'rem' },\n inlineGridRowGapRem: { varName: '--mpb-inline-grid-row-gap', unit: 'rem' },\n inlineTemplateMarginTopRem: { varName: '--mpb-inline-template-margin-top', unit: 'rem' },\n inlineChoicesMarginTopRem: { varName: '--mpb-inline-choices-margin-top', unit: 'rem' },\n};\n\nexport const DEFAULT_LAYOUT_PROFILE_PRESETS: Record<string, Partial<LayoutLimits>> = {\n audio_blank_only: {\n blankWideWidthRem: 10,\n blankUnderlineWideWidthPx: 6,\n horizontalChoiceTileMinHeightRem: 11.25,\n horizontalChoiceContentMinHeightRem: 9.375,\n choiceGroupGapRem: 1,\n audioBlankTemplateMarginBottomRem: 1.875,\n },\n stimulus_image_blank: {\n blankWideWidthRem: 10,\n blankUnderlineWideWidthPx: 6,\n },\n token_sequence: {\n blankStandaloneWidthRem: 7,\n blankUnderlineWideWidthPx: 6,\n },\n};\n\nexport interface LayoutStyleResult {\n rootStyle: string;\n blankWidth: string;\n blankBorderWidth: string;\n legendMaxChars: number;\n}\n\nexport function computeLayoutStyle(params: {\n layoutProfile: string;\n isBlankOnlyTemplate: boolean;\n configuredLimits: unknown;\n customProfilePresets: unknown;\n}): LayoutStyleResult {\n const { layoutProfile, isBlankOnlyTemplate } = params;\n\n const configured =\n params.configuredLimits && typeof params.configuredLimits === 'object'\n ? (params.configuredLimits as Partial<LayoutLimits>)\n : {};\n const customPresets =\n params.customProfilePresets && typeof params.customProfilePresets === 'object'\n ? (params.customProfilePresets as Record<string, unknown>)\n : {};\n const customForProfile =\n customPresets[layoutProfile] && typeof customPresets[layoutProfile] === 'object'\n ? (customPresets[layoutProfile] as Partial<LayoutLimits>)\n : {};\n const profilePreset: Partial<LayoutLimits> = {\n ...(DEFAULT_LAYOUT_PROFILE_PRESETS[layoutProfile] ?? {}),\n ...customForProfile,\n };\n const l: LayoutLimits = { ...DEFAULT_LAYOUT_LIMITS, ...configured, ...profilePreset };\n\n const wideBlankProfiles = ['audio_blank_only', 'stimulus_image_blank'];\n const wideUnderlineProfiles = ['audio_blank_only', 'stimulus_image_blank', 'token_sequence'];\n\n const blankWidth = wideBlankProfiles.includes(layoutProfile)\n ? `${l.blankWideWidthRem}rem`\n : isBlankOnlyTemplate\n ? `${l.blankStandaloneWidthRem}rem`\n : 'auto';\n\n const blankBorderWidth = wideUnderlineProfiles.includes(layoutProfile)\n ? `${l.blankUnderlineWideWidthPx}px`\n : `${l.blankUnderlineWidthPx}px`;\n\n const cssVars = (Object.keys(CSS_VAR_SPEC) as (keyof typeof CSS_VAR_SPEC)[]).map(\n (key) => `${CSS_VAR_SPEC[key].varName}:${l[key]}${CSS_VAR_SPEC[key].unit}`\n );\n const rootStyle = cssVars.join(';');\n\n return { rootStyle, blankWidth, blankBorderWidth, legendMaxChars: l.legendMaxChars };\n}\n","// The SVGs are inlined into the delivery bundle, so they are kept optimized:\n// `svgo --multipass --precision 1` with `removeViewBox` disabled, since the\n// viewBox is what scales an icon to the button size. See CONTOOL-3253.\n\nimport listenSilentDefaultSvg from './listen-silent-default.svg?raw';\nimport listenPlayingDefaultSvg from './listen-playing-default.svg?raw';\nimport listenSilentEsSvg from './listen-silent-es.svg?raw';\nimport listenPlayingEsSvg from './listen-playing-es.svg?raw';\n\nconst toSvgDataUri = (svg: string): string =>\n `data:image/svg+xml;charset=utf-8,${encodeURIComponent(svg)}`;\n\nexport const LISTEN_SILENT_DEFAULT_URL = toSvgDataUri(listenSilentDefaultSvg);\nexport const LISTEN_PLAYING_DEFAULT_URL = toSvgDataUri(listenPlayingDefaultSvg);\nexport const LISTEN_SILENT_ES_URL = toSvgDataUri(listenSilentEsSvg);\nexport const LISTEN_PLAYING_ES_URL = toSvgDataUri(listenPlayingEsSvg);\n","import {\n LISTEN_PLAYING_DEFAULT_URL,\n LISTEN_PLAYING_ES_URL,\n LISTEN_SILENT_DEFAULT_URL,\n LISTEN_SILENT_ES_URL,\n} from './assets/audioButtonSkinAssets';\n\nexport type AudioButtonSkin = { silentUrl: string; playingUrl: string };\n\n/**\n * Built-in fallback skins, bundled with this package (no external CDN dependency).\n * Callers can override per-item via `audioButtonSkin` / `audioButtonSkinsByLocale`\n * on the model — see computeFeatureAudioSkin below.\n */\nexport const DEFAULT_AUDIO_BUTTON_SKINS: Record<string, AudioButtonSkin> = {\n default: {\n silentUrl: LISTEN_SILENT_DEFAULT_URL,\n playingUrl: LISTEN_PLAYING_DEFAULT_URL,\n },\n es: {\n silentUrl: LISTEN_SILENT_ES_URL,\n playingUrl: LISTEN_PLAYING_ES_URL,\n },\n};\n\n/**\n * Resolves the audio button skin to display.\n * Priority: byLocale[exact] > byLocale[lang] > byLocale.default > customSingle > built-in default\n */\nexport function computeFeatureAudioSkin(params: {\n locale: unknown;\n audioButtonSkin: unknown;\n audioButtonSkinsByLocale: unknown;\n}): AudioButtonSkin {\n const locale = String(params.locale || '').toLowerCase();\n const lang = locale.slice(0, 2);\n const byLocale =\n params.audioButtonSkinsByLocale && typeof params.audioButtonSkinsByLocale === 'object'\n ? (params.audioButtonSkinsByLocale as Record<string, unknown>)\n : {};\n const customSingle =\n params.audioButtonSkin && typeof params.audioButtonSkin === 'object'\n ? (params.audioButtonSkin as AudioButtonSkin)\n : null;\n const defaultSkin = locale.startsWith('es')\n ? DEFAULT_AUDIO_BUTTON_SKINS.es\n : DEFAULT_AUDIO_BUTTON_SKINS.default;\n return (byLocale[locale] ||\n byLocale[lang] ||\n byLocale.default ||\n customSingle ||\n defaultSkin) as AudioButtonSkin;\n}\n\n/**\n * Returns the choice id that the ClozeMarker and selected-state highlight should display.\n * While the correct answer is revealed in evaluate mode it is the correct choice.\n * A player that shows the key outside evaluate hands over the correct-response\n * session from `createCorrectResponseSession`, which is displayed as the selection.\n */\nexport function computeDisplayChoiceId(params: {\n selectedId: string;\n isEvaluateMode: boolean;\n showCorrectAnswer: boolean;\n correctChoiceId: string;\n}): string {\n const { selectedId, isEvaluateMode, showCorrectAnswer, correctChoiceId } = params;\n if (isEvaluateMode && showCorrectAnswer && correctChoiceId) return correctChoiceId;\n return selectedId;\n}\n\n/**\n * Returns the result the screen-reader-only announcement reports after evaluate\n * mode scoring. Empty string means nothing is announced.\n */\nexport function computeResultStatus(params: {\n isEvaluateMode: boolean;\n showCorrectAnswer: boolean;\n isCorrect: boolean;\n isIncorrect: boolean;\n selectedId: string;\n}): 'correct' | 'incorrect' | '' {\n const { isEvaluateMode, showCorrectAnswer, isCorrect, isIncorrect, selectedId } = params;\n if (!isEvaluateMode || showCorrectAnswer) return '';\n if (isCorrect) return 'correct';\n if (isIncorrect && selectedId) return 'incorrect';\n return '';\n}\n\n/**\n * Returns the visible legend text for the choices fieldset.\n * Strips HTML, truncates to legendMaxChars with an ellipsis, falls back to answerChoicesLabel.\n */\nexport function computeLegendText(params: {\n prompt: string;\n legendMaxChars: number;\n answerChoicesLabel: string;\n}): string {\n const { prompt, legendMaxChars, answerChoicesLabel } = params;\n const plain = prompt\n .replace(/<[^>]+>/g, ' ')\n .replace(/\\s+/g, ' ')\n .trim();\n const maxChars = Math.max(8, legendMaxChars);\n if (!plain) return answerChoicesLabel;\n return plain.length > maxChars ? `${plain.slice(0, Math.max(1, maxChars - 1))}…` : plain;\n}\n","import selR1BaseCss from './cqt-css/sel-r1-base.css?raw';\nimport selR1PlusgggCss from './cqt-css/sel-r1-plusggg.css?raw';\nimport srVicCss from './cqt-css/sr-vic.css?raw';\nimport selVicCss from './cqt-css/sel-vic.css?raw';\nimport selR1GplusgggCss from './cqt-css/sel-r1-gplusggg.css?raw';\nimport selR1GStemCss from './cqt-css/sel-r1-g-stem.css?raw';\nimport selR1GgPlusCss from './cqt-css/sel-r1-gg-plus.css?raw';\nimport selR1GgplusCss from './cqt-css/sel-r1-ggplus.css?raw';\nimport selR1S3Css from './cqt-css/sel-r1-s3.css?raw';\n\nexport type VariantCssConfig = {\n variantId: string;\n variantClass: string;\n cssText: string;\n};\n\nconst VARIANT_BY_CUSTOM_TYPE: Record<string, VariantCssConfig> = {\n 'sel_r1-_plusggg': {\n variantId: 'sel-r1-plusggg',\n variantClass: 'variant-sel-r1-plusggg',\n cssText: selR1PlusgggCss,\n },\n 'sr-vic': {\n variantId: 'sr-vic',\n variantClass: 'variant-sr-vic',\n cssText: srVicCss,\n },\n sel_vic: {\n variantId: 'sel-vic',\n variantClass: 'variant-sel-vic',\n cssText: selVicCss,\n },\n 'sel_r1-_gplusggg': {\n variantId: 'sel-r1-gplusggg',\n variantClass: 'variant-sel-r1-gplusggg',\n cssText: selR1GplusgggCss,\n },\n 'sel_r1-g_plusggg': {\n variantId: 'sel-r1-g-stem',\n variantClass: 'variant-sel-r1-g-stem',\n cssText: selR1GStemCss,\n },\n 'sel_r1-gg_plusggg': {\n variantId: 'sel-r1-gg-plus',\n variantClass: 'variant-sel-r1-gg-plus',\n cssText: selR1GgPlusCss,\n },\n 'sel_r1-_ggplusggg': {\n variantId: 'sel-r1-ggplus',\n variantClass: 'variant-sel-r1-ggplus',\n cssText: selR1GgplusCss,\n },\n 'sel_r1-s3_plusggg': {\n variantId: 'sel-r1-s3',\n variantClass: 'variant-sel-r1-s3',\n cssText: selR1S3Css,\n },\n};\n\nconst normalizeCustomType = (value: unknown): string => {\n const normalized = String(value || '')\n .trim()\n .toLowerCase();\n // Accept both base custom types and version-suffixed tags like \"...v0.0.1\".\n return normalized.replace(/v\\d+\\.\\d+\\.\\d+$/i, '');\n};\n\nexport const getVariantCssConfig = (customType: unknown): VariantCssConfig | undefined => {\n const normalized = normalizeCustomType(customType);\n return VARIANT_BY_CUSTOM_TYPE[normalized];\n};\n\nexport const getVariantRootClass = (customType: unknown): string => {\n return getVariantCssConfig(customType)?.variantClass || '';\n};\n\nconst SEL_R1_VARIANT_IDS = new Set([\n 'sel-r1-plusggg',\n 'sel-r1-gplusggg',\n 'sel-r1-g-stem',\n 'sel-r1-gg-plus',\n 'sel-r1-ggplus',\n 'sel-r1-s3',\n]);\n\nconst ROOT_SELECTOR = /\\.mc-populated-blank-root(?![\\w-])/g;\n\n/** FNV-1a over the text, in base 36. */\nconst hashText = (text: string): string => {\n let hash = 0x811c9dc5;\n for (let i = 0; i < text.length; i++) {\n hash ^= text.charCodeAt(i);\n hash = Math.imul(hash, 0x01000193);\n }\n return (hash >>> 0).toString(36);\n};\n\n/**\n * Names this build's variant sheets. The sheets are global, so each selector is\n * narrowed to roots carrying the same key: two versions of the element on one\n * page then style only their own roots, and share a sheet only when the CSS is\n * identical.\n */\nexport const VARIANT_CSS_KEY = hashText(\n [selR1BaseCss, ...Object.values(VARIANT_BY_CUSTOM_TYPE).map((c) => c.cssText)].join('\\n')\n);\n\n/** `:where()` adds no specificity, so the variant sheets cascade exactly as written. */\nexport const keyVariantCss = (cssText: string): string =>\n cssText.replace(\n ROOT_SELECTOR,\n `.mc-populated-blank-root:where([data-mpb-css=\"${VARIANT_CSS_KEY}\"])`\n );\n\nconst injectStyleOnce = (target: Document | ShadowRoot, variantName: string, cssText: string) => {\n const id = `mc-populated-blank-css-${variantName}-${VARIANT_CSS_KEY}`;\n if (target.getElementById(id)) return;\n const style = document.createElement('style');\n style.id = id;\n style.setAttribute('data-mpb-variant', variantName);\n style.textContent = keyVariantCss(cssText);\n (target instanceof ShadowRoot ? target : target.head).appendChild(style);\n};\n\n/**\n * Adds the item's variant sheet where `root` renders: the document head, or the\n * shadow root of a host that placed the element inside one, which document\n * styles do not reach.\n */\nexport const ensureVariantCssInjected = (config: VariantCssConfig | undefined, root: Element) => {\n if (!config?.cssText || typeof document === 'undefined') {\n return;\n }\n const rootNode = root.getRootNode();\n const target = rootNode instanceof ShadowRoot ? rootNode : document;\n if (SEL_R1_VARIANT_IDS.has(config.variantId)) {\n injectStyleOnce(target, 'sel-r1-base', selR1BaseCss);\n }\n injectStyleOnce(target, config.variantId, config.cssText);\n};\n","<svelte:options\n customElement={{\n shadow: 'none',\n props: {\n model: { type: 'Object' },\n session: { type: 'Object' },\n options: { type: 'Object' },\n onSessionChange: {},\n onAudioStarted: {},\n onAudioEnded: {},\n },\n }}\n/>\n\n<script lang=\"ts\">\nimport { sanitizeModelHtml } from '@pie-element/shared-utils';\nimport AudioPlayer from './AudioPlayer.svelte';\nimport ClozeMarker from './ClozeMarker.svelte';\nimport ChoiceRow from './ChoiceRow.svelte';\nimport TeacherInstructions from './TeacherInstructions.svelte';\nimport { computeChoiceCorrectness } from './computeChoiceCorrectness';\nimport { computeLayoutProfile } from './computeLayoutProfile';\nimport { computeLayoutStyle } from './computeLayoutStyle';\nimport {\n computeFeatureAudioSkin,\n computeDisplayChoiceId,\n computeResultStatus,\n computeLegendText,\n} from './computeDisplayState';\nimport {\n ensureVariantCssInjected,\n getVariantCssConfig,\n getVariantRootClass,\n VARIANT_CSS_KEY,\n} from './variant-css-map';\nimport { t as translate, tCommon } from './i18n';\nimport { selectedChoiceId } from '../shared/session';\n\nconst BLANK_TOKEN = '{{blank}}';\n\nlet { model, session, onSessionChange, onAudioStarted, onAudioEnded } = $props<{\n model?: any;\n session?: any;\n options?: any;\n onSessionChange?: (session: any) => void;\n onAudioStarted?: () => void;\n onAudioEnded?: () => void;\n}>();\nconst t = (key: string) => translate(key, model?.language);\nlet localChoiceId = $state('');\nlet toggleCorrectAnswerButtonEl = $state<HTMLButtonElement | null>(null);\nlet choicesGroupEl = $state<HTMLDivElement | null>(null);\nlet rootEl = $state<HTMLDivElement | null>(null);\nconst instanceId = `mc-populated-blank-${Math.random().toString(36).slice(2, 10)}`;\n\n// ---------------------------------------------------------------------------\n// Cluster: modeFlags — delivery mode, correctness, and answer-reveal state\n// Feeds: shouldShowCorrectAnswerToggle, choiceState, a11y\n// ---------------------------------------------------------------------------\nconst deliveryMode = $derived((model?.mode || model?.env?.mode || '').toString());\nconst isEvaluateMode = $derived(deliveryMode === 'evaluate');\nconst correctness = $derived(model?.correctness);\nconst isResponseCorrect = $derived(\n typeof model?.responseCorrect === 'boolean' ? model.responseCorrect : correctness === 'correct'\n);\nconst isCorrect = $derived(correctness === 'correct');\nconst isIncorrect = $derived(correctness === 'incorrect');\n\nlet showCorrectAnswer = $state(false);\nconst shouldShowCorrectAnswerToggle = $derived(\n isEvaluateMode && !isResponseCorrect && !!model?.correctChoiceId\n);\n\n// ---------------------------------------------------------------------------\n// Cluster: layoutConfig — profile limits, blank sizing, choice layout, audio mode\n// Feeds: layout (rootStyle, blankWidth, blankBorderWidth, legendMaxChars), audioMode, choiceState\n// ---------------------------------------------------------------------------\nconst layoutProfile = $derived(model?.layoutProfile || '');\nconst layoutProfileFlags = $derived(\n computeLayoutProfile({\n interactionMode: model?.interactionMode,\n template: model?.template,\n choiceLayout: model?.choiceLayout,\n layoutProfile,\n hasAudio: model?.hasAudio,\n useFeatureButtonAudio: model?.useFeatureButtonAudio,\n prompt: model?.prompt,\n })\n);\nconst isAudioOnlyMode = $derived(layoutProfileFlags.isAudioOnlyMode);\nconst isBlankOnlyTemplate = $derived(layoutProfileFlags.isBlankOnlyTemplate);\nconst isHorizontalChoices = $derived(layoutProfileFlags.isHorizontalChoices);\nconst hasInlineSentenceAudioLayout = $derived(layoutProfileFlags.hasInlineSentenceAudioLayout);\nconst useFeatureButtonAudio = $derived(layoutProfileFlags.useFeatureButtonAudio);\nconst hasVisiblePrompt = $derived(layoutProfileFlags.hasVisiblePrompt);\n// What renders before the stem shares one block, so each grid lays it out as one row.\nconst hasHeader = $derived(\n !!model?.teacherInstructions || hasVisiblePrompt || shouldShowCorrectAnswerToggle\n);\nconst layout = $derived(\n computeLayoutStyle({\n layoutProfile,\n isBlankOnlyTemplate,\n configuredLimits: model?.layoutLimits,\n customProfilePresets: model?.layoutProfilePresets,\n })\n);\n\n// ---------------------------------------------------------------------------\n// Cluster: choiceState — selection, display choice, per-choice correctness, result text\n// Feeds: template blank display, choice rendering, fieldset, result sr-only text\n// ---------------------------------------------------------------------------\nconst choices = $derived(Array.isArray(model?.choices) ? model.choices : []);\nconst choiceMode = $derived(model?.choiceMode || 'text');\nconst selectedId = $derived(selectedChoiceId(session) || localChoiceId || '');\nconst radioGroupName = $derived(`${instanceId}-choice-group-${model?.id || '1'}`);\nconst displayChoiceId = $derived(\n computeDisplayChoiceId({\n selectedId,\n isEvaluateMode,\n showCorrectAnswer,\n correctChoiceId: String(model?.correctChoiceId || ''),\n })\n);\nconst displayChoice = $derived.by(() => choices.find((c: any) => c.id === displayChoiceId));\nconst displayChoiceLabelHtml = $derived.by(() => String(displayChoice?.labelHtml || ''));\nconst resultStatus = $derived(\n computeResultStatus({ isEvaluateMode, showCorrectAnswer, isCorrect, isIncorrect, selectedId })\n);\nconst resultText = $derived(\n resultStatus === 'correct'\n ? t('correctAnswerSelected')\n : resultStatus === 'incorrect'\n ? t('incorrectAnswerSelected')\n : ''\n);\nconst choiceCorrectnessById = $derived(\n computeChoiceCorrectness({\n isEvaluateMode,\n correctChoiceId: String(model?.correctChoiceId || ''),\n selectedId: String(selectedId || ''),\n showCorrectAnswer,\n })\n);\n\n// ---------------------------------------------------------------------------\n// Cluster: a11y — stable IDs, aria labelling, described-by relationships\n// Feeds: fieldset legend, radiogroup labelling, template described-by\n// ---------------------------------------------------------------------------\nconst promptId = $derived(`${instanceId}-prompt`);\nconst legendId = $derived(`${instanceId}-choices-legend`);\nconst resultId = $derived(`${instanceId}-result`);\nconst blankHintId = $derived(`${instanceId}-blank-hint`);\nconst legendText = $derived(\n computeLegendText({\n prompt: model?.prompt || '',\n legendMaxChars: layout.legendMaxChars,\n answerChoicesLabel: t('answerChoices'),\n })\n);\nconst choicesGroupLabelledBy = $derived(hasVisiblePrompt ? promptId : undefined);\nconst choicesGroupAriaLabel = $derived.by(() => {\n if (hasVisiblePrompt) return undefined;\n const explicit = String(model?.choiceGroupLabel || '').trim();\n if (explicit) return explicit;\n return legendText;\n});\n// The transcript is not among these: it is rendered by the player from the item's\n// accessibility catalog (PIE-902), so this element neither owns the node nor has\n// an id to point at. It is placed immediately before this content in reading\n// order instead, as a labelled region.\nconst templateDescribedBy = $derived.by(() => (hasVisiblePrompt ? promptId : undefined));\n\n// ---------------------------------------------------------------------------\n// Misc — locale, audio error, template parsing, variant CSS, style strings\n// ---------------------------------------------------------------------------\n// An item with no language gets no `lang`, so it inherits the host page's instead\n// of being announced as English. `es_MX` is written as the BCP 47 tag `es-MX`.\nconst lang = $derived.by(() => {\n const language = String(model?.language || model?.locale || '').trim();\n return language ? language.replace(/_/g, '-') : undefined;\n});\nconst variantCssConfig = $derived(getVariantCssConfig(model?.customType));\nconst variantRootClass = $derived(getVariantRootClass(model?.customType));\nconst templateParts = $derived.by(() => {\n const t = model?.template || '';\n const idx = t.indexOf(BLANK_TOKEN);\n if (idx < 0) return { before: t, after: '' };\n let before = t.slice(0, idx);\n let after = t.slice(idx + BLANK_TOKEN.length);\n // The CQT's shared cloze renderer (Renaissance components/src/cloze.js) emits\n // literal `&nbsp;` on BOTH sides of the cloze span unconditionally:\n // `&nbsp;<span ... -cloze-blank></span><span ... -cloze>…</span>&nbsp;`.\n // Mirror that ONLY for inline_sentence layouts (sel-vic, sr-vic, plain\n // sentence). Token-sequence layouts arrange tokens in a grid with explicit\n // sibling-margin spacing, so injecting NBSP throws off those tuned gaps;\n // they don't suffer the wrap-leader symptom either because each token has\n // its own grid placement. This (a) keeps the cloze glued to its neighbors\n // so it doesn't dangle at the start of a wrapped line (CONTOOL-2574), and\n // (b) matches the CQT's cloze→adjacent-text gap when the author wrote no\n // whitespace around {{blank}} (CONTOOL-2572: e.g. `…word: {{blank}}.`).\n if (layoutProfile === 'inline_sentence') {\n before = `${before.replace(/\\s+$/, '')} `;\n after = ` ${after.replace(/^\\s+/, '')}`;\n }\n return { before, after };\n});\n\nfunction onRadioChange(e: Event) {\n const input = e.target as HTMLInputElement;\n if (!input.checked) return;\n const choiceId = input.value;\n localChoiceId = choiceId;\n // The player owns the session's `id` and `element` (the versioned tag it\n // registered this element under), so neither is written here. A pick\n // drops an older session's `choiceId`.\n const { choiceId: _legacyChoiceId, ...rest } = session || {};\n onSessionChange?.({ ...rest, value: [choiceId] });\n}\n\nfunction toggleCorrectAnswer() {\n if (!shouldShowCorrectAnswerToggle) return;\n showCorrectAnswer = !showCorrectAnswer;\n}\n\n$effect(() => {\n if (!isEvaluateMode || isResponseCorrect) {\n showCorrectAnswer = false;\n }\n});\n\nfunction onRadioGroupKeydown(e: KeyboardEvent) {\n if (model?.disabled) return;\n const key = e.key;\n if (!['ArrowDown', 'ArrowRight', 'ArrowUp', 'ArrowLeft'].includes(key)) return;\n e.preventDefault();\n const container = e.currentTarget as HTMLElement;\n const inputs = Array.from(\n container.querySelectorAll('input[type=\"radio\"]:not([disabled])')\n ) as HTMLInputElement[];\n if (inputs.length === 0) return;\n let idx = inputs.findIndex((i) => i.checked);\n if (key === 'ArrowDown' || key === 'ArrowRight') {\n idx = idx < 0 ? 0 : (idx + 1) % inputs.length;\n } else {\n idx = idx < 0 ? inputs.length - 1 : (idx - 1 + inputs.length) % inputs.length;\n }\n const next = inputs[idx];\n next.checked = true;\n next.dispatchEvent(new Event('change', { bubbles: true }));\n next.focus();\n}\n\nconst featureAudioSkin = $derived(\n computeFeatureAudioSkin({\n locale: model?.locale,\n audioButtonSkin: model?.audioButtonSkin,\n audioButtonSkinsByLocale: model?.audioButtonSkinsByLocale,\n })\n);\n\n// Follows the session both ways: a player that resets or replaces the session\n// clears the selection instead of leaving the previous pick on screen.\n$effect(() => {\n localChoiceId = selectedChoiceId(session);\n});\n\n$effect(() => {\n const btn = toggleCorrectAnswerButtonEl;\n if (!btn) return;\n btn.addEventListener('click', toggleCorrectAnswer);\n return () => btn.removeEventListener('click', toggleCorrectAnswer);\n});\n\n// Delegated listeners on the choices group — two events with a radio-guard on change.\n$effect(() => {\n const group = choicesGroupEl;\n if (!group) return;\n const handleChange = (e: Event) => {\n const target = e.target as HTMLInputElement | null;\n if (target?.type !== 'radio') return;\n onRadioChange(e);\n };\n const handleKeydown = (e: KeyboardEvent) => onRadioGroupKeydown(e);\n group.addEventListener('change', handleChange);\n group.addEventListener('keydown', handleKeydown);\n return () => {\n group.removeEventListener('change', handleChange);\n group.removeEventListener('keydown', handleKeydown);\n };\n});\n\n$effect(() => {\n if (rootEl) ensureVariantCssInjected(variantCssConfig, rootEl);\n});\n</script>\n\n<div\n bind:this={rootEl}\n class={`mc-populated-blank-root pie-element pie-element-mc-populated-blank pie-delivery-root layout-${layoutProfile} choice-mode-${choiceMode} ${variantRootClass} ${hasInlineSentenceAudioLayout ? 'has-inline-audio' : ''} ${hasHeader ? 'has-header' : ''}`}\n lang={lang}\n style={layout.rootStyle}\n data-mpb-css={VARIANT_CSS_KEY}\n>\n {#if hasHeader}\n <div class=\"pie-header\">\n {#if model?.teacherInstructions}\n <TeacherInstructions html={model.teacherInstructions} language={model?.language} />\n {/if}\n\n {#if hasVisiblePrompt}\n <div class=\"pie-prompt\" id={promptId}>{@html sanitizeModelHtml(model.prompt)}</div>\n {/if}\n\n {#if shouldShowCorrectAnswerToggle}\n <div class=\"pie-correct-answer-toggle-row\">\n <button\n bind:this={toggleCorrectAnswerButtonEl}\n type=\"button\"\n class=\"pie-toggle-correct-answer\"\n style=\"gap:var(--mpb-toggle-button-gap, 0.5rem);\"\n aria-pressed={showCorrectAnswer}\n data-testid=\"show-correct-answer\"\n >\n <span class=\"pie-correct-answer-toggle-content\">\n <span class=\"pie-correct-answer-toggle-icon-holder\" aria-hidden=\"true\">\n {#if showCorrectAnswer}\n <svg\n class=\"pie-correct-answer-toggle-svg\"\n preserveAspectRatio=\"xMinYMin meet\"\n version=\"1.1\"\n viewBox=\"-283 359 34 35\"\n >\n <circle cx=\"-266\" cy=\"375.9\" r=\"14\" fill=\"var(--pie-tertiary-light, #d0e2f0)\" />\n <path\n d=\"M-280.5,375.9c0-8,6.5-14.5,14.5-14.5s14.5,6.5,14.5,14.5s-6.5,14.5-14.5,14.5S-280.5,383.9-280.5,375.9z M-279.5,375.9c0,7.4,6.1,13.5,13.5,13.5c7.4,0,13.5-6.1,13.5-13.5s-6.1-13.5-13.5-13.5C-273.4,362.4-279.5,368.5-279.5,375.9z\"\n fill=\"var(--pie-tertiary-light, #d0e2f0)\"\n />\n <polygon\n points=\"-265.4,383.1 -258.6,377.2 -261.2,374.2 -264.3,376.9 -268.9,368.7 -272.4,370.6\"\n fill=\"var(--pie-tertiary, #146eb3)\"\n />\n </svg>\n {:else}\n <svg\n class=\"pie-correct-answer-toggle-svg\"\n preserveAspectRatio=\"xMinYMin meet\"\n version=\"1.1\"\n viewBox=\"-129.5 127 34 35\"\n >\n <path\n d=\"M-112.9,160.4c-8.5,0-15.5-6.9-15.5-15.5c0-8.5,6.9-15.5,15.5-15.5s15.5,6.9,15.5,15.5 C-97.4,153.5-104.3,160.4-112.9,160.4z\"\n fill=\"var(--pie-border-light, #D0CAC5)\"\n stroke=\"var(--pie-border-light, #E6E3E0)\"\n stroke-width=\"0.75\"\n />\n <path\n d=\"M-113.2,159c-8,0-14.5-6.5-14.5-14.5s6.5-14.5,14.5-14.5s14.5,6.5,14.5,14.5S-105.2,159-113.2,159z\"\n fill=\"var(--pie-border-light, #B3ABA4)\"\n stroke=\"var(--pie-border-light, #CDC7C2)\"\n stroke-width=\"0.5\"\n />\n <circle cx=\"-114.2\" cy=\"143.5\" r=\"14\" fill=\"var(--pie-background, white)\" />\n <path\n d=\"M-114.2,158c-8,0-14.5-6.5-14.5-14.5s6.5-14.5,14.5-14.5s14.5,6.5,14.5,14.5S-106.2,158-114.2,158z M-114.2,130c-7.4,0-13.5,6.1-13.5,13.5s6.1,13.5,13.5,13.5s13.5-6.1,13.5-13.5S-106.8,130-114.2,130z\"\n fill=\"var(--pie-background-dark, #ecedf1)\"\n />\n <polygon\n points=\"-114.8,150.7 -121.6,144.8 -119,141.8 -115.9,144.5 -111.3,136.3 -107.8,138.2\"\n fill=\"var(--pie-tertiary, #146eb3)\"\n />\n </svg>\n {/if}\n </span>\n <span class=\"pie-correct-answer-toggle-label\">\n {tCommon(showCorrectAnswer ? 'hideCorrectAnswer' : 'showCorrectAnswer', model?.language)}\n </span>\n </span>\n </button>\n </div>\n {/if}\n </div>\n {/if}\n\n <AudioPlayer\n hasAudio={!!model?.hasAudio}\n audioUrl={model?.audioUrl}\n {useFeatureButtonAudio}\n autoplayEnabled={!!model?.autoplayAudioEnabled}\n {featureAudioSkin}\n language={model?.language}\n onaudiostarted={onAudioStarted}\n onaudioended={onAudioEnded}\n />\n\n {#if model?.sentenceHtml}\n <div class=\"sentence-line pie-sentence-line\" aria-describedby={templateDescribedBy}>\n {@html sanitizeModelHtml(model.sentenceHtml)}\n </div>\n {/if}\n\n {#if !isAudioOnlyMode}\n <div class=\"template-line pie-template-line\" aria-describedby={templateDescribedBy}\n >{@html sanitizeModelHtml(templateParts.before)}<ClozeMarker\n {choiceMode}\n displayChoice={displayChoice}\n {displayChoiceLabelHtml}\n isStandalone={isBlankOnlyTemplate}\n blankWidth={layout.blankWidth}\n blankBorderWidth={layout.blankBorderWidth}\n ariaLabel={t('blankLabel')}\n language={model?.language}\n />{@html sanitizeModelHtml(templateParts.after)}</div>\n {/if}\n\n {#if resultText}\n <p id={resultId} class=\"sr-only pie-result-feedback\" role=\"status\" aria-live=\"polite\">{resultText}</p>\n {/if}\n\n <p id={blankHintId} class=\"sr-only pie-blank-hint\">{t('blankPreSelectionHint')}</p>\n\n <fieldset class=\"pie-choices-fieldset\" disabled={model?.disabled}>\n <legend class=\"sr-only pie-choices-legend\" id={legendId}>{legendText}</legend>\n <div\n bind:this={choicesGroupEl}\n class={`pie-choices ${isHorizontalChoices ? 'choices-horizontal' : 'choices-vertical'}`}\n style=\"gap:var(--mpb-choice-group-gap, 0.5rem);\"\n role=\"radiogroup\"\n tabindex=\"-1\"\n aria-labelledby={choicesGroupLabelledBy}\n aria-label={choicesGroupAriaLabel}\n aria-describedby={[blankHintId, resultText ? resultId : undefined].filter(Boolean).join(' ')}\n >\n {#each choices as c (c.id)}\n <ChoiceRow\n choice={c}\n {choiceMode}\n isHorizontal={isHorizontalChoices}\n isSelected={displayChoiceId === c.id}\n isDisabled={!!model?.disabled}\n correctness={choiceCorrectnessById.get(c.id)}\n {isEvaluateMode}\n {instanceId}\n {radioGroupName}\n language={model?.language}\n />\n {/each}\n </div>\n </fieldset>\n</div>\n\n<style>\n .sr-only {\n position: absolute;\n width: 1px;\n height: 1px;\n padding: 0;\n margin: -1px;\n overflow: hidden;\n clip: rect(0, 0, 0, 0);\n white-space: nowrap;\n border: 0;\n }\n\n /* Layout is self-contained: PIE players ship no Tailwind, so no utility class or\n preflight reset can be assumed. The blank slot, choice tiles and variant\n max-widths are sized for border-box. */\n .mc-populated-blank-root,\n .mc-populated-blank-root :global(*),\n .mc-populated-blank-root :global(*::before),\n .mc-populated-blank-root :global(*::after) {\n box-sizing: border-box;\n }\n\n /* An authored image on its own line (the sel_r1-s3 stimulus) would otherwise sit\n on the text baseline and add the descender gap below it. */\n .mc-populated-blank-root :global(img) {\n vertical-align: middle;\n }\n\n .mc-populated-blank-root {\n --mpb-focus-ring: var(\n --pie-focus-outline,\n var(--pie-button-focus-outline, var(--pie-focus-checked-border, #1565c0))\n );\n padding: 1rem;\n }\n\n .pie-prompt {\n margin-bottom: 1rem;\n }\n\n /* IAT-authored content marks its alignment with a class; the IAT stylesheet\n that defines it does not ship with the item. */\n .mc-populated-blank-root :global(.iat-align-center) {\n text-align: center;\n }\n\n /* Flush paragraphs, as the demo app's preflight reset rendered them. */\n .pie-prompt :global(p),\n .sentence-line :global(p) {\n margin: 0;\n }\n\n .sentence-line {\n margin-bottom: 0.75rem;\n }\n\n .pie-toggle-correct-answer {\n width: 100%;\n cursor: pointer;\n border: 0;\n background: transparent;\n padding: 0;\n margin-bottom: 0.75rem;\n display: flex;\n justify-content: center;\n text-align: center;\n font: inherit;\n color: var(--pie-text, black);\n }\n\n .pie-correct-answer-toggle-row {\n width: 100%;\n display: flex;\n justify-content: flex-end;\n }\n\n .pie-correct-answer-toggle-content {\n display: flex;\n margin: 0 auto;\n align-items: center;\n }\n\n .pie-correct-answer-toggle-icon-holder {\n width: 25px;\n margin-right: 5px;\n display: inline-flex;\n align-items: center;\n justify-content: center;\n }\n\n .pie-correct-answer-toggle-svg {\n width: 25px;\n height: 25px;\n }\n\n .pie-correct-answer-toggle-label {\n width: fit-content;\n min-width: 140px;\n align-self: center;\n vertical-align: middle;\n font-weight: 400;\n user-select: none;\n }\n\n .pie-toggle-correct-answer:hover .pie-correct-answer-toggle-label,\n .pie-toggle-correct-answer:focus-visible .pie-correct-answer-toggle-label {\n text-decoration: underline;\n }\n\n .template-line {\n white-space: pre-wrap;\n margin-bottom: 1rem;\n }\n\n .template-line :global(p) {\n margin: 0;\n display: inline;\n }\n\n .pie-choices-fieldset {\n border: 0;\n padding: 0;\n margin: 0;\n }\n\n .pie-choices {\n display: flex;\n }\n\n .choices-horizontal {\n flex-direction: row;\n flex-wrap: wrap;\n align-items: flex-start;\n justify-content: center;\n }\n\n .choices-vertical {\n flex-direction: column;\n }\n\n .layout-audio_blank_only :global(.pie-audio-container),\n .layout-stimulus_image_blank :global(.pie-audio-container) {\n display: flex;\n width: min(100%, var(--mpb-audio-instructions-max-width, 875px));\n margin-left: auto;\n margin-right: auto;\n justify-content: flex-end;\n }\n\n .layout-audio_blank_only .template-line,\n .layout-stimulus_image_blank .template-line {\n text-align: center;\n margin: var(--mpb-audio-blank-template-margin-top, 0.8rem) 0\n var(--mpb-audio-blank-template-margin-bottom, 1.8rem);\n }\n\n .layout-audio_blank_only fieldset {\n display: flex;\n justify-content: center;\n }\n\n .layout-audio_blank_only :global(.pie-blank-slot),\n .layout-stimulus_image_blank :global(.pie-blank-slot) {\n width: var(--mpb-blank-wide-width, 10rem);\n border-bottom-width: var(--mpb-blank-underline-wide-width, 6px);\n min-height: 160px;\n padding-bottom: 4px;\n }\n\n .layout-stimulus_image_blank {\n display: grid;\n grid-template-columns: minmax(var(--mpb-stimulus-min-column, 210px), 1fr) auto;\n grid-template-areas:\n 'sentence audio'\n '. template'\n 'choices choices';\n column-gap: var(--mpb-stimulus-grid-column-gap, 2rem);\n row-gap: var(--mpb-stimulus-grid-row-gap, 0.7rem);\n align-items: start;\n }\n\n /* Each grid names only the areas it lays out, so the header gets a row of its own;\n left to auto-placement it would land below the choices. */\n .layout-stimulus_image_blank.has-header {\n grid-template-areas:\n 'header header'\n 'sentence audio'\n '. template'\n 'choices choices';\n }\n\n .layout-stimulus_image_blank .pie-header,\n .layout-token_sequence .pie-header,\n .layout-inline_sentence.has-inline-audio .pie-header {\n grid-area: header;\n }\n\n .layout-stimulus_image_blank :global(.pie-audio-container) {\n grid-area: audio;\n margin: 0;\n }\n\n .layout-stimulus_image_blank .sentence-line {\n grid-area: sentence;\n margin: var(--mpb-stimulus-sentence-margin-top, 0.2rem) 0 0;\n }\n\n .layout-stimulus_image_blank .template-line {\n grid-area: template;\n margin: 0;\n text-align: center;\n justify-self: center;\n }\n\n .layout-stimulus_image_blank fieldset {\n grid-area: choices;\n margin-top: var(--mpb-stimulus-choices-margin-top, 0.9rem);\n }\n\n .layout-token_sequence {\n display: grid;\n grid-template-columns: 1fr auto;\n grid-template-areas:\n 'audio audio'\n 'template template'\n 'choices choices';\n column-gap: var(--mpb-token-grid-column-gap, 1.5rem);\n row-gap: var(--mpb-token-grid-row-gap, 0.8rem);\n align-items: start;\n }\n\n .layout-token_sequence.has-header {\n grid-template-areas:\n 'header header'\n 'audio audio'\n 'template template'\n 'choices choices';\n }\n\n .layout-token_sequence :global(.pie-audio-container) {\n grid-area: audio;\n margin: 0;\n justify-self: end;\n }\n\n .layout-token_sequence .template-line {\n grid-area: template;\n margin: var(--mpb-token-template-margin-top, 0.6rem) 0 0;\n justify-self: center;\n text-align: center;\n }\n\n .layout-token_sequence .template-line :global(span + span) {\n margin-left: var(--mpb-token-inline-token-gap, 0.35rem);\n }\n\n .layout-token_sequence :global(.pie-blank-slot) {\n width: var(--mpb-blank-standalone-width, 7rem);\n border-bottom-width: var(--mpb-blank-underline-wide-width, 4px);\n margin-left: var(--mpb-token-inline-token-gap, 0.35rem);\n }\n\n .layout-token_sequence fieldset {\n grid-area: choices;\n margin-top: var(--mpb-token-choices-margin-top, 0.2rem);\n }\n\n .layout-inline_sentence.has-inline-audio {\n display: grid;\n grid-template-columns: minmax(var(--mpb-text-min-column, 260px), 1fr) auto;\n grid-template-areas:\n 'template audio'\n 'choices choices';\n column-gap: var(--mpb-inline-grid-column-gap, 1.5rem);\n row-gap: var(--mpb-inline-grid-row-gap, 0.65rem);\n align-items: start;\n }\n\n .layout-inline_sentence.has-inline-audio.has-header {\n grid-template-areas:\n 'header header'\n 'template audio'\n 'choices choices';\n }\n\n .layout-inline_sentence.has-inline-audio :global(.pie-audio-container) {\n grid-area: audio;\n margin: 0;\n justify-self: end;\n }\n\n .layout-inline_sentence.has-inline-audio .template-line {\n grid-area: template;\n margin: var(--mpb-inline-template-margin-top, 0.45rem) 0 0;\n text-align: center;\n justify-self: center;\n }\n\n .layout-inline_sentence.has-inline-audio fieldset {\n grid-area: choices;\n margin-top: var(--mpb-inline-choices-margin-top, 0.25rem);\n }\n\n /* The CQT sheets (r1.scss, vic.scss, sel_r1-s3_plusggg) lay these layouts out in one\n column below 850px: the listen button sits at the left above the stem, and the\n answer tiles stack at the left edge. */\n @media not all and (min-width: 850px) {\n .layout-audio_blank_only :global(.pie-audio-container),\n .layout-stimulus_image_blank :global(.pie-audio-container),\n .layout-token_sequence :global(.pie-audio-container),\n .layout-inline_sentence.has-inline-audio :global(.pie-audio-container) {\n width: 100%;\n margin-left: 0;\n margin-right: 0;\n justify-content: flex-start;\n justify-self: start;\n }\n\n .layout-audio_blank_only fieldset {\n justify-content: flex-start;\n }\n\n .layout-audio_blank_only .pie-choices,\n .layout-token_sequence .pie-choices,\n .layout-stimulus_image_blank .pie-choices,\n .layout-inline_sentence.has-inline-audio .pie-choices {\n flex-direction: column;\n align-items: flex-start;\n justify-content: flex-start;\n /* The vw cap fits a row of tiles across the viewport; stacked tiles keep their width. */\n --mpb-choice-width-vw: 100vw;\n }\n\n .layout-stimulus_image_blank {\n grid-template-columns: minmax(0, 1fr);\n grid-template-areas:\n 'audio'\n 'sentence'\n 'template'\n 'choices';\n }\n\n .layout-stimulus_image_blank.has-header {\n grid-template-areas:\n 'header'\n 'audio'\n 'sentence'\n 'template'\n 'choices';\n }\n\n .layout-inline_sentence.has-inline-audio {\n grid-template-columns: minmax(0, 1fr);\n grid-template-areas:\n 'audio'\n 'template'\n 'choices';\n }\n\n .layout-inline_sentence.has-inline-audio.has-header {\n grid-template-areas:\n 'header'\n 'audio'\n 'template'\n 'choices';\n }\n\n .layout-stimulus_image_blank .template-line,\n .layout-token_sequence .template-line,\n .layout-inline_sentence.has-inline-audio .template-line {\n justify-self: start;\n text-align: start;\n }\n }\n</style>\n"],"x_google_ignoreList":[0,5],"mappings":";;;AACA,SAAS,GAAe,GAAG,GAAG;CAC7B,KAAK,IAAI,GAAG,KAAK,IAAI;AACtB;AACA,SAAS,EAAkB,GAAG,GAAG;CAChC,CAAS,KAAR,QAAa,IAAI,EAAE,YAAY,IAAI,EAAE;CACtC,KAAK,IAAI,IAAI,GAAG,IAAI,MAAM,CAAC,GAAG,IAAI,GAAG,KAAK,EAAE,KAAK,EAAE;CACnD,OAAO;AACR;AACA,SAAS,EAAgB,GAAG;CAC3B,IAAI,MAAM,QAAQ,CAAC,GAAG,OAAO;AAC9B;AACA,SAAS,EAAsB,GAAG,GAAG;CACpC,IAAI,IAAY,KAAR,OAAY,OAAsB,OAAO,SAAtB,OAAgC,EAAE,OAAO,aAAa,EAAE;CACnF,IAAY,KAAR,MAAW;EACd,IAAI,GAAG,GAAG,GAAG,GAAG,IAAI,CAAC,GAAG,IAAI,CAAC,GAAG,IAA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ACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;AACD,CAAC,GACK,KAAgB,EAAO;CAC5B;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;AACD,CAAC,GACK,KAAW,EAAO,qOA+BxB,CAAC,GACK,KAAmB,EAAO;CAC/B;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;AACD,CAAC,GACK,KAAO,EAAO,CAAC,OAAO,CAAC,GACvB,KAAO,EAAO,u8BAuHpB,CAAC,GACK,KAAM,EAAO,g3DAiMnB,CAAC,GACK,KAAS,EAAO,shBAuDtB,CAAC,GACK,KAAM,EAAO;CAClB;CACA;CACA;CACA;CACA;AACD,CAAC,GACK,KAAgB,EAAK,uBAAuB,GAC5C,KAAW,EAAK,uBAAuB,GACvC,KAAc,EAAK,aAAa,GAChC,KAAY,EAAK,8BAA8B,GAC/C,KAAY,EAAK,gBAAgB,GACjC,KAAiB,EAAK,kGAAkG,GACxH,KAAoB,EAAK,uBAAuB,GAChD,KAAkB,EAAK,6DAA6D,GACpF,KAAe,EAAK,SAAS,GAC7B,KAAiB,EAAK,0BAA0B,GAChD,KAAuB,EAAK,UAAU,GACtC,KAAuB,EAAK,SAAS,GACrC,KAAqB,EAAK,6BAA6B,GACvD,KAAmB,EAAK,MAAM,GAC9B,KAAY;CACjB,SAAS;CACT,WAAW;CACX,MAAM;CACN,cAAc;CACd,iBAAiB;CACjB,YAAY;CACZ,uBAAuB;CACvB,SAAS;CACT,UAAU;CACV,cAAc;CACd,kBAAkB;CAClB,UAAU;AACX,GACM,KAA6B;CAClC;CACA;CACA;CACA;CACA;CACA;CACA;CACA;AACD,GACM,KAAwB,EAAO,EAAS,CAAC,GAAG,EAA0B,CAAC,GACvE,KAAqB,WAAW;CACrC,IAAM,IAAM,CAAC;CAIb,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,EAAM,CAAA,CAAC,SAAS,KAJxB,IAAA,gBAKe,EAAe,KAqH5B,IAAC,MAAA,EAAK,EAAW,CAAA,aAEjB,GAAQ,WAAwC,EAAK,CAAA,EAAE,YACrD,IAAM,MAAA,EAAwC,EAAQ,CAAA,WAAG,CAAU,CAAA,KACnE,IAAA,GAEQ,eAAe,EAAA,CAAmB,IAAG,uBAAuB,sBAAoB,eAAA,KAFxF,IAAA,mBAAA,EAMkB,EAAsB,CAAA,KANxC,IAAA,cAAA,EAOa,CAAqB,CAAA,KAPlC,IAAA,oBAAA,CAAA;WAJiD,EAAE,uBAAuB,SAYvD,CAAA,EAAC,EAAW,GAAE,EAAA,EAAU,IAAA,EAAG,CAAQ,IAAG,KAAA,CAAA,CAAU,CAAC,OAAO,OAAO,CAAC,CAAC,KAAK,GAAG,CAAA,CAAA,QAtIhG,EAAA;AAFO"}
1
+ {"version":3,"file":"McPopulatedBlank-CJcV9lfT.js","names":["e","e","t","n","e","t"],"sources":["../../../../../node_modules/.bun/dompurify@3.4.16/node_modules/dompurify/dist/purify.es.mjs","../../../../shared/utils/dist/index.js","../../src/delivery/computeAudioMode.ts","../../../../shared/translator/dist/en.js","../../../../shared/translator/dist/es.js","../../../../../node_modules/.bun/i18next@25.10.10+1fb4c65d43e298b9/node_modules/i18next/dist/esm/i18next.js","../../../../shared/translator/dist/index.js","../../src/delivery/i18n.ts","../../src/delivery/AudioPlayer.svelte","../../src/delivery/ClozeMarker.svelte","../../src/delivery/ChoiceRow.svelte","../../src/delivery/TeacherInstructions.svelte","../../src/delivery/computeChoiceCorrectness.ts","../../src/delivery/computeLayoutProfile.ts","../../src/delivery/computeLayoutStyle.ts","../../src/delivery/assets/audioButtonSkinAssets.ts","../../src/delivery/computeDisplayState.ts","../../src/delivery/variant-css-map.ts","../../src/delivery/McPopulatedBlank.svelte"],"sourcesContent":["/*! @license DOMPurify 3.4.16 | (c) Cure53 and other contributors | Released under the Apache license 2.0 and Mozilla Public License 2.0 | github.com/cure53/DOMPurify/blob/3.4.16/LICENSE */\nfunction _OverloadYield(e, d) {\n\tthis.v = e, this.k = d;\n}\nfunction _arrayLikeToArray(r, a) {\n\t(null == a || a > r.length) && (a = r.length);\n\tfor (var e = 0, n = Array(a); e < a; e++) n[e] = r[e];\n\treturn n;\n}\nfunction _arrayWithHoles(r) {\n\tif (Array.isArray(r)) return r;\n}\nfunction _iterableToArrayLimit(r, l) {\n\tvar t = null == r ? null : \"undefined\" != typeof Symbol && r[Symbol.iterator] || r[\"@@iterator\"];\n\tif (null != t) {\n\t\tvar e, n, i, u, a = [], f = !0, o = !1;\n\t\ttry {\n\t\t\tif (i = (t = t.call(r)).next, 0 === l) {\n\t\t\t\tif (Object(t) !== t) return;\n\t\t\t\tf = !1;\n\t\t\t} else for (; !(f = (e = i.call(t)).done) && (a.push(e.value), a.length !== l); f = !0);\n\t\t} catch (r) {\n\t\t\to = !0, n = r;\n\t\t} finally {\n\t\t\ttry {\n\t\t\t\tif (!f && null != t.return && (u = t.return(), Object(u) !== u)) return;\n\t\t\t} finally {\n\t\t\t\tif (o) throw n;\n\t\t\t}\n\t\t}\n\t\treturn a;\n\t}\n}\nfunction _nonIterableRest() {\n\tthrow new TypeError(\"Invalid attempt to destructure non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.\");\n}\n/*! regenerator-runtime -- Copyright (c) 2014-present, Facebook, Inc. -- license (MIT): https://github.com/babel/babel/blob/main/packages/babel-helpers/LICENSE */\nfunction _slicedToArray(r, e) {\n\treturn _arrayWithHoles(r) || _iterableToArrayLimit(r, e) || _unsupportedIterableToArray(r, e) || _nonIterableRest();\n}\nfunction _unsupportedIterableToArray(r, a) {\n\tif (r) {\n\t\tif (\"string\" == typeof r) return _arrayLikeToArray(r, a);\n\t\tvar t = {}.toString.call(r).slice(8, -1);\n\t\treturn \"Object\" === t && r.constructor && (t = r.constructor.name), \"Map\" === t || \"Set\" === t ? Array.from(r) : \"Arguments\" === t || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(t) ? _arrayLikeToArray(r, a) : void 0;\n\t}\n}\nfunction AsyncGenerator(e) {\n\tvar t, n;\n\tfunction resume(t, n) {\n\t\ttry {\n\t\t\tvar r = e[t](n), o = r.value, u = o instanceof _OverloadYield;\n\t\t\tPromise.resolve(u ? o.v : o).then(function(n) {\n\t\t\t\tif (u) {\n\t\t\t\t\tvar i = \"return\" === t && o.k ? t : \"next\";\n\t\t\t\t\tif (!o.k || n.done) return resume(i, n);\n\t\t\t\t\tn = e[i](n).value;\n\t\t\t\t}\n\t\t\t\tsettle(!!r.done, n);\n\t\t\t}, function(e) {\n\t\t\t\tresume(\"throw\", e);\n\t\t\t});\n\t\t} catch (e) {\n\t\t\tsettle(2, e);\n\t\t}\n\t}\n\tfunction settle(e, r) {\n\t\t2 === e ? t.reject(r) : t.resolve({\n\t\t\tvalue: r,\n\t\t\tdone: e\n\t\t}), (t = t.next) ? resume(t.key, t.arg) : n = null;\n\t}\n\tthis._invoke = function(e, r) {\n\t\treturn new Promise(function(o, u) {\n\t\t\tvar i = {\n\t\t\t\tkey: e,\n\t\t\t\targ: r,\n\t\t\t\tresolve: o,\n\t\t\t\treject: u,\n\t\t\t\tnext: null\n\t\t\t};\n\t\t\tn ? n = n.next = i : (t = n = i, resume(e, r));\n\t\t});\n\t}, \"function\" != typeof e.return && (this.return = void 0);\n}\nAsyncGenerator.prototype[\"function\" == typeof Symbol && Symbol.asyncIterator || \"@@asyncIterator\"] = function() {\n\treturn this;\n}, AsyncGenerator.prototype.next = function(e) {\n\treturn this._invoke(\"next\", e);\n}, AsyncGenerator.prototype.throw = function(e) {\n\treturn this._invoke(\"throw\", e);\n}, AsyncGenerator.prototype.return = function(e) {\n\treturn this._invoke(\"return\", e);\n};\nconst entries = Object.entries;\nconst setPrototypeOf = Object.setPrototypeOf;\nconst isFrozen = Object.isFrozen;\nconst getPrototypeOf = Object.getPrototypeOf;\nconst getOwnPropertyDescriptor = Object.getOwnPropertyDescriptor;\nlet freeze = Object.freeze;\nlet seal = Object.seal;\nlet create = Object.create;\nlet _ref = typeof Reflect !== \"undefined\" && Reflect;\nlet apply = _ref.apply;\nlet construct = _ref.construct;\nif (!freeze) freeze = function freeze(x) {\n\treturn x;\n};\nif (!seal) seal = function seal(x) {\n\treturn x;\n};\nif (!apply) apply = function apply(func, thisArg) {\n\tfor (var _len = arguments.length, args = new Array(_len > 2 ? _len - 2 : 0), _key = 2; _key < _len; _key++) args[_key - 2] = arguments[_key];\n\treturn func.apply(thisArg, args);\n};\nif (!construct) construct = function construct(Func) {\n\tfor (var _len2 = arguments.length, args = new Array(_len2 > 1 ? _len2 - 1 : 0), _key2 = 1; _key2 < _len2; _key2++) args[_key2 - 1] = arguments[_key2];\n\treturn new Func(...args);\n};\nconst arrayForEach = unapply(Array.prototype.forEach);\nArray.prototype.indexOf;\nconst arrayLastIndexOf = unapply(Array.prototype.lastIndexOf);\nconst arrayPop = unapply(Array.prototype.pop);\nconst arrayPush = unapply(Array.prototype.push);\nArray.prototype.slice;\nconst arraySplice = unapply(Array.prototype.splice);\nconst arrayIsArray = Array.isArray;\nconst stringToLowerCase = unapply(String.prototype.toLowerCase);\nconst stringToString = unapply(String.prototype.toString);\nconst stringMatch = unapply(String.prototype.match);\nconst stringReplace = unapply(String.prototype.replace);\nconst stringIndexOf = unapply(String.prototype.indexOf);\nconst stringTrim = unapply(String.prototype.trim);\nconst numberToString = unapply(Number.prototype.toString);\nconst booleanToString = unapply(Boolean.prototype.toString);\nconst bigintToString = typeof BigInt === \"undefined\" ? null : unapply(BigInt.prototype.toString);\nconst symbolToString = typeof Symbol === \"undefined\" ? null : unapply(Symbol.prototype.toString);\nconst objectHasOwnProperty = unapply(Object.prototype.hasOwnProperty);\nconst objectToString = unapply(Object.prototype.toString);\nconst regExpTest = unapply(RegExp.prototype.test);\nconst typeErrorCreate = unconstruct(TypeError);\n/**\n* Creates a new function that calls the given function with a specified thisArg and arguments.\n*\n* @param func - The function to be wrapped and called.\n* @returns A new function that calls the given function with a specified thisArg and arguments.\n*/\nfunction unapply(func) {\n\treturn function(thisArg) {\n\t\tif (thisArg instanceof RegExp) thisArg.lastIndex = 0;\n\t\tfor (var _len3 = arguments.length, args = new Array(_len3 > 1 ? _len3 - 1 : 0), _key3 = 1; _key3 < _len3; _key3++) args[_key3 - 1] = arguments[_key3];\n\t\treturn apply(func, thisArg, args);\n\t};\n}\n/**\n* Creates a new function that constructs an instance of the given constructor function with the provided arguments.\n*\n* @param func - The constructor function to be wrapped and called.\n* @returns A new function that constructs an instance of the given constructor function with the provided arguments.\n*/\nfunction unconstruct(Func) {\n\treturn function() {\n\t\tfor (var _len4 = arguments.length, args = new Array(_len4), _key4 = 0; _key4 < _len4; _key4++) args[_key4] = arguments[_key4];\n\t\treturn construct(Func, args);\n\t};\n}\n/**\n* Add properties to a lookup table\n*\n* @param set - The set to which elements will be added.\n* @param array - The array containing elements to be added to the set.\n* @param transformCaseFunc - An optional function to transform the case of each element before adding to the set.\n* @returns The modified set with added elements.\n*/\nfunction addToSet(set, array) {\n\tlet transformCaseFunc = arguments.length > 2 && arguments[2] !== void 0 ? arguments[2] : stringToLowerCase;\n\tif (setPrototypeOf) setPrototypeOf(set, null);\n\tif (!arrayIsArray(array)) return set;\n\tlet l = array.length;\n\twhile (l--) {\n\t\tlet element = array[l];\n\t\tif (typeof element === \"string\") {\n\t\t\tconst lcElement = transformCaseFunc(element);\n\t\t\tif (lcElement !== element) {\n\t\t\t\tif (!isFrozen(array)) array[l] = lcElement;\n\t\t\t\telement = lcElement;\n\t\t\t}\n\t\t}\n\t\tset[element] = true;\n\t}\n\treturn set;\n}\n/**\n* Clean up an array to harden against CSPP\n*\n* @param array - The array to be cleaned.\n* @returns The cleaned version of the array\n*/\nfunction cleanArray(array) {\n\tfor (let index = 0; index < array.length; index++) if (!objectHasOwnProperty(array, index)) array[index] = null;\n\treturn array;\n}\n/**\n* Shallow clone an object\n*\n* @param object - The object to be cloned.\n* @returns A new object that copies the original.\n*/\nfunction clone(object) {\n\tconst newObject = create(null);\n\tfor (const _ref2 of entries(object)) {\n\t\tvar _ref3 = _slicedToArray(_ref2, 2);\n\t\tconst property = _ref3[0];\n\t\tconst value = _ref3[1];\n\t\tif (objectHasOwnProperty(object, property)) {\n\t\t\tif (arrayIsArray(value)) newObject[property] = cleanArray(value);\n\t\t\telse if (value && typeof value === \"object\" && value.constructor === Object) newObject[property] = clone(value);\n\t\t\telse newObject[property] = value;\n\t\t}\n\t}\n\treturn newObject;\n}\n/**\n* Convert non-node values into strings without depending on direct property access.\n*\n* @param value - The value to stringify.\n* @returns A string representation of the provided value.\n*/\nfunction stringifyValue(value) {\n\tswitch (typeof value) {\n\t\tcase \"string\": return value;\n\t\tcase \"number\": return numberToString(value);\n\t\tcase \"boolean\": return booleanToString(value);\n\t\tcase \"bigint\": return bigintToString ? bigintToString(value) : \"0\";\n\t\tcase \"symbol\": return symbolToString ? symbolToString(value) : \"Symbol()\";\n\t\tcase \"undefined\": return objectToString(value);\n\t\tcase \"function\":\n\t\tcase \"object\": {\n\t\t\tif (value === null) return objectToString(value);\n\t\t\tconst valueAsRecord = value;\n\t\t\tconst valueToString = lookupGetter(valueAsRecord, \"toString\");\n\t\t\tif (typeof valueToString === \"function\") {\n\t\t\t\tconst stringified = valueToString(valueAsRecord);\n\t\t\t\treturn typeof stringified === \"string\" ? stringified : objectToString(stringified);\n\t\t\t}\n\t\t\treturn objectToString(value);\n\t\t}\n\t\tdefault: return objectToString(value);\n\t}\n}\n/**\n* This method automatically checks if the prop is function or getter and behaves accordingly.\n*\n* @param object - The object to look up the getter function in its prototype chain.\n* @param prop - The property name for which to find the getter function.\n* @returns The getter function found in the prototype chain or a fallback function.\n*/\nfunction lookupGetter(object, prop) {\n\twhile (object !== null) {\n\t\tconst desc = getOwnPropertyDescriptor(object, prop);\n\t\tif (desc) {\n\t\t\tif (desc.get) return unapply(desc.get);\n\t\t\tif (typeof desc.value === \"function\") return unapply(desc.value);\n\t\t}\n\t\tobject = getPrototypeOf(object);\n\t}\n\tfunction fallbackValue() {\n\t\treturn null;\n\t}\n\treturn fallbackValue;\n}\nfunction isRegex(value) {\n\ttry {\n\t\tregExpTest(value, \"\");\n\t\treturn true;\n\t} catch (_unused) {\n\t\treturn false;\n\t}\n}\nconst html$1 = freeze([\n\t\"a\",\n\t\"abbr\",\n\t\"acronym\",\n\t\"address\",\n\t\"area\",\n\t\"article\",\n\t\"aside\",\n\t\"audio\",\n\t\"b\",\n\t\"bdi\",\n\t\"bdo\",\n\t\"big\",\n\t\"blink\",\n\t\"blockquote\",\n\t\"body\",\n\t\"br\",\n\t\"button\",\n\t\"canvas\",\n\t\"caption\",\n\t\"center\",\n\t\"cite\",\n\t\"code\",\n\t\"col\",\n\t\"colgroup\",\n\t\"content\",\n\t\"data\",\n\t\"datalist\",\n\t\"dd\",\n\t\"decorator\",\n\t\"del\",\n\t\"details\",\n\t\"dfn\",\n\t\"dialog\",\n\t\"dir\",\n\t\"div\",\n\t\"dl\",\n\t\"dt\",\n\t\"element\",\n\t\"em\",\n\t\"fieldset\",\n\t\"figcaption\",\n\t\"figure\",\n\t\"font\",\n\t\"footer\",\n\t\"form\",\n\t\"h1\",\n\t\"h2\",\n\t\"h3\",\n\t\"h4\",\n\t\"h5\",\n\t\"h6\",\n\t\"head\",\n\t\"header\",\n\t\"hgroup\",\n\t\"hr\",\n\t\"html\",\n\t\"i\",\n\t\"img\",\n\t\"input\",\n\t\"ins\",\n\t\"kbd\",\n\t\"label\",\n\t\"legend\",\n\t\"li\",\n\t\"main\",\n\t\"map\",\n\t\"mark\",\n\t\"marquee\",\n\t\"menu\",\n\t\"menuitem\",\n\t\"meter\",\n\t\"nav\",\n\t\"nobr\",\n\t\"ol\",\n\t\"optgroup\",\n\t\"option\",\n\t\"output\",\n\t\"p\",\n\t\"picture\",\n\t\"pre\",\n\t\"progress\",\n\t\"q\",\n\t\"rp\",\n\t\"rt\",\n\t\"ruby\",\n\t\"s\",\n\t\"samp\",\n\t\"search\",\n\t\"section\",\n\t\"select\",\n\t\"shadow\",\n\t\"slot\",\n\t\"small\",\n\t\"source\",\n\t\"spacer\",\n\t\"span\",\n\t\"strike\",\n\t\"strong\",\n\t\"style\",\n\t\"sub\",\n\t\"summary\",\n\t\"sup\",\n\t\"table\",\n\t\"tbody\",\n\t\"td\",\n\t\"template\",\n\t\"textarea\",\n\t\"tfoot\",\n\t\"th\",\n\t\"thead\",\n\t\"time\",\n\t\"tr\",\n\t\"track\",\n\t\"tt\",\n\t\"u\",\n\t\"ul\",\n\t\"var\",\n\t\"video\",\n\t\"wbr\"\n]);\nconst svg$1 = freeze([\n\t\"svg\",\n\t\"a\",\n\t\"altglyph\",\n\t\"altglyphdef\",\n\t\"altglyphitem\",\n\t\"animatecolor\",\n\t\"animatemotion\",\n\t\"animatetransform\",\n\t\"circle\",\n\t\"clippath\",\n\t\"defs\",\n\t\"desc\",\n\t\"ellipse\",\n\t\"enterkeyhint\",\n\t\"exportparts\",\n\t\"filter\",\n\t\"font\",\n\t\"g\",\n\t\"glyph\",\n\t\"glyphref\",\n\t\"hkern\",\n\t\"image\",\n\t\"inputmode\",\n\t\"line\",\n\t\"lineargradient\",\n\t\"marker\",\n\t\"mask\",\n\t\"metadata\",\n\t\"mpath\",\n\t\"part\",\n\t\"path\",\n\t\"pattern\",\n\t\"polygon\",\n\t\"polyline\",\n\t\"radialgradient\",\n\t\"rect\",\n\t\"stop\",\n\t\"style\",\n\t\"switch\",\n\t\"symbol\",\n\t\"text\",\n\t\"textpath\",\n\t\"title\",\n\t\"tref\",\n\t\"tspan\",\n\t\"view\",\n\t\"vkern\"\n]);\nconst svgFilters = freeze([\n\t\"feBlend\",\n\t\"feColorMatrix\",\n\t\"feComponentTransfer\",\n\t\"feComposite\",\n\t\"feConvolveMatrix\",\n\t\"feDiffuseLighting\",\n\t\"feDisplacementMap\",\n\t\"feDistantLight\",\n\t\"feDropShadow\",\n\t\"feFlood\",\n\t\"feFuncA\",\n\t\"feFuncB\",\n\t\"feFuncG\",\n\t\"feFuncR\",\n\t\"feGaussianBlur\",\n\t\"feImage\",\n\t\"feMerge\",\n\t\"feMergeNode\",\n\t\"feMorphology\",\n\t\"feOffset\",\n\t\"fePointLight\",\n\t\"feSpecularLighting\",\n\t\"feSpotLight\",\n\t\"feTile\",\n\t\"feTurbulence\"\n]);\nconst svgDisallowed = freeze([\n\t\"animate\",\n\t\"color-profile\",\n\t\"cursor\",\n\t\"discard\",\n\t\"font-face\",\n\t\"font-face-format\",\n\t\"font-face-name\",\n\t\"font-face-src\",\n\t\"font-face-uri\",\n\t\"foreignobject\",\n\t\"hatch\",\n\t\"hatchpath\",\n\t\"mesh\",\n\t\"meshgradient\",\n\t\"meshpatch\",\n\t\"meshrow\",\n\t\"missing-glyph\",\n\t\"script\",\n\t\"set\",\n\t\"solidcolor\",\n\t\"unknown\",\n\t\"use\"\n]);\nconst mathMl$1 = freeze([\n\t\"math\",\n\t\"menclose\",\n\t\"merror\",\n\t\"mfenced\",\n\t\"mfrac\",\n\t\"mglyph\",\n\t\"mi\",\n\t\"mlabeledtr\",\n\t\"mmultiscripts\",\n\t\"mn\",\n\t\"mo\",\n\t\"mover\",\n\t\"mpadded\",\n\t\"mphantom\",\n\t\"mroot\",\n\t\"mrow\",\n\t\"ms\",\n\t\"mspace\",\n\t\"msqrt\",\n\t\"mstyle\",\n\t\"msub\",\n\t\"msup\",\n\t\"msubsup\",\n\t\"mtable\",\n\t\"mtd\",\n\t\"mtext\",\n\t\"mtr\",\n\t\"munder\",\n\t\"munderover\",\n\t\"mprescripts\"\n]);\nconst mathMlDisallowed = freeze([\n\t\"maction\",\n\t\"maligngroup\",\n\t\"malignmark\",\n\t\"mlongdiv\",\n\t\"mscarries\",\n\t\"mscarry\",\n\t\"msgroup\",\n\t\"mstack\",\n\t\"msline\",\n\t\"msrow\",\n\t\"semantics\",\n\t\"annotation\",\n\t\"annotation-xml\",\n\t\"mprescripts\",\n\t\"none\"\n]);\nconst text = freeze([\"#text\"]);\nconst html = freeze([\n\t\"accept\",\n\t\"action\",\n\t\"align\",\n\t\"alt\",\n\t\"autocapitalize\",\n\t\"autocomplete\",\n\t\"autopictureinpicture\",\n\t\"autoplay\",\n\t\"background\",\n\t\"bgcolor\",\n\t\"border\",\n\t\"capture\",\n\t\"cellpadding\",\n\t\"cellspacing\",\n\t\"checked\",\n\t\"cite\",\n\t\"class\",\n\t\"clear\",\n\t\"color\",\n\t\"cols\",\n\t\"colspan\",\n\t\"command\",\n\t\"commandfor\",\n\t\"controls\",\n\t\"controlslist\",\n\t\"coords\",\n\t\"crossorigin\",\n\t\"datetime\",\n\t\"decoding\",\n\t\"default\",\n\t\"dir\",\n\t\"disabled\",\n\t\"disablepictureinpicture\",\n\t\"disableremoteplayback\",\n\t\"download\",\n\t\"draggable\",\n\t\"enctype\",\n\t\"enterkeyhint\",\n\t\"exportparts\",\n\t\"face\",\n\t\"for\",\n\t\"headers\",\n\t\"height\",\n\t\"hidden\",\n\t\"high\",\n\t\"href\",\n\t\"hreflang\",\n\t\"id\",\n\t\"inert\",\n\t\"inputmode\",\n\t\"integrity\",\n\t\"ismap\",\n\t\"kind\",\n\t\"label\",\n\t\"lang\",\n\t\"list\",\n\t\"loading\",\n\t\"loop\",\n\t\"low\",\n\t\"max\",\n\t\"maxlength\",\n\t\"media\",\n\t\"method\",\n\t\"min\",\n\t\"minlength\",\n\t\"multiple\",\n\t\"muted\",\n\t\"name\",\n\t\"nonce\",\n\t\"noshade\",\n\t\"novalidate\",\n\t\"nowrap\",\n\t\"open\",\n\t\"optimum\",\n\t\"part\",\n\t\"pattern\",\n\t\"placeholder\",\n\t\"playsinline\",\n\t\"popover\",\n\t\"popovertarget\",\n\t\"popovertargetaction\",\n\t\"poster\",\n\t\"preload\",\n\t\"pubdate\",\n\t\"radiogroup\",\n\t\"readonly\",\n\t\"rel\",\n\t\"required\",\n\t\"rev\",\n\t\"reversed\",\n\t\"role\",\n\t\"rows\",\n\t\"rowspan\",\n\t\"spellcheck\",\n\t\"scope\",\n\t\"selected\",\n\t\"shape\",\n\t\"size\",\n\t\"sizes\",\n\t\"slot\",\n\t\"span\",\n\t\"srclang\",\n\t\"start\",\n\t\"src\",\n\t\"srcset\",\n\t\"step\",\n\t\"style\",\n\t\"summary\",\n\t\"tabindex\",\n\t\"title\",\n\t\"translate\",\n\t\"type\",\n\t\"usemap\",\n\t\"valign\",\n\t\"value\",\n\t\"width\",\n\t\"wrap\",\n\t\"xmlns\"\n]);\nconst svg = freeze([\n\t\"accent-height\",\n\t\"accumulate\",\n\t\"additive\",\n\t\"alignment-baseline\",\n\t\"amplitude\",\n\t\"ascent\",\n\t\"attributename\",\n\t\"attributetype\",\n\t\"azimuth\",\n\t\"basefrequency\",\n\t\"baseline-shift\",\n\t\"begin\",\n\t\"bias\",\n\t\"by\",\n\t\"class\",\n\t\"clip\",\n\t\"clippathunits\",\n\t\"clip-path\",\n\t\"clip-rule\",\n\t\"color\",\n\t\"color-interpolation\",\n\t\"color-interpolation-filters\",\n\t\"color-profile\",\n\t\"color-rendering\",\n\t\"cx\",\n\t\"cy\",\n\t\"d\",\n\t\"dx\",\n\t\"dy\",\n\t\"diffuseconstant\",\n\t\"direction\",\n\t\"display\",\n\t\"divisor\",\n\t\"dominant-baseline\",\n\t\"dur\",\n\t\"edgemode\",\n\t\"elevation\",\n\t\"end\",\n\t\"exponent\",\n\t\"fill\",\n\t\"fill-opacity\",\n\t\"fill-rule\",\n\t\"filter\",\n\t\"filterunits\",\n\t\"flood-color\",\n\t\"flood-opacity\",\n\t\"font-family\",\n\t\"font-size\",\n\t\"font-size-adjust\",\n\t\"font-stretch\",\n\t\"font-style\",\n\t\"font-variant\",\n\t\"font-weight\",\n\t\"fx\",\n\t\"fy\",\n\t\"g1\",\n\t\"g2\",\n\t\"glyph-name\",\n\t\"glyphref\",\n\t\"gradientunits\",\n\t\"gradienttransform\",\n\t\"height\",\n\t\"href\",\n\t\"id\",\n\t\"image-rendering\",\n\t\"in\",\n\t\"in2\",\n\t\"intercept\",\n\t\"k\",\n\t\"k1\",\n\t\"k2\",\n\t\"k3\",\n\t\"k4\",\n\t\"kerning\",\n\t\"keypoints\",\n\t\"keysplines\",\n\t\"keytimes\",\n\t\"lang\",\n\t\"lengthadjust\",\n\t\"letter-spacing\",\n\t\"kernelmatrix\",\n\t\"kernelunitlength\",\n\t\"lighting-color\",\n\t\"local\",\n\t\"marker-end\",\n\t\"marker-mid\",\n\t\"marker-start\",\n\t\"markerheight\",\n\t\"markerunits\",\n\t\"markerwidth\",\n\t\"maskcontentunits\",\n\t\"maskunits\",\n\t\"max\",\n\t\"mask\",\n\t\"mask-type\",\n\t\"media\",\n\t\"method\",\n\t\"mode\",\n\t\"min\",\n\t\"name\",\n\t\"numoctaves\",\n\t\"offset\",\n\t\"operator\",\n\t\"opacity\",\n\t\"order\",\n\t\"orient\",\n\t\"orientation\",\n\t\"origin\",\n\t\"overflow\",\n\t\"paint-order\",\n\t\"path\",\n\t\"pathlength\",\n\t\"patterncontentunits\",\n\t\"patterntransform\",\n\t\"patternunits\",\n\t\"pointer-events\",\n\t\"points\",\n\t\"preservealpha\",\n\t\"preserveaspectratio\",\n\t\"primitiveunits\",\n\t\"r\",\n\t\"rx\",\n\t\"ry\",\n\t\"radius\",\n\t\"refx\",\n\t\"refy\",\n\t\"repeatcount\",\n\t\"repeatdur\",\n\t\"restart\",\n\t\"result\",\n\t\"rotate\",\n\t\"scale\",\n\t\"seed\",\n\t\"shape-rendering\",\n\t\"slope\",\n\t\"specularconstant\",\n\t\"specularexponent\",\n\t\"spreadmethod\",\n\t\"startoffset\",\n\t\"stddeviation\",\n\t\"stitchtiles\",\n\t\"stop-color\",\n\t\"stop-opacity\",\n\t\"stroke-dasharray\",\n\t\"stroke-dashoffset\",\n\t\"stroke-linecap\",\n\t\"stroke-linejoin\",\n\t\"stroke-miterlimit\",\n\t\"stroke-opacity\",\n\t\"stroke\",\n\t\"stroke-width\",\n\t\"style\",\n\t\"surfacescale\",\n\t\"systemlanguage\",\n\t\"tabindex\",\n\t\"tablevalues\",\n\t\"targetx\",\n\t\"targety\",\n\t\"transform\",\n\t\"transform-origin\",\n\t\"text-anchor\",\n\t\"text-decoration\",\n\t\"text-orientation\",\n\t\"text-rendering\",\n\t\"textlength\",\n\t\"type\",\n\t\"u1\",\n\t\"u2\",\n\t\"unicode\",\n\t\"values\",\n\t\"vector-effect\",\n\t\"viewbox\",\n\t\"visibility\",\n\t\"version\",\n\t\"vert-adv-y\",\n\t\"vert-origin-x\",\n\t\"vert-origin-y\",\n\t\"width\",\n\t\"word-spacing\",\n\t\"wrap\",\n\t\"writing-mode\",\n\t\"xchannelselector\",\n\t\"ychannelselector\",\n\t\"x\",\n\t\"x1\",\n\t\"x2\",\n\t\"xmlns\",\n\t\"y\",\n\t\"y1\",\n\t\"y2\",\n\t\"z\",\n\t\"zoomandpan\"\n]);\nconst mathMl = freeze([\n\t\"accent\",\n\t\"accentunder\",\n\t\"align\",\n\t\"bevelled\",\n\t\"close\",\n\t\"columnalign\",\n\t\"columnlines\",\n\t\"columnspacing\",\n\t\"columnspan\",\n\t\"denomalign\",\n\t\"depth\",\n\t\"dir\",\n\t\"display\",\n\t\"displaystyle\",\n\t\"encoding\",\n\t\"fence\",\n\t\"frame\",\n\t\"height\",\n\t\"href\",\n\t\"id\",\n\t\"largeop\",\n\t\"length\",\n\t\"linethickness\",\n\t\"lquote\",\n\t\"lspace\",\n\t\"mathbackground\",\n\t\"mathcolor\",\n\t\"mathsize\",\n\t\"mathvariant\",\n\t\"maxsize\",\n\t\"minsize\",\n\t\"movablelimits\",\n\t\"notation\",\n\t\"numalign\",\n\t\"open\",\n\t\"rowalign\",\n\t\"rowlines\",\n\t\"rowspacing\",\n\t\"rowspan\",\n\t\"rspace\",\n\t\"rquote\",\n\t\"scriptlevel\",\n\t\"scriptminsize\",\n\t\"scriptsizemultiplier\",\n\t\"selection\",\n\t\"separator\",\n\t\"separators\",\n\t\"stretchy\",\n\t\"subscriptshift\",\n\t\"supscriptshift\",\n\t\"symmetric\",\n\t\"voffset\",\n\t\"width\",\n\t\"xmlns\"\n]);\nconst xml = freeze([\n\t\"xlink:href\",\n\t\"xml:id\",\n\t\"xlink:title\",\n\t\"xml:space\",\n\t\"xmlns:xlink\"\n]);\nconst MUSTACHE_EXPR = seal(/{{[\\w\\W]*|^[\\w\\W]*}}/g);\nconst ERB_EXPR = seal(/<%[\\w\\W]*|^[\\w\\W]*%>/g);\nconst TMPLIT_EXPR = seal(/\\${[\\w\\W]*/g);\nconst DATA_ATTR = seal(/^data-[\\-\\w.\\u00B7-\\uFFFF]+$/);\nconst ARIA_ATTR = seal(/^aria-[\\-\\w]+$/);\nconst IS_ALLOWED_URI = seal(/^(?:(?:(?:f|ht)tps?|mailto|tel|callto|sms|cid|xmpp|matrix):|[^a-z]|[a-z+.\\-]+(?:[^a-z+.\\-:]|$))/i);\nconst IS_SCRIPT_OR_DATA = seal(/^(?:\\w+script|data):/i);\nconst ATTR_WHITESPACE = seal(/[\\u0000-\\u0020\\u00A0\\u1680\\u180E\\u2000-\\u2029\\u205F\\u3000]/g);\nconst DOCTYPE_NAME = seal(/^html$/i);\nconst CUSTOM_ELEMENT = seal(/^[a-z][.\\w]*(-[.\\w]+)+$/i);\nconst ELEMENT_MARKUP_PROBE = seal(/<[/\\w!]/g);\nconst COMMENT_MARKUP_PROBE = seal(/<[/\\w]/g);\nconst FALLBACK_TAG_CLOSE = seal(/<\\/no(script|embed|frames)/i);\nconst SELF_CLOSING_TAG = seal(/\\/>/i);\nconst NODE_TYPE = {\n\telement: 1,\n\tattribute: 2,\n\ttext: 3,\n\tcdataSection: 4,\n\tentityReference: 5,\n\tentityNode: 6,\n\tprocessingInstruction: 7,\n\tcomment: 8,\n\tdocument: 9,\n\tdocumentType: 10,\n\tdocumentFragment: 11,\n\tnotation: 12\n};\nconst LITERAL_TEXT_ELEMENT_NAMES = [\n\t\"style\",\n\t\"script\",\n\t\"xmp\",\n\t\"iframe\",\n\t\"noembed\",\n\t\"noframes\",\n\t\"plaintext\",\n\t\"noscript\"\n];\nconst LITERAL_TEXT_ELEMENTS = freeze(addToSet({}, LITERAL_TEXT_ELEMENT_NAMES));\nconst LITERAL_TEXT_CLOSE = function() {\n\tconst map = {};\n\tarrayForEach(LITERAL_TEXT_ELEMENT_NAMES, (name) => {\n\t\tmap[name] = seal(new RegExp(\"</\" + name + \"(?=[\\\\t\\\\n\\\\f\\\\r />])\", \"i\"));\n\t});\n\treturn freeze(map);\n}();\nconst getGlobal = function getGlobal() {\n\treturn typeof window === \"undefined\" ? null : window;\n};\n/**\n* Creates a no-op policy for internal use only.\n* Don't export this function outside this module!\n* @param trustedTypes The policy factory.\n* @param purifyHostElement The Script element used to load DOMPurify (to determine policy name suffix).\n* @return The policy created (or null, if Trusted Types\n* are not supported or creating the policy failed).\n*/\nconst _createTrustedTypesPolicy = function _createTrustedTypesPolicy(trustedTypes, purifyHostElement) {\n\tif (typeof trustedTypes !== \"object\" || typeof trustedTypes.createPolicy !== \"function\") return null;\n\tlet suffix = null;\n\tconst ATTR_NAME = \"data-tt-policy-suffix\";\n\tif (purifyHostElement && purifyHostElement.hasAttribute(ATTR_NAME)) suffix = purifyHostElement.getAttribute(ATTR_NAME);\n\tconst policyName = \"dompurify\" + (suffix ? \"#\" + suffix : \"\");\n\ttry {\n\t\treturn trustedTypes.createPolicy(policyName, {\n\t\t\tcreateHTML(html) {\n\t\t\t\treturn html;\n\t\t\t},\n\t\t\tcreateScriptURL(scriptUrl) {\n\t\t\t\treturn scriptUrl;\n\t\t\t}\n\t\t});\n\t} catch (_) {\n\t\tconsole.warn(\"TrustedTypes policy \" + policyName + \" could not be created.\");\n\t\treturn null;\n\t}\n};\nconst _createHooksMap = function _createHooksMap() {\n\treturn {\n\t\tafterSanitizeAttributes: [],\n\t\tafterSanitizeElements: [],\n\t\tafterSanitizeShadowDOM: [],\n\t\tbeforeSanitizeAttributes: [],\n\t\tbeforeSanitizeElements: [],\n\t\tbeforeSanitizeShadowDOM: [],\n\t\tuponSanitizeAttribute: [],\n\t\tuponSanitizeElement: [],\n\t\tuponSanitizeShadowNode: []\n\t};\n};\n/**\n* Resolve a set-valued configuration option: a fresh set built from\n* cfg[key] when it is an own array property (seeded with a clone of\n* options.base when given, case-normalized via options.transform),\n* the fallback set otherwise.\n*\n* @param cfg the cloned, prototype-free configuration object\n* @param key the configuration property to read\n* @param fallback the set to use when the option is absent or not an array\n* @param options transform and optional base set to merge into\n* @returns the resolved set\n*/\nconst _resolveSetOption = function _resolveSetOption(cfg, key, fallback, options) {\n\treturn objectHasOwnProperty(cfg, key) && arrayIsArray(cfg[key]) ? addToSet(options.base ? clone(options.base) : {}, cfg[key], options.transform) : fallback;\n};\n/**\n* Resolve an object-valued configuration option: a prototype-free clone\n* of cfg[key] when it is an own, truthy object property, else a fresh\n* fallback built by makeFallback (fresh on every parse, so a previous\n* parse can never leak state into the next one).\n*\n* @param cfg the cloned, prototype-free configuration object\n* @param key the configuration property to read\n* @param makeFallback builds the fallback value when the option is absent\n* @returns the resolved object\n*/\nconst _resolveObjectOption = function _resolveObjectOption(cfg, key, makeFallback) {\n\tconst value = objectHasOwnProperty(cfg, key) ? cfg[key] : void 0;\n\treturn value && typeof value === \"object\" ? clone(value) : makeFallback();\n};\nfunction createDOMPurify() {\n\tlet window = arguments.length > 0 && arguments[0] !== void 0 ? arguments[0] : getGlobal();\n\tconst DOMPurify = (root) => createDOMPurify(root);\n\tDOMPurify.version = \"3.4.16\";\n\tDOMPurify.removed = [];\n\tif (!window || !window.document || window.document.nodeType !== NODE_TYPE.document || !window.Element) {\n\t\tDOMPurify.isSupported = false;\n\t\treturn DOMPurify;\n\t}\n\tlet document = window.document;\n\tconst originalDocument = document;\n\tconst currentScript = originalDocument.currentScript;\n\twindow.DocumentFragment;\n\tconst HTMLTemplateElement = window.HTMLTemplateElement, Node = window.Node, Element = window.Element, NodeFilter = window.NodeFilter;\n\twindow.NamedNodeMap === void 0 && (window.NamedNodeMap || window.MozNamedAttrMap);\n\twindow.HTMLFormElement;\n\tconst DOMParser = window.DOMParser, trustedTypes = window.trustedTypes;\n\tconst ElementPrototype = Element.prototype;\n\tconst cloneNode = lookupGetter(ElementPrototype, \"cloneNode\");\n\tconst remove = lookupGetter(ElementPrototype, \"remove\");\n\tconst removeAttributeNode = lookupGetter(ElementPrototype, \"removeAttributeNode\");\n\tconst getNextSibling = lookupGetter(ElementPrototype, \"nextSibling\");\n\tconst getChildNodes = lookupGetter(ElementPrototype, \"childNodes\");\n\tconst getParentNode = lookupGetter(ElementPrototype, \"parentNode\");\n\tconst getShadowRoot = lookupGetter(ElementPrototype, \"shadowRoot\");\n\tconst getAttributes = lookupGetter(ElementPrototype, \"attributes\");\n\tconst getNodeType = Node && Node.prototype ? lookupGetter(Node.prototype, \"nodeType\") : null;\n\tconst getNodeName = Node && Node.prototype ? lookupGetter(Node.prototype, \"nodeName\") : null;\n\tconst getOwnerDocument = Node && Node.prototype ? lookupGetter(Node.prototype, \"ownerDocument\") : null;\n\tconst _readNodeType = function _readNodeType(node) {\n\t\treturn getNodeType ? getNodeType(node) : node.nodeType;\n\t};\n\tconst _readNodeName = function _readNodeName(node) {\n\t\treturn getNodeName ? getNodeName(node) : node.nodeName;\n\t};\n\tif (typeof HTMLTemplateElement === \"function\") {\n\t\tconst template = document.createElement(\"template\");\n\t\tif (template.content && template.content.ownerDocument) document = template.content.ownerDocument;\n\t}\n\tlet trustedTypesPolicy;\n\tlet emptyHTML = \"\";\n\tlet defaultTrustedTypesPolicy;\n\tlet defaultTrustedTypesPolicyResolved = false;\n\tlet IN_TRUSTED_TYPES_POLICY = 0;\n\tconst _assertNotInTrustedTypesPolicy = function _assertNotInTrustedTypesPolicy() {\n\t\tif (IN_TRUSTED_TYPES_POLICY > 0) throw typeErrorCreate(\"A configured TRUSTED_TYPES_POLICY callback (createHTML or createScriptURL) must not call DOMPurify.sanitize, as that causes infinite recursion. Do not pass a policy whose callbacks wrap DOMPurify as TRUSTED_TYPES_POLICY; see the \\\"DOMPurify and Trusted Types\\\" section of the README.\");\n\t};\n\tconst _createTrustedHTML = function _createTrustedHTML(html) {\n\t\t_assertNotInTrustedTypesPolicy();\n\t\tIN_TRUSTED_TYPES_POLICY++;\n\t\ttry {\n\t\t\treturn trustedTypesPolicy.createHTML(html);\n\t\t} finally {\n\t\t\tIN_TRUSTED_TYPES_POLICY--;\n\t\t}\n\t};\n\tconst _createTrustedScriptURL = function _createTrustedScriptURL(scriptUrl) {\n\t\t_assertNotInTrustedTypesPolicy();\n\t\tIN_TRUSTED_TYPES_POLICY++;\n\t\ttry {\n\t\t\treturn trustedTypesPolicy.createScriptURL(scriptUrl);\n\t\t} finally {\n\t\t\tIN_TRUSTED_TYPES_POLICY--;\n\t\t}\n\t};\n\tconst _getDefaultTrustedTypesPolicy = function _getDefaultTrustedTypesPolicy() {\n\t\tif (!defaultTrustedTypesPolicyResolved) {\n\t\t\tdefaultTrustedTypesPolicy = _createTrustedTypesPolicy(trustedTypes, currentScript);\n\t\t\tdefaultTrustedTypesPolicyResolved = true;\n\t\t}\n\t\treturn defaultTrustedTypesPolicy;\n\t};\n\tconst _document = document, implementation = _document.implementation, createNodeIterator = _document.createNodeIterator, createDocumentFragment = _document.createDocumentFragment, getElementsByTagName = _document.getElementsByTagName;\n\tconst importNode = originalDocument.importNode;\n\tlet hooks = _createHooksMap();\n\t/**\n\t* Expose whether this browser supports running the full DOMPurify.\n\t*/\n\tDOMPurify.isSupported = typeof entries === \"function\" && typeof getParentNode === \"function\" && implementation && implementation.createHTMLDocument !== void 0;\n\tconst 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;\n\tlet IS_ALLOWED_URI$1 = IS_ALLOWED_URI;\n\t/**\n\t* We consider the elements and attributes below to be safe. Ideally\n\t* don't add any new ones but feel free to remove unwanted ones.\n\t*/\n\tlet ALLOWED_TAGS = null;\n\tconst DEFAULT_ALLOWED_TAGS = addToSet({}, [\n\t\t...html$1,\n\t\t...svg$1,\n\t\t...svgFilters,\n\t\t...mathMl$1,\n\t\t...text\n\t]);\n\tlet ALLOWED_ATTR = null;\n\tconst DEFAULT_ALLOWED_ATTR = addToSet({}, [\n\t\t...html,\n\t\t...svg,\n\t\t...mathMl,\n\t\t...xml\n\t]);\n\tlet CUSTOM_ELEMENT_HANDLING = Object.seal(create(null, {\n\t\ttagNameCheck: {\n\t\t\twritable: true,\n\t\t\tconfigurable: false,\n\t\t\tenumerable: true,\n\t\t\tvalue: null\n\t\t},\n\t\tattributeNameCheck: {\n\t\t\twritable: true,\n\t\t\tconfigurable: false,\n\t\t\tenumerable: true,\n\t\t\tvalue: null\n\t\t},\n\t\tallowCustomizedBuiltInElements: {\n\t\t\twritable: true,\n\t\t\tconfigurable: false,\n\t\t\tenumerable: true,\n\t\t\tvalue: false\n\t\t}\n\t}));\n\tlet FORBID_TAGS = null;\n\tlet FORBID_ATTR = null;\n\tconst EXTRA_ELEMENT_HANDLING = Object.seal(create(null, {\n\t\ttagCheck: {\n\t\t\twritable: true,\n\t\t\tconfigurable: false,\n\t\t\tenumerable: true,\n\t\t\tvalue: null\n\t\t},\n\t\tattributeCheck: {\n\t\t\twritable: true,\n\t\t\tconfigurable: false,\n\t\t\tenumerable: true,\n\t\t\tvalue: null\n\t\t}\n\t}));\n\tlet ALLOW_ARIA_ATTR = true;\n\tlet ALLOW_DATA_ATTR = true;\n\tlet ALLOW_UNKNOWN_PROTOCOLS = false;\n\tlet ALLOW_SELF_CLOSE_IN_ATTR = true;\n\tlet SAFE_FOR_TEMPLATES = false;\n\tlet SAFE_FOR_XML = true;\n\tlet WHOLE_DOCUMENT = false;\n\tlet SET_CONFIG = false;\n\tlet SET_CONFIG_ALLOWED_TAGS = null;\n\tlet SET_CONFIG_ALLOWED_ATTR = null;\n\tlet FORCE_BODY = false;\n\tlet RETURN_DOM = false;\n\tlet RETURN_DOM_FRAGMENT = false;\n\tlet RETURN_TRUSTED_TYPE = false;\n\tlet SANITIZE_DOM = true;\n\tlet SANITIZE_NAMED_PROPS = false;\n\tconst SANITIZE_NAMED_PROPS_PREFIX = \"user-content-\";\n\tlet KEEP_CONTENT = true;\n\tlet IN_PLACE = false;\n\tlet USE_PROFILES = {};\n\tlet FORBID_CONTENTS = null;\n\tconst DEFAULT_FORBID_CONTENTS = addToSet({}, [\n\t\t\"annotation-xml\",\n\t\t\"audio\",\n\t\t\"colgroup\",\n\t\t\"desc\",\n\t\t\"foreignobject\",\n\t\t\"head\",\n\t\t\"iframe\",\n\t\t\"math\",\n\t\t\"mi\",\n\t\t\"mn\",\n\t\t\"mo\",\n\t\t\"ms\",\n\t\t\"mtext\",\n\t\t\"noembed\",\n\t\t\"noframes\",\n\t\t\"noscript\",\n\t\t\"plaintext\",\n\t\t\"script\",\n\t\t\"selectedcontent\",\n\t\t\"style\",\n\t\t\"svg\",\n\t\t\"template\",\n\t\t\"thead\",\n\t\t\"title\",\n\t\t\"video\",\n\t\t\"xmp\"\n\t]);\n\tlet DATA_URI_TAGS = null;\n\tconst DEFAULT_DATA_URI_TAGS = addToSet({}, [\n\t\t\"audio\",\n\t\t\"video\",\n\t\t\"img\",\n\t\t\"source\",\n\t\t\"image\",\n\t\t\"track\"\n\t]);\n\tlet URI_SAFE_ATTRIBUTES = null;\n\tconst DEFAULT_URI_SAFE_ATTRIBUTES = addToSet({}, [\n\t\t\"alt\",\n\t\t\"class\",\n\t\t\"for\",\n\t\t\"id\",\n\t\t\"label\",\n\t\t\"name\",\n\t\t\"pattern\",\n\t\t\"placeholder\",\n\t\t\"role\",\n\t\t\"summary\",\n\t\t\"title\",\n\t\t\"value\",\n\t\t\"style\",\n\t\t\"xmlns\"\n\t]);\n\tconst MATHML_NAMESPACE = \"http://www.w3.org/1998/Math/MathML\";\n\tconst SVG_NAMESPACE = \"http://www.w3.org/2000/svg\";\n\tconst HTML_NAMESPACE = \"http://www.w3.org/1999/xhtml\";\n\tlet NAMESPACE = HTML_NAMESPACE;\n\tlet IS_EMPTY_INPUT = false;\n\tlet ALLOWED_NAMESPACES = null;\n\tconst DEFAULT_ALLOWED_NAMESPACES = addToSet({}, [\n\t\tMATHML_NAMESPACE,\n\t\tSVG_NAMESPACE,\n\t\tHTML_NAMESPACE\n\t], stringToString);\n\tconst DEFAULT_MATHML_TEXT_INTEGRATION_POINTS = freeze([\n\t\t\"mi\",\n\t\t\"mo\",\n\t\t\"mn\",\n\t\t\"ms\",\n\t\t\"mtext\"\n\t]);\n\tlet MATHML_TEXT_INTEGRATION_POINTS = addToSet({}, DEFAULT_MATHML_TEXT_INTEGRATION_POINTS);\n\tconst DEFAULT_HTML_INTEGRATION_POINTS = freeze([\"annotation-xml\"]);\n\tlet HTML_INTEGRATION_POINTS = addToSet({}, DEFAULT_HTML_INTEGRATION_POINTS);\n\tconst COMMON_SVG_AND_HTML_ELEMENTS = addToSet({}, [\n\t\t\"title\",\n\t\t\"style\",\n\t\t\"font\",\n\t\t\"a\",\n\t\t\"script\"\n\t]);\n\tlet PARSER_MEDIA_TYPE = null;\n\tconst SUPPORTED_PARSER_MEDIA_TYPES = [\"application/xhtml+xml\", \"text/html\"];\n\tconst DEFAULT_PARSER_MEDIA_TYPE = \"text/html\";\n\tlet transformCaseFunc = null;\n\tlet CONFIG = null;\n\tconst formElement = document.createElement(\"form\");\n\tconst isRegexOrFunction = function isRegexOrFunction(testValue) {\n\t\treturn testValue instanceof RegExp || testValue instanceof Function;\n\t};\n\t/**\n\t* _parseConfig\n\t*\n\t* @param cfg optional config literal\n\t*/\n\tconst _parseConfig = function _parseConfig() {\n\t\tlet cfg = arguments.length > 0 && arguments[0] !== void 0 ? arguments[0] : {};\n\t\tif (CONFIG && CONFIG === cfg) return;\n\t\tif (!cfg || typeof cfg !== \"object\") cfg = {};\n\t\tcfg = clone(cfg);\n\t\tPARSER_MEDIA_TYPE = SUPPORTED_PARSER_MEDIA_TYPES.indexOf(cfg.PARSER_MEDIA_TYPE) === -1 ? DEFAULT_PARSER_MEDIA_TYPE : cfg.PARSER_MEDIA_TYPE;\n\t\ttransformCaseFunc = PARSER_MEDIA_TYPE === \"application/xhtml+xml\" ? stringToString : stringToLowerCase;\n\t\tALLOWED_TAGS = _resolveSetOption(cfg, \"ALLOWED_TAGS\", DEFAULT_ALLOWED_TAGS, { transform: transformCaseFunc });\n\t\tALLOWED_ATTR = _resolveSetOption(cfg, \"ALLOWED_ATTR\", DEFAULT_ALLOWED_ATTR, { transform: transformCaseFunc });\n\t\tALLOWED_NAMESPACES = _resolveSetOption(cfg, \"ALLOWED_NAMESPACES\", DEFAULT_ALLOWED_NAMESPACES, { transform: stringToString });\n\t\tURI_SAFE_ATTRIBUTES = _resolveSetOption(cfg, \"ADD_URI_SAFE_ATTR\", DEFAULT_URI_SAFE_ATTRIBUTES, {\n\t\t\ttransform: transformCaseFunc,\n\t\t\tbase: DEFAULT_URI_SAFE_ATTRIBUTES\n\t\t});\n\t\tDATA_URI_TAGS = _resolveSetOption(cfg, \"ADD_DATA_URI_TAGS\", DEFAULT_DATA_URI_TAGS, {\n\t\t\ttransform: transformCaseFunc,\n\t\t\tbase: DEFAULT_DATA_URI_TAGS\n\t\t});\n\t\tFORBID_CONTENTS = _resolveSetOption(cfg, \"FORBID_CONTENTS\", DEFAULT_FORBID_CONTENTS, { transform: transformCaseFunc });\n\t\tFORBID_TAGS = _resolveSetOption(cfg, \"FORBID_TAGS\", clone({}), { transform: transformCaseFunc });\n\t\tFORBID_ATTR = _resolveSetOption(cfg, \"FORBID_ATTR\", clone({}), { transform: transformCaseFunc });\n\t\tUSE_PROFILES = objectHasOwnProperty(cfg, \"USE_PROFILES\") ? cfg.USE_PROFILES && typeof cfg.USE_PROFILES === \"object\" ? clone(cfg.USE_PROFILES) : cfg.USE_PROFILES : false;\n\t\tALLOW_ARIA_ATTR = cfg.ALLOW_ARIA_ATTR !== false;\n\t\tALLOW_DATA_ATTR = cfg.ALLOW_DATA_ATTR !== false;\n\t\tALLOW_UNKNOWN_PROTOCOLS = cfg.ALLOW_UNKNOWN_PROTOCOLS || false;\n\t\tALLOW_SELF_CLOSE_IN_ATTR = cfg.ALLOW_SELF_CLOSE_IN_ATTR !== false;\n\t\tSAFE_FOR_TEMPLATES = cfg.SAFE_FOR_TEMPLATES || false;\n\t\tSAFE_FOR_XML = cfg.SAFE_FOR_XML !== false;\n\t\tWHOLE_DOCUMENT = cfg.WHOLE_DOCUMENT || false;\n\t\tRETURN_DOM = cfg.RETURN_DOM || false;\n\t\tRETURN_DOM_FRAGMENT = cfg.RETURN_DOM_FRAGMENT || false;\n\t\tRETURN_TRUSTED_TYPE = cfg.RETURN_TRUSTED_TYPE || false;\n\t\tFORCE_BODY = cfg.FORCE_BODY || false;\n\t\tSANITIZE_DOM = cfg.SANITIZE_DOM !== false;\n\t\tSANITIZE_NAMED_PROPS = cfg.SANITIZE_NAMED_PROPS || false;\n\t\tKEEP_CONTENT = cfg.KEEP_CONTENT !== false;\n\t\tIN_PLACE = cfg.IN_PLACE || false;\n\t\tIS_ALLOWED_URI$1 = isRegex(cfg.ALLOWED_URI_REGEXP) ? cfg.ALLOWED_URI_REGEXP : IS_ALLOWED_URI;\n\t\tNAMESPACE = typeof cfg.NAMESPACE === \"string\" ? cfg.NAMESPACE : HTML_NAMESPACE;\n\t\tMATHML_TEXT_INTEGRATION_POINTS = _resolveObjectOption(cfg, \"MATHML_TEXT_INTEGRATION_POINTS\", () => addToSet({}, DEFAULT_MATHML_TEXT_INTEGRATION_POINTS));\n\t\tHTML_INTEGRATION_POINTS = _resolveObjectOption(cfg, \"HTML_INTEGRATION_POINTS\", () => addToSet({}, DEFAULT_HTML_INTEGRATION_POINTS));\n\t\tconst customElementHandling = _resolveObjectOption(cfg, \"CUSTOM_ELEMENT_HANDLING\", () => create(null));\n\t\tCUSTOM_ELEMENT_HANDLING = create(null);\n\t\tif (objectHasOwnProperty(customElementHandling, \"tagNameCheck\") && isRegexOrFunction(customElementHandling.tagNameCheck)) CUSTOM_ELEMENT_HANDLING.tagNameCheck = customElementHandling.tagNameCheck;\n\t\tif (objectHasOwnProperty(customElementHandling, \"attributeNameCheck\") && isRegexOrFunction(customElementHandling.attributeNameCheck)) CUSTOM_ELEMENT_HANDLING.attributeNameCheck = customElementHandling.attributeNameCheck;\n\t\tif (objectHasOwnProperty(customElementHandling, \"allowCustomizedBuiltInElements\") && typeof customElementHandling.allowCustomizedBuiltInElements === \"boolean\") CUSTOM_ELEMENT_HANDLING.allowCustomizedBuiltInElements = customElementHandling.allowCustomizedBuiltInElements;\n\t\tseal(CUSTOM_ELEMENT_HANDLING);\n\t\tif (SAFE_FOR_TEMPLATES) ALLOW_DATA_ATTR = false;\n\t\tif (RETURN_DOM_FRAGMENT) RETURN_DOM = true;\n\t\tif (USE_PROFILES) {\n\t\t\tALLOWED_TAGS = addToSet({}, text);\n\t\t\tALLOWED_ATTR = create(null);\n\t\t\tif (USE_PROFILES.html === true) {\n\t\t\t\taddToSet(ALLOWED_TAGS, html$1);\n\t\t\t\taddToSet(ALLOWED_ATTR, html);\n\t\t\t}\n\t\t\tif (USE_PROFILES.svg === true) {\n\t\t\t\taddToSet(ALLOWED_TAGS, svg$1);\n\t\t\t\taddToSet(ALLOWED_ATTR, svg);\n\t\t\t\taddToSet(ALLOWED_ATTR, xml);\n\t\t\t}\n\t\t\tif (USE_PROFILES.svgFilters === true) {\n\t\t\t\taddToSet(ALLOWED_TAGS, svgFilters);\n\t\t\t\taddToSet(ALLOWED_ATTR, svg);\n\t\t\t\taddToSet(ALLOWED_ATTR, xml);\n\t\t\t}\n\t\t\tif (USE_PROFILES.mathMl === true) {\n\t\t\t\taddToSet(ALLOWED_TAGS, mathMl$1);\n\t\t\t\taddToSet(ALLOWED_ATTR, mathMl);\n\t\t\t\taddToSet(ALLOWED_ATTR, xml);\n\t\t\t}\n\t\t}\n\t\tEXTRA_ELEMENT_HANDLING.tagCheck = null;\n\t\tEXTRA_ELEMENT_HANDLING.attributeCheck = null;\n\t\tif (objectHasOwnProperty(cfg, \"ADD_TAGS\")) {\n\t\t\tif (typeof cfg.ADD_TAGS === \"function\") EXTRA_ELEMENT_HANDLING.tagCheck = cfg.ADD_TAGS;\n\t\t\telse if (arrayIsArray(cfg.ADD_TAGS)) {\n\t\t\t\tif (ALLOWED_TAGS === DEFAULT_ALLOWED_TAGS) ALLOWED_TAGS = clone(ALLOWED_TAGS);\n\t\t\t\taddToSet(ALLOWED_TAGS, cfg.ADD_TAGS, transformCaseFunc);\n\t\t\t}\n\t\t}\n\t\tif (objectHasOwnProperty(cfg, \"ADD_ATTR\")) {\n\t\t\tif (typeof cfg.ADD_ATTR === \"function\") EXTRA_ELEMENT_HANDLING.attributeCheck = cfg.ADD_ATTR;\n\t\t\telse if (arrayIsArray(cfg.ADD_ATTR)) {\n\t\t\t\tif (ALLOWED_ATTR === DEFAULT_ALLOWED_ATTR) ALLOWED_ATTR = clone(ALLOWED_ATTR);\n\t\t\t\taddToSet(ALLOWED_ATTR, cfg.ADD_ATTR, transformCaseFunc);\n\t\t\t}\n\t\t}\n\t\tif (objectHasOwnProperty(cfg, \"ADD_FORBID_CONTENTS\") && arrayIsArray(cfg.ADD_FORBID_CONTENTS)) {\n\t\t\tif (FORBID_CONTENTS === DEFAULT_FORBID_CONTENTS) FORBID_CONTENTS = clone(FORBID_CONTENTS);\n\t\t\taddToSet(FORBID_CONTENTS, cfg.ADD_FORBID_CONTENTS, transformCaseFunc);\n\t\t}\n\t\tif (KEEP_CONTENT) ALLOWED_TAGS[\"#text\"] = true;\n\t\tif (WHOLE_DOCUMENT) addToSet(ALLOWED_TAGS, [\n\t\t\t\"html\",\n\t\t\t\"head\",\n\t\t\t\"body\"\n\t\t]);\n\t\tif (ALLOWED_TAGS.table) {\n\t\t\taddToSet(ALLOWED_TAGS, [\"tbody\"]);\n\t\t\tdelete FORBID_TAGS.tbody;\n\t\t}\n\t\tif (cfg.TRUSTED_TYPES_POLICY) {\n\t\t\tif (typeof cfg.TRUSTED_TYPES_POLICY.createHTML !== \"function\") throw typeErrorCreate(\"TRUSTED_TYPES_POLICY configuration option must provide a \\\"createHTML\\\" hook.\");\n\t\t\tif (typeof cfg.TRUSTED_TYPES_POLICY.createScriptURL !== \"function\") throw typeErrorCreate(\"TRUSTED_TYPES_POLICY configuration option must provide a \\\"createScriptURL\\\" hook.\");\n\t\t\tconst previousTrustedTypesPolicy = trustedTypesPolicy;\n\t\t\ttrustedTypesPolicy = cfg.TRUSTED_TYPES_POLICY;\n\t\t\ttry {\n\t\t\t\temptyHTML = _createTrustedHTML(\"\");\n\t\t\t} catch (error) {\n\t\t\t\ttrustedTypesPolicy = previousTrustedTypesPolicy;\n\t\t\t\tthrow error;\n\t\t\t}\n\t\t} else if (cfg.TRUSTED_TYPES_POLICY === null) {\n\t\t\ttrustedTypesPolicy = void 0;\n\t\t\temptyHTML = \"\";\n\t\t} else {\n\t\t\tif (trustedTypesPolicy === void 0) trustedTypesPolicy = _getDefaultTrustedTypesPolicy();\n\t\t\tif (trustedTypesPolicy && typeof emptyHTML === \"string\") emptyHTML = _createTrustedHTML(\"\");\n\t\t}\n\t\tif (freeze) freeze(cfg);\n\t\tCONFIG = cfg;\n\t};\n\tconst ALL_SVG_TAGS = addToSet({}, [\n\t\t...svg$1,\n\t\t...svgFilters,\n\t\t...svgDisallowed\n\t]);\n\tconst ALL_MATHML_TAGS = addToSet({}, [...mathMl$1, ...mathMlDisallowed]);\n\t/**\n\t* Namespace rules for an element in the SVG namespace.\n\t*\n\t* @param tagName the element's lowercase tag name\n\t* @param parent the (possibly simulated) parent node\n\t* @param parentTagName the parent's lowercase tag name\n\t* @returns true if a spec-compliant parser could produce this element\n\t*/\n\tconst _checkSvgNamespace = function _checkSvgNamespace(tagName, parent, parentTagName) {\n\t\tif (parent.namespaceURI === HTML_NAMESPACE) return tagName === \"svg\";\n\t\tif (parent.namespaceURI === MATHML_NAMESPACE) return tagName === \"svg\" && (parentTagName === \"annotation-xml\" || MATHML_TEXT_INTEGRATION_POINTS[parentTagName]);\n\t\treturn Boolean(ALL_SVG_TAGS[tagName]);\n\t};\n\t/**\n\t* Namespace rules for an element in the MathML namespace.\n\t*\n\t* @param tagName the element's lowercase tag name\n\t* @param parent the (possibly simulated) parent node\n\t* @param parentTagName the parent's lowercase tag name\n\t* @returns true if a spec-compliant parser could produce this element\n\t*/\n\tconst _checkMathMlNamespace = function _checkMathMlNamespace(tagName, parent, parentTagName) {\n\t\tif (parent.namespaceURI === HTML_NAMESPACE) return tagName === \"math\";\n\t\tif (parent.namespaceURI === SVG_NAMESPACE) return tagName === \"math\" && HTML_INTEGRATION_POINTS[parentTagName];\n\t\treturn Boolean(ALL_MATHML_TAGS[tagName]);\n\t};\n\t/**\n\t* Namespace rules for an element in the HTML namespace.\n\t*\n\t* @param tagName the element's lowercase tag name\n\t* @param parent the (possibly simulated) parent node\n\t* @param parentTagName the parent's lowercase tag name\n\t* @returns true if a spec-compliant parser could produce this element\n\t*/\n\tconst _checkHtmlNamespace = function _checkHtmlNamespace(tagName, parent, parentTagName) {\n\t\tif (parent.namespaceURI === SVG_NAMESPACE && !HTML_INTEGRATION_POINTS[parentTagName]) return false;\n\t\tif (parent.namespaceURI === MATHML_NAMESPACE && !MATHML_TEXT_INTEGRATION_POINTS[parentTagName]) return false;\n\t\treturn !ALL_MATHML_TAGS[tagName] && (COMMON_SVG_AND_HTML_ELEMENTS[tagName] || !ALL_SVG_TAGS[tagName]);\n\t};\n\t/**\n\t* @param element a DOM element whose namespace is being checked\n\t* @returns Return false if the element has a\n\t* namespace that a spec-compliant parser would never\n\t* return. Return true otherwise.\n\t*/\n\tconst _checkValidNamespace = function _checkValidNamespace(element) {\n\t\tlet parent = getParentNode(element);\n\t\tif (!parent || !parent.tagName) parent = {\n\t\t\tnamespaceURI: NAMESPACE,\n\t\t\ttagName: \"template\"\n\t\t};\n\t\tconst tagName = stringToLowerCase(element.tagName);\n\t\tconst parentTagName = stringToLowerCase(parent.tagName);\n\t\tif (!ALLOWED_NAMESPACES[element.namespaceURI]) return false;\n\t\tif (element.namespaceURI === SVG_NAMESPACE) return _checkSvgNamespace(tagName, parent, parentTagName);\n\t\tif (element.namespaceURI === MATHML_NAMESPACE) return _checkMathMlNamespace(tagName, parent, parentTagName);\n\t\tif (element.namespaceURI === HTML_NAMESPACE) return _checkHtmlNamespace(tagName, parent, parentTagName);\n\t\tif (PARSER_MEDIA_TYPE === \"application/xhtml+xml\" && ALLOWED_NAMESPACES[element.namespaceURI]) return true;\n\t\treturn false;\n\t};\n\t/**\n\t* _forceRemove\n\t*\n\t* @param node a DOM node\n\t*/\n\tconst _forceRemove = function _forceRemove(node) {\n\t\tarrayPush(DOMPurify.removed, { element: node });\n\t\ttry {\n\t\t\tgetParentNode(node).removeChild(node);\n\t\t} catch (_) {\n\t\t\tremove(node);\n\t\t\tif (!getParentNode(node)) throw typeErrorCreate(\"a node selected for removal could not be detached from its tree and cannot be safely returned; refusing to sanitize in place\");\n\t\t}\n\t};\n\t/**\n\t* _stripAttributeNode\n\t*\n\t* Remove a single Attr node case/namespace-exactly on an attribute-teardown\n\t* path. Name-based removeAttribute() ASCII-lowercases its lookup key for an\n\t* HTML element in an HTML document and so silently misses a case-preserved\n\t* handler (e.g. `ONERROR` off an XML/XHTML import) - the same defect\n\t* _removeAttribute() was fixed for, which a name-based call would reintroduce\n\t* on these IN_PLACE teardown paths. Unlike _removeAttribute this does not\n\t* record into DOMPurify.removed: the neutralize passes intentionally do not\n\t* book-keep. A clobbered/detached node falls back to best-effort name-based\n\t* removal.\n\t*\n\t* @param element the element to strip the attribute from\n\t* @param attribute the Attr node to remove\n\t* @param name the attribute's name, for the fallback path\n\t*/\n\tconst _stripAttributeNode = function _stripAttributeNode(element, attribute, name) {\n\t\ttry {\n\t\t\tremoveAttributeNode(element, attribute);\n\t\t} catch (_) {\n\t\t\ttry {\n\t\t\t\telement.removeAttribute(name);\n\t\t\t} catch (_) {}\n\t\t}\n\t};\n\t/**\n\t* _neutralizeRoot\n\t*\n\t* Fail-closed teardown of an in-place root after the sanitize walk aborts\n\t* (campaign-3 F2). An internal throw mid-walk — e.g. a page-registered\n\t* custom element's reaction detaches a node so `_forceRemove`'s deliberate\n\t* parentless guard throws, or any other re-entrant engine mutation — would\n\t* otherwise leave the caller's *live* tree half-sanitized, with everything\n\t* after the abort point still carrying its handlers. There is no safe way\n\t* to resume the walk (the tree mutated under us), so we strip the root bare:\n\t* remove every child and every attribute, then let the caller's catch see\n\t* the original error. Clobber-safe (cached `remove`/`childNodes`/`attributes`\n\t* getters; the root was already clobber-pre-flighted at the IN_PLACE entry).\n\t*\n\t* @param root the in-place root to empty\n\t*/\n\tconst _neutralizeRoot = function _neutralizeRoot(root) {\n\t\t_neutralizeSubtree(root);\n\t\tconst childNodes = getChildNodes(root);\n\t\tif (childNodes) {\n\t\t\tconst snapshot = [];\n\t\t\tarrayForEach(childNodes, (child) => {\n\t\t\t\tarrayPush(snapshot, child);\n\t\t\t});\n\t\t\tarrayForEach(snapshot, (child) => {\n\t\t\t\ttry {\n\t\t\t\t\tremove(child);\n\t\t\t\t} catch (_) {}\n\t\t\t});\n\t\t}\n\t\tconst attributes = getAttributes(root);\n\t\tif (attributes) for (let i = attributes.length - 1; i >= 0; --i) {\n\t\t\tconst attribute = attributes[i];\n\t\t\tconst name = attribute && attribute.name;\n\t\t\tif (typeof name === \"string\") _stripAttributeNode(root, attribute, name);\n\t\t}\n\t};\n\t/**\n\t* _removeAttribute\n\t*\n\t* Name-based getAttributeNode()/removeAttribute() ASCII-lowercase their\n\t* lookup key for HTML elements in an HTML document, so they silently miss an\n\t* attribute whose stored qualified name still contains uppercase ASCII\n\t* letters. That happens when the node came from a case-preserving source\n\t* (an XML/XHTML document imported via importNode(), or createAttributeNS()),\n\t* where e.g. `ONERROR` survives the walk: the policy check lowercases to\n\t* `onerror` and rejects it, but `removeAttribute('ONERROR')` looks up\n\t* `onerror` and finds nothing. Remove the exact Attr node instead, which is\n\t* case- and namespace-exact, and fall back to name-based removal only when\n\t* the caller could not supply the node.\n\t*\n\t* @param name an Attribute name\n\t* @param element a DOM node\n\t* @param attr the exact Attr node to remove, when the caller has it\n\t*/\n\tconst _removeAttribute = function _removeAttribute(name, element, attr) {\n\t\tif (!attr) try {\n\t\t\tattr = element.getAttributeNode(name);\n\t\t} catch (_) {\n\t\t\tattr = null;\n\t\t}\n\t\tarrayPush(DOMPurify.removed, {\n\t\t\tattribute: attr || null,\n\t\t\tfrom: element\n\t\t});\n\t\ttry {\n\t\t\tif (attr) removeAttributeNode(element, attr);\n\t\t\telse element.removeAttribute(name);\n\t\t} catch (_) {\n\t\t\ttry {\n\t\t\t\telement.removeAttribute(name);\n\t\t\t} catch (_) {}\n\t\t}\n\t\tif (name === \"is\") {\n\t\t\tif (RETURN_DOM || RETURN_DOM_FRAGMENT) try {\n\t\t\t\t_forceRemove(element);\n\t\t\t} catch (_) {}\n\t\t\telse try {\n\t\t\t\telement.setAttribute(name, \"\");\n\t\t\t} catch (_) {}\n\t\t}\n\t};\n\t/**\n\t* _stripDisallowedAttributes\n\t*\n\t* Removes every attribute the active configuration does not allow from a\n\t* single element, using the same allowlist as the main attribute pass (so\n\t* `on*` handlers go, but no `/^on/` blocklist is introduced). Used only to\n\t* neutralise nodes that are being discarded from an in-place tree.\n\t*\n\t* @param element the element to strip\n\t*/\n\tconst _stripDisallowedAttributes = function _stripDisallowedAttributes(element) {\n\t\tconst attributes = getAttributes(element);\n\t\tif (!attributes) return;\n\t\tfor (let i = attributes.length - 1; i >= 0; --i) {\n\t\t\tconst attribute = attributes[i];\n\t\t\tconst name = attribute && attribute.name;\n\t\t\tif (typeof name !== \"string\" || ALLOWED_ATTR[transformCaseFunc(name)]) continue;\n\t\t\t_stripAttributeNode(element, attribute, name);\n\t\t}\n\t};\n\t/**\n\t* _neutralizeSubtree\n\t*\n\t* Completes the audit-5 F1 fix across every removal path. The KEEP_CONTENT\n\t* move-hoist neutralises only disallowed-tag removals; clobber, mXSS-canary,\n\t* namespace, comment, processing-instruction and KEEP_CONTENT:false removals\n\t* all drop their subtree wholesale via `_forceRemove`. On the IN_PLACE path\n\t* those dropped nodes are detached from the caller's LIVE tree but a\n\t* handler-bearing original among them (an `<img onerror>`/`<video>` that was\n\t* loading) keeps its queued resource event, which fires in page scope after\n\t* sanitize returns. This walks a removed subtree and strips every attribute\n\t* the active configuration does not allow — so `on*` handlers are cancelled\n\t* through the SAME allowlist that governs kept nodes, not a separate `/^on/`\n\t* blocklist. Run synchronously before sanitize returns, i.e. before any\n\t* queued event can fire. Hook-free by design: these nodes leave the output,\n\t* so firing attribute hooks for them would be surprising. Clobber-safe reads;\n\t* a doomed clobbered node may shadow `removeAttribute` (its own attributes are\n\t* irrelevant — it is discarded — while its non-clobbered descendants, e.g.\n\t* the `<img>`, are reached and scrubbed).\n\t*\n\t* @param root the root of a removed subtree to neutralise\n\t*/\n\tconst _neutralizeSubtree = function _neutralizeSubtree(root) {\n\t\tconst stack = [root];\n\t\twhile (stack.length > 0) {\n\t\t\tconst node = stack.pop();\n\t\t\tif (_readNodeType(node) === NODE_TYPE.element) _stripDisallowedAttributes(node);\n\t\t\tconst childNodes = getChildNodes(node);\n\t\t\tif (childNodes) for (let i = childNodes.length - 1; i >= 0; --i) stack.push(childNodes[i]);\n\t\t}\n\t};\n\t/**\n\t* _neutralizePatchLinkage\n\t*\n\t* IN_PLACE entry pre-pass (declarative-partial-updates / streaming\n\t* hardening, https://github.com/WICG/declarative-partial-updates).\n\t*\n\t* The main walk strips patch linkage (`for`/`patchsrc`) and removes range\n\t* markers (PIs / markup comments) node-by-node, in document order, AS it\n\t* reaches each node. On a live in-place root that leaves a window: from the\n\t* moment the root is connected until the walk arrives at a given node, that\n\t* node's linkage is live. A patch applied on connection/stream can fire as\n\t* a microtask during the walk and inject or teleport an unsanitized DOM\n\t* range into a region the iterator has already passed and will not revisit,\n\t* so the post-return \"tree is sanitized\" contract is violated. Sweep the\n\t* whole tree once up front and sever every linkage before the walk begins,\n\t* closing that window.\n\t*\n\t* This CANNOT undo a patch that already fired before sanitize ran — that is\n\t* the irreducible \"do not IN_PLACE a live-connected attacker tree\" caveat —\n\t* but it closes everything from sanitize-start onward. Gated on SAFE_FOR_XML\n\t* to group with the rest of the declarative-partial-updates handling and\n\t* stay overridable, consistent with the codebase.\n\t*\n\t* Clobber-safe traversal (cached childNodes getter); per-node try/catch so a\n\t* clobbered root cannot defeat the sweep of its non-clobbered descendants.\n\t*\n\t* NOTE (pending real-Chrome confirmation, see test/declarative-patch-probe\n\t* .html Q1): this mirrors the existing policy of keeping `for` on\n\t* <label>/<output>. If the shipping feature can drive a patch through a\n\t* surviving `for`-on-label/output + `id` pair, this pre-pass and the\n\t* attribute check at _isBasicCustomElement's caller must additionally drop\n\t* that pair on the IN_PLACE path. Left as-is until the taxonomy is verified.\n\t*\n\t* @param root the in-place root to sweep\n\t*/\n\t/**\n\t* Central policy for declarative-partial-updates patch-linkage attributes,\n\t* shared by the _neutralizePatchLinkage pre-pass and _isValidAttribute so\n\t* the two sites cannot drift: `patchsrc` always links, `for` links\n\t* everywhere except on <label>/<output>, and the whole policy is gated on\n\t* SAFE_FOR_XML (see the rationale block in _isValidAttribute).\n\t*\n\t* @param lcName the transformCaseFunc'd attribute name\n\t* @param lcTag the transformCaseFunc'd tag name of the carrying element\n\t* @return true if the attribute is patch linkage and must be dropped\n\t*/\n\tconst _isPatchLinkageAttribute = function _isPatchLinkageAttribute(lcName, lcTag) {\n\t\tif (!SAFE_FOR_XML) return false;\n\t\tif (lcName === \"patchsrc\") return true;\n\t\treturn lcName === \"for\" && lcTag !== \"label\" && lcTag !== \"output\";\n\t};\n\tconst _neutralizePatchLinkage = function _neutralizePatchLinkage(root) {\n\t\tif (!SAFE_FOR_XML) return;\n\t\tconst stack = [root];\n\t\twhile (stack.length > 0) {\n\t\t\tconst node = stack.pop();\n\t\t\tconst nodeType = _readNodeType(node);\n\t\t\tif (nodeType === NODE_TYPE.processingInstruction || nodeType === NODE_TYPE.comment && regExpTest(COMMENT_MARKUP_PROBE, node.data)) {\n\t\t\t\ttry {\n\t\t\t\t\tremove(node);\n\t\t\t\t} catch (_) {}\n\t\t\t\tcontinue;\n\t\t\t}\n\t\t\tif (nodeType === NODE_TYPE.element) {\n\t\t\t\tconst element = node;\n\t\t\t\tconst lcTag = transformCaseFunc(_readNodeName(node));\n\t\t\t\ttry {\n\t\t\t\t\tif (element.hasAttribute && element.hasAttribute(\"patchsrc\")) element.removeAttribute(\"patchsrc\");\n\t\t\t\t\tif (element.hasAttribute && element.hasAttribute(\"for\") && _isPatchLinkageAttribute(\"for\", lcTag)) element.removeAttribute(\"for\");\n\t\t\t\t} catch (_) {}\n\t\t\t}\n\t\t\tconst childNodes = getChildNodes(node);\n\t\t\tif (childNodes) for (let i = childNodes.length - 1; i >= 0; --i) stack.push(childNodes[i]);\n\t\t}\n\t};\n\t/**\n\t* _initDocument\n\t*\n\t* @param dirty - a string of dirty markup\n\t* @return a DOM, filled with the dirty markup\n\t*/\n\tconst _initDocument = function _initDocument(dirty) {\n\t\tlet doc = null;\n\t\tlet leadingWhitespace = null;\n\t\tif (FORCE_BODY) dirty = \"<remove></remove>\" + dirty;\n\t\telse {\n\t\t\tconst matches = stringMatch(dirty, /^[\\r\\n\\t ]+/);\n\t\t\tleadingWhitespace = matches && matches[0];\n\t\t}\n\t\tif (PARSER_MEDIA_TYPE === \"application/xhtml+xml\" && NAMESPACE === HTML_NAMESPACE) dirty = \"<html xmlns=\\\"http://www.w3.org/1999/xhtml\\\"><head></head><body>\" + dirty + \"</body></html>\";\n\t\tconst dirtyPayload = trustedTypesPolicy ? _createTrustedHTML(dirty) : dirty;\n\t\tif (NAMESPACE === HTML_NAMESPACE) try {\n\t\t\tdoc = new DOMParser().parseFromString(dirtyPayload, PARSER_MEDIA_TYPE);\n\t\t} catch (_) {}\n\t\tif (!doc || !doc.documentElement) {\n\t\t\tdoc = implementation.createDocument(NAMESPACE, \"template\", null);\n\t\t\ttry {\n\t\t\t\tdoc.documentElement.innerHTML = IS_EMPTY_INPUT ? emptyHTML : dirtyPayload;\n\t\t\t} catch (_) {}\n\t\t}\n\t\tconst body = doc.body || doc.documentElement;\n\t\tif (dirty && leadingWhitespace) body.insertBefore(document.createTextNode(leadingWhitespace), body.childNodes[0] || null);\n\t\tif (NAMESPACE === HTML_NAMESPACE) return getElementsByTagName.call(doc, WHOLE_DOCUMENT ? \"html\" : \"body\")[0];\n\t\treturn WHOLE_DOCUMENT ? doc.documentElement : body;\n\t};\n\t/**\n\t* Creates a NodeIterator object that you can use to traverse filtered lists of nodes or elements in a document.\n\t*\n\t* @param root The root element or node to start traversing on.\n\t* @return The created NodeIterator\n\t*/\n\tconst _createNodeIterator = function _createNodeIterator(root) {\n\t\tconst doc = getOwnerDocument ? getOwnerDocument(root) : root.ownerDocument;\n\t\treturn createNodeIterator.call(doc || root, root, NodeFilter.SHOW_ELEMENT | NodeFilter.SHOW_COMMENT | NodeFilter.SHOW_TEXT | NodeFilter.SHOW_PROCESSING_INSTRUCTION | NodeFilter.SHOW_CDATA_SECTION, null);\n\t};\n\t/**\n\t* Replace template expression syntax (mustache, ERB, template\n\t* literal) with a space; shared by all SAFE_FOR_TEMPLATES scrub\n\t* sites. Order matters: mustache, then ERB, then template literal.\n\t*\n\t* @param value the string to scrub\n\t* @returns the scrubbed string\n\t*/\n\tconst _stripTemplateExpressions = function _stripTemplateExpressions(value) {\n\t\tvalue = stringReplace(value, MUSTACHE_EXPR$1, \" \");\n\t\tvalue = stringReplace(value, ERB_EXPR$1, \" \");\n\t\tvalue = stringReplace(value, TMPLIT_EXPR$1, \" \");\n\t\treturn value;\n\t};\n\t/**\n\t* Strip template-engine expressions ({{...}}, ${...}, <%...%>) from the\n\t* character data of an element subtree. Used as the final safety net for\n\t* SAFE_FOR_TEMPLATES on every DOM-returning code path so that expressions\n\t* which only form after text-node normalization (e.g. fragments split across\n\t* stripped elements) cannot survive into a template-evaluating framework.\n\t*\n\t* Walks text/comment/CDATA/processing-instruction nodes and mutates `.data`\n\t* in place rather than round-tripping through innerHTML. This preserves\n\t* descendant node references (important for IN_PLACE callers), avoids a\n\t* serialize/reparse cycle, and reads literal character data — which means\n\t* `<%...%>` in text content matches the ERB regex against its real bytes\n\t* instead of the HTML-entity-escaped form innerHTML would produce.\n\t*\n\t* Attribute values are not visited here; SAFE_FOR_TEMPLATES handling for\n\t* attributes is performed during the per-node `_sanitizeAttributes` pass.\n\t*\n\t* @param node The root element whose character data should be scrubbed.\n\t*/\n\tconst _scrubTemplateExpressions2 = function _scrubTemplateExpressions(node) {\n\t\tvar _node$querySelectorAl;\n\t\tnode.normalize();\n\t\tconst doc = getOwnerDocument ? getOwnerDocument(node) : node.ownerDocument;\n\t\tconst walker = createNodeIterator.call(doc || node, node, NodeFilter.SHOW_TEXT | NodeFilter.SHOW_COMMENT | NodeFilter.SHOW_CDATA_SECTION | NodeFilter.SHOW_PROCESSING_INSTRUCTION, null);\n\t\tlet currentNode = walker.nextNode();\n\t\twhile (currentNode) {\n\t\t\tcurrentNode.data = _stripTemplateExpressions(currentNode.data);\n\t\t\tcurrentNode = walker.nextNode();\n\t\t}\n\t\tconst templates = (_node$querySelectorAl = node.querySelectorAll) === null || _node$querySelectorAl === void 0 ? void 0 : _node$querySelectorAl.call(node, \"template\");\n\t\tif (templates) arrayForEach(templates, (tmpl) => {\n\t\t\tif (_isDocumentFragment(tmpl.content)) _scrubTemplateExpressions2(tmpl.content);\n\t\t});\n\t};\n\t/**\n\t* _isClobbered\n\t*\n\t* Detect DOM-clobbering on HTMLFormElement nodes. Form is the only HTML\n\t* interface with [LegacyOverrideBuiltIns]; a descendant element with a\n\t* `name` attribute matching a prototype property shadows that property\n\t* on direct reads. We use this check at the IN_PLACE entry-point and\n\t* during attribute sanitization to refuse clobbered forms.\n\t*\n\t* @param element element to check for clobbering attacks\n\t* @return true if clobbered, false if safe\n\t*/\n\tconst _isClobbered = function _isClobbered(element) {\n\t\tconst realTagName = getNodeName ? getNodeName(element) : null;\n\t\tif (typeof realTagName !== \"string\") return false;\n\t\tif (transformCaseFunc(realTagName) !== \"form\") return false;\n\t\treturn typeof element.nodeName !== \"string\" || typeof element.textContent !== \"string\" || typeof element.removeChild !== \"function\" || element.attributes !== getAttributes(element) || typeof element.removeAttribute !== \"function\" || typeof element.removeAttributeNode !== \"function\" || typeof element.getAttributeNode !== \"function\" || typeof element.setAttribute !== \"function\" || typeof element.namespaceURI !== \"string\" || typeof element.insertBefore !== \"function\" || typeof element.hasChildNodes !== \"function\" || element.nodeType !== getNodeType(element) || element.childNodes !== getChildNodes(element);\n\t};\n\t/**\n\t* Checks whether the given value is a DocumentFragment from any realm.\n\t*\n\t* The realm-independent replacement reads `nodeType` through the cached\n\t* Node.prototype getter and compares to the DOCUMENT_FRAGMENT_NODE\n\t* constant (11). nodeType is a numeric value resolved from the node's\n\t* internal slot, identical across realms for the same kind of node.\n\t*\n\t* @param value object to check\n\t* @return true if value is a DocumentFragment-shaped node from any realm\n\t*/\n\tconst _isDocumentFragment = function _isDocumentFragment(value) {\n\t\tif (!getNodeType || typeof value !== \"object\" || value === null) return false;\n\t\ttry {\n\t\t\treturn getNodeType(value) === NODE_TYPE.documentFragment;\n\t\t} catch (_) {\n\t\t\treturn false;\n\t\t}\n\t};\n\t/**\n\t* Checks whether the given object is a DOM node, including nodes that\n\t* originate from a different window/realm (e.g. an iframe's\n\t* contentDocument). The previous `value instanceof Node` check was\n\t* realm-bound: nodes from a different window failed it, causing\n\t* sanitize() to silently stringify them and reset IN_PLACE to false,\n\t* returning the original node unsanitized. See GHSA-4w3q-35jp-p934.\n\t*\n\t* @param value object to check whether it's a DOM node\n\t* @return true if value is a DOM node from any realm\n\t*/\n\tconst _isNode = function _isNode(value) {\n\t\tif (!getNodeType || typeof value !== \"object\" || value === null) return false;\n\t\ttry {\n\t\t\treturn typeof getNodeType(value) === \"number\";\n\t\t} catch (_) {\n\t\t\treturn false;\n\t\t}\n\t};\n\tfunction _executeHooks(hooks, currentNode, data) {\n\t\tif (hooks.length === 0) return;\n\t\tarrayForEach(hooks, (hook) => {\n\t\t\thook.call(DOMPurify, currentNode, data, CONFIG);\n\t\t});\n\t}\n\t/**\n\t* Structural-threat checks that condemn a node regardless of the\n\t* allowlists: mXSS via namespace confusion, risky CSS construction,\n\t* processing instructions, markup-bearing comments. Pure predicate;\n\t* the caller removes. Check order is load-bearing.\n\t*\n\t* @param currentNode the node to inspect\n\t* @param tagName the node's transformCaseFunc'd tag name\n\t* @return true if the node must be removed\n\t*/\n\tconst _isUnsafeNode = function _isUnsafeNode(currentNode, tagName) {\n\t\tif (SAFE_FOR_XML && currentNode.hasChildNodes() && !_isNode(currentNode.firstElementChild) && regExpTest(ELEMENT_MARKUP_PROBE, currentNode.textContent) && regExpTest(ELEMENT_MARKUP_PROBE, currentNode.innerHTML)) return true;\n\t\tif (SAFE_FOR_XML && currentNode.namespaceURI === HTML_NAMESPACE && LITERAL_TEXT_ELEMENTS[tagName] && (_isNode(currentNode.firstElementChild) || typeof currentNode.textContent === \"string\" && regExpTest(LITERAL_TEXT_CLOSE[tagName], currentNode.textContent))) return true;\n\t\tif (currentNode.nodeType === NODE_TYPE.processingInstruction) return true;\n\t\tif (SAFE_FOR_XML && currentNode.nodeType === NODE_TYPE.comment && regExpTest(COMMENT_MARKUP_PROBE, currentNode.data)) return true;\n\t\treturn false;\n\t};\n\t/**\n\t* Evaluate a CUSTOM_ELEMENT_HANDLING check (a RegExp or a predicate\n\t* function, per the validation in _parseConfig) against a name.\n\t* Additional arguments are forwarded to predicate functions - the\n\t* attributeNameCheck predicate receives the tag name as its second\n\t* argument. A null/absent check never matches.\n\t*\n\t* @param check the configured tagNameCheck / attributeNameCheck value\n\t* @param name the name to test\n\t* @param args extra arguments forwarded to a predicate function\n\t* @return true if the check matches the name\n\t*/\n\tconst _matchesNameCheck = function _matchesNameCheck(check, name) {\n\t\tif (check instanceof RegExp) return regExpTest(check, name);\n\t\tif (check instanceof Function) {\n\t\t\tfor (var _len = arguments.length, args = new Array(_len > 2 ? _len - 2 : 0), _key = 2; _key < _len; _key++) args[_key - 2] = arguments[_key];\n\t\t\treturn Boolean(check(name, ...args));\n\t\t}\n\t\treturn false;\n\t};\n\t/**\n\t* Handle a node whose tag is forbidden or not allowlisted: keep\n\t* allowed custom elements (false return exits _sanitizeElements\n\t* early - the namespace and fallback-tag removal checks are\n\t* intentionally skipped for kept custom elements), else hoist\n\t* content per KEEP_CONTENT and remove.\n\t*\n\t* A kept custom element is the ONLY case in which this function\n\t* returns false, so the caller uses that return value to run the\n\t* afterSanitizeElements hook on the kept element and keep the\n\t* element-hook lifecycle consistent with normal allowlisted\n\t* elements (GHSA-c2j3-45gr-mqc4).\n\t*\n\t* @param currentNode the disallowed node\n\t* @param tagName the node's transformCaseFunc'd tag name\n\t* @return true if the node was removed, false if kept\n\t*/\n\tconst _sanitizeDisallowedNode = function _sanitizeDisallowedNode(currentNode, tagName, root) {\n\t\tif (!FORBID_TAGS[tagName] && _isBasicCustomElement(tagName) && _matchesNameCheck(CUSTOM_ELEMENT_HANDLING.tagNameCheck, tagName)) return false;\n\t\tif (KEEP_CONTENT && !FORBID_CONTENTS[tagName]) {\n\t\t\tconst parentNode = getParentNode(currentNode);\n\t\t\tconst childNodes = getChildNodes(currentNode);\n\t\t\tif (childNodes && parentNode) {\n\t\t\t\tconst childCount = childNodes.length;\n\t\t\t\tfor (let i = childCount - 1; i >= 0; --i) {\n\t\t\t\t\tconst hoisted = currentNode === root ? cloneNode(childNodes[i], true) : childNodes[i];\n\t\t\t\t\tparentNode.insertBefore(hoisted, getNextSibling(currentNode));\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\t_forceRemove(currentNode);\n\t\treturn true;\n\t};\n\t/**\n\t* Fork a hook-mutable allowlist off its shared binding the first time a\n\t* (possibly lazily-installed) uponSanitize* hook is about to see it, so the\n\t* hook cannot widen the per-instance default or the setConfig binding by\n\t* reference and leak past the call. Returns the set unchanged once it is\n\t* already call-local, so repeated calls across elements are idempotent.\n\t*\n\t* @param hookList the uponSanitize* hook array for this event\n\t* @param set the current ALLOWED_TAGS / ALLOWED_ATTR binding\n\t* @param defaultSet the per-instance DEFAULT_ALLOWED_* constant\n\t* @param setConfigSet the captured setConfig() binding, or null\n\t* @return a call-local clone if a hook is present and set is still shared,\n\t* else set unchanged\n\t*/\n\tconst _forkSharedAllowlist = function _forkSharedAllowlist(hookList, set, defaultSet, setConfigSet) {\n\t\tif (hookList.length === 0) return set;\n\t\treturn set === defaultSet || set === setConfigSet ? clone(set) : set;\n\t};\n\t/**\n\t* Shared guard for a node that a hook has detached from the walk tree,\n\t* used after each element-hook site in _sanitizeElements. Detaching is a\n\t* long-standing user pattern (issue #469; draw.io-style foreignObject\n\t* filtering). Per the cached, unclobberable parentNode getter the node is\n\t* genuinely out of the tree, so it can reach neither the serialized\n\t* output nor an IN_PLACE live tree; treat it as removed and stop\n\t* processing it. Without this guard, the unsafe-node / namespace checks\n\t* would call _forceRemove on a parentless node and hit the REPORT-3\n\t* fail-closed throw — which exists for nodes DOMPurify wants gone but\n\t* *cannot* detach (clobbered / parentless roots), the opposite of a node\n\t* that is already safely gone. The walk root is exempt: a detached\n\t* IN_PLACE root is legitimate input and must still be fully sanitized,\n\t* and a kill-decision on it must keep hitting the REPORT-3 throw.\n\t*\n\t* Nodes detached by hooks stay the hook's responsibility for placement:\n\t* they are not recorded in DOMPurify.removed, so the post-walk IN_PLACE\n\t* pass (which iterates DOMPurify.removed) does not reach them. But a\n\t* hook-detached subtree can still hold a queued resource-event handler -\n\t* e.g. an <img onload> that began loading when the caller built the live\n\t* tree - which fires in page scope after sanitize returns even though the\n\t* handler never reached the returned tree. That is the audit-5 F1 hazard,\n\t* and the documented node.remove() hook pattern walks straight into it.\n\t* So on the IN_PLACE path we neutralize the detached subtree inline,\n\t* stripping its non-allow-listed attributes before returning, exactly as\n\t* the post-walk pass does for _forceRemove'd subtrees.\n\t*\n\t* @param currentNode the node a hook may have detached\n\t* @param root the current walk root\n\t* @return true if the node is detached and now handled, false otherwise\n\t*/\n\tconst _handleHookDetachedNode = function _handleHookDetachedNode(currentNode, root) {\n\t\tif (currentNode === root || getParentNode(currentNode) !== null) return false;\n\t\tif (IN_PLACE) _neutralizeSubtree(currentNode);\n\t\treturn true;\n\t};\n\t/**\n\t* _sanitizeElements\n\t*\n\t* @protect nodeName\n\t* @protect textContent\n\t* @protect removeChild\n\t* @param currentNode to check for permission to exist\n\t* @return true if node was killed, false if left alive\n\t*/\n\tconst _sanitizeElements = function _sanitizeElements(currentNode, root) {\n\t\t_executeHooks(hooks.beforeSanitizeElements, currentNode, null);\n\t\tif (_handleHookDetachedNode(currentNode, root)) return true;\n\t\tif (_isClobbered(currentNode)) {\n\t\t\t_forceRemove(currentNode);\n\t\t\treturn true;\n\t\t}\n\t\tconst tagName = transformCaseFunc(_readNodeName(currentNode));\n\t\tALLOWED_TAGS = _forkSharedAllowlist(hooks.uponSanitizeElement, ALLOWED_TAGS, DEFAULT_ALLOWED_TAGS, SET_CONFIG_ALLOWED_TAGS);\n\t\t_executeHooks(hooks.uponSanitizeElement, currentNode, {\n\t\t\ttagName,\n\t\t\tallowedTags: ALLOWED_TAGS\n\t\t});\n\t\tif (_handleHookDetachedNode(currentNode, root)) return true;\n\t\tif (_isUnsafeNode(currentNode, tagName)) {\n\t\t\t_forceRemove(currentNode);\n\t\t\treturn true;\n\t\t}\n\t\tif (FORBID_TAGS[tagName] || !(EXTRA_ELEMENT_HANDLING.tagCheck instanceof Function && EXTRA_ELEMENT_HANDLING.tagCheck(tagName)) && !ALLOWED_TAGS[tagName]) {\n\t\t\tconst removed = _sanitizeDisallowedNode(currentNode, tagName, root);\n\t\t\tif (removed === false) {\n\t\t\t\t_executeHooks(hooks.afterSanitizeElements, currentNode, null);\n\t\t\t\tif (_handleHookDetachedNode(currentNode, root)) return true;\n\t\t\t}\n\t\t\treturn removed;\n\t\t}\n\t\tif (_readNodeType(currentNode) === NODE_TYPE.element && !_checkValidNamespace(currentNode)) {\n\t\t\t_forceRemove(currentNode);\n\t\t\treturn true;\n\t\t}\n\t\tif ((tagName === \"noscript\" || tagName === \"noembed\" || tagName === \"noframes\") && regExpTest(FALLBACK_TAG_CLOSE, currentNode.innerHTML)) {\n\t\t\t_forceRemove(currentNode);\n\t\t\treturn true;\n\t\t}\n\t\tif (SAFE_FOR_TEMPLATES && currentNode.nodeType === NODE_TYPE.text) {\n\t\t\tconst content = _stripTemplateExpressions(currentNode.textContent);\n\t\t\tif (currentNode.textContent !== content) {\n\t\t\t\tarrayPush(DOMPurify.removed, { element: currentNode.cloneNode() });\n\t\t\t\tcurrentNode.textContent = content;\n\t\t\t}\n\t\t}\n\t\t_executeHooks(hooks.afterSanitizeElements, currentNode, null);\n\t\treturn _handleHookDetachedNode(currentNode, root);\n\t};\n\t/**\n\t* _isValidAttribute\n\t*\n\t* @param lcTag Lowercase tag name of containing element.\n\t* @param lcName Lowercase attribute name.\n\t* @param value Attribute value.\n\t* @return Returns true if `value` is valid, otherwise false.\n\t*/\n\tconst _isValidAttribute = function _isValidAttribute(lcTag, lcName, value) {\n\t\tif (FORBID_ATTR[lcName]) return false;\n\t\tif (_isPatchLinkageAttribute(lcName, lcTag)) return false;\n\t\tif (SANITIZE_DOM && (lcName === \"id\" || lcName === \"name\") && (value in document || value in formElement)) return false;\n\t\tconst nameIsPermitted = ALLOWED_ATTR[lcName] || EXTRA_ELEMENT_HANDLING.attributeCheck instanceof Function && EXTRA_ELEMENT_HANDLING.attributeCheck(lcName, lcTag);\n\t\tif (ALLOW_DATA_ATTR && regExpTest(DATA_ATTR$1, lcName)) return true;\n\t\tif (ALLOW_ARIA_ATTR && regExpTest(ARIA_ATTR$1, lcName)) return true;\n\t\tif (!nameIsPermitted) return _isBasicCustomElement(lcTag) && _matchesNameCheck(CUSTOM_ELEMENT_HANDLING.tagNameCheck, lcTag) && _matchesNameCheck(CUSTOM_ELEMENT_HANDLING.attributeNameCheck, lcName, lcTag) || lcName === \"is\" && CUSTOM_ELEMENT_HANDLING.allowCustomizedBuiltInElements && _matchesNameCheck(CUSTOM_ELEMENT_HANDLING.tagNameCheck, value);\n\t\tif (URI_SAFE_ATTRIBUTES[lcName]) return true;\n\t\tif (regExpTest(IS_ALLOWED_URI$1, stringReplace(value, ATTR_WHITESPACE$1, \"\"))) return true;\n\t\tif ((lcName === \"src\" || lcName === \"xlink:href\" || lcName === \"href\") && lcTag !== \"script\" && stringIndexOf(value, \"data:\") === 0 && DATA_URI_TAGS[lcTag]) return true;\n\t\tif (ALLOW_UNKNOWN_PROTOCOLS && !regExpTest(IS_SCRIPT_OR_DATA$1, stringReplace(value, ATTR_WHITESPACE$1, \"\"))) return true;\n\t\treturn !value;\n\t};\n\tconst RESERVED_CUSTOM_ELEMENT_NAMES = addToSet({}, [\n\t\t\"annotation-xml\",\n\t\t\"color-profile\",\n\t\t\"font-face\",\n\t\t\"font-face-format\",\n\t\t\"font-face-name\",\n\t\t\"font-face-src\",\n\t\t\"font-face-uri\",\n\t\t\"missing-glyph\"\n\t]);\n\t/**\n\t* _isBasicCustomElement\n\t* checks if at least one dash is included in tagName, and it's not the first char\n\t* for more sophisticated checking see https://github.com/sindresorhus/validate-element-name\n\t*\n\t* @param tagName name of the tag of the node to sanitize\n\t* @returns Returns true if the tag name meets the basic criteria for a custom element, otherwise false.\n\t*/\n\tconst _isBasicCustomElement = function _isBasicCustomElement(tagName) {\n\t\treturn !RESERVED_CUSTOM_ELEMENT_NAMES[stringToLowerCase(tagName)] && regExpTest(CUSTOM_ELEMENT$1, tagName);\n\t};\n\t/**\n\t* Wrap an attribute value in the matching Trusted Types object when\n\t* the active policy requires it. Namespaced attributes pass through\n\t* unchanged (no TT support yet, see\n\t* https://bugs.chromium.org/p/chromium/issues/detail?id=1305293).\n\t*\n\t* @param lcTag lowercase tag name of the containing element\n\t* @param lcName lowercase attribute name\n\t* @param namespaceURI the attribute's namespace, if any\n\t* @param value the attribute value to wrap\n\t* @return the value, wrapped when Trusted Types demand it\n\t*/\n\tconst _applyTrustedTypesToAttribute = function _applyTrustedTypesToAttribute(lcTag, lcName, namespaceURI, value) {\n\t\tif (trustedTypesPolicy && typeof trustedTypes === \"object\" && typeof trustedTypes.getAttributeType === \"function\" && !namespaceURI) switch (trustedTypes.getAttributeType(lcTag, lcName)) {\n\t\t\tcase \"TrustedHTML\": return _createTrustedHTML(value);\n\t\t\tcase \"TrustedScriptURL\": return _createTrustedScriptURL(value);\n\t\t}\n\t\treturn value;\n\t};\n\t/**\n\t* Write a modified attribute value back onto the element. On\n\t* success, re-probe for clobbering introduced by the new value and\n\t* remove the element when found; otherwise, when this writeback is the\n\t* recreate half of the SANITIZE_NAMED_PROPS remove-and-recreate, pop the\n\t* removal entry that path recorded so it does not show as removed. On\n\t* failure, remove the attribute instead.\n\t*\n\t* Returns true only on a clean write (the value was set and the new value\n\t* introduced no clobbering). The caller uses that, together with its own\n\t* knowledge of whether this attribute pushed a DOMPurify.removed record, to\n\t* decide whether to pop that record. The pop must happen ONLY for the\n\t* named-prop remove-and-recreate; popping on any other value change (trim,\n\t* template scrubbing, Trusted Types) would consume an unrelated _forceRemove\n\t* subtree-cleanup record and let that detached subtree keep a live event\n\t* handler through the IN_PLACE neutralization pass (SO-001).\n\t*\n\t* @param currentNode the element carrying the attribute\n\t* @param name the attribute name as present on the element\n\t* @param namespaceURI the attribute's namespace, if any\n\t* @param value the new attribute value\n\t* @return true if the value was written without introducing clobbering\n\t*/\n\tconst _setAttributeValue = function _setAttributeValue(currentNode, name, namespaceURI, value) {\n\t\ttry {\n\t\t\tif (namespaceURI) currentNode.setAttributeNS(namespaceURI, name, value);\n\t\t\telse currentNode.setAttribute(name, value);\n\t\t\tif (_isClobbered(currentNode)) {\n\t\t\t\t_forceRemove(currentNode);\n\t\t\t\treturn false;\n\t\t\t}\n\t\t\treturn true;\n\t\t} catch (_) {\n\t\t\t_removeAttribute(name, currentNode);\n\t\t\treturn false;\n\t\t}\n\t};\n\t/**\n\t* _sanitizeAttributes\n\t*\n\t* @protect attributes\n\t* @protect nodeName\n\t* @protect removeAttribute\n\t* @protect setAttribute\n\t*\n\t* @param currentNode to sanitize\n\t* @param root the current walk root\n\t*/\n\tconst _sanitizeAttributes = function _sanitizeAttributes(currentNode, root) {\n\t\t_executeHooks(hooks.beforeSanitizeAttributes, currentNode, null);\n\t\tif (_handleHookDetachedNode(currentNode, root)) return;\n\t\tconst attributes = currentNode.attributes;\n\t\tif (!attributes || _isClobbered(currentNode)) return;\n\t\tALLOWED_ATTR = _forkSharedAllowlist(hooks.uponSanitizeAttribute, ALLOWED_ATTR, DEFAULT_ALLOWED_ATTR, SET_CONFIG_ALLOWED_ATTR);\n\t\tconst hookEvent = {\n\t\t\tattrName: \"\",\n\t\t\tattrValue: \"\",\n\t\t\tkeepAttr: true,\n\t\t\tallowedAttributes: ALLOWED_ATTR,\n\t\t\tforceKeepAttr: void 0\n\t\t};\n\t\tlet l = attributes.length;\n\t\tconst lcTag = transformCaseFunc(currentNode.nodeName);\n\t\twhile (l--) {\n\t\t\tconst attr = attributes[l];\n\t\t\tconst name = attr.name, namespaceURI = attr.namespaceURI, attrValue = attr.value;\n\t\t\tconst lcName = transformCaseFunc(name);\n\t\t\tconst initValue = attrValue;\n\t\t\tlet value = name === \"value\" ? initValue : stringTrim(initValue);\n\t\t\tlet recreatedNamedProp = false;\n\t\t\thookEvent.attrName = lcName;\n\t\t\thookEvent.attrValue = value;\n\t\t\thookEvent.keepAttr = true;\n\t\t\thookEvent.forceKeepAttr = void 0;\n\t\t\t_executeHooks(hooks.uponSanitizeAttribute, currentNode, hookEvent);\n\t\t\tvalue = hookEvent.attrValue;\n\t\t\tif (SANITIZE_NAMED_PROPS && (lcName === \"id\" || lcName === \"name\") && stringIndexOf(value, SANITIZE_NAMED_PROPS_PREFIX) !== 0) {\n\t\t\t\t_removeAttribute(name, currentNode, attr);\n\t\t\t\tvalue = SANITIZE_NAMED_PROPS_PREFIX + value;\n\t\t\t\trecreatedNamedProp = true;\n\t\t\t}\n\t\t\tif (SAFE_FOR_XML && regExpTest(/((--!?|])>)|<\\/(style|script|title|xmp|textarea|noscript|iframe|noembed|noframes)/i, value)) {\n\t\t\t\t_removeAttribute(name, currentNode, attr);\n\t\t\t\tcontinue;\n\t\t\t}\n\t\t\tif (lcName === \"attributename\" && stringMatch(value, \"href\")) {\n\t\t\t\t_removeAttribute(name, currentNode, attr);\n\t\t\t\tcontinue;\n\t\t\t}\n\t\t\tif (hookEvent.forceKeepAttr) continue;\n\t\t\tif (!hookEvent.keepAttr) {\n\t\t\t\t_removeAttribute(name, currentNode, attr);\n\t\t\t\tcontinue;\n\t\t\t}\n\t\t\tif (!ALLOW_SELF_CLOSE_IN_ATTR && regExpTest(SELF_CLOSING_TAG, value)) {\n\t\t\t\t_removeAttribute(name, currentNode, attr);\n\t\t\t\tcontinue;\n\t\t\t}\n\t\t\tif (SAFE_FOR_TEMPLATES) value = _stripTemplateExpressions(value);\n\t\t\tif (!_isValidAttribute(lcTag, lcName, value)) {\n\t\t\t\t_removeAttribute(name, currentNode, attr);\n\t\t\t\tcontinue;\n\t\t\t}\n\t\t\tvalue = _applyTrustedTypesToAttribute(lcTag, lcName, namespaceURI, value);\n\t\t\tif (value !== initValue) {\n\t\t\t\tif (_setAttributeValue(currentNode, name, namespaceURI, value) && recreatedNamedProp) arrayPop(DOMPurify.removed);\n\t\t\t}\n\t\t}\n\t\t_executeHooks(hooks.afterSanitizeAttributes, currentNode, null);\n\t\t_handleHookDetachedNode(currentNode, root);\n\t};\n\t/**\n\t* _sanitizeShadowDOM\n\t*\n\t* @param fragment to iterate over recursively\n\t*/\n\tconst _sanitizeShadowDOM2 = function _sanitizeShadowDOM(fragment) {\n\t\tlet shadowNode = null;\n\t\tconst shadowIterator = _createNodeIterator(fragment);\n\t\t_executeHooks(hooks.beforeSanitizeShadowDOM, fragment, null);\n\t\twhile (shadowNode = shadowIterator.nextNode()) {\n\t\t\t_executeHooks(hooks.uponSanitizeShadowNode, shadowNode, null);\n\t\t\t_sanitizeElements(shadowNode, fragment);\n\t\t\t_sanitizeAttributes(shadowNode, fragment);\n\t\t\tif (_isDocumentFragment(shadowNode.content)) _sanitizeShadowDOM2(shadowNode.content);\n\t\t\tif (_readNodeType(shadowNode) === NODE_TYPE.element) {\n\t\t\t\tconst innerSr = getShadowRoot(shadowNode);\n\t\t\t\tif (_isDocumentFragment(innerSr)) {\n\t\t\t\t\t_sanitizeAttachedShadowRoots(innerSr);\n\t\t\t\t\t_sanitizeShadowDOM2(innerSr);\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\t_executeHooks(hooks.afterSanitizeShadowDOM, fragment, null);\n\t};\n\t/**\n\t* _sanitizeAttachedShadowRoots\n\t*\n\t* Walks `root` and feeds every attached shadow root we encounter into\n\t* the existing _sanitizeShadowDOM pipeline. The default node iterator\n\t* does not descend into shadow trees, so nodes inside an attached\n\t* shadow root would otherwise be skipped entirely.\n\t*\n\t* Two real input paths put attached shadow roots in front of us:\n\t* 1. IN_PLACE on a DOM node that already has shadow roots attached.\n\t* 2. DOM-node input where importNode(dirty, true) deep-clones the\n\t* shadow root because it was created with `clonable: true`.\n\t*\n\t* This pass runs once, up front, so the main iteration loop (and the\n\t* existing _sanitizeShadowDOM template-content recursion) stay\n\t* untouched — string-input paths are not affected.\n\t*\n\t* @param root the subtree root to walk for attached shadow roots\n\t*/\n\tconst _sanitizeAttachedShadowRoots = function _sanitizeAttachedShadowRoots(root) {\n\t\tconst stack = [{\n\t\t\tnode: root,\n\t\t\tshadow: null\n\t\t}];\n\t\twhile (stack.length > 0) {\n\t\t\tconst item = stack.pop();\n\t\t\tif (item.shadow) {\n\t\t\t\t_sanitizeShadowDOM2(item.shadow);\n\t\t\t\tcontinue;\n\t\t\t}\n\t\t\tconst node = item.node;\n\t\t\tconst isElement = _readNodeType(node) === NODE_TYPE.element;\n\t\t\tconst childNodes = getChildNodes(node);\n\t\t\tif (childNodes) for (let i = childNodes.length - 1; i >= 0; --i) stack.push({\n\t\t\t\tnode: childNodes[i],\n\t\t\t\tshadow: null\n\t\t\t});\n\t\t\tif (isElement) {\n\t\t\t\tconst rootName = getNodeName ? getNodeName(node) : null;\n\t\t\t\tif (typeof rootName === \"string\" && transformCaseFunc(rootName) === \"template\") {\n\t\t\t\t\tconst content = node.content;\n\t\t\t\t\tif (_isDocumentFragment(content)) stack.push({\n\t\t\t\t\t\tnode: content,\n\t\t\t\t\t\tshadow: null\n\t\t\t\t\t});\n\t\t\t\t}\n\t\t\t}\n\t\t\tif (isElement) {\n\t\t\t\tconst sr = getShadowRoot(node);\n\t\t\t\tif (_isDocumentFragment(sr)) stack.push({\n\t\t\t\t\tnode: null,\n\t\t\t\t\tshadow: sr\n\t\t\t\t}, {\n\t\t\t\t\tnode: sr,\n\t\t\t\t\tshadow: null\n\t\t\t\t});\n\t\t\t}\n\t\t}\n\t};\n\tDOMPurify.sanitize = function(dirty) {\n\t\tlet cfg = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : {};\n\t\tlet body = null;\n\t\tlet importedNode = null;\n\t\tlet currentNode = null;\n\t\tlet returnNode = null;\n\t\tIS_EMPTY_INPUT = !dirty;\n\t\tif (IS_EMPTY_INPUT) dirty = \"<!-->\";\n\t\tif (typeof dirty !== \"string\" && !_isNode(dirty)) {\n\t\t\tdirty = stringifyValue(dirty);\n\t\t\tif (typeof dirty !== \"string\") throw typeErrorCreate(\"dirty is not a string, aborting\");\n\t\t}\n\t\tif (!DOMPurify.isSupported) return dirty;\n\t\tif (SET_CONFIG) {\n\t\t\tALLOWED_TAGS = SET_CONFIG_ALLOWED_TAGS;\n\t\t\tALLOWED_ATTR = SET_CONFIG_ALLOWED_ATTR;\n\t\t} else _parseConfig(cfg);\n\t\tif (hooks.uponSanitizeElement.length > 0 || hooks.uponSanitizeAttribute.length > 0) ALLOWED_TAGS = clone(ALLOWED_TAGS);\n\t\tif (hooks.uponSanitizeAttribute.length > 0) ALLOWED_ATTR = clone(ALLOWED_ATTR);\n\t\tDOMPurify.removed = [];\n\t\tconst inPlace = IN_PLACE && typeof dirty !== \"string\" && _isNode(dirty);\n\t\tif (inPlace) {\n\t\t\t_neutralizePatchLinkage(dirty);\n\t\t\tconst nn = _readNodeName(dirty);\n\t\t\tif (typeof nn === \"string\") {\n\t\t\t\tconst tagName = transformCaseFunc(nn);\n\t\t\t\tif (!ALLOWED_TAGS[tagName] || FORBID_TAGS[tagName]) {\n\t\t\t\t\t_neutralizeRoot(dirty);\n\t\t\t\t\tthrow typeErrorCreate(\"root node is forbidden and cannot be sanitized in-place\");\n\t\t\t\t}\n\t\t\t}\n\t\t\tif (_isClobbered(dirty)) {\n\t\t\t\t_neutralizeRoot(dirty);\n\t\t\t\tthrow typeErrorCreate(\"root node is clobbered and cannot be sanitized in-place\");\n\t\t\t}\n\t\t\ttry {\n\t\t\t\t_sanitizeAttachedShadowRoots(dirty);\n\t\t\t} catch (error) {\n\t\t\t\t_neutralizeRoot(dirty);\n\t\t\t\tthrow error;\n\t\t\t}\n\t\t} else if (_isNode(dirty)) {\n\t\t\tbody = _initDocument(\"<!---->\");\n\t\t\timportedNode = body.ownerDocument.importNode(dirty, true);\n\t\t\tif (importedNode.nodeType === NODE_TYPE.element && importedNode.nodeName === \"BODY\") body = importedNode;\n\t\t\telse if (importedNode.nodeName === \"HTML\") body = importedNode;\n\t\t\telse body.appendChild(importedNode);\n\t\t\t_sanitizeAttachedShadowRoots(body);\n\t\t} else {\n\t\t\tif (!RETURN_DOM && !SAFE_FOR_TEMPLATES && !WHOLE_DOCUMENT && dirty.indexOf(\"<\") === -1) return trustedTypesPolicy && RETURN_TRUSTED_TYPE ? _createTrustedHTML(dirty) : dirty;\n\t\t\tbody = _initDocument(dirty);\n\t\t\tif (!body) return RETURN_DOM ? null : RETURN_TRUSTED_TYPE ? emptyHTML : \"\";\n\t\t}\n\t\tif (body && FORCE_BODY) _forceRemove(body.firstChild);\n\t\tconst walkRoot = inPlace ? dirty : body;\n\t\ttry {\n\t\t\tconst nodeIterator = _createNodeIterator(walkRoot);\n\t\t\twhile (currentNode = nodeIterator.nextNode()) {\n\t\t\t\t_sanitizeElements(currentNode, walkRoot);\n\t\t\t\t_sanitizeAttributes(currentNode, walkRoot);\n\t\t\t\tif (_isDocumentFragment(currentNode.content)) _sanitizeShadowDOM2(currentNode.content);\n\t\t\t}\n\t\t} catch (error) {\n\t\t\tif (inPlace) {\n\t\t\t\t_neutralizeRoot(dirty);\n\t\t\t\tarrayForEach(DOMPurify.removed, (entry) => {\n\t\t\t\t\tif (entry.element) _neutralizeSubtree(entry.element);\n\t\t\t\t});\n\t\t\t}\n\t\t\tthrow error;\n\t\t}\n\t\tif (inPlace) {\n\t\t\tlet rootWasRemoved = false;\n\t\t\tarrayForEach(DOMPurify.removed, (entry) => {\n\t\t\t\tif (entry.element) {\n\t\t\t\t\tif (entry.element === dirty) rootWasRemoved = true;\n\t\t\t\t\t_neutralizeSubtree(entry.element);\n\t\t\t\t}\n\t\t\t});\n\t\t\tif (rootWasRemoved) throw typeErrorCreate(\"a node selected for removal could not be safely returned; refusing to sanitize in place\");\n\t\t\tif (SAFE_FOR_TEMPLATES) _scrubTemplateExpressions2(dirty);\n\t\t\treturn dirty;\n\t\t}\n\t\tif (RETURN_DOM) {\n\t\t\tif (SAFE_FOR_TEMPLATES) _scrubTemplateExpressions2(body);\n\t\t\tif (RETURN_DOM_FRAGMENT) {\n\t\t\t\treturnNode = createDocumentFragment.call(body.ownerDocument);\n\t\t\t\twhile (body.firstChild) returnNode.appendChild(body.firstChild);\n\t\t\t} else returnNode = body;\n\t\t\tif (ALLOWED_ATTR.shadowroot || ALLOWED_ATTR.shadowrootmode) returnNode = importNode.call(originalDocument, returnNode, true);\n\t\t\treturn returnNode;\n\t\t}\n\t\tlet serializedHTML = WHOLE_DOCUMENT ? body.outerHTML : body.innerHTML;\n\t\tif (WHOLE_DOCUMENT && ALLOWED_TAGS[\"!doctype\"] && body.ownerDocument && body.ownerDocument.doctype && body.ownerDocument.doctype.name && regExpTest(DOCTYPE_NAME, body.ownerDocument.doctype.name)) serializedHTML = \"<!DOCTYPE \" + body.ownerDocument.doctype.name + \">\\n\" + serializedHTML;\n\t\tif (SAFE_FOR_TEMPLATES) serializedHTML = _stripTemplateExpressions(serializedHTML);\n\t\treturn trustedTypesPolicy && RETURN_TRUSTED_TYPE ? _createTrustedHTML(serializedHTML) : serializedHTML;\n\t};\n\tDOMPurify.setConfig = function() {\n\t\tlet cfg = arguments.length > 0 && arguments[0] !== void 0 ? arguments[0] : {};\n\t\t_parseConfig(cfg);\n\t\tSET_CONFIG = true;\n\t\tSET_CONFIG_ALLOWED_TAGS = ALLOWED_TAGS;\n\t\tSET_CONFIG_ALLOWED_ATTR = ALLOWED_ATTR;\n\t};\n\tDOMPurify.clearConfig = function() {\n\t\tCONFIG = null;\n\t\tSET_CONFIG = false;\n\t\tSET_CONFIG_ALLOWED_TAGS = null;\n\t\tSET_CONFIG_ALLOWED_ATTR = null;\n\t\ttrustedTypesPolicy = defaultTrustedTypesPolicy;\n\t\temptyHTML = \"\";\n\t};\n\tDOMPurify.isValidAttribute = function(tag, attr, value) {\n\t\tif (!CONFIG) _parseConfig({});\n\t\tconst lcTag = transformCaseFunc(tag);\n\t\tconst lcName = transformCaseFunc(attr);\n\t\treturn _isValidAttribute(lcTag, lcName, value);\n\t};\n\tDOMPurify.addHook = function(entryPoint, hookFunction) {\n\t\tif (typeof hookFunction !== \"function\") return;\n\t\tif (!objectHasOwnProperty(hooks, entryPoint)) return;\n\t\tarrayPush(hooks[entryPoint], hookFunction);\n\t};\n\tDOMPurify.removeHook = function(entryPoint, hookFunction) {\n\t\tif (!objectHasOwnProperty(hooks, entryPoint)) return;\n\t\tif (hookFunction !== void 0) {\n\t\t\tconst index = arrayLastIndexOf(hooks[entryPoint], hookFunction);\n\t\t\treturn index === -1 ? void 0 : arraySplice(hooks[entryPoint], index, 1)[0];\n\t\t}\n\t\treturn arrayPop(hooks[entryPoint]);\n\t};\n\tDOMPurify.removeHooks = function(entryPoint) {\n\t\tif (!objectHasOwnProperty(hooks, entryPoint)) return;\n\t\thooks[entryPoint] = [];\n\t};\n\tDOMPurify.removeAllHooks = function() {\n\t\thooks = _createHooksMap();\n\t};\n\treturn DOMPurify;\n}\nvar purify_default = createDOMPurify();\nexport { purify_default as default };\n\n//# sourceMappingURL=purify.es.mjs.map","import e from \"dompurify\";\n//#region src/utils.ts\nfunction t(e) {\n\tlet t = typeof process < \"u\" && process.env?.DEBUG?.includes(e);\n\treturn (...n) => {\n\t\tt && console.log(`[${e}]`, ...n);\n\t};\n}\nfunction n(e) {\n\treturn !e || typeof e == \"object\" && Object.keys(e).length === 0;\n}\nfunction r(e, t) {\n\treturn e.mode === \"evaluate\" && t;\n}\nfunction i(e, t) {\n\treturn e.mode === \"evaluate\" && t && e.role === \"instructor\";\n}\nfunction a(e, t, n) {\n\treturn Math.min(Math.max(e, t), n);\n}\nfunction o() {\n\treturn crypto.randomUUID();\n}\nfunction s(e, t) {\n\tlet n;\n\treturn (...r) => {\n\t\tclearTimeout(n), n = setTimeout(() => e(...r), t);\n\t};\n}\nfunction c(e, t) {\n\tlet n = [...e], r = t ? l(t) : Math.random;\n\tfor (let e = n.length - 1; e > 0; e--) {\n\t\tlet t = Math.floor(r() * (e + 1));\n\t\t[n[e], n[t]] = [n[t], n[e]];\n\t}\n\treturn n;\n}\nfunction l(e) {\n\tlet t = e;\n\treturn () => (t = (t * 9301 + 49297) % 233280, t / 233280);\n}\nfunction u(e, t, n = {}) {\n\tlet { skipUndefined: r = !0 } = n;\n\tfor (let [n, i] of Object.entries(t)) r && i === void 0 || (e[n] = i);\n}\nfunction d(e, t) {\n\tif (e === t) return !0;\n\tif (!e || !t || typeof e != \"object\" || typeof t != \"object\") return e === t;\n\tlet n = e, r = t;\n\tif (\"answers\" in n && \"answers\" in r) {\n\t\tlet e = n.answers, t = r.answers;\n\t\treturn !Array.isArray(e) || !Array.isArray(t) || e.length !== t.length ? !1 : JSON.stringify(e) === JSON.stringify(t);\n\t}\n\tif (\"value\" in n && \"value\" in r) {\n\t\tlet e = n.value, t = r.value;\n\t\treturn Array.isArray(e) && Array.isArray(t) ? e.length === t.length ? e.length === 0 || typeof e[0] != \"object\" ? e.every((e, n) => e === t[n]) : JSON.stringify(e) === JSON.stringify(t) : !1 : typeof e == \"object\" && typeof t == \"object\" ? JSON.stringify(e) === JSON.stringify(t) : e === t;\n\t}\n\treturn JSON.stringify(e) === JSON.stringify(t);\n}\n//#endregion\n//#region src/authored-colors.ts\nvar f = \"data-pie-authored-ink\", p = \"data-pie-authored-fill\", m = \"data-pie-authored-border\", h = [\n\t\"border-top-color\",\n\t\"border-right-color\",\n\t\"border-bottom-color\",\n\t\"border-left-color\"\n], g = /* @__PURE__ */ new Set([\n\t\"currentcolor\",\n\t\"inherit\",\n\t\"initial\",\n\t\"unset\",\n\t\"revert\",\n\t\"revert-layer\",\n\t\"transparent\"\n]);\nfunction _(e) {\n\tlet t = e?.trim().toLowerCase();\n\treturn !t || g.has(t) || t.includes(\"var(\") ? !1 : b(t)?.a !== 0;\n}\nfunction ee(e) {\n\tlet t = b(e);\n\tif (!t) return \"shade\";\n\tlet n = (e) => (e * t.a + 255 * (1 - t.a)) / 255, [r, i, a] = [\n\t\tn(t.r),\n\t\tn(t.g),\n\t\tn(t.b)\n\t], o = .2126 * B(r) + .7152 * B(i) + .0722 * B(a), s = Math.max(r, i, a) - Math.min(r, i, a);\n\treturn o >= .85 && s <= .08 ? \"light\" : \"shade\";\n}\nfunction v(e) {\n\te.removeAttribute(f), e.removeAttribute(p), e.removeAttribute(m);\n\tlet t = e.hasAttribute(\"style\") ? e.style : void 0, n = (e) => t?.getPropertyValue(e).trim() ?? \"\", r = [], i = n(\"color\"), a = e.localName === \"font\" ? e.getAttribute(\"color\") : null;\n\t_(i || a) && (e.setAttribute(f, \"\"), i && r.push(\"color\"));\n\tlet o = n(\"background-color\"), s = o || y(e.getAttribute(\"bgcolor\"));\n\t_(s) && (e.setAttribute(p, ee(s)), o && r.push(\"background-color\"));\n\tlet c = h.filter((e) => _(n(e)));\n\tc.length && (e.setAttribute(m, \"\"), r.push(...c));\n\tfor (let e of r) t?.getPropertyPriority(e) === \"important\" && t.setProperty(e, t.getPropertyValue(e));\n}\nfunction y(e) {\n\tlet t = e?.trim() ?? \"\";\n\treturn /^(?:[\\da-f]{3}|[\\da-f]{6})$/i.test(t) ? `#${t}` : t;\n}\nfunction b(e) {\n\tlet t = e.trim().toLowerCase();\n\tif (t === \"transparent\") return {\n\t\tr: 0,\n\t\tg: 0,\n\t\tb: 0,\n\t\ta: 0\n\t};\n\tlet n = S().get(t);\n\tif (n) return C(n);\n\tif (t.startsWith(\"#\")) return C(t.slice(1));\n\tlet r = /^([a-z]+)\\(([^()]*)\\)$/.exec(t);\n\tif (!r) return null;\n\tlet i = r[2].trim().split(/\\s*[\\s,/]\\s*/);\n\tif (i.length !== 3 && i.length !== 4) return null;\n\tlet [a, o, s, c] = i, l = D(c), u;\n\tswitch (r[1]) {\n\t\tcase \"rgb\":\n\t\tcase \"rgba\":\n\t\t\tu = [\n\t\t\t\ta,\n\t\t\t\to,\n\t\t\t\ts\n\t\t\t].map((e) => T(e, 255) / 255);\n\t\t\tbreak;\n\t\tcase \"hsl\":\n\t\tcase \"hsla\":\n\t\t\tu = k(E(a), T(o, 100) / 100, T(s, 100) / 100);\n\t\t\tbreak;\n\t\tcase \"hwb\":\n\t\t\tu = A(E(a), T(o, 100) / 100, T(s, 100) / 100);\n\t\t\tbreak;\n\t\tcase \"lab\":\n\t\t\tu = I(T(a, 100), T(o, 125), T(s, 125));\n\t\t\tbreak;\n\t\tcase \"lch\":\n\t\t\tu = I(T(a, 100), ...O(T(o, 150), E(s)));\n\t\t\tbreak;\n\t\tcase \"oklab\":\n\t\t\tu = L(T(a, 1), T(o, .4), T(s, .4));\n\t\t\tbreak;\n\t\tcase \"oklch\":\n\t\t\tu = L(T(a, 1), ...O(T(o, .4), E(s)));\n\t\t\tbreak;\n\t\tdefault: return null;\n\t}\n\tif (Number.isNaN(l) || u.some(Number.isNaN)) return null;\n\tlet [d, f, p] = u.map((e) => V(e, 0, 1) * 255);\n\treturn {\n\t\tr: d,\n\t\tg: f,\n\t\tb: p,\n\t\ta: l\n\t};\n}\nvar x;\nfunction S() {\n\treturn x ??= new Map(\"aliceblue:f0f8ff antiquewhite:faebd7 aqua:00ffff aquamarine:7fffd4 azure:f0ffff beige:f5f5dc bisque:ffe4c4 black:000000 blanchedalmond:ffebcd blue:0000ff blueviolet:8a2be2 brown:a52a2a burlywood:deb887 cadetblue:5f9ea0 chartreuse:7fff00 chocolate:d2691e coral:ff7f50 cornflowerblue:6495ed cornsilk:fff8dc crimson:dc143c cyan:00ffff darkblue:00008b darkcyan:008b8b darkgoldenrod:b8860b darkgray:a9a9a9 darkgreen:006400 darkgrey:a9a9a9 darkkhaki:bdb76b darkmagenta:8b008b darkolivegreen:556b2f darkorange:ff8c00 darkorchid:9932cc darkred:8b0000 darksalmon:e9967a darkseagreen:8fbc8f darkslateblue:483d8b darkslategray:2f4f4f darkslategrey:2f4f4f darkturquoise:00ced1 darkviolet:9400d3 deeppink:ff1493 deepskyblue:00bfff dimgray:696969 dimgrey:696969 dodgerblue:1e90ff firebrick:b22222 floralwhite:fffaf0 forestgreen:228b22 fuchsia:ff00ff gainsboro:dcdcdc ghostwhite:f8f8ff gold:ffd700 goldenrod:daa520 gray:808080 green:008000 greenyellow:adff2f grey:808080 honeydew:f0fff0 hotpink:ff69b4 indianred:cd5c5c indigo:4b0082 ivory:fffff0 khaki:f0e68c lavender:e6e6fa lavenderblush:fff0f5 lawngreen:7cfc00 lemonchiffon:fffacd lightblue:add8e6 lightcoral:f08080 lightcyan:e0ffff lightgoldenrodyellow:fafad2 lightgray:d3d3d3 lightgreen:90ee90 lightgrey:d3d3d3 lightpink:ffb6c1 lightsalmon:ffa07a lightseagreen:20b2aa lightskyblue:87cefa lightslategray:778899 lightslategrey:778899 lightsteelblue:b0c4de lightyellow:ffffe0 lime:00ff00 limegreen:32cd32 linen:faf0e6 magenta:ff00ff maroon:800000 mediumaquamarine:66cdaa mediumblue:0000cd mediumorchid:ba55d3 mediumpurple:9370db mediumseagreen:3cb371 mediumslateblue:7b68ee mediumspringgreen:00fa9a mediumturquoise:48d1cc mediumvioletred:c71585 midnightblue:191970 mintcream:f5fffa mistyrose:ffe4e1 moccasin:ffe4b5 navajowhite:ffdead navy:000080 oldlace:fdf5e6 olive:808000 olivedrab:6b8e23 orange:ffa500 orangered:ff4500 orchid:da70d6 palegoldenrod:eee8aa palegreen:98fb98 paleturquoise:afeeee palevioletred:db7093 papayawhip:ffefd5 peachpuff:ffdab9 peru:cd853f pink:ffc0cb plum:dda0dd powderblue:b0e0e6 purple:800080 rebeccapurple:663399 red:ff0000 rosybrown:bc8f8f royalblue:4169e1 saddlebrown:8b4513 salmon:fa8072 sandybrown:f4a460 seagreen:2e8b57 seashell:fff5ee sienna:a0522d silver:c0c0c0 skyblue:87ceeb slateblue:6a5acd slategray:708090 slategrey:708090 snow:fffafa springgreen:00ff7f steelblue:4682b4 tan:d2b48c teal:008080 thistle:d8bfd8 tomato:ff6347 turquoise:40e0d0 violet:ee82ee wheat:f5deb3 white:ffffff whitesmoke:f5f5f5 yellow:ffff00 yellowgreen:9acd32\".split(\" \").map((e) => e.split(\":\"))), x;\n}\nfunction C(e) {\n\tif (!/^(?:[\\da-f]{3,4}|[\\da-f]{6}|[\\da-f]{8})$/.test(e)) return null;\n\tlet [t, n, r, i = 255] = (e.length <= 4 ? [...e].map((e) => e + e) : e.match(/../g) ?? []).map((e) => Number.parseInt(e, 16));\n\treturn {\n\t\tr: t,\n\t\tg: n,\n\t\tb: r,\n\t\ta: i / 255\n\t};\n}\nvar w = /^([+-]?(?:\\d+\\.?\\d*|\\.\\d+)(?:e[+-]?\\d+)?)(%|deg|rad|grad|turn)?$/;\nfunction T(e, t) {\n\tif (e === \"none\") return 0;\n\tlet n = w.exec(e);\n\treturn !n || n[2] && n[2] !== \"%\" ? NaN : n[2] ? Number(n[1]) / 100 * t : Number(n[1]);\n}\nfunction E(e) {\n\tif (e === \"none\") return 0;\n\tlet t = w.exec(e);\n\tif (!t || t[2] === \"%\") return NaN;\n\tlet n = Number(t[1]);\n\treturn ((t[2] === \"rad\" ? n * 180 / Math.PI : t[2] === \"grad\" ? n * .9 : t[2] === \"turn\" ? n * 360 : n) % 360 + 360) % 360;\n}\nfunction D(e) {\n\treturn e === void 0 ? 1 : V(T(e, 1), 0, 1);\n}\nfunction O(e, t) {\n\tlet n = Math.max(0, e), r = t * Math.PI / 180;\n\treturn [n * Math.cos(r), n * Math.sin(r)];\n}\nfunction k(e, t, n) {\n\tlet r = V(t, 0, 1), i = V(n, 0, 1), a = (t) => {\n\t\tlet n = (t + e / 30) % 12, a = r * Math.min(i, 1 - i);\n\t\treturn i - a * Math.max(-1, Math.min(n - 3, 9 - n, 1));\n\t};\n\treturn [\n\t\ta(0),\n\t\ta(8),\n\t\ta(4)\n\t];\n}\nfunction A(e, t, n) {\n\tlet r = V(t, 0, 1), i = V(n, 0, 1);\n\treturn r + i >= 1 ? [\n\t\t,\n\t\t,\n\t\t,\n\t].fill(r / (r + i)) : k(e, 1, .5).map((e) => e * (1 - r - i) + r);\n}\nvar j = 24389 / 27, M = 216 / 24389, N = [\n\t.3457 / .3585,\n\t1,\n\t.2958 / .3585\n], P = [\n\t[\n\t\t.955473421488075,\n\t\t-.02309845494876471,\n\t\t.06325924320057072\n\t],\n\t[\n\t\t-.0283697093338637,\n\t\t1.0099953980813041,\n\t\t.021041441191917323\n\t],\n\t[\n\t\t.012314014864481998,\n\t\t-.020507649298898964,\n\t\t1.330365926242124\n\t]\n], F = [\n\t[\n\t\t12831 / 3959,\n\t\t-329 / 214,\n\t\t-1974 / 3959\n\t],\n\t[\n\t\t-851781 / 878810,\n\t\t1648619 / 878810,\n\t\t36519 / 878810\n\t],\n\t[\n\t\t705 / 12673,\n\t\t-2585 / 12673,\n\t\t705 / 667\n\t]\n];\nfunction I(e, t, n) {\n\tlet r = V(e, 0, 100), i = (r + 16) / 116, a = t / 500 + i, o = i - n / 200;\n\treturn R(F, R(P, [\n\t\ta ** 3 > M ? a ** 3 : (116 * a - 16) / j,\n\t\tr > j * M ? i ** 3 : r / j,\n\t\to ** 3 > M ? o ** 3 : (116 * o - 16) / j\n\t].map((e, t) => e * N[t]))).map(z);\n}\nfunction L(e, t, n) {\n\tlet r = V(e, 0, 1);\n\treturn R([\n\t\t[\n\t\t\t4.0767416621,\n\t\t\t-3.3077115913,\n\t\t\t.2309699292\n\t\t],\n\t\t[\n\t\t\t-1.2684380046,\n\t\t\t2.6097574011,\n\t\t\t-.3413193965\n\t\t],\n\t\t[\n\t\t\t-.0041960863,\n\t\t\t-.7034186147,\n\t\t\t1.707614701\n\t\t]\n\t], [\n\t\tr + .3963377774 * t + .2158037573 * n,\n\t\tr - .1055613458 * t - .0638541728 * n,\n\t\tr - .0894841775 * t - 1.291485548 * n\n\t].map((e) => e ** 3)).map(z);\n}\nfunction R(e, t) {\n\treturn e.map((e) => e[0] * t[0] + e[1] * t[1] + e[2] * t[2]);\n}\nfunction z(e) {\n\tlet t = V(e, 0, 1);\n\treturn t <= .0031308 ? 12.92 * t : 1.055 * t ** (1 / 2.4) - .055;\n}\nfunction B(e) {\n\treturn e <= .04045 ? e / 12.92 : ((e + .055) / 1.055) ** 2.4;\n}\nfunction V(e, t, n) {\n\treturn Math.min(n, Math.max(t, e));\n}\n//#endregion\n//#region src/sanitize-model-html.ts\nvar H = [\n\t\"script\",\n\t\"embed\",\n\t\"base\",\n\t\"form\",\n\t\"meta\",\n\t\"link\",\n\t\"style\",\n\t\"foreignobject\"\n], U = [\n\t\"onerror\",\n\t\"onload\",\n\t\"onclick\",\n\t\"onmouseover\",\n\t\"onmouseout\",\n\t\"onmouseenter\",\n\t\"onmouseleave\",\n\t\"onfocus\",\n\t\"onblur\",\n\t\"onkeydown\",\n\t\"onkeyup\",\n\t\"onkeypress\",\n\t\"onsubmit\",\n\t\"onchange\",\n\t\"onbeforeunload\",\n\t\"formaction\",\n\t\"xlink:href\"\n], W = /* @__PURE__ */ new Set([\n\t\"iframe\",\n\t\"object\",\n\t\"mstack\",\n\t\"mlongdiv\",\n\t\"msgroup\",\n\t\"msrow\",\n\t\"msline\",\n\t\"mscarries\",\n\t\"mscarry\",\n\t\"semantics\",\n\t\"annotation\",\n\t\"none\"\n]), G = /^[a-z_][\\w.-]*:[a-z][\\w.-]*$/, K = [\n\t\"alignment\",\n\t\"target\",\n\t\"allow\",\n\t\"allowfullscreen\",\n\t\"frameborder\",\n\t\"scrolling\",\n\t\"data\",\n\t\"stackalign\",\n\t\"charalign\",\n\t\"charspacing\",\n\t\"longdivstyle\",\n\t\"position\",\n\t\"shift\",\n\t\"location\",\n\t\"crossout\",\n\t\"leftoverhang\",\n\t\"rightoverhang\",\n\t\"mslinethickness\",\n\t\"linebreak\"\n], q = /^\\s*document\\.getElementById\\((['\"])([^'\"]+)\\1\\)\\.play\\(\\)\\s*;?\\s*(?:return\\s+false\\s*;?\\s*)?$/, J = \"data-pie-play-audio\", Y = {\n\tADD_TAGS: (e) => W.has(e) || G.test(e),\n\tADD_ATTR: K,\n\tFORBID_TAGS: H,\n\tFORBID_ATTR: U,\n\tALLOW_UNKNOWN_PROTOCOLS: !1,\n\tRETURN_TRUSTED_TYPE: !1\n}, te = !1;\nfunction ne(e) {\n\tfor (let t of e.composedPath()) {\n\t\tif (!(t instanceof Element)) continue;\n\t\tlet n = t.getAttribute(J);\n\t\tif (n === null) continue;\n\t\te.preventDefault();\n\t\tlet r = t.getRootNode().getElementById?.(n) ?? document.getElementById(n);\n\t\tr instanceof HTMLMediaElement && r.play()?.catch(() => void 0);\n\t\treturn;\n\t}\n}\nvar X = null;\nfunction re() {\n\treturn X || (X = e(window), X.addHook(\"beforeSanitizeAttributes\", (e) => {\n\t\tif (e.nodeName !== \"A\") return;\n\t\tlet t = q.exec(e.getAttribute(\"onclick\") ?? \"\")?.[2];\n\t\tt !== void 0 && (e.removeAttribute(\"onclick\"), e.setAttribute(J, t), te ||= (document.addEventListener(\"click\", ne), !0));\n\t}), X.addHook(\"afterSanitizeAttributes\", v), X);\n}\nvar Z = 1e6, Q = /* @__PURE__ */ new Map(), $ = 0;\nfunction ie(t) {\n\tif (t == null || t === \"\" || !e.isSupported) return \"\";\n\tlet n = typeof t == \"string\" ? t : String(t), r = Q.get(n);\n\tif (r !== void 0) return r;\n\tlet i = String(re().sanitize(n, Y)), a = n.length + i.length;\n\tif (a > Z) return i;\n\tfor (let [e, t] of Q) {\n\t\tif ($ + a <= Z) break;\n\t\tQ.delete(e), $ -= e.length + t.length;\n\t}\n\treturn Q.set(n, i), $ += a, i;\n}\n//#endregion\nexport { m as AUTHORED_BORDER_ATTR, p as AUTHORED_FILL_ATTR, f as AUTHORED_INK_ATTR, U as MODEL_HTML_FORBIDDEN_ATTRS, H as MODEL_HTML_FORBIDDEN_TAGS, J as PLAY_AUDIO_ATTR, u as assignProps, a as clamp, s as debounce, t as debug, n as isEmpty, v as markAuthoredColors, ie as sanitizeModelHtml, d as sessionsEqual, r as showFeedback, i as showRationale, c as shuffle, o as uuid };\n","export type AudioMode = 'feature-button' | 'controls' | 'error' | 'none';\n\nexport function computeAudioMode(params: {\n hasAudio: boolean;\n audioUrl: string | undefined;\n useFeatureButtonAudio: boolean;\n}): AudioMode {\n if (!params.hasAudio) return 'none';\n if (!params.audioUrl) return 'error';\n return params.useFeatureButtonAudio ? 'feature-button' : 'controls';\n}\n","//#region src/en.ts\nvar e = {\n\ttranslation: {\n\t\tcategorize: {\n\t\t\tlimitMaxChoicesPerCategory: \"You've reached the limit of {{maxChoicesPerCategory}} responses per area. To add another response, one must first be removed.\",\n\t\t\tmaxChoicesPerCategoryRestriction: \"To change this value to {{maxChoicesPerCategory}}, each category must have {{maxChoicesPerCategory}} or fewer answer choice[s].\"\n\t\t},\n\t\tdragInTheBlank: { blank: \"Blank {{index}}\" },\n\t\tebsr: {\n\t\t\tpart: \"Part {{index}}\",\n\t\t\ttwoPartQuestion: \"Two-Part Question\"\n\t\t},\n\t\teditableHtml: {\n\t\t\tresponseAreaToolbar: \"Response area\",\n\t\t\ttoolbar: \"Editing tools\",\n\t\t\tbuttons: {\n\t\t\t\tinsertTable: \"Insert table\",\n\t\t\t\taddTableRow: \"Add table row\",\n\t\t\t\tremoveTableRow: \"Remove table row\",\n\t\t\t\taddTableColumn: \"Add table column\",\n\t\t\t\tremoveTableColumn: \"Remove table column\",\n\t\t\t\tremoveTable: \"Remove table\",\n\t\t\t\ttableBorders: \"Table borders\",\n\t\t\t\tbold: \"Bold\",\n\t\t\t\titalic: \"Italic\",\n\t\t\t\tstrikethrough: \"Strikethrough\",\n\t\t\t\tcode: \"Code\",\n\t\t\t\tunderline: \"Underline\",\n\t\t\t\tsubscript: \"Subscript\",\n\t\t\t\tsuperscript: \"Superscript\",\n\t\t\t\tinsertImage: \"Insert image\",\n\t\t\t\tinsertVideo: \"Insert video\",\n\t\t\t\tinsertAudio: \"Insert audio\",\n\t\t\t\tcssClasses: \"CSS classes\",\n\t\t\t\tblockquote: \"Blockquote\",\n\t\t\t\theading: \"Heading\",\n\t\t\t\tinsertMath: \"Insert math\",\n\t\t\t\tspanishCharacters: \"Spanish characters (ñ)\",\n\t\t\t\tspecialCharacters: \"Special characters (€)\",\n\t\t\t\ttextAlignment: \"Text alignment\",\n\t\t\t\tbulletedList: \"Bulleted list\",\n\t\t\t\tnumberedList: \"Numbered list\",\n\t\t\t\tdone: \"Done\"\n\t\t\t}\n\t\t},\n\t\texplicitConstructedResponse: {\n\t\t\tfillInTheBlankQuestion: \"Fill in the Blank Question\",\n\t\t\tresponse: \"Response {{index}} of {{total}}\"\n\t\t},\n\t\textendedTextEntry: {\n\t\t\tcomment: \"Comment\",\n\t\t\tconstructedResponseQuestion: \"Constructed Response Question\",\n\t\t\tresponse: \"Your response\",\n\t\t\twrittenResponseQuestion: \"Written Response Question\"\n\t\t},\n\t\tfractionModel: {\n\t\t\tmodelLabel_one: \"Model {{index}} of {{total}}: {{selected}} of {{count}} part selected\",\n\t\t\tmodelLabel_other: \"Model {{index}} of {{total}}: {{selected}} of {{count}} parts selected\"\n\t\t},\n\t\tnumberLine: {\n\t\t\taddElementLimit_one: \"You can only add {{count}} element\",\n\t\t\taddElementLimit_other: \"You can only add {{count}} elements\",\n\t\t\tclearAll: \"Clear all\",\n\t\t\tclosedEnd: \"closed\",\n\t\t\telementCorrect: \"Correct.\",\n\t\t\telementIncorrect: \"Incorrect.\",\n\t\t\tgraphLabel: \"Number line from {{min}} to {{max}}, with a tick every {{interval}}\",\n\t\t\tline: \"Line from {{left}} ({{leftEnd}}) to {{right}} ({{rightEnd}}).\",\n\t\t\topenEnd: \"open\",\n\t\t\tplottedNone: \"Nothing is plotted.\",\n\t\t\tpointClosed: \"Closed point at {{position}}.\",\n\t\t\tpointOpen: \"Open point at {{position}}.\",\n\t\t\trayLeft: \"Ray from {{position}} ({{end}}) to the left.\",\n\t\t\trayRight: \"Ray from {{position}} ({{end}}) to the right.\"\n\t\t},\n\t\thotspot: {\n\t\t\tcorrectlySelected: \"Correctly selected\",\n\t\t\timage_one: \"Image with {{count}} hotspot\",\n\t\t\timage_other: \"Image with {{count}} hotspots\",\n\t\t\tshape: \"Hotspot {{index}} of {{total}}\",\n\t\t\tshouldHaveBeenSelected: \"Should have been selected\",\n\t\t\tshouldNotHaveBeenSelected: \"Should not have been selected\"\n\t\t},\n\t\timageClozeAssociation: {\n\t\t\tanswerChoice: \"Answer choice {{index}} of {{total}}\",\n\t\t\timage_one: \"Image with {{count}} response area\",\n\t\t\timage_other: \"Image with {{count}} response areas\",\n\t\t\treachedLimit_one: \"You’ve reached the limit of {{count}} response per area. To add another response, one must first be removed.\",\n\t\t\treachedLimit_other: \"Full\",\n\t\t\tresponseArea: \"Response area {{index}} of {{total}}\"\n\t\t},\n\t\tinlineDropdown: {\n\t\t\tinlineDropdownQuestion: \"Inline Dropdown Question\",\n\t\t\tquery: \"Query\",\n\t\t\tqueryNumber: \"Query {{index}}\",\n\t\t\tshowRationaleForChoices: \"Show Rationale for choices\",\n\t\t\thideRationaleForChoices: \"Hide Rationale for choices\"\n\t\t},\n\t\tdrawingResponse: {\n\t\t\tfillColor: \"Fill color\",\n\t\t\toutlineColor: \"Outline color\",\n\t\t\tnoFill: \"No fill\",\n\t\t\tlightblue: \"Light blue\",\n\t\t\tlightyellow: \"Light yellow\",\n\t\t\tred: \"Red\",\n\t\t\torange: \"Orange\",\n\t\t\tyellow: \"Yellow\",\n\t\t\tviolet: \"Violet\",\n\t\t\tblue: \"Blue\",\n\t\t\tgreen: \"Green\",\n\t\t\twhite: \"White\",\n\t\t\tblack: \"Black\",\n\t\t\tonDoubleClick: \"Double click to edit this text. Press Enter to submit.\",\n\t\t\tdrawingArea: \"Drawing area\",\n\t\t\tdrawingAreaOverImage: \"Drawing area over a background image\",\n\t\t\ttools: {\n\t\t\t\tselect: \"Select\",\n\t\t\t\tfreeDraw: \"Free Draw\",\n\t\t\t\tline: \"Line\",\n\t\t\t\trectangle: \"Rectangle\",\n\t\t\t\tcircle: \"Circle\",\n\t\t\t\ttextEntry: \"Text Entry\",\n\t\t\t\teraser: \"Eraser\"\n\t\t\t}\n\t\t},\n\t\tcharting: {\n\t\t\taddCategory: \"Add category\",\n\t\t\tactions: \"Actions\",\n\t\t\tadd: \"Add\",\n\t\t\tdelete: \"Delete\",\n\t\t\tnewLabel: \"New label\",\n\t\t\tcategoryLabel: \"Category {{index}} label\",\n\t\t\tcategoryLabelValue: \"Category {{index}} label: {{label}}\",\n\t\t\tcategory: \"Category {{index}}\",\n\t\t\treachedLimit_other: \"There can't be more than {{count}} categories.\",\n\t\t\tkeyLegend: {\n\t\t\t\tincorrectAnswer: \"Student incorrect answer\",\n\t\t\t\tcorrectAnswer: \"Student correct answer\",\n\t\t\t\tcorrectKeyAnswer: \"Answer key correct\"\n\t\t\t},\n\t\t\tchartTypes: {\n\t\t\t\tbar: \"Bar chart\",\n\t\t\t\thistogram: \"Histogram\",\n\t\t\t\tlineDot: \"Line chart with dots\",\n\t\t\t\tlineCross: \"Line chart with crosses\",\n\t\t\t\tdotPlot: \"Dot plot\",\n\t\t\t\tlinePlot: \"Line plot\"\n\t\t\t},\n\t\t\tcategories_zero: \"No categories.\",\n\t\t\tcategories_one: \"{{count}} category: {{categories}}.\",\n\t\t\tcategories_other: \"{{count}} categories: {{categories}}.\",\n\t\t\tvalueRange: \"Values from {{min}} to {{max}}.\",\n\t\t\tlabelledValueRange: \"{{label}} from {{min}} to {{max}}.\"\n\t\t},\n\t\tgraphing: {\n\t\t\tgraph: \"Coordinate graph\",\n\t\t\taxisRange: \"{{axis}} axis from {{min}} to {{max}}.\",\n\t\t\tplotted_zero: \"Nothing plotted.\",\n\t\t\tplotted_one: \"{{count}} object plotted: {{marks}}.\",\n\t\t\tplotted_other: \"{{count}} objects plotted: {{marks}}.\",\n\t\t\tshadedRegion: \"Shaded region\",\n\t\t\tpoint: \"Point\",\n\t\t\tcircle: \"Circle\",\n\t\t\tline: \"Line\",\n\t\t\tparabola: \"Parabola\",\n\t\t\tabsolute: \"Absolute Value\",\n\t\t\texponential: \"Exponential\",\n\t\t\tpolygon: \"Polygon\",\n\t\t\tray: \"Ray\",\n\t\t\tsegment: \"Segment\",\n\t\t\tsine: \"Sine\",\n\t\t\tvector: \"Vector\",\n\t\t\tlabel: \"Label\",\n\t\t\tmarkLabel: \"Label at ({{x}}, {{y}})\",\n\t\t\tcorrectMarkLabel: \"Correct label at ({{x}}, {{y}})\",\n\t\t\tredo: \"Redo\",\n\t\t\treset: \"Reset\",\n\t\t\tkeyLegend: {\n\t\t\t\tmissingRequiredLabel: \"Missing Required Label\",\n\t\t\t\tanswerKeyCorrect: \"Answer Key Correct\",\n\t\t\t\tanswerKeyCorrectLabel: \"Answer Key Correct Label\",\n\t\t\t\tstudentIncorrect: \"Student Incorrect\",\n\t\t\t\tincorrectStudentLabel: \"Incorrect Student Label\",\n\t\t\t\tstudentCorrect: \"Student Correct\",\n\t\t\t\tstudentCorrectLabel: \"Student Correct Label\"\n\t\t\t}\n\t\t},\n\t\tmathInline: {\n\t\t\tkeypadInstructions: \"This field supports both keypad and keyboard input. Use the keyboard to access and interact with the on-screen math keypad, which accepts LaTeX markup. Use the down arrow key to open the keypad and navigate its buttons. Use the escape key to close the keypad and return to the input field.\",\n\t\t\tmathEquationResponseQuestion: \"Math Equation Response Question\",\n\t\t\tmathResponseQuestion: \"Math Response Question\",\n\t\t\tprimaryCorrectWithAlternates: \"Note: The answer shown above is the primary correct answer specified by the author for this item, but other answers may also be recognized as correct.\"\n\t\t},\n\t\tmathInput: { enterAnswer: \"Enter answer\" },\n\t\tmcPopulatedBlank: {\n\t\t\tanswerChoices: \"Answer choices\",\n\t\t\tblankLabel: \"blank\",\n\t\t\temptyBlank: \"(blank)\",\n\t\t\tblankPreSelectionHint: \"The answer you choose will appear on the blank line above.\",\n\t\t\tcorrectAnswerSelected: \"Correct answer selected\",\n\t\t\tincorrectAnswerSelected: \"Incorrect answer selected\",\n\t\t\tselectedAnswerImage: \"Selected answer image\",\n\t\t\tchoiceImage: \"Choice {{id}}\",\n\t\t\tclickToEnableAutoplay: \"Click to enable audio autoplay\",\n\t\t\taudioResourceUnavailable: \"Audio is enabled but no playable audio URL is configured.\",\n\t\t\tlisten: \"Listen\",\n\t\t\tlistenSilentAlt: \"Repeat instructions\",\n\t\t\tlistenPlayingAlt: \"Instructions are playing\",\n\t\t\tprintAudio: \"Audio:\",\n\t\t\tprintTranscript: \"Transcript:\"\n\t\t},\n\t\tmultipleChoice: {\n\t\t\tminSelections: \"Select at least {{minSelections}}.\",\n\t\t\tmaxSelections_one: \"Only {{maxSelections}} answer is allowed.\",\n\t\t\tmaxSelections_other: \"Only {{maxSelections}} answers are allowed.\",\n\t\t\tminmaxSelections_equal: \"Select {{minSelections}}.\",\n\t\t\tminmaxSelections_range: \"Select between {{minSelections}} and {{maxSelections}}.\",\n\t\t\tmultipleChoiceQuestion: \"Multiple Choice Question\",\n\t\t\tmultipleCorrectAnswerQuestion: \"Multiple Correct Answer Question\",\n\t\t\tmultipleSelectQuestion: \"Multiple Select Question\"\n\t\t},\n\t\trubric: {\n\t\t\trubric: \"Rubric\",\n\t\t\tshowRubric: \"Show Rubric\",\n\t\t\thideRubric: \"Hide Rubric\"\n\t\t},\n\t\tselectText: {\n\t\t\tcorrectAnswerSelected: \"Correct\",\n\t\t\tcorrectAnswerNotSelected: \"Correct Answer Not Selected\",\n\t\t\tincorrectSelection: \"Incorrect Selection\",\n\t\t\tkey: \"Key\",\n\t\t\ttextGroup: \"Selectable text\",\n\t\t\ttextGroupWithLimit: \"Selectable text, select up to {{max}}\",\n\t\t\ttokenPosition: \"{{index}} of {{total}}\"\n\t\t},\n\t\tsimpleCloze: {\n\t\t\tcorrectAnswerShown: \"Correct answer\",\n\t\t\tcorrect: \"Correct\",\n\t\t\tincorrect: \"Incorrect\",\n\t\t\tunanswered: \"No answer\",\n\t\t\tplaceholder: \"Enter your answer...\",\n\t\t\tanswerInput: \"Your answer\",\n\t\t\tprintCorrectAnswer: \"Correct answer:\",\n\t\t\tprintAnswerBlank: \"Answer blank\"\n\t\t},\n\t\tvennClassification: {\n\t\t\ttray: \"Tiles to classify\",\n\t\t\tunknownTarget: \"unknown\",\n\t\t\tcancelled: \"Cancelled\",\n\t\t\treturnedToTray: \"{{name}} returned to tray\",\n\t\t\tplacedIn: \"{{name}} placed in {{target}}\",\n\t\t\tpickedUp: \"Picked up {{name}}\",\n\t\t\tpickedUpWithKeyboard: \"Picked up {{name}}, drop target: {{target}}. Use arrow keys to choose a drop target, Enter to drop, Escape to cancel.\",\n\t\t\tdropTarget: \"Drop target: {{target}}\",\n\t\t\tunsupportedCircles_one: \"This diagram cannot be shown: it has {{count}} circle, and only {{supported}} are supported.\",\n\t\t\tunsupportedCircles_other: \"This diagram cannot be shown: it has {{count}} circles, and only {{supported}} are supported.\",\n\t\t\tsetNumber: \"Set {{number}}\",\n\t\t\tregionOnly: \"{{set}} only\",\n\t\t\tregionNeither: \"Neither {{first}} nor {{second}}\",\n\t\t\tregionNoneOf: \"None of {{sets}}\",\n\t\t\tregionAndSeparator: \" and \",\n\t\t\ttileFallbackName: \"Tile\",\n\t\t\ttileNotPlaced: \"not placed\",\n\t\t\ttileInRegion: \"in {{region}}\",\n\t\t\ttileCorrect: \"correct\",\n\t\t\ttileIncorrect: \"incorrect\"\n\t\t}\n\t},\n\tcommon: {\n\t\tundo: \"Undo\",\n\t\tclearAll: \"Clear all\",\n\t\tcorrect: \"Correct\",\n\t\tincorrect: \"Incorrect\",\n\t\tshowCorrectAnswer: \"Show correct answer\",\n\t\thideCorrectAnswer: \"Hide correct answer\",\n\t\tshowTeacherInstructions: \"Show Teacher Instructions\",\n\t\thideTeacherInstructions: \"Hide Teacher Instructions\",\n\t\tshow: \"Show\",\n\t\thide: \"Hide\",\n\t\tshowRationale: \"Show Rationale\",\n\t\thideRationale: \"Hide Rationale\",\n\t\tcommonCorrectAnswerWithAlternates: \"Note: The answer shown above is the most common correct answer for this item. One or more additional correct answers are also defined, and will also be recognized as correct.\",\n\t\twarning: \"Warning\",\n\t\tshowNote: \"Show Note\",\n\t\thideNote: \"Hide Note\",\n\t\tcancel: \"Cancel\",\n\t\tplayAudio: \"Play audio\"\n\t}\n};\n//#endregion\nexport { e as default };\n","//#region src/es.ts\nvar e = {\n\ttranslation: {\n\t\tcategorize: {\n\t\t\tlimitMaxChoicesPerCategory: \"Has alcanzado el límite de {{maxChoicesPerCategory}} respuestas por área. Para agregar otra respuesta, primero se debe eliminar una respuesta.\",\n\t\t\tmaxChoicesPerCategoryRestriction: \"Para cambiar este valor a {{maxChoicesPerCategory}}, cada categoría debe tener {{maxChoicesPerCategory}} o menos opciones de respuesta\"\n\t\t},\n\t\tdragInTheBlank: { blank: \"Espacio en blanco {{index}}\" },\n\t\tebsr: {\n\t\t\tpart: \"Parte {{index}}\",\n\t\t\ttwoPartQuestion: \"Pregunta de dos partes\"\n\t\t},\n\t\teditableHtml: {\n\t\t\tresponseAreaToolbar: \"Área de respuesta\",\n\t\t\ttoolbar: \"Herramientas de edición\",\n\t\t\tbuttons: {\n\t\t\t\tinsertTable: \"Insertar tabla\",\n\t\t\t\taddTableRow: \"Agregar fila a la tabla\",\n\t\t\t\tremoveTableRow: \"Eliminar fila de la tabla\",\n\t\t\t\taddTableColumn: \"Agregar columna a la tabla\",\n\t\t\t\tremoveTableColumn: \"Eliminar columna de la tabla\",\n\t\t\t\tremoveTable: \"Eliminar tabla\",\n\t\t\t\ttableBorders: \"Bordes de la tabla\",\n\t\t\t\tbold: \"Negrita\",\n\t\t\t\titalic: \"Cursiva\",\n\t\t\t\tstrikethrough: \"Tachado\",\n\t\t\t\tcode: \"Código\",\n\t\t\t\tunderline: \"Subrayado\",\n\t\t\t\tsubscript: \"Subíndice\",\n\t\t\t\tsuperscript: \"Superíndice\",\n\t\t\t\tinsertImage: \"Insertar imagen\",\n\t\t\t\tinsertVideo: \"Insertar video\",\n\t\t\t\tinsertAudio: \"Insertar audio\",\n\t\t\t\tcssClasses: \"Clases CSS\",\n\t\t\t\tblockquote: \"Cita en bloque\",\n\t\t\t\theading: \"Encabezado\",\n\t\t\t\tinsertMath: \"Insertar expresión matemática\",\n\t\t\t\tspanishCharacters: \"Caracteres del español (ñ)\",\n\t\t\t\tspecialCharacters: \"Caracteres especiales (€)\",\n\t\t\t\ttextAlignment: \"Alineación del texto\",\n\t\t\t\tbulletedList: \"Lista con viñetas\",\n\t\t\t\tnumberedList: \"Lista numerada\",\n\t\t\t\tdone: \"Listo\"\n\t\t\t}\n\t\t},\n\t\texplicitConstructedResponse: {\n\t\t\tfillInTheBlankQuestion: \"Pregunta para completar espacios en blanco\",\n\t\t\tresponse: \"Respuesta {{index}} de {{total}}\"\n\t\t},\n\t\textendedTextEntry: {\n\t\t\tcomment: \"Comentario\",\n\t\t\tconstructedResponseQuestion: \"Pregunta de respuesta construida\",\n\t\t\tresponse: \"Tu respuesta\",\n\t\t\twrittenResponseQuestion: \"Pregunta de respuesta escrita\"\n\t\t},\n\t\tfractionModel: {\n\t\t\tmodelLabel_one: \"Modelo {{index}} de {{total}}: {{selected}} de {{count}} parte seleccionada\",\n\t\t\tmodelLabel_other: \"Modelo {{index}} de {{total}}: {{selected}} de {{count}} partes seleccionadas\"\n\t\t},\n\t\tnumberLine: {\n\t\t\taddElementLimit_one: \"Solo puedes agregar {{count}} elemento\",\n\t\t\taddElementLimit_other: \"Solo puedes agregar {{count}} elementos\",\n\t\t\tclearAll: \"Borrar todo\",\n\t\t\tclosedEnd: \"cerrado\",\n\t\t\telementCorrect: \"Correcto.\",\n\t\t\telementIncorrect: \"Incorrecto.\",\n\t\t\tgraphLabel: \"Recta numérica de {{min}} a {{max}}, con una marca cada {{interval}}\",\n\t\t\tline: \"Línea de {{left}} ({{leftEnd}}) a {{right}} ({{rightEnd}}).\",\n\t\t\topenEnd: \"abierto\",\n\t\t\tplottedNone: \"No hay nada marcado en la recta.\",\n\t\t\tpointClosed: \"Punto cerrado en {{position}}.\",\n\t\t\tpointOpen: \"Punto abierto en {{position}}.\",\n\t\t\trayLeft: \"Rayo desde {{position}} ({{end}}) hacia la izquierda.\",\n\t\t\trayRight: \"Rayo desde {{position}} ({{end}}) hacia la derecha.\"\n\t\t},\n\t\thotspot: {\n\t\t\tcorrectlySelected: \"Seleccionada correctamente\",\n\t\t\timage_one: \"Imagen con {{count}} zona activa\",\n\t\t\timage_other: \"Imagen con {{count}} zonas activas\",\n\t\t\tshape: \"Zona activa {{index}} de {{total}}\",\n\t\t\tshouldHaveBeenSelected: \"Debía seleccionarse\",\n\t\t\tshouldNotHaveBeenSelected: \"No debía seleccionarse\"\n\t\t},\n\t\timageClozeAssociation: {\n\t\t\tanswerChoice: \"Opción de respuesta {{index}} de {{total}}\",\n\t\t\timage_one: \"Imagen con {{count}} área de respuesta\",\n\t\t\timage_other: \"Imagen con {{count}} áreas de respuesta\",\n\t\t\treachedLimit_one: \"Has alcanzado el límite de {{count}} respuesta por área. Para agregar otra respuesta, primero se debe eliminar una respuesta.\",\n\t\t\treachedLimit_other: \"Lleno\",\n\t\t\tresponseArea: \"Área de respuesta {{index}} de {{total}}\"\n\t\t},\n\t\tinlineDropdown: {\n\t\t\tinlineDropdownQuestion: \"Pregunta con menú desplegable\",\n\t\t\tquery: \"Consulta\",\n\t\t\tqueryNumber: \"Consulta {{index}}\",\n\t\t\tshowRationaleForChoices: \"Mostrar justificación de las opciones\",\n\t\t\thideRationaleForChoices: \"Ocultar justificación de las opciones\"\n\t\t},\n\t\tdrawingResponse: {\n\t\t\tfillColor: \"Color de relleno\",\n\t\t\toutlineColor: \"Color del contorno\",\n\t\t\tnoFill: \"Sin relleno\",\n\t\t\tlightblue: \"Azul claro\",\n\t\t\tlightyellow: \"Amarillo claro\",\n\t\t\tred: \"Rojo\",\n\t\t\torange: \"Naranja\",\n\t\t\tyellow: \"Amarillo\",\n\t\t\tviolet: \"Violeta\",\n\t\t\tblue: \"Azul\",\n\t\t\tgreen: \"Verde\",\n\t\t\twhite: \"Blanco\",\n\t\t\tblack: \"Negro\",\n\t\t\tonDoubleClick: \"Haz doble clic para revisar este texto. Presiona el botón de ingreso para enviar\",\n\t\t\tdrawingArea: \"Área de dibujo\",\n\t\t\tdrawingAreaOverImage: \"Área de dibujo sobre una imagen de fondo\",\n\t\t\ttools: {\n\t\t\t\tselect: \"Seleccionar\",\n\t\t\t\tfreeDraw: \"Dibujo libre\",\n\t\t\t\tline: \"Línea\",\n\t\t\t\trectangle: \"Rectángulo\",\n\t\t\t\tcircle: \"Círculo\",\n\t\t\t\ttextEntry: \"Entrada de texto\",\n\t\t\t\teraser: \"Borrador\"\n\t\t\t}\n\t\t},\n\t\tcharting: {\n\t\t\taddCategory: \"Añadir categoría\",\n\t\t\tactions: \"Acciones\",\n\t\t\tadd: \"Añadir\",\n\t\t\tdelete: \"Eliminar\",\n\t\t\tnewLabel: \"Nueva etiqueta\",\n\t\t\tcategoryLabel: \"Etiqueta de la categoría {{index}}\",\n\t\t\tcategoryLabelValue: \"Etiqueta de la categoría {{index}}: {{label}}\",\n\t\t\tcategory: \"Categoría {{index}}\",\n\t\t\treachedLimit_other: \"No puede haber más de {{count}} categorías.\",\n\t\t\tkeyLegend: {\n\t\t\t\tincorrectAnswer: \"Respuesta incorrecta del estudiante\",\n\t\t\t\tcorrectAnswer: \"Respuesta correcta del estudiante\",\n\t\t\t\tcorrectKeyAnswer: \"Clave de respuesta correcta\"\n\t\t\t},\n\t\t\tchartTypes: {\n\t\t\t\tbar: \"Gráfico de barras\",\n\t\t\t\thistogram: \"Histograma\",\n\t\t\t\tlineDot: \"Gráfico de líneas con puntos\",\n\t\t\t\tlineCross: \"Gráfico de líneas con cruces\",\n\t\t\t\tdotPlot: \"Diagrama de puntos\",\n\t\t\t\tlinePlot: \"Diagrama de líneas\"\n\t\t\t},\n\t\t\tcategories_zero: \"Sin categorías.\",\n\t\t\tcategories_one: \"{{count}} categoría: {{categories}}.\",\n\t\t\tcategories_other: \"{{count}} categorías: {{categories}}.\",\n\t\t\tvalueRange: \"Valores de {{min}} a {{max}}.\",\n\t\t\tlabelledValueRange: \"{{label}} de {{min}} a {{max}}.\"\n\t\t},\n\t\tgraphing: {\n\t\t\tgraph: \"Gráfica de coordenadas\",\n\t\t\taxisRange: \"Eje {{axis}} de {{min}} a {{max}}.\",\n\t\t\tplotted_zero: \"Nada trazado.\",\n\t\t\tplotted_one: \"{{count}} objeto trazado: {{marks}}.\",\n\t\t\tplotted_other: \"{{count}} objetos trazados: {{marks}}.\",\n\t\t\tshadedRegion: \"Región sombreada\",\n\t\t\tpoint: \"Punto\",\n\t\t\tcircle: \"Circulo\",\n\t\t\tline: \"Línea\",\n\t\t\tparabola: \"Parábola\",\n\t\t\tabsolute: \"Valor absoluto\",\n\t\t\texponential: \"Exponencial\",\n\t\t\tpolygon: \"Polígono\",\n\t\t\tray: \"Semirrecta\",\n\t\t\tsegment: \"Segmento \",\n\t\t\tsine: \"Seno\",\n\t\t\tvector: \"Vector\",\n\t\t\tlabel: \"Etiqueta\",\n\t\t\tmarkLabel: \"Etiqueta en ({{x}}, {{y}})\",\n\t\t\tcorrectMarkLabel: \"Etiqueta correcta en ({{x}}, {{y}})\",\n\t\t\tredo: \"Rehacer\",\n\t\t\treset: \"Reiniciar\",\n\t\t\tkeyLegend: {\n\t\t\t\tmissingRequiredLabel: \"Falta una etiqueta obligatoria\",\n\t\t\t\tanswerKeyCorrect: \"Clave de respuesta correcta\",\n\t\t\t\tanswerKeyCorrectLabel: \"Etiqueta correcta de la clave de respuesta\",\n\t\t\t\tstudentIncorrect: \"Respuesta incorrecta del estudiante\",\n\t\t\t\tincorrectStudentLabel: \"Etiqueta incorrecta del estudiante\",\n\t\t\t\tstudentCorrect: \"Respuesta correcta del estudiante\",\n\t\t\t\tstudentCorrectLabel: \"Etiqueta correcta del estudiante\"\n\t\t\t}\n\t\t},\n\t\tmathInline: {\n\t\t\tkeypadInstructions: \"Este campo admite la entrada con el teclado en pantalla y con el teclado físico. Usa el teclado físico para acceder al teclado matemático en pantalla e interactuar con él; este acepta notación LaTeX. Usa la tecla de flecha hacia abajo para abrir el teclado en pantalla y recorrer sus botones. Usa la tecla Escape para cerrar el teclado en pantalla y volver al campo de entrada.\",\n\t\t\tmathEquationResponseQuestion: \"Pregunta de respuesta con ecuación matemática\",\n\t\t\tmathResponseQuestion: \"Pregunta de respuesta matemática\",\n\t\t\tprimaryCorrectWithAlternates: \"Nota: La respuesta que se muestra arriba es la respuesta correcta principal especificada por el autor para esta pregunta, pero también se pueden reconocer otras respuestas como correctas.\"\n\t\t},\n\t\tmathInput: { enterAnswer: \"Escribe la respuesta\" },\n\t\tmcPopulatedBlank: {\n\t\t\tanswerChoices: \"Opciones de respuesta\",\n\t\t\tblankLabel: \"espacio en blanco\",\n\t\t\temptyBlank: \"(en blanco)\",\n\t\t\tblankPreSelectionHint: \"La respuesta que elijas aparecerá en la línea en blanco de arriba.\",\n\t\t\tcorrectAnswerSelected: \"Respuesta correcta seleccionada\",\n\t\t\tincorrectAnswerSelected: \"Respuesta incorrecta seleccionada\",\n\t\t\tselectedAnswerImage: \"Imagen de la respuesta seleccionada\",\n\t\t\tchoiceImage: \"Opción {{id}}\",\n\t\t\tclickToEnableAutoplay: \"Haz clic para activar la reproducción automática del audio\",\n\t\t\taudioResourceUnavailable: \"El audio está activado, pero no hay una URL de audio reproducible configurada.\",\n\t\t\tlisten: \"Escuchar\",\n\t\t\tlistenSilentAlt: \"Escuchar. Repetir las instrucciones.\",\n\t\t\tlistenPlayingAlt: \"Escuchar. Estas son las instrucciones.\",\n\t\t\tprintAudio: \"Audio:\",\n\t\t\tprintTranscript: \"Transcripción:\"\n\t\t},\n\t\tmultipleChoice: {\n\t\t\tminSelections: \"Seleccione al menos {{minSelections}}.\",\n\t\t\tmaxSelections_one: \"Sólo se permite {{maxSelections}} respuesta.\",\n\t\t\tmaxSelections_other: \"Sólo se permiten {{maxSelections}} respuestas.\",\n\t\t\tminmaxSelections_equal: \"Seleccione {{minSelections}}.\",\n\t\t\tminmaxSelections_range: \"Seleccione entre {{minSelections}} y {{maxSelections}}.\",\n\t\t\tmultipleChoiceQuestion: \"Pregunta de opción múltiple\",\n\t\t\tmultipleCorrectAnswerQuestion: \"Pregunta con varias respuestas correctas\",\n\t\t\tmultipleSelectQuestion: \"Pregunta de selección múltiple\"\n\t\t},\n\t\trubric: {\n\t\t\trubric: \"Rúbrica\",\n\t\t\tshowRubric: \"Mostrar rúbrica\",\n\t\t\thideRubric: \"Ocultar rúbrica\"\n\t\t},\n\t\tselectText: {\n\t\t\tcorrectAnswerSelected: \"Respuesta Correcta\",\n\t\t\tcorrectAnswerNotSelected: \"Respuesta Correcta No Seleccionada\",\n\t\t\tincorrectSelection: \"Selección Incorrecta\",\n\t\t\tkey: \"Clave\",\n\t\t\ttextGroup: \"Texto seleccionable\",\n\t\t\ttextGroupWithLimit: \"Texto seleccionable, selecciona hasta {{max}}\",\n\t\t\ttokenPosition: \"{{index}} de {{total}}\"\n\t\t},\n\t\tsimpleCloze: {\n\t\t\tcorrectAnswerShown: \"Respuesta correcta\",\n\t\t\tcorrect: \"Correcto\",\n\t\t\tincorrect: \"Incorrecto\",\n\t\t\tunanswered: \"Sin respuesta\",\n\t\t\tplaceholder: \"Escribe tu respuesta...\",\n\t\t\tanswerInput: \"Tu respuesta\",\n\t\t\tprintCorrectAnswer: \"Respuesta correcta:\",\n\t\t\tprintAnswerBlank: \"Espacio para la respuesta\"\n\t\t},\n\t\tvennClassification: {\n\t\t\ttray: \"Fichas para clasificar\",\n\t\t\tunknownTarget: \"desconocido\",\n\t\t\tcancelled: \"Cancelado\",\n\t\t\treturnedToTray: \"Se devolvió {{name}} a la bandeja\",\n\t\t\tplacedIn: \"Se colocó {{name}} en {{target}}\",\n\t\t\tpickedUp: \"Se tomó {{name}}\",\n\t\t\tpickedUpWithKeyboard: \"Se tomó {{name}}, destino: {{target}}. Usa las flechas para elegir un destino, Enter para soltar y Escape para cancelar.\",\n\t\t\tdropTarget: \"Destino: {{target}}\",\n\t\t\tunsupportedCircles_one: \"No se puede mostrar este diagrama: tiene {{count}} círculo, y solo se admiten {{supported}}.\",\n\t\t\tunsupportedCircles_other: \"No se puede mostrar este diagrama: tiene {{count}} círculos, y solo se admiten {{supported}}.\",\n\t\t\tsetNumber: \"Conjunto {{number}}\",\n\t\t\tregionOnly: \"Solo {{set}}\",\n\t\t\tregionNeither: \"Ni {{first}} ni {{second}}\",\n\t\t\tregionNoneOf: \"Ninguno de {{sets}}\",\n\t\t\tregionAndSeparator: \" y \",\n\t\t\ttileFallbackName: \"Ficha\",\n\t\t\ttileNotPlaced: \"sin colocar\",\n\t\t\ttileInRegion: \"en {{region}}\",\n\t\t\ttileCorrect: \"correcta\",\n\t\t\ttileIncorrect: \"incorrecta\"\n\t\t}\n\t},\n\tcommon: {\n\t\tundo: \"Deshacer\",\n\t\tclearAll: \"Borrar todo\",\n\t\tcorrect: \"Correcto\",\n\t\tincorrect: \"Incorrecto\",\n\t\tshowCorrectAnswer: \"Mostrar respuesta correcta\",\n\t\thideCorrectAnswer: \"Ocultar respuesta correcta\",\n\t\tshowTeacherInstructions: \"Mostrar instrucciones para el maestro\",\n\t\thideTeacherInstructions: \"Ocultar instrucciones para el maestro\",\n\t\tshow: \"Mostrar\",\n\t\thide: \"Ocultar\",\n\t\tshowRationale: \"Mostrar justificación\",\n\t\thideRationale: \"Ocultar justificación\",\n\t\tcommonCorrectAnswerWithAlternates: \"Nota: La respuesta que se muestra arriba es la respuesta correcta más común para esta pregunta. También se definen una o más respuestas correctas adicionales, y también se reconocerán como correctas.\",\n\t\twarning: \"Advertencia\",\n\t\tshowNote: \"Mostrar Nota\",\n\t\thideNote: \"Ocultar Nota\",\n\t\tcancel: \"Cancelar\",\n\t\tplayAudio: \"Reproducir audio\"\n\t}\n};\n//#endregion\nexport { e as default };\n","const isString = obj => typeof obj === 'string';\nconst defer = () => {\n let res;\n let rej;\n const promise = new Promise((resolve, reject) => {\n res = resolve;\n rej = reject;\n });\n promise.resolve = res;\n promise.reject = rej;\n return promise;\n};\nconst makeString = object => {\n if (object == null) return '';\n return '' + object;\n};\nconst copy = (a, s, t) => {\n a.forEach(m => {\n if (s[m]) t[m] = s[m];\n });\n};\nconst lastOfPathSeparatorRegExp = /###/g;\nconst cleanKey = key => key && key.indexOf('###') > -1 ? key.replace(lastOfPathSeparatorRegExp, '.') : key;\nconst canNotTraverseDeeper = object => !object || isString(object);\nconst getLastOfPath = (object, path, Empty) => {\n const stack = !isString(path) ? path : path.split('.');\n let stackIndex = 0;\n while (stackIndex < stack.length - 1) {\n if (canNotTraverseDeeper(object)) return {};\n const key = cleanKey(stack[stackIndex]);\n if (!object[key] && Empty) object[key] = new Empty();\n if (Object.prototype.hasOwnProperty.call(object, key)) {\n object = object[key];\n } else {\n object = {};\n }\n ++stackIndex;\n }\n if (canNotTraverseDeeper(object)) return {};\n return {\n obj: object,\n k: cleanKey(stack[stackIndex])\n };\n};\nconst setPath = (object, path, newValue) => {\n const {\n obj,\n k\n } = getLastOfPath(object, path, Object);\n if (obj !== undefined || path.length === 1) {\n obj[k] = newValue;\n return;\n }\n let e = path[path.length - 1];\n let p = path.slice(0, path.length - 1);\n let last = getLastOfPath(object, p, Object);\n while (last.obj === undefined && p.length) {\n e = `${p[p.length - 1]}.${e}`;\n p = p.slice(0, p.length - 1);\n last = getLastOfPath(object, p, Object);\n if (last?.obj && typeof last.obj[`${last.k}.${e}`] !== 'undefined') {\n last.obj = undefined;\n }\n }\n last.obj[`${last.k}.${e}`] = newValue;\n};\nconst pushPath = (object, path, newValue, concat) => {\n const {\n obj,\n k\n } = getLastOfPath(object, path, Object);\n obj[k] = obj[k] || [];\n obj[k].push(newValue);\n};\nconst getPath = (object, path) => {\n const {\n obj,\n k\n } = getLastOfPath(object, path);\n if (!obj) return undefined;\n if (!Object.prototype.hasOwnProperty.call(obj, k)) return undefined;\n return obj[k];\n};\nconst getPathWithDefaults = (data, defaultData, key) => {\n const value = getPath(data, key);\n if (value !== undefined) {\n return value;\n }\n return getPath(defaultData, key);\n};\nconst deepExtend = (target, source, overwrite) => {\n for (const prop in source) {\n if (prop !== '__proto__' && prop !== 'constructor') {\n if (prop in target) {\n if (isString(target[prop]) || target[prop] instanceof String || isString(source[prop]) || source[prop] instanceof String) {\n if (overwrite) target[prop] = source[prop];\n } else {\n deepExtend(target[prop], source[prop], overwrite);\n }\n } else {\n target[prop] = source[prop];\n }\n }\n }\n return target;\n};\nconst regexEscape = str => str.replace(/[\\-\\[\\]\\/\\{\\}\\(\\)\\*\\+\\?\\.\\\\\\^\\$\\|]/g, '\\\\$&');\nvar _entityMap = {\n '&': '&amp;',\n '<': '&lt;',\n '>': '&gt;',\n '\"': '&quot;',\n \"'\": '&#39;',\n '/': '&#x2F;'\n};\nconst escape = data => {\n if (isString(data)) {\n return data.replace(/[&<>\"'\\/]/g, s => _entityMap[s]);\n }\n return data;\n};\nclass RegExpCache {\n constructor(capacity) {\n this.capacity = capacity;\n this.regExpMap = new Map();\n this.regExpQueue = [];\n }\n getRegExp(pattern) {\n const regExpFromCache = this.regExpMap.get(pattern);\n if (regExpFromCache !== undefined) {\n return regExpFromCache;\n }\n const regExpNew = new RegExp(pattern);\n if (this.regExpQueue.length === this.capacity) {\n this.regExpMap.delete(this.regExpQueue.shift());\n }\n this.regExpMap.set(pattern, regExpNew);\n this.regExpQueue.push(pattern);\n return regExpNew;\n }\n}\nconst chars = [' ', ',', '?', '!', ';'];\nconst looksLikeObjectPathRegExpCache = new RegExpCache(20);\nconst looksLikeObjectPath = (key, nsSeparator, keySeparator) => {\n nsSeparator = nsSeparator || '';\n keySeparator = keySeparator || '';\n const possibleChars = chars.filter(c => nsSeparator.indexOf(c) < 0 && keySeparator.indexOf(c) < 0);\n if (possibleChars.length === 0) return true;\n const r = looksLikeObjectPathRegExpCache.getRegExp(`(${possibleChars.map(c => c === '?' ? '\\\\?' : c).join('|')})`);\n let matched = !r.test(key);\n if (!matched) {\n const ki = key.indexOf(keySeparator);\n if (ki > 0 && !r.test(key.substring(0, ki))) {\n matched = true;\n }\n }\n return matched;\n};\nconst deepFind = (obj, path, keySeparator = '.') => {\n if (!obj) return undefined;\n if (obj[path]) {\n if (!Object.prototype.hasOwnProperty.call(obj, path)) return undefined;\n return obj[path];\n }\n const tokens = path.split(keySeparator);\n let current = obj;\n for (let i = 0; i < tokens.length;) {\n if (!current || typeof current !== 'object') {\n return undefined;\n }\n let next;\n let nextPath = '';\n for (let j = i; j < tokens.length; ++j) {\n if (j !== i) {\n nextPath += keySeparator;\n }\n nextPath += tokens[j];\n next = current[nextPath];\n if (next !== undefined) {\n if (['string', 'number', 'boolean'].indexOf(typeof next) > -1 && j < tokens.length - 1) {\n continue;\n }\n i += j - i + 1;\n break;\n }\n }\n current = next;\n }\n return current;\n};\nconst getCleanedCode = code => code?.replace(/_/g, '-');\n\nconst consoleLogger = {\n type: 'logger',\n log(args) {\n this.output('log', args);\n },\n warn(args) {\n this.output('warn', args);\n },\n error(args) {\n this.output('error', args);\n },\n output(type, args) {\n console?.[type]?.apply?.(console, args);\n }\n};\nclass Logger {\n constructor(concreteLogger, options = {}) {\n this.init(concreteLogger, options);\n }\n init(concreteLogger, options = {}) {\n this.prefix = options.prefix || 'i18next:';\n this.logger = concreteLogger || consoleLogger;\n this.options = options;\n this.debug = options.debug;\n }\n log(...args) {\n return this.forward(args, 'log', '', true);\n }\n warn(...args) {\n return this.forward(args, 'warn', '', true);\n }\n error(...args) {\n return this.forward(args, 'error', '');\n }\n deprecate(...args) {\n return this.forward(args, 'warn', 'WARNING DEPRECATED: ', true);\n }\n forward(args, lvl, prefix, debugOnly) {\n if (debugOnly && !this.debug) return null;\n if (isString(args[0])) args[0] = `${prefix}${this.prefix} ${args[0]}`;\n return this.logger[lvl](args);\n }\n create(moduleName) {\n return new Logger(this.logger, {\n ...{\n prefix: `${this.prefix}:${moduleName}:`\n },\n ...this.options\n });\n }\n clone(options) {\n options = options || this.options;\n options.prefix = options.prefix || this.prefix;\n return new Logger(this.logger, options);\n }\n}\nvar baseLogger = new Logger();\n\nclass EventEmitter {\n constructor() {\n this.observers = {};\n }\n on(events, listener) {\n events.split(' ').forEach(event => {\n if (!this.observers[event]) this.observers[event] = new Map();\n const numListeners = this.observers[event].get(listener) || 0;\n this.observers[event].set(listener, numListeners + 1);\n });\n return this;\n }\n off(event, listener) {\n if (!this.observers[event]) return;\n if (!listener) {\n delete this.observers[event];\n return;\n }\n this.observers[event].delete(listener);\n }\n emit(event, ...args) {\n if (this.observers[event]) {\n const cloned = Array.from(this.observers[event].entries());\n cloned.forEach(([observer, numTimesAdded]) => {\n for (let i = 0; i < numTimesAdded; i++) {\n observer(...args);\n }\n });\n }\n if (this.observers['*']) {\n const cloned = Array.from(this.observers['*'].entries());\n cloned.forEach(([observer, numTimesAdded]) => {\n for (let i = 0; i < numTimesAdded; i++) {\n observer.apply(observer, [event, ...args]);\n }\n });\n }\n }\n}\n\nclass ResourceStore extends EventEmitter {\n constructor(data, options = {\n ns: ['translation'],\n defaultNS: 'translation'\n }) {\n super();\n this.data = data || {};\n this.options = options;\n if (this.options.keySeparator === undefined) {\n this.options.keySeparator = '.';\n }\n if (this.options.ignoreJSONStructure === undefined) {\n this.options.ignoreJSONStructure = true;\n }\n }\n addNamespaces(ns) {\n if (this.options.ns.indexOf(ns) < 0) {\n this.options.ns.push(ns);\n }\n }\n removeNamespaces(ns) {\n const index = this.options.ns.indexOf(ns);\n if (index > -1) {\n this.options.ns.splice(index, 1);\n }\n }\n getResource(lng, ns, key, options = {}) {\n const keySeparator = options.keySeparator !== undefined ? options.keySeparator : this.options.keySeparator;\n const ignoreJSONStructure = options.ignoreJSONStructure !== undefined ? options.ignoreJSONStructure : this.options.ignoreJSONStructure;\n let path;\n if (lng.indexOf('.') > -1) {\n path = lng.split('.');\n } else {\n path = [lng, ns];\n if (key) {\n if (Array.isArray(key)) {\n path.push(...key);\n } else if (isString(key) && keySeparator) {\n path.push(...key.split(keySeparator));\n } else {\n path.push(key);\n }\n }\n }\n const result = getPath(this.data, path);\n if (!result && !ns && !key && lng.indexOf('.') > -1) {\n lng = path[0];\n ns = path[1];\n key = path.slice(2).join('.');\n }\n if (result || !ignoreJSONStructure || !isString(key)) return result;\n return deepFind(this.data?.[lng]?.[ns], key, keySeparator);\n }\n addResource(lng, ns, key, value, options = {\n silent: false\n }) {\n const keySeparator = options.keySeparator !== undefined ? options.keySeparator : this.options.keySeparator;\n let path = [lng, ns];\n if (key) path = path.concat(keySeparator ? key.split(keySeparator) : key);\n if (lng.indexOf('.') > -1) {\n path = lng.split('.');\n value = ns;\n ns = path[1];\n }\n this.addNamespaces(ns);\n setPath(this.data, path, value);\n if (!options.silent) this.emit('added', lng, ns, key, value);\n }\n addResources(lng, ns, resources, options = {\n silent: false\n }) {\n for (const m in resources) {\n if (isString(resources[m]) || Array.isArray(resources[m])) this.addResource(lng, ns, m, resources[m], {\n silent: true\n });\n }\n if (!options.silent) this.emit('added', lng, ns, resources);\n }\n addResourceBundle(lng, ns, resources, deep, overwrite, options = {\n silent: false,\n skipCopy: false\n }) {\n let path = [lng, ns];\n if (lng.indexOf('.') > -1) {\n path = lng.split('.');\n deep = resources;\n resources = ns;\n ns = path[1];\n }\n this.addNamespaces(ns);\n let pack = getPath(this.data, path) || {};\n if (!options.skipCopy) resources = JSON.parse(JSON.stringify(resources));\n if (deep) {\n deepExtend(pack, resources, overwrite);\n } else {\n pack = {\n ...pack,\n ...resources\n };\n }\n setPath(this.data, path, pack);\n if (!options.silent) this.emit('added', lng, ns, resources);\n }\n removeResourceBundle(lng, ns) {\n if (this.hasResourceBundle(lng, ns)) {\n delete this.data[lng][ns];\n }\n this.removeNamespaces(ns);\n this.emit('removed', lng, ns);\n }\n hasResourceBundle(lng, ns) {\n return this.getResource(lng, ns) !== undefined;\n }\n getResourceBundle(lng, ns) {\n if (!ns) ns = this.options.defaultNS;\n return this.getResource(lng, ns);\n }\n getDataByLanguage(lng) {\n return this.data[lng];\n }\n hasLanguageSomeTranslations(lng) {\n const data = this.getDataByLanguage(lng);\n const n = data && Object.keys(data) || [];\n return !!n.find(v => data[v] && Object.keys(data[v]).length > 0);\n }\n toJSON() {\n return this.data;\n }\n}\n\nvar postProcessor = {\n processors: {},\n addPostProcessor(module) {\n this.processors[module.name] = module;\n },\n handle(processors, value, key, options, translator) {\n processors.forEach(processor => {\n value = this.processors[processor]?.process(value, key, options, translator) ?? value;\n });\n return value;\n }\n};\n\nconst PATH_KEY = Symbol('i18next/PATH_KEY');\nfunction createProxy() {\n const state = [];\n const handler = Object.create(null);\n let proxy;\n handler.get = (target, key) => {\n proxy?.revoke?.();\n if (key === PATH_KEY) return state;\n state.push(key);\n proxy = Proxy.revocable(target, handler);\n return proxy.proxy;\n };\n return Proxy.revocable(Object.create(null), handler).proxy;\n}\nfunction keysFromSelector(selector, opts) {\n const {\n [PATH_KEY]: path\n } = selector(createProxy());\n const keySeparator = opts?.keySeparator ?? '.';\n const nsSeparator = opts?.nsSeparator ?? ':';\n if (path.length > 1 && nsSeparator) {\n const ns = opts?.ns;\n const nsArray = Array.isArray(ns) ? ns : null;\n if (nsArray && nsArray.length > 1 && nsArray.slice(1).includes(path[0])) {\n return `${path[0]}${nsSeparator}${path.slice(1).join(keySeparator)}`;\n }\n }\n return path.join(keySeparator);\n}\n\nconst checkedLoadedFor = {};\nconst shouldHandleAsObject = res => !isString(res) && typeof res !== 'boolean' && typeof res !== 'number';\nclass Translator extends EventEmitter {\n constructor(services, options = {}) {\n super();\n copy(['resourceStore', 'languageUtils', 'pluralResolver', 'interpolator', 'backendConnector', 'i18nFormat', 'utils'], services, this);\n this.options = options;\n if (this.options.keySeparator === undefined) {\n this.options.keySeparator = '.';\n }\n this.logger = baseLogger.create('translator');\n }\n changeLanguage(lng) {\n if (lng) this.language = lng;\n }\n exists(key, o = {\n interpolation: {}\n }) {\n const opt = {\n ...o\n };\n if (key == null) return false;\n const resolved = this.resolve(key, opt);\n if (resolved?.res === undefined) return false;\n const isObject = shouldHandleAsObject(resolved.res);\n if (opt.returnObjects === false && isObject) {\n return false;\n }\n return true;\n }\n extractFromKey(key, opt) {\n let nsSeparator = opt.nsSeparator !== undefined ? opt.nsSeparator : this.options.nsSeparator;\n if (nsSeparator === undefined) nsSeparator = ':';\n const keySeparator = opt.keySeparator !== undefined ? opt.keySeparator : this.options.keySeparator;\n let namespaces = opt.ns || this.options.defaultNS || [];\n const wouldCheckForNsInKey = nsSeparator && key.indexOf(nsSeparator) > -1;\n const seemsNaturalLanguage = !this.options.userDefinedKeySeparator && !opt.keySeparator && !this.options.userDefinedNsSeparator && !opt.nsSeparator && !looksLikeObjectPath(key, nsSeparator, keySeparator);\n if (wouldCheckForNsInKey && !seemsNaturalLanguage) {\n const m = key.match(this.interpolator.nestingRegexp);\n if (m && m.length > 0) {\n return {\n key,\n namespaces: isString(namespaces) ? [namespaces] : namespaces\n };\n }\n const parts = key.split(nsSeparator);\n if (nsSeparator !== keySeparator || nsSeparator === keySeparator && this.options.ns.indexOf(parts[0]) > -1) namespaces = parts.shift();\n key = parts.join(keySeparator);\n }\n return {\n key,\n namespaces: isString(namespaces) ? [namespaces] : namespaces\n };\n }\n translate(keys, o, lastKey) {\n let opt = typeof o === 'object' ? {\n ...o\n } : o;\n if (typeof opt !== 'object' && this.options.overloadTranslationOptionHandler) {\n opt = this.options.overloadTranslationOptionHandler(arguments);\n }\n if (typeof opt === 'object') opt = {\n ...opt\n };\n if (!opt) opt = {};\n if (keys == null) return '';\n if (typeof keys === 'function') keys = keysFromSelector(keys, {\n ...this.options,\n ...opt\n });\n if (!Array.isArray(keys)) keys = [String(keys)];\n keys = keys.map(k => typeof k === 'function' ? keysFromSelector(k, {\n ...this.options,\n ...opt\n }) : String(k));\n const returnDetails = opt.returnDetails !== undefined ? opt.returnDetails : this.options.returnDetails;\n const keySeparator = opt.keySeparator !== undefined ? opt.keySeparator : this.options.keySeparator;\n const {\n key,\n namespaces\n } = this.extractFromKey(keys[keys.length - 1], opt);\n const namespace = namespaces[namespaces.length - 1];\n let nsSeparator = opt.nsSeparator !== undefined ? opt.nsSeparator : this.options.nsSeparator;\n if (nsSeparator === undefined) nsSeparator = ':';\n const lng = opt.lng || this.language;\n const appendNamespaceToCIMode = opt.appendNamespaceToCIMode || this.options.appendNamespaceToCIMode;\n if (lng?.toLowerCase() === 'cimode') {\n if (appendNamespaceToCIMode) {\n if (returnDetails) {\n return {\n res: `${namespace}${nsSeparator}${key}`,\n usedKey: key,\n exactUsedKey: key,\n usedLng: lng,\n usedNS: namespace,\n usedParams: this.getUsedParamsDetails(opt)\n };\n }\n return `${namespace}${nsSeparator}${key}`;\n }\n if (returnDetails) {\n return {\n res: key,\n usedKey: key,\n exactUsedKey: key,\n usedLng: lng,\n usedNS: namespace,\n usedParams: this.getUsedParamsDetails(opt)\n };\n }\n return key;\n }\n const resolved = this.resolve(keys, opt);\n let res = resolved?.res;\n const resUsedKey = resolved?.usedKey || key;\n const resExactUsedKey = resolved?.exactUsedKey || key;\n const noObject = ['[object Number]', '[object Function]', '[object RegExp]'];\n const joinArrays = opt.joinArrays !== undefined ? opt.joinArrays : this.options.joinArrays;\n const handleAsObjectInI18nFormat = !this.i18nFormat || this.i18nFormat.handleAsObject;\n const needsPluralHandling = opt.count !== undefined && !isString(opt.count);\n const hasDefaultValue = Translator.hasDefaultValue(opt);\n const defaultValueSuffix = needsPluralHandling ? this.pluralResolver.getSuffix(lng, opt.count, opt) : '';\n const defaultValueSuffixOrdinalFallback = opt.ordinal && needsPluralHandling ? this.pluralResolver.getSuffix(lng, opt.count, {\n ordinal: false\n }) : '';\n const needsZeroSuffixLookup = needsPluralHandling && !opt.ordinal && opt.count === 0;\n const defaultValue = needsZeroSuffixLookup && opt[`defaultValue${this.options.pluralSeparator}zero`] || opt[`defaultValue${defaultValueSuffix}`] || opt[`defaultValue${defaultValueSuffixOrdinalFallback}`] || opt.defaultValue;\n let resForObjHndl = res;\n if (handleAsObjectInI18nFormat && !res && hasDefaultValue) {\n resForObjHndl = defaultValue;\n }\n const handleAsObject = shouldHandleAsObject(resForObjHndl);\n const resType = Object.prototype.toString.apply(resForObjHndl);\n if (handleAsObjectInI18nFormat && resForObjHndl && handleAsObject && noObject.indexOf(resType) < 0 && !(isString(joinArrays) && Array.isArray(resForObjHndl))) {\n if (!opt.returnObjects && !this.options.returnObjects) {\n if (!this.options.returnedObjectHandler) {\n this.logger.warn('accessing an object - but returnObjects options is not enabled!');\n }\n const r = this.options.returnedObjectHandler ? this.options.returnedObjectHandler(resUsedKey, resForObjHndl, {\n ...opt,\n ns: namespaces\n }) : `key '${key} (${this.language})' returned an object instead of string.`;\n if (returnDetails) {\n resolved.res = r;\n resolved.usedParams = this.getUsedParamsDetails(opt);\n return resolved;\n }\n return r;\n }\n if (keySeparator) {\n const resTypeIsArray = Array.isArray(resForObjHndl);\n const copy = resTypeIsArray ? [] : {};\n const newKeyToUse = resTypeIsArray ? resExactUsedKey : resUsedKey;\n for (const m in resForObjHndl) {\n if (Object.prototype.hasOwnProperty.call(resForObjHndl, m)) {\n const deepKey = `${newKeyToUse}${keySeparator}${m}`;\n if (hasDefaultValue && !res) {\n copy[m] = this.translate(deepKey, {\n ...opt,\n defaultValue: shouldHandleAsObject(defaultValue) ? defaultValue[m] : undefined,\n ...{\n joinArrays: false,\n ns: namespaces\n }\n });\n } else {\n copy[m] = this.translate(deepKey, {\n ...opt,\n ...{\n joinArrays: false,\n ns: namespaces\n }\n });\n }\n if (copy[m] === deepKey) copy[m] = resForObjHndl[m];\n }\n }\n res = copy;\n }\n } else if (handleAsObjectInI18nFormat && isString(joinArrays) && Array.isArray(res)) {\n res = res.join(joinArrays);\n if (res) res = this.extendTranslation(res, keys, opt, lastKey);\n } else {\n let usedDefault = false;\n let usedKey = false;\n if (!this.isValidLookup(res) && hasDefaultValue) {\n usedDefault = true;\n res = defaultValue;\n }\n if (!this.isValidLookup(res)) {\n usedKey = true;\n res = key;\n }\n const missingKeyNoValueFallbackToKey = opt.missingKeyNoValueFallbackToKey || this.options.missingKeyNoValueFallbackToKey;\n const resForMissing = missingKeyNoValueFallbackToKey && usedKey ? undefined : res;\n const updateMissing = hasDefaultValue && defaultValue !== res && this.options.updateMissing;\n if (usedKey || usedDefault || updateMissing) {\n this.logger.log(updateMissing ? 'updateKey' : 'missingKey', lng, namespace, key, updateMissing ? defaultValue : res);\n if (keySeparator) {\n const fk = this.resolve(key, {\n ...opt,\n keySeparator: false\n });\n if (fk && fk.res) this.logger.warn('Seems the loaded translations were in flat JSON format instead of nested. Either set keySeparator: false on init or make sure your translations are published in nested format.');\n }\n let lngs = [];\n const fallbackLngs = this.languageUtils.getFallbackCodes(this.options.fallbackLng, opt.lng || this.language);\n if (this.options.saveMissingTo === 'fallback' && fallbackLngs && fallbackLngs[0]) {\n for (let i = 0; i < fallbackLngs.length; i++) {\n lngs.push(fallbackLngs[i]);\n }\n } else if (this.options.saveMissingTo === 'all') {\n lngs = this.languageUtils.toResolveHierarchy(opt.lng || this.language);\n } else {\n lngs.push(opt.lng || this.language);\n }\n const send = (l, k, specificDefaultValue) => {\n const defaultForMissing = hasDefaultValue && specificDefaultValue !== res ? specificDefaultValue : resForMissing;\n if (this.options.missingKeyHandler) {\n this.options.missingKeyHandler(l, namespace, k, defaultForMissing, updateMissing, opt);\n } else if (this.backendConnector?.saveMissing) {\n this.backendConnector.saveMissing(l, namespace, k, defaultForMissing, updateMissing, opt);\n }\n this.emit('missingKey', l, namespace, k, res);\n };\n if (this.options.saveMissing) {\n if (this.options.saveMissingPlurals && needsPluralHandling) {\n lngs.forEach(language => {\n const suffixes = this.pluralResolver.getSuffixes(language, opt);\n if (needsZeroSuffixLookup && opt[`defaultValue${this.options.pluralSeparator}zero`] && suffixes.indexOf(`${this.options.pluralSeparator}zero`) < 0) {\n suffixes.push(`${this.options.pluralSeparator}zero`);\n }\n suffixes.forEach(suffix => {\n send([language], key + suffix, opt[`defaultValue${suffix}`] || defaultValue);\n });\n });\n } else {\n send(lngs, key, defaultValue);\n }\n }\n }\n res = this.extendTranslation(res, keys, opt, resolved, lastKey);\n if (usedKey && res === key && this.options.appendNamespaceToMissingKey) {\n res = `${namespace}${nsSeparator}${key}`;\n }\n if ((usedKey || usedDefault) && this.options.parseMissingKeyHandler) {\n res = this.options.parseMissingKeyHandler(this.options.appendNamespaceToMissingKey ? `${namespace}${nsSeparator}${key}` : key, usedDefault ? res : undefined, opt);\n }\n }\n if (returnDetails) {\n resolved.res = res;\n resolved.usedParams = this.getUsedParamsDetails(opt);\n return resolved;\n }\n return res;\n }\n extendTranslation(res, key, opt, resolved, lastKey) {\n if (this.i18nFormat?.parse) {\n res = this.i18nFormat.parse(res, {\n ...this.options.interpolation.defaultVariables,\n ...opt\n }, opt.lng || this.language || resolved.usedLng, resolved.usedNS, resolved.usedKey, {\n resolved\n });\n } else if (!opt.skipInterpolation) {\n if (opt.interpolation) this.interpolator.init({\n ...opt,\n ...{\n interpolation: {\n ...this.options.interpolation,\n ...opt.interpolation\n }\n }\n });\n const skipOnVariables = isString(res) && (opt?.interpolation?.skipOnVariables !== undefined ? opt.interpolation.skipOnVariables : this.options.interpolation.skipOnVariables);\n let nestBef;\n if (skipOnVariables) {\n const nb = res.match(this.interpolator.nestingRegexp);\n nestBef = nb && nb.length;\n }\n let data = opt.replace && !isString(opt.replace) ? opt.replace : opt;\n if (this.options.interpolation.defaultVariables) data = {\n ...this.options.interpolation.defaultVariables,\n ...data\n };\n res = this.interpolator.interpolate(res, data, opt.lng || this.language || resolved.usedLng, opt);\n if (skipOnVariables) {\n const na = res.match(this.interpolator.nestingRegexp);\n const nestAft = na && na.length;\n if (nestBef < nestAft) opt.nest = false;\n }\n if (!opt.lng && resolved && resolved.res) opt.lng = this.language || resolved.usedLng;\n if (opt.nest !== false) res = this.interpolator.nest(res, (...args) => {\n if (lastKey?.[0] === args[0] && !opt.context) {\n this.logger.warn(`It seems you are nesting recursively key: ${args[0]} in key: ${key[0]}`);\n return null;\n }\n return this.translate(...args, key);\n }, opt);\n if (opt.interpolation) this.interpolator.reset();\n }\n const postProcess = opt.postProcess || this.options.postProcess;\n const postProcessorNames = isString(postProcess) ? [postProcess] : postProcess;\n if (res != null && postProcessorNames?.length && opt.applyPostProcessor !== false) {\n res = postProcessor.handle(postProcessorNames, res, key, this.options && this.options.postProcessPassResolved ? {\n i18nResolved: {\n ...resolved,\n usedParams: this.getUsedParamsDetails(opt)\n },\n ...opt\n } : opt, this);\n }\n return res;\n }\n resolve(keys, opt = {}) {\n let found;\n let usedKey;\n let exactUsedKey;\n let usedLng;\n let usedNS;\n if (isString(keys)) keys = [keys];\n if (Array.isArray(keys)) keys = keys.map(k => typeof k === 'function' ? keysFromSelector(k, {\n ...this.options,\n ...opt\n }) : k);\n keys.forEach(k => {\n if (this.isValidLookup(found)) return;\n const extracted = this.extractFromKey(k, opt);\n const key = extracted.key;\n usedKey = key;\n let namespaces = extracted.namespaces;\n if (this.options.fallbackNS) namespaces = namespaces.concat(this.options.fallbackNS);\n const needsPluralHandling = opt.count !== undefined && !isString(opt.count);\n const needsZeroSuffixLookup = needsPluralHandling && !opt.ordinal && opt.count === 0;\n const needsContextHandling = opt.context !== undefined && (isString(opt.context) || typeof opt.context === 'number') && opt.context !== '';\n const codes = opt.lngs ? opt.lngs : this.languageUtils.toResolveHierarchy(opt.lng || this.language, opt.fallbackLng);\n namespaces.forEach(ns => {\n if (this.isValidLookup(found)) return;\n usedNS = ns;\n if (!checkedLoadedFor[`${codes[0]}-${ns}`] && this.utils?.hasLoadedNamespace && !this.utils?.hasLoadedNamespace(usedNS)) {\n checkedLoadedFor[`${codes[0]}-${ns}`] = true;\n this.logger.warn(`key \"${usedKey}\" for languages \"${codes.join(', ')}\" won't get resolved as namespace \"${usedNS}\" was not yet loaded`, 'This means something IS WRONG in your setup. You access the t function before i18next.init / i18next.loadNamespace / i18next.changeLanguage was done. Wait for the callback or Promise to resolve before accessing it!!!');\n }\n codes.forEach(code => {\n if (this.isValidLookup(found)) return;\n usedLng = code;\n const finalKeys = [key];\n if (this.i18nFormat?.addLookupKeys) {\n this.i18nFormat.addLookupKeys(finalKeys, key, code, ns, opt);\n } else {\n let pluralSuffix;\n if (needsPluralHandling) pluralSuffix = this.pluralResolver.getSuffix(code, opt.count, opt);\n const zeroSuffix = `${this.options.pluralSeparator}zero`;\n const ordinalPrefix = `${this.options.pluralSeparator}ordinal${this.options.pluralSeparator}`;\n if (needsPluralHandling) {\n if (opt.ordinal && pluralSuffix.indexOf(ordinalPrefix) === 0) {\n finalKeys.push(key + pluralSuffix.replace(ordinalPrefix, this.options.pluralSeparator));\n }\n finalKeys.push(key + pluralSuffix);\n if (needsZeroSuffixLookup) {\n finalKeys.push(key + zeroSuffix);\n }\n }\n if (needsContextHandling) {\n const contextKey = `${key}${this.options.contextSeparator || '_'}${opt.context}`;\n finalKeys.push(contextKey);\n if (needsPluralHandling) {\n if (opt.ordinal && pluralSuffix.indexOf(ordinalPrefix) === 0) {\n finalKeys.push(contextKey + pluralSuffix.replace(ordinalPrefix, this.options.pluralSeparator));\n }\n finalKeys.push(contextKey + pluralSuffix);\n if (needsZeroSuffixLookup) {\n finalKeys.push(contextKey + zeroSuffix);\n }\n }\n }\n }\n let possibleKey;\n while (possibleKey = finalKeys.pop()) {\n if (!this.isValidLookup(found)) {\n exactUsedKey = possibleKey;\n found = this.getResource(code, ns, possibleKey, opt);\n }\n }\n });\n });\n });\n return {\n res: found,\n usedKey,\n exactUsedKey,\n usedLng,\n usedNS\n };\n }\n isValidLookup(res) {\n return res !== undefined && !(!this.options.returnNull && res === null) && !(!this.options.returnEmptyString && res === '');\n }\n getResource(code, ns, key, options = {}) {\n if (this.i18nFormat?.getResource) return this.i18nFormat.getResource(code, ns, key, options);\n return this.resourceStore.getResource(code, ns, key, options);\n }\n getUsedParamsDetails(options = {}) {\n const optionsKeys = ['defaultValue', 'ordinal', 'context', 'replace', 'lng', 'lngs', 'fallbackLng', 'ns', 'keySeparator', 'nsSeparator', 'returnObjects', 'returnDetails', 'joinArrays', 'postProcess', 'interpolation'];\n const useOptionsReplaceForData = options.replace && !isString(options.replace);\n let data = useOptionsReplaceForData ? options.replace : options;\n if (useOptionsReplaceForData && typeof options.count !== 'undefined') {\n data.count = options.count;\n }\n if (this.options.interpolation.defaultVariables) {\n data = {\n ...this.options.interpolation.defaultVariables,\n ...data\n };\n }\n if (!useOptionsReplaceForData) {\n data = {\n ...data\n };\n for (const key of optionsKeys) {\n delete data[key];\n }\n }\n return data;\n }\n static hasDefaultValue(options) {\n const prefix = 'defaultValue';\n for (const option in options) {\n if (Object.prototype.hasOwnProperty.call(options, option) && prefix === option.substring(0, prefix.length) && undefined !== options[option]) {\n return true;\n }\n }\n return false;\n }\n}\n\nclass LanguageUtil {\n constructor(options) {\n this.options = options;\n this.supportedLngs = this.options.supportedLngs || false;\n this.logger = baseLogger.create('languageUtils');\n }\n getScriptPartFromCode(code) {\n code = getCleanedCode(code);\n if (!code || code.indexOf('-') < 0) return null;\n const p = code.split('-');\n if (p.length === 2) return null;\n p.pop();\n if (p[p.length - 1].toLowerCase() === 'x') return null;\n return this.formatLanguageCode(p.join('-'));\n }\n getLanguagePartFromCode(code) {\n code = getCleanedCode(code);\n if (!code || code.indexOf('-') < 0) return code;\n const p = code.split('-');\n return this.formatLanguageCode(p[0]);\n }\n formatLanguageCode(code) {\n if (isString(code) && code.indexOf('-') > -1) {\n let formattedCode;\n try {\n formattedCode = Intl.getCanonicalLocales(code)[0];\n } catch (e) {}\n if (formattedCode && this.options.lowerCaseLng) {\n formattedCode = formattedCode.toLowerCase();\n }\n if (formattedCode) return formattedCode;\n if (this.options.lowerCaseLng) {\n return code.toLowerCase();\n }\n return code;\n }\n return this.options.cleanCode || this.options.lowerCaseLng ? code.toLowerCase() : code;\n }\n isSupportedCode(code) {\n if (this.options.load === 'languageOnly' || this.options.nonExplicitSupportedLngs) {\n code = this.getLanguagePartFromCode(code);\n }\n return !this.supportedLngs || !this.supportedLngs.length || this.supportedLngs.indexOf(code) > -1;\n }\n getBestMatchFromCodes(codes) {\n if (!codes) return null;\n let found;\n codes.forEach(code => {\n if (found) return;\n const cleanedLng = this.formatLanguageCode(code);\n if (!this.options.supportedLngs || this.isSupportedCode(cleanedLng)) found = cleanedLng;\n });\n if (!found && this.options.supportedLngs) {\n codes.forEach(code => {\n if (found) return;\n const lngScOnly = this.getScriptPartFromCode(code);\n if (this.isSupportedCode(lngScOnly)) return found = lngScOnly;\n const lngOnly = this.getLanguagePartFromCode(code);\n if (this.isSupportedCode(lngOnly)) return found = lngOnly;\n found = this.options.supportedLngs.find(supportedLng => {\n if (supportedLng === lngOnly) return supportedLng;\n if (supportedLng.indexOf('-') < 0 && lngOnly.indexOf('-') < 0) return;\n if (supportedLng.indexOf('-') > 0 && lngOnly.indexOf('-') < 0 && supportedLng.substring(0, supportedLng.indexOf('-')) === lngOnly) return supportedLng;\n if (supportedLng.indexOf(lngOnly) === 0 && lngOnly.length > 1) return supportedLng;\n });\n });\n }\n if (!found) found = this.getFallbackCodes(this.options.fallbackLng)[0];\n return found;\n }\n getFallbackCodes(fallbacks, code) {\n if (!fallbacks) return [];\n if (typeof fallbacks === 'function') fallbacks = fallbacks(code);\n if (isString(fallbacks)) fallbacks = [fallbacks];\n if (Array.isArray(fallbacks)) return fallbacks;\n if (!code) return fallbacks.default || [];\n let found = fallbacks[code];\n if (!found) found = fallbacks[this.getScriptPartFromCode(code)];\n if (!found) found = fallbacks[this.formatLanguageCode(code)];\n if (!found) found = fallbacks[this.getLanguagePartFromCode(code)];\n if (!found) found = fallbacks.default;\n return found || [];\n }\n toResolveHierarchy(code, fallbackCode) {\n const fallbackCodes = this.getFallbackCodes((fallbackCode === false ? [] : fallbackCode) || this.options.fallbackLng || [], code);\n const codes = [];\n const addCode = c => {\n if (!c) return;\n if (this.isSupportedCode(c)) {\n codes.push(c);\n } else {\n this.logger.warn(`rejecting language code not found in supportedLngs: ${c}`);\n }\n };\n if (isString(code) && (code.indexOf('-') > -1 || code.indexOf('_') > -1)) {\n if (this.options.load !== 'languageOnly') addCode(this.formatLanguageCode(code));\n if (this.options.load !== 'languageOnly' && this.options.load !== 'currentOnly') addCode(this.getScriptPartFromCode(code));\n if (this.options.load !== 'currentOnly') addCode(this.getLanguagePartFromCode(code));\n } else if (isString(code)) {\n addCode(this.formatLanguageCode(code));\n }\n fallbackCodes.forEach(fc => {\n if (codes.indexOf(fc) < 0) addCode(this.formatLanguageCode(fc));\n });\n return codes;\n }\n}\n\nconst suffixesOrder = {\n zero: 0,\n one: 1,\n two: 2,\n few: 3,\n many: 4,\n other: 5\n};\nconst dummyRule = {\n select: count => count === 1 ? 'one' : 'other',\n resolvedOptions: () => ({\n pluralCategories: ['one', 'other']\n })\n};\nclass PluralResolver {\n constructor(languageUtils, options = {}) {\n this.languageUtils = languageUtils;\n this.options = options;\n this.logger = baseLogger.create('pluralResolver');\n this.pluralRulesCache = {};\n }\n clearCache() {\n this.pluralRulesCache = {};\n }\n getRule(code, options = {}) {\n const cleanedCode = getCleanedCode(code === 'dev' ? 'en' : code);\n const type = options.ordinal ? 'ordinal' : 'cardinal';\n const cacheKey = JSON.stringify({\n cleanedCode,\n type\n });\n if (cacheKey in this.pluralRulesCache) {\n return this.pluralRulesCache[cacheKey];\n }\n let rule;\n try {\n rule = new Intl.PluralRules(cleanedCode, {\n type\n });\n } catch (err) {\n if (typeof Intl === 'undefined') {\n this.logger.error('No Intl support, please use an Intl polyfill!');\n return dummyRule;\n }\n if (!code.match(/-|_/)) return dummyRule;\n const lngPart = this.languageUtils.getLanguagePartFromCode(code);\n rule = this.getRule(lngPart, options);\n }\n this.pluralRulesCache[cacheKey] = rule;\n return rule;\n }\n needsPlural(code, options = {}) {\n let rule = this.getRule(code, options);\n if (!rule) rule = this.getRule('dev', options);\n return rule?.resolvedOptions().pluralCategories.length > 1;\n }\n getPluralFormsOfKey(code, key, options = {}) {\n return this.getSuffixes(code, options).map(suffix => `${key}${suffix}`);\n }\n getSuffixes(code, options = {}) {\n let rule = this.getRule(code, options);\n if (!rule) rule = this.getRule('dev', options);\n if (!rule) return [];\n return rule.resolvedOptions().pluralCategories.sort((pluralCategory1, pluralCategory2) => suffixesOrder[pluralCategory1] - suffixesOrder[pluralCategory2]).map(pluralCategory => `${this.options.prepend}${options.ordinal ? `ordinal${this.options.prepend}` : ''}${pluralCategory}`);\n }\n getSuffix(code, count, options = {}) {\n const rule = this.getRule(code, options);\n if (rule) {\n return `${this.options.prepend}${options.ordinal ? `ordinal${this.options.prepend}` : ''}${rule.select(count)}`;\n }\n this.logger.warn(`no plural rule found for: ${code}`);\n return this.getSuffix('dev', count, options);\n }\n}\n\nconst deepFindWithDefaults = (data, defaultData, key, keySeparator = '.', ignoreJSONStructure = true) => {\n let path = getPathWithDefaults(data, defaultData, key);\n if (!path && ignoreJSONStructure && isString(key)) {\n path = deepFind(data, key, keySeparator);\n if (path === undefined) path = deepFind(defaultData, key, keySeparator);\n }\n return path;\n};\nconst regexSafe = val => val.replace(/\\$/g, '$$$$');\nclass Interpolator {\n constructor(options = {}) {\n this.logger = baseLogger.create('interpolator');\n this.options = options;\n this.format = options?.interpolation?.format || (value => value);\n this.init(options);\n }\n init(options = {}) {\n if (!options.interpolation) options.interpolation = {\n escapeValue: true\n };\n const {\n escape: escape$1,\n escapeValue,\n useRawValueToEscape,\n prefix,\n prefixEscaped,\n suffix,\n suffixEscaped,\n formatSeparator,\n unescapeSuffix,\n unescapePrefix,\n nestingPrefix,\n nestingPrefixEscaped,\n nestingSuffix,\n nestingSuffixEscaped,\n nestingOptionsSeparator,\n maxReplaces,\n alwaysFormat\n } = options.interpolation;\n this.escape = escape$1 !== undefined ? escape$1 : escape;\n this.escapeValue = escapeValue !== undefined ? escapeValue : true;\n this.useRawValueToEscape = useRawValueToEscape !== undefined ? useRawValueToEscape : false;\n this.prefix = prefix ? regexEscape(prefix) : prefixEscaped || '{{';\n this.suffix = suffix ? regexEscape(suffix) : suffixEscaped || '}}';\n this.formatSeparator = formatSeparator || ',';\n this.unescapePrefix = unescapeSuffix ? '' : unescapePrefix || '-';\n this.unescapeSuffix = this.unescapePrefix ? '' : unescapeSuffix || '';\n this.nestingPrefix = nestingPrefix ? regexEscape(nestingPrefix) : nestingPrefixEscaped || regexEscape('$t(');\n this.nestingSuffix = nestingSuffix ? regexEscape(nestingSuffix) : nestingSuffixEscaped || regexEscape(')');\n this.nestingOptionsSeparator = nestingOptionsSeparator || ',';\n this.maxReplaces = maxReplaces || 1000;\n this.alwaysFormat = alwaysFormat !== undefined ? alwaysFormat : false;\n this.resetRegExp();\n }\n reset() {\n if (this.options) this.init(this.options);\n }\n resetRegExp() {\n const getOrResetRegExp = (existingRegExp, pattern) => {\n if (existingRegExp?.source === pattern) {\n existingRegExp.lastIndex = 0;\n return existingRegExp;\n }\n return new RegExp(pattern, 'g');\n };\n this.regexp = getOrResetRegExp(this.regexp, `${this.prefix}(.+?)${this.suffix}`);\n this.regexpUnescape = getOrResetRegExp(this.regexpUnescape, `${this.prefix}${this.unescapePrefix}(.+?)${this.unescapeSuffix}${this.suffix}`);\n this.nestingRegexp = getOrResetRegExp(this.nestingRegexp, `${this.nestingPrefix}((?:[^()\"']+|\"[^\"]*\"|'[^']*'|\\\\((?:[^()]|\"[^\"]*\"|'[^']*')*\\\\))*?)${this.nestingSuffix}`);\n }\n interpolate(str, data, lng, options) {\n let match;\n let value;\n let replaces;\n const defaultData = this.options && this.options.interpolation && this.options.interpolation.defaultVariables || {};\n const handleFormat = key => {\n if (key.indexOf(this.formatSeparator) < 0) {\n const path = deepFindWithDefaults(data, defaultData, key, this.options.keySeparator, this.options.ignoreJSONStructure);\n return this.alwaysFormat ? this.format(path, undefined, lng, {\n ...options,\n ...data,\n interpolationkey: key\n }) : path;\n }\n const p = key.split(this.formatSeparator);\n const k = p.shift().trim();\n const f = p.join(this.formatSeparator).trim();\n return this.format(deepFindWithDefaults(data, defaultData, k, this.options.keySeparator, this.options.ignoreJSONStructure), f, lng, {\n ...options,\n ...data,\n interpolationkey: k\n });\n };\n this.resetRegExp();\n const missingInterpolationHandler = options?.missingInterpolationHandler || this.options.missingInterpolationHandler;\n const skipOnVariables = options?.interpolation?.skipOnVariables !== undefined ? options.interpolation.skipOnVariables : this.options.interpolation.skipOnVariables;\n const todos = [{\n regex: this.regexpUnescape,\n safeValue: val => regexSafe(val)\n }, {\n regex: this.regexp,\n safeValue: val => this.escapeValue ? regexSafe(this.escape(val)) : regexSafe(val)\n }];\n todos.forEach(todo => {\n replaces = 0;\n while (match = todo.regex.exec(str)) {\n const matchedVar = match[1].trim();\n value = handleFormat(matchedVar);\n if (value === undefined) {\n if (typeof missingInterpolationHandler === 'function') {\n const temp = missingInterpolationHandler(str, match, options);\n value = isString(temp) ? temp : '';\n } else if (options && Object.prototype.hasOwnProperty.call(options, matchedVar)) {\n value = '';\n } else if (skipOnVariables) {\n value = match[0];\n continue;\n } else {\n this.logger.warn(`missed to pass in variable ${matchedVar} for interpolating ${str}`);\n value = '';\n }\n } else if (!isString(value) && !this.useRawValueToEscape) {\n value = makeString(value);\n }\n const safeValue = todo.safeValue(value);\n str = str.replace(match[0], safeValue);\n if (skipOnVariables) {\n todo.regex.lastIndex += value.length;\n todo.regex.lastIndex -= match[0].length;\n } else {\n todo.regex.lastIndex = 0;\n }\n replaces++;\n if (replaces >= this.maxReplaces) {\n break;\n }\n }\n });\n return str;\n }\n nest(str, fc, options = {}) {\n let match;\n let value;\n let clonedOptions;\n const handleHasOptions = (key, inheritedOptions) => {\n const sep = this.nestingOptionsSeparator;\n if (key.indexOf(sep) < 0) return key;\n const c = key.split(new RegExp(`${regexEscape(sep)}[ ]*{`));\n let optionsString = `{${c[1]}`;\n key = c[0];\n optionsString = this.interpolate(optionsString, clonedOptions);\n const matchedSingleQuotes = optionsString.match(/'/g);\n const matchedDoubleQuotes = optionsString.match(/\"/g);\n if ((matchedSingleQuotes?.length ?? 0) % 2 === 0 && !matchedDoubleQuotes || (matchedDoubleQuotes?.length ?? 0) % 2 !== 0) {\n optionsString = optionsString.replace(/'/g, '\"');\n }\n try {\n clonedOptions = JSON.parse(optionsString);\n if (inheritedOptions) clonedOptions = {\n ...inheritedOptions,\n ...clonedOptions\n };\n } catch (e) {\n this.logger.warn(`failed parsing options string in nesting for key ${key}`, e);\n return `${key}${sep}${optionsString}`;\n }\n if (clonedOptions.defaultValue && clonedOptions.defaultValue.indexOf(this.prefix) > -1) delete clonedOptions.defaultValue;\n return key;\n };\n while (match = this.nestingRegexp.exec(str)) {\n let formatters = [];\n clonedOptions = {\n ...options\n };\n clonedOptions = clonedOptions.replace && !isString(clonedOptions.replace) ? clonedOptions.replace : clonedOptions;\n clonedOptions.applyPostProcessor = false;\n delete clonedOptions.defaultValue;\n const keyEndIndex = /{.*}/.test(match[1]) ? match[1].lastIndexOf('}') + 1 : match[1].indexOf(this.formatSeparator);\n if (keyEndIndex !== -1) {\n formatters = match[1].slice(keyEndIndex).split(this.formatSeparator).map(elem => elem.trim()).filter(Boolean);\n match[1] = match[1].slice(0, keyEndIndex);\n }\n value = fc(handleHasOptions.call(this, match[1].trim(), clonedOptions), clonedOptions);\n if (value && match[0] === str && !isString(value)) return value;\n if (!isString(value)) value = makeString(value);\n if (!value) {\n this.logger.warn(`missed to resolve ${match[1]} for nesting ${str}`);\n value = '';\n }\n if (formatters.length) {\n value = formatters.reduce((v, f) => this.format(v, f, options.lng, {\n ...options,\n interpolationkey: match[1].trim()\n }), value.trim());\n }\n str = str.replace(match[0], value);\n this.regexp.lastIndex = 0;\n }\n return str;\n }\n}\n\nconst parseFormatStr = formatStr => {\n let formatName = formatStr.toLowerCase().trim();\n const formatOptions = {};\n if (formatStr.indexOf('(') > -1) {\n const p = formatStr.split('(');\n formatName = p[0].toLowerCase().trim();\n const optStr = p[1].substring(0, p[1].length - 1);\n if (formatName === 'currency' && optStr.indexOf(':') < 0) {\n if (!formatOptions.currency) formatOptions.currency = optStr.trim();\n } else if (formatName === 'relativetime' && optStr.indexOf(':') < 0) {\n if (!formatOptions.range) formatOptions.range = optStr.trim();\n } else {\n const opts = optStr.split(';');\n opts.forEach(opt => {\n if (opt) {\n const [key, ...rest] = opt.split(':');\n const val = rest.join(':').trim().replace(/^'+|'+$/g, '');\n const trimmedKey = key.trim();\n if (!formatOptions[trimmedKey]) formatOptions[trimmedKey] = val;\n if (val === 'false') formatOptions[trimmedKey] = false;\n if (val === 'true') formatOptions[trimmedKey] = true;\n if (!isNaN(val)) formatOptions[trimmedKey] = parseInt(val, 10);\n }\n });\n }\n }\n return {\n formatName,\n formatOptions\n };\n};\nconst createCachedFormatter = fn => {\n const cache = {};\n return (v, l, o) => {\n let optForCache = o;\n if (o && o.interpolationkey && o.formatParams && o.formatParams[o.interpolationkey] && o[o.interpolationkey]) {\n optForCache = {\n ...optForCache,\n [o.interpolationkey]: undefined\n };\n }\n const key = l + JSON.stringify(optForCache);\n let frm = cache[key];\n if (!frm) {\n frm = fn(getCleanedCode(l), o);\n cache[key] = frm;\n }\n return frm(v);\n };\n};\nconst createNonCachedFormatter = fn => (v, l, o) => fn(getCleanedCode(l), o)(v);\nclass Formatter {\n constructor(options = {}) {\n this.logger = baseLogger.create('formatter');\n this.options = options;\n this.init(options);\n }\n init(services, options = {\n interpolation: {}\n }) {\n this.formatSeparator = options.interpolation.formatSeparator || ',';\n const cf = options.cacheInBuiltFormats ? createCachedFormatter : createNonCachedFormatter;\n this.formats = {\n number: cf((lng, opt) => {\n const formatter = new Intl.NumberFormat(lng, {\n ...opt\n });\n return val => formatter.format(val);\n }),\n currency: cf((lng, opt) => {\n const formatter = new Intl.NumberFormat(lng, {\n ...opt,\n style: 'currency'\n });\n return val => formatter.format(val);\n }),\n datetime: cf((lng, opt) => {\n const formatter = new Intl.DateTimeFormat(lng, {\n ...opt\n });\n return val => formatter.format(val);\n }),\n relativetime: cf((lng, opt) => {\n const formatter = new Intl.RelativeTimeFormat(lng, {\n ...opt\n });\n return val => formatter.format(val, opt.range || 'day');\n }),\n list: cf((lng, opt) => {\n const formatter = new Intl.ListFormat(lng, {\n ...opt\n });\n return val => formatter.format(val);\n })\n };\n }\n add(name, fc) {\n this.formats[name.toLowerCase().trim()] = fc;\n }\n addCached(name, fc) {\n this.formats[name.toLowerCase().trim()] = createCachedFormatter(fc);\n }\n format(value, format, lng, options = {}) {\n const formats = format.split(this.formatSeparator);\n if (formats.length > 1 && formats[0].indexOf('(') > 1 && formats[0].indexOf(')') < 0 && formats.find(f => f.indexOf(')') > -1)) {\n const lastIndex = formats.findIndex(f => f.indexOf(')') > -1);\n formats[0] = [formats[0], ...formats.splice(1, lastIndex)].join(this.formatSeparator);\n }\n const result = formats.reduce((mem, f) => {\n const {\n formatName,\n formatOptions\n } = parseFormatStr(f);\n if (this.formats[formatName]) {\n let formatted = mem;\n try {\n const valOptions = options?.formatParams?.[options.interpolationkey] || {};\n const l = valOptions.locale || valOptions.lng || options.locale || options.lng || lng;\n formatted = this.formats[formatName](mem, l, {\n ...formatOptions,\n ...options,\n ...valOptions\n });\n } catch (error) {\n this.logger.warn(error);\n }\n return formatted;\n } else {\n this.logger.warn(`there was no format function for ${formatName}`);\n }\n return mem;\n }, value);\n return result;\n }\n}\n\nconst removePending = (q, name) => {\n if (q.pending[name] !== undefined) {\n delete q.pending[name];\n q.pendingCount--;\n }\n};\nclass Connector extends EventEmitter {\n constructor(backend, store, services, options = {}) {\n super();\n this.backend = backend;\n this.store = store;\n this.services = services;\n this.languageUtils = services.languageUtils;\n this.options = options;\n this.logger = baseLogger.create('backendConnector');\n this.waitingReads = [];\n this.maxParallelReads = options.maxParallelReads || 10;\n this.readingCalls = 0;\n this.maxRetries = options.maxRetries >= 0 ? options.maxRetries : 5;\n this.retryTimeout = options.retryTimeout >= 1 ? options.retryTimeout : 350;\n this.state = {};\n this.queue = [];\n this.backend?.init?.(services, options.backend, options);\n }\n queueLoad(languages, namespaces, options, callback) {\n const toLoad = {};\n const pending = {};\n const toLoadLanguages = {};\n const toLoadNamespaces = {};\n languages.forEach(lng => {\n let hasAllNamespaces = true;\n namespaces.forEach(ns => {\n const name = `${lng}|${ns}`;\n if (!options.reload && this.store.hasResourceBundle(lng, ns)) {\n this.state[name] = 2;\n } else if (this.state[name] < 0) ; else if (this.state[name] === 1) {\n if (pending[name] === undefined) pending[name] = true;\n } else {\n this.state[name] = 1;\n hasAllNamespaces = false;\n if (pending[name] === undefined) pending[name] = true;\n if (toLoad[name] === undefined) toLoad[name] = true;\n if (toLoadNamespaces[ns] === undefined) toLoadNamespaces[ns] = true;\n }\n });\n if (!hasAllNamespaces) toLoadLanguages[lng] = true;\n });\n if (Object.keys(toLoad).length || Object.keys(pending).length) {\n this.queue.push({\n pending,\n pendingCount: Object.keys(pending).length,\n loaded: {},\n errors: [],\n callback\n });\n }\n return {\n toLoad: Object.keys(toLoad),\n pending: Object.keys(pending),\n toLoadLanguages: Object.keys(toLoadLanguages),\n toLoadNamespaces: Object.keys(toLoadNamespaces)\n };\n }\n loaded(name, err, data) {\n const s = name.split('|');\n const lng = s[0];\n const ns = s[1];\n if (err) this.emit('failedLoading', lng, ns, err);\n if (!err && data) {\n this.store.addResourceBundle(lng, ns, data, undefined, undefined, {\n skipCopy: true\n });\n }\n this.state[name] = err ? -1 : 2;\n if (err && data) this.state[name] = 0;\n const loaded = {};\n this.queue.forEach(q => {\n pushPath(q.loaded, [lng], ns);\n removePending(q, name);\n if (err) q.errors.push(err);\n if (q.pendingCount === 0 && !q.done) {\n Object.keys(q.loaded).forEach(l => {\n if (!loaded[l]) loaded[l] = {};\n const loadedKeys = q.loaded[l];\n if (loadedKeys.length) {\n loadedKeys.forEach(n => {\n if (loaded[l][n] === undefined) loaded[l][n] = true;\n });\n }\n });\n q.done = true;\n if (q.errors.length) {\n q.callback(q.errors);\n } else {\n q.callback();\n }\n }\n });\n this.emit('loaded', loaded);\n this.queue = this.queue.filter(q => !q.done);\n }\n read(lng, ns, fcName, tried = 0, wait = this.retryTimeout, callback) {\n if (!lng.length) return callback(null, {});\n if (this.readingCalls >= this.maxParallelReads) {\n this.waitingReads.push({\n lng,\n ns,\n fcName,\n tried,\n wait,\n callback\n });\n return;\n }\n this.readingCalls++;\n const resolver = (err, data) => {\n this.readingCalls--;\n if (this.waitingReads.length > 0) {\n const next = this.waitingReads.shift();\n this.read(next.lng, next.ns, next.fcName, next.tried, next.wait, next.callback);\n }\n if (err && data && tried < this.maxRetries) {\n setTimeout(() => {\n this.read.call(this, lng, ns, fcName, tried + 1, wait * 2, callback);\n }, wait);\n return;\n }\n callback(err, data);\n };\n const fc = this.backend[fcName].bind(this.backend);\n if (fc.length === 2) {\n try {\n const r = fc(lng, ns);\n if (r && typeof r.then === 'function') {\n r.then(data => resolver(null, data)).catch(resolver);\n } else {\n resolver(null, r);\n }\n } catch (err) {\n resolver(err);\n }\n return;\n }\n return fc(lng, ns, resolver);\n }\n prepareLoading(languages, namespaces, options = {}, callback) {\n if (!this.backend) {\n this.logger.warn('No backend was added via i18next.use. Will not load resources.');\n return callback && callback();\n }\n if (isString(languages)) languages = this.languageUtils.toResolveHierarchy(languages);\n if (isString(namespaces)) namespaces = [namespaces];\n const toLoad = this.queueLoad(languages, namespaces, options, callback);\n if (!toLoad.toLoad.length) {\n if (!toLoad.pending.length) callback();\n return null;\n }\n toLoad.toLoad.forEach(name => {\n this.loadOne(name);\n });\n }\n load(languages, namespaces, callback) {\n this.prepareLoading(languages, namespaces, {}, callback);\n }\n reload(languages, namespaces, callback) {\n this.prepareLoading(languages, namespaces, {\n reload: true\n }, callback);\n }\n loadOne(name, prefix = '') {\n const s = name.split('|');\n const lng = s[0];\n const ns = s[1];\n this.read(lng, ns, 'read', undefined, undefined, (err, data) => {\n if (err) this.logger.warn(`${prefix}loading namespace ${ns} for language ${lng} failed`, err);\n if (!err && data) this.logger.log(`${prefix}loaded namespace ${ns} for language ${lng}`, data);\n this.loaded(name, err, data);\n });\n }\n saveMissing(languages, namespace, key, fallbackValue, isUpdate, options = {}, clb = () => {}) {\n if (this.services?.utils?.hasLoadedNamespace && !this.services?.utils?.hasLoadedNamespace(namespace)) {\n this.logger.warn(`did not save key \"${key}\" as the namespace \"${namespace}\" was not yet loaded`, 'This means something IS WRONG in your setup. You access the t function before i18next.init / i18next.loadNamespace / i18next.changeLanguage was done. Wait for the callback or Promise to resolve before accessing it!!!');\n return;\n }\n if (key === undefined || key === null || key === '') return;\n if (this.backend?.create) {\n const opts = {\n ...options,\n isUpdate\n };\n const fc = this.backend.create.bind(this.backend);\n if (fc.length < 6) {\n try {\n let r;\n if (fc.length === 5) {\n r = fc(languages, namespace, key, fallbackValue, opts);\n } else {\n r = fc(languages, namespace, key, fallbackValue);\n }\n if (r && typeof r.then === 'function') {\n r.then(data => clb(null, data)).catch(clb);\n } else {\n clb(null, r);\n }\n } catch (err) {\n clb(err);\n }\n } else {\n fc(languages, namespace, key, fallbackValue, clb, opts);\n }\n }\n if (!languages || !languages[0]) return;\n this.store.addResource(languages[0], namespace, key, fallbackValue);\n }\n}\n\nconst get = () => ({\n debug: false,\n initAsync: true,\n ns: ['translation'],\n defaultNS: ['translation'],\n fallbackLng: ['dev'],\n fallbackNS: false,\n supportedLngs: false,\n nonExplicitSupportedLngs: false,\n load: 'all',\n preload: false,\n simplifyPluralSuffix: true,\n keySeparator: '.',\n nsSeparator: ':',\n pluralSeparator: '_',\n contextSeparator: '_',\n partialBundledLanguages: false,\n saveMissing: false,\n updateMissing: false,\n saveMissingTo: 'fallback',\n saveMissingPlurals: true,\n missingKeyHandler: false,\n missingInterpolationHandler: false,\n postProcess: false,\n postProcessPassResolved: false,\n returnNull: false,\n returnEmptyString: true,\n returnObjects: false,\n joinArrays: false,\n returnedObjectHandler: false,\n parseMissingKeyHandler: false,\n appendNamespaceToMissingKey: false,\n appendNamespaceToCIMode: false,\n overloadTranslationOptionHandler: args => {\n let ret = {};\n if (typeof args[1] === 'object') ret = args[1];\n if (isString(args[1])) ret.defaultValue = args[1];\n if (isString(args[2])) ret.tDescription = args[2];\n if (typeof args[2] === 'object' || typeof args[3] === 'object') {\n const options = args[3] || args[2];\n Object.keys(options).forEach(key => {\n ret[key] = options[key];\n });\n }\n return ret;\n },\n interpolation: {\n escapeValue: true,\n format: value => value,\n prefix: '{{',\n suffix: '}}',\n formatSeparator: ',',\n unescapePrefix: '-',\n nestingPrefix: '$t(',\n nestingSuffix: ')',\n nestingOptionsSeparator: ',',\n maxReplaces: 1000,\n skipOnVariables: true\n },\n cacheInBuiltFormats: true\n});\nconst transformOptions = options => {\n if (isString(options.ns)) options.ns = [options.ns];\n if (isString(options.fallbackLng)) options.fallbackLng = [options.fallbackLng];\n if (isString(options.fallbackNS)) options.fallbackNS = [options.fallbackNS];\n if (options.supportedLngs?.indexOf?.('cimode') < 0) {\n options.supportedLngs = options.supportedLngs.concat(['cimode']);\n }\n if (typeof options.initImmediate === 'boolean') options.initAsync = options.initImmediate;\n return options;\n};\n\nconst noop = () => {};\nconst bindMemberFunctions = inst => {\n const mems = Object.getOwnPropertyNames(Object.getPrototypeOf(inst));\n mems.forEach(mem => {\n if (typeof inst[mem] === 'function') {\n inst[mem] = inst[mem].bind(inst);\n }\n });\n};\nconst SUPPORT_NOTICE_KEY = '__i18next_supportNoticeShown';\nconst getSupportNoticeShown = () => {\n if (typeof globalThis !== 'undefined' && !!globalThis[SUPPORT_NOTICE_KEY]) return true;\n if (typeof process !== 'undefined' && process.env && process.env.I18NEXT_NO_SUPPORT_NOTICE) return true;\n if (typeof process !== 'undefined' && process.env && process.env.NODE_ENV === 'production') return true;\n return false;\n};\nconst setSupportNoticeShown = () => {\n if (typeof globalThis !== 'undefined') globalThis[SUPPORT_NOTICE_KEY] = true;\n};\nconst usesLocize = inst => {\n if (inst?.modules?.backend?.name?.indexOf('Locize') > 0) return true;\n if (inst?.modules?.backend?.constructor?.name?.indexOf('Locize') > 0) return true;\n if (inst?.options?.backend?.backends) {\n if (inst.options.backend.backends.some(b => b?.name?.indexOf('Locize') > 0 || b?.constructor?.name?.indexOf('Locize') > 0)) return true;\n }\n if (inst?.options?.backend?.projectId) return true;\n if (inst?.options?.backend?.backendOptions) {\n if (inst.options.backend.backendOptions.some(b => b?.projectId)) return true;\n }\n return false;\n};\nclass I18n extends EventEmitter {\n constructor(options = {}, callback) {\n super();\n this.options = transformOptions(options);\n this.services = {};\n this.logger = baseLogger;\n this.modules = {\n external: []\n };\n bindMemberFunctions(this);\n if (callback && !this.isInitialized && !options.isClone) {\n if (!this.options.initAsync) {\n this.init(options, callback);\n return this;\n }\n setTimeout(() => {\n this.init(options, callback);\n }, 0);\n }\n }\n init(options = {}, callback) {\n this.isInitializing = true;\n if (typeof options === 'function') {\n callback = options;\n options = {};\n }\n if (options.defaultNS == null && options.ns) {\n if (isString(options.ns)) {\n options.defaultNS = options.ns;\n } else if (options.ns.indexOf('translation') < 0) {\n options.defaultNS = options.ns[0];\n }\n }\n const defOpts = get();\n this.options = {\n ...defOpts,\n ...this.options,\n ...transformOptions(options)\n };\n this.options.interpolation = {\n ...defOpts.interpolation,\n ...this.options.interpolation\n };\n if (options.keySeparator !== undefined) {\n this.options.userDefinedKeySeparator = options.keySeparator;\n }\n if (options.nsSeparator !== undefined) {\n this.options.userDefinedNsSeparator = options.nsSeparator;\n }\n if (typeof this.options.overloadTranslationOptionHandler !== 'function') {\n this.options.overloadTranslationOptionHandler = defOpts.overloadTranslationOptionHandler;\n }\n if (this.options.showSupportNotice !== false && !usesLocize(this) && !getSupportNoticeShown()) {\n if (typeof console !== 'undefined' && typeof console.info !== 'undefined') console.info('🌐 i18next is made possible by our own product, Locize — consider powering your project with managed localization (AI, CDN, integrations): https://locize.com 💙');\n setSupportNoticeShown();\n }\n const createClassOnDemand = ClassOrObject => {\n if (!ClassOrObject) return null;\n if (typeof ClassOrObject === 'function') return new ClassOrObject();\n return ClassOrObject;\n };\n if (!this.options.isClone) {\n if (this.modules.logger) {\n baseLogger.init(createClassOnDemand(this.modules.logger), this.options);\n } else {\n baseLogger.init(null, this.options);\n }\n let formatter;\n if (this.modules.formatter) {\n formatter = this.modules.formatter;\n } else {\n formatter = Formatter;\n }\n const lu = new LanguageUtil(this.options);\n this.store = new ResourceStore(this.options.resources, this.options);\n const s = this.services;\n s.logger = baseLogger;\n s.resourceStore = this.store;\n s.languageUtils = lu;\n s.pluralResolver = new PluralResolver(lu, {\n prepend: this.options.pluralSeparator,\n simplifyPluralSuffix: this.options.simplifyPluralSuffix\n });\n const usingLegacyFormatFunction = this.options.interpolation.format && this.options.interpolation.format !== defOpts.interpolation.format;\n if (usingLegacyFormatFunction) {\n this.logger.deprecate(`init: you are still using the legacy format function, please use the new approach: https://www.i18next.com/translation-function/formatting`);\n }\n if (formatter && (!this.options.interpolation.format || this.options.interpolation.format === defOpts.interpolation.format)) {\n s.formatter = createClassOnDemand(formatter);\n if (s.formatter.init) s.formatter.init(s, this.options);\n this.options.interpolation.format = s.formatter.format.bind(s.formatter);\n }\n s.interpolator = new Interpolator(this.options);\n s.utils = {\n hasLoadedNamespace: this.hasLoadedNamespace.bind(this)\n };\n s.backendConnector = new Connector(createClassOnDemand(this.modules.backend), s.resourceStore, s, this.options);\n s.backendConnector.on('*', (event, ...args) => {\n this.emit(event, ...args);\n });\n if (this.modules.languageDetector) {\n s.languageDetector = createClassOnDemand(this.modules.languageDetector);\n if (s.languageDetector.init) s.languageDetector.init(s, this.options.detection, this.options);\n }\n if (this.modules.i18nFormat) {\n s.i18nFormat = createClassOnDemand(this.modules.i18nFormat);\n if (s.i18nFormat.init) s.i18nFormat.init(this);\n }\n this.translator = new Translator(this.services, this.options);\n this.translator.on('*', (event, ...args) => {\n this.emit(event, ...args);\n });\n this.modules.external.forEach(m => {\n if (m.init) m.init(this);\n });\n }\n this.format = this.options.interpolation.format;\n if (!callback) callback = noop;\n if (this.options.fallbackLng && !this.services.languageDetector && !this.options.lng) {\n const codes = this.services.languageUtils.getFallbackCodes(this.options.fallbackLng);\n if (codes.length > 0 && codes[0] !== 'dev') this.options.lng = codes[0];\n }\n if (!this.services.languageDetector && !this.options.lng) {\n this.logger.warn('init: no languageDetector is used and no lng is defined');\n }\n const storeApi = ['getResource', 'hasResourceBundle', 'getResourceBundle', 'getDataByLanguage'];\n storeApi.forEach(fcName => {\n this[fcName] = (...args) => this.store[fcName](...args);\n });\n const storeApiChained = ['addResource', 'addResources', 'addResourceBundle', 'removeResourceBundle'];\n storeApiChained.forEach(fcName => {\n this[fcName] = (...args) => {\n this.store[fcName](...args);\n return this;\n };\n });\n const deferred = defer();\n const load = () => {\n const finish = (err, t) => {\n this.isInitializing = false;\n if (this.isInitialized && !this.initializedStoreOnce) this.logger.warn('init: i18next is already initialized. You should call init just once!');\n this.isInitialized = true;\n if (!this.options.isClone) this.logger.log('initialized', this.options);\n this.emit('initialized', this.options);\n deferred.resolve(t);\n callback(err, t);\n };\n if (this.languages && !this.isInitialized) return finish(null, this.t.bind(this));\n this.changeLanguage(this.options.lng, finish);\n };\n if (this.options.resources || !this.options.initAsync) {\n load();\n } else {\n setTimeout(load, 0);\n }\n return deferred;\n }\n loadResources(language, callback = noop) {\n let usedCallback = callback;\n const usedLng = isString(language) ? language : this.language;\n if (typeof language === 'function') usedCallback = language;\n if (!this.options.resources || this.options.partialBundledLanguages) {\n if (usedLng?.toLowerCase() === 'cimode' && (!this.options.preload || this.options.preload.length === 0)) return usedCallback();\n const toLoad = [];\n const append = lng => {\n if (!lng) return;\n if (lng === 'cimode') return;\n const lngs = this.services.languageUtils.toResolveHierarchy(lng);\n lngs.forEach(l => {\n if (l === 'cimode') return;\n if (toLoad.indexOf(l) < 0) toLoad.push(l);\n });\n };\n if (!usedLng) {\n const fallbacks = this.services.languageUtils.getFallbackCodes(this.options.fallbackLng);\n fallbacks.forEach(l => append(l));\n } else {\n append(usedLng);\n }\n this.options.preload?.forEach?.(l => append(l));\n this.services.backendConnector.load(toLoad, this.options.ns, e => {\n if (!e && !this.resolvedLanguage && this.language) this.setResolvedLanguage(this.language);\n usedCallback(e);\n });\n } else {\n usedCallback(null);\n }\n }\n reloadResources(lngs, ns, callback) {\n const deferred = defer();\n if (typeof lngs === 'function') {\n callback = lngs;\n lngs = undefined;\n }\n if (typeof ns === 'function') {\n callback = ns;\n ns = undefined;\n }\n if (!lngs) lngs = this.languages;\n if (!ns) ns = this.options.ns;\n if (!callback) callback = noop;\n this.services.backendConnector.reload(lngs, ns, err => {\n deferred.resolve();\n callback(err);\n });\n return deferred;\n }\n use(module) {\n if (!module) throw new Error('You are passing an undefined module! Please check the object you are passing to i18next.use()');\n if (!module.type) throw new Error('You are passing a wrong module! Please check the object you are passing to i18next.use()');\n if (module.type === 'backend') {\n this.modules.backend = module;\n }\n if (module.type === 'logger' || module.log && module.warn && module.error) {\n this.modules.logger = module;\n }\n if (module.type === 'languageDetector') {\n this.modules.languageDetector = module;\n }\n if (module.type === 'i18nFormat') {\n this.modules.i18nFormat = module;\n }\n if (module.type === 'postProcessor') {\n postProcessor.addPostProcessor(module);\n }\n if (module.type === 'formatter') {\n this.modules.formatter = module;\n }\n if (module.type === '3rdParty') {\n this.modules.external.push(module);\n }\n return this;\n }\n setResolvedLanguage(l) {\n if (!l || !this.languages) return;\n if (['cimode', 'dev'].indexOf(l) > -1) return;\n for (let li = 0; li < this.languages.length; li++) {\n const lngInLngs = this.languages[li];\n if (['cimode', 'dev'].indexOf(lngInLngs) > -1) continue;\n if (this.store.hasLanguageSomeTranslations(lngInLngs)) {\n this.resolvedLanguage = lngInLngs;\n break;\n }\n }\n if (!this.resolvedLanguage && this.languages.indexOf(l) < 0 && this.store.hasLanguageSomeTranslations(l)) {\n this.resolvedLanguage = l;\n this.languages.unshift(l);\n }\n }\n changeLanguage(lng, callback) {\n this.isLanguageChangingTo = lng;\n const deferred = defer();\n this.emit('languageChanging', lng);\n const setLngProps = l => {\n this.language = l;\n this.languages = this.services.languageUtils.toResolveHierarchy(l);\n this.resolvedLanguage = undefined;\n this.setResolvedLanguage(l);\n };\n const done = (err, l) => {\n if (l) {\n if (this.isLanguageChangingTo === lng) {\n setLngProps(l);\n this.translator.changeLanguage(l);\n this.isLanguageChangingTo = undefined;\n this.emit('languageChanged', l);\n this.logger.log('languageChanged', l);\n }\n } else {\n this.isLanguageChangingTo = undefined;\n }\n deferred.resolve((...args) => this.t(...args));\n if (callback) callback(err, (...args) => this.t(...args));\n };\n const setLng = lngs => {\n if (!lng && !lngs && this.services.languageDetector) lngs = [];\n const fl = isString(lngs) ? lngs : lngs && lngs[0];\n const l = this.store.hasLanguageSomeTranslations(fl) ? fl : this.services.languageUtils.getBestMatchFromCodes(isString(lngs) ? [lngs] : lngs);\n if (l) {\n if (!this.language) {\n setLngProps(l);\n }\n if (!this.translator.language) this.translator.changeLanguage(l);\n this.services.languageDetector?.cacheUserLanguage?.(l);\n }\n this.loadResources(l, err => {\n done(err, l);\n });\n };\n if (!lng && this.services.languageDetector && !this.services.languageDetector.async) {\n setLng(this.services.languageDetector.detect());\n } else if (!lng && this.services.languageDetector && this.services.languageDetector.async) {\n if (this.services.languageDetector.detect.length === 0) {\n this.services.languageDetector.detect().then(setLng);\n } else {\n this.services.languageDetector.detect(setLng);\n }\n } else {\n setLng(lng);\n }\n return deferred;\n }\n getFixedT(lng, ns, keyPrefix) {\n const fixedT = (key, opts, ...rest) => {\n let o;\n if (typeof opts !== 'object') {\n o = this.options.overloadTranslationOptionHandler([key, opts].concat(rest));\n } else {\n o = {\n ...opts\n };\n }\n o.lng = o.lng || fixedT.lng;\n o.lngs = o.lngs || fixedT.lngs;\n o.ns = o.ns || fixedT.ns;\n if (o.keyPrefix !== '') o.keyPrefix = o.keyPrefix || keyPrefix || fixedT.keyPrefix;\n const selectorOpts = {\n ...this.options,\n ...o\n };\n if (typeof o.keyPrefix === 'function') o.keyPrefix = keysFromSelector(o.keyPrefix, selectorOpts);\n const keySeparator = this.options.keySeparator || '.';\n let resultKey;\n if (o.keyPrefix && Array.isArray(key)) {\n resultKey = key.map(k => {\n if (typeof k === 'function') k = keysFromSelector(k, selectorOpts);\n return `${o.keyPrefix}${keySeparator}${k}`;\n });\n } else {\n if (typeof key === 'function') key = keysFromSelector(key, selectorOpts);\n resultKey = o.keyPrefix ? `${o.keyPrefix}${keySeparator}${key}` : key;\n }\n return this.t(resultKey, o);\n };\n if (isString(lng)) {\n fixedT.lng = lng;\n } else {\n fixedT.lngs = lng;\n }\n fixedT.ns = ns;\n fixedT.keyPrefix = keyPrefix;\n return fixedT;\n }\n t(...args) {\n return this.translator?.translate(...args);\n }\n exists(...args) {\n return this.translator?.exists(...args);\n }\n setDefaultNamespace(ns) {\n this.options.defaultNS = ns;\n }\n hasLoadedNamespace(ns, options = {}) {\n if (!this.isInitialized) {\n this.logger.warn('hasLoadedNamespace: i18next was not initialized', this.languages);\n return false;\n }\n if (!this.languages || !this.languages.length) {\n this.logger.warn('hasLoadedNamespace: i18n.languages were undefined or empty', this.languages);\n return false;\n }\n const lng = options.lng || this.resolvedLanguage || this.languages[0];\n const fallbackLng = this.options ? this.options.fallbackLng : false;\n const lastLng = this.languages[this.languages.length - 1];\n if (lng.toLowerCase() === 'cimode') return true;\n const loadNotPending = (l, n) => {\n const loadState = this.services.backendConnector.state[`${l}|${n}`];\n return loadState === -1 || loadState === 0 || loadState === 2;\n };\n if (options.precheck) {\n const preResult = options.precheck(this, loadNotPending);\n if (preResult !== undefined) return preResult;\n }\n if (this.hasResourceBundle(lng, ns)) return true;\n if (!this.services.backendConnector.backend || this.options.resources && !this.options.partialBundledLanguages) return true;\n if (loadNotPending(lng, ns) && (!fallbackLng || loadNotPending(lastLng, ns))) return true;\n return false;\n }\n loadNamespaces(ns, callback) {\n const deferred = defer();\n if (!this.options.ns) {\n if (callback) callback();\n return Promise.resolve();\n }\n if (isString(ns)) ns = [ns];\n ns.forEach(n => {\n if (this.options.ns.indexOf(n) < 0) this.options.ns.push(n);\n });\n this.loadResources(err => {\n deferred.resolve();\n if (callback) callback(err);\n });\n return deferred;\n }\n loadLanguages(lngs, callback) {\n const deferred = defer();\n if (isString(lngs)) lngs = [lngs];\n const preloaded = this.options.preload || [];\n const newLngs = lngs.filter(lng => preloaded.indexOf(lng) < 0 && this.services.languageUtils.isSupportedCode(lng));\n if (!newLngs.length) {\n if (callback) callback();\n return Promise.resolve();\n }\n this.options.preload = preloaded.concat(newLngs);\n this.loadResources(err => {\n deferred.resolve();\n if (callback) callback(err);\n });\n return deferred;\n }\n dir(lng) {\n if (!lng) lng = this.resolvedLanguage || (this.languages?.length > 0 ? this.languages[0] : this.language);\n if (!lng) return 'rtl';\n try {\n const l = new Intl.Locale(lng);\n if (l && l.getTextInfo) {\n const ti = l.getTextInfo();\n if (ti && ti.direction) return ti.direction;\n }\n } catch (e) {}\n const rtlLngs = ['ar', 'shu', 'sqr', 'ssh', 'xaa', 'yhd', 'yud', 'aao', 'abh', 'abv', 'acm', 'acq', 'acw', 'acx', 'acy', 'adf', 'ads', 'aeb', 'aec', 'afb', 'ajp', 'apc', 'apd', 'arb', 'arq', 'ars', 'ary', 'arz', 'auz', 'avl', 'ayh', 'ayl', 'ayn', 'ayp', 'bbz', 'pga', 'he', 'iw', 'ps', 'pbt', 'pbu', 'pst', 'prp', 'prd', 'ug', 'ur', 'ydd', 'yds', 'yih', 'ji', 'yi', 'hbo', 'men', 'xmn', 'fa', 'jpr', 'peo', 'pes', 'prs', 'dv', 'sam', 'ckb'];\n const languageUtils = this.services?.languageUtils || new LanguageUtil(get());\n if (lng.toLowerCase().indexOf('-latn') > 1) return 'ltr';\n return rtlLngs.indexOf(languageUtils.getLanguagePartFromCode(lng)) > -1 || lng.toLowerCase().indexOf('-arab') > 1 ? 'rtl' : 'ltr';\n }\n static createInstance(options = {}, callback) {\n const instance = new I18n(options, callback);\n instance.createInstance = I18n.createInstance;\n return instance;\n }\n cloneInstance(options = {}, callback = noop) {\n const forkResourceStore = options.forkResourceStore;\n if (forkResourceStore) delete options.forkResourceStore;\n const mergedOptions = {\n ...this.options,\n ...options,\n ...{\n isClone: true\n }\n };\n const clone = new I18n(mergedOptions);\n if (options.debug !== undefined || options.prefix !== undefined) {\n clone.logger = clone.logger.clone(options);\n }\n const membersToCopy = ['store', 'services', 'language'];\n membersToCopy.forEach(m => {\n clone[m] = this[m];\n });\n clone.services = {\n ...this.services\n };\n clone.services.utils = {\n hasLoadedNamespace: clone.hasLoadedNamespace.bind(clone)\n };\n if (forkResourceStore) {\n const clonedData = Object.keys(this.store.data).reduce((prev, l) => {\n prev[l] = {\n ...this.store.data[l]\n };\n prev[l] = Object.keys(prev[l]).reduce((acc, n) => {\n acc[n] = {\n ...prev[l][n]\n };\n return acc;\n }, prev[l]);\n return prev;\n }, {});\n clone.store = new ResourceStore(clonedData, mergedOptions);\n clone.services.resourceStore = clone.store;\n }\n if (options.interpolation) {\n const defOpts = get();\n const mergedInterpolation = {\n ...defOpts.interpolation,\n ...this.options.interpolation,\n ...options.interpolation\n };\n const mergedForInterpolator = {\n ...mergedOptions,\n interpolation: mergedInterpolation\n };\n clone.services.interpolator = new Interpolator(mergedForInterpolator);\n }\n clone.translator = new Translator(clone.services, mergedOptions);\n clone.translator.on('*', (event, ...args) => {\n clone.emit(event, ...args);\n });\n clone.init(mergedOptions, callback);\n clone.translator.options = mergedOptions;\n clone.translator.backendConnector.services.utils = {\n hasLoadedNamespace: clone.hasLoadedNamespace.bind(clone)\n };\n return clone;\n }\n toJSON() {\n return {\n options: this.options,\n store: this.store,\n language: this.language,\n languages: this.languages,\n resolvedLanguage: this.resolvedLanguage\n };\n }\n}\nconst instance = I18n.createInstance();\n\nconst createInstance = instance.createInstance;\nconst dir = instance.dir;\nconst init = instance.init;\nconst loadResources = instance.loadResources;\nconst reloadResources = instance.reloadResources;\nconst use = instance.use;\nconst changeLanguage = instance.changeLanguage;\nconst getFixedT = instance.getFixedT;\nconst t = instance.t;\nconst exists = instance.exists;\nconst setDefaultNamespace = instance.setDefaultNamespace;\nconst hasLoadedNamespace = instance.hasLoadedNamespace;\nconst loadNamespaces = instance.loadNamespaces;\nconst loadLanguages = instance.loadLanguages;\n\nexport { changeLanguage, createInstance, instance as default, dir, exists, getFixedT, hasLoadedNamespace, init, keysFromSelector as keyFromSelector, loadLanguages, loadNamespaces, loadResources, reloadResources, setDefaultNamespace, t, use };\n","import e from \"./en.js\";\nimport t from \"./es.js\";\nimport n from \"i18next\";\n//#region src/index.ts\nn.init({\n\tfallbackLng: \"en\",\n\tlng: \"en\",\n\tshowSupportNotice: !1,\n\tresources: {\n\t\ten: e,\n\t\tes: t\n\t}\n});\nvar r = {\n\ttranslator: {\n\t\t...n,\n\t\tt: (e, t) => {\n\t\t\tlet { lng: r } = t;\n\t\t\tswitch (r) {\n\t\t\t\tcase \"en_US\":\n\t\t\t\tcase \"en-US\":\n\t\t\t\t\tt.lng = \"en\";\n\t\t\t\t\tbreak;\n\t\t\t\tcase \"es_ES\":\n\t\t\t\tcase \"es-ES\":\n\t\t\t\tcase \"es_MX\":\n\t\t\t\tcase \"es-MX\":\n\t\t\t\t\tt.lng = \"es\";\n\t\t\t\t\tbreak;\n\t\t\t\tdefault: break;\n\t\t\t}\n\t\t\treturn n.t(e, {\n\t\t\t\tlng: r,\n\t\t\t\t...t\n\t\t\t});\n\t\t}\n\t},\n\tlanguageOptions: [{\n\t\tvalue: \"en_US\",\n\t\tlabel: \"English (US)\"\n\t}, {\n\t\tvalue: \"es_ES\",\n\t\tlabel: \"Spanish\"\n\t}]\n};\n//#endregion\nexport { r as default };\n","import Translator from '@pie-lib/translator';\n\nconst { translator } = Translator;\n\n/**\n * A learner-facing string in `language`, the model's `language` as the\n * controller emits it. i18next falls back to English for a language or key it\n * does not hold. Values are not HTML-escaped: Svelte escapes what it renders.\n */\nexport function t(key: string, language?: string, values: Record<string, unknown> = {}): string {\n return translator.t(`translation:mcPopulatedBlank:${key}`, {\n lng: language,\n ...values,\n interpolation: { escapeValue: false },\n });\n}\n\n/** A string shared across elements, such as the correct-answer toggle's labels. */\nexport function tCommon(key: string, language?: string): string {\n return translator.t(`common:${key}`, { lng: language });\n}\n","<script lang=\"ts\">\nimport { computeAudioMode } from './computeAudioMode';\nimport { t } from './i18n';\n\ninterface AudioButtonSkin {\n silentUrl: string;\n playingUrl: string;\n}\n\nconst AUDIO_PLAYBACK = {\n IDLE: 'idle',\n PLAYING: 'playing',\n BLOCKED: 'blocked',\n PAUSED: 'paused',\n} as const;\ntype AudioPlaybackState = (typeof AUDIO_PLAYBACK)[keyof typeof AUDIO_PLAYBACK];\n\nlet {\n hasAudio = false,\n audioUrl,\n useFeatureButtonAudio = false,\n autoplayEnabled = false,\n featureAudioSkin,\n language,\n onaudiostarted,\n onaudioended,\n}: {\n hasAudio?: boolean;\n audioUrl?: string;\n useFeatureButtonAudio?: boolean;\n autoplayEnabled?: boolean;\n featureAudioSkin: AudioButtonSkin;\n language?: string;\n onaudiostarted?: () => void;\n onaudioended?: () => void;\n} = $props();\n\nlet audioEl = $state<HTMLAudioElement | null>(null);\nlet featureAudioButtonEl = $state<HTMLButtonElement | null>(null);\nlet autoplayEnableButtonEl = $state<HTMLButtonElement | null>(null);\nlet audioPlaybackState = $state<AudioPlaybackState>(AUDIO_PLAYBACK.IDLE);\n\nconst audioMode = $derived(computeAudioMode({ hasAudio, audioUrl, useFeatureButtonAudio }));\nconst isMediaPlaying = $derived(audioPlaybackState === AUDIO_PLAYBACK.PLAYING);\nconst autoPlayPromptOpen = $derived(audioPlaybackState === AUDIO_PLAYBACK.BLOCKED);\nconst audioErrorMessage = $derived(\n audioMode === 'error' ? t('audioResourceUnavailable', language) : ''\n);\n\n// Reset playback state when audioUrl changes so autoplay re-fires for a new question.\n$effect(() => {\n audioUrl;\n audioPlaybackState = AUDIO_PLAYBACK.IDLE;\n});\n\nfunction playFeatureAudio() {\n if (audioMode !== 'none' && audioMode !== 'error' && audioEl) {\n audioEl.play().catch(() => {});\n }\n}\n\nfunction handleEnableAutoplayClick() {\n if (audioMode !== 'none' && audioMode !== 'error' && audioEl) {\n audioEl.play().finally(() => {\n if (audioPlaybackState === AUDIO_PLAYBACK.BLOCKED) audioPlaybackState = AUDIO_PLAYBACK.PAUSED;\n });\n }\n}\n\nfunction useListener<K extends keyof HTMLElementEventMap>(\n getEl: () => EventTarget | null | undefined,\n event: K,\n handler: (e: HTMLElementEventMap[K]) => void\n) {\n $effect(() => {\n const el = getEl();\n if (!el) return;\n el.addEventListener(event, handler as EventListener);\n return () => el.removeEventListener(event, handler as EventListener);\n });\n}\n\nuseListener(\n () => audioEl,\n 'playing',\n () => {\n audioPlaybackState = AUDIO_PLAYBACK.PLAYING;\n onaudiostarted?.();\n }\n);\n\nuseListener(\n () => audioEl,\n 'ended',\n () => {\n audioPlaybackState = AUDIO_PLAYBACK.PAUSED;\n onaudioended?.();\n }\n);\n\nuseListener(\n () => featureAudioButtonEl,\n 'click',\n () => playFeatureAudio()\n);\nuseListener(\n () => autoplayEnableButtonEl,\n 'click',\n () => handleEnableAutoplayClick()\n);\n\n$effect(() => {\n if (!autoplayEnabled || audioMode === 'none' || audioMode === 'error') return;\n if (audioPlaybackState !== AUDIO_PLAYBACK.IDLE) return;\n if (audioEl && audioUrl) {\n audioPlaybackState = AUDIO_PLAYBACK.PAUSED;\n audioEl.play().catch(() => {\n audioPlaybackState = AUDIO_PLAYBACK.BLOCKED;\n });\n }\n});\n</script>\n\n{#if audioMode !== 'none'}\n <div class=\"audio-container pie-audio-container\">\n {#if audioMode === 'feature-button'}\n <audio\n bind:this={audioEl}\n class=\"sr-only pie-audio-player\"\n preload=\"metadata\"\n src={audioUrl}\n aria-hidden=\"true\"\n tabindex=\"-1\"\n ></audio>\n <button\n bind:this={featureAudioButtonEl}\n class=\"listen-button pie-listen-button rli-feature-audio\"\n type=\"button\"\n aria-label={t('listen', language)}\n >\n <img\n class={`listen-feature-icon pie-listen-icon rli-feature-listen ${isMediaPlaying ? '' : 'listen-active'}`}\n src={featureAudioSkin.silentUrl}\n alt={t('listenSilentAlt', language)}\n />\n <img\n class={`listen-feature-icon pie-listen-icon rli-feature-listen ${isMediaPlaying ? 'listen-active' : ''}`}\n src={featureAudioSkin.playingUrl}\n alt={t('listenPlayingAlt', language)}\n />\n </button>\n {:else if audioMode === 'controls'}\n <audio\n bind:this={audioEl}\n controls\n class=\"audio-controls pie-audio-player\"\n preload=\"metadata\"\n src={audioUrl}\n >\n <track kind=\"captions\" />\n </audio>\n {#if autoPlayPromptOpen}\n <button\n bind:this={autoplayEnableButtonEl}\n class=\"autoplay-enable pie-audio-autoplay-enable\"\n type=\"button\"\n >\n {t('clickToEnableAutoplay', language)}\n </button>\n {/if}\n {:else if audioMode === 'error'}\n <p class=\"audio-error pie-audio-error\" role=\"alert\">{audioErrorMessage}</p>\n {/if}\n </div>\n{/if}\n\n<style>\n .audio-container {\n margin-bottom: 1rem;\n }\n\n .audio-controls {\n display: block;\n width: 100%;\n max-width: 28rem;\n }\n\n .autoplay-enable {\n margin-top: 0.5rem;\n padding: 0;\n border: 0;\n background: transparent;\n font: inherit;\n font-size: 0.875rem;\n line-height: calc(1.25 / 0.875);\n color: inherit;\n text-decoration-line: underline;\n }\n\n .audio-error {\n margin: 0;\n font-size: 0.875rem;\n line-height: calc(1.25 / 0.875);\n color: var(--pie-incorrect-icon, #c10007);\n }\n\n .listen-button {\n width: var(--mpb-listen-button-size, 128px);\n height: var(--mpb-listen-button-size, 128px);\n border: 0;\n padding: 0;\n /*\n * Fixed light plates, at rest and on hover: the artwork's outlines and baked \"Listen\" label are\n * dark literals an <img> cannot theme, down to 1.2:1 on a dark scheme's page.\n */\n background-color: #ffffff;\n cursor: pointer;\n z-index: 1;\n }\n\n .listen-button:hover {\n background-color: #e2f1fe;\n }\n\n .listen-feature-icon {\n width: var(--mpb-listen-button-size, 128px);\n height: var(--mpb-listen-button-size, 128px);\n object-fit: contain;\n display: none;\n }\n\n .listen-feature-icon.listen-active {\n display: block;\n }\n\n .sr-only {\n position: absolute;\n width: 1px;\n height: 1px;\n padding: 0;\n margin: -1px;\n overflow: hidden;\n clip: rect(0, 0, 0, 0);\n white-space: nowrap;\n border: 0;\n }\n</style>\n","<script lang=\"ts\">\nimport { sanitizeModelHtml } from '@pie-element/shared-utils';\nimport { t } from './i18n';\n\ninterface DisplayChoice {\n imageUrl?: string;\n imageAlt?: string;\n labelHtml?: string;\n}\n\nlet {\n choiceMode = 'text',\n choices = [],\n displayChoice = undefined,\n displayChoiceLabelHtml = '',\n isStandalone = false,\n blankWidth,\n blankBorderWidth,\n ariaLabel,\n language,\n}: {\n choiceMode?: 'text' | 'image';\n choices?: DisplayChoice[];\n displayChoice?: DisplayChoice;\n displayChoiceLabelHtml?: string;\n isStandalone?: boolean;\n blankWidth: string;\n blankBorderWidth: string;\n ariaLabel: string;\n language?: string;\n} = $props();\n\nconst isImage = (c: DisplayChoice | undefined) => choiceMode === 'image' && !!c?.imageUrl;\nconst sizers = $derived(choices.filter((c) => isImage(c) || !!c?.labelHtml));\n</script>\n\n<span\n class={`cloze-marker pie-blank-slot ${isStandalone ? 'cloze-marker-standalone pie-blank-slot-standalone' : ''}`}\n style={`width:${blankWidth};border-bottom-width:${blankBorderWidth};`}\n role=\"status\"\n aria-live=\"polite\"\n aria-atomic=\"true\"\n aria-label={ariaLabel}\n>\n {#if isImage(displayChoice)}\n <img\n src={displayChoice?.imageUrl}\n alt={displayChoice?.imageAlt || t('selectedAnswerImage', language)}\n class=\"cloze-marker-image pie-blank-image\"\n style=\"max-width:var(--mpb-choice-image-max-width, 9.375rem);max-height:var(--mpb-choice-image-max-height, 9.375rem);\"\n />\n {:else if displayChoiceLabelHtml}\n <span class=\"cloze-marker-value pie-blank-value\">{@html sanitizeModelHtml(displayChoiceLabelHtml)}</span>\n {:else}\n <span class=\"cloze-marker-empty\">\n <span aria-hidden=\"true\">&nbsp;</span>\n <span class=\"sr-only\">{t('emptyBlank', language)}</span>\n </span>\n {/if}\n {#if sizers.length}\n <span class=\"cloze-marker-sizers pie-blank-sizers\" aria-hidden=\"true\">\n {#each sizers as c}\n {#if isImage(c)}\n <img\n src={c.imageUrl}\n alt=\"\"\n class=\"cloze-marker-image pie-blank-image\"\n style=\"max-width:var(--mpb-choice-image-max-width, 9.375rem);max-height:var(--mpb-choice-image-max-height, 9.375rem);\"\n />\n {:else}\n <span class=\"cloze-marker-value pie-blank-value\">{@html sanitizeModelHtml(c.labelHtml || '')}</span>\n {/if}\n {/each}\n </span>\n {/if}\n</span>\n\n<style>\n /* The underline width comes from the inline style (layoutLimits); the colour\n follows the text. The answer and a hidden copy of every choice share one grid\n cell, so the blank holds the largest choice's box from the start and nothing\n around it moves on selection; the copies keep the empty placeholder's 4ch\n minimum too. The answer comes first: it gives the blank its baseline. The\n minmax(0, 1fr) tracks keep a fixed-size blank at its size, so an answer\n taller than it overflows evenly, as in a flex box (sel-r1-base.css). */\n .cloze-marker {\n display: inline-grid;\n grid-template-columns: minmax(0, 1fr);\n grid-template-rows: minmax(0, 1fr);\n align-items: center;\n justify-items: center;\n text-align: center;\n vertical-align: baseline;\n padding-inline: 0.5rem;\n border-bottom: 2px solid currentColor;\n }\n\n .cloze-marker:focus-within {\n outline: 2px solid var(--mpb-focus-ring, #1565c0);\n outline-offset: 2px;\n }\n\n /* :global, because a host may wrap an answer image in its own element. */\n .cloze-marker > :global(*),\n .cloze-marker-sizers > :global(*) {\n grid-area: 1 / 1;\n }\n\n .cloze-marker-sizers {\n display: grid;\n grid-template-columns: minmax(0, 1fr);\n justify-items: center;\n align-self: stretch;\n justify-self: stretch;\n min-width: 4ch;\n visibility: hidden;\n pointer-events: none;\n }\n\n .cloze-marker-standalone {\n width: var(--mpb-blank-standalone-width, 7rem);\n }\n\n .cloze-marker-image {\n object-fit: contain;\n }\n\n .cloze-marker-empty {\n display: inline-block;\n min-width: 4ch;\n }\n\n .cloze-marker-value {\n width: 100%;\n display: inline-flex;\n align-items: center;\n justify-content: center;\n text-align: center;\n }\n\n .cloze-marker-value :global(p) {\n margin: 0;\n }\n\n /* Same 150x150 content-element constraint as ChoiceRow.svelte's .choice-html\n img — the selected choice's raw labelHtml can carry an embedded <img> here\n too, regardless of customType. See CONTOOL-3159. */\n .cloze-marker-value :global(img) {\n width: 150px;\n height: 150px;\n }\n\n .sr-only {\n position: absolute;\n width: 1px;\n height: 1px;\n padding: 0;\n margin: -1px;\n overflow: hidden;\n clip: rect(0, 0, 0, 0);\n white-space: nowrap;\n border: 0;\n }\n</style>\n","<script lang=\"ts\">\nimport { sanitizeModelHtml } from '@pie-element/shared-utils';\nimport { t } from './i18n';\n\ninterface Choice {\n id: string;\n labelHtml?: string;\n imageUrl?: string;\n imageAlt?: string;\n}\n\nlet {\n choice,\n choiceMode = 'text',\n isHorizontal = false,\n isSelected = false,\n isDisabled = false,\n correctness = undefined,\n isEvaluateMode = false,\n instanceId,\n radioGroupName,\n language,\n}: {\n choice: Choice;\n choiceMode?: 'text' | 'image';\n isHorizontal?: boolean;\n isSelected?: boolean;\n isDisabled?: boolean;\n correctness?: 'correct' | 'incorrect' | undefined;\n isEvaluateMode?: boolean;\n instanceId: string;\n radioGroupName: string;\n language?: string;\n} = $props();\n</script>\n\n<div\n class={`choice-row pie-choice ${isHorizontal ? 'choice-row-horizontal pie-choice-horizontal' : ''} ${isSelected ? 'is-selected pie-choice-selected' : ''} ${correctness ? `choice-${correctness} pie-choice-${correctness}` : ''}`}\n style=\"gap:var(--mpb-choice-row-gap, 0.5rem);\"\n>\n {#if isHorizontal}\n <label\n for={`${instanceId}-opt-${choice.id}`}\n class=\"choice-tile pie-choice-tile\"\n >\n <span class=\"choice-tile-content pie-choice-tile-content\">\n {#if choiceMode === 'image' && choice.imageUrl}\n <img\n src={choice.imageUrl}\n alt={choice.imageAlt || t('choiceImage', language, { id: choice.id })}\n class=\"choice-image pie-choice-image\"\n style=\"max-width:min(100%, var(--mpb-choice-image-max-width, 9.375rem));max-height:var(--mpb-choice-image-max-height, 9.375rem);\"\n />\n {:else}\n <span class=\"choice-html pie-choice-label\">{@html sanitizeModelHtml(choice.labelHtml)}</span>\n {/if}\n </span>\n <input\n type=\"radio\"\n name={radioGroupName}\n id={`${instanceId}-opt-${choice.id}`}\n value={choice.id}\n checked={isSelected}\n disabled={isDisabled}\n class=\"choice-radio-bottom pie-choice-radio pie-choice-radio-bottom\"\n />\n </label>\n {:else}\n <input\n type=\"radio\"\n name={radioGroupName}\n id={`${instanceId}-opt-${choice.id}`}\n value={choice.id}\n checked={isSelected}\n disabled={isDisabled}\n class=\"choice-radio-inline pie-choice-radio pie-choice-radio-inline\"\n />\n <label for={`${instanceId}-opt-${choice.id}`} class=\"choice-label-wrap pie-choice-label-wrap\">\n {#if choiceMode === 'image' && choice.imageUrl}\n <img\n src={choice.imageUrl}\n alt={choice.imageAlt || t('choiceImage', language, { id: choice.id })}\n class=\"choice-image pie-choice-image\"\n style=\"max-height:var(--mpb-choice-image-max-height, 5rem);\"\n />\n {:else}\n <span class=\"choice-html pie-choice-label\">{@html sanitizeModelHtml(choice.labelHtml)}</span>\n {/if}\n </label>\n {/if}\n {#if isEvaluateMode && correctness}\n <span\n class={`pie-choice-feedback-badge ${correctness === 'correct' ? 'pie-choice-feedback-correct' : 'pie-choice-feedback-incorrect'}`}\n aria-hidden=\"true\"\n >\n {correctness === 'correct' ? '✓' : '✕'}\n </span>\n {/if}\n</div>\n\n<style>\n .choice-row {\n display: flex;\n align-items: flex-start;\n }\n\n .choice-row-horizontal {\n flex-direction: column;\n align-items: center;\n width: min(var(--mpb-choice-width-px, 170px), var(--mpb-choice-width-vw, 30vw));\n min-height: var(--mpb-choice-tile-min-height, 11rem);\n gap: 0;\n }\n\n .choice-tile {\n display: flex;\n flex-direction: column;\n justify-content: space-between;\n align-items: center;\n width: 100%;\n min-height: var(--mpb-choice-tile-min-height, 11rem);\n padding: 0.8rem 0.65rem 0.5rem;\n border-radius: 8px;\n background: transparent;\n transition: background-color 120ms ease-in-out;\n cursor: pointer;\n text-align: center;\n }\n\n /* A grid track gives the content's child the tile's width, where a flex box sized it to\n its content. A host's image wrapper (pie-players' .pie-image-scroll) then fills the\n tile, so an SVG with a viewBox and no width or height takes the tile's width instead\n of collapsing to 0×0; and an image capped at 100% never overflows the wrapper into a\n scroll bar. The image's auto margins centre it and keep a smaller one at its own size. */\n .choice-tile-content {\n width: 100%;\n display: grid;\n grid-template-columns: minmax(0, 1fr);\n align-items: center;\n justify-items: center;\n min-height: var(--mpb-choice-content-min-height, 7.5rem);\n }\n\n .choice-tile-content > :global(*) {\n justify-self: stretch;\n max-width: 100%;\n }\n\n .choice-image {\n display: block;\n margin-inline: auto;\n object-fit: contain;\n }\n\n .choice-label-wrap {\n flex: 1 1 0%;\n cursor: pointer;\n }\n\n /* Every background painted here carries its own text colour: a variant that\n pins a light surface (the CQT sheets' #fcfcd3) would otherwise sit under\n the scheme's text colour, which is near-white in a dark scheme. With neither\n the hook nor --pie-text defined the declaration is invalid at computed-value\n time and the colour inherits. */\n .choice-row-horizontal:hover .choice-tile {\n background: var(--mpb-choice-hover-bg, var(--pie-background-dark, #ecedf1));\n color: var(--mpb-choice-hover-color, var(--pie-text));\n }\n\n .pie-choice-horizontal:not(.is-selected):not(:hover) .pie-choice-tile {\n background: transparent;\n }\n\n .choice-row-horizontal.is-selected .choice-tile {\n background: var(--mpb-choice-selected-bg, var(--pie-secondary-background, rgba(241, 241, 241, 1)));\n color: var(--mpb-choice-selected-color, var(--pie-text));\n }\n\n .choice-row-horizontal.is-selected:hover .choice-tile {\n background: var(--mpb-choice-selected-bg, var(--pie-secondary-background, rgba(241, 241, 241, 1)));\n color: var(--mpb-choice-selected-color, var(--pie-text));\n }\n\n .pie-choice:not(.pie-choice-horizontal):hover .pie-choice-label-wrap {\n background: var(--pie-background-dark, #ecedf1);\n color: var(--pie-text);\n }\n\n .pie-choice:not(.pie-choice-horizontal):not(.is-selected):not(:hover) .pie-choice-label-wrap {\n background: transparent;\n }\n\n .pie-choice:not(.pie-choice-horizontal).is-selected .pie-choice-label-wrap {\n background: var(--pie-secondary-background, rgba(241, 241, 241, 1));\n color: var(--pie-text);\n border-radius: 6px;\n }\n\n .pie-choice:not(.pie-choice-horizontal).is-selected:hover .pie-choice-label-wrap {\n background: var(--pie-secondary-background, rgba(241, 241, 241, 1));\n color: var(--pie-text);\n }\n\n .pie-choice.choice-correct {\n border-left: 3px solid var(--pie-correct-tertiary, #0ea449);\n }\n\n .pie-choice.choice-incorrect {\n border-left: 3px solid var(--pie-incorrect-icon, #bf0d00);\n }\n\n .pie-choice-horizontal.choice-correct .choice-tile {\n background: var(--pie-correct-secondary, #e8f5e9);\n color: var(--pie-text);\n }\n\n .pie-choice-horizontal.choice-incorrect .choice-tile {\n background: var(--pie-incorrect-secondary, #ffebee);\n color: var(--pie-text);\n }\n\n .pie-choice-feedback-badge {\n margin-left: auto;\n display: inline-flex;\n align-items: center;\n justify-content: center;\n width: 1.1rem;\n height: 1.1rem;\n border-radius: 9999px;\n font-size: 0.72rem;\n line-height: 1;\n font-weight: 700;\n color: var(--pie-background, #ffffff);\n }\n\n .pie-choice-feedback-correct {\n background: var(--pie-correct-icon, #087d38);\n }\n\n .pie-choice-feedback-incorrect {\n background: var(--pie-incorrect-icon, #bf0d00);\n }\n\n .choice-row-horizontal :global(p) {\n margin: 0;\n text-align: center;\n }\n\n .choice-html :global(p) {\n margin: 0;\n }\n\n .choice-html {\n width: 100%;\n display: inline-flex;\n align-items: center;\n justify-content: center;\n text-align: center;\n }\n\n /* Choices carrying raw <img> markup in labelHtml (rather than the dedicated\n imageUrl/imageAlt fields) render unconstrained at their authored size\n otherwise — 3rd-party/CQT-sourced content is typically authored well above\n the platform's 150x150 content-element spec. Applies regardless of\n customType, unlike the r1-CQT-specific cqt-css overlays. See CONTOOL-3159. */\n .choice-html :global(img) {\n width: 150px;\n height: 150px;\n }\n\n /* Only the top margin is spaced; the browser's own radio side margins would\n otherwise offset the control from its label (the demo app's preflight zeroed them).\n 24px is the WCAG 2.5.8 minimum target size; the native radio scales its circle to the box. */\n .choice-radio-bottom {\n margin: var(--mpb-horizontal-choice-radio-top-margin, 0.5rem) 0 0;\n padding: var(--mpb-choice-radio-padding, 0px);\n width: 24px;\n height: 24px;\n }\n\n .choice-radio-inline {\n margin: var(--mpb-horizontal-choice-radio-top-margin, 0.5rem) 0 0;\n width: 24px;\n height: 24px;\n flex-shrink: 0;\n }\n</style>\n","<script lang=\"ts\">\nimport { sanitizeModelHtml } from '@pie-element/shared-utils';\nimport { tCommon } from './i18n';\n\nlet { html, language }: { html: string; language?: string } = $props();\n\nlet expanded = $state(false);\nconst panelId = `mpb-teacher-instructions-${Math.random().toString(36).slice(2, 10)}`;\n</script>\n\n<!-- Collapsed by default, as multiple-choice shows them; the controller sends them to instructors only. -->\n<div class=\"teacher-instructions pie-teacher-instructions\">\n <button\n type=\"button\"\n class=\"teacher-instructions-toggle pie-teacher-instructions-toggle\"\n aria-expanded={expanded}\n aria-controls={panelId}\n onclick={() => (expanded = !expanded)}\n >\n {tCommon(expanded ? 'hideTeacherInstructions' : 'showTeacherInstructions', language)}\n </button>\n <div id={panelId} class=\"teacher-instructions-content pie-teacher-instructions-content\" hidden={!expanded}>\n {@html sanitizeModelHtml(html)}\n </div>\n</div>\n\n<style>\n .teacher-instructions {\n margin-bottom: 1rem;\n }\n\n .teacher-instructions-toggle {\n padding: 0;\n border: 0;\n border-bottom: 1px dotted currentColor;\n background: transparent;\n font: inherit;\n color: var(--pie-primary, #3f51b5);\n cursor: pointer;\n }\n\n .teacher-instructions-toggle:focus-visible {\n outline: 2px solid var(--mpb-focus-ring, var(--pie-focus-outline, #1565c0));\n outline-offset: 2px;\n }\n\n .teacher-instructions-content {\n padding-top: 1rem;\n }\n</style>\n","export interface ChoiceCorrectnessParams {\n isEvaluateMode: boolean;\n correctChoiceId: string;\n selectedId: string;\n showCorrectAnswer: boolean;\n}\n\n/**\n * Computes which choice ids should display a correctness badge and what kind.\n *\n * Reveal mode (showCorrectAnswer=true) shows only the canonical correct answer —\n * the student's wrong selection is deliberately suppressed so the UI only\n * highlights what to remember, not what to regret.\n *\n * Unanswered-in-evaluate (selectedId='') treats the correct choice as missed\n * (incorrect badge) rather than triggering the two-badge wrong-answer path.\n */\nexport function computeChoiceCorrectness(\n params: ChoiceCorrectnessParams\n): Map<string, 'correct' | 'incorrect'> {\n const map = new Map<string, 'correct' | 'incorrect'>();\n const { isEvaluateMode, correctChoiceId, selectedId, showCorrectAnswer } = params;\n\n if (!isEvaluateMode || !correctChoiceId) {\n return map;\n }\n if (showCorrectAnswer) {\n map.set(correctChoiceId, 'correct');\n return map;\n }\n if (!selectedId) {\n map.set(correctChoiceId, 'incorrect');\n return map;\n }\n if (selectedId === correctChoiceId) {\n map.set(correctChoiceId, 'correct');\n return map;\n }\n map.set(selectedId, 'incorrect');\n map.set(correctChoiceId, 'incorrect');\n return map;\n}\n","const BLANK_TOKEN = '{{blank}}';\n\nexport interface LayoutProfileParams {\n interactionMode?: string;\n template?: string;\n choiceLayout?: string;\n layoutProfile?: string;\n hasAudio?: boolean;\n useFeatureButtonAudio?: boolean | null;\n prompt?: string;\n}\n\nexport interface LayoutProfileResult {\n isAudioOnlyMode: boolean;\n isBlankOnlyTemplate: boolean;\n choiceLayout: 'horizontal' | 'vertical';\n isHorizontalChoices: boolean;\n hasInlineSentenceAudioLayout: boolean;\n useFeatureButtonAudio: boolean;\n hasVisiblePrompt: boolean;\n}\n\n// Media that shows without any text beside it, such as a picture-only passage.\nconst VISIBLE_MEDIA = /<(img|svg|video|audio|iframe|object|embed|canvas|picture|math)\\b/i;\n\n/**\n * Whether authored HTML shows anything. Imported items carry empty prompt\n * wrappers (`<div class=\"iat-html-container\"></div>`), which render nothing but\n * would still take a grid row and label the choices with an empty name.\n */\nexport function hasVisibleHtmlContent(html: string | undefined): boolean {\n if (!html) return false;\n if (VISIBLE_MEDIA.test(html)) return true;\n return (\n html\n .replace(/<[^>]*>/g, '')\n .replace(/&nbsp;|&#160;|&#xa0;/gi, ' ')\n .trim() !== ''\n );\n}\n\nconst FEATURE_BUTTON_PROFILES = new Set([\n 'audio_blank_only',\n 'stimulus_image_blank',\n 'token_sequence',\n]);\n\nexport function computeLayoutProfile(params: LayoutProfileParams): LayoutProfileResult {\n const {\n interactionMode = '',\n template = '',\n choiceLayout: configuredChoiceLayout,\n layoutProfile = '',\n hasAudio = false,\n useFeatureButtonAudio: configuredFeatureButton,\n prompt,\n } = params;\n\n const isAudioOnlyMode = interactionMode === 'audio_mc_only';\n\n const isBlankOnlyTemplate = (() => {\n if (!template) return false;\n const plain = template\n .replace(/<[^>]+>/g, '')\n .replace(/&nbsp;/g, ' ')\n .trim();\n return plain === BLANK_TOKEN;\n })();\n\n const choiceLayout: 'horizontal' | 'vertical' =\n configuredChoiceLayout === 'horizontal' || configuredChoiceLayout === 'vertical'\n ? (configuredChoiceLayout as 'horizontal' | 'vertical')\n : isAudioOnlyMode || isBlankOnlyTemplate\n ? 'horizontal'\n : 'vertical';\n\n const isHorizontalChoices = choiceLayout === 'horizontal';\n\n const hasInlineSentenceAudioLayout = layoutProfile === 'inline_sentence' && hasAudio;\n\n const useFeatureButtonAudio =\n typeof configuredFeatureButton === 'boolean'\n ? configuredFeatureButton\n : hasAudio && FEATURE_BUTTON_PROFILES.has(layoutProfile);\n\n return {\n isAudioOnlyMode,\n isBlankOnlyTemplate,\n choiceLayout,\n isHorizontalChoices,\n hasInlineSentenceAudioLayout,\n useFeatureButtonAudio,\n hasVisiblePrompt: hasVisibleHtmlContent(prompt),\n };\n}\n","import { type LayoutLimits, DEFAULT_LAYOUT_LIMITS } from '../shared/layoutLimits.js';\nexport type { LayoutLimits };\nexport { DEFAULT_LAYOUT_LIMITS };\n\n/**\n * Maps every LayoutLimits key (except legendMaxChars, which is a return value not a CSS var)\n * to its --mpb-* CSS variable name and CSS unit.\n * Add a single entry here when adding a new layout limit.\n */\nexport const CSS_VAR_SPEC: Record<\n Exclude<keyof LayoutLimits, 'legendMaxChars'>,\n { varName: string; unit: string }\n> = {\n blankStandaloneWidthRem: { varName: '--mpb-blank-standalone-width', unit: 'rem' },\n blankWideWidthRem: { varName: '--mpb-blank-wide-width', unit: 'rem' },\n blankUnderlineWidthPx: { varName: '--mpb-blank-underline-width', unit: 'px' },\n blankUnderlineWideWidthPx: { varName: '--mpb-blank-underline-wide-width', unit: 'px' },\n horizontalChoiceWidthPx: { varName: '--mpb-choice-width-px', unit: 'px' },\n horizontalChoiceWidthVw: { varName: '--mpb-choice-width-vw', unit: 'vw' },\n horizontalChoiceTileMinHeightRem: { varName: '--mpb-choice-tile-min-height', unit: 'rem' },\n horizontalChoiceContentMinHeightRem: { varName: '--mpb-choice-content-min-height', unit: 'rem' },\n choiceImageMaxHeightRem: { varName: '--mpb-choice-image-max-height', unit: 'rem' },\n choiceImageMaxWidthRem: { varName: '--mpb-choice-image-max-width', unit: 'rem' },\n choiceGroupGapRem: { varName: '--mpb-choice-group-gap', unit: 'rem' },\n choiceRowGapRem: { varName: '--mpb-choice-row-gap', unit: 'rem' },\n horizontalChoiceRadioTopMarginRem: {\n varName: '--mpb-horizontal-choice-radio-top-margin',\n unit: 'rem',\n },\n toggleButtonGapRem: { varName: '--mpb-toggle-button-gap', unit: 'rem' },\n listenButtonSizePx: { varName: '--mpb-listen-button-size', unit: 'px' },\n audioBlankTemplateMarginTopRem: { varName: '--mpb-audio-blank-template-margin-top', unit: 'rem' },\n audioBlankTemplateMarginBottomRem: {\n varName: '--mpb-audio-blank-template-margin-bottom',\n unit: 'rem',\n },\n audioInstructionsMaxWidthPx: { varName: '--mpb-audio-instructions-max-width', unit: 'px' },\n stimulusMinColumnPx: { varName: '--mpb-stimulus-min-column', unit: 'px' },\n textMinColumnPx: { varName: '--mpb-text-min-column', unit: 'px' },\n stimulusGridColumnGapRem: { varName: '--mpb-stimulus-grid-column-gap', unit: 'rem' },\n stimulusGridRowGapRem: { varName: '--mpb-stimulus-grid-row-gap', unit: 'rem' },\n stimulusSentenceMarginTopRem: { varName: '--mpb-stimulus-sentence-margin-top', unit: 'rem' },\n stimulusChoicesMarginTopRem: { varName: '--mpb-stimulus-choices-margin-top', unit: 'rem' },\n tokenGridColumnGapRem: { varName: '--mpb-token-grid-column-gap', unit: 'rem' },\n tokenGridRowGapRem: { varName: '--mpb-token-grid-row-gap', unit: 'rem' },\n tokenTemplateMarginTopRem: { varName: '--mpb-token-template-margin-top', unit: 'rem' },\n tokenInlineTokenGapRem: { varName: '--mpb-token-inline-token-gap', unit: 'rem' },\n tokenChoicesMarginTopRem: { varName: '--mpb-token-choices-margin-top', unit: 'rem' },\n inlineGridColumnGapRem: { varName: '--mpb-inline-grid-column-gap', unit: 'rem' },\n inlineGridRowGapRem: { varName: '--mpb-inline-grid-row-gap', unit: 'rem' },\n inlineTemplateMarginTopRem: { varName: '--mpb-inline-template-margin-top', unit: 'rem' },\n inlineChoicesMarginTopRem: { varName: '--mpb-inline-choices-margin-top', unit: 'rem' },\n};\n\nexport const DEFAULT_LAYOUT_PROFILE_PRESETS: Record<string, Partial<LayoutLimits>> = {\n audio_blank_only: {\n blankWideWidthRem: 10,\n blankUnderlineWideWidthPx: 6,\n horizontalChoiceTileMinHeightRem: 11.25,\n horizontalChoiceContentMinHeightRem: 9.375,\n choiceGroupGapRem: 1,\n audioBlankTemplateMarginBottomRem: 1.875,\n },\n stimulus_image_blank: {\n blankWideWidthRem: 10,\n blankUnderlineWideWidthPx: 6,\n },\n token_sequence: {\n blankStandaloneWidthRem: 7,\n blankUnderlineWideWidthPx: 6,\n },\n};\n\nexport interface LayoutStyleResult {\n rootStyle: string;\n blankWidth: string;\n blankBorderWidth: string;\n legendMaxChars: number;\n}\n\nexport function computeLayoutStyle(params: {\n layoutProfile: string;\n isBlankOnlyTemplate: boolean;\n configuredLimits: unknown;\n customProfilePresets: unknown;\n}): LayoutStyleResult {\n const { layoutProfile, isBlankOnlyTemplate } = params;\n\n const configured =\n params.configuredLimits && typeof params.configuredLimits === 'object'\n ? (params.configuredLimits as Partial<LayoutLimits>)\n : {};\n const customPresets =\n params.customProfilePresets && typeof params.customProfilePresets === 'object'\n ? (params.customProfilePresets as Record<string, unknown>)\n : {};\n const customForProfile =\n customPresets[layoutProfile] && typeof customPresets[layoutProfile] === 'object'\n ? (customPresets[layoutProfile] as Partial<LayoutLimits>)\n : {};\n const profilePreset: Partial<LayoutLimits> = {\n ...(DEFAULT_LAYOUT_PROFILE_PRESETS[layoutProfile] ?? {}),\n ...customForProfile,\n };\n const l: LayoutLimits = { ...DEFAULT_LAYOUT_LIMITS, ...configured, ...profilePreset };\n\n const wideBlankProfiles = ['audio_blank_only', 'stimulus_image_blank'];\n const wideUnderlineProfiles = ['audio_blank_only', 'stimulus_image_blank', 'token_sequence'];\n\n const blankWidth = wideBlankProfiles.includes(layoutProfile)\n ? `${l.blankWideWidthRem}rem`\n : isBlankOnlyTemplate\n ? `${l.blankStandaloneWidthRem}rem`\n : 'auto';\n\n const blankBorderWidth = wideUnderlineProfiles.includes(layoutProfile)\n ? `${l.blankUnderlineWideWidthPx}px`\n : `${l.blankUnderlineWidthPx}px`;\n\n const cssVars = (Object.keys(CSS_VAR_SPEC) as (keyof typeof CSS_VAR_SPEC)[]).map(\n (key) => `${CSS_VAR_SPEC[key].varName}:${l[key]}${CSS_VAR_SPEC[key].unit}`\n );\n const rootStyle = cssVars.join(';');\n\n return { rootStyle, blankWidth, blankBorderWidth, legendMaxChars: l.legendMaxChars };\n}\n","// The SVGs are inlined into the delivery bundle, so they are kept optimized:\n// `svgo --multipass --precision 1` with `removeViewBox` disabled, since the\n// viewBox is what scales an icon to the button size. See CONTOOL-3253.\n\nimport listenSilentDefaultSvg from './listen-silent-default.svg?raw';\nimport listenPlayingDefaultSvg from './listen-playing-default.svg?raw';\nimport listenSilentEsSvg from './listen-silent-es.svg?raw';\nimport listenPlayingEsSvg from './listen-playing-es.svg?raw';\n\nconst toSvgDataUri = (svg: string): string =>\n `data:image/svg+xml;charset=utf-8,${encodeURIComponent(svg)}`;\n\nexport const LISTEN_SILENT_DEFAULT_URL = toSvgDataUri(listenSilentDefaultSvg);\nexport const LISTEN_PLAYING_DEFAULT_URL = toSvgDataUri(listenPlayingDefaultSvg);\nexport const LISTEN_SILENT_ES_URL = toSvgDataUri(listenSilentEsSvg);\nexport const LISTEN_PLAYING_ES_URL = toSvgDataUri(listenPlayingEsSvg);\n","import {\n LISTEN_PLAYING_DEFAULT_URL,\n LISTEN_PLAYING_ES_URL,\n LISTEN_SILENT_DEFAULT_URL,\n LISTEN_SILENT_ES_URL,\n} from './assets/audioButtonSkinAssets';\n\nexport type AudioButtonSkin = { silentUrl: string; playingUrl: string };\n\n/**\n * Built-in fallback skins, bundled with this package (no external CDN dependency).\n * Callers can override per-item via `audioButtonSkin` / `audioButtonSkinsByLocale`\n * on the model — see computeFeatureAudioSkin below.\n */\nexport const DEFAULT_AUDIO_BUTTON_SKINS: Record<string, AudioButtonSkin> = {\n default: {\n silentUrl: LISTEN_SILENT_DEFAULT_URL,\n playingUrl: LISTEN_PLAYING_DEFAULT_URL,\n },\n es: {\n silentUrl: LISTEN_SILENT_ES_URL,\n playingUrl: LISTEN_PLAYING_ES_URL,\n },\n};\n\n/**\n * Resolves the audio button skin to display.\n * Priority: byLocale[exact] > byLocale[lang] > byLocale.default > customSingle > built-in default\n */\nexport function computeFeatureAudioSkin(params: {\n locale: unknown;\n audioButtonSkin: unknown;\n audioButtonSkinsByLocale: unknown;\n}): AudioButtonSkin {\n const locale = String(params.locale || '').toLowerCase();\n const lang = locale.slice(0, 2);\n const byLocale =\n params.audioButtonSkinsByLocale && typeof params.audioButtonSkinsByLocale === 'object'\n ? (params.audioButtonSkinsByLocale as Record<string, unknown>)\n : {};\n const customSingle =\n params.audioButtonSkin && typeof params.audioButtonSkin === 'object'\n ? (params.audioButtonSkin as AudioButtonSkin)\n : null;\n const defaultSkin = locale.startsWith('es')\n ? DEFAULT_AUDIO_BUTTON_SKINS.es\n : DEFAULT_AUDIO_BUTTON_SKINS.default;\n return (byLocale[locale] ||\n byLocale[lang] ||\n byLocale.default ||\n customSingle ||\n defaultSkin) as AudioButtonSkin;\n}\n\n/**\n * Returns the choice id that the ClozeMarker and selected-state highlight should display.\n * While the correct answer is revealed in evaluate mode it is the correct choice.\n * A player that shows the key outside evaluate hands over the correct-response\n * session from `createCorrectResponseSession`, which is displayed as the selection.\n */\nexport function computeDisplayChoiceId(params: {\n selectedId: string;\n isEvaluateMode: boolean;\n showCorrectAnswer: boolean;\n correctChoiceId: string;\n}): string {\n const { selectedId, isEvaluateMode, showCorrectAnswer, correctChoiceId } = params;\n if (isEvaluateMode && showCorrectAnswer && correctChoiceId) return correctChoiceId;\n return selectedId;\n}\n\n/**\n * Returns the result the screen-reader-only announcement reports after evaluate\n * mode scoring. Empty string means nothing is announced.\n */\nexport function computeResultStatus(params: {\n isEvaluateMode: boolean;\n showCorrectAnswer: boolean;\n isCorrect: boolean;\n isIncorrect: boolean;\n selectedId: string;\n}): 'correct' | 'incorrect' | '' {\n const { isEvaluateMode, showCorrectAnswer, isCorrect, isIncorrect, selectedId } = params;\n if (!isEvaluateMode || showCorrectAnswer) return '';\n if (isCorrect) return 'correct';\n if (isIncorrect && selectedId) return 'incorrect';\n return '';\n}\n\n/**\n * Returns the visible legend text for the choices fieldset.\n * Strips HTML, truncates to legendMaxChars with an ellipsis, falls back to answerChoicesLabel.\n */\nexport function computeLegendText(params: {\n prompt: string;\n legendMaxChars: number;\n answerChoicesLabel: string;\n}): string {\n const { prompt, legendMaxChars, answerChoicesLabel } = params;\n const plain = prompt\n .replace(/<[^>]+>/g, ' ')\n .replace(/\\s+/g, ' ')\n .trim();\n const maxChars = Math.max(8, legendMaxChars);\n if (!plain) return answerChoicesLabel;\n return plain.length > maxChars ? `${plain.slice(0, Math.max(1, maxChars - 1))}…` : plain;\n}\n","import selR1BaseCss from './cqt-css/sel-r1-base.css?raw';\nimport selR1PlusgggCss from './cqt-css/sel-r1-plusggg.css?raw';\nimport srVicCss from './cqt-css/sr-vic.css?raw';\nimport selVicCss from './cqt-css/sel-vic.css?raw';\nimport selR1GplusgggCss from './cqt-css/sel-r1-gplusggg.css?raw';\nimport selR1GStemCss from './cqt-css/sel-r1-g-stem.css?raw';\nimport selR1GgPlusCss from './cqt-css/sel-r1-gg-plus.css?raw';\nimport selR1GgplusCss from './cqt-css/sel-r1-ggplus.css?raw';\nimport selR1S3Css from './cqt-css/sel-r1-s3.css?raw';\n\nexport type VariantCssConfig = {\n variantId: string;\n variantClass: string;\n cssText: string;\n};\n\nconst VARIANT_BY_CUSTOM_TYPE: Record<string, VariantCssConfig> = {\n 'sel_r1-_plusggg': {\n variantId: 'sel-r1-plusggg',\n variantClass: 'variant-sel-r1-plusggg',\n cssText: selR1PlusgggCss,\n },\n 'sr-vic': {\n variantId: 'sr-vic',\n variantClass: 'variant-sr-vic',\n cssText: srVicCss,\n },\n sel_vic: {\n variantId: 'sel-vic',\n variantClass: 'variant-sel-vic',\n cssText: selVicCss,\n },\n 'sel_r1-_gplusggg': {\n variantId: 'sel-r1-gplusggg',\n variantClass: 'variant-sel-r1-gplusggg',\n cssText: selR1GplusgggCss,\n },\n 'sel_r1-g_plusggg': {\n variantId: 'sel-r1-g-stem',\n variantClass: 'variant-sel-r1-g-stem',\n cssText: selR1GStemCss,\n },\n 'sel_r1-gg_plusggg': {\n variantId: 'sel-r1-gg-plus',\n variantClass: 'variant-sel-r1-gg-plus',\n cssText: selR1GgPlusCss,\n },\n 'sel_r1-_ggplusggg': {\n variantId: 'sel-r1-ggplus',\n variantClass: 'variant-sel-r1-ggplus',\n cssText: selR1GgplusCss,\n },\n 'sel_r1-s3_plusggg': {\n variantId: 'sel-r1-s3',\n variantClass: 'variant-sel-r1-s3',\n cssText: selR1S3Css,\n },\n};\n\nconst normalizeCustomType = (value: unknown): string => {\n const normalized = String(value || '')\n .trim()\n .toLowerCase();\n // Accept both base custom types and version-suffixed tags like \"...v0.0.1\".\n return normalized.replace(/v\\d+\\.\\d+\\.\\d+$/i, '');\n};\n\nexport const getVariantCssConfig = (customType: unknown): VariantCssConfig | undefined => {\n const normalized = normalizeCustomType(customType);\n return VARIANT_BY_CUSTOM_TYPE[normalized];\n};\n\nexport const getVariantRootClass = (customType: unknown): string => {\n return getVariantCssConfig(customType)?.variantClass || '';\n};\n\nconst SEL_R1_VARIANT_IDS = new Set([\n 'sel-r1-plusggg',\n 'sel-r1-gplusggg',\n 'sel-r1-g-stem',\n 'sel-r1-gg-plus',\n 'sel-r1-ggplus',\n 'sel-r1-s3',\n]);\n\nconst ROOT_SELECTOR = /\\.mc-populated-blank-root(?![\\w-])/g;\n\n/** FNV-1a over the text, in base 36. */\nconst hashText = (text: string): string => {\n let hash = 0x811c9dc5;\n for (let i = 0; i < text.length; i++) {\n hash ^= text.charCodeAt(i);\n hash = Math.imul(hash, 0x01000193);\n }\n return (hash >>> 0).toString(36);\n};\n\n/**\n * Names this build's variant sheets. The sheets are global, so each selector is\n * narrowed to roots carrying the same key: two versions of the element on one\n * page then style only their own roots, and share a sheet only when the CSS is\n * identical.\n */\nexport const VARIANT_CSS_KEY = hashText(\n [selR1BaseCss, ...Object.values(VARIANT_BY_CUSTOM_TYPE).map((c) => c.cssText)].join('\\n')\n);\n\n/** `:where()` adds no specificity, so the variant sheets cascade exactly as written. */\nexport const keyVariantCss = (cssText: string): string =>\n cssText.replace(\n ROOT_SELECTOR,\n `.mc-populated-blank-root:where([data-mpb-css=\"${VARIANT_CSS_KEY}\"])`\n );\n\nconst injectStyleOnce = (target: Document | ShadowRoot, variantName: string, cssText: string) => {\n const id = `mc-populated-blank-css-${variantName}-${VARIANT_CSS_KEY}`;\n if (target.getElementById(id)) return;\n const style = document.createElement('style');\n style.id = id;\n style.setAttribute('data-mpb-variant', variantName);\n style.textContent = keyVariantCss(cssText);\n (target instanceof ShadowRoot ? target : target.head).appendChild(style);\n};\n\n/**\n * Adds the item's variant sheet where `root` renders: the document head, or the\n * shadow root of a host that placed the element inside one, which document\n * styles do not reach.\n */\nexport const ensureVariantCssInjected = (config: VariantCssConfig | undefined, root: Element) => {\n if (!config?.cssText || typeof document === 'undefined') {\n return;\n }\n const rootNode = root.getRootNode();\n const target = rootNode instanceof ShadowRoot ? rootNode : document;\n if (SEL_R1_VARIANT_IDS.has(config.variantId)) {\n injectStyleOnce(target, 'sel-r1-base', selR1BaseCss);\n }\n injectStyleOnce(target, config.variantId, config.cssText);\n};\n","<svelte:options\n customElement={{\n shadow: 'none',\n props: {\n model: { type: 'Object' },\n session: { type: 'Object' },\n options: { type: 'Object' },\n onSessionChange: {},\n onAudioStarted: {},\n onAudioEnded: {},\n },\n }}\n/>\n\n<script lang=\"ts\">\nimport { sanitizeModelHtml } from '@pie-element/shared-utils';\nimport AudioPlayer from './AudioPlayer.svelte';\nimport ClozeMarker from './ClozeMarker.svelte';\nimport ChoiceRow from './ChoiceRow.svelte';\nimport TeacherInstructions from './TeacherInstructions.svelte';\nimport { computeChoiceCorrectness } from './computeChoiceCorrectness';\nimport { computeLayoutProfile } from './computeLayoutProfile';\nimport { computeLayoutStyle } from './computeLayoutStyle';\nimport {\n computeFeatureAudioSkin,\n computeDisplayChoiceId,\n computeResultStatus,\n computeLegendText,\n} from './computeDisplayState';\nimport {\n ensureVariantCssInjected,\n getVariantCssConfig,\n getVariantRootClass,\n VARIANT_CSS_KEY,\n} from './variant-css-map';\nimport { t as translate, tCommon } from './i18n';\nimport { selectedChoiceId } from '../shared/session';\n\nconst BLANK_TOKEN = '{{blank}}';\n\nlet { model, session, onSessionChange, onAudioStarted, onAudioEnded } = $props<{\n model?: any;\n session?: any;\n options?: any;\n onSessionChange?: (session: any) => void;\n onAudioStarted?: () => void;\n onAudioEnded?: () => void;\n}>();\nconst t = (key: string) => translate(key, model?.language);\nlet localChoiceId = $state('');\nlet toggleCorrectAnswerButtonEl = $state<HTMLButtonElement | null>(null);\nlet choicesGroupEl = $state<HTMLDivElement | null>(null);\nlet rootEl = $state<HTMLDivElement | null>(null);\nconst instanceId = `mc-populated-blank-${Math.random().toString(36).slice(2, 10)}`;\n\n// ---------------------------------------------------------------------------\n// Cluster: modeFlags — delivery mode, correctness, and answer-reveal state\n// Feeds: shouldShowCorrectAnswerToggle, choiceState, a11y\n// ---------------------------------------------------------------------------\nconst deliveryMode = $derived((model?.mode || model?.env?.mode || '').toString());\nconst isEvaluateMode = $derived(deliveryMode === 'evaluate');\nconst correctness = $derived(model?.correctness);\nconst isResponseCorrect = $derived(\n typeof model?.responseCorrect === 'boolean' ? model.responseCorrect : correctness === 'correct'\n);\nconst isCorrect = $derived(correctness === 'correct');\nconst isIncorrect = $derived(correctness === 'incorrect');\n\nlet showCorrectAnswer = $state(false);\nconst shouldShowCorrectAnswerToggle = $derived(\n isEvaluateMode && !isResponseCorrect && !!model?.correctChoiceId\n);\n\n// ---------------------------------------------------------------------------\n// Cluster: layoutConfig — profile limits, blank sizing, choice layout, audio mode\n// Feeds: layout (rootStyle, blankWidth, blankBorderWidth, legendMaxChars), audioMode, choiceState\n// ---------------------------------------------------------------------------\nconst layoutProfile = $derived(model?.layoutProfile || '');\nconst layoutProfileFlags = $derived(\n computeLayoutProfile({\n interactionMode: model?.interactionMode,\n template: model?.template,\n choiceLayout: model?.choiceLayout,\n layoutProfile,\n hasAudio: model?.hasAudio,\n useFeatureButtonAudio: model?.useFeatureButtonAudio,\n prompt: model?.prompt,\n })\n);\nconst isAudioOnlyMode = $derived(layoutProfileFlags.isAudioOnlyMode);\nconst isBlankOnlyTemplate = $derived(layoutProfileFlags.isBlankOnlyTemplate);\nconst isHorizontalChoices = $derived(layoutProfileFlags.isHorizontalChoices);\nconst hasInlineSentenceAudioLayout = $derived(layoutProfileFlags.hasInlineSentenceAudioLayout);\nconst useFeatureButtonAudio = $derived(layoutProfileFlags.useFeatureButtonAudio);\nconst hasVisiblePrompt = $derived(layoutProfileFlags.hasVisiblePrompt);\n// What renders before the stem shares one block, so each grid lays it out as one row.\nconst hasHeader = $derived(\n !!model?.teacherInstructions || hasVisiblePrompt || shouldShowCorrectAnswerToggle\n);\nconst layout = $derived(\n computeLayoutStyle({\n layoutProfile,\n isBlankOnlyTemplate,\n configuredLimits: model?.layoutLimits,\n customProfilePresets: model?.layoutProfilePresets,\n })\n);\n\n// ---------------------------------------------------------------------------\n// Cluster: choiceState — selection, display choice, per-choice correctness, result text\n// Feeds: template blank display, choice rendering, fieldset, result sr-only text\n// ---------------------------------------------------------------------------\nconst choices = $derived(Array.isArray(model?.choices) ? model.choices : []);\nconst choiceMode = $derived(model?.choiceMode || 'text');\nconst selectedId = $derived(selectedChoiceId(session) || localChoiceId || '');\nconst radioGroupName = $derived(`${instanceId}-choice-group-${model?.id || '1'}`);\nconst displayChoiceId = $derived(\n computeDisplayChoiceId({\n selectedId,\n isEvaluateMode,\n showCorrectAnswer,\n correctChoiceId: String(model?.correctChoiceId || ''),\n })\n);\nconst displayChoice = $derived.by(() => choices.find((c: any) => c.id === displayChoiceId));\nconst displayChoiceLabelHtml = $derived.by(() => String(displayChoice?.labelHtml || ''));\nconst resultStatus = $derived(\n computeResultStatus({ isEvaluateMode, showCorrectAnswer, isCorrect, isIncorrect, selectedId })\n);\nconst resultText = $derived(\n resultStatus === 'correct'\n ? t('correctAnswerSelected')\n : resultStatus === 'incorrect'\n ? t('incorrectAnswerSelected')\n : ''\n);\nconst choiceCorrectnessById = $derived(\n computeChoiceCorrectness({\n isEvaluateMode,\n correctChoiceId: String(model?.correctChoiceId || ''),\n selectedId: String(selectedId || ''),\n showCorrectAnswer,\n })\n);\n\n// ---------------------------------------------------------------------------\n// Cluster: a11y — stable IDs, aria labelling, described-by relationships\n// Feeds: fieldset legend, radiogroup labelling, template described-by\n// ---------------------------------------------------------------------------\nconst promptId = $derived(`${instanceId}-prompt`);\nconst legendId = $derived(`${instanceId}-choices-legend`);\nconst resultId = $derived(`${instanceId}-result`);\nconst blankHintId = $derived(`${instanceId}-blank-hint`);\nconst legendText = $derived(\n computeLegendText({\n prompt: model?.prompt || '',\n legendMaxChars: layout.legendMaxChars,\n answerChoicesLabel: t('answerChoices'),\n })\n);\nconst choicesGroupLabelledBy = $derived(hasVisiblePrompt ? promptId : undefined);\nconst choicesGroupAriaLabel = $derived.by(() => {\n if (hasVisiblePrompt) return undefined;\n const explicit = String(model?.choiceGroupLabel || '').trim();\n if (explicit) return explicit;\n return legendText;\n});\n// The transcript is not among these: it is rendered by the player from the item's\n// accessibility catalog (PIE-902), so this element neither owns the node nor has\n// an id to point at. It is placed immediately before this content in reading\n// order instead, as a labelled region.\nconst templateDescribedBy = $derived.by(() => (hasVisiblePrompt ? promptId : undefined));\n\n// ---------------------------------------------------------------------------\n// Misc — locale, audio error, template parsing, variant CSS, style strings\n// ---------------------------------------------------------------------------\n// An item with no language gets no `lang`, so it inherits the host page's instead\n// of being announced as English. `es_MX` is written as the BCP 47 tag `es-MX`.\nconst lang = $derived.by(() => {\n const language = String(model?.language || model?.locale || '').trim();\n return language ? language.replace(/_/g, '-') : undefined;\n});\nconst variantCssConfig = $derived(getVariantCssConfig(model?.customType));\nconst variantRootClass = $derived(getVariantRootClass(model?.customType));\nconst templateParts = $derived.by(() => {\n const t = model?.template || '';\n const idx = t.indexOf(BLANK_TOKEN);\n if (idx < 0) return { before: t, after: '' };\n let before = t.slice(0, idx);\n let after = t.slice(idx + BLANK_TOKEN.length);\n // The CQT's shared cloze renderer (Renaissance components/src/cloze.js) emits\n // literal `&nbsp;` on BOTH sides of the cloze span unconditionally:\n // `&nbsp;<span ... -cloze-blank></span><span ... -cloze>…</span>&nbsp;`.\n // Mirror that ONLY for inline_sentence layouts (sel-vic, sr-vic, plain\n // sentence). Token-sequence layouts arrange tokens in a grid with explicit\n // sibling-margin spacing, so injecting NBSP throws off those tuned gaps;\n // they don't suffer the wrap-leader symptom either because each token has\n // its own grid placement. This (a) keeps the cloze glued to its neighbors\n // so it doesn't dangle at the start of a wrapped line (CONTOOL-2574), and\n // (b) matches the CQT's cloze→adjacent-text gap when the author wrote no\n // whitespace around {{blank}} (CONTOOL-2572: e.g. `…word: {{blank}}.`).\n if (layoutProfile === 'inline_sentence') {\n before = `${before.replace(/\\s+$/, '')} `;\n after = ` ${after.replace(/^\\s+/, '')}`;\n }\n return { before, after };\n});\n\nfunction onRadioChange(e: Event) {\n const input = e.target as HTMLInputElement;\n if (!input.checked) return;\n const choiceId = input.value;\n localChoiceId = choiceId;\n // The player owns the session's `id` and `element` (the versioned tag it\n // registered this element under), so neither is written here. A pick\n // drops an older session's `choiceId`.\n const { choiceId: _legacyChoiceId, ...rest } = session || {};\n onSessionChange?.({ ...rest, value: [choiceId] });\n}\n\nfunction toggleCorrectAnswer() {\n if (!shouldShowCorrectAnswerToggle) return;\n showCorrectAnswer = !showCorrectAnswer;\n}\n\n$effect(() => {\n if (!isEvaluateMode || isResponseCorrect) {\n showCorrectAnswer = false;\n }\n});\n\nfunction onRadioGroupKeydown(e: KeyboardEvent) {\n if (model?.disabled) return;\n const key = e.key;\n if (!['ArrowDown', 'ArrowRight', 'ArrowUp', 'ArrowLeft'].includes(key)) return;\n e.preventDefault();\n const container = e.currentTarget as HTMLElement;\n const inputs = Array.from(\n container.querySelectorAll('input[type=\"radio\"]:not([disabled])')\n ) as HTMLInputElement[];\n if (inputs.length === 0) return;\n let idx = inputs.findIndex((i) => i.checked);\n if (key === 'ArrowDown' || key === 'ArrowRight') {\n idx = idx < 0 ? 0 : (idx + 1) % inputs.length;\n } else {\n idx = idx < 0 ? inputs.length - 1 : (idx - 1 + inputs.length) % inputs.length;\n }\n const next = inputs[idx];\n next.checked = true;\n next.dispatchEvent(new Event('change', { bubbles: true }));\n next.focus();\n}\n\nconst featureAudioSkin = $derived(\n computeFeatureAudioSkin({\n locale: model?.locale,\n audioButtonSkin: model?.audioButtonSkin,\n audioButtonSkinsByLocale: model?.audioButtonSkinsByLocale,\n })\n);\n\n// Follows the session both ways: a player that resets or replaces the session\n// clears the selection instead of leaving the previous pick on screen.\n$effect(() => {\n localChoiceId = selectedChoiceId(session);\n});\n\n$effect(() => {\n const btn = toggleCorrectAnswerButtonEl;\n if (!btn) return;\n btn.addEventListener('click', toggleCorrectAnswer);\n return () => btn.removeEventListener('click', toggleCorrectAnswer);\n});\n\n// Delegated listeners on the choices group — two events with a radio-guard on change.\n$effect(() => {\n const group = choicesGroupEl;\n if (!group) return;\n const handleChange = (e: Event) => {\n const target = e.target as HTMLInputElement | null;\n if (target?.type !== 'radio') return;\n onRadioChange(e);\n };\n const handleKeydown = (e: KeyboardEvent) => onRadioGroupKeydown(e);\n group.addEventListener('change', handleChange);\n group.addEventListener('keydown', handleKeydown);\n return () => {\n group.removeEventListener('change', handleChange);\n group.removeEventListener('keydown', handleKeydown);\n };\n});\n\n$effect(() => {\n if (rootEl) ensureVariantCssInjected(variantCssConfig, rootEl);\n});\n</script>\n\n<div\n bind:this={rootEl}\n class={`mc-populated-blank-root pie-element pie-element-mc-populated-blank pie-delivery-root layout-${layoutProfile} choice-mode-${choiceMode} ${variantRootClass} ${hasInlineSentenceAudioLayout ? 'has-inline-audio' : ''} ${hasHeader ? 'has-header' : ''}`}\n lang={lang}\n style={layout.rootStyle}\n data-mpb-css={VARIANT_CSS_KEY}\n>\n {#if hasHeader}\n <div class=\"pie-header\">\n {#if model?.teacherInstructions}\n <TeacherInstructions html={model.teacherInstructions} language={model?.language} />\n {/if}\n\n {#if hasVisiblePrompt}\n <div class=\"pie-prompt\" id={promptId}>{@html sanitizeModelHtml(model.prompt)}</div>\n {/if}\n\n {#if shouldShowCorrectAnswerToggle}\n <div class=\"pie-correct-answer-toggle-row\">\n <button\n bind:this={toggleCorrectAnswerButtonEl}\n type=\"button\"\n class=\"pie-toggle-correct-answer\"\n style=\"gap:var(--mpb-toggle-button-gap, 0.5rem);\"\n aria-pressed={showCorrectAnswer}\n data-testid=\"show-correct-answer\"\n >\n <span class=\"pie-correct-answer-toggle-content\">\n <span class=\"pie-correct-answer-toggle-icon-holder\" aria-hidden=\"true\">\n {#if showCorrectAnswer}\n <svg\n class=\"pie-correct-answer-toggle-svg\"\n preserveAspectRatio=\"xMinYMin meet\"\n version=\"1.1\"\n viewBox=\"-283 359 34 35\"\n >\n <circle cx=\"-266\" cy=\"375.9\" r=\"14\" fill=\"var(--pie-tertiary-light, #d0e2f0)\" />\n <path\n d=\"M-280.5,375.9c0-8,6.5-14.5,14.5-14.5s14.5,6.5,14.5,14.5s-6.5,14.5-14.5,14.5S-280.5,383.9-280.5,375.9z M-279.5,375.9c0,7.4,6.1,13.5,13.5,13.5c7.4,0,13.5-6.1,13.5-13.5s-6.1-13.5-13.5-13.5C-273.4,362.4-279.5,368.5-279.5,375.9z\"\n fill=\"var(--pie-tertiary-light, #d0e2f0)\"\n />\n <polygon\n points=\"-265.4,383.1 -258.6,377.2 -261.2,374.2 -264.3,376.9 -268.9,368.7 -272.4,370.6\"\n fill=\"var(--pie-tertiary, #146eb3)\"\n />\n </svg>\n {:else}\n <svg\n class=\"pie-correct-answer-toggle-svg\"\n preserveAspectRatio=\"xMinYMin meet\"\n version=\"1.1\"\n viewBox=\"-129.5 127 34 35\"\n >\n <path\n d=\"M-112.9,160.4c-8.5,0-15.5-6.9-15.5-15.5c0-8.5,6.9-15.5,15.5-15.5s15.5,6.9,15.5,15.5 C-97.4,153.5-104.3,160.4-112.9,160.4z\"\n fill=\"var(--pie-border-light, #D0CAC5)\"\n stroke=\"var(--pie-border-light, #E6E3E0)\"\n stroke-width=\"0.75\"\n />\n <path\n d=\"M-113.2,159c-8,0-14.5-6.5-14.5-14.5s6.5-14.5,14.5-14.5s14.5,6.5,14.5,14.5S-105.2,159-113.2,159z\"\n fill=\"var(--pie-border-light, #B3ABA4)\"\n stroke=\"var(--pie-border-light, #CDC7C2)\"\n stroke-width=\"0.5\"\n />\n <circle cx=\"-114.2\" cy=\"143.5\" r=\"14\" fill=\"var(--pie-background, white)\" />\n <path\n d=\"M-114.2,158c-8,0-14.5-6.5-14.5-14.5s6.5-14.5,14.5-14.5s14.5,6.5,14.5,14.5S-106.2,158-114.2,158z M-114.2,130c-7.4,0-13.5,6.1-13.5,13.5s6.1,13.5,13.5,13.5s13.5-6.1,13.5-13.5S-106.8,130-114.2,130z\"\n fill=\"var(--pie-background-dark, #ecedf1)\"\n />\n <polygon\n points=\"-114.8,150.7 -121.6,144.8 -119,141.8 -115.9,144.5 -111.3,136.3 -107.8,138.2\"\n fill=\"var(--pie-tertiary, #146eb3)\"\n />\n </svg>\n {/if}\n </span>\n <span class=\"pie-correct-answer-toggle-label\">\n {tCommon(showCorrectAnswer ? 'hideCorrectAnswer' : 'showCorrectAnswer', model?.language)}\n </span>\n </span>\n </button>\n </div>\n {/if}\n </div>\n {/if}\n\n <AudioPlayer\n hasAudio={!!model?.hasAudio}\n audioUrl={model?.audioUrl}\n {useFeatureButtonAudio}\n autoplayEnabled={!!model?.autoplayAudioEnabled}\n {featureAudioSkin}\n language={model?.language}\n onaudiostarted={onAudioStarted}\n onaudioended={onAudioEnded}\n />\n\n {#if model?.sentenceHtml}\n <div class=\"sentence-line pie-sentence-line\" aria-describedby={templateDescribedBy}>\n {@html sanitizeModelHtml(model.sentenceHtml)}\n </div>\n {/if}\n\n {#if !isAudioOnlyMode}\n <div class=\"template-line pie-template-line\" aria-describedby={templateDescribedBy}\n >{@html sanitizeModelHtml(templateParts.before)}<ClozeMarker\n {choiceMode}\n {choices}\n displayChoice={displayChoice}\n {displayChoiceLabelHtml}\n isStandalone={isBlankOnlyTemplate}\n blankWidth={layout.blankWidth}\n blankBorderWidth={layout.blankBorderWidth}\n ariaLabel={t('blankLabel')}\n language={model?.language}\n />{@html sanitizeModelHtml(templateParts.after)}</div>\n {/if}\n\n {#if resultText}\n <p id={resultId} class=\"sr-only pie-result-feedback\" role=\"status\" aria-live=\"polite\">{resultText}</p>\n {/if}\n\n <p id={blankHintId} class=\"sr-only pie-blank-hint\">{t('blankPreSelectionHint')}</p>\n\n <fieldset class=\"pie-choices-fieldset\" disabled={model?.disabled}>\n <legend class=\"sr-only pie-choices-legend\" id={legendId}>{legendText}</legend>\n <div\n bind:this={choicesGroupEl}\n class={`pie-choices ${isHorizontalChoices ? 'choices-horizontal' : 'choices-vertical'}`}\n style=\"gap:var(--mpb-choice-group-gap, 0.5rem);\"\n role=\"radiogroup\"\n tabindex=\"-1\"\n aria-labelledby={choicesGroupLabelledBy}\n aria-label={choicesGroupAriaLabel}\n aria-describedby={[blankHintId, resultText ? resultId : undefined].filter(Boolean).join(' ')}\n >\n {#each choices as c (c.id)}\n <ChoiceRow\n choice={c}\n {choiceMode}\n isHorizontal={isHorizontalChoices}\n isSelected={displayChoiceId === c.id}\n isDisabled={!!model?.disabled}\n correctness={choiceCorrectnessById.get(c.id)}\n {isEvaluateMode}\n {instanceId}\n {radioGroupName}\n language={model?.language}\n />\n {/each}\n </div>\n </fieldset>\n</div>\n\n<style>\n .sr-only {\n position: absolute;\n width: 1px;\n height: 1px;\n padding: 0;\n margin: -1px;\n overflow: hidden;\n clip: rect(0, 0, 0, 0);\n white-space: nowrap;\n border: 0;\n }\n\n /* Layout is self-contained: PIE players ship no Tailwind, so no utility class or\n preflight reset can be assumed. The blank slot, choice tiles and variant\n max-widths are sized for border-box. */\n .mc-populated-blank-root,\n .mc-populated-blank-root :global(*),\n .mc-populated-blank-root :global(*::before),\n .mc-populated-blank-root :global(*::after) {\n box-sizing: border-box;\n }\n\n /* An authored image on its own line (the sel_r1-s3 stimulus) would otherwise sit\n on the text baseline and add the descender gap below it. */\n .mc-populated-blank-root :global(img) {\n vertical-align: middle;\n }\n\n .mc-populated-blank-root {\n --mpb-focus-ring: var(\n --pie-focus-outline,\n var(--pie-button-focus-outline, var(--pie-focus-checked-border, #1565c0))\n );\n padding: 1rem;\n }\n\n .pie-prompt {\n margin-bottom: 1rem;\n }\n\n /* IAT-authored content marks its alignment with a class; the IAT stylesheet\n that defines it does not ship with the item. */\n .mc-populated-blank-root :global(.iat-align-center) {\n text-align: center;\n }\n\n /* Flush paragraphs, as the demo app's preflight reset rendered them. */\n .pie-prompt :global(p),\n .sentence-line :global(p) {\n margin: 0;\n }\n\n .sentence-line {\n margin-bottom: 0.75rem;\n }\n\n .pie-toggle-correct-answer {\n width: 100%;\n cursor: pointer;\n border: 0;\n background: transparent;\n padding: 0;\n margin-bottom: 0.75rem;\n display: flex;\n justify-content: center;\n text-align: center;\n font: inherit;\n color: var(--pie-text, black);\n }\n\n .pie-correct-answer-toggle-row {\n width: 100%;\n display: flex;\n justify-content: flex-end;\n }\n\n .pie-correct-answer-toggle-content {\n display: flex;\n margin: 0 auto;\n align-items: center;\n }\n\n .pie-correct-answer-toggle-icon-holder {\n width: 25px;\n margin-right: 5px;\n display: inline-flex;\n align-items: center;\n justify-content: center;\n }\n\n .pie-correct-answer-toggle-svg {\n width: 25px;\n height: 25px;\n }\n\n .pie-correct-answer-toggle-label {\n width: fit-content;\n min-width: 140px;\n align-self: center;\n vertical-align: middle;\n font-weight: 400;\n user-select: none;\n }\n\n .pie-toggle-correct-answer:hover .pie-correct-answer-toggle-label,\n .pie-toggle-correct-answer:focus-visible .pie-correct-answer-toggle-label {\n text-decoration: underline;\n }\n\n .template-line {\n white-space: pre-wrap;\n margin-bottom: 1rem;\n }\n\n .template-line :global(p) {\n margin: 0;\n display: inline;\n }\n\n .pie-choices-fieldset {\n border: 0;\n padding: 0;\n margin: 0;\n }\n\n .pie-choices {\n display: flex;\n }\n\n .choices-horizontal {\n flex-direction: row;\n flex-wrap: wrap;\n align-items: flex-start;\n justify-content: center;\n }\n\n .choices-vertical {\n flex-direction: column;\n }\n\n .layout-audio_blank_only :global(.pie-audio-container),\n .layout-stimulus_image_blank :global(.pie-audio-container) {\n display: flex;\n width: min(100%, var(--mpb-audio-instructions-max-width, 875px));\n margin-left: auto;\n margin-right: auto;\n justify-content: flex-end;\n }\n\n .layout-audio_blank_only .template-line,\n .layout-stimulus_image_blank .template-line {\n text-align: center;\n margin: var(--mpb-audio-blank-template-margin-top, 0.8rem) 0\n var(--mpb-audio-blank-template-margin-bottom, 1.8rem);\n }\n\n .layout-audio_blank_only fieldset {\n display: flex;\n justify-content: center;\n }\n\n .layout-audio_blank_only :global(.pie-blank-slot),\n .layout-stimulus_image_blank :global(.pie-blank-slot) {\n width: var(--mpb-blank-wide-width, 10rem);\n border-bottom-width: var(--mpb-blank-underline-wide-width, 6px);\n min-height: 160px;\n padding-bottom: 4px;\n }\n\n .layout-stimulus_image_blank {\n display: grid;\n grid-template-columns: minmax(var(--mpb-stimulus-min-column, 210px), 1fr) auto;\n grid-template-areas:\n 'sentence audio'\n '. template'\n 'choices choices';\n column-gap: var(--mpb-stimulus-grid-column-gap, 2rem);\n row-gap: var(--mpb-stimulus-grid-row-gap, 0.7rem);\n align-items: start;\n }\n\n /* Each grid names only the areas it lays out, so the header gets a row of its own;\n left to auto-placement it would land below the choices. */\n .layout-stimulus_image_blank.has-header {\n grid-template-areas:\n 'header header'\n 'sentence audio'\n '. template'\n 'choices choices';\n }\n\n .layout-stimulus_image_blank .pie-header,\n .layout-token_sequence .pie-header,\n .layout-inline_sentence.has-inline-audio .pie-header {\n grid-area: header;\n }\n\n .layout-stimulus_image_blank :global(.pie-audio-container) {\n grid-area: audio;\n margin: 0;\n }\n\n .layout-stimulus_image_blank .sentence-line {\n grid-area: sentence;\n margin: var(--mpb-stimulus-sentence-margin-top, 0.2rem) 0 0;\n }\n\n .layout-stimulus_image_blank .template-line {\n grid-area: template;\n margin: 0;\n text-align: center;\n justify-self: center;\n }\n\n .layout-stimulus_image_blank fieldset {\n grid-area: choices;\n margin-top: var(--mpb-stimulus-choices-margin-top, 0.9rem);\n }\n\n .layout-token_sequence {\n display: grid;\n grid-template-columns: 1fr auto;\n grid-template-areas:\n 'audio audio'\n 'template template'\n 'choices choices';\n column-gap: var(--mpb-token-grid-column-gap, 1.5rem);\n row-gap: var(--mpb-token-grid-row-gap, 0.8rem);\n align-items: start;\n }\n\n .layout-token_sequence.has-header {\n grid-template-areas:\n 'header header'\n 'audio audio'\n 'template template'\n 'choices choices';\n }\n\n .layout-token_sequence :global(.pie-audio-container) {\n grid-area: audio;\n margin: 0;\n justify-self: end;\n }\n\n .layout-token_sequence .template-line {\n grid-area: template;\n margin: var(--mpb-token-template-margin-top, 0.6rem) 0 0;\n justify-self: center;\n text-align: center;\n }\n\n .layout-token_sequence .template-line :global(span + span) {\n margin-left: var(--mpb-token-inline-token-gap, 0.35rem);\n }\n\n .layout-token_sequence :global(.pie-blank-slot) {\n width: var(--mpb-blank-standalone-width, 7rem);\n border-bottom-width: var(--mpb-blank-underline-wide-width, 4px);\n margin-left: var(--mpb-token-inline-token-gap, 0.35rem);\n }\n\n .layout-token_sequence fieldset {\n grid-area: choices;\n margin-top: var(--mpb-token-choices-margin-top, 0.2rem);\n }\n\n .layout-inline_sentence.has-inline-audio {\n display: grid;\n grid-template-columns: minmax(var(--mpb-text-min-column, 260px), 1fr) auto;\n grid-template-areas:\n 'template audio'\n 'choices choices';\n column-gap: var(--mpb-inline-grid-column-gap, 1.5rem);\n row-gap: var(--mpb-inline-grid-row-gap, 0.65rem);\n align-items: start;\n }\n\n .layout-inline_sentence.has-inline-audio.has-header {\n grid-template-areas:\n 'header header'\n 'template audio'\n 'choices choices';\n }\n\n .layout-inline_sentence.has-inline-audio :global(.pie-audio-container) {\n grid-area: audio;\n margin: 0;\n justify-self: end;\n }\n\n .layout-inline_sentence.has-inline-audio .template-line {\n grid-area: template;\n margin: var(--mpb-inline-template-margin-top, 0.45rem) 0 0;\n text-align: center;\n justify-self: center;\n }\n\n .layout-inline_sentence.has-inline-audio fieldset {\n grid-area: choices;\n margin-top: var(--mpb-inline-choices-margin-top, 0.25rem);\n }\n\n /* The CQT sheets (r1.scss, vic.scss, sel_r1-s3_plusggg) lay these layouts out in one\n column below 850px: the listen button sits at the left above the stem, and the\n answer tiles stack at the left edge. */\n @media not all and (min-width: 850px) {\n .layout-audio_blank_only :global(.pie-audio-container),\n .layout-stimulus_image_blank :global(.pie-audio-container),\n .layout-token_sequence :global(.pie-audio-container),\n .layout-inline_sentence.has-inline-audio :global(.pie-audio-container) {\n width: 100%;\n margin-left: 0;\n margin-right: 0;\n justify-content: flex-start;\n justify-self: start;\n }\n\n .layout-audio_blank_only fieldset {\n justify-content: flex-start;\n }\n\n .layout-audio_blank_only .pie-choices,\n .layout-token_sequence .pie-choices,\n .layout-stimulus_image_blank .pie-choices,\n .layout-inline_sentence.has-inline-audio .pie-choices {\n flex-direction: column;\n align-items: flex-start;\n justify-content: flex-start;\n /* The vw cap fits a row of tiles across the viewport; stacked tiles keep their width. */\n --mpb-choice-width-vw: 100vw;\n }\n\n .layout-stimulus_image_blank {\n grid-template-columns: minmax(0, 1fr);\n grid-template-areas:\n 'audio'\n 'sentence'\n 'template'\n 'choices';\n }\n\n .layout-stimulus_image_blank.has-header {\n grid-template-areas:\n 'header'\n 'audio'\n 'sentence'\n 'template'\n 'choices';\n }\n\n .layout-inline_sentence.has-inline-audio {\n grid-template-columns: minmax(0, 1fr);\n grid-template-areas:\n 'audio'\n 'template'\n 'choices';\n }\n\n .layout-inline_sentence.has-inline-audio.has-header {\n grid-template-areas:\n 'header'\n 'audio'\n 'template'\n 'choices';\n }\n\n .layout-stimulus_image_blank .template-line,\n .layout-token_sequence .template-line,\n .layout-inline_sentence.has-inline-audio .template-line {\n justify-self: start;\n text-align: start;\n }\n }\n</style>\n"],"x_google_ignoreList":[0,5],"mappings":";;;AACA,SAAS,EAAe,GAAG,GAAG;CAC7B,KAAK,IAAI,GAAG,KAAK,IAAI;AACtB;AACA,SAAS,EAAkB,GAAG,GAAG;CAChC,CAAS,KAAR,QAAa,IAAI,EAAE,YAAY,IAAI,EAAE;CACtC,KAAK,IAAI,I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