@visma-swno/gaia-chat-ui 2.1.0 → 2.1.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.
@@ -6,7 +6,7 @@ import { unsafeHTML as nn } from "lit/directives/unsafe-html.js";
6
6
  import { repeat as on } from "lit/directives/repeat.js";
7
7
  import { map as an } from "lit/directives/map.js";
8
8
  import { createRef as fo, ref as mo } from "lit/directives/ref.js";
9
- import { guard as xr } from "lit/directives/guard.js";
9
+ import { guard as Sr } from "lit/directives/guard.js";
10
10
  function wo(s) {
11
11
  return s && s.__esModule && Object.prototype.hasOwnProperty.call(s, "default") ? s.default : s;
12
12
  }
@@ -16,9 +16,9 @@ var is = { exports: {} };
16
16
  Licensed under the MIT License (MIT), see
17
17
  http://jedwatson.github.io/classnames
18
18
  */
19
- var Sr;
19
+ var Er;
20
20
  function bo() {
21
- return Sr || (Sr = 1, (function(s) {
21
+ return Er || (Er = 1, (function(s) {
22
22
  (function() {
23
23
  var e = {}.hasOwnProperty;
24
24
  function t() {
@@ -127,7 +127,7 @@ function as(s) {
127
127
  throw new $e("No response body", s.status, s.url);
128
128
  return s.body;
129
129
  }
130
- async function $s(s) {
130
+ async function Ps(s) {
131
131
  try {
132
132
  return await s.json();
133
133
  } catch (e) {
@@ -198,7 +198,7 @@ function So(s) {
198
198
  return atob(e);
199
199
  }
200
200
  }
201
- function Er(s, e) {
201
+ function Tr(s, e) {
202
202
  if (typeof s != "string")
203
203
  throw new nt("Invalid token specified: must be a string");
204
204
  e || (e = {});
@@ -233,7 +233,7 @@ class hn {
233
233
  async getIdentifier() {
234
234
  const e = await this.getAccessToken(!0);
235
235
  if (!e) throw new ot();
236
- return Er(e).sub;
236
+ return Tr(e).sub;
237
237
  }
238
238
  /**
239
239
  * Update the “expiring soon” lead time at runtime (milliseconds).
@@ -287,7 +287,7 @@ class hn {
287
287
  }
288
288
  getDecodedAccessToken(e) {
289
289
  try {
290
- const t = Er(e);
290
+ const t = Tr(e);
291
291
  return {
292
292
  value: e,
293
293
  exp: t.exp ? t.exp * 1e3 : void 0
@@ -332,7 +332,7 @@ class Eo extends hn {
332
332
  "Content-Type": "application/json"
333
333
  }
334
334
  });
335
- return ln(e), (await $s(e)).accessToken;
335
+ return ln(e), (await Ps(e)).accessToken;
336
336
  }
337
337
  async refreshVisitorToken() {
338
338
  return await this.requestVisitorToken();
@@ -372,7 +372,7 @@ class To extends hn {
372
372
  async onClear() {
373
373
  }
374
374
  }
375
- function Tr(s, e) {
375
+ function ls(s, e) {
376
376
  return e ? { kind: "visma", strategy: new To(e) } : { kind: "visitor", strategy: new Eo(s) };
377
377
  }
378
378
  /**
@@ -380,7 +380,7 @@ function Tr(s, e) {
380
380
  * Copyright 2021 Google LLC
381
381
  * SPDX-License-Identifier: BSD-3-Clause
382
382
  */
383
- const bs = "lit-localize-status";
383
+ const vs = "lit-localize-status";
384
384
  /**
385
385
  * @license
386
386
  * Copyright 2021 Google LLC
@@ -420,10 +420,10 @@ class $o {
420
420
  }, this.host = e;
421
421
  }
422
422
  hostConnected() {
423
- window.addEventListener(bs, this.__litLocalizeEventHandler);
423
+ window.addEventListener(vs, this.__litLocalizeEventHandler);
424
424
  }
425
425
  hostDisconnected() {
426
- window.removeEventListener(bs, this.__litLocalizeEventHandler);
426
+ window.removeEventListener(vs, this.__litLocalizeEventHandler);
427
427
  }
428
428
  }
429
429
  const Po = (s) => s.addController(new $o(s)), Mo = Po;
@@ -471,7 +471,7 @@ function Oo(s) {
471
471
  * SPDX-License-Identifier: BSD-3-Clause
472
472
  */
473
473
  const Lo = "", No = "h", zo = "s";
474
- function Fo(s, e) {
474
+ function Uo(s, e) {
475
475
  return (e ? No : zo) + Oo(typeof s == "string" ? s : s.join(Lo));
476
476
  }
477
477
  /**
@@ -480,7 +480,7 @@ function Fo(s, e) {
480
480
  * SPDX-License-Identifier: BSD-3-Clause
481
481
  */
482
482
  const Ir = /* @__PURE__ */ new WeakMap(), Ar = /* @__PURE__ */ new Map();
483
- function Uo(s, e, t) {
483
+ function Fo(s, e, t) {
484
484
  if (s) {
485
485
  const n = t?.id ?? Bo(e), r = s[n];
486
486
  if (r) {
@@ -508,37 +508,37 @@ function Uo(s, e, t) {
508
508
  function Bo(s) {
509
509
  const e = typeof s == "string" ? s : s.strings;
510
510
  let t = Ar.get(e);
511
- return t === void 0 && (t = Fo(e, typeof s != "string" && !("strTag" in s)), Ar.set(e, t)), t;
511
+ return t === void 0 && (t = Uo(e, typeof s != "string" && !("strTag" in s)), Ar.set(e, t)), t;
512
512
  }
513
513
  /**
514
514
  * @license
515
515
  * Copyright 2021 Google LLC
516
516
  * SPDX-License-Identifier: BSD-3-Clause
517
517
  */
518
- function ls(s) {
519
- window.dispatchEvent(new CustomEvent(bs, { detail: s }));
518
+ function cs(s) {
519
+ window.dispatchEvent(new CustomEvent(vs, { detail: s }));
520
520
  }
521
- let Pt = "", cs, gn, Mt, vs, fn, Ae = new un();
521
+ let Pt = "", hs, gn, Mt, ys, fn, Ae = new un();
522
522
  Ae.resolve();
523
523
  let Et = 0;
524
- const Ho = (s) => (Ro(((e, t) => Uo(fn, e, t))), Pt = gn = s.sourceLocale, Mt = new Set(s.targetLocales), Mt.add(s.sourceLocale), vs = s.loadLocale, { getLocale: jo, setLocale: qo }), jo = () => Pt, qo = (s) => {
525
- if (s === (cs ?? Pt))
524
+ const Ho = (s) => (Ro(((e, t) => Fo(fn, e, t))), Pt = gn = s.sourceLocale, Mt = new Set(s.targetLocales), Mt.add(s.sourceLocale), ys = s.loadLocale, { getLocale: jo, setLocale: qo }), jo = () => Pt, qo = (s) => {
525
+ if (s === (hs ?? Pt))
526
526
  return Ae.promise;
527
- if (!Mt || !vs)
527
+ if (!Mt || !ys)
528
528
  throw new Error("Internal error");
529
529
  if (!Mt.has(s))
530
530
  throw new Error("Invalid locale code");
531
531
  Et++;
532
532
  const e = Et;
533
- return cs = s, Ae.settled && (Ae = new un()), ls({ status: "loading", loadingLocale: s }), (s === gn ? (
533
+ return hs = s, Ae.settled && (Ae = new un()), cs({ status: "loading", loadingLocale: s }), (s === gn ? (
534
534
  // We could switch to the source locale synchronously, but we prefer to
535
535
  // queue it on a microtask so that switching locales is consistently
536
536
  // asynchronous.
537
537
  Promise.resolve({ templates: void 0 })
538
- ) : vs(s)).then((n) => {
539
- Et === e && (Pt = s, cs = void 0, fn = n.templates, ls({ status: "ready", readyLocale: s }), Ae.resolve());
538
+ ) : ys(s)).then((n) => {
539
+ Et === e && (Pt = s, hs = void 0, fn = n.templates, cs({ status: "ready", readyLocale: s }), Ae.resolve());
540
540
  }, (n) => {
541
- Et === e && (ls({
541
+ Et === e && (cs({
542
542
  status: "error",
543
543
  errorLocale: s,
544
544
  errorMessage: n.toString()
@@ -558,7 +558,7 @@ let ie = class extends ho {
558
558
  ie = Go([
559
559
  Do()
560
560
  ], ie);
561
- const Yo = '<svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="lucide lucide-arrow-up-icon lucide-arrow-up"><path d="m5 12 7-7 7 7"/><path d="M12 19V5"/></svg>', Ps = '<svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="lucide lucide-circle-alert-icon lucide-circle-alert"><circle cx="12" cy="12" r="10"/><line x1="12" x2="12" y1="8" y2="12"/><line x1="12" x2="12.01" y1="16" y2="16"/></svg>';
561
+ const Yo = '<svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="lucide lucide-arrow-up-icon lucide-arrow-up"><path d="m5 12 7-7 7 7"/><path d="M12 19V5"/></svg>', Ms = '<svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="lucide lucide-circle-alert-icon lucide-circle-alert"><circle cx="12" cy="12" r="10"/><line x1="12" x2="12" y1="8" y2="12"/><line x1="12" x2="12.01" y1="16" y2="16"/></svg>';
562
562
  class Xo extends CustomEvent {
563
563
  constructor(e) {
564
564
  super("send-message", {
@@ -588,12 +588,12 @@ class Jo extends CustomEvent {
588
588
  super("submit-feedback", { detail: { target: e, rating: t, comment: n }, composed: !0 });
589
589
  }
590
590
  }
591
- class Ms extends CustomEvent {
591
+ class Ds extends CustomEvent {
592
592
  constructor(e) {
593
593
  super("toggle-feedback-form", { detail: { target: e }, composed: !0 });
594
594
  }
595
595
  }
596
- class Ds extends CustomEvent {
596
+ class Os extends CustomEvent {
597
597
  constructor() {
598
598
  super("clear-conversation", { composed: !0 });
599
599
  }
@@ -700,7 +700,7 @@ let ke = class extends ie {
700
700
  <div class="flex max-w-[calc(100%-80px)] flex-row items-center gap-x-2 overflow-x-clip">
701
701
  ${this.hasError ? b`
702
702
  <div class="flex size-4 items-center justify-center text-red-600">
703
- ${M(Ps)}
703
+ ${M(Ms)}
704
704
  </div>
705
705
  <span class="text-primary-900 truncate text-xs">${this.error}</span>
706
706
  ` : V}
@@ -747,10 +747,10 @@ let ct = class extends ie {
747
747
  super(...arguments), this.hasEmptyMessages = !0, this.disabled = !1, this.closeable = !0;
748
748
  }
749
749
  clearConversation() {
750
- this.dispatchEvent(new Ds());
750
+ this.dispatchEvent(new Os());
751
751
  }
752
752
  openFeedbackForm() {
753
- this.dispatchEvent(new Ms("assistant"));
753
+ this.dispatchEvent(new Ds("assistant"));
754
754
  }
755
755
  closeChat() {
756
756
  this.dispatchEvent(new ti());
@@ -806,7 +806,7 @@ var li = Object.defineProperty, ci = Object.getOwnPropertyDescriptor, bn = (s, e
806
806
  (i = s[o]) && (r = (n ? i(e, t, r) : i(r)) || r);
807
807
  return n && r && li(e, t, r), r;
808
808
  };
809
- let ys = class extends ie {
809
+ let _s = class extends ie {
810
810
  clearError() {
811
811
  this.dispatchEvent(new Qo());
812
812
  }
@@ -825,7 +825,7 @@ let ys = class extends ie {
825
825
  </div>
826
826
  <div class="flex [grid-area:leading]">
827
827
  <div class="flex size-5 items-center justify-center text-red-600">
828
- ${M(Ps)}
828
+ ${M(Ms)}
829
829
  </div>
830
830
  </div>
831
831
  <div class="flex [grid-area:trailing]">
@@ -841,12 +841,12 @@ let ys = class extends ie {
841
841
  };
842
842
  bn([
843
843
  T({ attribute: !1 })
844
- ], ys.prototype, "error", 2);
845
- ys = bn([
844
+ ], _s.prototype, "error", 2);
845
+ _s = bn([
846
846
  te("gaia-chat-error")
847
- ], ys);
847
+ ], _s);
848
848
  const hi = '<svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="lucide lucide-send-icon lucide-send"><path d="M14.536 21.686a.5.5 0 0 0 .937-.024l6.5-19a.496.496 0 0 0-.635-.635l-19 6.5a.5.5 0 0 0-.024.937l7.93 3.18a2 2 0 0 1 1.112 1.11z"/><path d="m21.854 2.147-10.94 10.939"/></svg>';
849
- var di = Object.defineProperty, pi = Object.getOwnPropertyDescriptor, Os = (s, e, t, n) => {
849
+ var di = Object.defineProperty, pi = Object.getOwnPropertyDescriptor, Ls = (s, e, t, n) => {
850
850
  for (var r = n > 1 ? void 0 : n ? pi(e, t) : e, o = s.length - 1, i; o >= 0; o--)
851
851
  (i = s[o]) && (r = (n ? i(e, t, r) : i(r)) || r);
852
852
  return n && r && di(e, t, r), r;
@@ -855,9 +855,9 @@ let Dt = class extends ie {
855
855
  constructor() {
856
856
  super(...arguments), this.ratings = [1, 2, 3, 4, 5], this.target = "assistant", this.textareaRef = fo(), this.selectedRating = 0, this.onSubmit = () => {
857
857
  const s = this.textareaRef.value?.value ?? null;
858
- this.isValid && (this.dispatchEvent(new Jo(this.target, this.selectedRating, s)), this.target === "support" && this.dispatchEvent(new Ds()));
858
+ this.isValid && (this.dispatchEvent(new Jo(this.target, this.selectedRating, s)), this.target === "support" && this.dispatchEvent(new Os()));
859
859
  }, this.onCancel = () => {
860
- this.dispatchEvent(new Ms(null));
860
+ this.dispatchEvent(new Ds(null));
861
861
  };
862
862
  }
863
863
  onRatingClick(s) {
@@ -937,13 +937,13 @@ let Dt = class extends ie {
937
937
  </div>`;
938
938
  }
939
939
  };
940
- Os([
940
+ Ls([
941
941
  T({ type: String, attribute: "target" })
942
942
  ], Dt.prototype, "target", 2);
943
- Os([
943
+ Ls([
944
944
  Se()
945
945
  ], Dt.prototype, "selectedRating", 2);
946
- Dt = Os([
946
+ Dt = Ls([
947
947
  te("gaia-chat-feedback-form")
948
948
  ], Dt);
949
949
  const ui = '<svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="lucide lucide-check-icon lucide-check"><path d="M20 6 9 17l-5-5"/></svg>', gi = '<svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="lucide lucide-chevron-down-icon lucide-chevron-down"><path d="m6 9 6 6 6-6"/></svg>', fi = '<svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="lucide lucide-circle-x-icon lucide-circle-x"><circle cx="12" cy="12" r="10"/><path d="m15 9-6 6"/><path d="m9 9 6 6"/></svg>', mi = '<svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="lucide lucide-file-icon lucide-file"><path d="M15 2H6a2 2 0 0 0-2 2v16a2 2 0 0 0 2 2h12a2 2 0 0 0 2-2V7Z"/><path d="M14 2v4a2 2 0 0 0 2 2h4"/></svg>', ht = '<svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="lucide lucide-sparkles-icon lucide-sparkles"><path d="M11.017 2.814a1 1 0 0 1 1.966 0l1.051 5.558a2 2 0 0 0 1.594 1.594l5.558 1.051a1 1 0 0 1 0 1.966l-5.558 1.051a2 2 0 0 0-1.594 1.594l-1.051 5.558a1 1 0 0 1-1.966 0l-1.051-5.558a2 2 0 0 0-1.594-1.594l-5.558-1.051a1 1 0 0 1 0-1.966l5.558-1.051a2 2 0 0 0 1.594-1.594z"/><path d="M20 2v4"/><path d="M22 4h-4"/><circle cx="4" cy="20" r="2"/></svg>';
@@ -960,8 +960,8 @@ let {
960
960
  seal: ee,
961
961
  create: yn
962
962
  } = Object, {
963
- apply: _s,
964
- construct: ks
963
+ apply: ks,
964
+ construct: xs
965
965
  } = typeof Reflect < "u" && Reflect;
966
966
  Y || (Y = function(e) {
967
967
  return e;
@@ -969,26 +969,26 @@ Y || (Y = function(e) {
969
969
  ee || (ee = function(e) {
970
970
  return e;
971
971
  });
972
- _s || (_s = function(e, t, n) {
972
+ ks || (ks = function(e, t, n) {
973
973
  return e.apply(t, n);
974
974
  });
975
- ks || (ks = function(e, t) {
975
+ xs || (xs = function(e, t) {
976
976
  return new e(...t);
977
977
  });
978
- const Tt = X(Array.prototype.forEach), yi = X(Array.prototype.lastIndexOf), $r = X(Array.prototype.pop), Ke = X(Array.prototype.push), _i = X(Array.prototype.splice), Rt = X(String.prototype.toLowerCase), hs = X(String.prototype.toString), Pr = X(String.prototype.match), Je = X(String.prototype.replace), ki = X(String.prototype.indexOf), xi = X(String.prototype.trim), ne = X(Object.prototype.hasOwnProperty), W = X(RegExp.prototype.test), Qe = Si(TypeError);
978
+ const Tt = X(Array.prototype.forEach), yi = X(Array.prototype.lastIndexOf), $r = X(Array.prototype.pop), Ke = X(Array.prototype.push), _i = X(Array.prototype.splice), Rt = X(String.prototype.toLowerCase), ds = X(String.prototype.toString), Pr = X(String.prototype.match), Je = X(String.prototype.replace), ki = X(String.prototype.indexOf), xi = X(String.prototype.trim), ne = X(Object.prototype.hasOwnProperty), W = X(RegExp.prototype.test), Qe = Si(TypeError);
979
979
  function X(s) {
980
980
  return function(e) {
981
981
  e instanceof RegExp && (e.lastIndex = 0);
982
982
  for (var t = arguments.length, n = new Array(t > 1 ? t - 1 : 0), r = 1; r < t; r++)
983
983
  n[r - 1] = arguments[r];
984
- return _s(s, e, n);
984
+ return ks(s, e, n);
985
985
  };
986
986
  }
987
987
  function Si(s) {
988
988
  return function() {
989
989
  for (var e = arguments.length, t = new Array(e), n = 0; n < e; n++)
990
990
  t[n] = arguments[n];
991
- return ks(s, t);
991
+ return xs(s, t);
992
992
  };
993
993
  }
994
994
  function _(s, e) {
@@ -1032,7 +1032,7 @@ function et(s, e) {
1032
1032
  }
1033
1033
  return t;
1034
1034
  }
1035
- const Mr = Y(["a", "abbr", "acronym", "address", "area", "article", "aside", "audio", "b", "bdi", "bdo", "big", "blink", "blockquote", "body", "br", "button", "canvas", "caption", "center", "cite", "code", "col", "colgroup", "content", "data", "datalist", "dd", "decorator", "del", "details", "dfn", "dialog", "dir", "div", "dl", "dt", "element", "em", "fieldset", "figcaption", "figure", "font", "footer", "form", "h1", "h2", "h3", "h4", "h5", "h6", "head", "header", "hgroup", "hr", "html", "i", "img", "input", "ins", "kbd", "label", "legend", "li", "main", "map", "mark", "marquee", "menu", "menuitem", "meter", "nav", "nobr", "ol", "optgroup", "option", "output", "p", "picture", "pre", "progress", "q", "rp", "rt", "ruby", "s", "samp", "section", "select", "shadow", "small", "source", "spacer", "span", "strike", "strong", "style", "sub", "summary", "sup", "table", "tbody", "td", "template", "textarea", "tfoot", "th", "thead", "time", "tr", "track", "tt", "u", "ul", "var", "video", "wbr"]), ds = Y(["svg", "a", "altglyph", "altglyphdef", "altglyphitem", "animatecolor", "animatemotion", "animatetransform", "circle", "clippath", "defs", "desc", "ellipse", "filter", "font", "g", "glyph", "glyphref", "hkern", "image", "line", "lineargradient", "marker", "mask", "metadata", "mpath", "path", "pattern", "polygon", "polyline", "radialgradient", "rect", "stop", "style", "switch", "symbol", "text", "textpath", "title", "tref", "tspan", "view", "vkern"]), ps = Y(["feBlend", "feColorMatrix", "feComponentTransfer", "feComposite", "feConvolveMatrix", "feDiffuseLighting", "feDisplacementMap", "feDistantLight", "feDropShadow", "feFlood", "feFuncA", "feFuncB", "feFuncG", "feFuncR", "feGaussianBlur", "feImage", "feMerge", "feMergeNode", "feMorphology", "feOffset", "fePointLight", "feSpecularLighting", "feSpotLight", "feTile", "feTurbulence"]), Ti = Y(["animate", "color-profile", "cursor", "discard", "font-face", "font-face-format", "font-face-name", "font-face-src", "font-face-uri", "foreignobject", "hatch", "hatchpath", "mesh", "meshgradient", "meshpatch", "meshrow", "missing-glyph", "script", "set", "solidcolor", "unknown", "use"]), us = Y(["math", "menclose", "merror", "mfenced", "mfrac", "mglyph", "mi", "mlabeledtr", "mmultiscripts", "mn", "mo", "mover", "mpadded", "mphantom", "mroot", "mrow", "ms", "mspace", "msqrt", "mstyle", "msub", "msup", "msubsup", "mtable", "mtd", "mtext", "mtr", "munder", "munderover", "mprescripts"]), Ci = Y(["maction", "maligngroup", "malignmark", "mlongdiv", "mscarries", "mscarry", "msgroup", "mstack", "msline", "msrow", "semantics", "annotation", "annotation-xml", "mprescripts", "none"]), Dr = Y(["#text"]), Or = Y(["accept", "action", "align", "alt", "autocapitalize", "autocomplete", "autopictureinpicture", "autoplay", "background", "bgcolor", "border", "capture", "cellpadding", "cellspacing", "checked", "cite", "class", "clear", "color", "cols", "colspan", "controls", "controlslist", "coords", "crossorigin", "datetime", "decoding", "default", "dir", "disabled", "disablepictureinpicture", "disableremoteplayback", "download", "draggable", "enctype", "enterkeyhint", "face", "for", "headers", "height", "hidden", "high", "href", "hreflang", "id", "inputmode", "integrity", "ismap", "kind", "label", "lang", "list", "loading", "loop", "low", "max", "maxlength", "media", "method", "min", "minlength", "multiple", "muted", "name", "nonce", "noshade", "novalidate", "nowrap", "open", "optimum", "pattern", "placeholder", "playsinline", "popover", "popovertarget", "popovertargetaction", "poster", "preload", "pubdate", "radiogroup", "readonly", "rel", "required", "rev", "reversed", "role", "rows", "rowspan", "spellcheck", "scope", "selected", "shape", "size", "sizes", "span", "srclang", "start", "src", "srcset", "step", "style", "summary", "tabindex", "title", "translate", "type", "usemap", "valign", "value", "width", "wrap", "xmlns", "slot"]), gs = Y(["accent-height", "accumulate", "additive", "alignment-baseline", "amplitude", "ascent", "attributename", "attributetype", "azimuth", "basefrequency", "baseline-shift", "begin", "bias", "by", "class", "clip", "clippathunits", "clip-path", "clip-rule", "color", "color-interpolation", "color-interpolation-filters", "color-profile", "color-rendering", "cx", "cy", "d", "dx", "dy", "diffuseconstant", "direction", "display", "divisor", "dur", "edgemode", "elevation", "end", "exponent", "fill", "fill-opacity", "fill-rule", "filter", "filterunits", "flood-color", "flood-opacity", "font-family", "font-size", "font-size-adjust", "font-stretch", "font-style", "font-variant", "font-weight", "fx", "fy", "g1", "g2", "glyph-name", "glyphref", "gradientunits", "gradienttransform", "height", "href", "id", "image-rendering", "in", "in2", "intercept", "k", "k1", "k2", "k3", "k4", "kerning", "keypoints", "keysplines", "keytimes", "lang", "lengthadjust", "letter-spacing", "kernelmatrix", "kernelunitlength", "lighting-color", "local", "marker-end", "marker-mid", "marker-start", "markerheight", "markerunits", "markerwidth", "maskcontentunits", "maskunits", "max", "mask", "media", "method", "mode", "min", "name", "numoctaves", "offset", "operator", "opacity", "order", "orient", "orientation", "origin", "overflow", "paint-order", "path", "pathlength", "patterncontentunits", "patterntransform", "patternunits", "points", "preservealpha", "preserveaspectratio", "primitiveunits", "r", "rx", "ry", "radius", "refx", "refy", "repeatcount", "repeatdur", "restart", "result", "rotate", "scale", "seed", "shape-rendering", "slope", "specularconstant", "specularexponent", "spreadmethod", "startoffset", "stddeviation", "stitchtiles", "stop-color", "stop-opacity", "stroke-dasharray", "stroke-dashoffset", "stroke-linecap", "stroke-linejoin", "stroke-miterlimit", "stroke-opacity", "stroke", "stroke-width", "style", "surfacescale", "systemlanguage", "tabindex", "tablevalues", "targetx", "targety", "transform", "transform-origin", "text-anchor", "text-decoration", "text-rendering", "textlength", "type", "u1", "u2", "unicode", "values", "viewbox", "visibility", "version", "vert-adv-y", "vert-origin-x", "vert-origin-y", "width", "word-spacing", "wrap", "writing-mode", "xchannelselector", "ychannelselector", "x", "x1", "x2", "xmlns", "y", "y1", "y2", "z", "zoomandpan"]), Lr = Y(["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"]), Ct = Y(["xlink:href", "xml:id", "xlink:title", "xml:space", "xmlns:xlink"]), Ii = ee(/\{\{[\w\W]*|[\w\W]*\}\}/gm), Ai = ee(/<%[\w\W]*|[\w\W]*%>/gm), Ri = ee(/\$\{[\w\W]*/gm), $i = ee(/^data-[\-\w.\u00B7-\uFFFF]+$/), Pi = ee(/^aria-[\-\w]+$/), _n = ee(
1035
+ const Mr = Y(["a", "abbr", "acronym", "address", "area", "article", "aside", "audio", "b", "bdi", "bdo", "big", "blink", "blockquote", "body", "br", "button", "canvas", "caption", "center", "cite", "code", "col", "colgroup", "content", "data", "datalist", "dd", "decorator", "del", "details", "dfn", "dialog", "dir", "div", "dl", "dt", "element", "em", "fieldset", "figcaption", "figure", "font", "footer", "form", "h1", "h2", "h3", "h4", "h5", "h6", "head", "header", "hgroup", "hr", "html", "i", "img", "input", "ins", "kbd", "label", "legend", "li", "main", "map", "mark", "marquee", "menu", "menuitem", "meter", "nav", "nobr", "ol", "optgroup", "option", "output", "p", "picture", "pre", "progress", "q", "rp", "rt", "ruby", "s", "samp", "section", "select", "shadow", "small", "source", "spacer", "span", "strike", "strong", "style", "sub", "summary", "sup", "table", "tbody", "td", "template", "textarea", "tfoot", "th", "thead", "time", "tr", "track", "tt", "u", "ul", "var", "video", "wbr"]), ps = Y(["svg", "a", "altglyph", "altglyphdef", "altglyphitem", "animatecolor", "animatemotion", "animatetransform", "circle", "clippath", "defs", "desc", "ellipse", "filter", "font", "g", "glyph", "glyphref", "hkern", "image", "line", "lineargradient", "marker", "mask", "metadata", "mpath", "path", "pattern", "polygon", "polyline", "radialgradient", "rect", "stop", "style", "switch", "symbol", "text", "textpath", "title", "tref", "tspan", "view", "vkern"]), us = Y(["feBlend", "feColorMatrix", "feComponentTransfer", "feComposite", "feConvolveMatrix", "feDiffuseLighting", "feDisplacementMap", "feDistantLight", "feDropShadow", "feFlood", "feFuncA", "feFuncB", "feFuncG", "feFuncR", "feGaussianBlur", "feImage", "feMerge", "feMergeNode", "feMorphology", "feOffset", "fePointLight", "feSpecularLighting", "feSpotLight", "feTile", "feTurbulence"]), Ti = Y(["animate", "color-profile", "cursor", "discard", "font-face", "font-face-format", "font-face-name", "font-face-src", "font-face-uri", "foreignobject", "hatch", "hatchpath", "mesh", "meshgradient", "meshpatch", "meshrow", "missing-glyph", "script", "set", "solidcolor", "unknown", "use"]), gs = Y(["math", "menclose", "merror", "mfenced", "mfrac", "mglyph", "mi", "mlabeledtr", "mmultiscripts", "mn", "mo", "mover", "mpadded", "mphantom", "mroot", "mrow", "ms", "mspace", "msqrt", "mstyle", "msub", "msup", "msubsup", "mtable", "mtd", "mtext", "mtr", "munder", "munderover", "mprescripts"]), Ci = Y(["maction", "maligngroup", "malignmark", "mlongdiv", "mscarries", "mscarry", "msgroup", "mstack", "msline", "msrow", "semantics", "annotation", "annotation-xml", "mprescripts", "none"]), Dr = Y(["#text"]), Or = Y(["accept", "action", "align", "alt", "autocapitalize", "autocomplete", "autopictureinpicture", "autoplay", "background", "bgcolor", "border", "capture", "cellpadding", "cellspacing", "checked", "cite", "class", "clear", "color", "cols", "colspan", "controls", "controlslist", "coords", "crossorigin", "datetime", "decoding", "default", "dir", "disabled", "disablepictureinpicture", "disableremoteplayback", "download", "draggable", "enctype", "enterkeyhint", "face", "for", "headers", "height", "hidden", "high", "href", "hreflang", "id", "inputmode", "integrity", "ismap", "kind", "label", "lang", "list", "loading", "loop", "low", "max", "maxlength", "media", "method", "min", "minlength", "multiple", "muted", "name", "nonce", "noshade", "novalidate", "nowrap", "open", "optimum", "pattern", "placeholder", "playsinline", "popover", "popovertarget", "popovertargetaction", "poster", "preload", "pubdate", "radiogroup", "readonly", "rel", "required", "rev", "reversed", "role", "rows", "rowspan", "spellcheck", "scope", "selected", "shape", "size", "sizes", "span", "srclang", "start", "src", "srcset", "step", "style", "summary", "tabindex", "title", "translate", "type", "usemap", "valign", "value", "width", "wrap", "xmlns", "slot"]), fs = Y(["accent-height", "accumulate", "additive", "alignment-baseline", "amplitude", "ascent", "attributename", "attributetype", "azimuth", "basefrequency", "baseline-shift", "begin", "bias", "by", "class", "clip", "clippathunits", "clip-path", "clip-rule", "color", "color-interpolation", "color-interpolation-filters", "color-profile", "color-rendering", "cx", "cy", "d", "dx", "dy", "diffuseconstant", "direction", "display", "divisor", "dur", "edgemode", "elevation", "end", "exponent", "fill", "fill-opacity", "fill-rule", "filter", "filterunits", "flood-color", "flood-opacity", "font-family", "font-size", "font-size-adjust", "font-stretch", "font-style", "font-variant", "font-weight", "fx", "fy", "g1", "g2", "glyph-name", "glyphref", "gradientunits", "gradienttransform", "height", "href", "id", "image-rendering", "in", "in2", "intercept", "k", "k1", "k2", "k3", "k4", "kerning", "keypoints", "keysplines", "keytimes", "lang", "lengthadjust", "letter-spacing", "kernelmatrix", "kernelunitlength", "lighting-color", "local", "marker-end", "marker-mid", "marker-start", "markerheight", "markerunits", "markerwidth", "maskcontentunits", "maskunits", "max", "mask", "media", "method", "mode", "min", "name", "numoctaves", "offset", "operator", "opacity", "order", "orient", "orientation", "origin", "overflow", "paint-order", "path", "pathlength", "patterncontentunits", "patterntransform", "patternunits", "points", "preservealpha", "preserveaspectratio", "primitiveunits", "r", "rx", "ry", "radius", "refx", "refy", "repeatcount", "repeatdur", "restart", "result", "rotate", "scale", "seed", "shape-rendering", "slope", "specularconstant", "specularexponent", "spreadmethod", "startoffset", "stddeviation", "stitchtiles", "stop-color", "stop-opacity", "stroke-dasharray", "stroke-dashoffset", "stroke-linecap", "stroke-linejoin", "stroke-miterlimit", "stroke-opacity", "stroke", "stroke-width", "style", "surfacescale", "systemlanguage", "tabindex", "tablevalues", "targetx", "targety", "transform", "transform-origin", "text-anchor", "text-decoration", "text-rendering", "textlength", "type", "u1", "u2", "unicode", "values", "viewbox", "visibility", "version", "vert-adv-y", "vert-origin-x", "vert-origin-y", "width", "word-spacing", "wrap", "writing-mode", "xchannelselector", "ychannelselector", "x", "x1", "x2", "xmlns", "y", "y1", "y2", "z", "zoomandpan"]), Lr = Y(["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"]), Ct = Y(["xlink:href", "xml:id", "xlink:title", "xml:space", "xmlns:xlink"]), Ii = ee(/\{\{[\w\W]*|[\w\W]*\}\}/gm), Ai = ee(/<%[\w\W]*|[\w\W]*%>/gm), Ri = ee(/\$\{[\w\W]*/gm), $i = ee(/^data-[\-\w.\u00B7-\uFFFF]+$/), Pi = ee(/^aria-[\-\w]+$/), _n = ee(
1036
1036
  /^(?:(?:(?:f|ht)tps?|mailto|tel|callto|sms|cid|xmpp|matrix):|[^a-z]|[a-z+.\-]+(?:[^a-z+.\-:]|$))/i
1037
1037
  // eslint-disable-line no-useless-escape
1038
1038
  ), Mi = ee(/^(?:\w+script|data):/i), Di = ee(
@@ -1134,15 +1134,15 @@ function xn() {
1134
1134
  DATA_ATTR: Jn,
1135
1135
  ARIA_ATTR: Qn,
1136
1136
  IS_SCRIPT_OR_DATA: eo,
1137
- ATTR_WHITESPACE: Js,
1137
+ ATTR_WHITESPACE: Qs,
1138
1138
  CUSTOM_ELEMENT: to
1139
1139
  } = Nr;
1140
1140
  let {
1141
- IS_ALLOWED_URI: Qs
1141
+ IS_ALLOWED_URI: er
1142
1142
  } = Nr, z = null;
1143
- const er = _({}, [...Mr, ...ds, ...ps, ...us, ...Dr]);
1144
- let U = null;
1145
- const tr = _({}, [...Or, ...gs, ...Lr, ...Ct]);
1143
+ const tr = _({}, [...Mr, ...ps, ...us, ...gs, ...Dr]);
1144
+ let F = null;
1145
+ const sr = _({}, [...Or, ...fs, ...Lr, ...Ct]);
1146
1146
  let P = Object.seal(yn(null, {
1147
1147
  tagNameCheck: {
1148
1148
  writable: !0,
@@ -1162,28 +1162,28 @@ function xn() {
1162
1162
  enumerable: !0,
1163
1163
  value: !1
1164
1164
  }
1165
- })), Ge = null, Xt = null, sr = !0, Zt = !0, rr = !1, nr = !0, ze = !1, bt = !0, Ie = !1, Kt = !1, Jt = !1, Fe = !1, vt = !1, yt = !1, or = !0, ir = !1;
1165
+ })), Ge = null, Xt = null, rr = !0, Zt = !0, nr = !1, or = !0, ze = !1, bt = !0, Ie = !1, Kt = !1, Jt = !1, Ue = !1, vt = !1, yt = !1, ir = !0, ar = !1;
1166
1166
  const so = "user-content-";
1167
- let Qt = !0, Ye = !1, Ue = {}, Be = null;
1168
- const ar = _({}, ["annotation-xml", "audio", "colgroup", "desc", "foreignobject", "head", "iframe", "math", "mi", "mn", "mo", "ms", "mtext", "noembed", "noframes", "noscript", "plaintext", "script", "style", "svg", "template", "thead", "title", "video", "xmp"]);
1169
- let lr = null;
1170
- const cr = _({}, ["audio", "video", "img", "source", "image", "track"]);
1167
+ let Qt = !0, Ye = !1, Fe = {}, Be = null;
1168
+ const lr = _({}, ["annotation-xml", "audio", "colgroup", "desc", "foreignobject", "head", "iframe", "math", "mi", "mn", "mo", "ms", "mtext", "noembed", "noframes", "noscript", "plaintext", "script", "style", "svg", "template", "thead", "title", "video", "xmp"]);
1169
+ let cr = null;
1170
+ const hr = _({}, ["audio", "video", "img", "source", "image", "track"]);
1171
1171
  let es = null;
1172
- const hr = _({}, ["alt", "class", "for", "id", "label", "name", "pattern", "placeholder", "role", "summary", "title", "value", "style", "xmlns"]), _t = "http://www.w3.org/1998/Math/MathML", kt = "http://www.w3.org/2000/svg", de = "http://www.w3.org/1999/xhtml";
1172
+ const dr = _({}, ["alt", "class", "for", "id", "label", "name", "pattern", "placeholder", "role", "summary", "title", "value", "style", "xmlns"]), _t = "http://www.w3.org/1998/Math/MathML", kt = "http://www.w3.org/2000/svg", de = "http://www.w3.org/1999/xhtml";
1173
1173
  let He = de, ts = !1, ss = null;
1174
- const ro = _({}, [_t, kt, de], hs);
1174
+ const ro = _({}, [_t, kt, de], ds);
1175
1175
  let xt = _({}, ["mi", "mo", "mn", "ms", "mtext"]), St = _({}, ["annotation-xml"]);
1176
1176
  const no = _({}, ["title", "style", "font", "a", "script"]);
1177
1177
  let Xe = null;
1178
1178
  const oo = ["application/xhtml+xml", "text/html"], io = "text/html";
1179
- let F = null, je = null;
1180
- const ao = t.createElement("form"), dr = function(l) {
1179
+ let U = null, je = null;
1180
+ const ao = t.createElement("form"), pr = function(l) {
1181
1181
  return l instanceof RegExp || l instanceof Function;
1182
1182
  }, rs = function() {
1183
1183
  let l = arguments.length > 0 && arguments[0] !== void 0 ? arguments[0] : {};
1184
1184
  if (!(je && je === l)) {
1185
1185
  if ((!l || typeof l != "object") && (l = {}), l = fe(l), Xe = // eslint-disable-next-line unicorn/prefer-includes
1186
- oo.indexOf(l.PARSER_MEDIA_TYPE) === -1 ? io : l.PARSER_MEDIA_TYPE, F = Xe === "application/xhtml+xml" ? hs : Rt, z = ne(l, "ALLOWED_TAGS") ? _({}, l.ALLOWED_TAGS, F) : er, U = ne(l, "ALLOWED_ATTR") ? _({}, l.ALLOWED_ATTR, F) : tr, ss = ne(l, "ALLOWED_NAMESPACES") ? _({}, l.ALLOWED_NAMESPACES, hs) : ro, es = ne(l, "ADD_URI_SAFE_ATTR") ? _(fe(hr), l.ADD_URI_SAFE_ATTR, F) : hr, lr = ne(l, "ADD_DATA_URI_TAGS") ? _(fe(cr), l.ADD_DATA_URI_TAGS, F) : cr, Be = ne(l, "FORBID_CONTENTS") ? _({}, l.FORBID_CONTENTS, F) : ar, Ge = ne(l, "FORBID_TAGS") ? _({}, l.FORBID_TAGS, F) : fe({}), Xt = ne(l, "FORBID_ATTR") ? _({}, l.FORBID_ATTR, F) : fe({}), Ue = ne(l, "USE_PROFILES") ? l.USE_PROFILES : !1, sr = l.ALLOW_ARIA_ATTR !== !1, Zt = l.ALLOW_DATA_ATTR !== !1, rr = l.ALLOW_UNKNOWN_PROTOCOLS || !1, nr = l.ALLOW_SELF_CLOSE_IN_ATTR !== !1, ze = l.SAFE_FOR_TEMPLATES || !1, bt = l.SAFE_FOR_XML !== !1, Ie = l.WHOLE_DOCUMENT || !1, Fe = l.RETURN_DOM || !1, vt = l.RETURN_DOM_FRAGMENT || !1, yt = l.RETURN_TRUSTED_TYPE || !1, Jt = l.FORCE_BODY || !1, or = l.SANITIZE_DOM !== !1, ir = l.SANITIZE_NAMED_PROPS || !1, Qt = l.KEEP_CONTENT !== !1, Ye = l.IN_PLACE || !1, Qs = l.ALLOWED_URI_REGEXP || _n, He = l.NAMESPACE || de, xt = l.MATHML_TEXT_INTEGRATION_POINTS || xt, St = l.HTML_INTEGRATION_POINTS || St, P = l.CUSTOM_ELEMENT_HANDLING || {}, l.CUSTOM_ELEMENT_HANDLING && dr(l.CUSTOM_ELEMENT_HANDLING.tagNameCheck) && (P.tagNameCheck = l.CUSTOM_ELEMENT_HANDLING.tagNameCheck), l.CUSTOM_ELEMENT_HANDLING && dr(l.CUSTOM_ELEMENT_HANDLING.attributeNameCheck) && (P.attributeNameCheck = l.CUSTOM_ELEMENT_HANDLING.attributeNameCheck), l.CUSTOM_ELEMENT_HANDLING && typeof l.CUSTOM_ELEMENT_HANDLING.allowCustomizedBuiltInElements == "boolean" && (P.allowCustomizedBuiltInElements = l.CUSTOM_ELEMENT_HANDLING.allowCustomizedBuiltInElements), ze && (Zt = !1), vt && (Fe = !0), Ue && (z = _({}, Dr), U = [], Ue.html === !0 && (_(z, Mr), _(U, Or)), Ue.svg === !0 && (_(z, ds), _(U, gs), _(U, Ct)), Ue.svgFilters === !0 && (_(z, ps), _(U, gs), _(U, Ct)), Ue.mathMl === !0 && (_(z, us), _(U, Lr), _(U, Ct))), l.ADD_TAGS && (z === er && (z = fe(z)), _(z, l.ADD_TAGS, F)), l.ADD_ATTR && (U === tr && (U = fe(U)), _(U, l.ADD_ATTR, F)), l.ADD_URI_SAFE_ATTR && _(es, l.ADD_URI_SAFE_ATTR, F), l.FORBID_CONTENTS && (Be === ar && (Be = fe(Be)), _(Be, l.FORBID_CONTENTS, F)), Qt && (z["#text"] = !0), Ie && _(z, ["html", "head", "body"]), z.table && (_(z, ["tbody"]), delete Ge.tbody), l.TRUSTED_TYPES_POLICY) {
1186
+ oo.indexOf(l.PARSER_MEDIA_TYPE) === -1 ? io : l.PARSER_MEDIA_TYPE, U = Xe === "application/xhtml+xml" ? ds : Rt, z = ne(l, "ALLOWED_TAGS") ? _({}, l.ALLOWED_TAGS, U) : tr, F = ne(l, "ALLOWED_ATTR") ? _({}, l.ALLOWED_ATTR, U) : sr, ss = ne(l, "ALLOWED_NAMESPACES") ? _({}, l.ALLOWED_NAMESPACES, ds) : ro, es = ne(l, "ADD_URI_SAFE_ATTR") ? _(fe(dr), l.ADD_URI_SAFE_ATTR, U) : dr, cr = ne(l, "ADD_DATA_URI_TAGS") ? _(fe(hr), l.ADD_DATA_URI_TAGS, U) : hr, Be = ne(l, "FORBID_CONTENTS") ? _({}, l.FORBID_CONTENTS, U) : lr, Ge = ne(l, "FORBID_TAGS") ? _({}, l.FORBID_TAGS, U) : fe({}), Xt = ne(l, "FORBID_ATTR") ? _({}, l.FORBID_ATTR, U) : fe({}), Fe = ne(l, "USE_PROFILES") ? l.USE_PROFILES : !1, rr = l.ALLOW_ARIA_ATTR !== !1, Zt = l.ALLOW_DATA_ATTR !== !1, nr = l.ALLOW_UNKNOWN_PROTOCOLS || !1, or = l.ALLOW_SELF_CLOSE_IN_ATTR !== !1, ze = l.SAFE_FOR_TEMPLATES || !1, bt = l.SAFE_FOR_XML !== !1, Ie = l.WHOLE_DOCUMENT || !1, Ue = l.RETURN_DOM || !1, vt = l.RETURN_DOM_FRAGMENT || !1, yt = l.RETURN_TRUSTED_TYPE || !1, Jt = l.FORCE_BODY || !1, ir = l.SANITIZE_DOM !== !1, ar = l.SANITIZE_NAMED_PROPS || !1, Qt = l.KEEP_CONTENT !== !1, Ye = l.IN_PLACE || !1, er = l.ALLOWED_URI_REGEXP || _n, He = l.NAMESPACE || de, xt = l.MATHML_TEXT_INTEGRATION_POINTS || xt, St = l.HTML_INTEGRATION_POINTS || St, P = l.CUSTOM_ELEMENT_HANDLING || {}, l.CUSTOM_ELEMENT_HANDLING && pr(l.CUSTOM_ELEMENT_HANDLING.tagNameCheck) && (P.tagNameCheck = l.CUSTOM_ELEMENT_HANDLING.tagNameCheck), l.CUSTOM_ELEMENT_HANDLING && pr(l.CUSTOM_ELEMENT_HANDLING.attributeNameCheck) && (P.attributeNameCheck = l.CUSTOM_ELEMENT_HANDLING.attributeNameCheck), l.CUSTOM_ELEMENT_HANDLING && typeof l.CUSTOM_ELEMENT_HANDLING.allowCustomizedBuiltInElements == "boolean" && (P.allowCustomizedBuiltInElements = l.CUSTOM_ELEMENT_HANDLING.allowCustomizedBuiltInElements), ze && (Zt = !1), vt && (Ue = !0), Fe && (z = _({}, Dr), F = [], Fe.html === !0 && (_(z, Mr), _(F, Or)), Fe.svg === !0 && (_(z, ps), _(F, fs), _(F, Ct)), Fe.svgFilters === !0 && (_(z, us), _(F, fs), _(F, Ct)), Fe.mathMl === !0 && (_(z, gs), _(F, Lr), _(F, Ct))), l.ADD_TAGS && (z === tr && (z = fe(z)), _(z, l.ADD_TAGS, U)), l.ADD_ATTR && (F === sr && (F = fe(F)), _(F, l.ADD_ATTR, U)), l.ADD_URI_SAFE_ATTR && _(es, l.ADD_URI_SAFE_ATTR, U), l.FORBID_CONTENTS && (Be === lr && (Be = fe(Be)), _(Be, l.FORBID_CONTENTS, U)), Qt && (z["#text"] = !0), Ie && _(z, ["html", "head", "body"]), z.table && (_(z, ["tbody"]), delete Ge.tbody), l.TRUSTED_TYPES_POLICY) {
1187
1187
  if (typeof l.TRUSTED_TYPES_POLICY.createHTML != "function")
1188
1188
  throw Qe('TRUSTED_TYPES_POLICY configuration option must provide a "createHTML" hook.');
1189
1189
  if (typeof l.TRUSTED_TYPES_POLICY.createScriptURL != "function")
@@ -1193,14 +1193,14 @@ function xn() {
1193
1193
  N === void 0 && (N = Ni(R, r)), N !== null && typeof Ee == "string" && (Ee = N.createHTML(""));
1194
1194
  Y && Y(l), je = l;
1195
1195
  }
1196
- }, pr = _({}, [...ds, ...ps, ...Ti]), ur = _({}, [...us, ...Ci]), lo = function(l) {
1196
+ }, ur = _({}, [...ps, ...us, ...Ti]), gr = _({}, [...gs, ...Ci]), lo = function(l) {
1197
1197
  let p = re(l);
1198
1198
  (!p || !p.tagName) && (p = {
1199
1199
  namespaceURI: He,
1200
1200
  tagName: "template"
1201
1201
  });
1202
1202
  const g = Rt(l.tagName), C = Rt(p.tagName);
1203
- return ss[l.namespaceURI] ? l.namespaceURI === kt ? p.namespaceURI === de ? g === "svg" : p.namespaceURI === _t ? g === "svg" && (C === "annotation-xml" || xt[C]) : !!pr[g] : l.namespaceURI === _t ? p.namespaceURI === de ? g === "math" : p.namespaceURI === kt ? g === "math" && St[C] : !!ur[g] : l.namespaceURI === de ? p.namespaceURI === kt && !St[C] || p.namespaceURI === _t && !xt[C] ? !1 : !ur[g] && (no[g] || !pr[g]) : !!(Xe === "application/xhtml+xml" && ss[l.namespaceURI]) : !1;
1203
+ return ss[l.namespaceURI] ? l.namespaceURI === kt ? p.namespaceURI === de ? g === "svg" : p.namespaceURI === _t ? g === "svg" && (C === "annotation-xml" || xt[C]) : !!ur[g] : l.namespaceURI === _t ? p.namespaceURI === de ? g === "math" : p.namespaceURI === kt ? g === "math" && St[C] : !!gr[g] : l.namespaceURI === de ? p.namespaceURI === kt && !St[C] || p.namespaceURI === _t && !xt[C] ? !1 : !gr[g] && (no[g] || !ur[g]) : !!(Xe === "application/xhtml+xml" && ss[l.namespaceURI]) : !1;
1204
1204
  }, le = function(l) {
1205
1205
  Ke(e.removed, {
1206
1206
  element: l
@@ -1223,7 +1223,7 @@ function xn() {
1223
1223
  });
1224
1224
  }
1225
1225
  if (p.removeAttribute(l), l === "is")
1226
- if (Fe || vt)
1226
+ if (Ue || vt)
1227
1227
  try {
1228
1228
  le(p);
1229
1229
  } catch {
@@ -1233,7 +1233,7 @@ function xn() {
1233
1233
  p.setAttribute(l, "");
1234
1234
  } catch {
1235
1235
  }
1236
- }, gr = function(l) {
1236
+ }, fr = function(l) {
1237
1237
  let p = null, g = null;
1238
1238
  if (Jt)
1239
1239
  l = "<remove></remove>" + l;
@@ -1257,7 +1257,7 @@ function xn() {
1257
1257
  }
1258
1258
  const B = p.body || p.documentElement;
1259
1259
  return l && g && B.insertBefore(t.createTextNode(g), B.childNodes[0] || null), He === de ? Zn.call(p, Ie ? "html" : "body")[0] : Ie ? p.documentElement : B;
1260
- }, fr = function(l) {
1260
+ }, mr = function(l) {
1261
1261
  return Ce.call(
1262
1262
  l.ownerDocument || l,
1263
1263
  l,
@@ -1267,7 +1267,7 @@ function xn() {
1267
1267
  );
1268
1268
  }, ns = function(l) {
1269
1269
  return l instanceof w && (typeof l.nodeName != "string" || typeof l.textContent != "string" || typeof l.removeChild != "function" || !(l.attributes instanceof u) || typeof l.removeAttribute != "function" || typeof l.setAttribute != "function" || typeof l.namespaceURI != "string" || typeof l.insertBefore != "function" || typeof l.hasChildNodes != "function");
1270
- }, mr = function(l) {
1270
+ }, wr = function(l) {
1271
1271
  return typeof a == "function" && l instanceof a;
1272
1272
  };
1273
1273
  function pe(f, l, p) {
@@ -1275,18 +1275,18 @@ function xn() {
1275
1275
  g.call(e, l, p, je);
1276
1276
  });
1277
1277
  }
1278
- const wr = function(l) {
1278
+ const br = function(l) {
1279
1279
  let p = null;
1280
1280
  if (pe(q.beforeSanitizeElements, l, null), ns(l))
1281
1281
  return le(l), !0;
1282
- const g = F(l.nodeName);
1282
+ const g = U(l.nodeName);
1283
1283
  if (pe(q.uponSanitizeElement, l, {
1284
1284
  tagName: g,
1285
1285
  allowedTags: z
1286
- }), bt && l.hasChildNodes() && !mr(l.firstElementChild) && W(/<[/\w!]/g, l.innerHTML) && W(/<[/\w!]/g, l.textContent) || l.nodeType === tt.progressingInstruction || bt && l.nodeType === tt.comment && W(/<[/\w]/g, l.data))
1286
+ }), bt && l.hasChildNodes() && !wr(l.firstElementChild) && W(/<[/\w!]/g, l.innerHTML) && W(/<[/\w!]/g, l.textContent) || l.nodeType === tt.progressingInstruction || bt && l.nodeType === tt.comment && W(/<[/\w]/g, l.data))
1287
1287
  return le(l), !0;
1288
1288
  if (!z[g] || Ge[g]) {
1289
- if (!Ge[g] && vr(g) && (P.tagNameCheck instanceof RegExp && W(P.tagNameCheck, g) || P.tagNameCheck instanceof Function && P.tagNameCheck(g)))
1289
+ if (!Ge[g] && yr(g) && (P.tagNameCheck instanceof RegExp && W(P.tagNameCheck, g) || P.tagNameCheck instanceof Function && P.tagNameCheck(g)))
1290
1290
  return !1;
1291
1291
  if (Qt && !Be[g]) {
1292
1292
  const C = re(l) || l.parentNode, B = ye(l) || l.childNodes;
@@ -1305,24 +1305,24 @@ function xn() {
1305
1305
  }), l.textContent !== p && (Ke(e.removed, {
1306
1306
  element: l.cloneNode()
1307
1307
  }), l.textContent = p)), pe(q.afterSanitizeElements, l, null), !1);
1308
- }, br = function(l, p, g) {
1309
- if (or && (p === "id" || p === "name") && (g in t || g in ao))
1308
+ }, vr = function(l, p, g) {
1309
+ if (ir && (p === "id" || p === "name") && (g in t || g in ao))
1310
1310
  return !1;
1311
1311
  if (!(Zt && !Xt[p] && W(Jn, p))) {
1312
- if (!(sr && W(Qn, p))) {
1313
- if (!U[p] || Xt[p]) {
1312
+ if (!(rr && W(Qn, p))) {
1313
+ if (!F[p] || Xt[p]) {
1314
1314
  if (
1315
1315
  // First condition does a very basic check if a) it's basically a valid custom element tagname AND
1316
1316
  // b) if the tagName passes whatever the user has configured for CUSTOM_ELEMENT_HANDLING.tagNameCheck
1317
1317
  // and c) if the attribute name passes whatever the user has configured for CUSTOM_ELEMENT_HANDLING.attributeNameCheck
1318
- !(vr(l) && (P.tagNameCheck instanceof RegExp && W(P.tagNameCheck, l) || P.tagNameCheck instanceof Function && P.tagNameCheck(l)) && (P.attributeNameCheck instanceof RegExp && W(P.attributeNameCheck, p) || P.attributeNameCheck instanceof Function && P.attributeNameCheck(p)) || // Alternative, second condition checks if it's an `is`-attribute, AND
1318
+ !(yr(l) && (P.tagNameCheck instanceof RegExp && W(P.tagNameCheck, l) || P.tagNameCheck instanceof Function && P.tagNameCheck(l)) && (P.attributeNameCheck instanceof RegExp && W(P.attributeNameCheck, p) || P.attributeNameCheck instanceof Function && P.attributeNameCheck(p)) || // Alternative, second condition checks if it's an `is`-attribute, AND
1319
1319
  // the value passes whatever the user has configured for CUSTOM_ELEMENT_HANDLING.tagNameCheck
1320
1320
  p === "is" && P.allowCustomizedBuiltInElements && (P.tagNameCheck instanceof RegExp && W(P.tagNameCheck, g) || P.tagNameCheck instanceof Function && P.tagNameCheck(g)))
1321
1321
  ) return !1;
1322
1322
  } else if (!es[p]) {
1323
- if (!W(Qs, Je(g, Js, ""))) {
1324
- if (!((p === "src" || p === "xlink:href" || p === "href") && l !== "script" && ki(g, "data:") === 0 && lr[l])) {
1325
- if (!(rr && !W(eo, Je(g, Js, "")))) {
1323
+ if (!W(er, Je(g, Qs, ""))) {
1324
+ if (!((p === "src" || p === "xlink:href" || p === "href") && l !== "script" && ki(g, "data:") === 0 && cr[l])) {
1325
+ if (!(nr && !W(eo, Je(g, Qs, "")))) {
1326
1326
  if (g)
1327
1327
  return !1;
1328
1328
  }
@@ -1332,9 +1332,9 @@ function xn() {
1332
1332
  }
1333
1333
  }
1334
1334
  return !0;
1335
- }, vr = function(l) {
1336
- return l !== "annotation-xml" && Pr(l, to);
1337
1335
  }, yr = function(l) {
1336
+ return l !== "annotation-xml" && Pr(l, to);
1337
+ }, _r = function(l) {
1338
1338
  pe(q.beforeSanitizeAttributes, l, null);
1339
1339
  const {
1340
1340
  attributes: p
@@ -1345,7 +1345,7 @@ function xn() {
1345
1345
  attrName: "",
1346
1346
  attrValue: "",
1347
1347
  keepAttr: !0,
1348
- allowedAttributes: U,
1348
+ allowedAttributes: F,
1349
1349
  forceKeepAttr: void 0
1350
1350
  };
1351
1351
  let C = p.length;
@@ -1354,9 +1354,9 @@ function xn() {
1354
1354
  name: O,
1355
1355
  namespaceURI: Z,
1356
1356
  value: ue
1357
- } = B, Ze = F(O), os = ue;
1357
+ } = B, Ze = U(O), os = ue;
1358
1358
  let H = O === "value" ? os : xi(os);
1359
- if (g.attrName = Ze, g.attrValue = H, g.keepAttr = !0, g.forceKeepAttr = void 0, pe(q.uponSanitizeAttribute, l, g), H = g.attrValue, ir && (Ze === "id" || Ze === "name") && (qe(O, l), H = so + H), bt && W(/((--!?|])>)|<\/(style|title)/i, H)) {
1359
+ if (g.attrName = Ze, g.attrValue = H, g.keepAttr = !0, g.forceKeepAttr = void 0, pe(q.uponSanitizeAttribute, l, g), H = g.attrValue, ar && (Ze === "id" || Ze === "name") && (qe(O, l), H = so + H), bt && W(/((--!?|])>)|<\/(style|title)/i, H)) {
1360
1360
  qe(O, l);
1361
1361
  continue;
1362
1362
  }
@@ -1366,20 +1366,20 @@ function xn() {
1366
1366
  qe(O, l);
1367
1367
  continue;
1368
1368
  }
1369
- if (!nr && W(/\/>/i, H)) {
1369
+ if (!or && W(/\/>/i, H)) {
1370
1370
  qe(O, l);
1371
1371
  continue;
1372
1372
  }
1373
- ze && Tt([Vt, Gt, Yt], (kr) => {
1374
- H = Je(H, kr, " ");
1373
+ ze && Tt([Vt, Gt, Yt], (xr) => {
1374
+ H = Je(H, xr, " ");
1375
1375
  });
1376
- const _r = F(l.nodeName);
1377
- if (!br(_r, Ze, H)) {
1376
+ const kr = U(l.nodeName);
1377
+ if (!vr(kr, Ze, H)) {
1378
1378
  qe(O, l);
1379
1379
  continue;
1380
1380
  }
1381
1381
  if (N && typeof R == "object" && typeof R.getAttributeType == "function" && !Z)
1382
- switch (R.getAttributeType(_r, Ze)) {
1382
+ switch (R.getAttributeType(kr, Ze)) {
1383
1383
  case "TrustedHTML": {
1384
1384
  H = N.createHTML(H);
1385
1385
  break;
@@ -1399,14 +1399,14 @@ function xn() {
1399
1399
  pe(q.afterSanitizeAttributes, l, null);
1400
1400
  }, co = function f(l) {
1401
1401
  let p = null;
1402
- const g = fr(l);
1402
+ const g = mr(l);
1403
1403
  for (pe(q.beforeSanitizeShadowDOM, l, null); p = g.nextNode(); )
1404
- pe(q.uponSanitizeShadowNode, p, null), wr(p), yr(p), p.content instanceof o && f(p.content);
1404
+ pe(q.uponSanitizeShadowNode, p, null), br(p), _r(p), p.content instanceof o && f(p.content);
1405
1405
  pe(q.afterSanitizeShadowDOM, l, null);
1406
1406
  };
1407
1407
  return e.sanitize = function(f) {
1408
1408
  let l = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : {}, p = null, g = null, C = null, B = null;
1409
- if (ts = !f, ts && (f = "<!-->"), typeof f != "string" && !mr(f))
1409
+ if (ts = !f, ts && (f = "<!-->"), typeof f != "string" && !wr(f))
1410
1410
  if (typeof f.toString == "function") {
1411
1411
  if (f = f.toString(), typeof f != "string")
1412
1412
  throw Qe("dirty is not a string, aborting");
@@ -1416,32 +1416,32 @@ function xn() {
1416
1416
  return f;
1417
1417
  if (Kt || rs(l), e.removed = [], typeof f == "string" && (Ye = !1), Ye) {
1418
1418
  if (f.nodeName) {
1419
- const ue = F(f.nodeName);
1419
+ const ue = U(f.nodeName);
1420
1420
  if (!z[ue] || Ge[ue])
1421
1421
  throw Qe("root node is forbidden and cannot be sanitized in-place");
1422
1422
  }
1423
1423
  } else if (f instanceof a)
1424
- p = gr("<!---->"), g = p.ownerDocument.importNode(f, !0), g.nodeType === tt.element && g.nodeName === "BODY" || g.nodeName === "HTML" ? p = g : p.appendChild(g);
1424
+ p = fr("<!---->"), g = p.ownerDocument.importNode(f, !0), g.nodeType === tt.element && g.nodeName === "BODY" || g.nodeName === "HTML" ? p = g : p.appendChild(g);
1425
1425
  else {
1426
- if (!Fe && !ze && !Ie && // eslint-disable-next-line unicorn/prefer-includes
1426
+ if (!Ue && !ze && !Ie && // eslint-disable-next-line unicorn/prefer-includes
1427
1427
  f.indexOf("<") === -1)
1428
1428
  return N && yt ? N.createHTML(f) : f;
1429
- if (p = gr(f), !p)
1430
- return Fe ? null : yt ? Ee : "";
1429
+ if (p = fr(f), !p)
1430
+ return Ue ? null : yt ? Ee : "";
1431
1431
  }
1432
1432
  p && Jt && le(p.firstChild);
1433
- const O = fr(Ye ? f : p);
1433
+ const O = mr(Ye ? f : p);
1434
1434
  for (; C = O.nextNode(); )
1435
- wr(C), yr(C), C.content instanceof o && co(C.content);
1435
+ br(C), _r(C), C.content instanceof o && co(C.content);
1436
1436
  if (Ye)
1437
1437
  return f;
1438
- if (Fe) {
1438
+ if (Ue) {
1439
1439
  if (vt)
1440
1440
  for (B = Xn.call(p.ownerDocument); p.firstChild; )
1441
1441
  B.appendChild(p.firstChild);
1442
1442
  else
1443
1443
  B = p;
1444
- return (U.shadowroot || U.shadowrootmode) && (B = Kn.call(n, B, !0)), B;
1444
+ return (F.shadowroot || F.shadowrootmode) && (B = Kn.call(n, B, !0)), B;
1445
1445
  }
1446
1446
  let Z = Ie ? p.outerHTML : p.innerHTML;
1447
1447
  return Ie && z["!doctype"] && p.ownerDocument && p.ownerDocument.doctype && p.ownerDocument.doctype.name && W(kn, p.ownerDocument.doctype.name) && (Z = "<!DOCTYPE " + p.ownerDocument.doctype.name + `>
@@ -1455,8 +1455,8 @@ function xn() {
1455
1455
  je = null, Kt = !1;
1456
1456
  }, e.isValidAttribute = function(f, l, p) {
1457
1457
  je || rs({});
1458
- const g = F(f), C = F(l);
1459
- return br(g, C, p);
1458
+ const g = U(f), C = U(l);
1459
+ return vr(g, C, p);
1460
1460
  }, e.addHook = function(f, l) {
1461
1461
  typeof l == "function" && Ke(q[f], l);
1462
1462
  }, e.removeHook = function(f, l) {
@@ -1472,10 +1472,10 @@ function xn() {
1472
1472
  }, e;
1473
1473
  }
1474
1474
  var Sn = xn();
1475
- function Ls() {
1475
+ function Ns() {
1476
1476
  return { async: !1, breaks: !1, extensions: null, gfm: !0, hooks: null, pedantic: !1, renderer: null, silent: !1, tokenizer: null, walkTokens: null };
1477
1477
  }
1478
- var Ne = Ls();
1478
+ var Ne = Ns();
1479
1479
  function En(s) {
1480
1480
  Ne = s;
1481
1481
  }
@@ -1487,12 +1487,12 @@ function S(s, e = "") {
1487
1487
  }, getRegex: () => new RegExp(t, e) };
1488
1488
  return n;
1489
1489
  }
1490
- var G = { codeRemoveIndent: /^(?: {1,4}| {0,3}\t)/gm, outputLinkReplace: /\\([\[\]])/g, indentCodeCompensation: /^(\s+)(?:```)/, beginningSpace: /^\s+/, endingHash: /#$/, startingSpaceChar: /^ /, endingSpaceChar: / $/, nonSpaceChar: /[^ ]/, newLineCharGlobal: /\n/g, tabCharGlobal: /\t/g, multipleSpaceGlobal: /\s+/g, blankLine: /^[ \t]*$/, doubleBlankLine: /\n[ \t]*\n[ \t]*$/, blockquoteStart: /^ {0,3}>/, blockquoteSetextReplace: /\n {0,3}((?:=+|-+) *)(?=\n|$)/g, blockquoteSetextReplace2: /^ {0,3}>[ \t]?/gm, listReplaceTabs: /^\t+/, listReplaceNesting: /^ {1,4}(?=( {4})*[^ ])/g, listIsTask: /^\[[ xX]\] /, listReplaceTask: /^\[[ xX]\] +/, anyLine: /\n.*\n/, hrefBrackets: /^<(.*)>$/, tableDelimiter: /[:|]/, tableAlignChars: /^\||\| *$/g, tableRowBlankLine: /\n[ \t]*$/, tableAlignRight: /^ *-+: *$/, tableAlignCenter: /^ *:-+: *$/, tableAlignLeft: /^ *:-+ *$/, startATag: /^<a /i, endATag: /^<\/a>/i, startPreScriptTag: /^<(pre|code|kbd|script)(\s|>)/i, endPreScriptTag: /^<\/(pre|code|kbd|script)(\s|>)/i, startAngleBracket: /^</, endAngleBracket: />$/, pedanticHrefTitle: /^([^'"]*[^\s])\s+(['"])(.*)\2/, unicodeAlphaNumeric: /[\p{L}\p{N}]/u, escapeTest: /[&<>"']/, escapeReplace: /[&<>"']/g, escapeTestNoEncode: /[<>"']|&(?!(#\d{1,7}|#[Xx][a-fA-F0-9]{1,6}|\w+);)/, escapeReplaceNoEncode: /[<>"']|&(?!(#\d{1,7}|#[Xx][a-fA-F0-9]{1,6}|\w+);)/g, unescapeTest: /&(#(?:\d+)|(?:#x[0-9A-Fa-f]+)|(?:\w+));?/ig, caret: /(^|[^\[])\^/g, percentDecode: /%25/g, findPipe: /\|/g, splitPipe: / \|/, slashPipe: /\\\|/g, carriageReturn: /\r\n|\r/g, spaceLine: /^ +$/gm, notSpaceStart: /^\S*/, endingNewline: /\n$/, listItemRegex: (s) => new RegExp(`^( {0,3}${s})((?:[ ][^\\n]*)?(?:\\n|$))`), nextBulletRegex: (s) => new RegExp(`^ {0,${Math.min(3, s - 1)}}(?:[*+-]|\\d{1,9}[.)])((?:[ ][^\\n]*)?(?:\\n|$))`), hrRegex: (s) => new RegExp(`^ {0,${Math.min(3, s - 1)}}((?:- *){3,}|(?:_ *){3,}|(?:\\* *){3,})(?:\\n+|$)`), fencesBeginRegex: (s) => new RegExp(`^ {0,${Math.min(3, s - 1)}}(?:\`\`\`|~~~)`), headingBeginRegex: (s) => new RegExp(`^ {0,${Math.min(3, s - 1)}}#`), htmlBeginRegex: (s) => new RegExp(`^ {0,${Math.min(3, s - 1)}}<(?:[a-z].*>|!--)`, "i") }, zi = /^(?:[ \t]*(?:\n|$))+/, Fi = /^((?: {4}| {0,3}\t)[^\n]+(?:\n(?:[ \t]*(?:\n|$))*)?)+/, Ui = /^ {0,3}(`{3,}(?=[^`\n]*(?:\n|$))|~{3,})([^\n]*)(?:\n|$)(?:|([\s\S]*?)(?:\n|$))(?: {0,3}\1[~`]* *(?=\n|$)|$)/, ft = /^ {0,3}((?:-[\t ]*){3,}|(?:_[ \t]*){3,}|(?:\*[ \t]*){3,})(?:\n+|$)/, Bi = /^ {0,3}(#{1,6})(?=\s|$)(.*)(?:\n+|$)/, Ns = /(?:[*+-]|\d{1,9}[.)])/, Tn = /^(?!bull |blockCode|fences|blockquote|heading|html|table)((?:.|\n(?!\s*?\n|bull |blockCode|fences|blockquote|heading|html|table))+?)\n {0,3}(=+|-+) *(?:\n+|$)/, Cn = S(Tn).replace(/bull/g, Ns).replace(/blockCode/g, /(?: {4}| {0,3}\t)/).replace(/fences/g, / {0,3}(?:`{3,}|~{3,})/).replace(/blockquote/g, / {0,3}>/).replace(/heading/g, / {0,3}#{1,6}/).replace(/html/g, / {0,3}<[^\n>]+>\n/).replace(/\|table/g, "").getRegex(), Hi = S(Tn).replace(/bull/g, Ns).replace(/blockCode/g, /(?: {4}| {0,3}\t)/).replace(/fences/g, / {0,3}(?:`{3,}|~{3,})/).replace(/blockquote/g, / {0,3}>/).replace(/heading/g, / {0,3}#{1,6}/).replace(/html/g, / {0,3}<[^\n>]+>\n/).replace(/table/g, / {0,3}\|?(?:[:\- ]*\|)+[\:\- ]*\n/).getRegex(), zs = /^([^\n]+(?:\n(?!hr|heading|lheading|blockquote|fences|list|html|table| +\n)[^\n]+)*)/, ji = /^[^\n]+/, Fs = /(?!\s*\])(?:\\.|[^\[\]\\])+/, qi = S(/^ {0,3}\[(label)\]: *(?:\n[ \t]*)?([^<\s][^\s]*|<.*?>)(?:(?: +(?:\n[ \t]*)?| *\n[ \t]*)(title))? *(?:\n+|$)/).replace("label", Fs).replace("title", /(?:"(?:\\"?|[^"\\])*"|'[^'\n]*(?:\n[^'\n]+)*\n?'|\([^()]*\))/).getRegex(), Wi = S(/^( {0,3}bull)([ \t][^\n]+?)?(?:\n|$)/).replace(/bull/g, Ns).getRegex(), jt = "address|article|aside|base|basefont|blockquote|body|caption|center|col|colgroup|dd|details|dialog|dir|div|dl|dt|fieldset|figcaption|figure|footer|form|frame|frameset|h[1-6]|head|header|hr|html|iframe|legend|li|link|main|menu|menuitem|meta|nav|noframes|ol|optgroup|option|p|param|search|section|summary|table|tbody|td|tfoot|th|thead|title|tr|track|ul", Us = /<!--(?:-?>|[\s\S]*?(?:-->|$))/, Vi = S("^ {0,3}(?:<(script|pre|style|textarea)[\\s>][\\s\\S]*?(?:</\\1>[^\\n]*\\n+|$)|comment[^\\n]*(\\n+|$)|<\\?[\\s\\S]*?(?:\\?>\\n*|$)|<![A-Z][\\s\\S]*?(?:>\\n*|$)|<!\\[CDATA\\[[\\s\\S]*?(?:\\]\\]>\\n*|$)|</?(tag)(?: +|\\n|/?>)[\\s\\S]*?(?:(?:\\n[ ]*)+\\n|$)|<(?!script|pre|style|textarea)([a-z][\\w-]*)(?:attribute)*? */?>(?=[ \\t]*(?:\\n|$))[\\s\\S]*?(?:(?:\\n[ ]*)+\\n|$)|</(?!script|pre|style|textarea)[a-z][\\w-]*\\s*>(?=[ \\t]*(?:\\n|$))[\\s\\S]*?(?:(?:\\n[ ]*)+\\n|$))", "i").replace("comment", Us).replace("tag", jt).replace("attribute", / +[a-zA-Z:_][\w.:-]*(?: *= *"[^"\n]*"| *= *'[^'\n]*'| *= *[^\s"'=<>`]+)?/).getRegex(), In = S(zs).replace("hr", ft).replace("heading", " {0,3}#{1,6}(?:\\s|$)").replace("|lheading", "").replace("|table", "").replace("blockquote", " {0,3}>").replace("fences", " {0,3}(?:`{3,}(?=[^`\\n]*\\n)|~{3,})[^\\n]*\\n").replace("list", " {0,3}(?:[*+-]|1[.)]) ").replace("html", "</?(?:tag)(?: +|\\n|/?>)|<(?:script|pre|style|textarea|!--)").replace("tag", jt).getRegex(), Gi = S(/^( {0,3}> ?(paragraph|[^\n]*)(?:\n|$))+/).replace("paragraph", In).getRegex(), Bs = { blockquote: Gi, code: Fi, def: qi, fences: Ui, heading: Bi, hr: ft, html: Vi, lheading: Cn, list: Wi, newline: zi, paragraph: In, table: it, text: ji }, Fr = S("^ *([^\\n ].*)\\n {0,3}((?:\\| *)?:?-+:? *(?:\\| *:?-+:? *)*(?:\\| *)?)(?:\\n((?:(?! *\\n|hr|heading|blockquote|code|fences|list|html).*(?:\\n|$))*)\\n*|$)").replace("hr", ft).replace("heading", " {0,3}#{1,6}(?:\\s|$)").replace("blockquote", " {0,3}>").replace("code", "(?: {4}| {0,3} )[^\\n]").replace("fences", " {0,3}(?:`{3,}(?=[^`\\n]*\\n)|~{3,})[^\\n]*\\n").replace("list", " {0,3}(?:[*+-]|1[.)]) ").replace("html", "</?(?:tag)(?: +|\\n|/?>)|<(?:script|pre|style|textarea|!--)").replace("tag", jt).getRegex(), Yi = { ...Bs, lheading: Hi, table: Fr, paragraph: S(zs).replace("hr", ft).replace("heading", " {0,3}#{1,6}(?:\\s|$)").replace("|lheading", "").replace("table", Fr).replace("blockquote", " {0,3}>").replace("fences", " {0,3}(?:`{3,}(?=[^`\\n]*\\n)|~{3,})[^\\n]*\\n").replace("list", " {0,3}(?:[*+-]|1[.)]) ").replace("html", "</?(?:tag)(?: +|\\n|/?>)|<(?:script|pre|style|textarea|!--)").replace("tag", jt).getRegex() }, Xi = { ...Bs, html: S(`^ *(?:comment *(?:\\n|\\s*$)|<(tag)[\\s\\S]+?</\\1> *(?:\\n{2,}|\\s*$)|<tag(?:"[^"]*"|'[^']*'|\\s[^'"/>\\s]*)*?/?> *(?:\\n{2,}|\\s*$))`).replace("comment", Us).replace(/tag/g, "(?!(?:a|em|strong|small|s|cite|q|dfn|abbr|data|time|code|var|samp|kbd|sub|sup|i|b|u|mark|ruby|rt|rp|bdi|bdo|span|br|wbr|ins|del|img)\\b)\\w+(?!:|[^\\w\\s@]*@)\\b").getRegex(), def: /^ *\[([^\]]+)\]: *<?([^\s>]+)>?(?: +(["(][^\n]+[")]))? *(?:\n+|$)/, heading: /^(#{1,6})(.*)(?:\n+|$)/, fences: it, lheading: /^(.+?)\n {0,3}(=+|-+) *(?:\n+|$)/, paragraph: S(zs).replace("hr", ft).replace("heading", ` *#{1,6} *[^
1491
- ]`).replace("lheading", Cn).replace("|table", "").replace("blockquote", " {0,3}>").replace("|fences", "").replace("|list", "").replace("|html", "").replace("|tag", "").getRegex() }, Zi = /^\\([!"#$%&'()*+,\-./:;<=>?@\[\]\\^_`{|}~])/, Ki = /^(`+)([^`]|[^`][\s\S]*?[^`])\1(?!`)/, An = /^( {2,}|\\)\n(?!\s*$)/, Ji = /^(`+|[^`])(?:(?= {2,}\n)|[\s\S]*?(?:(?=[\\<!\[`*_]|\b_|$)|[^ ](?= {2,}\n)))/, qt = /[\p{P}\p{S}]/u, Hs = /[\s\p{P}\p{S}]/u, Rn = /[^\s\p{P}\p{S}]/u, Qi = S(/^((?![*_])punctSpace)/, "u").replace(/punctSpace/g, Hs).getRegex(), $n = /(?!~)[\p{P}\p{S}]/u, ea = /(?!~)[\s\p{P}\p{S}]/u, ta = /(?:[^\s\p{P}\p{S}]|~)/u, sa = /\[[^[\]]*?\]\((?:\\.|[^\\\(\)]|\((?:\\.|[^\\\(\)])*\))*\)|`[^`]*?`|<(?! )[^<>]*?>/g, Pn = /^(?:\*+(?:((?!\*)punct)|[^\s*]))|^_+(?:((?!_)punct)|([^\s_]))/, ra = S(Pn, "u").replace(/punct/g, qt).getRegex(), na = S(Pn, "u").replace(/punct/g, $n).getRegex(), Mn = "^[^_*]*?__[^_*]*?\\*[^_*]*?(?=__)|[^*]+(?=[^*])|(?!\\*)punct(\\*+)(?=[\\s]|$)|notPunctSpace(\\*+)(?!\\*)(?=punctSpace|$)|(?!\\*)punctSpace(\\*+)(?=notPunctSpace)|[\\s](\\*+)(?!\\*)(?=punct)|(?!\\*)punct(\\*+)(?!\\*)(?=punct)|notPunctSpace(\\*+)(?=notPunctSpace)", oa = S(Mn, "gu").replace(/notPunctSpace/g, Rn).replace(/punctSpace/g, Hs).replace(/punct/g, qt).getRegex(), ia = S(Mn, "gu").replace(/notPunctSpace/g, ta).replace(/punctSpace/g, ea).replace(/punct/g, $n).getRegex(), aa = S("^[^_*]*?\\*\\*[^_*]*?_[^_*]*?(?=\\*\\*)|[^_]+(?=[^_])|(?!_)punct(_+)(?=[\\s]|$)|notPunctSpace(_+)(?!_)(?=punctSpace|$)|(?!_)punctSpace(_+)(?=notPunctSpace)|[\\s](_+)(?!_)(?=punct)|(?!_)punct(_+)(?!_)(?=punct)", "gu").replace(/notPunctSpace/g, Rn).replace(/punctSpace/g, Hs).replace(/punct/g, qt).getRegex(), la = S(/\\(punct)/, "gu").replace(/punct/g, qt).getRegex(), ca = S(/^<(scheme:[^\s\x00-\x1f<>]*|email)>/).replace("scheme", /[a-zA-Z][a-zA-Z0-9+.-]{1,31}/).replace("email", /[a-zA-Z0-9.!#$%&'*+/=?^_`{|}~-]+(@)[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?(?:\.[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?)+(?![-_])/).getRegex(), ha = S(Us).replace("(?:-->|$)", "-->").getRegex(), da = S("^comment|^</[a-zA-Z][\\w:-]*\\s*>|^<[a-zA-Z][\\w-]*(?:attribute)*?\\s*/?>|^<\\?[\\s\\S]*?\\?>|^<![a-zA-Z]+\\s[\\s\\S]*?>|^<!\\[CDATA\\[[\\s\\S]*?\\]\\]>").replace("comment", ha).replace("attribute", /\s+[a-zA-Z:_][\w.:-]*(?:\s*=\s*"[^"]*"|\s*=\s*'[^']*'|\s*=\s*[^\s"'=<>`]+)?/).getRegex(), Ot = /(?:\[(?:\\.|[^\[\]\\])*\]|\\.|`[^`]*`|[^\[\]\\`])*?/, pa = S(/^!?\[(label)\]\(\s*(href)(?:(?:[ \t]*(?:\n[ \t]*)?)(title))?\s*\)/).replace("label", Ot).replace("href", /<(?:\\.|[^\n<>\\])+>|[^ \t\n\x00-\x1f]*/).replace("title", /"(?:\\"?|[^"\\])*"|'(?:\\'?|[^'\\])*'|\((?:\\\)?|[^)\\])*\)/).getRegex(), Dn = S(/^!?\[(label)\]\[(ref)\]/).replace("label", Ot).replace("ref", Fs).getRegex(), On = S(/^!?\[(ref)\](?:\[\])?/).replace("ref", Fs).getRegex(), ua = S("reflink|nolink(?!\\()", "g").replace("reflink", Dn).replace("nolink", On).getRegex(), js = { _backpedal: it, anyPunctuation: la, autolink: ca, blockSkip: sa, br: An, code: Ki, del: it, emStrongLDelim: ra, emStrongRDelimAst: oa, emStrongRDelimUnd: aa, escape: Zi, link: pa, nolink: On, punctuation: Qi, reflink: Dn, reflinkSearch: ua, tag: da, text: Ji, url: it }, ga = { ...js, link: S(/^!?\[(label)\]\((.*?)\)/).replace("label", Ot).getRegex(), reflink: S(/^!?\[(label)\]\s*\[([^\]]*)\]/).replace("label", Ot).getRegex() }, xs = { ...js, emStrongRDelimAst: ia, emStrongLDelim: na, url: S(/^((?:ftp|https?):\/\/|www\.)(?:[a-zA-Z0-9\-]+\.?)+[^\s<]*|^email/, "i").replace("email", /[A-Za-z0-9._+-]+(@)[a-zA-Z0-9-_]+(?:\.[a-zA-Z0-9-_]*[a-zA-Z0-9])+(?![-_])/).getRegex(), _backpedal: /(?:[^?!.,:;*_'"~()&]+|\([^)]*\)|&(?![a-zA-Z0-9]+;$)|[?!.,:;*_'"~)]+(?!$))+/, del: /^(~~?)(?=[^\s~])((?:\\.|[^\\])*?(?:\\.|[^\s~\\]))\1(?=[^~]|$)/, text: /^([`~]+|[^`~])(?:(?= {2,}\n)|(?=[a-zA-Z0-9.!#$%&'*+\/=?_`{\|}~-]+@)|[\s\S]*?(?:(?=[\\<!\[`*~_]|\b_|https?:\/\/|ftp:\/\/|www\.|$)|[^ ](?= {2,}\n)|[^a-zA-Z0-9.!#$%&'*+\/=?_`{\|}~-](?=[a-zA-Z0-9.!#$%&'*+\/=?_`{\|}~-]+@)))/ }, fa = { ...xs, br: S(An).replace("{2,}", "*").getRegex(), text: S(xs.text).replace("\\b_", "\\b_| {2,}\\n").replace(/\{2,\}/g, "*").getRegex() }, It = { normal: Bs, gfm: Yi, pedantic: Xi }, st = { normal: js, gfm: xs, breaks: fa, pedantic: ga }, ma = { "&": "&amp;", "<": "&lt;", ">": "&gt;", '"': "&quot;", "'": "&#39;" }, Ur = (s) => ma[s];
1490
+ var G = { codeRemoveIndent: /^(?: {1,4}| {0,3}\t)/gm, outputLinkReplace: /\\([\[\]])/g, indentCodeCompensation: /^(\s+)(?:```)/, beginningSpace: /^\s+/, endingHash: /#$/, startingSpaceChar: /^ /, endingSpaceChar: / $/, nonSpaceChar: /[^ ]/, newLineCharGlobal: /\n/g, tabCharGlobal: /\t/g, multipleSpaceGlobal: /\s+/g, blankLine: /^[ \t]*$/, doubleBlankLine: /\n[ \t]*\n[ \t]*$/, blockquoteStart: /^ {0,3}>/, blockquoteSetextReplace: /\n {0,3}((?:=+|-+) *)(?=\n|$)/g, blockquoteSetextReplace2: /^ {0,3}>[ \t]?/gm, listReplaceTabs: /^\t+/, listReplaceNesting: /^ {1,4}(?=( {4})*[^ ])/g, listIsTask: /^\[[ xX]\] /, listReplaceTask: /^\[[ xX]\] +/, anyLine: /\n.*\n/, hrefBrackets: /^<(.*)>$/, tableDelimiter: /[:|]/, tableAlignChars: /^\||\| *$/g, tableRowBlankLine: /\n[ \t]*$/, tableAlignRight: /^ *-+: *$/, tableAlignCenter: /^ *:-+: *$/, tableAlignLeft: /^ *:-+ *$/, startATag: /^<a /i, endATag: /^<\/a>/i, startPreScriptTag: /^<(pre|code|kbd|script)(\s|>)/i, endPreScriptTag: /^<\/(pre|code|kbd|script)(\s|>)/i, startAngleBracket: /^</, endAngleBracket: />$/, pedanticHrefTitle: /^([^'"]*[^\s])\s+(['"])(.*)\2/, unicodeAlphaNumeric: /[\p{L}\p{N}]/u, escapeTest: /[&<>"']/, escapeReplace: /[&<>"']/g, escapeTestNoEncode: /[<>"']|&(?!(#\d{1,7}|#[Xx][a-fA-F0-9]{1,6}|\w+);)/, escapeReplaceNoEncode: /[<>"']|&(?!(#\d{1,7}|#[Xx][a-fA-F0-9]{1,6}|\w+);)/g, unescapeTest: /&(#(?:\d+)|(?:#x[0-9A-Fa-f]+)|(?:\w+));?/ig, caret: /(^|[^\[])\^/g, percentDecode: /%25/g, findPipe: /\|/g, splitPipe: / \|/, slashPipe: /\\\|/g, carriageReturn: /\r\n|\r/g, spaceLine: /^ +$/gm, notSpaceStart: /^\S*/, endingNewline: /\n$/, listItemRegex: (s) => new RegExp(`^( {0,3}${s})((?:[ ][^\\n]*)?(?:\\n|$))`), nextBulletRegex: (s) => new RegExp(`^ {0,${Math.min(3, s - 1)}}(?:[*+-]|\\d{1,9}[.)])((?:[ ][^\\n]*)?(?:\\n|$))`), hrRegex: (s) => new RegExp(`^ {0,${Math.min(3, s - 1)}}((?:- *){3,}|(?:_ *){3,}|(?:\\* *){3,})(?:\\n+|$)`), fencesBeginRegex: (s) => new RegExp(`^ {0,${Math.min(3, s - 1)}}(?:\`\`\`|~~~)`), headingBeginRegex: (s) => new RegExp(`^ {0,${Math.min(3, s - 1)}}#`), htmlBeginRegex: (s) => new RegExp(`^ {0,${Math.min(3, s - 1)}}<(?:[a-z].*>|!--)`, "i") }, zi = /^(?:[ \t]*(?:\n|$))+/, Ui = /^((?: {4}| {0,3}\t)[^\n]+(?:\n(?:[ \t]*(?:\n|$))*)?)+/, Fi = /^ {0,3}(`{3,}(?=[^`\n]*(?:\n|$))|~{3,})([^\n]*)(?:\n|$)(?:|([\s\S]*?)(?:\n|$))(?: {0,3}\1[~`]* *(?=\n|$)|$)/, ft = /^ {0,3}((?:-[\t ]*){3,}|(?:_[ \t]*){3,}|(?:\*[ \t]*){3,})(?:\n+|$)/, Bi = /^ {0,3}(#{1,6})(?=\s|$)(.*)(?:\n+|$)/, zs = /(?:[*+-]|\d{1,9}[.)])/, Tn = /^(?!bull |blockCode|fences|blockquote|heading|html|table)((?:.|\n(?!\s*?\n|bull |blockCode|fences|blockquote|heading|html|table))+?)\n {0,3}(=+|-+) *(?:\n+|$)/, Cn = S(Tn).replace(/bull/g, zs).replace(/blockCode/g, /(?: {4}| {0,3}\t)/).replace(/fences/g, / {0,3}(?:`{3,}|~{3,})/).replace(/blockquote/g, / {0,3}>/).replace(/heading/g, / {0,3}#{1,6}/).replace(/html/g, / {0,3}<[^\n>]+>\n/).replace(/\|table/g, "").getRegex(), Hi = S(Tn).replace(/bull/g, zs).replace(/blockCode/g, /(?: {4}| {0,3}\t)/).replace(/fences/g, / {0,3}(?:`{3,}|~{3,})/).replace(/blockquote/g, / {0,3}>/).replace(/heading/g, / {0,3}#{1,6}/).replace(/html/g, / {0,3}<[^\n>]+>\n/).replace(/table/g, / {0,3}\|?(?:[:\- ]*\|)+[\:\- ]*\n/).getRegex(), Us = /^([^\n]+(?:\n(?!hr|heading|lheading|blockquote|fences|list|html|table| +\n)[^\n]+)*)/, ji = /^[^\n]+/, Fs = /(?!\s*\])(?:\\.|[^\[\]\\])+/, qi = S(/^ {0,3}\[(label)\]: *(?:\n[ \t]*)?([^<\s][^\s]*|<.*?>)(?:(?: +(?:\n[ \t]*)?| *\n[ \t]*)(title))? *(?:\n+|$)/).replace("label", Fs).replace("title", /(?:"(?:\\"?|[^"\\])*"|'[^'\n]*(?:\n[^'\n]+)*\n?'|\([^()]*\))/).getRegex(), Wi = S(/^( {0,3}bull)([ \t][^\n]+?)?(?:\n|$)/).replace(/bull/g, zs).getRegex(), jt = "address|article|aside|base|basefont|blockquote|body|caption|center|col|colgroup|dd|details|dialog|dir|div|dl|dt|fieldset|figcaption|figure|footer|form|frame|frameset|h[1-6]|head|header|hr|html|iframe|legend|li|link|main|menu|menuitem|meta|nav|noframes|ol|optgroup|option|p|param|search|section|summary|table|tbody|td|tfoot|th|thead|title|tr|track|ul", Bs = /<!--(?:-?>|[\s\S]*?(?:-->|$))/, Vi = S("^ {0,3}(?:<(script|pre|style|textarea)[\\s>][\\s\\S]*?(?:</\\1>[^\\n]*\\n+|$)|comment[^\\n]*(\\n+|$)|<\\?[\\s\\S]*?(?:\\?>\\n*|$)|<![A-Z][\\s\\S]*?(?:>\\n*|$)|<!\\[CDATA\\[[\\s\\S]*?(?:\\]\\]>\\n*|$)|</?(tag)(?: +|\\n|/?>)[\\s\\S]*?(?:(?:\\n[ ]*)+\\n|$)|<(?!script|pre|style|textarea)([a-z][\\w-]*)(?:attribute)*? */?>(?=[ \\t]*(?:\\n|$))[\\s\\S]*?(?:(?:\\n[ ]*)+\\n|$)|</(?!script|pre|style|textarea)[a-z][\\w-]*\\s*>(?=[ \\t]*(?:\\n|$))[\\s\\S]*?(?:(?:\\n[ ]*)+\\n|$))", "i").replace("comment", Bs).replace("tag", jt).replace("attribute", / +[a-zA-Z:_][\w.:-]*(?: *= *"[^"\n]*"| *= *'[^'\n]*'| *= *[^\s"'=<>`]+)?/).getRegex(), In = S(Us).replace("hr", ft).replace("heading", " {0,3}#{1,6}(?:\\s|$)").replace("|lheading", "").replace("|table", "").replace("blockquote", " {0,3}>").replace("fences", " {0,3}(?:`{3,}(?=[^`\\n]*\\n)|~{3,})[^\\n]*\\n").replace("list", " {0,3}(?:[*+-]|1[.)]) ").replace("html", "</?(?:tag)(?: +|\\n|/?>)|<(?:script|pre|style|textarea|!--)").replace("tag", jt).getRegex(), Gi = S(/^( {0,3}> ?(paragraph|[^\n]*)(?:\n|$))+/).replace("paragraph", In).getRegex(), Hs = { blockquote: Gi, code: Ui, def: qi, fences: Fi, heading: Bi, hr: ft, html: Vi, lheading: Cn, list: Wi, newline: zi, paragraph: In, table: it, text: ji }, Ur = S("^ *([^\\n ].*)\\n {0,3}((?:\\| *)?:?-+:? *(?:\\| *:?-+:? *)*(?:\\| *)?)(?:\\n((?:(?! *\\n|hr|heading|blockquote|code|fences|list|html).*(?:\\n|$))*)\\n*|$)").replace("hr", ft).replace("heading", " {0,3}#{1,6}(?:\\s|$)").replace("blockquote", " {0,3}>").replace("code", "(?: {4}| {0,3} )[^\\n]").replace("fences", " {0,3}(?:`{3,}(?=[^`\\n]*\\n)|~{3,})[^\\n]*\\n").replace("list", " {0,3}(?:[*+-]|1[.)]) ").replace("html", "</?(?:tag)(?: +|\\n|/?>)|<(?:script|pre|style|textarea|!--)").replace("tag", jt).getRegex(), Yi = { ...Hs, lheading: Hi, table: Ur, paragraph: S(Us).replace("hr", ft).replace("heading", " {0,3}#{1,6}(?:\\s|$)").replace("|lheading", "").replace("table", Ur).replace("blockquote", " {0,3}>").replace("fences", " {0,3}(?:`{3,}(?=[^`\\n]*\\n)|~{3,})[^\\n]*\\n").replace("list", " {0,3}(?:[*+-]|1[.)]) ").replace("html", "</?(?:tag)(?: +|\\n|/?>)|<(?:script|pre|style|textarea|!--)").replace("tag", jt).getRegex() }, Xi = { ...Hs, html: S(`^ *(?:comment *(?:\\n|\\s*$)|<(tag)[\\s\\S]+?</\\1> *(?:\\n{2,}|\\s*$)|<tag(?:"[^"]*"|'[^']*'|\\s[^'"/>\\s]*)*?/?> *(?:\\n{2,}|\\s*$))`).replace("comment", Bs).replace(/tag/g, "(?!(?:a|em|strong|small|s|cite|q|dfn|abbr|data|time|code|var|samp|kbd|sub|sup|i|b|u|mark|ruby|rt|rp|bdi|bdo|span|br|wbr|ins|del|img)\\b)\\w+(?!:|[^\\w\\s@]*@)\\b").getRegex(), def: /^ *\[([^\]]+)\]: *<?([^\s>]+)>?(?: +(["(][^\n]+[")]))? *(?:\n+|$)/, heading: /^(#{1,6})(.*)(?:\n+|$)/, fences: it, lheading: /^(.+?)\n {0,3}(=+|-+) *(?:\n+|$)/, paragraph: S(Us).replace("hr", ft).replace("heading", ` *#{1,6} *[^
1491
+ ]`).replace("lheading", Cn).replace("|table", "").replace("blockquote", " {0,3}>").replace("|fences", "").replace("|list", "").replace("|html", "").replace("|tag", "").getRegex() }, Zi = /^\\([!"#$%&'()*+,\-./:;<=>?@\[\]\\^_`{|}~])/, Ki = /^(`+)([^`]|[^`][\s\S]*?[^`])\1(?!`)/, An = /^( {2,}|\\)\n(?!\s*$)/, Ji = /^(`+|[^`])(?:(?= {2,}\n)|[\s\S]*?(?:(?=[\\<!\[`*_]|\b_|$)|[^ ](?= {2,}\n)))/, qt = /[\p{P}\p{S}]/u, js = /[\s\p{P}\p{S}]/u, Rn = /[^\s\p{P}\p{S}]/u, Qi = S(/^((?![*_])punctSpace)/, "u").replace(/punctSpace/g, js).getRegex(), $n = /(?!~)[\p{P}\p{S}]/u, ea = /(?!~)[\s\p{P}\p{S}]/u, ta = /(?:[^\s\p{P}\p{S}]|~)/u, sa = /\[[^[\]]*?\]\((?:\\.|[^\\\(\)]|\((?:\\.|[^\\\(\)])*\))*\)|`[^`]*?`|<(?! )[^<>]*?>/g, Pn = /^(?:\*+(?:((?!\*)punct)|[^\s*]))|^_+(?:((?!_)punct)|([^\s_]))/, ra = S(Pn, "u").replace(/punct/g, qt).getRegex(), na = S(Pn, "u").replace(/punct/g, $n).getRegex(), Mn = "^[^_*]*?__[^_*]*?\\*[^_*]*?(?=__)|[^*]+(?=[^*])|(?!\\*)punct(\\*+)(?=[\\s]|$)|notPunctSpace(\\*+)(?!\\*)(?=punctSpace|$)|(?!\\*)punctSpace(\\*+)(?=notPunctSpace)|[\\s](\\*+)(?!\\*)(?=punct)|(?!\\*)punct(\\*+)(?!\\*)(?=punct)|notPunctSpace(\\*+)(?=notPunctSpace)", oa = S(Mn, "gu").replace(/notPunctSpace/g, Rn).replace(/punctSpace/g, js).replace(/punct/g, qt).getRegex(), ia = S(Mn, "gu").replace(/notPunctSpace/g, ta).replace(/punctSpace/g, ea).replace(/punct/g, $n).getRegex(), aa = S("^[^_*]*?\\*\\*[^_*]*?_[^_*]*?(?=\\*\\*)|[^_]+(?=[^_])|(?!_)punct(_+)(?=[\\s]|$)|notPunctSpace(_+)(?!_)(?=punctSpace|$)|(?!_)punctSpace(_+)(?=notPunctSpace)|[\\s](_+)(?!_)(?=punct)|(?!_)punct(_+)(?!_)(?=punct)", "gu").replace(/notPunctSpace/g, Rn).replace(/punctSpace/g, js).replace(/punct/g, qt).getRegex(), la = S(/\\(punct)/, "gu").replace(/punct/g, qt).getRegex(), ca = S(/^<(scheme:[^\s\x00-\x1f<>]*|email)>/).replace("scheme", /[a-zA-Z][a-zA-Z0-9+.-]{1,31}/).replace("email", /[a-zA-Z0-9.!#$%&'*+/=?^_`{|}~-]+(@)[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?(?:\.[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?)+(?![-_])/).getRegex(), ha = S(Bs).replace("(?:-->|$)", "-->").getRegex(), da = S("^comment|^</[a-zA-Z][\\w:-]*\\s*>|^<[a-zA-Z][\\w-]*(?:attribute)*?\\s*/?>|^<\\?[\\s\\S]*?\\?>|^<![a-zA-Z]+\\s[\\s\\S]*?>|^<!\\[CDATA\\[[\\s\\S]*?\\]\\]>").replace("comment", ha).replace("attribute", /\s+[a-zA-Z:_][\w.:-]*(?:\s*=\s*"[^"]*"|\s*=\s*'[^']*'|\s*=\s*[^\s"'=<>`]+)?/).getRegex(), Ot = /(?:\[(?:\\.|[^\[\]\\])*\]|\\.|`[^`]*`|[^\[\]\\`])*?/, pa = S(/^!?\[(label)\]\(\s*(href)(?:(?:[ \t]*(?:\n[ \t]*)?)(title))?\s*\)/).replace("label", Ot).replace("href", /<(?:\\.|[^\n<>\\])+>|[^ \t\n\x00-\x1f]*/).replace("title", /"(?:\\"?|[^"\\])*"|'(?:\\'?|[^'\\])*'|\((?:\\\)?|[^)\\])*\)/).getRegex(), Dn = S(/^!?\[(label)\]\[(ref)\]/).replace("label", Ot).replace("ref", Fs).getRegex(), On = S(/^!?\[(ref)\](?:\[\])?/).replace("ref", Fs).getRegex(), ua = S("reflink|nolink(?!\\()", "g").replace("reflink", Dn).replace("nolink", On).getRegex(), qs = { _backpedal: it, anyPunctuation: la, autolink: ca, blockSkip: sa, br: An, code: Ki, del: it, emStrongLDelim: ra, emStrongRDelimAst: oa, emStrongRDelimUnd: aa, escape: Zi, link: pa, nolink: On, punctuation: Qi, reflink: Dn, reflinkSearch: ua, tag: da, text: Ji, url: it }, ga = { ...qs, link: S(/^!?\[(label)\]\((.*?)\)/).replace("label", Ot).getRegex(), reflink: S(/^!?\[(label)\]\s*\[([^\]]*)\]/).replace("label", Ot).getRegex() }, Ss = { ...qs, emStrongRDelimAst: ia, emStrongLDelim: na, url: S(/^((?:ftp|https?):\/\/|www\.)(?:[a-zA-Z0-9\-]+\.?)+[^\s<]*|^email/, "i").replace("email", /[A-Za-z0-9._+-]+(@)[a-zA-Z0-9-_]+(?:\.[a-zA-Z0-9-_]*[a-zA-Z0-9])+(?![-_])/).getRegex(), _backpedal: /(?:[^?!.,:;*_'"~()&]+|\([^)]*\)|&(?![a-zA-Z0-9]+;$)|[?!.,:;*_'"~)]+(?!$))+/, del: /^(~~?)(?=[^\s~])((?:\\.|[^\\])*?(?:\\.|[^\s~\\]))\1(?=[^~]|$)/, text: /^([`~]+|[^`~])(?:(?= {2,}\n)|(?=[a-zA-Z0-9.!#$%&'*+\/=?_`{\|}~-]+@)|[\s\S]*?(?:(?=[\\<!\[`*~_]|\b_|https?:\/\/|ftp:\/\/|www\.|$)|[^ ](?= {2,}\n)|[^a-zA-Z0-9.!#$%&'*+\/=?_`{\|}~-](?=[a-zA-Z0-9.!#$%&'*+\/=?_`{\|}~-]+@)))/ }, fa = { ...Ss, br: S(An).replace("{2,}", "*").getRegex(), text: S(Ss.text).replace("\\b_", "\\b_| {2,}\\n").replace(/\{2,\}/g, "*").getRegex() }, It = { normal: Hs, gfm: Yi, pedantic: Xi }, st = { normal: qs, gfm: Ss, breaks: fa, pedantic: ga }, ma = { "&": "&amp;", "<": "&lt;", ">": "&gt;", '"': "&quot;", "'": "&#39;" }, Fr = (s) => ma[s];
1492
1492
  function ce(s, e) {
1493
1493
  if (e) {
1494
- if (G.escapeTest.test(s)) return s.replace(G.escapeReplace, Ur);
1495
- } else if (G.escapeTestNoEncode.test(s)) return s.replace(G.escapeReplaceNoEncode, Ur);
1494
+ if (G.escapeTest.test(s)) return s.replace(G.escapeReplace, Fr);
1495
+ } else if (G.escapeTestNoEncode.test(s)) return s.replace(G.escapeReplaceNoEncode, Fr);
1496
1496
  return s;
1497
1497
  }
1498
1498
  function Br(s) {
@@ -1829,7 +1829,7 @@ ${u}` : u;
1829
1829
  return { type: "text", raw: e[0], text: e[0], escaped: t };
1830
1830
  }
1831
1831
  }
1832
- }, we = class Ss {
1832
+ }, we = class Es {
1833
1833
  tokens;
1834
1834
  options;
1835
1835
  state;
@@ -1844,10 +1844,10 @@ ${u}` : u;
1844
1844
  return { block: It, inline: st };
1845
1845
  }
1846
1846
  static lex(e, t) {
1847
- return new Ss(t).lex(e);
1847
+ return new Es(t).lex(e);
1848
1848
  }
1849
1849
  static lexInline(e, t) {
1850
- return new Ss(t).inlineTokens(e);
1850
+ return new Es(t).inlineTokens(e);
1851
1851
  }
1852
1852
  lex(e) {
1853
1853
  e = e.replace(G.carriageReturn, `
@@ -2156,7 +2156,7 @@ ${s}</tr>
2156
2156
  text(s) {
2157
2157
  return "tokens" in s && s.tokens ? this.parser.parseInline(s.tokens) : "escaped" in s && s.escaped ? s.text : ce(s.text);
2158
2158
  }
2159
- }, qs = class {
2159
+ }, Ws = class {
2160
2160
  strong({ text: s }) {
2161
2161
  return s;
2162
2162
  }
@@ -2184,18 +2184,18 @@ ${s}</tr>
2184
2184
  br() {
2185
2185
  return "";
2186
2186
  }
2187
- }, be = class Es {
2187
+ }, be = class Ts {
2188
2188
  options;
2189
2189
  renderer;
2190
2190
  textRenderer;
2191
2191
  constructor(e) {
2192
- this.options = e || Ne, this.options.renderer = this.options.renderer || new Nt(), this.renderer = this.options.renderer, this.renderer.options = this.options, this.renderer.parser = this, this.textRenderer = new qs();
2192
+ this.options = e || Ne, this.options.renderer = this.options.renderer || new Nt(), this.renderer = this.options.renderer, this.renderer.options = this.options, this.renderer.parser = this, this.textRenderer = new Ws();
2193
2193
  }
2194
2194
  static parse(e, t) {
2195
- return new Es(t).parse(e);
2195
+ return new Ts(t).parse(e);
2196
2196
  }
2197
2197
  static parseInline(e, t) {
2198
- return new Es(t).parseInline(e);
2198
+ return new Ts(t).parseInline(e);
2199
2199
  }
2200
2200
  parse(e, t = !0) {
2201
2201
  let n = "";
@@ -2351,13 +2351,13 @@ ${s}</tr>
2351
2351
  return this.block ? be.parse : be.parseInline;
2352
2352
  }
2353
2353
  }, va = class {
2354
- defaults = Ls();
2354
+ defaults = Ns();
2355
2355
  options = this.setOptions;
2356
2356
  parse = this.parseMarkdown(!0);
2357
2357
  parseInline = this.parseMarkdown(!1);
2358
2358
  Parser = be;
2359
2359
  Renderer = Nt;
2360
- TextRenderer = qs;
2360
+ TextRenderer = Ws;
2361
2361
  Lexer = we;
2362
2362
  Tokenizer = Lt;
2363
2363
  Hooks = $t;
@@ -2507,7 +2507,7 @@ function x(s, e) {
2507
2507
  x.options = x.setOptions = function(s) {
2508
2508
  return De.setOptions(s), x.defaults = De.defaults, En(x.defaults), x;
2509
2509
  };
2510
- x.getDefaults = Ls;
2510
+ x.getDefaults = Ns;
2511
2511
  x.defaults = Ne;
2512
2512
  x.use = function(...s) {
2513
2513
  return De.use(...s), x.defaults = De.defaults, En(x.defaults), x;
@@ -2519,7 +2519,7 @@ x.parseInline = De.parseInline;
2519
2519
  x.Parser = be;
2520
2520
  x.parser = be.parse;
2521
2521
  x.Renderer = Nt;
2522
- x.TextRenderer = qs;
2522
+ x.TextRenderer = Ws;
2523
2523
  x.Lexer = we;
2524
2524
  x.lexer = we.lex;
2525
2525
  x.Tokenizer = Lt;
@@ -2617,7 +2617,7 @@ var xa = Object.defineProperty, Sa = Object.getOwnPropertyDescriptor, Nn = (s, e
2617
2617
  (i = s[o]) && (r = (n ? i(e, t, r) : i(r)) || r);
2618
2618
  return n && r && xa(e, t, r), r;
2619
2619
  };
2620
- let Ts = class extends mt {
2620
+ let Cs = class extends mt {
2621
2621
  constructor() {
2622
2622
  super(...arguments), this.citationsExpanded = !1;
2623
2623
  }
@@ -2638,7 +2638,7 @@ let Ts = class extends mt {
2638
2638
  <div class="flex size-4 items-center justify-center">${M(ht)}</div>
2639
2639
  <span class="text-sm font-medium">GAiA</span>
2640
2640
  </div>
2641
- ${xr(
2641
+ ${Sr(
2642
2642
  [this.message.citations.length, this.citationsExpanded],
2643
2643
  () => this.message.citations.length ? b`<div class="text-primary-800 hover:text-primary-900 text-xs font-semibold">
2644
2644
  <a
@@ -2689,7 +2689,7 @@ let Ts = class extends mt {
2689
2689
  )}`;
2690
2690
  }
2691
2691
  renderBody() {
2692
- return xr(this.message.content.length, () => b` <div class="prose prose-gaia prose-table:min-w-max">
2692
+ return Sr(this.message.content.length, () => b` <div class="prose prose-gaia prose-table:min-w-max">
2693
2693
  ${nn(ya(this.message.content))}
2694
2694
  </div>`);
2695
2695
  }
@@ -2730,10 +2730,10 @@ let Ts = class extends mt {
2730
2730
  };
2731
2731
  Nn([
2732
2732
  Se()
2733
- ], Ts.prototype, "citationsExpanded", 2);
2734
- Ts = Nn([
2733
+ ], Cs.prototype, "citationsExpanded", 2);
2734
+ Cs = Nn([
2735
2735
  te("gaia-chat-assistant-message")
2736
- ], Ts);
2736
+ ], Cs);
2737
2737
  const zn = '<svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="lucide lucide-headset-icon lucide-headset"><path d="M3 11h3a2 2 0 0 1 2 2v3a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2v-5Zm0 0a9 9 0 1 1 18 0m0 0v5a2 2 0 0 1-2 2h-1a2 2 0 0 1-2-2v-3a2 2 0 0 1 2-2h3Z"/><path d="M21 16v2a4 4 0 0 1-4 4h-5"/></svg>';
2738
2738
  var Ea = Object.getOwnPropertyDescriptor, Ta = (s, e, t, n) => {
2739
2739
  for (var r = n > 1 ? void 0 : n ? Ea(e, t) : e, o = s.length - 1, i; o >= 0; o--)
@@ -2789,10 +2789,10 @@ let Vr = class extends mt {
2789
2789
  return this.message.isVisuallyHidden;
2790
2790
  }
2791
2791
  clearConversation() {
2792
- this.dispatchEvent(new Ds());
2792
+ this.dispatchEvent(new Os());
2793
2793
  }
2794
2794
  openFeedbackForm() {
2795
- this.dispatchEvent(new Ms("support"));
2795
+ this.dispatchEvent(new Ds("support"));
2796
2796
  }
2797
2797
  renderBody() {
2798
2798
  return this.message.isSupportStartedMarker ? b`<div
@@ -2851,7 +2851,7 @@ let Vr = class extends mt {
2851
2851
  </div>
2852
2852
  <div class="flex [grid-area:leading]">
2853
2853
  <div class="text-primary-900 flex size-5 items-center justify-center">
2854
- ${M(Ps)}
2854
+ ${M(Ms)}
2855
2855
  </div>
2856
2856
  </div>
2857
2857
  </div>` : V;
@@ -2903,7 +2903,7 @@ Yr = Pa([
2903
2903
  te("gaia-chat-thinking-indicator")
2904
2904
  ], Yr);
2905
2905
  const Ma = '<svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="lucide lucide-lightbulb-icon lucide-lightbulb"><path d="M15 14c.2-1 .7-1.7 1.5-2.5 1-.9 1.5-2.2 1.5-3.5A6 6 0 0 0 6 8c0 1 .2 2.2 1.5 3.5.7.7 1.3 1.5 1.5 2.5"/><path d="M9 18h6"/><path d="M10 22h4"/></svg>', Da = '<svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="lucide lucide-message-circle-icon lucide-message-circle"><path d="M2.992 16.342a2 2 0 0 1 .094 1.167l-1.065 3.29a1 1 0 0 0 1.236 1.168l3.413-.998a2 2 0 0 1 1.099.092 10 10 0 1 0-4.777-4.719"/></svg>';
2906
- var Oa = Object.defineProperty, La = Object.getOwnPropertyDescriptor, Ws = (s, e, t, n) => {
2906
+ var Oa = Object.defineProperty, La = Object.getOwnPropertyDescriptor, Vs = (s, e, t, n) => {
2907
2907
  for (var r = n > 1 ? void 0 : n ? La(e, t) : e, o = s.length - 1, i; o >= 0; o--)
2908
2908
  (i = s[o]) && (r = (n ? i(e, t, r) : i(r)) || r);
2909
2909
  return n && r && Oa(e, t, r), r;
@@ -2994,17 +2994,17 @@ let zt = class extends ie {
2994
2994
  `;
2995
2995
  }
2996
2996
  };
2997
- Ws([
2997
+ Vs([
2998
2998
  T({ attribute: !1 })
2999
2999
  ], zt.prototype, "isInitialized", 2);
3000
- Ws([
3000
+ Vs([
3001
3001
  T({ attribute: !1 })
3002
3002
  ], zt.prototype, "welcomeMessages", 2);
3003
- zt = Ws([
3003
+ zt = Vs([
3004
3004
  te("gaia-chat-welcome-message")
3005
3005
  ], zt);
3006
- var za = Object.defineProperty, Fa = Object.getOwnPropertyDescriptor, he = (s, e, t, n) => {
3007
- for (var r = n > 1 ? void 0 : n ? Fa(e, t) : e, o = s.length - 1, i; o >= 0; o--)
3006
+ var za = Object.defineProperty, Ua = Object.getOwnPropertyDescriptor, he = (s, e, t, n) => {
3007
+ for (var r = n > 1 ? void 0 : n ? Ua(e, t) : e, o = s.length - 1, i; o >= 0; o--)
3008
3008
  (i = s[o]) && (r = (n ? i(e, t, r) : i(r)) || r);
3009
3009
  return n && r && za(e, t, r), r;
3010
3010
  };
@@ -3134,12 +3134,12 @@ he([
3134
3134
  ae = he([
3135
3135
  te("gaia-chat-message-list")
3136
3136
  ], ae);
3137
- class Fn extends Error {
3137
+ class Un extends Error {
3138
3138
  constructor(e, t) {
3139
3139
  super(e), this.innerError = t, this.name = "SignalRError";
3140
3140
  }
3141
3141
  }
3142
- class Vs extends Error {
3142
+ class Gs extends Error {
3143
3143
  constructor(e, t, n) {
3144
3144
  super(t), this.innerError = e, this.errorType = n;
3145
3145
  }
@@ -3233,7 +3233,7 @@ function wt(s) {
3233
3233
  source: "http",
3234
3234
  http: { status: s.status, url: s.url },
3235
3235
  cause: s
3236
- } : s instanceof Vs ? s.errorType && s.errorType === "ProfileNotFoundException" ? {
3236
+ } : s instanceof Gs ? s.errorType && s.errorType === "ProfileNotFoundException" ? {
3237
3237
  code: "NOT_FOUND",
3238
3238
  message: v("Failed to load the current profile. Are you using the correct profile?", {
3239
3239
  id: "error-profile-not-found"
@@ -3245,7 +3245,7 @@ function wt(s) {
3245
3245
  retryable: !0,
3246
3246
  source: "sse",
3247
3247
  cause: s
3248
- } : s instanceof Fn ? {
3248
+ } : s instanceof Un ? {
3249
3249
  code: "WS",
3250
3250
  message: v("Live chat connection error. Reconnecting might help.", {
3251
3251
  id: "error-ws-error"
@@ -3261,11 +3261,11 @@ function wt(s) {
3261
3261
  cause: s
3262
3262
  };
3263
3263
  }
3264
- const Un = {
3264
+ const Fn = {
3265
3265
  initialized: !1,
3266
3266
  maxInputLength: 2e3,
3267
3267
  welcomeMessages: {}
3268
- }, Ua = () => ({
3268
+ }, Fa = () => ({
3269
3269
  type: "config/setInitialized"
3270
3270
  }), Ba = (s) => ({
3271
3271
  type: "config/set",
@@ -3273,7 +3273,7 @@ const Un = {
3273
3273
  }), Ha = () => ({
3274
3274
  type: "config/clear"
3275
3275
  });
3276
- function ja(s = Un, e) {
3276
+ function ja(s = Fn, e) {
3277
3277
  switch (e.type) {
3278
3278
  case "config/setInitialized":
3279
3279
  return {
@@ -3366,19 +3366,19 @@ const Hn = {
3366
3366
  isActive: !0,
3367
3367
  isThinking: !1,
3368
3368
  isBusy: !1
3369
- }, Ft = (s) => ({
3369
+ }, Ut = (s) => ({
3370
3370
  type: "session/set-conversation-id",
3371
3371
  payload: s
3372
3372
  }), at = (s) => ({
3373
3373
  type: "session/set-cursor-id",
3374
3374
  payload: s
3375
- }), Gs = (s) => ({
3375
+ }), Ys = (s) => ({
3376
3376
  type: "session/set-channel",
3377
3377
  payload: s
3378
- }), Cs = (s) => ({
3378
+ }), Is = (s) => ({
3379
3379
  type: "session/set-thinking",
3380
3380
  payload: s
3381
- }), Ut = (s) => ({
3381
+ }), Ft = (s) => ({
3382
3382
  type: "session/set-busy",
3383
3383
  payload: s
3384
3384
  });
@@ -3426,7 +3426,7 @@ const jn = {
3426
3426
  }, Xa = (s) => ({
3427
3427
  type: "ui/open-feedback-form",
3428
3428
  payload: { target: s }
3429
- }), Is = () => ({
3429
+ }), As = () => ({
3430
3430
  type: "ui/close-feedback-form"
3431
3431
  }), xe = (s) => ({
3432
3432
  type: "ui/set-error",
@@ -3465,16 +3465,16 @@ function Ka(s = jn, e) {
3465
3465
  return s;
3466
3466
  }
3467
3467
  }
3468
- const As = {
3469
- config: Un,
3468
+ const Rs = {
3469
+ config: Fn,
3470
3470
  messages: Bn,
3471
3471
  session: Hn,
3472
3472
  ui: jn
3473
3473
  }, qn = "app/reset", Ja = () => ({ type: qn });
3474
3474
  function Qa(s, e) {
3475
3475
  if (e.type === qn)
3476
- return { ...As, config: s.config };
3477
- const t = s ?? As;
3476
+ return { ...Rs, config: s.config };
3477
+ const t = s ?? Rs;
3478
3478
  return {
3479
3479
  config: ja(t.config, e),
3480
3480
  messages: Ga(t.messages, e),
@@ -3483,7 +3483,7 @@ function Qa(s, e) {
3483
3483
  };
3484
3484
  }
3485
3485
  class el {
3486
- constructor(e = Qa, t = As) {
3486
+ constructor(e = Qa, t = Rs) {
3487
3487
  this.listeners = /* @__PURE__ */ new Set(), this.pending = !1, this.state = t, this.reducer = e;
3488
3488
  }
3489
3489
  get snapshot() {
@@ -3514,14 +3514,14 @@ class sl {
3514
3514
  } catch (e) {
3515
3515
  this.store.dispatch(xe(wt(e))), console.error("Failed to load bootstrap configuration:", e);
3516
3516
  } finally {
3517
- this.store.dispatch(Ua());
3517
+ this.store.dispatch(Fa());
3518
3518
  }
3519
3519
  }
3520
3520
  async clear() {
3521
3521
  this.svc.clearBootstrapConfig(), this.store.dispatch(Ha());
3522
3522
  }
3523
3523
  }
3524
- class Rs {
3524
+ class $s {
3525
3525
  constructor() {
3526
3526
  this.key = "gaia-chat:conversation-id";
3527
3527
  }
@@ -3538,17 +3538,17 @@ class Rs {
3538
3538
  }
3539
3539
  class rl {
3540
3540
  constructor(e, t) {
3541
- this.store = e, this.svc = t, this.storage = new Rs();
3541
+ this.store = e, this.svc = t, this.storage = new $s();
3542
3542
  }
3543
3543
  async getHistory() {
3544
3544
  const e = this.storage.load();
3545
3545
  if (e) {
3546
- this.store.dispatch(Ft(e));
3546
+ this.store.dispatch(Ut(e));
3547
3547
  try {
3548
3548
  const t = await this.svc.getConversationHistory(e);
3549
- this.store.dispatch(qa(t.messages)), this.store.dispatch(Gs(t.channel));
3549
+ this.store.dispatch(qa(t.messages)), this.store.dispatch(Ys(t.channel));
3550
3550
  } catch {
3551
- this.store.dispatch(Ft(null)), this.storage.clear();
3551
+ this.store.dispatch(Ut(null)), this.storage.clear();
3552
3552
  }
3553
3553
  }
3554
3554
  }
@@ -3563,23 +3563,23 @@ class nl {
3563
3563
  async submitFeedback(e, t, n) {
3564
3564
  const r = this.store.snapshot.session.conversationId;
3565
3565
  if (r) {
3566
- this.store.dispatch(Ft(r));
3566
+ this.store.dispatch(Ut(r));
3567
3567
  try {
3568
3568
  await this.svc.submitFeedback({
3569
3569
  conversationId: r,
3570
3570
  target: e,
3571
3571
  score: t,
3572
3572
  comment: n
3573
- }), this.store.dispatch(Is());
3573
+ }), this.store.dispatch(As());
3574
3574
  } catch (o) {
3575
3575
  this.store.dispatch(xe(wt(o)));
3576
3576
  }
3577
3577
  }
3578
3578
  }
3579
3579
  }
3580
- const dt = () => crypto.randomUUID(), Ys = () => (/* @__PURE__ */ new Date()).toISOString();
3580
+ const dt = () => crypto.randomUUID(), Xs = () => (/* @__PURE__ */ new Date()).toISOString();
3581
3581
  function Wn(s, e) {
3582
- const t = e?.now?.() ?? Ys();
3582
+ const t = e?.now?.() ?? Xs();
3583
3583
  return {
3584
3584
  messageId: e?.idGen?.() ?? dt(),
3585
3585
  turnId: dt(),
@@ -3591,7 +3591,7 @@ function Wn(s, e) {
3591
3591
  };
3592
3592
  }
3593
3593
  function ol(s) {
3594
- const e = Ys();
3594
+ const e = Xs();
3595
3595
  return {
3596
3596
  messageId: dt(),
3597
3597
  turnId: dt(),
@@ -3606,7 +3606,7 @@ function ol(s) {
3606
3606
  };
3607
3607
  }
3608
3608
  function Xr(s, e, t) {
3609
- const n = t?.now?.() ?? Ys();
3609
+ const n = t?.now?.() ?? Xs();
3610
3610
  return {
3611
3611
  messageId: t?.idGen?.() ?? dt(),
3612
3612
  role: "operator",
@@ -3620,7 +3620,7 @@ function Xr(s, e, t) {
3620
3620
  }
3621
3621
  const il = (s) => ({
3622
3622
  "conversation.start": (e) => {
3623
- s.dispatch(Ft(e.data));
3623
+ s.dispatch(Ut(e.data));
3624
3624
  },
3625
3625
  "turn.start": (e) => {
3626
3626
  const t = s.snapshot.session.cursorId;
@@ -3631,7 +3631,7 @@ const il = (s) => ({
3631
3631
  },
3632
3632
  "assistant.delta": (e) => {
3633
3633
  const t = s.snapshot.session.cursorId;
3634
- t && (s.dispatch(Va(t, e.data)), s.dispatch(Cs(!1)));
3634
+ t && (s.dispatch(Va(t, e.data)), s.dispatch(Is(!1)));
3635
3635
  },
3636
3636
  "assistant.tool": (e) => {
3637
3637
  const t = s.snapshot.session.cursorId;
@@ -3658,12 +3658,12 @@ const il = (s) => ({
3658
3658
  s.dispatch(me(e.data.messageId, { approvalStatus: "declined" }));
3659
3659
  },
3660
3660
  "support.handoff.start": (e) => {
3661
- s.dispatch(_e(e.data.message)), s.dispatch(at(e.data.message.messageId)), s.dispatch(Gs("support"));
3661
+ s.dispatch(_e(e.data.message)), s.dispatch(at(e.data.message.messageId)), s.dispatch(Ys("support"));
3662
3662
  },
3663
3663
  error: (e) => {
3664
3664
  s.dispatch(
3665
3665
  xe(
3666
- wt(new Vs(null, e.data.message ?? "Stream error", e.data.errorType))
3666
+ wt(new Gs(null, e.data.message ?? "Stream error", e.data.errorType))
3667
3667
  )
3668
3668
  );
3669
3669
  }
@@ -3680,7 +3680,7 @@ class al {
3680
3680
  }
3681
3681
  class ll {
3682
3682
  constructor(e, t) {
3683
- this.store = e, this.svc = t, this.tasks = new al(), this.storage = new Rs(), this.handlers = il(this.store), this.storage = new Rs();
3683
+ this.store = e, this.svc = t, this.tasks = new al(), this.storage = new $s(), this.handlers = il(this.store), this.storage = new $s();
3684
3684
  }
3685
3685
  async sendMessage(e, t, n) {
3686
3686
  const r = crypto.randomUUID();
@@ -3740,14 +3740,14 @@ class ll {
3740
3740
  this.tasks.cancel();
3741
3741
  }
3742
3742
  async consume(e) {
3743
- this.store.dispatch(Ut(!0)), this.store.dispatch(Cs(!0));
3743
+ this.store.dispatch(Ft(!0)), this.store.dispatch(Is(!0));
3744
3744
  try {
3745
3745
  for await (const t of e)
3746
3746
  this.handlers[t.event]?.(t);
3747
3747
  } catch (t) {
3748
3748
  console.error("[SSE] stream error", t), this.store.dispatch(Za(wt(t)));
3749
3749
  } finally {
3750
- this.store.dispatch(Cs(!1)), this.store.dispatch(Ut(!1));
3750
+ this.store.dispatch(Is(!1)), this.store.dispatch(Ft(!1));
3751
3751
  }
3752
3752
  }
3753
3753
  requireConversation() {
@@ -3767,7 +3767,7 @@ class Pe extends Error {
3767
3767
  super(`${e}: Status code '${t}'`), this.statusCode = t, this.__proto__ = n;
3768
3768
  }
3769
3769
  }
3770
- class Xs extends Error {
3770
+ class Zs extends Error {
3771
3771
  /** Constructs a new instance of {@link @microsoft/signalr.TimeoutError}.
3772
3772
  *
3773
3773
  * @param {string} errorMessage A descriptive error message.
@@ -4022,7 +4022,7 @@ function vl() {
4022
4022
  function yl() {
4023
4023
  return A.isNode ? "NodeJS" : "Browser";
4024
4024
  }
4025
- function fs(s) {
4025
+ function ms(s) {
4026
4026
  return s.stack ? s.stack : s.message ? s.message : `${s}`;
4027
4027
  }
4028
4028
  function _l() {
@@ -4066,7 +4066,7 @@ class kl extends Wt {
4066
4066
  if (e.timeout) {
4067
4067
  const c = e.timeout;
4068
4068
  r = setTimeout(() => {
4069
- t.abort(), this._logger.log(h.Warning, "Timeout from HTTP request."), n = new Xs();
4069
+ t.abort(), this._logger.log(h.Warning, "Timeout from HTTP request."), n = new Zs();
4070
4070
  }, c);
4071
4071
  }
4072
4072
  e.content === "" && (e.content = void 0), e.content && (e.headers = e.headers || {}, Oe(e.content) ? e.headers["Content-Type"] = "application/octet-stream" : e.headers["Content-Type"] = "text/plain;charset=UTF-8");
@@ -4140,7 +4140,7 @@ class xl extends Wt {
4140
4140
  }, r.onerror = () => {
4141
4141
  this._logger.log(h.Warning, `Error from HTTP request. ${r.status}: ${r.statusText}.`), n(new Pe(r.statusText, r.status));
4142
4142
  }, r.ontimeout = () => {
4143
- this._logger.log(h.Warning, "Timeout from HTTP request."), n(new Xs());
4143
+ this._logger.log(h.Warning, "Timeout from HTTP request."), n(new Zs());
4144
4144
  }, r.send(e.content);
4145
4145
  }) : Promise.reject(new Error("No url defined.")) : Promise.reject(new Error("No method defined."));
4146
4146
  }
@@ -4328,14 +4328,14 @@ var I;
4328
4328
  (function(s) {
4329
4329
  s.Disconnected = "Disconnected", s.Connecting = "Connecting", s.Connected = "Connected", s.Disconnecting = "Disconnecting", s.Reconnecting = "Reconnecting";
4330
4330
  })(I || (I = {}));
4331
- class Zs {
4331
+ class Ks {
4332
4332
  /** @internal */
4333
4333
  // Using a public static factory method means we can have a private constructor and an _internal_
4334
4334
  // create method that can be used by HubConnectionBuilder. An "internal" constructor would just
4335
4335
  // be stripped away and the '.d.ts' file would have no constructor, which is interpreted as a
4336
4336
  // public parameter-less constructor.
4337
4337
  static create(e, t, n, r, o, i, a) {
4338
- return new Zs(e, t, n, r, o, i, a);
4338
+ return new Ks(e, t, n, r, o, i, a);
4339
4339
  }
4340
4340
  constructor(e, t, n, r, o, i, a) {
4341
4341
  this._nextKeepAlive = 0, this._freezeEventListener = () => {
@@ -4550,7 +4550,7 @@ class Zs {
4550
4550
  switch (n.type) {
4551
4551
  case m.Invocation:
4552
4552
  this._invokeClientMethod(n).catch((r) => {
4553
- this._logger.log(h.Error, `Invoke client method threw error: ${fs(r)}`);
4553
+ this._logger.log(h.Error, `Invoke client method threw error: ${ms(r)}`);
4554
4554
  });
4555
4555
  break;
4556
4556
  case m.StreamItem:
@@ -4561,7 +4561,7 @@ class Zs {
4561
4561
  try {
4562
4562
  r(n);
4563
4563
  } catch (o) {
4564
- this._logger.log(h.Error, `Stream callback threw error: ${fs(o)}`);
4564
+ this._logger.log(h.Error, `Stream callback threw error: ${ms(o)}`);
4565
4565
  }
4566
4566
  }
4567
4567
  break;
@@ -4717,7 +4717,7 @@ class Zs {
4717
4717
  try {
4718
4718
  r(null, e);
4719
4719
  } catch (o) {
4720
- this._logger.log(h.Error, `Stream 'error' callback called with '${e}' threw error: ${fs(o)}`);
4720
+ this._logger.log(h.Error, `Stream 'error' callback called with '${e}' threw error: ${ms(o)}`);
4721
4721
  }
4722
4722
  });
4723
4723
  }
@@ -4914,7 +4914,7 @@ class Qr {
4914
4914
  const r = await this._httpClient.get(n, t);
4915
4915
  r.statusCode === 204 ? (this._logger.log(h.Information, "(LongPolling transport) Poll terminated by server."), this._running = !1) : r.statusCode !== 200 ? (this._logger.log(h.Error, `(LongPolling transport) Unexpected response code: ${r.statusCode}.`), this._closeError = new Pe(r.statusText || "", r.statusCode), this._running = !1) : r.content ? (this._logger.log(h.Trace, `(LongPolling transport) data received. ${ut(r.content, this._options.logMessageContent)}.`), this.onreceive && this.onreceive(r.content)) : this._logger.log(h.Trace, "(LongPolling transport) Poll timed out, reissuing.");
4916
4916
  } catch (n) {
4917
- this._running ? n instanceof Xs ? this._logger.log(h.Trace, "(LongPolling transport) Poll timed out, reissuing.") : (this._closeError = n, this._running = !1) : this._logger.log(h.Trace, `(LongPolling transport) Poll errored after shutdown: ${n.message}`);
4917
+ this._running ? n instanceof Zs ? this._logger.log(h.Trace, "(LongPolling transport) Poll timed out, reissuing.") : (this._closeError = n, this._running = !1) : this._logger.log(h.Trace, `(LongPolling transport) Poll errored after shutdown: ${n.message}`);
4918
4918
  }
4919
4919
  } finally {
4920
4920
  this._logger.log(h.Trace, "(LongPolling transport) Polling complete."), this.pollAborted || this._raiseOnClose();
@@ -5089,7 +5089,7 @@ class Nl {
5089
5089
  this._connectionStarted = !0;
5090
5090
  }
5091
5091
  send(e) {
5092
- return this._connectionState !== "Connected" ? Promise.reject(new Error("Cannot send data if the connection is not in the 'Connected' State.")) : (this._sendQueue || (this._sendQueue = new Ks(this.transport)), this._sendQueue.send(e));
5092
+ return this._connectionState !== "Connected" ? Promise.reject(new Error("Cannot send data if the connection is not in the 'Connected' State.")) : (this._sendQueue || (this._sendQueue = new Js(this.transport)), this._sendQueue.send(e));
5093
5093
  }
5094
5094
  async stop(e) {
5095
5095
  if (this._connectionState === "Disconnected")
@@ -5297,7 +5297,7 @@ class Nl {
5297
5297
  function zl(s, e) {
5298
5298
  return !s || (e & s) !== 0;
5299
5299
  }
5300
- class Ks {
5300
+ class Js {
5301
5301
  constructor(e) {
5302
5302
  this._transport = e, this._buffer = [], this._executing = !0, this._sendBufferedData = new At(), this._transportResult = new At(), this._sendLoopPromise = this._sendLoop();
5303
5303
  }
@@ -5321,7 +5321,7 @@ class Ks {
5321
5321
  this._sendBufferedData = new At();
5322
5322
  const e = this._transportResult;
5323
5323
  this._transportResult = void 0;
5324
- const t = typeof this._buffer[0] == "string" ? this._buffer.join("") : Ks._concatBuffers(this._buffer);
5324
+ const t = typeof this._buffer[0] == "string" ? this._buffer.join("") : Js._concatBuffers(this._buffer);
5325
5325
  this._buffer.length = 0;
5326
5326
  try {
5327
5327
  await this._transport.send(t), e.resolve();
@@ -5349,10 +5349,10 @@ class At {
5349
5349
  this._rejecter(e);
5350
5350
  }
5351
5351
  }
5352
- const Fl = "json";
5353
- class Ul {
5352
+ const Ul = "json";
5353
+ class Fl {
5354
5354
  constructor() {
5355
- this.name = Fl, this.version = 2, this.transferFormat = j.Text;
5355
+ this.name = Ul, this.version = 2, this.transferFormat = j.Text;
5356
5356
  }
5357
5357
  /** Creates an array of {@link @microsoft/signalr.HubMessage} objects from the specified serialized representation.
5358
5358
  *
@@ -5507,7 +5507,7 @@ class jl {
5507
5507
  if (e.logger === void 0 && (e.logger = this.logger), !this.url)
5508
5508
  throw new Error("The 'HubConnectionBuilder.withUrl' method must be called before building the connection.");
5509
5509
  const t = new Nl(this.url, e);
5510
- return Zs.create(t, this.logger || pt.instance, this.protocol || new Ul(), this.reconnectPolicy, this._serverTimeoutInMilliseconds, this._keepAliveIntervalInMilliseconds, this._statefulReconnectBufferSize);
5510
+ return Ks.create(t, this.logger || pt.instance, this.protocol || new Fl(), this.reconnectPolicy, this._serverTimeoutInMilliseconds, this._keepAliveIntervalInMilliseconds, this._statefulReconnectBufferSize);
5511
5511
  }
5512
5512
  }
5513
5513
  function ql(s) {
@@ -5571,7 +5571,7 @@ class Wl {
5571
5571
  }
5572
5572
  }
5573
5573
  onError(e) {
5574
- this.store.dispatch(xe(wt(new Fn("Support connection error", e))));
5574
+ this.store.dispatch(xe(wt(new Un("Support connection error", e))));
5575
5575
  }
5576
5576
  clearTyping(e) {
5577
5577
  const t = this.typingTimeoutByOp.get(e);
@@ -5624,7 +5624,7 @@ class Wl {
5624
5624
  }
5625
5625
  onSupportEnded() {
5626
5626
  const e = ol();
5627
- this.store.dispatch(_e(e)), this.store.dispatch(at(e.messageId)), this.store.dispatch(Gs("assistant"));
5627
+ this.store.dispatch(_e(e)), this.store.dispatch(at(e.messageId)), this.store.dispatch(Ys("assistant"));
5628
5628
  }
5629
5629
  }
5630
5630
  class ve extends CustomEvent {
@@ -5677,13 +5677,16 @@ class Ql extends ve {
5677
5677
  super("close-requested");
5678
5678
  }
5679
5679
  }
5680
- const ec = "2.1.0", tc = {
5680
+ const ec = "2.1.2", tc = {
5681
5681
  version: ec
5682
5682
  };
5683
5683
  class sc {
5684
5684
  constructor(e, t) {
5685
5685
  this.authProvider = e, this.config = t, this.version = tc.version;
5686
5686
  }
5687
+ set baseUrl(e) {
5688
+ this.config.baseUrl = e;
5689
+ }
5687
5690
  async request(e, t = {}) {
5688
5691
  const n = async () => {
5689
5692
  let o;
@@ -5747,7 +5750,7 @@ class nc {
5747
5750
  return e;
5748
5751
  const t = await this.apiClient.request("/api/v1/bootstrap", {
5749
5752
  method: "GET"
5750
- }), n = await $s(t);
5753
+ }), n = await Ps(t);
5751
5754
  return this.storage.save(n), n;
5752
5755
  }
5753
5756
  clearBootstrapConfig() {
@@ -5759,14 +5762,14 @@ class sn extends Error {
5759
5762
  super(e), this.name = "ParseError", this.type = t.type, this.field = t.field, this.value = t.value, this.line = t.line;
5760
5763
  }
5761
5764
  }
5762
- function ms(s) {
5765
+ function ws(s) {
5763
5766
  }
5764
5767
  function oc(s) {
5765
5768
  if (typeof s == "function")
5766
5769
  throw new TypeError(
5767
5770
  "`callbacks` must be an object, got a function instead. Did you mean `{onEvent: fn}`?"
5768
5771
  );
5769
- const { onEvent: e = ms, onError: t = ms, onRetry: n = ms, onComment: r } = s;
5772
+ const { onEvent: e = ws, onError: t = ws, onRetry: n = ws, onComment: r } = s;
5770
5773
  let o = "", i = !0, a, c = "", d = "";
5771
5774
  function u(y) {
5772
5775
  const $ = i ? y.replace(/^\xEF\xBB\xBF/, "") : y, [Q, ye] = ic(`${o}${$}`);
@@ -5877,7 +5880,7 @@ class ac extends TransformStream {
5877
5880
  });
5878
5881
  }
5879
5882
  }
5880
- async function* ws(s, e) {
5883
+ async function* bs(s, e) {
5881
5884
  const t = lc() ? new TextDecoderStream() : cc(), n = s.pipeThrough(t).pipeThrough(new ac()), r = n.getReader();
5882
5885
  try {
5883
5886
  for (; !e?.aborted; ) {
@@ -5886,7 +5889,7 @@ async function* ws(s, e) {
5886
5889
  yield o;
5887
5890
  }
5888
5891
  } catch (o) {
5889
- throw new Vs(o);
5892
+ throw new Gs(o);
5890
5893
  } finally {
5891
5894
  try {
5892
5895
  r.releaseLock();
@@ -5925,7 +5928,7 @@ class hc {
5925
5928
  },
5926
5929
  signal: t
5927
5930
  }), r = as(n);
5928
- for await (const o of ws(r, t))
5931
+ for await (const o of bs(r, t))
5929
5932
  yield this.parseSseEvent(o);
5930
5933
  }
5931
5934
  async *approveToolCall(e, t) {
@@ -5935,7 +5938,7 @@ class hc {
5935
5938
  method: "POST"
5936
5939
  }
5937
5940
  ), r = as(n);
5938
- for await (const o of ws(r, t))
5941
+ for await (const o of bs(r, t))
5939
5942
  yield this.parseSseEvent(o);
5940
5943
  }
5941
5944
  async *declineToolCall(e, t) {
@@ -5945,7 +5948,7 @@ class hc {
5945
5948
  method: "POST"
5946
5949
  }
5947
5950
  ), r = as(n);
5948
- for await (const o of ws(r, t))
5951
+ for await (const o of bs(r, t))
5949
5952
  yield this.parseSseEvent(o);
5950
5953
  }
5951
5954
  async getConversationHistory(e) {
@@ -5955,7 +5958,7 @@ class hc {
5955
5958
  method: "GET"
5956
5959
  }
5957
5960
  );
5958
- return $s(t);
5961
+ return Ps(t);
5959
5962
  }
5960
5963
  parseSseEvent(e) {
5961
5964
  try {
@@ -6012,19 +6015,31 @@ const uc = (s, e, t) => {
6012
6015
  return n ? typeof n == "function" ? n() : Promise.resolve(n) : new Promise((r, o) => {
6013
6016
  (typeof queueMicrotask == "function" ? queueMicrotask : setTimeout)(o.bind(null, /* @__PURE__ */ new Error("Unknown variable dynamic import: " + e + (e.split("/").length !== t ? ". Note that variables only represent file names one level deep." : ""))));
6014
6017
  });
6015
- }, Yn = "en", gc = ["nb"], fc = ["en", "nb"], { getLocale: mc, setLocale: wc } = Ho({
6018
+ }, Yn = "en", gc = ["da", "nb", "sv"], fc = ["da", "en", "nb", "sv"], { getLocale: mc, setLocale: wc } = Ho({
6016
6019
  sourceLocale: Yn,
6017
6020
  targetLocales: gc,
6018
- loadLocale: (s) => uc(/* @__PURE__ */ Object.assign({ "../generated/locales/nb.ts": () => import("./nb-Dw8N0Ba1.js") }), `../generated/locales/${s}.ts`, 4)
6021
+ loadLocale: (s) => uc(/* @__PURE__ */ Object.assign({ "../generated/locales/da.ts": () => import("./da-DB2G9hr9.js"), "../generated/locales/nb.ts": () => import("./nb-CAH8MMZb.js"), "../generated/locales/sv.ts": () => import("./sv-DpmOrP-S.js") }), `../generated/locales/${s}.ts`, 4)
6019
6022
  });
6020
6023
  function bc(s) {
6021
6024
  const [e] = s.split("-"), t = e.toLowerCase();
6022
- return fc.includes(t) ? t : Yn;
6025
+ return vc(t);
6023
6026
  }
6024
- var vc = Object.defineProperty, yc = Object.getOwnPropertyDescriptor, se = (s, e, t, n) => {
6025
- for (var r = n > 1 ? void 0 : n ? yc(e, t) : e, o = s.length - 1, i; o >= 0; o--)
6027
+ function vc(s) {
6028
+ switch (s) {
6029
+ case "no":
6030
+ case "nn":
6031
+ return "nb";
6032
+ default:
6033
+ return yc(s) ? s : Yn;
6034
+ }
6035
+ }
6036
+ function yc(s) {
6037
+ return fc.includes(s);
6038
+ }
6039
+ var _c = Object.defineProperty, kc = Object.getOwnPropertyDescriptor, se = (s, e, t, n) => {
6040
+ for (var r = n > 1 ? void 0 : n ? kc(e, t) : e, o = s.length - 1, i; o >= 0; o--)
6026
6041
  (i = s[o]) && (r = (n ? i(e, t, r) : i(r)) || r);
6027
- return n && r && vc(e, t, r), r;
6042
+ return n && r && _c(e, t, r), r;
6028
6043
  };
6029
6044
  let J = class extends ie {
6030
6045
  constructor() {
@@ -6042,7 +6057,7 @@ let J = class extends ie {
6042
6057
  this.dispatchEvent(new Jl(n));
6043
6058
  }
6044
6059
  }), this.accessTokenProvider.setExpiringLeadMs(this.tokenExpiringLeadSeconds * 1e3);
6045
- const { kind: s, strategy: e } = Tr(this.baseUrl, this.vismaAccessToken);
6060
+ const { kind: s, strategy: e } = ls(this.baseUrl, this.vismaAccessToken);
6046
6061
  this.accessTokenProvider.setStrategy(s, e), this.apiClient = new sc(this.accessTokenProvider, {
6047
6062
  baseUrl: this.baseUrl,
6048
6063
  fetchImpl: fetch
@@ -6058,14 +6073,14 @@ let J = class extends ie {
6058
6073
  }
6059
6074
  async onPrincipalChanged(s, e, t, n) {
6060
6075
  if (!(s === e && t === n)) {
6061
- this.store.dispatch(xe(null)), this.store.dispatch(Ut(!0));
6076
+ this.store.dispatch(xe(null)), this.store.dispatch(Ft(!0));
6062
6077
  try {
6063
- const r = await this.accessTokenProvider.getIdentifier(), { kind: o, strategy: i } = Tr(this.baseUrl, e);
6078
+ const r = await this.accessTokenProvider.getIdentifier(), { kind: o, strategy: i } = ls(this.baseUrl, e);
6064
6079
  this.accessTokenProvider.setStrategy(o, i);
6065
6080
  const a = await this.accessTokenProvider.getIdentifier();
6066
6081
  (!s && !!e || !t && !!n || a !== r) && (this.bootstrapEffect.clear(), this.streamEffect.abortCurrentTask?.(), this.supportEffect.close(), this.supportEffect.stop()), this.bootstrapEffect.initialize(), this.conversationEffect.getHistory();
6067
6082
  } finally {
6068
- this.store.dispatch(Ut(!1));
6083
+ this.store.dispatch(Ft(!1));
6069
6084
  }
6070
6085
  }
6071
6086
  }
@@ -6088,6 +6103,11 @@ let J = class extends ie {
6088
6103
  const e = this.tokenExpiringLeadSeconds;
6089
6104
  this.accessTokenProvider?.setExpiringLeadMs(e * 1e3);
6090
6105
  }
6106
+ if (s.has("baseUrl")) {
6107
+ this.apiClient.baseUrl = this.baseUrl;
6108
+ const { kind: e, strategy: t } = ls(this.baseUrl, this.vismaAccessToken);
6109
+ this.accessTokenProvider.setStrategy(e, t);
6110
+ }
6091
6111
  }
6092
6112
  checkPlatform() {
6093
6113
  const s = window.navigator.userAgent;
@@ -6109,7 +6129,7 @@ let J = class extends ie {
6109
6129
  s.stopPropagation(), this.feedbackEffect?.submitFeedback(s.detail.target, s.detail.rating, s.detail.comment), this.dispatchEvent(new Xl(s.detail.rating, s.detail.comment));
6110
6130
  }
6111
6131
  onToggleFeedbackForm(s) {
6112
- s.stopPropagation(), s.detail.target ? this.store.dispatch(Xa(s.detail.target)) : this.store.dispatch(Is());
6132
+ s.stopPropagation(), s.detail.target ? this.store.dispatch(Xa(s.detail.target)) : this.store.dispatch(As());
6113
6133
  }
6114
6134
  onClearConversation(s) {
6115
6135
  s.stopPropagation(), this.conversationEffect?.clear(), this.supportEffect?.stop(), this.dispatchEvent(new Vl());
@@ -6118,7 +6138,7 @@ let J = class extends ie {
6118
6138
  this.store.dispatch(xe(null));
6119
6139
  }
6120
6140
  closeFeedbackIfOpen() {
6121
- this.state?.ui.feedbackFormOpen && this.store.dispatch(Is());
6141
+ this.state?.ui.feedbackFormOpen && this.store.dispatch(As());
6122
6142
  }
6123
6143
  onSendTyping(s) {
6124
6144
  s.stopPropagation(), this.isConnectedToSupport && this.supportEffect?.sendTyping();
@@ -6231,4 +6251,4 @@ export {
6231
6251
  J as C,
6232
6252
  Io as s
6233
6253
  };
6234
- //# sourceMappingURL=index-C0BXTIwR.js.map
6254
+ //# sourceMappingURL=index-BvrLe6Am.js.map