@pagelines/sdk 1.0.446 → 1.0.448

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,22 +1,22 @@
1
1
  var Dn = Object.defineProperty;
2
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 A, createElementBlock as E, createElementVNode as T, normalizeClass as _, ref as V, watch as Je, computed as F, createCommentVNode as G, renderSlot as Yn, onMounted as Kt, Fragment as Te, renderList as mt, withDirectives as Zn, vModelText as Xn, unref as Vt, toDisplayString as ue, nextTick as Ut, createVNode as Bt, createTextVNode as pt, shallowRef as vs } from "vue";
6
- import { SettingsObject as ys, Agent as kt, getDefaultAvatarUrl as Kn, createLogger as Ts } from "@pagelines/core";
3
+ var h = (l, t) => Dn(l, "name", { value: t, configurable: !0 });
4
+ var D = (l, t, e) => ws(l, typeof t != "symbol" ? t + "" : t, e);
5
+ import { defineComponent as De, openBlock as S, createElementBlock as A, createElementVNode as T, normalizeClass as _, ref as V, watch as nt, computed as F, createCommentVNode as G, renderSlot as Zn, onMounted as Qt, Fragment as _e, renderList as xt, withDirectives as Xn, vModelText as Kn, unref as Yt, toDisplayString as ie, nextTick as Bt, createVNode as Ft, createTextVNode as ft, shallowRef as vs } from "vue";
6
+ import { SettingsObject as ys, Agent as kt, getDefaultAvatarUrl as Qn, createLogger as Ts } from "@pagelines/core";
7
7
  import { P as Ss } from "./sdkClient.js";
