@qtalo/qt-ui-library 0.2.1 → 0.2.2

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/index.js CHANGED
@@ -134,7 +134,46 @@ function useLongPress(e, t, n = 450) {
134
134
  }
135
135
  };
136
136
  }
137
- var { entries, setPrototypeOf, isFrozen, getPrototypeOf, getOwnPropertyDescriptor } = Object, { freeze, seal, create } = Object, { apply, construct } = typeof Reflect < "u" && Reflect;
137
+ function _arrayLikeToArray(e, t) {
138
+ (t == null || t > e.length) && (t = e.length);
139
+ for (var n = 0, r = Array(t); n < t; n++) r[n] = e[n];
140
+ return r;
141
+ }
142
+ function _arrayWithHoles(e) {
143
+ if (Array.isArray(e)) return e;
144
+ }
145
+ function _iterableToArrayLimit(e, t) {
146
+ var n = e == null ? null : typeof Symbol < "u" && e[Symbol.iterator] || e["@@iterator"];
147
+ if (n != null) {
148
+ var r, i, a, o, s = [], c = !0, l = !1;
149
+ try {
150
+ if (a = (n = n.call(e)).next, t !== 0) for (; !(c = (r = a.call(n)).done) && (s.push(r.value), s.length !== t); c = !0);
151
+ } catch (e) {
152
+ l = !0, i = e;
153
+ } finally {
154
+ try {
155
+ if (!c && n.return != null && (o = n.return(), Object(o) !== o)) return;
156
+ } finally {
157
+ if (l) throw i;
158
+ }
159
+ }
160
+ return s;
161
+ }
162
+ }
163
+ function _nonIterableRest() {
164
+ throw TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.");
165
+ }
166
+ function _slicedToArray(e, t) {
167
+ return _arrayWithHoles(e) || _iterableToArrayLimit(e, t) || _unsupportedIterableToArray(e, t) || _nonIterableRest();
168
+ }
169
+ function _unsupportedIterableToArray(e, t) {
170
+ if (e) {
171
+ if (typeof e == "string") return _arrayLikeToArray(e, t);
172
+ var n = {}.toString.call(e).slice(8, -1);
173
+ return n === "Object" && e.constructor && (n = e.constructor.name), n === "Map" || n === "Set" ? Array.from(e) : n === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n) ? _arrayLikeToArray(e, t) : void 0;
174
+ }
175
+ }
176
+ var entries = Object.entries, setPrototypeOf = Object.setPrototypeOf, isFrozen = Object.isFrozen, getPrototypeOf = Object.getPrototypeOf, getOwnPropertyDescriptor = Object.getOwnPropertyDescriptor, freeze = Object.freeze, seal = Object.seal, create = Object.create, _ref = typeof Reflect < "u" && Reflect, apply = _ref.apply, construct = _ref.construct;
138
177
  freeze ||= function(e) {
139
178
  return e;
140
179
  }, seal ||= function(e) {
@@ -145,7 +184,7 @@ freeze ||= function(e) {
145
184
  }, construct ||= function(e) {
146
185
  return new e(...[...arguments].slice(1));
147
186
  };
148
- var arrayForEach = unapply(Array.prototype.forEach), arrayLastIndexOf = unapply(Array.prototype.lastIndexOf), arrayPop = unapply(Array.prototype.pop), arrayPush = unapply(Array.prototype.push), arraySplice = unapply(Array.prototype.splice), stringToLowerCase = unapply(String.prototype.toLowerCase), stringToString = unapply(String.prototype.toString), stringMatch = unapply(String.prototype.match), stringReplace = unapply(String.prototype.replace), stringIndexOf = unapply(String.prototype.indexOf), stringTrim = unapply(String.prototype.trim), objectHasOwnProperty = unapply(Object.prototype.hasOwnProperty), regExpTest = unapply(RegExp.prototype.test), typeErrorCreate = unconstruct(TypeError);
187
+ var arrayForEach = unapply(Array.prototype.forEach), arrayLastIndexOf = unapply(Array.prototype.lastIndexOf), arrayPop = unapply(Array.prototype.pop), arrayPush = unapply(Array.prototype.push), arraySplice = unapply(Array.prototype.splice), arrayIsArray = Array.isArray, stringToLowerCase = unapply(String.prototype.toLowerCase), stringToString = unapply(String.prototype.toString), stringMatch = unapply(String.prototype.match), stringReplace = unapply(String.prototype.replace), stringIndexOf = unapply(String.prototype.indexOf), stringTrim = unapply(String.prototype.trim), numberToString = unapply(Number.prototype.toString), booleanToString = unapply(Boolean.prototype.toString), bigintToString = typeof BigInt > "u" ? null : unapply(BigInt.prototype.toString), symbolToString = typeof Symbol > "u" ? null : unapply(Symbol.prototype.toString), objectHasOwnProperty = unapply(Object.prototype.hasOwnProperty), objectToString = unapply(Object.prototype.toString), regExpTest = unapply(RegExp.prototype.test), typeErrorCreate = unconstruct(TypeError);
149
188
  function unapply(e) {
150
189
  return function(t) {
151
190
  t instanceof RegExp && (t.lastIndex = 0);
@@ -160,7 +199,7 @@ function unconstruct(e) {
160
199
  }
161
200
  function addToSet(e, t) {
162
201
  let n = arguments.length > 2 && arguments[2] !== void 0 ? arguments[2] : stringToLowerCase;
163
- setPrototypeOf && setPrototypeOf(e, null);
202
+ if (setPrototypeOf && setPrototypeOf(e, null), !arrayIsArray(t)) return e;
164
203
  let r = t.length;
165
204
  for (; r--;) {
166
205
  let i = t[r];
@@ -178,9 +217,34 @@ function cleanArray(e) {
178
217
  }
179
218
  function clone(e) {
180
219
  let t = create(null);
181
- for (let [n, r] of entries(e)) objectHasOwnProperty(e, n) && (Array.isArray(r) ? t[n] = cleanArray(r) : r && typeof r == "object" && r.constructor === Object ? t[n] = clone(r) : t[n] = r);
220
+ for (let r of entries(e)) {
221
+ var n = _slicedToArray(r, 2);
222
+ let i = n[0], a = n[1];
223
+ objectHasOwnProperty(e, i) && (arrayIsArray(a) ? t[i] = cleanArray(a) : a && typeof a == "object" && a.constructor === Object ? t[i] = clone(a) : t[i] = a);
224
+ }
182
225
  return t;
183
226
  }
227
+ function stringifyValue(e) {
228
+ switch (typeof e) {
229
+ case "string": return e;
230
+ case "number": return numberToString(e);
231
+ case "boolean": return booleanToString(e);
232
+ case "bigint": return bigintToString ? bigintToString(e) : "0";
233
+ case "symbol": return symbolToString ? symbolToString(e) : "Symbol()";
234
+ case "undefined": return objectToString(e);
235
+ case "function":
236
+ case "object": {
237
+ if (e === null) return objectToString(e);
238
+ let t = e, n = lookupGetter(t, "toString");
239
+ if (typeof n == "function") {
240
+ let e = n(t);
241
+ return typeof e == "string" ? e : objectToString(e);
242
+ }
243
+ return objectToString(e);
244
+ }
245
+ default: return objectToString(e);
246
+ }
247
+ }
184
248
  function lookupGetter(e, t) {
185
249
  for (; e !== null;) {
186
250
  let n = getOwnPropertyDescriptor(e, t);
@@ -195,6 +259,13 @@ function lookupGetter(e, t) {
195
259
  }
196
260
  return n;
197
261
  }
262
+ function isRegex(e) {
263
+ try {
264
+ return regExpTest(e, ""), !0;
265
+ } catch {
266
+ return !1;
267
+ }
268
+ }
198
269
  var html$1 = freeze(/* @__PURE__ */ "a.abbr.acronym.address.area.article.aside.audio.b.bdi.bdo.big.blink.blockquote.body.br.button.canvas.caption.center.cite.code.col.colgroup.content.data.datalist.dd.decorator.del.details.dfn.dialog.dir.div.dl.dt.element.em.fieldset.figcaption.figure.font.footer.form.h1.h2.h3.h4.h5.h6.head.header.hgroup.hr.html.i.img.input.ins.kbd.label.legend.li.main.map.mark.marquee.menu.menuitem.meter.nav.nobr.ol.optgroup.option.output.p.picture.pre.progress.q.rp.rt.ruby.s.samp.search.section.select.shadow.slot.small.source.spacer.span.strike.strong.style.sub.summary.sup.table.tbody.td.template.textarea.tfoot.th.thead.time.tr.track.tt.u.ul.var.video.wbr".split(".")), svg$1 = freeze(/* @__PURE__ */ "svg.a.altglyph.altglyphdef.altglyphitem.animatecolor.animatemotion.animatetransform.circle.clippath.defs.desc.ellipse.enterkeyhint.exportparts.filter.font.g.glyph.glyphref.hkern.image.inputmode.line.lineargradient.marker.mask.metadata.mpath.part.path.pattern.polygon.polyline.radialgradient.rect.stop.style.switch.symbol.text.textpath.title.tref.tspan.view.vkern".split(".")), svgFilters = freeze([
199
270
  "feBlend",
200
271
  "feColorMatrix",
@@ -260,32 +331,20 @@ var html$1 = freeze(/* @__PURE__ */ "a.abbr.acronym.address.area.article.aside.a
260
331
  "annotation-xml",
261
332
  "mprescripts",
262
333
  "none"
263
- ]), text = freeze(["#text"]), html = freeze(/* @__PURE__ */ "accept.action.align.alt.autocapitalize.autocomplete.autopictureinpicture.autoplay.background.bgcolor.border.capture.cellpadding.cellspacing.checked.cite.class.clear.color.cols.colspan.controls.controlslist.coords.crossorigin.datetime.decoding.default.dir.disabled.disablepictureinpicture.disableremoteplayback.download.draggable.enctype.enterkeyhint.exportparts.face.for.headers.height.hidden.high.href.hreflang.id.inert.inputmode.integrity.ismap.kind.label.lang.list.loading.loop.low.max.maxlength.media.method.min.minlength.multiple.muted.name.nonce.noshade.novalidate.nowrap.open.optimum.part.pattern.placeholder.playsinline.popover.popovertarget.popovertargetaction.poster.preload.pubdate.radiogroup.readonly.rel.required.rev.reversed.role.rows.rowspan.spellcheck.scope.selected.shape.size.sizes.slot.span.srclang.start.src.srcset.step.style.summary.tabindex.title.translate.type.usemap.valign.value.width.wrap.xmlns.slot".split(".")), svg = freeze(/* @__PURE__ */ "accent-height.accumulate.additive.alignment-baseline.amplitude.ascent.attributename.attributetype.azimuth.basefrequency.baseline-shift.begin.bias.by.class.clip.clippathunits.clip-path.clip-rule.color.color-interpolation.color-interpolation-filters.color-profile.color-rendering.cx.cy.d.dx.dy.diffuseconstant.direction.display.divisor.dur.edgemode.elevation.end.exponent.fill.fill-opacity.fill-rule.filter.filterunits.flood-color.flood-opacity.font-family.font-size.font-size-adjust.font-stretch.font-style.font-variant.font-weight.fx.fy.g1.g2.glyph-name.glyphref.gradientunits.gradienttransform.height.href.id.image-rendering.in.in2.intercept.k.k1.k2.k3.k4.kerning.keypoints.keysplines.keytimes.lang.lengthadjust.letter-spacing.kernelmatrix.kernelunitlength.lighting-color.local.marker-end.marker-mid.marker-start.markerheight.markerunits.markerwidth.maskcontentunits.maskunits.max.mask.mask-type.media.method.mode.min.name.numoctaves.offset.operator.opacity.order.orient.orientation.origin.overflow.paint-order.path.pathlength.patterncontentunits.patterntransform.patternunits.points.preservealpha.preserveaspectratio.primitiveunits.r.rx.ry.radius.refx.refy.repeatcount.repeatdur.restart.result.rotate.scale.seed.shape-rendering.slope.specularconstant.specularexponent.spreadmethod.startoffset.stddeviation.stitchtiles.stop-color.stop-opacity.stroke-dasharray.stroke-dashoffset.stroke-linecap.stroke-linejoin.stroke-miterlimit.stroke-opacity.stroke.stroke-width.style.surfacescale.systemlanguage.tabindex.tablevalues.targetx.targety.transform.transform-origin.text-anchor.text-decoration.text-rendering.textlength.type.u1.u2.unicode.values.viewbox.visibility.version.vert-adv-y.vert-origin-x.vert-origin-y.width.word-spacing.wrap.writing-mode.xchannelselector.ychannelselector.x.x1.x2.xmlns.y.y1.y2.z.zoomandpan".split(".")), mathMl = freeze(/* @__PURE__ */ "accent.accentunder.align.bevelled.close.columnsalign.columnlines.columnspan.denomalign.depth.dir.display.displaystyle.encoding.fence.frame.height.href.id.largeop.length.linethickness.lspace.lquote.mathbackground.mathcolor.mathsize.mathvariant.maxsize.minsize.movablelimits.notation.numalign.open.rowalign.rowlines.rowspacing.rowspan.rspace.rquote.scriptlevel.scriptminsize.scriptsizemultiplier.selection.separator.separators.stretchy.subscriptshift.supscriptshift.symmetric.voffset.width.xmlns".split(".")), xml = freeze([
334
+ ]), text = freeze(["#text"]), html = freeze(/* @__PURE__ */ "accept.action.align.alt.autocapitalize.autocomplete.autopictureinpicture.autoplay.background.bgcolor.border.capture.cellpadding.cellspacing.checked.cite.class.clear.color.cols.colspan.command.commandfor.controls.controlslist.coords.crossorigin.datetime.decoding.default.dir.disabled.disablepictureinpicture.disableremoteplayback.download.draggable.enctype.enterkeyhint.exportparts.face.for.headers.height.hidden.high.href.hreflang.id.inert.inputmode.integrity.ismap.kind.label.lang.list.loading.loop.low.max.maxlength.media.method.min.minlength.multiple.muted.name.nonce.noshade.novalidate.nowrap.open.optimum.part.pattern.placeholder.playsinline.popover.popovertarget.popovertargetaction.poster.preload.pubdate.radiogroup.readonly.rel.required.rev.reversed.role.rows.rowspan.spellcheck.scope.selected.shape.size.sizes.slot.span.srclang.start.src.srcset.step.style.summary.tabindex.title.translate.type.usemap.valign.value.width.wrap.xmlns".split(".")), svg = freeze(/* @__PURE__ */ "accent-height.accumulate.additive.alignment-baseline.amplitude.ascent.attributename.attributetype.azimuth.basefrequency.baseline-shift.begin.bias.by.class.clip.clippathunits.clip-path.clip-rule.color.color-interpolation.color-interpolation-filters.color-profile.color-rendering.cx.cy.d.dx.dy.diffuseconstant.direction.display.divisor.dominant-baseline.dur.edgemode.elevation.end.exponent.fill.fill-opacity.fill-rule.filter.filterunits.flood-color.flood-opacity.font-family.font-size.font-size-adjust.font-stretch.font-style.font-variant.font-weight.fx.fy.g1.g2.glyph-name.glyphref.gradientunits.gradienttransform.height.href.id.image-rendering.in.in2.intercept.k.k1.k2.k3.k4.kerning.keypoints.keysplines.keytimes.lang.lengthadjust.letter-spacing.kernelmatrix.kernelunitlength.lighting-color.local.marker-end.marker-mid.marker-start.markerheight.markerunits.markerwidth.maskcontentunits.maskunits.max.mask.mask-type.media.method.mode.min.name.numoctaves.offset.operator.opacity.order.orient.orientation.origin.overflow.paint-order.path.pathlength.patterncontentunits.patterntransform.patternunits.points.preservealpha.preserveaspectratio.primitiveunits.r.rx.ry.radius.refx.refy.repeatcount.repeatdur.restart.result.rotate.scale.seed.shape-rendering.slope.specularconstant.specularexponent.spreadmethod.startoffset.stddeviation.stitchtiles.stop-color.stop-opacity.stroke-dasharray.stroke-dashoffset.stroke-linecap.stroke-linejoin.stroke-miterlimit.stroke-opacity.stroke.stroke-width.style.surfacescale.systemlanguage.tabindex.tablevalues.targetx.targety.transform.transform-origin.text-anchor.text-decoration.text-orientation.text-rendering.textlength.type.u1.u2.unicode.values.viewbox.visibility.version.vert-adv-y.vert-origin-x.vert-origin-y.width.word-spacing.wrap.writing-mode.xchannelselector.ychannelselector.x.x1.x2.xmlns.y.y1.y2.z.zoomandpan".split(".")), mathMl = freeze(/* @__PURE__ */ "accent.accentunder.align.bevelled.close.columnalign.columnlines.columnspacing.columnspan.denomalign.depth.dir.display.displaystyle.encoding.fence.frame.height.href.id.largeop.length.linethickness.lquote.lspace.mathbackground.mathcolor.mathsize.mathvariant.maxsize.minsize.movablelimits.notation.numalign.open.rowalign.rowlines.rowspacing.rowspan.rspace.rquote.scriptlevel.scriptminsize.scriptsizemultiplier.selection.separator.separators.stretchy.subscriptshift.supscriptshift.symmetric.voffset.width.xmlns".split(".")), xml = freeze([
264
335
  "xlink:href",
265
336
  "xml:id",
266
337
  "xlink:title",
267
338
  "xml:space",
268
339
  "xmlns:xlink"
269
- ]), MUSTACHE_EXPR = seal(/\{\{[\w\W]*|[\w\W]*\}\}/gm), ERB_EXPR = seal(/<%[\w\W]*|[\w\W]*%>/gm), TMPLIT_EXPR = seal(/\$\{[\w\W]*/gm), DATA_ATTR = seal(/^data-[\-\w.\u00B7-\uFFFF]+$/), ARIA_ATTR = seal(/^aria-[\-\w]+$/), IS_ALLOWED_URI = seal(/^(?:(?:(?:f|ht)tps?|mailto|tel|callto|sms|cid|xmpp|matrix):|[^a-z]|[a-z+.\-]+(?:[^a-z+.\-:]|$))/i), IS_SCRIPT_OR_DATA = seal(/^(?:\w+script|data):/i), ATTR_WHITESPACE = seal(/[\u0000-\u0020\u00A0\u1680\u180E\u2000-\u2029\u205F\u3000]/g), DOCTYPE_NAME = seal(/^html$/i), CUSTOM_ELEMENT = seal(/^[a-z][.\w]*(-[.\w]+)+$/i), EXPRESSIONS = /* @__PURE__ */ Object.freeze({
270
- __proto__: null,
271
- ARIA_ATTR,
272
- ATTR_WHITESPACE,
273
- CUSTOM_ELEMENT,
274
- DATA_ATTR,
275
- DOCTYPE_NAME,
276
- ERB_EXPR,
277
- IS_ALLOWED_URI,
278
- IS_SCRIPT_OR_DATA,
279
- MUSTACHE_EXPR,
280
- TMPLIT_EXPR
281
- }), NODE_TYPE = {
340
+ ]), MUSTACHE_EXPR = seal(/{{[\w\W]*|^[\w\W]*}}/g), ERB_EXPR = seal(/<%[\w\W]*|^[\w\W]*%>/g), TMPLIT_EXPR = seal(/\${[\w\W]*/g), DATA_ATTR = seal(/^data-[\-\w.\u00B7-\uFFFF]+$/), ARIA_ATTR = seal(/^aria-[\-\w]+$/), IS_ALLOWED_URI = seal(/^(?:(?:(?:f|ht)tps?|mailto|tel|callto|sms|cid|xmpp|matrix):|[^a-z]|[a-z+.\-]+(?:[^a-z+.\-:]|$))/i), IS_SCRIPT_OR_DATA = seal(/^(?:\w+script|data):/i), ATTR_WHITESPACE = seal(/[\u0000-\u0020\u00A0\u1680\u180E\u2000-\u2029\u205F\u3000]/g), DOCTYPE_NAME = seal(/^html$/i), CUSTOM_ELEMENT = seal(/^[a-z][.\w]*(-[.\w]+)+$/i), ELEMENT_MARKUP_PROBE = seal(/<[/\w!]/g), COMMENT_MARKUP_PROBE = seal(/<[/\w]/g), FALLBACK_TAG_CLOSE = seal(/<\/no(script|embed|frames)/i), SELF_CLOSING_TAG = seal(/\/>/i), NODE_TYPE = {
282
341
  element: 1,
283
342
  attribute: 2,
284
343
  text: 3,
285
344
  cdataSection: 4,
286
345
  entityReference: 5,
287
346
  entityNode: 6,
288
- progressingInstruction: 7,
347
+ processingInstruction: 7,
289
348
  comment: 8,
290
349
  document: 9,
291
350
  documentType: 10,
@@ -322,29 +381,53 @@ var html$1 = freeze(/* @__PURE__ */ "a.abbr.acronym.address.area.article.aside.a
322
381
  uponSanitizeElement: [],
323
382
  uponSanitizeShadowNode: []
324
383
  };
384
+ }, _resolveSetOption = function(e, t, n, r) {
385
+ return objectHasOwnProperty(e, t) && arrayIsArray(e[t]) ? addToSet(r.base ? clone(r.base) : {}, e[t], r.transform) : n;
325
386
  };
326
387
  function createDOMPurify() {
327
388
  let e = arguments.length > 0 && arguments[0] !== void 0 ? arguments[0] : getGlobal(), t = (e) => createDOMPurify(e);
328
- if (t.version = "3.3.1", t.removed = [], !e || !e.document || e.document.nodeType !== NODE_TYPE.document || !e.Element) return t.isSupported = !1, t;
329
- let { document: n } = e, r = n, i = r.currentScript, { DocumentFragment: a, HTMLTemplateElement: o, Node: s, Element: c, NodeFilter: l, NamedNodeMap: u = e.NamedNodeMap || e.MozNamedAttrMap, HTMLFormElement: f, DOMParser: p, trustedTypes: h } = e, g = c.prototype, O = lookupGetter(g, "cloneNode"), A = lookupGetter(g, "remove"), Ws = lookupGetter(g, "nextSibling"), Gs = lookupGetter(g, "childNodes"), Ks = lookupGetter(g, "parentNode");
330
- if (typeof o == "function") {
389
+ if (t.version = "3.4.13", t.removed = [], !e || !e.document || e.document.nodeType !== NODE_TYPE.document || !e.Element) return t.isSupported = !1, t;
390
+ let n = e.document, r = n, i = r.currentScript;
391
+ e.DocumentFragment;
392
+ let a = e.HTMLTemplateElement, o = e.Node, s = e.Element, c = e.NodeFilter;
393
+ e.NamedNodeMap === void 0 && (e.NamedNodeMap || e.MozNamedAttrMap), e.HTMLFormElement;
394
+ let l = e.DOMParser, u = e.trustedTypes, f = s.prototype, p = lookupGetter(f, "cloneNode"), h = lookupGetter(f, "remove"), js = lookupGetter(f, "nextSibling"), g = lookupGetter(f, "childNodes"), O = lookupGetter(f, "parentNode"), Ms = lookupGetter(f, "shadowRoot"), Ns = lookupGetter(f, "attributes"), A = o && o.prototype ? lookupGetter(o.prototype, "nodeType") : null, R = o && o.prototype ? lookupGetter(o.prototype, "nodeName") : null, B = o && o.prototype ? lookupGetter(o.prototype, "ownerDocument") : null;
395
+ if (typeof a == "function") {
331
396
  let e = n.createElement("template");
332
397
  e.content && e.content.ownerDocument && (n = e.content.ownerDocument);
333
398
  }
334
- let R, B = "", { implementation: V, createNodeIterator: qs, createDocumentFragment: Js, getElementsByTagName: Ys } = n, { importNode: Xs } = r, H = _createHooksMap();
335
- t.isSupported = typeof entries == "function" && typeof Ks == "function" && V && V.createHTMLDocument !== void 0;
336
- let { MUSTACHE_EXPR: Zs, ERB_EXPR: Qs, TMPLIT_EXPR: $s, DATA_ATTR: ec, ARIA_ATTR: tc, IS_SCRIPT_OR_DATA: nc, ATTR_WHITESPACE: rc, CUSTOM_ELEMENT: ic } = EXPRESSIONS, { IS_ALLOWED_URI: ac } = EXPRESSIONS, oc = null, sc = addToSet({}, [
399
+ let V, Ps = "", Fs, Is = !1, Ls = 0, Rs = function() {
400
+ if (Ls > 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.");
401
+ }, zs = function(e) {
402
+ Rs(), Ls++;
403
+ try {
404
+ return V.createHTML(e);
405
+ } finally {
406
+ Ls--;
407
+ }
408
+ }, Bs = function(e) {
409
+ Rs(), Ls++;
410
+ try {
411
+ return V.createScriptURL(e);
412
+ } finally {
413
+ Ls--;
414
+ }
415
+ }, Vs = function() {
416
+ return Is ||= (Fs = _createTrustedTypesPolicy(u, i), !0), Fs;
417
+ }, Hs = n, Us = Hs.implementation, Ws = Hs.createNodeIterator, Gs = Hs.createDocumentFragment, Ks = Hs.getElementsByTagName, qs = r.importNode, H = _createHooksMap();
418
+ t.isSupported = typeof entries == "function" && typeof O == "function" && Us && Us.createHTMLDocument !== void 0;
419
+ let Js = MUSTACHE_EXPR, Ys = ERB_EXPR, Xs = TMPLIT_EXPR, Zs = DATA_ATTR, Qs = ARIA_ATTR, $s = IS_SCRIPT_OR_DATA, ec = ATTR_WHITESPACE, tc = CUSTOM_ELEMENT, nc = IS_ALLOWED_URI, Y = null, rc = addToSet({}, [
337
420
  ...html$1,
338
421
  ...svg$1,
339
422
  ...svgFilters,
340
423
  ...mathMl$1,
341
424
  ...text
342
- ]), cc = null, lc = addToSet({}, [
425
+ ]), ic = null, ac = addToSet({}, [
343
426
  ...html,
344
427
  ...svg,
345
428
  ...mathMl,
346
429
  ...xml
347
- ]), Y = Object.seal(create(null, {
430
+ ]), oc = Object.seal(create(null, {
348
431
  tagNameCheck: {
349
432
  writable: !0,
350
433
  configurable: !1,
@@ -363,7 +446,7 @@ function createDOMPurify() {
363
446
  enumerable: !0,
364
447
  value: !1
365
448
  }
366
- })), uc = null, dc = null, fc = Object.seal(create(null, {
449
+ })), sc = null, cc = null, lc = Object.seal(create(null, {
367
450
  tagCheck: {
368
451
  writable: !0,
369
452
  configurable: !1,
@@ -376,33 +459,7 @@ function createDOMPurify() {
376
459
  enumerable: !0,
377
460
  value: null
378
461
  }
379
- })), pc = !0, mc = !0, hc = !1, gc = !0, _c = !1, vc = !0, yc = !1, bc = !1, xc = !1, Sc = !1, Cc = !1, wc = !1, Tc = !0, Ec = !1, Dc = !0, Oc = !1, kc = {}, Ac = null, jc = addToSet({}, [
380
- "annotation-xml",
381
- "audio",
382
- "colgroup",
383
- "desc",
384
- "foreignobject",
385
- "head",
386
- "iframe",
387
- "math",
388
- "mi",
389
- "mn",
390
- "mo",
391
- "ms",
392
- "mtext",
393
- "noembed",
394
- "noframes",
395
- "noscript",
396
- "plaintext",
397
- "script",
398
- "style",
399
- "svg",
400
- "template",
401
- "thead",
402
- "title",
403
- "video",
404
- "xmp"
405
- ]), Mc = null, Nc = addToSet({}, [
462
+ })), uc = !0, dc = !0, fc = !1, pc = !0, mc = !1, hc = !0, gc = !1, _c = !1, vc = null, yc = null, bc = !1, xc = !1, Sc = !1, Cc = !1, wc = !0, Tc = !1, Ec = "user-content-", Dc = !0, Oc = !1, kc = {}, Ac = null, jc = addToSet({}, /* @__PURE__ */ "annotation-xml.audio.colgroup.desc.foreignobject.head.iframe.math.mi.mn.mo.ms.mtext.noembed.noframes.noscript.plaintext.script.selectedcontent.style.svg.template.thead.title.video.xmp".split(".")), Mc = null, Nc = addToSet({}, [
406
463
  "audio",
407
464
  "video",
408
465
  "img",
@@ -428,54 +485,93 @@ function createDOMPurify() {
428
485
  Ic,
429
486
  Lc,
430
487
  Rc
431
- ], stringToString), Uc = addToSet({}, [
488
+ ], stringToString), Uc = freeze([
432
489
  "mi",
433
490
  "mo",
434
491
  "mn",
435
492
  "ms",
436
493
  "mtext"
437
- ]), Wc = addToSet({}, ["annotation-xml"]), Gc = addToSet({}, [
494
+ ]), Wc = addToSet({}, Uc), Gc = freeze(["annotation-xml"]), Kc = addToSet({}, Gc), qc = addToSet({}, [
438
495
  "title",
439
496
  "style",
440
497
  "font",
441
498
  "a",
442
499
  "script"
443
- ]), Kc = null, qc = ["application/xhtml+xml", "text/html"], Jc = null, Yc = null, Xc = n.createElement("form"), Zc = function(e) {
500
+ ]), Jc = null, Yc = ["application/xhtml+xml", "text/html"], Xc = null, Zc = null, Qc = n.createElement("form"), $c = function(e) {
444
501
  return e instanceof RegExp || e instanceof Function;
445
- }, Qc = function() {
502
+ }, el = function() {
446
503
  let e = arguments.length > 0 && arguments[0] !== void 0 ? arguments[0] : {};
447
- if (!(Yc && Yc === e)) {
448
- if ((!e || typeof e != "object") && (e = {}), e = clone(e), Kc = qc.indexOf(e.PARSER_MEDIA_TYPE) === -1 ? "text/html" : e.PARSER_MEDIA_TYPE, Jc = Kc === "application/xhtml+xml" ? stringToString : stringToLowerCase, oc = objectHasOwnProperty(e, "ALLOWED_TAGS") ? addToSet({}, e.ALLOWED_TAGS, Jc) : sc, cc = objectHasOwnProperty(e, "ALLOWED_ATTR") ? addToSet({}, e.ALLOWED_ATTR, Jc) : lc, Vc = objectHasOwnProperty(e, "ALLOWED_NAMESPACES") ? addToSet({}, e.ALLOWED_NAMESPACES, stringToString) : Hc, Pc = objectHasOwnProperty(e, "ADD_URI_SAFE_ATTR") ? addToSet(clone(Fc), e.ADD_URI_SAFE_ATTR, Jc) : Fc, Mc = objectHasOwnProperty(e, "ADD_DATA_URI_TAGS") ? addToSet(clone(Nc), e.ADD_DATA_URI_TAGS, Jc) : Nc, Ac = objectHasOwnProperty(e, "FORBID_CONTENTS") ? addToSet({}, e.FORBID_CONTENTS, Jc) : jc, uc = objectHasOwnProperty(e, "FORBID_TAGS") ? addToSet({}, e.FORBID_TAGS, Jc) : clone({}), dc = objectHasOwnProperty(e, "FORBID_ATTR") ? addToSet({}, e.FORBID_ATTR, Jc) : clone({}), kc = objectHasOwnProperty(e, "USE_PROFILES") ? e.USE_PROFILES : !1, pc = e.ALLOW_ARIA_ATTR !== !1, mc = e.ALLOW_DATA_ATTR !== !1, hc = e.ALLOW_UNKNOWN_PROTOCOLS || !1, gc = e.ALLOW_SELF_CLOSE_IN_ATTR !== !1, _c = e.SAFE_FOR_TEMPLATES || !1, vc = e.SAFE_FOR_XML !== !1, yc = e.WHOLE_DOCUMENT || !1, Sc = e.RETURN_DOM || !1, Cc = e.RETURN_DOM_FRAGMENT || !1, wc = e.RETURN_TRUSTED_TYPE || !1, xc = e.FORCE_BODY || !1, Tc = e.SANITIZE_DOM !== !1, Ec = e.SANITIZE_NAMED_PROPS || !1, Dc = e.KEEP_CONTENT !== !1, Oc = e.IN_PLACE || !1, ac = e.ALLOWED_URI_REGEXP || IS_ALLOWED_URI, zc = e.NAMESPACE || Rc, Uc = e.MATHML_TEXT_INTEGRATION_POINTS || Uc, Wc = e.HTML_INTEGRATION_POINTS || Wc, Y = e.CUSTOM_ELEMENT_HANDLING || {}, e.CUSTOM_ELEMENT_HANDLING && Zc(e.CUSTOM_ELEMENT_HANDLING.tagNameCheck) && (Y.tagNameCheck = e.CUSTOM_ELEMENT_HANDLING.tagNameCheck), e.CUSTOM_ELEMENT_HANDLING && Zc(e.CUSTOM_ELEMENT_HANDLING.attributeNameCheck) && (Y.attributeNameCheck = e.CUSTOM_ELEMENT_HANDLING.attributeNameCheck), e.CUSTOM_ELEMENT_HANDLING && typeof e.CUSTOM_ELEMENT_HANDLING.allowCustomizedBuiltInElements == "boolean" && (Y.allowCustomizedBuiltInElements = e.CUSTOM_ELEMENT_HANDLING.allowCustomizedBuiltInElements), _c && (mc = !1), Cc && (Sc = !0), kc && (oc = addToSet({}, text), cc = [], kc.html === !0 && (addToSet(oc, html$1), addToSet(cc, html)), kc.svg === !0 && (addToSet(oc, svg$1), addToSet(cc, svg), addToSet(cc, xml)), kc.svgFilters === !0 && (addToSet(oc, svgFilters), addToSet(cc, svg), addToSet(cc, xml)), kc.mathMl === !0 && (addToSet(oc, mathMl$1), addToSet(cc, mathMl), addToSet(cc, xml))), e.ADD_TAGS && (typeof e.ADD_TAGS == "function" ? fc.tagCheck = e.ADD_TAGS : (oc === sc && (oc = clone(oc)), addToSet(oc, e.ADD_TAGS, Jc))), e.ADD_ATTR && (typeof e.ADD_ATTR == "function" ? fc.attributeCheck = e.ADD_ATTR : (cc === lc && (cc = clone(cc)), addToSet(cc, e.ADD_ATTR, Jc))), e.ADD_URI_SAFE_ATTR && addToSet(Pc, e.ADD_URI_SAFE_ATTR, Jc), e.FORBID_CONTENTS && (Ac === jc && (Ac = clone(Ac)), addToSet(Ac, e.FORBID_CONTENTS, Jc)), e.ADD_FORBID_CONTENTS && (Ac === jc && (Ac = clone(Ac)), addToSet(Ac, e.ADD_FORBID_CONTENTS, Jc)), Dc && (oc["#text"] = !0), yc && addToSet(oc, [
449
- "html",
450
- "head",
451
- "body"
452
- ]), oc.table && (addToSet(oc, ["tbody"]), delete uc.tbody), e.TRUSTED_TYPES_POLICY) {
453
- if (typeof e.TRUSTED_TYPES_POLICY.createHTML != "function") throw typeErrorCreate("TRUSTED_TYPES_POLICY configuration option must provide a \"createHTML\" hook.");
454
- if (typeof e.TRUSTED_TYPES_POLICY.createScriptURL != "function") throw typeErrorCreate("TRUSTED_TYPES_POLICY configuration option must provide a \"createScriptURL\" hook.");
455
- R = e.TRUSTED_TYPES_POLICY, B = R.createHTML("");
456
- } else R === void 0 && (R = _createTrustedTypesPolicy(h, i)), R !== null && typeof B == "string" && (B = R.createHTML(""));
457
- freeze && freeze(e), Yc = e;
458
- }
459
- }, $c = addToSet({}, [
504
+ if (Zc && Zc === e) return;
505
+ (!e || typeof e != "object") && (e = {}), e = clone(e), Jc = Yc.indexOf(e.PARSER_MEDIA_TYPE) === -1 ? "text/html" : e.PARSER_MEDIA_TYPE, Xc = Jc === "application/xhtml+xml" ? stringToString : stringToLowerCase, Y = _resolveSetOption(e, "ALLOWED_TAGS", rc, { transform: Xc }), ic = _resolveSetOption(e, "ALLOWED_ATTR", ac, { transform: Xc }), Vc = _resolveSetOption(e, "ALLOWED_NAMESPACES", Hc, { transform: stringToString }), Pc = _resolveSetOption(e, "ADD_URI_SAFE_ATTR", Fc, {
506
+ transform: Xc,
507
+ base: Fc
508
+ }), Mc = _resolveSetOption(e, "ADD_DATA_URI_TAGS", Nc, {
509
+ transform: Xc,
510
+ base: Nc
511
+ }), Ac = _resolveSetOption(e, "FORBID_CONTENTS", jc, { transform: Xc }), sc = _resolveSetOption(e, "FORBID_TAGS", clone({}), { transform: Xc }), cc = _resolveSetOption(e, "FORBID_ATTR", clone({}), { transform: Xc }), kc = objectHasOwnProperty(e, "USE_PROFILES") ? e.USE_PROFILES && typeof e.USE_PROFILES == "object" ? clone(e.USE_PROFILES) : e.USE_PROFILES : !1, uc = e.ALLOW_ARIA_ATTR !== !1, dc = e.ALLOW_DATA_ATTR !== !1, fc = e.ALLOW_UNKNOWN_PROTOCOLS || !1, pc = e.ALLOW_SELF_CLOSE_IN_ATTR !== !1, mc = e.SAFE_FOR_TEMPLATES || !1, hc = e.SAFE_FOR_XML !== !1, gc = e.WHOLE_DOCUMENT || !1, xc = e.RETURN_DOM || !1, Sc = e.RETURN_DOM_FRAGMENT || !1, Cc = e.RETURN_TRUSTED_TYPE || !1, bc = e.FORCE_BODY || !1, wc = e.SANITIZE_DOM !== !1, Tc = e.SANITIZE_NAMED_PROPS || !1, Dc = e.KEEP_CONTENT !== !1, Oc = e.IN_PLACE || !1, nc = isRegex(e.ALLOWED_URI_REGEXP) ? e.ALLOWED_URI_REGEXP : IS_ALLOWED_URI, zc = typeof e.NAMESPACE == "string" ? e.NAMESPACE : Rc, Wc = objectHasOwnProperty(e, "MATHML_TEXT_INTEGRATION_POINTS") && e.MATHML_TEXT_INTEGRATION_POINTS && typeof e.MATHML_TEXT_INTEGRATION_POINTS == "object" ? clone(e.MATHML_TEXT_INTEGRATION_POINTS) : addToSet({}, Uc), Kc = objectHasOwnProperty(e, "HTML_INTEGRATION_POINTS") && e.HTML_INTEGRATION_POINTS && typeof e.HTML_INTEGRATION_POINTS == "object" ? clone(e.HTML_INTEGRATION_POINTS) : addToSet({}, Gc);
512
+ let t = objectHasOwnProperty(e, "CUSTOM_ELEMENT_HANDLING") && e.CUSTOM_ELEMENT_HANDLING && typeof e.CUSTOM_ELEMENT_HANDLING == "object" ? clone(e.CUSTOM_ELEMENT_HANDLING) : create(null);
513
+ if (oc = create(null), objectHasOwnProperty(t, "tagNameCheck") && $c(t.tagNameCheck) && (oc.tagNameCheck = t.tagNameCheck), objectHasOwnProperty(t, "attributeNameCheck") && $c(t.attributeNameCheck) && (oc.attributeNameCheck = t.attributeNameCheck), objectHasOwnProperty(t, "allowCustomizedBuiltInElements") && typeof t.allowCustomizedBuiltInElements == "boolean" && (oc.allowCustomizedBuiltInElements = t.allowCustomizedBuiltInElements), seal(oc), mc && (dc = !1), Sc && (xc = !0), kc && (Y = addToSet({}, text), ic = create(null), kc.html === !0 && (addToSet(Y, html$1), addToSet(ic, html)), kc.svg === !0 && (addToSet(Y, svg$1), addToSet(ic, svg), addToSet(ic, xml)), kc.svgFilters === !0 && (addToSet(Y, svgFilters), addToSet(ic, svg), addToSet(ic, xml)), kc.mathMl === !0 && (addToSet(Y, mathMl$1), addToSet(ic, mathMl), addToSet(ic, xml))), lc.tagCheck = null, lc.attributeCheck = null, objectHasOwnProperty(e, "ADD_TAGS") && (typeof e.ADD_TAGS == "function" ? lc.tagCheck = e.ADD_TAGS : arrayIsArray(e.ADD_TAGS) && (Y === rc && (Y = clone(Y)), addToSet(Y, e.ADD_TAGS, Xc))), objectHasOwnProperty(e, "ADD_ATTR") && (typeof e.ADD_ATTR == "function" ? lc.attributeCheck = e.ADD_ATTR : arrayIsArray(e.ADD_ATTR) && (ic === ac && (ic = clone(ic)), addToSet(ic, e.ADD_ATTR, Xc))), objectHasOwnProperty(e, "ADD_URI_SAFE_ATTR") && arrayIsArray(e.ADD_URI_SAFE_ATTR) && addToSet(Pc, e.ADD_URI_SAFE_ATTR, Xc), objectHasOwnProperty(e, "FORBID_CONTENTS") && arrayIsArray(e.FORBID_CONTENTS) && (Ac === jc && (Ac = clone(Ac)), addToSet(Ac, e.FORBID_CONTENTS, Xc)), objectHasOwnProperty(e, "ADD_FORBID_CONTENTS") && arrayIsArray(e.ADD_FORBID_CONTENTS) && (Ac === jc && (Ac = clone(Ac)), addToSet(Ac, e.ADD_FORBID_CONTENTS, Xc)), Dc && (Y["#text"] = !0), gc && addToSet(Y, [
514
+ "html",
515
+ "head",
516
+ "body"
517
+ ]), Y.table && (addToSet(Y, ["tbody"]), delete sc.tbody), e.TRUSTED_TYPES_POLICY) {
518
+ if (typeof e.TRUSTED_TYPES_POLICY.createHTML != "function") throw typeErrorCreate("TRUSTED_TYPES_POLICY configuration option must provide a \"createHTML\" hook.");
519
+ if (typeof e.TRUSTED_TYPES_POLICY.createScriptURL != "function") throw typeErrorCreate("TRUSTED_TYPES_POLICY configuration option must provide a \"createScriptURL\" hook.");
520
+ let t = V;
521
+ V = e.TRUSTED_TYPES_POLICY;
522
+ try {
523
+ Ps = zs("");
524
+ } catch (e) {
525
+ throw V = t, e;
526
+ }
527
+ } else e.TRUSTED_TYPES_POLICY === null ? (V = void 0, Ps = "") : (V === void 0 && (V = Vs()), V && typeof Ps == "string" && (Ps = zs("")));
528
+ freeze && freeze(e), Zc = e;
529
+ }, tl = addToSet({}, [
460
530
  ...svg$1,
461
531
  ...svgFilters,
462
532
  ...svgDisallowed
463
- ]), el = addToSet({}, [...mathMl$1, ...mathMlDisallowed]), tl = function(e) {
464
- let t = Ks(e);
533
+ ]), nl = addToSet({}, [...mathMl$1, ...mathMlDisallowed]), rl = function(e, t, n) {
534
+ return t.namespaceURI === Rc ? e === "svg" : t.namespaceURI === Ic ? e === "svg" && (n === "annotation-xml" || Wc[n]) : !!tl[e];
535
+ }, il = function(e, t, n) {
536
+ return t.namespaceURI === Rc ? e === "math" : t.namespaceURI === Lc ? e === "math" && Kc[n] : !!nl[e];
537
+ }, al = function(e, t, n) {
538
+ return t.namespaceURI === Lc && !Kc[n] || t.namespaceURI === Ic && !Wc[n] ? !1 : !nl[e] && (qc[e] || !tl[e]);
539
+ }, ol = function(e) {
540
+ let t = O(e);
465
541
  (!t || !t.tagName) && (t = {
466
542
  namespaceURI: zc,
467
543
  tagName: "template"
468
544
  });
469
545
  let n = stringToLowerCase(e.tagName), r = stringToLowerCase(t.tagName);
470
- return Vc[e.namespaceURI] ? e.namespaceURI === Lc ? t.namespaceURI === Rc ? n === "svg" : t.namespaceURI === Ic ? n === "svg" && (r === "annotation-xml" || Uc[r]) : !!$c[n] : e.namespaceURI === Ic ? t.namespaceURI === Rc ? n === "math" : t.namespaceURI === Lc ? n === "math" && Wc[r] : !!el[n] : e.namespaceURI === Rc ? t.namespaceURI === Lc && !Wc[r] || t.namespaceURI === Ic && !Uc[r] ? !1 : !el[n] && (Gc[n] || !$c[n]) : !!(Kc === "application/xhtml+xml" && Vc[e.namespaceURI]) : !1;
471
- }, nl = function(e) {
546
+ return Vc[e.namespaceURI] ? e.namespaceURI === Lc ? rl(n, t, r) : e.namespaceURI === Ic ? il(n, t, r) : e.namespaceURI === Rc ? al(n, t, r) : !!(Jc === "application/xhtml+xml" && Vc[e.namespaceURI]) : !1;
547
+ }, sl = function(e) {
472
548
  arrayPush(t.removed, { element: e });
473
549
  try {
474
- Ks(e).removeChild(e);
550
+ O(e).removeChild(e);
475
551
  } catch {
476
- A(e);
552
+ if (h(e), !O(e)) throw typeErrorCreate("a node selected for removal could not be detached from its tree and cannot be safely returned; refusing to sanitize in place");
553
+ }
554
+ }, cl = function(e) {
555
+ dl(e);
556
+ let t = g(e);
557
+ if (t) {
558
+ let e = [];
559
+ arrayForEach(t, (t) => {
560
+ arrayPush(e, t);
561
+ }), arrayForEach(e, (e) => {
562
+ try {
563
+ h(e);
564
+ } catch {}
565
+ });
477
566
  }
478
- }, rl = function(e, n) {
567
+ let n = Ns(e);
568
+ if (n) for (let t = n.length - 1; t >= 0; --t) {
569
+ let r = n[t], i = r && r.name;
570
+ if (typeof i == "string") try {
571
+ e.removeAttribute(i);
572
+ } catch {}
573
+ }
574
+ }, ll = function(e, n) {
479
575
  try {
480
576
  arrayPush(t.removed, {
481
577
  attribute: n.getAttributeNode(e),
@@ -487,194 +583,318 @@ function createDOMPurify() {
487
583
  from: n
488
584
  });
489
585
  }
490
- if (n.removeAttribute(e), e === "is") if (Sc || Cc) try {
491
- nl(n);
586
+ if (n.removeAttribute(e), e === "is") if (xc || Sc) try {
587
+ sl(n);
492
588
  } catch {}
493
589
  else try {
494
590
  n.setAttribute(e, "");
495
591
  } catch {}
496
- }, il = function(e) {
592
+ }, ul = function(e) {
593
+ let t = Ns(e);
594
+ if (t) for (let n = t.length - 1; n >= 0; --n) {
595
+ let r = t[n], i = r && r.name;
596
+ if (!(typeof i != "string" || ic[Xc(i)])) try {
597
+ e.removeAttribute(i);
598
+ } catch {}
599
+ }
600
+ }, dl = function(e) {
601
+ let t = [e];
602
+ for (; t.length > 0;) {
603
+ let e = t.pop();
604
+ (A ? A(e) : e.nodeType) === NODE_TYPE.element && ul(e);
605
+ let n = g(e);
606
+ if (n) for (let e = n.length - 1; e >= 0; --e) t.push(n[e]);
607
+ }
608
+ }, fl = function(e) {
609
+ if (!hc) return;
610
+ let t = [e];
611
+ for (; t.length > 0;) {
612
+ let e = t.pop(), n = A ? A(e) : e.nodeType;
613
+ if (n === NODE_TYPE.processingInstruction || n === NODE_TYPE.comment && regExpTest(COMMENT_MARKUP_PROBE, e.data)) {
614
+ try {
615
+ h(e);
616
+ } catch {}
617
+ continue;
618
+ }
619
+ if (n === NODE_TYPE.element) {
620
+ let t = e, n = Xc(R ? R(e) : e.nodeName);
621
+ try {
622
+ t.hasAttribute && t.hasAttribute("patchsrc") && t.removeAttribute("patchsrc"), t.hasAttribute && t.hasAttribute("for") && n !== "label" && n !== "output" && t.removeAttribute("for");
623
+ } catch {}
624
+ }
625
+ let r = g(e);
626
+ if (r) for (let e = r.length - 1; e >= 0; --e) t.push(r[e]);
627
+ }
628
+ }, pl = function(e) {
497
629
  let t = null, r = null;
498
- if (xc) e = "<remove></remove>" + e;
630
+ if (bc) e = "<remove></remove>" + e;
499
631
  else {
500
632
  let t = stringMatch(e, /^[\r\n\t ]+/);
501
633
  r = t && t[0];
502
634
  }
503
- Kc === "application/xhtml+xml" && zc === Rc && (e = "<html xmlns=\"http://www.w3.org/1999/xhtml\"><head></head><body>" + e + "</body></html>");
504
- let i = R ? R.createHTML(e) : e;
635
+ Jc === "application/xhtml+xml" && zc === Rc && (e = "<html xmlns=\"http://www.w3.org/1999/xhtml\"><head></head><body>" + e + "</body></html>");
636
+ let i = V ? zs(e) : e;
505
637
  if (zc === Rc) try {
506
- t = new p().parseFromString(i, Kc);
638
+ t = new l().parseFromString(i, Jc);
507
639
  } catch {}
508
640
  if (!t || !t.documentElement) {
509
- t = V.createDocument(zc, "template", null);
641
+ t = Us.createDocument(zc, "template", null);
510
642
  try {
511
- t.documentElement.innerHTML = Bc ? B : i;
643
+ t.documentElement.innerHTML = Bc ? Ps : i;
512
644
  } catch {}
513
645
  }
514
646
  let a = t.body || t.documentElement;
515
- return e && r && a.insertBefore(n.createTextNode(r), a.childNodes[0] || null), zc === Rc ? Ys.call(t, yc ? "html" : "body")[0] : yc ? t.documentElement : a;
516
- }, al = function(e) {
517
- return qs.call(e.ownerDocument || e, e, l.SHOW_ELEMENT | l.SHOW_COMMENT | l.SHOW_TEXT | l.SHOW_PROCESSING_INSTRUCTION | l.SHOW_CDATA_SECTION, null);
518
- }, ol = function(e) {
519
- return e instanceof f && (typeof e.nodeName != "string" || typeof e.textContent != "string" || typeof e.removeChild != "function" || !(e.attributes instanceof u) || typeof e.removeAttribute != "function" || typeof e.setAttribute != "function" || typeof e.namespaceURI != "string" || typeof e.insertBefore != "function" || typeof e.hasChildNodes != "function");
520
- }, sl = function(e) {
521
- return typeof s == "function" && e instanceof s;
647
+ return e && r && a.insertBefore(n.createTextNode(r), a.childNodes[0] || null), zc === Rc ? Ks.call(t, gc ? "html" : "body")[0] : gc ? t.documentElement : a;
648
+ }, ml = function(e) {
649
+ let t = B ? B(e) : e.ownerDocument;
650
+ return Ws.call(t || e, e, c.SHOW_ELEMENT | c.SHOW_COMMENT | c.SHOW_TEXT | c.SHOW_PROCESSING_INSTRUCTION | c.SHOW_CDATA_SECTION, null);
651
+ }, hl = function(e) {
652
+ return e = stringReplace(e, Js, " "), e = stringReplace(e, Ys, " "), e = stringReplace(e, Xs, " "), e;
653
+ }, gl = function(e) {
654
+ e.normalize();
655
+ let t = B ? B(e) : e.ownerDocument, n = Ws.call(t || e, e, c.SHOW_TEXT | c.SHOW_COMMENT | c.SHOW_CDATA_SECTION | c.SHOW_PROCESSING_INSTRUCTION, null), r = n.nextNode();
656
+ for (; r;) r.data = hl(r.data), r = n.nextNode();
657
+ let i = e.querySelectorAll?.call(e, "template");
658
+ i && arrayForEach(i, (e) => {
659
+ vl(e.content) && gl(e.content);
660
+ });
661
+ }, _l = function(e) {
662
+ let t = R ? R(e) : null;
663
+ return typeof t != "string" || Xc(t) !== "form" ? !1 : typeof e.nodeName != "string" || typeof e.textContent != "string" || typeof e.removeChild != "function" || e.attributes !== Ns(e) || typeof e.removeAttribute != "function" || typeof e.setAttribute != "function" || typeof e.namespaceURI != "string" || typeof e.insertBefore != "function" || typeof e.hasChildNodes != "function" || e.nodeType !== A(e) || e.childNodes !== g(e);
664
+ }, vl = function(e) {
665
+ if (!A || typeof e != "object" || !e) return !1;
666
+ try {
667
+ return A(e) === NODE_TYPE.documentFragment;
668
+ } catch {
669
+ return !1;
670
+ }
671
+ }, yl = function(e) {
672
+ if (!A || typeof e != "object" || !e) return !1;
673
+ try {
674
+ return typeof A(e) == "number";
675
+ } catch {
676
+ return !1;
677
+ }
522
678
  };
523
- function cl(e, n, r) {
524
- arrayForEach(e, (e) => {
525
- e.call(t, n, r, Yc);
679
+ function bl(e, n, r) {
680
+ e.length !== 0 && arrayForEach(e, (e) => {
681
+ e.call(t, n, r, Zc);
526
682
  });
527
683
  }
528
- let ll = function(e) {
529
- let n = null;
530
- if (cl(H.beforeSanitizeElements, e, null), ol(e)) return nl(e), !0;
531
- let r = Jc(e.nodeName);
532
- if (cl(H.uponSanitizeElement, e, {
533
- tagName: r,
534
- allowedTags: oc
535
- }), vc && e.hasChildNodes() && !sl(e.firstElementChild) && regExpTest(/<[/\w!]/g, e.innerHTML) && regExpTest(/<[/\w!]/g, e.textContent) || e.nodeType === NODE_TYPE.progressingInstruction || vc && e.nodeType === NODE_TYPE.comment && regExpTest(/<[/\w]/g, e.data)) return nl(e), !0;
536
- if (!(fc.tagCheck instanceof Function && fc.tagCheck(r)) && (!oc[r] || uc[r])) {
537
- if (!uc[r] && dl(r) && (Y.tagNameCheck instanceof RegExp && regExpTest(Y.tagNameCheck, r) || Y.tagNameCheck instanceof Function && Y.tagNameCheck(r))) return !1;
538
- if (Dc && !Ac[r]) {
539
- let t = Ks(e) || e.parentNode, n = Gs(e) || e.childNodes;
540
- if (n && t) {
541
- let r = n.length;
542
- for (let i = r - 1; i >= 0; --i) {
543
- let r = O(n[i], !0);
544
- r.__removalCount = (e.__removalCount || 0) + 1, t.insertBefore(r, Ws(e));
545
- }
684
+ let xl = function(e, t) {
685
+ return !!(hc && e.hasChildNodes() && !yl(e.firstElementChild) && regExpTest(ELEMENT_MARKUP_PROBE, e.textContent) && regExpTest(ELEMENT_MARKUP_PROBE, e.innerHTML) || hc && e.namespaceURI === Rc && t === "style" && yl(e.firstElementChild) || e.nodeType === NODE_TYPE.processingInstruction || hc && e.nodeType === NODE_TYPE.comment && regExpTest(COMMENT_MARKUP_PROBE, e.data));
686
+ }, Sl = function(e, t, n) {
687
+ if (!sc[t] && Dl(t) && (oc.tagNameCheck instanceof RegExp && regExpTest(oc.tagNameCheck, t) || oc.tagNameCheck instanceof Function && oc.tagNameCheck(t))) return !1;
688
+ if (Dc && !Ac[t]) {
689
+ let t = O(e), r = g(e);
690
+ if (r && t) {
691
+ let i = r.length;
692
+ for (let a = i - 1; a >= 0; --a) {
693
+ let i = e === n ? p(r[a], !0) : r[a];
694
+ t.insertBefore(i, js(e));
546
695
  }
547
696
  }
548
- return nl(e), !0;
549
697
  }
550
- return e instanceof c && !tl(e) || (r === "noscript" || r === "noembed" || r === "noframes") && regExpTest(/<\/no(script|embed|frames)/i, e.innerHTML) ? (nl(e), !0) : (_c && e.nodeType === NODE_TYPE.text && (n = e.textContent, arrayForEach([
551
- Zs,
552
- Qs,
553
- $s
554
- ], (e) => {
555
- n = stringReplace(n, e, " ");
556
- }), e.textContent !== n && (arrayPush(t.removed, { element: e.cloneNode() }), e.textContent = n)), cl(H.afterSanitizeElements, e, null), !1);
557
- }, ul = function(e, t, r) {
558
- if (Tc && (t === "id" || t === "name") && (r in n || r in Xc)) return !1;
559
- if (!(mc && !dc[t] && regExpTest(ec, t)) && !(pc && regExpTest(tc, t)) && !(fc.attributeCheck instanceof Function && fc.attributeCheck(t, e))) {
560
- if (!cc[t] || dc[t]) {
561
- if (!(dl(e) && (Y.tagNameCheck instanceof RegExp && regExpTest(Y.tagNameCheck, e) || Y.tagNameCheck instanceof Function && Y.tagNameCheck(e)) && (Y.attributeNameCheck instanceof RegExp && regExpTest(Y.attributeNameCheck, t) || Y.attributeNameCheck instanceof Function && Y.attributeNameCheck(t, e)) || t === "is" && Y.allowCustomizedBuiltInElements && (Y.tagNameCheck instanceof RegExp && regExpTest(Y.tagNameCheck, r) || Y.tagNameCheck instanceof Function && Y.tagNameCheck(r)))) return !1;
562
- } else if (!Pc[t] && !regExpTest(ac, stringReplace(r, rc, "")) && !((t === "src" || t === "xlink:href" || t === "href") && e !== "script" && stringIndexOf(r, "data:") === 0 && Mc[e]) && !(hc && !regExpTest(nc, stringReplace(r, rc, ""))) && r) return !1;
698
+ return sl(e), !0;
699
+ }, Cl = function(e, t, n, r) {
700
+ return e.length === 0 ? t : t === n || t === r ? clone(t) : t;
701
+ }, wl = function(e, n) {
702
+ if (bl(H.beforeSanitizeElements, e, null), e !== n && O(e) === null) return Oc && dl(e), !0;
703
+ if (_l(e)) return sl(e), !0;
704
+ let r = Xc(R ? R(e) : e.nodeName);
705
+ if (Y = Cl(H.uponSanitizeElement, Y, rc, vc), bl(H.uponSanitizeElement, e, {
706
+ tagName: r,
707
+ allowedTags: Y
708
+ }), e !== n && O(e) === null) return Oc && dl(e), !0;
709
+ if (xl(e, r)) return sl(e), !0;
710
+ if (sc[r] || !(lc.tagCheck instanceof Function && lc.tagCheck(r)) && !Y[r]) {
711
+ let t = Sl(e, r, n);
712
+ return t === !1 && bl(H.afterSanitizeElements, e, null), t;
713
+ }
714
+ if ((A ? A(e) : e.nodeType) === NODE_TYPE.element && !ol(e) || (r === "noscript" || r === "noembed" || r === "noframes") && regExpTest(FALLBACK_TAG_CLOSE, e.innerHTML)) return sl(e), !0;
715
+ if (mc && e.nodeType === NODE_TYPE.text) {
716
+ let n = hl(e.textContent);
717
+ e.textContent !== n && (arrayPush(t.removed, { element: e.cloneNode() }), e.textContent = n);
718
+ }
719
+ return bl(H.afterSanitizeElements, e, null), !1;
720
+ }, Tl = function(e, t, r) {
721
+ if (cc[t] || hc && t === "patchsrc" || hc && t === "for" && e !== "label" && e !== "output" || wc && (t === "id" || t === "name") && (r in n || r in Qc)) return !1;
722
+ let i = ic[t] || lc.attributeCheck instanceof Function && lc.attributeCheck(t, e);
723
+ if (!(dc && regExpTest(Zs, t)) && !(uc && regExpTest(Qs, t))) {
724
+ if (i) {
725
+ if (!Pc[t] && !regExpTest(nc, stringReplace(r, ec, "")) && !((t === "src" || t === "xlink:href" || t === "href") && e !== "script" && stringIndexOf(r, "data:") === 0 && Mc[e]) && !(fc && !regExpTest($s, stringReplace(r, ec, ""))) && r) return !1;
726
+ } else if (!(Dl(e) && (oc.tagNameCheck instanceof RegExp && regExpTest(oc.tagNameCheck, e) || oc.tagNameCheck instanceof Function && oc.tagNameCheck(e)) && (oc.attributeNameCheck instanceof RegExp && regExpTest(oc.attributeNameCheck, t) || oc.attributeNameCheck instanceof Function && oc.attributeNameCheck(t, e)) || t === "is" && oc.allowCustomizedBuiltInElements && (oc.tagNameCheck instanceof RegExp && regExpTest(oc.tagNameCheck, r) || oc.tagNameCheck instanceof Function && oc.tagNameCheck(r)))) return !1;
563
727
  }
564
728
  return !0;
565
- }, dl = function(e) {
566
- return e !== "annotation-xml" && stringMatch(e, ic);
567
- }, fl = function(e) {
568
- cl(H.beforeSanitizeAttributes, e, null);
569
- let { attributes: n } = e;
570
- if (!n || ol(e)) return;
571
- let r = {
729
+ }, El = addToSet({}, [
730
+ "annotation-xml",
731
+ "color-profile",
732
+ "font-face",
733
+ "font-face-format",
734
+ "font-face-name",
735
+ "font-face-src",
736
+ "font-face-uri",
737
+ "missing-glyph"
738
+ ]), Dl = function(e) {
739
+ return !El[stringToLowerCase(e)] && regExpTest(tc, e);
740
+ }, Ol = function(e, t, n, r) {
741
+ if (V && typeof u == "object" && typeof u.getAttributeType == "function" && !n) switch (u.getAttributeType(e, t)) {
742
+ case "TrustedHTML": return zs(r);
743
+ case "TrustedScriptURL": return Bs(r);
744
+ }
745
+ return r;
746
+ }, kl = function(e, n, r, i) {
747
+ try {
748
+ r ? e.setAttributeNS(r, n, i) : e.setAttribute(n, i), _l(e) ? sl(e) : arrayPop(t.removed);
749
+ } catch {
750
+ ll(n, e);
751
+ }
752
+ }, Al = function(e) {
753
+ bl(H.beforeSanitizeAttributes, e, null);
754
+ let t = e.attributes;
755
+ if (!t || _l(e)) return;
756
+ ic = Cl(H.uponSanitizeAttribute, ic, ac, yc);
757
+ let n = {
572
758
  attrName: "",
573
759
  attrValue: "",
574
760
  keepAttr: !0,
575
- allowedAttributes: cc,
761
+ allowedAttributes: ic,
576
762
  forceKeepAttr: void 0
577
- }, i = n.length;
578
- for (; i--;) {
579
- let { name: a, namespaceURI: o, value: s } = n[i], c = Jc(a), l = s, u = a === "value" ? l : stringTrim(l);
580
- if (r.attrName = c, r.attrValue = u, r.keepAttr = !0, r.forceKeepAttr = void 0, cl(H.uponSanitizeAttribute, e, r), u = r.attrValue, Ec && (c === "id" || c === "name") && (rl(a, e), u = "user-content-" + u), vc && regExpTest(/((--!?|])>)|<\/(style|title|textarea)/i, u)) {
581
- rl(a, e);
763
+ }, r = t.length, i = Xc(e.nodeName);
764
+ for (; r--;) {
765
+ let a = t[r], o = a.name, s = a.namespaceURI, c = a.value, l = Xc(o), u = c, f = o === "value" ? u : stringTrim(u);
766
+ if (n.attrName = l, n.attrValue = f, n.keepAttr = !0, n.forceKeepAttr = void 0, bl(H.uponSanitizeAttribute, e, n), f = n.attrValue, Tc && (l === "id" || l === "name") && stringIndexOf(f, Ec) !== 0 && (ll(o, e), f = Ec + f), hc && regExpTest(/((--!?|])>)|<\/(style|script|title|xmp|textarea|noscript|iframe|noembed|noframes)/i, f)) {
767
+ ll(o, e);
582
768
  continue;
583
769
  }
584
- if (c === "attributename" && stringMatch(u, "href")) {
585
- rl(a, e);
770
+ if (l === "attributename" && stringMatch(f, "href")) {
771
+ ll(o, e);
586
772
  continue;
587
773
  }
588
- if (r.forceKeepAttr) continue;
589
- if (!r.keepAttr) {
590
- rl(a, e);
591
- continue;
774
+ if (!n.forceKeepAttr) {
775
+ if (!n.keepAttr) {
776
+ ll(o, e);
777
+ continue;
778
+ }
779
+ if (!pc && regExpTest(SELF_CLOSING_TAG, f)) {
780
+ ll(o, e);
781
+ continue;
782
+ }
783
+ if (mc && (f = hl(f)), !Tl(i, l, f)) {
784
+ ll(o, e);
785
+ continue;
786
+ }
787
+ f = Ol(i, l, s, f), f !== u && kl(e, o, s, f);
592
788
  }
593
- if (!gc && regExpTest(/\/>/i, u)) {
594
- rl(a, e);
789
+ }
790
+ bl(H.afterSanitizeAttributes, e, null);
791
+ }, jl = function(e) {
792
+ let t = null, n = ml(e);
793
+ for (bl(H.beforeSanitizeShadowDOM, e, null); t = n.nextNode();) if (bl(H.uponSanitizeShadowNode, t, null), wl(t, e), Al(t), vl(t.content) && jl(t.content), (A ? A(t) : t.nodeType) === NODE_TYPE.element) {
794
+ let e = Ms(t);
795
+ vl(e) && (Ml(e), jl(e));
796
+ }
797
+ bl(H.afterSanitizeShadowDOM, e, null);
798
+ }, Ml = function(e) {
799
+ let t = [{
800
+ node: e,
801
+ shadow: null
802
+ }];
803
+ for (; t.length > 0;) {
804
+ let e = t.pop();
805
+ if (e.shadow) {
806
+ jl(e.shadow);
595
807
  continue;
596
808
  }
597
- _c && arrayForEach([
598
- Zs,
599
- Qs,
600
- $s
601
- ], (e) => {
602
- u = stringReplace(u, e, " ");
809
+ let n = e.node, r = (A ? A(n) : n.nodeType) === NODE_TYPE.element, i = g(n);
810
+ if (i) for (let e = i.length - 1; e >= 0; --e) t.push({
811
+ node: i[e],
812
+ shadow: null
603
813
  });
604
- let f = Jc(e.nodeName);
605
- if (!ul(f, c, u)) {
606
- rl(a, e);
607
- continue;
608
- }
609
- if (R && typeof h == "object" && typeof h.getAttributeType == "function" && !o) switch (h.getAttributeType(f, c)) {
610
- case "TrustedHTML":
611
- u = R.createHTML(u);
612
- break;
613
- case "TrustedScriptURL":
614
- u = R.createScriptURL(u);
615
- break;
814
+ if (r) {
815
+ let e = R ? R(n) : null;
816
+ if (typeof e == "string" && Xc(e) === "template") {
817
+ let e = n.content;
818
+ vl(e) && t.push({
819
+ node: e,
820
+ shadow: null
821
+ });
822
+ }
616
823
  }
617
- if (u !== l) try {
618
- o ? e.setAttributeNS(o, a, u) : e.setAttribute(a, u), ol(e) ? nl(e) : arrayPop(t.removed);
619
- } catch {
620
- rl(a, e);
824
+ if (r) {
825
+ let e = Ms(n);
826
+ vl(e) && t.push({
827
+ node: null,
828
+ shadow: e
829
+ }, {
830
+ node: e,
831
+ shadow: null
832
+ });
621
833
  }
622
834
  }
623
- cl(H.afterSanitizeAttributes, e, null);
624
- }, pl = function e(t) {
625
- let n = null, r = al(t);
626
- for (cl(H.beforeSanitizeShadowDOM, t, null); n = r.nextNode();) cl(H.uponSanitizeShadowNode, n, null), ll(n), fl(n), n.content instanceof a && e(n.content);
627
- cl(H.afterSanitizeShadowDOM, t, null);
628
835
  };
629
836
  return t.sanitize = function(e) {
630
- let n = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : {}, i = null, o = null, c = null, l = null;
631
- if (Bc = !e, Bc && (e = "<!-->"), typeof e != "string" && !sl(e)) if (typeof e.toString == "function") {
632
- if (e = e.toString(), typeof e != "string") throw typeErrorCreate("dirty is not a string, aborting");
633
- } else throw typeErrorCreate("toString is not a function");
837
+ let n = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : {}, i = null, a = null, o = null, s = null;
838
+ if (Bc = !e, Bc && (e = "<!-->"), typeof e != "string" && !yl(e) && (e = stringifyValue(e), typeof e != "string")) throw typeErrorCreate("dirty is not a string, aborting");
634
839
  if (!t.isSupported) return e;
635
- if (bc || Qc(n), t.removed = [], typeof e == "string" && (Oc = !1), Oc) {
636
- if (e.nodeName) {
637
- let t = Jc(e.nodeName);
638
- if (!oc[t] || uc[t]) throw typeErrorCreate("root node is forbidden and cannot be sanitized in-place");
840
+ _c ? (Y = vc, ic = yc) : el(n), (H.uponSanitizeElement.length > 0 || H.uponSanitizeAttribute.length > 0) && (Y = clone(Y)), H.uponSanitizeAttribute.length > 0 && (ic = clone(ic)), t.removed = [];
841
+ let c = Oc && typeof e != "string" && yl(e);
842
+ if (c) {
843
+ fl(e);
844
+ let t = R ? R(e) : e.nodeName;
845
+ if (typeof t == "string") {
846
+ let n = Xc(t);
847
+ if (!Y[n] || sc[n]) throw cl(e), typeErrorCreate("root node is forbidden and cannot be sanitized in-place");
848
+ }
849
+ if (_l(e)) throw cl(e), typeErrorCreate("root node is clobbered and cannot be sanitized in-place");
850
+ try {
851
+ Ml(e);
852
+ } catch (t) {
853
+ throw cl(e), t;
639
854
  }
640
- } else if (e instanceof s) i = il("<!---->"), o = i.ownerDocument.importNode(e, !0), o.nodeType === NODE_TYPE.element && o.nodeName === "BODY" || o.nodeName === "HTML" ? i = o : i.appendChild(o);
855
+ } else if (yl(e)) i = pl("<!---->"), a = i.ownerDocument.importNode(e, !0), a.nodeType === NODE_TYPE.element && a.nodeName === "BODY" || a.nodeName === "HTML" ? i = a : i.appendChild(a), Ml(a);
641
856
  else {
642
- if (!Sc && !_c && !yc && e.indexOf("<") === -1) return R && wc ? R.createHTML(e) : e;
643
- if (i = il(e), !i) return Sc ? null : wc ? B : "";
857
+ if (!xc && !mc && !gc && e.indexOf("<") === -1) return V && Cc ? zs(e) : e;
858
+ if (i = pl(e), !i) return xc ? null : Cc ? Ps : "";
644
859
  }
645
- i && xc && nl(i.firstChild);
646
- let u = al(Oc ? e : i);
647
- for (; c = u.nextNode();) ll(c), fl(c), c.content instanceof a && pl(c.content);
648
- if (Oc) return e;
649
- if (Sc) {
650
- if (Cc) for (l = Js.call(i.ownerDocument); i.firstChild;) l.appendChild(i.firstChild);
651
- else l = i;
652
- return (cc.shadowroot || cc.shadowrootmode) && (l = Xs.call(r, l, !0)), l;
860
+ i && bc && sl(i.firstChild);
861
+ let l = c ? e : i;
862
+ try {
863
+ let e = ml(l);
864
+ for (; o = e.nextNode();) wl(o, l), Al(o), vl(o.content) && jl(o.content);
865
+ } catch (n) {
866
+ throw c && (cl(e), arrayForEach(t.removed, (e) => {
867
+ e.element && dl(e.element);
868
+ })), n;
653
869
  }
654
- let f = yc ? i.outerHTML : i.innerHTML;
655
- return yc && oc["!doctype"] && i.ownerDocument && i.ownerDocument.doctype && i.ownerDocument.doctype.name && regExpTest(DOCTYPE_NAME, i.ownerDocument.doctype.name) && (f = "<!DOCTYPE " + i.ownerDocument.doctype.name + ">\n" + f), _c && arrayForEach([
656
- Zs,
657
- Qs,
658
- $s
659
- ], (e) => {
660
- f = stringReplace(f, e, " ");
661
- }), R && wc ? R.createHTML(f) : f;
870
+ if (c) return arrayForEach(t.removed, (e) => {
871
+ e.element && dl(e.element);
872
+ }), mc && gl(e), e;
873
+ if (xc) {
874
+ if (mc && gl(i), Sc) for (s = Gs.call(i.ownerDocument); i.firstChild;) s.appendChild(i.firstChild);
875
+ else s = i;
876
+ return (ic.shadowroot || ic.shadowrootmode) && (s = qs.call(r, s, !0)), s;
877
+ }
878
+ let u = gc ? i.outerHTML : i.innerHTML;
879
+ return gc && Y["!doctype"] && i.ownerDocument && i.ownerDocument.doctype && i.ownerDocument.doctype.name && regExpTest(DOCTYPE_NAME, i.ownerDocument.doctype.name) && (u = "<!DOCTYPE " + i.ownerDocument.doctype.name + ">\n" + u), mc && (u = hl(u)), V && Cc ? zs(u) : u;
662
880
  }, t.setConfig = function() {
663
- Qc(arguments.length > 0 && arguments[0] !== void 0 ? arguments[0] : {}), bc = !0;
881
+ el(arguments.length > 0 && arguments[0] !== void 0 ? arguments[0] : {}), _c = !0, vc = Y, yc = ic;
664
882
  }, t.clearConfig = function() {
665
- Yc = null, bc = !1;
883
+ Zc = null, _c = !1, vc = null, yc = null, V = Fs, Ps = "";
666
884
  }, t.isValidAttribute = function(e, t, n) {
667
- return Yc || Qc({}), ul(Jc(e), Jc(t), n);
885
+ return Zc || el({}), Tl(Xc(e), Xc(t), n);
668
886
  }, t.addHook = function(e, t) {
669
- typeof t == "function" && arrayPush(H[e], t);
887
+ typeof t == "function" && objectHasOwnProperty(H, e) && arrayPush(H[e], t);
670
888
  }, t.removeHook = function(e, t) {
671
- if (t !== void 0) {
672
- let n = arrayLastIndexOf(H[e], t);
673
- return n === -1 ? void 0 : arraySplice(H[e], n, 1)[0];
889
+ if (objectHasOwnProperty(H, e)) {
890
+ if (t !== void 0) {
891
+ let n = arrayLastIndexOf(H[e], t);
892
+ return n === -1 ? void 0 : arraySplice(H[e], n, 1)[0];
893
+ }
894
+ return arrayPop(H[e]);
674
895
  }
675
- return arrayPop(H[e]);
676
896
  }, t.removeHooks = function(e) {
677
- H[e] = [];
897
+ objectHasOwnProperty(H, e) && (H[e] = []);
678
898
  }, t.removeAllHooks = function() {
679
899
  H = _createHooksMap();
680
900
  }, t;
@@ -21328,11 +21548,11 @@ function Button({ className: e, children: t, ...n }) {
21328
21548
  });
21329
21549
  }
21330
21550
  function Checkbox({ checked: e, defaultChecked: t, icon: n, indeterminate: r, indeterminateIcon: i, onChange: a, disabled: o, children: s, className: c }) {
21331
- let u = useRef(null), [f, p] = useState(t ?? !1), O = e ?? f;
21551
+ let u = useRef(null), [f, p] = useState(t ?? !1), g = e ?? f;
21332
21552
  useEffect(() => {
21333
21553
  u.current && (u.current.indeterminate = !!r);
21334
21554
  }, [r]);
21335
- function A(t) {
21555
+ function O(t) {
21336
21556
  let n = t.target.checked;
21337
21557
  e === void 0 && p(n), a?.(n);
21338
21558
  }
@@ -21344,17 +21564,17 @@ function Checkbox({ checked: e, defaultChecked: t, icon: n, indeterminate: r, in
21344
21564
  type: "checkbox",
21345
21565
  className: cn("p-0 absolute h-px w-px overflow-hidden whitespace-nowrap", "[clip-path:inset(50%)]", "border-0"),
21346
21566
  disabled: o,
21347
- onChange: A,
21567
+ onChange: O,
21348
21568
  ...e === void 0 ? { defaultChecked: t } : { checked: e }
21349
21569
  }),
21350
21570
  /* @__PURE__ */ jsx("span", {
21351
21571
  role: "checkbox",
21352
- "aria-checked": r ? "mixed" : O,
21572
+ "aria-checked": r ? "mixed" : g,
21353
21573
  tabIndex: -1,
21354
- "data-state": r ? "indeterminate" : O ? "checked" : "unchecked",
21574
+ "data-state": r ? "indeterminate" : g ? "checked" : "unchecked",
21355
21575
  className: "checkbox-box inline-flex items-center justify-center",
21356
21576
  children: /* @__PURE__ */ jsx("span", {
21357
- className: cn("checkbox-icon", !(O || r) && "opacity-0"),
21577
+ className: cn("checkbox-icon", !(g || r) && "opacity-0"),
21358
21578
  children: r ? i ?? "—" : n ?? "✓"
21359
21579
  })
21360
21580
  }),
@@ -21372,18 +21592,18 @@ function useDropdown() {
21372
21592
  return e;
21373
21593
  }
21374
21594
  function Dropdown({ trigger: e, children: t, align: n = "start", side: r = "bottom", offsetX: i = 0, offsetY: a = 0, disabled: o = !1, openOnHover: c = !0, open: u, onOpenChange: p }) {
21375
- let O = u !== void 0, [A, R] = useState(!1), B = O ? u : A, V = useCallback((e) => {
21376
- e !== B && (O || R(e), p?.(e));
21595
+ let g = u !== void 0, [O, R] = useState(!1), B = g ? u : O, V = useCallback((e) => {
21596
+ e !== B && (g || R(e), p?.(e));
21377
21597
  }, [
21378
21598
  B,
21379
- O,
21599
+ g,
21380
21600
  p
21381
- ]), qs = useRef(null), Js = useRef(null), Ys = useRef(null), [Xs, H] = useState(null), Zs = useCallback(() => {
21382
- if (!qs.current || !Js.current) return;
21383
- let e = qs.current.getBoundingClientRect(), t = Js.current.getBoundingClientRect(), o = e.left;
21601
+ ]), Ps = useRef(null), Fs = useRef(null), Is = useRef(null), [Ls, Rs] = useState(null), zs = useCallback(() => {
21602
+ if (!Ps.current || !Fs.current) return;
21603
+ let e = Ps.current.getBoundingClientRect(), t = Fs.current.getBoundingClientRect(), o = e.left;
21384
21604
  n === "end" ? o = e.right - t.width : n === "center" && (o = e.left + (e.width - t.width) / 2), o += i;
21385
21605
  let s;
21386
- s = r === "bottom" ? e.bottom + a : e.top - t.height + a, queueMicrotask(() => H({
21606
+ s = r === "bottom" ? e.bottom + a : e.top - t.height + a, queueMicrotask(() => Rs({
21387
21607
  top: s,
21388
21608
  left: o
21389
21609
  }));
@@ -21394,52 +21614,52 @@ function Dropdown({ trigger: e, children: t, align: n = "start", side: r = "bott
21394
21614
  a
21395
21615
  ]);
21396
21616
  useLayoutEffect(() => {
21397
- B && Zs();
21398
- }, [B, Zs]), useEffect(() => {
21617
+ B && zs();
21618
+ }, [B, zs]), useEffect(() => {
21399
21619
  if (!B) return;
21400
- let e = () => Zs();
21620
+ let e = () => zs();
21401
21621
  return window.addEventListener("resize", e), window.addEventListener("scroll", e, !0), () => {
21402
21622
  window.removeEventListener("resize", e), window.removeEventListener("scroll", e, !0);
21403
21623
  };
21404
- }, [B, Zs]);
21405
- let Qs = useCallback(() => {
21406
- Ys.current &&= (clearTimeout(Ys.current), null), V(!0);
21407
- }, [V]), $s = useCallback(() => {
21408
- Ys.current = window.setTimeout(() => {
21624
+ }, [B, zs]);
21625
+ let Bs = useCallback(() => {
21626
+ Is.current &&= (clearTimeout(Is.current), null), V(!0);
21627
+ }, [V]), Vs = useCallback(() => {
21628
+ Is.current = window.setTimeout(() => {
21409
21629
  V(!1);
21410
21630
  }, 120);
21411
21631
  }, [V]);
21412
21632
  return useEffect(() => {
21413
21633
  function e(e) {
21414
21634
  let t = e.target;
21415
- qs.current?.contains(t) || Js.current?.contains(t) || V(!1);
21635
+ Ps.current?.contains(t) || Fs.current?.contains(t) || V(!1);
21416
21636
  }
21417
21637
  return document.addEventListener("mousedown", e), () => document.removeEventListener("mousedown", e);
21418
21638
  }, [V]), useEffect(() => () => {
21419
- Ys.current && clearTimeout(Ys.current);
21639
+ Is.current && clearTimeout(Is.current);
21420
21640
  }, []), /* @__PURE__ */ jsxs(DropdownContext.Provider, {
21421
21641
  value: {
21422
21642
  close: () => V(!1),
21423
- open: Qs
21643
+ open: Bs
21424
21644
  },
21425
21645
  children: [/* @__PURE__ */ jsx("div", {
21426
- ref: qs,
21646
+ ref: Ps,
21427
21647
  className: "inline-flex",
21428
- onMouseEnter: c ? Qs : void 0,
21429
- onMouseLeave: c ? $s : void 0,
21648
+ onMouseEnter: c ? Bs : void 0,
21649
+ onMouseLeave: c ? Vs : void 0,
21430
21650
  onClick: () => V(!B),
21431
21651
  "aria-haspopup": "menu",
21432
21652
  "aria-expanded": B,
21433
21653
  children: e
21434
21654
  }), B && !o && createPortal(/* @__PURE__ */ jsx("div", {
21435
- ref: Js,
21436
- onMouseEnter: c ? Qs : void 0,
21437
- onMouseLeave: c ? $s : void 0,
21655
+ ref: Fs,
21656
+ onMouseEnter: c ? Bs : void 0,
21657
+ onMouseLeave: c ? Vs : void 0,
21438
21658
  style: {
21439
21659
  position: "fixed",
21440
- top: Xs?.top ?? 0,
21441
- left: Xs?.left ?? 0,
21442
- visibility: Xs ? "visible" : "hidden",
21660
+ top: Ls?.top ?? 0,
21661
+ left: Ls?.left ?? 0,
21662
+ visibility: Ls ? "visible" : "hidden",
21443
21663
  zIndex: 1e3
21444
21664
  },
21445
21665
  children: t
@@ -21452,7 +21672,7 @@ function Input({ type: e = "text", value: t, defaultValue: n, disabled: r = !1,
21452
21672
  let t = e.target.value;
21453
21673
  f || u(t), o?.(t);
21454
21674
  }
21455
- function O(e) {
21675
+ function g(e) {
21456
21676
  s?.(e);
21457
21677
  }
21458
21678
  return /* @__PURE__ */ jsx("input", {
@@ -21463,7 +21683,7 @@ function Input({ type: e = "text", value: t, defaultValue: n, disabled: r = !1,
21463
21683
  "aria-disabled": r || void 0,
21464
21684
  "aria-invalid": i || void 0,
21465
21685
  onChange: h,
21466
- onKeyDown: O,
21686
+ onKeyDown: g,
21467
21687
  className: cn("bg-transparent outline-none", r && "pointer-events-none", c)
21468
21688
  });
21469
21689
  }
@@ -21501,7 +21721,7 @@ function getVerticalAlign(e, t, n) {
21501
21721
  return n === "start" ? e.top : n === "end" ? e.bottom - t.height : e.top + e.height / 2 - t.height / 2;
21502
21722
  }
21503
21723
  function Tooltip({ children: e, content: t, position: n = "top", delay: r = 120, className: i }) {
21504
- let a = useRef(null), o = useRef(null), s = useRef(null), [c, u] = useState(!1), [p, O] = useState(null), R = () => {
21724
+ let a = useRef(null), o = useRef(null), s = useRef(null), [c, u] = useState(!1), [p, g] = useState(null), R = () => {
21505
21725
  s.current &&= (clearTimeout(s.current), null), s.current = window.setTimeout(() => {
21506
21726
  u(!0);
21507
21727
  }, r);
@@ -21511,7 +21731,7 @@ function Tooltip({ children: e, content: t, position: n = "top", delay: r = 120,
21511
21731
  return useLayoutEffect(() => {
21512
21732
  if (!c || !a.current || !o.current) return;
21513
21733
  let e = a.current.getBoundingClientRect(), t = o.current.getBoundingClientRect(), [r, i] = n.split("-"), s = i ?? "center", l = 0, u = 0;
21514
- r === "top" || r === "bottom" ? (l = r === "top" ? e.top - t.height - 4 : e.bottom + 4, u = getHorizontalAlign(e, t, s)) : (u = r === "left" ? e.left - t.width - 4 : e.right + 4, l = getVerticalAlign(e, t, s)), O((e) => e && e.top === l && e.left === u ? e : {
21734
+ r === "top" || r === "bottom" ? (l = r === "top" ? e.top - t.height - 4 : e.bottom + 4, u = getHorizontalAlign(e, t, s)) : (u = r === "left" ? e.left - t.width - 4 : e.right + 4, l = getVerticalAlign(e, t, s)), g((e) => e && e.top === l && e.left === u ? e : {
21515
21735
  top: l,
21516
21736
  left: u
21517
21737
  });
@@ -23132,7 +23352,7 @@ function OnboardingEngine({ steps: e, context: t, storageKey: n, isEnabled: r =
23132
23352
  e,
23133
23353
  o,
23134
23354
  t
23135
- ]), O = h?.step ?? null, Gs = h?.index ?? null, Ks = useCallback((e) => {
23355
+ ]), g = h?.step ?? null, Ns = h?.index ?? null, A = useCallback((e) => {
23136
23356
  c((t) => {
23137
23357
  if (t.has(e)) return t;
23138
23358
  let n = new Set(t);
@@ -23150,17 +23370,17 @@ function OnboardingEngine({ steps: e, context: t, storageKey: n, isEnabled: r =
23150
23370
  }, [e]);
23151
23371
  return /* @__PURE__ */ jsx(Fragment$1, { children: i({
23152
23372
  context: t,
23153
- currentStep: O,
23154
- currentStepIndex: Gs,
23373
+ currentStep: g,
23374
+ currentStepIndex: Ns,
23155
23375
  dismissedStepIds: o,
23156
23376
  actions: useMemo(() => ({
23157
23377
  dismissCurrentStep: R,
23158
- dismissStep: Ks,
23378
+ dismissStep: A,
23159
23379
  skipAll: B,
23160
23380
  close: B
23161
23381
  }), [
23162
23382
  R,
23163
- Ks,
23383
+ A,
23164
23384
  B
23165
23385
  ])
23166
23386
  }) });
@@ -23333,7 +23553,7 @@ function useToastTimers(e, t) {
23333
23553
  isPaused: !0
23334
23554
  });
23335
23555
  }), a.current &&= (clearInterval(a.current), null);
23336
- }, []), O = useCallback(() => {
23556
+ }, []), g = useCallback(() => {
23337
23557
  o.current && (o.current = !1, i.current.forEach((t, n) => {
23338
23558
  if (t.isPaused && t.remainingTime > 0) {
23339
23559
  let r = e.find((e) => e.id === n);
@@ -23344,7 +23564,7 @@ function useToastTimers(e, t) {
23344
23564
  e,
23345
23565
  u,
23346
23566
  f
23347
- ]), A = useCallback((e) => {
23567
+ ]), O = useCallback((e) => {
23348
23568
  i.current.delete(e), r((t) => {
23349
23569
  let n = new Map(t);
23350
23570
  return n.delete(e), n;
@@ -23365,8 +23585,8 @@ function useToastTimers(e, t) {
23365
23585
  }, []), {
23366
23586
  remainingTimes: n,
23367
23587
  pauseAll: p,
23368
- resumeAll: O,
23369
- cleanupTimer: A
23588
+ resumeAll: g,
23589
+ cleanupTimer: O
23370
23590
  };
23371
23591
  }
23372
23592
  function Toaster() {
@@ -23400,17 +23620,17 @@ function Toaster() {
23400
23620
  B,
23401
23621
  V
23402
23622
  ]);
23403
- let qs = useCallback((e) => {
23623
+ let Ps = useCallback((e) => {
23404
23624
  r((t) => {
23405
23625
  let n = t.filter((t) => t.id !== e);
23406
23626
  return o.current = n, n;
23407
23627
  }), p(e), toastStore.cleanup(e);
23408
- }, [p]), Js = useCallback((e) => {
23628
+ }, [p]), Fs = useCallback((e) => {
23409
23629
  a.current.set(e, "manual"), toastStore.remove(e);
23410
23630
  }, []);
23411
23631
  if (!R) return null;
23412
- let Ys = groupByPosition(n);
23413
- return createPortal(/* @__PURE__ */ jsx(Fragment$1, { children: Object.entries(Ys).map(([e, t]) => {
23632
+ let Is = groupByPosition(n);
23633
+ return createPortal(/* @__PURE__ */ jsx(Fragment$1, { children: Object.entries(Is).map(([e, t]) => {
23414
23634
  let n = t.filter((e) => e.singleSlot), r = t.filter((e) => !e.singleSlot), i = n.length > 0 ? /* @__PURE__ */ jsx("div", {
23415
23635
  className: cn("isolate inline-grid max-w-[min(100vw,100%)] grid-cols-1 grid-rows-1", SINGLE_SLOT_PLACE[e]),
23416
23636
  children: n.map((e, t) => /* @__PURE__ */ jsx("div", {
@@ -23419,8 +23639,8 @@ function Toaster() {
23419
23639
  children: /* @__PURE__ */ jsx(ToastWrapper, {
23420
23640
  toast: e,
23421
23641
  remainingTime: c.get(e.id) ?? e.duration,
23422
- onExitComplete: qs,
23423
- onClose: Js,
23642
+ onExitComplete: Ps,
23643
+ onClose: Fs,
23424
23644
  onHoverStart: u,
23425
23645
  onHoverEnd: f
23426
23646
  })
@@ -23428,8 +23648,8 @@ function Toaster() {
23428
23648
  }) : null, a = r.map((e) => /* @__PURE__ */ jsx(ToastWrapper, {
23429
23649
  toast: e,
23430
23650
  remainingTime: c.get(e.id) ?? e.duration,
23431
- onExitComplete: qs,
23432
- onClose: Js,
23651
+ onExitComplete: Ps,
23652
+ onClose: Fs,
23433
23653
  onHoverStart: u,
23434
23654
  onHoverEnd: f
23435
23655
  }, e.id));
@@ -23656,10 +23876,10 @@ function BulkActions({ totalItems: e = 0, selectedItems: t = 0, onSelectAll: n,
23656
23876
  let s = e > 0, c = s && t === e, l = s && t > 0 && t < e, u = c ? `All (${e})` : l ? `${t}/${e} selected` : `Select all (${e})`, [f, p] = useState(i ?? "normal"), h = () => {
23657
23877
  n(!c);
23658
23878
  };
23659
- function O(e) {
23879
+ function g(e) {
23660
23880
  p(e), a?.(e);
23661
23881
  }
23662
- let Ks = {
23882
+ let A = {
23663
23883
  fire: [{
23664
23884
  id: "fire",
23665
23885
  tooltip: "Mark as fire",
@@ -23740,7 +23960,7 @@ function BulkActions({ totalItems: e = 0, selectedItems: t = 0, onSelectAll: n,
23740
23960
  }),
23741
23961
  /* @__PURE__ */ jsx("div", {
23742
23962
  className: "flex items-center divide-x divide-neutral-400-variant-1",
23743
- children: t > 0 && /* @__PURE__ */ jsx(Fragment$1, { children: Object.entries(Ks).map(([e, t]) => /* @__PURE__ */ jsx("div", {
23963
+ children: t > 0 && /* @__PURE__ */ jsx(Fragment$1, { children: Object.entries(A).map(([e, t]) => /* @__PURE__ */ jsx("div", {
23744
23964
  className: "gap-2 px-1 flex items-center",
23745
23965
  children: t.map((e) => /* @__PURE__ */ jsx(InfoTooltip, {
23746
23966
  content: e.tooltip,
@@ -23761,7 +23981,7 @@ function BulkActions({ totalItems: e = 0, selectedItems: t = 0, onSelectAll: n,
23761
23981
  content: t,
23762
23982
  children: /* @__PURE__ */ jsx(IconButton, {
23763
23983
  className: cn("h-7 w-7 p-0 text-neutral-900", r && "bg-white-variant-4"),
23764
- onClick: () => O(e),
23984
+ onClick: () => g(e),
23765
23985
  icon: n,
23766
23986
  "aria-pressed": r
23767
23987
  })
@@ -24012,20 +24232,20 @@ function ToggleControlPortal({ isPressed: e, isPortalHovered: t, portalPosition:
24012
24232
  })
24013
24233
  }), document.body);
24014
24234
  }
24015
- function IconCountButton({ icon: e, label: t, count: n, variant: r = "primary", orientation: i = "vertical", status: a = "active", alwaysShowCount: o = !1, showToggleControl: s = !1, pressed: c, defaultPressed: l = !1, onPressedChange: u, classNames: p, ...O }) {
24016
- let A = iconCountButtonStyles({
24235
+ function IconCountButton({ icon: e, label: t, count: n, variant: r = "primary", orientation: i = "vertical", status: a = "active", alwaysShowCount: o = !1, showToggleControl: s = !1, pressed: c, defaultPressed: l = !1, onPressedChange: u, classNames: p, ...g }) {
24236
+ let O = iconCountButtonStyles({
24017
24237
  variant: r,
24018
24238
  orientation: i,
24019
24239
  status: a
24020
- }), Ks = useRef(null), [R, B] = useState(!1), [V, qs] = useState(!1), [Js, Ys] = useState(l), [Xs, H] = useState(null), Zs = c ?? Js, Qs = s && (R || V || Zs), $s = typeof n == "number" && n > 0 && (o || a === "active");
24021
- function ec(e) {
24022
- c === void 0 && Ys(e), u?.(e);
24240
+ }), A = useRef(null), [R, B] = useState(!1), [V, Ps] = useState(!1), [Fs, Is] = useState(l), [Ls, Rs] = useState(null), zs = c ?? Fs, Bs = s && (R || V || zs), Vs = typeof n == "number" && n > 0 && (o || a === "active");
24241
+ function Hs(e) {
24242
+ c === void 0 && Is(e), u?.(e);
24023
24243
  }
24024
24244
  return useLayoutEffect(() => {
24025
- if (!Qs || !Ks.current) return;
24245
+ if (!Bs || !A.current) return;
24026
24246
  function e() {
24027
- let e = Ks.current?.getBoundingClientRect();
24028
- e && H({
24247
+ let e = A.current?.getBoundingClientRect();
24248
+ e && Rs({
24029
24249
  top: e.top - 8,
24030
24250
  left: e.right - 12
24031
24251
  });
@@ -24033,30 +24253,30 @@ function IconCountButton({ icon: e, label: t, count: n, variant: r = "primary",
24033
24253
  return e(), window.addEventListener("resize", e), window.addEventListener("scroll", e, !0), () => {
24034
24254
  window.removeEventListener("resize", e), window.removeEventListener("scroll", e, !0);
24035
24255
  };
24036
- }, [Qs]), /* @__PURE__ */ jsxs(Button, {
24037
- ...O,
24038
- className: cn(A.root(), p?.root),
24256
+ }, [Bs]), /* @__PURE__ */ jsxs(Button, {
24257
+ ...g,
24258
+ className: cn(O.root(), p?.root),
24039
24259
  onMouseEnter: () => B(!0),
24040
24260
  onMouseLeave: () => B(!1),
24041
24261
  children: [/* @__PURE__ */ jsxs("div", {
24042
24262
  className: "relative",
24043
24263
  children: [/* @__PURE__ */ jsx("div", {
24044
- ref: Ks,
24045
- className: cn(A.bubble(), p?.bubble),
24046
- children: renderIcon(e, A.icon())
24047
- }), Qs && Xs && typeof document < "u" && ToggleControlPortal({
24048
- isPressed: Zs,
24264
+ ref: A,
24265
+ className: cn(O.bubble(), p?.bubble),
24266
+ children: renderIcon(e, O.icon())
24267
+ }), Bs && Ls && typeof document < "u" && ToggleControlPortal({
24268
+ isPressed: zs,
24049
24269
  isPortalHovered: V,
24050
- portalPosition: Xs,
24051
- onMouseEnter: () => qs(!0),
24052
- onMouseLeave: () => qs(!1),
24053
- onToggle: () => ec(!Zs)
24270
+ portalPosition: Ls,
24271
+ onMouseEnter: () => Ps(!0),
24272
+ onMouseLeave: () => Ps(!1),
24273
+ onToggle: () => Hs(!zs)
24054
24274
  })]
24055
24275
  }), /* @__PURE__ */ jsxs("div", {
24056
- className: cn(A.label(), p?.label),
24057
- children: [/* @__PURE__ */ jsx("span", { children: t }), $s && /* @__PURE__ */ jsxs("span", {
24276
+ className: cn(O.label(), p?.label),
24277
+ children: [/* @__PURE__ */ jsx("span", { children: t }), Vs && /* @__PURE__ */ jsxs("span", {
24058
24278
  "aria-label": `${n} items`,
24059
- className: cn(A.count(), p?.count),
24279
+ className: cn(O.count(), p?.count),
24060
24280
  children: [
24061
24281
  "(",
24062
24282
  formatCount(n),
@@ -24088,7 +24308,7 @@ function ActionMenu({ trigger: e, children: t, className: n, ...r }) {
24088
24308
  });
24089
24309
  }
24090
24310
  function CalendarPanel({ mode: e, selectedDate: t, selectedRange: n, onDateSelect: r, onRangeSelect: i }) {
24091
- let { close: a } = useDropdown(), o = useMemo(() => /* @__PURE__ */ new Date(), []), [s, c] = useState(null), u = useRef(t), f = useRef(n), [O, A] = useState(() => {
24311
+ let { close: a } = useDropdown(), o = useMemo(() => /* @__PURE__ */ new Date(), []), [s, c] = useState(null), u = useRef(t), f = useRef(n), [g, O] = useState(() => {
24092
24312
  let r = e === "single" ? t ?? o : n.startDate ?? n.endDate ?? o;
24093
24313
  return {
24094
24314
  year: r.getFullYear(),
@@ -24097,13 +24317,13 @@ function CalendarPanel({ mode: e, selectedDate: t, selectedRange: n, onDateSelec
24097
24317
  });
24098
24318
  useEffect(() => {
24099
24319
  (e === "single" && t && (!u.current || t.getTime() !== u.current.getTime()) || e === "range" && (n.startDate?.getTime() !== f.current.startDate?.getTime() || n.endDate?.getTime() !== f.current.endDate?.getTime())) && queueMicrotask(() => {
24100
- if (e === "single" && t) A({
24320
+ if (e === "single" && t) O({
24101
24321
  year: t.getFullYear(),
24102
24322
  month: t.getMonth()
24103
24323
  });
24104
24324
  else if (e === "range") {
24105
24325
  let e = n.startDate ?? n.endDate;
24106
- e && A({
24326
+ e && O({
24107
24327
  year: e.getFullYear(),
24108
24328
  month: e.getMonth()
24109
24329
  });
@@ -24114,10 +24334,10 @@ function CalendarPanel({ mode: e, selectedDate: t, selectedRange: n, onDateSelec
24114
24334
  t,
24115
24335
  n
24116
24336
  ]);
24117
- let Ks = useMemo(() => generateCalendarDays(O.year, O.month), [O.year, O.month]);
24337
+ let A = useMemo(() => generateCalendarDays(g.year, g.month), [g.year, g.month]);
24118
24338
  function R(t) {
24119
24339
  let o = t.getMonth(), s = t.getFullYear();
24120
- if ((o !== O.month || s !== O.year) && A({
24340
+ if ((o !== g.month || s !== g.year) && O({
24121
24341
  year: s,
24122
24342
  month: o
24123
24343
  }), e === "single") r(t), a();
@@ -24133,7 +24353,7 @@ function CalendarPanel({ mode: e, selectedDate: t, selectedRange: n, onDateSelec
24133
24353
  }
24134
24354
  }
24135
24355
  function B() {
24136
- A((e) => e.month === 0 ? {
24356
+ O((e) => e.month === 0 ? {
24137
24357
  year: e.year - 1,
24138
24358
  month: 11
24139
24359
  } : {
@@ -24142,7 +24362,7 @@ function CalendarPanel({ mode: e, selectedDate: t, selectedRange: n, onDateSelec
24142
24362
  });
24143
24363
  }
24144
24364
  function V() {
24145
- A((e) => e.month === 11 ? {
24365
+ O((e) => e.month === 11 ? {
24146
24366
  year: e.year + 1,
24147
24367
  month: 0
24148
24368
  } : {
@@ -24150,7 +24370,7 @@ function CalendarPanel({ mode: e, selectedDate: t, selectedRange: n, onDateSelec
24150
24370
  month: e.month + 1
24151
24371
  });
24152
24372
  }
24153
- let qs = getWeekdays();
24373
+ let Ps = getWeekdays();
24154
24374
  return /* @__PURE__ */ jsxs("div", {
24155
24375
  className: "mt-1 rounded-lg p-2 shadow-lg w-fit border border-neutral-400 bg-white",
24156
24376
  children: [
@@ -24169,9 +24389,9 @@ function CalendarPanel({ mode: e, selectedDate: t, selectedRange: n, onDateSelec
24169
24389
  /* @__PURE__ */ jsxs("div", {
24170
24390
  className: "font-bold text-[10px] text-neutral-900",
24171
24391
  children: [
24172
- getMonthName(O.month),
24392
+ getMonthName(g.month),
24173
24393
  " ",
24174
- O.year
24394
+ g.year
24175
24395
  ]
24176
24396
  }),
24177
24397
  /* @__PURE__ */ jsx(IconButton, {
@@ -24187,17 +24407,17 @@ function CalendarPanel({ mode: e, selectedDate: t, selectedRange: n, onDateSelec
24187
24407
  }),
24188
24408
  /* @__PURE__ */ jsx("div", {
24189
24409
  className: "mb-2 grid grid-cols-7",
24190
- children: qs.map((e) => /* @__PURE__ */ jsx("div", {
24410
+ children: Ps.map((e) => /* @__PURE__ */ jsx("div", {
24191
24411
  className: "p-0.5 font-bold flex items-center justify-center text-[9px] text-neutral-900",
24192
24412
  children: e
24193
24413
  }, e))
24194
24414
  }),
24195
24415
  /* @__PURE__ */ jsx("div", {
24196
24416
  className: "grid grid-cols-7",
24197
- children: Ks.map(({ day: r, date: i, isCurrentMonth: a }) => {
24198
- let o = isToday(i), l = e === "single" && t && isSameDay(i, t), { startDate: u, endDate: f } = n, p = u && isSameDay(i, u), h = f && isSameDay(i, f), g = u, O = s;
24199
- e === "range" && u && !f && s && !isDateBefore(s, u) ? (g = u, O = s) : (g = null, O = null);
24200
- let A = e === "range" && (isDateInRange(i, u, f) || isDateInRange(i, g, O)), Gs = l || p || h;
24417
+ children: A.map(({ day: r, date: i, isCurrentMonth: a }) => {
24418
+ let o = isToday(i), l = e === "single" && t && isSameDay(i, t), { startDate: u, endDate: f } = n, p = u && isSameDay(i, u), h = f && isSameDay(i, f), js = u, g = s;
24419
+ e === "range" && u && !f && s && !isDateBefore(s, u) ? (js = u, g = s) : (js = null, g = null);
24420
+ let O = e === "range" && (isDateInRange(i, u, f) || isDateInRange(i, js, g)), Ns = l || p || h;
24201
24421
  return /* @__PURE__ */ jsx(Button, {
24202
24422
  type: "button",
24203
24423
  onClick: () => R(i),
@@ -24209,9 +24429,9 @@ function CalendarPanel({ mode: e, selectedDate: t, selectedRange: n, onDateSelec
24209
24429
  },
24210
24430
  className: "p-0.5",
24211
24431
  "aria-label": `Select ${formatDate(i)}`,
24212
- "aria-selected": Gs || void 0,
24432
+ "aria-selected": Ns || void 0,
24213
24433
  children: /* @__PURE__ */ jsx("div", {
24214
- className: cn("rounded flex h-[26px] w-[26px] items-center justify-center text-[9px] transition-colors", Gs && "font-semibold bg-primary-500 text-white-variant-1 hover:bg-primary-500", A && !Gs && "font-normal bg-primary-500/20 text-neutral-900 hover:bg-primary-500/30", o && !Gs && !A && "font-bold border border-primary-500 bg-primary-500/15 hover:bg-primary-500 hover:text-white", !Gs && !A && (a ? "text-neutral-900 hover:bg-neutral-300" : "text-neutral-600 hover:bg-neutral-200")),
24434
+ className: cn("rounded flex h-[26px] w-[26px] items-center justify-center text-[9px] transition-colors", Ns && "font-semibold bg-primary-500 text-white-variant-1 hover:bg-primary-500", O && !Ns && "font-normal bg-primary-500/20 text-neutral-900 hover:bg-primary-500/30", o && !Ns && !O && "font-bold border border-primary-500 bg-primary-500/15 hover:bg-primary-500 hover:text-white", !Ns && !O && (a ? "text-neutral-900 hover:bg-neutral-300" : "text-neutral-600 hover:bg-neutral-200")),
24215
24435
  children: r
24216
24436
  })
24217
24437
  }, `${i.getFullYear()}-${i.getMonth()}-${r}`);
@@ -24276,11 +24496,11 @@ function DatePicker({ mode: e = "single", value: t, defaultValue: n, onChange: r
24276
24496
  function h(t) {
24277
24497
  e === "single" && (u || s(t), r?.(t));
24278
24498
  }
24279
- function O(t) {
24499
+ function g(t) {
24280
24500
  e === "range" && (u || l(t), r?.(t));
24281
24501
  }
24282
- function Gs() {
24283
- e === "single" ? h(null) : O({
24502
+ function Ns() {
24503
+ e === "single" ? h(null) : g({
24284
24504
  startDate: null,
24285
24505
  endDate: null
24286
24506
  });
@@ -24290,7 +24510,7 @@ function DatePicker({ mode: e = "single", value: t, defaultValue: n, onChange: r
24290
24510
  displayText: e === "single" ? formatDate(f) : formatDateRange(p.startDate, p.endDate),
24291
24511
  disabled: i,
24292
24512
  className: a,
24293
- onClear: Gs
24513
+ onClear: Ns
24294
24514
  }),
24295
24515
  disabled: i,
24296
24516
  children: /* @__PURE__ */ jsx(CalendarPanel, {
@@ -24298,7 +24518,7 @@ function DatePicker({ mode: e = "single", value: t, defaultValue: n, onChange: r
24298
24518
  selectedDate: f,
24299
24519
  selectedRange: p,
24300
24520
  onDateSelect: h,
24301
- onRangeSelect: O
24521
+ onRangeSelect: g
24302
24522
  })
24303
24523
  }) });
24304
24524
  }
@@ -24504,18 +24724,18 @@ function EventActionsList({ actions: e, className: t }) {
24504
24724
  }) })
24505
24725
  });
24506
24726
  }
24507
- function EventCard({ icon: e, service: t, sender: n, title: r, content: i, timestamp: a, timestampTooltip: o, workspace: s, read: c = !1, selected: l = !1, onSelect: u, checked: f = !1, onCheckedChange: p, statusBadges: h = {}, actions: g = {}, density: O = "normal", className: A, style: Ks, isPriority: R, isDone: B }) {
24727
+ function EventCard({ icon: e, service: t, sender: n, title: r, content: i, timestamp: a, timestampTooltip: o, workspace: s, read: c = !1, selected: l = !1, onSelect: u, checked: f = !1, onCheckedChange: p, statusBadges: h = {}, actions: js = {}, density: g = "normal", className: O, style: A, isPriority: R, isDone: B }) {
24508
24728
  return /* @__PURE__ */ jsx(Card, {
24509
24729
  as: Pressable,
24510
24730
  onPress: u,
24511
24731
  className: cn(eventCardStyles({
24512
24732
  tone: R ? "priority" : B ? "done" : "default",
24513
24733
  state: l ? "selected" : c ? "read" : "unread",
24514
- density: O
24515
- }), A),
24516
- style: Ks,
24734
+ density: g
24735
+ }), O),
24736
+ style: A,
24517
24737
  "data-service": t,
24518
- children: O === "normal" ? /* @__PURE__ */ jsxs(CardLayout, {
24738
+ children: g === "normal" ? /* @__PURE__ */ jsxs(CardLayout, {
24519
24739
  className: "gap-x-2 gap-y-1",
24520
24740
  children: [
24521
24741
  /* @__PURE__ */ jsx(CardSidebar, { children: /* @__PURE__ */ jsx(EventCheckbox, {
@@ -24551,7 +24771,7 @@ function EventCard({ icon: e, service: t, sender: n, title: r, content: i, times
24551
24771
  /* @__PURE__ */ jsxs(CardFooter, {
24552
24772
  className: "mt-3 gap-1 grid grid-cols-[minmax(0,1fr)_auto] items-center",
24553
24773
  children: [/* @__PURE__ */ jsx(EventStatusesList, { statusBadges: h }), /* @__PURE__ */ jsx(EventActionsList, {
24554
- actions: g,
24774
+ actions: js,
24555
24775
  className: "col-start-2 justify-self-end"
24556
24776
  })]
24557
24777
  })
@@ -24570,7 +24790,7 @@ function EventCard({ icon: e, service: t, sender: n, title: r, content: i, times
24570
24790
  e,
24571
24791
  /* @__PURE__ */ jsx(EventStatusesList, {
24572
24792
  statusBadges: h,
24573
- density: O
24793
+ density: g
24574
24794
  }),
24575
24795
  /* @__PURE__ */ jsxs("div", {
24576
24796
  className: cn("min-w-0 gap-2 text-sm font-bold flex items-center whitespace-nowrap text-neutral-900", c && "font-medium"),
@@ -24590,7 +24810,7 @@ function EventCard({ icon: e, service: t, sender: n, title: r, content: i, times
24590
24810
  ]
24591
24811
  }),
24592
24812
  /* @__PURE__ */ jsx("div", { className: "flex-1" }),
24593
- /* @__PURE__ */ jsx(EventActionsList, { actions: g }),
24813
+ /* @__PURE__ */ jsx(EventActionsList, { actions: js }),
24594
24814
  /* @__PURE__ */ jsx(InfoTooltip, {
24595
24815
  content: o,
24596
24816
  children: /* @__PURE__ */ jsx("span", {
@@ -24835,11 +25055,11 @@ function EventSummaryFireButton({ active: e, onClick: t }) {
24835
25055
  }) });
24836
25056
  }
24837
25057
  function EventSummaryCard({ icon: e, service: t, sender: n, title: r, content: i, timestamp: a, workspace: o, selected: s = !1, onSelect: c, actions: l, className: u }) {
24838
- let { fire: f, insight: p, link: h } = l, g = p?.label ?? null;
25058
+ let { fire: f, insight: p, link: h } = l, js = p?.label ?? null;
24839
25059
  return /* @__PURE__ */ jsxs(Pressable, {
24840
25060
  onPress: c,
24841
25061
  className: cn(eventSummaryCardStyles({
24842
- tone: f.active ? "priority" : insightLabelVisible(g) ? "insight" : "default",
25062
+ tone: f.active ? "priority" : insightLabelVisible(js) ? "insight" : "default",
24843
25063
  state: s ? "selected" : "normal"
24844
25064
  }), EVENT_SUMMARY_CARD_HEIGHT_SIZE.style, u),
24845
25065
  "data-service": t,
@@ -24863,7 +25083,7 @@ function EventSummaryCard({ icon: e, service: t, sender: n, title: r, content: i
24863
25083
  className: "text-xs leading-tight font-semibold tracking-wide flex-1 text-right whitespace-nowrap text-neutral-800",
24864
25084
  children: a
24865
25085
  }),
24866
- insightLabelVisible(g) && /* @__PURE__ */ jsx(EventSummaryInsightChip, { label: g }),
25086
+ insightLabelVisible(js) && /* @__PURE__ */ jsx(EventSummaryInsightChip, { label: js }),
24867
25087
  f.onClick && /* @__PURE__ */ jsx(EventSummaryFireButton, {
24868
25088
  active: f.active,
24869
25089
  onClick: f.onClick
@@ -25135,16 +25355,16 @@ function EventDetailContentMessage({ detail: { groups: e, summary: t, priorityTe
25135
25355
  }, []), f = u.length, p = new Map(c.map((e) => {
25136
25356
  let t = e.insightBadgeId ?? e.id, n = u.indexOf(t);
25137
25357
  return [e.id, f - n];
25138
- })), g = /* @__PURE__ */ new Set(), O = new Set(c.reduce((e, t) => {
25358
+ })), js = /* @__PURE__ */ new Set(), g = new Set(c.reduce((e, t) => {
25139
25359
  let n = t.insightBadgeId ?? t.id;
25140
- return g.has(n) || (g.add(n), e.push(t.id)), e;
25141
- }, [])), A = useRef(null), Ks = useRef(null), R = useRef(!1);
25360
+ return js.has(n) || (js.add(n), e.push(t.id)), e;
25361
+ }, [])), O = useRef(null), A = useRef(null), R = useRef(!1);
25142
25362
  useEffect(() => {
25143
25363
  if (e.length === 0 || R.current) return;
25144
25364
  R.current = !0;
25145
25365
  let t = [...e].reverse().find((e) => e.isPriority), n = [...e].reverse().find((e) => !e.isPriority && e.isInsight), r = t ?? n;
25146
- if (r && A.current) {
25147
- let e = A.current.querySelector(`[data-group-id="${r.id}"]`);
25366
+ if (r && O.current) {
25367
+ let e = O.current.querySelector(`[data-group-id="${r.id}"]`);
25148
25368
  if (e) {
25149
25369
  e.scrollIntoView({
25150
25370
  behavior: "smooth",
@@ -25153,11 +25373,11 @@ function EventDetailContentMessage({ detail: { groups: e, summary: t, priorityTe
25153
25373
  return;
25154
25374
  }
25155
25375
  }
25156
- Ks.current?.scrollIntoView({ behavior: "smooth" });
25376
+ A.current?.scrollIntoView({ behavior: "smooth" });
25157
25377
  }, [e]);
25158
25378
  let B = o, V = useCallback((t, n) => {
25159
- if (!A.current) return;
25160
- let r = Array.from(A.current.querySelectorAll("[data-group-id][class*=\"scroll-mt\"]")), i = n === "fire" ? o : f, a = r.filter((t) => {
25379
+ if (!O.current) return;
25380
+ let r = Array.from(O.current.querySelectorAll("[data-group-id][class*=\"scroll-mt\"]")), i = n === "fire" ? o : f, a = r.filter((t) => {
25161
25381
  let r = t.getAttribute("data-group-id");
25162
25382
  if (!r) return !1;
25163
25383
  let i = e.find((e) => e.id === r);
@@ -25179,7 +25399,7 @@ function EventDetailContentMessage({ detail: { groups: e, summary: t, priorityTe
25179
25399
  followUpSubtitle: i,
25180
25400
  className: a,
25181
25401
  children: /* @__PURE__ */ jsxs("div", {
25182
- ref: A,
25402
+ ref: O,
25183
25403
  className: "gap-4 flex flex-col",
25184
25404
  children: [e.map((e) => {
25185
25405
  let t = e.isPriority ? "fire" : e.isInsight ? "insight" : null, n = e.isPriority ? B-- : e.isInsight ? p.get(e.id) ?? 0 : 0, r = e.isPriority ? o : e.isInsight ? f : 0, i = n && t ? () => {
@@ -25188,7 +25408,7 @@ function EventDetailContentMessage({ detail: { groups: e, summary: t, priorityTe
25188
25408
  } : void 0, a = n && t ? () => {
25189
25409
  let e = n - 1;
25190
25410
  e >= 1 && V(e, t);
25191
- } : void 0, s = e.isInsight && !e.isPriority && !O.has(e.id);
25411
+ } : void 0, s = e.isInsight && !e.isPriority && !g.has(e.id);
25192
25412
  return /* @__PURE__ */ jsx(MessageGroup, {
25193
25413
  group: {
25194
25414
  ...e,
@@ -25201,7 +25421,7 @@ function EventDetailContentMessage({ detail: { groups: e, summary: t, priorityTe
25201
25421
  onNextPriority: a
25202
25422
  }, e.id);
25203
25423
  }), /* @__PURE__ */ jsx("div", {
25204
- ref: Ks,
25424
+ ref: A,
25205
25425
  "aria-hidden": "true"
25206
25426
  })]
25207
25427
  })
@@ -25259,13 +25479,13 @@ function EventDetailContentTicketDetails({ issue: e, notification: t, project: n
25259
25479
  ]
25260
25480
  })] });
25261
25481
  }
25262
- function EventDetailContentTicket({ detail: { summary: e, body: t, priorityText: n, followUpTitle: r, followUpSubtitle: i, issue: a, notification: o, project: s, task: c, dueDate: l, startDate: u, assignees: f, reporter: p, team: h, location: g, related: O }, className: A }) {
25482
+ function EventDetailContentTicket({ detail: { summary: e, body: t, priorityText: n, followUpTitle: r, followUpSubtitle: i, issue: a, notification: o, project: s, task: c, dueDate: l, startDate: u, assignees: f, reporter: p, team: h, location: js, related: g }, className: O }) {
25263
25483
  return /* @__PURE__ */ jsxs(EventDetailContentHeader, {
25264
25484
  summary: e,
25265
25485
  priorityText: n,
25266
25486
  followUpTitle: r,
25267
25487
  followUpSubtitle: i,
25268
- className: A,
25488
+ className: O,
25269
25489
  children: [
25270
25490
  /* @__PURE__ */ jsx(EventDetailContentTicketDetails, {
25271
25491
  issue: a,
@@ -25277,8 +25497,8 @@ function EventDetailContentTicket({ detail: { summary: e, body: t, priorityText:
25277
25497
  assignees: f,
25278
25498
  reporter: p,
25279
25499
  team: h,
25280
- location: g,
25281
- related: O
25500
+ location: js,
25501
+ related: g
25282
25502
  }),
25283
25503
  /* @__PURE__ */ jsx("h2", {
25284
25504
  className: "px-4 text-sm font-bold text-neutral-900",
@@ -26073,16 +26293,16 @@ function OnboardingCard({ stepLabel: e, title: t, description: n, titleAccessory
26073
26293
  children: [i, a]
26074
26294
  })
26075
26295
  ]
26076
- }), g = wrapArrow(/* @__PURE__ */ jsx(OnboardingCardArrow, {
26296
+ }), js = wrapArrow(/* @__PURE__ */ jsx(OnboardingCardArrow, {
26077
26297
  layout: o,
26078
26298
  placement: s
26079
- }), c, l), O = s === "before" ? /* @__PURE__ */ jsxs(Fragment$1, { children: [g, h] }) : /* @__PURE__ */ jsxs(Fragment$1, { children: [h, g] });
26299
+ }), c, l), g = s === "before" ? /* @__PURE__ */ jsxs(Fragment$1, { children: [js, h] }) : /* @__PURE__ */ jsxs(Fragment$1, { children: [h, js] });
26080
26300
  return o === "horizontal" ? /* @__PURE__ */ jsx("div", {
26081
26301
  className: cn("flex items-center", u),
26082
- children: O
26302
+ children: g
26083
26303
  }) : /* @__PURE__ */ jsx("div", {
26084
26304
  className: cn("flex flex-col items-center", u),
26085
- children: O
26305
+ children: g
26086
26306
  });
26087
26307
  }
26088
26308
  var subscribeNoop = () => () => {}, getClientSnapshot = () => !0, getServerSnapshot = () => !1, PRIMARY_BTN = "rounded-lg bg-white px-4 py-1.5 text-xs font-semibold text-primary-500 transition-opacity hover:opacity-90", GHOST_BTN = "text-xs font-semibold text-white/70 transition-colors hover:text-white";
@@ -26130,7 +26350,7 @@ function OnboardingPortal({ currentStep: e, currentStepIndex: t, actions: n, ste
26130
26350
  let p = e.layout === "vertical" && o.mode === "vertical" ? {
26131
26351
  marginLeft: o.arrowMarginLeft,
26132
26352
  ...e.arrowWrapperStyle
26133
- } : e.arrowWrapperStyle, A = /* @__PURE__ */ jsx(OnboardingCard, {
26353
+ } : e.arrowWrapperStyle, O = /* @__PURE__ */ jsx(OnboardingCard, {
26134
26354
  stepLabel: e.stepLabel ?? (t == null ? void 0 : `${t + 1} / ${r.length}`),
26135
26355
  title: e.title,
26136
26356
  description: e.description,
@@ -26169,7 +26389,7 @@ function OnboardingPortal({ currentStep: e, currentStepIndex: t, actions: n, ste
26169
26389
  left: o.left
26170
26390
  }
26171
26391
  },
26172
- children: A
26392
+ children: O
26173
26393
  }), document.body);
26174
26394
  }
26175
26395
  function Onboarding({ steps: e, context: t, storageKey: n, onFinish: r, isEnabled: i = !0 }) {
@@ -26321,7 +26541,7 @@ function SearchInput({ value: e, defaultValue: t, placeholder: n = "Search...",
26321
26541
  function h(e) {
26322
26542
  u || l(e), r?.(e);
26323
26543
  }
26324
- function O() {
26544
+ function g() {
26325
26545
  u || l(""), r?.(""), a?.();
26326
26546
  }
26327
26547
  return /* @__PURE__ */ jsxs("fieldset", {
@@ -26347,7 +26567,7 @@ function SearchInput({ value: e, defaultValue: t, placeholder: n = "Search...",
26347
26567
  size: 16,
26348
26568
  className: "text-neutral-700"
26349
26569
  }),
26350
- onClick: O,
26570
+ onClick: g,
26351
26571
  "aria-label": "Clear search",
26352
26572
  className: "rounded p-0 transition-opacity hover:opacity-70"
26353
26573
  })
@@ -26584,7 +26804,7 @@ function SourceIcons({ sourceTypes: e }) {
26584
26804
  });
26585
26805
  }
26586
26806
  function SignalCard({ title: e, clientName: t, requesterName: n, explanation: r, severity: i, status: a, slaLabel: o, slaStatusLabel: s, sourceTypes: c, patternContext: l, variant: u = "home", selected: f = !1, onClick: p, className: h }) {
26587
- let g = SEVERITY_CONFIG$1[i];
26807
+ let js = SEVERITY_CONFIG$1[i];
26588
26808
  return /* @__PURE__ */ jsxs(Pressable, {
26589
26809
  onPress: p,
26590
26810
  className: cn(signalCardStyles({
@@ -26599,11 +26819,11 @@ function SignalCard({ title: e, clientName: t, requesterName: n, explanation: r,
26599
26819
  children: [/* @__PURE__ */ jsx(InfoTooltip, {
26600
26820
  content: s,
26601
26821
  children: /* @__PURE__ */ jsx("span", {
26602
- className: cn("shrink-0", g.text),
26603
- children: /* @__PURE__ */ jsx(g.icon, { size: 16 })
26822
+ className: cn("shrink-0", js.text),
26823
+ children: /* @__PURE__ */ jsx(js.icon, { size: 16 })
26604
26824
  })
26605
26825
  }), /* @__PURE__ */ jsx("span", {
26606
- className: cn("text-[12px] font-semibold", g.text),
26826
+ className: cn("text-[12px] font-semibold", js.text),
26607
26827
  children: o
26608
26828
  })]
26609
26829
  }),
@@ -26884,8 +27104,8 @@ function GuardrailTooltip({ text: e }) {
26884
27104
  })
26885
27105
  });
26886
27106
  }
26887
- function SignalDetailPanel({ title: e, severity: t, slaDurationLabel: n, statusLabel: r, statusTone: i, sourceType: a, sourceLink: o, clientCompany: s, contactName: c, teamCompanyName: l, recipientLabel: u, sla: f, claim: p, sameThreadGuardrail: h, evidenceItems: O, nextStep: A, actionRationale: Ks, rankingRationale: R, dismissOptions: B, onClose: V, onResolve: qs, onDismiss: Js, className: Ys, ...Xs }) {
26888
- let H = SEVERITY_CONFIG[t], [Zs, Qs] = useState(!1), [$s, ec] = useState(null), [tc, nc] = useState(!1), rc = () => {
27107
+ function SignalDetailPanel({ title: e, severity: t, slaDurationLabel: n, statusLabel: r, statusTone: i, sourceType: a, sourceLink: o, clientCompany: s, contactName: c, teamCompanyName: l, recipientLabel: u, sla: f, claim: p, sameThreadGuardrail: h, evidenceItems: g, nextStep: O, actionRationale: A, rankingRationale: R, dismissOptions: B, onClose: V, onResolve: Ps, onDismiss: Fs, className: Is, ...Ls }) {
27108
+ let Rs = SEVERITY_CONFIG[t], [zs, Bs] = useState(!1), [Vs, Hs] = useState(null), [Us, Ws] = useState(!1), Gs = () => {
26889
27109
  let t = [
26890
27110
  e,
26891
27111
  "",
@@ -26893,13 +27113,13 @@ function SignalDetailPanel({ title: e, severity: t, slaDurationLabel: n, statusL
26893
27113
  "",
26894
27114
  h
26895
27115
  ];
26896
- navigator.clipboard.writeText(t.join("\n")).catch(() => {}), nc(!0), setTimeout(() => nc(!1), 2e3);
26897
- }, ic = () => {
26898
- Js?.($s ?? void 0), Qs(!1), ec(null);
27116
+ navigator.clipboard.writeText(t.join("\n")).catch(() => {}), Ws(!0), setTimeout(() => Ws(!1), 2e3);
27117
+ }, Ks = () => {
27118
+ Fs?.(Vs ?? void 0), Bs(!1), Hs(null);
26899
27119
  };
26900
27120
  return /* @__PURE__ */ jsxs("div", {
26901
- className: cn("flex h-full flex-col overflow-y-auto bg-white-variant-8", STATUS_BADGE_STYLES[i].accentBar, Ys),
26902
- ...Xs,
27121
+ className: cn("flex h-full flex-col overflow-y-auto bg-white-variant-8", STATUS_BADGE_STYLES[i].accentBar, Is),
27122
+ ...Ls,
26903
27123
  children: [/* @__PURE__ */ jsxs("div", {
26904
27124
  className: "sticky top-0 z-20 shrink-0 border-b border-neutral-200-variant-1 bg-white-variant-8 px-4 pt-5 pb-4",
26905
27125
  children: [/* @__PURE__ */ jsxs("div", {
@@ -26912,10 +27132,10 @@ function SignalDetailPanel({ title: e, severity: t, slaDurationLabel: n, statusL
26912
27132
  children: e
26913
27133
  }),
26914
27134
  /* @__PURE__ */ jsxs("span", {
26915
- className: cn("inline-flex shrink-0 items-center gap-1 text-[12px] font-semibold", H.text),
27135
+ className: cn("inline-flex shrink-0 items-center gap-1 text-[12px] font-semibold", Rs.text),
26916
27136
  children: [
26917
- H.icon && /* @__PURE__ */ jsx(H.icon, { size: 16 }),
26918
- H.label,
27137
+ Rs.icon && /* @__PURE__ */ jsx(Rs.icon, { size: 16 }),
27138
+ Rs.label,
26919
27139
  n && ` · ${n}`
26920
27140
  ]
26921
27141
  }),
@@ -27015,7 +27235,7 @@ function SignalDetailPanel({ title: e, severity: t, slaDurationLabel: n, statusL
27015
27235
  /* @__PURE__ */ jsx(SectionCard, {
27016
27236
  title: "Evidence analysis",
27017
27237
  children: /* @__PURE__ */ jsx(EvidenceTimeline, {
27018
- items: O,
27238
+ items: g,
27019
27239
  canExpandThread: !0,
27020
27240
  tone: i,
27021
27241
  threadTitle: e,
@@ -27025,14 +27245,14 @@ function SignalDetailPanel({ title: e, severity: t, slaDurationLabel: n, statusL
27025
27245
  recipientLabel: u
27026
27246
  })
27027
27247
  }),
27028
- A && /* @__PURE__ */ jsxs(SectionCard, {
27248
+ O && /* @__PURE__ */ jsxs(SectionCard, {
27029
27249
  title: "Next step",
27030
27250
  children: [/* @__PURE__ */ jsx("p", {
27031
27251
  className: "text-sm font-semibold text-neutral-900",
27032
- children: A
27033
- }), Ks && /* @__PURE__ */ jsx("p", {
27252
+ children: O
27253
+ }), A && /* @__PURE__ */ jsx("p", {
27034
27254
  className: "mt-1 text-sm text-neutral-700",
27035
- children: Ks
27255
+ children: A
27036
27256
  })]
27037
27257
  }),
27038
27258
  R && /* @__PURE__ */ jsxs("div", {
@@ -27047,7 +27267,7 @@ function SignalDetailPanel({ title: e, severity: t, slaDurationLabel: n, statusL
27047
27267
  }),
27048
27268
  /* @__PURE__ */ jsx(SectionCard, {
27049
27269
  title: "What do you want to do?",
27050
- children: Zs ? /* @__PURE__ */ jsxs("div", {
27270
+ children: zs ? /* @__PURE__ */ jsxs("div", {
27051
27271
  className: "flex flex-col gap-2",
27052
27272
  children: [
27053
27273
  /* @__PURE__ */ jsx("p", {
@@ -27058,8 +27278,8 @@ function SignalDetailPanel({ title: e, severity: t, slaDurationLabel: n, statusL
27058
27278
  className: "flex flex-wrap gap-1.5",
27059
27279
  children: B.map((e) => /* @__PURE__ */ jsx("button", {
27060
27280
  type: "button",
27061
- onClick: () => ec((t) => t === e.id ? null : e.id),
27062
- className: $s === e.id ? "rounded-full bg-neutral-800 px-2.5 py-1 text-[11px] font-medium text-white" : "rounded-full border border-neutral-300 bg-white px-2.5 py-1 text-[11px] font-medium text-neutral-700 hover:border-neutral-500",
27281
+ onClick: () => Hs((t) => t === e.id ? null : e.id),
27282
+ className: Vs === e.id ? "rounded-full bg-neutral-800 px-2.5 py-1 text-[11px] font-medium text-white" : "rounded-full border border-neutral-300 bg-white px-2.5 py-1 text-[11px] font-medium text-neutral-700 hover:border-neutral-500",
27063
27283
  children: e.label
27064
27284
  }, e.id))
27065
27285
  }),
@@ -27068,21 +27288,21 @@ function SignalDetailPanel({ title: e, severity: t, slaDurationLabel: n, statusL
27068
27288
  children: [
27069
27289
  /* @__PURE__ */ jsx("button", {
27070
27290
  type: "button",
27071
- onClick: ic,
27291
+ onClick: Ks,
27072
27292
  className: "rounded-lg bg-neutral-800 px-3 py-1.5 text-xs font-semibold text-white",
27073
27293
  children: "Confirm"
27074
27294
  }),
27075
27295
  /* @__PURE__ */ jsx("button", {
27076
27296
  type: "button",
27077
27297
  onClick: () => {
27078
- Qs(!1), ec(null);
27298
+ Bs(!1), Hs(null);
27079
27299
  },
27080
27300
  className: "text-xs font-medium text-neutral-700-variant-1 hover:underline",
27081
27301
  children: "Cancel"
27082
27302
  }),
27083
27303
  /* @__PURE__ */ jsx("button", {
27084
27304
  type: "button",
27085
- onClick: qs,
27305
+ onClick: Ps,
27086
27306
  className: "ml-auto text-xs font-medium text-primary-500 hover:underline",
27087
27307
  children: "Mark handled instead"
27088
27308
  })
@@ -27101,21 +27321,21 @@ function SignalDetailPanel({ title: e, severity: t, slaDurationLabel: n, statusL
27101
27321
  }),
27102
27322
  /* @__PURE__ */ jsxs("button", {
27103
27323
  type: "button",
27104
- onClick: qs,
27324
+ onClick: Ps,
27105
27325
  className: "inline-flex items-center gap-1.5 rounded-lg border border-green-400 bg-green-50 px-3 py-1.5 text-xs font-semibold text-green-800 transition-colors hover:bg-green-100",
27106
27326
  children: [/* @__PURE__ */ jsx(CheckActionIcon, {}), "Mark handled"]
27107
27327
  }),
27108
27328
  /* @__PURE__ */ jsxs("button", {
27109
27329
  type: "button",
27110
- onClick: () => Qs(!0),
27330
+ onClick: () => Bs(!0),
27111
27331
  className: "inline-flex items-center gap-1.5 rounded-lg border border-neutral-300 bg-neutral-100 px-3 py-1.5 text-xs font-semibold text-neutral-700 transition-colors hover:bg-neutral-200",
27112
27332
  children: [/* @__PURE__ */ jsx(DismissActionIcon, {}), "Mark not useful"]
27113
27333
  }),
27114
27334
  /* @__PURE__ */ jsxs("button", {
27115
27335
  type: "button",
27116
- onClick: rc,
27117
- className: tc ? "inline-flex items-center gap-1.5 rounded-lg border border-green-400 bg-green-50 px-3 py-1.5 text-xs font-semibold text-green-800 transition-colors" : "inline-flex items-center gap-1.5 rounded-lg border border-neutral-300 bg-neutral-100 px-3 py-1.5 text-xs font-semibold text-neutral-700 transition-colors hover:bg-neutral-200",
27118
- children: [jsx(tc ? CheckActionIcon : CopyActionIcon, {}), tc ? "Copied" : "Copy evidence"]
27336
+ onClick: Gs,
27337
+ className: Us ? "inline-flex items-center gap-1.5 rounded-lg border border-green-400 bg-green-50 px-3 py-1.5 text-xs font-semibold text-green-800 transition-colors" : "inline-flex items-center gap-1.5 rounded-lg border border-neutral-300 bg-neutral-100 px-3 py-1.5 text-xs font-semibold text-neutral-700 transition-colors hover:bg-neutral-200",
27338
+ children: [jsx(Us ? CheckActionIcon : CopyActionIcon, {}), Us ? "Copied" : "Copy evidence"]
27119
27339
  })
27120
27340
  ]
27121
27341
  })