@pagelines/sdk 1.0.397 → 1.0.398

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -1,24 +1,24 @@
1
- var Rn = Object.defineProperty;
2
- var bs = (l, t, e) => t in l ? Rn(l, t, { enumerable: !0, configurable: !0, writable: !0, value: e }) : l[t] = e;
3
- var u = (l, t) => Rn(l, "name", { value: t, configurable: !0 });
4
- var D = (l, t, e) => bs(l, typeof t != "symbol" ? t + "" : t, e);
5
- import { defineComponent as _e, openBlock as y, createElementBlock as T, createElementVNode as v, normalizeClass as A, ref as Q, watch as Je, computed as W, createCommentVNode as H, renderSlot as Vn, onMounted as Xt, Fragment as Se, renderList as gt, withDirectives as Yn, vModelText as Zn, unref as qt, toDisplayString as ce, nextTick as $t, createVNode as Ut, createTextVNode as ws, normalizeStyle as vs, shallowRef as ys } from "vue";
6
- import { SettingsObject as Ts, Agent as kt, getDefaultAvatarUrl as Xn, createLogger as Ss } from "@pagelines/core";
7
- import { P as As } from "./sdkClient.js";
8
- const Es = { class: "spinner max-w-sm" }, _s = {
1
+ var Dn = Object.defineProperty;
2
+ var ws = (l, t, e) => t in l ? Dn(l, t, { enumerable: !0, configurable: !0, writable: !0, value: e }) : l[t] = e;
3
+ var u = (l, t) => Dn(l, "name", { value: t, configurable: !0 });
4
+ var C = (l, t, e) => ws(l, typeof t != "symbol" ? t + "" : t, e);
5
+ import { defineComponent as Ee, openBlock as T, createElementBlock as S, createElementVNode as v, normalizeClass as y, ref as Y, watch as Je, computed as W, createCommentVNode as B, renderSlot as Yn, onMounted as Kt, Fragment as Te, renderList as gt, withDirectives as Zn, vModelText as Xn, unref as Vt, toDisplayString as ue, nextTick as Ut, createVNode as Bt, createTextVNode as ht, shallowRef as vs } from "vue";
6
+ import { SettingsObject as ys, Agent as bt, getDefaultAvatarUrl as Kn, createLogger as Ts } from "@pagelines/core";
7
+ import { P as Ss } from "./sdkClient.js";
8
+ const As = { class: "spinner max-w-sm" }, Es = {
9
9
  class: "ring-circular h-full w-full origin-center",
10
10
  viewBox: "25 25 50 50"
11
- }, Dn = /* @__PURE__ */ _e({
11
+ }, Cn = /* @__PURE__ */ Ee({
12
12
  __name: "FSpinner",
13
13
  props: {
14
14
  width: { type: String, default: "" },
15
15
  colorMode: { type: String, default: "primary" }
16
16
  },
17
17
  setup(l) {
18
- return (t, e) => (y(), T("div", Es, [
19
- (y(), T("svg", _s, [
18
+ return (t, e) => (T(), S("div", As, [
19
+ (T(), S("svg", Es, [
20
20
  v("circle", {
21
- class: A([l.colorMode, "ring-path"]),
21
+ class: y([l.colorMode, "ring-path"]),
22
22
  cx: "50",
23
23
  cy: "50",
24
24
  r: "20",
@@ -30,27 +30,27 @@ const Es = { class: "spinner max-w-sm" }, _s = {
30
30
  ]))
31
31
  ]));
32
32
  }
33
- }), Rs = [
33
+ }), _s = [
34
34
  { pattern: /\bNO_REP\w*\b/g, label: "NO_REPLY — bot chose not to respond" },
35
35
  { pattern: /\bHEARTBEAT_OK\b/g, label: "HEARTBEAT_OK — scheduled check, nothing to do" }
36
- ], Ds = 9e4, ln = class ln extends Ts {
36
+ ], Rs = 9e4, on = class on extends ys {
37
37
  constructor(e) {
38
38
  super("AgentChatController", e);
39
- D(this, "isTextMode", !1);
40
- D(this, "lastMessage", { hash: "", time: 0 });
41
- D(this, "isConnecting", !1);
39
+ C(this, "isTextMode", !1);
40
+ C(this, "lastMessage", { hash: "", time: 0 });
41
+ C(this, "isConnecting", !1);
42
42
  // Chat conversation tracking (server-managed persistence)
43
- D(this, "conversationId");
44
- D(this, "textState", Q({
43
+ C(this, "conversationId");
44
+ C(this, "textState", Y({
45
45
  isActive: !1,
46
46
  isConnected: !1,
47
47
  isThinking: !1,
48
48
  connectionStatus: "disconnected"
49
49
  }));
50
- D(this, "agentMode", Q("self"));
51
- D(this, "sharedMessages", Q([]));
52
- D(this, "_agent");
53
- this._agent = e.agent instanceof kt ? e.agent : new kt({ config: e.agent }), this.setupModeWatcher();
50
+ C(this, "agentMode", Y("self"));
51
+ C(this, "sharedMessages", Y([]));
52
+ C(this, "_agent");
53
+ this._agent = e.agent instanceof bt ? e.agent : new bt({ config: e.agent }), this.setupModeWatcher();
54
54
  }
55
55
  get chatEnabled() {
56
56
  return this._agent.chatAvailable.value;
@@ -165,39 +165,39 @@ Current User:
165
165
  this.addMessage(e, "user", n), this.updateState(this.textState, { isThinking: !0 });
166
166
  const a = `stream-${Date.now()}`;
167
167
  let o = !1;
168
- const c = /* @__PURE__ */ u((g) => {
168
+ const c = /* @__PURE__ */ u((m) => {
169
169
  o || (o = !0, this.sharedMessages.value = [
170
170
  ...this.sharedMessages.value,
171
171
  { id: a, text: "", sender: "agent", timestamp: /* @__PURE__ */ new Date() }
172
172
  ]);
173
- const m = this.sharedMessages.value, w = m[m.length - 1];
174
- w?.id === a && (w.text += g, this.sharedMessages.value = [...m]);
175
- }, "onDelta"), f = /* @__PURE__ */ u((g) => {
176
- const m = this.sharedMessages.value, w = m[m.length - 1];
177
- if (w?.id === a && w.text) {
178
- let S = w.text;
179
- for (const O of Rs)
180
- O.pattern.test(S) && (console.debug(`[chat] filtered directive: ${O.label}`), S = S.replace(O.pattern, "").trim(), O.pattern.lastIndex = 0);
181
- S ? S !== w.text && (w.text = S, this.sharedMessages.value = [...m]) : this.sharedMessages.value = m.slice(0, -1);
182
- }
183
- g && (this.conversationId = g), this.updateState(this.textState, { isThinking: !1 });
184
- }, "onDone"), d = /* @__PURE__ */ u((g) => {
185
- const m = this.sharedMessages.value, w = m[m.length - 1];
186
- w?.id === a && !w.text && (this.sharedMessages.value = m.slice(0, -1));
187
- const S = this.mapChatError(g);
188
- this.isTransientError(g) ? (this.addMessage(S, "system"), this.updateState(this.textState, { isThinking: !1 })) : this.handleError(new Error(S));
189
- }, "onError"), p = /* @__PURE__ */ u((g) => {
190
- this.addMessage(g, "system");
173
+ const f = this.sharedMessages.value, k = f[f.length - 1];
174
+ k?.id === a && (k.text += m, this.sharedMessages.value = [...f]);
175
+ }, "onDelta"), d = /* @__PURE__ */ u((m) => {
176
+ const f = this.sharedMessages.value, k = f[f.length - 1];
177
+ if (k?.id === a && k.text) {
178
+ let _ = k.text;
179
+ for (const O of _s)
180
+ O.pattern.test(_) && (console.debug(`[chat] filtered directive: ${O.label}`), _ = _.replace(O.pattern, "").trim(), O.pattern.lastIndex = 0);
181
+ _ ? _ !== k.text && (k.text = _, this.sharedMessages.value = [...f]) : this.sharedMessages.value = f.slice(0, -1);
182
+ }
183
+ m && (this.conversationId = m), this.updateState(this.textState, { isThinking: !1 });
184
+ }, "onDone"), g = /* @__PURE__ */ u((m) => {
185
+ const f = this.sharedMessages.value, k = f[f.length - 1];
186
+ k?.id === a && !k.text && (this.sharedMessages.value = f.slice(0, -1));
187
+ const _ = this.mapChatError(m);
188
+ this.isTransientError(m) ? (this.addMessage(_, "system"), this.updateState(this.textState, { isThinking: !1 })) : this.handleError(new Error(_));
189
+ }, "onError"), p = /* @__PURE__ */ u((m) => {
190
+ this.addMessage(m, "system");
191
191
  }, "onStatus");
192
192
  try {
193
- const g = s ? s({
193
+ const m = s ? s({
194
194
  message: e,
195
195
  attachments: n,
196
196
  conversationId: this.conversationId,
197
197
  history: this.buildHistory(),
198
198
  onDelta: c,
199
- onDone: f,
200
- onError: d,
199
+ onDone: d,
200
+ onError: g,
201
201
  onStatus: p
202
202
  }) : r.chatStream({
203
203
  handle: this._agent.handle.value,
@@ -208,16 +208,16 @@ Current User:
208
208
  visitorId: r.generateAnonId(),
209
209
  context: this.getDynamicSettings().context || void 0,
210
210
  onDelta: c,
211
- onDone: f,
212
- onError: d,
211
+ onDone: d,
212
+ onError: g,
213
213
  onStatus: p
214
214
  });
215
215
  await Promise.race([
216
- g,
217
- new Promise((m, w) => setTimeout(() => w(new Error("timed out")), Ds))
216
+ m,
217
+ new Promise((f, k) => setTimeout(() => k(new Error("timed out")), Rs))
218
218
  ]);
219
- } catch (g) {
220
- d(g.message || "Something went wrong");
219
+ } catch (m) {
220
+ g(m.message || "Something went wrong");
221
221
  }
222
222
  }
223
223
  buildHistory() {
@@ -237,30 +237,30 @@ Current User:
237
237
  await this.endConversation();
238
238
  }
239
239
  };
240
- u(ln, "AgentChatController");
241
- let Cn = ln;
242
- function In(l) {
240
+ u(on, "AgentChatController");
241
+ let In = on;
242
+ function Mn(l) {
243
243
  return l ? typeof l == "string" ? l : l.src || "" : "";
244
244
  }
245
- u(In, "getImageSrc");
246
- function _i(l) {
247
- return In(l.cover) || In(l.avatar) || Xn(l.name);
245
+ u(Mn, "getImageSrc");
246
+ function Ai(l) {
247
+ return Mn(l.cover) || Mn(l.avatar) || Kn(l.name);
248
248
  }
249
- u(_i, "getAgentAvatarUrl");
250
- function Mn(l) {
249
+ u(Ai, "getAgentAvatarUrl");
250
+ function Ln(l) {
251
251
  const t = l.target;
252
- t.dataset.fallbackUsed || (t.dataset.fallbackUsed = "true", t.src = Xn());
252
+ t.dataset.fallbackUsed || (t.dataset.fallbackUsed = "true", t.src = Kn());
253
253
  }
254
- u(Mn, "handleImageError");
255
- function Ri(l) {
254
+ u(Ln, "handleImageError");
255
+ function Ei(l) {
256
256
  const { template: t, agent: e } = l;
257
257
  return t.replace(/{name}/g, e.name || "Digital Agent").replace(/{title}/g, e.title || "").replace(/{handle}/g, e.handle || "").replace(/{orgName}/g, e.org?.name || "");
258
258
  }
259
- u(Ri, "parseButtonTemplate");
260
- const Cs = {
259
+ u(Ei, "parseButtonTemplate");
260
+ const Ds = {
261
261
  key: 0,
262
262
  class: "absolute inset-0 flex items-center justify-center"
263
- }, Di = /* @__PURE__ */ _e({
263
+ }, _i = /* @__PURE__ */ Ee({
264
264
  __name: "ElAgentButton",
265
265
  props: {
266
266
  theme: { default: "primary" },
@@ -284,28 +284,28 @@ const Cs = {
284
284
  md: "size-4",
285
285
  lg: "size-5"
286
286
  })[l.size]);
287
- return (s, r) => (y(), T("button", {
288
- class: A(["relative inline-flex items-center justify-center gap-2 font-medium rounded-full backdrop-blur-sm border-2 text-white transition-all duration-200 focus:outline-none active:opacity-80 disabled:opacity-50 disabled:cursor-not-allowed cursor-pointer", [t.value, e.value]])
287
+ return (s, r) => (T(), S("button", {
288
+ class: y(["relative inline-flex items-center justify-center gap-2 font-medium rounded-full backdrop-blur-sm border-2 text-white transition-all duration-200 focus:outline-none active:opacity-80 disabled:opacity-50 disabled:cursor-not-allowed cursor-pointer", [t.value, e.value]])
289
289
  }, [
290
- l.loading ? (y(), T("div", Cs, [...r[0] || (r[0] = [
290
+ l.loading ? (T(), S("div", Ds, [...r[0] || (r[0] = [
291
291
  v("i", { class: "i-svg-spinners-90-ring-with-bg size-5" }, null, -1)
292
- ])])) : H("", !0),
292
+ ])])) : B("", !0),
293
293
  v("span", {
294
- class: A(["flex items-center gap-2 transition-opacity duration-200", l.loading ? "opacity-0" : "opacity-100"])
294
+ class: y(["flex items-center gap-2 transition-opacity duration-200", l.loading ? "opacity-0" : "opacity-100"])
295
295
  }, [
296
- l.icon ? (y(), T("i", {
296
+ l.icon ? (T(), S("i", {
297
297
  key: 0,
298
- class: A([l.icon, n.value])
299
- }, null, 2)) : H("", !0),
300
- Vn(s.$slots, "default"),
301
- l.iconAfter ? (y(), T("i", {
298
+ class: y([l.icon, n.value])
299
+ }, null, 2)) : B("", !0),
300
+ Yn(s.$slots, "default"),
301
+ l.iconAfter ? (T(), S("i", {
302
302
  key: 1,
303
- class: A([l.iconAfter, n.value])
304
- }, null, 2)) : H("", !0)
303
+ class: y([l.iconAfter, n.value])
304
+ }, null, 2)) : B("", !0)
305
305
  ], 2)
306
306
  ], 2));
307
307
  }
308
- }), Is = ["value"], Ci = /* @__PURE__ */ _e({
308
+ }), Cs = ["value"], Ri = /* @__PURE__ */ Ee({
309
309
  __name: "AgentInputEmail",
310
310
  props: {
311
311
  modelValue: { default: "" }
@@ -313,7 +313,7 @@ const Cs = {
313
313
  emits: ["update:modelValue"],
314
314
  setup(l, { emit: t }) {
315
315
  const e = t;
316
- return (n, s) => (y(), T("input", {
316
+ return (n, s) => (T(), S("input", {
317
317
  type: "email",
318
318
  autocomplete: "email",
319
319
  placeholder: "Enter Your Email",
@@ -321,9 +321,9 @@ const Cs = {
321
321
  class: "w-full px-6 py-3 text-theme-900 placeholder-theme-500 bg-white border border-white rounded-full focus:outline-none transition-all",
322
322
  style: { "font-size": "16px" },
323
323
  onInput: s[0] || (s[0] = (r) => e("update:modelValue", r.target.value))
324
- }, null, 40, Is));
324
+ }, null, 40, Cs));
325
325
  }
326
- }), Ms = { class: "flex gap-1.5 justify-center" }, Ls = ["onUpdate:modelValue", "onInput", "onKeydown", "onPaste", "onFocus"], Ii = /* @__PURE__ */ _e({
326
+ }), Is = { class: "flex gap-1.5 justify-center" }, Ms = ["onUpdate:modelValue", "onInput", "onKeydown", "onPaste", "onFocus"], Di = /* @__PURE__ */ Ee({
327
327
  __name: "AgentInputOneTimeCode",
328
328
  props: {
329
329
  modelValue: {},
@@ -332,8 +332,8 @@ const Cs = {
332
332
  },
333
333
  emits: ["update:modelValue", "autoSubmit"],
334
334
  setup(l, { emit: t }) {
335
- const e = l, n = t, s = Q([]), r = Q(Array.from({ length: e.length }).fill("")), a = Q(!1);
336
- Xt(() => {
335
+ const e = l, n = t, s = Y([]), r = Y(Array.from({ length: e.length }).fill("")), a = Y(!1);
336
+ Kt(() => {
337
337
  e.modelValue && (r.value = e.modelValue.split("").slice(0, e.length)), e.focusFirst && !("ontouchstart" in window) && s.value[0]?.focus();
338
338
  }), Je(() => e.modelValue, (p) => {
339
339
  r.value = p ? p.split("").slice(0, e.length) : Array.from({ length: e.length }).fill("");
@@ -341,64 +341,64 @@ const Cs = {
341
341
  const p = r.value.filter(Boolean).join("");
342
342
  n("update:modelValue", p), p.length === e.length && n("autoSubmit", p);
343
343
  }, { deep: !0 });
344
- function o(p, g) {
345
- g.preventDefault(), a.value = !0;
346
- const m = (g.clipboardData?.getData("text") || "").replace(/\D/g, "");
347
- if (m.length === e.length)
348
- r.value = m.split(""), setTimeout(() => {
344
+ function o(p, m) {
345
+ m.preventDefault(), a.value = !0;
346
+ const f = (m.clipboardData?.getData("text") || "").replace(/\D/g, "");
347
+ if (f.length === e.length)
348
+ r.value = f.split(""), setTimeout(() => {
349
349
  s.value[e.length - 1]?.focus(), a.value = !1;
350
350
  }, 10);
351
351
  else {
352
- const w = [...r.value];
353
- m.split("").slice(0, e.length - p).forEach((O, me) => {
354
- w[p + me] = O;
355
- }), r.value = w;
356
- const S = Math.min(p + m.length, e.length - 1);
352
+ const k = [...r.value];
353
+ f.split("").slice(0, e.length - p).forEach((O, ee) => {
354
+ k[p + ee] = O;
355
+ }), r.value = k;
356
+ const _ = Math.min(p + f.length, e.length - 1);
357
357
  setTimeout(() => {
358
- s.value[S]?.focus(), a.value = !1;
358
+ s.value[_]?.focus(), a.value = !1;
359
359
  }, 10);
360
360
  }
361
361
  }
362
362
  u(o, "onPaste");
363
- function c(p, g) {
364
- const m = g.target.value.slice(-1).replace(/\D/g, "");
365
- r.value[p] = m, m && p < e.length - 1 && s.value[p + 1]?.focus();
363
+ function c(p, m) {
364
+ const f = m.target.value.slice(-1).replace(/\D/g, "");
365
+ r.value[p] = f, f && p < e.length - 1 && s.value[p + 1]?.focus();
366
366
  }
367
367
  u(c, "onInput");
368
- function f(p, g) {
369
- g.key === "Backspace" ? (g.preventDefault(), r.value[p] = "", p > 0 && s.value[p - 1]?.focus()) : g.key === "ArrowLeft" && p > 0 ? s.value[p - 1]?.focus() : g.key === "ArrowRight" && p < e.length - 1 && s.value[p + 1]?.focus();
368
+ function d(p, m) {
369
+ m.key === "Backspace" ? (m.preventDefault(), r.value[p] = "", p > 0 && s.value[p - 1]?.focus()) : m.key === "ArrowLeft" && p > 0 ? s.value[p - 1]?.focus() : m.key === "ArrowRight" && p < e.length - 1 && s.value[p + 1]?.focus();
370
370
  }
371
- u(f, "onKeydown");
372
- function d(p) {
371
+ u(d, "onKeydown");
372
+ function g(p) {
373
373
  if (s.value[p]?.select(), !a.value && r.value[p])
374
- for (let g = p; g < e.length; g++)
375
- r.value[g] = "";
374
+ for (let m = p; m < e.length; m++)
375
+ r.value[m] = "";
376
376
  }
377
- return u(d, "onFocus"), (p, g) => (y(), T("div", Ms, [
378
- (y(!0), T(Se, null, gt(l.length, (m) => Yn((y(), T("input", {
379
- key: m,
377
+ return u(g, "onFocus"), (p, m) => (T(), S("div", Is, [
378
+ (T(!0), S(Te, null, gt(l.length, (f) => Zn((T(), S("input", {
379
+ key: f,
380
380
  ref_for: !0,
381
- ref: /* @__PURE__ */ u((w) => s.value[m - 1] = w, "ref"),
382
- "onUpdate:modelValue": /* @__PURE__ */ u((w) => r.value[m - 1] = w, "onUpdate:modelValue"),
381
+ ref: /* @__PURE__ */ u((k) => s.value[f - 1] = k, "ref"),
382
+ "onUpdate:modelValue": /* @__PURE__ */ u((k) => r.value[f - 1] = k, "onUpdate:modelValue"),
383
383
  type: "text",
384
384
  inputmode: "numeric",
385
385
  autocomplete: "one-time-code",
386
386
  class: "size-11 text-center font-mono text-theme-900 bg-white border border-white rounded-lg focus:outline-none transition-all",
387
387
  style: { "font-size": "16px" },
388
388
  maxlength: "1",
389
- onInput: /* @__PURE__ */ u((w) => c(m - 1, w), "onInput"),
390
- onKeydown: /* @__PURE__ */ u((w) => f(m - 1, w), "onKeydown"),
391
- onPaste: /* @__PURE__ */ u((w) => o(m - 1, w), "onPaste"),
392
- onFocus: /* @__PURE__ */ u((w) => d(m - 1), "onFocus")
393
- }, null, 40, Ls)), [
394
- [Zn, r.value[m - 1]]
389
+ onInput: /* @__PURE__ */ u((k) => c(f - 1, k), "onInput"),
390
+ onKeydown: /* @__PURE__ */ u((k) => d(f - 1, k), "onKeydown"),
391
+ onPaste: /* @__PURE__ */ u((k) => o(f - 1, k), "onPaste"),
392
+ onFocus: /* @__PURE__ */ u((k) => g(f - 1), "onFocus")
393
+ }, null, 40, Ms)), [
394
+ [Xn, r.value[f - 1]]
395
395
  ])), 128))
396
396
  ]));
397
397
  }
398
- }), zs = { class: "relative flex-shrink-0" }, Os = ["src", "alt"], Ns = { class: "absolute top-1 right-1" }, Ps = {
398
+ }), Ls = { class: "relative flex-shrink-0" }, zs = ["src", "alt"], Os = { class: "absolute top-1 right-1" }, Ns = {
399
399
  key: 1,
400
400
  class: "size-3 bg-theme-400 rounded-full ring-2 ring-white"
401
- }, $s = { class: "min-w-0" }, Us = /* @__PURE__ */ _e({
401
+ }, Ps = { class: "min-w-0" }, $s = /* @__PURE__ */ Ee({
402
402
  __name: "ElModeHeader",
403
403
  props: {
404
404
  agent: {},
@@ -407,137 +407,137 @@ const Cs = {
407
407
  layout: { default: "centered" }
408
408
  },
409
409
  setup(l) {
410
- return (t, e) => (y(), T("div", {
411
- class: A(["flex gap-4", [
410
+ return (t, e) => (T(), S("div", {
411
+ class: y(["flex gap-4", [
412
412
  l.layout === "centered" ? "flex-col items-center text-center" : "flex-row items-center justify-center"
413
413
  ]])
414
414
  }, [
415
- v("div", zs, [
415
+ v("div", Ls, [
416
416
  v("div", {
417
- class: A(["rounded-full overflow-hidden border-white", l.size === "lg" ? "w-20 h-20 sm:w-24 sm:h-24 border-4" : "w-16 sm:size-16 border-2"])
417
+ class: y(["rounded-full overflow-hidden border-white", l.size === "lg" ? "w-20 h-20 sm:w-24 sm:h-24 border-4" : "w-16 sm:size-16 border-2"])
418
418
  }, [
419
419
  v("img", {
420
420
  src: l.agent.avatarUrl.value,
421
421
  alt: l.agent.displayName.value,
422
422
  class: "w-full h-full object-cover",
423
423
  onError: e[0] || (e[0] = //@ts-ignore
424
- (...n) => qt(Mn) && qt(Mn)(...n))
425
- }, null, 40, Os)
424
+ (...n) => Vt(Ln) && Vt(Ln)(...n))
425
+ }, null, 40, zs)
426
426
  ], 2),
427
- v("div", Ns, [
428
- l.isOnline ? (y(), T(Se, { key: 0 }, [
427
+ v("div", Os, [
428
+ l.isOnline ? (T(), S(Te, { key: 0 }, [
429
429
  e[1] || (e[1] = v("div", {
430
430
  class: "size-3 bg-green-500 rounded-full ring-2 ring-white absolute animate-ping",
431
431
  style: { "animation-duration": "3s" }
432
432
  }, null, -1)),
433
433
  e[2] || (e[2] = v("div", { class: "size-3 bg-green-500 rounded-full ring-2 ring-white" }, null, -1))
434
- ], 64)) : (y(), T("div", Ps))
434
+ ], 64)) : (T(), S("div", Ns))
435
435
  ])
436
436
  ]),
437
- v("div", $s, [
437
+ v("div", Ps, [
438
438
  v("h1", {
439
- class: A(["font-light text-white mb-1 truncate", [
439
+ class: y(["font-light text-white mb-1 truncate", [
440
440
  l.size === "lg" ? "text-3xl mb-2" : "text-xl sm:text-2xl tracking-wide leading-tight",
441
441
  l.layout === "horizontal" ? "text-white/95" : ""
442
442
  ]])
443
- }, ce(l.agent.displayName.value), 3),
443
+ }, ue(l.agent.displayName.value), 3),
444
444
  v("p", {
445
- class: A(["font-light line-clamp-1", [
445
+ class: y(["font-light line-clamp-1", [
446
446
  l.size === "lg" ? "text-base text-white/60" : "text-sm sm:text-base",
447
447
  l.layout === "horizontal" ? "text-white/70 truncate" : "text-white/60"
448
448
  ]])
449
- }, ce(l.layout === "horizontal" ? l.agent.title.value || "Digital Agent" : l.agent.title.value), 3)
449
+ }, ue(l.layout === "horizontal" ? l.agent.title.value || "Digital Agent" : l.agent.title.value), 3)
450
450
  ])
451
451
  ], 2));
452
452
  }
453
453
  });
454
454
  const {
455
- entries: Kn,
456
- setPrototypeOf: Ln,
457
- isFrozen: Bs,
458
- getPrototypeOf: Fs,
459
- getOwnPropertyDescriptor: Hs
455
+ entries: Qn,
456
+ setPrototypeOf: zn,
457
+ isFrozen: Us,
458
+ getPrototypeOf: Bs,
459
+ getOwnPropertyDescriptor: Fs
460
460
  } = Object;
461
461
  let {
462
- freeze: Z,
463
- seal: ee,
462
+ freeze: X,
463
+ seal: te,
464
464
  create: mt
465
465
  } = Object, {
466
- apply: Vt,
467
- construct: Yt
466
+ apply: Yt,
467
+ construct: Zt
468
468
  } = typeof Reflect < "u" && Reflect;
469
- Z || (Z = /* @__PURE__ */ u(function(t) {
469
+ X || (X = /* @__PURE__ */ u(function(t) {
470
470
  return t;
471
471
  }, "freeze"));
472
- ee || (ee = /* @__PURE__ */ u(function(t) {
472
+ te || (te = /* @__PURE__ */ u(function(t) {
473
473
  return t;
474
474
  }, "seal"));
475
- Vt || (Vt = /* @__PURE__ */ u(function(t, e) {
475
+ Yt || (Yt = /* @__PURE__ */ u(function(t, e) {
476
476
  for (var n = arguments.length, s = new Array(n > 2 ? n - 2 : 0), r = 2; r < n; r++)
477
477
  s[r - 2] = arguments[r];
478
478
  return t.apply(e, s);
479
479
  }, "apply"));
480
- Yt || (Yt = /* @__PURE__ */ u(function(t) {
480
+ Zt || (Zt = /* @__PURE__ */ u(function(t) {
481
481
  for (var e = arguments.length, n = new Array(e > 1 ? e - 1 : 0), s = 1; s < e; s++)
482
482
  n[s - 1] = arguments[s];
483
483
  return new t(...n);
484
484
  }, "construct"));
485
- const pt = X(Array.prototype.forEach), Gs = X(Array.prototype.lastIndexOf), zn = X(Array.prototype.pop), je = X(Array.prototype.push), Ws = X(Array.prototype.splice), xt = X(String.prototype.toLowerCase), Bt = X(String.prototype.toString), Ft = X(String.prototype.match), qe = X(String.prototype.replace), js = X(String.prototype.indexOf), qs = X(String.prototype.trim), J = X(Object.prototype.hasOwnProperty), V = X(RegExp.prototype.test), Ve = Vs(TypeError);
486
- function X(l) {
485
+ const pt = K(Array.prototype.forEach), Hs = K(Array.prototype.lastIndexOf), On = K(Array.prototype.pop), je = K(Array.prototype.push), Gs = K(Array.prototype.splice), xt = K(String.prototype.toLowerCase), Ft = K(String.prototype.toString), Ht = K(String.prototype.match), qe = K(String.prototype.replace), Ws = K(String.prototype.indexOf), js = K(String.prototype.trim), J = K(Object.prototype.hasOwnProperty), V = K(RegExp.prototype.test), Ve = qs(TypeError);
486
+ function K(l) {
487
487
  return function(t) {
488
488
  t instanceof RegExp && (t.lastIndex = 0);
489
489
  for (var e = arguments.length, n = new Array(e > 1 ? e - 1 : 0), s = 1; s < e; s++)
490
490
  n[s - 1] = arguments[s];
491
- return Vt(l, t, n);
491
+ return Yt(l, t, n);
492
492
  };
493
493
  }
494
- u(X, "unapply");
495
- function Vs(l) {
494
+ u(K, "unapply");
495
+ function qs(l) {
496
496
  return function() {
497
497
  for (var t = arguments.length, e = new Array(t), n = 0; n < t; n++)
498
498
  e[n] = arguments[n];
499
- return Yt(l, e);
499
+ return Zt(l, e);
500
500
  };
501
501
  }
502
- u(Vs, "unconstruct");
503
- function R(l, t) {
502
+ u(qs, "unconstruct");
503
+ function D(l, t) {
504
504
  let e = arguments.length > 2 && arguments[2] !== void 0 ? arguments[2] : xt;
505
- Ln && Ln(l, null);
505
+ zn && zn(l, null);
506
506
  let n = t.length;
507
507
  for (; n--; ) {
508
508
  let s = t[n];
509
509
  if (typeof s == "string") {
510
510
  const r = e(s);
511
- r !== s && (Bs(t) || (t[n] = r), s = r);
511
+ r !== s && (Us(t) || (t[n] = r), s = r);
512
512
  }
513
513
  l[s] = !0;
514
514
  }
515
515
  return l;
516
516
  }
517
- u(R, "addToSet");
518
- function Ys(l) {
517
+ u(D, "addToSet");
518
+ function Vs(l) {
519
519
  for (let t = 0; t < l.length; t++)
520
520
  J(l, t) || (l[t] = null);
521
521
  return l;
522
522
  }
523
- u(Ys, "cleanArray");
524
- function le(l) {
523
+ u(Vs, "cleanArray");
524
+ function oe(l) {
525
525
  const t = mt(null);
526
- for (const [e, n] of Kn(l))
527
- J(l, e) && (Array.isArray(n) ? t[e] = Ys(n) : n && typeof n == "object" && n.constructor === Object ? t[e] = le(n) : t[e] = n);
526
+ for (const [e, n] of Qn(l))
527
+ J(l, e) && (Array.isArray(n) ? t[e] = Vs(n) : n && typeof n == "object" && n.constructor === Object ? t[e] = oe(n) : t[e] = n);
528
528
  return t;
529
529
  }
530
- u(le, "clone");
530
+ u(oe, "clone");
531
531
  function Ye(l, t) {
532
532
  for (; l !== null; ) {
533
- const n = Hs(l, t);
533
+ const n = Fs(l, t);
534
534
  if (n) {
535
535
  if (n.get)
536
- return X(n.get);
536
+ return K(n.get);
537
537
  if (typeof n.value == "function")
538
- return X(n.value);
538
+ return K(n.value);
539
539
  }
540
- l = Fs(l);
540
+ l = Bs(l);
541
541
  }
542
542
  function e() {
543
543
  return null;
@@ -545,25 +545,25 @@ function Ye(l, t) {
545
545
  return u(e, "fallbackValue"), e;
546
546
  }
547
547
  u(Ye, "lookupGetter");
548
- const On = Z(["a", "abbr", "acronym", "address", "area", "article", "aside", "audio", "b", "bdi", "bdo", "big", "blink", "blockquote", "body", "br", "button", "canvas", "caption", "center", "cite", "code", "col", "colgroup", "content", "data", "datalist", "dd", "decorator", "del", "details", "dfn", "dialog", "dir", "div", "dl", "dt", "element", "em", "fieldset", "figcaption", "figure", "font", "footer", "form", "h1", "h2", "h3", "h4", "h5", "h6", "head", "header", "hgroup", "hr", "html", "i", "img", "input", "ins", "kbd", "label", "legend", "li", "main", "map", "mark", "marquee", "menu", "menuitem", "meter", "nav", "nobr", "ol", "optgroup", "option", "output", "p", "picture", "pre", "progress", "q", "rp", "rt", "ruby", "s", "samp", "search", "section", "select", "shadow", "slot", "small", "source", "spacer", "span", "strike", "strong", "style", "sub", "summary", "sup", "table", "tbody", "td", "template", "textarea", "tfoot", "th", "thead", "time", "tr", "track", "tt", "u", "ul", "var", "video", "wbr"]), Ht = Z(["svg", "a", "altglyph", "altglyphdef", "altglyphitem", "animatecolor", "animatemotion", "animatetransform", "circle", "clippath", "defs", "desc", "ellipse", "enterkeyhint", "exportparts", "filter", "font", "g", "glyph", "glyphref", "hkern", "image", "inputmode", "line", "lineargradient", "marker", "mask", "metadata", "mpath", "part", "path", "pattern", "polygon", "polyline", "radialgradient", "rect", "stop", "style", "switch", "symbol", "text", "textpath", "title", "tref", "tspan", "view", "vkern"]), Gt = Z(["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"]), Zs = Z(["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"]), Wt = Z(["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"]), Xs = Z(["maction", "maligngroup", "malignmark", "mlongdiv", "mscarries", "mscarry", "msgroup", "mstack", "msline", "msrow", "semantics", "annotation", "annotation-xml", "mprescripts", "none"]), Nn = Z(["#text"]), Pn = Z(["accept", "action", "align", "alt", "autocapitalize", "autocomplete", "autopictureinpicture", "autoplay", "background", "bgcolor", "border", "capture", "cellpadding", "cellspacing", "checked", "cite", "class", "clear", "color", "cols", "colspan", "controls", "controlslist", "coords", "crossorigin", "datetime", "decoding", "default", "dir", "disabled", "disablepictureinpicture", "disableremoteplayback", "download", "draggable", "enctype", "enterkeyhint", "exportparts", "face", "for", "headers", "height", "hidden", "high", "href", "hreflang", "id", "inert", "inputmode", "integrity", "ismap", "kind", "label", "lang", "list", "loading", "loop", "low", "max", "maxlength", "media", "method", "min", "minlength", "multiple", "muted", "name", "nonce", "noshade", "novalidate", "nowrap", "open", "optimum", "part", "pattern", "placeholder", "playsinline", "popover", "popovertarget", "popovertargetaction", "poster", "preload", "pubdate", "radiogroup", "readonly", "rel", "required", "rev", "reversed", "role", "rows", "rowspan", "spellcheck", "scope", "selected", "shape", "size", "sizes", "slot", "span", "srclang", "start", "src", "srcset", "step", "style", "summary", "tabindex", "title", "translate", "type", "usemap", "valign", "value", "width", "wrap", "xmlns", "slot"]), jt = Z(["accent-height", "accumulate", "additive", "alignment-baseline", "amplitude", "ascent", "attributename", "attributetype", "azimuth", "basefrequency", "baseline-shift", "begin", "bias", "by", "class", "clip", "clippathunits", "clip-path", "clip-rule", "color", "color-interpolation", "color-interpolation-filters", "color-profile", "color-rendering", "cx", "cy", "d", "dx", "dy", "diffuseconstant", "direction", "display", "divisor", "dur", "edgemode", "elevation", "end", "exponent", "fill", "fill-opacity", "fill-rule", "filter", "filterunits", "flood-color", "flood-opacity", "font-family", "font-size", "font-size-adjust", "font-stretch", "font-style", "font-variant", "font-weight", "fx", "fy", "g1", "g2", "glyph-name", "glyphref", "gradientunits", "gradienttransform", "height", "href", "id", "image-rendering", "in", "in2", "intercept", "k", "k1", "k2", "k3", "k4", "kerning", "keypoints", "keysplines", "keytimes", "lang", "lengthadjust", "letter-spacing", "kernelmatrix", "kernelunitlength", "lighting-color", "local", "marker-end", "marker-mid", "marker-start", "markerheight", "markerunits", "markerwidth", "maskcontentunits", "maskunits", "max", "mask", "mask-type", "media", "method", "mode", "min", "name", "numoctaves", "offset", "operator", "opacity", "order", "orient", "orientation", "origin", "overflow", "paint-order", "path", "pathlength", "patterncontentunits", "patterntransform", "patternunits", "points", "preservealpha", "preserveaspectratio", "primitiveunits", "r", "rx", "ry", "radius", "refx", "refy", "repeatcount", "repeatdur", "restart", "result", "rotate", "scale", "seed", "shape-rendering", "slope", "specularconstant", "specularexponent", "spreadmethod", "startoffset", "stddeviation", "stitchtiles", "stop-color", "stop-opacity", "stroke-dasharray", "stroke-dashoffset", "stroke-linecap", "stroke-linejoin", "stroke-miterlimit", "stroke-opacity", "stroke", "stroke-width", "style", "surfacescale", "systemlanguage", "tabindex", "tablevalues", "targetx", "targety", "transform", "transform-origin", "text-anchor", "text-decoration", "text-rendering", "textlength", "type", "u1", "u2", "unicode", "values", "viewbox", "visibility", "version", "vert-adv-y", "vert-origin-x", "vert-origin-y", "width", "word-spacing", "wrap", "writing-mode", "xchannelselector", "ychannelselector", "x", "x1", "x2", "xmlns", "y", "y1", "y2", "z", "zoomandpan"]), $n = Z(["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"]), ft = Z(["xlink:href", "xml:id", "xlink:title", "xml:space", "xmlns:xlink"]), Ks = ee(/\{\{[\w\W]*|[\w\W]*\}\}/gm), Qs = ee(/<%[\w\W]*|[\w\W]*%>/gm), Js = ee(/\$\{[\w\W]*/gm), er = ee(/^data-[\-\w.\u00B7-\uFFFF]+$/), tr = ee(/^aria-[\-\w]+$/), Qn = ee(
548
+ const Nn = X(["a", "abbr", "acronym", "address", "area", "article", "aside", "audio", "b", "bdi", "bdo", "big", "blink", "blockquote", "body", "br", "button", "canvas", "caption", "center", "cite", "code", "col", "colgroup", "content", "data", "datalist", "dd", "decorator", "del", "details", "dfn", "dialog", "dir", "div", "dl", "dt", "element", "em", "fieldset", "figcaption", "figure", "font", "footer", "form", "h1", "h2", "h3", "h4", "h5", "h6", "head", "header", "hgroup", "hr", "html", "i", "img", "input", "ins", "kbd", "label", "legend", "li", "main", "map", "mark", "marquee", "menu", "menuitem", "meter", "nav", "nobr", "ol", "optgroup", "option", "output", "p", "picture", "pre", "progress", "q", "rp", "rt", "ruby", "s", "samp", "search", "section", "select", "shadow", "slot", "small", "source", "spacer", "span", "strike", "strong", "style", "sub", "summary", "sup", "table", "tbody", "td", "template", "textarea", "tfoot", "th", "thead", "time", "tr", "track", "tt", "u", "ul", "var", "video", "wbr"]), Gt = X(["svg", "a", "altglyph", "altglyphdef", "altglyphitem", "animatecolor", "animatemotion", "animatetransform", "circle", "clippath", "defs", "desc", "ellipse", "enterkeyhint", "exportparts", "filter", "font", "g", "glyph", "glyphref", "hkern", "image", "inputmode", "line", "lineargradient", "marker", "mask", "metadata", "mpath", "part", "path", "pattern", "polygon", "polyline", "radialgradient", "rect", "stop", "style", "switch", "symbol", "text", "textpath", "title", "tref", "tspan", "view", "vkern"]), Wt = X(["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"]), Ys = X(["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"]), jt = X(["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"]), Zs = X(["maction", "maligngroup", "malignmark", "mlongdiv", "mscarries", "mscarry", "msgroup", "mstack", "msline", "msrow", "semantics", "annotation", "annotation-xml", "mprescripts", "none"]), Pn = X(["#text"]), $n = X(["accept", "action", "align", "alt", "autocapitalize", "autocomplete", "autopictureinpicture", "autoplay", "background", "bgcolor", "border", "capture", "cellpadding", "cellspacing", "checked", "cite", "class", "clear", "color", "cols", "colspan", "controls", "controlslist", "coords", "crossorigin", "datetime", "decoding", "default", "dir", "disabled", "disablepictureinpicture", "disableremoteplayback", "download", "draggable", "enctype", "enterkeyhint", "exportparts", "face", "for", "headers", "height", "hidden", "high", "href", "hreflang", "id", "inert", "inputmode", "integrity", "ismap", "kind", "label", "lang", "list", "loading", "loop", "low", "max", "maxlength", "media", "method", "min", "minlength", "multiple", "muted", "name", "nonce", "noshade", "novalidate", "nowrap", "open", "optimum", "part", "pattern", "placeholder", "playsinline", "popover", "popovertarget", "popovertargetaction", "poster", "preload", "pubdate", "radiogroup", "readonly", "rel", "required", "rev", "reversed", "role", "rows", "rowspan", "spellcheck", "scope", "selected", "shape", "size", "sizes", "slot", "span", "srclang", "start", "src", "srcset", "step", "style", "summary", "tabindex", "title", "translate", "type", "usemap", "valign", "value", "width", "wrap", "xmlns", "slot"]), qt = X(["accent-height", "accumulate", "additive", "alignment-baseline", "amplitude", "ascent", "attributename", "attributetype", "azimuth", "basefrequency", "baseline-shift", "begin", "bias", "by", "class", "clip", "clippathunits", "clip-path", "clip-rule", "color", "color-interpolation", "color-interpolation-filters", "color-profile", "color-rendering", "cx", "cy", "d", "dx", "dy", "diffuseconstant", "direction", "display", "divisor", "dur", "edgemode", "elevation", "end", "exponent", "fill", "fill-opacity", "fill-rule", "filter", "filterunits", "flood-color", "flood-opacity", "font-family", "font-size", "font-size-adjust", "font-stretch", "font-style", "font-variant", "font-weight", "fx", "fy", "g1", "g2", "glyph-name", "glyphref", "gradientunits", "gradienttransform", "height", "href", "id", "image-rendering", "in", "in2", "intercept", "k", "k1", "k2", "k3", "k4", "kerning", "keypoints", "keysplines", "keytimes", "lang", "lengthadjust", "letter-spacing", "kernelmatrix", "kernelunitlength", "lighting-color", "local", "marker-end", "marker-mid", "marker-start", "markerheight", "markerunits", "markerwidth", "maskcontentunits", "maskunits", "max", "mask", "mask-type", "media", "method", "mode", "min", "name", "numoctaves", "offset", "operator", "opacity", "order", "orient", "orientation", "origin", "overflow", "paint-order", "path", "pathlength", "patterncontentunits", "patterntransform", "patternunits", "points", "preservealpha", "preserveaspectratio", "primitiveunits", "r", "rx", "ry", "radius", "refx", "refy", "repeatcount", "repeatdur", "restart", "result", "rotate", "scale", "seed", "shape-rendering", "slope", "specularconstant", "specularexponent", "spreadmethod", "startoffset", "stddeviation", "stitchtiles", "stop-color", "stop-opacity", "stroke-dasharray", "stroke-dashoffset", "stroke-linecap", "stroke-linejoin", "stroke-miterlimit", "stroke-opacity", "stroke", "stroke-width", "style", "surfacescale", "systemlanguage", "tabindex", "tablevalues", "targetx", "targety", "transform", "transform-origin", "text-anchor", "text-decoration", "text-rendering", "textlength", "type", "u1", "u2", "unicode", "values", "viewbox", "visibility", "version", "vert-adv-y", "vert-origin-x", "vert-origin-y", "width", "word-spacing", "wrap", "writing-mode", "xchannelselector", "ychannelselector", "x", "x1", "x2", "xmlns", "y", "y1", "y2", "z", "zoomandpan"]), Un = X(["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"]), dt = X(["xlink:href", "xml:id", "xlink:title", "xml:space", "xmlns:xlink"]), Xs = te(/\{\{[\w\W]*|[\w\W]*\}\}/gm), Ks = te(/<%[\w\W]*|[\w\W]*%>/gm), Qs = te(/\$\{[\w\W]*/gm), Js = te(/^data-[\-\w.\u00B7-\uFFFF]+$/), er = te(/^aria-[\-\w]+$/), Jn = te(
549
549
  /^(?:(?:(?:f|ht)tps?|mailto|tel|callto|sms|cid|xmpp|matrix):|[^a-z]|[a-z+.\-]+(?:[^a-z+.\-:]|$))/i
550
550
  // eslint-disable-line no-useless-escape
551
- ), nr = ee(/^(?:\w+script|data):/i), sr = ee(
551
+ ), tr = te(/^(?:\w+script|data):/i), nr = te(
552
552
  /[\u0000-\u0020\u00A0\u1680\u180E\u2000-\u2029\u205F\u3000]/g
553
553
  // eslint-disable-line no-control-regex
554
- ), Jn = ee(/^html$/i), rr = ee(/^[a-z][.\w]*(-[.\w]+)+$/i);
555
- var Un = /* @__PURE__ */ Object.freeze({
554
+ ), es = te(/^html$/i), sr = te(/^[a-z][.\w]*(-[.\w]+)+$/i);
555
+ var Bn = /* @__PURE__ */ Object.freeze({
556
556
  __proto__: null,
557
- ARIA_ATTR: tr,
558
- ATTR_WHITESPACE: sr,
559
- CUSTOM_ELEMENT: rr,
560
- DATA_ATTR: er,
561
- DOCTYPE_NAME: Jn,
562
- ERB_EXPR: Qs,
563
- IS_ALLOWED_URI: Qn,
564
- IS_SCRIPT_OR_DATA: nr,
565
- MUSTACHE_EXPR: Ks,
566
- TMPLIT_EXPR: Js
557
+ ARIA_ATTR: er,
558
+ ATTR_WHITESPACE: nr,
559
+ CUSTOM_ELEMENT: sr,
560
+ DATA_ATTR: Js,
561
+ DOCTYPE_NAME: es,
562
+ ERB_EXPR: Ks,
563
+ IS_ALLOWED_URI: Jn,
564
+ IS_SCRIPT_OR_DATA: tr,
565
+ MUSTACHE_EXPR: Xs,
566
+ TMPLIT_EXPR: Qs
567
567
  });
568
568
  const Ze = {
569
569
  element: 1,
@@ -572,9 +572,9 @@ const Ze = {
572
572
  progressingInstruction: 7,
573
573
  comment: 8,
574
574
  document: 9
575
- }, ir = /* @__PURE__ */ u(function() {
575
+ }, rr = /* @__PURE__ */ u(function() {
576
576
  return typeof window > "u" ? null : window;
577
- }, "getGlobal"), ar = /* @__PURE__ */ u(function(t, e) {
577
+ }, "getGlobal"), ir = /* @__PURE__ */ u(function(t, e) {
578
578
  if (typeof t != "object" || typeof t.createPolicy != "function")
579
579
  return null;
580
580
  let n = null;
@@ -593,7 +593,7 @@ const Ze = {
593
593
  } catch {
594
594
  return console.warn("TrustedTypes policy " + r + " could not be created."), null;
595
595
  }
596
- }, "_createTrustedTypesPolicy"), Bn = /* @__PURE__ */ u(function() {
596
+ }, "_createTrustedTypesPolicy"), Fn = /* @__PURE__ */ u(function() {
597
597
  return {
598
598
  afterSanitizeAttributes: [],
599
599
  afterSanitizeElements: [],
@@ -606,9 +606,9 @@ const Ze = {
606
606
  uponSanitizeShadowNode: []
607
607
  };
608
608
  }, "_createHooksMap");
609
- function es() {
610
- let l = arguments.length > 0 && arguments[0] !== void 0 ? arguments[0] : ir();
611
- const t = /* @__PURE__ */ u((k) => es(k), "DOMPurify");
609
+ function ts() {
610
+ let l = arguments.length > 0 && arguments[0] !== void 0 ? arguments[0] : rr();
611
+ const t = /* @__PURE__ */ u((w) => ts(w), "DOMPurify");
612
612
  if (t.version = "3.3.3", t.removed = [], !l || !l.document || l.document.nodeType !== Ze.document || !l.Element)
613
613
  return t.isSupported = !1, t;
614
614
  let {
@@ -619,44 +619,44 @@ function es() {
619
619
  HTMLTemplateElement: a,
620
620
  Node: o,
621
621
  Element: c,
622
- NodeFilter: f,
623
- NamedNodeMap: d = l.NamedNodeMap || l.MozNamedAttrMap,
622
+ NodeFilter: d,
623
+ NamedNodeMap: g = l.NamedNodeMap || l.MozNamedAttrMap,
624
624
  HTMLFormElement: p,
625
- DOMParser: g,
626
- trustedTypes: m
627
- } = l, w = c.prototype, S = Ye(w, "cloneNode"), O = Ye(w, "remove"), me = Ye(w, "nextSibling"), xe = Ye(w, "childNodes"), te = Ye(w, "parentNode");
625
+ DOMParser: m,
626
+ trustedTypes: f
627
+ } = l, k = c.prototype, _ = Ye(k, "cloneNode"), O = Ye(k, "remove"), ee = Ye(k, "nextSibling"), Re = Ye(k, "childNodes"), ne = Ye(k, "parentNode");
628
628
  if (typeof a == "function") {
629
- const k = e.createElement("template");
630
- k.content && k.content.ownerDocument && (e = k.content.ownerDocument);
629
+ const w = e.createElement("template");
630
+ w.content && w.content.ownerDocument && (e = w.content.ownerDocument);
631
631
  }
632
- let U, q = "";
632
+ let P, he = "";
633
633
  const {
634
- implementation: ne,
635
- createNodeIterator: ue,
636
- createDocumentFragment: tt,
637
- getElementsByTagName: nt
634
+ implementation: q,
635
+ createNodeIterator: se,
636
+ createDocumentFragment: St,
637
+ getElementsByTagName: tt
638
638
  } = e, {
639
- importNode: St
639
+ importNode: nt
640
640
  } = n;
641
- let F = Bn();
642
- t.isSupported = typeof Kn == "function" && typeof te == "function" && ne && ne.createHTMLDocument !== void 0;
641
+ let F = Fn();
642
+ t.isSupported = typeof Qn == "function" && typeof ne == "function" && q && q.createHTMLDocument !== void 0;
643
643
  const {
644
- MUSTACHE_EXPR: Be,
645
- ERB_EXPR: L,
646
- TMPLIT_EXPR: Fe,
644
+ MUSTACHE_EXPR: De,
645
+ ERB_EXPR: Fe,
646
+ TMPLIT_EXPR: M,
647
647
  DATA_ATTR: At,
648
648
  ARIA_ATTR: Et,
649
- IS_SCRIPT_OR_DATA: st,
649
+ IS_SCRIPT_OR_DATA: _t,
650
650
  ATTR_WHITESPACE: He,
651
- CUSTOM_ELEMENT: E
652
- } = Un;
651
+ CUSTOM_ELEMENT: st
652
+ } = Bn;
653
653
  let {
654
- IS_ALLOWED_URI: _
655
- } = Un, b = null;
656
- const z = R({}, [...On, ...Ht, ...Gt, ...Wt, ...Nn]);
657
- let I = null;
658
- const he = R({}, [...Pn, ...jt, ...$n, ...ft]);
659
- let N = Object.seal(mt(null, {
654
+ IS_ALLOWED_URI: E
655
+ } = Bn, x = null;
656
+ const R = D({}, [...Nn, ...Gt, ...Wt, ...jt, ...Pn]);
657
+ let A = null;
658
+ const H = D({}, [...$n, ...qt, ...Un, ...dt]);
659
+ let z = Object.seal(mt(null, {
660
660
  tagNameCheck: {
661
661
  writable: !0,
662
662
  configurable: !1,
@@ -675,8 +675,8 @@ function es() {
675
675
  enumerable: !0,
676
676
  value: !1
677
677
  }
678
- })), pe = null, rt = null;
679
- const ke = Object.seal(mt(null, {
678
+ })), ge = null, me = null;
679
+ const xe = Object.seal(mt(null, {
680
680
  tagCheck: {
681
681
  writable: !0,
682
682
  configurable: !1,
@@ -690,55 +690,55 @@ function es() {
690
690
  value: null
691
691
  }
692
692
  }));
693
- let on = !0, _t = !0, cn = !1, un = !0, De = !1, it = !0, ye = !1, Rt = !1, Dt = !1, Ce = !1, at = !1, lt = !1, hn = !0, pn = !1;
694
- const hs = "user-content-";
695
- let Ct = !0, Ge = !1, Ie = {}, ie = null;
696
- const It = R({}, ["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"]);
693
+ let cn = !0, Rt = !0, un = !1, hn = !0, Ce = !1, rt = !0, ve = !1, Dt = !1, Ct = !1, Ie = !1, it = !1, at = !1, pn = !0, dn = !1;
694
+ const ps = "user-content-";
695
+ let It = !0, Ge = !1, Me = {}, ae = null;
696
+ const Mt = D({}, ["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"]);
697
697
  let fn = null;
698
- const dn = R({}, ["audio", "video", "img", "source", "image", "track"]);
699
- let Mt = null;
700
- const gn = R({}, ["alt", "class", "for", "id", "label", "name", "pattern", "placeholder", "role", "summary", "title", "value", "style", "xmlns"]), ot = "http://www.w3.org/1998/Math/MathML", ct = "http://www.w3.org/2000/svg", fe = "http://www.w3.org/1999/xhtml";
701
- let Me = fe, Lt = !1, zt = null;
702
- const ps = R({}, [ot, ct, fe], Bt);
703
- let ut = R({}, ["mi", "mo", "mn", "ms", "mtext"]), ht = R({}, ["annotation-xml"]);
704
- const fs = R({}, ["title", "style", "font", "a", "script"]);
698
+ const gn = D({}, ["audio", "video", "img", "source", "image", "track"]);
699
+ let Lt = null;
700
+ const mn = D({}, ["alt", "class", "for", "id", "label", "name", "pattern", "placeholder", "role", "summary", "title", "value", "style", "xmlns"]), lt = "http://www.w3.org/1998/Math/MathML", ot = "http://www.w3.org/2000/svg", pe = "http://www.w3.org/1999/xhtml";
701
+ let Le = pe, zt = !1, Ot = null;
702
+ const ds = D({}, [lt, ot, pe], Ft);
703
+ let ct = D({}, ["mi", "mo", "mn", "ms", "mtext"]), ut = D({}, ["annotation-xml"]);
704
+ const fs = D({}, ["title", "style", "font", "a", "script"]);
705
705
  let We = null;
706
- const ds = ["application/xhtml+xml", "text/html"], gs = "text/html";
707
- let B = null, Le = null;
708
- const ms = e.createElement("form"), mn = /* @__PURE__ */ u(function(i) {
706
+ const gs = ["application/xhtml+xml", "text/html"], ms = "text/html";
707
+ let U = null, ze = null;
708
+ const xs = e.createElement("form"), xn = /* @__PURE__ */ u(function(i) {
709
709
  return i instanceof RegExp || i instanceof Function;
710
- }, "isRegexOrFunction"), Ot = /* @__PURE__ */ u(function() {
710
+ }, "isRegexOrFunction"), Nt = /* @__PURE__ */ u(function() {
711
711
  let i = arguments.length > 0 && arguments[0] !== void 0 ? arguments[0] : {};
712
- if (!(Le && Le === i)) {
713
- if ((!i || typeof i != "object") && (i = {}), i = le(i), We = // eslint-disable-next-line unicorn/prefer-includes
714
- ds.indexOf(i.PARSER_MEDIA_TYPE) === -1 ? gs : i.PARSER_MEDIA_TYPE, B = We === "application/xhtml+xml" ? Bt : xt, b = J(i, "ALLOWED_TAGS") ? R({}, i.ALLOWED_TAGS, B) : z, I = J(i, "ALLOWED_ATTR") ? R({}, i.ALLOWED_ATTR, B) : he, zt = J(i, "ALLOWED_NAMESPACES") ? R({}, i.ALLOWED_NAMESPACES, Bt) : ps, Mt = J(i, "ADD_URI_SAFE_ATTR") ? R(le(gn), i.ADD_URI_SAFE_ATTR, B) : gn, fn = J(i, "ADD_DATA_URI_TAGS") ? R(le(dn), i.ADD_DATA_URI_TAGS, B) : dn, ie = J(i, "FORBID_CONTENTS") ? R({}, i.FORBID_CONTENTS, B) : It, pe = J(i, "FORBID_TAGS") ? R({}, i.FORBID_TAGS, B) : le({}), rt = J(i, "FORBID_ATTR") ? R({}, i.FORBID_ATTR, B) : le({}), Ie = J(i, "USE_PROFILES") ? i.USE_PROFILES : !1, on = i.ALLOW_ARIA_ATTR !== !1, _t = i.ALLOW_DATA_ATTR !== !1, cn = i.ALLOW_UNKNOWN_PROTOCOLS || !1, un = i.ALLOW_SELF_CLOSE_IN_ATTR !== !1, De = i.SAFE_FOR_TEMPLATES || !1, it = i.SAFE_FOR_XML !== !1, ye = i.WHOLE_DOCUMENT || !1, Ce = i.RETURN_DOM || !1, at = i.RETURN_DOM_FRAGMENT || !1, lt = i.RETURN_TRUSTED_TYPE || !1, Dt = i.FORCE_BODY || !1, hn = i.SANITIZE_DOM !== !1, pn = i.SANITIZE_NAMED_PROPS || !1, Ct = i.KEEP_CONTENT !== !1, Ge = i.IN_PLACE || !1, _ = i.ALLOWED_URI_REGEXP || Qn, Me = i.NAMESPACE || fe, ut = i.MATHML_TEXT_INTEGRATION_POINTS || ut, ht = i.HTML_INTEGRATION_POINTS || ht, N = i.CUSTOM_ELEMENT_HANDLING || {}, i.CUSTOM_ELEMENT_HANDLING && mn(i.CUSTOM_ELEMENT_HANDLING.tagNameCheck) && (N.tagNameCheck = i.CUSTOM_ELEMENT_HANDLING.tagNameCheck), i.CUSTOM_ELEMENT_HANDLING && mn(i.CUSTOM_ELEMENT_HANDLING.attributeNameCheck) && (N.attributeNameCheck = i.CUSTOM_ELEMENT_HANDLING.attributeNameCheck), i.CUSTOM_ELEMENT_HANDLING && typeof i.CUSTOM_ELEMENT_HANDLING.allowCustomizedBuiltInElements == "boolean" && (N.allowCustomizedBuiltInElements = i.CUSTOM_ELEMENT_HANDLING.allowCustomizedBuiltInElements), De && (_t = !1), at && (Ce = !0), Ie && (b = R({}, Nn), I = mt(null), Ie.html === !0 && (R(b, On), R(I, Pn)), Ie.svg === !0 && (R(b, Ht), R(I, jt), R(I, ft)), Ie.svgFilters === !0 && (R(b, Gt), R(I, jt), R(I, ft)), Ie.mathMl === !0 && (R(b, Wt), R(I, $n), R(I, ft))), J(i, "ADD_TAGS") || (ke.tagCheck = null), J(i, "ADD_ATTR") || (ke.attributeCheck = null), i.ADD_TAGS && (typeof i.ADD_TAGS == "function" ? ke.tagCheck = i.ADD_TAGS : (b === z && (b = le(b)), R(b, i.ADD_TAGS, B))), i.ADD_ATTR && (typeof i.ADD_ATTR == "function" ? ke.attributeCheck = i.ADD_ATTR : (I === he && (I = le(I)), R(I, i.ADD_ATTR, B))), i.ADD_URI_SAFE_ATTR && R(Mt, i.ADD_URI_SAFE_ATTR, B), i.FORBID_CONTENTS && (ie === It && (ie = le(ie)), R(ie, i.FORBID_CONTENTS, B)), i.ADD_FORBID_CONTENTS && (ie === It && (ie = le(ie)), R(ie, i.ADD_FORBID_CONTENTS, B)), Ct && (b["#text"] = !0), ye && R(b, ["html", "head", "body"]), b.table && (R(b, ["tbody"]), delete pe.tbody), i.TRUSTED_TYPES_POLICY) {
712
+ if (!(ze && ze === i)) {
713
+ if ((!i || typeof i != "object") && (i = {}), i = oe(i), We = // eslint-disable-next-line unicorn/prefer-includes
714
+ gs.indexOf(i.PARSER_MEDIA_TYPE) === -1 ? ms : i.PARSER_MEDIA_TYPE, U = We === "application/xhtml+xml" ? Ft : xt, x = J(i, "ALLOWED_TAGS") ? D({}, i.ALLOWED_TAGS, U) : R, A = J(i, "ALLOWED_ATTR") ? D({}, i.ALLOWED_ATTR, U) : H, Ot = J(i, "ALLOWED_NAMESPACES") ? D({}, i.ALLOWED_NAMESPACES, Ft) : ds, Lt = J(i, "ADD_URI_SAFE_ATTR") ? D(oe(mn), i.ADD_URI_SAFE_ATTR, U) : mn, fn = J(i, "ADD_DATA_URI_TAGS") ? D(oe(gn), i.ADD_DATA_URI_TAGS, U) : gn, ae = J(i, "FORBID_CONTENTS") ? D({}, i.FORBID_CONTENTS, U) : Mt, ge = J(i, "FORBID_TAGS") ? D({}, i.FORBID_TAGS, U) : oe({}), me = J(i, "FORBID_ATTR") ? D({}, i.FORBID_ATTR, U) : oe({}), Me = J(i, "USE_PROFILES") ? i.USE_PROFILES : !1, cn = i.ALLOW_ARIA_ATTR !== !1, Rt = i.ALLOW_DATA_ATTR !== !1, un = i.ALLOW_UNKNOWN_PROTOCOLS || !1, hn = i.ALLOW_SELF_CLOSE_IN_ATTR !== !1, Ce = i.SAFE_FOR_TEMPLATES || !1, rt = i.SAFE_FOR_XML !== !1, ve = i.WHOLE_DOCUMENT || !1, Ie = i.RETURN_DOM || !1, it = i.RETURN_DOM_FRAGMENT || !1, at = i.RETURN_TRUSTED_TYPE || !1, Ct = i.FORCE_BODY || !1, pn = i.SANITIZE_DOM !== !1, dn = i.SANITIZE_NAMED_PROPS || !1, It = i.KEEP_CONTENT !== !1, Ge = i.IN_PLACE || !1, E = i.ALLOWED_URI_REGEXP || Jn, Le = i.NAMESPACE || pe, ct = i.MATHML_TEXT_INTEGRATION_POINTS || ct, ut = i.HTML_INTEGRATION_POINTS || ut, z = i.CUSTOM_ELEMENT_HANDLING || {}, i.CUSTOM_ELEMENT_HANDLING && xn(i.CUSTOM_ELEMENT_HANDLING.tagNameCheck) && (z.tagNameCheck = i.CUSTOM_ELEMENT_HANDLING.tagNameCheck), i.CUSTOM_ELEMENT_HANDLING && xn(i.CUSTOM_ELEMENT_HANDLING.attributeNameCheck) && (z.attributeNameCheck = i.CUSTOM_ELEMENT_HANDLING.attributeNameCheck), i.CUSTOM_ELEMENT_HANDLING && typeof i.CUSTOM_ELEMENT_HANDLING.allowCustomizedBuiltInElements == "boolean" && (z.allowCustomizedBuiltInElements = i.CUSTOM_ELEMENT_HANDLING.allowCustomizedBuiltInElements), Ce && (Rt = !1), it && (Ie = !0), Me && (x = D({}, Pn), A = mt(null), Me.html === !0 && (D(x, Nn), D(A, $n)), Me.svg === !0 && (D(x, Gt), D(A, qt), D(A, dt)), Me.svgFilters === !0 && (D(x, Wt), D(A, qt), D(A, dt)), Me.mathMl === !0 && (D(x, jt), D(A, Un), D(A, dt))), J(i, "ADD_TAGS") || (xe.tagCheck = null), J(i, "ADD_ATTR") || (xe.attributeCheck = null), i.ADD_TAGS && (typeof i.ADD_TAGS == "function" ? xe.tagCheck = i.ADD_TAGS : (x === R && (x = oe(x)), D(x, i.ADD_TAGS, U))), i.ADD_ATTR && (typeof i.ADD_ATTR == "function" ? xe.attributeCheck = i.ADD_ATTR : (A === H && (A = oe(A)), D(A, i.ADD_ATTR, U))), i.ADD_URI_SAFE_ATTR && D(Lt, i.ADD_URI_SAFE_ATTR, U), i.FORBID_CONTENTS && (ae === Mt && (ae = oe(ae)), D(ae, i.FORBID_CONTENTS, U)), i.ADD_FORBID_CONTENTS && (ae === Mt && (ae = oe(ae)), D(ae, i.ADD_FORBID_CONTENTS, U)), It && (x["#text"] = !0), ve && D(x, ["html", "head", "body"]), x.table && (D(x, ["tbody"]), delete ge.tbody), i.TRUSTED_TYPES_POLICY) {
715
715
  if (typeof i.TRUSTED_TYPES_POLICY.createHTML != "function")
716
716
  throw Ve('TRUSTED_TYPES_POLICY configuration option must provide a "createHTML" hook.');
717
717
  if (typeof i.TRUSTED_TYPES_POLICY.createScriptURL != "function")
718
718
  throw Ve('TRUSTED_TYPES_POLICY configuration option must provide a "createScriptURL" hook.');
719
- U = i.TRUSTED_TYPES_POLICY, q = U.createHTML("");
719
+ P = i.TRUSTED_TYPES_POLICY, he = P.createHTML("");
720
720
  } else
721
- U === void 0 && (U = ar(m, s)), U !== null && typeof q == "string" && (q = U.createHTML(""));
722
- Z && Z(i), Le = i;
721
+ P === void 0 && (P = ir(f, s)), P !== null && typeof he == "string" && (he = P.createHTML(""));
722
+ X && X(i), ze = i;
723
723
  }
724
- }, "_parseConfig"), xn = R({}, [...Ht, ...Gt, ...Zs]), kn = R({}, [...Wt, ...Xs]), xs = /* @__PURE__ */ u(function(i) {
725
- let h = te(i);
724
+ }, "_parseConfig"), bn = D({}, [...Gt, ...Wt, ...Ys]), kn = D({}, [...jt, ...Zs]), bs = /* @__PURE__ */ u(function(i) {
725
+ let h = ne(i);
726
726
  (!h || !h.tagName) && (h = {
727
- namespaceURI: Me,
727
+ namespaceURI: Le,
728
728
  tagName: "template"
729
729
  });
730
- const x = xt(i.tagName), P = xt(h.tagName);
731
- return zt[i.namespaceURI] ? i.namespaceURI === ct ? h.namespaceURI === fe ? x === "svg" : h.namespaceURI === ot ? x === "svg" && (P === "annotation-xml" || ut[P]) : !!xn[x] : i.namespaceURI === ot ? h.namespaceURI === fe ? x === "math" : h.namespaceURI === ct ? x === "math" && ht[P] : !!kn[x] : i.namespaceURI === fe ? h.namespaceURI === ct && !ht[P] || h.namespaceURI === ot && !ut[P] ? !1 : !kn[x] && (fs[x] || !xn[x]) : !!(We === "application/xhtml+xml" && zt[i.namespaceURI]) : !1;
732
- }, "_checkValidNamespace"), ae = /* @__PURE__ */ u(function(i) {
730
+ const b = xt(i.tagName), N = xt(h.tagName);
731
+ return Ot[i.namespaceURI] ? i.namespaceURI === ot ? h.namespaceURI === pe ? b === "svg" : h.namespaceURI === lt ? b === "svg" && (N === "annotation-xml" || ct[N]) : !!bn[b] : i.namespaceURI === lt ? h.namespaceURI === pe ? b === "math" : h.namespaceURI === ot ? b === "math" && ut[N] : !!kn[b] : i.namespaceURI === pe ? h.namespaceURI === ot && !ut[N] || h.namespaceURI === lt && !ct[N] ? !1 : !kn[b] && (fs[b] || !bn[b]) : !!(We === "application/xhtml+xml" && Ot[i.namespaceURI]) : !1;
732
+ }, "_checkValidNamespace"), le = /* @__PURE__ */ u(function(i) {
733
733
  je(t.removed, {
734
734
  element: i
735
735
  });
736
736
  try {
737
- te(i).removeChild(i);
737
+ ne(i).removeChild(i);
738
738
  } catch {
739
739
  O(i);
740
740
  }
741
- }, "_forceRemove"), Te = /* @__PURE__ */ u(function(i, h) {
741
+ }, "_forceRemove"), ye = /* @__PURE__ */ u(function(i, h) {
742
742
  try {
743
743
  je(t.removed, {
744
744
  attribute: h.getAttributeNode(i),
@@ -751,9 +751,9 @@ function es() {
751
751
  });
752
752
  }
753
753
  if (h.removeAttribute(i), i === "is")
754
- if (Ce || at)
754
+ if (Ie || it)
755
755
  try {
756
- ae(h);
756
+ le(h);
757
757
  } catch {
758
758
  }
759
759
  else
@@ -761,99 +761,99 @@ function es() {
761
761
  h.setAttribute(i, "");
762
762
  } catch {
763
763
  }
764
- }, "_removeAttribute"), bn = /* @__PURE__ */ u(function(i) {
765
- let h = null, x = null;
766
- if (Dt)
764
+ }, "_removeAttribute"), wn = /* @__PURE__ */ u(function(i) {
765
+ let h = null, b = null;
766
+ if (Ct)
767
767
  i = "<remove></remove>" + i;
768
768
  else {
769
- const $ = Ft(i, /^[\r\n\t ]+/);
770
- x = $ && $[0];
769
+ const $ = Ht(i, /^[\r\n\t ]+/);
770
+ b = $ && $[0];
771
771
  }
772
- We === "application/xhtml+xml" && Me === fe && (i = '<html xmlns="http://www.w3.org/1999/xhtml"><head></head><body>' + i + "</body></html>");
773
- const P = U ? U.createHTML(i) : i;
774
- if (Me === fe)
772
+ We === "application/xhtml+xml" && Le === pe && (i = '<html xmlns="http://www.w3.org/1999/xhtml"><head></head><body>' + i + "</body></html>");
773
+ const N = P ? P.createHTML(i) : i;
774
+ if (Le === pe)
775
775
  try {
776
- h = new g().parseFromString(P, We);
776
+ h = new m().parseFromString(N, We);
777
777
  } catch {
778
778
  }
779
779
  if (!h || !h.documentElement) {
780
- h = ne.createDocument(Me, "template", null);
780
+ h = q.createDocument(Le, "template", null);
781
781
  try {
782
- h.documentElement.innerHTML = Lt ? q : P;
782
+ h.documentElement.innerHTML = zt ? he : N;
783
783
  } catch {
784
784
  }
785
785
  }
786
786
  const j = h.body || h.documentElement;
787
- return i && x && j.insertBefore(e.createTextNode(x), j.childNodes[0] || null), Me === fe ? nt.call(h, ye ? "html" : "body")[0] : ye ? h.documentElement : j;
788
- }, "_initDocument"), wn = /* @__PURE__ */ u(function(i) {
789
- return ue.call(
787
+ return i && b && j.insertBefore(e.createTextNode(b), j.childNodes[0] || null), Le === pe ? tt.call(h, ve ? "html" : "body")[0] : ve ? h.documentElement : j;
788
+ }, "_initDocument"), vn = /* @__PURE__ */ u(function(i) {
789
+ return se.call(
790
790
  i.ownerDocument || i,
791
791
  i,
792
792
  // eslint-disable-next-line no-bitwise
793
- f.SHOW_ELEMENT | f.SHOW_COMMENT | f.SHOW_TEXT | f.SHOW_PROCESSING_INSTRUCTION | f.SHOW_CDATA_SECTION,
793
+ d.SHOW_ELEMENT | d.SHOW_COMMENT | d.SHOW_TEXT | d.SHOW_PROCESSING_INSTRUCTION | d.SHOW_CDATA_SECTION,
794
794
  null
795
795
  );
796
- }, "_createNodeIterator"), Nt = /* @__PURE__ */ u(function(i) {
797
- return i instanceof p && (typeof i.nodeName != "string" || typeof i.textContent != "string" || typeof i.removeChild != "function" || !(i.attributes instanceof d) || typeof i.removeAttribute != "function" || typeof i.setAttribute != "function" || typeof i.namespaceURI != "string" || typeof i.insertBefore != "function" || typeof i.hasChildNodes != "function");
798
- }, "_isClobbered"), vn = /* @__PURE__ */ u(function(i) {
796
+ }, "_createNodeIterator"), Pt = /* @__PURE__ */ u(function(i) {
797
+ return i instanceof p && (typeof i.nodeName != "string" || typeof i.textContent != "string" || typeof i.removeChild != "function" || !(i.attributes instanceof g) || typeof i.removeAttribute != "function" || typeof i.setAttribute != "function" || typeof i.namespaceURI != "string" || typeof i.insertBefore != "function" || typeof i.hasChildNodes != "function");
798
+ }, "_isClobbered"), yn = /* @__PURE__ */ u(function(i) {
799
799
  return typeof o == "function" && i instanceof o;
800
800
  }, "_isNode");
801
- function de(k, i, h) {
802
- pt(k, (x) => {
803
- x.call(t, i, h, Le);
801
+ function de(w, i, h) {
802
+ pt(w, (b) => {
803
+ b.call(t, i, h, ze);
804
804
  });
805
805
  }
806
806
  u(de, "_executeHooks");
807
- const yn = /* @__PURE__ */ u(function(i) {
807
+ const Tn = /* @__PURE__ */ u(function(i) {
808
808
  let h = null;
809
- if (de(F.beforeSanitizeElements, i, null), Nt(i))
810
- return ae(i), !0;
811
- const x = B(i.nodeName);
809
+ if (de(F.beforeSanitizeElements, i, null), Pt(i))
810
+ return le(i), !0;
811
+ const b = U(i.nodeName);
812
812
  if (de(F.uponSanitizeElement, i, {
813
- tagName: x,
814
- allowedTags: b
815
- }), it && i.hasChildNodes() && !vn(i.firstElementChild) && V(/<[/\w!]/g, i.innerHTML) && V(/<[/\w!]/g, i.textContent) || i.nodeType === Ze.progressingInstruction || it && i.nodeType === Ze.comment && V(/<[/\w]/g, i.data))
816
- return ae(i), !0;
817
- if (!(ke.tagCheck instanceof Function && ke.tagCheck(x)) && (!b[x] || pe[x])) {
818
- if (!pe[x] && Sn(x) && (N.tagNameCheck instanceof RegExp && V(N.tagNameCheck, x) || N.tagNameCheck instanceof Function && N.tagNameCheck(x)))
813
+ tagName: b,
814
+ allowedTags: x
815
+ }), rt && i.hasChildNodes() && !yn(i.firstElementChild) && V(/<[/\w!]/g, i.innerHTML) && V(/<[/\w!]/g, i.textContent) || i.nodeType === Ze.progressingInstruction || rt && i.nodeType === Ze.comment && V(/<[/\w]/g, i.data))
816
+ return le(i), !0;
817
+ if (!(xe.tagCheck instanceof Function && xe.tagCheck(b)) && (!x[b] || ge[b])) {
818
+ if (!ge[b] && An(b) && (z.tagNameCheck instanceof RegExp && V(z.tagNameCheck, b) || z.tagNameCheck instanceof Function && z.tagNameCheck(b)))
819
819
  return !1;
820
- if (Ct && !ie[x]) {
821
- const P = te(i) || i.parentNode, j = xe(i) || i.childNodes;
822
- if (j && P) {
820
+ if (It && !ae[b]) {
821
+ const N = ne(i) || i.parentNode, j = Re(i) || i.childNodes;
822
+ if (j && N) {
823
823
  const $ = j.length;
824
- for (let K = $ - 1; K >= 0; --K) {
825
- const ge = S(j[K], !0);
826
- ge.__removalCount = (i.__removalCount || 0) + 1, P.insertBefore(ge, me(i));
824
+ for (let Q = $ - 1; Q >= 0; --Q) {
825
+ const fe = _(j[Q], !0);
826
+ fe.__removalCount = (i.__removalCount || 0) + 1, N.insertBefore(fe, ee(i));
827
827
  }
828
828
  }
829
829
  }
830
- return ae(i), !0;
830
+ return le(i), !0;
831
831
  }
832
- return i instanceof c && !xs(i) || (x === "noscript" || x === "noembed" || x === "noframes") && V(/<\/no(script|embed|frames)/i, i.innerHTML) ? (ae(i), !0) : (De && i.nodeType === Ze.text && (h = i.textContent, pt([Be, L, Fe], (P) => {
833
- h = qe(h, P, " ");
832
+ return i instanceof c && !bs(i) || (b === "noscript" || b === "noembed" || b === "noframes") && V(/<\/no(script|embed|frames)/i, i.innerHTML) ? (le(i), !0) : (Ce && i.nodeType === Ze.text && (h = i.textContent, pt([De, Fe, M], (N) => {
833
+ h = qe(h, N, " ");
834
834
  }), i.textContent !== h && (je(t.removed, {
835
835
  element: i.cloneNode()
836
836
  }), i.textContent = h)), de(F.afterSanitizeElements, i, null), !1);
837
- }, "_sanitizeElements"), Tn = /* @__PURE__ */ u(function(i, h, x) {
838
- if (rt[h] || hn && (h === "id" || h === "name") && (x in e || x in ms))
837
+ }, "_sanitizeElements"), Sn = /* @__PURE__ */ u(function(i, h, b) {
838
+ if (me[h] || pn && (h === "id" || h === "name") && (b in e || b in xs))
839
839
  return !1;
840
- if (!(_t && !rt[h] && V(At, h))) {
841
- if (!(on && V(Et, h))) {
842
- if (!(ke.attributeCheck instanceof Function && ke.attributeCheck(h, i))) {
843
- if (!I[h] || rt[h]) {
840
+ if (!(Rt && !me[h] && V(At, h))) {
841
+ if (!(cn && V(Et, h))) {
842
+ if (!(xe.attributeCheck instanceof Function && xe.attributeCheck(h, i))) {
843
+ if (!A[h] || me[h]) {
844
844
  if (
845
845
  // First condition does a very basic check if a) it's basically a valid custom element tagname AND
846
846
  // b) if the tagName passes whatever the user has configured for CUSTOM_ELEMENT_HANDLING.tagNameCheck
847
847
  // and c) if the attribute name passes whatever the user has configured for CUSTOM_ELEMENT_HANDLING.attributeNameCheck
848
- !(Sn(i) && (N.tagNameCheck instanceof RegExp && V(N.tagNameCheck, i) || N.tagNameCheck instanceof Function && N.tagNameCheck(i)) && (N.attributeNameCheck instanceof RegExp && V(N.attributeNameCheck, h) || N.attributeNameCheck instanceof Function && N.attributeNameCheck(h, i)) || // Alternative, second condition checks if it's an `is`-attribute, AND
848
+ !(An(i) && (z.tagNameCheck instanceof RegExp && V(z.tagNameCheck, i) || z.tagNameCheck instanceof Function && z.tagNameCheck(i)) && (z.attributeNameCheck instanceof RegExp && V(z.attributeNameCheck, h) || z.attributeNameCheck instanceof Function && z.attributeNameCheck(h, i)) || // Alternative, second condition checks if it's an `is`-attribute, AND
849
849
  // the value passes whatever the user has configured for CUSTOM_ELEMENT_HANDLING.tagNameCheck
850
- h === "is" && N.allowCustomizedBuiltInElements && (N.tagNameCheck instanceof RegExp && V(N.tagNameCheck, x) || N.tagNameCheck instanceof Function && N.tagNameCheck(x)))
850
+ h === "is" && z.allowCustomizedBuiltInElements && (z.tagNameCheck instanceof RegExp && V(z.tagNameCheck, b) || z.tagNameCheck instanceof Function && z.tagNameCheck(b)))
851
851
  ) return !1;
852
- } else if (!Mt[h]) {
853
- if (!V(_, qe(x, He, ""))) {
854
- if (!((h === "src" || h === "xlink:href" || h === "href") && i !== "script" && js(x, "data:") === 0 && fn[i])) {
855
- if (!(cn && !V(st, qe(x, He, "")))) {
856
- if (x)
852
+ } else if (!Lt[h]) {
853
+ if (!V(E, qe(b, He, ""))) {
854
+ if (!((h === "src" || h === "xlink:href" || h === "href") && i !== "script" && Ws(b, "data:") === 0 && fn[i])) {
855
+ if (!(un && !V(_t, qe(b, He, "")))) {
856
+ if (b)
857
857
  return !1;
858
858
  }
859
859
  }
@@ -863,205 +863,205 @@ function es() {
863
863
  }
864
864
  }
865
865
  return !0;
866
- }, "_isValidAttribute"), Sn = /* @__PURE__ */ u(function(i) {
867
- return i !== "annotation-xml" && Ft(i, E);
868
- }, "_isBasicCustomElement"), An = /* @__PURE__ */ u(function(i) {
866
+ }, "_isValidAttribute"), An = /* @__PURE__ */ u(function(i) {
867
+ return i !== "annotation-xml" && Ht(i, st);
868
+ }, "_isBasicCustomElement"), En = /* @__PURE__ */ u(function(i) {
869
869
  de(F.beforeSanitizeAttributes, i, null);
870
870
  const {
871
871
  attributes: h
872
872
  } = i;
873
- if (!h || Nt(i))
873
+ if (!h || Pt(i))
874
874
  return;
875
- const x = {
875
+ const b = {
876
876
  attrName: "",
877
877
  attrValue: "",
878
878
  keepAttr: !0,
879
- allowedAttributes: I,
879
+ allowedAttributes: A,
880
880
  forceKeepAttr: void 0
881
881
  };
882
- let P = h.length;
883
- for (; P--; ) {
884
- const j = h[P], {
882
+ let N = h.length;
883
+ for (; N--; ) {
884
+ const j = h[N], {
885
885
  name: $,
886
- namespaceURI: K,
887
- value: ge
888
- } = j, ze = B($), Pt = ge;
889
- let G = $ === "value" ? Pt : qs(Pt);
890
- if (x.attrName = ze, x.attrValue = G, x.keepAttr = !0, x.forceKeepAttr = void 0, de(F.uponSanitizeAttribute, i, x), G = x.attrValue, pn && (ze === "id" || ze === "name") && (Te($, i), G = hs + G), it && V(/((--!?|])>)|<\/(style|script|title|xmp|textarea|noscript|iframe|noembed|noframes)/i, G)) {
891
- Te($, i);
886
+ namespaceURI: Q,
887
+ value: fe
888
+ } = j, Oe = U($), $t = fe;
889
+ let G = $ === "value" ? $t : js($t);
890
+ if (b.attrName = Oe, b.attrValue = G, b.keepAttr = !0, b.forceKeepAttr = void 0, de(F.uponSanitizeAttribute, i, b), G = b.attrValue, dn && (Oe === "id" || Oe === "name") && (ye($, i), G = ps + G), rt && V(/((--!?|])>)|<\/(style|script|title|xmp|textarea|noscript|iframe|noembed|noframes)/i, G)) {
891
+ ye($, i);
892
892
  continue;
893
893
  }
894
- if (ze === "attributename" && Ft(G, "href")) {
895
- Te($, i);
894
+ if (Oe === "attributename" && Ht(G, "href")) {
895
+ ye($, i);
896
896
  continue;
897
897
  }
898
- if (x.forceKeepAttr)
898
+ if (b.forceKeepAttr)
899
899
  continue;
900
- if (!x.keepAttr) {
901
- Te($, i);
900
+ if (!b.keepAttr) {
901
+ ye($, i);
902
902
  continue;
903
903
  }
904
- if (!un && V(/\/>/i, G)) {
905
- Te($, i);
904
+ if (!hn && V(/\/>/i, G)) {
905
+ ye($, i);
906
906
  continue;
907
907
  }
908
- De && pt([Be, L, Fe], (_n) => {
909
- G = qe(G, _n, " ");
908
+ Ce && pt([De, Fe, M], (Rn) => {
909
+ G = qe(G, Rn, " ");
910
910
  });
911
- const En = B(i.nodeName);
912
- if (!Tn(En, ze, G)) {
913
- Te($, i);
911
+ const _n = U(i.nodeName);
912
+ if (!Sn(_n, Oe, G)) {
913
+ ye($, i);
914
914
  continue;
915
915
  }
916
- if (U && typeof m == "object" && typeof m.getAttributeType == "function" && !K)
917
- switch (m.getAttributeType(En, ze)) {
916
+ if (P && typeof f == "object" && typeof f.getAttributeType == "function" && !Q)
917
+ switch (f.getAttributeType(_n, Oe)) {
918
918
  case "TrustedHTML": {
919
- G = U.createHTML(G);
919
+ G = P.createHTML(G);
920
920
  break;
921
921
  }
922
922
  case "TrustedScriptURL": {
923
- G = U.createScriptURL(G);
923
+ G = P.createScriptURL(G);
924
924
  break;
925
925
  }
926
926
  }
927
- if (G !== Pt)
927
+ if (G !== $t)
928
928
  try {
929
- K ? i.setAttributeNS(K, $, G) : i.setAttribute($, G), Nt(i) ? ae(i) : zn(t.removed);
929
+ Q ? i.setAttributeNS(Q, $, G) : i.setAttribute($, G), Pt(i) ? le(i) : On(t.removed);
930
930
  } catch {
931
- Te($, i);
931
+ ye($, i);
932
932
  }
933
933
  }
934
934
  de(F.afterSanitizeAttributes, i, null);
935
- }, "_sanitizeAttributes"), ks = /* @__PURE__ */ u(function k(i) {
935
+ }, "_sanitizeAttributes"), ks = /* @__PURE__ */ u(function w(i) {
936
936
  let h = null;
937
- const x = wn(i);
938
- for (de(F.beforeSanitizeShadowDOM, i, null); h = x.nextNode(); )
939
- de(F.uponSanitizeShadowNode, h, null), yn(h), An(h), h.content instanceof r && k(h.content);
937
+ const b = vn(i);
938
+ for (de(F.beforeSanitizeShadowDOM, i, null); h = b.nextNode(); )
939
+ de(F.uponSanitizeShadowNode, h, null), Tn(h), En(h), h.content instanceof r && w(h.content);
940
940
  de(F.afterSanitizeShadowDOM, i, null);
941
941
  }, "_sanitizeShadowDOM");
942
- return t.sanitize = function(k) {
943
- let i = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : {}, h = null, x = null, P = null, j = null;
944
- if (Lt = !k, Lt && (k = "<!-->"), typeof k != "string" && !vn(k))
945
- if (typeof k.toString == "function") {
946
- if (k = k.toString(), typeof k != "string")
942
+ return t.sanitize = function(w) {
943
+ let i = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : {}, h = null, b = null, N = null, j = null;
944
+ if (zt = !w, zt && (w = "<!-->"), typeof w != "string" && !yn(w))
945
+ if (typeof w.toString == "function") {
946
+ if (w = w.toString(), typeof w != "string")
947
947
  throw Ve("dirty is not a string, aborting");
948
948
  } else
949
949
  throw Ve("toString is not a function");
950
950
  if (!t.isSupported)
951
- return k;
952
- if (Rt || Ot(i), t.removed = [], typeof k == "string" && (Ge = !1), Ge) {
953
- if (k.nodeName) {
954
- const ge = B(k.nodeName);
955
- if (!b[ge] || pe[ge])
951
+ return w;
952
+ if (Dt || Nt(i), t.removed = [], typeof w == "string" && (Ge = !1), Ge) {
953
+ if (w.nodeName) {
954
+ const fe = U(w.nodeName);
955
+ if (!x[fe] || ge[fe])
956
956
  throw Ve("root node is forbidden and cannot be sanitized in-place");
957
957
  }
958
- } else if (k instanceof o)
959
- h = bn("<!---->"), x = h.ownerDocument.importNode(k, !0), x.nodeType === Ze.element && x.nodeName === "BODY" || x.nodeName === "HTML" ? h = x : h.appendChild(x);
958
+ } else if (w instanceof o)
959
+ h = wn("<!---->"), b = h.ownerDocument.importNode(w, !0), b.nodeType === Ze.element && b.nodeName === "BODY" || b.nodeName === "HTML" ? h = b : h.appendChild(b);
960
960
  else {
961
- if (!Ce && !De && !ye && // eslint-disable-next-line unicorn/prefer-includes
962
- k.indexOf("<") === -1)
963
- return U && lt ? U.createHTML(k) : k;
964
- if (h = bn(k), !h)
965
- return Ce ? null : lt ? q : "";
961
+ if (!Ie && !Ce && !ve && // eslint-disable-next-line unicorn/prefer-includes
962
+ w.indexOf("<") === -1)
963
+ return P && at ? P.createHTML(w) : w;
964
+ if (h = wn(w), !h)
965
+ return Ie ? null : at ? he : "";
966
966
  }
967
- h && Dt && ae(h.firstChild);
968
- const $ = wn(Ge ? k : h);
969
- for (; P = $.nextNode(); )
970
- yn(P), An(P), P.content instanceof r && ks(P.content);
967
+ h && Ct && le(h.firstChild);
968
+ const $ = vn(Ge ? w : h);
969
+ for (; N = $.nextNode(); )
970
+ Tn(N), En(N), N.content instanceof r && ks(N.content);
971
971
  if (Ge)
972
- return k;
973
- if (Ce) {
974
- if (at)
975
- for (j = tt.call(h.ownerDocument); h.firstChild; )
972
+ return w;
973
+ if (Ie) {
974
+ if (it)
975
+ for (j = St.call(h.ownerDocument); h.firstChild; )
976
976
  j.appendChild(h.firstChild);
977
977
  else
978
978
  j = h;
979
- return (I.shadowroot || I.shadowrootmode) && (j = St.call(n, j, !0)), j;
979
+ return (A.shadowroot || A.shadowrootmode) && (j = nt.call(n, j, !0)), j;
980
980
  }
981
- let K = ye ? h.outerHTML : h.innerHTML;
982
- return ye && b["!doctype"] && h.ownerDocument && h.ownerDocument.doctype && h.ownerDocument.doctype.name && V(Jn, h.ownerDocument.doctype.name) && (K = "<!DOCTYPE " + h.ownerDocument.doctype.name + `>
983
- ` + K), De && pt([Be, L, Fe], (ge) => {
984
- K = qe(K, ge, " ");
985
- }), U && lt ? U.createHTML(K) : K;
981
+ let Q = ve ? h.outerHTML : h.innerHTML;
982
+ return ve && x["!doctype"] && h.ownerDocument && h.ownerDocument.doctype && h.ownerDocument.doctype.name && V(es, h.ownerDocument.doctype.name) && (Q = "<!DOCTYPE " + h.ownerDocument.doctype.name + `>
983
+ ` + Q), Ce && pt([De, Fe, M], (fe) => {
984
+ Q = qe(Q, fe, " ");
985
+ }), P && at ? P.createHTML(Q) : Q;
986
986
  }, t.setConfig = function() {
987
- let k = arguments.length > 0 && arguments[0] !== void 0 ? arguments[0] : {};
988
- Ot(k), Rt = !0;
987
+ let w = arguments.length > 0 && arguments[0] !== void 0 ? arguments[0] : {};
988
+ Nt(w), Dt = !0;
989
989
  }, t.clearConfig = function() {
990
- Le = null, Rt = !1;
991
- }, t.isValidAttribute = function(k, i, h) {
992
- Le || Ot({});
993
- const x = B(k), P = B(i);
994
- return Tn(x, P, h);
995
- }, t.addHook = function(k, i) {
996
- typeof i == "function" && je(F[k], i);
997
- }, t.removeHook = function(k, i) {
990
+ ze = null, Dt = !1;
991
+ }, t.isValidAttribute = function(w, i, h) {
992
+ ze || Nt({});
993
+ const b = U(w), N = U(i);
994
+ return Sn(b, N, h);
995
+ }, t.addHook = function(w, i) {
996
+ typeof i == "function" && je(F[w], i);
997
+ }, t.removeHook = function(w, i) {
998
998
  if (i !== void 0) {
999
- const h = Gs(F[k], i);
1000
- return h === -1 ? void 0 : Ws(F[k], h, 1)[0];
999
+ const h = Hs(F[w], i);
1000
+ return h === -1 ? void 0 : Gs(F[w], h, 1)[0];
1001
1001
  }
1002
- return zn(F[k]);
1003
- }, t.removeHooks = function(k) {
1004
- F[k] = [];
1002
+ return On(F[w]);
1003
+ }, t.removeHooks = function(w) {
1004
+ F[w] = [];
1005
1005
  }, t.removeAllHooks = function() {
1006
- F = Bn();
1006
+ F = Fn();
1007
1007
  }, t;
1008
1008
  }
1009
- u(es, "createDOMPurify");
1010
- var lr = es();
1011
- function Kt() {
1009
+ u(ts, "createDOMPurify");
1010
+ var ar = ts();
1011
+ function Qt() {
1012
1012
  return { async: !1, breaks: !1, extensions: null, gfm: !0, hooks: null, pedantic: !1, renderer: null, silent: !1, tokenizer: null, walkTokens: null };
1013
1013
  }
1014
- u(Kt, "M");
1015
- var Re = Kt();
1016
- function ts(l) {
1017
- Re = l;
1014
+ u(Qt, "M");
1015
+ var _e = Qt();
1016
+ function ns(l) {
1017
+ _e = l;
1018
1018
  }
1019
- u(ts, "G");
1020
- var Ae = { exec: /* @__PURE__ */ u(() => null, "exec") };
1021
- function C(l, t = "") {
1019
+ u(ns, "G");
1020
+ var Se = { exec: /* @__PURE__ */ u(() => null, "exec") };
1021
+ function I(l, t = "") {
1022
1022
  let e = typeof l == "string" ? l : l.source, n = { replace: /* @__PURE__ */ u((s, r) => {
1023
1023
  let a = typeof r == "string" ? r : r.source;
1024
- return a = a.replace(Y.caret, "$1"), e = e.replace(s, a), n;
1024
+ return a = a.replace(Z.caret, "$1"), e = e.replace(s, a), n;
1025
1025
  }, "replace"), getRegex: /* @__PURE__ */ u(() => new RegExp(e, t), "getRegex") };
1026
1026
  return n;
1027
1027
  }
1028
- u(C, "k");
1029
- var or = (() => {
1028
+ u(I, "k");
1029
+ var lr = (() => {
1030
1030
  try {
1031
1031
  return !!new RegExp("(?<=1)(?<!1)");
1032
1032
  } catch {
1033
1033
  return !1;
1034
1034
  }
1035
- })(), Y = { codeRemoveIndent: /^(?: {1,4}| {0,3}\t)/gm, outputLinkReplace: /\\([\[\]])/g, indentCodeCompensation: /^(\s+)(?:```)/, beginningSpace: /^\s+/, endingHash: /#$/, startingSpaceChar: /^ /, endingSpaceChar: / $/, nonSpaceChar: /[^ ]/, newLineCharGlobal: /\n/g, tabCharGlobal: /\t/g, multipleSpaceGlobal: /\s+/g, blankLine: /^[ \t]*$/, doubleBlankLine: /\n[ \t]*\n[ \t]*$/, blockquoteStart: /^ {0,3}>/, blockquoteSetextReplace: /\n {0,3}((?:=+|-+) *)(?=\n|$)/g, blockquoteSetextReplace2: /^ {0,3}>[ \t]?/gm, listReplaceNesting: /^ {1,4}(?=( {4})*[^ ])/g, listIsTask: /^\[[ xX]\] +\S/, listReplaceTask: /^\[[ xX]\] +/, listTaskCheckbox: /\[[ xX]\]/, anyLine: /\n.*\n/, hrefBrackets: /^<(.*)>$/, tableDelimiter: /[:|]/, tableAlignChars: /^\||\| *$/g, tableRowBlankLine: /\n[ \t]*$/, tableAlignRight: /^ *-+: *$/, tableAlignCenter: /^ *:-+: *$/, tableAlignLeft: /^ *:-+ *$/, startATag: /^<a /i, endATag: /^<\/a>/i, startPreScriptTag: /^<(pre|code|kbd|script)(\s|>)/i, endPreScriptTag: /^<\/(pre|code|kbd|script)(\s|>)/i, startAngleBracket: /^</, endAngleBracket: />$/, pedanticHrefTitle: /^([^'"]*[^\s])\s+(['"])(.*)\2/, unicodeAlphaNumeric: /[\p{L}\p{N}]/u, escapeTest: /[&<>"']/, escapeReplace: /[&<>"']/g, escapeTestNoEncode: /[<>"']|&(?!(#\d{1,7}|#[Xx][a-fA-F0-9]{1,6}|\w+);)/, escapeReplaceNoEncode: /[<>"']|&(?!(#\d{1,7}|#[Xx][a-fA-F0-9]{1,6}|\w+);)/g, caret: /(^|[^\[])\^/g, percentDecode: /%25/g, findPipe: /\|/g, splitPipe: / \|/, slashPipe: /\\\|/g, carriageReturn: /\r\n|\r/g, spaceLine: /^ +$/gm, notSpaceStart: /^\S*/, endingNewline: /\n$/, listItemRegex: /* @__PURE__ */ u((l) => new RegExp(`^( {0,3}${l})((?:[ ][^\\n]*)?(?:\\n|$))`), "listItemRegex"), nextBulletRegex: /* @__PURE__ */ u((l) => new RegExp(`^ {0,${Math.min(3, l - 1)}}(?:[*+-]|\\d{1,9}[.)])((?:[ ][^\\n]*)?(?:\\n|$))`), "nextBulletRegex"), hrRegex: /* @__PURE__ */ u((l) => new RegExp(`^ {0,${Math.min(3, l - 1)}}((?:- *){3,}|(?:_ *){3,}|(?:\\* *){3,})(?:\\n+|$)`), "hrRegex"), fencesBeginRegex: /* @__PURE__ */ u((l) => new RegExp(`^ {0,${Math.min(3, l - 1)}}(?:\`\`\`|~~~)`), "fencesBeginRegex"), headingBeginRegex: /* @__PURE__ */ u((l) => new RegExp(`^ {0,${Math.min(3, l - 1)}}#`), "headingBeginRegex"), htmlBeginRegex: /* @__PURE__ */ u((l) => new RegExp(`^ {0,${Math.min(3, l - 1)}}<(?:[a-z].*>|!--)`, "i"), "htmlBeginRegex"), blockquoteBeginRegex: /* @__PURE__ */ u((l) => new RegExp(`^ {0,${Math.min(3, l - 1)}}>`), "blockquoteBeginRegex") }, cr = /^(?:[ \t]*(?:\n|$))+/, ur = /^((?: {4}| {0,3}\t)[^\n]+(?:\n(?:[ \t]*(?:\n|$))*)?)+/, hr = /^ {0,3}(`{3,}(?=[^`\n]*(?:\n|$))|~{3,})([^\n]*)(?:\n|$)(?:|([\s\S]*?)(?:\n|$))(?: {0,3}\1[~`]* *(?=\n|$)|$)/, et = /^ {0,3}((?:-[\t ]*){3,}|(?:_[ \t]*){3,}|(?:\*[ \t]*){3,})(?:\n+|$)/, pr = /^ {0,3}(#{1,6})(?=\s|$)(.*)(?:\n+|$)/, Qt = / {0,3}(?:[*+-]|\d{1,9}[.)])/, ns = /^(?!bull |blockCode|fences|blockquote|heading|html|table)((?:.|\n(?!\s*?\n|bull |blockCode|fences|blockquote|heading|html|table))+?)\n {0,3}(=+|-+) *(?:\n+|$)/, ss = C(ns).replace(/bull/g, Qt).replace(/blockCode/g, /(?: {4}| {0,3}\t)/).replace(/fences/g, / {0,3}(?:`{3,}|~{3,})/).replace(/blockquote/g, / {0,3}>/).replace(/heading/g, / {0,3}#{1,6}/).replace(/html/g, / {0,3}<[^\n>]+>\n/).replace(/\|table/g, "").getRegex(), fr = C(ns).replace(/bull/g, Qt).replace(/blockCode/g, /(?: {4}| {0,3}\t)/).replace(/fences/g, / {0,3}(?:`{3,}|~{3,})/).replace(/blockquote/g, / {0,3}>/).replace(/heading/g, / {0,3}#{1,6}/).replace(/html/g, / {0,3}<[^\n>]+>\n/).replace(/table/g, / {0,3}\|?(?:[:\- ]*\|)+[\:\- ]*\n/).getRegex(), Jt = /^([^\n]+(?:\n(?!hr|heading|lheading|blockquote|fences|list|html|table| +\n)[^\n]+)*)/, dr = /^[^\n]+/, en = /(?!\s*\])(?:\\[\s\S]|[^\[\]\\])+/, gr = C(/^ {0,3}\[(label)\]: *(?:\n[ \t]*)?([^<\s][^\s]*|<.*?>)(?:(?: +(?:\n[ \t]*)?| *\n[ \t]*)(title))? *(?:\n+|$)/).replace("label", en).replace("title", /(?:"(?:\\"?|[^"\\])*"|'[^'\n]*(?:\n[^'\n]+)*\n?'|\([^()]*\))/).getRegex(), mr = C(/^(bull)([ \t][^\n]+?)?(?:\n|$)/).replace(/bull/g, Qt).getRegex(), yt = "address|article|aside|base|basefont|blockquote|body|caption|center|col|colgroup|dd|details|dialog|dir|div|dl|dt|fieldset|figcaption|figure|footer|form|frame|frameset|h[1-6]|head|header|hr|html|iframe|legend|li|link|main|menu|menuitem|meta|nav|noframes|ol|optgroup|option|p|param|search|section|summary|table|tbody|td|tfoot|th|thead|title|tr|track|ul", tn = /<!--(?:-?>|[\s\S]*?(?:-->|$))/, xr = C("^ {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", tn).replace("tag", yt).replace("attribute", / +[a-zA-Z:_][\w.:-]*(?: *= *"[^"\n]*"| *= *'[^'\n]*'| *= *[^\s"'=<>`]+)?/).getRegex(), rs = C(Jt).replace("hr", et).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[.)])[ \\t]").replace("html", "</?(?:tag)(?: +|\\n|/?>)|<(?:script|pre|style|textarea|!--)").replace("tag", yt).getRegex(), kr = C(/^( {0,3}> ?(paragraph|[^\n]*)(?:\n|$))+/).replace("paragraph", rs).getRegex(), nn = { blockquote: kr, code: ur, def: gr, fences: hr, heading: pr, hr: et, html: xr, lheading: ss, list: mr, newline: cr, paragraph: rs, table: Ae, text: dr }, Fn = C("^ *([^\\n ].*)\\n {0,3}((?:\\| *)?:?-+:? *(?:\\| *:?-+:? *)*(?:\\| *)?)(?:\\n((?:(?! *\\n|hr|heading|blockquote|code|fences|list|html).*(?:\\n|$))*)\\n*|$)").replace("hr", et).replace("heading", " {0,3}#{1,6}(?:\\s|$)").replace("blockquote", " {0,3}>").replace("code", "(?: {4}| {0,3} )[^\\n]").replace("fences", " {0,3}(?:`{3,}(?=[^`\\n]*\\n)|~{3,})[^\\n]*\\n").replace("list", " {0,3}(?:[*+-]|1[.)])[ \\t]").replace("html", "</?(?:tag)(?: +|\\n|/?>)|<(?:script|pre|style|textarea|!--)").replace("tag", yt).getRegex(), br = { ...nn, lheading: fr, table: Fn, paragraph: C(Jt).replace("hr", et).replace("heading", " {0,3}#{1,6}(?:\\s|$)").replace("|lheading", "").replace("table", Fn).replace("blockquote", " {0,3}>").replace("fences", " {0,3}(?:`{3,}(?=[^`\\n]*\\n)|~{3,})[^\\n]*\\n").replace("list", " {0,3}(?:[*+-]|1[.)])[ \\t]").replace("html", "</?(?:tag)(?: +|\\n|/?>)|<(?:script|pre|style|textarea|!--)").replace("tag", yt).getRegex() }, wr = { ...nn, html: C(`^ *(?:comment *(?:\\n|\\s*$)|<(tag)[\\s\\S]+?</\\1> *(?:\\n{2,}|\\s*$)|<tag(?:"[^"]*"|'[^']*'|\\s[^'"/>\\s]*)*?/?> *(?:\\n{2,}|\\s*$))`).replace("comment", tn).replace(/tag/g, "(?!(?:a|em|strong|small|s|cite|q|dfn|abbr|data|time|code|var|samp|kbd|sub|sup|i|b|u|mark|ruby|rt|rp|bdi|bdo|span|br|wbr|ins|del|img)\\b)\\w+(?!:|[^\\w\\s@]*@)\\b").getRegex(), def: /^ *\[([^\]]+)\]: *<?([^\s>]+)>?(?: +(["(][^\n]+[")]))? *(?:\n+|$)/, heading: /^(#{1,6})(.*)(?:\n+|$)/, fences: Ae, lheading: /^(.+?)\n {0,3}(=+|-+) *(?:\n+|$)/, paragraph: C(Jt).replace("hr", et).replace("heading", ` *#{1,6} *[^
1036
- ]`).replace("lheading", ss).replace("|table", "").replace("blockquote", " {0,3}>").replace("|fences", "").replace("|list", "").replace("|html", "").replace("|tag", "").getRegex() }, vr = /^\\([!"#$%&'()*+,\-./:;<=>?@\[\]\\^_`{|}~])/, yr = /^(`+)([^`]|[^`][\s\S]*?[^`])\1(?!`)/, is = /^( {2,}|\\)\n(?!\s*$)/, Tr = /^(`+|[^`])(?:(?= {2,}\n)|[\s\S]*?(?:(?=[\\<!\[`*_]|\b_|$)|[^ ](?= {2,}\n)))/, Ue = /[\p{P}\p{S}]/u, Tt = /[\s\p{P}\p{S}]/u, sn = /[^\s\p{P}\p{S}]/u, Sr = C(/^((?![*_])punctSpace)/, "u").replace(/punctSpace/g, Tt).getRegex(), as = /(?!~)[\p{P}\p{S}]/u, Ar = /(?!~)[\s\p{P}\p{S}]/u, Er = /(?:[^\s\p{P}\p{S}]|~)/u, _r = C(/link|precode-code|html/, "g").replace("link", /\[(?:[^\[\]`]|(?<a>`+)[^`]+\k<a>(?!`))*?\]\((?:\\[\s\S]|[^\\\(\)]|\((?:\\[\s\S]|[^\\\(\)])*\))*\)/).replace("precode-", or ? "(?<!`)()" : "(^^|[^`])").replace("code", /(?<b>`+)[^`]+\k<b>(?!`)/).replace("html", /<(?! )[^<>]*?>/).getRegex(), ls = /^(?:\*+(?:((?!\*)punct)|([^\s*]))?)|^_+(?:((?!_)punct)|([^\s_]))?/, Rr = C(ls, "u").replace(/punct/g, Ue).getRegex(), Dr = C(ls, "u").replace(/punct/g, as).getRegex(), os = "^[^_*]*?__[^_*]*?\\*[^_*]*?(?=__)|[^*]+(?=[^*])|(?!\\*)punct(\\*+)(?=[\\s]|$)|notPunctSpace(\\*+)(?!\\*)(?=punctSpace|$)|(?!\\*)punctSpace(\\*+)(?=notPunctSpace)|[\\s](\\*+)(?!\\*)(?=punct)|(?!\\*)punct(\\*+)(?!\\*)(?=punct)|notPunctSpace(\\*+)(?=notPunctSpace)", Cr = C(os, "gu").replace(/notPunctSpace/g, sn).replace(/punctSpace/g, Tt).replace(/punct/g, Ue).getRegex(), Ir = C(os, "gu").replace(/notPunctSpace/g, Er).replace(/punctSpace/g, Ar).replace(/punct/g, as).getRegex(), Mr = C("^[^_*]*?\\*\\*[^_*]*?_[^_*]*?(?=\\*\\*)|[^_]+(?=[^_])|(?!_)punct(_+)(?=[\\s]|$)|notPunctSpace(_+)(?!_)(?=punctSpace|$)|(?!_)punctSpace(_+)(?=notPunctSpace)|[\\s](_+)(?!_)(?=punct)|(?!_)punct(_+)(?!_)(?=punct)", "gu").replace(/notPunctSpace/g, sn).replace(/punctSpace/g, Tt).replace(/punct/g, Ue).getRegex(), Lr = C(/^~~?(?:((?!~)punct)|[^\s~])/, "u").replace(/punct/g, Ue).getRegex(), zr = "^[^~]+(?=[^~])|(?!~)punct(~~?)(?=[\\s]|$)|notPunctSpace(~~?)(?!~)(?=punctSpace|$)|(?!~)punctSpace(~~?)(?=notPunctSpace)|[\\s](~~?)(?!~)(?=punct)|(?!~)punct(~~?)(?!~)(?=punct)|notPunctSpace(~~?)(?=notPunctSpace)", Or = C(zr, "gu").replace(/notPunctSpace/g, sn).replace(/punctSpace/g, Tt).replace(/punct/g, Ue).getRegex(), Nr = C(/\\(punct)/, "gu").replace(/punct/g, Ue).getRegex(), Pr = C(/^<(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(), $r = C(tn).replace("(?:-->|$)", "-->").getRegex(), Ur = C("^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", $r).replace("attribute", /\s+[a-zA-Z:_][\w.:-]*(?:\s*=\s*"[^"]*"|\s*=\s*'[^']*'|\s*=\s*[^\s"'=<>`]+)?/).getRegex(), bt = /(?:\[(?:\\[\s\S]|[^\[\]\\])*\]|\\[\s\S]|`+(?!`)[^`]*?`+(?!`)|``+(?=\])|[^\[\]\\`])*?/, Br = C(/^!?\[(label)\]\(\s*(href)(?:(?:[ \t]+(?:\n[ \t]*)?|\n[ \t]*)(title))?\s*\)/).replace("label", bt).replace("href", /<(?:\\.|[^\n<>\\])+>|[^ \t\n\x00-\x1f]*/).replace("title", /"(?:\\"?|[^"\\])*"|'(?:\\'?|[^'\\])*'|\((?:\\\)?|[^)\\])*\)/).getRegex(), cs = C(/^!?\[(label)\]\[(ref)\]/).replace("label", bt).replace("ref", en).getRegex(), us = C(/^!?\[(ref)\](?:\[\])?/).replace("ref", en).getRegex(), Fr = C("reflink|nolink(?!\\()", "g").replace("reflink", cs).replace("nolink", us).getRegex(), Hn = /[hH][tT][tT][pP][sS]?|[fF][tT][pP]/, rn = { _backpedal: Ae, anyPunctuation: Nr, autolink: Pr, blockSkip: _r, br: is, code: yr, del: Ae, delLDelim: Ae, delRDelim: Ae, emStrongLDelim: Rr, emStrongRDelimAst: Cr, emStrongRDelimUnd: Mr, escape: vr, link: Br, nolink: us, punctuation: Sr, reflink: cs, reflinkSearch: Fr, tag: Ur, text: Tr, url: Ae }, Hr = { ...rn, link: C(/^!?\[(label)\]\((.*?)\)/).replace("label", bt).getRegex(), reflink: C(/^!?\[(label)\]\s*\[([^\]]*)\]/).replace("label", bt).getRegex() }, Zt = { ...rn, emStrongRDelimAst: Ir, emStrongLDelim: Dr, delLDelim: Lr, delRDelim: Or, url: C(/^((?:protocol):\/\/|www\.)(?:[a-zA-Z0-9\-]+\.?)+[^\s<]*|^email/).replace("protocol", Hn).replace("email", /[A-Za-z0-9._+-]+(@)[a-zA-Z0-9-_]+(?:\.[a-zA-Z0-9-_]*[a-zA-Z0-9])+(?![-_])/).getRegex(), _backpedal: /(?:[^?!.,:;*_'"~()&]+|\([^)]*\)|&(?![a-zA-Z0-9]+;$)|[?!.,:;*_'"~)]+(?!$))+/, del: /^(~~?)(?=[^\s~])((?:\\[\s\S]|[^\\])*?(?:\\[\s\S]|[^\s~\\]))\1(?=[^~]|$)/, text: C(/^([`~]+|[^`~])(?:(?= {2,}\n)|(?=[a-zA-Z0-9.!#$%&'*+\/=?_`{\|}~-]+@)|[\s\S]*?(?:(?=[\\<!\[`*~_]|\b_|protocol:\/\/|www\.|$)|[^ ](?= {2,}\n)|[^a-zA-Z0-9.!#$%&'*+\/=?_`{\|}~-](?=[a-zA-Z0-9.!#$%&'*+\/=?_`{\|}~-]+@)))/).replace("protocol", Hn).getRegex() }, Gr = { ...Zt, br: C(is).replace("{2,}", "*").getRegex(), text: C(Zt.text).replace("\\b_", "\\b_| {2,}\\n").replace(/\{2,\}/g, "*").getRegex() }, dt = { normal: nn, gfm: br, pedantic: wr }, Xe = { normal: rn, gfm: Zt, breaks: Gr, pedantic: Hr }, Wr = { "&": "&amp;", "<": "&lt;", ">": "&gt;", '"': "&quot;", "'": "&#39;" }, Gn = /* @__PURE__ */ u((l) => Wr[l], "ke");
1037
- function oe(l, t) {
1035
+ })(), Z = { codeRemoveIndent: /^(?: {1,4}| {0,3}\t)/gm, outputLinkReplace: /\\([\[\]])/g, indentCodeCompensation: /^(\s+)(?:```)/, beginningSpace: /^\s+/, endingHash: /#$/, startingSpaceChar: /^ /, endingSpaceChar: / $/, nonSpaceChar: /[^ ]/, newLineCharGlobal: /\n/g, tabCharGlobal: /\t/g, multipleSpaceGlobal: /\s+/g, blankLine: /^[ \t]*$/, doubleBlankLine: /\n[ \t]*\n[ \t]*$/, blockquoteStart: /^ {0,3}>/, blockquoteSetextReplace: /\n {0,3}((?:=+|-+) *)(?=\n|$)/g, blockquoteSetextReplace2: /^ {0,3}>[ \t]?/gm, listReplaceNesting: /^ {1,4}(?=( {4})*[^ ])/g, listIsTask: /^\[[ xX]\] +\S/, listReplaceTask: /^\[[ xX]\] +/, listTaskCheckbox: /\[[ xX]\]/, anyLine: /\n.*\n/, hrefBrackets: /^<(.*)>$/, tableDelimiter: /[:|]/, tableAlignChars: /^\||\| *$/g, tableRowBlankLine: /\n[ \t]*$/, tableAlignRight: /^ *-+: *$/, tableAlignCenter: /^ *:-+: *$/, tableAlignLeft: /^ *:-+ *$/, startATag: /^<a /i, endATag: /^<\/a>/i, startPreScriptTag: /^<(pre|code|kbd|script)(\s|>)/i, endPreScriptTag: /^<\/(pre|code|kbd|script)(\s|>)/i, startAngleBracket: /^</, endAngleBracket: />$/, pedanticHrefTitle: /^([^'"]*[^\s])\s+(['"])(.*)\2/, unicodeAlphaNumeric: /[\p{L}\p{N}]/u, escapeTest: /[&<>"']/, escapeReplace: /[&<>"']/g, escapeTestNoEncode: /[<>"']|&(?!(#\d{1,7}|#[Xx][a-fA-F0-9]{1,6}|\w+);)/, escapeReplaceNoEncode: /[<>"']|&(?!(#\d{1,7}|#[Xx][a-fA-F0-9]{1,6}|\w+);)/g, caret: /(^|[^\[])\^/g, percentDecode: /%25/g, findPipe: /\|/g, splitPipe: / \|/, slashPipe: /\\\|/g, carriageReturn: /\r\n|\r/g, spaceLine: /^ +$/gm, notSpaceStart: /^\S*/, endingNewline: /\n$/, listItemRegex: /* @__PURE__ */ u((l) => new RegExp(`^( {0,3}${l})((?:[ ][^\\n]*)?(?:\\n|$))`), "listItemRegex"), nextBulletRegex: /* @__PURE__ */ u((l) => new RegExp(`^ {0,${Math.min(3, l - 1)}}(?:[*+-]|\\d{1,9}[.)])((?:[ ][^\\n]*)?(?:\\n|$))`), "nextBulletRegex"), hrRegex: /* @__PURE__ */ u((l) => new RegExp(`^ {0,${Math.min(3, l - 1)}}((?:- *){3,}|(?:_ *){3,}|(?:\\* *){3,})(?:\\n+|$)`), "hrRegex"), fencesBeginRegex: /* @__PURE__ */ u((l) => new RegExp(`^ {0,${Math.min(3, l - 1)}}(?:\`\`\`|~~~)`), "fencesBeginRegex"), headingBeginRegex: /* @__PURE__ */ u((l) => new RegExp(`^ {0,${Math.min(3, l - 1)}}#`), "headingBeginRegex"), htmlBeginRegex: /* @__PURE__ */ u((l) => new RegExp(`^ {0,${Math.min(3, l - 1)}}<(?:[a-z].*>|!--)`, "i"), "htmlBeginRegex"), blockquoteBeginRegex: /* @__PURE__ */ u((l) => new RegExp(`^ {0,${Math.min(3, l - 1)}}>`), "blockquoteBeginRegex") }, or = /^(?:[ \t]*(?:\n|$))+/, cr = /^((?: {4}| {0,3}\t)[^\n]+(?:\n(?:[ \t]*(?:\n|$))*)?)+/, ur = /^ {0,3}(`{3,}(?=[^`\n]*(?:\n|$))|~{3,})([^\n]*)(?:\n|$)(?:|([\s\S]*?)(?:\n|$))(?: {0,3}\1[~`]* *(?=\n|$)|$)/, et = /^ {0,3}((?:-[\t ]*){3,}|(?:_[ \t]*){3,}|(?:\*[ \t]*){3,})(?:\n+|$)/, hr = /^ {0,3}(#{1,6})(?=\s|$)(.*)(?:\n+|$)/, Jt = / {0,3}(?:[*+-]|\d{1,9}[.)])/, ss = /^(?!bull |blockCode|fences|blockquote|heading|html|table)((?:.|\n(?!\s*?\n|bull |blockCode|fences|blockquote|heading|html|table))+?)\n {0,3}(=+|-+) *(?:\n+|$)/, rs = I(ss).replace(/bull/g, Jt).replace(/blockCode/g, /(?: {4}| {0,3}\t)/).replace(/fences/g, / {0,3}(?:`{3,}|~{3,})/).replace(/blockquote/g, / {0,3}>/).replace(/heading/g, / {0,3}#{1,6}/).replace(/html/g, / {0,3}<[^\n>]+>\n/).replace(/\|table/g, "").getRegex(), pr = I(ss).replace(/bull/g, Jt).replace(/blockCode/g, /(?: {4}| {0,3}\t)/).replace(/fences/g, / {0,3}(?:`{3,}|~{3,})/).replace(/blockquote/g, / {0,3}>/).replace(/heading/g, / {0,3}#{1,6}/).replace(/html/g, / {0,3}<[^\n>]+>\n/).replace(/table/g, / {0,3}\|?(?:[:\- ]*\|)+[\:\- ]*\n/).getRegex(), en = /^([^\n]+(?:\n(?!hr|heading|lheading|blockquote|fences|list|html|table| +\n)[^\n]+)*)/, dr = /^[^\n]+/, tn = /(?!\s*\])(?:\\[\s\S]|[^\[\]\\])+/, fr = I(/^ {0,3}\[(label)\]: *(?:\n[ \t]*)?([^<\s][^\s]*|<.*?>)(?:(?: +(?:\n[ \t]*)?| *\n[ \t]*)(title))? *(?:\n+|$)/).replace("label", tn).replace("title", /(?:"(?:\\"?|[^"\\])*"|'[^'\n]*(?:\n[^'\n]+)*\n?'|\([^()]*\))/).getRegex(), gr = I(/^(bull)([ \t][^\n]+?)?(?:\n|$)/).replace(/bull/g, Jt).getRegex(), yt = "address|article|aside|base|basefont|blockquote|body|caption|center|col|colgroup|dd|details|dialog|dir|div|dl|dt|fieldset|figcaption|figure|footer|form|frame|frameset|h[1-6]|head|header|hr|html|iframe|legend|li|link|main|menu|menuitem|meta|nav|noframes|ol|optgroup|option|p|param|search|section|summary|table|tbody|td|tfoot|th|thead|title|tr|track|ul", nn = /<!--(?:-?>|[\s\S]*?(?:-->|$))/, mr = I("^ {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", nn).replace("tag", yt).replace("attribute", / +[a-zA-Z:_][\w.:-]*(?: *= *"[^"\n]*"| *= *'[^'\n]*'| *= *[^\s"'=<>`]+)?/).getRegex(), is = I(en).replace("hr", et).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[.)])[ \\t]").replace("html", "</?(?:tag)(?: +|\\n|/?>)|<(?:script|pre|style|textarea|!--)").replace("tag", yt).getRegex(), xr = I(/^( {0,3}> ?(paragraph|[^\n]*)(?:\n|$))+/).replace("paragraph", is).getRegex(), sn = { blockquote: xr, code: cr, def: fr, fences: ur, heading: hr, hr: et, html: mr, lheading: rs, list: gr, newline: or, paragraph: is, table: Se, text: dr }, Hn = I("^ *([^\\n ].*)\\n {0,3}((?:\\| *)?:?-+:? *(?:\\| *:?-+:? *)*(?:\\| *)?)(?:\\n((?:(?! *\\n|hr|heading|blockquote|code|fences|list|html).*(?:\\n|$))*)\\n*|$)").replace("hr", et).replace("heading", " {0,3}#{1,6}(?:\\s|$)").replace("blockquote", " {0,3}>").replace("code", "(?: {4}| {0,3} )[^\\n]").replace("fences", " {0,3}(?:`{3,}(?=[^`\\n]*\\n)|~{3,})[^\\n]*\\n").replace("list", " {0,3}(?:[*+-]|1[.)])[ \\t]").replace("html", "</?(?:tag)(?: +|\\n|/?>)|<(?:script|pre|style|textarea|!--)").replace("tag", yt).getRegex(), br = { ...sn, lheading: pr, table: Hn, paragraph: I(en).replace("hr", et).replace("heading", " {0,3}#{1,6}(?:\\s|$)").replace("|lheading", "").replace("table", Hn).replace("blockquote", " {0,3}>").replace("fences", " {0,3}(?:`{3,}(?=[^`\\n]*\\n)|~{3,})[^\\n]*\\n").replace("list", " {0,3}(?:[*+-]|1[.)])[ \\t]").replace("html", "</?(?:tag)(?: +|\\n|/?>)|<(?:script|pre|style|textarea|!--)").replace("tag", yt).getRegex() }, kr = { ...sn, html: I(`^ *(?:comment *(?:\\n|\\s*$)|<(tag)[\\s\\S]+?</\\1> *(?:\\n{2,}|\\s*$)|<tag(?:"[^"]*"|'[^']*'|\\s[^'"/>\\s]*)*?/?> *(?:\\n{2,}|\\s*$))`).replace("comment", nn).replace(/tag/g, "(?!(?:a|em|strong|small|s|cite|q|dfn|abbr|data|time|code|var|samp|kbd|sub|sup|i|b|u|mark|ruby|rt|rp|bdi|bdo|span|br|wbr|ins|del|img)\\b)\\w+(?!:|[^\\w\\s@]*@)\\b").getRegex(), def: /^ *\[([^\]]+)\]: *<?([^\s>]+)>?(?: +(["(][^\n]+[")]))? *(?:\n+|$)/, heading: /^(#{1,6})(.*)(?:\n+|$)/, fences: Se, lheading: /^(.+?)\n {0,3}(=+|-+) *(?:\n+|$)/, paragraph: I(en).replace("hr", et).replace("heading", ` *#{1,6} *[^
1036
+ ]`).replace("lheading", rs).replace("|table", "").replace("blockquote", " {0,3}>").replace("|fences", "").replace("|list", "").replace("|html", "").replace("|tag", "").getRegex() }, wr = /^\\([!"#$%&'()*+,\-./:;<=>?@\[\]\\^_`{|}~])/, vr = /^(`+)([^`]|[^`][\s\S]*?[^`])\1(?!`)/, as = /^( {2,}|\\)\n(?!\s*$)/, yr = /^(`+|[^`])(?:(?= {2,}\n)|[\s\S]*?(?:(?=[\\<!\[`*_]|\b_|$)|[^ ](?= {2,}\n)))/, Be = /[\p{P}\p{S}]/u, Tt = /[\s\p{P}\p{S}]/u, rn = /[^\s\p{P}\p{S}]/u, Tr = I(/^((?![*_])punctSpace)/, "u").replace(/punctSpace/g, Tt).getRegex(), ls = /(?!~)[\p{P}\p{S}]/u, Sr = /(?!~)[\s\p{P}\p{S}]/u, Ar = /(?:[^\s\p{P}\p{S}]|~)/u, Er = I(/link|precode-code|html/, "g").replace("link", /\[(?:[^\[\]`]|(?<a>`+)[^`]+\k<a>(?!`))*?\]\((?:\\[\s\S]|[^\\\(\)]|\((?:\\[\s\S]|[^\\\(\)])*\))*\)/).replace("precode-", lr ? "(?<!`)()" : "(^^|[^`])").replace("code", /(?<b>`+)[^`]+\k<b>(?!`)/).replace("html", /<(?! )[^<>]*?>/).getRegex(), os = /^(?:\*+(?:((?!\*)punct)|([^\s*]))?)|^_+(?:((?!_)punct)|([^\s_]))?/, _r = I(os, "u").replace(/punct/g, Be).getRegex(), Rr = I(os, "u").replace(/punct/g, ls).getRegex(), cs = "^[^_*]*?__[^_*]*?\\*[^_*]*?(?=__)|[^*]+(?=[^*])|(?!\\*)punct(\\*+)(?=[\\s]|$)|notPunctSpace(\\*+)(?!\\*)(?=punctSpace|$)|(?!\\*)punctSpace(\\*+)(?=notPunctSpace)|[\\s](\\*+)(?!\\*)(?=punct)|(?!\\*)punct(\\*+)(?!\\*)(?=punct)|notPunctSpace(\\*+)(?=notPunctSpace)", Dr = I(cs, "gu").replace(/notPunctSpace/g, rn).replace(/punctSpace/g, Tt).replace(/punct/g, Be).getRegex(), Cr = I(cs, "gu").replace(/notPunctSpace/g, Ar).replace(/punctSpace/g, Sr).replace(/punct/g, ls).getRegex(), Ir = I("^[^_*]*?\\*\\*[^_*]*?_[^_*]*?(?=\\*\\*)|[^_]+(?=[^_])|(?!_)punct(_+)(?=[\\s]|$)|notPunctSpace(_+)(?!_)(?=punctSpace|$)|(?!_)punctSpace(_+)(?=notPunctSpace)|[\\s](_+)(?!_)(?=punct)|(?!_)punct(_+)(?!_)(?=punct)", "gu").replace(/notPunctSpace/g, rn).replace(/punctSpace/g, Tt).replace(/punct/g, Be).getRegex(), Mr = I(/^~~?(?:((?!~)punct)|[^\s~])/, "u").replace(/punct/g, Be).getRegex(), Lr = "^[^~]+(?=[^~])|(?!~)punct(~~?)(?=[\\s]|$)|notPunctSpace(~~?)(?!~)(?=punctSpace|$)|(?!~)punctSpace(~~?)(?=notPunctSpace)|[\\s](~~?)(?!~)(?=punct)|(?!~)punct(~~?)(?!~)(?=punct)|notPunctSpace(~~?)(?=notPunctSpace)", zr = I(Lr, "gu").replace(/notPunctSpace/g, rn).replace(/punctSpace/g, Tt).replace(/punct/g, Be).getRegex(), Or = I(/\\(punct)/, "gu").replace(/punct/g, Be).getRegex(), Nr = I(/^<(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(), Pr = I(nn).replace("(?:-->|$)", "-->").getRegex(), $r = I("^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", Pr).replace("attribute", /\s+[a-zA-Z:_][\w.:-]*(?:\s*=\s*"[^"]*"|\s*=\s*'[^']*'|\s*=\s*[^\s"'=<>`]+)?/).getRegex(), kt = /(?:\[(?:\\[\s\S]|[^\[\]\\])*\]|\\[\s\S]|`+(?!`)[^`]*?`+(?!`)|``+(?=\])|[^\[\]\\`])*?/, Ur = I(/^!?\[(label)\]\(\s*(href)(?:(?:[ \t]+(?:\n[ \t]*)?|\n[ \t]*)(title))?\s*\)/).replace("label", kt).replace("href", /<(?:\\.|[^\n<>\\])+>|[^ \t\n\x00-\x1f]*/).replace("title", /"(?:\\"?|[^"\\])*"|'(?:\\'?|[^'\\])*'|\((?:\\\)?|[^)\\])*\)/).getRegex(), us = I(/^!?\[(label)\]\[(ref)\]/).replace("label", kt).replace("ref", tn).getRegex(), hs = I(/^!?\[(ref)\](?:\[\])?/).replace("ref", tn).getRegex(), Br = I("reflink|nolink(?!\\()", "g").replace("reflink", us).replace("nolink", hs).getRegex(), Gn = /[hH][tT][tT][pP][sS]?|[fF][tT][pP]/, an = { _backpedal: Se, anyPunctuation: Or, autolink: Nr, blockSkip: Er, br: as, code: vr, del: Se, delLDelim: Se, delRDelim: Se, emStrongLDelim: _r, emStrongRDelimAst: Dr, emStrongRDelimUnd: Ir, escape: wr, link: Ur, nolink: hs, punctuation: Tr, reflink: us, reflinkSearch: Br, tag: $r, text: yr, url: Se }, Fr = { ...an, link: I(/^!?\[(label)\]\((.*?)\)/).replace("label", kt).getRegex(), reflink: I(/^!?\[(label)\]\s*\[([^\]]*)\]/).replace("label", kt).getRegex() }, Xt = { ...an, emStrongRDelimAst: Cr, emStrongLDelim: Rr, delLDelim: Mr, delRDelim: zr, url: I(/^((?:protocol):\/\/|www\.)(?:[a-zA-Z0-9\-]+\.?)+[^\s<]*|^email/).replace("protocol", Gn).replace("email", /[A-Za-z0-9._+-]+(@)[a-zA-Z0-9-_]+(?:\.[a-zA-Z0-9-_]*[a-zA-Z0-9])+(?![-_])/).getRegex(), _backpedal: /(?:[^?!.,:;*_'"~()&]+|\([^)]*\)|&(?![a-zA-Z0-9]+;$)|[?!.,:;*_'"~)]+(?!$))+/, del: /^(~~?)(?=[^\s~])((?:\\[\s\S]|[^\\])*?(?:\\[\s\S]|[^\s~\\]))\1(?=[^~]|$)/, text: I(/^([`~]+|[^`~])(?:(?= {2,}\n)|(?=[a-zA-Z0-9.!#$%&'*+\/=?_`{\|}~-]+@)|[\s\S]*?(?:(?=[\\<!\[`*~_]|\b_|protocol:\/\/|www\.|$)|[^ ](?= {2,}\n)|[^a-zA-Z0-9.!#$%&'*+\/=?_`{\|}~-](?=[a-zA-Z0-9.!#$%&'*+\/=?_`{\|}~-]+@)))/).replace("protocol", Gn).getRegex() }, Hr = { ...Xt, br: I(as).replace("{2,}", "*").getRegex(), text: I(Xt.text).replace("\\b_", "\\b_| {2,}\\n").replace(/\{2,\}/g, "*").getRegex() }, ft = { normal: sn, gfm: br, pedantic: kr }, Xe = { normal: an, gfm: Xt, breaks: Hr, pedantic: Fr }, Gr = { "&": "&amp;", "<": "&lt;", ">": "&gt;", '"': "&quot;", "'": "&#39;" }, Wn = /* @__PURE__ */ u((l) => Gr[l], "ke");
1037
+ function ce(l, t) {
1038
1038
  if (t) {
1039
- if (Y.escapeTest.test(l)) return l.replace(Y.escapeReplace, Gn);
1040
- } else if (Y.escapeTestNoEncode.test(l)) return l.replace(Y.escapeReplaceNoEncode, Gn);
1039
+ if (Z.escapeTest.test(l)) return l.replace(Z.escapeReplace, Wn);
1040
+ } else if (Z.escapeTestNoEncode.test(l)) return l.replace(Z.escapeReplaceNoEncode, Wn);
1041
1041
  return l;
1042
1042
  }
1043
- u(oe, "O");
1044
- function Wn(l) {
1043
+ u(ce, "O");
1044
+ function jn(l) {
1045
1045
  try {
1046
- l = encodeURI(l).replace(Y.percentDecode, "%");
1046
+ l = encodeURI(l).replace(Z.percentDecode, "%");
1047
1047
  } catch {
1048
1048
  return null;
1049
1049
  }
1050
1050
  return l;
1051
1051
  }
1052
- u(Wn, "J");
1053
- function jn(l, t) {
1054
- let e = l.replace(Y.findPipe, (r, a, o) => {
1055
- let c = !1, f = a;
1056
- for (; --f >= 0 && o[f] === "\\"; ) c = !c;
1052
+ u(jn, "J");
1053
+ function qn(l, t) {
1054
+ let e = l.replace(Z.findPipe, (r, a, o) => {
1055
+ let c = !1, d = a;
1056
+ for (; --d >= 0 && o[d] === "\\"; ) c = !c;
1057
1057
  return c ? "|" : " |";
1058
- }), n = e.split(Y.splitPipe), s = 0;
1058
+ }), n = e.split(Z.splitPipe), s = 0;
1059
1059
  if (n[0].trim() || n.shift(), n.length > 0 && !n.at(-1)?.trim() && n.pop(), t) if (n.length > t) n.splice(t);
1060
1060
  else for (; n.length < t; ) n.push("");
1061
- for (; s < n.length; s++) n[s] = n[s].trim().replace(Y.slashPipe, "|");
1061
+ for (; s < n.length; s++) n[s] = n[s].trim().replace(Z.slashPipe, "|");
1062
1062
  return n;
1063
1063
  }
1064
- u(jn, "V");
1064
+ u(qn, "V");
1065
1065
  function Ke(l, t, e) {
1066
1066
  let n = l.length;
1067
1067
  if (n === 0) return "";
@@ -1071,7 +1071,7 @@ function Ke(l, t, e) {
1071
1071
  return l.slice(0, n - s);
1072
1072
  }
1073
1073
  u(Ke, "I");
1074
- function jr(l, t) {
1074
+ function Wr(l, t) {
1075
1075
  if (l.indexOf(t[1]) === -1) return -1;
1076
1076
  let e = 0;
1077
1077
  for (let n = 0; n < l.length; n++) if (l[n] === "\\") n++;
@@ -1079,8 +1079,8 @@ function jr(l, t) {
1079
1079
  else if (l[n] === t[1] && (e--, e < 0)) return n;
1080
1080
  return e > 0 ? -2 : -1;
1081
1081
  }
1082
- u(jr, "de");
1083
- function qr(l, t = 0) {
1082
+ u(Wr, "de");
1083
+ function jr(l, t = 0) {
1084
1084
  let e = t, n = "";
1085
1085
  for (let s of l) if (s === " ") {
1086
1086
  let r = 4 - e % 4;
@@ -1088,15 +1088,15 @@ function qr(l, t = 0) {
1088
1088
  } else n += s, e++;
1089
1089
  return n;
1090
1090
  }
1091
- u(qr, "ge");
1092
- function qn(l, t, e, n, s) {
1091
+ u(jr, "ge");
1092
+ function Vn(l, t, e, n, s) {
1093
1093
  let r = t.href, a = t.title || null, o = l[1].replace(s.other.outputLinkReplace, "$1");
1094
1094
  n.state.inLink = !0;
1095
1095
  let c = { type: l[0].charAt(0) === "!" ? "image" : "link", raw: e, href: r, title: a, text: o, tokens: n.inlineTokens(o) };
1096
1096
  return n.state.inLink = !1, c;
1097
1097
  }
1098
- u(qn, "fe");
1099
- function Vr(l, t, e) {
1098
+ u(Vn, "fe");
1099
+ function qr(l, t, e) {
1100
1100
  let n = l.match(e.other.indentCodeCompensation);
1101
1101
  if (n === null) return t;
1102
1102
  let s = n[1];
@@ -1109,13 +1109,13 @@ function Vr(l, t, e) {
1109
1109
  }).join(`
1110
1110
  `);
1111
1111
  }
1112
- u(Vr, "nt");
1113
- var Oe, wt = (Oe = class {
1112
+ u(qr, "nt");
1113
+ var Ne, wt = (Ne = class {
1114
1114
  constructor(t) {
1115
- D(this, "options");
1116
- D(this, "rules");
1117
- D(this, "lexer");
1118
- this.options = t || Re;
1115
+ C(this, "options");
1116
+ C(this, "rules");
1117
+ C(this, "lexer");
1118
+ this.options = t || _e;
1119
1119
  }
1120
1120
  space(t) {
1121
1121
  let e = this.rules.block.newline.exec(t);
@@ -1132,7 +1132,7 @@ var Oe, wt = (Oe = class {
1132
1132
  fences(t) {
1133
1133
  let e = this.rules.block.fences.exec(t);
1134
1134
  if (e) {
1135
- let n = e[0], s = Vr(n, e[3] || "", this.rules);
1135
+ let n = e[0], s = qr(n, e[3] || "", this.rules);
1136
1136
  return { type: "code", raw: n, lang: e[2] ? e[2].trim().replace(this.rules.inline.anyPunctuation, "$1") : e[2], text: s };
1137
1137
  }
1138
1138
  }
@@ -1159,32 +1159,32 @@ var Oe, wt = (Oe = class {
1159
1159
  `).split(`
1160
1160
  `), s = "", r = "", a = [];
1161
1161
  for (; n.length > 0; ) {
1162
- let o = !1, c = [], f;
1163
- for (f = 0; f < n.length; f++) if (this.rules.other.blockquoteStart.test(n[f])) c.push(n[f]), o = !0;
1164
- else if (!o) c.push(n[f]);
1162
+ let o = !1, c = [], d;
1163
+ for (d = 0; d < n.length; d++) if (this.rules.other.blockquoteStart.test(n[d])) c.push(n[d]), o = !0;
1164
+ else if (!o) c.push(n[d]);
1165
1165
  else break;
1166
- n = n.slice(f);
1167
- let d = c.join(`
1168
- `), p = d.replace(this.rules.other.blockquoteSetextReplace, `
1166
+ n = n.slice(d);
1167
+ let g = c.join(`
1168
+ `), p = g.replace(this.rules.other.blockquoteSetextReplace, `
1169
1169
  $1`).replace(this.rules.other.blockquoteSetextReplace2, "");
1170
1170
  s = s ? `${s}
1171
- ${d}` : d, r = r ? `${r}
1171
+ ${g}` : g, r = r ? `${r}
1172
1172
  ${p}` : p;
1173
- let g = this.lexer.state.top;
1174
- if (this.lexer.state.top = !0, this.lexer.blockTokens(p, a, !0), this.lexer.state.top = g, n.length === 0) break;
1175
- let m = a.at(-1);
1176
- if (m?.type === "code") break;
1177
- if (m?.type === "blockquote") {
1178
- let w = m, S = w.raw + `
1173
+ let m = this.lexer.state.top;
1174
+ if (this.lexer.state.top = !0, this.lexer.blockTokens(p, a, !0), this.lexer.state.top = m, n.length === 0) break;
1175
+ let f = a.at(-1);
1176
+ if (f?.type === "code") break;
1177
+ if (f?.type === "blockquote") {
1178
+ let k = f, _ = k.raw + `
1179
1179
  ` + n.join(`
1180
- `), O = this.blockquote(S);
1181
- a[a.length - 1] = O, s = s.substring(0, s.length - w.raw.length) + O.raw, r = r.substring(0, r.length - w.text.length) + O.text;
1180
+ `), O = this.blockquote(_);
1181
+ a[a.length - 1] = O, s = s.substring(0, s.length - k.raw.length) + O.raw, r = r.substring(0, r.length - k.text.length) + O.text;
1182
1182
  break;
1183
- } else if (m?.type === "list") {
1184
- let w = m, S = w.raw + `
1183
+ } else if (f?.type === "list") {
1184
+ let k = f, _ = k.raw + `
1185
1185
  ` + n.join(`
1186
- `), O = this.list(S);
1187
- a[a.length - 1] = O, s = s.substring(0, s.length - m.raw.length) + O.raw, r = r.substring(0, r.length - w.raw.length) + O.raw, n = S.substring(a.at(-1).raw.length).split(`
1186
+ `), O = this.list(_);
1187
+ a[a.length - 1] = O, s = s.substring(0, s.length - f.raw.length) + O.raw, r = r.substring(0, r.length - k.raw.length) + O.raw, n = _.substring(a.at(-1).raw.length).split(`
1188
1188
  `);
1189
1189
  continue;
1190
1190
  }
@@ -1199,59 +1199,59 @@ ${p}` : p;
1199
1199
  n = s ? `\\d{1,9}\\${n.slice(-1)}` : `\\${n}`, this.options.pedantic && (n = s ? n : "[*+-]");
1200
1200
  let a = this.rules.other.listItemRegex(n), o = !1;
1201
1201
  for (; t; ) {
1202
- let f = !1, d = "", p = "";
1202
+ let d = !1, g = "", p = "";
1203
1203
  if (!(e = a.exec(t)) || this.rules.block.hr.test(t)) break;
1204
- d = e[0], t = t.substring(d.length);
1205
- let g = qr(e[2].split(`
1206
- `, 1)[0], e[1].length), m = t.split(`
1207
- `, 1)[0], w = !g.trim(), S = 0;
1208
- if (this.options.pedantic ? (S = 2, p = g.trimStart()) : w ? S = e[1].length + 1 : (S = g.search(this.rules.other.nonSpaceChar), S = S > 4 ? 1 : S, p = g.slice(S), S += e[1].length), w && this.rules.other.blankLine.test(m) && (d += m + `
1209
- `, t = t.substring(m.length + 1), f = !0), !f) {
1210
- let O = this.rules.other.nextBulletRegex(S), me = this.rules.other.hrRegex(S), xe = this.rules.other.fencesBeginRegex(S), te = this.rules.other.headingBeginRegex(S), U = this.rules.other.htmlBeginRegex(S), q = this.rules.other.blockquoteBeginRegex(S);
1204
+ g = e[0], t = t.substring(g.length);
1205
+ let m = jr(e[2].split(`
1206
+ `, 1)[0], e[1].length), f = t.split(`
1207
+ `, 1)[0], k = !m.trim(), _ = 0;
1208
+ if (this.options.pedantic ? (_ = 2, p = m.trimStart()) : k ? _ = e[1].length + 1 : (_ = m.search(this.rules.other.nonSpaceChar), _ = _ > 4 ? 1 : _, p = m.slice(_), _ += e[1].length), k && this.rules.other.blankLine.test(f) && (g += f + `
1209
+ `, t = t.substring(f.length + 1), d = !0), !d) {
1210
+ let O = this.rules.other.nextBulletRegex(_), ee = this.rules.other.hrRegex(_), Re = this.rules.other.fencesBeginRegex(_), ne = this.rules.other.headingBeginRegex(_), P = this.rules.other.htmlBeginRegex(_), he = this.rules.other.blockquoteBeginRegex(_);
1211
1211
  for (; t; ) {
1212
- let ne = t.split(`
1213
- `, 1)[0], ue;
1214
- if (m = ne, this.options.pedantic ? (m = m.replace(this.rules.other.listReplaceNesting, " "), ue = m) : ue = m.replace(this.rules.other.tabCharGlobal, " "), xe.test(m) || te.test(m) || U.test(m) || q.test(m) || O.test(m) || me.test(m)) break;
1215
- if (ue.search(this.rules.other.nonSpaceChar) >= S || !m.trim()) p += `
1216
- ` + ue.slice(S);
1212
+ let q = t.split(`
1213
+ `, 1)[0], se;
1214
+ if (f = q, this.options.pedantic ? (f = f.replace(this.rules.other.listReplaceNesting, " "), se = f) : se = f.replace(this.rules.other.tabCharGlobal, " "), Re.test(f) || ne.test(f) || P.test(f) || he.test(f) || O.test(f) || ee.test(f)) break;
1215
+ if (se.search(this.rules.other.nonSpaceChar) >= _ || !f.trim()) p += `
1216
+ ` + se.slice(_);
1217
1217
  else {
1218
- if (w || g.replace(this.rules.other.tabCharGlobal, " ").search(this.rules.other.nonSpaceChar) >= 4 || xe.test(g) || te.test(g) || me.test(g)) break;
1218
+ if (k || m.replace(this.rules.other.tabCharGlobal, " ").search(this.rules.other.nonSpaceChar) >= 4 || Re.test(m) || ne.test(m) || ee.test(m)) break;
1219
1219
  p += `
1220
- ` + m;
1220
+ ` + f;
1221
1221
  }
1222
- w = !m.trim(), d += ne + `
1223
- `, t = t.substring(ne.length + 1), g = ue.slice(S);
1222
+ k = !f.trim(), g += q + `
1223
+ `, t = t.substring(q.length + 1), m = se.slice(_);
1224
1224
  }
1225
1225
  }
1226
- r.loose || (o ? r.loose = !0 : this.rules.other.doubleBlankLine.test(d) && (o = !0)), r.items.push({ type: "list_item", raw: d, task: !!this.options.gfm && this.rules.other.listIsTask.test(p), loose: !1, text: p, tokens: [] }), r.raw += d;
1226
+ r.loose || (o ? r.loose = !0 : this.rules.other.doubleBlankLine.test(g) && (o = !0)), r.items.push({ type: "list_item", raw: g, task: !!this.options.gfm && this.rules.other.listIsTask.test(p), loose: !1, text: p, tokens: [] }), r.raw += g;
1227
1227
  }
1228
1228
  let c = r.items.at(-1);
1229
1229
  if (c) c.raw = c.raw.trimEnd(), c.text = c.text.trimEnd();
1230
1230
  else return;
1231
1231
  r.raw = r.raw.trimEnd();
1232
- for (let f of r.items) {
1233
- if (this.lexer.state.top = !1, f.tokens = this.lexer.blockTokens(f.text, []), f.task) {
1234
- if (f.text = f.text.replace(this.rules.other.listReplaceTask, ""), f.tokens[0]?.type === "text" || f.tokens[0]?.type === "paragraph") {
1235
- f.tokens[0].raw = f.tokens[0].raw.replace(this.rules.other.listReplaceTask, ""), f.tokens[0].text = f.tokens[0].text.replace(this.rules.other.listReplaceTask, "");
1232
+ for (let d of r.items) {
1233
+ if (this.lexer.state.top = !1, d.tokens = this.lexer.blockTokens(d.text, []), d.task) {
1234
+ if (d.text = d.text.replace(this.rules.other.listReplaceTask, ""), d.tokens[0]?.type === "text" || d.tokens[0]?.type === "paragraph") {
1235
+ d.tokens[0].raw = d.tokens[0].raw.replace(this.rules.other.listReplaceTask, ""), d.tokens[0].text = d.tokens[0].text.replace(this.rules.other.listReplaceTask, "");
1236
1236
  for (let p = this.lexer.inlineQueue.length - 1; p >= 0; p--) if (this.rules.other.listIsTask.test(this.lexer.inlineQueue[p].src)) {
1237
1237
  this.lexer.inlineQueue[p].src = this.lexer.inlineQueue[p].src.replace(this.rules.other.listReplaceTask, "");
1238
1238
  break;
1239
1239
  }
1240
1240
  }
1241
- let d = this.rules.other.listTaskCheckbox.exec(f.raw);
1242
- if (d) {
1243
- let p = { type: "checkbox", raw: d[0] + " ", checked: d[0] !== "[ ]" };
1244
- f.checked = p.checked, r.loose ? f.tokens[0] && ["paragraph", "text"].includes(f.tokens[0].type) && "tokens" in f.tokens[0] && f.tokens[0].tokens ? (f.tokens[0].raw = p.raw + f.tokens[0].raw, f.tokens[0].text = p.raw + f.tokens[0].text, f.tokens[0].tokens.unshift(p)) : f.tokens.unshift({ type: "paragraph", raw: p.raw, text: p.raw, tokens: [p] }) : f.tokens.unshift(p);
1241
+ let g = this.rules.other.listTaskCheckbox.exec(d.raw);
1242
+ if (g) {
1243
+ let p = { type: "checkbox", raw: g[0] + " ", checked: g[0] !== "[ ]" };
1244
+ d.checked = p.checked, r.loose ? d.tokens[0] && ["paragraph", "text"].includes(d.tokens[0].type) && "tokens" in d.tokens[0] && d.tokens[0].tokens ? (d.tokens[0].raw = p.raw + d.tokens[0].raw, d.tokens[0].text = p.raw + d.tokens[0].text, d.tokens[0].tokens.unshift(p)) : d.tokens.unshift({ type: "paragraph", raw: p.raw, text: p.raw, tokens: [p] }) : d.tokens.unshift(p);
1245
1245
  }
1246
1246
  }
1247
1247
  if (!r.loose) {
1248
- let d = f.tokens.filter((g) => g.type === "space"), p = d.length > 0 && d.some((g) => this.rules.other.anyLine.test(g.raw));
1248
+ let g = d.tokens.filter((m) => m.type === "space"), p = g.length > 0 && g.some((m) => this.rules.other.anyLine.test(m.raw));
1249
1249
  r.loose = p;
1250
1250
  }
1251
1251
  }
1252
- if (r.loose) for (let f of r.items) {
1253
- f.loose = !0;
1254
- for (let d of f.tokens) d.type === "text" && (d.type = "paragraph");
1252
+ if (r.loose) for (let d of r.items) {
1253
+ d.loose = !0;
1254
+ for (let g of d.tokens) g.type === "text" && (g.type = "paragraph");
1255
1255
  }
1256
1256
  return r;
1257
1257
  }
@@ -1270,12 +1270,12 @@ ${p}` : p;
1270
1270
  table(t) {
1271
1271
  let e = this.rules.block.table.exec(t);
1272
1272
  if (!e || !this.rules.other.tableDelimiter.test(e[2])) return;
1273
- let n = jn(e[1]), s = e[2].replace(this.rules.other.tableAlignChars, "").split("|"), r = e[3]?.trim() ? e[3].replace(this.rules.other.tableRowBlankLine, "").split(`
1273
+ let n = qn(e[1]), s = e[2].replace(this.rules.other.tableAlignChars, "").split("|"), r = e[3]?.trim() ? e[3].replace(this.rules.other.tableRowBlankLine, "").split(`
1274
1274
  `) : [], a = { type: "table", raw: e[0], header: [], align: [], rows: [] };
1275
1275
  if (n.length === s.length) {
1276
1276
  for (let o of s) this.rules.other.tableAlignRight.test(o) ? a.align.push("right") : this.rules.other.tableAlignCenter.test(o) ? a.align.push("center") : this.rules.other.tableAlignLeft.test(o) ? a.align.push("left") : a.align.push(null);
1277
1277
  for (let o = 0; o < n.length; o++) a.header.push({ text: n[o], tokens: this.lexer.inline(n[o]), header: !0, align: a.align[o] });
1278
- for (let o of r) a.rows.push(jn(o, a.header.length).map((c, f) => ({ text: c, tokens: this.lexer.inline(c), header: !1, align: a.align[f] })));
1278
+ for (let o of r) a.rows.push(qn(o, a.header.length).map((c, d) => ({ text: c, tokens: this.lexer.inline(c), header: !1, align: a.align[d] })));
1279
1279
  return a;
1280
1280
  }
1281
1281
  }
@@ -1315,7 +1315,7 @@ ${p}` : p;
1315
1315
  let a = Ke(n.slice(0, -1), "\\");
1316
1316
  if ((n.length - a.length) % 2 === 0) return;
1317
1317
  } else {
1318
- let a = jr(e[2], "()");
1318
+ let a = Wr(e[2], "()");
1319
1319
  if (a === -2) return;
1320
1320
  if (a > -1) {
1321
1321
  let o = (e[0].indexOf("!") === 0 ? 5 : 4) + e[1].length + a;
@@ -1327,7 +1327,7 @@ ${p}` : p;
1327
1327
  let a = this.rules.other.pedanticHrefTitle.exec(s);
1328
1328
  a && (s = a[1], r = a[3]);
1329
1329
  } else r = e[3] ? e[3].slice(1, -1) : "";
1330
- return s = s.trim(), this.rules.other.startAngleBracket.test(s) && (this.options.pedantic && !this.rules.other.endAngleBracket.test(n) ? s = s.slice(1) : s = s.slice(1, -1)), qn(e, { href: s && s.replace(this.rules.inline.anyPunctuation, "$1"), title: r && r.replace(this.rules.inline.anyPunctuation, "$1") }, e[0], this.lexer, this.rules);
1330
+ return s = s.trim(), this.rules.other.startAngleBracket.test(s) && (this.options.pedantic && !this.rules.other.endAngleBracket.test(n) ? s = s.slice(1) : s = s.slice(1, -1)), Vn(e, { href: s && s.replace(this.rules.inline.anyPunctuation, "$1"), title: r && r.replace(this.rules.inline.anyPunctuation, "$1") }, e[0], this.lexer, this.rules);
1331
1331
  }
1332
1332
  }
1333
1333
  reflink(t, e) {
@@ -1338,31 +1338,31 @@ ${p}` : p;
1338
1338
  let a = n[0].charAt(0);
1339
1339
  return { type: "text", raw: a, text: a };
1340
1340
  }
1341
- return qn(n, r, n[0], this.lexer, this.rules);
1341
+ return Vn(n, r, n[0], this.lexer, this.rules);
1342
1342
  }
1343
1343
  }
1344
1344
  emStrong(t, e, n = "") {
1345
1345
  let s = this.rules.inline.emStrongLDelim.exec(t);
1346
1346
  if (!(!s || !s[1] && !s[2] && !s[3] && !s[4] || s[4] && n.match(this.rules.other.unicodeAlphaNumeric)) && (!(s[1] || s[3]) || !n || this.rules.inline.punctuation.exec(n))) {
1347
- let r = [...s[0]].length - 1, a, o, c = r, f = 0, d = s[0][0] === "*" ? this.rules.inline.emStrongRDelimAst : this.rules.inline.emStrongRDelimUnd;
1348
- for (d.lastIndex = 0, e = e.slice(-1 * t.length + r); (s = d.exec(e)) != null; ) {
1347
+ let r = [...s[0]].length - 1, a, o, c = r, d = 0, g = s[0][0] === "*" ? this.rules.inline.emStrongRDelimAst : this.rules.inline.emStrongRDelimUnd;
1348
+ for (g.lastIndex = 0, e = e.slice(-1 * t.length + r); (s = g.exec(e)) != null; ) {
1349
1349
  if (a = s[1] || s[2] || s[3] || s[4] || s[5] || s[6], !a) continue;
1350
1350
  if (o = [...a].length, s[3] || s[4]) {
1351
1351
  c += o;
1352
1352
  continue;
1353
1353
  } else if ((s[5] || s[6]) && r % 3 && !((r + o) % 3)) {
1354
- f += o;
1354
+ d += o;
1355
1355
  continue;
1356
1356
  }
1357
1357
  if (c -= o, c > 0) continue;
1358
- o = Math.min(o, o + c + f);
1359
- let p = [...s[0]][0].length, g = t.slice(0, r + s.index + p + o);
1358
+ o = Math.min(o, o + c + d);
1359
+ let p = [...s[0]][0].length, m = t.slice(0, r + s.index + p + o);
1360
1360
  if (Math.min(r, o) % 2) {
1361
- let w = g.slice(1, -1);
1362
- return { type: "em", raw: g, text: w, tokens: this.lexer.inlineTokens(w) };
1361
+ let k = m.slice(1, -1);
1362
+ return { type: "em", raw: m, text: k, tokens: this.lexer.inlineTokens(k) };
1363
1363
  }
1364
- let m = g.slice(2, -2);
1365
- return { type: "strong", raw: g, text: m, tokens: this.lexer.inlineTokens(m) };
1364
+ let f = m.slice(2, -2);
1365
+ return { type: "strong", raw: m, text: f, tokens: this.lexer.inlineTokens(f) };
1366
1366
  }
1367
1367
  }
1368
1368
  }
@@ -1380,8 +1380,8 @@ ${p}` : p;
1380
1380
  del(t, e, n = "") {
1381
1381
  let s = this.rules.inline.delLDelim.exec(t);
1382
1382
  if (s && (!s[1] || !n || this.rules.inline.punctuation.exec(n))) {
1383
- let r = [...s[0]].length - 1, a, o, c = r, f = this.rules.inline.delRDelim;
1384
- for (f.lastIndex = 0, e = e.slice(-1 * t.length + r); (s = f.exec(e)) != null; ) {
1383
+ let r = [...s[0]].length - 1, a, o, c = r, d = this.rules.inline.delRDelim;
1384
+ for (d.lastIndex = 0, e = e.slice(-1 * t.length + r); (s = d.exec(e)) != null; ) {
1385
1385
  if (a = s[1] || s[2] || s[3] || s[4] || s[5] || s[6], !a || (o = [...a].length, o !== r)) continue;
1386
1386
  if (s[3] || s[4]) {
1387
1387
  c += o;
@@ -1389,8 +1389,8 @@ ${p}` : p;
1389
1389
  }
1390
1390
  if (c -= o, c > 0) continue;
1391
1391
  o = Math.min(o, o + c);
1392
- let d = [...s[0]][0].length, p = t.slice(0, r + s.index + d + o), g = p.slice(r, -r);
1393
- return { type: "del", raw: p, text: g, tokens: this.lexer.inlineTokens(g) };
1392
+ let g = [...s[0]][0].length, p = t.slice(0, r + s.index + g + o), m = p.slice(r, -r);
1393
+ return { type: "del", raw: p, text: m, tokens: this.lexer.inlineTokens(m) };
1394
1394
  }
1395
1395
  }
1396
1396
  }
@@ -1423,28 +1423,28 @@ ${p}` : p;
1423
1423
  return { type: "text", raw: e[0], text: e[0], escaped: n };
1424
1424
  }
1425
1425
  }
1426
- }, u(Oe, "w"), Oe), we, se = (we = class {
1426
+ }, u(Ne, "w"), Ne), ke, re = (ke = class {
1427
1427
  constructor(t) {
1428
- D(this, "tokens");
1429
- D(this, "options");
1430
- D(this, "state");
1431
- D(this, "inlineQueue");
1432
- D(this, "tokenizer");
1433
- this.tokens = [], this.tokens.links = /* @__PURE__ */ Object.create(null), this.options = t || Re, this.options.tokenizer = this.options.tokenizer || new wt(), this.tokenizer = this.options.tokenizer, this.tokenizer.options = this.options, this.tokenizer.lexer = this, this.inlineQueue = [], this.state = { inLink: !1, inRawBlock: !1, top: !0 };
1434
- let e = { other: Y, block: dt.normal, inline: Xe.normal };
1435
- this.options.pedantic ? (e.block = dt.pedantic, e.inline = Xe.pedantic) : this.options.gfm && (e.block = dt.gfm, this.options.breaks ? e.inline = Xe.breaks : e.inline = Xe.gfm), this.tokenizer.rules = e;
1428
+ C(this, "tokens");
1429
+ C(this, "options");
1430
+ C(this, "state");
1431
+ C(this, "inlineQueue");
1432
+ C(this, "tokenizer");
1433
+ this.tokens = [], this.tokens.links = /* @__PURE__ */ Object.create(null), this.options = t || _e, this.options.tokenizer = this.options.tokenizer || new wt(), this.tokenizer = this.options.tokenizer, this.tokenizer.options = this.options, this.tokenizer.lexer = this, this.inlineQueue = [], this.state = { inLink: !1, inRawBlock: !1, top: !0 };
1434
+ let e = { other: Z, block: ft.normal, inline: Xe.normal };
1435
+ this.options.pedantic ? (e.block = ft.pedantic, e.inline = Xe.pedantic) : this.options.gfm && (e.block = ft.gfm, this.options.breaks ? e.inline = Xe.breaks : e.inline = Xe.gfm), this.tokenizer.rules = e;
1436
1436
  }
1437
1437
  static get rules() {
1438
- return { block: dt, inline: Xe };
1438
+ return { block: ft, inline: Xe };
1439
1439
  }
1440
1440
  static lex(t, e) {
1441
- return new we(e).lex(t);
1441
+ return new ke(e).lex(t);
1442
1442
  }
1443
1443
  static lexInline(t, e) {
1444
- return new we(e).inlineTokens(t);
1444
+ return new ke(e).inlineTokens(t);
1445
1445
  }
1446
1446
  lex(t) {
1447
- t = t.replace(Y.carriageReturn, `
1447
+ t = t.replace(Z.carriageReturn, `
1448
1448
  `), this.blockTokens(t, this.tokens);
1449
1449
  for (let e = 0; e < this.inlineQueue.length; e++) {
1450
1450
  let n = this.inlineQueue[e];
@@ -1453,7 +1453,7 @@ ${p}` : p;
1453
1453
  return this.inlineQueue = [], this.tokens;
1454
1454
  }
1455
1455
  blockTokens(t, e = [], n = !1) {
1456
- for (this.tokenizer.lexer = this, this.options.pedantic && (t = t.replace(Y.tabCharGlobal, " ").replace(Y.spaceLine, "")); t; ) {
1456
+ for (this.tokenizer.lexer = this, this.options.pedantic && (t = t.replace(Z.tabCharGlobal, " ").replace(Z.spaceLine, "")); t; ) {
1457
1457
  let s;
1458
1458
  if (this.options.extensions?.block?.some((a) => (s = a.call({ lexer: this }, t, e)) ? (t = t.substring(s.raw.length), e.push(s), !0) : !1)) continue;
1459
1459
  if (s = this.tokenizer.space(t)) {
@@ -1516,8 +1516,8 @@ ${p}` : p;
1516
1516
  let r = t;
1517
1517
  if (this.options.extensions?.startBlock) {
1518
1518
  let a = 1 / 0, o = t.slice(1), c;
1519
- this.options.extensions.startBlock.forEach((f) => {
1520
- c = f.call({ lexer: this }, o), typeof c == "number" && c >= 0 && (a = Math.min(a, c));
1519
+ this.options.extensions.startBlock.forEach((d) => {
1520
+ c = d.call({ lexer: this }, o), typeof c == "number" && c >= 0 && (a = Math.min(a, c));
1521
1521
  }), a < 1 / 0 && a >= 0 && (r = t.substring(0, a + 1));
1522
1522
  }
1523
1523
  if (this.state.top && (s = this.tokenizer.paragraph(r))) {
@@ -1565,7 +1565,7 @@ ${p}` : p;
1565
1565
  for (; t; ) {
1566
1566
  a || (o = ""), a = !1;
1567
1567
  let c;
1568
- if (this.options.extensions?.inline?.some((d) => (c = d.call({ lexer: this }, t, e)) ? (t = t.substring(c.raw.length), e.push(c), !0) : !1)) continue;
1568
+ if (this.options.extensions?.inline?.some((g) => (c = g.call({ lexer: this }, t, e)) ? (t = t.substring(c.raw.length), e.push(c), !0) : !1)) continue;
1569
1569
  if (c = this.tokenizer.escape(t)) {
1570
1570
  t = t.substring(c.raw.length), e.push(c);
1571
1571
  continue;
@@ -1580,8 +1580,8 @@ ${p}` : p;
1580
1580
  }
1581
1581
  if (c = this.tokenizer.reflink(t, this.tokens.links)) {
1582
1582
  t = t.substring(c.raw.length);
1583
- let d = e.at(-1);
1584
- c.type === "text" && d?.type === "text" ? (d.raw += c.raw, d.text += c.text) : e.push(c);
1583
+ let g = e.at(-1);
1584
+ c.type === "text" && g?.type === "text" ? (g.raw += c.raw, g.text += c.text) : e.push(c);
1585
1585
  continue;
1586
1586
  }
1587
1587
  if (c = this.tokenizer.emStrong(t, n, o)) {
@@ -1608,43 +1608,43 @@ ${p}` : p;
1608
1608
  t = t.substring(c.raw.length), e.push(c);
1609
1609
  continue;
1610
1610
  }
1611
- let f = t;
1611
+ let d = t;
1612
1612
  if (this.options.extensions?.startInline) {
1613
- let d = 1 / 0, p = t.slice(1), g;
1614
- this.options.extensions.startInline.forEach((m) => {
1615
- g = m.call({ lexer: this }, p), typeof g == "number" && g >= 0 && (d = Math.min(d, g));
1616
- }), d < 1 / 0 && d >= 0 && (f = t.substring(0, d + 1));
1613
+ let g = 1 / 0, p = t.slice(1), m;
1614
+ this.options.extensions.startInline.forEach((f) => {
1615
+ m = f.call({ lexer: this }, p), typeof m == "number" && m >= 0 && (g = Math.min(g, m));
1616
+ }), g < 1 / 0 && g >= 0 && (d = t.substring(0, g + 1));
1617
1617
  }
1618
- if (c = this.tokenizer.inlineText(f)) {
1618
+ if (c = this.tokenizer.inlineText(d)) {
1619
1619
  t = t.substring(c.raw.length), c.raw.slice(-1) !== "_" && (o = c.raw.slice(-1)), a = !0;
1620
- let d = e.at(-1);
1621
- d?.type === "text" ? (d.raw += c.raw, d.text += c.text) : e.push(c);
1620
+ let g = e.at(-1);
1621
+ g?.type === "text" ? (g.raw += c.raw, g.text += c.text) : e.push(c);
1622
1622
  continue;
1623
1623
  }
1624
1624
  if (t) {
1625
- let d = "Infinite loop on byte: " + t.charCodeAt(0);
1625
+ let g = "Infinite loop on byte: " + t.charCodeAt(0);
1626
1626
  if (this.options.silent) {
1627
- console.error(d);
1627
+ console.error(g);
1628
1628
  break;
1629
- } else throw new Error(d);
1629
+ } else throw new Error(g);
1630
1630
  }
1631
1631
  }
1632
1632
  return e;
1633
1633
  }
1634
- }, u(we, "u"), we), Ne, vt = (Ne = class {
1634
+ }, u(ke, "u"), ke), Pe, vt = (Pe = class {
1635
1635
  constructor(t) {
1636
- D(this, "options");
1637
- D(this, "parser");
1638
- this.options = t || Re;
1636
+ C(this, "options");
1637
+ C(this, "parser");
1638
+ this.options = t || _e;
1639
1639
  }
1640
1640
  space(t) {
1641
1641
  return "";
1642
1642
  }
1643
1643
  code({ text: t, lang: e, escaped: n }) {
1644
- let s = (e || "").match(Y.notSpaceStart)?.[0], r = t.replace(Y.endingNewline, "") + `
1644
+ let s = (e || "").match(Z.notSpaceStart)?.[0], r = t.replace(Z.endingNewline, "") + `
1645
1645
  `;
1646
- return s ? '<pre><code class="language-' + oe(s) + '">' + (n ? r : oe(r, !0)) + `</code></pre>
1647
- ` : "<pre><code>" + (n ? r : oe(r, !0)) + `</code></pre>
1646
+ return s ? '<pre><code class="language-' + ce(s) + '">' + (n ? r : ce(r, !0)) + `</code></pre>
1647
+ ` : "<pre><code>" + (n ? r : ce(r, !0)) + `</code></pre>
1648
1648
  `;
1649
1649
  }
1650
1650
  blockquote({ tokens: t }) {
@@ -1722,7 +1722,7 @@ ${t}</tr>
1722
1722
  return `<em>${this.parser.parseInline(t)}</em>`;
1723
1723
  }
1724
1724
  codespan({ text: t }) {
1725
- return `<code>${oe(t, !0)}</code>`;
1725
+ return `<code>${ce(t, !0)}</code>`;
1726
1726
  }
1727
1727
  br(t) {
1728
1728
  return "<br>";
@@ -1731,24 +1731,24 @@ ${t}</tr>
1731
1731
  return `<del>${this.parser.parseInline(t)}</del>`;
1732
1732
  }
1733
1733
  link({ href: t, title: e, tokens: n }) {
1734
- let s = this.parser.parseInline(n), r = Wn(t);
1734
+ let s = this.parser.parseInline(n), r = jn(t);
1735
1735
  if (r === null) return s;
1736
1736
  t = r;
1737
1737
  let a = '<a href="' + t + '"';
1738
- return e && (a += ' title="' + oe(e) + '"'), a += ">" + s + "</a>", a;
1738
+ return e && (a += ' title="' + ce(e) + '"'), a += ">" + s + "</a>", a;
1739
1739
  }
1740
1740
  image({ href: t, title: e, text: n, tokens: s }) {
1741
1741
  s && (n = this.parser.parseInline(s, this.parser.textRenderer));
1742
- let r = Wn(t);
1743
- if (r === null) return oe(n);
1742
+ let r = jn(t);
1743
+ if (r === null) return ce(n);
1744
1744
  t = r;
1745
- let a = `<img src="${t}" alt="${oe(n)}"`;
1746
- return e && (a += ` title="${oe(e)}"`), a += ">", a;
1745
+ let a = `<img src="${t}" alt="${ce(n)}"`;
1746
+ return e && (a += ` title="${ce(e)}"`), a += ">", a;
1747
1747
  }
1748
1748
  text(t) {
1749
- return "tokens" in t && t.tokens ? this.parser.parseInline(t.tokens) : "escaped" in t && t.escaped ? t.text : oe(t.text);
1749
+ return "tokens" in t && t.tokens ? this.parser.parseInline(t.tokens) : "escaped" in t && t.escaped ? t.text : ce(t.text);
1750
1750
  }
1751
- }, u(Ne, "y"), Ne), Pe, an = (Pe = class {
1751
+ }, u(Pe, "y"), Pe), $e, ln = ($e = class {
1752
1752
  strong({ text: t }) {
1753
1753
  return t;
1754
1754
  }
@@ -1779,18 +1779,18 @@ ${t}</tr>
1779
1779
  checkbox({ raw: t }) {
1780
1780
  return t;
1781
1781
  }
1782
- }, u(Pe, "$"), Pe), ve, re = (ve = class {
1782
+ }, u($e, "$"), $e), we, ie = (we = class {
1783
1783
  constructor(t) {
1784
- D(this, "options");
1785
- D(this, "renderer");
1786
- D(this, "textRenderer");
1787
- this.options = t || Re, this.options.renderer = this.options.renderer || new vt(), this.renderer = this.options.renderer, this.renderer.options = this.options, this.renderer.parser = this, this.textRenderer = new an();
1784
+ C(this, "options");
1785
+ C(this, "renderer");
1786
+ C(this, "textRenderer");
1787
+ this.options = t || _e, this.options.renderer = this.options.renderer || new vt(), this.renderer = this.options.renderer, this.renderer.options = this.options, this.renderer.parser = this, this.textRenderer = new ln();
1788
1788
  }
1789
1789
  static parse(t, e) {
1790
- return new ve(e).parse(t);
1790
+ return new we(e).parse(t);
1791
1791
  }
1792
1792
  static parseInline(t, e) {
1793
- return new ve(e).parseInline(t);
1793
+ return new we(e).parseInline(t);
1794
1794
  }
1795
1795
  parse(t) {
1796
1796
  this.renderer.parser = this;
@@ -1930,11 +1930,11 @@ ${t}</tr>
1930
1930
  }
1931
1931
  return n;
1932
1932
  }
1933
- }, u(ve, "u"), ve), be, Qe = (be = class {
1933
+ }, u(we, "u"), we), be, Qe = (be = class {
1934
1934
  constructor(t) {
1935
- D(this, "options");
1936
- D(this, "block");
1937
- this.options = t || Re;
1935
+ C(this, "options");
1936
+ C(this, "block");
1937
+ this.options = t || _e;
1938
1938
  }
1939
1939
  preprocess(t) {
1940
1940
  return t;
@@ -1949,23 +1949,23 @@ ${t}</tr>
1949
1949
  return t;
1950
1950
  }
1951
1951
  provideLexer() {
1952
- return this.block ? se.lex : se.lexInline;
1952
+ return this.block ? re.lex : re.lexInline;
1953
1953
  }
1954
1954
  provideParser() {
1955
- return this.block ? re.parse : re.parseInline;
1955
+ return this.block ? ie.parse : ie.parseInline;
1956
1956
  }
1957
- }, u(be, "P"), D(be, "passThroughHooks", /* @__PURE__ */ new Set(["preprocess", "postprocess", "processAllTokens", "emStrongMask"])), D(be, "passThroughHooksRespectAsync", /* @__PURE__ */ new Set(["preprocess", "postprocess", "processAllTokens"])), be), $e, Yr = ($e = class {
1957
+ }, u(be, "P"), C(be, "passThroughHooks", /* @__PURE__ */ new Set(["preprocess", "postprocess", "processAllTokens", "emStrongMask"])), C(be, "passThroughHooksRespectAsync", /* @__PURE__ */ new Set(["preprocess", "postprocess", "processAllTokens"])), be), Ue, Vr = (Ue = class {
1958
1958
  constructor(...t) {
1959
- D(this, "defaults", Kt());
1960
- D(this, "options", this.setOptions);
1961
- D(this, "parse", this.parseMarkdown(!0));
1962
- D(this, "parseInline", this.parseMarkdown(!1));
1963
- D(this, "Parser", re);
1964
- D(this, "Renderer", vt);
1965
- D(this, "TextRenderer", an);
1966
- D(this, "Lexer", se);
1967
- D(this, "Tokenizer", wt);
1968
- D(this, "Hooks", Qe);
1959
+ C(this, "defaults", Qt());
1960
+ C(this, "options", this.setOptions);
1961
+ C(this, "parse", this.parseMarkdown(!0));
1962
+ C(this, "parseInline", this.parseMarkdown(!1));
1963
+ C(this, "Parser", ie);
1964
+ C(this, "Renderer", vt);
1965
+ C(this, "TextRenderer", ln);
1966
+ C(this, "Lexer", re);
1967
+ C(this, "Tokenizer", wt);
1968
+ C(this, "Hooks", Qe);
1969
1969
  this.use(...t);
1970
1970
  }
1971
1971
  walkTokens(t, e) {
@@ -2016,10 +2016,10 @@ ${t}</tr>
2016
2016
  for (let a in n.renderer) {
2017
2017
  if (!(a in r)) throw new Error(`renderer '${a}' does not exist`);
2018
2018
  if (["options", "parser"].includes(a)) continue;
2019
- let o = a, c = n.renderer[o], f = r[o];
2020
- r[o] = (...d) => {
2021
- let p = c.apply(r, d);
2022
- return p === !1 && (p = f.apply(r, d)), p || "";
2019
+ let o = a, c = n.renderer[o], d = r[o];
2020
+ r[o] = (...g) => {
2021
+ let p = c.apply(r, g);
2022
+ return p === !1 && (p = d.apply(r, g)), p || "";
2023
2023
  };
2024
2024
  }
2025
2025
  s.renderer = r;
@@ -2029,10 +2029,10 @@ ${t}</tr>
2029
2029
  for (let a in n.tokenizer) {
2030
2030
  if (!(a in r)) throw new Error(`tokenizer '${a}' does not exist`);
2031
2031
  if (["options", "rules", "lexer"].includes(a)) continue;
2032
- let o = a, c = n.tokenizer[o], f = r[o];
2033
- r[o] = (...d) => {
2034
- let p = c.apply(r, d);
2035
- return p === !1 && (p = f.apply(r, d)), p;
2032
+ let o = a, c = n.tokenizer[o], d = r[o];
2033
+ r[o] = (...g) => {
2034
+ let p = c.apply(r, g);
2035
+ return p === !1 && (p = d.apply(r, g)), p;
2036
2036
  };
2037
2037
  }
2038
2038
  s.tokenizer = r;
@@ -2042,21 +2042,21 @@ ${t}</tr>
2042
2042
  for (let a in n.hooks) {
2043
2043
  if (!(a in r)) throw new Error(`hook '${a}' does not exist`);
2044
2044
  if (["options", "block"].includes(a)) continue;
2045
- let o = a, c = n.hooks[o], f = r[o];
2046
- Qe.passThroughHooks.has(a) ? r[o] = (d) => {
2045
+ let o = a, c = n.hooks[o], d = r[o];
2046
+ Qe.passThroughHooks.has(a) ? r[o] = (g) => {
2047
2047
  if (this.defaults.async && Qe.passThroughHooksRespectAsync.has(a)) return (async () => {
2048
- let g = await c.call(r, d);
2049
- return f.call(r, g);
2048
+ let m = await c.call(r, g);
2049
+ return d.call(r, m);
2050
2050
  })();
2051
- let p = c.call(r, d);
2052
- return f.call(r, p);
2053
- } : r[o] = (...d) => {
2051
+ let p = c.call(r, g);
2052
+ return d.call(r, p);
2053
+ } : r[o] = (...g) => {
2054
2054
  if (this.defaults.async) return (async () => {
2055
- let g = await c.apply(r, d);
2056
- return g === !1 && (g = await f.apply(r, d)), g;
2055
+ let m = await c.apply(r, g);
2056
+ return m === !1 && (m = await d.apply(r, g)), m;
2057
2057
  })();
2058
- let p = c.apply(r, d);
2059
- return p === !1 && (p = f.apply(r, d)), p;
2058
+ let p = c.apply(r, g);
2059
+ return p === !1 && (p = d.apply(r, g)), p;
2060
2060
  };
2061
2061
  }
2062
2062
  s.hooks = r;
@@ -2075,10 +2075,10 @@ ${t}</tr>
2075
2075
  return this.defaults = { ...this.defaults, ...t }, this;
2076
2076
  }
2077
2077
  lexer(t, e) {
2078
- return se.lex(t, e ?? this.defaults);
2078
+ return re.lex(t, e ?? this.defaults);
2079
2079
  }
2080
2080
  parser(t, e) {
2081
- return re.parse(t, e ?? this.defaults);
2081
+ return ie.parse(t, e ?? this.defaults);
2082
2082
  }
2083
2083
  parseMarkdown(t) {
2084
2084
  return (e, n) => {
@@ -2087,16 +2087,16 @@ ${t}</tr>
2087
2087
  if (typeof e > "u" || e === null) return a(new Error("marked(): input parameter is undefined or null"));
2088
2088
  if (typeof e != "string") return a(new Error("marked(): input parameter is of type " + Object.prototype.toString.call(e) + ", string expected"));
2089
2089
  if (r.hooks && (r.hooks.options = r, r.hooks.block = t), r.async) return (async () => {
2090
- let o = r.hooks ? await r.hooks.preprocess(e) : e, c = await (r.hooks ? await r.hooks.provideLexer() : t ? se.lex : se.lexInline)(o, r), f = r.hooks ? await r.hooks.processAllTokens(c) : c;
2091
- r.walkTokens && await Promise.all(this.walkTokens(f, r.walkTokens));
2092
- let d = await (r.hooks ? await r.hooks.provideParser() : t ? re.parse : re.parseInline)(f, r);
2093
- return r.hooks ? await r.hooks.postprocess(d) : d;
2090
+ let o = r.hooks ? await r.hooks.preprocess(e) : e, c = await (r.hooks ? await r.hooks.provideLexer() : t ? re.lex : re.lexInline)(o, r), d = r.hooks ? await r.hooks.processAllTokens(c) : c;
2091
+ r.walkTokens && await Promise.all(this.walkTokens(d, r.walkTokens));
2092
+ let g = await (r.hooks ? await r.hooks.provideParser() : t ? ie.parse : ie.parseInline)(d, r);
2093
+ return r.hooks ? await r.hooks.postprocess(g) : g;
2094
2094
  })().catch(a);
2095
2095
  try {
2096
2096
  r.hooks && (e = r.hooks.preprocess(e));
2097
- let o = (r.hooks ? r.hooks.provideLexer() : t ? se.lex : se.lexInline)(e, r);
2097
+ let o = (r.hooks ? r.hooks.provideLexer() : t ? re.lex : re.lexInline)(e, r);
2098
2098
  r.hooks && (o = r.hooks.processAllTokens(o)), r.walkTokens && this.walkTokens(o, r.walkTokens);
2099
- let c = (r.hooks ? r.hooks.provideParser() : t ? re.parse : re.parseInline)(o, r);
2099
+ let c = (r.hooks ? r.hooks.provideParser() : t ? ie.parse : ie.parseInline)(o, r);
2100
2100
  return r.hooks && (c = r.hooks.postprocess(c)), c;
2101
2101
  } catch (o) {
2102
2102
  return a(o);
@@ -2107,71 +2107,71 @@ ${t}</tr>
2107
2107
  return (n) => {
2108
2108
  if (n.message += `
2109
2109
  Please report this to https://github.com/markedjs/marked.`, t) {
2110
- let s = "<p>An error occurred:</p><pre>" + oe(n.message + "", !0) + "</pre>";
2110
+ let s = "<p>An error occurred:</p><pre>" + ce(n.message + "", !0) + "</pre>";
2111
2111
  return e ? Promise.resolve(s) : s;
2112
2112
  }
2113
2113
  if (e) return Promise.reject(n);
2114
2114
  throw n;
2115
2115
  };
2116
2116
  }
2117
- }, u($e, "D"), $e), Ee = new Yr();
2118
- function M(l, t) {
2119
- return Ee.parse(l, t);
2117
+ }, u(Ue, "D"), Ue), Ae = new Vr();
2118
+ function L(l, t) {
2119
+ return Ae.parse(l, t);
2120
2120
  }
2121
- u(M, "g");
2122
- M.options = M.setOptions = function(l) {
2123
- return Ee.setOptions(l), M.defaults = Ee.defaults, ts(M.defaults), M;
2121
+ u(L, "g");
2122
+ L.options = L.setOptions = function(l) {
2123
+ return Ae.setOptions(l), L.defaults = Ae.defaults, ns(L.defaults), L;
2124
2124
  };
2125
- M.getDefaults = Kt;
2126
- M.defaults = Re;
2127
- M.use = function(...l) {
2128
- return Ee.use(...l), M.defaults = Ee.defaults, ts(M.defaults), M;
2125
+ L.getDefaults = Qt;
2126
+ L.defaults = _e;
2127
+ L.use = function(...l) {
2128
+ return Ae.use(...l), L.defaults = Ae.defaults, ns(L.defaults), L;
2129
2129
  };
2130
- M.walkTokens = function(l, t) {
2131
- return Ee.walkTokens(l, t);
2130
+ L.walkTokens = function(l, t) {
2131
+ return Ae.walkTokens(l, t);
2132
2132
  };
2133
- M.parseInline = Ee.parseInline;
2134
- M.Parser = re;
2135
- M.parser = re.parse;
2136
- M.Renderer = vt;
2137
- M.TextRenderer = an;
2138
- M.Lexer = se;
2139
- M.lexer = se.lex;
2140
- M.Tokenizer = wt;
2141
- M.Hooks = Qe;
2142
- M.parse = M;
2143
- M.options;
2144
- M.setOptions;
2145
- M.use;
2146
- M.walkTokens;
2147
- M.parseInline;
2148
- re.parse;
2149
- se.lex;
2150
- const Zr = { class: "flex flex-col h-full relative" }, Xr = {
2133
+ L.parseInline = Ae.parseInline;
2134
+ L.Parser = ie;
2135
+ L.parser = ie.parse;
2136
+ L.Renderer = vt;
2137
+ L.TextRenderer = ln;
2138
+ L.Lexer = re;
2139
+ L.lexer = re.lex;
2140
+ L.Tokenizer = wt;
2141
+ L.Hooks = Qe;
2142
+ L.parse = L;
2143
+ L.options;
2144
+ L.setOptions;
2145
+ L.use;
2146
+ L.walkTokens;
2147
+ L.parseInline;
2148
+ ie.parse;
2149
+ re.lex;
2150
+ const Yr = { class: "flex flex-col h-full relative" }, Zr = {
2151
2151
  key: 0,
2152
2152
  class: "pb-4"
2153
- }, Kr = {
2153
+ }, Xr = {
2154
2154
  key: 0,
2155
2155
  class: "flex flex-col items-center justify-center pt-12 pb-6 px-4"
2156
- }, Qr = { class: "relative mb-3" }, Jr = ["src", "alt"], ei = ["title"], ti = {
2156
+ }, Kr = { class: "relative mb-3" }, Qr = ["src", "alt"], Jr = ["title"], ei = {
2157
2157
  key: 0,
2158
2158
  class: "flex items-center gap-3 py-3 px-2"
2159
- }, ni = ["src", "alt"], si = ["src", "alt"], ri = ["src"], ii = ["href"], ai = ["innerHTML"], li = {
2159
+ }, ti = ["src", "alt"], ni = ["src", "alt"], si = ["src"], ri = ["href"], ii = ["innerHTML"], ai = {
2160
2160
  key: 1,
2161
2161
  class: "flex gap-2 justify-start items-end mb-4"
2162
- }, oi = { class: "flex-shrink-0" }, ci = ["src", "alt"], ui = { class: "flex-shrink-0 pt-4 pb-2 px-3" }, hi = {
2162
+ }, li = { class: "flex-shrink-0" }, oi = ["src", "alt"], ci = {
2163
2163
  key: 0,
2164
- class: "flex items-center gap-2 px-3 pb-2 overflow-x-auto"
2165
- }, pi = ["src", "alt"], fi = { class: "max-w-20 truncate" }, di = ["onClick"], gi = {
2164
+ class: "flex items-center gap-2 px-2 pb-2 overflow-x-auto"
2165
+ }, ui = ["src", "alt"], hi = { class: "max-w-20 truncate" }, pi = ["onClick"], di = {
2166
2166
  key: 0,
2167
2167
  class: "shrink-0 flex items-center justify-center size-14"
2168
- }, mi = ["disabled"], xi = {
2168
+ }, fi = ["disabled"], gi = {
2169
2169
  key: 0,
2170
2170
  class: "i-svg-spinners-ring-resize size-4"
2171
- }, ki = {
2171
+ }, mi = {
2172
2172
  key: 1,
2173
2173
  class: "i-tabler-paperclip size-5"
2174
- }, bi = ["placeholder", "disabled"], wi = ["disabled"], Mi = /* @__PURE__ */ _e({
2174
+ }, xi = ["placeholder", "disabled"], bi = ["disabled"], Ci = /* @__PURE__ */ Ee({
2175
2175
  __name: "ElAgentChat",
2176
2176
  props: {
2177
2177
  chatController: {},
@@ -2185,13 +2185,13 @@ const Zr = { class: "flex flex-col h-full relative" }, Xr = {
2185
2185
  emptyStateMessage: {}
2186
2186
  },
2187
2187
  setup(l) {
2188
- const t = new M.Renderer();
2189
- t.link = ({ href: E, text: _ }) => `<a href="${E}" target="_blank" rel="noopener noreferrer">${_}</a>`, M.setOptions({ breaks: !0, gfm: !0, renderer: t });
2188
+ const t = new L.Renderer();
2189
+ t.link = ({ href: E, text: x }) => `<a href="${E}" target="_blank" rel="noopener noreferrer">${x}</a>`, L.setOptions({ breaks: !0, gfm: !0, renderer: t });
2190
2190
  function e(E) {
2191
2191
  if (!E)
2192
2192
  return "";
2193
- const _ = M.parse(E, { async: !1 });
2194
- return lr.sanitize(_, { ADD_ATTR: ["target"] });
2193
+ const x = L.parse(E, { async: !1 });
2194
+ return ar.sanitize(x, { ADD_ATTR: ["target"] });
2195
2195
  }
2196
2196
  u(e, "renderMarkdown");
2197
2197
  const n = {
@@ -2205,15 +2205,15 @@ const Zr = { class: "flex flex-col h-full relative" }, Xr = {
2205
2205
  }, r = W(() => l.setupHint ?? n[l.scope]), a = W(() => {
2206
2206
  const E = { ...s[l.scope] };
2207
2207
  return l.scope === "org" && l.scopeName && (E.label = l.scopeName, E.tooltip = `Visible to ${l.scopeName} members`), E;
2208
- }), o = W(() => l.scale === "lg"), c = Q(""), f = Q(), d = Q(), p = Q(), g = Q([]), m = Q(!1);
2209
- function w(E, _) {
2210
- const b = E[_], z = E[_ + 1];
2211
- return !z || z.sender !== b.sender;
2208
+ }), o = W(() => l.scale === "lg"), c = Y(""), d = Y(!1), g = Y(), p = Y(), m = Y(), f = Y([]), k = Y(!1);
2209
+ function _(E, x) {
2210
+ const R = E[x], A = E[x + 1];
2211
+ return !A || A.sender !== R.sender;
2212
2212
  }
2213
- u(w, "shouldShowAvatar");
2214
- const S = W(() => l.chatController?.textState.value), O = W(() => S.value?.isConnected ?? !1), me = W(() => S.value?.isThinking ?? !1), xe = W(() => S.value?.connectionStatus === "disconnected" && !!S.value?.error), te = W(() => S.value?.connectionStatus !== "connected" && !S.value?.error), U = W(() => S.value?.error), q = W(() => l.chatController?.sharedMessages.value?.filter((E) => E.sender !== "system") ?? []), ne = W(() => !O.value), ue = W(() => xe.value ? "Agent is offline" : te.value ? "Connecting..." : "Message"), tt = W(() => (c.value.trim() || g.value.length > 0) && !ne.value && !m.value);
2215
- Xt(async () => {
2216
- if (l.chatController && !O.value)
2213
+ u(_, "shouldShowAvatar");
2214
+ const O = W(() => l.chatController?.textState.value), ee = W(() => O.value?.isConnected ?? !1), Re = W(() => O.value?.isThinking ?? !1), ne = W(() => O.value?.connectionStatus === "disconnected" && !!O.value?.error), P = W(() => O.value?.connectionStatus !== "connected" && !O.value?.error), he = W(() => O.value?.error), q = W(() => l.chatController?.sharedMessages.value?.filter((E) => E.sender !== "system") ?? []), se = W(() => !ee.value), St = W(() => ne.value ? "Agent is offline" : P.value ? "Connecting..." : "Message"), tt = W(() => (c.value.trim() || f.value.length > 0) && !se.value && !k.value);
2215
+ Kt(async () => {
2216
+ if (l.chatController && !ee.value)
2217
2217
  try {
2218
2218
  await l.chatController.startTextConversation();
2219
2219
  } catch (E) {
@@ -2221,336 +2221,350 @@ const Zr = { class: "flex flex-col h-full relative" }, Xr = {
2221
2221
  }
2222
2222
  });
2223
2223
  async function nt() {
2224
- const E = c.value.trim(), _ = g.value.length > 0;
2225
- if (!E && !_ || !l.chatController || !O.value || m.value)
2224
+ const E = c.value.trim(), x = f.value.length > 0;
2225
+ if (!E && !x || !l.chatController || !ee.value || k.value)
2226
2226
  return;
2227
- const b = c.value, z = _ ? [...g.value] : void 0;
2228
- c.value = "", g.value = [], d.value && (d.value.style.height = "auto", d.value.focus());
2227
+ const R = c.value, A = x ? [...f.value] : void 0;
2228
+ c.value = "", f.value = [], p.value && (p.value.style.height = "auto", p.value.focus());
2229
2229
  try {
2230
- await l.chatController.sendChatMessage(b, z), F();
2231
- } catch (I) {
2232
- console.error("Error sending message:", I);
2230
+ await l.chatController.sendChatMessage(R, A), De();
2231
+ } catch (H) {
2232
+ console.error("Error sending message:", H);
2233
2233
  }
2234
2234
  }
2235
2235
  u(nt, "sendMessage");
2236
- function St(E) {
2236
+ function F(E) {
2237
2237
  E.key === "Enter" && !E.shiftKey && (E.preventDefault(), nt());
2238
2238
  }
2239
- u(St, "handleKeydown");
2240
- function F() {
2241
- f.value && $t(() => {
2242
- f.value.scrollTop = f.value.scrollHeight;
2239
+ u(F, "handleKeydown");
2240
+ function De() {
2241
+ g.value && Ut(() => {
2242
+ g.value.scrollTop = g.value.scrollHeight;
2243
2243
  });
2244
2244
  }
2245
- u(F, "scrollToBottom");
2246
- function Be() {
2247
- d.value && (d.value.style.height = "auto", d.value.style.height = `${Math.min(d.value.scrollHeight, 150)}px`);
2248
- }
2249
- u(Be, "adjustTextareaHeight"), Je(c, () => $t(() => Be()));
2250
- const L = W(() => l.variant === "light");
2245
+ u(De, "scrollToBottom");
2251
2246
  function Fe() {
2252
- p.value?.click();
2247
+ p.value && (p.value.style.height = "auto", p.value.style.height = `${Math.min(p.value.scrollHeight, 150)}px`);
2253
2248
  }
2254
- u(Fe, "triggerFileInput");
2255
- async function At(E) {
2256
- const _ = E.target, b = _.files?.[0];
2257
- if (!(!b || !l.uploadFn)) {
2258
- m.value = !0;
2249
+ u(Fe, "adjustTextareaHeight"), Je(c, () => Ut(() => Fe()));
2250
+ const M = W(() => l.variant === "light");
2251
+ function At() {
2252
+ m.value?.click();
2253
+ }
2254
+ u(At, "triggerFileInput");
2255
+ async function Et(E) {
2256
+ const x = E.target, R = x.files?.[0];
2257
+ if (!(!R || !l.uploadFn)) {
2258
+ k.value = !0;
2259
2259
  try {
2260
- const z = await l.uploadFn(b);
2261
- g.value = [...g.value, z];
2262
- } catch (z) {
2263
- console.error("Upload failed:", z);
2260
+ const A = await l.uploadFn(R);
2261
+ f.value = [...f.value, A];
2262
+ } catch (A) {
2263
+ console.error("Upload failed:", A);
2264
2264
  } finally {
2265
- m.value = !1, _.value = "";
2265
+ k.value = !1, x.value = "";
2266
2266
  }
2267
2267
  }
2268
2268
  }
2269
- u(At, "handleFileSelect");
2270
- function Et(E) {
2271
- g.value = g.value.filter((_, b) => b !== E);
2269
+ u(Et, "handleFileSelect");
2270
+ function _t(E) {
2271
+ f.value = f.value.filter((x, R) => R !== E);
2272
2272
  }
2273
- u(Et, "removeAttachment");
2274
- function st(E, _) {
2275
- if (_ === 0) {
2276
- const pe = E[_];
2277
- return pe?.timestamp ? He(new Date(pe.timestamp)) : null;
2278
- }
2279
- const b = E[_ - 1], z = E[_];
2280
- if (!b?.timestamp || !z?.timestamp) return null;
2281
- const I = new Date(b.timestamp).getTime();
2282
- return new Date(z.timestamp).getTime() - I > 36e5 ? He(new Date(z.timestamp)) : null;
2273
+ u(_t, "removeAttachment");
2274
+ function He(E, x) {
2275
+ if (x === 0) {
2276
+ const me = E[x];
2277
+ return me?.timestamp ? st(new Date(me.timestamp)) : null;
2278
+ }
2279
+ const R = E[x - 1], A = E[x];
2280
+ if (!R?.timestamp || !A?.timestamp) return null;
2281
+ const H = new Date(R.timestamp).getTime();
2282
+ return new Date(A.timestamp).getTime() - H > 36e5 ? st(new Date(A.timestamp)) : null;
2283
2283
  }
2284
- u(st, "shouldShowTimeDivider");
2285
- function He(E) {
2286
- const _ = /* @__PURE__ */ new Date(), b = E.toDateString() === _.toDateString(), z = new Date(_);
2287
- z.setDate(z.getDate() - 1);
2288
- const I = E.toDateString() === z.toDateString(), he = E.toLocaleTimeString("en-US", { hour: "numeric", minute: "2-digit" });
2289
- if (b) return he;
2290
- if (I) return `Yesterday, ${he}`;
2291
- const N = E.getFullYear() === _.getFullYear();
2284
+ u(He, "shouldShowTimeDivider");
2285
+ function st(E) {
2286
+ const x = /* @__PURE__ */ new Date(), R = E.toDateString() === x.toDateString(), A = new Date(x);
2287
+ A.setDate(A.getDate() - 1);
2288
+ const H = E.toDateString() === A.toDateString(), z = E.toLocaleTimeString("en-US", { hour: "numeric", minute: "2-digit" });
2289
+ if (R) return z;
2290
+ if (H) return `Yesterday, ${z}`;
2291
+ const ge = E.getFullYear() === x.getFullYear();
2292
2292
  return `${E.toLocaleDateString("en-US", {
2293
2293
  weekday: "long",
2294
2294
  month: "short",
2295
2295
  day: "numeric",
2296
- ...N ? {} : { year: "numeric" }
2297
- })}, ${he}`;
2296
+ ...ge ? {} : { year: "numeric" }
2297
+ })}, ${z}`;
2298
2298
  }
2299
- return u(He, "formatTimeDivider"), Je(q, (E) => {
2300
- E.length > 0 && $t(() => F());
2301
- }, { immediate: !0, deep: !0 }), (E, _) => (y(), T("div", Zr, [
2302
- L.value ? H("", !0) : (y(), T("div", Xr, [
2303
- Ut(Us, {
2299
+ return u(st, "formatTimeDivider"), Je(q, (E) => {
2300
+ E.length > 0 && Ut(() => De());
2301
+ }, { immediate: !0, deep: !0 }), (E, x) => (T(), S("div", Yr, [
2302
+ M.value ? B("", !0) : (T(), S("div", Zr, [
2303
+ Bt($s, {
2304
2304
  agent: l.agent,
2305
- "is-online": O.value
2305
+ "is-online": ee.value
2306
2306
  }, null, 8, ["agent", "is-online"])
2307
2307
  ])),
2308
- xe.value ? (y(), T("div", {
2308
+ ne.value ? (T(), S("div", {
2309
2309
  key: 1,
2310
- class: A(["py-16 flex flex-col items-center justify-center gap-3 text-sm", L.value ? "text-theme-400" : "text-white/60"])
2310
+ class: y(["py-16 flex flex-col items-center justify-center gap-3 text-sm", M.value ? "text-theme-400" : "text-white/60"])
2311
2311
  }, [
2312
2312
  v("i", {
2313
- class: A(["i-heroicons-cloud-arrow-down size-8", L.value ? "text-theme-300" : "text-white/40"])
2313
+ class: y(["i-heroicons-cloud-arrow-down size-8", M.value ? "text-theme-300" : "text-white/40"])
2314
2314
  }, null, 2),
2315
- v("span", null, ce(U.value), 1)
2316
- ], 2)) : te.value ? (y(), T("div", {
2315
+ v("span", null, ue(he.value), 1)
2316
+ ], 2)) : P.value ? (T(), S("div", {
2317
2317
  key: 2,
2318
- class: A(["py-16 flex flex-col items-center justify-center gap-2 text-sm", L.value ? "text-theme-400" : "text-theme-600"])
2318
+ class: y(["py-16 flex flex-col items-center justify-center gap-2 text-sm", M.value ? "text-theme-400" : "text-theme-600"])
2319
2319
  }, [
2320
- Ut(Dn, { class: "size-4" })
2321
- ], 2)) : r.value ? (y(), T("div", {
2320
+ Bt(Cn, { class: "size-4" })
2321
+ ], 2)) : r.value ? (T(), S("div", {
2322
2322
  key: 3,
2323
- class: A(["flex items-center justify-center gap-1.5 py-2 text-[11px]", L.value ? "text-theme-300" : "text-white/30"])
2323
+ class: y(["flex items-center justify-center gap-1.5 py-2 text-[11px]", M.value ? "text-theme-300" : "text-white/30"])
2324
2324
  }, [
2325
- _[2] || (_[2] = v("i", { class: "i-tabler-tool size-3" }, null, -1)),
2326
- v("span", null, ce(r.value), 1)
2327
- ], 2)) : H("", !0),
2325
+ x[4] || (x[4] = v("i", { class: "i-tabler-tool size-3" }, null, -1)),
2326
+ v("span", null, ue(r.value), 1)
2327
+ ], 2)) : B("", !0),
2328
2328
  v("div", {
2329
2329
  ref_key: "messagesContainer",
2330
- ref: f,
2331
- class: "flex-1 overflow-y-auto overflow-x-hidden py-4 px-3 space-y-1 min-h-0 [scrollbar-width:none] [-ms-overflow-style:none] [&::-webkit-scrollbar]:hidden"
2330
+ ref: g,
2331
+ class: "flex-1 overflow-y-auto overflow-x-hidden pt-4 pb-[120px] px-3 space-y-1 min-h-0 [scrollbar-width:none] [-ms-overflow-style:none] [&::-webkit-scrollbar]:hidden"
2332
2332
  }, [
2333
- q.value.length === 0 && !te.value && !xe.value ? (y(), T("div", Kr, [
2334
- v("div", Qr, [
2333
+ q.value.length === 0 && !P.value && !ne.value ? (T(), S("div", Xr, [
2334
+ v("div", Kr, [
2335
2335
  v("img", {
2336
2336
  src: l.agent.avatarUrl.value,
2337
2337
  alt: l.agent.displayName.value,
2338
- class: A(["rounded-full object-cover", o.value ? "size-28" : "size-20"])
2339
- }, null, 10, Jr),
2340
- O.value ? (y(), T("span", {
2338
+ class: y(["rounded-full object-cover", o.value ? "size-28" : "size-20"])
2339
+ }, null, 10, Qr),
2340
+ ee.value ? (T(), S("span", {
2341
2341
  key: 0,
2342
- class: A(["absolute bottom-0.5 right-0.5 flex items-center justify-center", o.value ? "size-6" : "size-5"])
2342
+ class: y(["absolute bottom-0.5 right-0.5 flex items-center justify-center", o.value ? "size-6" : "size-5"])
2343
2343
  }, [
2344
2344
  v("span", {
2345
- class: A(["absolute inline-flex rounded-full bg-emerald-400/40 animate-ping", o.value ? "size-4" : "size-3"]),
2345
+ class: y(["absolute inline-flex rounded-full bg-emerald-400/40 animate-ping", o.value ? "size-4" : "size-3"]),
2346
2346
  style: { "animation-duration": "2.5s" }
2347
2347
  }, null, 2),
2348
2348
  v("span", {
2349
- class: A(["relative inline-flex rounded-full bg-emerald-500 ring-2", [
2349
+ class: y(["relative inline-flex rounded-full bg-emerald-500 ring-2", [
2350
2350
  o.value ? "size-3" : "size-2.5",
2351
- L.value ? "ring-white" : "ring-theme-900"
2351
+ M.value ? "ring-white" : "ring-theme-900"
2352
2352
  ]])
2353
2353
  }, null, 2)
2354
- ], 2)) : H("", !0)
2354
+ ], 2)) : B("", !0)
2355
2355
  ]),
2356
2356
  v("div", {
2357
- class: A(["font-semibold", [L.value ? "text-theme-900" : "text-white", o.value ? "text-lg" : "text-base"]])
2358
- }, ce(l.agent.displayName.value), 3),
2357
+ class: y(["font-semibold", [M.value ? "text-theme-900" : "text-white", o.value ? "text-lg" : "text-base"]])
2358
+ }, ue(l.agent.displayName.value), 3),
2359
2359
  v("p", {
2360
- class: A(["mt-1 text-center", [L.value ? "text-theme-300" : "text-white/30", o.value ? "text-sm" : "text-xs"]])
2361
- }, ce(l.emptyStateMessage || "Send a message to get started"), 3),
2360
+ class: y(["mt-1 text-center", [M.value ? "text-theme-300" : "text-white/30", o.value ? "text-sm" : "text-xs"]])
2361
+ }, ue(l.emptyStateMessage || "Send a message to get started"), 3),
2362
2362
  v("div", {
2363
- class: A(["inline-flex items-center gap-1.5 mt-6 px-2.5 py-1 rounded-full text-[11px]", L.value ? "bg-theme-50 border border-theme-100 text-theme-400" : "bg-white/10 border border-white/20 text-white/40"]),
2363
+ class: y(["inline-flex items-center gap-1.5 mt-6 px-2.5 py-1 rounded-full text-[11px]", M.value ? "bg-theme-50 border border-theme-100 text-theme-400" : "bg-white/10 border border-white/20 text-white/40"]),
2364
2364
  title: a.value.tooltip
2365
2365
  }, [
2366
2366
  v("i", {
2367
- class: A([a.value.icon, "size-3"])
2367
+ class: y([a.value.icon, "size-3"])
2368
2368
  }, null, 2),
2369
- v("span", null, ce(a.value.label), 1)
2370
- ], 10, ei)
2371
- ])) : H("", !0),
2372
- (y(!0), T(Se, null, gt(q.value, (b, z) => (y(), T(Se, {
2373
- key: b.id
2369
+ v("span", null, ue(a.value.label), 1)
2370
+ ], 10, Jr)
2371
+ ])) : B("", !0),
2372
+ (T(!0), S(Te, null, gt(q.value, (R, A) => (T(), S(Te, {
2373
+ key: R.id
2374
2374
  }, [
2375
- st(q.value, z) ? (y(), T("div", ti, [
2375
+ He(q.value, A) ? (T(), S("div", ei, [
2376
2376
  v("div", {
2377
- class: A(["flex-1 h-px", L.value ? "bg-theme-200" : "bg-white/10"])
2377
+ class: y(["flex-1 h-px", M.value ? "bg-theme-200" : "bg-white/10"])
2378
2378
  }, null, 2),
2379
2379
  v("span", {
2380
- class: A(["font-medium shrink-0", [L.value ? "text-theme-400" : "text-white/40", o.value ? "text-xs" : "text-[11px]"]])
2381
- }, ce(st(q.value, z)), 3),
2380
+ class: y(["font-medium shrink-0", [M.value ? "text-theme-400" : "text-white/40", o.value ? "text-xs" : "text-[11px]"]])
2381
+ }, ue(He(q.value, A)), 3),
2382
2382
  v("div", {
2383
- class: A(["flex-1 h-px", L.value ? "bg-theme-200" : "bg-white/10"])
2383
+ class: y(["flex-1 h-px", M.value ? "bg-theme-200" : "bg-white/10"])
2384
2384
  }, null, 2)
2385
- ])) : H("", !0),
2385
+ ])) : B("", !0),
2386
2386
  v("div", {
2387
- class: A(["flex gap-2 items-end", {
2388
- "justify-end": b.sender === "user",
2389
- "justify-start": b.sender === "agent",
2390
- "mb-4": w(q.value, z)
2387
+ class: y(["flex gap-2 items-end", {
2388
+ "justify-end": R.sender === "user",
2389
+ "justify-start": R.sender === "agent",
2390
+ "mb-4": _(q.value, A)
2391
2391
  }])
2392
2392
  }, [
2393
- b.sender === "agent" ? (y(), T("div", {
2393
+ R.sender === "agent" ? (T(), S("div", {
2394
2394
  key: 0,
2395
- class: A(["flex-shrink-0", o.value ? "size-10" : "size-8"])
2395
+ class: y(["flex-shrink-0", o.value ? "size-10" : "size-8"])
2396
2396
  }, [
2397
- w(q.value, z) ? (y(), T("img", {
2397
+ _(q.value, A) ? (T(), S("img", {
2398
2398
  key: 0,
2399
2399
  src: l.agent.avatarUrl.value,
2400
2400
  alt: l.agent.displayName.value,
2401
- class: A(["rounded-full object-cover", o.value ? "size-10" : "size-7"])
2402
- }, null, 10, ni)) : H("", !0)
2403
- ], 2)) : H("", !0),
2401
+ class: y(["rounded-full object-cover", o.value ? "size-10" : "size-7"])
2402
+ }, null, 10, ti)) : B("", !0)
2403
+ ], 2)) : B("", !0),
2404
2404
  v("div", {
2405
- class: A(b.sender === "user" ? "max-w-[75%]" : "max-w-[85%]")
2405
+ class: y(R.sender === "user" ? "max-w-[75%]" : "max-w-[85%]")
2406
2406
  }, [
2407
- b.attachments?.length ? (y(), T("div", {
2407
+ R.attachments?.length ? (T(), S("div", {
2408
2408
  key: 0,
2409
- class: A(["mb-1 space-y-1", b.sender === "user" ? "flex flex-col items-end" : ""])
2409
+ class: y(["mb-1 space-y-1", R.sender === "user" ? "flex flex-col items-end" : ""])
2410
2410
  }, [
2411
- (y(!0), T(Se, null, gt(b.attachments, (I, he) => (y(), T(Se, { key: he }, [
2412
- I.type === "image" ? (y(), T("img", {
2411
+ (T(!0), S(Te, null, gt(R.attachments, (H, z) => (T(), S(Te, { key: z }, [
2412
+ H.type === "image" ? (T(), S("img", {
2413
2413
  key: 0,
2414
- src: I.url,
2415
- alt: I.name,
2416
- class: A(["rounded-xl object-cover max-h-48", o.value ? "max-w-[320px]" : "max-w-[240px]"])
2417
- }, null, 10, si)) : I.type === "audio" ? (y(), T("audio", {
2414
+ src: H.url,
2415
+ alt: H.name,
2416
+ class: y(["rounded-xl object-cover max-h-48", o.value ? "max-w-[320px]" : "max-w-[240px]"])
2417
+ }, null, 10, ni)) : H.type === "audio" ? (T(), S("audio", {
2418
2418
  key: 1,
2419
- src: I.url,
2419
+ src: H.url,
2420
2420
  controls: "",
2421
2421
  class: "max-w-full"
2422
- }, null, 8, ri)) : (y(), T("a", {
2422
+ }, null, 8, si)) : (T(), S("a", {
2423
2423
  key: 2,
2424
- href: I.url,
2424
+ href: H.url,
2425
2425
  target: "_blank",
2426
2426
  rel: "noopener",
2427
- class: A(["inline-flex items-center gap-1.5 px-3 py-1.5 rounded-lg text-xs", L.value ? "bg-theme-100 text-theme-600 hover:bg-theme-200" : "bg-white/10 text-white/80 hover:bg-white/20"])
2427
+ class: y(["inline-flex items-center gap-1.5 px-3 py-1.5 rounded-lg text-xs", M.value ? "bg-theme-100 text-theme-600 hover:bg-theme-200" : "bg-white/10 text-white/80 hover:bg-white/20"])
2428
2428
  }, [
2429
- _[3] || (_[3] = v("i", { class: "i-tabler-file size-3.5" }, null, -1)),
2430
- ws(" " + ce(I.name), 1)
2431
- ], 10, ii))
2429
+ x[5] || (x[5] = v("i", { class: "i-tabler-file size-3.5" }, null, -1)),
2430
+ ht(" " + ue(H.name), 1)
2431
+ ], 10, ri))
2432
2432
  ], 64))), 128))
2433
- ], 2)) : H("", !0),
2434
- b.text ? (y(), T("div", {
2433
+ ], 2)) : B("", !0),
2434
+ R.text ? (T(), S("div", {
2435
2435
  key: 1,
2436
- class: A(["rounded-2xl px-3.5 py-2", b.sender === "user" ? "bg-primary-500 text-white" : L.value ? "bg-theme-100 text-theme-800" : "bg-white/15 backdrop-blur-sm text-white/95"])
2436
+ class: y(["rounded-2xl px-3.5 py-2", R.sender === "user" ? "bg-primary-500 text-white" : M.value ? "bg-theme-100 text-theme-800" : "bg-white/15 backdrop-blur-sm text-white/95"])
2437
2437
  }, [
2438
2438
  v("div", {
2439
- class: A(["chat-msg-prose break-words", [
2439
+ class: y(["chat-msg-prose break-words", [
2440
2440
  o.value ? "text-[15px] leading-[1.6]" : "text-[13px] leading-[1.55]",
2441
- b.sender === "user" || !L.value ? "chat-msg-prose-invert" : ""
2441
+ R.sender === "user" || !M.value ? "chat-msg-prose-invert" : ""
2442
2442
  ]]),
2443
- innerHTML: e(b.text)
2444
- }, null, 10, ai)
2445
- ], 2)) : H("", !0)
2443
+ innerHTML: e(R.text)
2444
+ }, null, 10, ii)
2445
+ ], 2)) : B("", !0)
2446
2446
  ], 2)
2447
2447
  ], 2)
2448
2448
  ], 64))), 128)),
2449
- me.value ? (y(), T("div", li, [
2450
- v("div", oi, [
2449
+ Re.value ? (T(), S("div", ai, [
2450
+ v("div", li, [
2451
2451
  v("img", {
2452
2452
  src: l.agent.avatarUrl.value,
2453
2453
  alt: l.agent.displayName.value,
2454
- class: A(["rounded-full object-cover", o.value ? "size-10" : "size-8"])
2455
- }, null, 10, ci)
2454
+ class: y(["rounded-full object-cover", o.value ? "size-10" : "size-8"])
2455
+ }, null, 10, oi)
2456
2456
  ]),
2457
2457
  v("div", {
2458
- class: A(["rounded-2xl px-4 py-2.5 flex items-center", L.value ? "bg-theme-100" : "bg-white/15 backdrop-blur-sm"])
2458
+ class: y(["rounded-2xl px-4 py-2.5 flex items-center", M.value ? "bg-theme-100" : "bg-white/15 backdrop-blur-sm"])
2459
2459
  }, [
2460
2460
  v("i", {
2461
- class: A(["i-svg-spinners-3-dots-fade size-6", L.value ? "text-theme-400" : "text-white/70"])
2461
+ class: y(["i-svg-spinners-3-dots-fade size-6", M.value ? "text-theme-400" : "text-white/70"])
2462
2462
  }, null, 2)
2463
2463
  ], 2)
2464
- ])) : H("", !0)
2464
+ ])) : B("", !0)
2465
2465
  ], 512),
2466
- v("div", ui, [
2467
- g.value.length > 0 ? (y(), T("div", hi, [
2468
- (y(!0), T(Se, null, gt(g.value, (b, z) => (y(), T("div", {
2469
- key: z,
2466
+ v("div", {
2467
+ class: y(["absolute bottom-0 left-0 right-0 z-30 px-5 pb-4 pt-3", M.value ? "bg-gradient-to-t from-white via-white/95 to-white/70" : "bg-gradient-to-t from-black/80 via-black/70 to-black/40"])
2468
+ }, [
2469
+ f.value.length > 0 ? (T(), S("div", ci, [
2470
+ (T(!0), S(Te, null, gt(f.value, (R, A) => (T(), S("div", {
2471
+ key: A,
2470
2472
  class: "relative shrink-0 group"
2471
2473
  }, [
2472
- b.type === "image" ? (y(), T("img", {
2474
+ R.type === "image" ? (T(), S("img", {
2473
2475
  key: 0,
2474
- src: b.url,
2475
- alt: b.name,
2476
- class: A(["size-14 rounded-lg object-cover border", L.value ? "border-theme-200" : "border-white/20"])
2477
- }, null, 10, pi)) : (y(), T("div", {
2476
+ src: R.url,
2477
+ alt: R.name,
2478
+ class: y(["size-14 rounded-xl object-cover border", M.value ? "border-black/10" : "border-white/20"])
2479
+ }, null, 10, ui)) : (T(), S("div", {
2478
2480
  key: 1,
2479
- class: A(["h-14 px-3 rounded-lg flex items-center gap-1.5 text-xs border", L.value ? "border-theme-200 bg-theme-50 text-theme-600" : "border-white/20 bg-white/10 text-white/70"])
2481
+ class: y(["h-14 px-3 rounded-xl flex items-center gap-1.5 text-xs border", M.value ? "border-black/10 bg-theme-50 text-theme-600" : "border-white/20 bg-white/10 text-white/70"])
2480
2482
  }, [
2481
- _[4] || (_[4] = v("i", { class: "i-tabler-file size-4" }, null, -1)),
2482
- v("span", fi, ce(b.name), 1)
2483
+ x[6] || (x[6] = v("i", { class: "i-tabler-file size-4" }, null, -1)),
2484
+ v("span", hi, ue(R.name), 1)
2483
2485
  ], 2)),
2484
2486
  v("button", {
2485
- class: "absolute -top-1.5 -right-1.5 size-5 flex items-center justify-center rounded-full bg-theme-600 text-white text-xs opacity-0 group-hover:opacity-100 transition-opacity cursor-pointer",
2486
- onClick: /* @__PURE__ */ u((I) => Et(z), "onClick")
2487
- }, [..._[5] || (_[5] = [
2487
+ class: "absolute -top-1.5 -right-1.5 size-5 flex items-center justify-center rounded-full bg-theme-800 text-white text-xs scale-0 group-hover:scale-100 transition-transform cursor-pointer",
2488
+ onClick: /* @__PURE__ */ u((H) => _t(A), "onClick")
2489
+ }, [...x[7] || (x[7] = [
2488
2490
  v("i", { class: "i-tabler-x size-3" }, null, -1)
2489
- ])], 8, di)
2491
+ ])], 8, pi)
2490
2492
  ]))), 128)),
2491
- m.value ? (y(), T("div", gi, [
2492
- Ut(Dn, { class: "size-5" })
2493
- ])) : H("", !0)
2494
- ])) : H("", !0),
2495
- l.uploadFn ? (y(), T("input", {
2493
+ k.value ? (T(), S("div", di, [
2494
+ Bt(Cn, { class: "size-5" })
2495
+ ])) : B("", !0)
2496
+ ])) : B("", !0),
2497
+ l.uploadFn ? (T(), S("input", {
2496
2498
  key: 1,
2497
2499
  ref_key: "fileInput",
2498
- ref: p,
2500
+ ref: m,
2499
2501
  type: "file",
2500
2502
  accept: "image/*,audio/*,video/*",
2501
2503
  class: "hidden",
2502
- onChange: At
2503
- }, null, 544)) : H("", !0),
2504
+ onChange: Et
2505
+ }, null, 544)) : B("", !0),
2504
2506
  v("div", {
2505
- class: A(["flex items-end gap-1 w-full rounded-3xl px-3 py-1.5", L.value ? "bg-theme-50 border border-theme-200 focus-within:border-theme-300" : "bg-white/10 backdrop-blur-sm border border-white/20 focus-within:border-white/40"])
2507
+ class: y(["flex items-end gap-1 w-full rounded-[24px] p-1.5 transition-all duration-300", M.value ? d.value ? "bg-white ring-1 ring-black/10 shadow-[0_4px_16px_rgba(0,0,0,0.06)]" : "bg-theme-50 ring-1 ring-transparent hover:ring-black/5" : d.value ? "bg-white/15 ring-1 ring-white/25" : "bg-white/10 ring-1 ring-transparent hover:ring-white/15"])
2506
2508
  }, [
2507
- l.uploadFn ? (y(), T("button", {
2509
+ l.uploadFn ? (T(), S("button", {
2508
2510
  key: 0,
2509
- class: A(["shrink-0 flex items-center justify-center rounded-full transition-colors mb-0.5 cursor-pointer", [
2511
+ class: y(["shrink-0 flex items-center justify-center rounded-full transition-colors mb-0.5 ml-0.5 cursor-pointer", [
2510
2512
  o.value ? "size-10" : "size-9",
2511
- L.value ? "text-theme-400 hover:text-theme-600" : "text-white/50 hover:text-white/80",
2512
- m.value ? "opacity-50 pointer-events-none" : ""
2513
+ M.value ? "text-theme-400 hover:text-theme-600 hover:bg-black/5" : "text-white/50 hover:text-white/80 hover:bg-white/10",
2514
+ k.value ? "opacity-50 pointer-events-none" : ""
2513
2515
  ]]),
2514
- disabled: ne.value || m.value,
2515
- onClick: Fe
2516
+ disabled: se.value || k.value,
2517
+ onClick: At
2516
2518
  }, [
2517
- m.value ? (y(), T("i", xi)) : (y(), T("i", ki))
2518
- ], 10, mi)) : H("", !0),
2519
- Yn(v("textarea", {
2519
+ k.value ? (T(), S("i", gi)) : (T(), S("i", mi))
2520
+ ], 10, fi)) : B("", !0),
2521
+ Zn(v("textarea", {
2520
2522
  ref_key: "textarea",
2521
- ref: d,
2522
- "onUpdate:modelValue": _[0] || (_[0] = (b) => c.value = b),
2523
+ ref: p,
2524
+ "onUpdate:modelValue": x[0] || (x[0] = (R) => c.value = R),
2523
2525
  rows: "1",
2524
2526
  enterkeyhint: "send",
2525
- placeholder: ue.value,
2526
- disabled: ne.value,
2527
- style: vs({ fontSize: (o.value, "16px"), resize: "none" }),
2528
- class: A(["flex-1 min-w-0 bg-transparent px-2 py-1.5 focus:outline-none disabled:opacity-50 overflow-y-auto [scrollbar-width:none] [-ms-overflow-style:none] [&::-webkit-scrollbar]:hidden", L.value ? "text-theme-800 placeholder-theme-400" : "text-white placeholder-white/50"]),
2529
- onKeydown: St
2530
- }, null, 46, bi), [
2531
- [Zn, c.value]
2527
+ placeholder: St.value,
2528
+ disabled: se.value,
2529
+ style: { fontSize: "16px", resize: "none" },
2530
+ class: y(["flex-1 min-w-0 bg-transparent px-1 py-2 focus:outline-none disabled:opacity-50 overflow-y-auto leading-relaxed [scrollbar-width:none] [-ms-overflow-style:none] [&::-webkit-scrollbar]:hidden", M.value ? "text-theme-800 placeholder-theme-400" : "text-white placeholder-white/50"]),
2531
+ onKeydown: F,
2532
+ onFocus: x[1] || (x[1] = (R) => d.value = !0),
2533
+ onBlur: x[2] || (x[2] = (R) => d.value = !1)
2534
+ }, null, 42, xi), [
2535
+ [Xn, c.value]
2532
2536
  ]),
2533
2537
  v("button", {
2534
- class: A(["shrink-0 flex items-center justify-center rounded-full transition-colors mb-0.5", [
2538
+ class: y(["shrink-0 flex items-center justify-center rounded-full transition-all duration-300 mb-0.5 mr-0.5", [
2535
2539
  o.value ? "size-10" : "size-9",
2536
- tt.value ? "bg-primary-500 text-white hover:bg-primary-600 cursor-pointer" : L.value ? "bg-theme-100 text-theme-300" : "bg-white/10 text-white/30"
2540
+ tt.value ? "bg-primary-500 text-white shadow-md hover:scale-105 active:scale-95 cursor-pointer" : M.value ? "bg-black/5 text-black/20" : "bg-white/10 text-white/30"
2537
2541
  ]]),
2538
2542
  disabled: !tt.value,
2539
- onClick: _[1] || (_[1] = (b) => nt())
2540
- }, [..._[6] || (_[6] = [
2543
+ onClick: x[3] || (x[3] = (R) => nt())
2544
+ }, [...x[8] || (x[8] = [
2541
2545
  v("i", { class: "i-tabler-arrow-up size-5" }, null, -1)
2542
- ])], 10, wi)
2546
+ ])], 10, bi)
2543
2547
  ], 2),
2544
2548
  v("div", {
2545
- class: A(["text-[10px] text-center mt-2 select-none", L.value ? "text-theme-300" : "text-white/40"])
2546
- }, " Press Enter to send, Shift+Enter for new line ", 2)
2547
- ])
2549
+ class: y(["text-[10px] text-center mt-2.5 select-none opacity-70", M.value ? "text-theme-400" : "text-white/50"])
2550
+ }, [
2551
+ x[9] || (x[9] = ht(" Press ", -1)),
2552
+ v("kbd", {
2553
+ class: y(["font-sans px-1.5 py-0.5 rounded-md text-[10px]", M.value ? "bg-black/[0.04] border border-black/[0.05]" : "bg-white/10 border border-white/15"])
2554
+ }, "Enter", 2),
2555
+ x[10] || (x[10] = ht(" to send, ", -1)),
2556
+ v("kbd", {
2557
+ class: y(["font-sans px-1.5 py-0.5 rounded-md text-[10px]", M.value ? "bg-black/[0.04] border border-black/[0.05]" : "bg-white/10 border border-white/15"])
2558
+ }, "Shift+Enter", 2),
2559
+ x[11] || (x[11] = ht(" for new line ", -1))
2560
+ ], 2)
2561
+ ], 2)
2548
2562
  ]));
2549
2563
  }
2550
- }), vi = { class: "agent-wrap" }, yi = {
2564
+ }), ki = { class: "agent-wrap" }, wi = {
2551
2565
  key: 0,
2552
2566
  class: "flex items-center justify-center h-full"
2553
- }, Li = /* @__PURE__ */ _e({
2567
+ }, Ii = /* @__PURE__ */ Ee({
2554
2568
  __name: "AgentWrap",
2555
2569
  props: {
2556
2570
  sdk: {},
@@ -2564,11 +2578,11 @@ const Zr = { class: "flex flex-col h-full relative" }, Xr = {
2564
2578
  apiBase: {}
2565
2579
  },
2566
2580
  setup(l) {
2567
- const t = Ss("AgentWrap"), e = l, n = e.sdk || As.getInstance({
2581
+ const t = Ts("AgentWrap"), e = l, n = e.sdk || Ss.getInstance({
2568
2582
  isDev: typeof window < "u" ? window.location.hostname === "localhost" || window.location.hostname.includes("127.0.0.1") : !1,
2569
2583
  ...e.apiBase && { apiBase: e.apiBase }
2570
- }), s = Q(!e.agent), r = ys(e.agent ? new kt({ config: e.agent }) : void 0), a = Q();
2571
- return Xt(async () => {
2584
+ }), s = Y(!e.agent), r = vs(e.agent ? new bt({ config: e.agent }) : void 0), a = Y();
2585
+ return Kt(async () => {
2572
2586
  if (e.agent) {
2573
2587
  t.debug("Agent provided via props, skipping fetch", {
2574
2588
  agentId: e.agent.agentId,
@@ -2594,7 +2608,7 @@ const Zr = { class: "flex flex-col h-full relative" }, Xr = {
2594
2608
  try {
2595
2609
  s.value = !0, t.debug("Fetching public agent", { handle: e.handle });
2596
2610
  const o = await n.getPublicAgent({ handle: e.handle });
2597
- o ? (r.value = new kt({ config: o }), t.debug("Successfully fetched public agent", {
2611
+ o ? (r.value = new bt({ config: o }), t.debug("Successfully fetched public agent", {
2598
2612
  agentId: o.agentId,
2599
2613
  handle: o.handle
2600
2614
  }), o.agentId && n.track({
@@ -2644,33 +2658,33 @@ const Zr = { class: "flex flex-col h-full relative" }, Xr = {
2644
2658
  }
2645
2659
  });
2646
2660
  }
2647
- }), (o, c) => (y(), T("div", vi, [
2648
- s.value ? (y(), T("div", yi, [...c[0] || (c[0] = [
2661
+ }), (o, c) => (T(), S("div", ki, [
2662
+ s.value ? (T(), S("div", wi, [...c[0] || (c[0] = [
2649
2663
  v("div", { class: "animate-spin rounded-full size-6 border-b-2 border-white" }, null, -1)
2650
- ])])) : r.value ? Vn(o.$slots, "default", {
2664
+ ])])) : r.value ? Yn(o.$slots, "default", {
2651
2665
  key: 1,
2652
- sdk: qt(n),
2666
+ sdk: Vt(n),
2653
2667
  agent: r.value,
2654
2668
  context: l.context,
2655
2669
  firstMessage: l.firstMessage,
2656
2670
  buttonText: l.buttonText,
2657
2671
  buttonIcon: l.buttonIcon,
2658
2672
  loading: s.value
2659
- }) : H("", !0)
2673
+ }) : B("", !0)
2660
2674
  ]));
2661
2675
  }
2662
2676
  });
2663
2677
  export {
2664
- Cn as A,
2665
- Li as _,
2666
- Mi as a,
2667
- Ci as b,
2668
- Di as c,
2669
- Ii as d,
2670
- Dn as e,
2671
- Us as f,
2672
- _i as g,
2673
- Mn as h,
2674
- Ri as p
2678
+ In as A,
2679
+ Ii as _,
2680
+ Ci as a,
2681
+ Ri as b,
2682
+ _i as c,
2683
+ Di as d,
2684
+ Cn as e,
2685
+ $s as f,
2686
+ Ai as g,
2687
+ Ln as h,
2688
+ Ei as p
2675
2689
  };
2676
2690
  //# sourceMappingURL=AgentWrap.vue_vue_type_script_setup_true_lang.js.map