8
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
- }, Cn = /* @__PURE__ */ Ee({
11
+ }, In = /* @__PURE__ */ De({
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) => (A(), E("div", As, [
19
- (A(), E("svg", Es, [
18
+ return (t, e) => (S(), A("div", As, [
19
+ (S(), A("svg", Es, [
20
20
  T("circle", {
21
21
  class: _([l.colorMode, "ring-path"]),
22
22
  cx: "50",
@@ -33,23 +33,23 @@ const As = { class: "spinner max-w-sm" }, Es = {
33
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
- ], Rs = 9e4, on = class on extends ys {
36
+ ], Rs = 9e4, cn = class cn extends ys {
37
37
  constructor(e) {
38
38
  super("AgentChatController", e);
39
- C(this, "isTextMode", !1);
40
- C(this, "lastMessage", { hash: "", time: 0 });
41
- C(this, "isConnecting", !1);
39
+ D(this, "isTextMode", !1);
40
+ D(this, "lastMessage", { hash: "", time: 0 });
41
+ D(this, "isConnecting", !1);
42
42
  // Chat conversation tracking (server-managed persistence)
43
- C(this, "conversationId");
44
- C(this, "textState", V({
43
+ D(this, "conversationId");
44
+ D(this, "textState", V({
45
45
  isActive: !1,
46
46
  isConnected: !1,
47
47
  isThinking: !1,
48
48
  connectionStatus: "disconnected"
49
49
  }));
50
- C(this, "agentMode", V("self"));
51
- C(this, "sharedMessages", V([]));
52
- C(this, "_agent");
50
+ D(this, "agentMode", V("self"));
51
+ D(this, "sharedMessages", V([]));
52
+ D(this, "_agent");
53
53
  this._agent = e.agent instanceof kt ? e.agent : new kt({ config: e.agent }), this.setupModeWatcher();
54
54
  }
55
55
  get chatEnabled() {
@@ -103,7 +103,7 @@ Current User:
103
103
  });
104
104
  }
105
105
  setupModeWatcher() {
106
- Je(this.agentMode, async (e, n) => {
106
+ nt(this.agentMode, async (e, n) => {
107
107
  this.logger.info(`Mode changed from ${n} to ${e}`), this.isTextMode && (n === "talk" || n === "chat") && await this.endConversation();
108
108
  });
109
109
  }
@@ -125,7 +125,7 @@ Current User:
125
125
  }
126
126
  this.isConnecting = !0, this.isTextMode = !0, this.updateState(this.textState, { isActive: !0, connectionStatus: "connecting" });
127
127
  try {
128
- if (!this.settings.chatStreamFn && !this.chatEnabled) {
128
+ if (!this.chatEnabled) {
129
129
  this.isConnecting = !1, this.updateState(this.textState, {
130
130
  isConnected: !1,
131
131
  connectionStatus: "disconnected",
@@ -153,7 +153,7 @@ Current User:
153
153
  if (!this.isTextMode)
154
154
  return;
155
155
  const { chatStreamFn: s } = this.settings;
156
- if (!s && !this.chatEnabled) {
156
+ if (!this.chatEnabled) {
157
157
  this.addMessage("Agent is currently offline.", "system");
158
158
  return;
159
159
  }
@@ -165,39 +165,51 @@ 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__ */ h((f) => {
169
169
  o || (o = !0, this.sharedMessages.value = [
170
170
  ...this.sharedMessages.value,
171
171
  { id: a, text: "", sender: "agent", timestamp: (/* @__PURE__ */ new Date()).toISOString() }
172
172
  ]);
173
173
  const m = this.sharedMessages.value, y = m[m.length - 1];
174
- y?.id === a && (y.text += g, this.sharedMessages.value = [...m]);
175
- }, "onDelta"), d = /* @__PURE__ */ u((g) => {
174
+ y?.id === a && (y.text += f, this.sharedMessages.value = [...m]);
175
+ }, "onDelta"), d = /* @__PURE__ */ h((f) => {
176
+ if (!o) {
177
+ g("empty_stream — assistant returned no content");
178
+ return;
179
+ }
176
180
  const m = this.sharedMessages.value, y = m[m.length - 1];
177
181
  if (y?.id === a && y.text) {
178
- let S = y.text;
179
- for (const O of _s)
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 !== y.text && (y.text = S, this.sharedMessages.value = [...m]) : this.sharedMessages.value = m.slice(0, -1);
182
+ let E = y.text;
183
+ for (const z of _s)
184
+ z.pattern.test(E) && (console.debug(`[chat] filtered directive: ${z.label}`), E = E.replace(z.pattern, "").trim(), z.pattern.lastIndex = 0);
185
+ E ? E !== y.text && (y.text = E, this.sharedMessages.value = [...m]) : this.sharedMessages.value = m.slice(0, -1);
182
186
  }
183
- g && (this.conversationId = g), this.updateState(this.textState, { isThinking: !1 });
184
- }, "onDone"), f = /* @__PURE__ */ u((g) => {
187
+ f && (this.conversationId = f), this.updateState(this.textState, { isThinking: !1 });
188
+ }, "onDone"), g = /* @__PURE__ */ h((f) => {
185
189
  const m = this.sharedMessages.value, y = m[m.length - 1];
186
- y?.id === a && !y.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");
190
+ if (y?.id === a && !y.text && (this.sharedMessages.value = m.slice(0, -1)), typeof f == "object" && f.code && f.error) {
191
+ (/* @__PURE__ */ new Set([
192
+ "CREDIT_LIMIT",
193
+ "OVERAGE_CAP",
194
+ "EMPTY_STREAM",
195
+ "RATE_LIMIT"
196
+ ])).has(f.code) ? (this.addMessage(f.error, "system"), this.updateState(this.textState, { isThinking: !1 })) : this.handleError(new Error(f.error));
197
+ return;
198
+ }
199
+ const E = typeof f == "string" ? f : f.error, z = this.mapChatError(E);
200
+ this.isTransientError(E) ? (this.addMessage(z, "system"), this.updateState(this.textState, { isThinking: !1 })) : this.handleError(new Error(z));
201
+ }, "onError"), p = /* @__PURE__ */ h((f) => {
202
+ this.addMessage(f, "system");
191
203
  }, "onStatus");
192
204
  try {
193
- const g = s ? s({
205
+ const f = s ? s({
194
206
  message: e,
195
207
  attachments: n,
196
208
  conversationId: this.conversationId,
197
209
  history: this.buildHistory(),
198
210
  onDelta: c,
199
211
  onDone: d,
200
- onError: f,
212
+ onError: g,
201
213
  onStatus: p
202
214
  }) : r.chatStream({
203
215
  handle: this._agent.handle.value,
@@ -209,15 +221,15 @@ Current User:
209
221
  context: this.getDynamicSettings().context || void 0,
210
222
  onDelta: c,
211
223
  onDone: d,
212
- onError: f,
224
+ onError: g,
213
225
  onStatus: p
214
226
  });
215
227
  await Promise.race([
216
- g,
228
+ f,
217
229
  new Promise((m, y) => setTimeout(() => y(new Error("timed out")), Rs))
218
230
  ]);
219
- } catch (g) {
220
- f(g.message || "Something went wrong");
231
+ } catch (f) {
232
+ g(f.message || "Something went wrong");
221
233
  }
222
234
  }
223
235
  buildHistory() {
@@ -241,30 +253,30 @@ Current User:
241
253
  await this.endConversation();
242
254
  }
243
255
  };
244
- u(on, "AgentChatController");
245
- let In = on;
246
- function Mn(l) {
256
+ h(cn, "AgentChatController");
257
+ let Mn = cn;
258
+ function Ln(l) {
247
259
  return l ? typeof l == "string" ? l : l.src || "" : "";
248
260
  }
249
- u(Mn, "getImageSrc");
261
+ h(Ln, "getImageSrc");
250
262
  function Ei(l) {
251
- return Mn(l.cover) || Mn(l.avatar) || Kn(l.name);
263
+ return Ln(l.cover) || Ln(l.avatar) || Qn(l.name);
252
264
  }
253
- u(Ei, "getAgentAvatarUrl");
254
- function Ln(l) {
265
+ h(Ei, "getAgentAvatarUrl");
266
+ function zn(l) {
255
267
  const t = l.target;
256
- t.dataset.fallbackUsed || (t.dataset.fallbackUsed = "true", t.src = Kn());
268
+ t.dataset.fallbackUsed || (t.dataset.fallbackUsed = "true", t.src = Qn());
257
269
  }
258
- u(Ln, "handleImageError");
270
+ h(zn, "handleImageError");
259
271
  function _i(l) {
260
272
  const { template: t, agent: e } = l;
261
273
  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 || "");
262
274
  }
263
- u(_i, "parseButtonTemplate");
264
- const Ds = {
275
+ h(_i, "parseButtonTemplate");
276
+ const Cs = {
265
277
  key: 0,
266
278
  class: "absolute inset-0 flex items-center justify-center"
267
- }, Ri = /* @__PURE__ */ Ee({
279
+ }, Ri = /* @__PURE__ */ De({
268
280
  __name: "ElAgentButton",
269
281
  props: {
270
282
  theme: { default: "primary" },
@@ -288,28 +300,28 @@ const Ds = {
288
300
  md: "size-4",
289
301
  lg: "size-5"
290
302
  })[l.size]);
291
- return (s, r) => (A(), E("button", {
303
+ return (s, r) => (S(), A("button", {
292
304
  class: _(["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]])
293
305
  }, [
294
- l.loading ? (A(), E("div", Ds, [...r[0] || (r[0] = [
306
+ l.loading ? (S(), A("div", Cs, [...r[0] || (r[0] = [
295
307
  T("i", { class: "i-svg-spinners-90-ring-with-bg size-5" }, null, -1)
296
308
  ])])) : G("", !0),
297
309
  T("span", {
298
310
  class: _(["flex items-center gap-2 transition-opacity duration-200", l.loading ? "opacity-0" : "opacity-100"])
299
311
  }, [
300
- l.icon ? (A(), E("i", {
312
+ l.icon ? (S(), A("i", {
301
313
  key: 0,
302
314
  class: _([l.icon, n.value])
303
315
  }, null, 2)) : G("", !0),
304
- Yn(s.$slots, "default"),
305
- l.iconAfter ? (A(), E("i", {
316
+ Zn(s.$slots, "default"),
317
+ l.iconAfter ? (S(), A("i", {
306
318
  key: 1,
307
319
  class: _([l.iconAfter, n.value])
308
320
  }, null, 2)) : G("", !0)
309
321
  ], 2)
310
322
  ], 2));
311
323
  }
312
- }), Cs = ["value"], Di = /* @__PURE__ */ Ee({
324
+ }), Ds = ["value"], Ci = /* @__PURE__ */ De({
313
325
  __name: "AgentInputEmail",
314
326
  props: {
315
327
  modelValue: { default: "" }
@@ -317,7 +329,7 @@ const Ds = {
317
329
  emits: ["update:modelValue"],
318
330
  setup(l, { emit: t }) {
319
331
  const e = t;
320
- return (n, s) => (A(), E("input", {
332
+ return (n, s) => (S(), A("input", {
321
333
  type: "email",
322
334
  autocomplete: "email",
323
335
  placeholder: "Enter Your Email",
@@ -325,9 +337,9 @@ const Ds = {
325
337
  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",
326
338
  style: { "font-size": "16px" },
327
339
  onInput: s[0] || (s[0] = (r) => e("update:modelValue", r.target.value))
328
- }, null, 40, Cs));
340
+ }, null, 40, Ds));
329
341
  }
330
- }), Is = { class: "flex gap-1.5 justify-center" }, Ms = ["onUpdate:modelValue", "onInput", "onKeydown", "onPaste", "onFocus"], Ci = /* @__PURE__ */ Ee({
342
+ }), Is = { class: "flex gap-1.5 justify-center" }, Ms = ["onUpdate:modelValue", "onInput", "onKeydown", "onPaste", "onFocus"], Di = /* @__PURE__ */ De({
331
343
  __name: "AgentInputOneTimeCode",
332
344
  props: {
333
345
  modelValue: {},
@@ -337,72 +349,72 @@ const Ds = {
337
349
  emits: ["update:modelValue", "autoSubmit"],
338
350
  setup(l, { emit: t }) {
339
351
  const e = l, n = t, s = V([]), r = V(Array.from({ length: e.length }).fill("")), a = V(!1);
340
- Kt(() => {
352
+ Qt(() => {
341
353
  e.modelValue && (r.value = e.modelValue.split("").slice(0, e.length)), e.focusFirst && !("ontouchstart" in window) && s.value[0]?.focus();
342
- }), Je(() => e.modelValue, (p) => {
354
+ }), nt(() => e.modelValue, (p) => {
343
355
  r.value = p ? p.split("").slice(0, e.length) : Array.from({ length: e.length }).fill("");
344
- }), Je(r, () => {
356
+ }), nt(r, () => {
345
357
  const p = r.value.filter(Boolean).join("");
346
358
  n("update:modelValue", p), p.length === e.length && n("autoSubmit", p);
347
359
  }, { deep: !0 });
348
- function o(p, g) {
349
- g.preventDefault(), a.value = !0;
350
- const m = (g.clipboardData?.getData("text") || "").replace(/\D/g, "");
360
+ function o(p, f) {
361
+ f.preventDefault(), a.value = !0;
362
+ const m = (f.clipboardData?.getData("text") || "").replace(/\D/g, "");
351
363
  if (m.length === e.length)
352
364
  r.value = m.split(""), setTimeout(() => {
353
365
  s.value[e.length - 1]?.focus(), a.value = !1;
354
366
  }, 10);
355
367
  else {
356
368
  const y = [...r.value];
357
- m.split("").slice(0, e.length - p).forEach((O, ge) => {
358
- y[p + ge] = O;
369
+ m.split("").slice(0, e.length - p).forEach((z, de) => {
370
+ y[p + de] = z;
359
371
  }), r.value = y;
360
- const S = Math.min(p + m.length, e.length - 1);
372
+ const E = Math.min(p + m.length, e.length - 1);
361
373
  setTimeout(() => {
362
- s.value[S]?.focus(), a.value = !1;
374
+ s.value[E]?.focus(), a.value = !1;
363
375
  }, 10);
364
376
  }
365
377
  }
366
- u(o, "onPaste");
367
- function c(p, g) {
368
- const m = g.target.value.slice(-1).replace(/\D/g, "");
378
+ h(o, "onPaste");
379
+ function c(p, f) {
380
+ const m = f.target.value.slice(-1).replace(/\D/g, "");
369
381
  r.value[p] = m, m && p < e.length - 1 && s.value[p + 1]?.focus();
370
382
  }
371
- u(c, "onInput");
372
- function d(p, g) {
373
- 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();
383
+ h(c, "onInput");
384
+ function d(p, f) {
385
+ f.key === "Backspace" ? (f.preventDefault(), r.value[p] = "", p > 0 && s.value[p - 1]?.focus()) : f.key === "ArrowLeft" && p > 0 ? s.value[p - 1]?.focus() : f.key === "ArrowRight" && p < e.length - 1 && s.value[p + 1]?.focus();
374
386
  }
375
- u(d, "onKeydown");
376
- function f(p) {
387
+ h(d, "onKeydown");
388
+ function g(p) {
377
389
  if (s.value[p]?.select(), !a.value && r.value[p])
378
- for (let g = p; g < e.length; g++)
379
- r.value[g] = "";
390
+ for (let f = p; f < e.length; f++)
391
+ r.value[f] = "";
380
392
  }
381
- return u(f, "onFocus"), (p, g) => (A(), E("div", Is, [
382
- (A(!0), E(Te, null, mt(l.length, (m) => Zn((A(), E("input", {
393
+ return h(g, "onFocus"), (p, f) => (S(), A("div", Is, [
394
+ (S(!0), A(_e, null, xt(l.length, (m) => Xn((S(), A("input", {
383
395
  key: m,
384
396
  ref_for: !0,
385
- ref: /* @__PURE__ */ u((y) => s.value[m - 1] = y, "ref"),
386
- "onUpdate:modelValue": /* @__PURE__ */ u((y) => r.value[m - 1] = y, "onUpdate:modelValue"),
397
+ ref: /* @__PURE__ */ h((y) => s.value[m - 1] = y, "ref"),
398
+ "onUpdate:modelValue": /* @__PURE__ */ h((y) => r.value[m - 1] = y, "onUpdate:modelValue"),
387
399
  type: "text",
388
400
  inputmode: "numeric",
389
401
  autocomplete: "one-time-code",
390
402
  class: "size-11 text-center font-mono text-theme-900 bg-white border border-white rounded-lg focus:outline-none transition-all",
391
403
  style: { "font-size": "16px" },
392
404
  maxlength: "1",
393
- onInput: /* @__PURE__ */ u((y) => c(m - 1, y), "onInput"),
394
- onKeydown: /* @__PURE__ */ u((y) => d(m - 1, y), "onKeydown"),
395
- onPaste: /* @__PURE__ */ u((y) => o(m - 1, y), "onPaste"),
396
- onFocus: /* @__PURE__ */ u((y) => f(m - 1), "onFocus")
405
+ onInput: /* @__PURE__ */ h((y) => c(m - 1, y), "onInput"),
406
+ onKeydown: /* @__PURE__ */ h((y) => d(m - 1, y), "onKeydown"),
407
+ onPaste: /* @__PURE__ */ h((y) => o(m - 1, y), "onPaste"),
408
+ onFocus: /* @__PURE__ */ h((y) => g(m - 1), "onFocus")
397
409
  }, null, 40, Ms)), [
398
- [Xn, r.value[m - 1]]
410
+ [Kn, r.value[m - 1]]
399
411
  ])), 128))
400
412
  ]));
401
413
  }
402
- }), Ls = { class: "relative flex-shrink-0" }, zs = ["src", "alt"], Os = { class: "absolute top-1 right-1" }, Ns = {
414
+ }), Ls = { class: "relative flex-shrink-0" }, zs = ["src", "alt"], Os = { class: "absolute top-1 right-1" }, Ps = {
403
415
  key: 1,
404
416
  class: "size-3 bg-theme-400 rounded-full ring-2 ring-white"
405
- }, Ps = { class: "min-w-0" }, $s = /* @__PURE__ */ Ee({
417
+ }, Ns = { class: "min-w-0" }, $s = /* @__PURE__ */ De({
406
418
  __name: "ElModeHeader",
407
419
  props: {
408
420
  agent: {},
@@ -411,7 +423,7 @@ const Ds = {
411
423
  layout: { default: "centered" }
412
424
  },
413
425
  setup(l) {
414
- return (t, e) => (A(), E("div", {
426
+ return (t, e) => (S(), A("div", {
415
427
  class: _(["flex gap-4", [
416
428
  l.layout === "centered" ? "flex-col items-center text-center" : "flex-row items-center justify-center"
417
429
  ]])
@@ -425,39 +437,39 @@ const Ds = {
425
437
  alt: l.agent.displayName.value,
426
438
  class: "w-full h-full object-cover",
427
439
  onError: e[0] || (e[0] = //@ts-ignore
428
- (...n) => Vt(Ln) && Vt(Ln)(...n))
440
+ (...n) => Yt(zn) && Yt(zn)(...n))
429
441
  }, null, 40, zs)
430
442
  ], 2),
431
443
  T("div", Os, [
432
- l.isOnline ? (A(), E(Te, { key: 0 }, [
444
+ l.isOnline ? (S(), A(_e, { key: 0 }, [
433
445
  e[1] || (e[1] = T("div", {
434
446
  class: "size-3 bg-green-500 rounded-full ring-2 ring-white absolute animate-ping",
435
447
  style: { "animation-duration": "3s" }
436
448
  }, null, -1)),
437
449
  e[2] || (e[2] = T("div", { class: "size-3 bg-green-500 rounded-full ring-2 ring-white" }, null, -1))
438
- ], 64)) : (A(), E("div", Ns))
450
+ ], 64)) : (S(), A("div", Ps))
439
451
  ])
440
452
  ]),
441
- T("div", Ps, [
453
+ T("div", Ns, [
442
454
  T("h1", {
443
455
  class: _(["font-light text-white mb-1 truncate", [
444
456
  l.size === "lg" ? "text-3xl mb-2" : "text-xl sm:text-2xl tracking-wide leading-tight",
445
457
  l.layout === "horizontal" ? "text-white/95" : ""
446
458
  ]])
447
- }, ue(l.agent.displayName.value), 3),
459
+ }, ie(l.agent.displayName.value), 3),
448
460
  T("p", {
449
461
  class: _(["font-light line-clamp-1", [
450
462
  l.size === "lg" ? "text-base text-white/60" : "text-sm sm:text-base",
451
463
  l.layout === "horizontal" ? "text-white/70 truncate" : "text-white/60"
452
464
  ]])
453
- }, ue(l.layout === "horizontal" ? l.agent.title.value || "Digital Agent" : l.agent.title.value), 3)
465
+ }, ie(l.layout === "horizontal" ? l.agent.title.value || "Digital Agent" : l.agent.title.value), 3)
454
466
  ])
455
467
  ], 2));
456
468
  }
457
469
  });
458
470
  const {
459
- entries: Qn,
460
- setPrototypeOf: zn,
471
+ entries: Jn,
472
+ setPrototypeOf: On,
461
473
  isFrozen: Us,
462
474
  getPrototypeOf: Bs,
463
475
  getOwnPropertyDescriptor: Fs
@@ -465,48 +477,48 @@ const {
465
477
  let {
466
478
  freeze: Z,
467
479
  seal: te,
468
- create: xt
480
+ create: et
469
481
  } = Object, {
470
- apply: Yt,
471
- construct: Zt
482
+ apply: Zt,
483
+ construct: Xt
472
484
  } = typeof Reflect < "u" && Reflect;
473
- Z || (Z = /* @__PURE__ */ u(function(t) {
485
+ Z || (Z = /* @__PURE__ */ h(function(t) {
474
486
  return t;
475
487
  }, "freeze"));
476
- te || (te = /* @__PURE__ */ u(function(t) {
488
+ te || (te = /* @__PURE__ */ h(function(t) {
477
489
  return t;
478
490
  }, "seal"));
479
- Yt || (Yt = /* @__PURE__ */ u(function(t, e) {
491
+ Zt || (Zt = /* @__PURE__ */ h(function(t, e) {
480
492
  for (var n = arguments.length, s = new Array(n > 2 ? n - 2 : 0), r = 2; r < n; r++)
481
493
  s[r - 2] = arguments[r];
482
494
  return t.apply(e, s);
483
495
  }, "apply"));
484
- Zt || (Zt = /* @__PURE__ */ u(function(t) {
496
+ Xt || (Xt = /* @__PURE__ */ h(function(t) {
485
497
  for (var e = arguments.length, n = new Array(e > 1 ? e - 1 : 0), s = 1; s < e; s++)
486
498
  n[s - 1] = arguments[s];
487
499
  return new t(...n);
488
500
  }, "construct"));
489
- const dt = X(Array.prototype.forEach), Hs = X(Array.prototype.lastIndexOf), On = X(Array.prototype.pop), je = X(Array.prototype.push), Gs = X(Array.prototype.splice), bt = X(String.prototype.toLowerCase), Ft = X(String.prototype.toString), Ht = X(String.prototype.match), qe = X(String.prototype.replace), Ws = X(String.prototype.indexOf), js = X(String.prototype.trim), Q = X(Object.prototype.hasOwnProperty), q = X(RegExp.prototype.test), Ve = qs(TypeError);
501
+ const Ve = X(Array.prototype.forEach), Hs = X(Array.prototype.lastIndexOf), Pn = X(Array.prototype.pop), Ye = X(Array.prototype.push), Gs = X(Array.prototype.splice), bt = X(String.prototype.toLowerCase), Ht = X(String.prototype.toString), Gt = X(String.prototype.match), Ne = X(String.prototype.replace), Ws = X(String.prototype.indexOf), js = X(String.prototype.trim), ae = X(Object.prototype.hasOwnProperty), q = X(RegExp.prototype.test), Ze = qs(TypeError);
490
502
  function X(l) {
491
503
  return function(t) {
492
504
  t instanceof RegExp && (t.lastIndex = 0);
493
505
  for (var e = arguments.length, n = new Array(e > 1 ? e - 1 : 0), s = 1; s < e; s++)
494
506
  n[s - 1] = arguments[s];
495
- return Yt(l, t, n);
507
+ return Zt(l, t, n);
496
508
  };
497
509
  }
498
- u(X, "unapply");
510
+ h(X, "unapply");
499
511
  function qs(l) {
500
512
  return function() {
501
513
  for (var t = arguments.length, e = new Array(t), n = 0; n < t; n++)
502
514
  e[n] = arguments[n];
503
- return Zt(l, e);
515
+ return Xt(l, e);
504
516
  };
505
517
  }
506
- u(qs, "unconstruct");
518
+ h(qs, "unconstruct");
507
519
  function R(l, t) {
508
520
  let e = arguments.length > 2 && arguments[2] !== void 0 ? arguments[2] : bt;
509
- zn && zn(l, null);
521
+ On && On(l, null);
510
522
  let n = t.length;
511
523
  for (; n--; ) {
512
524
  let s = t[n];
@@ -518,21 +530,21 @@ function R(l, t) {
518
530
  }
519
531
  return l;
520
532
  }
521
- u(R, "addToSet");
533
+ h(R, "addToSet");
522
534
  function Vs(l) {
523
535
  for (let t = 0; t < l.length; t++)
524
- Q(l, t) || (l[t] = null);
536
+ ae(l, t) || (l[t] = null);
525
537
  return l;
526
538
  }
527
- u(Vs, "cleanArray");
528
- function oe(l) {
529
- const t = xt(null);
530
- for (const [e, n] of Qn(l))
531
- Q(l, e) && (Array.isArray(n) ? t[e] = Vs(n) : n && typeof n == "object" && n.constructor === Object ? t[e] = oe(n) : t[e] = n);
539
+ h(Vs, "cleanArray");
540
+ function he(l) {
541
+ const t = et(null);
542
+ for (const [e, n] of Jn(l))
543
+ ae(l, e) && (Array.isArray(n) ? t[e] = Vs(n) : n && typeof n == "object" && n.constructor === Object ? t[e] = he(n) : t[e] = n);
532
544
  return t;
533
545
  }
534
- u(oe, "clone");
535
- function Ye(l, t) {
546
+ h(he, "clone");
547
+ function Xe(l, t) {
536
548
  for (; l !== null; ) {
537
549
  const n = Fs(l, t);
538
550
  if (n) {
@@ -546,39 +558,39 @@ function Ye(l, t) {
546
558
  function e() {
547
559
  return null;
548
560
  }
549
- return u(e, "fallbackValue"), e;
561
+ return h(e, "fallbackValue"), e;
550
562
  }
551
- u(Ye, "lookupGetter");
552
- const Nn = 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"]), Gt = 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"]), Wt = 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"]), Ys = 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"]), jt = 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"]), Zs = Z(["maction", "maligngroup", "malignmark", "mlongdiv", "mscarries", "mscarry", "msgroup", "mstack", "msline", "msrow", "semantics", "annotation", "annotation-xml", "mprescripts", "none"]), Pn = Z(["#text"]), $n = 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"]), qt = 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"]), Un = 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"]), 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(
563
+ h(Xe, "lookupGetter");
564
+ const Nn = 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"]), Wt = 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"]), jt = 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"]), Ys = 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"]), qt = 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"]), Zs = Z(["maction", "maligngroup", "malignmark", "mlongdiv", "mscarries", "mscarry", "msgroup", "mstack", "msline", "msrow", "semantics", "annotation", "annotation-xml", "mprescripts", "none"]), $n = Z(["#text"]), Un = 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"]), Vt = 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"]), Bn = Z(["accent", "accentunder", "align", "bevelled", "close", "columnalign", "columnlines", "columnspacing", "columnspan", "denomalign", "depth", "dir", "display", "displaystyle", "encoding", "fence", "frame", "height", "href", "id", "largeop", "length", "linethickness", "lquote", "lspace", "mathbackground", "mathcolor", "mathsize", "mathvariant", "maxsize", "minsize", "movablelimits", "notation", "numalign", "open", "rowalign", "rowlines", "rowspacing", "rowspan", "rspace", "rquote", "scriptlevel", "scriptminsize", "scriptsizemultiplier", "selection", "separator", "separators", "stretchy", "subscriptshift", "supscriptshift", "symmetric", "voffset", "width", "xmlns"]), gt = Z(["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]+$/), es = te(
553
565
  /^(?:(?:(?:f|ht)tps?|mailto|tel|callto|sms|cid|xmpp|matrix):|[^a-z]|[a-z+.\-]+(?:[^a-z+.\-:]|$))/i
554
566
  // eslint-disable-line no-useless-escape
555
567
  ), tr = te(/^(?:\w+script|data):/i), nr = te(
556
568
  /[\u0000-\u0020\u00A0\u1680\u180E\u2000-\u2029\u205F\u3000]/g
557
569
  // eslint-disable-line no-control-regex
558
- ), es = te(/^html$/i), sr = te(/^[a-z][.\w]*(-[.\w]+)+$/i);
559
- var Bn = /* @__PURE__ */ Object.freeze({
570
+ ), ts = te(/^html$/i), sr = te(/^[a-z][.\w]*(-[.\w]+)+$/i);
571
+ var Fn = /* @__PURE__ */ Object.freeze({
560
572
  __proto__: null,
561
573
  ARIA_ATTR: er,
562
574
  ATTR_WHITESPACE: nr,
563
575
  CUSTOM_ELEMENT: sr,
564
576
  DATA_ATTR: Js,
565
- DOCTYPE_NAME: es,
577
+ DOCTYPE_NAME: ts,
566
578
  ERB_EXPR: Ks,
567
- IS_ALLOWED_URI: Jn,
579
+ IS_ALLOWED_URI: es,
568
580
  IS_SCRIPT_OR_DATA: tr,
569
581
  MUSTACHE_EXPR: Xs,
570
582
  TMPLIT_EXPR: Qs
571
583
  });
572
- const Ze = {
584
+ const Ke = {
573
585
  element: 1,
574
586
  text: 3,
575
587
  // Deprecated
576
588
  progressingInstruction: 7,
577
589
  comment: 8,
578
590
  document: 9
579
- }, rr = /* @__PURE__ */ u(function() {
591
+ }, rr = /* @__PURE__ */ h(function() {
580
592
  return typeof window > "u" ? null : window;
581
- }, "getGlobal"), ir = /* @__PURE__ */ u(function(t, e) {
593
+ }, "getGlobal"), ir = /* @__PURE__ */ h(function(t, e) {
582
594
  if (typeof t != "object" || typeof t.createPolicy != "function")
583
595
  return null;
584
596
  let n = null;
@@ -597,7 +609,7 @@ const Ze = {
597
609
  } catch {
598
610
  return console.warn("TrustedTypes policy " + r + " could not be created."), null;
599
611
  }
600
- }, "_createTrustedTypesPolicy"), Fn = /* @__PURE__ */ u(function() {
612
+ }, "_createTrustedTypesPolicy"), Hn = /* @__PURE__ */ h(function() {
601
613
  return {
602
614
  afterSanitizeAttributes: [],
603
615
  afterSanitizeElements: [],
@@ -610,10 +622,10 @@ const Ze = {
610
622
  uponSanitizeShadowNode: []
611
623
  };
612
624
  }, "_createHooksMap");
613
- function ts() {
625
+ function ns() {
614
626
  let l = arguments.length > 0 && arguments[0] !== void 0 ? arguments[0] : rr();
615
- const t = /* @__PURE__ */ u((w) => ts(w), "DOMPurify");
616
- if (t.version = "3.3.3", t.removed = [], !l || !l.document || l.document.nodeType !== Ze.document || !l.Element)
627
+ const t = /* @__PURE__ */ h((v) => ns(v), "DOMPurify");
628
+ if (t.version = "3.4.0", t.removed = [], !l || !l.document || l.document.nodeType !== Ke.document || !l.Element)
617
629
  return t.isSupported = !1, t;
618
630
  let {
619
631
  document: e
@@ -624,43 +636,43 @@ function ts() {
624
636
  Node: o,
625
637
  Element: c,
626
638
  NodeFilter: d,
627
- NamedNodeMap: f = l.NamedNodeMap || l.MozNamedAttrMap,
639
+ NamedNodeMap: g = l.NamedNodeMap || l.MozNamedAttrMap,
628
640
  HTMLFormElement: p,
629
- DOMParser: g,
641
+ DOMParser: f,
630
642
  trustedTypes: m
631
- } = l, y = c.prototype, S = Ye(y, "cloneNode"), O = Ye(y, "remove"), ge = Ye(y, "nextSibling"), me = Ye(y, "childNodes"), ne = Ye(y, "parentNode");
643
+ } = l, y = c.prototype, E = Xe(y, "cloneNode"), z = Xe(y, "remove"), de = Xe(y, "nextSibling"), me = Xe(y, "childNodes"), ne = Xe(y, "parentNode");
632
644
  if (typeof a == "function") {
633
- const w = e.createElement("template");
634
- w.content && w.content.ownerDocument && (e = w.content.ownerDocument);
645
+ const v = e.createElement("template");
646
+ v.content && v.content.ownerDocument && (e = v.content.ownerDocument);
635
647
  }
636
648
  let $, j = "";
637
649
  const {
638
650
  implementation: se,
639
- createNodeIterator: he,
640
- createDocumentFragment: tt,
641
- getElementsByTagName: L
651
+ createNodeIterator: fe,
652
+ createDocumentFragment: rt,
653
+ getElementsByTagName: M
642
654
  } = e, {
643
- importNode: nt
655
+ importNode: it
644
656
  } = n;
645
- let U = Fn();
646
- t.isSupported = typeof Qn == "function" && typeof ne == "function" && se && se.createHTMLDocument !== void 0;
657
+ let U = Hn();
658
+ t.isSupported = typeof Jn == "function" && typeof ne == "function" && se && se.createHTMLDocument !== void 0;
647
659
  const {
648
- MUSTACHE_EXPR: Re,
649
- ERB_EXPR: Fe,
650
- TMPLIT_EXPR: De,
660
+ MUSTACHE_EXPR: ve,
661
+ ERB_EXPR: Me,
662
+ TMPLIT_EXPR: ye,
651
663
  DATA_ATTR: At,
652
664
  ARIA_ATTR: Et,
653
665
  IS_SCRIPT_OR_DATA: _t,
654
- ATTR_WHITESPACE: st,
655
- CUSTOM_ELEMENT: rt
656
- } = Bn;
666
+ ATTR_WHITESPACE: at,
667
+ CUSTOM_ELEMENT: lt
668
+ } = Fn;
657
669
  let {
658
- IS_ALLOWED_URI: He
659
- } = Bn, b = null;
660
- const v = R({}, [...Nn, ...Gt, ...Wt, ...jt, ...Pn]);
661
- let k = null;
662
- const z = R({}, [...$n, ...qt, ...Un, ...ft]);
663
- let D = Object.seal(xt(null, {
670
+ IS_ALLOWED_URI: Ge
671
+ } = Fn, k = null;
672
+ const w = R({}, [...Nn, ...Wt, ...jt, ...qt, ...$n]);
673
+ let b = null;
674
+ const O = R({}, [...Un, ...Vt, ...Bn, ...gt]);
675
+ let C = Object.seal(et(null, {
664
676
  tagNameCheck: {
665
677
  writable: !0,
666
678
  configurable: !1,
@@ -679,8 +691,8 @@ function ts() {
679
691
  enumerable: !0,
680
692
  value: !1
681
693
  }
682
- })), J = null, we = null;
683
- const ee = Object.seal(xt(null, {
694
+ })), J = null, Te = null;
695
+ const ee = Object.seal(et(null, {
684
696
  tagCheck: {
685
697
  writable: !0,
686
698
  configurable: !1,
@@ -694,169 +706,169 @@ function ts() {
694
706
  value: null
695
707
  }
696
708
  }));
697
- let cn = !0, Rt = !0, un = !1, hn = !0, Ce = !1, it = !0, ve = !1, Dt = !1, Ct = !1, Ie = !1, at = !1, lt = !1, pn = !0, dn = !1;
698
- const ps = "user-content-";
699
- let It = !0, Ge = !1, Me = {}, ae = null;
709
+ let un = !0, Rt = !0, hn = !1, pn = !0, Se = !1, We = !0, Ae = !1, Ct = !1, Dt = !1, Le = !1, ot = !1, ct = !1, dn = !0, fn = !1;
710
+ const ds = "user-content-";
711
+ let It = !0, je = !1, ze = {}, ce = null;
700
712
  const Mt = 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"]);
701
- let fn = null;
702
- const gn = R({}, ["audio", "video", "img", "source", "image", "track"]);
713
+ let gn = null;
714
+ const mn = R({}, ["audio", "video", "img", "source", "image", "track"]);
703
715
  let Lt = null;
704
- const mn = 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", pe = "http://www.w3.org/1999/xhtml";
705
- let Le = pe, zt = !1, Ot = null;
706
- const ds = R({}, [ot, ct, pe], Ft);
707
- let ut = R({}, ["mi", "mo", "mn", "ms", "mtext"]), ht = R({}, ["annotation-xml"]);
708
- const fs = R({}, ["title", "style", "font", "a", "script"]);
709
- let We = null;
710
- const gs = ["application/xhtml+xml", "text/html"], ms = "text/html";
711
- let B = null, ze = null;
712
- const xs = e.createElement("form"), xn = /* @__PURE__ */ u(function(i) {
716
+ const xn = R({}, ["alt", "class", "for", "id", "label", "name", "pattern", "placeholder", "role", "summary", "title", "value", "style", "xmlns"]), ut = "http://www.w3.org/1998/Math/MathML", ht = "http://www.w3.org/2000/svg", ue = "http://www.w3.org/1999/xhtml";
717
+ let Oe = ue, zt = !1, Ot = null;
718
+ const fs = R({}, [ut, ht, ue], Ht);
719
+ let pt = R({}, ["mi", "mo", "mn", "ms", "mtext"]), dt = R({}, ["annotation-xml"]);
720
+ const gs = R({}, ["title", "style", "font", "a", "script"]);
721
+ let qe = null;
722
+ const ms = ["application/xhtml+xml", "text/html"], xs = "text/html";
723
+ let B = null, Pe = null;
724
+ const bs = e.createElement("form"), bn = /* @__PURE__ */ h(function(i) {
713
725
  return i instanceof RegExp || i instanceof Function;
714
- }, "isRegexOrFunction"), Nt = /* @__PURE__ */ u(function() {
726
+ }, "isRegexOrFunction"), Pt = /* @__PURE__ */ h(function() {
715
727
  let i = arguments.length > 0 && arguments[0] !== void 0 ? arguments[0] : {};
716
- if (!(ze && ze === i)) {
717
- if ((!i || typeof i != "object") && (i = {}), i = oe(i), We = // eslint-disable-next-line unicorn/prefer-includes
718
- gs.indexOf(i.PARSER_MEDIA_TYPE) === -1 ? ms : i.PARSER_MEDIA_TYPE, B = We === "application/xhtml+xml" ? Ft : bt, b = Q(i, "ALLOWED_TAGS") ? R({}, i.ALLOWED_TAGS, B) : v, k = Q(i, "ALLOWED_ATTR") ? R({}, i.ALLOWED_ATTR, B) : z, Ot = Q(i, "ALLOWED_NAMESPACES") ? R({}, i.ALLOWED_NAMESPACES, Ft) : ds, Lt = Q(i, "ADD_URI_SAFE_ATTR") ? R(oe(mn), i.ADD_URI_SAFE_ATTR, B) : mn, fn = Q(i, "ADD_DATA_URI_TAGS") ? R(oe(gn), i.ADD_DATA_URI_TAGS, B) : gn, ae = Q(i, "FORBID_CONTENTS") ? R({}, i.FORBID_CONTENTS, B) : Mt, J = Q(i, "FORBID_TAGS") ? R({}, i.FORBID_TAGS, B) : oe({}), we = Q(i, "FORBID_ATTR") ? R({}, i.FORBID_ATTR, B) : oe({}), Me = Q(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, it = i.SAFE_FOR_XML !== !1, ve = i.WHOLE_DOCUMENT || !1, Ie = i.RETURN_DOM || !1, at = i.RETURN_DOM_FRAGMENT || !1, lt = 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, He = i.ALLOWED_URI_REGEXP || Jn, Le = i.NAMESPACE || pe, ut = i.MATHML_TEXT_INTEGRATION_POINTS || ut, ht = i.HTML_INTEGRATION_POINTS || ht, D = i.CUSTOM_ELEMENT_HANDLING || {}, i.CUSTOM_ELEMENT_HANDLING && xn(i.CUSTOM_ELEMENT_HANDLING.tagNameCheck) && (D.tagNameCheck = i.CUSTOM_ELEMENT_HANDLING.tagNameCheck), i.CUSTOM_ELEMENT_HANDLING && xn(i.CUSTOM_ELEMENT_HANDLING.attributeNameCheck) && (D.attributeNameCheck = i.CUSTOM_ELEMENT_HANDLING.attributeNameCheck), i.CUSTOM_ELEMENT_HANDLING && typeof i.CUSTOM_ELEMENT_HANDLING.allowCustomizedBuiltInElements == "boolean" && (D.allowCustomizedBuiltInElements = i.CUSTOM_ELEMENT_HANDLING.allowCustomizedBuiltInElements), Ce && (Rt = !1), at && (Ie = !0), Me && (b = R({}, Pn), k = xt(null), Me.html === !0 && (R(b, Nn), R(k, $n)), Me.svg === !0 && (R(b, Gt), R(k, qt), R(k, ft)), Me.svgFilters === !0 && (R(b, Wt), R(k, qt), R(k, ft)), Me.mathMl === !0 && (R(b, jt), R(k, Un), R(k, ft))), Q(i, "ADD_TAGS") || (ee.tagCheck = null), Q(i, "ADD_ATTR") || (ee.attributeCheck = null), i.ADD_TAGS && (typeof i.ADD_TAGS == "function" ? ee.tagCheck = i.ADD_TAGS : (b === v && (b = oe(b)), R(b, i.ADD_TAGS, B))), i.ADD_ATTR && (typeof i.ADD_ATTR == "function" ? ee.attributeCheck = i.ADD_ATTR : (k === z && (k = oe(k)), R(k, i.ADD_ATTR, B))), i.ADD_URI_SAFE_ATTR && R(Lt, i.ADD_URI_SAFE_ATTR, B), i.FORBID_CONTENTS && (ae === Mt && (ae = oe(ae)), R(ae, i.FORBID_CONTENTS, B)), i.ADD_FORBID_CONTENTS && (ae === Mt && (ae = oe(ae)), R(ae, i.ADD_FORBID_CONTENTS, B)), It && (b["#text"] = !0), ve && R(b, ["html", "head", "body"]), b.table && (R(b, ["tbody"]), delete J.tbody), i.TRUSTED_TYPES_POLICY) {
728
+ if (!(Pe && Pe === i)) {
729
+ if ((!i || typeof i != "object") && (i = {}), i = he(i), qe = // eslint-disable-next-line unicorn/prefer-includes
730
+ ms.indexOf(i.PARSER_MEDIA_TYPE) === -1 ? xs : i.PARSER_MEDIA_TYPE, B = qe === "application/xhtml+xml" ? Ht : bt, k = ae(i, "ALLOWED_TAGS") ? R({}, i.ALLOWED_TAGS, B) : w, b = ae(i, "ALLOWED_ATTR") ? R({}, i.ALLOWED_ATTR, B) : O, Ot = ae(i, "ALLOWED_NAMESPACES") ? R({}, i.ALLOWED_NAMESPACES, Ht) : fs, Lt = ae(i, "ADD_URI_SAFE_ATTR") ? R(he(xn), i.ADD_URI_SAFE_ATTR, B) : xn, gn = ae(i, "ADD_DATA_URI_TAGS") ? R(he(mn), i.ADD_DATA_URI_TAGS, B) : mn, ce = ae(i, "FORBID_CONTENTS") ? R({}, i.FORBID_CONTENTS, B) : Mt, J = ae(i, "FORBID_TAGS") ? R({}, i.FORBID_TAGS, B) : he({}), Te = ae(i, "FORBID_ATTR") ? R({}, i.FORBID_ATTR, B) : he({}), ze = ae(i, "USE_PROFILES") ? i.USE_PROFILES : !1, un = i.ALLOW_ARIA_ATTR !== !1, Rt = i.ALLOW_DATA_ATTR !== !1, hn = i.ALLOW_UNKNOWN_PROTOCOLS || !1, pn = i.ALLOW_SELF_CLOSE_IN_ATTR !== !1, Se = i.SAFE_FOR_TEMPLATES || !1, We = i.SAFE_FOR_XML !== !1, Ae = i.WHOLE_DOCUMENT || !1, Le = i.RETURN_DOM || !1, ot = i.RETURN_DOM_FRAGMENT || !1, ct = i.RETURN_TRUSTED_TYPE || !1, Dt = i.FORCE_BODY || !1, dn = i.SANITIZE_DOM !== !1, fn = i.SANITIZE_NAMED_PROPS || !1, It = i.KEEP_CONTENT !== !1, je = i.IN_PLACE || !1, Ge = i.ALLOWED_URI_REGEXP || es, Oe = i.NAMESPACE || ue, pt = i.MATHML_TEXT_INTEGRATION_POINTS || pt, dt = i.HTML_INTEGRATION_POINTS || dt, C = i.CUSTOM_ELEMENT_HANDLING || et(null), i.CUSTOM_ELEMENT_HANDLING && bn(i.CUSTOM_ELEMENT_HANDLING.tagNameCheck) && (C.tagNameCheck = i.CUSTOM_ELEMENT_HANDLING.tagNameCheck), i.CUSTOM_ELEMENT_HANDLING && bn(i.CUSTOM_ELEMENT_HANDLING.attributeNameCheck) && (C.attributeNameCheck = i.CUSTOM_ELEMENT_HANDLING.attributeNameCheck), i.CUSTOM_ELEMENT_HANDLING && typeof i.CUSTOM_ELEMENT_HANDLING.allowCustomizedBuiltInElements == "boolean" && (C.allowCustomizedBuiltInElements = i.CUSTOM_ELEMENT_HANDLING.allowCustomizedBuiltInElements), Se && (Rt = !1), ot && (Le = !0), ze && (k = R({}, $n), b = et(null), ze.html === !0 && (R(k, Nn), R(b, Un)), ze.svg === !0 && (R(k, Wt), R(b, Vt), R(b, gt)), ze.svgFilters === !0 && (R(k, jt), R(b, Vt), R(b, gt)), ze.mathMl === !0 && (R(k, qt), R(b, Bn), R(b, gt))), ee.tagCheck = null, ee.attributeCheck = null, i.ADD_TAGS && (typeof i.ADD_TAGS == "function" ? ee.tagCheck = i.ADD_TAGS : (k === w && (k = he(k)), R(k, i.ADD_TAGS, B))), i.ADD_ATTR && (typeof i.ADD_ATTR == "function" ? ee.attributeCheck = i.ADD_ATTR : (b === O && (b = he(b)), R(b, i.ADD_ATTR, B))), i.ADD_URI_SAFE_ATTR && R(Lt, i.ADD_URI_SAFE_ATTR, B), i.FORBID_CONTENTS && (ce === Mt && (ce = he(ce)), R(ce, i.FORBID_CONTENTS, B)), i.ADD_FORBID_CONTENTS && (ce === Mt && (ce = he(ce)), R(ce, i.ADD_FORBID_CONTENTS, B)), It && (k["#text"] = !0), Ae && R(k, ["html", "head", "body"]), k.table && (R(k, ["tbody"]), delete J.tbody), i.TRUSTED_TYPES_POLICY) {
719
731
  if (typeof i.TRUSTED_TYPES_POLICY.createHTML != "function")
720
- throw Ve('TRUSTED_TYPES_POLICY configuration option must provide a "createHTML" hook.');
732
+ throw Ze('TRUSTED_TYPES_POLICY configuration option must provide a "createHTML" hook.');
721
733
  if (typeof i.TRUSTED_TYPES_POLICY.createScriptURL != "function")
722
- throw Ve('TRUSTED_TYPES_POLICY configuration option must provide a "createScriptURL" hook.');
734
+ throw Ze('TRUSTED_TYPES_POLICY configuration option must provide a "createScriptURL" hook.');
723
735
  $ = i.TRUSTED_TYPES_POLICY, j = $.createHTML("");
724
736
  } else
725
737
  $ === void 0 && ($ = ir(m, s)), $ !== null && typeof j == "string" && (j = $.createHTML(""));
726
- Z && Z(i), ze = i;
738
+ Z && Z(i), Pe = i;
727
739
  }
728
- }, "_parseConfig"), bn = R({}, [...Gt, ...Wt, ...Ys]), kn = R({}, [...jt, ...Zs]), bs = /* @__PURE__ */ u(function(i) {
729
- let h = ne(i);
730
- (!h || !h.tagName) && (h = {
731
- namespaceURI: Le,
740
+ }, "_parseConfig"), kn = R({}, [...Wt, ...jt, ...Ys]), wn = R({}, [...qt, ...Zs]), ks = /* @__PURE__ */ h(function(i) {
741
+ let u = ne(i);
742
+ (!u || !u.tagName) && (u = {
743
+ namespaceURI: Oe,
732
744
  tagName: "template"
733
745
  });
734
- const x = bt(i.tagName), N = bt(h.tagName);
735
- return Ot[i.namespaceURI] ? i.namespaceURI === ct ? h.namespaceURI === pe ? x === "svg" : h.namespaceURI === ot ? x === "svg" && (N === "annotation-xml" || ut[N]) : !!bn[x] : i.namespaceURI === ot ? h.namespaceURI === pe ? x === "math" : h.namespaceURI === ct ? x === "math" && ht[N] : !!kn[x] : i.namespaceURI === pe ? h.namespaceURI === ct && !ht[N] || h.namespaceURI === ot && !ut[N] ? !1 : !kn[x] && (fs[x] || !bn[x]) : !!(We === "application/xhtml+xml" && Ot[i.namespaceURI]) : !1;
736
- }, "_checkValidNamespace"), le = /* @__PURE__ */ u(function(i) {
737
- je(t.removed, {
746
+ const x = bt(i.tagName), P = bt(u.tagName);
747
+ return Ot[i.namespaceURI] ? i.namespaceURI === ht ? u.namespaceURI === ue ? x === "svg" : u.namespaceURI === ut ? x === "svg" && (P === "annotation-xml" || pt[P]) : !!kn[x] : i.namespaceURI === ut ? u.namespaceURI === ue ? x === "math" : u.namespaceURI === ht ? x === "math" && dt[P] : !!wn[x] : i.namespaceURI === ue ? u.namespaceURI === ht && !dt[P] || u.namespaceURI === ut && !pt[P] ? !1 : !wn[x] && (gs[x] || !kn[x]) : !!(qe === "application/xhtml+xml" && Ot[i.namespaceURI]) : !1;
748
+ }, "_checkValidNamespace"), re = /* @__PURE__ */ h(function(i) {
749
+ Ye(t.removed, {
738
750
  element: i
739
751
  });
740
752
  try {
741
753
  ne(i).removeChild(i);
742
754
  } catch {
743
- O(i);
755
+ z(i);
744
756
  }
745
- }, "_forceRemove"), ye = /* @__PURE__ */ u(function(i, h) {
757
+ }, "_forceRemove"), Ee = /* @__PURE__ */ h(function(i, u) {
746
758
  try {
747
- je(t.removed, {
748
- attribute: h.getAttributeNode(i),
749
- from: h
759
+ Ye(t.removed, {
760
+ attribute: u.getAttributeNode(i),
761
+ from: u
750
762
  });
751
763
  } catch {
752
- je(t.removed, {
764
+ Ye(t.removed, {
753
765
  attribute: null,
754
- from: h
766
+ from: u
755
767
  });
756
768
  }
757
- if (h.removeAttribute(i), i === "is")
758
- if (Ie || at)
769
+ if (u.removeAttribute(i), i === "is")
770
+ if (Le || ot)
759
771
  try {
760
- le(h);
772
+ re(u);
761
773
  } catch {
762
774
  }
763
775
  else
764
776
  try {
765
- h.setAttribute(i, "");
777
+ u.setAttribute(i, "");
766
778
  } catch {
767
779
  }
768
- }, "_removeAttribute"), wn = /* @__PURE__ */ u(function(i) {
769
- let h = null, x = null;
770
- if (Ct)
780
+ }, "_removeAttribute"), vn = /* @__PURE__ */ h(function(i) {
781
+ let u = null, x = null;
782
+ if (Dt)
771
783
  i = "<remove></remove>" + i;
772
784
  else {
773
- const P = Ht(i, /^[\r\n\t ]+/);
774
- x = P && P[0];
785
+ const N = Gt(i, /^[\r\n\t ]+/);
786
+ x = N && N[0];
775
787
  }
776
- We === "application/xhtml+xml" && Le === pe && (i = '<html xmlns="http://www.w3.org/1999/xhtml"><head></head><body>' + i + "</body></html>");
777
- const N = $ ? $.createHTML(i) : i;
778
- if (Le === pe)
788
+ qe === "application/xhtml+xml" && Oe === ue && (i = '<html xmlns="http://www.w3.org/1999/xhtml"><head></head><body>' + i + "</body></html>");
789
+ const P = $ ? $.createHTML(i) : i;
790
+ if (Oe === ue)
779
791
  try {
780
- h = new g().parseFromString(N, We);
792
+ u = new f().parseFromString(P, qe);
781
793
  } catch {
782
794
  }
783
- if (!h || !h.documentElement) {
784
- h = se.createDocument(Le, "template", null);
795
+ if (!u || !u.documentElement) {
796
+ u = se.createDocument(Oe, "template", null);
785
797
  try {
786
- h.documentElement.innerHTML = zt ? j : N;
798
+ u.documentElement.innerHTML = zt ? j : P;
787
799
  } catch {
788
800
  }
789
801
  }
790
- const W = h.body || h.documentElement;
791
- return i && x && W.insertBefore(e.createTextNode(x), W.childNodes[0] || null), Le === pe ? L.call(h, ve ? "html" : "body")[0] : ve ? h.documentElement : W;
792
- }, "_initDocument"), vn = /* @__PURE__ */ u(function(i) {
793
- return he.call(
802
+ const W = u.body || u.documentElement;
803
+ return i && x && W.insertBefore(e.createTextNode(x), W.childNodes[0] || null), Oe === ue ? M.call(u, Ae ? "html" : "body")[0] : Ae ? u.documentElement : W;
804
+ }, "_initDocument"), yn = /* @__PURE__ */ h(function(i) {
805
+ return fe.call(
794
806
  i.ownerDocument || i,
795
807
  i,
796
808
  // eslint-disable-next-line no-bitwise
797
809
  d.SHOW_ELEMENT | d.SHOW_COMMENT | d.SHOW_TEXT | d.SHOW_PROCESSING_INSTRUCTION | d.SHOW_CDATA_SECTION,
798
810
  null
799
811
  );
800
- }, "_createNodeIterator"), Pt = /* @__PURE__ */ u(function(i) {
801
- return i instanceof p && (typeof i.nodeName != "string" || typeof i.textContent != "string" || typeof i.removeChild != "function" || !(i.attributes instanceof f) || typeof i.removeAttribute != "function" || typeof i.setAttribute != "function" || typeof i.namespaceURI != "string" || typeof i.insertBefore != "function" || typeof i.hasChildNodes != "function");
802
- }, "_isClobbered"), yn = /* @__PURE__ */ u(function(i) {
812
+ }, "_createNodeIterator"), Nt = /* @__PURE__ */ h(function(i) {
813
+ 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");
814
+ }, "_isClobbered"), $t = /* @__PURE__ */ h(function(i) {
803
815
  return typeof o == "function" && i instanceof o;
804
816
  }, "_isNode");
805
- function de(w, i, h) {
806
- dt(w, (x) => {
807
- x.call(t, i, h, ze);
817
+ function ge(v, i, u) {
818
+ Ve(v, (x) => {
819
+ x.call(t, i, u, Pe);
808
820
  });
809
821
  }
810
- u(de, "_executeHooks");
811
- const Tn = /* @__PURE__ */ u(function(i) {
812
- let h = null;
813
- if (de(U.beforeSanitizeElements, i, null), Pt(i))
814
- return le(i), !0;
822
+ h(ge, "_executeHooks");
823
+ const Tn = /* @__PURE__ */ h(function(i) {
824
+ let u = null;
825
+ if (ge(U.beforeSanitizeElements, i, null), Nt(i))
826
+ return re(i), !0;
815
827
  const x = B(i.nodeName);
816
- if (de(U.uponSanitizeElement, i, {
828
+ if (ge(U.uponSanitizeElement, i, {
817
829
  tagName: x,
818
- allowedTags: b
819
- }), it && i.hasChildNodes() && !yn(i.firstElementChild) && q(/<[/\w!]/g, i.innerHTML) && q(/<[/\w!]/g, i.textContent) || i.nodeType === Ze.progressingInstruction || it && i.nodeType === Ze.comment && q(/<[/\w]/g, i.data))
820
- return le(i), !0;
821
- if (!(ee.tagCheck instanceof Function && ee.tagCheck(x)) && (!b[x] || J[x])) {
822
- if (!J[x] && An(x) && (D.tagNameCheck instanceof RegExp && q(D.tagNameCheck, x) || D.tagNameCheck instanceof Function && D.tagNameCheck(x)))
830
+ allowedTags: k
831
+ }), We && i.hasChildNodes() && !$t(i.firstElementChild) && q(/<[/\w!]/g, i.innerHTML) && q(/<[/\w!]/g, i.textContent) || We && i.namespaceURI === ue && x === "style" && $t(i.firstElementChild) || i.nodeType === Ke.progressingInstruction || We && i.nodeType === Ke.comment && q(/<[/\w]/g, i.data))
832
+ return re(i), !0;
833
+ if (J[x] || !(ee.tagCheck instanceof Function && ee.tagCheck(x)) && !k[x]) {
834
+ if (!J[x] && An(x) && (C.tagNameCheck instanceof RegExp && q(C.tagNameCheck, x) || C.tagNameCheck instanceof Function && C.tagNameCheck(x)))
823
835
  return !1;
824
- if (It && !ae[x]) {
825
- const N = ne(i) || i.parentNode, W = me(i) || i.childNodes;
826
- if (W && N) {
827
- const P = W.length;
828
- for (let K = P - 1; K >= 0; --K) {
829
- const fe = S(W[K], !0);
830
- fe.__removalCount = (i.__removalCount || 0) + 1, N.insertBefore(fe, ge(i));
836
+ if (It && !ce[x]) {
837
+ const P = ne(i) || i.parentNode, W = me(i) || i.childNodes;
838
+ if (W && P) {
839
+ const N = W.length;
840
+ for (let K = N - 1; K >= 0; --K) {
841
+ const Q = E(W[K], !0);
842
+ Q.__removalCount = (i.__removalCount || 0) + 1, P.insertBefore(Q, de(i));
831
843
  }
832
844
  }
833
845
  }
834
- return le(i), !0;
846
+ return re(i), !0;
835
847
  }
836
- return i instanceof c && !bs(i) || (x === "noscript" || x === "noembed" || x === "noframes") && q(/<\/no(script|embed|frames)/i, i.innerHTML) ? (le(i), !0) : (Ce && i.nodeType === Ze.text && (h = i.textContent, dt([Re, Fe, De], (N) => {
837
- h = qe(h, N, " ");
838
- }), i.textContent !== h && (je(t.removed, {
848
+ return i instanceof c && !ks(i) || (x === "noscript" || x === "noembed" || x === "noframes") && q(/<\/no(script|embed|frames)/i, i.innerHTML) ? (re(i), !0) : (Se && i.nodeType === Ke.text && (u = i.textContent, Ve([ve, Me, ye], (P) => {
849
+ u = Ne(u, P, " ");
850
+ }), i.textContent !== u && (Ye(t.removed, {
839
851
  element: i.cloneNode()
840
- }), i.textContent = h)), de(U.afterSanitizeElements, i, null), !1);
841
- }, "_sanitizeElements"), Sn = /* @__PURE__ */ u(function(i, h, x) {
842
- if (we[h] || pn && (h === "id" || h === "name") && (x in e || x in xs))
852
+ }), i.textContent = u)), ge(U.afterSanitizeElements, i, null), !1);
853
+ }, "_sanitizeElements"), Sn = /* @__PURE__ */ h(function(i, u, x) {
854
+ if (Te[u] || dn && (u === "id" || u === "name") && (x in e || x in bs))
843
855
  return !1;
844
- if (!(Rt && !we[h] && q(At, h))) {
845
- if (!(cn && q(Et, h))) {
846
- if (!(ee.attributeCheck instanceof Function && ee.attributeCheck(h, i))) {
847
- if (!k[h] || we[h]) {
856
+ if (!(Rt && !Te[u] && q(At, u))) {
857
+ if (!(un && q(Et, u))) {
858
+ if (!(ee.attributeCheck instanceof Function && ee.attributeCheck(u, i))) {
859
+ if (!b[u] || Te[u]) {
848
860
  if (
849
861
  // First condition does a very basic check if a) it's basically a valid custom element tagname AND
850
862
  // b) if the tagName passes whatever the user has configured for CUSTOM_ELEMENT_HANDLING.tagNameCheck
851
863
  // and c) if the attribute name passes whatever the user has configured for CUSTOM_ELEMENT_HANDLING.attributeNameCheck
852
- !(An(i) && (D.tagNameCheck instanceof RegExp && q(D.tagNameCheck, i) || D.tagNameCheck instanceof Function && D.tagNameCheck(i)) && (D.attributeNameCheck instanceof RegExp && q(D.attributeNameCheck, h) || D.attributeNameCheck instanceof Function && D.attributeNameCheck(h, i)) || // Alternative, second condition checks if it's an `is`-attribute, AND
864
+ !(An(i) && (C.tagNameCheck instanceof RegExp && q(C.tagNameCheck, i) || C.tagNameCheck instanceof Function && C.tagNameCheck(i)) && (C.attributeNameCheck instanceof RegExp && q(C.attributeNameCheck, u) || C.attributeNameCheck instanceof Function && C.attributeNameCheck(u, i)) || // Alternative, second condition checks if it's an `is`-attribute, AND
853
865
  // the value passes whatever the user has configured for CUSTOM_ELEMENT_HANDLING.tagNameCheck
854
- h === "is" && D.allowCustomizedBuiltInElements && (D.tagNameCheck instanceof RegExp && q(D.tagNameCheck, x) || D.tagNameCheck instanceof Function && D.tagNameCheck(x)))
866
+ u === "is" && C.allowCustomizedBuiltInElements && (C.tagNameCheck instanceof RegExp && q(C.tagNameCheck, x) || C.tagNameCheck instanceof Function && C.tagNameCheck(x)))
855
867
  ) return !1;
856
- } else if (!Lt[h]) {
857
- if (!q(He, qe(x, st, ""))) {
858
- if (!((h === "src" || h === "xlink:href" || h === "href") && i !== "script" && Ws(x, "data:") === 0 && fn[i])) {
859
- if (!(un && !q(_t, qe(x, st, "")))) {
868
+ } else if (!Lt[u]) {
869
+ if (!q(Ge, Ne(x, at, ""))) {
870
+ if (!((u === "src" || u === "xlink:href" || u === "href") && i !== "script" && Ws(x, "data:") === 0 && gn[i])) {
871
+ if (!(hn && !q(_t, Ne(x, at, "")))) {
860
872
  if (x)
861
873
  return !1;
862
874
  }
@@ -867,58 +879,58 @@ function ts() {
867
879
  }
868
880
  }
869
881
  return !0;
870
- }, "_isValidAttribute"), An = /* @__PURE__ */ u(function(i) {
871
- return i !== "annotation-xml" && Ht(i, rt);
872
- }, "_isBasicCustomElement"), En = /* @__PURE__ */ u(function(i) {
873
- de(U.beforeSanitizeAttributes, i, null);
882
+ }, "_isValidAttribute"), An = /* @__PURE__ */ h(function(i) {
883
+ return i !== "annotation-xml" && Gt(i, lt);
884
+ }, "_isBasicCustomElement"), En = /* @__PURE__ */ h(function(i) {
885
+ ge(U.beforeSanitizeAttributes, i, null);
874
886
  const {
875
- attributes: h
887
+ attributes: u
876
888
  } = i;
877
- if (!h || Pt(i))
889
+ if (!u || Nt(i))
878
890
  return;
879
891
  const x = {
880
892
  attrName: "",
881
893
  attrValue: "",
882
894
  keepAttr: !0,
883
- allowedAttributes: k,
895
+ allowedAttributes: b,
884
896
  forceKeepAttr: void 0
885
897
  };
886
- let N = h.length;
887
- for (; N--; ) {
888
- const W = h[N], {
889
- name: P,
898
+ let P = u.length;
899
+ for (; P--; ) {
900
+ const W = u[P], {
901
+ name: N,
890
902
  namespaceURI: K,
891
- value: fe
892
- } = W, Oe = B(P), $t = fe;
893
- let H = P === "value" ? $t : js($t);
894
- if (x.attrName = Oe, x.attrValue = H, x.keepAttr = !0, x.forceKeepAttr = void 0, de(U.uponSanitizeAttribute, i, x), H = x.attrValue, dn && (Oe === "id" || Oe === "name") && (ye(P, i), H = ps + H), it && q(/((--!?|])>)|<\/(style|script|title|xmp|textarea|noscript|iframe|noembed|noframes)/i, H)) {
895
- ye(P, i);
903
+ value: Q
904
+ } = W, xe = B(N), Ut = Q;
905
+ let H = N === "value" ? Ut : js(Ut);
906
+ if (x.attrName = xe, x.attrValue = H, x.keepAttr = !0, x.forceKeepAttr = void 0, ge(U.uponSanitizeAttribute, i, x), H = x.attrValue, fn && (xe === "id" || xe === "name") && (Ee(N, i), H = ds + H), We && q(/((--!?|])>)|<\/(style|script|title|xmp|textarea|noscript|iframe|noembed|noframes)/i, H)) {
907
+ Ee(N, i);
896
908
  continue;
897
909
  }
898
- if (Oe === "attributename" && Ht(H, "href")) {
899
- ye(P, i);
910
+ if (xe === "attributename" && Gt(H, "href")) {
911
+ Ee(N, i);
900
912
  continue;
901
913
  }
902
914
  if (x.forceKeepAttr)
903
915
  continue;
904
916
  if (!x.keepAttr) {
905
- ye(P, i);
917
+ Ee(N, i);
906
918
  continue;
907
919
  }
908
- if (!hn && q(/\/>/i, H)) {
909
- ye(P, i);
920
+ if (!pn && q(/\/>/i, H)) {
921
+ Ee(N, i);
910
922
  continue;
911
923
  }
912
- Ce && dt([Re, Fe, De], (Rn) => {
913
- H = qe(H, Rn, " ");
924
+ Se && Ve([ve, Me, ye], (Cn) => {
925
+ H = Ne(H, Cn, " ");
914
926
  });
915
- const _n = B(i.nodeName);
916
- if (!Sn(_n, Oe, H)) {
917
- ye(P, i);
927
+ const Rn = B(i.nodeName);
928
+ if (!Sn(Rn, xe, H)) {
929
+ Ee(N, i);
918
930
  continue;
919
931
  }
920
932
  if ($ && typeof m == "object" && typeof m.getAttributeType == "function" && !K)
921
- switch (m.getAttributeType(_n, Oe)) {
933
+ switch (m.getAttributeType(Rn, xe)) {
922
934
  case "TrustedHTML": {
923
935
  H = $.createHTML(H);
924
936
  break;
@@ -928,124 +940,131 @@ function ts() {
928
940
  break;
929
941
  }
930
942
  }
931
- if (H !== $t)
943
+ if (H !== Ut)
932
944
  try {
933
- K ? i.setAttributeNS(K, P, H) : i.setAttribute(P, H), Pt(i) ? le(i) : On(t.removed);
945
+ K ? i.setAttributeNS(K, N, H) : i.setAttribute(N, H), Nt(i) ? re(i) : Pn(t.removed);
934
946
  } catch {
935
- ye(P, i);
947
+ Ee(N, i);
936
948
  }
937
949
  }
938
- de(U.afterSanitizeAttributes, i, null);
939
- }, "_sanitizeAttributes"), ks = /* @__PURE__ */ u(function w(i) {
940
- let h = null;
941
- const x = vn(i);
942
- for (de(U.beforeSanitizeShadowDOM, i, null); h = x.nextNode(); )
943
- de(U.uponSanitizeShadowNode, h, null), Tn(h), En(h), h.content instanceof r && w(h.content);
944
- de(U.afterSanitizeShadowDOM, i, null);
950
+ ge(U.afterSanitizeAttributes, i, null);
951
+ }, "_sanitizeAttributes"), _n = /* @__PURE__ */ h(function(i) {
952
+ let u = null;
953
+ const x = yn(i);
954
+ for (ge(U.beforeSanitizeShadowDOM, i, null); u = x.nextNode(); )
955
+ ge(U.uponSanitizeShadowNode, u, null), Tn(u), En(u), u.content instanceof r && _n(u.content);
956
+ ge(U.afterSanitizeShadowDOM, i, null);
945
957
  }, "_sanitizeShadowDOM");
946
- return t.sanitize = function(w) {
947
- let i = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : {}, h = null, x = null, N = null, W = null;
948
- if (zt = !w, zt && (w = "<!-->"), typeof w != "string" && !yn(w))
949
- if (typeof w.toString == "function") {
950
- if (w = w.toString(), typeof w != "string")
951
- throw Ve("dirty is not a string, aborting");
958
+ return t.sanitize = function(v) {
959
+ let i = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : {}, u = null, x = null, P = null, W = null;
960
+ if (zt = !v, zt && (v = "<!-->"), typeof v != "string" && !$t(v))
961
+ if (typeof v.toString == "function") {
962
+ if (v = v.toString(), typeof v != "string")
963
+ throw Ze("dirty is not a string, aborting");
952
964
  } else
953
- throw Ve("toString is not a function");
965
+ throw Ze("toString is not a function");
954
966
  if (!t.isSupported)
955
- return w;
956
- if (Dt || Nt(i), t.removed = [], typeof w == "string" && (Ge = !1), Ge) {
957
- if (w.nodeName) {
958
- const fe = B(w.nodeName);
959
- if (!b[fe] || J[fe])
960
- throw Ve("root node is forbidden and cannot be sanitized in-place");
961
- }
962
- } else if (w instanceof o)
963
- h = wn("<!---->"), x = h.ownerDocument.importNode(w, !0), x.nodeType === Ze.element && x.nodeName === "BODY" || x.nodeName === "HTML" ? h = x : h.appendChild(x);
967
+ return v;
968
+ if (Ct || Pt(i), t.removed = [], typeof v == "string" && (je = !1), je) {
969
+ if (v.nodeName) {
970
+ const Q = B(v.nodeName);
971
+ if (!k[Q] || J[Q])
972
+ throw Ze("root node is forbidden and cannot be sanitized in-place");
973
+ }
974
+ } else if (v instanceof o)
975
+ u = vn("<!---->"), x = u.ownerDocument.importNode(v, !0), x.nodeType === Ke.element && x.nodeName === "BODY" || x.nodeName === "HTML" ? u = x : u.appendChild(x);
964
976
  else {
965
- if (!Ie && !Ce && !ve && // eslint-disable-next-line unicorn/prefer-includes
966
- w.indexOf("<") === -1)
967
- return $ && lt ? $.createHTML(w) : w;
968
- if (h = wn(w), !h)
969
- return Ie ? null : lt ? j : "";
977
+ if (!Le && !Se && !Ae && // eslint-disable-next-line unicorn/prefer-includes
978
+ v.indexOf("<") === -1)
979
+ return $ && ct ? $.createHTML(v) : v;
980
+ if (u = vn(v), !u)
981
+ return Le ? null : ct ? j : "";
970
982
  }
971
- h && Ct && le(h.firstChild);
972
- const P = vn(Ge ? w : h);
973
- for (; N = P.nextNode(); )
974
- Tn(N), En(N), N.content instanceof r && ks(N.content);
975
- if (Ge)
976
- return w;
977
- if (Ie) {
978
- if (at)
979
- for (W = tt.call(h.ownerDocument); h.firstChild; )
980
- W.appendChild(h.firstChild);
983
+ u && Dt && re(u.firstChild);
984
+ const N = yn(je ? v : u);
985
+ for (; P = N.nextNode(); )
986
+ Tn(P), En(P), P.content instanceof r && _n(P.content);
987
+ if (je)
988
+ return v;
989
+ if (Le) {
990
+ if (Se) {
991
+ u.normalize();
992
+ let Q = u.innerHTML;
993
+ Ve([ve, Me, ye], (xe) => {
994
+ Q = Ne(Q, xe, " ");
995
+ }), u.innerHTML = Q;
996
+ }
997
+ if (ot)
998
+ for (W = rt.call(u.ownerDocument); u.firstChild; )
999
+ W.appendChild(u.firstChild);
981
1000
  else
982
- W = h;
983
- return (k.shadowroot || k.shadowrootmode) && (W = nt.call(n, W, !0)), W;
1001
+ W = u;
1002
+ return (b.shadowroot || b.shadowrootmode) && (W = it.call(n, W, !0)), W;
984
1003
  }
985
- let K = ve ? h.outerHTML : h.innerHTML;
986
- return ve && b["!doctype"] && h.ownerDocument && h.ownerDocument.doctype && h.ownerDocument.doctype.name && q(es, h.ownerDocument.doctype.name) && (K = "<!DOCTYPE " + h.ownerDocument.doctype.name + `>
987
- ` + K), Ce && dt([Re, Fe, De], (fe) => {
988
- K = qe(K, fe, " ");
989
- }), $ && lt ? $.createHTML(K) : K;
1004
+ let K = Ae ? u.outerHTML : u.innerHTML;
1005
+ return Ae && k["!doctype"] && u.ownerDocument && u.ownerDocument.doctype && u.ownerDocument.doctype.name && q(ts, u.ownerDocument.doctype.name) && (K = "<!DOCTYPE " + u.ownerDocument.doctype.name + `>
1006
+ ` + K), Se && Ve([ve, Me, ye], (Q) => {
1007
+ K = Ne(K, Q, " ");
1008
+ }), $ && ct ? $.createHTML(K) : K;
990
1009
  }, t.setConfig = function() {
991
- let w = arguments.length > 0 && arguments[0] !== void 0 ? arguments[0] : {};
992
- Nt(w), Dt = !0;
1010
+ let v = arguments.length > 0 && arguments[0] !== void 0 ? arguments[0] : {};
1011
+ Pt(v), Ct = !0;
993
1012
  }, t.clearConfig = function() {
994
- ze = null, Dt = !1;
995
- }, t.isValidAttribute = function(w, i, h) {
996
- ze || Nt({});
997
- const x = B(w), N = B(i);
998
- return Sn(x, N, h);
999
- }, t.addHook = function(w, i) {
1000
- typeof i == "function" && je(U[w], i);
1001
- }, t.removeHook = function(w, i) {
1013
+ Pe = null, Ct = !1;
1014
+ }, t.isValidAttribute = function(v, i, u) {
1015
+ Pe || Pt({});
1016
+ const x = B(v), P = B(i);
1017
+ return Sn(x, P, u);
1018
+ }, t.addHook = function(v, i) {
1019
+ typeof i == "function" && Ye(U[v], i);
1020
+ }, t.removeHook = function(v, i) {
1002
1021
  if (i !== void 0) {
1003
- const h = Hs(U[w], i);
1004
- return h === -1 ? void 0 : Gs(U[w], h, 1)[0];
1022
+ const u = Hs(U[v], i);
1023
+ return u === -1 ? void 0 : Gs(U[v], u, 1)[0];
1005
1024
  }
1006
- return On(U[w]);
1007
- }, t.removeHooks = function(w) {
1008
- U[w] = [];
1025
+ return Pn(U[v]);
1026
+ }, t.removeHooks = function(v) {
1027
+ U[v] = [];
1009
1028
  }, t.removeAllHooks = function() {
1010
- U = Fn();
1029
+ U = Hn();
1011
1030
  }, t;
1012
1031
  }
1013
- u(ts, "createDOMPurify");
1014
- var ar = ts();
1015
- function Qt() {
1032
+ h(ns, "createDOMPurify");
1033
+ var ar = ns();
1034
+ function Jt() {
1016
1035
  return { async: !1, breaks: !1, extensions: null, gfm: !0, hooks: null, pedantic: !1, renderer: null, silent: !1, tokenizer: null, walkTokens: null };
1017
1036
  }
1018
- u(Qt, "M");
1019
- var _e = Qt();
1020
- function ns(l) {
1021
- _e = l;
1037
+ h(Jt, "M");
1038
+ var Ie = Jt();
1039
+ function ss(l) {
1040
+ Ie = l;
1022
1041
  }
1023
- u(ns, "G");
1024
- var Se = { exec: /* @__PURE__ */ u(() => null, "exec") };
1042
+ h(ss, "G");
1043
+ var Re = { exec: /* @__PURE__ */ h(() => null, "exec") };
1025
1044
  function I(l, t = "") {
1026
- let e = typeof l == "string" ? l : l.source, n = { replace: /* @__PURE__ */ u((s, r) => {
1045
+ let e = typeof l == "string" ? l : l.source, n = { replace: /* @__PURE__ */ h((s, r) => {
1027
1046
  let a = typeof r == "string" ? r : r.source;
1028
1047
  return a = a.replace(Y.caret, "$1"), e = e.replace(s, a), n;
1029
- }, "replace"), getRegex: /* @__PURE__ */ u(() => new RegExp(e, t), "getRegex") };
1048
+ }, "replace"), getRegex: /* @__PURE__ */ h(() => new RegExp(e, t), "getRegex") };
1030
1049
  return n;
1031
1050
  }
1032
- u(I, "k");
1051
+ h(I, "k");
1033
1052
  var lr = (() => {
1034
1053
  try {
1035
1054
  return !!new RegExp("(?<=1)(?<!1)");
1036
1055
  } catch {
1037
1056
  return !1;
1038
1057
  }
1039
- })(), 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") }, 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(), Tt = "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", Tt).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", Tt).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", Tt).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", Tt).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} *[^
1040
- ]`).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, St = /[\s\p{P}\p{S}]/u, rn = /[^\s\p{P}\p{S}]/u, Tr = I(/^((?![*_])punctSpace)/, "u").replace(/punctSpace/g, St).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, St).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, St).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, St).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(), wt = /(?:\[(?:\\[\s\S]|[^\[\]\\])*\]|\\[\s\S]|`+(?!`)[^`]*?`+(?!`)|``+(?=\])|[^\[\]\\`])*?/, Ur = I(/^!?\[(label)\]\(\s*(href)(?:(?:[ \t]+(?:\n[ \t]*)?|\n[ \t]*)(title))?\s*\)/).replace("label", wt).replace("href", /<(?:\\.|[^\n<>\\])+>|[^ \t\n\x00-\x1f]*/).replace("title", /"(?:\\"?|[^"\\])*"|'(?:\\'?|[^'\\])*'|\((?:\\\)?|[^)\\])*\)/).getRegex(), us = I(/^!?\[(label)\]\[(ref)\]/).replace("label", wt).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", wt).getRegex(), reflink: I(/^!?\[(label)\]\s*\[([^\]]*)\]/).replace("label", wt).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() }, gt = { 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");
1041
- function ce(l, t) {
1058
+ })(), 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__ */ h((l) => new RegExp(`^( {0,3}${l})((?:[ ][^\\n]*)?(?:\\n|$))`), "listItemRegex"), nextBulletRegex: /* @__PURE__ */ h((l) => new RegExp(`^ {0,${Math.min(3, l - 1)}}(?:[*+-]|\\d{1,9}[.)])((?:[ ][^\\n]*)?(?:\\n|$))`), "nextBulletRegex"), hrRegex: /* @__PURE__ */ h((l) => new RegExp(`^ {0,${Math.min(3, l - 1)}}((?:- *){3,}|(?:_ *){3,}|(?:\\* *){3,})(?:\\n+|$)`), "hrRegex"), fencesBeginRegex: /* @__PURE__ */ h((l) => new RegExp(`^ {0,${Math.min(3, l - 1)}}(?:\`\`\`|~~~)`), "fencesBeginRegex"), headingBeginRegex: /* @__PURE__ */ h((l) => new RegExp(`^ {0,${Math.min(3, l - 1)}}#`), "headingBeginRegex"), htmlBeginRegex: /* @__PURE__ */ h((l) => new RegExp(`^ {0,${Math.min(3, l - 1)}}<(?:[a-z].*>|!--)`, "i"), "htmlBeginRegex"), blockquoteBeginRegex: /* @__PURE__ */ h((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|$)|$)/, st = /^ {0,3}((?:-[\t ]*){3,}|(?:_[ \t]*){3,}|(?:\*[ \t]*){3,})(?:\n+|$)/, hr = /^ {0,3}(#{1,6})(?=\s|$)(.*)(?:\n+|$)/, en = / {0,3}(?:[*+-]|\d{1,9}[.)])/, rs = /^(?!bull |blockCode|fences|blockquote|heading|html|table)((?:.|\n(?!\s*?\n|bull |blockCode|fences|blockquote|heading|html|table))+?)\n {0,3}(=+|-+) *(?:\n+|$)/, is = I(rs).replace(/bull/g, en).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(rs).replace(/bull/g, en).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(), tn = /^([^\n]+(?:\n(?!hr|heading|lheading|blockquote|fences|list|html|table| +\n)[^\n]+)*)/, dr = /^[^\n]+/, nn = /(?!\s*\])(?:\\[\s\S]|[^\[\]\\])+/, fr = I(/^ {0,3}\[(label)\]: *(?:\n[ \t]*)?([^<\s][^\s]*|<.*?>)(?:(?: +(?:\n[ \t]*)?| *\n[ \t]*)(title))? *(?:\n+|$)/).replace("label", nn).replace("title", /(?:"(?:\\"?|[^"\\])*"|'[^'\n]*(?:\n[^'\n]+)*\n?'|\([^()]*\))/).getRegex(), gr = I(/^(bull)([ \t][^\n]+?)?(?:\n|$)/).replace(/bull/g, en).getRegex(), Tt = "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", sn = /<!--(?:-?>|[\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", sn).replace("tag", Tt).replace("attribute", / +[a-zA-Z:_][\w.:-]*(?: *= *"[^"\n]*"| *= *'[^'\n]*'| *= *[^\s"'=<>`]+)?/).getRegex(), as = I(tn).replace("hr", st).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", Tt).getRegex(), xr = I(/^( {0,3}> ?(paragraph|[^\n]*)(?:\n|$))+/).replace("paragraph", as).getRegex(), rn = { blockquote: xr, code: cr, def: fr, fences: ur, heading: hr, hr: st, html: mr, lheading: is, list: gr, newline: or, paragraph: as, table: Re, text: dr }, Gn = I("^ *([^\\n ].*)\\n {0,3}((?:\\| *)?:?-+:? *(?:\\| *:?-+:? *)*(?:\\| *)?)(?:\\n((?:(?! *\\n|hr|heading|blockquote|code|fences|list|html).*(?:\\n|$))*)\\n*|$)").replace("hr", st).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", Tt).getRegex(), br = { ...rn, lheading: pr, table: Gn, paragraph: I(tn).replace("hr", st).replace("heading", " {0,3}#{1,6}(?:\\s|$)").replace("|lheading", "").replace("table", Gn).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", Tt).getRegex() }, kr = { ...rn, html: I(`^ *(?:comment *(?:\\n|\\s*$)|<(tag)[\\s\\S]+?</\\1> *(?:\\n{2,}|\\s*$)|<tag(?:"[^"]*"|'[^']*'|\\s[^'"/>\\s]*)*?/?> *(?:\\n{2,}|\\s*$))`).replace("comment", sn).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: Re, lheading: /^(.+?)\n {0,3}(=+|-+) *(?:\n+|$)/, paragraph: I(tn).replace("hr", st).replace("heading", ` *#{1,6} *[^
1059
+ ]`).replace("lheading", is).replace("|table", "").replace("blockquote", " {0,3}>").replace("|fences", "").replace("|list", "").replace("|html", "").replace("|tag", "").getRegex() }, wr = /^\\([!"#$%&'()*+,\-./:;<=>?@\[\]\\^_`{|}~])/, vr = /^(`+)([^`]|[^`][\s\S]*?[^`])\1(?!`)/, ls = /^( {2,}|\\)\n(?!\s*$)/, yr = /^(`+|[^`])(?:(?= {2,}\n)|[\s\S]*?(?:(?=[\\<!\[`*_]|\b_|$)|[^ ](?= {2,}\n)))/, He = /[\p{P}\p{S}]/u, St = /[\s\p{P}\p{S}]/u, an = /[^\s\p{P}\p{S}]/u, Tr = I(/^((?![*_])punctSpace)/, "u").replace(/punctSpace/g, St).getRegex(), os = /(?!~)[\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(), cs = /^(?:\*+(?:((?!\*)punct)|([^\s*]))?)|^_+(?:((?!_)punct)|([^\s_]))?/, _r = I(cs, "u").replace(/punct/g, He).getRegex(), Rr = I(cs, "u").replace(/punct/g, os).getRegex(), us = "^[^_*]*?__[^_*]*?\\*[^_*]*?(?=__)|[^*]+(?=[^*])|(?!\\*)punct(\\*+)(?=[\\s]|$)|notPunctSpace(\\*+)(?!\\*)(?=punctSpace|$)|(?!\\*)punctSpace(\\*+)(?=notPunctSpace)|[\\s](\\*+)(?!\\*)(?=punct)|(?!\\*)punct(\\*+)(?!\\*)(?=punct)|notPunctSpace(\\*+)(?=notPunctSpace)", Cr = I(us, "gu").replace(/notPunctSpace/g, an).replace(/punctSpace/g, St).replace(/punct/g, He).getRegex(), Dr = I(us, "gu").replace(/notPunctSpace/g, Ar).replace(/punctSpace/g, Sr).replace(/punct/g, os).getRegex(), Ir = I("^[^_*]*?\\*\\*[^_*]*?_[^_*]*?(?=\\*\\*)|[^_]+(?=[^_])|(?!_)punct(_+)(?=[\\s]|$)|notPunctSpace(_+)(?!_)(?=punctSpace|$)|(?!_)punctSpace(_+)(?=notPunctSpace)|[\\s](_+)(?!_)(?=punct)|(?!_)punct(_+)(?!_)(?=punct)", "gu").replace(/notPunctSpace/g, an).replace(/punctSpace/g, St).replace(/punct/g, He).getRegex(), Mr = I(/^~~?(?:((?!~)punct)|[^\s~])/, "u").replace(/punct/g, He).getRegex(), Lr = "^[^~]+(?=[^~])|(?!~)punct(~~?)(?=[\\s]|$)|notPunctSpace(~~?)(?!~)(?=punctSpace|$)|(?!~)punctSpace(~~?)(?=notPunctSpace)|[\\s](~~?)(?!~)(?=punct)|(?!~)punct(~~?)(?!~)(?=punct)|notPunctSpace(~~?)(?=notPunctSpace)", zr = I(Lr, "gu").replace(/notPunctSpace/g, an).replace(/punctSpace/g, St).replace(/punct/g, He).getRegex(), Or = I(/\\(punct)/, "gu").replace(/punct/g, He).getRegex(), Pr = 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(), Nr = I(sn).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", Nr).replace("attribute", /\s+[a-zA-Z:_][\w.:-]*(?:\s*=\s*"[^"]*"|\s*=\s*'[^']*'|\s*=\s*[^\s"'=<>`]+)?/).getRegex(), wt = /(?:\[(?:\\[\s\S]|[^\[\]\\])*\]|\\[\s\S]|`+(?!`)[^`]*?`+(?!`)|``+(?=\])|[^\[\]\\`])*?/, Ur = I(/^!?\[(label)\]\(\s*(href)(?:(?:[ \t]+(?:\n[ \t]*)?|\n[ \t]*)(title))?\s*\)/).replace("label", wt).replace("href", /<(?:\\.|[^\n<>\\])+>|[^ \t\n\x00-\x1f]*/).replace("title", /"(?:\\"?|[^"\\])*"|'(?:\\'?|[^'\\])*'|\((?:\\\)?|[^)\\])*\)/).getRegex(), hs = I(/^!?\[(label)\]\[(ref)\]/).replace("label", wt).replace("ref", nn).getRegex(), ps = I(/^!?\[(ref)\](?:\[\])?/).replace("ref", nn).getRegex(), Br = I("reflink|nolink(?!\\()", "g").replace("reflink", hs).replace("nolink", ps).getRegex(), Wn = /[hH][tT][tT][pP][sS]?|[fF][tT][pP]/, ln = { _backpedal: Re, anyPunctuation: Or, autolink: Pr, blockSkip: Er, br: ls, code: vr, del: Re, delLDelim: Re, delRDelim: Re, emStrongLDelim: _r, emStrongRDelimAst: Cr, emStrongRDelimUnd: Ir, escape: wr, link: Ur, nolink: ps, punctuation: Tr, reflink: hs, reflinkSearch: Br, tag: $r, text: yr, url: Re }, Fr = { ...ln, link: I(/^!?\[(label)\]\((.*?)\)/).replace("label", wt).getRegex(), reflink: I(/^!?\[(label)\]\s*\[([^\]]*)\]/).replace("label", wt).getRegex() }, Kt = { ...ln, emStrongRDelimAst: Dr, emStrongLDelim: Rr, delLDelim: Mr, delRDelim: zr, url: I(/^((?:protocol):\/\/|www\.)(?:[a-zA-Z0-9\-]+\.?)+[^\s<]*|^email/).replace("protocol", Wn).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", Wn).getRegex() }, Hr = { ...Kt, br: I(ls).replace("{2,}", "*").getRegex(), text: I(Kt.text).replace("\\b_", "\\b_| {2,}\\n").replace(/\{2,\}/g, "*").getRegex() }, mt = { normal: rn, gfm: br, pedantic: kr }, Qe = { normal: ln, gfm: Kt, breaks: Hr, pedantic: Fr }, Gr = { "&": "&amp;", "<": "&lt;", ">": "&gt;", '"': "&quot;", "'": "&#39;" }, jn = /* @__PURE__ */ h((l) => Gr[l], "ke");
1060
+ function pe(l, t) {
1042
1061
  if (t) {
1043
- if (Y.escapeTest.test(l)) return l.replace(Y.escapeReplace, Wn);
1044
- } else if (Y.escapeTestNoEncode.test(l)) return l.replace(Y.escapeReplaceNoEncode, Wn);
1062
+ if (Y.escapeTest.test(l)) return l.replace(Y.escapeReplace, jn);
1063
+ } else if (Y.escapeTestNoEncode.test(l)) return l.replace(Y.escapeReplaceNoEncode, jn);
1045
1064
  return l;
1046
1065
  }
1047
- u(ce, "T");
1048
- function jn(l) {
1066
+ h(pe, "T");
1067
+ function qn(l) {
1049
1068
  try {
1050
1069
  l = encodeURI(l).replace(Y.percentDecode, "%");
1051
1070
  } catch {
@@ -1053,8 +1072,8 @@ function jn(l) {
1053
1072
  }
1054
1073
  return l;
1055
1074
  }
1056
- u(jn, "J");
1057
- function qn(l, t) {
1075
+ h(qn, "J");
1076
+ function Vn(l, t) {
1058
1077
  let e = l.replace(Y.findPipe, (r, a, o) => {
1059
1078
  let c = !1, d = a;
1060
1079
  for (; --d >= 0 && o[d] === "\\"; ) c = !c;
@@ -1065,8 +1084,8 @@ function qn(l, t) {
1065
1084
  for (; s < n.length; s++) n[s] = n[s].trim().replace(Y.slashPipe, "|");
1066
1085
  return n;
1067
1086
  }
1068
- u(qn, "V");
1069
- function Ke(l, t, e) {
1087
+ h(Vn, "V");
1088
+ function Je(l, t, e) {
1070
1089
  let n = l.length;
1071
1090
  if (n === 0) return "";
1072
1091
  let s = 0;
@@ -1074,7 +1093,7 @@ function Ke(l, t, e) {
1074
1093
  s++;
1075
1094
  return l.slice(0, n - s);
1076
1095
  }
1077
- u(Ke, "I");
1096
+ h(Je, "I");
1078
1097
  function Wr(l, t) {
1079
1098
  if (l.indexOf(t[1]) === -1) return -1;
1080
1099
  let e = 0;
@@ -1083,7 +1102,7 @@ function Wr(l, t) {
1083
1102
  else if (l[n] === t[1] && (e--, e < 0)) return n;
1084
1103
  return e > 0 ? -2 : -1;
1085
1104
  }
1086
- u(Wr, "de");
1105
+ h(Wr, "de");
1087
1106
  function jr(l, t = 0) {
1088
1107
  let e = t, n = "";
1089
1108
  for (let s of l) if (s === " ") {
@@ -1092,14 +1111,14 @@ function jr(l, t = 0) {
1092
1111
  } else n += s, e++;
1093
1112
  return n;
1094
1113
  }
1095
- u(jr, "ge");
1096
- function Vn(l, t, e, n, s) {
1114
+ h(jr, "ge");
1115
+ function Yn(l, t, e, n, s) {
1097
1116
  let r = t.href, a = t.title || null, o = l[1].replace(s.other.outputLinkReplace, "$1");
1098
1117
  n.state.inLink = !0;
1099
1118
  let c = { type: l[0].charAt(0) === "!" ? "image" : "link", raw: e, href: r, title: a, text: o, tokens: n.inlineTokens(o) };
1100
1119
  return n.state.inLink = !1, c;
1101
1120
  }
1102
- u(Vn, "fe");
1121
+ h(Yn, "fe");
1103
1122
  function qr(l, t, e) {
1104
1123
  let n = l.match(e.other.indentCodeCompensation);
1105
1124
  if (n === null) return t;
@@ -1113,13 +1132,13 @@ function qr(l, t, e) {
1113
1132
  }).join(`
1114
1133
  `);
1115
1134
  }
1116
- u(qr, "nt");
1117
- var Ne, vt = (Ne = class {
1135
+ h(qr, "nt");
1136
+ var $e, vt = ($e = class {
1118
1137
  constructor(t) {
1119
- C(this, "options");
1120
- C(this, "rules");
1121
- C(this, "lexer");
1122
- this.options = t || _e;
1138
+ D(this, "options");
1139
+ D(this, "rules");
1140
+ D(this, "lexer");
1141
+ this.options = t || Ie;
1123
1142
  }
1124
1143
  space(t) {
1125
1144
  let e = this.rules.block.newline.exec(t);
@@ -1129,7 +1148,7 @@ var Ne, vt = (Ne = class {
1129
1148
  let e = this.rules.block.code.exec(t);
1130
1149
  if (e) {
1131
1150
  let n = e[0].replace(this.rules.other.codeRemoveIndent, "");
1132
- return { type: "code", raw: e[0], codeBlockStyle: "indented", text: this.options.pedantic ? n : Ke(n, `
1151
+ return { type: "code", raw: e[0], codeBlockStyle: "indented", text: this.options.pedantic ? n : Je(n, `
1133
1152
  `) };
1134
1153
  }
1135
1154
  }
@@ -1145,7 +1164,7 @@ var Ne, vt = (Ne = class {
1145
1164
  if (e) {
1146
1165
  let n = e[2].trim();
1147
1166
  if (this.rules.other.endingHash.test(n)) {
1148
- let s = Ke(n, "#");
1167
+ let s = Je(n, "#");
1149
1168
  (this.options.pedantic || !s || this.rules.other.endingSpaceChar.test(s)) && (n = s.trim());
1150
1169
  }
1151
1170
  return { type: "heading", raw: e[0], depth: e[1].length, text: n, tokens: this.lexer.inline(n) };
@@ -1153,13 +1172,13 @@ var Ne, vt = (Ne = class {
1153
1172
  }
1154
1173
  hr(t) {
1155
1174
  let e = this.rules.block.hr.exec(t);
1156
- if (e) return { type: "hr", raw: Ke(e[0], `
1175
+ if (e) return { type: "hr", raw: Je(e[0], `
1157
1176
  `) };
1158
1177
  }
1159
1178
  blockquote(t) {
1160
1179
  let e = this.rules.block.blockquote.exec(t);
1161
1180
  if (e) {
1162
- let n = Ke(e[0], `
1181
+ let n = Je(e[0], `
1163
1182
  `).split(`
1164
1183
  `), s = "", r = "", a = [];
1165
1184
  for (; n.length > 0; ) {
@@ -1168,27 +1187,27 @@ var Ne, vt = (Ne = class {
1168
1187
  else if (!o) c.push(n[d]);
1169
1188
  else break;
1170
1189
  n = n.slice(d);
1171
- let f = c.join(`
1172
- `), p = f.replace(this.rules.other.blockquoteSetextReplace, `
1190
+ let g = c.join(`
1191
+ `), p = g.replace(this.rules.other.blockquoteSetextReplace, `
1173
1192
  $1`).replace(this.rules.other.blockquoteSetextReplace2, "");
1174
1193
  s = s ? `${s}
1175
- ${f}` : f, r = r ? `${r}
1194
+ ${g}` : g, r = r ? `${r}
1176
1195
  ${p}` : p;
1177
- let g = this.lexer.state.top;
1178
- if (this.lexer.state.top = !0, this.lexer.blockTokens(p, a, !0), this.lexer.state.top = g, n.length === 0) break;
1196
+ let f = this.lexer.state.top;
1197
+ if (this.lexer.state.top = !0, this.lexer.blockTokens(p, a, !0), this.lexer.state.top = f, n.length === 0) break;
1179
1198
  let m = a.at(-1);
1180
1199
  if (m?.type === "code") break;
1181
1200
  if (m?.type === "blockquote") {
1182
- let y = m, S = y.raw + `
1201
+ let y = m, E = y.raw + `
1183
1202
  ` + n.join(`
1184
- `), O = this.blockquote(S);
1185
- a[a.length - 1] = O, s = s.substring(0, s.length - y.raw.length) + O.raw, r = r.substring(0, r.length - y.text.length) + O.text;
1203
+ `), z = this.blockquote(E);
1204
+ a[a.length - 1] = z, s = s.substring(0, s.length - y.raw.length) + z.raw, r = r.substring(0, r.length - y.text.length) + z.text;
1186
1205
  break;
1187
1206
  } else if (m?.type === "list") {
1188
- let y = m, S = y.raw + `
1207
+ let y = m, E = y.raw + `
1189
1208
  ` + n.join(`
1190
- `), O = this.list(S);
1191
- a[a.length - 1] = O, s = s.substring(0, s.length - m.raw.length) + O.raw, r = r.substring(0, r.length - y.raw.length) + O.raw, n = S.substring(a.at(-1).raw.length).split(`
1209
+ `), z = this.list(E);
1210
+ a[a.length - 1] = z, s = s.substring(0, s.length - m.raw.length) + z.raw, r = r.substring(0, r.length - y.raw.length) + z.raw, n = E.substring(a.at(-1).raw.length).split(`
1192
1211
  `);
1193
1212
  continue;
1194
1213
  }
@@ -1203,31 +1222,31 @@ ${p}` : p;
1203
1222
  n = s ? `\\d{1,9}\\${n.slice(-1)}` : `\\${n}`, this.options.pedantic && (n = s ? n : "[*+-]");
1204
1223
  let a = this.rules.other.listItemRegex(n), o = !1;
1205
1224
  for (; t; ) {
1206
- let d = !1, f = "", p = "";
1225
+ let d = !1, g = "", p = "";
1207
1226
  if (!(e = a.exec(t)) || this.rules.block.hr.test(t)) break;
1208
- f = e[0], t = t.substring(f.length);
1209
- let g = jr(e[2].split(`
1227
+ g = e[0], t = t.substring(g.length);
1228
+ let f = jr(e[2].split(`
1210
1229
  `, 1)[0], e[1].length), m = t.split(`
1211
- `, 1)[0], y = !g.trim(), S = 0;
1212
- if (this.options.pedantic ? (S = 2, p = g.trimStart()) : y ? 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), y && this.rules.other.blankLine.test(m) && (f += m + `
1230
+ `, 1)[0], y = !f.trim(), E = 0;
1231
+ if (this.options.pedantic ? (E = 2, p = f.trimStart()) : y ? E = e[1].length + 1 : (E = f.search(this.rules.other.nonSpaceChar), E = E > 4 ? 1 : E, p = f.slice(E), E += e[1].length), y && this.rules.other.blankLine.test(m) && (g += m + `
1213
1232
  `, t = t.substring(m.length + 1), d = !0), !d) {
1214
- let O = this.rules.other.nextBulletRegex(S), ge = this.rules.other.hrRegex(S), me = this.rules.other.fencesBeginRegex(S), ne = this.rules.other.headingBeginRegex(S), $ = this.rules.other.htmlBeginRegex(S), j = this.rules.other.blockquoteBeginRegex(S);
1233
+ let z = this.rules.other.nextBulletRegex(E), de = this.rules.other.hrRegex(E), me = this.rules.other.fencesBeginRegex(E), ne = this.rules.other.headingBeginRegex(E), $ = this.rules.other.htmlBeginRegex(E), j = this.rules.other.blockquoteBeginRegex(E);
1215
1234
  for (; t; ) {
1216
1235
  let se = t.split(`
1217
- `, 1)[0], he;
1218
- if (m = se, this.options.pedantic ? (m = m.replace(this.rules.other.listReplaceNesting, " "), he = m) : he = m.replace(this.rules.other.tabCharGlobal, " "), me.test(m) || ne.test(m) || $.test(m) || j.test(m) || O.test(m) || ge.test(m)) break;
1219
- if (he.search(this.rules.other.nonSpaceChar) >= S || !m.trim()) p += `
1220
- ` + he.slice(S);
1236
+ `, 1)[0], fe;
1237
+ if (m = se, this.options.pedantic ? (m = m.replace(this.rules.other.listReplaceNesting, " "), fe = m) : fe = m.replace(this.rules.other.tabCharGlobal, " "), me.test(m) || ne.test(m) || $.test(m) || j.test(m) || z.test(m) || de.test(m)) break;
1238
+ if (fe.search(this.rules.other.nonSpaceChar) >= E || !m.trim()) p += `
1239
+ ` + fe.slice(E);
1221
1240
  else {
1222
- if (y || g.replace(this.rules.other.tabCharGlobal, " ").search(this.rules.other.nonSpaceChar) >= 4 || me.test(g) || ne.test(g) || ge.test(g)) break;
1241
+ if (y || f.replace(this.rules.other.tabCharGlobal, " ").search(this.rules.other.nonSpaceChar) >= 4 || me.test(f) || ne.test(f) || de.test(f)) break;
1223
1242
  p += `
1224
1243
  ` + m;
1225
1244
  }
1226
- y = !m.trim(), f += se + `
1227
- `, t = t.substring(se.length + 1), g = he.slice(S);
1245
+ y = !m.trim(), g += se + `
1246
+ `, t = t.substring(se.length + 1), f = fe.slice(E);
1228
1247
  }
1229
1248
  }
1230
- r.loose || (o ? r.loose = !0 : this.rules.other.doubleBlankLine.test(f) && (o = !0)), r.items.push({ type: "list_item", raw: f, task: !!this.options.gfm && this.rules.other.listIsTask.test(p), loose: !1, text: p, tokens: [] }), r.raw += f;
1249
+ 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;
1231
1250
  }
1232
1251
  let c = r.items.at(-1);
1233
1252
  if (c) c.raw = c.raw.trimEnd(), c.text = c.text.trimEnd();
@@ -1242,20 +1261,20 @@ ${p}` : p;
1242
1261
  break;
1243
1262
  }
1244
1263
  }
1245
- let f = this.rules.other.listTaskCheckbox.exec(d.raw);
1246
- if (f) {
1247
- let p = { type: "checkbox", raw: f[0] + " ", checked: f[0] !== "[ ]" };
1264
+ let g = this.rules.other.listTaskCheckbox.exec(d.raw);
1265
+ if (g) {
1266
+ let p = { type: "checkbox", raw: g[0] + " ", checked: g[0] !== "[ ]" };
1248
1267
  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);
1249
1268
  }
1250
1269
  }
1251
1270
  if (!r.loose) {
1252
- let f = d.tokens.filter((g) => g.type === "space"), p = f.length > 0 && f.some((g) => this.rules.other.anyLine.test(g.raw));
1271
+ let g = d.tokens.filter((f) => f.type === "space"), p = g.length > 0 && g.some((f) => this.rules.other.anyLine.test(f.raw));
1253
1272
  r.loose = p;
1254
1273
  }
1255
1274
  }
1256
1275
  if (r.loose) for (let d of r.items) {
1257
1276
  d.loose = !0;
1258
- for (let f of d.tokens) f.type === "text" && (f.type = "paragraph");
1277
+ for (let g of d.tokens) g.type === "text" && (g.type = "paragraph");
1259
1278
  }
1260
1279
  return r;
1261
1280
  }
@@ -1274,12 +1293,12 @@ ${p}` : p;
1274
1293
  table(t) {
1275
1294
  let e = this.rules.block.table.exec(t);
1276
1295
  if (!e || !this.rules.other.tableDelimiter.test(e[2])) return;
1277
- 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(`
1296
+ let n = Vn(e[1]), s = e[2].replace(this.rules.other.tableAlignChars, "").split("|"), r = e[3]?.trim() ? e[3].replace(this.rules.other.tableRowBlankLine, "").split(`
1278
1297
  `) : [], a = { type: "table", raw: e[0], header: [], align: [], rows: [] };
1279
1298
  if (n.length === s.length) {
1280
1299
  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);
1281
1300
  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] });
1282
- 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] })));
1301
+ for (let o of r) a.rows.push(Vn(o, a.header.length).map((c, d) => ({ text: c, tokens: this.lexer.inline(c), header: !1, align: a.align[d] })));
1283
1302
  return a;
1284
1303
  }
1285
1304
  }
@@ -1316,7 +1335,7 @@ ${p}` : p;
1316
1335
  let n = e[2].trim();
1317
1336
  if (!this.options.pedantic && this.rules.other.startAngleBracket.test(n)) {
1318
1337
  if (!this.rules.other.endAngleBracket.test(n)) return;
1319
- let a = Ke(n.slice(0, -1), "\\");
1338
+ let a = Je(n.slice(0, -1), "\\");
1320
1339
  if ((n.length - a.length) % 2 === 0) return;
1321
1340
  } else {
1322
1341
  let a = Wr(e[2], "()");
@@ -1331,7 +1350,7 @@ ${p}` : p;
1331
1350
  let a = this.rules.other.pedanticHrefTitle.exec(s);
1332
1351
  a && (s = a[1], r = a[3]);
1333
1352
  } else r = e[3] ? e[3].slice(1, -1) : "";
1334
- 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);
1353
+ 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)), Yn(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);
1335
1354
  }
1336
1355
  }
1337
1356
  reflink(t, e) {
@@ -1342,14 +1361,14 @@ ${p}` : p;
1342
1361
  let a = n[0].charAt(0);
1343
1362
  return { type: "text", raw: a, text: a };
1344
1363
  }
1345
- return Vn(n, r, n[0], this.lexer, this.rules);
1364
+ return Yn(n, r, n[0], this.lexer, this.rules);
1346
1365
  }
1347
1366
  }
1348
1367
  emStrong(t, e, n = "") {
1349
1368
  let s = this.rules.inline.emStrongLDelim.exec(t);
1350
1369
  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))) {
1351
- let r = [...s[0]].length - 1, a, o, c = r, d = 0, f = s[0][0] === "*" ? this.rules.inline.emStrongRDelimAst : this.rules.inline.emStrongRDelimUnd;
1352
- for (f.lastIndex = 0, e = e.slice(-1 * t.length + r); (s = f.exec(e)) !== null; ) {
1370
+ let r = [...s[0]].length - 1, a, o, c = r, d = 0, g = s[0][0] === "*" ? this.rules.inline.emStrongRDelimAst : this.rules.inline.emStrongRDelimUnd;
1371
+ for (g.lastIndex = 0, e = e.slice(-1 * t.length + r); (s = g.exec(e)) !== null; ) {
1353
1372
  if (a = s[1] || s[2] || s[3] || s[4] || s[5] || s[6], !a) continue;
1354
1373
  if (o = [...a].length, s[3] || s[4]) {
1355
1374
  c += o;
@@ -1360,13 +1379,13 @@ ${p}` : p;
1360
1379
  }
1361
1380
  if (c -= o, c > 0) continue;
1362
1381
  o = Math.min(o, o + c + d);
1363
- let p = [...s[0]][0].length, g = t.slice(0, r + s.index + p + o);
1382
+ let p = [...s[0]][0].length, f = t.slice(0, r + s.index + p + o);
1364
1383
  if (Math.min(r, o) % 2) {
1365
- let y = g.slice(1, -1);
1366
- return { type: "em", raw: g, text: y, tokens: this.lexer.inlineTokens(y) };
1384
+ let y = f.slice(1, -1);
1385
+ return { type: "em", raw: f, text: y, tokens: this.lexer.inlineTokens(y) };
1367
1386
  }
1368
- let m = g.slice(2, -2);
1369
- return { type: "strong", raw: g, text: m, tokens: this.lexer.inlineTokens(m) };
1387
+ let m = f.slice(2, -2);
1388
+ return { type: "strong", raw: f, text: m, tokens: this.lexer.inlineTokens(m) };
1370
1389
  }
1371
1390
  }
1372
1391
  }
@@ -1393,8 +1412,8 @@ ${p}` : p;
1393
1412
  }
1394
1413
  if (c -= o, c > 0) continue;
1395
1414
  o = Math.min(o, o + c);
1396
- let f = [...s[0]][0].length, p = t.slice(0, r + s.index + f + o), g = p.slice(r, -r);
1397
- return { type: "del", raw: p, text: g, tokens: this.lexer.inlineTokens(g) };
1415
+ let g = [...s[0]][0].length, p = t.slice(0, r + s.index + g + o), f = p.slice(r, -r);
1416
+ return { type: "del", raw: p, text: f, tokens: this.lexer.inlineTokens(f) };
1398
1417
  }
1399
1418
  }
1400
1419
  }
@@ -1427,25 +1446,25 @@ ${p}` : p;
1427
1446
  return { type: "text", raw: e[0], text: e[0], escaped: n };
1428
1447
  }
1429
1448
  }
1430
- }, u(Ne, "w"), Ne), be, re = (be = class {
1449
+ }, h($e, "w"), $e), ke, le = (ke = class {
1431
1450
  constructor(t) {
1432
- C(this, "tokens");
1433
- C(this, "options");
1434
- C(this, "state");
1435
- C(this, "inlineQueue");
1436
- C(this, "tokenizer");
1437
- this.tokens = [], this.tokens.links = /* @__PURE__ */ Object.create(null), this.options = t || _e, this.options.tokenizer = this.options.tokenizer || new vt(), this.tokenizer = this.options.tokenizer, this.tokenizer.options = this.options, this.tokenizer.lexer = this, this.inlineQueue = [], this.state = { inLink: !1, inRawBlock: !1, top: !0 };
1438
- let e = { other: Y, block: gt.normal, inline: Xe.normal };
1439
- this.options.pedantic ? (e.block = gt.pedantic, e.inline = Xe.pedantic) : this.options.gfm && (e.block = gt.gfm, this.options.breaks ? e.inline = Xe.breaks : e.inline = Xe.gfm), this.tokenizer.rules = e;
1451
+ D(this, "tokens");
1452
+ D(this, "options");
1453
+ D(this, "state");
1454
+ D(this, "inlineQueue");
1455
+ D(this, "tokenizer");
1456
+ this.tokens = [], this.tokens.links = /* @__PURE__ */ Object.create(null), this.options = t || Ie, this.options.tokenizer = this.options.tokenizer || new vt(), this.tokenizer = this.options.tokenizer, this.tokenizer.options = this.options, this.tokenizer.lexer = this, this.inlineQueue = [], this.state = { inLink: !1, inRawBlock: !1, top: !0 };
1457
+ let e = { other: Y, block: mt.normal, inline: Qe.normal };
1458
+ this.options.pedantic ? (e.block = mt.pedantic, e.inline = Qe.pedantic) : this.options.gfm && (e.block = mt.gfm, this.options.breaks ? e.inline = Qe.breaks : e.inline = Qe.gfm), this.tokenizer.rules = e;
1440
1459
  }
1441
1460
  static get rules() {
1442
- return { block: gt, inline: Xe };
1461
+ return { block: mt, inline: Qe };
1443
1462
  }
1444
1463
  static lex(t, e) {
1445
- return new be(e).lex(t);
1464
+ return new ke(e).lex(t);
1446
1465
  }
1447
1466
  static lexInline(t, e) {
1448
- return new be(e).inlineTokens(t);
1467
+ return new ke(e).inlineTokens(t);
1449
1468
  }
1450
1469
  lex(t) {
1451
1470
  t = t.replace(Y.carriageReturn, `
@@ -1569,7 +1588,7 @@ ${p}` : p;
1569
1588
  for (; t; ) {
1570
1589
  a || (o = ""), a = !1;
1571
1590
  let c;
1572
- if (this.options.extensions?.inline?.some((f) => (c = f.call({ lexer: this }, t, e)) ? (t = t.substring(c.raw.length), e.push(c), !0) : !1)) continue;
1591
+ 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;
1573
1592
  if (c = this.tokenizer.escape(t)) {
1574
1593
  t = t.substring(c.raw.length), e.push(c);
1575
1594
  continue;
@@ -1584,8 +1603,8 @@ ${p}` : p;
1584
1603
  }
1585
1604
  if (c = this.tokenizer.reflink(t, this.tokens.links)) {
1586
1605
  t = t.substring(c.raw.length);
1587
- let f = e.at(-1);
1588
- c.type === "text" && f?.type === "text" ? (f.raw += c.raw, f.text += c.text) : e.push(c);
1606
+ let g = e.at(-1);
1607
+ c.type === "text" && g?.type === "text" ? (g.raw += c.raw, g.text += c.text) : e.push(c);
1589
1608
  continue;
1590
1609
  }
1591
1610
  if (c = this.tokenizer.emStrong(t, n, o)) {
@@ -1614,32 +1633,32 @@ ${p}` : p;
1614
1633
  }
1615
1634
  let d = t;
1616
1635
  if (this.options.extensions?.startInline) {
1617
- let f = 1 / 0, p = t.slice(1), g;
1636
+ let g = 1 / 0, p = t.slice(1), f;
1618
1637
  this.options.extensions.startInline.forEach((m) => {
1619
- g = m.call({ lexer: this }, p), typeof g == "number" && g >= 0 && (f = Math.min(f, g));
1620
- }), f < 1 / 0 && f >= 0 && (d = t.substring(0, f + 1));
1638
+ f = m.call({ lexer: this }, p), typeof f == "number" && f >= 0 && (g = Math.min(g, f));
1639
+ }), g < 1 / 0 && g >= 0 && (d = t.substring(0, g + 1));
1621
1640
  }
1622
1641
  if (c = this.tokenizer.inlineText(d)) {
1623
1642
  t = t.substring(c.raw.length), c.raw.slice(-1) !== "_" && (o = c.raw.slice(-1)), a = !0;
1624
- let f = e.at(-1);
1625
- f?.type === "text" ? (f.raw += c.raw, f.text += c.text) : e.push(c);
1643
+ let g = e.at(-1);
1644
+ g?.type === "text" ? (g.raw += c.raw, g.text += c.text) : e.push(c);
1626
1645
  continue;
1627
1646
  }
1628
1647
  if (t) {
1629
- let f = "Infinite loop on byte: " + t.charCodeAt(0);
1648
+ let g = "Infinite loop on byte: " + t.charCodeAt(0);
1630
1649
  if (this.options.silent) {
1631
- console.error(f);
1650
+ console.error(g);
1632
1651
  break;
1633
- } else throw new Error(f);
1652
+ } else throw new Error(g);
1634
1653
  }
1635
1654
  }
1636
1655
  return e;
1637
1656
  }
1638
- }, u(be, "u"), be), Pe, yt = (Pe = class {
1657
+ }, h(ke, "u"), ke), Ue, yt = (Ue = class {
1639
1658
  constructor(t) {
1640
- C(this, "options");
1641
- C(this, "parser");
1642
- this.options = t || _e;
1659
+ D(this, "options");
1660
+ D(this, "parser");
1661
+ this.options = t || Ie;
1643
1662
  }
1644
1663
  space(t) {
1645
1664
  return "";
@@ -1647,8 +1666,8 @@ ${p}` : p;
1647
1666
  code({ text: t, lang: e, escaped: n }) {
1648
1667
  let s = (e || "").match(Y.notSpaceStart)?.[0], r = t.replace(Y.endingNewline, "") + `
1649
1668
  `;
1650
- return s ? '<pre><code class="language-' + ce(s) + '">' + (n ? r : ce(r, !0)) + `</code></pre>
1651
- ` : "<pre><code>" + (n ? r : ce(r, !0)) + `</code></pre>
1669
+ return s ? '<pre><code class="language-' + pe(s) + '">' + (n ? r : pe(r, !0)) + `</code></pre>
1670
+ ` : "<pre><code>" + (n ? r : pe(r, !0)) + `</code></pre>
1652
1671
  `;
1653
1672
  }
1654
1673
  blockquote({ tokens: t }) {
@@ -1726,7 +1745,7 @@ ${t}</tr>
1726
1745
  return `<em>${this.parser.parseInline(t)}</em>`;
1727
1746
  }
1728
1747
  codespan({ text: t }) {
1729
- return `<code>${ce(t, !0)}</code>`;
1748
+ return `<code>${pe(t, !0)}</code>`;
1730
1749
  }
1731
1750
  br(t) {
1732
1751
  return "<br>";
@@ -1735,24 +1754,24 @@ ${t}</tr>
1735
1754
  return `<del>${this.parser.parseInline(t)}</del>`;
1736
1755
  }
1737
1756
  link({ href: t, title: e, tokens: n }) {
1738
- let s = this.parser.parseInline(n), r = jn(t);
1757
+ let s = this.parser.parseInline(n), r = qn(t);
1739
1758
  if (r === null) return s;
1740
1759
  t = r;
1741
1760
  let a = '<a href="' + t + '"';
1742
- return e && (a += ' title="' + ce(e) + '"'), a += ">" + s + "</a>", a;
1761
+ return e && (a += ' title="' + pe(e) + '"'), a += ">" + s + "</a>", a;
1743
1762
  }
1744
1763
  image({ href: t, title: e, text: n, tokens: s }) {
1745
1764
  s && (n = this.parser.parseInline(s, this.parser.textRenderer));
1746
- let r = jn(t);
1747
- if (r === null) return ce(n);
1765
+ let r = qn(t);
1766
+ if (r === null) return pe(n);
1748
1767
  t = r;
1749
- let a = `<img src="${t}" alt="${ce(n)}"`;
1750
- return e && (a += ` title="${ce(e)}"`), a += ">", a;
1768
+ let a = `<img src="${t}" alt="${pe(n)}"`;
1769
+ return e && (a += ` title="${pe(e)}"`), a += ">", a;
1751
1770
  }
1752
1771
  text(t) {
1753
- return "tokens" in t && t.tokens ? this.parser.parseInline(t.tokens) : "escaped" in t && t.escaped ? t.text : ce(t.text);
1772
+ return "tokens" in t && t.tokens ? this.parser.parseInline(t.tokens) : "escaped" in t && t.escaped ? t.text : pe(t.text);
1754
1773
  }
1755
- }, u(Pe, "y"), Pe), $e, ln = ($e = class {
1774
+ }, h(Ue, "y"), Ue), Be, on = (Be = class {
1756
1775
  strong({ text: t }) {
1757
1776
  return t;
1758
1777
  }
@@ -1783,18 +1802,18 @@ ${t}</tr>
1783
1802
  checkbox({ raw: t }) {
1784
1803
  return t;
1785
1804
  }
1786
- }, u($e, "$"), $e), ke, ie = (ke = class {
1805
+ }, h(Be, "$"), Be), we, oe = (we = class {
1787
1806
  constructor(t) {
1788
- C(this, "options");
1789
- C(this, "renderer");
1790
- C(this, "textRenderer");
1791
- this.options = t || _e, this.options.renderer = this.options.renderer || new yt(), this.renderer = this.options.renderer, this.renderer.options = this.options, this.renderer.parser = this, this.textRenderer = new ln();
1807
+ D(this, "options");
1808
+ D(this, "renderer");
1809
+ D(this, "textRenderer");
1810
+ this.options = t || Ie, this.options.renderer = this.options.renderer || new yt(), this.renderer = this.options.renderer, this.renderer.options = this.options, this.renderer.parser = this, this.textRenderer = new on();
1792
1811
  }
1793
1812
  static parse(t, e) {
1794
- return new ke(e).parse(t);
1813
+ return new we(e).parse(t);
1795
1814
  }
1796
1815
  static parseInline(t, e) {
1797
- return new ke(e).parseInline(t);
1816
+ return new we(e).parseInline(t);
1798
1817
  }
1799
1818
  parse(t) {
1800
1819
  this.renderer.parser = this;
@@ -1934,11 +1953,11 @@ ${t}</tr>
1934
1953
  }
1935
1954
  return n;
1936
1955
  }
1937
- }, u(ke, "u"), ke), xe, Qe = (xe = class {
1956
+ }, h(we, "u"), we), be, tt = (be = class {
1938
1957
  constructor(t) {
1939
- C(this, "options");
1940
- C(this, "block");
1941
- this.options = t || _e;
1958
+ D(this, "options");
1959
+ D(this, "block");
1960
+ this.options = t || Ie;
1942
1961
  }
1943
1962
  preprocess(t) {
1944
1963
  return t;
@@ -1953,23 +1972,23 @@ ${t}</tr>
1953
1972
  return t;
1954
1973
  }
1955
1974
  provideLexer(t = this.block) {
1956
- return t ? re.lex : re.lexInline;
1975
+ return t ? le.lex : le.lexInline;
1957
1976
  }
1958
1977
  provideParser(t = this.block) {
1959
- return t ? ie.parse : ie.parseInline;
1978
+ return t ? oe.parse : oe.parseInline;
1960
1979
  }
1961
- }, u(xe, "P"), C(xe, "passThroughHooks", /* @__PURE__ */ new Set(["preprocess", "postprocess", "processAllTokens", "emStrongMask"])), C(xe, "passThroughHooksRespectAsync", /* @__PURE__ */ new Set(["preprocess", "postprocess", "processAllTokens"])), xe), Ue, Vr = (Ue = class {
1980
+ }, h(be, "P"), D(be, "passThroughHooks", /* @__PURE__ */ new Set(["preprocess", "postprocess", "processAllTokens", "emStrongMask"])), D(be, "passThroughHooksRespectAsync", /* @__PURE__ */ new Set(["preprocess", "postprocess", "processAllTokens"])), be), Fe, Vr = (Fe = class {
1962
1981
  constructor(...t) {
1963
- C(this, "defaults", Qt());
1964
- C(this, "options", this.setOptions);
1965
- C(this, "parse", this.parseMarkdown(!0));
1966
- C(this, "parseInline", this.parseMarkdown(!1));
1967
- C(this, "Parser", ie);
1968
- C(this, "Renderer", yt);
1969
- C(this, "TextRenderer", ln);
1970
- C(this, "Lexer", re);
1971
- C(this, "Tokenizer", vt);
1972
- C(this, "Hooks", Qe);
1982
+ D(this, "defaults", Jt());
1983
+ D(this, "options", this.setOptions);
1984
+ D(this, "parse", this.parseMarkdown(!0));
1985
+ D(this, "parseInline", this.parseMarkdown(!1));
1986
+ D(this, "Parser", oe);
1987
+ D(this, "Renderer", yt);
1988
+ D(this, "TextRenderer", on);
1989
+ D(this, "Lexer", le);
1990
+ D(this, "Tokenizer", vt);
1991
+ D(this, "Hooks", tt);
1973
1992
  this.use(...t);
1974
1993
  }
1975
1994
  walkTokens(t, e) {
@@ -2021,9 +2040,9 @@ ${t}</tr>
2021
2040
  if (!(a in r)) throw new Error(`renderer '${a}' does not exist`);
2022
2041
  if (["options", "parser"].includes(a)) continue;
2023
2042
  let o = a, c = n.renderer[o], d = r[o];
2024
- r[o] = (...f) => {
2025
- let p = c.apply(r, f);
2026
- return p === !1 && (p = d.apply(r, f)), p || "";
2043
+ r[o] = (...g) => {
2044
+ let p = c.apply(r, g);
2045
+ return p === !1 && (p = d.apply(r, g)), p || "";
2027
2046
  };
2028
2047
  }
2029
2048
  s.renderer = r;
@@ -2034,33 +2053,33 @@ ${t}</tr>
2034
2053
  if (!(a in r)) throw new Error(`tokenizer '${a}' does not exist`);
2035
2054
  if (["options", "rules", "lexer"].includes(a)) continue;
2036
2055
  let o = a, c = n.tokenizer[o], d = r[o];
2037
- r[o] = (...f) => {
2038
- let p = c.apply(r, f);
2039
- return p === !1 && (p = d.apply(r, f)), p;
2056
+ r[o] = (...g) => {
2057
+ let p = c.apply(r, g);
2058
+ return p === !1 && (p = d.apply(r, g)), p;
2040
2059
  };
2041
2060
  }
2042
2061
  s.tokenizer = r;
2043
2062
  }
2044
2063
  if (n.hooks) {
2045
- let r = this.defaults.hooks || new Qe();
2064
+ let r = this.defaults.hooks || new tt();
2046
2065
  for (let a in n.hooks) {
2047
2066
  if (!(a in r)) throw new Error(`hook '${a}' does not exist`);
2048
2067
  if (["options", "block"].includes(a)) continue;
2049
2068
  let o = a, c = n.hooks[o], d = r[o];
2050
- Qe.passThroughHooks.has(a) ? r[o] = (f) => {
2051
- if (this.defaults.async && Qe.passThroughHooksRespectAsync.has(a)) return (async () => {
2052
- let g = await c.call(r, f);
2053
- return d.call(r, g);
2069
+ tt.passThroughHooks.has(a) ? r[o] = (g) => {
2070
+ if (this.defaults.async && tt.passThroughHooksRespectAsync.has(a)) return (async () => {
2071
+ let f = await c.call(r, g);
2072
+ return d.call(r, f);
2054
2073
  })();
2055
- let p = c.call(r, f);
2074
+ let p = c.call(r, g);
2056
2075
  return d.call(r, p);
2057
- } : r[o] = (...f) => {
2076
+ } : r[o] = (...g) => {
2058
2077
  if (this.defaults.async) return (async () => {
2059
- let g = await c.apply(r, f);
2060
- return g === !1 && (g = await d.apply(r, f)), g;
2078
+ let f = await c.apply(r, g);
2079
+ return f === !1 && (f = await d.apply(r, g)), f;
2061
2080
  })();
2062
- let p = c.apply(r, f);
2063
- return p === !1 && (p = d.apply(r, f)), p;
2081
+ let p = c.apply(r, g);
2082
+ return p === !1 && (p = d.apply(r, g)), p;
2064
2083
  };
2065
2084
  }
2066
2085
  s.hooks = r;
@@ -2079,10 +2098,10 @@ ${t}</tr>
2079
2098
  return this.defaults = { ...this.defaults, ...t }, this;
2080
2099
  }
2081
2100
  lexer(t, e) {
2082
- return re.lex(t, e ?? this.defaults);
2101
+ return le.lex(t, e ?? this.defaults);
2083
2102
  }
2084
2103
  parser(t, e) {
2085
- return ie.parse(t, e ?? this.defaults);
2104
+ return oe.parse(t, e ?? this.defaults);
2086
2105
  }
2087
2106
  parseMarkdown(t) {
2088
2107
  return (e, n) => {
@@ -2091,16 +2110,16 @@ ${t}</tr>
2091
2110
  if (typeof e > "u" || e === null) return a(new Error("marked(): input parameter is undefined or null"));
2092
2111
  if (typeof e != "string") return a(new Error("marked(): input parameter is of type " + Object.prototype.toString.call(e) + ", string expected"));
2093
2112
  if (r.hooks && (r.hooks.options = r, r.hooks.block = t), r.async) return (async () => {
2094
- let o = r.hooks ? await r.hooks.preprocess(e) : e, c = await (r.hooks ? await r.hooks.provideLexer(t) : t ? re.lex : re.lexInline)(o, r), d = r.hooks ? await r.hooks.processAllTokens(c) : c;
2113
+ let o = r.hooks ? await r.hooks.preprocess(e) : e, c = await (r.hooks ? await r.hooks.provideLexer(t) : t ? le.lex : le.lexInline)(o, r), d = r.hooks ? await r.hooks.processAllTokens(c) : c;
2095
2114
  r.walkTokens && await Promise.all(this.walkTokens(d, r.walkTokens));
2096
- let f = await (r.hooks ? await r.hooks.provideParser(t) : t ? ie.parse : ie.parseInline)(d, r);
2097
- return r.hooks ? await r.hooks.postprocess(f) : f;
2115
+ let g = await (r.hooks ? await r.hooks.provideParser(t) : t ? oe.parse : oe.parseInline)(d, r);
2116
+ return r.hooks ? await r.hooks.postprocess(g) : g;
2098
2117
  })().catch(a);
2099
2118
  try {
2100
2119
  r.hooks && (e = r.hooks.preprocess(e));
2101
- let o = (r.hooks ? r.hooks.provideLexer(t) : t ? re.lex : re.lexInline)(e, r);
2120
+ let o = (r.hooks ? r.hooks.provideLexer(t) : t ? le.lex : le.lexInline)(e, r);
2102
2121
  r.hooks && (o = r.hooks.processAllTokens(o)), r.walkTokens && this.walkTokens(o, r.walkTokens);
2103
- let c = (r.hooks ? r.hooks.provideParser(t) : t ? ie.parse : ie.parseInline)(o, r);
2122
+ let c = (r.hooks ? r.hooks.provideParser(t) : t ? oe.parse : oe.parseInline)(o, r);
2104
2123
  return r.hooks && (c = r.hooks.postprocess(c)), c;
2105
2124
  } catch (o) {
2106
2125
  return a(o);
@@ -2111,46 +2130,46 @@ ${t}</tr>
2111
2130
  return (n) => {
2112
2131
  if (n.message += `
2113
2132
  Please report this to https://github.com/markedjs/marked.`, t) {
2114
- let s = "<p>An error occurred:</p><pre>" + ce(n.message + "", !0) + "</pre>";
2133
+ let s = "<p>An error occurred:</p><pre>" + pe(n.message + "", !0) + "</pre>";
2115
2134
  return e ? Promise.resolve(s) : s;
2116
2135
  }
2117
2136
  if (e) return Promise.reject(n);
2118
2137
  throw n;
2119
2138
  };
2120
2139
  }
2121
- }, u(Ue, "D"), Ue), Ae = new Vr();
2122
- function M(l, t) {
2123
- return Ae.parse(l, t);
2140
+ }, h(Fe, "D"), Fe), Ce = new Vr();
2141
+ function L(l, t) {
2142
+ return Ce.parse(l, t);
2124
2143
  }
2125
- u(M, "g");
2126
- M.options = M.setOptions = function(l) {
2127
- return Ae.setOptions(l), M.defaults = Ae.defaults, ns(M.defaults), M;
2144
+ h(L, "g");
2145
+ L.options = L.setOptions = function(l) {
2146
+ return Ce.setOptions(l), L.defaults = Ce.defaults, ss(L.defaults), L;
2128
2147
  };
2129
- M.getDefaults = Qt;
2130
- M.defaults = _e;
2131
- M.use = function(...l) {
2132
- return Ae.use(...l), M.defaults = Ae.defaults, ns(M.defaults), M;
2148
+ L.getDefaults = Jt;
2149
+ L.defaults = Ie;
2150
+ L.use = function(...l) {
2151
+ return Ce.use(...l), L.defaults = Ce.defaults, ss(L.defaults), L;
2133
2152
  };
2134
- M.walkTokens = function(l, t) {
2135
- return Ae.walkTokens(l, t);
2153
+ L.walkTokens = function(l, t) {
2154
+ return Ce.walkTokens(l, t);
2136
2155
  };
2137
- M.parseInline = Ae.parseInline;
2138
- M.Parser = ie;
2139
- M.parser = ie.parse;
2140
- M.Renderer = yt;
2141
- M.TextRenderer = ln;
2142
- M.Lexer = re;
2143
- M.lexer = re.lex;
2144
- M.Tokenizer = vt;
2145
- M.Hooks = Qe;
2146
- M.parse = M;
2147
- M.options;
2148
- M.setOptions;
2149
- M.use;
2150
- M.walkTokens;
2151
- M.parseInline;
2152
- ie.parse;
2153
- re.lex;
2156
+ L.parseInline = Ce.parseInline;
2157
+ L.Parser = oe;
2158
+ L.parser = oe.parse;
2159
+ L.Renderer = yt;
2160
+ L.TextRenderer = on;
2161
+ L.Lexer = le;
2162
+ L.lexer = le.lex;
2163
+ L.Tokenizer = vt;
2164
+ L.Hooks = tt;
2165
+ L.parse = L;
2166
+ L.options;
2167
+ L.setOptions;
2168
+ L.use;
2169
+ L.walkTokens;
2170
+ L.parseInline;
2171
+ oe.parse;
2172
+ le.lex;
2154
2173
  const Yr = { class: "@container/chat flex flex-col h-full relative" }, Zr = {
2155
2174
  key: 0,
2156
2175
  class: "pb-4"
@@ -2178,7 +2197,7 @@ const Yr = { class: "@container/chat flex flex-col h-full relative" }, Zr = {
2178
2197
  }, xi = {
2179
2198
  key: 1,
2180
2199
  class: "i-tabler-paperclip size-5"
2181
- }, bi = ["placeholder", "disabled"], ki = ["disabled"], Ii = /* @__PURE__ */ Ee({
2200
+ }, bi = ["placeholder", "disabled"], ki = ["disabled"], Ii = /* @__PURE__ */ De({
2182
2201
  __name: "ElAgentChat",
2183
2202
  props: {
2184
2203
  chatController: {},
@@ -2191,15 +2210,15 @@ const Yr = { class: "@container/chat flex flex-col h-full relative" }, Zr = {
2191
2210
  emptyStateMessage: {}
2192
2211
  },
2193
2212
  setup(l) {
2194
- const t = new M.Renderer();
2195
- t.link = ({ href: b, text: v }) => `<a href="${b}" target="_blank" rel="noopener noreferrer">${v}</a>`, M.setOptions({ breaks: !0, gfm: !0, renderer: t });
2196
- function e(b) {
2197
- if (!b)
2213
+ const t = new L.Renderer();
2214
+ t.link = ({ href: k, text: w }) => `<a href="${k}" target="_blank" rel="noopener noreferrer">${w}</a>`, L.setOptions({ breaks: !0, gfm: !0, renderer: t });
2215
+ function e(k) {
2216
+ if (!k)
2198
2217
  return "";
2199
- const v = M.parse(b, { async: !1 });
2200
- return ar.sanitize(v, { ADD_ATTR: ["target"], ADD_DATA_URI_TAGS: ["img"] });
2218
+ const w = L.parse(k, { async: !1 });
2219
+ return ar.sanitize(w, { ADD_ATTR: ["target"], ADD_DATA_URI_TAGS: ["img"] });
2201
2220
  }
2202
- u(e, "renderMarkdown");
2221
+ h(e, "renderMarkdown");
2203
2222
  const n = {
2204
2223
  private: "",
2205
2224
  org: "",
@@ -2209,285 +2228,295 @@ const Yr = { class: "@container/chat flex flex-col h-full relative" }, Zr = {
2209
2228
  org: { icon: "i-tabler-users", label: "Workspace", tooltip: "Visible to workspace members" },
2210
2229
  public: { icon: "i-tabler-globe", label: "Public", tooltip: "Anyone with the link can see this" }
2211
2230
  }, r = F(() => l.setupHint ?? n[l.scope]), a = F(() => {
2212
- const b = { ...s[l.scope] };
2213
- return l.scope === "org" && l.scopeName && (b.label = l.scopeName, b.tooltip = `Visible to ${l.scopeName} members`), b;
2214
- }), o = V(""), c = V(!1), d = V(), f = V(), p = V(), g = V([]), m = V(!1);
2215
- function y(b, v) {
2216
- const k = b[v], z = b[v + 1];
2217
- return !z || z.sender !== k.sender;
2231
+ const k = { ...s[l.scope] };
2232
+ return l.scope === "org" && l.scopeName && (k.label = l.scopeName, k.tooltip = `Visible to ${l.scopeName} members`), k;
2233
+ }), o = V(""), c = V(!1), d = V(), g = V(), p = V(), f = V([]), m = V(!1);
2234
+ function y(k, w) {
2235
+ const b = k[w], O = k[w + 1];
2236
+ return !O || O.sender !== b.sender;
2218
2237
  }
2219
- u(y, "shouldShowAvatar");
2220
- const S = F(() => l.chatController?.textState.value), O = F(() => S.value?.isConnected ?? !1), ge = F(() => S.value?.isThinking ?? !1), me = F(() => S.value?.connectionStatus === "disconnected" && !!S.value?.error), ne = F(() => S.value?.connectionStatus !== "connected" && !S.value?.error), $ = F(() => S.value?.error), j = F(() => l.chatController?.sharedMessages.value?.filter((b) => b.sender !== "system") ?? []), se = F(() => !O.value), he = F(() => me.value ? "Agent is offline" : ne.value ? "Connecting..." : "Message"), tt = F(() => (o.value.trim() || g.value.length > 0) && !se.value && !m.value), L = F(() => l.variant === "light"), nt = F(
2221
- () => L.value ? "bg-gradient-to-r from-transparent via-black/5 to-transparent" : "bg-gradient-to-r from-transparent via-white/5 to-transparent"
2222
- ), U = F(() => L.value ? "text-theme-300" : "text-white/30");
2223
- Kt(async () => {
2224
- if (l.chatController && !O.value)
2238
+ h(y, "shouldShowAvatar");
2239
+ const E = F(() => l.chatController?.textState.value), z = F(() => E.value?.isConnected ?? !1), de = F(() => E.value?.isThinking ?? !1), me = F(() => E.value?.connectionStatus === "disconnected" && !!E.value?.error), ne = F(() => E.value?.connectionStatus !== "connected" && !E.value?.error), $ = F(() => E.value?.error), j = F(() => l.chatController?.sharedMessages.value ?? []), se = F(() => !z.value), fe = F(() => me.value ? "Agent is offline" : ne.value ? "Connecting..." : "Message"), rt = F(() => (o.value.trim() || f.value.length > 0) && !se.value && !m.value), M = F(() => l.variant === "light"), it = F(
2240
+ () => M.value ? "bg-gradient-to-r from-transparent via-black/5 to-transparent" : "bg-gradient-to-r from-transparent via-white/5 to-transparent"
2241
+ ), U = F(() => M.value ? "text-theme-300" : "text-white/30");
2242
+ Qt(async () => {
2243
+ if (l.chatController && !z.value)
2225
2244
  try {
2226
2245
  await l.chatController.startTextConversation();
2227
- } catch (b) {
2228
- console.error("Failed to start text conversation:", b);
2246
+ } catch (k) {
2247
+ console.error("Failed to start text conversation:", k);
2229
2248
  }
2230
2249
  });
2231
- async function Re() {
2232
- const b = o.value.trim(), v = g.value.length > 0;
2233
- if (!b && !v || !l.chatController || !O.value || m.value)
2250
+ async function ve() {
2251
+ const k = o.value.trim(), w = f.value.length > 0;
2252
+ if (!k && !w || !l.chatController || !z.value || m.value)
2234
2253
  return;
2235
- const k = o.value, z = v ? [...g.value] : void 0;
2236
- o.value = "", g.value = [], f.value && (f.value.style.height = "auto", f.value.focus());
2254
+ const b = o.value, O = w ? [...f.value] : void 0;
2255
+ o.value = "", f.value = [], g.value && (g.value.style.height = "auto", g.value.focus());
2237
2256
  try {
2238
- await l.chatController.sendChatMessage(k, z), De();
2239
- } catch (D) {
2240
- console.error("Error sending message:", D);
2257
+ await l.chatController.sendChatMessage(b, O), ye();
2258
+ } catch (C) {
2259
+ console.error("Error sending message:", C);
2241
2260
  }
2242
2261
  }
2243
- u(Re, "sendMessage");
2244
- function Fe(b) {
2245
- b.key === "Enter" && !b.shiftKey && (b.preventDefault(), Re());
2262
+ h(ve, "sendMessage");
2263
+ function Me(k) {
2264
+ k.key === "Enter" && !k.shiftKey && (k.preventDefault(), ve());
2246
2265
  }
2247
- u(Fe, "handleKeydown");
2248
- function De() {
2249
- d.value && Ut(() => {
2266
+ h(Me, "handleKeydown");
2267
+ function ye() {
2268
+ d.value && Bt(() => {
2250
2269
  d.value.scrollTop = d.value.scrollHeight;
2251
2270
  });
2252
2271
  }
2253
- u(De, "scrollToBottom");
2272
+ h(ye, "scrollToBottom");
2254
2273
  function At() {
2255
- f.value && (f.value.style.height = "auto", f.value.style.height = `${Math.min(f.value.scrollHeight, 150)}px`);
2274
+ g.value && (g.value.style.height = "auto", g.value.style.height = `${Math.min(g.value.scrollHeight, 150)}px`);
2256
2275
  }
2257
- u(At, "adjustTextareaHeight"), Je(o, () => Ut(() => At()));
2276
+ h(At, "adjustTextareaHeight"), nt(o, () => Bt(() => At()));
2258
2277
  function Et() {
2259
2278
  p.value?.click();
2260
2279
  }
2261
- u(Et, "triggerFileInput");
2262
- async function _t(b) {
2263
- const v = b.target, k = v.files?.[0];
2264
- if (!(!k || !l.uploadFn)) {
2280
+ h(Et, "triggerFileInput");
2281
+ async function _t(k) {
2282
+ const w = k.target, b = w.files?.[0];
2283
+ if (!(!b || !l.uploadFn)) {
2265
2284
  m.value = !0;
2266
2285
  try {
2267
- const z = await l.uploadFn(k);
2268
- g.value = [...g.value, z];
2269
- } catch (z) {
2270
- console.error("Upload failed:", z);
2286
+ const O = await l.uploadFn(b);
2287
+ f.value = [...f.value, O];
2288
+ } catch (O) {
2289
+ console.error("Upload failed:", O);
2271
2290
  } finally {
2272
- m.value = !1, v.value = "";
2291
+ m.value = !1, w.value = "";
2273
2292
  }
2274
2293
  }
2275
2294
  }
2276
- u(_t, "handleFileSelect");
2277
- function st(b) {
2278
- g.value = g.value.filter((v, k) => k !== b);
2295
+ h(_t, "handleFileSelect");
2296
+ function at(k) {
2297
+ f.value = f.value.filter((w, b) => b !== k);
2279
2298
  }
2280
- u(st, "removeAttachment");
2281
- function rt(b, v) {
2282
- if (v === 0) {
2283
- const ee = b[v];
2284
- return ee?.timestamp ? He(new Date(ee.timestamp)) : null;
2285
- }
2286
- const k = b[v - 1], z = b[v];
2287
- if (!k?.timestamp || !z?.timestamp) return null;
2288
- const D = new Date(k.timestamp).getTime();
2289
- return new Date(z.timestamp).getTime() - D > 36e5 ? He(new Date(z.timestamp)) : null;
2299
+ h(at, "removeAttachment");
2300
+ function lt(k, w) {
2301
+ if (w === 0) {
2302
+ const ee = k[w];
2303
+ return ee?.timestamp ? Ge(new Date(ee.timestamp)) : null;
2304
+ }
2305
+ const b = k[w - 1], O = k[w];
2306
+ if (!b?.timestamp || !O?.timestamp) return null;
2307
+ const C = new Date(b.timestamp).getTime();
2308
+ return new Date(O.timestamp).getTime() - C > 36e5 ? Ge(new Date(O.timestamp)) : null;
2290
2309
  }
2291
- u(rt, "shouldShowTimeDivider");
2292
- function He(b) {
2293
- const v = /* @__PURE__ */ new Date(), k = b.toDateString() === v.toDateString(), z = new Date(v);
2294
- z.setDate(z.getDate() - 1);
2295
- const D = b.toDateString() === z.toDateString(), J = b.toLocaleTimeString("en-US", { hour: "numeric", minute: "2-digit" });
2296
- if (k) return J;
2297
- if (D) return `Yesterday, ${J}`;
2298
- const we = b.getFullYear() === v.getFullYear();
2299
- return `${b.toLocaleDateString("en-US", {
2310
+ h(lt, "shouldShowTimeDivider");
2311
+ function Ge(k) {
2312
+ const w = /* @__PURE__ */ new Date(), b = k.toDateString() === w.toDateString(), O = new Date(w);
2313
+ O.setDate(O.getDate() - 1);
2314
+ const C = k.toDateString() === O.toDateString(), J = k.toLocaleTimeString("en-US", { hour: "numeric", minute: "2-digit" });
2315
+ if (b) return J;
2316
+ if (C) return `Yesterday, ${J}`;
2317
+ const Te = k.getFullYear() === w.getFullYear();
2318
+ return `${k.toLocaleDateString("en-US", {
2300
2319
  weekday: "long",
2301
2320
  month: "short",
2302
2321
  day: "numeric",
2303
- ...we ? {} : { year: "numeric" }
2322
+ ...Te ? {} : { year: "numeric" }
2304
2323
  })}, ${J}`;
2305
2324
  }
2306
- return u(He, "formatTimeDivider"), Je(j, (b) => {
2307
- b.length > 0 && Ut(() => De());
2308
- }, { immediate: !0, deep: !0 }), (b, v) => (A(), E("div", Yr, [
2309
- L.value ? G("", !0) : (A(), E("div", Zr, [
2310
- Bt($s, {
2325
+ return h(Ge, "formatTimeDivider"), nt(j, (k) => {
2326
+ k.length > 0 && Bt(() => ye());
2327
+ }, { immediate: !0, deep: !0 }), (k, w) => (S(), A("div", Yr, [
2328
+ M.value ? G("", !0) : (S(), A("div", Zr, [
2329
+ Ft($s, {
2311
2330
  agent: l.agent,
2312
- "is-online": O.value
2331
+ "is-online": z.value
2313
2332
  }, null, 8, ["agent", "is-online"])
2314
2333
  ])),
2315
- me.value ? (A(), E("div", {
2334
+ me.value ? (S(), A("div", {
2316
2335
  key: 1,
2317
- class: _(["py-16 flex flex-col items-center justify-center gap-3 text-sm", L.value ? "text-theme-400" : "text-white/60"])
2336
+ class: _(["py-16 flex flex-col items-center justify-center gap-3 text-sm", M.value ? "text-theme-400" : "text-white/60"])
2318
2337
  }, [
2319
2338
  T("i", {
2320
- class: _(["i-heroicons-cloud-arrow-down size-8", L.value ? "text-theme-300" : "text-white/40"])
2339
+ class: _(["i-heroicons-cloud-arrow-down size-8", M.value ? "text-theme-300" : "text-white/40"])
2321
2340
  }, null, 2),
2322
- T("span", null, ue($.value), 1)
2323
- ], 2)) : ne.value ? (A(), E("div", {
2341
+ T("span", null, ie($.value), 1)
2342
+ ], 2)) : ne.value ? (S(), A("div", {
2324
2343
  key: 2,
2325
- class: _(["py-16 flex flex-col items-center justify-center gap-2 text-sm", L.value ? "text-theme-400" : "text-theme-600"])
2344
+ class: _(["py-16 flex flex-col items-center justify-center gap-2 text-sm", M.value ? "text-theme-400" : "text-theme-600"])
2326
2345
  }, [
2327
- Bt(Cn, { class: "size-4" })
2328
- ], 2)) : r.value ? (A(), E("div", {
2346
+ Ft(In, { class: "size-4" })
2347
+ ], 2)) : r.value ? (S(), A("div", {
2329
2348
  key: 3,
2330
2349
  class: _(["flex items-center justify-center gap-1.5 py-2 text-[11px]", U.value])
2331
2350
  }, [
2332
- v[5] || (v[5] = T("i", { class: "i-tabler-tool size-3" }, null, -1)),
2333
- T("span", null, ue(r.value), 1)
2351
+ w[5] || (w[5] = T("i", { class: "i-tabler-tool size-3" }, null, -1)),
2352
+ T("span", null, ie(r.value), 1)
2334
2353
  ], 2)) : G("", !0),
2335
2354
  T("div", {
2336
2355
  ref_key: "messagesContainer",
2337
2356
  ref: d,
2338
2357
  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"
2339
2358
  }, [
2340
- j.value.length === 0 && !ne.value && !me.value ? (A(), E("div", Xr, [
2359
+ j.value.length === 0 && !ne.value && !me.value ? (S(), A("div", Xr, [
2341
2360
  T("div", Kr, [
2342
2361
  T("img", {
2343
2362
  src: l.agent.avatarUrl.value,
2344
2363
  alt: l.agent.displayName.value,
2345
- class: _(["size-full rounded-full object-cover ring-1", L.value ? "ring-black/5" : "ring-white/10"])
2364
+ class: _(["size-full rounded-full object-cover ring-1", M.value ? "ring-black/5" : "ring-white/10"])
2346
2365
  }, null, 10, Qr),
2347
- O.value ? (A(), E("span", {
2366
+ z.value ? (S(), A("span", {
2348
2367
  key: 0,
2349
- class: _(["absolute top-[85%] left-[85%] -translate-x-1/2 -translate-y-1/2 size-[18%] min-w-2.5 min-h-2.5 flex items-center justify-center rounded-full", L.value ? "bg-white" : "bg-theme-900"])
2350
- }, [...v[6] || (v[6] = [
2368
+ class: _(["absolute top-[85%] left-[85%] -translate-x-1/2 -translate-y-1/2 size-[18%] min-w-2.5 min-h-2.5 flex items-center justify-center rounded-full", M.value ? "bg-white" : "bg-theme-900"])
2369
+ }, [...w[6] || (w[6] = [
2351
2370
  T("span", { class: "size-[70%] inline-flex rounded-full bg-emerald-500" }, null, -1)
2352
2371
  ])], 2)) : G("", !0)
2353
2372
  ]),
2354
2373
  T("div", {
2355
- class: _(["text-base @sm/chat:text-lg font-semibold", L.value ? "text-theme-900" : "text-white"])
2356
- }, ue(l.agent.displayName.value), 3),
2374
+ class: _(["text-base @sm/chat:text-lg font-semibold", M.value ? "text-theme-900" : "text-white"])
2375
+ }, ie(l.agent.displayName.value), 3),
2357
2376
  T("p", {
2358
2377
  class: _(["mt-1 text-center text-xs @sm/chat:text-sm", U.value])
2359
- }, ue(l.emptyStateMessage || "Send a message to get started"), 3),
2378
+ }, ie(l.emptyStateMessage || "Send a message to get started"), 3),
2360
2379
  T("div", {
2361
- class: _(["inline-flex items-center gap-1.5 mt-5 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"]),
2380
+ class: _(["inline-flex items-center gap-1.5 mt-5 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"]),
2362
2381
  title: a.value.tooltip
2363
2382
  }, [
2364
2383
  T("i", {
2365
2384
  class: _([a.value.icon, "size-3"])
2366
2385
  }, null, 2),
2367
- T("span", null, ue(a.value.label), 1)
2386
+ T("span", null, ie(a.value.label), 1)
2368
2387
  ], 10, Jr)
2369
2388
  ])) : G("", !0),
2370
- (A(!0), E(Te, null, mt(j.value, (k, z) => (A(), E(Te, {
2371
- key: k.id
2389
+ (S(!0), A(_e, null, xt(j.value, (b, O) => (S(), A(_e, {
2390
+ key: b.id
2372
2391
  }, [
2373
- rt(j.value, z) ? (A(), E("div", ei, [
2392
+ lt(j.value, O) ? (S(), A("div", ei, [
2374
2393
  T("div", {
2375
- class: _(["flex-1 h-px", nt.value])
2394
+ class: _(["flex-1 h-px", it.value])
2376
2395
  }, null, 2),
2377
2396
  T("span", {
2378
2397
  class: _(["text-[10px] @sm/chat:text-[11px] font-medium shrink-0 tracking-widest uppercase", U.value])
2379
- }, ue(rt(j.value, z)), 3),
2398
+ }, ie(lt(j.value, O)), 3),
2380
2399
  T("div", {
2381
- class: _(["flex-1 h-px", nt.value])
2400
+ class: _(["flex-1 h-px", it.value])
2382
2401
  }, null, 2)
2383
2402
  ])) : G("", !0),
2384
- T("div", {
2385
- "data-test": k.sender === "agent" ? "messaging-assistant-msg" : k.sender === "user" ? "messaging-user-msg" : void 0,
2403
+ b.sender === "system" ? (S(), A("div", {
2404
+ key: 1,
2405
+ "data-test": "messaging-system-msg",
2406
+ class: _(["flex items-start gap-2 px-3 py-2 text-[13px] leading-relaxed", M.value ? "text-theme-500" : "text-white/70"])
2407
+ }, [
2408
+ T("i", {
2409
+ class: _(["i-tabler-alert-circle size-4 mt-0.5 shrink-0", M.value ? "text-red-500" : "text-red-300"])
2410
+ }, null, 2),
2411
+ T("span", null, ie(b.text), 1)
2412
+ ], 2)) : (S(), A("div", {
2413
+ key: 2,
2414
+ "data-test": b.sender === "agent" ? "messaging-assistant-msg" : b.sender === "user" ? "messaging-user-msg" : void 0,
2386
2415
  class: _(["flex gap-2 items-end", {
2387
- "justify-end": k.sender === "user",
2388
- "justify-start": k.sender === "agent",
2389
- "mb-4": y(j.value, z)
2416
+ "justify-end": b.sender === "user",
2417
+ "justify-start": b.sender === "agent",
2418
+ "mb-4": y(j.value, O)
2390
2419
  }])
2391
2420
  }, [
2392
- k.sender === "agent" ? (A(), E("div", ni, [
2393
- y(j.value, z) ? (A(), E("img", {
2421
+ b.sender === "agent" ? (S(), A("div", ni, [
2422
+ y(j.value, O) ? (S(), A("img", {
2394
2423
  key: 0,
2395
2424
  src: l.agent.avatarUrl.value,
2396
2425
  alt: l.agent.displayName.value,
2397
- class: _(["size-6 @sm/chat:size-7 rounded-full object-cover shadow-sm", L.value ? "ring-1 ring-black/5" : ""])
2426
+ class: _(["size-6 @sm/chat:size-7 rounded-full object-cover shadow-sm", M.value ? "ring-1 ring-black/5" : ""])
2398
2427
  }, null, 10, si)) : G("", !0)
2399
2428
  ])) : G("", !0),
2400
2429
  T("div", {
2401
- class: _(k.sender === "user" ? "max-w-[75%]" : "max-w-[85%]")
2430
+ class: _(b.sender === "user" ? "max-w-[75%]" : "max-w-[85%]")
2402
2431
  }, [
2403
- k.attachments?.length ? (A(), E("div", {
2432
+ b.attachments?.length ? (S(), A("div", {
2404
2433
  key: 0,
2405
- class: _(["mb-1 space-y-1", k.sender === "user" ? "flex flex-col items-end" : ""])
2434
+ class: _(["mb-1 space-y-1", b.sender === "user" ? "flex flex-col items-end" : ""])
2406
2435
  }, [
2407
- (A(!0), E(Te, null, mt(k.attachments, (D, J) => (A(), E(Te, { key: J }, [
2408
- D.type === "image" ? (A(), E("img", {
2436
+ (S(!0), A(_e, null, xt(b.attachments, (C, J) => (S(), A(_e, { key: J }, [
2437
+ C.type === "image" ? (S(), A("img", {
2409
2438
  key: 0,
2410
- src: D.url,
2411
- alt: D.name,
2439
+ src: C.url,
2440
+ alt: C.name,
2412
2441
  class: "rounded-xl object-cover max-h-48 max-w-[240px] @sm/chat:max-w-[320px]"
2413
- }, null, 8, ri)) : D.type === "audio" ? (A(), E("audio", {
2442
+ }, null, 8, ri)) : C.type === "audio" ? (S(), A("audio", {
2414
2443
  key: 1,
2415
- src: D.url,
2444
+ src: C.url,
2416
2445
  controls: "",
2417
2446
  class: "max-w-full"
2418
- }, null, 8, ii)) : (A(), E("a", {
2447
+ }, null, 8, ii)) : (S(), A("a", {
2419
2448
  key: 2,
2420
- href: D.url,
2449
+ href: C.url,
2421
2450
  target: "_blank",
2422
2451
  rel: "noopener",
2423
- class: _(["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"])
2452
+ class: _(["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"])
2424
2453
  }, [
2425
- v[7] || (v[7] = T("i", { class: "i-tabler-file size-3.5" }, null, -1)),
2426
- pt(" " + ue(D.name), 1)
2454
+ w[7] || (w[7] = T("i", { class: "i-tabler-file size-3.5" }, null, -1)),
2455
+ ft(" " + ie(C.name), 1)
2427
2456
  ], 10, ai))
2428
2457
  ], 64))), 128))
2429
2458
  ], 2)) : G("", !0),
2430
- k.text ? (A(), E("div", {
2459
+ b.text ? (S(), A("div", {
2431
2460
  key: 1,
2432
2461
  class: _(["rounded-2xl px-3.5 py-2", [
2433
- k.sender === "user" ? "bg-primary-500 text-white rounded-br-[4px]" : L.value ? "bg-theme-50 text-theme-800 border border-black/[0.02] rounded-bl-[4px]" : "bg-white/15 backdrop-blur-sm text-white/95 rounded-bl-[4px]"
2462
+ b.sender === "user" ? "bg-primary-500 text-white rounded-br-[4px]" : M.value ? "bg-theme-50 text-theme-800 border border-black/[0.02] rounded-bl-[4px]" : "bg-white/15 backdrop-blur-sm text-white/95 rounded-bl-[4px]"
2434
2463
  ]])
2435
2464
  }, [
2436
2465
  T("div", {
2437
- class: _(["chat-msg-prose break-words text-[14px] leading-relaxed @sm/chat:text-[15px] @sm/chat:leading-relaxed", k.sender === "user" || !L.value ? "chat-msg-prose-invert" : ""]),
2438
- innerHTML: e(k.text)
2466
+ class: _(["chat-msg-prose break-words text-[14px] leading-relaxed @sm/chat:text-[15px] @sm/chat:leading-relaxed", b.sender === "user" || !M.value ? "chat-msg-prose-invert" : ""]),
2467
+ innerHTML: e(b.text)
2439
2468
  }, null, 10, li)
2440
2469
  ], 2)) : G("", !0)
2441
2470
  ], 2)
2442
- ], 10, ti)
2471
+ ], 10, ti))
2443
2472
  ], 64))), 128)),
2444
- ge.value ? (A(), E("div", oi, [
2473
+ de.value ? (S(), A("div", oi, [
2445
2474
  T("img", {
2446
2475
  src: l.agent.avatarUrl.value,
2447
2476
  alt: l.agent.displayName.value,
2448
- class: _(["size-7 @sm/chat:size-8 flex-shrink-0 rounded-full object-cover shadow-sm", L.value ? "ring-1 ring-black/5" : ""])
2477
+ class: _(["size-7 @sm/chat:size-8 flex-shrink-0 rounded-full object-cover shadow-sm", M.value ? "ring-1 ring-black/5" : ""])
2449
2478
  }, null, 10, ci),
2450
2479
  T("div", {
2451
- class: _(["rounded-2xl px-3.5 py-2.5 flex items-center", L.value ? "bg-theme-100" : "bg-white/15 backdrop-blur-sm"])
2480
+ class: _(["rounded-2xl px-3.5 py-2.5 flex items-center", M.value ? "bg-theme-100" : "bg-white/15 backdrop-blur-sm"])
2452
2481
  }, [
2453
2482
  T("i", {
2454
- class: _(["i-svg-spinners-3-dots-bounce size-7", L.value ? "text-theme-400" : "text-white/50"])
2483
+ class: _(["i-svg-spinners-3-dots-bounce size-7", M.value ? "text-theme-400" : "text-white/50"])
2455
2484
  }, null, 2)
2456
2485
  ], 2)
2457
2486
  ])) : G("", !0)
2458
2487
  ], 512),
2459
2488
  T("div", {
2460
- class: _(["absolute bottom-0 left-0 right-0 z-30 px-5 pb-4 pt-3", L.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"])
2489
+ class: _(["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"])
2461
2490
  }, [
2462
- g.value.length > 0 ? (A(), E("div", ui, [
2463
- (A(!0), E(Te, null, mt(g.value, (k, z) => (A(), E("div", {
2464
- key: z,
2491
+ f.value.length > 0 ? (S(), A("div", ui, [
2492
+ (S(!0), A(_e, null, xt(f.value, (b, O) => (S(), A("div", {
2493
+ key: O,
2465
2494
  class: "relative shrink-0 group"
2466
2495
  }, [
2467
- k.type === "image" ? (A(), E("img", {
2496
+ b.type === "image" ? (S(), A("img", {
2468
2497
  key: 0,
2469
- src: k.url,
2470
- alt: k.name,
2471
- class: _(["size-14 rounded-xl object-cover border", L.value ? "border-black/10" : "border-white/20"])
2472
- }, null, 10, hi)) : (A(), E("div", {
2498
+ src: b.url,
2499
+ alt: b.name,
2500
+ class: _(["size-14 rounded-xl object-cover border", M.value ? "border-black/10" : "border-white/20"])
2501
+ }, null, 10, hi)) : (S(), A("div", {
2473
2502
  key: 1,
2474
- class: _(["h-14 px-3 rounded-xl flex items-center gap-1.5 text-xs border", L.value ? "border-black/10 bg-theme-50 text-theme-600" : "border-white/20 bg-white/10 text-white/70"])
2503
+ class: _(["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"])
2475
2504
  }, [
2476
- v[8] || (v[8] = T("i", { class: "i-tabler-file size-4" }, null, -1)),
2477
- T("span", pi, ue(k.name), 1)
2505
+ w[8] || (w[8] = T("i", { class: "i-tabler-file size-4" }, null, -1)),
2506
+ T("span", pi, ie(b.name), 1)
2478
2507
  ], 2)),
2479
2508
  T("button", {
2480
2509
  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",
2481
- onClick: /* @__PURE__ */ u((D) => st(z), "onClick")
2482
- }, [...v[9] || (v[9] = [
2510
+ onClick: /* @__PURE__ */ h((C) => at(O), "onClick")
2511
+ }, [...w[9] || (w[9] = [
2483
2512
  T("i", { class: "i-tabler-x size-3" }, null, -1)
2484
2513
  ])], 8, di)
2485
2514
  ]))), 128)),
2486
- m.value ? (A(), E("div", fi, [
2487
- Bt(Cn, { class: "size-5" })
2515
+ m.value ? (S(), A("div", fi, [
2516
+ Ft(In, { class: "size-5" })
2488
2517
  ])) : G("", !0)
2489
2518
  ])) : G("", !0),
2490
- l.uploadFn ? (A(), E("input", {
2519
+ l.uploadFn ? (S(), A("input", {
2491
2520
  key: 1,
2492
2521
  ref_key: "fileInput",
2493
2522
  ref: p,
@@ -2497,57 +2526,57 @@ const Yr = { class: "@container/chat flex flex-col h-full relative" }, Zr = {
2497
2526
  onChange: _t
2498
2527
  }, null, 544)) : G("", !0),
2499
2528
  T("div", {
2500
- class: _(["flex items-end gap-1 w-full rounded-[24px] p-1.5 transition-all duration-300", L.value ? c.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" : c.value ? "bg-white/15 ring-1 ring-white/25" : "bg-white/10 ring-1 ring-transparent hover:ring-white/15"])
2529
+ class: _(["flex items-end gap-1 w-full rounded-[24px] p-1.5 transition-all duration-300", M.value ? c.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" : c.value ? "bg-white/15 ring-1 ring-white/25" : "bg-white/10 ring-1 ring-transparent hover:ring-white/15"])
2501
2530
  }, [
2502
2531
  T("button", {
2503
2532
  class: _(["shrink-0 flex items-center justify-center rounded-full transition-colors mb-0.5 ml-0.5 size-9 @sm/chat:size-10", [
2504
2533
  l.uploadFn ? "cursor-pointer" : "cursor-default",
2505
- L.value ? "text-theme-400 hover:text-theme-600 hover:bg-black/5" : "text-white/50 hover:text-white/80 hover:bg-white/10",
2534
+ M.value ? "text-theme-400 hover:text-theme-600 hover:bg-black/5" : "text-white/50 hover:text-white/80 hover:bg-white/10",
2506
2535
  m.value ? "opacity-50 pointer-events-none" : ""
2507
2536
  ]]),
2508
2537
  disabled: se.value || m.value || !l.uploadFn,
2509
- onClick: v[0] || (v[0] = (k) => l.uploadFn && Et())
2538
+ onClick: w[0] || (w[0] = (b) => l.uploadFn && Et())
2510
2539
  }, [
2511
- m.value ? (A(), E("i", mi)) : (A(), E("i", xi))
2540
+ m.value ? (S(), A("i", mi)) : (S(), A("i", xi))
2512
2541
  ], 10, gi),
2513
- Zn(T("textarea", {
2542
+ Xn(T("textarea", {
2514
2543
  ref_key: "textarea",
2515
- ref: f,
2516
- "onUpdate:modelValue": v[1] || (v[1] = (k) => o.value = k),
2544
+ ref: g,
2545
+ "onUpdate:modelValue": w[1] || (w[1] = (b) => o.value = b),
2517
2546
  "data-test": "messaging-input",
2518
2547
  rows: "1",
2519
2548
  enterkeyhint: "send",
2520
- placeholder: he.value,
2549
+ placeholder: fe.value,
2521
2550
  disabled: se.value,
2522
2551
  style: { fontSize: "16px", resize: "none" },
2523
- class: _(["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", L.value ? "text-theme-800 placeholder-theme-400" : "text-white placeholder-white/50"]),
2524
- onKeydown: Fe,
2525
- onFocus: v[2] || (v[2] = (k) => c.value = !0),
2526
- onBlur: v[3] || (v[3] = (k) => c.value = !1)
2552
+ class: _(["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"]),
2553
+ onKeydown: Me,
2554
+ onFocus: w[2] || (w[2] = (b) => c.value = !0),
2555
+ onBlur: w[3] || (w[3] = (b) => c.value = !1)
2527
2556
  }, null, 42, bi), [
2528
- [Xn, o.value]
2557
+ [Kn, o.value]
2529
2558
  ]),
2530
2559
  T("button", {
2531
2560
  "data-test": "messaging-send-btn",
2532
- class: _(["shrink-0 flex items-center justify-center rounded-full transition-all duration-300 mb-0.5 mr-0.5 size-9 @sm/chat:size-10", tt.value ? "bg-primary-500 text-white shadow-md hover:scale-105 active:scale-95 cursor-pointer" : L.value ? "bg-black/5 text-black/20" : "bg-white/10 text-white/30"]),
2533
- disabled: !tt.value,
2534
- onClick: v[4] || (v[4] = (k) => Re())
2535
- }, [...v[10] || (v[10] = [
2561
+ class: _(["shrink-0 flex items-center justify-center rounded-full transition-all duration-300 mb-0.5 mr-0.5 size-9 @sm/chat:size-10", rt.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"]),
2562
+ disabled: !rt.value,
2563
+ onClick: w[4] || (w[4] = (b) => ve())
2564
+ }, [...w[10] || (w[10] = [
2536
2565
  T("i", { class: "i-tabler-arrow-up size-5" }, null, -1)
2537
2566
  ])], 10, ki)
2538
2567
  ], 2),
2539
2568
  T("div", {
2540
- class: _(["text-[10px] text-center mt-2.5 select-none opacity-70", L.value ? "text-theme-400" : "text-white/50"])
2569
+ class: _(["text-[10px] text-center mt-2.5 select-none opacity-70", M.value ? "text-theme-400" : "text-white/50"])
2541
2570
  }, [
2542
- v[11] || (v[11] = pt(" Press ", -1)),
2571
+ w[11] || (w[11] = ft(" Press ", -1)),
2543
2572
  T("kbd", {
2544
- class: _(["font-sans px-1.5 py-0.5 rounded-md text-[10px]", L.value ? "bg-black/[0.04] border border-black/[0.05]" : "bg-white/10 border border-white/15"])
2573
+ class: _(["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"])
2545
2574
  }, "Enter", 2),
2546
- v[12] || (v[12] = pt(" to send, ", -1)),
2575
+ w[12] || (w[12] = ft(" to send, ", -1)),
2547
2576
  T("kbd", {
2548
- class: _(["font-sans px-1.5 py-0.5 rounded-md text-[10px]", L.value ? "bg-black/[0.04] border border-black/[0.05]" : "bg-white/10 border border-white/15"])
2577
+ class: _(["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"])
2549
2578
  }, "Shift+Enter", 2),
2550
- v[13] || (v[13] = pt(" for new line ", -1))
2579
+ w[13] || (w[13] = ft(" for new line ", -1))
2551
2580
  ], 2)
2552
2581
  ], 2)
2553
2582
  ]));
@@ -2555,7 +2584,7 @@ const Yr = { class: "@container/chat flex flex-col h-full relative" }, Zr = {
2555
2584
  }), wi = { class: "agent-wrap" }, vi = {
2556
2585
  key: 0,
2557
2586
  class: "flex items-center justify-center h-full"
2558
- }, Mi = /* @__PURE__ */ Ee({
2587
+ }, Mi = /* @__PURE__ */ De({
2559
2588
  __name: "AgentWrap",
2560
2589
  props: {
2561
2590
  sdk: {},
@@ -2573,7 +2602,7 @@ const Yr = { class: "@container/chat flex flex-col h-full relative" }, Zr = {
2573
2602
  isDev: typeof window < "u" ? window.location.hostname === "localhost" || window.location.hostname.includes("127.0.0.1") : !1,
2574
2603
  ...e.apiBase && { apiBase: e.apiBase }
2575
2604
  }), s = V(!e.agent), r = vs(e.agent ? new kt({ config: e.agent }) : void 0), a = V();
2576
- return Kt(async () => {
2605
+ return Qt(async () => {
2577
2606
  if (e.agent) {
2578
2607
  t.debug("Agent provided via props, skipping fetch", {
2579
2608
  agentId: e.agent.agentId,
@@ -2649,12 +2678,12 @@ const Yr = { class: "@container/chat flex flex-col h-full relative" }, Zr = {
2649
2678
  }
2650
2679
  });
2651
2680
  }
2652
- }), (o, c) => (A(), E("div", wi, [
2653
- s.value ? (A(), E("div", vi, [...c[0] || (c[0] = [
2681
+ }), (o, c) => (S(), A("div", wi, [
2682
+ s.value ? (S(), A("div", vi, [...c[0] || (c[0] = [
2654
2683
  T("div", { class: "animate-spin rounded-full size-6 border-b-2 border-white" }, null, -1)
2655
- ])])) : r.value ? Yn(o.$slots, "default", {
2684
+ ])])) : r.value ? Zn(o.$slots, "default", {
2656
2685
  key: 1,
2657
- sdk: Vt(n),
2686
+ sdk: Yt(n),
2658
2687
  agent: r.value,
2659
2688
  context: l.context,
2660
2689
  firstMessage: l.firstMessage,
@@ -2666,16 +2695,16 @@ const Yr = { class: "@container/chat flex flex-col h-full relative" }, Zr = {
2666
2695
  }
2667
2696
  });
2668
2697
  export {
2669
- In as A,
2698
+ Mn as A,
2670
2699
  Mi as _,
2671
2700
  Ii as a,
2672
- Di as b,
2701
+ Ci as b,
2673
2702
  Ri as c,
2674
- Ci as d,
2675
- Cn as e,
2703
+ Di as d,
2704
+ In as e,
2676
2705
  $s as f,
2677
2706
  Ei as g,
2678
- Ln as h,
2707
+ zn as h,
2679
2708
  _i as p
2680
2709
  };
2681
2710
  //# sourceMappingURL=AgentWrap.vue_vue_type_script_setup_true_lang.js.map