@sy-design/svelte 1.0.16 → 1.0.17

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/index.es.js CHANGED
@@ -12,7 +12,7 @@ var un = (s, e, t) => e in s ? xi(s, e, { enumerable: !0, configurable: !0, writ
12
12
  for (var t of es(e))
13
13
  Li.call(e, t) && un(s, t, e[t]);
14
14
  return s;
15
- }, ye = (s, e) => Ii(s, Ri(e));
15
+ }, be = (s, e) => Ii(s, Ri(e));
16
16
  var re = (s, e, t) => un(s, typeof e != "symbol" ? e + "" : e, t), Mi = (s, e, t) => e.has(s) || ts("Cannot " + t);
17
17
  var ns = (s, e, t) => e.has(s) ? ts("Cannot add the same private member more than once") : e instanceof WeakSet ? e.add(s) : e.set(s, t);
18
18
  var Wt = (s, e, t) => (Mi(s, e, "access private method"), t);
@@ -32,7 +32,7 @@ var Se = (s, e, t) => new Promise((n, o) => {
32
32
  }, r = (c) => c.done ? n(c.value) : Promise.resolve(c.value).then(l, i);
33
33
  r((t = t.apply(s, e)).next());
34
34
  });
35
- function Oe() {
35
+ function De() {
36
36
  }
37
37
  function Vs(s) {
38
38
  return s();
@@ -56,27 +56,27 @@ function Oi(s, ...e) {
56
56
  if (s == null) {
57
57
  for (const n of e)
58
58
  n(void 0);
59
- return Oe;
59
+ return De;
60
60
  }
61
61
  const t = s.subscribe(...e);
62
62
  return t.unsubscribe ? () => t.unsubscribe() : t;
63
63
  }
64
64
  const Qs = typeof window != "undefined";
65
- let is = Qs ? () => window.performance.now() : () => Date.now(), Js = Qs ? (s) => requestAnimationFrame(s) : Oe;
66
- const kt = /* @__PURE__ */ new Set();
65
+ let is = Qs ? () => window.performance.now() : () => Date.now(), Js = Qs ? (s) => requestAnimationFrame(s) : De;
66
+ const _t = /* @__PURE__ */ new Set();
67
67
  function Ks(s) {
68
- kt.forEach((e) => {
69
- e.c(s) || (kt.delete(e), e.f());
70
- }), kt.size !== 0 && Js(Ks);
68
+ _t.forEach((e) => {
69
+ e.c(s) || (_t.delete(e), e.f());
70
+ }), _t.size !== 0 && Js(Ks);
71
71
  }
72
72
  function Di(s) {
73
73
  let e;
74
- return kt.size === 0 && Js(Ks), {
74
+ return _t.size === 0 && Js(Ks), {
75
75
  promise: new Promise((t) => {
76
- kt.add(e = { c: s, f: t });
76
+ _t.add(e = { c: s, f: t });
77
77
  }),
78
78
  abort() {
79
- kt.delete(e);
79
+ _t.delete(e);
80
80
  }
81
81
  };
82
82
  }
@@ -119,17 +119,17 @@ function ei(s) {
119
119
  function a(s, e, t) {
120
120
  t == null ? s.removeAttribute(e) : s.getAttribute(e) !== t && s.setAttribute(e, t);
121
121
  }
122
- function Pi(s) {
122
+ function Ni(s) {
123
123
  return Array.from(s.childNodes);
124
124
  }
125
- function Ne(s, e) {
125
+ function Fe(s, e) {
126
126
  e = "" + e, s.data !== e && (s.data = /** @type {string} */
127
127
  e);
128
128
  }
129
129
  function nt(s, e) {
130
130
  s.value = e == null ? "" : e;
131
131
  }
132
- function N(s, e, t, n) {
132
+ function F(s, e, t, n) {
133
133
  t == null ? s.style.removeProperty(e) : s.style.setProperty(e, t, "");
134
134
  }
135
135
  function os(s, e, t) {
@@ -142,7 +142,7 @@ function os(s, e, t) {
142
142
  }
143
143
  (!t || e !== void 0) && (s.selectedIndex = -1);
144
144
  }
145
- function Ni(s) {
145
+ function Pi(s) {
146
146
  const e = s.querySelector(":checked");
147
147
  return e && e.__value;
148
148
  }
@@ -167,14 +167,14 @@ function Hi(s) {
167
167
  In().$$.on_destroy.push(s);
168
168
  }
169
169
  const gt = [], zt = [];
170
- let _t = [];
170
+ let kt = [];
171
171
  const ls = [], Bi = /* @__PURE__ */ Promise.resolve();
172
172
  let wn = !1;
173
173
  function Ui() {
174
174
  wn || (wn = !0, Bi.then(ti));
175
175
  }
176
176
  function Jt(s) {
177
- _t.push(s);
177
+ kt.push(s);
178
178
  }
179
179
  const fn = /* @__PURE__ */ new Set();
180
180
  let dt = 0;
@@ -192,11 +192,11 @@ function ti() {
192
192
  throw gt.length = 0, dt = 0, e;
193
193
  }
194
194
  for (Rt(null), gt.length = 0, dt = 0; zt.length; ) zt.pop()();
195
- for (let e = 0; e < _t.length; e += 1) {
196
- const t = _t[e];
195
+ for (let e = 0; e < kt.length; e += 1) {
196
+ const t = kt[e];
197
197
  fn.has(t) || (fn.add(t), t());
198
198
  }
199
- _t.length = 0;
199
+ kt.length = 0;
200
200
  } while (gt.length);
201
201
  for (; ls.length; )
202
202
  ls.pop()();
@@ -211,7 +211,7 @@ function ji(s) {
211
211
  }
212
212
  function Wi(s) {
213
213
  const e = [], t = [];
214
- _t.forEach((n) => s.indexOf(n) === -1 ? e.push(n) : t.push(n)), t.forEach((n) => n()), _t = e;
214
+ kt.forEach((n) => s.indexOf(n) === -1 ? e.push(n) : t.push(n)), t.forEach((n) => n()), kt = e;
215
215
  }
216
216
  const Vt = /* @__PURE__ */ new Set();
217
217
  let lt;
@@ -244,22 +244,22 @@ function ni(s, e) {
244
244
  s.d(1), e.delete(s.key);
245
245
  }
246
246
  function si(s, e, t, n, o, l, i, r, c, u, h, p) {
247
- let m = s.length, g = l.length, k = m;
247
+ let m = s.length, g = l.length, _ = m;
248
248
  const T = {};
249
- for (; k--; ) T[s[k].key] = k;
249
+ for (; _--; ) T[s[_].key] = _;
250
250
  const R = [], L = /* @__PURE__ */ new Map(), A = /* @__PURE__ */ new Map(), w = [];
251
- for (k = g; k--; ) {
252
- const x = p(o, l, k), M = t(x);
251
+ for (_ = g; _--; ) {
252
+ const x = p(o, l, _), M = t(x);
253
253
  let z = i.get(M);
254
- z ? w.push(() => z.p(x, e)) : (z = u(M, x), z.c()), L.set(M, R[k] = z), M in T && A.set(M, Math.abs(k - T[M]));
254
+ z ? w.push(() => z.p(x, e)) : (z = u(M, x), z.c()), L.set(M, R[_] = z), M in T && A.set(M, Math.abs(_ - T[M]));
255
255
  }
256
- const _ = /* @__PURE__ */ new Set(), b = /* @__PURE__ */ new Set();
256
+ const k = /* @__PURE__ */ new Set(), b = /* @__PURE__ */ new Set();
257
257
  function v(x) {
258
258
  je(x, 1), x.m(r, h), i.set(x.key, x), h = x.first, g--;
259
259
  }
260
260
  for (; m && g; ) {
261
261
  const x = R[g - 1], M = s[m - 1], z = x.key, Z = M.key;
262
- x === M ? (h = x.first, m--, g--) : L.has(Z) ? !i.has(z) || _.has(z) ? v(x) : b.has(Z) ? m-- : A.get(z) > A.get(Z) ? (b.add(z), v(x)) : (_.add(Z), m--) : (c(M, i), m--);
262
+ x === M ? (h = x.first, m--, g--) : L.has(Z) ? !i.has(z) || k.has(z) ? v(x) : b.has(Z) ? m-- : A.get(z) > A.get(Z) ? (b.add(z), v(x)) : (k.add(Z), m--) : (c(M, i), m--);
263
263
  }
264
264
  for (; m--; ) {
265
265
  const x = s[m];
@@ -293,7 +293,7 @@ function zn(s, e, t, n, o, l, i = null, r = [-1]) {
293
293
  ctx: [],
294
294
  // state
295
295
  props: l,
296
- update: Oe,
296
+ update: De,
297
297
  not_equal: o,
298
298
  bound: ss(),
299
299
  // lifecycle
@@ -312,11 +312,11 @@ function zn(s, e, t, n, o, l, i = null, r = [-1]) {
312
312
  i && i(u.root);
313
313
  let h = !1;
314
314
  if (u.ctx = t ? t(s, e.props || {}, (p, m, ...g) => {
315
- const k = g.length ? g[0] : m;
316
- return u.ctx && o(u.ctx[p], u.ctx[p] = k) && (!u.skip_bound && u.bound[p] && u.bound[p](k), h && qi(s, p)), m;
315
+ const _ = g.length ? g[0] : m;
316
+ return u.ctx && o(u.ctx[p], u.ctx[p] = _) && (!u.skip_bound && u.bound[p] && u.bound[p](_), h && qi(s, p)), m;
317
317
  }) : [], u.update(), h = !0, Ae(u.before_update), u.fragment = n ? n(u.ctx) : !1, e.target) {
318
318
  if (e.hydrate) {
319
- const p = Pi(e.target);
319
+ const p = Ni(e.target);
320
320
  u.fragment && u.fragment.l(p), p.forEach(W);
321
321
  } else
322
322
  u.fragment && u.fragment.c();
@@ -345,7 +345,7 @@ class On {
345
345
  }
346
346
  /** @returns {void} */
347
347
  $destroy() {
348
- on(this, 1), this.$destroy = Oe;
348
+ on(this, 1), this.$destroy = De;
349
349
  }
350
350
  /**
351
351
  * @template {Extract<keyof Events, string>} K
@@ -355,7 +355,7 @@ class On {
355
355
  */
356
356
  $on(e, t) {
357
357
  if (!xn(t))
358
- return Oe;
358
+ return De;
359
359
  const n = this.$$.callbacks[e] || (this.$$.callbacks[e] = []);
360
360
  return n.push(t), () => {
361
361
  const o = n.indexOf(t);
@@ -373,7 +373,7 @@ class On {
373
373
  const Gi = "4";
374
374
  typeof window != "undefined" && (window.__svelte || (window.__svelte = { v: /* @__PURE__ */ new Set() })).v.add(Gi);
375
375
  const mt = [];
376
- function Yi(s, e = Oe) {
376
+ function Yi(s, e = De) {
377
377
  let t;
378
378
  const n = /* @__PURE__ */ new Set();
379
379
  function o(r) {
@@ -391,9 +391,9 @@ function Yi(s, e = Oe) {
391
391
  function l(r) {
392
392
  o(r(s));
393
393
  }
394
- function i(r, c = Oe) {
394
+ function i(r, c = De) {
395
395
  const u = [r, c];
396
- return n.add(u), n.size === 1 && (t = e(o, l) || Oe), r(s), () => {
396
+ return n.add(u), n.size === 1 && (t = e(o, l) || De), r(s), () => {
397
397
  n.delete(u), n.size === 0 && t && (t(), t = null);
398
398
  };
399
399
  }
@@ -423,20 +423,20 @@ function bn(s, e, t, n) {
423
423
  function Zi(s, e = {}) {
424
424
  const t = Yi(s), { stiffness: n = 0.15, damping: o = 0.8, precision: l = 0.01 } = e;
425
425
  let i, r, c, u = s, h = s, p = 1, m = 0, g = !1;
426
- function k(R, L = {}) {
426
+ function _(R, L = {}) {
427
427
  h = R;
428
428
  const A = c = {};
429
429
  return s == null || L.hard || T.stiffness >= 1 && T.damping >= 1 ? (g = !0, i = is(), u = R, t.set(s = h), Promise.resolve()) : (L.soft && (m = 1 / ((L.soft === !0 ? 0.5 : +L.soft) * 60), p = 0), r || (i = is(), g = !1, r = Di((w) => {
430
430
  if (g)
431
431
  return g = !1, r = null, !1;
432
432
  p = Math.min(p + m, 1);
433
- const _ = {
433
+ const k = {
434
434
  inv_mass: p,
435
435
  opts: T,
436
436
  settled: !0,
437
437
  dt: (w - i) * 60 / 1e3
438
- }, b = bn(_, u, s, h);
439
- return i = w, u = s, t.set(s = b), _.settled && (r = null), !_.settled;
438
+ }, b = bn(k, u, s, h);
439
+ return i = w, u = s, t.set(s = b), k.settled && (r = null), !k.settled;
440
440
  })), new Promise((w) => {
441
441
  r.promise.then(() => {
442
442
  A === c && w();
@@ -444,8 +444,8 @@ function Zi(s, e = {}) {
444
444
  }));
445
445
  }
446
446
  const T = {
447
- set: k,
448
- update: (R, L) => k(R(h, s), L),
447
+ set: _,
448
+ update: (R, L) => _(R(h, s), L),
449
449
  subscribe: t.subscribe,
450
450
  stiffness: n,
451
451
  damping: o,
@@ -541,32 +541,32 @@ function eo(s, e) {
541
541
  return new Promise((p, m) => {
542
542
  const g = Object.assign({}, n);
543
543
  g.accept || (g.accept = yn);
544
- let k;
544
+ let _;
545
545
  function T() {
546
- k.abort(), document.hidden || b();
546
+ _.abort(), document.hidden || b();
547
547
  }
548
548
  c || document.addEventListener("visibilitychange", T);
549
549
  let R = $i, L = 0;
550
550
  function A() {
551
- document.removeEventListener("visibilitychange", T), window.clearTimeout(L), k.abort();
551
+ document.removeEventListener("visibilitychange", T), window.clearTimeout(L), _.abort();
552
552
  }
553
553
  t == null || t.addEventListener("abort", () => {
554
554
  A(), p();
555
555
  });
556
- const w = u != null ? u : window.fetch, _ = o != null ? o : to;
556
+ const w = u != null ? u : window.fetch, k = o != null ? o : to;
557
557
  function b() {
558
558
  return Se(this, null, function* () {
559
559
  var v;
560
- k = new AbortController();
560
+ _ = new AbortController();
561
561
  try {
562
- const x = yield w(s, Object.assign(Object.assign({}, h), { headers: g, signal: k.signal }));
563
- yield _(x), yield Xi(x.body, Vi(Qi((M) => {
562
+ const x = yield w(s, Object.assign(Object.assign({}, h), { headers: g, signal: _.signal }));
563
+ yield k(x), yield Xi(x.body, Vi(Qi((M) => {
564
564
  M ? g[cs] = M : delete g[cs];
565
565
  }, (M) => {
566
566
  R = M;
567
567
  }, l))), i == null || i(), A(), p();
568
568
  } catch (x) {
569
- if (!k.signal.aborted)
569
+ if (!_.signal.aborted)
570
570
  try {
571
571
  const M = (v = r == null ? void 0 : r(x)) !== null && v !== void 0 ? v : R;
572
572
  window.clearTimeout(L), L = window.setTimeout(b, M);
@@ -666,15 +666,8 @@ function qt(s, e, t) {
666
666
  if (n === 0)
667
667
  return "";
668
668
  let o = 0;
669
- for (; o < n; ) {
670
- const l = s.charAt(n - o - 1);
671
- if (l === e && !t)
672
- o++;
673
- else if (l !== e && t)
674
- o++;
675
- else
676
- break;
677
- }
669
+ for (; o < n && s.charAt(n - o - 1) === e; )
670
+ o++;
678
671
  return s.slice(0, n - o);
679
672
  }
680
673
  function ao(s, e) {
@@ -833,25 +826,25 @@ class Kt {
833
826
  `, 1)[0].replace(/^\t+/, (L) => " ".repeat(3 * L.length)), m = e.split(`
834
827
  `, 1)[0], g = 0;
835
828
  this.options.pedantic ? (g = 2, c = p.trimStart()) : (g = t[2].search(/[^ ]/), g = g > 4 ? 1 : g, c = p.slice(g), g += t[1].length);
836
- let k = !1;
829
+ let _ = !1;
837
830
  if (!p && /^ *$/.test(m) && (r += m + `
838
831
  `, e = e.substring(m.length + 1), h = !0), !h) {
839
- const L = new RegExp(`^ {0,${Math.min(3, g - 1)}}(?:[*+-]|\\d{1,9}[.)])((?:[ ][^\\n]*)?(?:\\n|$))`), A = new RegExp(`^ {0,${Math.min(3, g - 1)}}((?:- *){3,}|(?:_ *){3,}|(?:\\* *){3,})(?:\\n+|$)`), w = new RegExp(`^ {0,${Math.min(3, g - 1)}}(?:\`\`\`|~~~)`), _ = new RegExp(`^ {0,${Math.min(3, g - 1)}}#`);
832
+ const L = new RegExp(`^ {0,${Math.min(3, g - 1)}}(?:[*+-]|\\d{1,9}[.)])((?:[ ][^\\n]*)?(?:\\n|$))`), A = new RegExp(`^ {0,${Math.min(3, g - 1)}}((?:- *){3,}|(?:_ *){3,}|(?:\\* *){3,})(?:\\n+|$)`), w = new RegExp(`^ {0,${Math.min(3, g - 1)}}(?:\`\`\`|~~~)`), k = new RegExp(`^ {0,${Math.min(3, g - 1)}}#`);
840
833
  for (; e; ) {
841
834
  const b = e.split(`
842
835
  `, 1)[0];
843
- if (m = b, this.options.pedantic && (m = m.replace(/^ {1,4}(?=( {4})*[^ ])/g, " ")), w.test(m) || _.test(m) || L.test(m) || A.test(e))
836
+ if (m = b, this.options.pedantic && (m = m.replace(/^ {1,4}(?=( {4})*[^ ])/g, " ")), w.test(m) || k.test(m) || L.test(m) || A.test(e))
844
837
  break;
845
838
  if (m.search(/[^ ]/) >= g || !m.trim())
846
839
  c += `
847
840
  ` + m.slice(g);
848
841
  else {
849
- if (k || p.search(/[^ ]/) >= 4 || w.test(p) || _.test(p) || A.test(p))
842
+ if (_ || p.search(/[^ ]/) >= 4 || w.test(p) || k.test(p) || A.test(p))
850
843
  break;
851
844
  c += `
852
845
  ` + m;
853
846
  }
854
- !k && !m.trim() && (k = !0), r += b + `
847
+ !_ && !m.trim() && (_ = !0), r += b + `
855
848
  `, e = e.substring(b.length + 1), p = m.slice(g);
856
849
  }
857
850
  }
@@ -1061,12 +1054,12 @@ class Kt {
1061
1054
  tokens: this.lexer.inlineTokens(T)
1062
1055
  };
1063
1056
  }
1064
- const k = g.slice(2, -2);
1057
+ const _ = g.slice(2, -2);
1065
1058
  return {
1066
1059
  type: "strong",
1067
1060
  raw: g,
1068
- text: k,
1069
- tokens: this.lexer.inlineTokens(k)
1061
+ text: _,
1062
+ tokens: this.lexer.inlineTokens(_)
1070
1063
  };
1071
1064
  }
1072
1065
  }
@@ -1161,33 +1154,33 @@ class Kt {
1161
1154
  }
1162
1155
  }
1163
1156
  }
1164
- const uo = /^(?: *(?:\n|$))+/, fo = /^( {4}[^\n]+(?:\n(?: *(?:\n|$))*)?)+/, ho = /^ {0,3}(`{3,}(?=[^`\n]*(?:\n|$))|~{3,})([^\n]*)(?:\n|$)(?:|([\s\S]*?)(?:\n|$))(?: {0,3}\1[~`]* *(?=\n|$)|$)/, Ot = /^ {0,3}((?:-[\t ]*){3,}|(?:_[ \t]*){3,}|(?:\*[ \t]*){3,})(?:\n+|$)/, po = /^ {0,3}(#{1,6})(?=\s|$)(.*)(?:\n+|$)/, ri = /(?:[*+-]|\d{1,9}[.)])/, ai = oe(/^(?!bull )((?:.|\n(?!\s*?\n|bull ))+?)\n {0,3}(=+|-+) *(?:\n+|$)/).replace(/bull/g, ri).getRegex(), Pn = /^([^\n]+(?:\n(?!hr|heading|lheading|blockquote|fences|list|html|table| +\n)[^\n]+)*)/, mo = /^[^\n]+/, Nn = /(?!\s*\])(?:\\.|[^\[\]\\])+/, go = oe(/^ {0,3}\[(label)\]: *(?:\n *)?([^<\s][^\s]*|<.*?>)(?:(?: +(?:\n *)?| *\n *)(title))? *(?:\n+|$)/).replace("label", Nn).replace("title", /(?:"(?:\\"?|[^"\\])*"|'[^'\n]*(?:\n[^'\n]+)*\n?'|\([^()]*\))/).getRegex(), ko = oe(/^( {0,3}bull)([ \t][^\n]+?)?(?:\n|$)/).replace(/bull/g, ri).getRegex(), ln = "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|section|source|summary|table|tbody|td|tfoot|th|thead|title|tr|track|ul", Fn = /<!--(?!-?>)[\s\S]*?(?:-->|$)/, _o = oe("^ {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", Fn).replace("tag", ln).replace("attribute", / +[a-zA-Z:_][\w.:-]*(?: *= *"[^"\n]*"| *= *'[^'\n]*'| *= *[^\s"'=<>`]+)?/).getRegex(), ci = oe(Pn).replace("hr", Ot).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", ln).getRegex(), wo = oe(/^( {0,3}> ?(paragraph|[^\n]*)(?:\n|$))+/).replace("paragraph", ci).getRegex(), Hn = {
1157
+ const uo = /^(?: *(?:\n|$))+/, fo = /^( {4}[^\n]+(?:\n(?: *(?:\n|$))*)?)+/, ho = /^ {0,3}(`{3,}(?=[^`\n]*(?:\n|$))|~{3,})([^\n]*)(?:\n|$)(?:|([\s\S]*?)(?:\n|$))(?: {0,3}\1[~`]* *(?=\n|$)|$)/, Ot = /^ {0,3}((?:-[\t ]*){3,}|(?:_[ \t]*){3,}|(?:\*[ \t]*){3,})(?:\n+|$)/, po = /^ {0,3}(#{1,6})(?=\s|$)(.*)(?:\n+|$)/, ri = /(?:[*+-]|\d{1,9}[.)])/, ai = oe(/^(?!bull )((?:.|\n(?!\s*?\n|bull ))+?)\n {0,3}(=+|-+) *(?:\n+|$)/).replace(/bull/g, ri).getRegex(), Nn = /^([^\n]+(?:\n(?!hr|heading|lheading|blockquote|fences|list|html|table| +\n)[^\n]+)*)/, mo = /^[^\n]+/, Pn = /(?!\s*\])(?:\\.|[^\[\]\\])+/, go = oe(/^ {0,3}\[(label)\]: *(?:\n *)?([^<\s][^\s]*|<.*?>)(?:(?: +(?:\n *)?| *\n *)(title))? *(?:\n+|$)/).replace("label", Pn).replace("title", /(?:"(?:\\"?|[^"\\])*"|'[^'\n]*(?:\n[^'\n]+)*\n?'|\([^()]*\))/).getRegex(), _o = oe(/^( {0,3}bull)([ \t][^\n]+?)?(?:\n|$)/).replace(/bull/g, ri).getRegex(), ln = "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|section|source|summary|table|tbody|td|tfoot|th|thead|title|tr|track|ul", Fn = /<!--(?!-?>)[\s\S]*?(?:-->|$)/, ko = oe("^ {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", Fn).replace("tag", ln).replace("attribute", / +[a-zA-Z:_][\w.:-]*(?: *= *"[^"\n]*"| *= *'[^'\n]*'| *= *[^\s"'=<>`]+)?/).getRegex(), ci = oe(Nn).replace("hr", Ot).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", ln).getRegex(), wo = oe(/^( {0,3}> ?(paragraph|[^\n]*)(?:\n|$))+/).replace("paragraph", ci).getRegex(), Hn = {
1165
1158
  blockquote: wo,
1166
1159
  code: fo,
1167
1160
  def: go,
1168
1161
  fences: ho,
1169
1162
  heading: po,
1170
1163
  hr: Ot,
1171
- html: _o,
1164
+ html: ko,
1172
1165
  lheading: ai,
1173
- list: ko,
1166
+ list: _o,
1174
1167
  newline: uo,
1175
1168
  paragraph: ci,
1176
1169
  table: Ct,
1177
1170
  text: mo
1178
- }, ds = oe("^ *([^\\n ].*)\\n {0,3}((?:\\| *)?:?-+:? *(?:\\| *:?-+:? *)*(?:\\| *)?)(?:\\n((?:(?! *\\n|hr|heading|blockquote|code|fences|list|html).*(?:\\n|$))*)\\n*|$)").replace("hr", Ot).replace("heading", " {0,3}#{1,6}(?:\\s|$)").replace("blockquote", " {0,3}>").replace("code", " {4}[^\\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", ln).getRegex(), bo = ye(ie({}, Hn), {
1171
+ }, ds = oe("^ *([^\\n ].*)\\n {0,3}((?:\\| *)?:?-+:? *(?:\\| *:?-+:? *)*(?:\\| *)?)(?:\\n((?:(?! *\\n|hr|heading|blockquote|code|fences|list|html).*(?:\\n|$))*)\\n*|$)").replace("hr", Ot).replace("heading", " {0,3}#{1,6}(?:\\s|$)").replace("blockquote", " {0,3}>").replace("code", " {4}[^\\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", ln).getRegex(), bo = be(ie({}, Hn), {
1179
1172
  table: ds,
1180
- paragraph: oe(Pn).replace("hr", Ot).replace("heading", " {0,3}#{1,6}(?:\\s|$)").replace("|lheading", "").replace("table", ds).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", ln).getRegex()
1181
- }), yo = ye(ie({}, Hn), {
1173
+ paragraph: oe(Nn).replace("hr", Ot).replace("heading", " {0,3}#{1,6}(?:\\s|$)").replace("|lheading", "").replace("table", ds).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", ln).getRegex()
1174
+ }), yo = be(ie({}, Hn), {
1182
1175
  html: oe(`^ *(?:comment *(?:\\n|\\s*$)|<(tag)[\\s\\S]+?</\\1> *(?:\\n{2,}|\\s*$)|<tag(?:"[^"]*"|'[^']*'|\\s[^'"/>\\s]*)*?/?> *(?:\\n{2,}|\\s*$))`).replace("comment", Fn).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(),
1183
1176
  def: /^ *\[([^\]]+)\]: *<?([^\s>]+)>?(?: +(["(][^\n]+[")]))? *(?:\n+|$)/,
1184
1177
  heading: /^(#{1,6})(.*)(?:\n+|$)/,
1185
1178
  fences: Ct,
1186
1179
  // fences not supported
1187
1180
  lheading: /^(.+?)\n {0,3}(=+|-+) *(?:\n+|$)/,
1188
- paragraph: oe(Pn).replace("hr", Ot).replace("heading", ` *#{1,6} *[^
1181
+ paragraph: oe(Nn).replace("hr", Ot).replace("heading", ` *#{1,6} *[^
1189
1182
  ]`).replace("lheading", ai).replace("|table", "").replace("blockquote", " {0,3}>").replace("|fences", "").replace("|list", "").replace("|html", "").replace("|tag", "").getRegex()
1190
- }), ui = /^\\([!"#$%&'()*+,\-./:;<=>?@\[\]\\^_`{|}~])/, To = /^(`+)([^`]|[^`][\s\S]*?[^`])\1(?!`)/, fi = /^( {2,}|\\)\n(?!\s*$)/, vo = /^(`+|[^`])(?:(?= {2,}\n)|[\s\S]*?(?:(?=[\\<!\[`*_]|\b_|$)|[^ ](?= {2,}\n)))/, Dt = "\\p{P}$+<=>`^|~", Eo = oe(/^((?![*_])[\spunctuation])/, "u").replace(/punctuation/g, Dt).getRegex(), So = /\[[^[\]]*?\]\([^\(\)]*?\)|`[^`]*?`|<[^<>]*?>/g, Ao = oe(/^(?:\*+(?:((?!\*)[punct])|[^\s*]))|^_+(?:((?!_)[punct])|([^\s_]))/, "u").replace(/punct/g, Dt).getRegex(), xo = oe("^[^_*]*?__[^_*]*?\\*[^_*]*?(?=__)|[^*]+(?=[^*])|(?!\\*)[punct](\\*+)(?=[\\s]|$)|[^punct\\s](\\*+)(?!\\*)(?=[punct\\s]|$)|(?!\\*)[punct\\s](\\*+)(?=[^punct\\s])|[\\s](\\*+)(?!\\*)(?=[punct])|(?!\\*)[punct](\\*+)(?!\\*)(?=[punct])|[^punct\\s](\\*+)(?=[^punct\\s])", "gu").replace(/punct/g, Dt).getRegex(), Io = oe("^[^_*]*?\\*\\*[^_*]*?_[^_*]*?(?=\\*\\*)|[^_]+(?=[^_])|(?!_)[punct](_+)(?=[\\s]|$)|[^punct\\s](_+)(?!_)(?=[punct\\s]|$)|(?!_)[punct\\s](_+)(?=[^punct\\s])|[\\s](_+)(?!_)(?=[punct])|(?!_)[punct](_+)(?!_)(?=[punct])", "gu").replace(/punct/g, Dt).getRegex(), Ro = oe(/\\([punct])/, "gu").replace(/punct/g, Dt).getRegex(), Co = oe(/^<(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(), Lo = oe(Fn).replace("(?:-->|$)", "-->").getRegex(), Mo = oe("^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", Lo).replace("attribute", /\s+[a-zA-Z:_][\w.:-]*(?:\s*=\s*"[^"]*"|\s*=\s*'[^']*'|\s*=\s*[^\s"'=<>`]+)?/).getRegex(), $t = /(?:\[(?:\\.|[^\[\]\\])*\]|\\.|`[^`]*`|[^\[\]\\`])*?/, zo = oe(/^!?\[(label)\]\(\s*(href)(?:\s+(title))?\s*\)/).replace("label", $t).replace("href", /<(?:\\.|[^\n<>\\])+>|[^\s\x00-\x1f]*/).replace("title", /"(?:\\"?|[^"\\])*"|'(?:\\'?|[^'\\])*'|\((?:\\\)?|[^)\\])*\)/).getRegex(), hi = oe(/^!?\[(label)\]\[(ref)\]/).replace("label", $t).replace("ref", Nn).getRegex(), pi = oe(/^!?\[(ref)\](?:\[\])?/).replace("ref", Nn).getRegex(), Oo = oe("reflink|nolink(?!\\()", "g").replace("reflink", hi).replace("nolink", pi).getRegex(), Bn = {
1183
+ }), ui = /^\\([!"#$%&'()*+,\-./:;<=>?@\[\]\\^_`{|}~])/, To = /^(`+)([^`]|[^`][\s\S]*?[^`])\1(?!`)/, fi = /^( {2,}|\\)\n(?!\s*$)/, vo = /^(`+|[^`])(?:(?= {2,}\n)|[\s\S]*?(?:(?=[\\<!\[`*_]|\b_|$)|[^ ](?= {2,}\n)))/, Dt = "\\p{P}$+<=>`^|~", Eo = oe(/^((?![*_])[\spunctuation])/, "u").replace(/punctuation/g, Dt).getRegex(), So = /\[[^[\]]*?\]\([^\(\)]*?\)|`[^`]*?`|<[^<>]*?>/g, Ao = oe(/^(?:\*+(?:((?!\*)[punct])|[^\s*]))|^_+(?:((?!_)[punct])|([^\s_]))/, "u").replace(/punct/g, Dt).getRegex(), xo = oe("^[^_*]*?__[^_*]*?\\*[^_*]*?(?=__)|[^*]+(?=[^*])|(?!\\*)[punct](\\*+)(?=[\\s]|$)|[^punct\\s](\\*+)(?!\\*)(?=[punct\\s]|$)|(?!\\*)[punct\\s](\\*+)(?=[^punct\\s])|[\\s](\\*+)(?!\\*)(?=[punct])|(?!\\*)[punct](\\*+)(?!\\*)(?=[punct])|[^punct\\s](\\*+)(?=[^punct\\s])", "gu").replace(/punct/g, Dt).getRegex(), Io = oe("^[^_*]*?\\*\\*[^_*]*?_[^_*]*?(?=\\*\\*)|[^_]+(?=[^_])|(?!_)[punct](_+)(?=[\\s]|$)|[^punct\\s](_+)(?!_)(?=[punct\\s]|$)|(?!_)[punct\\s](_+)(?=[^punct\\s])|[\\s](_+)(?!_)(?=[punct])|(?!_)[punct](_+)(?!_)(?=[punct])", "gu").replace(/punct/g, Dt).getRegex(), Ro = oe(/\\([punct])/, "gu").replace(/punct/g, Dt).getRegex(), Co = oe(/^<(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(), Lo = oe(Fn).replace("(?:-->|$)", "-->").getRegex(), Mo = oe("^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", Lo).replace("attribute", /\s+[a-zA-Z:_][\w.:-]*(?:\s*=\s*"[^"]*"|\s*=\s*'[^']*'|\s*=\s*[^\s"'=<>`]+)?/).getRegex(), $t = /(?:\[(?:\\.|[^\[\]\\])*\]|\\.|`[^`]*`|[^\[\]\\`])*?/, zo = oe(/^!?\[(label)\]\(\s*(href)(?:\s+(title))?\s*\)/).replace("label", $t).replace("href", /<(?:\\.|[^\n<>\\])+>|[^\s\x00-\x1f]*/).replace("title", /"(?:\\"?|[^"\\])*"|'(?:\\'?|[^'\\])*'|\((?:\\\)?|[^)\\])*\)/).getRegex(), hi = oe(/^!?\[(label)\]\[(ref)\]/).replace("label", $t).replace("ref", Pn).getRegex(), pi = oe(/^!?\[(ref)\](?:\[\])?/).replace("ref", Pn).getRegex(), Oo = oe("reflink|nolink(?!\\()", "g").replace("reflink", hi).replace("nolink", pi).getRegex(), Bn = {
1191
1184
  _backpedal: Ct,
1192
1185
  // only used for GFM url
1193
1186
  anyPunctuation: Ro,
@@ -1208,16 +1201,16 @@ const uo = /^(?: *(?:\n|$))+/, fo = /^( {4}[^\n]+(?:\n(?: *(?:\n|$))*)?)+/, ho =
1208
1201
  tag: Mo,
1209
1202
  text: vo,
1210
1203
  url: Ct
1211
- }, Do = ye(ie({}, Bn), {
1204
+ }, Do = be(ie({}, Bn), {
1212
1205
  link: oe(/^!?\[(label)\]\((.*?)\)/).replace("label", $t).getRegex(),
1213
1206
  reflink: oe(/^!?\[(label)\]\s*\[([^\]]*)\]/).replace("label", $t).getRegex()
1214
- }), Tn = ye(ie({}, Bn), {
1207
+ }), Tn = be(ie({}, Bn), {
1215
1208
  escape: oe(ui).replace("])", "~|])").getRegex(),
1216
1209
  url: oe(/^((?: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(),
1217
1210
  _backpedal: /(?:[^?!.,:;*_'"~()&]+|\([^)]*\)|&(?![a-zA-Z0-9]+;$)|[?!.,:;*_'"~)]+(?!$))+/,
1218
1211
  del: /^(~~?)(?=[^\s~])([\s\S]*?[^\s~])\1(?=[^~]|$)/,
1219
1212
  text: /^([`~]+|[^`~])(?:(?= {2,}\n)|(?=[a-zA-Z0-9.!#$%&'*+\/=?_`{\|}~-]+@)|[\s\S]*?(?:(?=[\\<!\[`*~_]|\b_|https?:\/\/|ftp:\/\/|www\.|$)|[^ ](?= {2,}\n)|[^a-zA-Z0-9.!#$%&'*+\/=?_`{\|}~-](?=[a-zA-Z0-9.!#$%&'*+\/=?_`{\|}~-]+@)))/
1220
- }), Po = ye(ie({}, Tn), {
1213
+ }), No = be(ie({}, Tn), {
1221
1214
  br: oe(fi).replace("{2,}", "*").getRegex(),
1222
1215
  text: oe(Tn.text).replace("\\b_", "\\b_| {2,}\\n").replace(/\{2,\}/g, "*").getRegex()
1223
1216
  }), Gt = {
@@ -1227,7 +1220,7 @@ const uo = /^(?: *(?:\n|$))+/, fo = /^( {4}[^\n]+(?:\n(?: *(?:\n|$))*)?)+/, ho =
1227
1220
  }, vt = {
1228
1221
  normal: Bn,
1229
1222
  gfm: Tn,
1230
- breaks: Po,
1223
+ breaks: No,
1231
1224
  pedantic: Do
1232
1225
  };
1233
1226
  class Xe {
@@ -1660,7 +1653,7 @@ class Ve {
1660
1653
  const i = l, r = i.ordered, c = i.start, u = i.loose;
1661
1654
  let h = "";
1662
1655
  for (let p = 0; p < i.items.length; p++) {
1663
- const m = i.items[p], g = m.checked, k = m.task;
1656
+ const m = i.items[p], g = m.checked, _ = m.task;
1664
1657
  let T = "";
1665
1658
  if (m.task) {
1666
1659
  const R = this.renderer.checkbox(!!g);
@@ -1669,7 +1662,7 @@ class Ve {
1669
1662
  text: R + " "
1670
1663
  }) : T += R + " ";
1671
1664
  }
1672
- T += this.parse(m.tokens, u), h += this.renderer.listitem(T, k, !!g);
1665
+ T += this.parse(m.tokens, u), h += this.renderer.listitem(T, _, !!g);
1673
1666
  }
1674
1667
  n += this.renderer.list(h, r, c);
1675
1668
  continue;
@@ -1808,7 +1801,7 @@ re(Lt, "passThroughHooks", /* @__PURE__ */ new Set([
1808
1801
  "processAllTokens"
1809
1802
  ]));
1810
1803
  var at, vn, di;
1811
- class No {
1804
+ class Po {
1812
1805
  constructor(...e) {
1813
1806
  ns(this, at);
1814
1807
  re(this, "defaults", Dn());
@@ -1979,7 +1972,7 @@ Please report this to https://github.com/markedjs/marked.`, e) {
1979
1972
  throw n;
1980
1973
  };
1981
1974
  };
1982
- const rt = new No();
1975
+ const rt = new Po();
1983
1976
  function te(s, e) {
1984
1977
  return rt.parse(s, e);
1985
1978
  }
@@ -2011,7 +2004,7 @@ te.walkTokens;
2011
2004
  te.parseInline;
2012
2005
  Ve.parse;
2013
2006
  Xe.lex;
2014
- /*! @license DOMPurify 3.2.3 | (c) Cure53 and other contributors | Released under the Apache license 2.0 and Mozilla Public License 2.0 | github.com/cure53/DOMPurify/blob/3.2.3/LICENSE */
2007
+ /*! @license DOMPurify 3.2.4 | (c) Cure53 and other contributors | Released under the Apache license 2.0 and Mozilla Public License 2.0 | github.com/cure53/DOMPurify/blob/3.2.4/LICENSE */
2015
2008
  const {
2016
2009
  entries: mi,
2017
2010
  setPrototypeOf: ms,
@@ -2039,15 +2032,15 @@ En || (En = function(e, t, n) {
2039
2032
  Sn || (Sn = function(e, t) {
2040
2033
  return new e(...t);
2041
2034
  });
2042
- const Yt = Fe(Array.prototype.forEach), gs = Fe(Array.prototype.pop), Et = Fe(Array.prototype.push), Qt = Fe(String.prototype.toLowerCase), hn = Fe(String.prototype.toString), ks = Fe(String.prototype.match), St = Fe(String.prototype.replace), Uo = Fe(String.prototype.indexOf), jo = Fe(String.prototype.trim), Ge = Fe(Object.prototype.hasOwnProperty), Re = Fe(RegExp.prototype.test), At = Wo(TypeError);
2043
- function Fe(s) {
2035
+ const Yt = Le(Array.prototype.forEach), Uo = Le(Array.prototype.lastIndexOf), gs = Le(Array.prototype.pop), Et = Le(Array.prototype.push), jo = Le(Array.prototype.splice), Qt = Le(String.prototype.toLowerCase), hn = Le(String.prototype.toString), _s = Le(String.prototype.match), St = Le(String.prototype.replace), Wo = Le(String.prototype.indexOf), qo = Le(String.prototype.trim), Ge = Le(Object.prototype.hasOwnProperty), Re = Le(RegExp.prototype.test), At = Go(TypeError);
2036
+ function Le(s) {
2044
2037
  return function(e) {
2045
2038
  for (var t = arguments.length, n = new Array(t > 1 ? t - 1 : 0), o = 1; o < t; o++)
2046
2039
  n[o - 1] = arguments[o];
2047
2040
  return En(s, e, n);
2048
2041
  };
2049
2042
  }
2050
- function Wo(s) {
2043
+ function Go(s) {
2051
2044
  return function() {
2052
2045
  for (var e = arguments.length, t = new Array(e), n = 0; n < e; n++)
2053
2046
  t[n] = arguments[n];
@@ -2068,7 +2061,7 @@ function V(s, e) {
2068
2061
  }
2069
2062
  return s;
2070
2063
  }
2071
- function qo(s) {
2064
+ function Yo(s) {
2072
2065
  for (let e = 0; e < s.length; e++)
2073
2066
  Ge(s, e) || (s[e] = null);
2074
2067
  return s;
@@ -2076,7 +2069,7 @@ function qo(s) {
2076
2069
  function ot(s) {
2077
2070
  const e = gi(null);
2078
2071
  for (const [t, n] of mi(s))
2079
- Ge(s, t) && (Array.isArray(n) ? e[t] = qo(n) : n && typeof n == "object" && n.constructor === Object ? e[t] = ot(n) : e[t] = n);
2072
+ Ge(s, t) && (Array.isArray(n) ? e[t] = Yo(n) : n && typeof n == "object" && n.constructor === Object ? e[t] = ot(n) : e[t] = n);
2080
2073
  return e;
2081
2074
  }
2082
2075
  function xt(s, e) {
@@ -2084,9 +2077,9 @@ function xt(s, e) {
2084
2077
  const n = Bo(s, e);
2085
2078
  if (n) {
2086
2079
  if (n.get)
2087
- return Fe(n.get);
2080
+ return Le(n.get);
2088
2081
  if (typeof n.value == "function")
2089
- return Fe(n.value);
2082
+ return Le(n.value);
2090
2083
  }
2091
2084
  s = Ho(s);
2092
2085
  }
@@ -2095,45 +2088,36 @@ function xt(s, e) {
2095
2088
  }
2096
2089
  return t;
2097
2090
  }
2098
- const _s = Ce(["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"]), pn = Ce(["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"]), dn = Ce(["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"]), Go = Ce(["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"]), mn = Ce(["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"]), Yo = Ce(["maction", "maligngroup", "malignmark", "mlongdiv", "mscarries", "mscarry", "msgroup", "mstack", "msline", "msrow", "semantics", "annotation", "annotation-xml", "mprescripts", "none"]), ws = Ce(["#text"]), bs = Ce(["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"]), gn = Ce(["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"]), ys = Ce(["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"]), Zt = Ce(["xlink:href", "xml:id", "xlink:title", "xml:space", "xmlns:xlink"]), Zo = We(/\{\{[\w\W]*|[\w\W]*\}\}/gm), Xo = We(/<%[\w\W]*|[\w\W]*%>/gm), Vo = We(/\$\{[\w\W]*}/gm), Qo = We(/^data-[\-\w.\u00B7-\uFFFF]+$/), Jo = We(/^aria-[\-\w]+$/), ki = We(
2091
+ const ks = Ce(["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"]), pn = Ce(["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"]), dn = Ce(["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"]), Zo = Ce(["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"]), mn = Ce(["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"]), Xo = Ce(["maction", "maligngroup", "malignmark", "mlongdiv", "mscarries", "mscarry", "msgroup", "mstack", "msline", "msrow", "semantics", "annotation", "annotation-xml", "mprescripts", "none"]), ws = Ce(["#text"]), bs = Ce(["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"]), gn = Ce(["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"]), ys = Ce(["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"]), Zt = Ce(["xlink:href", "xml:id", "xlink:title", "xml:space", "xmlns:xlink"]), Vo = We(/\{\{[\w\W]*|[\w\W]*\}\}/gm), Qo = We(/<%[\w\W]*|[\w\W]*%>/gm), Jo = We(/\$\{[\w\W]*/gm), Ko = We(/^data-[\-\w.\u00B7-\uFFFF]+$/), $o = We(/^aria-[\-\w]+$/), _i = We(
2099
2092
  /^(?:(?:(?:f|ht)tps?|mailto|tel|callto|sms|cid|xmpp):|[^a-z]|[a-z+.\-]+(?:[^a-z+.\-:]|$))/i
2100
2093
  // eslint-disable-line no-useless-escape
2101
- ), Ko = We(/^(?:\w+script|data):/i), $o = We(
2094
+ ), el = We(/^(?:\w+script|data):/i), tl = We(
2102
2095
  /[\u0000-\u0020\u00A0\u1680\u180E\u2000-\u2029\u205F\u3000]/g
2103
2096
  // eslint-disable-line no-control-regex
2104
- ), _i = We(/^html$/i), el = We(/^[a-z][.\w]*(-[.\w]+)+$/i);
2097
+ ), ki = We(/^html$/i), nl = We(/^[a-z][.\w]*(-[.\w]+)+$/i);
2105
2098
  var Ts = /* @__PURE__ */ Object.freeze({
2106
2099
  __proto__: null,
2107
- ARIA_ATTR: Jo,
2108
- ATTR_WHITESPACE: $o,
2109
- CUSTOM_ELEMENT: el,
2110
- DATA_ATTR: Qo,
2111
- DOCTYPE_NAME: _i,
2112
- ERB_EXPR: Xo,
2113
- IS_ALLOWED_URI: ki,
2114
- IS_SCRIPT_OR_DATA: Ko,
2115
- MUSTACHE_EXPR: Zo,
2116
- TMPLIT_EXPR: Vo
2100
+ ARIA_ATTR: $o,
2101
+ ATTR_WHITESPACE: tl,
2102
+ CUSTOM_ELEMENT: nl,
2103
+ DATA_ATTR: Ko,
2104
+ DOCTYPE_NAME: ki,
2105
+ ERB_EXPR: Qo,
2106
+ IS_ALLOWED_URI: _i,
2107
+ IS_SCRIPT_OR_DATA: el,
2108
+ MUSTACHE_EXPR: Vo,
2109
+ TMPLIT_EXPR: Jo
2117
2110
  });
2118
2111
  const It = {
2119
2112
  element: 1,
2120
- attribute: 2,
2121
2113
  text: 3,
2122
- cdataSection: 4,
2123
- entityReference: 5,
2124
- // Deprecated
2125
- entityNode: 6,
2126
2114
  // Deprecated
2127
2115
  progressingInstruction: 7,
2128
2116
  comment: 8,
2129
- document: 9,
2130
- documentType: 10,
2131
- documentFragment: 11,
2132
- notation: 12
2133
- // Deprecated
2134
- }, tl = function() {
2117
+ document: 9
2118
+ }, sl = function() {
2135
2119
  return typeof window == "undefined" ? null : window;
2136
- }, nl = function(e, t) {
2120
+ }, il = function(e, t) {
2137
2121
  if (typeof e != "object" || typeof e.createPolicy != "function")
2138
2122
  return null;
2139
2123
  let n = null;
@@ -2166,9 +2150,9 @@ const It = {
2166
2150
  };
2167
2151
  };
2168
2152
  function wi() {
2169
- let s = arguments.length > 0 && arguments[0] !== void 0 ? arguments[0] : tl();
2170
- const e = (F) => wi(F);
2171
- if (e.version = "3.2.3", e.removed = [], !s || !s.document || s.document.nodeType !== It.document)
2153
+ let s = arguments.length > 0 && arguments[0] !== void 0 ? arguments[0] : sl();
2154
+ const e = (N) => wi(N);
2155
+ if (e.version = "3.2.4", e.removed = [], !s || !s.document || s.document.nodeType !== It.document || !s.Element)
2172
2156
  return e.isSupported = !1, e;
2173
2157
  let {
2174
2158
  document: t
@@ -2183,12 +2167,12 @@ function wi() {
2183
2167
  HTMLFormElement: p,
2184
2168
  DOMParser: m,
2185
2169
  trustedTypes: g
2186
- } = s, k = c.prototype, T = xt(k, "cloneNode"), R = xt(k, "remove"), L = xt(k, "nextSibling"), A = xt(k, "childNodes"), w = xt(k, "parentNode");
2170
+ } = s, _ = c.prototype, T = xt(_, "cloneNode"), R = xt(_, "remove"), L = xt(_, "nextSibling"), A = xt(_, "childNodes"), w = xt(_, "parentNode");
2187
2171
  if (typeof i == "function") {
2188
- const F = t.createElement("template");
2189
- F.content && F.content.ownerDocument && (t = F.content.ownerDocument);
2172
+ const N = t.createElement("template");
2173
+ N.content && N.content.ownerDocument && (t = N.content.ownerDocument);
2190
2174
  }
2191
- let _, b = "";
2175
+ let k, b = "";
2192
2176
  const {
2193
2177
  implementation: v,
2194
2178
  createNodeIterator: x,
@@ -2197,7 +2181,7 @@ function wi() {
2197
2181
  } = t, {
2198
2182
  importNode: Z
2199
2183
  } = n;
2200
- let B = vs();
2184
+ let H = vs();
2201
2185
  e.isSupported = typeof mi == "function" && typeof w == "function" && v && v.createHTMLDocument !== void 0;
2202
2186
  const {
2203
2187
  MUSTACHE_EXPR: I,
@@ -2205,14 +2189,14 @@ function wi() {
2205
2189
  TMPLIT_EXPR: U,
2206
2190
  DATA_ATTR: X,
2207
2191
  ARIA_ATTR: ne,
2208
- IS_SCRIPT_OR_DATA: he,
2192
+ IS_SCRIPT_OR_DATA: pe,
2209
2193
  ATTR_WHITESPACE: He,
2210
2194
  CUSTOM_ELEMENT: fe
2211
2195
  } = Ts;
2212
2196
  let {
2213
2197
  IS_ALLOWED_URI: Be
2214
2198
  } = Ts, ee = null;
2215
- const qe = V({}, [..._s, ...pn, ...dn, ...mn, ...ws]);
2199
+ const qe = V({}, [...ks, ...pn, ...dn, ...mn, ...ws]);
2216
2200
  let se = null;
2217
2201
  const xe = V({}, [...bs, ...gn, ...ys, ...Zt]);
2218
2202
  let K = Object.seal(gi(null, {
@@ -2234,45 +2218,45 @@ function wi() {
2234
2218
  enumerable: !0,
2235
2219
  value: !1
2236
2220
  }
2237
- })), Le = null, ve = null, Qe = !0, P = !0, le = !1, D = !0, q = !1, me = !0, ge = !1, Me = !1, De = !1, $e = !1, ut = !1, ft = !1, Pt = !0, Nt = !1;
2221
+ })), Me = null, ve = null, Qe = !0, P = !0, le = !1, D = !0, q = !1, ge = !0, _e = !1, ze = !1, Ne = !1, $e = !1, ut = !1, ft = !1, Nt = !0, Pt = !1;
2238
2222
  const rn = "user-content-";
2239
2223
  let wt = !0, it = !1, et = {}, tt = null;
2240
2224
  const Ft = V({}, ["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"]);
2241
2225
  let Ht = null;
2242
2226
  const Bt = V({}, ["audio", "video", "img", "source", "image", "track"]);
2243
2227
  let bt = null;
2244
- const y = V({}, ["alt", "class", "for", "id", "label", "name", "pattern", "placeholder", "role", "summary", "title", "value", "style", "xmlns"]), H = "http://www.w3.org/1998/Math/MathML", J = "http://www.w3.org/2000/svg", ae = "http://www.w3.org/1999/xhtml";
2245
- let ce = ae, _e = !1, we = null;
2246
- const ht = V({}, [H, J, ae], hn);
2228
+ const y = V({}, ["alt", "class", "for", "id", "label", "name", "pattern", "placeholder", "role", "summary", "title", "value", "style", "xmlns"]), B = "http://www.w3.org/1998/Math/MathML", J = "http://www.w3.org/2000/svg", ae = "http://www.w3.org/1999/xhtml";
2229
+ let ce = ae, ke = !1, he = null;
2230
+ const ht = V({}, [B, J, ae], hn);
2247
2231
  let Ue = V({}, ["mi", "mo", "mn", "ms", "mtext"]), Ut = V({}, ["annotation-xml"]);
2248
2232
  const yi = V({}, ["title", "style", "font", "a", "script"]);
2249
2233
  let yt = null;
2250
2234
  const Ti = ["application/xhtml+xml", "text/html"], vi = "text/html";
2251
- let ke = null, pt = null;
2235
+ let we = null, pt = null;
2252
2236
  const Ei = t.createElement("form"), jn = function(f) {
2253
2237
  return f instanceof RegExp || f instanceof Function;
2254
2238
  }, an = function() {
2255
2239
  let f = arguments.length > 0 && arguments[0] !== void 0 ? arguments[0] : {};
2256
2240
  if (!(pt && pt === f)) {
2257
2241
  if ((!f || typeof f != "object") && (f = {}), f = ot(f), yt = // eslint-disable-next-line unicorn/prefer-includes
2258
- Ti.indexOf(f.PARSER_MEDIA_TYPE) === -1 ? vi : f.PARSER_MEDIA_TYPE, ke = yt === "application/xhtml+xml" ? hn : Qt, ee = Ge(f, "ALLOWED_TAGS") ? V({}, f.ALLOWED_TAGS, ke) : qe, se = Ge(f, "ALLOWED_ATTR") ? V({}, f.ALLOWED_ATTR, ke) : xe, we = Ge(f, "ALLOWED_NAMESPACES") ? V({}, f.ALLOWED_NAMESPACES, hn) : ht, bt = Ge(f, "ADD_URI_SAFE_ATTR") ? V(ot(y), f.ADD_URI_SAFE_ATTR, ke) : y, Ht = Ge(f, "ADD_DATA_URI_TAGS") ? V(ot(Bt), f.ADD_DATA_URI_TAGS, ke) : Bt, tt = Ge(f, "FORBID_CONTENTS") ? V({}, f.FORBID_CONTENTS, ke) : Ft, Le = Ge(f, "FORBID_TAGS") ? V({}, f.FORBID_TAGS, ke) : {}, ve = Ge(f, "FORBID_ATTR") ? V({}, f.FORBID_ATTR, ke) : {}, et = Ge(f, "USE_PROFILES") ? f.USE_PROFILES : !1, Qe = f.ALLOW_ARIA_ATTR !== !1, P = f.ALLOW_DATA_ATTR !== !1, le = f.ALLOW_UNKNOWN_PROTOCOLS || !1, D = f.ALLOW_SELF_CLOSE_IN_ATTR !== !1, q = f.SAFE_FOR_TEMPLATES || !1, me = f.SAFE_FOR_XML !== !1, ge = f.WHOLE_DOCUMENT || !1, $e = f.RETURN_DOM || !1, ut = f.RETURN_DOM_FRAGMENT || !1, ft = f.RETURN_TRUSTED_TYPE || !1, De = f.FORCE_BODY || !1, Pt = f.SANITIZE_DOM !== !1, Nt = f.SANITIZE_NAMED_PROPS || !1, wt = f.KEEP_CONTENT !== !1, it = f.IN_PLACE || !1, Be = f.ALLOWED_URI_REGEXP || ki, ce = f.NAMESPACE || ae, Ue = f.MATHML_TEXT_INTEGRATION_POINTS || Ue, Ut = f.HTML_INTEGRATION_POINTS || Ut, K = f.CUSTOM_ELEMENT_HANDLING || {}, f.CUSTOM_ELEMENT_HANDLING && jn(f.CUSTOM_ELEMENT_HANDLING.tagNameCheck) && (K.tagNameCheck = f.CUSTOM_ELEMENT_HANDLING.tagNameCheck), f.CUSTOM_ELEMENT_HANDLING && jn(f.CUSTOM_ELEMENT_HANDLING.attributeNameCheck) && (K.attributeNameCheck = f.CUSTOM_ELEMENT_HANDLING.attributeNameCheck), f.CUSTOM_ELEMENT_HANDLING && typeof f.CUSTOM_ELEMENT_HANDLING.allowCustomizedBuiltInElements == "boolean" && (K.allowCustomizedBuiltInElements = f.CUSTOM_ELEMENT_HANDLING.allowCustomizedBuiltInElements), q && (P = !1), ut && ($e = !0), et && (ee = V({}, ws), se = [], et.html === !0 && (V(ee, _s), V(se, bs)), et.svg === !0 && (V(ee, pn), V(se, gn), V(se, Zt)), et.svgFilters === !0 && (V(ee, dn), V(se, gn), V(se, Zt)), et.mathMl === !0 && (V(ee, mn), V(se, ys), V(se, Zt))), f.ADD_TAGS && (ee === qe && (ee = ot(ee)), V(ee, f.ADD_TAGS, ke)), f.ADD_ATTR && (se === xe && (se = ot(se)), V(se, f.ADD_ATTR, ke)), f.ADD_URI_SAFE_ATTR && V(bt, f.ADD_URI_SAFE_ATTR, ke), f.FORBID_CONTENTS && (tt === Ft && (tt = ot(tt)), V(tt, f.FORBID_CONTENTS, ke)), wt && (ee["#text"] = !0), ge && V(ee, ["html", "head", "body"]), ee.table && (V(ee, ["tbody"]), delete Le.tbody), f.TRUSTED_TYPES_POLICY) {
2242
+ Ti.indexOf(f.PARSER_MEDIA_TYPE) === -1 ? vi : f.PARSER_MEDIA_TYPE, we = yt === "application/xhtml+xml" ? hn : Qt, ee = Ge(f, "ALLOWED_TAGS") ? V({}, f.ALLOWED_TAGS, we) : qe, se = Ge(f, "ALLOWED_ATTR") ? V({}, f.ALLOWED_ATTR, we) : xe, he = Ge(f, "ALLOWED_NAMESPACES") ? V({}, f.ALLOWED_NAMESPACES, hn) : ht, bt = Ge(f, "ADD_URI_SAFE_ATTR") ? V(ot(y), f.ADD_URI_SAFE_ATTR, we) : y, Ht = Ge(f, "ADD_DATA_URI_TAGS") ? V(ot(Bt), f.ADD_DATA_URI_TAGS, we) : Bt, tt = Ge(f, "FORBID_CONTENTS") ? V({}, f.FORBID_CONTENTS, we) : Ft, Me = Ge(f, "FORBID_TAGS") ? V({}, f.FORBID_TAGS, we) : {}, ve = Ge(f, "FORBID_ATTR") ? V({}, f.FORBID_ATTR, we) : {}, et = Ge(f, "USE_PROFILES") ? f.USE_PROFILES : !1, Qe = f.ALLOW_ARIA_ATTR !== !1, P = f.ALLOW_DATA_ATTR !== !1, le = f.ALLOW_UNKNOWN_PROTOCOLS || !1, D = f.ALLOW_SELF_CLOSE_IN_ATTR !== !1, q = f.SAFE_FOR_TEMPLATES || !1, ge = f.SAFE_FOR_XML !== !1, _e = f.WHOLE_DOCUMENT || !1, $e = f.RETURN_DOM || !1, ut = f.RETURN_DOM_FRAGMENT || !1, ft = f.RETURN_TRUSTED_TYPE || !1, Ne = f.FORCE_BODY || !1, Nt = f.SANITIZE_DOM !== !1, Pt = f.SANITIZE_NAMED_PROPS || !1, wt = f.KEEP_CONTENT !== !1, it = f.IN_PLACE || !1, Be = f.ALLOWED_URI_REGEXP || _i, ce = f.NAMESPACE || ae, Ue = f.MATHML_TEXT_INTEGRATION_POINTS || Ue, Ut = f.HTML_INTEGRATION_POINTS || Ut, K = f.CUSTOM_ELEMENT_HANDLING || {}, f.CUSTOM_ELEMENT_HANDLING && jn(f.CUSTOM_ELEMENT_HANDLING.tagNameCheck) && (K.tagNameCheck = f.CUSTOM_ELEMENT_HANDLING.tagNameCheck), f.CUSTOM_ELEMENT_HANDLING && jn(f.CUSTOM_ELEMENT_HANDLING.attributeNameCheck) && (K.attributeNameCheck = f.CUSTOM_ELEMENT_HANDLING.attributeNameCheck), f.CUSTOM_ELEMENT_HANDLING && typeof f.CUSTOM_ELEMENT_HANDLING.allowCustomizedBuiltInElements == "boolean" && (K.allowCustomizedBuiltInElements = f.CUSTOM_ELEMENT_HANDLING.allowCustomizedBuiltInElements), q && (P = !1), ut && ($e = !0), et && (ee = V({}, ws), se = [], et.html === !0 && (V(ee, ks), V(se, bs)), et.svg === !0 && (V(ee, pn), V(se, gn), V(se, Zt)), et.svgFilters === !0 && (V(ee, dn), V(se, gn), V(se, Zt)), et.mathMl === !0 && (V(ee, mn), V(se, ys), V(se, Zt))), f.ADD_TAGS && (ee === qe && (ee = ot(ee)), V(ee, f.ADD_TAGS, we)), f.ADD_ATTR && (se === xe && (se = ot(se)), V(se, f.ADD_ATTR, we)), f.ADD_URI_SAFE_ATTR && V(bt, f.ADD_URI_SAFE_ATTR, we), f.FORBID_CONTENTS && (tt === Ft && (tt = ot(tt)), V(tt, f.FORBID_CONTENTS, we)), wt && (ee["#text"] = !0), _e && V(ee, ["html", "head", "body"]), ee.table && (V(ee, ["tbody"]), delete Me.tbody), f.TRUSTED_TYPES_POLICY) {
2259
2243
  if (typeof f.TRUSTED_TYPES_POLICY.createHTML != "function")
2260
2244
  throw At('TRUSTED_TYPES_POLICY configuration option must provide a "createHTML" hook.');
2261
2245
  if (typeof f.TRUSTED_TYPES_POLICY.createScriptURL != "function")
2262
2246
  throw At('TRUSTED_TYPES_POLICY configuration option must provide a "createScriptURL" hook.');
2263
- _ = f.TRUSTED_TYPES_POLICY, b = _.createHTML("");
2247
+ k = f.TRUSTED_TYPES_POLICY, b = k.createHTML("");
2264
2248
  } else
2265
- _ === void 0 && (_ = nl(g, o)), _ !== null && typeof b == "string" && (b = _.createHTML(""));
2249
+ k === void 0 && (k = il(g, o)), k !== null && typeof b == "string" && (b = k.createHTML(""));
2266
2250
  Ce && Ce(f), pt = f;
2267
2251
  }
2268
- }, Wn = V({}, [...pn, ...dn, ...Go]), qn = V({}, [...mn, ...Yo]), Si = function(f) {
2252
+ }, Wn = V({}, [...pn, ...dn, ...Zo]), qn = V({}, [...mn, ...Xo]), Si = function(f) {
2269
2253
  let E = w(f);
2270
2254
  (!E || !E.tagName) && (E = {
2271
2255
  namespaceURI: ce,
2272
2256
  tagName: "template"
2273
2257
  });
2274
2258
  const O = Qt(f.tagName), ue = Qt(E.tagName);
2275
- return we[f.namespaceURI] ? f.namespaceURI === J ? E.namespaceURI === ae ? O === "svg" : E.namespaceURI === H ? O === "svg" && (ue === "annotation-xml" || Ue[ue]) : !!Wn[O] : f.namespaceURI === H ? E.namespaceURI === ae ? O === "math" : E.namespaceURI === J ? O === "math" && Ut[ue] : !!qn[O] : f.namespaceURI === ae ? E.namespaceURI === J && !Ut[ue] || E.namespaceURI === H && !Ue[ue] ? !1 : !qn[O] && (yi[O] || !Wn[O]) : !!(yt === "application/xhtml+xml" && we[f.namespaceURI]) : !1;
2259
+ return he[f.namespaceURI] ? f.namespaceURI === J ? E.namespaceURI === ae ? O === "svg" : E.namespaceURI === B ? O === "svg" && (ue === "annotation-xml" || Ue[ue]) : !!Wn[O] : f.namespaceURI === B ? E.namespaceURI === ae ? O === "math" : E.namespaceURI === J ? O === "math" && Ut[ue] : !!qn[O] : f.namespaceURI === ae ? E.namespaceURI === J && !Ut[ue] || E.namespaceURI === B && !Ue[ue] ? !1 : !qn[O] && (yi[O] || !Wn[O]) : !!(yt === "application/xhtml+xml" && he[f.namespaceURI]) : !1;
2276
2260
  }, Ye = function(f) {
2277
2261
  Et(e.removed, {
2278
2262
  element: f
@@ -2307,28 +2291,28 @@ function wi() {
2307
2291
  }
2308
2292
  }, Gn = function(f) {
2309
2293
  let E = null, O = null;
2310
- if (De)
2294
+ if (Ne)
2311
2295
  f = "<remove></remove>" + f;
2312
2296
  else {
2313
- const be = ks(f, /^[\r\n\t ]+/);
2314
- O = be && be[0];
2297
+ const ye = _s(f, /^[\r\n\t ]+/);
2298
+ O = ye && ye[0];
2315
2299
  }
2316
2300
  yt === "application/xhtml+xml" && ce === ae && (f = '<html xmlns="http://www.w3.org/1999/xhtml"><head></head><body>' + f + "</body></html>");
2317
- const ue = _ ? _.createHTML(f) : f;
2301
+ const ue = k ? k.createHTML(f) : f;
2318
2302
  if (ce === ae)
2319
2303
  try {
2320
2304
  E = new m().parseFromString(ue, yt);
2321
- } catch (be) {
2305
+ } catch (ye) {
2322
2306
  }
2323
2307
  if (!E || !E.documentElement) {
2324
2308
  E = v.createDocument(ce, "template", null);
2325
2309
  try {
2326
- E.documentElement.innerHTML = _e ? b : ue;
2327
- } catch (be) {
2310
+ E.documentElement.innerHTML = ke ? b : ue;
2311
+ } catch (ye) {
2328
2312
  }
2329
2313
  }
2330
2314
  const Ee = E.body || E.documentElement;
2331
- return f && O && Ee.insertBefore(t.createTextNode(O), Ee.childNodes[0] || null), ce === ae ? z.call(E, ge ? "html" : "body")[0] : ge ? E.documentElement : Ee;
2315
+ return f && O && Ee.insertBefore(t.createTextNode(O), Ee.childNodes[0] || null), ce === ae ? z.call(E, _e ? "html" : "body")[0] : _e ? E.documentElement : Ee;
2332
2316
  }, Yn = function(f) {
2333
2317
  return x.call(
2334
2318
  f.ownerDocument || f,
@@ -2342,30 +2326,30 @@ function wi() {
2342
2326
  }, Zn = function(f) {
2343
2327
  return typeof r == "function" && f instanceof r;
2344
2328
  };
2345
- function Je(F, f, E) {
2346
- Yt(F, (O) => {
2329
+ function Je(N, f, E) {
2330
+ Yt(N, (O) => {
2347
2331
  O.call(e, f, E, pt);
2348
2332
  });
2349
2333
  }
2350
2334
  const Xn = function(f) {
2351
2335
  let E = null;
2352
- if (Je(B.beforeSanitizeElements, f, null), cn(f))
2336
+ if (Je(H.beforeSanitizeElements, f, null), cn(f))
2353
2337
  return Ye(f), !0;
2354
- const O = ke(f.nodeName);
2355
- if (Je(B.uponSanitizeElement, f, {
2338
+ const O = we(f.nodeName);
2339
+ if (Je(H.uponSanitizeElement, f, {
2356
2340
  tagName: O,
2357
2341
  allowedTags: ee
2358
- }), f.hasChildNodes() && !Zn(f.firstElementChild) && Re(/<[/\w]/g, f.innerHTML) && Re(/<[/\w]/g, f.textContent) || f.nodeType === It.progressingInstruction || me && f.nodeType === It.comment && Re(/<[/\w]/g, f.data))
2342
+ }), f.hasChildNodes() && !Zn(f.firstElementChild) && Re(/<[/\w]/g, f.innerHTML) && Re(/<[/\w]/g, f.textContent) || f.nodeType === It.progressingInstruction || ge && f.nodeType === It.comment && Re(/<[/\w]/g, f.data))
2359
2343
  return Ye(f), !0;
2360
- if (!ee[O] || Le[O]) {
2361
- if (!Le[O] && Qn(O) && (K.tagNameCheck instanceof RegExp && Re(K.tagNameCheck, O) || K.tagNameCheck instanceof Function && K.tagNameCheck(O)))
2344
+ if (!ee[O] || Me[O]) {
2345
+ if (!Me[O] && Qn(O) && (K.tagNameCheck instanceof RegExp && Re(K.tagNameCheck, O) || K.tagNameCheck instanceof Function && K.tagNameCheck(O)))
2362
2346
  return !1;
2363
2347
  if (wt && !tt[O]) {
2364
2348
  const ue = w(f) || f.parentNode, Ee = A(f) || f.childNodes;
2365
2349
  if (Ee && ue) {
2366
- const be = Ee.length;
2367
- for (let ze = be - 1; ze >= 0; --ze) {
2368
- const Ze = T(Ee[ze], !0);
2350
+ const ye = Ee.length;
2351
+ for (let Oe = ye - 1; Oe >= 0; --Oe) {
2352
+ const Ze = T(Ee[Oe], !0);
2369
2353
  Ze.__removalCount = (f.__removalCount || 0) + 1, ue.insertBefore(Ze, L(f));
2370
2354
  }
2371
2355
  }
@@ -2376,9 +2360,9 @@ function wi() {
2376
2360
  E = St(E, ue, " ");
2377
2361
  }), f.textContent !== E && (Et(e.removed, {
2378
2362
  element: f.cloneNode()
2379
- }), f.textContent = E)), Je(B.afterSanitizeElements, f, null), !1);
2363
+ }), f.textContent = E)), Je(H.afterSanitizeElements, f, null), !1);
2380
2364
  }, Vn = function(f, E, O) {
2381
- if (Pt && (E === "id" || E === "name") && (O in t || O in Ei))
2365
+ if (Nt && (E === "id" || E === "name") && (O in t || O in Ei))
2382
2366
  return !1;
2383
2367
  if (!(P && !ve[E] && Re(X, E))) {
2384
2368
  if (!(Qe && Re(ne, E))) {
@@ -2393,8 +2377,8 @@ function wi() {
2393
2377
  ) return !1;
2394
2378
  } else if (!bt[E]) {
2395
2379
  if (!Re(Be, St(O, He, ""))) {
2396
- if (!((E === "src" || E === "xlink:href" || E === "href") && f !== "script" && Uo(O, "data:") === 0 && Ht[f])) {
2397
- if (!(le && !Re(he, St(O, He, "")))) {
2380
+ if (!((E === "src" || E === "xlink:href" || E === "href") && f !== "script" && Wo(O, "data:") === 0 && Ht[f])) {
2381
+ if (!(le && !Re(pe, St(O, He, "")))) {
2398
2382
  if (O)
2399
2383
  return !1;
2400
2384
  }
@@ -2405,9 +2389,9 @@ function wi() {
2405
2389
  }
2406
2390
  return !0;
2407
2391
  }, Qn = function(f) {
2408
- return f !== "annotation-xml" && ks(f, fe);
2392
+ return f !== "annotation-xml" && _s(f, fe);
2409
2393
  }, Jn = function(f) {
2410
- Je(B.beforeSanitizeAttributes, f, null);
2394
+ Je(H.beforeSanitizeAttributes, f, null);
2411
2395
  const {
2412
2396
  attributes: E
2413
2397
  } = f;
@@ -2423,82 +2407,82 @@ function wi() {
2423
2407
  let ue = E.length;
2424
2408
  for (; ue--; ) {
2425
2409
  const Ee = E[ue], {
2426
- name: be,
2427
- namespaceURI: ze,
2410
+ name: ye,
2411
+ namespaceURI: Oe,
2428
2412
  value: Ze
2429
- } = Ee, Tt = ke(be);
2430
- let Ie = be === "value" ? Ze : jo(Ze);
2431
- if (O.attrName = Tt, O.attrValue = Ie, O.keepAttr = !0, O.forceKeepAttr = void 0, Je(B.uponSanitizeAttribute, f, O), Ie = O.attrValue, Nt && (Tt === "id" || Tt === "name") && (jt(be, f), Ie = rn + Ie), me && Re(/((--!?|])>)|<\/(style|title)/i, Ie)) {
2432
- jt(be, f);
2413
+ } = Ee, Tt = we(ye);
2414
+ let Ie = ye === "value" ? Ze : qo(Ze);
2415
+ if (O.attrName = Tt, O.attrValue = Ie, O.keepAttr = !0, O.forceKeepAttr = void 0, Je(H.uponSanitizeAttribute, f, O), Ie = O.attrValue, Pt && (Tt === "id" || Tt === "name") && (jt(ye, f), Ie = rn + Ie), ge && Re(/((--!?|])>)|<\/(style|title)/i, Ie)) {
2416
+ jt(ye, f);
2433
2417
  continue;
2434
2418
  }
2435
- if (O.forceKeepAttr || (jt(be, f), !O.keepAttr))
2419
+ if (O.forceKeepAttr || (jt(ye, f), !O.keepAttr))
2436
2420
  continue;
2437
2421
  if (!D && Re(/\/>/i, Ie)) {
2438
- jt(be, f);
2422
+ jt(ye, f);
2439
2423
  continue;
2440
2424
  }
2441
2425
  q && Yt([I, C, U], ($n) => {
2442
2426
  Ie = St(Ie, $n, " ");
2443
2427
  });
2444
- const Kn = ke(f.nodeName);
2428
+ const Kn = we(f.nodeName);
2445
2429
  if (Vn(Kn, Tt, Ie)) {
2446
- if (_ && typeof g == "object" && typeof g.getAttributeType == "function" && !ze)
2430
+ if (k && typeof g == "object" && typeof g.getAttributeType == "function" && !Oe)
2447
2431
  switch (g.getAttributeType(Kn, Tt)) {
2448
2432
  case "TrustedHTML": {
2449
- Ie = _.createHTML(Ie);
2433
+ Ie = k.createHTML(Ie);
2450
2434
  break;
2451
2435
  }
2452
2436
  case "TrustedScriptURL": {
2453
- Ie = _.createScriptURL(Ie);
2437
+ Ie = k.createScriptURL(Ie);
2454
2438
  break;
2455
2439
  }
2456
2440
  }
2457
2441
  try {
2458
- ze ? f.setAttributeNS(ze, be, Ie) : f.setAttribute(be, Ie), cn(f) ? Ye(f) : gs(e.removed);
2442
+ Oe ? f.setAttributeNS(Oe, ye, Ie) : f.setAttribute(ye, Ie), cn(f) ? Ye(f) : gs(e.removed);
2459
2443
  } catch ($n) {
2460
2444
  }
2461
2445
  }
2462
2446
  }
2463
- Je(B.afterSanitizeAttributes, f, null);
2464
- }, Ai = function F(f) {
2447
+ Je(H.afterSanitizeAttributes, f, null);
2448
+ }, Ai = function N(f) {
2465
2449
  let E = null;
2466
2450
  const O = Yn(f);
2467
- for (Je(B.beforeSanitizeShadowDOM, f, null); E = O.nextNode(); )
2468
- Je(B.uponSanitizeShadowNode, E, null), Xn(E), Jn(E), E.content instanceof l && F(E.content);
2469
- Je(B.afterSanitizeShadowDOM, f, null);
2451
+ for (Je(H.beforeSanitizeShadowDOM, f, null); E = O.nextNode(); )
2452
+ Je(H.uponSanitizeShadowNode, E, null), Xn(E), Jn(E), E.content instanceof l && N(E.content);
2453
+ Je(H.afterSanitizeShadowDOM, f, null);
2470
2454
  };
2471
- return e.sanitize = function(F) {
2455
+ return e.sanitize = function(N) {
2472
2456
  let f = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : {}, E = null, O = null, ue = null, Ee = null;
2473
- if (_e = !F, _e && (F = "<!-->"), typeof F != "string" && !Zn(F))
2474
- if (typeof F.toString == "function") {
2475
- if (F = F.toString(), typeof F != "string")
2457
+ if (ke = !N, ke && (N = "<!-->"), typeof N != "string" && !Zn(N))
2458
+ if (typeof N.toString == "function") {
2459
+ if (N = N.toString(), typeof N != "string")
2476
2460
  throw At("dirty is not a string, aborting");
2477
2461
  } else
2478
2462
  throw At("toString is not a function");
2479
2463
  if (!e.isSupported)
2480
- return F;
2481
- if (Me || an(f), e.removed = [], typeof F == "string" && (it = !1), it) {
2482
- if (F.nodeName) {
2483
- const Ze = ke(F.nodeName);
2484
- if (!ee[Ze] || Le[Ze])
2464
+ return N;
2465
+ if (ze || an(f), e.removed = [], typeof N == "string" && (it = !1), it) {
2466
+ if (N.nodeName) {
2467
+ const Ze = we(N.nodeName);
2468
+ if (!ee[Ze] || Me[Ze])
2485
2469
  throw At("root node is forbidden and cannot be sanitized in-place");
2486
2470
  }
2487
- } else if (F instanceof r)
2488
- E = Gn("<!---->"), O = E.ownerDocument.importNode(F, !0), O.nodeType === It.element && O.nodeName === "BODY" || O.nodeName === "HTML" ? E = O : E.appendChild(O);
2471
+ } else if (N instanceof r)
2472
+ E = Gn("<!---->"), O = E.ownerDocument.importNode(N, !0), O.nodeType === It.element && O.nodeName === "BODY" || O.nodeName === "HTML" ? E = O : E.appendChild(O);
2489
2473
  else {
2490
- if (!$e && !q && !ge && // eslint-disable-next-line unicorn/prefer-includes
2491
- F.indexOf("<") === -1)
2492
- return _ && ft ? _.createHTML(F) : F;
2493
- if (E = Gn(F), !E)
2474
+ if (!$e && !q && !_e && // eslint-disable-next-line unicorn/prefer-includes
2475
+ N.indexOf("<") === -1)
2476
+ return k && ft ? k.createHTML(N) : N;
2477
+ if (E = Gn(N), !E)
2494
2478
  return $e ? null : ft ? b : "";
2495
2479
  }
2496
- E && De && Ye(E.firstChild);
2497
- const be = Yn(it ? F : E);
2498
- for (; ue = be.nextNode(); )
2480
+ E && Ne && Ye(E.firstChild);
2481
+ const ye = Yn(it ? N : E);
2482
+ for (; ue = ye.nextNode(); )
2499
2483
  Xn(ue), Jn(ue), ue.content instanceof l && Ai(ue.content);
2500
2484
  if (it)
2501
- return F;
2485
+ return N;
2502
2486
  if ($e) {
2503
2487
  if (ut)
2504
2488
  for (Ee = M.call(E.ownerDocument); E.firstChild; )
@@ -2507,28 +2491,32 @@ function wi() {
2507
2491
  Ee = E;
2508
2492
  return (se.shadowroot || se.shadowrootmode) && (Ee = Z.call(n, Ee, !0)), Ee;
2509
2493
  }
2510
- let ze = ge ? E.outerHTML : E.innerHTML;
2511
- return ge && ee["!doctype"] && E.ownerDocument && E.ownerDocument.doctype && E.ownerDocument.doctype.name && Re(_i, E.ownerDocument.doctype.name) && (ze = "<!DOCTYPE " + E.ownerDocument.doctype.name + `>
2512
- ` + ze), q && Yt([I, C, U], (Ze) => {
2513
- ze = St(ze, Ze, " ");
2514
- }), _ && ft ? _.createHTML(ze) : ze;
2494
+ let Oe = _e ? E.outerHTML : E.innerHTML;
2495
+ return _e && ee["!doctype"] && E.ownerDocument && E.ownerDocument.doctype && E.ownerDocument.doctype.name && Re(ki, E.ownerDocument.doctype.name) && (Oe = "<!DOCTYPE " + E.ownerDocument.doctype.name + `>
2496
+ ` + Oe), q && Yt([I, C, U], (Ze) => {
2497
+ Oe = St(Oe, Ze, " ");
2498
+ }), k && ft ? k.createHTML(Oe) : Oe;
2515
2499
  }, e.setConfig = function() {
2516
- let F = arguments.length > 0 && arguments[0] !== void 0 ? arguments[0] : {};
2517
- an(F), Me = !0;
2500
+ let N = arguments.length > 0 && arguments[0] !== void 0 ? arguments[0] : {};
2501
+ an(N), ze = !0;
2518
2502
  }, e.clearConfig = function() {
2519
- pt = null, Me = !1;
2520
- }, e.isValidAttribute = function(F, f, E) {
2503
+ pt = null, ze = !1;
2504
+ }, e.isValidAttribute = function(N, f, E) {
2521
2505
  pt || an({});
2522
- const O = ke(F), ue = ke(f);
2506
+ const O = we(N), ue = we(f);
2523
2507
  return Vn(O, ue, E);
2524
- }, e.addHook = function(F, f) {
2525
- typeof f == "function" && Et(B[F], f);
2526
- }, e.removeHook = function(F) {
2527
- return gs(B[F]);
2528
- }, e.removeHooks = function(F) {
2529
- B[F] = [];
2508
+ }, e.addHook = function(N, f) {
2509
+ typeof f == "function" && Et(H[N], f);
2510
+ }, e.removeHook = function(N, f) {
2511
+ if (f !== void 0) {
2512
+ const E = Uo(H[N], f);
2513
+ return E === -1 ? void 0 : jo(H[N], E, 1)[0];
2514
+ }
2515
+ return gs(H[N]);
2516
+ }, e.removeHooks = function(N) {
2517
+ H[N] = [];
2530
2518
  }, e.removeAllHooks = function() {
2531
- B = vs();
2519
+ H = vs();
2532
2520
  }, e;
2533
2521
  }
2534
2522
  var Es = wi();
@@ -2538,7 +2526,7 @@ function Ss(s) {
2538
2526
  const t = `; ${document.cookie}`.split(`; ${s}=`);
2539
2527
  return t.length === 2 && ((n = t.pop()) == null ? void 0 : n.split(";").shift()) || null;
2540
2528
  }
2541
- const de = () => {
2529
+ const me = () => {
2542
2530
  if (typeof window == "undefined") return null;
2543
2531
  const s = Ss("access_token");
2544
2532
  if (s) return s;
@@ -2565,17 +2553,17 @@ function xs(s) {
2565
2553
  ), n;
2566
2554
  return {
2567
2555
  c() {
2568
- e = S("div"), n = Te(t), a(e, "class", "sy-assistant-button-tooltip svelte-1g6fj9a"), N(
2556
+ e = S("div"), n = Te(t), a(e, "class", "sy-assistant-button-tooltip svelte-1g6fj9a"), F(
2569
2557
  e,
2570
2558
  "left",
2571
2559
  /*buttonTooltip*/
2572
2560
  s[9].x + "px"
2573
- ), N(
2561
+ ), F(
2574
2562
  e,
2575
2563
  "top",
2576
2564
  /*buttonTooltip*/
2577
2565
  s[9].y + "px"
2578
- ), N(
2566
+ ), F(
2579
2567
  e,
2580
2568
  "z-index",
2581
2569
  /*zIndex*/
@@ -2588,20 +2576,20 @@ function xs(s) {
2588
2576
  p(o, l) {
2589
2577
  l & /*buttonTooltip*/
2590
2578
  512 && t !== (t = /*buttonTooltip*/
2591
- o[9].text + "") && Ne(n, t), l & /*buttonTooltip*/
2592
- 512 && N(
2579
+ o[9].text + "") && Fe(n, t), l & /*buttonTooltip*/
2580
+ 512 && F(
2593
2581
  e,
2594
2582
  "left",
2595
2583
  /*buttonTooltip*/
2596
2584
  o[9].x + "px"
2597
2585
  ), l & /*buttonTooltip*/
2598
- 512 && N(
2586
+ 512 && F(
2599
2587
  e,
2600
2588
  "top",
2601
2589
  /*buttonTooltip*/
2602
2590
  o[9].y + "px"
2603
2591
  ), l & /*zIndex*/
2604
- 8 && N(
2592
+ 8 && F(
2605
2593
  e,
2606
2594
  "z-index",
2607
2595
  /*zIndex*/
@@ -2613,7 +2601,7 @@ function xs(s) {
2613
2601
  }
2614
2602
  };
2615
2603
  }
2616
- function sl(s) {
2604
+ function ol(s) {
2617
2605
  let e = [], t = /* @__PURE__ */ new Map(), n, o, l = st(
2618
2606
  /*sessions*/
2619
2607
  s[0]
@@ -2657,7 +2645,7 @@ function sl(s) {
2657
2645
  }
2658
2646
  };
2659
2647
  }
2660
- function il(s) {
2648
+ function ll(s) {
2661
2649
  let e, t = (
2662
2650
  /*searchQuery*/
2663
2651
  s[4] ? "未找到相关会话" : (
@@ -2678,7 +2666,7 @@ function il(s) {
2678
2666
  o[4] ? "未找到相关会话" : (
2679
2667
  /*isLoading*/
2680
2668
  o[5] ? "加载中..." : "暂无历史会话"
2681
- )) && Ne(n, t);
2669
+ )) && Fe(n, t);
2682
2670
  },
2683
2671
  d(o) {
2684
2672
  o && W(e);
@@ -2692,7 +2680,7 @@ function Is(s, e) {
2692
2680
  ), r, c, u, h = Ls(
2693
2681
  /*session*/
2694
2682
  e[25].timestamp
2695
- ) + "", p, m, g, k, T, R, L, A, w, _, b;
2683
+ ) + "", p, m, g, _, T, R, L, A, w, k, b;
2696
2684
  function v() {
2697
2685
  return (
2698
2686
  /*click_handler*/
@@ -2716,7 +2704,7 @@ function Is(s, e) {
2716
2704
  key: s,
2717
2705
  first: null,
2718
2706
  c() {
2719
- t = S("div"), n = S("button"), o = S("div"), l = S("div"), r = Te(i), c = j(), u = S("div"), p = Te(h), m = j(), g = S("button"), k = Q("svg"), T = Q("path"), R = Q("path"), L = Q("path"), a(l, "class", "sy-session-title svelte-1g6fj9a"), a(u, "class", "sy-session-time svelte-1g6fj9a"), a(o, "class", "sy-session-info svelte-1g6fj9a"), a(n, "class", "sy-session-select svelte-1g6fj9a"), a(T, "d", "M3 6h18"), a(R, "d", "M19 6v14c0 1-1 2-2 2H7c-1 0-2-1-2-2V6"), a(L, "d", "M8 6V4c0-1 1-2 2-2h4c1 0 2 1 2 2v2"), a(k, "xmlns", "http://www.w3.org/2000/svg"), a(k, "width", "16"), a(k, "height", "16"), a(k, "viewBox", "0 0 24 24"), a(k, "fill", "none"), a(k, "stroke", "currentColor"), a(k, "stroke-width", "2"), a(k, "stroke-linecap", "round"), a(k, "stroke-linejoin", "round"), a(g, "class", "sy-session-delete svelte-1g6fj9a"), g.disabled = A = /*deletingSessionId*/
2707
+ t = S("div"), n = S("button"), o = S("div"), l = S("div"), r = Te(i), c = j(), u = S("div"), p = Te(h), m = j(), g = S("button"), _ = Q("svg"), T = Q("path"), R = Q("path"), L = Q("path"), a(l, "class", "sy-session-title svelte-1g6fj9a"), a(u, "class", "sy-session-time svelte-1g6fj9a"), a(o, "class", "sy-session-info svelte-1g6fj9a"), a(n, "class", "sy-session-select svelte-1g6fj9a"), a(T, "d", "M3 6h18"), a(R, "d", "M19 6v14c0 1-1 2-2 2H7c-1 0-2-1-2-2V6"), a(L, "d", "M8 6V4c0-1 1-2 2-2h4c1 0 2 1 2 2v2"), a(_, "xmlns", "http://www.w3.org/2000/svg"), a(_, "width", "16"), a(_, "height", "16"), a(_, "viewBox", "0 0 24 24"), a(_, "fill", "none"), a(_, "stroke", "currentColor"), a(_, "stroke-width", "2"), a(_, "stroke-linecap", "round"), a(_, "stroke-linejoin", "round"), a(g, "class", "sy-session-delete svelte-1g6fj9a"), g.disabled = A = /*deletingSessionId*/
2720
2708
  e[6] === /*session*/
2721
2709
  e[25].sessionId, a(g, "aria-label", "删除会话"), a(t, "class", "sy-session-item svelte-1g6fj9a"), a(t, "data-session-id", w = /*session*/
2722
2710
  e[25].sessionId), $(
@@ -2727,19 +2715,19 @@ function Is(s, e) {
2727
2715
  ), this.first = t;
2728
2716
  },
2729
2717
  m(M, z) {
2730
- Y(M, t, z), d(t, n), d(n, o), d(o, l), d(l, r), d(o, c), d(o, u), d(u, p), d(t, m), d(t, g), d(g, k), d(k, T), d(k, R), d(k, L), _ || (b = [
2718
+ Y(M, t, z), d(t, n), d(n, o), d(o, l), d(l, r), d(o, c), d(o, u), d(u, p), d(t, m), d(t, g), d(g, _), d(_, T), d(_, R), d(_, L), k || (b = [
2731
2719
  G(n, "click", v),
2732
2720
  G(g, "click", x)
2733
- ], _ = !0);
2721
+ ], k = !0);
2734
2722
  },
2735
2723
  p(M, z) {
2736
2724
  e = M, z & /*sessions*/
2737
2725
  1 && i !== (i = /*session*/
2738
- e[25].title + "") && Ne(r, i), z & /*sessions*/
2726
+ e[25].title + "") && Fe(r, i), z & /*sessions*/
2739
2727
  1 && h !== (h = Ls(
2740
2728
  /*session*/
2741
2729
  e[25].timestamp
2742
- ) + "") && Ne(p, h), z & /*deletingSessionId, sessions*/
2730
+ ) + "") && Fe(p, h), z & /*deletingSessionId, sessions*/
2743
2731
  65 && A !== (A = /*deletingSessionId*/
2744
2732
  e[6] === /*session*/
2745
2733
  e[25].sessionId) && (g.disabled = A), z & /*sessions*/
@@ -2753,7 +2741,7 @@ function Is(s, e) {
2753
2741
  );
2754
2742
  },
2755
2743
  d(M) {
2756
- M && W(t), _ = !1, Ae(b);
2744
+ M && W(t), k = !1, Ae(b);
2757
2745
  }
2758
2746
  };
2759
2747
  }
@@ -2775,17 +2763,17 @@ function Cs(s) {
2775
2763
  let e, t, n, o, l, i, r, c, u;
2776
2764
  return {
2777
2765
  c() {
2778
- e = S("div"), t = S("div"), t.textContent = "确认删除此会话?", n = j(), o = S("div"), l = S("button"), l.textContent = "取消", i = j(), r = S("button"), r.textContent = "删除", a(t, "class", "sy-session-confirm-content svelte-1g6fj9a"), a(l, "class", "sy-session-confirm-cancel svelte-1g6fj9a"), a(r, "class", "sy-session-confirm-delete svelte-1g6fj9a"), a(o, "class", "sy-session-confirm-actions svelte-1g6fj9a"), a(e, "class", "sy-session-confirm-popup svelte-1g6fj9a"), N(
2766
+ e = S("div"), t = S("div"), t.textContent = "确认删除此会话?", n = j(), o = S("div"), l = S("button"), l.textContent = "取消", i = j(), r = S("button"), r.textContent = "删除", a(t, "class", "sy-session-confirm-content svelte-1g6fj9a"), a(l, "class", "sy-session-confirm-cancel svelte-1g6fj9a"), a(r, "class", "sy-session-confirm-delete svelte-1g6fj9a"), a(o, "class", "sy-session-confirm-actions svelte-1g6fj9a"), a(e, "class", "sy-session-confirm-popup svelte-1g6fj9a"), F(
2779
2767
  e,
2780
2768
  "left",
2781
2769
  /*confirmPosition*/
2782
2770
  s[8].x + "px"
2783
- ), N(
2771
+ ), F(
2784
2772
  e,
2785
2773
  "top",
2786
2774
  /*confirmPosition*/
2787
2775
  s[8].y + "px"
2788
- ), N(
2776
+ ), F(
2789
2777
  e,
2790
2778
  "z-index",
2791
2779
  /*zIndex*/
@@ -2810,19 +2798,19 @@ function Cs(s) {
2810
2798
  },
2811
2799
  p(h, p) {
2812
2800
  p & /*confirmPosition*/
2813
- 256 && N(
2801
+ 256 && F(
2814
2802
  e,
2815
2803
  "left",
2816
2804
  /*confirmPosition*/
2817
2805
  h[8].x + "px"
2818
2806
  ), p & /*confirmPosition*/
2819
- 256 && N(
2807
+ 256 && F(
2820
2808
  e,
2821
2809
  "top",
2822
2810
  /*confirmPosition*/
2823
2811
  h[8].y + "px"
2824
2812
  ), p & /*zIndex*/
2825
- 8 && N(
2813
+ 8 && F(
2826
2814
  e,
2827
2815
  "z-index",
2828
2816
  /*zIndex*/
@@ -2834,15 +2822,15 @@ function Cs(s) {
2834
2822
  }
2835
2823
  };
2836
2824
  }
2837
- function ol(s) {
2838
- let e, t, n, o, l, i, r, c, u, h, p, m, g, k, T, R, L, A, w, _ = (
2825
+ function rl(s) {
2826
+ let e, t, n, o, l, i, r, c, u, h, p, m, g, _, T, R, L, A, w, k = (
2839
2827
  /*buttonTooltip*/
2840
2828
  s[9] && xs(s)
2841
2829
  );
2842
2830
  function b(z, Z) {
2843
2831
  return (
2844
2832
  /*sessions*/
2845
- z[0].length === 0 ? il : sl
2833
+ z[0].length === 0 ? ll : ol
2846
2834
  );
2847
2835
  }
2848
2836
  let v = b(s), x = v(s), M = (
@@ -2851,7 +2839,7 @@ function ol(s) {
2851
2839
  );
2852
2840
  return {
2853
2841
  c() {
2854
- e = S("div"), t = S("div"), n = S("h2"), n.textContent = "历史会话", o = j(), l = S("button"), l.innerHTML = '<svg xmlns="http://www.w3.org/2000/svg" width="20" height="20" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"><line x1="18" y1="6" x2="6" y2="18"></line><line x1="6" y1="6" x2="18" y2="18"></line></svg>', i = j(), r = S("div"), c = S("input"), u = j(), h = Q("svg"), p = Q("circle"), m = Q("line"), g = j(), _ && _.c(), k = j(), T = S("div"), x.c(), R = j(), M && M.c(), L = nn(), a(n, "class", "svelte-1g6fj9a"), a(l, "class", "sy-session-close svelte-1g6fj9a"), a(l, "aria-label", "关闭历史会话"), a(t, "class", "sy-session-header svelte-1g6fj9a"), a(c, "type", "text"), a(c, "class", "sy-session-search-input svelte-1g6fj9a"), a(c, "placeholder", "搜索历史会话..."), a(p, "cx", "11"), a(p, "cy", "11"), a(p, "r", "8"), a(m, "x1", "21"), a(m, "y1", "21"), a(m, "x2", "16.65"), a(m, "y2", "16.65"), a(h, "class", "sy-session-search-icon svelte-1g6fj9a"), a(h, "xmlns", "http://www.w3.org/2000/svg"), a(h, "width", "16"), a(h, "height", "16"), a(h, "viewBox", "0 0 24 24"), a(h, "fill", "none"), a(h, "stroke", "currentColor"), a(h, "stroke-width", "2"), a(h, "stroke-linecap", "round"), a(h, "stroke-linejoin", "round"), a(r, "class", "sy-session-search svelte-1g6fj9a"), a(T, "class", "sy-session-list svelte-1g6fj9a"), a(e, "class", "sy-session-history svelte-1g6fj9a"), N(
2842
+ e = S("div"), t = S("div"), n = S("h2"), n.textContent = "历史会话", o = j(), l = S("button"), l.innerHTML = '<svg xmlns="http://www.w3.org/2000/svg" width="20" height="20" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"><line x1="18" y1="6" x2="6" y2="18"></line><line x1="6" y1="6" x2="18" y2="18"></line></svg>', i = j(), r = S("div"), c = S("input"), u = j(), h = Q("svg"), p = Q("circle"), m = Q("line"), g = j(), k && k.c(), _ = j(), T = S("div"), x.c(), R = j(), M && M.c(), L = nn(), a(n, "class", "svelte-1g6fj9a"), a(l, "class", "sy-session-close svelte-1g6fj9a"), a(l, "aria-label", "关闭历史会话"), a(t, "class", "sy-session-header svelte-1g6fj9a"), a(c, "type", "text"), a(c, "class", "sy-session-search-input svelte-1g6fj9a"), a(c, "placeholder", "搜索历史会话..."), a(p, "cx", "11"), a(p, "cy", "11"), a(p, "r", "8"), a(m, "x1", "21"), a(m, "y1", "21"), a(m, "x2", "16.65"), a(m, "y2", "16.65"), a(h, "class", "sy-session-search-icon svelte-1g6fj9a"), a(h, "xmlns", "http://www.w3.org/2000/svg"), a(h, "width", "16"), a(h, "height", "16"), a(h, "viewBox", "0 0 24 24"), a(h, "fill", "none"), a(h, "stroke", "currentColor"), a(h, "stroke-width", "2"), a(h, "stroke-linecap", "round"), a(h, "stroke-linejoin", "round"), a(r, "class", "sy-session-search svelte-1g6fj9a"), a(T, "class", "sy-session-list svelte-1g6fj9a"), a(e, "class", "sy-session-history svelte-1g6fj9a"), F(
2855
2843
  e,
2856
2844
  "z-index",
2857
2845
  /*zIndex*/
@@ -2863,7 +2851,7 @@ function ol(s) {
2863
2851
  c,
2864
2852
  /*searchQuery*/
2865
2853
  s[4]
2866
- ), d(r, u), d(r, h), d(h, p), d(h, m), d(e, g), _ && _.m(e, null), d(e, k), d(e, T), x.m(T, null), Y(z, R, Z), M && M.m(z, Z), Y(z, L, Z), A || (w = [
2854
+ ), d(r, u), d(r, h), d(h, p), d(h, m), d(e, g), k && k.m(e, null), d(e, _), d(e, T), x.m(T, null), Y(z, R, Z), M && M.m(z, Z), Y(z, L, Z), A || (w = [
2867
2855
  G(l, "click", function() {
2868
2856
  xn(
2869
2857
  /*onClose*/
@@ -2904,8 +2892,8 @@ function ol(s) {
2904
2892
  /*searchQuery*/
2905
2893
  s[4]
2906
2894
  ), /*buttonTooltip*/
2907
- s[9] ? _ ? _.p(s, Z) : (_ = xs(s), _.c(), _.m(e, k)) : _ && (_.d(1), _ = null), v === (v = b(s)) && x ? x.p(s, Z) : (x.d(1), x = v(s), x && (x.c(), x.m(T, null))), Z & /*zIndex*/
2908
- 8 && N(
2895
+ s[9] ? k ? k.p(s, Z) : (k = xs(s), k.c(), k.m(e, _)) : k && (k.d(1), k = null), v === (v = b(s)) && x ? x.p(s, Z) : (x.d(1), x = v(s), x && (x.c(), x.m(T, null))), Z & /*zIndex*/
2896
+ 8 && F(
2909
2897
  e,
2910
2898
  "z-index",
2911
2899
  /*zIndex*/
@@ -2913,19 +2901,19 @@ function ol(s) {
2913
2901
  ), /*confirmDeleteId*/
2914
2902
  s[7] ? M ? M.p(s, Z) : (M = Cs(s), M.c(), M.m(L.parentNode, L)) : M && (M.d(1), M = null);
2915
2903
  },
2916
- i: Oe,
2917
- o: Oe,
2904
+ i: De,
2905
+ o: De,
2918
2906
  d(z) {
2919
- z && (W(e), W(R), W(L)), _ && _.d(), x.d(), M && M.d(z), A = !1, Ae(w);
2907
+ z && (W(e), W(R), W(L)), k && k.d(), x.d(), M && M.d(z), A = !1, Ae(w);
2920
2908
  }
2921
2909
  };
2922
2910
  }
2923
- const kn = 10;
2911
+ const _n = 10;
2924
2912
  function Ls(s) {
2925
2913
  return new Date(s).toLocaleString();
2926
2914
  }
2927
- function ll(s, e, t) {
2928
- let { sessions: n = [] } = e, { onClose: o } = e, { onSelect: l } = e, { zIndex: i } = e, { apiPrefix: r } = e, c = !1, u = !0, h = 0, p = "", m = null, g = null, k = { x: 0, y: 0 };
2915
+ function al(s, e, t) {
2916
+ let { sessions: n = [] } = e, { onClose: o } = e, { onSelect: l } = e, { zIndex: i } = e, { apiPrefix: r } = e, c = !1, u = !0, h = 0, p = "", m = null, g = null, _ = { x: 0, y: 0 };
2929
2917
  function T() {
2930
2918
  return Se(this, null, function* () {
2931
2919
  if (!(c || !u)) {
@@ -2935,10 +2923,10 @@ function ll(s, e, t) {
2935
2923
  method: "POST",
2936
2924
  headers: {
2937
2925
  "Content-Type": "application/json",
2938
- "Auth-Token": `${de()}`,
2939
- Authorization: `bearer ${de()}`
2926
+ "Auth-Token": `${me()}`,
2927
+ Authorization: `bearer ${me()}`
2940
2928
  },
2941
- body: JSON.stringify({ start: h, length: kn, keyword: p })
2929
+ body: JSON.stringify({ start: h, length: _n, keyword: p })
2942
2930
  });
2943
2931
  if (!I.ok)
2944
2932
  throw new Error("Failed to load sessions");
@@ -2949,7 +2937,7 @@ function ll(s, e, t) {
2949
2937
  title: X.name,
2950
2938
  timestamp: new Date(X.createDate).getTime()
2951
2939
  }));
2952
- t(0, n = [...n, ...U]), h += kn, u = U.length === kn;
2940
+ t(0, n = [...n, ...U]), h += _n, u = U.length === _n;
2953
2941
  }
2954
2942
  } catch (I) {
2955
2943
  console.error("Failed to load sessions:", I);
@@ -2978,9 +2966,9 @@ function ll(s, e, t) {
2978
2966
  function w() {
2979
2967
  t(9, L = null);
2980
2968
  }
2981
- function _(I, C) {
2969
+ function k(I, C) {
2982
2970
  const X = I.currentTarget.getBoundingClientRect();
2983
- t(8, k = {
2971
+ t(8, _ = {
2984
2972
  x: X.left - 16,
2985
2973
  // 靠近删除按钮
2986
2974
  y: X.top + X.height / 2
@@ -2997,8 +2985,8 @@ function ll(s, e, t) {
2997
2985
  method: "POST",
2998
2986
  headers: {
2999
2987
  "Content-Type": "application/json",
3000
- "Auth-Token": `${de()}`,
3001
- Authorization: `bearer ${de()}`
2988
+ "Auth-Token": `${me()}`,
2989
+ Authorization: `bearer ${me()}`
3002
2990
  },
3003
2991
  body: JSON.stringify({ sessionId: I })
3004
2992
  });
@@ -3006,7 +2994,7 @@ function ll(s, e, t) {
3006
2994
  throw new Error("Delete request failed");
3007
2995
  const X = yield U.json();
3008
2996
  if (X.code === 0 && X.data.respCode === 0)
3009
- t(0, n = n.map((ne) => ye(ie({}, ne), {
2997
+ t(0, n = n.map((ne) => be(ie({}, ne), {
3010
2998
  deleting: ne.sessionId === I
3011
2999
  }))), setTimeout(
3012
3000
  () => {
@@ -3032,7 +3020,7 @@ function ll(s, e, t) {
3032
3020
  function M() {
3033
3021
  p = this.value, t(4, p);
3034
3022
  }
3035
- const z = (I) => l(I.sessionId), Z = (I, C) => _(C, I.sessionId), B = () => t(7, g = null);
3023
+ const z = (I) => l(I.sessionId), Z = (I, C) => k(C, I.sessionId), H = () => t(7, g = null);
3036
3024
  return s.$$set = (I) => {
3037
3025
  "sessions" in I && t(0, n = I.sessions), "onClose" in I && t(1, o = I.onClose), "onSelect" in I && t(2, l = I.onSelect), "zIndex" in I && t(3, i = I.zIndex), "apiPrefix" in I && t(15, r = I.apiPrefix);
3038
3026
  }, s.$$.update = () => {
@@ -3047,24 +3035,24 @@ function ll(s, e, t) {
3047
3035
  c,
3048
3036
  m,
3049
3037
  g,
3050
- k,
3038
+ _,
3051
3039
  L,
3052
3040
  R,
3053
3041
  A,
3054
3042
  w,
3055
- _,
3043
+ k,
3056
3044
  v,
3057
3045
  r,
3058
3046
  x,
3059
3047
  M,
3060
3048
  z,
3061
3049
  Z,
3062
- B
3050
+ H
3063
3051
  ];
3064
3052
  }
3065
3053
  class bi extends On {
3066
3054
  constructor(e) {
3067
- super(), zn(this, e, ll, ol, tn, {
3055
+ super(), zn(this, e, al, rl, tn, {
3068
3056
  sessions: 0,
3069
3057
  onClose: 1,
3070
3058
  onSelect: 2,
@@ -3085,7 +3073,7 @@ function Os(s, e, t) {
3085
3073
  const n = s.slice();
3086
3074
  return n[71] = e[t], n[73] = t, n;
3087
3075
  }
3088
- function rl(s) {
3076
+ function cl(s) {
3089
3077
  let e, t = [], n = /* @__PURE__ */ new Map(), o = st(
3090
3078
  /*messages*/
3091
3079
  s[5]
@@ -3119,8 +3107,8 @@ function rl(s) {
3119
3107
  i[5]
3120
3108
  ), t = si(t, r, l, 1, i, o, n, e, ni, Us, null, zs));
3121
3109
  },
3122
- i: Oe,
3123
- o: Oe,
3110
+ i: De,
3111
+ o: De,
3124
3112
  d(i) {
3125
3113
  i && W(e);
3126
3114
  for (let r = 0; r < t.length; r += 1)
@@ -3129,7 +3117,7 @@ function rl(s) {
3129
3117
  }
3130
3118
  };
3131
3119
  }
3132
- function al(s) {
3120
+ function ul(s) {
3133
3121
  let e, t;
3134
3122
  return e = new bi({
3135
3123
  props: {
@@ -3180,7 +3168,7 @@ function al(s) {
3180
3168
  }
3181
3169
  };
3182
3170
  }
3183
- function cl(s) {
3171
+ function fl(s) {
3184
3172
  let e;
3185
3173
  return {
3186
3174
  c() {
@@ -3194,7 +3182,7 @@ function cl(s) {
3194
3182
  }
3195
3183
  };
3196
3184
  }
3197
- function ul(s) {
3185
+ function hl(s) {
3198
3186
  let e;
3199
3187
  return {
3200
3188
  c() {
@@ -3208,7 +3196,7 @@ function ul(s) {
3208
3196
  }
3209
3197
  };
3210
3198
  }
3211
- function fl(s) {
3199
+ function pl(s) {
3212
3200
  let e, t = (
3213
3201
  /*renderMarkdown*/
3214
3202
  s[21](
@@ -3236,7 +3224,7 @@ function fl(s) {
3236
3224
  }
3237
3225
  };
3238
3226
  }
3239
- function hl(s) {
3227
+ function dl(s) {
3240
3228
  let e;
3241
3229
  return {
3242
3230
  c() {
@@ -3245,7 +3233,7 @@ function hl(s) {
3245
3233
  m(t, n) {
3246
3234
  Y(t, e, n);
3247
3235
  },
3248
- p: Oe,
3236
+ p: De,
3249
3237
  d(t) {
3250
3238
  t && W(e);
3251
3239
  }
@@ -3292,7 +3280,7 @@ function Ds(s) {
3292
3280
  }
3293
3281
  };
3294
3282
  }
3295
- function Ps(s) {
3283
+ function Ns(s) {
3296
3284
  let e, t, n;
3297
3285
  function o(...l) {
3298
3286
  return (
@@ -3327,24 +3315,24 @@ function Ps(s) {
3327
3315
  }
3328
3316
  };
3329
3317
  }
3330
- function Ns(s) {
3318
+ function Ps(s) {
3331
3319
  let e, t = (
3332
3320
  /*tooltipContent*/
3333
3321
  s[6].replace(/\n/g, "<br>") + ""
3334
3322
  ), n, o;
3335
3323
  return {
3336
3324
  c() {
3337
- e = S("div"), a(e, "class", "sy-assistant-tooltip svelte-mogmt"), a(e, "role", "tooltip"), N(
3325
+ e = S("div"), a(e, "class", "sy-assistant-tooltip svelte-mogmt"), a(e, "role", "tooltip"), F(
3338
3326
  e,
3339
3327
  "left",
3340
3328
  /*tooltipPosition*/
3341
3329
  s[7].x + "px"
3342
- ), N(
3330
+ ), F(
3343
3331
  e,
3344
3332
  "top",
3345
3333
  /*tooltipPosition*/
3346
3334
  s[7].y + "px"
3347
- ), N(
3335
+ ), F(
3348
3336
  e,
3349
3337
  "z-index",
3350
3338
  /*zIndex*/
@@ -3376,19 +3364,19 @@ function Ns(s) {
3376
3364
  i[0] & /*tooltipContent*/
3377
3365
  64 && t !== (t = /*tooltipContent*/
3378
3366
  l[6].replace(/\n/g, "<br>") + "") && (e.innerHTML = t), i[0] & /*tooltipPosition*/
3379
- 128 && N(
3367
+ 128 && F(
3380
3368
  e,
3381
3369
  "left",
3382
3370
  /*tooltipPosition*/
3383
3371
  l[7].x + "px"
3384
3372
  ), i[0] & /*tooltipPosition*/
3385
- 128 && N(
3373
+ 128 && F(
3386
3374
  e,
3387
3375
  "top",
3388
3376
  /*tooltipPosition*/
3389
3377
  l[7].y + "px"
3390
3378
  ), i[0] & /*zIndex*/
3391
- 1 && N(
3379
+ 1 && F(
3392
3380
  e,
3393
3381
  "z-index",
3394
3382
  /*zIndex*/
@@ -3410,12 +3398,12 @@ function Fs(s) {
3410
3398
  let e, t, n, o, l, i, r, c, u, h = Xt(
3411
3399
  /*attachment*/
3412
3400
  s[71].content_title
3413
- ).name + "", p, m, g, k = Xt(
3401
+ ).name + "", p, m, g, _ = Xt(
3414
3402
  /*attachment*/
3415
3403
  s[71].content_title
3416
- ).ext + "", T, R, L, A, w, _, b, v, x, M, z = (
3404
+ ).ext + "", T, R, L, A, w, k, b, v, x, M, z = (
3417
3405
  /*attachment*/
3418
- s[71].tips && Ps(s)
3406
+ s[71].tips && Ns(s)
3419
3407
  );
3420
3408
  function Z() {
3421
3409
  return (
@@ -3426,35 +3414,35 @@ function Fs(s) {
3426
3414
  )
3427
3415
  );
3428
3416
  }
3429
- let B = (
3417
+ let H = (
3430
3418
  /*tooltipContent*/
3431
- s[6] && Ns(s)
3419
+ s[6] && Ps(s)
3432
3420
  );
3433
3421
  return {
3434
3422
  c() {
3435
- e = S("div"), t = S("div"), n = S("div"), o = Q("svg"), l = Q("path"), i = Q("polyline"), r = j(), c = S("div"), u = S("span"), p = Te(h), m = j(), g = S("span"), T = Te(k), L = j(), A = S("div"), z && z.c(), w = j(), _ = S("button"), _.innerHTML = '<svg xmlns="http://www.w3.org/2000/svg" width="16" height="16" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="svelte-mogmt"><path d="M21 15v4a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2v-4"></path><polyline points="7 10 12 15 17 10"></polyline><line x1="12" y1="15" x2="12" y2="3"></line></svg>', b = j(), B && B.c(), v = j(), a(l, "d", "M13 2H6a2 2 0 0 0-2 2v16a2 2 0 0 0 2 2h12a2 2 0 0 0 2-2V9z"), a(i, "points", "13 2 13 9 20 9"), a(o, "xmlns", "http://www.w3.org/2000/svg"), a(o, "width", "16"), a(o, "height", "16"), a(o, "viewBox", "0 0 24 24"), a(o, "fill", "none"), a(o, "stroke", "currentColor"), a(o, "stroke-width", "2"), a(o, "stroke-linecap", "round"), a(o, "stroke-linejoin", "round"), a(u, "class", "sy-assistant-filename svelte-mogmt"), a(g, "class", "sy-assistant-attachment-ext svelte-mogmt"), a(c, "class", "sy-assistant-attachment-name svelte-mogmt"), a(c, "title", R = /*attachment*/
3436
- s[71].content_title), a(n, "class", "sy-assistant-attachment-title svelte-mogmt"), a(_, "class", "sy-assistant-attachment-toggle svelte-mogmt"), a(_, "aria-label", "下载文件"), a(A, "class", "sy-assistant-attachment-actions svelte-mogmt"), a(t, "class", "sy-assistant-attachment-header svelte-mogmt"), a(e, "class", "sy-assistant-attachment svelte-mogmt");
3423
+ e = S("div"), t = S("div"), n = S("div"), o = Q("svg"), l = Q("path"), i = Q("polyline"), r = j(), c = S("div"), u = S("span"), p = Te(h), m = j(), g = S("span"), T = Te(_), L = j(), A = S("div"), z && z.c(), w = j(), k = S("button"), k.innerHTML = '<svg xmlns="http://www.w3.org/2000/svg" width="16" height="16" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="svelte-mogmt"><path d="M21 15v4a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2v-4"></path><polyline points="7 10 12 15 17 10"></polyline><line x1="12" y1="15" x2="12" y2="3"></line></svg>', b = j(), H && H.c(), v = j(), a(l, "d", "M13 2H6a2 2 0 0 0-2 2v16a2 2 0 0 0 2 2h12a2 2 0 0 0 2-2V9z"), a(i, "points", "13 2 13 9 20 9"), a(o, "xmlns", "http://www.w3.org/2000/svg"), a(o, "width", "16"), a(o, "height", "16"), a(o, "viewBox", "0 0 24 24"), a(o, "fill", "none"), a(o, "stroke", "currentColor"), a(o, "stroke-width", "2"), a(o, "stroke-linecap", "round"), a(o, "stroke-linejoin", "round"), a(u, "class", "sy-assistant-filename svelte-mogmt"), a(g, "class", "sy-assistant-attachment-ext svelte-mogmt"), a(c, "class", "sy-assistant-attachment-name svelte-mogmt"), a(c, "title", R = /*attachment*/
3424
+ s[71].content_title), a(n, "class", "sy-assistant-attachment-title svelte-mogmt"), a(k, "class", "sy-assistant-attachment-toggle svelte-mogmt"), a(k, "aria-label", "下载文件"), a(A, "class", "sy-assistant-attachment-actions svelte-mogmt"), a(t, "class", "sy-assistant-attachment-header svelte-mogmt"), a(e, "class", "sy-assistant-attachment svelte-mogmt");
3437
3425
  },
3438
3426
  m(I, C) {
3439
- Y(I, e, C), d(e, t), d(t, n), d(n, o), d(o, l), d(o, i), d(n, r), d(n, c), d(c, u), d(u, p), d(c, m), d(c, g), d(g, T), d(t, L), d(t, A), z && z.m(A, null), d(A, w), d(A, _), d(e, b), B && B.m(e, null), d(e, v), x || (M = G(_, "click", Z), x = !0);
3427
+ Y(I, e, C), d(e, t), d(t, n), d(n, o), d(o, l), d(o, i), d(n, r), d(n, c), d(c, u), d(u, p), d(c, m), d(c, g), d(g, T), d(t, L), d(t, A), z && z.m(A, null), d(A, w), d(A, k), d(e, b), H && H.m(e, null), d(e, v), x || (M = G(k, "click", Z), x = !0);
3440
3428
  },
3441
3429
  p(I, C) {
3442
3430
  s = I, C[0] & /*messages*/
3443
3431
  32 && h !== (h = Xt(
3444
3432
  /*attachment*/
3445
3433
  s[71].content_title
3446
- ).name + "") && Ne(p, h), C[0] & /*messages*/
3447
- 32 && k !== (k = Xt(
3434
+ ).name + "") && Fe(p, h), C[0] & /*messages*/
3435
+ 32 && _ !== (_ = Xt(
3448
3436
  /*attachment*/
3449
3437
  s[71].content_title
3450
- ).ext + "") && Ne(T, k), C[0] & /*messages*/
3438
+ ).ext + "") && Fe(T, _), C[0] & /*messages*/
3451
3439
  32 && R !== (R = /*attachment*/
3452
3440
  s[71].content_title) && a(c, "title", R), /*attachment*/
3453
- s[71].tips ? z ? z.p(s, C) : (z = Ps(s), z.c(), z.m(A, w)) : z && (z.d(1), z = null), /*tooltipContent*/
3454
- s[6] ? B ? B.p(s, C) : (B = Ns(s), B.c(), B.m(e, v)) : B && (B.d(1), B = null);
3441
+ s[71].tips ? z ? z.p(s, C) : (z = Ns(s), z.c(), z.m(A, w)) : z && (z.d(1), z = null), /*tooltipContent*/
3442
+ s[6] ? H ? H.p(s, C) : (H = Ps(s), H.c(), H.m(e, v)) : H && (H.d(1), H = null);
3455
3443
  },
3456
3444
  d(I) {
3457
- I && W(e), z && z.d(), B && B.d(), x = !1, M();
3445
+ I && W(e), z && z.d(), H && H.d(), x = !1, M();
3458
3446
  }
3459
3447
  };
3460
3448
  }
@@ -3466,10 +3454,10 @@ function Hs(s) {
3466
3454
  v[13][
3467
3455
  /*msg*/
3468
3456
  v[68].id
3469
- ] ? dl : pl
3457
+ ] ? gl : ml
3470
3458
  );
3471
3459
  }
3472
- let g = m(s), k = g(s);
3460
+ let g = m(s), _ = g(s);
3473
3461
  function T() {
3474
3462
  return (
3475
3463
  /*click_handler_1*/
@@ -3518,7 +3506,7 @@ function Hs(s) {
3518
3506
  )
3519
3507
  );
3520
3508
  }
3521
- function _(...v) {
3509
+ function k(...v) {
3522
3510
  return (
3523
3511
  /*mouseenter_handler_4*/
3524
3512
  s[47](
@@ -3538,7 +3526,7 @@ function Hs(s) {
3538
3526
  );
3539
3527
  return {
3540
3528
  c() {
3541
- e = S("div"), t = S("button"), k.c(), o = j(), l = S("button"), l.innerHTML = '<svg xmlns="http://www.w3.org/2000/svg" width="14" height="14" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"><path d="M14 9V5a3 3 0 0 0-3-3l-4 9v11h11.28a2 2 0 0 0 2-1.7l1.38-9a2 2 0 0 0-2-2.3zM7 22H4a2 2 0 0 1-2-2v-7a2 2 0 0 1 2-2h3"></path></svg>', i = j(), r = S("button"), r.innerHTML = '<svg xmlns="http://www.w3.org/2000/svg" width="14" height="14" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"><path d="M10 15v4a3 3 0 0 0 3 3l4-9V2H5.72a2 2 0 0 0-2 1.7l-1.38 9a2 2 0 0 0 2 2.3zm7-13h3a2 2 0 0 1 2 2v7a2 2 0 0 1-2 2h-3"></path></svg>', c = j(), b && b.c(), u = nn(), a(t, "class", "sy-assistant-action-button svelte-mogmt"), a(t, "aria-label", n = /*copyStatus*/
3529
+ e = S("div"), t = S("button"), _.c(), o = j(), l = S("button"), l.innerHTML = '<svg xmlns="http://www.w3.org/2000/svg" width="14" height="14" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"><path d="M14 9V5a3 3 0 0 0-3-3l-4 9v11h11.28a2 2 0 0 0 2-1.7l1.38-9a2 2 0 0 0-2-2.3zM7 22H4a2 2 0 0 1-2-2v-7a2 2 0 0 1 2-2h3"></path></svg>', i = j(), r = S("button"), r.innerHTML = '<svg xmlns="http://www.w3.org/2000/svg" width="14" height="14" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"><path d="M10 15v4a3 3 0 0 0 3 3l4-9V2H5.72a2 2 0 0 0-2 1.7l-1.38 9a2 2 0 0 0 2 2.3zm7-13h3a2 2 0 0 1 2 2v7a2 2 0 0 1-2 2h-3"></path></svg>', c = j(), b && b.c(), u = nn(), a(t, "class", "sy-assistant-action-button svelte-mogmt"), a(t, "aria-label", n = /*copyStatus*/
3542
3530
  s[13][
3543
3531
  /*msg*/
3544
3532
  s[68].id
@@ -3569,7 +3557,7 @@ function Hs(s) {
3569
3557
  ), a(e, "class", "sy-assistant-message-actions svelte-mogmt");
3570
3558
  },
3571
3559
  m(v, x) {
3572
- Y(v, e, x), d(e, t), k.m(t, null), d(e, o), d(e, l), d(e, i), d(e, r), Y(v, c, x), b && b.m(v, x), Y(v, u, x), h || (p = [
3560
+ Y(v, e, x), d(e, t), _.m(t, null), d(e, o), d(e, l), d(e, i), d(e, r), Y(v, c, x), b && b.m(v, x), Y(v, u, x), h || (p = [
3573
3561
  G(t, "click", T),
3574
3562
  G(t, "mouseenter", R),
3575
3563
  G(
@@ -3587,7 +3575,7 @@ function Hs(s) {
3587
3575
  s[31]
3588
3576
  ),
3589
3577
  G(r, "click", w),
3590
- G(r, "mouseenter", _),
3578
+ G(r, "mouseenter", k),
3591
3579
  G(
3592
3580
  r,
3593
3581
  "mouseleave",
@@ -3597,7 +3585,7 @@ function Hs(s) {
3597
3585
  ], h = !0);
3598
3586
  },
3599
3587
  p(v, x) {
3600
- s = v, g !== (g = m(s)) && (k.d(1), k = g(s), k && (k.c(), k.m(t, null))), x[0] & /*copyStatus, messages*/
3588
+ s = v, g !== (g = m(s)) && (_.d(1), _ = g(s), _ && (_.c(), _.m(t, null))), x[0] & /*copyStatus, messages*/
3601
3589
  8224 && n !== (n = /*copyStatus*/
3602
3590
  s[13][
3603
3591
  /*msg*/
@@ -3637,11 +3625,11 @@ function Hs(s) {
3637
3625
  ] === "dislike" ? b ? b.p(s, x) : (b = Bs(s), b.c(), b.m(u.parentNode, u)) : b && (b.d(1), b = null);
3638
3626
  },
3639
3627
  d(v) {
3640
- v && (W(e), W(c), W(u)), k.d(), b && b.d(v), h = !1, Ae(p);
3628
+ v && (W(e), W(c), W(u)), _.d(), b && b.d(v), h = !1, Ae(p);
3641
3629
  }
3642
3630
  };
3643
3631
  }
3644
- function pl(s) {
3632
+ function ml(s) {
3645
3633
  let e, t, n;
3646
3634
  return {
3647
3635
  c() {
@@ -3655,7 +3643,7 @@ function pl(s) {
3655
3643
  }
3656
3644
  };
3657
3645
  }
3658
- function dl(s) {
3646
+ function gl(s) {
3659
3647
  let e, t;
3660
3648
  return {
3661
3649
  c() {
@@ -3687,7 +3675,7 @@ function Bs(s) {
3687
3675
  )
3688
3676
  );
3689
3677
  }
3690
- function k() {
3678
+ function _() {
3691
3679
  return (
3692
3680
  /*click_handler_5*/
3693
3681
  s[50](
@@ -3698,17 +3686,17 @@ function Bs(s) {
3698
3686
  }
3699
3687
  return {
3700
3688
  c() {
3701
- e = S("div"), t = S("div"), t.textContent = "反馈意见", n = j(), o = S("textarea"), l = j(), i = S("div"), r = S("button"), r.textContent = "取消", c = j(), u = S("button"), u.textContent = "提交", a(t, "class", "sy-assistant-dislike-title svelte-mogmt"), a(o, "class", "sy-assistant-dislike-input svelte-mogmt"), a(o, "placeholder", "请输入您的反馈意见..."), a(r, "class", "sy-assistant-popup-cancel svelte-mogmt"), a(u, "class", "sy-assistant-popup-submit svelte-mogmt"), a(i, "class", "sy-assistant-popup-actions svelte-mogmt"), a(e, "class", "sy-assistant-dislike-popup svelte-mogmt"), N(
3689
+ e = S("div"), t = S("div"), t.textContent = "反馈意见", n = j(), o = S("textarea"), l = j(), i = S("div"), r = S("button"), r.textContent = "取消", c = j(), u = S("button"), u.textContent = "提交", a(t, "class", "sy-assistant-dislike-title svelte-mogmt"), a(o, "class", "sy-assistant-dislike-input svelte-mogmt"), a(o, "placeholder", "请输入您的反馈意见..."), a(r, "class", "sy-assistant-popup-cancel svelte-mogmt"), a(u, "class", "sy-assistant-popup-submit svelte-mogmt"), a(i, "class", "sy-assistant-popup-actions svelte-mogmt"), a(e, "class", "sy-assistant-dislike-popup svelte-mogmt"), F(
3702
3690
  e,
3703
3691
  "left",
3704
3692
  /*dislikeFeedbackPosition*/
3705
3693
  s[17].x + "px"
3706
- ), N(
3694
+ ), F(
3707
3695
  e,
3708
3696
  "top",
3709
3697
  /*dislikeFeedbackPosition*/
3710
3698
  s[17].y + "px"
3711
- ), N(
3699
+ ), F(
3712
3700
  e,
3713
3701
  "z-index",
3714
3702
  /*zIndex*/
@@ -3726,7 +3714,7 @@ function Bs(s) {
3726
3714
  ), d(e, l), d(e, i), d(i, r), d(i, c), d(i, u), h || (p = [
3727
3715
  G(o, "input", m),
3728
3716
  G(r, "click", g),
3729
- G(u, "click", k)
3717
+ G(u, "click", _)
3730
3718
  ], h = !0);
3731
3719
  },
3732
3720
  p(T, R) {
@@ -3739,19 +3727,19 @@ function Bs(s) {
3739
3727
  s[68].id
3740
3728
  ]
3741
3729
  ), R[0] & /*dislikeFeedbackPosition*/
3742
- 131072 && N(
3730
+ 131072 && F(
3743
3731
  e,
3744
3732
  "left",
3745
3733
  /*dislikeFeedbackPosition*/
3746
3734
  s[17].x + "px"
3747
3735
  ), R[0] & /*dislikeFeedbackPosition*/
3748
- 131072 && N(
3736
+ 131072 && F(
3749
3737
  e,
3750
3738
  "top",
3751
3739
  /*dislikeFeedbackPosition*/
3752
3740
  s[17].y + "px"
3753
3741
  ), R[0] & /*zIndex*/
3754
- 1 && N(
3742
+ 1 && F(
3755
3743
  e,
3756
3744
  "z-index",
3757
3745
  /*zIndex*/
@@ -3771,10 +3759,10 @@ function Us(s, e) {
3771
3759
  function g(b, v) {
3772
3760
  return (
3773
3761
  /*msg*/
3774
- b[68].type === "assistant" ? ul : cl
3762
+ b[68].type === "assistant" ? hl : fl
3775
3763
  );
3776
3764
  }
3777
- let k = g(e), T = k(e);
3765
+ let _ = g(e), T = _(e);
3778
3766
  function R(b, v) {
3779
3767
  return (
3780
3768
  /*isLoading*/
@@ -3785,13 +3773,13 @@ function Us(s, e) {
3785
3773
  b[5].length - 1
3786
3774
  ].id && /*msg*/
3787
3775
  b[68].type === "assistant" && !/*msg*/
3788
- b[68].content ? hl : fl
3776
+ b[68].content ? dl : pl
3789
3777
  );
3790
3778
  }
3791
3779
  let L = R(e), A = L(e), w = (
3792
3780
  /*msg*/
3793
3781
  e[68].attachments && Ds(e)
3794
- ), _ = (
3782
+ ), k = (
3795
3783
  /*msg*/
3796
3784
  e[68].id !== "-1" && /*msg*/
3797
3785
  e[68].type === "assistant" && !/*isLoading*/
@@ -3801,7 +3789,7 @@ function Us(s, e) {
3801
3789
  key: s,
3802
3790
  first: null,
3803
3791
  c() {
3804
- t = S("div"), T.c(), n = j(), o = S("div"), l = S("div"), A.c(), i = j(), w && w.c(), r = j(), _ && _.c(), c = j(), u = S("div"), p = Te(h), m = j(), a(l, "class", "sy-assistant-message-content svelte-mogmt"), a(u, "class", "sy-assistant-message-time svelte-mogmt"), a(o, "class", "sy-assistant-message-bubble svelte-mogmt"), a(t, "class", "sy-assistant-message svelte-mogmt"), $(
3792
+ t = S("div"), T.c(), n = j(), o = S("div"), l = S("div"), A.c(), i = j(), w && w.c(), r = j(), k && k.c(), c = j(), u = S("div"), p = Te(h), m = j(), a(l, "class", "sy-assistant-message-content svelte-mogmt"), a(u, "class", "sy-assistant-message-time svelte-mogmt"), a(o, "class", "sy-assistant-message-bubble svelte-mogmt"), a(t, "class", "sy-assistant-message svelte-mogmt"), $(
3805
3793
  t,
3806
3794
  "user",
3807
3795
  /*msg*/
@@ -3809,18 +3797,18 @@ function Us(s, e) {
3809
3797
  ), this.first = t;
3810
3798
  },
3811
3799
  m(b, v) {
3812
- Y(b, t, v), T.m(t, null), d(t, n), d(t, o), d(o, l), A.m(l, null), d(l, i), w && w.m(l, null), d(l, r), _ && _.m(l, null), d(o, c), d(o, u), d(u, p), d(t, m);
3800
+ Y(b, t, v), T.m(t, null), d(t, n), d(t, o), d(o, l), A.m(l, null), d(l, i), w && w.m(l, null), d(l, r), k && k.m(l, null), d(o, c), d(o, u), d(u, p), d(t, m);
3813
3801
  },
3814
3802
  p(b, v) {
3815
- e = b, k !== (k = g(e)) && (T.d(1), T = k(e), T && (T.c(), T.m(t, n))), L === (L = R(e)) && A ? A.p(e, v) : (A.d(1), A = L(e), A && (A.c(), A.m(l, i))), /*msg*/
3803
+ e = b, _ !== (_ = g(e)) && (T.d(1), T = _(e), T && (T.c(), T.m(t, n))), L === (L = R(e)) && A ? A.p(e, v) : (A.d(1), A = L(e), A && (A.c(), A.m(l, i))), /*msg*/
3816
3804
  e[68].attachments ? w ? w.p(e, v) : (w = Ds(e), w.c(), w.m(l, r)) : w && (w.d(1), w = null), /*msg*/
3817
3805
  e[68].id !== "-1" && /*msg*/
3818
3806
  e[68].type === "assistant" && !/*isLoading*/
3819
- e[9] ? _ ? _.p(e, v) : (_ = Hs(e), _.c(), _.m(l, null)) : _ && (_.d(1), _ = null), v[0] & /*messages*/
3807
+ e[9] ? k ? k.p(e, v) : (k = Hs(e), k.c(), k.m(l, null)) : k && (k.d(1), k = null), v[0] & /*messages*/
3820
3808
  32 && h !== (h = new Date(
3821
3809
  /*msg*/
3822
3810
  e[68].timestamp
3823
- ).toLocaleString() + "") && Ne(p, h), v[0] & /*messages*/
3811
+ ).toLocaleString() + "") && Fe(p, h), v[0] & /*messages*/
3824
3812
  32 && $(
3825
3813
  t,
3826
3814
  "user",
@@ -3829,22 +3817,22 @@ function Us(s, e) {
3829
3817
  );
3830
3818
  },
3831
3819
  d(b) {
3832
- b && W(t), T.d(), A.d(), w && w.d(), _ && _.d();
3820
+ b && W(t), T.d(), A.d(), w && w.d(), k && k.d();
3833
3821
  }
3834
3822
  };
3835
3823
  }
3836
3824
  function js(s) {
3837
- let e, t, n, o, l, i, r, c, u, h, p, m, g, k, T, R, L, A, w, _, b, v, x, M, z, Z, B, I = (
3825
+ let e, t, n, o, l, i, r, c, u, h, p, m, g, _, T, R, L, A, w, k, b, v, x, M, z, Z, H, I = (
3838
3826
  /*hasScene*/
3839
3827
  s[1] && Ws(s)
3840
3828
  ), C = !/*hasScene*/
3841
3829
  s[1] && Gs();
3842
3830
  return {
3843
3831
  c() {
3844
- e = S("div"), t = S("div"), I && I.c(), n = j(), C && C.c(), o = j(), l = S("div"), i = S("button"), i.innerHTML = '<svg xmlns="http://www.w3.org/2000/svg" width="16" height="16" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"><path d="M12 8v4l3 3"></path><circle cx="12" cy="12" r="10"></circle></svg>', r = j(), c = S("button"), c.innerHTML = '<svg xmlns="http://www.w3.org/2000/svg" width="16" height="16" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"><line x1="12" y1="5" x2="12" y2="19"></line><line x1="5" y1="12" x2="19" y2="12"></line></svg>', u = j(), h = S("div"), p = S("div"), m = S("div"), g = S("div"), k = S("textarea"), T = j(), R = S("div"), L = Te(
3832
+ e = S("div"), t = S("div"), I && I.c(), n = j(), C && C.c(), o = j(), l = S("div"), i = S("button"), i.innerHTML = '<svg xmlns="http://www.w3.org/2000/svg" width="16" height="16" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"><path d="M12 8v4l3 3"></path><circle cx="12" cy="12" r="10"></circle></svg>', r = j(), c = S("button"), c.innerHTML = '<svg xmlns="http://www.w3.org/2000/svg" width="16" height="16" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"><line x1="12" y1="5" x2="12" y2="19"></line><line x1="5" y1="12" x2="19" y2="12"></line></svg>', u = j(), h = S("div"), p = S("div"), m = S("div"), g = S("div"), _ = S("textarea"), T = j(), R = S("div"), L = Te(
3845
3833
  /*messageLength*/
3846
3834
  s[4]
3847
- ), A = Te("/"), w = Te(An), _ = j(), b = S("button"), v = Q("svg"), x = Q("line"), M = Q("polygon"), a(i, "class", "sy-assistant-icon-button svelte-mogmt"), a(i, "aria-label", "历史会话"), a(c, "class", "sy-assistant-icon-button svelte-mogmt"), a(c, "aria-label", "新建会话"), a(l, "class", "sy-assistant-chat-actions-btns svelte-mogmt"), a(t, "class", "sy-assistant-chat-actions svelte-mogmt"), a(e, "class", "sy-assistant-chat-footer svelte-mogmt"), a(k, "class", "sy-assistant-textarea svelte-mogmt"), a(k, "placeholder", "输入您的问题..."), a(k, "maxlength", An), a(k, "rows", "3"), a(R, "class", "sy-assistant-char-count svelte-mogmt"), $(
3835
+ ), A = Te("/"), w = Te(An), k = j(), b = S("button"), v = Q("svg"), x = Q("line"), M = Q("polygon"), a(i, "class", "sy-assistant-icon-button svelte-mogmt"), a(i, "aria-label", "历史会话"), a(c, "class", "sy-assistant-icon-button svelte-mogmt"), a(c, "aria-label", "新建会话"), a(l, "class", "sy-assistant-chat-actions-btns svelte-mogmt"), a(t, "class", "sy-assistant-chat-actions svelte-mogmt"), a(e, "class", "sy-assistant-chat-footer svelte-mogmt"), a(_, "class", "sy-assistant-textarea svelte-mogmt"), a(_, "placeholder", "输入您的问题..."), a(_, "maxlength", An), a(_, "rows", "3"), a(R, "class", "sy-assistant-char-count svelte-mogmt"), $(
3848
3836
  R,
3849
3837
  "over-limit",
3850
3838
  /*isOverLimit*/
@@ -3854,11 +3842,11 @@ function js(s) {
3854
3842
  s[20], a(b, "aria-label", "发送消息"), a(p, "class", "sy-assistant-input-container svelte-mogmt"), a(h, "class", "sy-assistant-input-area svelte-mogmt");
3855
3843
  },
3856
3844
  m(U, X) {
3857
- Y(U, e, X), d(e, t), I && I.m(t, null), d(t, n), C && C.m(t, null), d(t, o), d(t, l), d(l, i), d(l, r), d(l, c), Y(U, u, X), Y(U, h, X), d(h, p), d(p, m), d(m, g), d(g, k), nt(
3858
- k,
3845
+ Y(U, e, X), d(e, t), I && I.m(t, null), d(t, n), C && C.m(t, null), d(t, o), d(t, l), d(l, i), d(l, r), d(l, c), Y(U, u, X), Y(U, h, X), d(h, p), d(p, m), d(m, g), d(g, _), nt(
3846
+ _,
3859
3847
  /*message*/
3860
3848
  s[3]
3861
- ), d(g, T), d(g, R), d(R, L), d(R, A), d(R, w), d(p, _), d(p, b), d(b, v), d(v, x), d(v, M), Z || (B = [
3849
+ ), d(g, T), d(g, R), d(R, L), d(R, A), d(R, w), d(p, k), d(p, b), d(b, v), d(v, x), d(v, M), Z || (H = [
3862
3850
  G(
3863
3851
  i,
3864
3852
  "click",
@@ -3896,13 +3884,13 @@ function js(s) {
3896
3884
  s[31]
3897
3885
  ),
3898
3886
  G(
3899
- k,
3887
+ _,
3900
3888
  "input",
3901
3889
  /*textarea_input_handler_1*/
3902
3890
  s[55]
3903
3891
  ),
3904
3892
  G(
3905
- k,
3893
+ _,
3906
3894
  "keydown",
3907
3895
  /*keydown_handler*/
3908
3896
  s[56]
@@ -3932,11 +3920,11 @@ function js(s) {
3932
3920
  U[1] ? I ? I.p(U, X) : (I = Ws(U), I.c(), I.m(t, n)) : I && (I.d(1), I = null), /*hasScene*/
3933
3921
  U[1] ? C && (C.d(1), C = null) : C || (C = Gs(), C.c(), C.m(t, o)), X[0] & /*message*/
3934
3922
  8 && nt(
3935
- k,
3923
+ _,
3936
3924
  /*message*/
3937
3925
  U[3]
3938
3926
  ), X[0] & /*messageLength*/
3939
- 16 && Ne(
3927
+ 16 && Fe(
3940
3928
  L,
3941
3929
  /*messageLength*/
3942
3930
  U[4]
@@ -3952,7 +3940,7 @@ function js(s) {
3952
3940
  U[20]) && (b.disabled = z);
3953
3941
  },
3954
3942
  d(U) {
3955
- U && (W(e), W(u), W(h)), I && I.d(), C && C.d(), Z = !1, Ae(B);
3943
+ U && (W(e), W(u), W(h)), I && I.d(), C && C.d(), Z = !1, Ae(H);
3956
3944
  }
3957
3945
  };
3958
3946
  }
@@ -4034,7 +4022,7 @@ function qs(s) {
4034
4022
  p(i, r) {
4035
4023
  r[0] & /*scenes*/
4036
4024
  2048 && t !== (t = /*scene*/
4037
- i[65].name + "") && Ne(n, t), r[0] & /*scenes*/
4025
+ i[65].name + "") && Fe(n, t), r[0] & /*scenes*/
4038
4026
  2048 && l !== (l = /*scene*/
4039
4027
  i[65].code) && (e.__value = l, nt(e, e.__value));
4040
4028
  },
@@ -4064,12 +4052,12 @@ function Ys(s) {
4064
4052
  ), n;
4065
4053
  return {
4066
4054
  c() {
4067
- e = S("div"), n = Te(t), a(e, "class", "sy-assistant-button-tooltip svelte-mogmt"), N(
4055
+ e = S("div"), n = Te(t), a(e, "class", "sy-assistant-button-tooltip svelte-mogmt"), F(
4068
4056
  e,
4069
4057
  "left",
4070
4058
  /*buttonTooltip*/
4071
4059
  s[18].x + "px"
4072
- ), N(
4060
+ ), F(
4073
4061
  e,
4074
4062
  "top",
4075
4063
  /*buttonTooltip*/
@@ -4082,14 +4070,14 @@ function Ys(s) {
4082
4070
  p(o, l) {
4083
4071
  l[0] & /*buttonTooltip*/
4084
4072
  262144 && t !== (t = /*buttonTooltip*/
4085
- o[18].text + "") && Ne(n, t), l[0] & /*buttonTooltip*/
4086
- 262144 && N(
4073
+ o[18].text + "") && Fe(n, t), l[0] & /*buttonTooltip*/
4074
+ 262144 && F(
4087
4075
  e,
4088
4076
  "left",
4089
4077
  /*buttonTooltip*/
4090
4078
  o[18].x + "px"
4091
4079
  ), l[0] & /*buttonTooltip*/
4092
- 262144 && N(
4080
+ 262144 && F(
4093
4081
  e,
4094
4082
  "top",
4095
4083
  /*buttonTooltip*/
@@ -4101,10 +4089,10 @@ function Ys(s) {
4101
4089
  }
4102
4090
  };
4103
4091
  }
4104
- function ml(s) {
4092
+ function _l(s) {
4105
4093
  let e, t, n, o, l, i, r;
4106
- const c = [al, rl], u = [];
4107
- function h(g, k) {
4094
+ const c = [ul, cl], u = [];
4095
+ function h(g, _) {
4108
4096
  return (
4109
4097
  /*showHistory*/
4110
4098
  g[19] ? 0 : 1
@@ -4118,29 +4106,29 @@ function ml(s) {
4118
4106
  );
4119
4107
  return {
4120
4108
  c() {
4121
- e = S("div"), n.c(), o = j(), p && p.c(), l = j(), m && m.c(), i = nn(), a(e, "class", "sy-assistant-chat-container svelte-mogmt"), N(
4109
+ e = S("div"), n.c(), o = j(), p && p.c(), l = j(), m && m.c(), i = nn(), a(e, "class", "sy-assistant-chat-container svelte-mogmt"), F(
4122
4110
  e,
4123
4111
  "z-index",
4124
4112
  /*zIndex*/
4125
4113
  s[0] + 2
4126
4114
  );
4127
4115
  },
4128
- m(g, k) {
4129
- Y(g, e, k), u[t].m(e, null), d(e, o), p && p.m(e, null), Y(g, l, k), m && m.m(g, k), Y(g, i, k), r = !0;
4116
+ m(g, _) {
4117
+ Y(g, e, _), u[t].m(e, null), d(e, o), p && p.m(e, null), Y(g, l, _), m && m.m(g, _), Y(g, i, _), r = !0;
4130
4118
  },
4131
- p(g, k) {
4119
+ p(g, _) {
4132
4120
  let T = t;
4133
- t = h(g), t === T ? u[t].p(g, k) : (Cn(), Ke(u[T], 1, 1, () => {
4121
+ t = h(g), t === T ? u[t].p(g, _) : (Cn(), Ke(u[T], 1, 1, () => {
4134
4122
  u[T] = null;
4135
- }), Ln(), n = u[t], n ? n.p(g, k) : (n = u[t] = c[t](g), n.c()), je(n, 1), n.m(e, o)), /*showHistory*/
4136
- g[19] ? p && (p.d(1), p = null) : p ? p.p(g, k) : (p = js(g), p.c(), p.m(e, null)), (!r || k[0] & /*zIndex*/
4137
- 1) && N(
4123
+ }), Ln(), n = u[t], n ? n.p(g, _) : (n = u[t] = c[t](g), n.c()), je(n, 1), n.m(e, o)), /*showHistory*/
4124
+ g[19] ? p && (p.d(1), p = null) : p ? p.p(g, _) : (p = js(g), p.c(), p.m(e, null)), (!r || _[0] & /*zIndex*/
4125
+ 1) && F(
4138
4126
  e,
4139
4127
  "z-index",
4140
4128
  /*zIndex*/
4141
4129
  g[0] + 2
4142
4130
  ), /*buttonTooltip*/
4143
- g[18] ? m ? m.p(g, k) : (m = Ys(g), m.c(), m.m(i.parentNode, i)) : m && (m.d(1), m = null);
4131
+ g[18] ? m ? m.p(g, _) : (m = Ys(g), m.c(), m.m(i.parentNode, i)) : m && (m.d(1), m = null);
4144
4132
  },
4145
4133
  i(g) {
4146
4134
  r || (je(n), r = !0);
@@ -4154,7 +4142,7 @@ function ml(s) {
4154
4142
  };
4155
4143
  }
4156
4144
  let An = 500;
4157
- function gl(s) {
4145
+ function kl(s) {
4158
4146
  const e = s.match(/source#\[(.*)\]#source/);
4159
4147
  return e ? s.replace(`source#[${e[1]}]#source`, "") : s;
4160
4148
  }
@@ -4179,7 +4167,7 @@ function Xt(s) {
4179
4167
  }
4180
4168
  return { name: s, ext: "" };
4181
4169
  }
4182
- function kl(s, e, t) {
4170
+ function wl(s, e, t) {
4183
4171
  let n, o, l = "", i = [
4184
4172
  {
4185
4173
  sessionId: "",
@@ -4198,10 +4186,10 @@ function kl(s, e, t) {
4198
4186
  });
4199
4187
  function g(y) {
4200
4188
  try {
4201
- const H = te(y);
4202
- return Es.sanitize(H);
4203
- } catch (H) {
4204
- console.warn("Markdown parsing failed, fallback to HTML:", H);
4189
+ const B = te(y);
4190
+ return Es.sanitize(B);
4191
+ } catch (B) {
4192
+ console.warn("Markdown parsing failed, fallback to HTML:", B);
4205
4193
  try {
4206
4194
  const J = y.replace(/\n/g, "<br>").replace(
4207
4195
  /\*\*(.*?)\*\*/g,
@@ -4214,30 +4202,30 @@ function kl(s, e, t) {
4214
4202
  }
4215
4203
  }
4216
4204
  }
4217
- let k;
4205
+ let _;
4218
4206
  function T(y = !1) {
4219
- k && k.scrollTo({
4220
- top: k.scrollHeight,
4207
+ _ && _.scrollTo({
4208
+ top: _.scrollHeight,
4221
4209
  behavior: y ? "smooth" : "auto"
4222
4210
  });
4223
4211
  }
4224
4212
  Fi(() => {
4225
4213
  T(!1);
4226
4214
  });
4227
- let { zIndex: R } = e, { sessionId: L } = e, { hasScene: A } = e, { apiPrefix: w } = e, _ = [], b = "";
4215
+ let { zIndex: R } = e, { sessionId: L } = e, { hasScene: A } = e, { apiPrefix: w } = e, k = [], b = "";
4228
4216
  function v() {
4229
4217
  return Se(this, null, function* () {
4230
4218
  if (A)
4231
4219
  try {
4232
4220
  const y = yield fetch(`${w}/chat/getSceneList`, {
4233
4221
  headers: {
4234
- "Auth-Token": `${de()}`,
4235
- Authorization: `bearer ${de()}`
4222
+ "Auth-Token": `${me()}`,
4223
+ Authorization: `bearer ${me()}`
4236
4224
  }
4237
4225
  });
4238
4226
  if (!y.ok) throw new Error("Failed to fetch scenes");
4239
- const H = yield y.json();
4240
- H.code === 0 && (t(11, _ = H.data.sceneList || []), _.length > 0 && t(12, b = _[0].code));
4227
+ const B = yield y.json();
4228
+ B.code === 0 && (t(11, k = B.data.sceneList || []), k.length > 0 && t(12, b = k[0].code));
4241
4229
  } catch (y) {
4242
4230
  console.error("Failed to fetch scenes:", y);
4243
4231
  }
@@ -4253,9 +4241,9 @@ function kl(s, e, t) {
4253
4241
  console.error("No session ID available");
4254
4242
  return;
4255
4243
  }
4256
- const y = Date.now().toString(), H = Date.now().toString() + Math.random().toString().slice(2, 8), J = {
4244
+ const y = Date.now().toString(), B = Date.now().toString() + Math.random().toString().slice(2, 8), J = {
4257
4245
  sessionId: L,
4258
- requestId: H,
4246
+ requestId: B,
4259
4247
  id: y,
4260
4248
  type: "user",
4261
4249
  content: l.trim(),
@@ -4269,7 +4257,7 @@ function kl(s, e, t) {
4269
4257
  ...i,
4270
4258
  {
4271
4259
  sessionId: L,
4272
- requestId: H,
4260
+ requestId: B,
4273
4261
  id: ce,
4274
4262
  type: "assistant",
4275
4263
  content: "",
@@ -4281,46 +4269,46 @@ function kl(s, e, t) {
4281
4269
  method: "POST",
4282
4270
  headers: {
4283
4271
  "Content-Type": "application/json",
4284
- "Auth-Token": `${de()}`,
4285
- Authorization: `bearer ${de()}`
4272
+ "Auth-Token": `${me()}`,
4273
+ Authorization: `bearer ${me()}`
4286
4274
  },
4287
4275
  body: JSON.stringify({
4288
4276
  sessionId: L,
4289
- requestId: H,
4277
+ requestId: B,
4290
4278
  keyword: ae,
4291
4279
  flowId: "1",
4292
4280
  extendKeys: A ? { sceneCode: b } : void 0
4293
4281
  }),
4294
4282
  signal: c.signal,
4295
- onmessage(_e) {
4283
+ onmessage(ke) {
4296
4284
  try {
4297
- const we = _e.data;
4298
- if (we) {
4299
- const ht = Zs(we);
4300
- ht ? (t(5, i = i.map((Ue) => Ue.id === ce ? ye(ie({}, Ue), { attachments: ht }) : Ue)), T(!0)) : (r += we, t(5, i = i.map((Ue) => Ue.id === ce ? ye(ie({}, Ue), { content: r }) : Ue)), T(!1));
4285
+ const he = ke.data;
4286
+ if (he) {
4287
+ const ht = Zs(he);
4288
+ ht ? (t(5, i = i.map((Ue) => Ue.id === ce ? be(ie({}, Ue), { attachments: ht }) : Ue)), T(!0)) : (r += he, t(5, i = i.map((Ue) => Ue.id === ce ? be(ie({}, Ue), { content: r }) : Ue)), T(!1));
4301
4289
  }
4302
- } catch (we) {
4303
- console.error("Failed to process SSE message:", we);
4290
+ } catch (he) {
4291
+ console.error("Failed to process SSE message:", he);
4304
4292
  }
4305
4293
  },
4306
- onerror(_e) {
4307
- console.error("SSE error:", _e), c = null, t(9, m = !1);
4294
+ onerror(ke) {
4295
+ throw r = "请求异常,请重试", t(5, i = i.map((he) => he.id === ce ? be(ie({}, he), { content: r }) : he)), T(!1), console.error("SSE error:", ke), c = null, t(9, m = !1), ke;
4308
4296
  },
4309
4297
  onclose() {
4310
4298
  c = null, t(9, m = !1);
4311
4299
  }
4312
4300
  });
4313
- } catch (_e) {
4314
- console.error("Failed to send message:", _e), t(9, m = !1);
4301
+ } catch (ke) {
4302
+ console.error("Failed to send message:", ke), t(9, m = !1);
4315
4303
  }
4316
4304
  });
4317
4305
  }
4318
- function M(y, H, J) {
4319
- const ae = J.getBoundingClientRect(), ce = k.getBoundingClientRect(), _e = ae.left < ce.width / 2;
4320
- t(6, u = H), t(7, h = {
4306
+ function M(y, B, J) {
4307
+ const ae = J.getBoundingClientRect(), ce = _.getBoundingClientRect(), ke = ae.left < ce.width / 2;
4308
+ t(6, u = B), t(7, h = {
4321
4309
  x: ae.left,
4322
4310
  y: ae.top + ae.height / 2,
4323
- alignRight: _e
4311
+ alignRight: ke
4324
4312
  });
4325
4313
  }
4326
4314
  function z() {
@@ -4334,40 +4322,40 @@ function kl(s, e, t) {
4334
4322
  Hi(() => {
4335
4323
  c && c.abort(), p && clearTimeout(p);
4336
4324
  });
4337
- function Z(y, H) {
4325
+ function Z(y, B) {
4338
4326
  return Se(this, null, function* () {
4339
4327
  try {
4340
4328
  const J = yield fetch(`${w}/file/downloadFile`, {
4341
4329
  method: "POST",
4342
4330
  headers: {
4343
4331
  "Content-Type": "application/json",
4344
- "Auth-Token": `${de()}`,
4345
- Authorization: `bearer ${de()}`
4332
+ "Auth-Token": `${me()}`,
4333
+ Authorization: `bearer ${me()}`
4346
4334
  },
4347
- body: JSON.stringify({ fileName: y, fileUrl: H })
4335
+ body: JSON.stringify({ fileName: y, fileUrl: B })
4348
4336
  });
4349
4337
  if (!J.ok)
4350
4338
  throw new Error("Download failed");
4351
- const ae = J.headers.get("content-type") || "application/octet-stream", ce = yield J.blob(), _e = window.URL.createObjectURL(ce), we = document.createElement("a");
4352
- we.href = _e, we.download = y, document.body.appendChild(we), we.click(), window.URL.revokeObjectURL(_e), document.body.removeChild(we);
4339
+ const ae = J.headers.get("content-type") || "application/octet-stream", ce = yield J.blob(), ke = window.URL.createObjectURL(ce), he = document.createElement("a");
4340
+ he.href = ke, he.download = y, document.body.appendChild(he), he.click(), window.URL.revokeObjectURL(ke), document.body.removeChild(he);
4353
4341
  } catch (J) {
4354
4342
  console.error("Failed to download file:", J);
4355
4343
  }
4356
4344
  });
4357
4345
  }
4358
- let B = {};
4359
- function I(y, H) {
4346
+ let H = {};
4347
+ function I(y, B) {
4360
4348
  return Se(this, null, function* () {
4361
4349
  try {
4362
- const J = H.replace(/<br\s*\/?>/g, `
4350
+ const J = B.replace(/<br\s*\/?>/g, `
4363
4351
  `).replace(
4364
4352
  /\*\*(.*?)\*\*/g,
4365
4353
  "$1"
4366
4354
  // 移除加粗标记
4367
4355
  ).replace(/###/g, "").trim();
4368
- yield navigator.clipboard.writeText(J), t(13, B[y] = !0, B), setTimeout(
4356
+ yield navigator.clipboard.writeText(J), t(13, H[y] = !0, H), setTimeout(
4369
4357
  () => {
4370
- t(13, B[y] = !1, B), t(13, B);
4358
+ t(13, H[y] = !1, H), t(13, H);
4371
4359
  },
4372
4360
  1500
4373
4361
  );
@@ -4377,20 +4365,20 @@ function kl(s, e, t) {
4377
4365
  });
4378
4366
  }
4379
4367
  let C = {}, U = {}, X = !1;
4380
- function ne(y, H) {
4368
+ function ne(y, B) {
4381
4369
  return Se(this, null, function* () {
4382
- if (C[y] === H) {
4370
+ if (C[y] === B) {
4383
4371
  t(14, C[y] = null, C), t(14, C);
4384
4372
  return;
4385
4373
  }
4386
- if (t(14, C[y] = H, C), t(14, C), H === "like")
4374
+ if (t(14, C[y] = B, C), t(14, C), B === "like")
4387
4375
  try {
4388
4376
  if (!(yield fetch(`${w}/chat/record/feedback`, {
4389
4377
  method: "POST",
4390
4378
  headers: {
4391
4379
  "Content-Type": "application/json",
4392
- "Auth-Token": `${de()}`,
4393
- Authorization: `bearer ${de()}`
4380
+ "Auth-Token": `${me()}`,
4381
+ Authorization: `bearer ${me()}`
4394
4382
  },
4395
4383
  body: JSON.stringify({
4396
4384
  sessionId: L,
@@ -4407,17 +4395,17 @@ function kl(s, e, t) {
4407
4395
  t(16, X = !0);
4408
4396
  });
4409
4397
  }
4410
- function he(y) {
4398
+ function pe(y) {
4411
4399
  return Se(this, null, function* () {
4412
- var H;
4413
- if ((H = U[y]) != null && H.trim())
4400
+ var B;
4401
+ if ((B = U[y]) != null && B.trim())
4414
4402
  try {
4415
4403
  if (!(yield fetch(`${w}/chat/record/feedback`, {
4416
4404
  method: "POST",
4417
4405
  headers: {
4418
4406
  "Content-Type": "application/json",
4419
- "Auth-Token": `${de()}`,
4420
- Authorization: `bearer ${de()}`
4407
+ "Auth-Token": `${me()}`,
4408
+ Authorization: `bearer ${me()}`
4421
4409
  },
4422
4410
  body: JSON.stringify({
4423
4411
  sessionId: L,
@@ -4434,20 +4422,20 @@ function kl(s, e, t) {
4434
4422
  });
4435
4423
  }
4436
4424
  let He = { x: 0, y: 0 };
4437
- function fe(y, H) {
4425
+ function fe(y, B) {
4438
4426
  const ae = y.currentTarget.getBoundingClientRect();
4439
4427
  t(17, He = {
4440
4428
  x: ae.left - 290,
4441
4429
  // 弹框宽度 + 间距
4442
4430
  y: ae.top - 160
4443
4431
  // 弹框高度 + 间距
4444
- }), ne(H, "dislike");
4432
+ }), ne(B, "dislike");
4445
4433
  }
4446
4434
  let Be = null;
4447
- function ee(y, H) {
4435
+ function ee(y, B) {
4448
4436
  const ae = y.currentTarget.getBoundingClientRect();
4449
4437
  t(18, Be = {
4450
- text: H,
4438
+ text: B,
4451
4439
  x: ae.left + ae.width / 2,
4452
4440
  y: ae.top - 8
4453
4441
  });
@@ -4456,7 +4444,7 @@ function kl(s, e, t) {
4456
4444
  t(18, Be = null);
4457
4445
  }
4458
4446
  let se = !1, xe = [], K = Date.now().toString();
4459
- function Le() {
4447
+ function Me() {
4460
4448
  qe(), t(19, se = !0);
4461
4449
  }
4462
4450
  function ve() {
@@ -4467,27 +4455,27 @@ function kl(s, e, t) {
4467
4455
  if (!m) {
4468
4456
  t(9, m = !0);
4469
4457
  try {
4470
- const H = yield fetch(`${w}/chat/record/session/detail/query`, {
4458
+ const B = yield fetch(`${w}/chat/record/session/detail/query`, {
4471
4459
  method: "POST",
4472
4460
  headers: {
4473
4461
  "Content-Type": "application/json",
4474
- "Auth-Token": `${de()}`,
4475
- Authorization: `bearer ${de()}`
4462
+ "Auth-Token": `${me()}`,
4463
+ Authorization: `bearer ${me()}`
4476
4464
  },
4477
4465
  body: JSON.stringify({ sessionId: y })
4478
4466
  });
4479
- if (!H.ok)
4467
+ if (!B.ok)
4480
4468
  throw new Error("Failed to load sessions");
4481
- const J = yield H.json();
4469
+ const J = yield B.json();
4482
4470
  if (J.code === 0) {
4483
4471
  K = y, t(19, se = !1);
4484
- const ae = J.data.map((ce, _e) => {
4485
- const we = Zs(ce.answer), ht = gl(ce.answer);
4472
+ const ae = J.data.map((ce, ke) => {
4473
+ const he = Zs(ce.answer), ht = kl(ce.answer);
4486
4474
  return [
4487
4475
  {
4488
4476
  sessionId: ce.sessionId,
4489
4477
  requestId: ce.requestId,
4490
- id: (Date.now() + 2 * _e).toString(),
4478
+ id: (Date.now() + 2 * ke).toString(),
4491
4479
  type: "user",
4492
4480
  content: ce.keyword,
4493
4481
  timestamp: new Date(ce.createDate).getTime()
@@ -4495,18 +4483,18 @@ function kl(s, e, t) {
4495
4483
  {
4496
4484
  sessionId: ce.sessionId,
4497
4485
  requestId: ce.requestId,
4498
- id: (Date.now() + 2 * _e + 1).toString(),
4486
+ id: (Date.now() + 2 * ke + 1).toString(),
4499
4487
  type: "assistant",
4500
4488
  content: ht,
4501
- attachments: we,
4489
+ attachments: he,
4502
4490
  timestamp: new Date(ce.createDate).getTime()
4503
4491
  }
4504
4492
  ];
4505
4493
  });
4506
4494
  t(5, i = ae.flat());
4507
4495
  }
4508
- } catch (H) {
4509
- console.error("Failed to load sessions:", H);
4496
+ } catch (B) {
4497
+ console.error("Failed to load sessions:", B);
4510
4498
  } finally {
4511
4499
  t(9, m = !1);
4512
4500
  }
@@ -4539,39 +4527,39 @@ function kl(s, e, t) {
4539
4527
  method: "POST",
4540
4528
  headers: {
4541
4529
  "Content-Type": "application/json",
4542
- "Auth-Token": `${de()}`,
4543
- Authorization: `bearer ${de()}`
4530
+ "Auth-Token": `${me()}`,
4531
+ Authorization: `bearer ${me()}`
4544
4532
  }
4545
4533
  });
4546
4534
  if (!y.ok)
4547
4535
  throw new Error("Failed to get session ID");
4548
- const H = yield y.json();
4549
- if (H.code === 0)
4550
- return K = H.data.sessionId, K;
4551
- throw new Error(H.message || "Failed to get session ID");
4536
+ const B = yield y.json();
4537
+ if (B.code === 0)
4538
+ return K = B.data.sessionId, K;
4539
+ throw new Error(B.message || "Failed to get session ID");
4552
4540
  } catch (y) {
4553
4541
  return console.error("Failed to get session ID:", y), null;
4554
4542
  }
4555
4543
  });
4556
4544
  }
4557
- const D = (y, H) => M(H, y.tips, H.currentTarget), q = (y) => Z(y.content_title, y.link), me = () => {
4545
+ const D = (y, B) => M(B, y.tips, B.currentTarget), q = (y) => Z(y.content_title, y.link), ge = () => {
4558
4546
  p && (clearTimeout(p), t(8, p = null));
4559
- }, ge = () => {
4547
+ }, _e = () => {
4560
4548
  t(6, u = null);
4561
- }, Me = (y) => I(y.id, y.content), De = (y, H) => ee(H, B[y.id] ? "已复制" : "复制内容"), $e = (y) => ne(y.id, "like"), ut = (y, H) => ee(H, C[y.id] === "like" ? "取消点赞" : "点赞"), ft = (y, H) => fe(H, y.id), Pt = (y, H) => ee(H, C[y.id] === "dislike" ? "取消点踩" : "点踩");
4562
- function Nt(y) {
4549
+ }, ze = (y) => I(y.id, y.content), Ne = (y, B) => ee(B, H[y.id] ? "已复制" : "复制内容"), $e = (y) => ne(y.id, "like"), ut = (y, B) => ee(B, C[y.id] === "like" ? "取消点赞" : "点赞"), ft = (y, B) => fe(B, y.id), Nt = (y, B) => ee(B, C[y.id] === "dislike" ? "取消点踩" : "点踩");
4550
+ function Pt(y) {
4563
4551
  U[y.id] = this.value, t(15, U);
4564
4552
  }
4565
4553
  const rn = (y) => {
4566
4554
  t(16, X = !1), t(14, C[y.id] = null, C), t(14, C);
4567
- }, wt = (y) => he(y.id);
4555
+ }, wt = (y) => pe(y.id);
4568
4556
  function it(y) {
4569
4557
  zt[y ? "unshift" : "push"](() => {
4570
- k = y, t(10, k);
4558
+ _ = y, t(10, _);
4571
4559
  });
4572
4560
  }
4573
4561
  function et() {
4574
- b = Ni(this), t(12, b), t(11, _);
4562
+ b = Pi(this), t(12, b), t(11, k);
4575
4563
  }
4576
4564
  const tt = (y) => ee(y, "历史会话"), Ft = (y) => ee(y, "新建会话");
4577
4565
  function Ht() {
@@ -4595,10 +4583,10 @@ function kl(s, e, t) {
4595
4583
  h,
4596
4584
  p,
4597
4585
  m,
4598
- k,
4599
4586
  _,
4587
+ k,
4600
4588
  b,
4601
- B,
4589
+ H,
4602
4590
  C,
4603
4591
  U,
4604
4592
  X,
@@ -4613,27 +4601,27 @@ function kl(s, e, t) {
4613
4601
  Z,
4614
4602
  I,
4615
4603
  ne,
4616
- he,
4604
+ pe,
4617
4605
  fe,
4618
4606
  ee,
4619
4607
  qe,
4620
4608
  xe,
4621
- Le,
4609
+ Me,
4622
4610
  ve,
4623
4611
  Qe,
4624
4612
  P,
4625
4613
  L,
4626
4614
  D,
4627
4615
  q,
4628
- me,
4629
4616
  ge,
4630
- Me,
4631
- De,
4617
+ _e,
4618
+ ze,
4619
+ Ne,
4632
4620
  $e,
4633
4621
  ut,
4634
4622
  ft,
4635
- Pt,
4636
4623
  Nt,
4624
+ Pt,
4637
4625
  rn,
4638
4626
  wt,
4639
4627
  it,
@@ -4645,13 +4633,13 @@ function kl(s, e, t) {
4645
4633
  bt
4646
4634
  ];
4647
4635
  }
4648
- class _l extends On {
4636
+ class bl extends On {
4649
4637
  constructor(e) {
4650
4638
  super(), zn(
4651
4639
  this,
4652
4640
  e,
4653
- kl,
4654
- ml,
4641
+ wl,
4642
+ _l,
4655
4643
  tn,
4656
4644
  {
4657
4645
  zIndex: 0,
@@ -4668,66 +4656,66 @@ function Xs(s) {
4668
4656
  let e, t, n, o, l = (
4669
4657
  /*mergedOptions*/
4670
4658
  s[3].title + ""
4671
- ), i, r, c, u, h, p, m, g, k, T = (
4659
+ ), i, r, c, u, h, p, m, g, _, T = (
4672
4660
  /*isFullscreen*/
4673
4661
  s[2] ? "退出全屏" : "全屏显示"
4674
- ), R, L, A, w, _, b, v, x, M = (
4662
+ ), R, L, A, w, k, b, v, x, M = (
4675
4663
  /*isSnapped*/
4676
4664
  s[7] ? "取消吸附" : "吸附到边缘"
4677
- ), z, Z, B, I, C, U, X, ne, he, He = `${/*mergedOptions*/
4665
+ ), z, Z, H, I, C, U, X, ne, pe, He = `${/*mergedOptions*/
4678
4666
  s[3].height}px`, fe, Be, ee;
4679
4667
  function qe(D, q) {
4680
4668
  return (
4681
4669
  /*isFullscreen*/
4682
- D[2] ? bl : wl
4670
+ D[2] ? Tl : yl
4683
4671
  );
4684
4672
  }
4685
4673
  let se = qe(s), xe = se(s);
4686
4674
  function K(D, q) {
4687
4675
  return (
4688
4676
  /*isSnapped*/
4689
- D[7] ? Tl : yl
4677
+ D[7] ? El : vl
4690
4678
  );
4691
4679
  }
4692
- let Le = K(s), ve = Le(s);
4693
- const Qe = [El, vl], P = [];
4680
+ let Me = K(s), ve = Me(s);
4681
+ const Qe = [Al, Sl], P = [];
4694
4682
  function le(D, q) {
4695
4683
  return (
4696
4684
  /*showHistory*/
4697
4685
  D[8] ? 0 : 1
4698
4686
  );
4699
4687
  }
4700
- return ne = le(s), he = P[ne] = Qe[ne](s), {
4688
+ return ne = le(s), pe = P[ne] = Qe[ne](s), {
4701
4689
  c() {
4702
- var D, q, me;
4703
- e = S("div"), t = S("div"), n = S("div"), o = S("h3"), i = Te(l), r = j(), c = S("div"), u = S("div"), h = S("button"), p = Q("svg"), xe.c(), g = j(), k = S("span"), R = Te(T), L = j(), A = S("div"), w = S("button"), _ = Q("svg"), ve.c(), v = j(), x = S("span"), z = Te(M), Z = j(), B = S("div"), I = S("button"), I.innerHTML = '<svg xmlns="http://www.w3.org/2000/svg" width="20" height="20" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"><line x1="18" y1="6" x2="6" y2="18"></line><line x1="6" y1="6" x2="18" y2="18"></line></svg>', C = j(), U = S("span"), U.textContent = "关闭助手", X = j(), he.c(), a(o, "class", "svelte-1427avp"), a(p, "xmlns", "http://www.w3.org/2000/svg"), a(p, "width", "18"), a(p, "height", "18"), a(p, "viewBox", "0 0 24 24"), a(p, "fill", "none"), a(p, "stroke", "currentColor"), a(p, "stroke-width", "2"), a(p, "stroke-linecap", "round"), a(p, "stroke-linejoin", "round"), a(h, "class", "sy-assistant-action-button svelte-1427avp"), a(h, "aria-label", m = /*isFullscreen*/
4690
+ var D, q, ge;
4691
+ e = S("div"), t = S("div"), n = S("div"), o = S("h3"), i = Te(l), r = j(), c = S("div"), u = S("div"), h = S("button"), p = Q("svg"), xe.c(), g = j(), _ = S("span"), R = Te(T), L = j(), A = S("div"), w = S("button"), k = Q("svg"), ve.c(), v = j(), x = S("span"), z = Te(M), Z = j(), H = S("div"), I = S("button"), I.innerHTML = '<svg xmlns="http://www.w3.org/2000/svg" width="20" height="20" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"><line x1="18" y1="6" x2="6" y2="18"></line><line x1="6" y1="6" x2="18" y2="18"></line></svg>', C = j(), U = S("span"), U.textContent = "关闭助手", X = j(), pe.c(), a(o, "class", "svelte-1427avp"), a(p, "xmlns", "http://www.w3.org/2000/svg"), a(p, "width", "18"), a(p, "height", "18"), a(p, "viewBox", "0 0 24 24"), a(p, "fill", "none"), a(p, "stroke", "currentColor"), a(p, "stroke-width", "2"), a(p, "stroke-linecap", "round"), a(p, "stroke-linejoin", "round"), a(h, "class", "sy-assistant-action-button svelte-1427avp"), a(h, "aria-label", m = /*isFullscreen*/
4704
4692
  s[2] ? "退出全屏" : "全屏显示"), $(
4705
4693
  h,
4706
4694
  "active",
4707
4695
  /*isFullscreen*/
4708
4696
  s[2]
4709
- ), a(k, "class", "sy-assistant-tooltip svelte-1427avp"), N(
4710
- k,
4697
+ ), a(_, "class", "sy-assistant-tooltip svelte-1427avp"), F(
4698
+ _,
4711
4699
  "z-index",
4712
4700
  /*mergedOptions*/
4713
4701
  ((D = s[3].zIndex) != null ? D : 1e3) + 3
4714
- ), a(u, "class", "sy-assistant-tooltip-wrapper svelte-1427avp"), a(_, "xmlns", "http://www.w3.org/2000/svg"), a(_, "width", "18"), a(_, "height", "18"), a(_, "viewBox", "0 0 24 24"), a(_, "fill", "none"), a(_, "stroke", "currentColor"), a(_, "stroke-width", "2"), a(_, "stroke-linecap", "round"), a(_, "stroke-linejoin", "round"), a(w, "class", "sy-assistant-action-button svelte-1427avp"), a(w, "aria-label", b = /*isSnapped*/
4702
+ ), a(u, "class", "sy-assistant-tooltip-wrapper svelte-1427avp"), a(k, "xmlns", "http://www.w3.org/2000/svg"), a(k, "width", "18"), a(k, "height", "18"), a(k, "viewBox", "0 0 24 24"), a(k, "fill", "none"), a(k, "stroke", "currentColor"), a(k, "stroke-width", "2"), a(k, "stroke-linecap", "round"), a(k, "stroke-linejoin", "round"), a(w, "class", "sy-assistant-action-button svelte-1427avp"), a(w, "aria-label", b = /*isSnapped*/
4715
4703
  s[7] ? "取消吸附" : "吸附到边缘"), $(
4716
4704
  w,
4717
4705
  "active",
4718
4706
  /*isSnapped*/
4719
4707
  s[7]
4720
- ), a(x, "class", "sy-assistant-tooltip svelte-1427avp"), N(
4708
+ ), a(x, "class", "sy-assistant-tooltip svelte-1427avp"), F(
4721
4709
  x,
4722
4710
  "z-index",
4723
4711
  /*mergedOptions*/
4724
4712
  ((q = s[3].zIndex) != null ? q : 1e3) + 3
4725
- ), a(A, "class", "sy-assistant-tooltip-wrapper svelte-1427avp"), a(I, "class", "sy-assistant-close-button svelte-1427avp"), a(I, "aria-label", "关闭助手"), a(U, "class", "sy-assistant-tooltip svelte-1427avp"), N(
4713
+ ), a(A, "class", "sy-assistant-tooltip-wrapper svelte-1427avp"), a(I, "class", "sy-assistant-close-button svelte-1427avp"), a(I, "aria-label", "关闭助手"), a(U, "class", "sy-assistant-tooltip svelte-1427avp"), F(
4726
4714
  U,
4727
4715
  "z-index",
4728
4716
  /*mergedOptions*/
4729
- ((me = s[3].zIndex) != null ? me : 1e3) + 3
4730
- ), a(B, "class", "sy-assistant-tooltip-wrapper svelte-1427avp"), a(c, "class", "sy-assistant-header-actions svelte-1427avp"), a(n, "class", "sy-assistant-drawer-header svelte-1427avp"), a(n, "role", "button"), a(n, "tabindex", "0"), a(n, "aria-label", "拖动助手窗口"), $(
4717
+ ((ge = s[3].zIndex) != null ? ge : 1e3) + 3
4718
+ ), a(H, "class", "sy-assistant-tooltip-wrapper svelte-1427avp"), a(c, "class", "sy-assistant-header-actions svelte-1427avp"), a(n, "class", "sy-assistant-drawer-header svelte-1427avp"), a(n, "role", "button"), a(n, "tabindex", "0"), a(n, "aria-label", "拖动助手窗口"), $(
4731
4719
  n,
4732
4720
  "dragging",
4733
4721
  /*isDragging*/
@@ -4747,10 +4735,10 @@ function Xs(s) {
4747
4735
  "fullscreen",
4748
4736
  /*isFullscreen*/
4749
4737
  s[2]
4750
- ), N(e, "height", He);
4738
+ ), F(e, "height", He);
4751
4739
  },
4752
4740
  m(D, q) {
4753
- Y(D, e, q), d(e, t), d(t, n), d(n, o), d(o, i), d(n, r), d(n, c), d(c, u), d(u, h), d(h, p), xe.m(p, null), d(u, g), d(u, k), d(k, R), d(c, L), d(c, A), d(A, w), d(w, _), ve.m(_, null), d(A, v), d(A, x), d(x, z), d(c, Z), d(c, B), d(B, I), d(B, C), d(B, U), d(t, X), P[ne].m(t, null), fe = !0, Be || (ee = [
4741
+ Y(D, e, q), d(e, t), d(t, n), d(n, o), d(o, i), d(n, r), d(n, c), d(c, u), d(u, h), d(h, p), xe.m(p, null), d(u, g), d(u, _), d(_, R), d(c, L), d(c, A), d(A, w), d(w, k), ve.m(k, null), d(A, v), d(A, x), d(x, z), d(c, Z), d(c, H), d(H, I), d(H, C), d(H, U), d(t, X), P[ne].m(t, null), fe = !0, Be || (ee = [
4754
4742
  G(
4755
4743
  h,
4756
4744
  "click",
@@ -4776,10 +4764,10 @@ function Xs(s) {
4776
4764
  ], Be = !0);
4777
4765
  },
4778
4766
  p(D, q) {
4779
- var ge, Me, De;
4767
+ var _e, ze, Ne;
4780
4768
  (!fe || q[0] & /*mergedOptions*/
4781
4769
  8) && l !== (l = /*mergedOptions*/
4782
- D[3].title + "") && Ne(i, l), se !== (se = qe(D)) && (xe.d(1), xe = se(D), xe && (xe.c(), xe.m(p, null))), (!fe || q[0] & /*isFullscreen*/
4770
+ D[3].title + "") && Fe(i, l), se !== (se = qe(D)) && (xe.d(1), xe = se(D), xe && (xe.c(), xe.m(p, null))), (!fe || q[0] & /*isFullscreen*/
4783
4771
  4 && m !== (m = /*isFullscreen*/
4784
4772
  D[2] ? "退出全屏" : "全屏显示")) && a(h, "aria-label", m), (!fe || q[0] & /*isFullscreen*/
4785
4773
  4) && $(
@@ -4789,13 +4777,13 @@ function Xs(s) {
4789
4777
  D[2]
4790
4778
  ), (!fe || q[0] & /*isFullscreen*/
4791
4779
  4) && T !== (T = /*isFullscreen*/
4792
- D[2] ? "退出全屏" : "全屏显示") && Ne(R, T), q[0] & /*mergedOptions*/
4793
- 8 && N(
4794
- k,
4780
+ D[2] ? "退出全屏" : "全屏显示") && Fe(R, T), q[0] & /*mergedOptions*/
4781
+ 8 && F(
4782
+ _,
4795
4783
  "z-index",
4796
4784
  /*mergedOptions*/
4797
- ((ge = D[3].zIndex) != null ? ge : 1e3) + 3
4798
- ), Le !== (Le = K(D)) && (ve.d(1), ve = Le(D), ve && (ve.c(), ve.m(_, null))), (!fe || q[0] & /*isSnapped*/
4785
+ ((_e = D[3].zIndex) != null ? _e : 1e3) + 3
4786
+ ), Me !== (Me = K(D)) && (ve.d(1), ve = Me(D), ve && (ve.c(), ve.m(k, null))), (!fe || q[0] & /*isSnapped*/
4799
4787
  128 && b !== (b = /*isSnapped*/
4800
4788
  D[7] ? "取消吸附" : "吸附到边缘")) && a(w, "aria-label", b), (!fe || q[0] & /*isSnapped*/
4801
4789
  128) && $(
@@ -4805,18 +4793,18 @@ function Xs(s) {
4805
4793
  D[7]
4806
4794
  ), (!fe || q[0] & /*isSnapped*/
4807
4795
  128) && M !== (M = /*isSnapped*/
4808
- D[7] ? "取消吸附" : "吸附到边缘") && Ne(z, M), q[0] & /*mergedOptions*/
4809
- 8 && N(
4796
+ D[7] ? "取消吸附" : "吸附到边缘") && Fe(z, M), q[0] & /*mergedOptions*/
4797
+ 8 && F(
4810
4798
  x,
4811
4799
  "z-index",
4812
4800
  /*mergedOptions*/
4813
- ((Me = D[3].zIndex) != null ? Me : 1e3) + 3
4801
+ ((ze = D[3].zIndex) != null ? ze : 1e3) + 3
4814
4802
  ), q[0] & /*mergedOptions*/
4815
- 8 && N(
4803
+ 8 && F(
4816
4804
  U,
4817
4805
  "z-index",
4818
4806
  /*mergedOptions*/
4819
- ((De = D[3].zIndex) != null ? De : 1e3) + 3
4807
+ ((Ne = D[3].zIndex) != null ? Ne : 1e3) + 3
4820
4808
  ), (!fe || q[0] & /*isDragging*/
4821
4809
  64) && $(
4822
4810
  n,
@@ -4836,10 +4824,10 @@ function Xs(s) {
4836
4824
  /*isSnapped*/
4837
4825
  D[7]
4838
4826
  );
4839
- let me = ne;
4840
- ne = le(D), ne === me ? P[ne].p(D, q) : (Cn(), Ke(P[me], 1, 1, () => {
4841
- P[me] = null;
4842
- }), Ln(), he = P[ne], he ? he.p(D, q) : (he = P[ne] = Qe[ne](D), he.c()), je(he, 1), he.m(t, null)), (!fe || q[0] & /*isFullscreen*/
4827
+ let ge = ne;
4828
+ ne = le(D), ne === ge ? P[ne].p(D, q) : (Cn(), Ke(P[ge], 1, 1, () => {
4829
+ P[ge] = null;
4830
+ }), Ln(), pe = P[ne], pe ? pe.p(D, q) : (pe = P[ne] = Qe[ne](D), pe.c()), je(pe, 1), pe.m(t, null)), (!fe || q[0] & /*isFullscreen*/
4843
4831
  4) && $(
4844
4832
  e,
4845
4833
  "fullscreen",
@@ -4847,20 +4835,20 @@ function Xs(s) {
4847
4835
  D[2]
4848
4836
  ), q[0] & /*mergedOptions*/
4849
4837
  8 && He !== (He = `${/*mergedOptions*/
4850
- D[3].height}px`) && N(e, "height", He);
4838
+ D[3].height}px`) && F(e, "height", He);
4851
4839
  },
4852
4840
  i(D) {
4853
- fe || (je(he), fe = !0);
4841
+ fe || (je(pe), fe = !0);
4854
4842
  },
4855
4843
  o(D) {
4856
- Ke(he), fe = !1;
4844
+ Ke(pe), fe = !1;
4857
4845
  },
4858
4846
  d(D) {
4859
4847
  D && W(e), xe.d(), ve.d(), P[ne].d(), Be = !1, Ae(ee);
4860
4848
  }
4861
4849
  };
4862
4850
  }
4863
- function wl(s) {
4851
+ function yl(s) {
4864
4852
  let e;
4865
4853
  return {
4866
4854
  c() {
@@ -4874,7 +4862,7 @@ function wl(s) {
4874
4862
  }
4875
4863
  };
4876
4864
  }
4877
- function bl(s) {
4865
+ function Tl(s) {
4878
4866
  let e;
4879
4867
  return {
4880
4868
  c() {
@@ -4888,7 +4876,7 @@ function bl(s) {
4888
4876
  }
4889
4877
  };
4890
4878
  }
4891
- function yl(s) {
4879
+ function vl(s) {
4892
4880
  let e, t;
4893
4881
  return {
4894
4882
  c() {
@@ -4902,7 +4890,7 @@ function yl(s) {
4902
4890
  }
4903
4891
  };
4904
4892
  }
4905
- function Tl(s) {
4893
+ function El(s) {
4906
4894
  let e, t;
4907
4895
  return {
4908
4896
  c() {
@@ -4916,10 +4904,10 @@ function Tl(s) {
4916
4904
  }
4917
4905
  };
4918
4906
  }
4919
- function vl(s) {
4907
+ function Sl(s) {
4920
4908
  var n, o, l;
4921
4909
  let e, t;
4922
- return e = new _l({
4910
+ return e = new bl({
4923
4911
  props: {
4924
4912
  zIndex: (
4925
4913
  /*mergedOptions*/
@@ -4969,7 +4957,7 @@ function vl(s) {
4969
4957
  }
4970
4958
  };
4971
4959
  }
4972
- function El(s) {
4960
+ function Al(s) {
4973
4961
  var n, o;
4974
4962
  let e, t;
4975
4963
  return e = new bi({
@@ -5024,21 +5012,21 @@ function El(s) {
5024
5012
  }
5025
5013
  };
5026
5014
  }
5027
- function Sl(s) {
5015
+ function xl(s) {
5028
5016
  let e, t, n = `${/*$drawerWidth*/
5029
- s[12]}px`, o, l, i, r, c, u, h, p, m, g, k, T, R, L, A = (
5017
+ s[12]}px`, o, l, i, r, c, u, h, p, m, g, _, T, R, L, A = (
5030
5018
  /*$drawerWidth*/
5031
5019
  s[12] > 0 && Xs(s)
5032
5020
  );
5033
5021
  return {
5034
5022
  c() {
5035
- var w, _;
5023
+ var w, k;
5036
5024
  e = S("div"), t = S("div"), A && A.c(), o = j(), l = S("button"), i = Q("svg"), r = Q("path"), c = Q("path"), u = Q("path"), h = Q("path"), p = Q("path"), m = Q("path"), g = Q("path"), a(t, "class", "sy-assistant-drawer-wrapper svelte-1427avp"), $(
5037
5025
  t,
5038
5026
  "fullscreen",
5039
5027
  /*isFullscreen*/
5040
5028
  s[2]
5041
- ), N(t, "width", n), a(r, "d", "M896.512 698.88H132.608c-58.88 0-107.008-48.128-107.008-107.008v-10.24c0-58.88 48.128-107.008 107.008-107.008h763.904c58.88 0 107.008 48.128 107.008 107.008v10.24c0 58.88-48.128 107.008-107.008 107.008zM496.64 201.728h35.84v117.248h-35.84z"), a(r, "fill", "#6F8698"), a(c, "d", "M516.608 223.744h-4.608c-37.888 0-68.096-30.72-68.096-68.096v-6.656c0-37.888 30.72-68.096 68.096-68.096h4.608c37.888 0 68.096 30.72 68.096 68.096v6.656c0.512 37.888-30.208 68.096-68.096 68.096z"), a(c, "fill", "#3677FF"), a(u, "d", "M573.44 944.64H450.56c-181.248 0-327.68-146.432-327.68-327.68v-4.096c0-181.248 146.432-327.68 327.68-327.68h122.88c181.248 0 327.68 146.432 327.68 327.68v4.096c0 180.224-146.432 327.68-327.68 327.68z"), a(u, "fill", "#D0D5F1"), a(h, "d", "M681.984 715.264H347.136c-72.704 0-131.584-58.88-131.584-131.584s58.88-131.584 131.584-131.584h334.336c72.704 0 131.584 58.88 131.584 131.584 0.512 72.704-58.368 131.584-131.072 131.584z"), a(h, "fill", "#3677FF"), a(p, "d", "M286.72 583.68a78.336 70.144 90 1 0 140.288 0 78.336 70.144 90 1 0-140.288 0Z"), a(p, "fill", "#FFFFFF"), a(m, "d", "M608.256 583.68a78.336 70.144 90 1 0 140.288 0 78.336 70.144 90 1 0-140.288 0Z"), a(m, "fill", "#FFFFFF"), a(g, "d", "M443.392 799.232s2.56 58.88 68.096 58.88c58.88 0 69.632-61.952 69.632-61.952s-27.136 33.28-68.096 33.28c-42.496 0-69.632-30.208-69.632-30.208z"), a(g, "fill", "#8896A4"), a(i, "class", "sy-assistant-icon"), a(i, "viewBox", "0 0 1024 1024"), a(i, "version", "1.1"), a(i, "xmlns", "http://www.w3.org/2000/svg"), a(i, "width", "32"), a(i, "height", "32"), a(i, "fill", "currentColor"), a(i, "aria-label", "助手图标"), a(l, "class", "sy-assistant-floating-button svelte-1427avp"), a(l, "aria-label", "打开助手"), a(l, "style", k = /*buttonStyle*/
5029
+ ), F(t, "width", n), a(r, "d", "M896.512 698.88H132.608c-58.88 0-107.008-48.128-107.008-107.008v-10.24c0-58.88 48.128-107.008 107.008-107.008h763.904c58.88 0 107.008 48.128 107.008 107.008v10.24c0 58.88-48.128 107.008-107.008 107.008zM496.64 201.728h35.84v117.248h-35.84z"), a(r, "fill", "#6F8698"), a(c, "d", "M516.608 223.744h-4.608c-37.888 0-68.096-30.72-68.096-68.096v-6.656c0-37.888 30.72-68.096 68.096-68.096h4.608c37.888 0 68.096 30.72 68.096 68.096v6.656c0.512 37.888-30.208 68.096-68.096 68.096z"), a(c, "fill", "#3677FF"), a(u, "d", "M573.44 944.64H450.56c-181.248 0-327.68-146.432-327.68-327.68v-4.096c0-181.248 146.432-327.68 327.68-327.68h122.88c181.248 0 327.68 146.432 327.68 327.68v4.096c0 180.224-146.432 327.68-327.68 327.68z"), a(u, "fill", "#D0D5F1"), a(h, "d", "M681.984 715.264H347.136c-72.704 0-131.584-58.88-131.584-131.584s58.88-131.584 131.584-131.584h334.336c72.704 0 131.584 58.88 131.584 131.584 0.512 72.704-58.368 131.584-131.072 131.584z"), a(h, "fill", "#3677FF"), a(p, "d", "M286.72 583.68a78.336 70.144 90 1 0 140.288 0 78.336 70.144 90 1 0-140.288 0Z"), a(p, "fill", "#FFFFFF"), a(m, "d", "M608.256 583.68a78.336 70.144 90 1 0 140.288 0 78.336 70.144 90 1 0-140.288 0Z"), a(m, "fill", "#FFFFFF"), a(g, "d", "M443.392 799.232s2.56 58.88 68.096 58.88c58.88 0 69.632-61.952 69.632-61.952s-27.136 33.28-68.096 33.28c-42.496 0-69.632-30.208-69.632-30.208z"), a(g, "fill", "#8896A4"), a(i, "class", "sy-assistant-icon"), a(i, "viewBox", "0 0 1024 1024"), a(i, "version", "1.1"), a(i, "xmlns", "http://www.w3.org/2000/svg"), a(i, "width", "32"), a(i, "height", "32"), a(i, "fill", "currentColor"), a(i, "aria-label", "助手图标"), a(l, "class", "sy-assistant-floating-button svelte-1427avp"), a(l, "aria-label", "打开助手"), a(l, "style", _ = /*buttonStyle*/
5042
5030
  s[10] + " z-index: " + /*mergedOptions*/
5043
5031
  (((w = s[3].zIndex) != null ? w : 1e3) + 1) + ";"), a(e, "class", "sy-assistant-container sy-assistant-theme svelte-1427avp"), $(
5044
5032
  e,
@@ -5050,43 +5038,43 @@ function Sl(s) {
5050
5038
  "snapped",
5051
5039
  /*isSnapped*/
5052
5040
  s[7]
5053
- ), N(
5041
+ ), F(
5054
5042
  e,
5055
5043
  "position",
5056
5044
  /*mergedOptions*/
5057
5045
  s[3].position
5058
- ), N(
5046
+ ), F(
5059
5047
  e,
5060
5048
  "right",
5061
5049
  /*isSnapped*/
5062
5050
  s[7] ? 0 : `${/*right*/
5063
5051
  s[0]}px`
5064
- ), N(
5052
+ ), F(
5065
5053
  e,
5066
5054
  "bottom",
5067
5055
  /*isSnapped*/
5068
5056
  s[7] ? 0 : `${/*bottom*/
5069
5057
  s[1]}px`
5070
- ), N(
5058
+ ), F(
5071
5059
  e,
5072
5060
  "top",
5073
5061
  /*isSnapped*/
5074
5062
  s[7] || /*isFullscreen*/
5075
5063
  s[2] ? "0" : "auto"
5076
- ), N(
5064
+ ), F(
5077
5065
  e,
5078
5066
  "left",
5079
5067
  /*isFullscreen*/
5080
5068
  s[2] ? "0" : "auto"
5081
- ), N(
5069
+ ), F(
5082
5070
  e,
5083
5071
  "z-index",
5084
5072
  /*mergedOptions*/
5085
- (_ = s[3].zIndex) != null ? _ : 1e3
5073
+ (k = s[3].zIndex) != null ? k : 1e3
5086
5074
  );
5087
5075
  },
5088
- m(w, _) {
5089
- Y(w, e, _), d(e, t), A && A.m(t, null), d(e, o), d(e, l), d(l, i), d(i, r), d(i, c), d(i, u), d(i, h), d(i, p), d(i, m), d(i, g), s[27](l), s[29](e), T = !0, R || (L = [
5076
+ m(w, k) {
5077
+ Y(w, e, k), d(e, t), A && A.m(t, null), d(e, o), d(e, l), d(l, i), d(i, r), d(i, c), d(i, u), d(i, h), d(i, p), d(i, m), d(i, g), s[27](l), s[29](e), T = !0, R || (L = [
5090
5078
  G(
5091
5079
  l,
5092
5080
  "click",
@@ -5099,70 +5087,70 @@ function Sl(s) {
5099
5087
  ))
5100
5088
  ], R = !0);
5101
5089
  },
5102
- p(w, _) {
5090
+ p(w, k) {
5103
5091
  var b, v;
5104
5092
  /*$drawerWidth*/
5105
- w[12] > 0 ? A ? (A.p(w, _), _[0] & /*$drawerWidth*/
5093
+ w[12] > 0 ? A ? (A.p(w, k), k[0] & /*$drawerWidth*/
5106
5094
  4096 && je(A, 1)) : (A = Xs(w), A.c(), je(A, 1), A.m(t, null)) : A && (Cn(), Ke(A, 1, 1, () => {
5107
5095
  A = null;
5108
- }), Ln()), (!T || _[0] & /*isFullscreen*/
5096
+ }), Ln()), (!T || k[0] & /*isFullscreen*/
5109
5097
  4) && $(
5110
5098
  t,
5111
5099
  "fullscreen",
5112
5100
  /*isFullscreen*/
5113
5101
  w[2]
5114
- ), _[0] & /*$drawerWidth*/
5102
+ ), k[0] & /*$drawerWidth*/
5115
5103
  4096 && n !== (n = `${/*$drawerWidth*/
5116
- w[12]}px`) && N(t, "width", n), (!T || _[0] & /*buttonStyle, mergedOptions*/
5117
- 1032 && k !== (k = /*buttonStyle*/
5104
+ w[12]}px`) && F(t, "width", n), (!T || k[0] & /*buttonStyle, mergedOptions*/
5105
+ 1032 && _ !== (_ = /*buttonStyle*/
5118
5106
  w[10] + " z-index: " + /*mergedOptions*/
5119
- (((b = w[3].zIndex) != null ? b : 1e3) + 1) + ";")) && a(l, "style", k), (!T || _[0] & /*isFullscreen*/
5107
+ (((b = w[3].zIndex) != null ? b : 1e3) + 1) + ";")) && a(l, "style", _), (!T || k[0] & /*isFullscreen*/
5120
5108
  4) && $(
5121
5109
  e,
5122
5110
  "fullscreen",
5123
5111
  /*isFullscreen*/
5124
5112
  w[2]
5125
- ), (!T || _[0] & /*isSnapped*/
5113
+ ), (!T || k[0] & /*isSnapped*/
5126
5114
  128) && $(
5127
5115
  e,
5128
5116
  "snapped",
5129
5117
  /*isSnapped*/
5130
5118
  w[7]
5131
- ), _[0] & /*mergedOptions*/
5132
- 8 && N(
5119
+ ), k[0] & /*mergedOptions*/
5120
+ 8 && F(
5133
5121
  e,
5134
5122
  "position",
5135
5123
  /*mergedOptions*/
5136
5124
  w[3].position
5137
- ), _[0] & /*isSnapped, right*/
5138
- 129 && N(
5125
+ ), k[0] & /*isSnapped, right*/
5126
+ 129 && F(
5139
5127
  e,
5140
5128
  "right",
5141
5129
  /*isSnapped*/
5142
5130
  w[7] ? 0 : `${/*right*/
5143
5131
  w[0]}px`
5144
- ), _[0] & /*isSnapped, bottom*/
5145
- 130 && N(
5132
+ ), k[0] & /*isSnapped, bottom*/
5133
+ 130 && F(
5146
5134
  e,
5147
5135
  "bottom",
5148
5136
  /*isSnapped*/
5149
5137
  w[7] ? 0 : `${/*bottom*/
5150
5138
  w[1]}px`
5151
- ), _[0] & /*isSnapped, isFullscreen*/
5152
- 132 && N(
5139
+ ), k[0] & /*isSnapped, isFullscreen*/
5140
+ 132 && F(
5153
5141
  e,
5154
5142
  "top",
5155
5143
  /*isSnapped*/
5156
5144
  w[7] || /*isFullscreen*/
5157
5145
  w[2] ? "0" : "auto"
5158
- ), _[0] & /*isFullscreen*/
5159
- 4 && N(
5146
+ ), k[0] & /*isFullscreen*/
5147
+ 4 && F(
5160
5148
  e,
5161
5149
  "left",
5162
5150
  /*isFullscreen*/
5163
5151
  w[2] ? "0" : "auto"
5164
- ), _[0] & /*mergedOptions*/
5165
- 8 && N(
5152
+ ), k[0] & /*mergedOptions*/
5153
+ 8 && F(
5166
5154
  e,
5167
5155
  "z-index",
5168
5156
  /*mergedOptions*/
@@ -5180,9 +5168,9 @@ function Sl(s) {
5180
5168
  }
5181
5169
  };
5182
5170
  }
5183
- const _n = 48, pe = 20;
5184
- function Al(s, e, t) {
5185
- let n, o, l, i, r = Oe, c = () => (r(), r = Oi(o, (P) => t(12, i = P)), o);
5171
+ const kn = 48, de = 20;
5172
+ function Il(s, e, t) {
5173
+ let n, o, l, i, r = De, c = () => (r(), r = Oi(o, (P) => t(12, i = P)), o);
5186
5174
  s.$$.on_destroy.push(() => r());
5187
5175
  const u = {
5188
5176
  position: "fixed",
@@ -5190,14 +5178,14 @@ function Al(s, e, t) {
5190
5178
  height: 600,
5191
5179
  title: "智慧运维助手",
5192
5180
  initialState: "default",
5193
- defaultPosition: { right: pe, bottom: pe },
5181
+ defaultPosition: { right: de, bottom: de },
5194
5182
  snappedWidth: 480,
5195
5183
  drawerWidth: 480,
5196
5184
  zIndex: 1e3,
5197
5185
  hasScene: !1,
5198
5186
  apiPrefix: "/aiops/aigc"
5199
5187
  };
5200
- let { target: h = "body" } = e, { options: p = {} } = e, m, g = null, k = !1, T, R = !1, L = 0, A = 0, w = pe, _ = 20, b = w, v = _, x = !1, M = pe, z = 50, Z = !1, B = { width: 0, height: 0, right: 0, bottom: 0 }, I = !1, C = !1, U = [], X = null;
5188
+ let { target: h = "body" } = e, { options: p = {} } = e, m, g = null, _ = !1, T, R = !1, L = 0, A = 0, w = de, k = 20, b = w, v = k, x = !1, M = de, z = 50, Z = !1, H = { width: 0 }, I = !1, C = !1, U = [], X = null;
5201
5189
  function ne() {
5202
5190
  return Se(this, null, function* () {
5203
5191
  try {
@@ -5205,8 +5193,8 @@ function Al(s, e, t) {
5205
5193
  method: "POST",
5206
5194
  headers: {
5207
5195
  "Content-Type": "application/json",
5208
- "Auth-Token": `${de()}`,
5209
- Authorization: `bearer ${de()}`
5196
+ "Auth-Token": `${me()}`,
5197
+ Authorization: `bearer ${me()}`
5210
5198
  }
5211
5199
  });
5212
5200
  if (!P.ok)
@@ -5220,22 +5208,22 @@ function Al(s, e, t) {
5220
5208
  }
5221
5209
  });
5222
5210
  }
5223
- function he(P, le = !1) {
5224
- le ? t(23, x = !0) : t(6, R = !0), L = P.clientX, A = P.clientY, w = le ? M : b, _ = le ? z : v, P.preventDefault();
5211
+ function pe(P, le = !1) {
5212
+ le ? t(23, x = !0) : t(6, R = !0), L = P.clientX, A = P.clientY, w = le ? M : b, k = le ? z : v, P.preventDefault();
5225
5213
  }
5226
5214
  function He(P) {
5227
5215
  if (!R && !x) return;
5228
5216
  const le = L - P.clientX, D = A - P.clientY;
5229
5217
  if (x) {
5230
- const q = w + le, me = P.clientY;
5231
- t(24, M = Math.max(pe, Math.min(window.innerWidth - _n - pe, q)));
5232
- const ge = window.innerHeight - _n - pe, De = Math.max(pe, Math.min(ge, me));
5233
- t(25, z = (window.innerHeight - De - _n) / window.innerHeight * 100);
5218
+ const q = w + le, ge = P.clientY;
5219
+ t(24, M = Math.max(de, Math.min(window.innerWidth - kn - de, q)));
5220
+ const _e = window.innerHeight - kn - de, Ne = Math.max(de, Math.min(_e, ge));
5221
+ t(25, z = (window.innerHeight - Ne - kn) / window.innerHeight * 100);
5234
5222
  } else {
5235
- const q = n.width || 0, me = n.height || 0, ge = w + le;
5236
- t(0, b = Math.max(pe, Math.min(window.innerWidth - q - pe, ge)));
5237
- const Me = _ + D;
5238
- t(1, v = Math.max(pe, Math.min(window.innerHeight - me - pe, Me)));
5223
+ const q = n.width || 0, ge = n.height || 0, _e = w + le;
5224
+ t(0, b = Math.max(de, Math.min(window.innerWidth - q - de, _e)));
5225
+ const ze = k + D;
5226
+ t(1, v = Math.max(de, Math.min(window.innerHeight - ge - de, ze)));
5239
5227
  }
5240
5228
  }
5241
5229
  function fe() {
@@ -5244,10 +5232,10 @@ function Al(s, e, t) {
5244
5232
  Rn(() => {
5245
5233
  typeof h == "string" ? g = document.querySelector(h) || document.body : g = h || document.body;
5246
5234
  const P = (D) => He(D), le = () => fe();
5247
- return document.addEventListener("mousemove", P), document.addEventListener("mouseup", le), m && g && g.appendChild(m), T && T.getBoundingClientRect().left, t(7, I = n.initialState === "snapped"), t(2, Z = n.initialState === "fullscreen"), n.initialState === "snapped" ? (t(0, b = 0), t(1, v = 0), t(3, n = ye(ie({}, n), {
5235
+ return document.addEventListener("mousemove", P), document.addEventListener("mouseup", le), m && g && g.appendChild(m), T && T.getBoundingClientRect().left, t(7, I = n.initialState === "snapped"), t(2, Z = n.initialState === "fullscreen"), n.initialState === "snapped" ? (t(0, b = 0), t(1, v = 0), t(3, n = be(ie({}, n), {
5248
5236
  height: typeof window != "undefined" ? window.innerHeight : n.height,
5249
5237
  width: n.snappedWidth || n.width
5250
- }))) : n.initialState === "fullscreen" && (t(0, b = 0), t(1, v = 0), t(3, n = ye(ie({}, n), {
5238
+ }))) : n.initialState === "fullscreen" && (t(0, b = 0), t(1, v = 0), t(3, n = be(ie({}, n), {
5251
5239
  width: typeof window != "undefined" ? window.innerWidth : n.width,
5252
5240
  height: typeof window != "undefined" ? window.innerHeight : n.height
5253
5241
  }))), () => {
@@ -5256,55 +5244,55 @@ function Al(s, e, t) {
5256
5244
  });
5257
5245
  function Be() {
5258
5246
  return Se(this, null, function* () {
5259
- k || (yield ne()), t(22, k = !k);
5247
+ _ || (yield ne()), t(22, _ = !_);
5260
5248
  });
5261
5249
  }
5262
5250
  function ee() {
5263
- var P, le, D, q, me, ge, Me, De;
5264
- t(2, Z = !Z), Z ? (B.width || (B = {
5251
+ var P, le, D, q, ge, _e, ze, Ne;
5252
+ t(2, Z = !Z), Z ? (H.width || (H = {
5265
5253
  width: u.width,
5266
5254
  height: u.height,
5267
- right: (le = (P = u.defaultPosition) == null ? void 0 : P.right) != null ? le : pe,
5268
- bottom: (q = (D = u.defaultPosition) == null ? void 0 : D.bottom) != null ? q : pe
5269
- }), I && t(7, I = !1), t(20, p = ye(ie({}, n), {
5255
+ right: (le = (P = u.defaultPosition) == null ? void 0 : P.right) != null ? le : de,
5256
+ bottom: (q = (D = u.defaultPosition) == null ? void 0 : D.bottom) != null ? q : de
5257
+ }), I && t(7, I = !1), t(20, p = be(ie({}, n), {
5270
5258
  width: window.innerWidth,
5271
5259
  height: window.innerHeight,
5272
5260
  drawerWidth: window.innerWidth
5273
- })), t(0, b = 0), t(1, v = 0)) : (t(20, p = ye(ie({}, n), {
5261
+ })), t(0, b = 0), t(1, v = 0)) : (t(20, p = be(ie({}, n), {
5274
5262
  width: u.width,
5275
5263
  height: u.height,
5276
5264
  drawerWidth: u.drawerWidth
5277
- })), t(0, b = (ge = (me = u.defaultPosition) == null ? void 0 : me.right) != null ? ge : pe), t(1, v = (De = (Me = u.defaultPosition) == null ? void 0 : Me.bottom) != null ? De : pe));
5265
+ })), t(0, b = (_e = (ge = u.defaultPosition) == null ? void 0 : ge.right) != null ? _e : de), t(1, v = (Ne = (ze = u.defaultPosition) == null ? void 0 : ze.bottom) != null ? Ne : de));
5278
5266
  }
5279
5267
  function qe(P) {
5280
- Z || he(P);
5268
+ Z || pe(P);
5281
5269
  }
5282
5270
  function se() {
5283
5271
  var P, le, D, q;
5284
- Z && (t(2, Z = !1), t(20, p = ye(ie({}, n), {
5272
+ Z && (t(2, Z = !1), t(20, p = be(ie({}, n), {
5285
5273
  width: u.width,
5286
5274
  height: u.height,
5287
5275
  drawerWidth: u.drawerWidth
5288
- }))), t(7, I = !I), I ? (n.height, t(0, b = 0), t(1, v = 0), t(20, p = ye(ie({}, n), {
5276
+ }))), t(7, I = !I), I ? (n.height, t(0, b = 0), t(1, v = 0), t(20, p = be(ie({}, n), {
5289
5277
  height: window.innerHeight,
5290
5278
  width: n.snappedWidth || u.width,
5291
5279
  drawerWidth: n.snappedWidth || u.width
5292
- }))) : (t(20, p = ye(ie({}, n), {
5280
+ }))) : (t(20, p = be(ie({}, n), {
5293
5281
  width: u.width,
5294
5282
  height: u.height,
5295
5283
  drawerWidth: u.drawerWidth
5296
- })), t(0, b = (le = (P = u.defaultPosition) == null ? void 0 : P.right) != null ? le : pe), t(1, v = (q = (D = u.defaultPosition) == null ? void 0 : D.bottom) != null ? q : pe));
5284
+ })), t(0, b = (le = (P = u.defaultPosition) == null ? void 0 : P.right) != null ? le : de), t(1, v = (q = (D = u.defaultPosition) == null ? void 0 : D.bottom) != null ? q : de));
5297
5285
  }
5298
5286
  function xe(P) {
5299
5287
  t(8, C = !1);
5300
5288
  }
5301
5289
  const K = () => t(8, C = !1);
5302
- function Le(P) {
5290
+ function Me(P) {
5303
5291
  zt[P ? "unshift" : "push"](() => {
5304
5292
  T = P, t(5, T);
5305
5293
  });
5306
5294
  }
5307
- const ve = (P) => he(P, !0);
5295
+ const ve = (P) => pe(P, !0);
5308
5296
  function Qe(P) {
5309
5297
  zt[P ? "unshift" : "push"](() => {
5310
5298
  m = P, t(4, m);
@@ -5314,15 +5302,15 @@ function Al(s, e, t) {
5314
5302
  "target" in P && t(21, h = P.target), "options" in P && t(20, p = P.options);
5315
5303
  }, s.$$.update = () => {
5316
5304
  s.$$.dirty[0] & /*options*/
5317
- 1048576 && t(3, n = ye(ie(ie({}, u), p), {
5305
+ 1048576 && t(3, n = be(ie(ie({}, u), p), {
5318
5306
  defaultPosition: ie(ie({}, u.defaultPosition), p.defaultPosition)
5319
5307
  })), s.$$.dirty[0] & /*isOpen, isFullscreen, mergedOptions*/
5320
5308
  4194316 && c(t(11, o = Zi(
5321
- k ? Z ? window.innerWidth : n.drawerWidth : 0,
5309
+ _ ? Z ? window.innerWidth : n.drawerWidth : 0,
5322
5310
  { stiffness: 0.1, damping: 0.6 }
5323
5311
  ))), s.$$.dirty[0] & /*mergedOptions, right, bottom*/
5324
- 11 && typeof window != "undefined" && (t(0, b = Math.max(pe, Math.min(window.innerWidth - (n.width || 0), b))), t(1, v = Math.max(pe, Math.min(window.innerHeight - (n.height || 0), v)))), s.$$.dirty[0] & /*isOpen, buttonRight, buttonBottom, isButtonDragging*/
5325
- 62914560 && t(10, l = k ? "display: none;" : `position: fixed; right: ${M}px; bottom: ${z}%; transform: none; cursor: ${x ? "grabbing" : "grab"};`);
5312
+ 11 && typeof window != "undefined" && (t(0, b = Math.max(de, Math.min(window.innerWidth - (n.width || 0), b))), t(1, v = Math.max(de, Math.min(window.innerHeight - (n.height || 0), v)))), s.$$.dirty[0] & /*isOpen, buttonRight, buttonBottom, isButtonDragging*/
5313
+ 62914560 && t(10, l = _ ? "display: none;" : `position: fixed; right: ${M}px; bottom: ${z}%; transform: none; cursor: ${x ? "grabbing" : "grab"};`);
5326
5314
  }, [
5327
5315
  b,
5328
5316
  v,
@@ -5338,7 +5326,7 @@ function Al(s, e, t) {
5338
5326
  o,
5339
5327
  i,
5340
5328
  U,
5341
- he,
5329
+ pe,
5342
5330
  Be,
5343
5331
  ee,
5344
5332
  qe,
@@ -5346,21 +5334,21 @@ function Al(s, e, t) {
5346
5334
  xe,
5347
5335
  p,
5348
5336
  h,
5349
- k,
5337
+ _,
5350
5338
  x,
5351
5339
  M,
5352
5340
  z,
5353
5341
  K,
5354
- Le,
5342
+ Me,
5355
5343
  ve,
5356
5344
  Qe
5357
5345
  ];
5358
5346
  }
5359
- class Il extends On {
5347
+ class Cl extends On {
5360
5348
  constructor(e) {
5361
- super(), zn(this, e, Al, Sl, tn, { target: 21, options: 20 }, null, [-1, -1]);
5349
+ super(), zn(this, e, Il, xl, tn, { target: 21, options: 20 }, null, [-1, -1]);
5362
5350
  }
5363
5351
  }
5364
5352
  export {
5365
- Il as SyAssistant
5353
+ Cl as SyAssistant
5366
5354
  };