@eloquentai/chat-sdk 0.26.0-dev → 0.26.1-dev

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,4 +1,4 @@
1
- import { jsx as w, jsxs as B, Fragment as We } from "react/jsx-runtime";
1
+ import { jsx as y, jsxs as B, Fragment as We } from "react/jsx-runtime";
2
2
  import { ChevronDown as jo, X as gr, Copy as al, ThumbsUp as sl, ThumbsDown as ll, FileSearch as cl, CheckCircle as ul, Info as fl, XCircle as dl, AlertTriangle as pl, Hourglass as hl, ArrowUp as ml, RefreshCcw as gl } from "lucide-react";
3
3
  import { clsx as bl } from "clsx";
4
4
  import { twMerge as yl } from "tailwind-merge";
@@ -15,16 +15,16 @@ import { z as Q } from "zod";
15
15
  import Cl from "react-dom/client";
16
16
  try {
17
17
  let e = typeof window < "u" ? window : typeof global < "u" ? global : typeof globalThis < "u" ? globalThis : typeof self < "u" ? self : {}, t = new e.Error().stack;
18
- t && (e._sentryDebugIds = e._sentryDebugIds || {}, e._sentryDebugIds[t] = "2f81343b-f2e5-4209-8b16-da25ba4336e1", e._sentryDebugIdIdentifier = "sentry-dbid-2f81343b-f2e5-4209-8b16-da25ba4336e1");
18
+ t && (e._sentryDebugIds = e._sentryDebugIds || {}, e._sentryDebugIds[t] = "115c8c74-b43b-41cd-979f-d361dfcc248e", e._sentryDebugIdIdentifier = "sentry-dbid-115c8c74-b43b-41cd-979f-d361dfcc248e");
19
19
  } catch {
20
20
  }
21
21
  {
22
22
  let e = typeof window < "u" ? window : typeof global < "u" ? global : typeof globalThis < "u" ? globalThis : typeof self < "u" ? self : {};
23
- e.SENTRY_RELEASE = { id: "8de2d17a15f55c47c4683565a4c1e87ebcdbf55b" };
23
+ e.SENTRY_RELEASE = { id: "75c5948fee4525f723d37592f66a83645d90df69" };
24
24
  }
25
25
  if (typeof window < "u") {
26
26
  const e = "development";
27
- import("./index-DfHp-nmR.js").then((t) => {
27
+ import("./index-C0lXr3_t.js").then((t) => {
28
28
  t.init({
29
29
  dsn: void 0,
30
30
  environment: e,
@@ -55,7 +55,7 @@ function hn(e) {
55
55
  s(!1);
56
56
  }, [i]);
57
57
  const l = !i || a;
58
- return /* @__PURE__ */ w(
58
+ return /* @__PURE__ */ y(
59
59
  "div",
60
60
  {
61
61
  className: j(
@@ -64,8 +64,8 @@ function hn(e) {
64
64
  ),
65
65
  ...o,
66
66
  children: l ? /* @__PURE__ */ B("svg", { viewBox: "0 0 80 80", fill: "none", xmlns: "http://www.w3.org/2000/svg", children: [
67
- /* @__PURE__ */ w("circle", { cx: "40", cy: "40", r: "40", fill: n || "#6F33B7" }),
68
- /* @__PURE__ */ w(
67
+ /* @__PURE__ */ y("circle", { cx: "40", cy: "40", r: "40", fill: n || "#6F33B7" }),
68
+ /* @__PURE__ */ y(
69
69
  "path",
70
70
  {
71
71
  fillRule: "evenodd",
@@ -74,7 +74,7 @@ function hn(e) {
74
74
  fill: r || "#000000"
75
75
  }
76
76
  )
77
- ] }) : /* @__PURE__ */ w(
77
+ ] }) : /* @__PURE__ */ y(
78
78
  "img",
79
79
  {
80
80
  src: i,
@@ -90,37 +90,37 @@ function Al({
90
90
  isOpen: e,
91
91
  toggleBubble: t
92
92
  }) {
93
- return /* @__PURE__ */ w("div", { className: "absolute inset-0 m-auto flex items-center justify-center overflow-hidden", children: /* @__PURE__ */ B(
93
+ return /* @__PURE__ */ y("div", { className: "absolute inset-0 m-auto flex items-center justify-center overflow-hidden", children: /* @__PURE__ */ B(
94
94
  "div",
95
95
  {
96
96
  className: "chat-bubble relative flex items-center justify-center w-12 h-12 rounded-full bg-[#000] text-[#fff] cursor-pointer",
97
97
  onClick: t,
98
98
  children: [
99
- /* @__PURE__ */ w(
99
+ /* @__PURE__ */ y(
100
100
  "div",
101
101
  {
102
102
  className: j(
103
103
  "absolute inset-0 flex justify-center items-center m-auto transition duration-200 ease-linear",
104
104
  e ? "rotate-180 opacity-0 scale-0" : "rotate-0 opacity-100 scale-100"
105
105
  ),
106
- children: /* @__PURE__ */ w(hn, { bgColor: "#000", fgColor: "#ffffff" })
106
+ children: /* @__PURE__ */ y(hn, { bgColor: "#000", fgColor: "#ffffff" })
107
107
  }
108
108
  ),
109
- /* @__PURE__ */ w(
109
+ /* @__PURE__ */ y(
110
110
  "div",
111
111
  {
112
112
  className: j(
113
113
  "absolute inset-0 flex justify-center items-center m-auto transition duration-200 ease-linear",
114
114
  e ? "rotate-0 opacity-100 scale-100" : "-rotate-180 opacity-0 scale-0"
115
115
  ),
116
- children: /* @__PURE__ */ w(jo, {})
116
+ children: /* @__PURE__ */ y(jo, {})
117
117
  }
118
118
  )
119
119
  ]
120
120
  }
121
121
  ) });
122
122
  }
123
- const yr = pe.forwardRef(({ className: e, ...t }, n) => /* @__PURE__ */ w(
123
+ const yr = pe.forwardRef(({ className: e, ...t }, n) => /* @__PURE__ */ y(
124
124
  "div",
125
125
  {
126
126
  ref: n,
@@ -132,7 +132,7 @@ const yr = pe.forwardRef(({ className: e, ...t }, n) => /* @__PURE__ */ w(
132
132
  }
133
133
  ));
134
134
  yr.displayName = "Card";
135
- const wr = pe.forwardRef(({ className: e, ...t }, n) => /* @__PURE__ */ w(
135
+ const wr = pe.forwardRef(({ className: e, ...t }, n) => /* @__PURE__ */ y(
136
136
  "div",
137
137
  {
138
138
  ref: n,
@@ -141,7 +141,7 @@ const wr = pe.forwardRef(({ className: e, ...t }, n) => /* @__PURE__ */ w(
141
141
  }
142
142
  ));
143
143
  wr.displayName = "CardHeader";
144
- const Il = pe.forwardRef(({ className: e, ...t }, n) => /* @__PURE__ */ w(
144
+ const Il = pe.forwardRef(({ className: e, ...t }, n) => /* @__PURE__ */ y(
145
145
  "div",
146
146
  {
147
147
  ref: n,
@@ -153,7 +153,7 @@ const Il = pe.forwardRef(({ className: e, ...t }, n) => /* @__PURE__ */ w(
153
153
  }
154
154
  ));
155
155
  Il.displayName = "CardTitle";
156
- const Tl = pe.forwardRef(({ className: e, ...t }, n) => /* @__PURE__ */ w(
156
+ const Tl = pe.forwardRef(({ className: e, ...t }, n) => /* @__PURE__ */ y(
157
157
  "div",
158
158
  {
159
159
  ref: n,
@@ -162,9 +162,9 @@ const Tl = pe.forwardRef(({ className: e, ...t }, n) => /* @__PURE__ */ w(
162
162
  }
163
163
  ));
164
164
  Tl.displayName = "CardDescription";
165
- const xr = pe.forwardRef(({ className: e, ...t }, n) => /* @__PURE__ */ w("div", { ref: n, className: j("p-6 pt-0", e), ...t }));
165
+ const xr = pe.forwardRef(({ className: e, ...t }, n) => /* @__PURE__ */ y("div", { ref: n, className: j("p-6 pt-0", e), ...t }));
166
166
  xr.displayName = "CardContent";
167
- const vr = pe.forwardRef(({ className: e, ...t }, n) => /* @__PURE__ */ w(
167
+ const vr = pe.forwardRef(({ className: e, ...t }, n) => /* @__PURE__ */ y(
168
168
  "div",
169
169
  {
170
170
  ref: n,
@@ -175,7 +175,7 @@ const vr = pe.forwardRef(({ className: e, ...t }, n) => /* @__PURE__ */ w(
175
175
  vr.displayName = "CardFooter";
176
176
  const Ho = dn(void 0);
177
177
  function Vo(e) {
178
- return /* @__PURE__ */ w(
178
+ return /* @__PURE__ */ y(
179
179
  Ho.Provider,
180
180
  {
181
181
  value: {
@@ -200,7 +200,7 @@ const kr = () => {
200
200
  className: j("relative overflow-hidden", e),
201
201
  ...r,
202
202
  children: [
203
- /* @__PURE__ */ w(
203
+ /* @__PURE__ */ y(
204
204
  Ze.Viewport,
205
205
  {
206
206
  className: "h-full w-full rounded-[inherit]",
@@ -208,13 +208,13 @@ const kr = () => {
208
208
  children: t
209
209
  }
210
210
  ),
211
- /* @__PURE__ */ w(Wo, {}),
212
- /* @__PURE__ */ w(Ze.Corner, {})
211
+ /* @__PURE__ */ y(Wo, {}),
212
+ /* @__PURE__ */ y(Ze.Corner, {})
213
213
  ]
214
214
  }
215
215
  ));
216
216
  $o.displayName = Ze.Root.displayName;
217
- const Wo = pe.forwardRef(({ className: e, orientation: t = "vertical", ...n }, r) => /* @__PURE__ */ w(
217
+ const Wo = pe.forwardRef(({ className: e, orientation: t = "vertical", ...n }, r) => /* @__PURE__ */ y(
218
218
  Ze.ScrollAreaScrollbar,
219
219
  {
220
220
  ref: r,
@@ -226,11 +226,11 @@ const Wo = pe.forwardRef(({ className: e, orientation: t = "vertical", ...n }, r
226
226
  e
227
227
  ),
228
228
  ...n,
229
- children: /* @__PURE__ */ w(Ze.ScrollAreaThumb, { className: "relative flex-1 rounded-full bg-border" })
229
+ children: /* @__PURE__ */ y(Ze.ScrollAreaThumb, { className: "relative flex-1 rounded-full bg-border" })
230
230
  }
231
231
  ));
232
232
  Wo.displayName = Ze.ScrollAreaScrollbar.displayName;
233
- const Nl = Pe.Root, Rl = Pe.Portal, Go = pe.forwardRef(({ className: e, ...t }, n) => /* @__PURE__ */ w(
233
+ const Nl = Pe.Root, Rl = Pe.Portal, Go = pe.forwardRef(({ className: e, ...t }, n) => /* @__PURE__ */ y(
234
234
  Pe.Overlay,
235
235
  {
236
236
  ref: n,
@@ -243,7 +243,7 @@ const Nl = Pe.Root, Rl = Pe.Portal, Go = pe.forwardRef(({ className: e, ...t },
243
243
  ));
244
244
  Go.displayName = Pe.Overlay.displayName;
245
245
  const Ko = pe.forwardRef(({ className: e, children: t, ...n }, r) => /* @__PURE__ */ B(Rl, { children: [
246
- /* @__PURE__ */ w(Go, {}),
246
+ /* @__PURE__ */ y(Go, {}),
247
247
  /* @__PURE__ */ B(
248
248
  Pe.Content,
249
249
  {
@@ -256,15 +256,15 @@ const Ko = pe.forwardRef(({ className: e, children: t, ...n }, r) => /* @__PURE_
256
256
  children: [
257
257
  t,
258
258
  /* @__PURE__ */ B(Pe.Close, { className: "absolute right-4 top-4 rounded-sm opacity-70 ring-offset-background transition-opacity hover:opacity-100 focus:outline-none focus:ring-2 focus:ring-ring focus:ring-offset-2 disabled:pointer-events-none data-[state=open]:bg-accent data-[state=open]:text-muted-foreground bg-white/90", children: [
259
- /* @__PURE__ */ w(gr, { className: "h-4 w-4" }),
260
- /* @__PURE__ */ w("span", { className: "sr-only", children: "Close" })
259
+ /* @__PURE__ */ y(gr, { className: "h-4 w-4" }),
260
+ /* @__PURE__ */ y("span", { className: "sr-only", children: "Close" })
261
261
  ] })
262
262
  ]
263
263
  }
264
264
  )
265
265
  ] }));
266
266
  Ko.displayName = Pe.Content.displayName;
267
- const Yo = pe.forwardRef(({ className: e, ...t }, n) => /* @__PURE__ */ w(
267
+ const Yo = pe.forwardRef(({ className: e, ...t }, n) => /* @__PURE__ */ y(
268
268
  Pe.Title,
269
269
  {
270
270
  ref: n,
@@ -276,7 +276,7 @@ const Yo = pe.forwardRef(({ className: e, ...t }, n) => /* @__PURE__ */ w(
276
276
  }
277
277
  ));
278
278
  Yo.displayName = Pe.Title.displayName;
279
- const Jo = pe.forwardRef(({ className: e, ...t }, n) => /* @__PURE__ */ w(
279
+ const Jo = pe.forwardRef(({ className: e, ...t }, n) => /* @__PURE__ */ y(
280
280
  Pe.Description,
281
281
  {
282
282
  ref: n,
@@ -290,7 +290,7 @@ function Ol({
290
290
  children: e,
291
291
  ...t
292
292
  }) {
293
- return /* @__PURE__ */ w(Qo.Provider, { value: t, children: e });
293
+ return /* @__PURE__ */ y(Qo.Provider, { value: t, children: e });
294
294
  }
295
295
  function mn() {
296
296
  const e = pn(Qo);
@@ -341,7 +341,7 @@ function Xo({ isWaiting: e = !1, ...t }) {
341
341
  }
342
342
  }, [a, s, e]), re(() => {
343
343
  a && r?.();
344
- }, [a]), /* @__PURE__ */ w(
344
+ }, [a]), /* @__PURE__ */ y(
345
345
  "div",
346
346
  {
347
347
  className: j(
@@ -349,7 +349,7 @@ function Xo({ isWaiting: e = !1, ...t }) {
349
349
  n
350
350
  ),
351
351
  ...i,
352
- children: /* @__PURE__ */ w(o, {})
352
+ children: /* @__PURE__ */ y(o, {})
353
353
  }
354
354
  );
355
355
  }
@@ -1561,59 +1561,59 @@ function ac() {
1561
1561
  di = 1;
1562
1562
  var e = /\/\*[^*]*\*+([^/*][^*]*\*+)*\//g, t = /\n/g, n = /^\s*/, r = /^(\*?[-#/*\\\w]+(\[[0-9a-z_-]+\])?)\s*/, i = /^:\s*/, o = /^((?:'(?:\\'|.)*?'|"(?:\\"|.)*?"|\([^)]*?\)|[^};])+)/, a = /^[;\s]*/, s = /^\s+|\s+$/g, l = `
1563
1563
  `, c = "/", u = "*", f = "", p = "comment", d = "declaration";
1564
- function h(v, y) {
1564
+ function h(v, w) {
1565
1565
  if (typeof v != "string")
1566
1566
  throw new TypeError("First argument must be a string");
1567
1567
  if (!v) return [];
1568
- y = y || {};
1569
- var _ = 1, k = 1;
1570
- function L(R) {
1568
+ w = w || {};
1569
+ var _ = 1, S = 1;
1570
+ function O(R) {
1571
1571
  var A = R.match(t);
1572
1572
  A && (_ += A.length);
1573
1573
  var U = R.lastIndexOf(l);
1574
- k = ~U ? R.length - U : k + R.length;
1574
+ S = ~U ? R.length - U : S + R.length;
1575
1575
  }
1576
1576
  function N() {
1577
- var R = { line: _, column: k };
1577
+ var R = { line: _, column: S };
1578
1578
  return function(A) {
1579
- return A.position = new S(R), z(), A;
1579
+ return A.position = new k(R), M(), A;
1580
1580
  };
1581
1581
  }
1582
- function S(R) {
1583
- this.start = R, this.end = { line: _, column: k }, this.source = y.source;
1582
+ function k(R) {
1583
+ this.start = R, this.end = { line: _, column: S }, this.source = w.source;
1584
1584
  }
1585
- S.prototype.content = v;
1586
- function M(R) {
1585
+ k.prototype.content = v;
1586
+ function z(R) {
1587
1587
  var A = new Error(
1588
- y.source + ":" + _ + ":" + k + ": " + R
1588
+ w.source + ":" + _ + ":" + S + ": " + R
1589
1589
  );
1590
- if (A.reason = R, A.filename = y.source, A.line = _, A.column = k, A.source = v, !y.silent) throw A;
1590
+ if (A.reason = R, A.filename = w.source, A.line = _, A.column = S, A.source = v, !w.silent) throw A;
1591
1591
  }
1592
1592
  function P(R) {
1593
1593
  var A = R.exec(v);
1594
1594
  if (A) {
1595
1595
  var U = A[0];
1596
- return L(U), v = v.slice(U.length), A;
1596
+ return O(U), v = v.slice(U.length), A;
1597
1597
  }
1598
1598
  }
1599
- function z() {
1599
+ function M() {
1600
1600
  P(n);
1601
1601
  }
1602
1602
  function x(R) {
1603
1603
  var A;
1604
- for (R = R || []; A = C(); )
1604
+ for (R = R || []; A = E(); )
1605
1605
  A !== !1 && R.push(A);
1606
1606
  return R;
1607
1607
  }
1608
- function C() {
1608
+ function E() {
1609
1609
  var R = N();
1610
1610
  if (!(c != v.charAt(0) || u != v.charAt(1))) {
1611
1611
  for (var A = 2; f != v.charAt(A) && (u != v.charAt(A) || c != v.charAt(A + 1)); )
1612
1612
  ++A;
1613
1613
  if (A += 2, f === v.charAt(A - 1))
1614
- return M("End of comment missing");
1614
+ return z("End of comment missing");
1615
1615
  var U = v.slice(2, A - 2);
1616
- return k += 2, L(U), v = v.slice(A), k += 2, R({
1616
+ return S += 2, O(U), v = v.slice(A), S += 2, R({
1617
1617
  type: p,
1618
1618
  comment: U
1619
1619
  });
@@ -1622,7 +1622,7 @@ function ac() {
1622
1622
  function I() {
1623
1623
  var R = N(), A = P(r);
1624
1624
  if (A) {
1625
- if (C(), !P(i)) return M("property missing ':'");
1625
+ if (E(), !P(i)) return z("property missing ':'");
1626
1626
  var U = P(o), q = R({
1627
1627
  type: d,
1628
1628
  property: b(A[0].replace(e, f)),
@@ -1638,7 +1638,7 @@ function ac() {
1638
1638
  A !== !1 && (R.push(A), x(R));
1639
1639
  return R;
1640
1640
  }
1641
- return z(), D();
1641
+ return M(), D();
1642
1642
  }
1643
1643
  function b(v) {
1644
1644
  return v ? v.replace(s, f) : f;
@@ -4439,109 +4439,109 @@ function Hc(e) {
4439
4439
  const t = this, n = [];
4440
4440
  let r = 0, i, o, a;
4441
4441
  return s;
4442
- function s(k) {
4442
+ function s(S) {
4443
4443
  if (r < n.length) {
4444
- const L = n[r];
4445
- return t.containerState = L[1], e.attempt(L[0].continuation, l, c)(k);
4444
+ const O = n[r];
4445
+ return t.containerState = O[1], e.attempt(O[0].continuation, l, c)(S);
4446
4446
  }
4447
- return c(k);
4447
+ return c(S);
4448
4448
  }
4449
- function l(k) {
4449
+ function l(S) {
4450
4450
  if (r++, t.containerState._closeFlow) {
4451
4451
  t.containerState._closeFlow = void 0, i && _();
4452
- const L = t.events.length;
4453
- let N = L, S;
4452
+ const O = t.events.length;
4453
+ let N = O, k;
4454
4454
  for (; N--; )
4455
4455
  if (t.events[N][0] === "exit" && t.events[N][1].type === "chunkFlow") {
4456
- S = t.events[N][1].end;
4456
+ k = t.events[N][1].end;
4457
4457
  break;
4458
4458
  }
4459
- y(r);
4460
- let M = L;
4461
- for (; M < t.events.length; )
4462
- t.events[M][1].end = {
4463
- ...S
4464
- }, M++;
4465
- return Ee(t.events, N + 1, 0, t.events.slice(L)), t.events.length = M, c(k);
4459
+ w(r);
4460
+ let z = O;
4461
+ for (; z < t.events.length; )
4462
+ t.events[z][1].end = {
4463
+ ...k
4464
+ }, z++;
4465
+ return Ee(t.events, N + 1, 0, t.events.slice(O)), t.events.length = z, c(S);
4466
4466
  }
4467
- return s(k);
4467
+ return s(S);
4468
4468
  }
4469
- function c(k) {
4469
+ function c(S) {
4470
4470
  if (r === n.length) {
4471
4471
  if (!i)
4472
- return p(k);
4472
+ return p(S);
4473
4473
  if (i.currentConstruct && i.currentConstruct.concrete)
4474
- return h(k);
4474
+ return h(S);
4475
4475
  t.interrupt = !!(i.currentConstruct && !i._gfmTableDynamicInterruptHack);
4476
4476
  }
4477
- return t.containerState = {}, e.check(vi, u, f)(k);
4477
+ return t.containerState = {}, e.check(vi, u, f)(S);
4478
4478
  }
4479
- function u(k) {
4480
- return i && _(), y(r), p(k);
4479
+ function u(S) {
4480
+ return i && _(), w(r), p(S);
4481
4481
  }
4482
- function f(k) {
4483
- return t.parser.lazy[t.now().line] = r !== n.length, a = t.now().offset, h(k);
4482
+ function f(S) {
4483
+ return t.parser.lazy[t.now().line] = r !== n.length, a = t.now().offset, h(S);
4484
4484
  }
4485
- function p(k) {
4486
- return t.containerState = {}, e.attempt(vi, d, h)(k);
4485
+ function p(S) {
4486
+ return t.containerState = {}, e.attempt(vi, d, h)(S);
4487
4487
  }
4488
- function d(k) {
4489
- return r++, n.push([t.currentConstruct, t.containerState]), p(k);
4488
+ function d(S) {
4489
+ return r++, n.push([t.currentConstruct, t.containerState]), p(S);
4490
4490
  }
4491
- function h(k) {
4492
- if (k === null) {
4493
- i && _(), y(0), e.consume(k);
4491
+ function h(S) {
4492
+ if (S === null) {
4493
+ i && _(), w(0), e.consume(S);
4494
4494
  return;
4495
4495
  }
4496
4496
  return i = i || t.parser.flow(t.now()), e.enter("chunkFlow", {
4497
4497
  _tokenizer: i,
4498
4498
  contentType: "flow",
4499
4499
  previous: o
4500
- }), b(k);
4500
+ }), b(S);
4501
4501
  }
4502
- function b(k) {
4503
- if (k === null) {
4504
- v(e.exit("chunkFlow"), !0), y(0), e.consume(k);
4502
+ function b(S) {
4503
+ if (S === null) {
4504
+ v(e.exit("chunkFlow"), !0), w(0), e.consume(S);
4505
4505
  return;
4506
4506
  }
4507
- return F(k) ? (e.consume(k), v(e.exit("chunkFlow")), r = 0, t.interrupt = void 0, s) : (e.consume(k), b);
4507
+ return F(S) ? (e.consume(S), v(e.exit("chunkFlow")), r = 0, t.interrupt = void 0, s) : (e.consume(S), b);
4508
4508
  }
4509
- function v(k, L) {
4510
- const N = t.sliceStream(k);
4511
- if (L && N.push(null), k.previous = o, o && (o.next = k), o = k, i.defineSkip(k.start), i.write(N), t.parser.lazy[k.start.line]) {
4512
- let S = i.events.length;
4513
- for (; S--; )
4509
+ function v(S, O) {
4510
+ const N = t.sliceStream(S);
4511
+ if (O && N.push(null), S.previous = o, o && (o.next = S), o = S, i.defineSkip(S.start), i.write(N), t.parser.lazy[S.start.line]) {
4512
+ let k = i.events.length;
4513
+ for (; k--; )
4514
4514
  if (
4515
4515
  // The token starts before the line ending…
4516
- i.events[S][1].start.offset < a && // …and either is not ended yet…
4517
- (!i.events[S][1].end || // …or ends after it.
4518
- i.events[S][1].end.offset > a)
4516
+ i.events[k][1].start.offset < a && // …and either is not ended yet…
4517
+ (!i.events[k][1].end || // …or ends after it.
4518
+ i.events[k][1].end.offset > a)
4519
4519
  )
4520
4520
  return;
4521
- const M = t.events.length;
4522
- let P = M, z, x;
4521
+ const z = t.events.length;
4522
+ let P = z, M, x;
4523
4523
  for (; P--; )
4524
4524
  if (t.events[P][0] === "exit" && t.events[P][1].type === "chunkFlow") {
4525
- if (z) {
4525
+ if (M) {
4526
4526
  x = t.events[P][1].end;
4527
4527
  break;
4528
4528
  }
4529
- z = !0;
4529
+ M = !0;
4530
4530
  }
4531
- for (y(r), S = M; S < t.events.length; )
4532
- t.events[S][1].end = {
4531
+ for (w(r), k = z; k < t.events.length; )
4532
+ t.events[k][1].end = {
4533
4533
  ...x
4534
- }, S++;
4535
- Ee(t.events, P + 1, 0, t.events.slice(M)), t.events.length = S;
4534
+ }, k++;
4535
+ Ee(t.events, P + 1, 0, t.events.slice(z)), t.events.length = k;
4536
4536
  }
4537
4537
  }
4538
- function y(k) {
4539
- let L = n.length;
4540
- for (; L-- > k; ) {
4541
- const N = n[L];
4538
+ function w(S) {
4539
+ let O = n.length;
4540
+ for (; O-- > S; ) {
4541
+ const N = n[O];
4542
4542
  t.containerState = N[1], N[0].exit.call(t, e);
4543
4543
  }
4544
- n.length = k;
4544
+ n.length = S;
4545
4545
  }
4546
4546
  function _() {
4547
4547
  i.write([null]), o = void 0, i = void 0, t.containerState._closeFlow = void 0;
@@ -4784,67 +4784,67 @@ function tu(e, t, n) {
4784
4784
  };
4785
4785
  let o = 0, a = 0, s;
4786
4786
  return l;
4787
- function l(S) {
4788
- return c(S);
4787
+ function l(k) {
4788
+ return c(k);
4789
4789
  }
4790
- function c(S) {
4791
- const M = r.events[r.events.length - 1];
4792
- return o = M && M[1].type === "linePrefix" ? M[2].sliceSerialize(M[1], !0).length : 0, s = S, e.enter("codeFenced"), e.enter("codeFencedFence"), e.enter("codeFencedFenceSequence"), u(S);
4790
+ function c(k) {
4791
+ const z = r.events[r.events.length - 1];
4792
+ return o = z && z[1].type === "linePrefix" ? z[2].sliceSerialize(z[1], !0).length : 0, s = k, e.enter("codeFenced"), e.enter("codeFencedFence"), e.enter("codeFencedFenceSequence"), u(k);
4793
4793
  }
4794
- function u(S) {
4795
- return S === s ? (a++, e.consume(S), u) : a < 3 ? n(S) : (e.exit("codeFencedFenceSequence"), G(S) ? Y(e, f, "whitespace")(S) : f(S));
4794
+ function u(k) {
4795
+ return k === s ? (a++, e.consume(k), u) : a < 3 ? n(k) : (e.exit("codeFencedFenceSequence"), G(k) ? Y(e, f, "whitespace")(k) : f(k));
4796
4796
  }
4797
- function f(S) {
4798
- return S === null || F(S) ? (e.exit("codeFencedFence"), r.interrupt ? t(S) : e.check(Si, b, L)(S)) : (e.enter("codeFencedFenceInfo"), e.enter("chunkString", {
4797
+ function f(k) {
4798
+ return k === null || F(k) ? (e.exit("codeFencedFence"), r.interrupt ? t(k) : e.check(Si, b, O)(k)) : (e.enter("codeFencedFenceInfo"), e.enter("chunkString", {
4799
4799
  contentType: "string"
4800
- }), p(S));
4800
+ }), p(k));
4801
4801
  }
4802
- function p(S) {
4803
- return S === null || F(S) ? (e.exit("chunkString"), e.exit("codeFencedFenceInfo"), f(S)) : G(S) ? (e.exit("chunkString"), e.exit("codeFencedFenceInfo"), Y(e, d, "whitespace")(S)) : S === 96 && S === s ? n(S) : (e.consume(S), p);
4802
+ function p(k) {
4803
+ return k === null || F(k) ? (e.exit("chunkString"), e.exit("codeFencedFenceInfo"), f(k)) : G(k) ? (e.exit("chunkString"), e.exit("codeFencedFenceInfo"), Y(e, d, "whitespace")(k)) : k === 96 && k === s ? n(k) : (e.consume(k), p);
4804
4804
  }
4805
- function d(S) {
4806
- return S === null || F(S) ? f(S) : (e.enter("codeFencedFenceMeta"), e.enter("chunkString", {
4805
+ function d(k) {
4806
+ return k === null || F(k) ? f(k) : (e.enter("codeFencedFenceMeta"), e.enter("chunkString", {
4807
4807
  contentType: "string"
4808
- }), h(S));
4808
+ }), h(k));
4809
4809
  }
4810
- function h(S) {
4811
- return S === null || F(S) ? (e.exit("chunkString"), e.exit("codeFencedFenceMeta"), f(S)) : S === 96 && S === s ? n(S) : (e.consume(S), h);
4810
+ function h(k) {
4811
+ return k === null || F(k) ? (e.exit("chunkString"), e.exit("codeFencedFenceMeta"), f(k)) : k === 96 && k === s ? n(k) : (e.consume(k), h);
4812
4812
  }
4813
- function b(S) {
4814
- return e.attempt(i, L, v)(S);
4813
+ function b(k) {
4814
+ return e.attempt(i, O, v)(k);
4815
4815
  }
4816
- function v(S) {
4817
- return e.enter("lineEnding"), e.consume(S), e.exit("lineEnding"), y;
4816
+ function v(k) {
4817
+ return e.enter("lineEnding"), e.consume(k), e.exit("lineEnding"), w;
4818
4818
  }
4819
- function y(S) {
4820
- return o > 0 && G(S) ? Y(e, _, "linePrefix", o + 1)(S) : _(S);
4819
+ function w(k) {
4820
+ return o > 0 && G(k) ? Y(e, _, "linePrefix", o + 1)(k) : _(k);
4821
4821
  }
4822
- function _(S) {
4823
- return S === null || F(S) ? e.check(Si, b, L)(S) : (e.enter("codeFlowValue"), k(S));
4822
+ function _(k) {
4823
+ return k === null || F(k) ? e.check(Si, b, O)(k) : (e.enter("codeFlowValue"), S(k));
4824
4824
  }
4825
- function k(S) {
4826
- return S === null || F(S) ? (e.exit("codeFlowValue"), _(S)) : (e.consume(S), k);
4825
+ function S(k) {
4826
+ return k === null || F(k) ? (e.exit("codeFlowValue"), _(k)) : (e.consume(k), S);
4827
4827
  }
4828
- function L(S) {
4829
- return e.exit("codeFenced"), t(S);
4828
+ function O(k) {
4829
+ return e.exit("codeFenced"), t(k);
4830
4830
  }
4831
- function N(S, M, P) {
4832
- let z = 0;
4831
+ function N(k, z, P) {
4832
+ let M = 0;
4833
4833
  return x;
4834
4834
  function x(A) {
4835
- return S.enter("lineEnding"), S.consume(A), S.exit("lineEnding"), C;
4835
+ return k.enter("lineEnding"), k.consume(A), k.exit("lineEnding"), E;
4836
4836
  }
4837
- function C(A) {
4838
- return S.enter("codeFencedFence"), G(A) ? Y(S, I, "linePrefix", r.parser.constructs.disable.null.includes("codeIndented") ? void 0 : 4)(A) : I(A);
4837
+ function E(A) {
4838
+ return k.enter("codeFencedFence"), G(A) ? Y(k, I, "linePrefix", r.parser.constructs.disable.null.includes("codeIndented") ? void 0 : 4)(A) : I(A);
4839
4839
  }
4840
4840
  function I(A) {
4841
- return A === s ? (S.enter("codeFencedFenceSequence"), D(A)) : P(A);
4841
+ return A === s ? (k.enter("codeFencedFenceSequence"), D(A)) : P(A);
4842
4842
  }
4843
4843
  function D(A) {
4844
- return A === s ? (z++, S.consume(A), D) : z >= a ? (S.exit("codeFencedFenceSequence"), G(A) ? Y(S, R, "whitespace")(A) : R(A)) : P(A);
4844
+ return A === s ? (M++, k.consume(A), D) : M >= a ? (k.exit("codeFencedFenceSequence"), G(A) ? Y(k, R, "whitespace")(A) : R(A)) : P(A);
4845
4845
  }
4846
4846
  function R(A) {
4847
- return A === null || F(A) ? (S.exit("codeFencedFence"), M(A)) : P(A);
4847
+ return A === null || F(A) ? (k.exit("codeFencedFence"), z(A)) : P(A);
4848
4848
  }
4849
4849
  }
4850
4850
  }
@@ -5151,8 +5151,8 @@ function fu(e, t) {
5151
5151
  // Find a void token that includes a break.
5152
5152
  s[p][0] === "exit" && s[p - 1][0] === "enter" && s[p][1].type === s[p - 1][1].type && s[p][1].start.line !== s[p][1].end.line && (b = p + 1, v.push(b), d._tokenizer = void 0, d.previous = void 0, d = d.next);
5153
5153
  for (a.events = [], d ? (d._tokenizer = void 0, d.previous = void 0) : v.pop(), p = v.length; p--; ) {
5154
- const y = s.slice(v[p], v[p + 1]), _ = o.pop();
5155
- l.push([_, _ + y.length - 1]), e.splice(_, 2, y);
5154
+ const w = s.slice(v[p], v[p + 1]), _ = o.pop();
5155
+ l.push([_, _ + w.length - 1]), e.splice(_, 2, w);
5156
5156
  }
5157
5157
  for (l.reverse(), p = -1; ++p < l.length; )
5158
5158
  c[h + l[p][0]] = h + l[p][1], h += l[p][1] - l[p][0] - 1;
@@ -5206,27 +5206,27 @@ function va(e, t, n, r, i, o, a, s, l) {
5206
5206
  const c = l || Number.POSITIVE_INFINITY;
5207
5207
  let u = 0;
5208
5208
  return f;
5209
- function f(y) {
5210
- return y === 60 ? (e.enter(r), e.enter(i), e.enter(o), e.consume(y), e.exit(o), p) : y === null || y === 32 || y === 41 || cn(y) ? n(y) : (e.enter(r), e.enter(a), e.enter(s), e.enter("chunkString", {
5209
+ function f(w) {
5210
+ return w === 60 ? (e.enter(r), e.enter(i), e.enter(o), e.consume(w), e.exit(o), p) : w === null || w === 32 || w === 41 || cn(w) ? n(w) : (e.enter(r), e.enter(a), e.enter(s), e.enter("chunkString", {
5211
5211
  contentType: "string"
5212
- }), b(y));
5212
+ }), b(w));
5213
5213
  }
5214
- function p(y) {
5215
- return y === 62 ? (e.enter(o), e.consume(y), e.exit(o), e.exit(i), e.exit(r), t) : (e.enter(s), e.enter("chunkString", {
5214
+ function p(w) {
5215
+ return w === 62 ? (e.enter(o), e.consume(w), e.exit(o), e.exit(i), e.exit(r), t) : (e.enter(s), e.enter("chunkString", {
5216
5216
  contentType: "string"
5217
- }), d(y));
5217
+ }), d(w));
5218
5218
  }
5219
- function d(y) {
5220
- return y === 62 ? (e.exit("chunkString"), e.exit(s), p(y)) : y === null || y === 60 || F(y) ? n(y) : (e.consume(y), y === 92 ? h : d);
5219
+ function d(w) {
5220
+ return w === 62 ? (e.exit("chunkString"), e.exit(s), p(w)) : w === null || w === 60 || F(w) ? n(w) : (e.consume(w), w === 92 ? h : d);
5221
5221
  }
5222
- function h(y) {
5223
- return y === 60 || y === 62 || y === 92 ? (e.consume(y), d) : d(y);
5222
+ function h(w) {
5223
+ return w === 60 || w === 62 || w === 92 ? (e.consume(w), d) : d(w);
5224
5224
  }
5225
- function b(y) {
5226
- return !u && (y === null || y === 41 || Z(y)) ? (e.exit("chunkString"), e.exit(s), e.exit(a), e.exit(r), t(y)) : u < c && y === 40 ? (e.consume(y), u++, b) : y === 41 ? (e.consume(y), u--, b) : y === null || y === 32 || y === 40 || cn(y) ? n(y) : (e.consume(y), y === 92 ? v : b);
5225
+ function b(w) {
5226
+ return !u && (w === null || w === 41 || Z(w)) ? (e.exit("chunkString"), e.exit(s), e.exit(a), e.exit(r), t(w)) : u < c && w === 40 ? (e.consume(w), u++, b) : w === 41 ? (e.consume(w), u--, b) : w === null || w === 32 || w === 40 || cn(w) ? n(w) : (e.consume(w), w === 92 ? v : b);
5227
5227
  }
5228
- function v(y) {
5229
- return y === 40 || y === 41 || y === 92 ? (e.consume(y), b) : b(y);
5228
+ function v(w) {
5229
+ return w === 40 || w === 41 || w === 92 ? (e.consume(w), b) : b(w);
5230
5230
  }
5231
5231
  }
5232
5232
  function ka(e, t, n, r, i, o) {
@@ -5514,42 +5514,42 @@ function Ru(e, t, n) {
5514
5514
  function v(g) {
5515
5515
  if (g === null || g === 47 || g === 62 || Z(g)) {
5516
5516
  const J = g === 47, me = a.toLowerCase();
5517
- return !J && !o && Ci.includes(me) ? (i = 1, r.interrupt ? t(g) : I(g)) : _u.includes(a.toLowerCase()) ? (i = 6, J ? (e.consume(g), y) : r.interrupt ? t(g) : I(g)) : (i = 7, r.interrupt && !r.parser.lazy[r.now().line] ? n(g) : o ? _(g) : k(g));
5517
+ return !J && !o && Ci.includes(me) ? (i = 1, r.interrupt ? t(g) : I(g)) : _u.includes(a.toLowerCase()) ? (i = 6, J ? (e.consume(g), w) : r.interrupt ? t(g) : I(g)) : (i = 7, r.interrupt && !r.parser.lazy[r.now().line] ? n(g) : o ? _(g) : S(g));
5518
5518
  }
5519
5519
  return g === 45 || de(g) ? (e.consume(g), a += String.fromCharCode(g), v) : n(g);
5520
5520
  }
5521
- function y(g) {
5521
+ function w(g) {
5522
5522
  return g === 62 ? (e.consume(g), r.interrupt ? t : I) : n(g);
5523
5523
  }
5524
5524
  function _(g) {
5525
5525
  return G(g) ? (e.consume(g), _) : x(g);
5526
5526
  }
5527
- function k(g) {
5528
- return g === 47 ? (e.consume(g), x) : g === 58 || g === 95 || ye(g) ? (e.consume(g), L) : G(g) ? (e.consume(g), k) : x(g);
5527
+ function S(g) {
5528
+ return g === 47 ? (e.consume(g), x) : g === 58 || g === 95 || ye(g) ? (e.consume(g), O) : G(g) ? (e.consume(g), S) : x(g);
5529
5529
  }
5530
- function L(g) {
5531
- return g === 45 || g === 46 || g === 58 || g === 95 || de(g) ? (e.consume(g), L) : N(g);
5530
+ function O(g) {
5531
+ return g === 45 || g === 46 || g === 58 || g === 95 || de(g) ? (e.consume(g), O) : N(g);
5532
5532
  }
5533
5533
  function N(g) {
5534
- return g === 61 ? (e.consume(g), S) : G(g) ? (e.consume(g), N) : k(g);
5534
+ return g === 61 ? (e.consume(g), k) : G(g) ? (e.consume(g), N) : S(g);
5535
5535
  }
5536
- function S(g) {
5537
- return g === null || g === 60 || g === 61 || g === 62 || g === 96 ? n(g) : g === 34 || g === 39 ? (e.consume(g), l = g, M) : G(g) ? (e.consume(g), S) : P(g);
5536
+ function k(g) {
5537
+ return g === null || g === 60 || g === 61 || g === 62 || g === 96 ? n(g) : g === 34 || g === 39 ? (e.consume(g), l = g, z) : G(g) ? (e.consume(g), k) : P(g);
5538
5538
  }
5539
- function M(g) {
5540
- return g === l ? (e.consume(g), l = null, z) : g === null || F(g) ? n(g) : (e.consume(g), M);
5539
+ function z(g) {
5540
+ return g === l ? (e.consume(g), l = null, M) : g === null || F(g) ? n(g) : (e.consume(g), z);
5541
5541
  }
5542
5542
  function P(g) {
5543
5543
  return g === null || g === 34 || g === 39 || g === 47 || g === 60 || g === 61 || g === 62 || g === 96 || Z(g) ? N(g) : (e.consume(g), P);
5544
5544
  }
5545
- function z(g) {
5546
- return g === 47 || g === 62 || G(g) ? k(g) : n(g);
5545
+ function M(g) {
5546
+ return g === 47 || g === 62 || G(g) ? S(g) : n(g);
5547
5547
  }
5548
5548
  function x(g) {
5549
- return g === 62 ? (e.consume(g), C) : n(g);
5549
+ return g === 62 ? (e.consume(g), E) : n(g);
5550
5550
  }
5551
- function C(g) {
5552
- return g === null || F(g) ? I(g) : G(g) ? (e.consume(g), C) : n(g);
5551
+ function E(g) {
5552
+ return g === null || F(g) ? I(g) : G(g) ? (e.consume(g), E) : n(g);
5553
5553
  }
5554
5554
  function I(g) {
5555
5555
  return g === 45 && i === 2 ? (e.consume(g), U) : g === 60 && i === 1 ? (e.consume(g), q) : g === 62 && i === 4 ? (e.consume(g), ae) : g === 63 && i === 3 ? (e.consume(g), m) : g === 93 && i === 5 ? (e.consume(g), ne) : F(g) && (i === 6 || i === 7) ? (e.exit("htmlFlowData"), e.check(Iu, Ne, D)(g)) : g === null || F(g) ? (e.exit("htmlFlowData"), D(g)) : (e.consume(g), I);
@@ -5617,7 +5617,7 @@ function Pu(e, t, n) {
5617
5617
  return e.enter("htmlText"), e.enter("htmlTextData"), e.consume(m), l;
5618
5618
  }
5619
5619
  function l(m) {
5620
- return m === 33 ? (e.consume(m), c) : m === 47 ? (e.consume(m), N) : m === 63 ? (e.consume(m), k) : ye(m) ? (e.consume(m), P) : n(m);
5620
+ return m === 33 ? (e.consume(m), c) : m === 47 ? (e.consume(m), N) : m === 63 ? (e.consume(m), S) : ye(m) ? (e.consume(m), P) : n(m);
5621
5621
  }
5622
5622
  function c(m) {
5623
5623
  return m === 45 ? (e.consume(m), u) : m === 91 ? (e.consume(m), o = 0, h) : ye(m) ? (e.consume(m), _) : n(m);
@@ -5642,40 +5642,40 @@ function Pu(e, t, n) {
5642
5642
  return m === null ? n(m) : m === 93 ? (e.consume(m), v) : F(m) ? (a = b, q(m)) : (e.consume(m), b);
5643
5643
  }
5644
5644
  function v(m) {
5645
- return m === 93 ? (e.consume(m), y) : b(m);
5645
+ return m === 93 ? (e.consume(m), w) : b(m);
5646
5646
  }
5647
- function y(m) {
5648
- return m === 62 ? U(m) : m === 93 ? (e.consume(m), y) : b(m);
5647
+ function w(m) {
5648
+ return m === 62 ? U(m) : m === 93 ? (e.consume(m), w) : b(m);
5649
5649
  }
5650
5650
  function _(m) {
5651
5651
  return m === null || m === 62 ? U(m) : F(m) ? (a = _, q(m)) : (e.consume(m), _);
5652
5652
  }
5653
- function k(m) {
5654
- return m === null ? n(m) : m === 63 ? (e.consume(m), L) : F(m) ? (a = k, q(m)) : (e.consume(m), k);
5653
+ function S(m) {
5654
+ return m === null ? n(m) : m === 63 ? (e.consume(m), O) : F(m) ? (a = S, q(m)) : (e.consume(m), S);
5655
5655
  }
5656
- function L(m) {
5657
- return m === 62 ? U(m) : k(m);
5656
+ function O(m) {
5657
+ return m === 62 ? U(m) : S(m);
5658
5658
  }
5659
5659
  function N(m) {
5660
- return ye(m) ? (e.consume(m), S) : n(m);
5660
+ return ye(m) ? (e.consume(m), k) : n(m);
5661
5661
  }
5662
- function S(m) {
5663
- return m === 45 || de(m) ? (e.consume(m), S) : M(m);
5662
+ function k(m) {
5663
+ return m === 45 || de(m) ? (e.consume(m), k) : z(m);
5664
5664
  }
5665
- function M(m) {
5666
- return F(m) ? (a = M, q(m)) : G(m) ? (e.consume(m), M) : U(m);
5665
+ function z(m) {
5666
+ return F(m) ? (a = z, q(m)) : G(m) ? (e.consume(m), z) : U(m);
5667
5667
  }
5668
5668
  function P(m) {
5669
- return m === 45 || de(m) ? (e.consume(m), P) : m === 47 || m === 62 || Z(m) ? z(m) : n(m);
5669
+ return m === 45 || de(m) ? (e.consume(m), P) : m === 47 || m === 62 || Z(m) ? M(m) : n(m);
5670
5670
  }
5671
- function z(m) {
5672
- return m === 47 ? (e.consume(m), U) : m === 58 || m === 95 || ye(m) ? (e.consume(m), x) : F(m) ? (a = z, q(m)) : G(m) ? (e.consume(m), z) : U(m);
5671
+ function M(m) {
5672
+ return m === 47 ? (e.consume(m), U) : m === 58 || m === 95 || ye(m) ? (e.consume(m), x) : F(m) ? (a = M, q(m)) : G(m) ? (e.consume(m), M) : U(m);
5673
5673
  }
5674
5674
  function x(m) {
5675
- return m === 45 || m === 46 || m === 58 || m === 95 || de(m) ? (e.consume(m), x) : C(m);
5675
+ return m === 45 || m === 46 || m === 58 || m === 95 || de(m) ? (e.consume(m), x) : E(m);
5676
5676
  }
5677
- function C(m) {
5678
- return m === 61 ? (e.consume(m), I) : F(m) ? (a = C, q(m)) : G(m) ? (e.consume(m), C) : z(m);
5677
+ function E(m) {
5678
+ return m === 61 ? (e.consume(m), I) : F(m) ? (a = E, q(m)) : G(m) ? (e.consume(m), E) : M(m);
5679
5679
  }
5680
5680
  function I(m) {
5681
5681
  return m === null || m === 60 || m === 61 || m === 62 || m === 96 ? n(m) : m === 34 || m === 39 ? (e.consume(m), i = m, D) : F(m) ? (a = I, q(m)) : G(m) ? (e.consume(m), I) : (e.consume(m), R);
@@ -5684,10 +5684,10 @@ function Pu(e, t, n) {
5684
5684
  return m === i ? (e.consume(m), i = void 0, A) : m === null ? n(m) : F(m) ? (a = D, q(m)) : (e.consume(m), D);
5685
5685
  }
5686
5686
  function R(m) {
5687
- return m === null || m === 34 || m === 39 || m === 60 || m === 61 || m === 96 ? n(m) : m === 47 || m === 62 || Z(m) ? z(m) : (e.consume(m), R);
5687
+ return m === null || m === 34 || m === 39 || m === 60 || m === 61 || m === 96 ? n(m) : m === 47 || m === 62 || Z(m) ? M(m) : (e.consume(m), R);
5688
5688
  }
5689
5689
  function A(m) {
5690
- return m === 47 || m === 62 || Z(m) ? z(m) : n(m);
5690
+ return m === 47 || m === 62 || Z(m) ? M(m) : n(m);
5691
5691
  }
5692
5692
  function U(m) {
5693
5693
  return m === 62 ? (e.consume(m), e.exit("htmlTextData"), e.exit("htmlText"), t) : n(m);
@@ -6233,12 +6233,12 @@ function Sf(e, t, n) {
6233
6233
  const i = {}, o = [];
6234
6234
  let a = [], s = [];
6235
6235
  const l = {
6236
- attempt: M(N),
6237
- check: M(S),
6236
+ attempt: z(N),
6237
+ check: z(k),
6238
6238
  consume: _,
6239
- enter: k,
6240
- exit: L,
6241
- interrupt: M(S, {
6239
+ enter: S,
6240
+ exit: O,
6241
+ interrupt: z(k, {
6242
6242
  interrupt: !0
6243
6243
  })
6244
6244
  }, c = {
@@ -6255,69 +6255,69 @@ function Sf(e, t, n) {
6255
6255
  };
6256
6256
  let u = t.tokenize.call(c, l);
6257
6257
  return t.resolveAll && o.push(t), c;
6258
- function f(C) {
6259
- return a = Ie(a, C), v(), a[a.length - 1] !== null ? [] : (P(t, 0), c.events = bn(o, c.events, c), c.events);
6258
+ function f(E) {
6259
+ return a = Ie(a, E), v(), a[a.length - 1] !== null ? [] : (P(t, 0), c.events = bn(o, c.events, c), c.events);
6260
6260
  }
6261
- function p(C, I) {
6262
- return Cf(d(C), I);
6261
+ function p(E, I) {
6262
+ return Cf(d(E), I);
6263
6263
  }
6264
- function d(C) {
6265
- return Ef(a, C);
6264
+ function d(E) {
6265
+ return Ef(a, E);
6266
6266
  }
6267
6267
  function h() {
6268
6268
  const {
6269
- _bufferIndex: C,
6269
+ _bufferIndex: E,
6270
6270
  _index: I,
6271
6271
  line: D,
6272
6272
  column: R,
6273
6273
  offset: A
6274
6274
  } = r;
6275
6275
  return {
6276
- _bufferIndex: C,
6276
+ _bufferIndex: E,
6277
6277
  _index: I,
6278
6278
  line: D,
6279
6279
  column: R,
6280
6280
  offset: A
6281
6281
  };
6282
6282
  }
6283
- function b(C) {
6284
- i[C.line] = C.column, x();
6283
+ function b(E) {
6284
+ i[E.line] = E.column, x();
6285
6285
  }
6286
6286
  function v() {
6287
- let C;
6287
+ let E;
6288
6288
  for (; r._index < a.length; ) {
6289
6289
  const I = a[r._index];
6290
6290
  if (typeof I == "string")
6291
- for (C = r._index, r._bufferIndex < 0 && (r._bufferIndex = 0); r._index === C && r._bufferIndex < I.length; )
6292
- y(I.charCodeAt(r._bufferIndex));
6291
+ for (E = r._index, r._bufferIndex < 0 && (r._bufferIndex = 0); r._index === E && r._bufferIndex < I.length; )
6292
+ w(I.charCodeAt(r._bufferIndex));
6293
6293
  else
6294
- y(I);
6294
+ w(I);
6295
6295
  }
6296
6296
  }
6297
- function y(C) {
6298
- u = u(C);
6297
+ function w(E) {
6298
+ u = u(E);
6299
6299
  }
6300
- function _(C) {
6301
- F(C) ? (r.line++, r.column = 1, r.offset += C === -3 ? 2 : 1, x()) : C !== -1 && (r.column++, r.offset++), r._bufferIndex < 0 ? r._index++ : (r._bufferIndex++, r._bufferIndex === // Points w/ non-negative `_bufferIndex` reference
6300
+ function _(E) {
6301
+ F(E) ? (r.line++, r.column = 1, r.offset += E === -3 ? 2 : 1, x()) : E !== -1 && (r.column++, r.offset++), r._bufferIndex < 0 ? r._index++ : (r._bufferIndex++, r._bufferIndex === // Points w/ non-negative `_bufferIndex` reference
6302
6302
  // strings.
6303
6303
  /** @type {string} */
6304
- a[r._index].length && (r._bufferIndex = -1, r._index++)), c.previous = C;
6304
+ a[r._index].length && (r._bufferIndex = -1, r._index++)), c.previous = E;
6305
6305
  }
6306
- function k(C, I) {
6306
+ function S(E, I) {
6307
6307
  const D = I || {};
6308
- return D.type = C, D.start = h(), c.events.push(["enter", D, c]), s.push(D), D;
6308
+ return D.type = E, D.start = h(), c.events.push(["enter", D, c]), s.push(D), D;
6309
6309
  }
6310
- function L(C) {
6310
+ function O(E) {
6311
6311
  const I = s.pop();
6312
6312
  return I.end = h(), c.events.push(["exit", I, c]), I;
6313
6313
  }
6314
- function N(C, I) {
6315
- P(C, I.from);
6314
+ function N(E, I) {
6315
+ P(E, I.from);
6316
6316
  }
6317
- function S(C, I) {
6317
+ function k(E, I) {
6318
6318
  I.restore();
6319
6319
  }
6320
- function M(C, I) {
6320
+ function z(E, I) {
6321
6321
  return D;
6322
6322
  function D(R, A, U) {
6323
6323
  let q, H, ne, m;
@@ -6349,7 +6349,7 @@ function Sf(e, t, n) {
6349
6349
  function g(se) {
6350
6350
  return Ke;
6351
6351
  function Ke(Re) {
6352
- return m = z(), ne = se, se.partial || (c.currentConstruct = se), se.name && c.parser.constructs.disable.null.includes(se.name) ? me() : se.tokenize.call(
6352
+ return m = M(), ne = se, se.partial || (c.currentConstruct = se), se.name && c.parser.constructs.disable.null.includes(se.name) ? me() : se.tokenize.call(
6353
6353
  // If we do have fields, create an object w/ `context` as its
6354
6354
  // prototype.
6355
6355
  // This allows a “live binding”, which is needed for `interrupt`.
@@ -6361,24 +6361,24 @@ function Sf(e, t, n) {
6361
6361
  }
6362
6362
  }
6363
6363
  function J(se) {
6364
- return C(ne, m), A;
6364
+ return E(ne, m), A;
6365
6365
  }
6366
6366
  function me(se) {
6367
6367
  return m.restore(), ++H < q.length ? g(q[H]) : U;
6368
6368
  }
6369
6369
  }
6370
6370
  }
6371
- function P(C, I) {
6372
- C.resolveAll && !o.includes(C) && o.push(C), C.resolve && Ee(c.events, I, c.events.length - I, C.resolve(c.events.slice(I), c)), C.resolveTo && (c.events = C.resolveTo(c.events, c));
6371
+ function P(E, I) {
6372
+ E.resolveAll && !o.includes(E) && o.push(E), E.resolve && Ee(c.events, I, c.events.length - I, E.resolve(c.events.slice(I), c)), E.resolveTo && (c.events = E.resolveTo(c.events, c));
6373
6373
  }
6374
- function z() {
6375
- const C = h(), I = c.previous, D = c.currentConstruct, R = c.events.length, A = Array.from(s);
6374
+ function M() {
6375
+ const E = h(), I = c.previous, D = c.currentConstruct, R = c.events.length, A = Array.from(s);
6376
6376
  return {
6377
6377
  from: R,
6378
6378
  restore: U
6379
6379
  };
6380
6380
  function U() {
6381
- r = C, c.previous = I, c.currentConstruct = D, c.events.length = R, s = A, x();
6381
+ r = E, c.previous = I, c.currentConstruct = D, c.events.length = R, s = A, x();
6382
6382
  }
6383
6383
  }
6384
6384
  function x() {
@@ -6525,20 +6525,20 @@ function Lf(e) {
6525
6525
  canContainEols: ["emphasis", "fragment", "heading", "paragraph", "strong"],
6526
6526
  enter: {
6527
6527
  autolink: o(oi),
6528
- autolinkProtocol: z,
6529
- autolinkEmail: z,
6528
+ autolinkProtocol: M,
6529
+ autolinkEmail: M,
6530
6530
  atxHeading: o(ni),
6531
6531
  blockQuote: o(rt),
6532
- characterEscape: z,
6533
- characterReference: z,
6532
+ characterEscape: M,
6533
+ characterReference: M,
6534
6534
  codeFenced: o($t),
6535
6535
  codeFencedFenceInfo: a,
6536
6536
  codeFencedFenceMeta: a,
6537
6537
  codeIndented: o($t, a),
6538
6538
  codeText: o(Qs, a),
6539
- codeTextData: z,
6540
- data: z,
6541
- codeFlowValue: z,
6539
+ codeTextData: M,
6540
+ data: M,
6541
+ codeFlowValue: M,
6542
6542
  definition: o(Xs),
6543
6543
  definitionDestinationString: a,
6544
6544
  definitionLabelString: a,
@@ -6547,9 +6547,9 @@ function Lf(e) {
6547
6547
  hardBreakEscape: o(ri),
6548
6548
  hardBreakTrailing: o(ri),
6549
6549
  htmlFlow: o(ii, a),
6550
- htmlFlowData: z,
6550
+ htmlFlowData: M,
6551
6551
  htmlText: o(ii, a),
6552
- htmlTextData: z,
6552
+ htmlTextData: M,
6553
6553
  image: o(el),
6554
6554
  label: a,
6555
6555
  link: o(oi),
@@ -6583,14 +6583,14 @@ function Lf(e) {
6583
6583
  codeFencedFenceInfo: d,
6584
6584
  codeFencedFenceMeta: h,
6585
6585
  codeFlowValue: x,
6586
- codeIndented: l(y),
6586
+ codeIndented: l(w),
6587
6587
  codeText: l(A),
6588
6588
  codeTextData: x,
6589
6589
  data: x,
6590
6590
  definition: l(),
6591
- definitionDestinationString: L,
6591
+ definitionDestinationString: O,
6592
6592
  definitionLabelString: _,
6593
- definitionTitleString: k,
6593
+ definitionTitleString: S,
6594
6594
  emphasis: l(),
6595
6595
  hardBreakEscape: l(I),
6596
6596
  hardBreakTrailing: l(I),
@@ -6601,7 +6601,7 @@ function Lf(e) {
6601
6601
  image: l(q),
6602
6602
  label: ne,
6603
6603
  labelText: H,
6604
- lineEnding: C,
6604
+ lineEnding: E,
6605
6605
  link: l(U),
6606
6606
  listItem: l(),
6607
6607
  listOrdered: l(),
@@ -6612,8 +6612,8 @@ function Lf(e) {
6612
6612
  resourceTitleString: ae,
6613
6613
  resource: Ne,
6614
6614
  setextHeading: l(P),
6615
- setextHeadingLineSequence: M,
6616
- setextHeadingText: S,
6615
+ setextHeadingLineSequence: z,
6616
+ setextHeadingText: k,
6617
6617
  strong: l(),
6618
6618
  thematicBreak: l()
6619
6619
  }
@@ -6621,13 +6621,13 @@ function Lf(e) {
6621
6621
  Aa(t, (e || {}).mdastExtensions || []);
6622
6622
  const n = {};
6623
6623
  return r;
6624
- function r(E) {
6625
- let O = {
6624
+ function r(C) {
6625
+ let L = {
6626
6626
  type: "root",
6627
6627
  children: []
6628
6628
  };
6629
6629
  const V = {
6630
- stack: [O],
6630
+ stack: [L],
6631
6631
  tokenStack: [],
6632
6632
  config: t,
6633
6633
  enter: s,
@@ -6637,43 +6637,43 @@ function Lf(e) {
6637
6637
  data: n
6638
6638
  }, K = [];
6639
6639
  let X = -1;
6640
- for (; ++X < E.length; )
6641
- if (E[X][1].type === "listOrdered" || E[X][1].type === "listUnordered")
6642
- if (E[X][0] === "enter")
6640
+ for (; ++X < C.length; )
6641
+ if (C[X][1].type === "listOrdered" || C[X][1].type === "listUnordered")
6642
+ if (C[X][0] === "enter")
6643
6643
  K.push(X);
6644
6644
  else {
6645
6645
  const Oe = K.pop();
6646
- X = i(E, Oe, X);
6646
+ X = i(C, Oe, X);
6647
6647
  }
6648
- for (X = -1; ++X < E.length; ) {
6649
- const Oe = t[E[X][0]];
6650
- _a.call(Oe, E[X][1].type) && Oe[E[X][1].type].call(Object.assign({
6651
- sliceSerialize: E[X][2].sliceSerialize
6652
- }, V), E[X][1]);
6648
+ for (X = -1; ++X < C.length; ) {
6649
+ const Oe = t[C[X][0]];
6650
+ _a.call(Oe, C[X][1].type) && Oe[C[X][1].type].call(Object.assign({
6651
+ sliceSerialize: C[X][2].sliceSerialize
6652
+ }, V), C[X][1]);
6653
6653
  }
6654
6654
  if (V.tokenStack.length > 0) {
6655
6655
  const Oe = V.tokenStack[V.tokenStack.length - 1];
6656
6656
  (Oe[1] || Ii).call(V, void 0, Oe[0]);
6657
6657
  }
6658
- for (O.position = {
6659
- start: Ve(E.length > 0 ? E[0][1].start : {
6658
+ for (L.position = {
6659
+ start: Ve(C.length > 0 ? C[0][1].start : {
6660
6660
  line: 1,
6661
6661
  column: 1,
6662
6662
  offset: 0
6663
6663
  }),
6664
- end: Ve(E.length > 0 ? E[E.length - 2][1].end : {
6664
+ end: Ve(C.length > 0 ? C[C.length - 2][1].end : {
6665
6665
  line: 1,
6666
6666
  column: 1,
6667
6667
  offset: 0
6668
6668
  })
6669
6669
  }, X = -1; ++X < t.transforms.length; )
6670
- O = t.transforms[X](O) || O;
6671
- return O;
6670
+ L = t.transforms[X](L) || L;
6671
+ return L;
6672
6672
  }
6673
- function i(E, O, V) {
6674
- let K = O - 1, X = -1, Oe = !1, Ye, Ue, wt, xt;
6673
+ function i(C, L, V) {
6674
+ let K = L - 1, X = -1, Oe = !1, Ye, Ue, wt, xt;
6675
6675
  for (; ++K <= V; ) {
6676
- const ve = E[K];
6676
+ const ve = C[K];
6677
6677
  switch (ve[1].type) {
6678
6678
  case "listUnordered":
6679
6679
  case "listOrdered":
@@ -6698,13 +6698,13 @@ function Lf(e) {
6698
6698
  if (Ye) {
6699
6699
  let it = K;
6700
6700
  for (Ue = void 0; it--; ) {
6701
- const Be = E[it];
6701
+ const Be = C[it];
6702
6702
  if (Be[1].type === "lineEnding" || Be[1].type === "lineEndingBlank") {
6703
6703
  if (Be[0] === "exit") continue;
6704
- Ue && (E[Ue][1].type = "lineEndingBlank", Oe = !0), Be[1].type = "lineEnding", Ue = it;
6704
+ Ue && (C[Ue][1].type = "lineEndingBlank", Oe = !0), Be[1].type = "lineEnding", Ue = it;
6705
6705
  } else if (!(Be[1].type === "linePrefix" || Be[1].type === "blockQuotePrefix" || Be[1].type === "blockQuotePrefixWhitespace" || Be[1].type === "blockQuoteMarker" || Be[1].type === "listItemIndent")) break;
6706
6706
  }
6707
- wt && (!Ue || wt < Ue) && (Ye._spread = !0), Ye.end = Object.assign({}, Ue ? E[Ue][1].start : ve[1].end), E.splice(Ue || K, 0, ["exit", Ye, ve[2]]), K++, V++;
6707
+ wt && (!Ue || wt < Ue) && (Ye._spread = !0), Ye.end = Object.assign({}, Ue ? C[Ue][1].start : ve[1].end), C.splice(Ue || K, 0, ["exit", Ye, ve[2]]), K++, V++;
6708
6708
  }
6709
6709
  if (ve[1].type === "listItemPrefix") {
6710
6710
  const it = {
@@ -6714,16 +6714,16 @@ function Lf(e) {
6714
6714
  // @ts-expect-error: we’ll add `end` in a second.
6715
6715
  end: void 0
6716
6716
  };
6717
- Ye = it, E.splice(K, 0, ["enter", it, ve[2]]), K++, V++, wt = void 0, xt = !0;
6717
+ Ye = it, C.splice(K, 0, ["enter", it, ve[2]]), K++, V++, wt = void 0, xt = !0;
6718
6718
  }
6719
6719
  }
6720
6720
  }
6721
- return E[O][1]._spread = Oe, V;
6721
+ return C[L][1]._spread = Oe, V;
6722
6722
  }
6723
- function o(E, O) {
6723
+ function o(C, L) {
6724
6724
  return V;
6725
6725
  function V(K) {
6726
- s.call(this, E(K), K), O && O.call(this, K);
6726
+ s.call(this, C(K), K), L && L.call(this, K);
6727
6727
  }
6728
6728
  }
6729
6729
  function a() {
@@ -6732,28 +6732,28 @@ function Lf(e) {
6732
6732
  children: []
6733
6733
  });
6734
6734
  }
6735
- function s(E, O, V) {
6736
- this.stack[this.stack.length - 1].children.push(E), this.stack.push(E), this.tokenStack.push([O, V || void 0]), E.position = {
6737
- start: Ve(O.start),
6735
+ function s(C, L, V) {
6736
+ this.stack[this.stack.length - 1].children.push(C), this.stack.push(C), this.tokenStack.push([L, V || void 0]), C.position = {
6737
+ start: Ve(L.start),
6738
6738
  // @ts-expect-error: `end` will be patched later.
6739
6739
  end: void 0
6740
6740
  };
6741
6741
  }
6742
- function l(E) {
6743
- return O;
6744
- function O(V) {
6745
- E && E.call(this, V), c.call(this, V);
6742
+ function l(C) {
6743
+ return L;
6744
+ function L(V) {
6745
+ C && C.call(this, V), c.call(this, V);
6746
6746
  }
6747
6747
  }
6748
- function c(E, O) {
6748
+ function c(C, L) {
6749
6749
  const V = this.stack.pop(), K = this.tokenStack.pop();
6750
6750
  if (K)
6751
- K[0].type !== E.type && (O ? O.call(this, E, K[0]) : (K[1] || Ii).call(this, E, K[0]));
6752
- else throw new Error("Cannot close `" + E.type + "` (" + Tt({
6753
- start: E.start,
6754
- end: E.end
6751
+ K[0].type !== C.type && (L ? L.call(this, C, K[0]) : (K[1] || Ii).call(this, C, K[0]));
6752
+ else throw new Error("Cannot close `" + C.type + "` (" + Tt({
6753
+ start: C.start,
6754
+ end: C.end
6755
6755
  }) + "): it’s not open");
6756
- V.position.end = Ve(E.end);
6756
+ V.position.end = Ve(C.end);
6757
6757
  }
6758
6758
  function u() {
6759
6759
  return Nr(this.stack.pop());
@@ -6761,134 +6761,134 @@ function Lf(e) {
6761
6761
  function f() {
6762
6762
  this.data.expectingFirstListItemValue = !0;
6763
6763
  }
6764
- function p(E) {
6764
+ function p(C) {
6765
6765
  if (this.data.expectingFirstListItemValue) {
6766
- const O = this.stack[this.stack.length - 2];
6767
- O.start = Number.parseInt(this.sliceSerialize(E), 10), this.data.expectingFirstListItemValue = void 0;
6766
+ const L = this.stack[this.stack.length - 2];
6767
+ L.start = Number.parseInt(this.sliceSerialize(C), 10), this.data.expectingFirstListItemValue = void 0;
6768
6768
  }
6769
6769
  }
6770
6770
  function d() {
6771
- const E = this.resume(), O = this.stack[this.stack.length - 1];
6772
- O.lang = E;
6771
+ const C = this.resume(), L = this.stack[this.stack.length - 1];
6772
+ L.lang = C;
6773
6773
  }
6774
6774
  function h() {
6775
- const E = this.resume(), O = this.stack[this.stack.length - 1];
6776
- O.meta = E;
6775
+ const C = this.resume(), L = this.stack[this.stack.length - 1];
6776
+ L.meta = C;
6777
6777
  }
6778
6778
  function b() {
6779
6779
  this.data.flowCodeInside || (this.buffer(), this.data.flowCodeInside = !0);
6780
6780
  }
6781
6781
  function v() {
6782
- const E = this.resume(), O = this.stack[this.stack.length - 1];
6783
- O.value = E.replace(/^(\r?\n|\r)|(\r?\n|\r)$/g, ""), this.data.flowCodeInside = void 0;
6782
+ const C = this.resume(), L = this.stack[this.stack.length - 1];
6783
+ L.value = C.replace(/^(\r?\n|\r)|(\r?\n|\r)$/g, ""), this.data.flowCodeInside = void 0;
6784
6784
  }
6785
- function y() {
6786
- const E = this.resume(), O = this.stack[this.stack.length - 1];
6787
- O.value = E.replace(/(\r?\n|\r)$/g, "");
6785
+ function w() {
6786
+ const C = this.resume(), L = this.stack[this.stack.length - 1];
6787
+ L.value = C.replace(/(\r?\n|\r)$/g, "");
6788
6788
  }
6789
- function _(E) {
6790
- const O = this.resume(), V = this.stack[this.stack.length - 1];
6791
- V.label = O, V.identifier = De(this.sliceSerialize(E)).toLowerCase();
6789
+ function _(C) {
6790
+ const L = this.resume(), V = this.stack[this.stack.length - 1];
6791
+ V.label = L, V.identifier = De(this.sliceSerialize(C)).toLowerCase();
6792
6792
  }
6793
- function k() {
6794
- const E = this.resume(), O = this.stack[this.stack.length - 1];
6795
- O.title = E;
6796
- }
6797
- function L() {
6798
- const E = this.resume(), O = this.stack[this.stack.length - 1];
6799
- O.url = E;
6800
- }
6801
- function N(E) {
6802
- const O = this.stack[this.stack.length - 1];
6803
- if (!O.depth) {
6804
- const V = this.sliceSerialize(E).length;
6805
- O.depth = V;
6793
+ function S() {
6794
+ const C = this.resume(), L = this.stack[this.stack.length - 1];
6795
+ L.title = C;
6796
+ }
6797
+ function O() {
6798
+ const C = this.resume(), L = this.stack[this.stack.length - 1];
6799
+ L.url = C;
6800
+ }
6801
+ function N(C) {
6802
+ const L = this.stack[this.stack.length - 1];
6803
+ if (!L.depth) {
6804
+ const V = this.sliceSerialize(C).length;
6805
+ L.depth = V;
6806
6806
  }
6807
6807
  }
6808
- function S() {
6808
+ function k() {
6809
6809
  this.data.setextHeadingSlurpLineEnding = !0;
6810
6810
  }
6811
- function M(E) {
6812
- const O = this.stack[this.stack.length - 1];
6813
- O.depth = this.sliceSerialize(E).codePointAt(0) === 61 ? 1 : 2;
6811
+ function z(C) {
6812
+ const L = this.stack[this.stack.length - 1];
6813
+ L.depth = this.sliceSerialize(C).codePointAt(0) === 61 ? 1 : 2;
6814
6814
  }
6815
6815
  function P() {
6816
6816
  this.data.setextHeadingSlurpLineEnding = void 0;
6817
6817
  }
6818
- function z(E) {
6818
+ function M(C) {
6819
6819
  const V = this.stack[this.stack.length - 1].children;
6820
6820
  let K = V[V.length - 1];
6821
6821
  (!K || K.type !== "text") && (K = il(), K.position = {
6822
- start: Ve(E.start),
6822
+ start: Ve(C.start),
6823
6823
  // @ts-expect-error: we’ll add `end` later.
6824
6824
  end: void 0
6825
6825
  }, V.push(K)), this.stack.push(K);
6826
6826
  }
6827
- function x(E) {
6828
- const O = this.stack.pop();
6829
- O.value += this.sliceSerialize(E), O.position.end = Ve(E.end);
6827
+ function x(C) {
6828
+ const L = this.stack.pop();
6829
+ L.value += this.sliceSerialize(C), L.position.end = Ve(C.end);
6830
6830
  }
6831
- function C(E) {
6832
- const O = this.stack[this.stack.length - 1];
6831
+ function E(C) {
6832
+ const L = this.stack[this.stack.length - 1];
6833
6833
  if (this.data.atHardBreak) {
6834
- const V = O.children[O.children.length - 1];
6835
- V.position.end = Ve(E.end), this.data.atHardBreak = void 0;
6834
+ const V = L.children[L.children.length - 1];
6835
+ V.position.end = Ve(C.end), this.data.atHardBreak = void 0;
6836
6836
  return;
6837
6837
  }
6838
- !this.data.setextHeadingSlurpLineEnding && t.canContainEols.includes(O.type) && (z.call(this, E), x.call(this, E));
6838
+ !this.data.setextHeadingSlurpLineEnding && t.canContainEols.includes(L.type) && (M.call(this, C), x.call(this, C));
6839
6839
  }
6840
6840
  function I() {
6841
6841
  this.data.atHardBreak = !0;
6842
6842
  }
6843
6843
  function D() {
6844
- const E = this.resume(), O = this.stack[this.stack.length - 1];
6845
- O.value = E;
6844
+ const C = this.resume(), L = this.stack[this.stack.length - 1];
6845
+ L.value = C;
6846
6846
  }
6847
6847
  function R() {
6848
- const E = this.resume(), O = this.stack[this.stack.length - 1];
6849
- O.value = E;
6848
+ const C = this.resume(), L = this.stack[this.stack.length - 1];
6849
+ L.value = C;
6850
6850
  }
6851
6851
  function A() {
6852
- const E = this.resume(), O = this.stack[this.stack.length - 1];
6853
- O.value = E;
6852
+ const C = this.resume(), L = this.stack[this.stack.length - 1];
6853
+ L.value = C;
6854
6854
  }
6855
6855
  function U() {
6856
- const E = this.stack[this.stack.length - 1];
6856
+ const C = this.stack[this.stack.length - 1];
6857
6857
  if (this.data.inReference) {
6858
- const O = this.data.referenceType || "shortcut";
6859
- E.type += "Reference", E.referenceType = O, delete E.url, delete E.title;
6858
+ const L = this.data.referenceType || "shortcut";
6859
+ C.type += "Reference", C.referenceType = L, delete C.url, delete C.title;
6860
6860
  } else
6861
- delete E.identifier, delete E.label;
6861
+ delete C.identifier, delete C.label;
6862
6862
  this.data.referenceType = void 0;
6863
6863
  }
6864
6864
  function q() {
6865
- const E = this.stack[this.stack.length - 1];
6865
+ const C = this.stack[this.stack.length - 1];
6866
6866
  if (this.data.inReference) {
6867
- const O = this.data.referenceType || "shortcut";
6868
- E.type += "Reference", E.referenceType = O, delete E.url, delete E.title;
6867
+ const L = this.data.referenceType || "shortcut";
6868
+ C.type += "Reference", C.referenceType = L, delete C.url, delete C.title;
6869
6869
  } else
6870
- delete E.identifier, delete E.label;
6870
+ delete C.identifier, delete C.label;
6871
6871
  this.data.referenceType = void 0;
6872
6872
  }
6873
- function H(E) {
6874
- const O = this.sliceSerialize(E), V = this.stack[this.stack.length - 2];
6875
- V.label = Nf(O), V.identifier = De(O).toLowerCase();
6873
+ function H(C) {
6874
+ const L = this.sliceSerialize(C), V = this.stack[this.stack.length - 2];
6875
+ V.label = Nf(L), V.identifier = De(L).toLowerCase();
6876
6876
  }
6877
6877
  function ne() {
6878
- const E = this.stack[this.stack.length - 1], O = this.resume(), V = this.stack[this.stack.length - 1];
6878
+ const C = this.stack[this.stack.length - 1], L = this.resume(), V = this.stack[this.stack.length - 1];
6879
6879
  if (this.data.inReference = !0, V.type === "link") {
6880
- const K = E.children;
6880
+ const K = C.children;
6881
6881
  V.children = K;
6882
6882
  } else
6883
- V.alt = O;
6883
+ V.alt = L;
6884
6884
  }
6885
6885
  function m() {
6886
- const E = this.resume(), O = this.stack[this.stack.length - 1];
6887
- O.url = E;
6886
+ const C = this.resume(), L = this.stack[this.stack.length - 1];
6887
+ L.url = C;
6888
6888
  }
6889
6889
  function ae() {
6890
- const E = this.resume(), O = this.stack[this.stack.length - 1];
6891
- O.title = E;
6890
+ const C = this.resume(), L = this.stack[this.stack.length - 1];
6891
+ L.title = C;
6892
6892
  }
6893
6893
  function Ne() {
6894
6894
  this.data.inReference = void 0;
@@ -6896,33 +6896,33 @@ function Lf(e) {
6896
6896
  function g() {
6897
6897
  this.data.referenceType = "collapsed";
6898
6898
  }
6899
- function J(E) {
6900
- const O = this.resume(), V = this.stack[this.stack.length - 1];
6901
- V.label = O, V.identifier = De(this.sliceSerialize(E)).toLowerCase(), this.data.referenceType = "full";
6899
+ function J(C) {
6900
+ const L = this.resume(), V = this.stack[this.stack.length - 1];
6901
+ V.label = L, V.identifier = De(this.sliceSerialize(C)).toLowerCase(), this.data.referenceType = "full";
6902
6902
  }
6903
- function me(E) {
6904
- this.data.characterReferenceType = E.type;
6903
+ function me(C) {
6904
+ this.data.characterReferenceType = C.type;
6905
6905
  }
6906
- function se(E) {
6907
- const O = this.sliceSerialize(E), V = this.data.characterReferenceType;
6906
+ function se(C) {
6907
+ const L = this.sliceSerialize(C), V = this.data.characterReferenceType;
6908
6908
  let K;
6909
- V ? (K = ga(O, V === "characterReferenceMarkerNumeric" ? 10 : 16), this.data.characterReferenceType = void 0) : K = Rr(O);
6909
+ V ? (K = ga(L, V === "characterReferenceMarkerNumeric" ? 10 : 16), this.data.characterReferenceType = void 0) : K = Rr(L);
6910
6910
  const X = this.stack[this.stack.length - 1];
6911
6911
  X.value += K;
6912
6912
  }
6913
- function Ke(E) {
6914
- const O = this.stack.pop();
6915
- O.position.end = Ve(E.end);
6913
+ function Ke(C) {
6914
+ const L = this.stack.pop();
6915
+ L.position.end = Ve(C.end);
6916
6916
  }
6917
- function Re(E) {
6918
- x.call(this, E);
6919
- const O = this.stack[this.stack.length - 1];
6920
- O.url = this.sliceSerialize(E);
6917
+ function Re(C) {
6918
+ x.call(this, C);
6919
+ const L = this.stack[this.stack.length - 1];
6920
+ L.url = this.sliceSerialize(C);
6921
6921
  }
6922
- function qe(E) {
6923
- x.call(this, E);
6924
- const O = this.stack[this.stack.length - 1];
6925
- O.url = "mailto:" + this.sliceSerialize(E);
6922
+ function qe(C) {
6923
+ x.call(this, C);
6924
+ const L = this.stack[this.stack.length - 1];
6925
+ L.url = "mailto:" + this.sliceSerialize(C);
6926
6926
  }
6927
6927
  function rt() {
6928
6928
  return {
@@ -6994,19 +6994,19 @@ function Lf(e) {
6994
6994
  children: []
6995
6995
  };
6996
6996
  }
6997
- function ai(E) {
6997
+ function ai(C) {
6998
6998
  return {
6999
6999
  type: "list",
7000
- ordered: E.type === "listOrdered",
7000
+ ordered: C.type === "listOrdered",
7001
7001
  start: null,
7002
- spread: E._spread,
7002
+ spread: C._spread,
7003
7003
  children: []
7004
7004
  };
7005
7005
  }
7006
- function tl(E) {
7006
+ function tl(C) {
7007
7007
  return {
7008
7008
  type: "listItem",
7009
- spread: E._spread,
7009
+ spread: C._spread,
7010
7010
  checked: null,
7011
7011
  children: []
7012
7012
  };
@@ -7658,13 +7658,13 @@ function hd(e) {
7658
7658
  _ && _.type === "text" ? _.value += " " : v.children.push({ type: "text", value: " " }), v.children.push(...h);
7659
7659
  } else
7660
7660
  u.push(...h);
7661
- const y = {
7661
+ const w = {
7662
7662
  type: "element",
7663
7663
  tagName: "li",
7664
7664
  properties: { id: t + "fn-" + p },
7665
7665
  children: e.wrap(u, !0)
7666
7666
  };
7667
- e.patch(c, y), s.push(y);
7667
+ e.patch(c, w), s.push(w);
7668
7668
  }
7669
7669
  if (s.length !== 0)
7670
7670
  return {
@@ -7811,13 +7811,13 @@ function Da(e, t, n, r) {
7811
7811
  if ((!t || o(l, c, u[u.length - 1] || void 0)) && (d = kd(n(l, u)), d[0] === nr))
7812
7812
  return d;
7813
7813
  if ("children" in l && l.children) {
7814
- const y = (
7814
+ const w = (
7815
7815
  /** @type {UnistParent} */
7816
7816
  l
7817
7817
  );
7818
- if (y.children && d[0] !== vd)
7819
- for (b = (r ? y.children.length : -1) + a, v = u.concat(y); b > -1 && b < y.children.length; ) {
7820
- const _ = y.children[b];
7818
+ if (w.children && d[0] !== vd)
7819
+ for (b = (r ? w.children.length : -1) + a, v = u.concat(w); b > -1 && b < w.children.length; ) {
7820
+ const _ = w.children[b];
7821
7821
  if (h = s(_, b, v)(), h[0] === nr)
7822
7822
  return h;
7823
7823
  b = typeof h[1] == "number" ? h[1] : b + a;
@@ -7865,8 +7865,8 @@ function Ed(e, t) {
7865
7865
  return d(s, u, f);
7866
7866
  if (s.options.passThrough && s.options.passThrough.includes(p)) {
7867
7867
  if ("children" in u) {
7868
- const { children: b, ...v } = u, y = Dt(v);
7869
- return y.children = s.all(u), y;
7868
+ const { children: b, ...v } = u, w = Dt(v);
7869
+ return w.children = s.all(u), w;
7870
7870
  }
7871
7871
  return Dt(u);
7872
7872
  }
@@ -7989,8 +7989,8 @@ function Nd() {
7989
7989
  return c[u];
7990
7990
  };
7991
7991
  return Tn = function l() {
7992
- var c, u, f, p, d, h, b = arguments[0], v = 1, y = arguments.length, _ = !1;
7993
- for (typeof b == "boolean" && (_ = b, b = arguments[1] || {}, v = 2), (b == null || typeof b != "object" && typeof b != "function") && (b = {}); v < y; ++v)
7992
+ var c, u, f, p, d, h, b = arguments[0], v = 1, w = arguments.length, _ = !1;
7993
+ for (typeof b == "boolean" && (_ = b, b = arguments[1] || {}, v = 2), (b == null || typeof b != "object" && typeof b != "function") && (b = {}); v < w; ++v)
7994
7994
  if (c = arguments[v], c != null)
7995
7995
  for (u in c)
7996
7996
  f = s(b, u), p = s(c, u), b !== p && (_ && p && (o(p) || (d = i(p))) ? (d ? (d = !1, h = f && i(f) ? f : []) : h = f && o(f) ? f : {}, a(b, { name: u, newValue: l(_, h, p) })) : typeof p < "u" && a(b, { name: u, newValue: p }));
@@ -9206,7 +9206,7 @@ function rp(e, t) {
9206
9206
  Fragment: We,
9207
9207
  components: i,
9208
9208
  ignoreInvalidStyle: !0,
9209
- jsx: w,
9209
+ jsx: y,
9210
9210
  jsxs: B,
9211
9211
  passKeys: !0,
9212
9212
  passNode: !0
@@ -9662,24 +9662,24 @@ function gp(e, t, n) {
9662
9662
  const f = u[u.length - 1], p = o[a][0], d = o[a][1];
9663
9663
  let h = 0;
9664
9664
  const v = f.children.indexOf(c);
9665
- let y = !1, _ = [];
9665
+ let w = !1, _ = [];
9666
9666
  p.lastIndex = 0;
9667
- let k = p.exec(c.value);
9668
- for (; k; ) {
9669
- const L = k.index, N = {
9670
- index: k.index,
9671
- input: k.input,
9667
+ let S = p.exec(c.value);
9668
+ for (; S; ) {
9669
+ const O = S.index, N = {
9670
+ index: S.index,
9671
+ input: S.input,
9672
9672
  stack: [...u, c]
9673
9673
  };
9674
- let S = d(...k, N);
9675
- if (typeof S == "string" && (S = S.length > 0 ? { type: "text", value: S } : void 0), S === !1 ? p.lastIndex = L + 1 : (h !== L && _.push({
9674
+ let k = d(...S, N);
9675
+ if (typeof k == "string" && (k = k.length > 0 ? { type: "text", value: k } : void 0), k === !1 ? p.lastIndex = O + 1 : (h !== O && _.push({
9676
9676
  type: "text",
9677
- value: c.value.slice(h, L)
9678
- }), Array.isArray(S) ? _.push(...S) : S && _.push(S), h = L + k[0].length, y = !0), !p.global)
9677
+ value: c.value.slice(h, O)
9678
+ }), Array.isArray(k) ? _.push(...k) : k && _.push(k), h = O + S[0].length, w = !0), !p.global)
9679
9679
  break;
9680
- k = p.exec(c.value);
9680
+ S = p.exec(c.value);
9681
9681
  }
9682
- return y ? (h < c.value.length && _.push({ type: "text", value: c.value.slice(h) }), f.children.splice(v, 1, ..._)) : _ = [c], v + _.length;
9682
+ return w ? (h < c.value.length && _.push({ type: "text", value: c.value.slice(h) }), f.children.splice(v, 1, ..._)) : _ = [c], v + _.length;
9683
9683
  }
9684
9684
  }
9685
9685
  function bp(e) {
@@ -9967,12 +9967,12 @@ function Qp(e, t) {
9967
9967
  let c = 0, u = -1;
9968
9968
  for (; ++u < e.length; ) {
9969
9969
  const b = [], v = [];
9970
- let y = -1;
9971
- for (e[u].length > c && (c = e[u].length); ++y < e[u].length; ) {
9972
- const _ = Xp(e[u][y]);
9970
+ let w = -1;
9971
+ for (e[u].length > c && (c = e[u].length); ++w < e[u].length; ) {
9972
+ const _ = Xp(e[u][w]);
9973
9973
  if (n.alignDelimiters !== !1) {
9974
- const k = i(_);
9975
- v[y] = k, (l[y] === void 0 || k > l[y]) && (l[y] = k);
9974
+ const S = i(_);
9975
+ v[w] = S, (l[w] === void 0 || S > l[w]) && (l[w] = S);
9976
9976
  }
9977
9977
  b.push(_);
9978
9978
  }
@@ -9991,34 +9991,34 @@ function Qp(e, t) {
9991
9991
  const p = [], d = [];
9992
9992
  for (; ++f < c; ) {
9993
9993
  const b = o[f];
9994
- let v = "", y = "";
9995
- b === 99 ? (v = ":", y = ":") : b === 108 ? v = ":" : b === 114 && (y = ":");
9994
+ let v = "", w = "";
9995
+ b === 99 ? (v = ":", w = ":") : b === 108 ? v = ":" : b === 114 && (w = ":");
9996
9996
  let _ = n.alignDelimiters === !1 ? 1 : Math.max(
9997
9997
  1,
9998
- l[f] - v.length - y.length
9998
+ l[f] - v.length - w.length
9999
9999
  );
10000
- const k = v + "-".repeat(_) + y;
10001
- n.alignDelimiters !== !1 && (_ = v.length + _ + y.length, _ > l[f] && (l[f] = _), d[f] = _), p[f] = k;
10000
+ const S = v + "-".repeat(_) + w;
10001
+ n.alignDelimiters !== !1 && (_ = v.length + _ + w.length, _ > l[f] && (l[f] = _), d[f] = _), p[f] = S;
10002
10002
  }
10003
10003
  a.splice(1, 0, p), s.splice(1, 0, d), u = -1;
10004
10004
  const h = [];
10005
10005
  for (; ++u < a.length; ) {
10006
10006
  const b = a[u], v = s[u];
10007
10007
  f = -1;
10008
- const y = [];
10008
+ const w = [];
10009
10009
  for (; ++f < c; ) {
10010
10010
  const _ = b[f] || "";
10011
- let k = "", L = "";
10011
+ let S = "", O = "";
10012
10012
  if (n.alignDelimiters !== !1) {
10013
- const N = l[f] - (v[f] || 0), S = o[f];
10014
- S === 114 ? k = " ".repeat(N) : S === 99 ? N % 2 ? (k = " ".repeat(N / 2 + 0.5), L = " ".repeat(N / 2 - 0.5)) : (k = " ".repeat(N / 2), L = k) : L = " ".repeat(N);
10013
+ const N = l[f] - (v[f] || 0), k = o[f];
10014
+ k === 114 ? S = " ".repeat(N) : k === 99 ? N % 2 ? (S = " ".repeat(N / 2 + 0.5), O = " ".repeat(N / 2 - 0.5)) : (S = " ".repeat(N / 2), O = S) : O = " ".repeat(N);
10015
10015
  }
10016
- n.delimiterStart !== !1 && !f && y.push("|"), n.padding !== !1 && // Don’t add the opening space if we’re not aligning and the cell is
10016
+ n.delimiterStart !== !1 && !f && w.push("|"), n.padding !== !1 && // Don’t add the opening space if we’re not aligning and the cell is
10017
10017
  // empty: there will be a closing space.
10018
- !(n.alignDelimiters === !1 && _ === "") && (n.delimiterStart !== !1 || f) && y.push(" "), n.alignDelimiters !== !1 && y.push(k), y.push(_), n.alignDelimiters !== !1 && y.push(L), n.padding !== !1 && y.push(" "), (n.delimiterEnd !== !1 || f !== c - 1) && y.push("|");
10018
+ !(n.alignDelimiters === !1 && _ === "") && (n.delimiterStart !== !1 || f) && w.push(" "), n.alignDelimiters !== !1 && w.push(S), w.push(_), n.alignDelimiters !== !1 && w.push(O), n.padding !== !1 && w.push(" "), (n.delimiterEnd !== !1 || f !== c - 1) && w.push("|");
10019
10019
  }
10020
10020
  h.push(
10021
- n.delimiterEnd === !1 ? y.join("").replace(/ +$/, "") : y.join("")
10021
+ n.delimiterEnd === !1 ? w.join("").replace(/ +$/, "") : w.join("")
10022
10022
  );
10023
10023
  }
10024
10024
  return h.join(`
@@ -10711,17 +10711,17 @@ function zh(e) {
10711
10711
  return c(u(d, b, v), d.align);
10712
10712
  }
10713
10713
  function s(d, h, b, v) {
10714
- const y = f(d, b, v), _ = c([y]);
10714
+ const w = f(d, b, v), _ = c([w]);
10715
10715
  return _.slice(0, _.indexOf(`
10716
10716
  `));
10717
10717
  }
10718
10718
  function l(d, h, b, v) {
10719
- const y = b.enter("tableCell"), _ = b.enter("phrasing"), k = b.containerPhrasing(d, {
10719
+ const w = b.enter("tableCell"), _ = b.enter("phrasing"), S = b.containerPhrasing(d, {
10720
10720
  ...v,
10721
10721
  before: o,
10722
10722
  after: o
10723
10723
  });
10724
- return _(), y(), k;
10724
+ return _(), w(), S;
10725
10725
  }
10726
10726
  function c(d, h) {
10727
10727
  return Qp(d, {
@@ -10736,19 +10736,19 @@ function zh(e) {
10736
10736
  }
10737
10737
  function u(d, h, b) {
10738
10738
  const v = d.children;
10739
- let y = -1;
10740
- const _ = [], k = h.enter("table");
10741
- for (; ++y < v.length; )
10742
- _[y] = f(v[y], h, b);
10743
- return k(), _;
10739
+ let w = -1;
10740
+ const _ = [], S = h.enter("table");
10741
+ for (; ++w < v.length; )
10742
+ _[w] = f(v[w], h, b);
10743
+ return S(), _;
10744
10744
  }
10745
10745
  function f(d, h, b) {
10746
10746
  const v = d.children;
10747
- let y = -1;
10748
- const _ = [], k = h.enter("tableRow");
10749
- for (; ++y < v.length; )
10750
- _[y] = l(v[y], d, h, b);
10751
- return k(), _;
10747
+ let w = -1;
10748
+ const _ = [], S = h.enter("tableRow");
10749
+ for (; ++w < v.length; )
10750
+ _[w] = l(v[w], d, h, b);
10751
+ return S(), _;
10752
10752
  }
10753
10753
  function p(d, h, b) {
10754
10754
  let v = Za.inlineCode(d, h, b);
@@ -11257,8 +11257,8 @@ function um(e) {
11257
11257
  if (h === 126)
11258
11258
  return f > 1 ? l(h) : (a.consume(h), f++, d);
11259
11259
  if (f < 2 && !n) return l(h);
11260
- const v = a.exit("strikethroughSequenceTemporary"), y = dt(h);
11261
- return v._open = !y || y === 2 && !!b, v._close = !b || b === 2 && !!y, s(h);
11260
+ const v = a.exit("strikethroughSequenceTemporary"), w = dt(h);
11261
+ return v._open = !w || w === 2 && !!b, v._close = !b || b === 2 && !!w, s(h);
11262
11262
  }
11263
11263
  }
11264
11264
  }
@@ -11366,15 +11366,15 @@ function mm(e, t, n) {
11366
11366
  let i = 0, o = 0, a;
11367
11367
  return s;
11368
11368
  function s(x) {
11369
- let C = r.events.length - 1;
11370
- for (; C > -1; ) {
11371
- const R = r.events[C][1].type;
11369
+ let E = r.events.length - 1;
11370
+ for (; E > -1; ) {
11371
+ const R = r.events[E][1].type;
11372
11372
  if (R === "lineEnding" || // Note: markdown-rs uses `whitespace` instead of `linePrefix`
11373
- R === "linePrefix") C--;
11373
+ R === "linePrefix") E--;
11374
11374
  else break;
11375
11375
  }
11376
- const I = C > -1 ? r.events[C][1].type : null, D = I === "tableHead" || I === "tableRow" ? S : l;
11377
- return D === S && r.parser.lazy[r.now().line] ? n(x) : D(x);
11376
+ const I = E > -1 ? r.events[E][1].type : null, D = I === "tableHead" || I === "tableRow" ? k : l;
11377
+ return D === k && r.parser.lazy[r.now().line] ? n(x) : D(x);
11378
11378
  }
11379
11379
  function l(x) {
11380
11380
  return e.enter("tableHead"), e.enter("tableRow"), c(x);
@@ -11401,33 +11401,33 @@ function mm(e, t, n) {
11401
11401
  return G(x) ? Y(e, v, "whitespace")(x) : v(x);
11402
11402
  }
11403
11403
  function v(x) {
11404
- return x === 58 ? (o += 1, a = !0, e.enter("tableDelimiterMarker"), e.consume(x), e.exit("tableDelimiterMarker"), y) : x === 45 ? (o += 1, y(x)) : x === null || F(x) ? L(x) : N(x);
11404
+ return x === 58 ? (o += 1, a = !0, e.enter("tableDelimiterMarker"), e.consume(x), e.exit("tableDelimiterMarker"), w) : x === 45 ? (o += 1, w(x)) : x === null || F(x) ? O(x) : N(x);
11405
11405
  }
11406
- function y(x) {
11406
+ function w(x) {
11407
11407
  return x === 45 ? (e.enter("tableDelimiterFiller"), _(x)) : N(x);
11408
11408
  }
11409
11409
  function _(x) {
11410
- return x === 45 ? (e.consume(x), _) : x === 58 ? (a = !0, e.exit("tableDelimiterFiller"), e.enter("tableDelimiterMarker"), e.consume(x), e.exit("tableDelimiterMarker"), k) : (e.exit("tableDelimiterFiller"), k(x));
11410
+ return x === 45 ? (e.consume(x), _) : x === 58 ? (a = !0, e.exit("tableDelimiterFiller"), e.enter("tableDelimiterMarker"), e.consume(x), e.exit("tableDelimiterMarker"), S) : (e.exit("tableDelimiterFiller"), S(x));
11411
11411
  }
11412
- function k(x) {
11413
- return G(x) ? Y(e, L, "whitespace")(x) : L(x);
11412
+ function S(x) {
11413
+ return G(x) ? Y(e, O, "whitespace")(x) : O(x);
11414
11414
  }
11415
- function L(x) {
11415
+ function O(x) {
11416
11416
  return x === 124 ? h(x) : x === null || F(x) ? !a || i !== o ? N(x) : (e.exit("tableDelimiterRow"), e.exit("tableHead"), t(x)) : N(x);
11417
11417
  }
11418
11418
  function N(x) {
11419
11419
  return n(x);
11420
11420
  }
11421
- function S(x) {
11422
- return e.enter("tableRow"), M(x);
11421
+ function k(x) {
11422
+ return e.enter("tableRow"), z(x);
11423
11423
  }
11424
- function M(x) {
11425
- return x === 124 ? (e.enter("tableCellDivider"), e.consume(x), e.exit("tableCellDivider"), M) : x === null || F(x) ? (e.exit("tableRow"), t(x)) : G(x) ? Y(e, M, "whitespace")(x) : (e.enter("data"), P(x));
11424
+ function z(x) {
11425
+ return x === 124 ? (e.enter("tableCellDivider"), e.consume(x), e.exit("tableCellDivider"), z) : x === null || F(x) ? (e.exit("tableRow"), t(x)) : G(x) ? Y(e, z, "whitespace")(x) : (e.enter("data"), P(x));
11426
11426
  }
11427
11427
  function P(x) {
11428
- return x === null || x === 124 || Z(x) ? (e.exit("data"), M(x)) : (e.consume(x), x === 92 ? z : P);
11428
+ return x === null || x === 124 || Z(x) ? (e.exit("data"), z(x)) : (e.consume(x), x === 92 ? M : P);
11429
11429
  }
11430
- function z(x) {
11430
+ function M(x) {
11431
11431
  return x === 92 || x === 124 ? (e.consume(x), P) : P(x);
11432
11432
  }
11433
11433
  }
@@ -11545,16 +11545,16 @@ function Sm(e) {
11545
11545
  ), n = e || km, r = t.data(), i = r.micromarkExtensions || (r.micromarkExtensions = []), o = r.fromMarkdownExtensions || (r.fromMarkdownExtensions = []), a = r.toMarkdownExtensions || (r.toMarkdownExtensions = []);
11546
11546
  i.push(vm(n)), o.push(jh()), a.push(Hh(n));
11547
11547
  }
11548
- const Em = ({ text: e }) => /* @__PURE__ */ w(
11548
+ const Em = ({ text: e }) => /* @__PURE__ */ y(
11549
11549
  ep,
11550
11550
  {
11551
11551
  remarkPlugins: [Sm],
11552
11552
  rehypePlugins: [hp],
11553
11553
  components: {
11554
- p: ({ children: n }) => /* @__PURE__ */ w("p", { className: "mb-3 last:mb-0 whitespace-pre-wrap", children: n }),
11555
- ul: ({ children: n }) => /* @__PURE__ */ w("ul", { className: "list-disc ml-5 mb-3 space-y-1", children: n }),
11556
- ol: ({ children: n }) => /* @__PURE__ */ w("ol", { className: "list-decimal ml-5 mb-3 space-y-1", children: n }),
11557
- a: ({ children: n, href: r }) => /* @__PURE__ */ w(
11554
+ p: ({ children: n }) => /* @__PURE__ */ y("p", { className: "mb-3 last:mb-0 whitespace-pre-wrap", children: n }),
11555
+ ul: ({ children: n }) => /* @__PURE__ */ y("ul", { className: "list-disc ml-5 mb-3 space-y-1", children: n }),
11556
+ ol: ({ children: n }) => /* @__PURE__ */ y("ol", { className: "list-decimal ml-5 mb-3 space-y-1", children: n }),
11557
+ a: ({ children: n, href: r }) => /* @__PURE__ */ y(
11558
11558
  "a",
11559
11559
  {
11560
11560
  href: r || "#",
@@ -11564,28 +11564,28 @@ const Em = ({ text: e }) => /* @__PURE__ */ w(
11564
11564
  children: n
11565
11565
  }
11566
11566
  ),
11567
- blockquote: ({ children: n }) => /* @__PURE__ */ w("blockquote", { className: "border-l-4 pl-3 italic text-gray-600 my-2", children: n })
11567
+ blockquote: ({ children: n }) => /* @__PURE__ */ y("blockquote", { className: "border-l-4 pl-3 italic text-gray-600 my-2", children: n })
11568
11568
  },
11569
11569
  children: e
11570
11570
  }
11571
11571
  );
11572
11572
  function Cm() {
11573
- return /* @__PURE__ */ w("div", { className: "bg-gray-100 rounded-2xl px-[12px] py-[10px]", children: /* @__PURE__ */ B("div", { className: "flex space-x-1", children: [
11574
- /* @__PURE__ */ w(
11573
+ return /* @__PURE__ */ y("div", { className: "bg-gray-100 rounded-2xl px-[12px] py-[10px]", children: /* @__PURE__ */ B("div", { className: "flex space-x-1", children: [
11574
+ /* @__PURE__ */ y(
11575
11575
  "div",
11576
11576
  {
11577
11577
  className: "w-[7px] h-[7px] bg-gray-400 rounded-full animate-bounce",
11578
11578
  style: { animationDelay: "0ms" }
11579
11579
  }
11580
11580
  ),
11581
- /* @__PURE__ */ w(
11581
+ /* @__PURE__ */ y(
11582
11582
  "div",
11583
11583
  {
11584
11584
  className: "w-[7px] h-[7px] bg-gray-400 rounded-full animate-bounce",
11585
11585
  style: { animationDelay: "150ms" }
11586
11586
  }
11587
11587
  ),
11588
- /* @__PURE__ */ w(
11588
+ /* @__PURE__ */ y(
11589
11589
  "div",
11590
11590
  {
11591
11591
  className: "w-[7px] h-[7px] bg-gray-400 rounded-full animate-bounce",
@@ -11605,23 +11605,23 @@ function eo({
11605
11605
  }) {
11606
11606
  const s = !t, [l, c] = W(!1), [u, f] = W(
11607
11607
  null
11608
- ), [p, d] = W(!1), [h, b] = W(!1), v = kr(), { collectUserFeedback: y, onMessageClick: _ } = mn(), k = !e.isWelcomeMessage && typeof _ == "function", L = jl(
11608
+ ), [p, d] = W(!1), [h, b] = W(!1), v = kr(), { collectUserFeedback: w, onMessageClick: _ } = mn(), S = !e.isWelcomeMessage && typeof _ == "function", O = jl(
11609
11609
  e.content,
11610
11610
  15,
11611
11611
  n && s
11612
11612
  ), N = j({
11613
11613
  [v.botBubbleColor]: e.sender === "assistant",
11614
11614
  [v.userBubbleColor]: e.sender === "user"
11615
- }), S = j(
11615
+ }), k = j(
11616
11616
  "text-gray-400 hover:text-primary transition-colors"
11617
- ), M = e.content === "...", P = () => n && e.isThinking ? /* @__PURE__ */ w("div", { className: "flex flex-col justify-center flex-1", children: M ? /* @__PURE__ */ w("div", { className: "ml-3", children: /* @__PURE__ */ w(Cm, {}) }) : /* @__PURE__ */ w(
11617
+ ), z = e.content === "...", P = () => n && e.isThinking ? /* @__PURE__ */ y("div", { className: "flex flex-col justify-center flex-1", children: z ? /* @__PURE__ */ y("div", { className: "ml-3", children: /* @__PURE__ */ y(Cm, {}) }) : /* @__PURE__ */ y(
11618
11618
  "p",
11619
11619
  {
11620
11620
  className: j("text-left", {
11621
11621
  "text-card-foreground ml-3": e.sender === "assistant",
11622
11622
  "text-white mr-3": e.sender === "user"
11623
11623
  }),
11624
- children: L
11624
+ children: O
11625
11625
  }
11626
11626
  ) }) : /* @__PURE__ */ B(
11627
11627
  "div",
@@ -11631,7 +11631,7 @@ function eo({
11631
11631
  role: _ && !e.isWelcomeMessage ? "button" : void 0,
11632
11632
  tabIndex: 0,
11633
11633
  children: [
11634
- !r && a && /* @__PURE__ */ w(
11634
+ !r && a && /* @__PURE__ */ y(
11635
11635
  "svg",
11636
11636
  {
11637
11637
  className: j("absolute bottom-1 right-0 h-4 w-4", {
@@ -11640,10 +11640,10 @@ function eo({
11640
11640
  }),
11641
11641
  viewBox: "0 0 10.54 11.14",
11642
11642
  fill: N,
11643
- children: /* @__PURE__ */ w("path", { d: "M5.75,0s0,.36,0,.51c-.09,4.52-5.74,10.64-5.74,10.64,8.19.02,10.54-2.26,10.54-2.26h0c-1.6-2.96-3.19-5.92-4.79-8.88Z" })
11643
+ children: /* @__PURE__ */ y("path", { d: "M5.75,0s0,.36,0,.51c-.09,4.52-5.74,10.64-5.74,10.64,8.19.02,10.54-2.26,10.54-2.26h0c-1.6-2.96-3.19-5.92-4.79-8.88Z" })
11644
11644
  }
11645
11645
  ),
11646
- /* @__PURE__ */ w(
11646
+ /* @__PURE__ */ y(
11647
11647
  "div",
11648
11648
  {
11649
11649
  className: j("relative rounded-lg px-3 py-3 min-h-[48px]", {
@@ -11655,7 +11655,7 @@ function eo({
11655
11655
  style: {
11656
11656
  backgroundColor: N
11657
11657
  },
11658
- children: e.type === "image" ? /* @__PURE__ */ w(
11658
+ children: e.type === "image" ? /* @__PURE__ */ y(
11659
11659
  "img",
11660
11660
  {
11661
11661
  src: e.content,
@@ -11663,7 +11663,7 @@ function eo({
11663
11663
  className: "max-w-full rounded-lg cursor-pointer hover:opacity-90 transition-opacity",
11664
11664
  onClick: () => c(!0)
11665
11665
  }
11666
- ) : /* @__PURE__ */ w("div", { className: "typewriter prose text-left wrap-anywhere", children: /* @__PURE__ */ w(Em, { text: L }) })
11666
+ ) : /* @__PURE__ */ y("div", { className: "typewriter prose text-left wrap-anywhere", children: /* @__PURE__ */ y(Em, { text: O }) })
11667
11667
  }
11668
11668
  )
11669
11669
  ]
@@ -11671,13 +11671,13 @@ function eo({
11671
11671
  );
11672
11672
  return /* @__PURE__ */ B(We, { children: [
11673
11673
  /* @__PURE__ */ B("div", { className: "flex flex-col flex-1 self-stretch", children: [
11674
- /* @__PURE__ */ w(
11674
+ /* @__PURE__ */ y(
11675
11675
  "div",
11676
11676
  {
11677
11677
  className: j(
11678
11678
  `flex flex-1 self-stretch ${e.sender === "user" ? "justify-end" : "justify-start"}`
11679
11679
  ),
11680
- children: /* @__PURE__ */ w(
11680
+ children: /* @__PURE__ */ y(
11681
11681
  "div",
11682
11682
  {
11683
11683
  className: j("relative flex self-stretch", {
@@ -11690,8 +11690,8 @@ function eo({
11690
11690
  )
11691
11691
  }
11692
11692
  ),
11693
- n && !e.isThinking && /* @__PURE__ */ w("div", { className: "flex items-center mt-2 space-x-4", children: /* @__PURE__ */ B(We, { children: [
11694
- o && /* @__PURE__ */ w(
11693
+ n && !e.isThinking && /* @__PURE__ */ y("div", { className: "flex items-center mt-2 space-x-4", children: /* @__PURE__ */ B(We, { children: [
11694
+ o && /* @__PURE__ */ y(
11695
11695
  "p",
11696
11696
  {
11697
11697
  className: j("hidden text-xs", {
@@ -11708,65 +11708,65 @@ function eo({
11708
11708
  }
11709
11709
  ),
11710
11710
  n && /* @__PURE__ */ B("div", { className: "inline-flex gap-2 justify-end", children: [
11711
- /* @__PURE__ */ w(
11711
+ /* @__PURE__ */ y(
11712
11712
  "button",
11713
11713
  {
11714
11714
  onClick: async () => {
11715
11715
  await navigator.clipboard.writeText(e.content), d(!0), setTimeout(() => d(!1), 2e3);
11716
11716
  },
11717
11717
  className: j(
11718
- S,
11718
+ k,
11719
11719
  p && "text-primary"
11720
11720
  ),
11721
11721
  title: "Copy message",
11722
- children: /* @__PURE__ */ w(al, { size: 16 })
11722
+ children: /* @__PURE__ */ y(al, { size: 16 })
11723
11723
  }
11724
11724
  ),
11725
- !e.isWelcomeMessage && y && /* @__PURE__ */ B(We, { children: [
11726
- /* @__PURE__ */ w(
11725
+ !e.isWelcomeMessage && w && /* @__PURE__ */ B(We, { children: [
11726
+ /* @__PURE__ */ y(
11727
11727
  "button",
11728
11728
  {
11729
11729
  onClick: () => f(u === "up" ? null : "up"),
11730
11730
  className: j(
11731
- S,
11731
+ k,
11732
11732
  u === "up" && "text-primary"
11733
11733
  ),
11734
- children: /* @__PURE__ */ w(sl, { size: 16 })
11734
+ children: /* @__PURE__ */ y(sl, { size: 16 })
11735
11735
  }
11736
11736
  ),
11737
- /* @__PURE__ */ w(
11737
+ /* @__PURE__ */ y(
11738
11738
  "button",
11739
11739
  {
11740
11740
  onClick: () => f(
11741
11741
  u === "down" ? null : "down"
11742
11742
  ),
11743
11743
  className: j(
11744
- S,
11744
+ k,
11745
11745
  u === "down" && "text-primary"
11746
11746
  ),
11747
- children: /* @__PURE__ */ w(ll, { size: 16 })
11747
+ children: /* @__PURE__ */ y(ll, { size: 16 })
11748
11748
  }
11749
11749
  )
11750
11750
  ] }),
11751
- k && /* @__PURE__ */ w(
11751
+ S && /* @__PURE__ */ y(
11752
11752
  "button",
11753
11753
  {
11754
11754
  onClick: () => {
11755
11755
  _(e), b(!0), setTimeout(() => b(!1), 2e3);
11756
11756
  },
11757
- className: j(S, {
11757
+ className: j(k, {
11758
11758
  "text-primary": h
11759
11759
  }),
11760
- children: /* @__PURE__ */ w(cl, { size: 16 })
11760
+ children: /* @__PURE__ */ y(cl, { size: 16 })
11761
11761
  }
11762
11762
  )
11763
11763
  ] })
11764
11764
  ] }) })
11765
11765
  ] }),
11766
- /* @__PURE__ */ w(Nl, { open: l, onOpenChange: c, children: /* @__PURE__ */ B(Ko, { className: "max-w-[90vw] p-0 bg-transparent border-0", children: [
11767
- /* @__PURE__ */ w(Yo, { className: "hidden" }),
11768
- /* @__PURE__ */ w(Jo, { className: "hidden" }),
11769
- /* @__PURE__ */ w(
11766
+ /* @__PURE__ */ y(Nl, { open: l, onOpenChange: c, children: /* @__PURE__ */ B(Ko, { className: "max-w-[90vw] p-0 bg-transparent border-0", children: [
11767
+ /* @__PURE__ */ y(Yo, { className: "hidden" }),
11768
+ /* @__PURE__ */ y(Jo, { className: "hidden" }),
11769
+ /* @__PURE__ */ y(
11770
11770
  "img",
11771
11771
  {
11772
11772
  src: e.content,
@@ -11788,7 +11788,7 @@ function _m({
11788
11788
  "mb-0": o && !Array.isArray(t) && t.isThinking,
11789
11789
  "w-12 h-12": o && !Array.isArray(t) && t.isThinking
11790
11790
  });
11791
- return o ? o && !a ? r ? /* @__PURE__ */ w(
11791
+ return o ? o && !a ? r ? /* @__PURE__ */ y(
11792
11792
  hn,
11793
11793
  {
11794
11794
  className: c,
@@ -11796,14 +11796,14 @@ function _m({
11796
11796
  fgColor: "#ffffff",
11797
11797
  src: r
11798
11798
  }
11799
- ) : /* @__PURE__ */ w(
11799
+ ) : /* @__PURE__ */ y(
11800
11800
  Xo,
11801
11801
  {
11802
11802
  className: c,
11803
11803
  isWaiting: !Array.isArray(t) && t.isThinking
11804
11804
  }
11805
- ) : /* @__PURE__ */ w("div", { className: c }) : null;
11806
- }, l = () => Array.isArray(t) ? t.map((c) => /* @__PURE__ */ w(
11805
+ ) : /* @__PURE__ */ y("div", { className: c }) : null;
11806
+ }, l = () => Array.isArray(t) ? t.map((c) => /* @__PURE__ */ y(
11807
11807
  eo,
11808
11808
  {
11809
11809
  messageData: c,
@@ -11815,7 +11815,7 @@ function _m({
11815
11815
  showTail: !1
11816
11816
  },
11817
11817
  c.id
11818
- )) : /* @__PURE__ */ w(
11818
+ )) : /* @__PURE__ */ y(
11819
11819
  eo,
11820
11820
  {
11821
11821
  messageData: t,
@@ -11825,7 +11825,7 @@ function _m({
11825
11825
  },
11826
11826
  t.id
11827
11827
  );
11828
- return /* @__PURE__ */ w("div", { children: /* @__PURE__ */ B(
11828
+ return /* @__PURE__ */ y("div", { children: /* @__PURE__ */ B(
11829
11829
  "div",
11830
11830
  {
11831
11831
  className: j(e, {
@@ -11845,9 +11845,9 @@ function Am(e) {
11845
11845
  o(!1);
11846
11846
  }, [n]);
11847
11847
  const a = !n || i;
11848
- return /* @__PURE__ */ w("div", { className: j("w-full h-full", t), ...r, children: a ? /* @__PURE__ */ B("svg", { viewBox: "0 0 80 80", fill: "none", xmlns: "http://www.w3.org/2000/svg", children: [
11849
- /* @__PURE__ */ w("rect", { width: "80", height: "80", fill: "#6F33B7" }),
11850
- /* @__PURE__ */ w(
11848
+ return /* @__PURE__ */ y("div", { className: j("w-full h-full", t), ...r, children: a ? /* @__PURE__ */ B("svg", { viewBox: "0 0 80 80", fill: "none", xmlns: "http://www.w3.org/2000/svg", children: [
11849
+ /* @__PURE__ */ y("rect", { width: "80", height: "80", fill: "#6F33B7" }),
11850
+ /* @__PURE__ */ y(
11851
11851
  "path",
11852
11852
  {
11853
11853
  fillRule: "evenodd",
@@ -11856,7 +11856,7 @@ function Am(e) {
11856
11856
  fill: "white"
11857
11857
  }
11858
11858
  )
11859
- ] }) : /* @__PURE__ */ w(
11859
+ ] }) : /* @__PURE__ */ y(
11860
11860
  "img",
11861
11861
  {
11862
11862
  src: n,
@@ -11927,19 +11927,19 @@ function Tm() {
11927
11927
  onViewportScroll: c,
11928
11928
  children: [
11929
11929
  /* @__PURE__ */ B("div", { className: "chat-interface-head mt-10", children: [
11930
- /* @__PURE__ */ w("div", { className: "w-14 h-14 mx-auto rounded-md overflow-hidden", children: /* @__PURE__ */ w(Am, { src: e.assistantLogo }) }),
11930
+ /* @__PURE__ */ y("div", { className: "w-14 h-14 mx-auto rounded-md overflow-hidden", children: /* @__PURE__ */ y(Am, { src: e.assistantLogo }) }),
11931
11931
  /* @__PURE__ */ B("div", { className: "mt-2 space-y-1", children: [
11932
11932
  /* @__PURE__ */ B("h3", { className: "text-center font-semibold", children: [
11933
11933
  e.assistantName,
11934
11934
  " ",
11935
11935
  e.title
11936
11936
  ] }),
11937
- /* @__PURE__ */ w("p", { className: "text-muted-foreground text-center text-sm", children: e.subtitle })
11937
+ /* @__PURE__ */ y("p", { className: "text-muted-foreground text-center text-sm", children: e.subtitle })
11938
11938
  ] })
11939
11939
  ] }),
11940
- /* @__PURE__ */ w("div", { className: "chat-interface-body flex flex-col space-y-4 mb-10", children: f.map((p, d, h) => {
11940
+ /* @__PURE__ */ y("div", { className: "chat-interface-body flex flex-col space-y-4 mb-10", children: f.map((p, d, h) => {
11941
11941
  const b = Array.isArray(p) ? p.map((v) => v.id).join("-") : p.id;
11942
- return /* @__PURE__ */ w(
11942
+ return /* @__PURE__ */ y(
11943
11943
  _m,
11944
11944
  {
11945
11945
  message: p,
@@ -11957,17 +11957,17 @@ function Tm() {
11957
11957
  ]
11958
11958
  }
11959
11959
  ),
11960
- i && /* @__PURE__ */ w(
11960
+ i && /* @__PURE__ */ y(
11961
11961
  "button",
11962
11962
  {
11963
11963
  className: "flex items-center justify-center absolute left-[calc(50%-0.75rem)] bottom-10 mx-auto cursor-pointer",
11964
11964
  onClick: () => u("instant"),
11965
- children: /* @__PURE__ */ w(jo, { className: "h-6 w-6 text-primary bg-white rounded-full border" })
11965
+ children: /* @__PURE__ */ y(jo, { className: "h-6 w-6 text-primary bg-white rounded-full border" })
11966
11966
  }
11967
11967
  )
11968
11968
  ] });
11969
11969
  }
11970
- const us = pe.forwardRef(({ className: e, ...t }, n) => /* @__PURE__ */ w(
11970
+ const us = pe.forwardRef(({ className: e, ...t }, n) => /* @__PURE__ */ y(
11971
11971
  "textarea",
11972
11972
  {
11973
11973
  className: j(
@@ -12061,22 +12061,22 @@ const to = {
12061
12061
  {
12062
12062
  className: `flex items-center gap-3 ${n.bgColor} text-sm sm:text-md border-l-4 ${n.borderColor} p-3 rounded-md my-4`,
12063
12063
  children: [
12064
- /* @__PURE__ */ w(r, { className: n.iconColor, size: 25 }),
12065
- /* @__PURE__ */ w("span", { className: n.textColor, children: e })
12064
+ /* @__PURE__ */ y(r, { className: n.iconColor, size: 25 }),
12065
+ /* @__PURE__ */ y("span", { className: n.textColor, children: e })
12066
12066
  ]
12067
12067
  }
12068
12068
  );
12069
12069
  };
12070
12070
  function Lm() {
12071
- const { error: e } = Vt(), t = !!e, n = mn(), r = le(null), [i, o] = W(""), a = Nm(), s = kr(), l = () => i.trim() && !t ? { backgroundColor: s.userBubbleColor } : {}, c = () => n.suggestedMessages ? /* @__PURE__ */ w(
12071
+ const { error: e } = Vt(), t = !!e, n = mn(), r = le(null), [i, o] = W(""), a = Nm(), s = kr(), l = () => i.trim() && !t ? { backgroundColor: s.userBubbleColor } : {}, c = () => n.suggestedMessages ? /* @__PURE__ */ y(
12072
12072
  "div",
12073
12073
  {
12074
12074
  className: "w-full px-4 pb-10 -mt-20 overflow-x-auto no-scrollbar z-10 cursor-grab",
12075
12075
  ...a,
12076
- children: /* @__PURE__ */ w("div", { className: "flex gap-2 min-w-min", children: [
12076
+ children: /* @__PURE__ */ y("div", { className: "flex gap-2 min-w-min", children: [
12077
12077
  "Tell me more about Product X.",
12078
12078
  "Do you offer delivery in Palo Alto?"
12079
- ].map((d) => /* @__PURE__ */ w(
12079
+ ].map((d) => /* @__PURE__ */ y(
12080
12080
  "button",
12081
12081
  {
12082
12082
  onClick: () => {
@@ -12109,7 +12109,7 @@ function Lm() {
12109
12109
  }
12110
12110
  };
12111
12111
  return /* @__PURE__ */ B(vr, { className: "flex flex-col bg-background p-0", children: [
12112
- n.isConversationClosed ? /* @__PURE__ */ w("div", { className: "flex flex-col w-full items-center px-4 pb-4 -mt-6 z-20", children: /* @__PURE__ */ B(
12112
+ n.isConversationClosed ? /* @__PURE__ */ y("div", { className: "flex flex-col w-full items-center px-4 pb-4 -mt-6 z-20", children: /* @__PURE__ */ B(
12113
12113
  "div",
12114
12114
  {
12115
12115
  className: "w-full rounded-xl border border-[#E5E3E1] bg-[#FAF9F7] p-4 shadow-sm dark:border-border dark:bg-card",
@@ -12117,7 +12117,7 @@ function Lm() {
12117
12117
  "aria-live": "polite",
12118
12118
  children: [
12119
12119
  /* @__PURE__ */ B("div", { className: "flex items-start gap-2.5", children: [
12120
- /* @__PURE__ */ w(
12120
+ /* @__PURE__ */ y(
12121
12121
  hl,
12122
12122
  {
12123
12123
  className: "mt-0.5 h-5 w-5 shrink-0 text-[#B2B0AE] dark:text-muted-foreground",
@@ -12126,11 +12126,11 @@ function Lm() {
12126
12126
  }
12127
12127
  ),
12128
12128
  /* @__PURE__ */ B("div", { className: "flex min-w-0 flex-1 flex-col gap-2 text-left", children: [
12129
- /* @__PURE__ */ w("p", { className: "text-base font-semibold leading-tight text-foreground", children: "Session Expired" }),
12130
- /* @__PURE__ */ w("p", { className: "text-sm leading-relaxed text-muted-foreground", children: "This conversation is closed. Please start a new chat to continue." })
12129
+ /* @__PURE__ */ y("p", { className: "text-base font-semibold leading-tight text-foreground", children: "Session Expired" }),
12130
+ /* @__PURE__ */ y("p", { className: "text-sm leading-relaxed text-muted-foreground", children: "This conversation is closed. Please start a new chat to continue." })
12131
12131
  ] })
12132
12132
  ] }),
12133
- /* @__PURE__ */ w(
12133
+ /* @__PURE__ */ y(
12134
12134
  "button",
12135
12135
  {
12136
12136
  type: "button",
@@ -12145,14 +12145,14 @@ function Lm() {
12145
12145
  ) }) : /* @__PURE__ */ B(We, { children: [
12146
12146
  c(),
12147
12147
  /* @__PURE__ */ B("div", { className: "flex flex-col w-full items-center px-4 pb-4 -mt-6 z-20", children: [
12148
- t && /* @__PURE__ */ w(Om, { message: e.message, type: "error" }),
12148
+ t && /* @__PURE__ */ y(Om, { message: e.message, type: "error" }),
12149
12149
  /* @__PURE__ */ B(
12150
12150
  "form",
12151
12151
  {
12152
12152
  className: "relative flex items-center w-full m-0",
12153
12153
  onSubmit: u,
12154
12154
  children: [
12155
- /* @__PURE__ */ w("div", { className: "flex-1 bg-card rounded-3xl shadow-[0_0_4px_0_rgba(0,0,0,0.20)]", children: /* @__PURE__ */ w(
12155
+ /* @__PURE__ */ y("div", { className: "flex-1 bg-card rounded-3xl shadow-[0_0_4px_0_rgba(0,0,0,0.20)]", children: /* @__PURE__ */ y(
12156
12156
  us,
12157
12157
  {
12158
12158
  ref: r,
@@ -12180,7 +12180,7 @@ function Lm() {
12180
12180
  }
12181
12181
  }
12182
12182
  ) }),
12183
- /* @__PURE__ */ w(
12183
+ /* @__PURE__ */ y(
12184
12184
  "button",
12185
12185
  {
12186
12186
  type: "submit",
@@ -12190,7 +12190,7 @@ function Lm() {
12190
12190
  i.trim() && !t ? "text-primary-foreground" : "bg-muted-foreground"
12191
12191
  ),
12192
12192
  style: l(),
12193
- children: /* @__PURE__ */ w(ml, { className: "h-4 w-4" })
12193
+ children: /* @__PURE__ */ y(ml, { className: "h-4 w-4" })
12194
12194
  }
12195
12195
  )
12196
12196
  ]
@@ -12200,10 +12200,10 @@ function Lm() {
12200
12200
  ] }),
12201
12201
  /* @__PURE__ */ B("div", { className: "w-full flex flex-col items-center justify-center space-x-2 p-1 pt-0 px-0 bg-[#FAF9F7] dark:bg-background", children: [
12202
12202
  /* @__PURE__ */ B("div", { className: "w-full flex items-center justify-center space-x-2 py-1 bg-[#FAF9F7] dark:bg-card", children: [
12203
- /* @__PURE__ */ w(hn, { className: j("w-5 h-5"), bgColor: "#E5E3E1", fgColor: "#B2B0AE" }),
12204
- /* @__PURE__ */ w("div", { className: "text-xs text-center text-muted-foreground p-1", children: "Powered by EloquentAI" })
12203
+ /* @__PURE__ */ y(hn, { className: j("w-5 h-5"), bgColor: "#E5E3E1", fgColor: "#B2B0AE" }),
12204
+ /* @__PURE__ */ y("div", { className: "text-xs text-center text-muted-foreground p-1", children: "Powered by EloquentAI" })
12205
12205
  ] }),
12206
- n.legalText && /* @__PURE__ */ w(
12206
+ n.legalText && /* @__PURE__ */ y(
12207
12207
  "div",
12208
12208
  {
12209
12209
  className: "text-xs text-center text-muted-foreground mt-2",
@@ -12213,7 +12213,7 @@ function Lm() {
12213
12213
  ] })
12214
12214
  ] });
12215
12215
  }
12216
- const ps = pe.forwardRef(({ className: e, ...t }, n) => /* @__PURE__ */ w(
12216
+ const ps = pe.forwardRef(({ className: e, ...t }, n) => /* @__PURE__ */ y(
12217
12217
  mt.Root,
12218
12218
  {
12219
12219
  ref: n,
@@ -12225,7 +12225,7 @@ const ps = pe.forwardRef(({ className: e, ...t }, n) => /* @__PURE__ */ w(
12225
12225
  }
12226
12226
  ));
12227
12227
  ps.displayName = mt.Root.displayName;
12228
- const Dm = pe.forwardRef(({ className: e, ...t }, n) => /* @__PURE__ */ w(
12228
+ const Dm = pe.forwardRef(({ className: e, ...t }, n) => /* @__PURE__ */ y(
12229
12229
  mt.Image,
12230
12230
  {
12231
12231
  ref: n,
@@ -12234,7 +12234,7 @@ const Dm = pe.forwardRef(({ className: e, ...t }, n) => /* @__PURE__ */ w(
12234
12234
  }
12235
12235
  ));
12236
12236
  Dm.displayName = mt.Image.displayName;
12237
- const Pm = pe.forwardRef(({ className: e, ...t }, n) => /* @__PURE__ */ w(
12237
+ const Pm = pe.forwardRef(({ className: e, ...t }, n) => /* @__PURE__ */ y(
12238
12238
  mt.Fallback,
12239
12239
  {
12240
12240
  ref: n,
@@ -12253,7 +12253,7 @@ function Mm({
12253
12253
  const n = mn();
12254
12254
  return /* @__PURE__ */ B(wr, { className: "p-4 flex flex-row items-center justify-between shadow-sm space-y-0", children: [
12255
12255
  /* @__PURE__ */ B("div", { className: "flex flex-row items-center space-x-3", children: [
12256
- /* @__PURE__ */ w(ps, { className: "h-8 w-8", children: /* @__PURE__ */ w(
12256
+ /* @__PURE__ */ y(ps, { className: "h-8 w-8", children: /* @__PURE__ */ y(
12257
12257
  hn,
12258
12258
  {
12259
12259
  src: n.assistantLogo,
@@ -12261,23 +12261,23 @@ function Mm({
12261
12261
  fgColor: "#ffffff"
12262
12262
  }
12263
12263
  ) }),
12264
- /* @__PURE__ */ w("div", { className: "flex flex-col", children: /* @__PURE__ */ w("h2", { className: "text-foreground font-semibold", children: n.assistantName }) })
12264
+ /* @__PURE__ */ y("div", { className: "flex flex-col", children: /* @__PURE__ */ y("h2", { className: "text-foreground font-semibold", children: n.assistantName }) })
12265
12265
  ] }),
12266
12266
  /* @__PURE__ */ B("div", { children: [
12267
- n.cleanChatButton && /* @__PURE__ */ w(
12267
+ n.cleanChatButton && /* @__PURE__ */ y(
12268
12268
  "button",
12269
12269
  {
12270
12270
  onClick: e,
12271
12271
  className: "text-gray-400 hover:text-gray-600 p-2",
12272
- children: /* @__PURE__ */ w(gl, { className: "w-4 h-4" })
12272
+ children: /* @__PURE__ */ y(gl, { className: "w-4 h-4" })
12273
12273
  }
12274
12274
  ),
12275
- n.closeButton === !0 && n.isMobile && /* @__PURE__ */ w(
12275
+ n.closeButton === !0 && n.isMobile && /* @__PURE__ */ y(
12276
12276
  "button",
12277
12277
  {
12278
12278
  onClick: t,
12279
12279
  className: "text-gray-400 hover:text-gray-600 p-2",
12280
- children: /* @__PURE__ */ w(gr, { className: "w-4 h-4" })
12280
+ children: /* @__PURE__ */ y(gr, { className: "w-4 h-4" })
12281
12281
  }
12282
12282
  )
12283
12283
  ] })
@@ -12299,7 +12299,7 @@ function Me({
12299
12299
  className: e,
12300
12300
  ...t
12301
12301
  }) {
12302
- return /* @__PURE__ */ w(
12302
+ return /* @__PURE__ */ y(
12303
12303
  "div",
12304
12304
  {
12305
12305
  className: j("animate-pulse rounded-md bg-muted", e),
@@ -12316,24 +12316,24 @@ function ms({
12316
12316
  isMobile: t
12317
12317
  });
12318
12318
  return /* @__PURE__ */ B(yr, { className: r, children: [
12319
- /* @__PURE__ */ w(wr, { className: "p-4 flex flex-row items-center justify-between shadow-sm space-y-0", children: /* @__PURE__ */ B("div", { className: "flex flex-row items-center space-x-3", children: [
12320
- /* @__PURE__ */ w(Me, { className: "h-8 w-8" }),
12321
- /* @__PURE__ */ w(Me, { className: "h-6 w-32" })
12319
+ /* @__PURE__ */ y(wr, { className: "p-4 flex flex-row items-center justify-between shadow-sm space-y-0", children: /* @__PURE__ */ B("div", { className: "flex flex-row items-center space-x-3", children: [
12320
+ /* @__PURE__ */ y(Me, { className: "h-8 w-8" }),
12321
+ /* @__PURE__ */ y(Me, { className: "h-6 w-32" })
12322
12322
  ] }) }),
12323
- /* @__PURE__ */ w(xr, { className: "flex-1 px-4 overflow-hidden", children: /* @__PURE__ */ B(wl, { children: [
12323
+ /* @__PURE__ */ y(xr, { className: "flex-1 px-4 overflow-hidden", children: /* @__PURE__ */ B(wl, { children: [
12324
12324
  /* @__PURE__ */ B("div", { className: "flex flex-col items-center justify-center space-y-2 pt-10", children: [
12325
- /* @__PURE__ */ w(Me, { className: "w-14 h-14 mx-auto rounded-md" }),
12326
- /* @__PURE__ */ w("div", { children: /* @__PURE__ */ w(Me, { className: "h-6 w-32 mx-auto mt-2" }) }),
12327
- /* @__PURE__ */ w(Me, { className: "h-4 w-24 mx-auto" })
12325
+ /* @__PURE__ */ y(Me, { className: "w-14 h-14 mx-auto rounded-md" }),
12326
+ /* @__PURE__ */ y("div", { children: /* @__PURE__ */ y(Me, { className: "h-6 w-32 mx-auto mt-2" }) }),
12327
+ /* @__PURE__ */ y(Me, { className: "h-4 w-24 mx-auto" })
12328
12328
  ] }),
12329
12329
  /* @__PURE__ */ B("div", { className: "flex flex-col space-y-4 mt-10", children: [
12330
- /* @__PURE__ */ w(Me, { className: "h-12 w-2/3" }),
12331
- /* @__PURE__ */ w(Me, { className: "h-12 w-2/3 self-end" }),
12332
- /* @__PURE__ */ w(Me, { className: "h-12 w-2/3" }),
12333
- /* @__PURE__ */ w(Me, { className: "h-12 w-2/3 self-end" })
12330
+ /* @__PURE__ */ y(Me, { className: "h-12 w-2/3" }),
12331
+ /* @__PURE__ */ y(Me, { className: "h-12 w-2/3 self-end" }),
12332
+ /* @__PURE__ */ y(Me, { className: "h-12 w-2/3" }),
12333
+ /* @__PURE__ */ y(Me, { className: "h-12 w-2/3 self-end" })
12334
12334
  ] })
12335
12335
  ] }) }),
12336
- /* @__PURE__ */ w(vr, { children: /* @__PURE__ */ w(Me, { className: "h-12 w-full rounded-full" }) })
12336
+ /* @__PURE__ */ y(vr, { children: /* @__PURE__ */ y(Me, { className: "h-12 w-full rounded-full" }) })
12337
12337
  ] }, "chat-interface-sekelton");
12338
12338
  }
12339
12339
  function zm(e) {
@@ -12341,18 +12341,18 @@ function zm(e) {
12341
12341
  isOpen: a,
12342
12342
  isMobile: n
12343
12343
  }), u = () => s ? /* @__PURE__ */ B(yr, { className: c, children: [
12344
- /* @__PURE__ */ w(
12344
+ /* @__PURE__ */ y(
12345
12345
  Mm,
12346
12346
  {
12347
12347
  onCleanChat: () => r?.(),
12348
12348
  onClose: () => i?.()
12349
12349
  }
12350
12350
  ),
12351
- /* @__PURE__ */ w(Tm, {}),
12352
- /* @__PURE__ */ w(Lm, {})
12351
+ /* @__PURE__ */ y(Tm, {}),
12352
+ /* @__PURE__ */ y(Lm, {})
12353
12353
  ] }) : /* @__PURE__ */ B(We, { children: [
12354
- /* @__PURE__ */ w(ms, { isOpen: t, isMobile: n }),
12355
- !s && /* @__PURE__ */ w(
12354
+ /* @__PURE__ */ y(ms, { isOpen: t, isMobile: n }),
12355
+ !s && /* @__PURE__ */ y(
12356
12356
  Xo,
12357
12357
  {
12358
12358
  className: "hidden invisible",
@@ -12360,7 +12360,7 @@ function zm(e) {
12360
12360
  }
12361
12361
  )
12362
12362
  ] });
12363
- return /* @__PURE__ */ w(Vo, { ...o, children: /* @__PURE__ */ w(Ol, { ...e, children: /* @__PURE__ */ w(
12363
+ return /* @__PURE__ */ y(Vo, { ...o, children: /* @__PURE__ */ y(Ol, { ...e, children: /* @__PURE__ */ y(
12364
12364
  "main",
12365
12365
  {
12366
12366
  className: j(
@@ -12411,7 +12411,7 @@ function qm({
12411
12411
  }, 300);
12412
12412
  return () => clearTimeout(u);
12413
12413
  }
12414
- }, [t, n, i]), o ? /* @__PURE__ */ w(
12414
+ }, [t, n, i]), o ? /* @__PURE__ */ y(
12415
12415
  "div",
12416
12416
  {
12417
12417
  className: j(
@@ -12420,7 +12420,7 @@ function qm({
12420
12420
  s === "visible" && "translate-x-0 opacity-100 scale-100",
12421
12421
  s === "exiting" && "translate-x-8 opacity-0 scale-95"
12422
12422
  ),
12423
- children: /* @__PURE__ */ w("div", { className: "relative", children: /* @__PURE__ */ B(
12423
+ children: /* @__PURE__ */ y("div", { className: "relative", children: /* @__PURE__ */ B(
12424
12424
  "div",
12425
12425
  {
12426
12426
  className: j(
@@ -12432,7 +12432,7 @@ function qm({
12432
12432
  },
12433
12433
  onClick: r,
12434
12434
  children: [
12435
- /* @__PURE__ */ w(
12435
+ /* @__PURE__ */ y(
12436
12436
  "svg",
12437
12437
  {
12438
12438
  className: j(
@@ -12440,19 +12440,19 @@ function qm({
12440
12440
  ),
12441
12441
  viewBox: "0 0 10.54 11.14",
12442
12442
  fill: c.botBubbleColor,
12443
- children: /* @__PURE__ */ w("path", { d: "M5.75,0s0,.36,0,.51c-.09,4.52-5.74,10.64-5.74,10.64,8.19.02,10.54-2.26,10.54-2.26h0c-1.6-2.96-3.19-5.92-4.79-8.88Z" })
12443
+ children: /* @__PURE__ */ y("path", { d: "M5.75,0s0,.36,0,.51c-.09,4.52-5.74,10.64-5.74,10.64,8.19.02,10.54-2.26,10.54-2.26h0c-1.6-2.96-3.19-5.92-4.79-8.88Z" })
12444
12444
  }
12445
12445
  ),
12446
12446
  /* @__PURE__ */ B("div", { className: "flex items-start justify-between gap-2", children: [
12447
- /* @__PURE__ */ w("p", { className: "text-sm text-gray-800 leading-relaxed flex-1", children: e }),
12448
- /* @__PURE__ */ w(
12447
+ /* @__PURE__ */ y("p", { className: "text-sm text-gray-800 leading-relaxed flex-1", children: e }),
12448
+ /* @__PURE__ */ y(
12449
12449
  "button",
12450
12450
  {
12451
12451
  onClick: (u) => {
12452
12452
  u.stopPropagation(), n();
12453
12453
  },
12454
12454
  className: "flex-shrink-0 p-1 hover:bg-gray-100 rounded-full transition-colors duration-200",
12455
- children: /* @__PURE__ */ w(gr, { className: "w-3 h-3 text-gray-500" })
12455
+ children: /* @__PURE__ */ y(gr, { className: "w-3 h-3 text-gray-500" })
12456
12456
  }
12457
12457
  )
12458
12458
  ] })
@@ -12660,48 +12660,48 @@ function Hm({
12660
12660
  f.current = n;
12661
12661
  const p = le(() => Promise.resolve()), d = () => {
12662
12662
  s.current && (clearTimeout(s.current), s.current = null);
12663
- }, h = (C) => ({
12664
- id: C.message_id,
12665
- content: C.response.content,
12666
- sender: C.role,
12667
- timestamp: C.created_at,
12663
+ }, h = (E) => ({
12664
+ id: E.message_id,
12665
+ content: E.response.content,
12666
+ sender: E.role,
12667
+ timestamp: E.created_at,
12668
12668
  type: "text"
12669
- }), b = (C) => ({
12670
- message_id: C.message_id,
12671
- response: C.response
12669
+ }), b = (E) => ({
12670
+ message_id: E.message_id,
12671
+ response: E.response
12672
12672
  }), v = te(
12673
- (C, I) => {
12674
- const D = I.map(h), R = Math.min(C.length, D.length);
12673
+ (E, I) => {
12674
+ const D = I.map(h), R = Math.min(E.length, D.length);
12675
12675
  for (let A = 0; A < R; A++)
12676
- if (C[A].id !== D[A].id)
12676
+ if (E[A].id !== D[A].id)
12677
12677
  return !1;
12678
12678
  return !0;
12679
12679
  },
12680
12680
  []
12681
- ), y = te(
12682
- (C) => {
12681
+ ), w = te(
12682
+ (E) => {
12683
12683
  setTimeout(() => {
12684
- o(b(C), t);
12684
+ o(b(E), t);
12685
12685
  }, 100);
12686
12686
  },
12687
12687
  [o, t]
12688
12688
  ), _ = te(
12689
- (C, I = !1) => {
12689
+ (E, I = !1) => {
12690
12690
  const D = f.current.filter(
12691
12691
  (A) => A.isWelcomeMessage
12692
- ), R = C.map(h);
12692
+ ), R = E.map(h);
12693
12693
  if (I && R.length > 0) {
12694
- const A = C[C.length - 1];
12695
- r([...D, ...R.slice(0, -1)]), y(A);
12694
+ const A = E[E.length - 1];
12695
+ r([...D, ...R.slice(0, -1)]), w(A);
12696
12696
  } else
12697
12697
  r([...D, ...R]);
12698
12698
  },
12699
- [r, y]
12700
- ), k = te(
12701
- (C) => {
12702
- if (C.role === "assistant")
12699
+ [r, w]
12700
+ ), S = te(
12701
+ (E) => {
12702
+ if (E.role === "assistant")
12703
12703
  o(
12704
- b(C),
12704
+ b(E),
12705
12705
  t
12706
12706
  );
12707
12707
  else {
@@ -12709,7 +12709,7 @@ function Hm({
12709
12709
  (A) => A.isWelcomeMessage
12710
12710
  ), D = f.current.filter(
12711
12711
  (A) => !A.isThinking && !A.isWelcomeMessage
12712
- ), R = h(C);
12712
+ ), R = h(E);
12713
12713
  r([...I, ...D, R]);
12714
12714
  }
12715
12715
  c.current = Math.max(
@@ -12718,27 +12718,27 @@ function Hm({
12718
12718
  );
12719
12719
  },
12720
12720
  [o, t, r]
12721
- ), L = te(
12722
- (C, I) => {
12721
+ ), O = te(
12722
+ (E, I) => {
12723
12723
  const R = I[I.length - 1].role === "assistant";
12724
- _(C, R), c.current = Math.max(
12724
+ _(E, R), c.current = Math.max(
12725
12725
  0,
12726
12726
  c.current - I.length
12727
12727
  );
12728
12728
  },
12729
12729
  [_]
12730
12730
  ), N = te(
12731
- (C, I, D) => {
12731
+ (E, I, D) => {
12732
12732
  if (I.length > 0) {
12733
12733
  const A = I[I.length - 1].role === "assistant";
12734
- _(C, A), c.current = Math.max(
12734
+ _(E, A), c.current = Math.max(
12735
12735
  0,
12736
12736
  c.current - I.length
12737
12737
  );
12738
12738
  } else {
12739
12739
  const R = f.current.filter(
12740
12740
  (U) => U.isWelcomeMessage
12741
- ), A = C.map(h);
12741
+ ), A = E.map(h);
12742
12742
  r([
12743
12743
  ...R,
12744
12744
  ...A,
@@ -12747,24 +12747,24 @@ function Hm({
12747
12747
  }
12748
12748
  },
12749
12749
  [_, r]
12750
- ), S = te(async () => {
12750
+ ), k = te(async () => {
12751
12751
  if (!(!e || !t || !u.current))
12752
12752
  try {
12753
- let C = await e.getChatHistory(t);
12754
- C.some(ro) && (C = C.filter(
12753
+ let E = await e.getChatHistory(t);
12754
+ E.some(ro) && (E = E.filter(
12755
12755
  (H) => !ro(H)
12756
12756
  ), a?.(), u.current = !1, d());
12757
12757
  const D = f.current.filter(
12758
12758
  (H) => !H.isThinking && !H.isWelcomeMessage
12759
- ), R = new Set(D.map((H) => H.id)), A = new Set(C.map((H) => H.message_id)), U = C.filter(
12759
+ ), R = new Set(D.map((H) => H.id)), A = new Set(E.map((H) => H.message_id)), U = E.filter(
12760
12760
  (H) => !R.has(H.message_id)
12761
12761
  ), q = D.filter(
12762
12762
  (H) => !A.has(H.id)
12763
12763
  );
12764
12764
  if (!(U.length === 0 && q.length === 0)) {
12765
- const H = v(D, C), ne = U.length === 1 && q.length === 0, m = U.length > 1 && q.length === 0;
12766
- H && ne ? k(U[0]) : H && m ? L(C, U) : N(
12767
- C,
12765
+ const H = v(D, E), ne = U.length === 1 && q.length === 0, m = U.length > 1 && q.length === 0;
12766
+ H && ne ? S(U[0]) : H && m ? O(E, U) : N(
12767
+ E,
12768
12768
  U,
12769
12769
  q
12770
12770
  );
@@ -12776,8 +12776,8 @@ function Hm({
12776
12776
  H
12777
12777
  );
12778
12778
  }
12779
- } catch (C) {
12780
- if (console.warn("Background polling failed:", C), u.current) {
12779
+ } catch (E) {
12780
+ if (console.warn("Background polling failed:", E), u.current) {
12781
12781
  const I = jn[l.current];
12782
12782
  s.current = setTimeout(
12783
12783
  () => p.current(),
@@ -12789,33 +12789,33 @@ function Hm({
12789
12789
  e,
12790
12790
  t,
12791
12791
  v,
12792
- k,
12793
- L,
12792
+ S,
12793
+ O,
12794
12794
  N,
12795
12795
  a
12796
12796
  ]);
12797
- p.current = S;
12798
- const M = te(() => {
12797
+ p.current = k;
12798
+ const z = te(() => {
12799
12799
  !t || u.current || (u.current = !0, p.current());
12800
12800
  }, [t]), P = te(() => {
12801
12801
  u.current = !1, d(), c.current = 0;
12802
- }, []), z = te((C) => {
12802
+ }, []), M = te((E) => {
12803
12803
  const I = l.current;
12804
- if (l.current = C, I !== C && u.current) {
12804
+ if (l.current = E, I !== E && u.current) {
12805
12805
  d();
12806
- const D = jn[C];
12806
+ const D = jn[E];
12807
12807
  s.current = setTimeout(() => p.current(), D);
12808
12808
  }
12809
12809
  }, []), x = () => {
12810
- c.current += 1, z("high");
12810
+ c.current += 1, M("high");
12811
12811
  };
12812
12812
  return re(() => {
12813
- const C = c.current > 0 ? "high" : i ? "medium" : "low";
12814
- z(C);
12815
- }, [i, z]), re(() => (t && e ? M() : P(), P), [t, e, M, P]), re(() => P, [P]), {
12816
- setPollingMode: z,
12813
+ const E = c.current > 0 ? "high" : i ? "medium" : "low";
12814
+ M(E);
12815
+ }, [i, M]), re(() => (t && e ? z() : P(), P), [t, e, z, P]), re(() => P, [P]), {
12816
+ setPollingMode: M,
12817
12817
  expectMessage: x,
12818
- startPolling: M,
12818
+ startPolling: z,
12819
12819
  stopPolling: P
12820
12820
  };
12821
12821
  }
@@ -13179,14 +13179,14 @@ const bs = (e) => {
13179
13179
  message: "Invalid config parameter.",
13180
13180
  recoverySuggestion: "Ensure passing the config object imported from `amplifyconfiguration.json`."
13181
13181
  });
13182
- const { aws_appsync_apiKey: t, aws_appsync_authenticationType: n, aws_appsync_graphqlEndpoint: r, aws_appsync_region: i, aws_bots_config: o, aws_cognito_identity_pool_id: a, aws_cognito_sign_up_verification_method: s, aws_cognito_mfa_configuration: l, aws_cognito_mfa_types: c, aws_cognito_password_protection_settings: u, aws_cognito_verification_mechanisms: f, aws_cognito_signup_attributes: p, aws_cognito_social_providers: d, aws_cognito_username_attributes: h, aws_mandatory_sign_in: b, aws_mobile_analytics_app_id: v, aws_mobile_analytics_app_region: y, aws_user_files_s3_bucket: _, aws_user_files_s3_bucket_region: k, aws_user_files_s3_dangerously_connect_to_http_endpoint_for_testing: L, aws_user_pools_id: N, aws_user_pools_web_client_id: S, geo: M, oauth: P, predictions: z, aws_cloud_logic_custom: x, Notifications: C, modelIntrospection: I } = e, D = {};
13182
+ const { aws_appsync_apiKey: t, aws_appsync_authenticationType: n, aws_appsync_graphqlEndpoint: r, aws_appsync_region: i, aws_bots_config: o, aws_cognito_identity_pool_id: a, aws_cognito_sign_up_verification_method: s, aws_cognito_mfa_configuration: l, aws_cognito_mfa_types: c, aws_cognito_password_protection_settings: u, aws_cognito_verification_mechanisms: f, aws_cognito_signup_attributes: p, aws_cognito_social_providers: d, aws_cognito_username_attributes: h, aws_mandatory_sign_in: b, aws_mobile_analytics_app_id: v, aws_mobile_analytics_app_region: w, aws_user_files_s3_bucket: _, aws_user_files_s3_bucket_region: S, aws_user_files_s3_dangerously_connect_to_http_endpoint_for_testing: O, aws_user_pools_id: N, aws_user_pools_web_client_id: k, geo: z, oauth: P, predictions: M, aws_cloud_logic_custom: x, Notifications: E, modelIntrospection: I } = e, D = {};
13183
13183
  v && (D.Analytics = {
13184
13184
  Pinpoint: {
13185
13185
  appId: v,
13186
- region: y
13186
+ region: w
13187
13187
  }
13188
13188
  });
13189
- const { InAppMessaging: R, Push: A } = C ?? {};
13189
+ const { InAppMessaging: R, Push: A } = E ?? {};
13190
13190
  if (R?.AWSPinpoint || A?.AWSPinpoint) {
13191
13191
  if (R?.AWSPinpoint) {
13192
13192
  const { appId: J, region: me } = R.AWSPinpoint;
@@ -13249,7 +13249,7 @@ const bs = (e) => {
13249
13249
  allowGuestAccess: b !== "enable",
13250
13250
  signUpVerificationMethod: s,
13251
13251
  userAttributes: ne,
13252
- userPoolClientId: S,
13252
+ userPoolClientId: k,
13253
13253
  userPoolId: N,
13254
13254
  mfa: U,
13255
13255
  passwordFormat: q,
@@ -13272,11 +13272,11 @@ const bs = (e) => {
13272
13272
  }), _ && (D.Storage = {
13273
13273
  S3: {
13274
13274
  bucket: _,
13275
- region: k,
13276
- dangerouslyConnectToHttpEndpointForTesting: L
13275
+ region: S,
13276
+ dangerouslyConnectToHttpEndpointForTesting: O
13277
13277
  }
13278
- }), M) {
13279
- const { amazon_location_service: J } = M;
13278
+ }), z) {
13279
+ const { amazon_location_service: J } = z;
13280
13280
  D.Geo = {
13281
13281
  LocationService: {
13282
13282
  maps: J.maps,
@@ -13299,18 +13299,18 @@ const bs = (e) => {
13299
13299
  }
13300
13300
  };
13301
13301
  }, {})
13302
- }), z) {
13303
- const { VoiceId: J } = z?.convert?.speechGenerator?.defaults ?? {};
13302
+ }), M) {
13303
+ const { VoiceId: J } = M?.convert?.speechGenerator?.defaults ?? {};
13304
13304
  D.Predictions = J ? {
13305
- ...z,
13305
+ ...M,
13306
13306
  convert: {
13307
- ...z.convert,
13307
+ ...M.convert,
13308
13308
  speechGenerator: {
13309
- ...z.convert.speechGenerator,
13309
+ ...M.convert.speechGenerator,
13310
13310
  defaults: { voiceId: J }
13311
13311
  }
13312
13312
  }
13313
- } : z;
13313
+ } : M;
13314
13314
  }
13315
13315
  return D;
13316
13316
  }, oo = (e) => e?.split(",") ?? [], tg = ({ domain: e, scope: t, redirectSignIn: n, redirectSignOut: r, responseType: i }) => ({
@@ -13684,8 +13684,8 @@ function Sg(e, t, n) {
13684
13684
  }
13685
13685
  function s(d, h) {
13686
13686
  r[d] && (i[d] = function(b) {
13687
- return new Promise(function(v, y) {
13688
- o.push([d, b, v, y]) > 1 || l(d, b);
13687
+ return new Promise(function(v, w) {
13688
+ o.push([d, b, v, w]) > 1 || l(d, b);
13689
13689
  });
13690
13690
  }, h && (i[d] = h(i[d])));
13691
13691
  }
@@ -13841,8 +13841,8 @@ var _e = 64, Cg = 32, _g = new Uint32Array([
13841
13841
  var b = (d >>> 7 | d << 25) ^ (d >>> 18 | d << 14) ^ d >>> 3;
13842
13842
  this.temp[p] = (h + this.temp[p - 7] | 0) + (b + this.temp[p - 16] | 0);
13843
13843
  }
13844
- var v = (((l >>> 6 | l << 26) ^ (l >>> 11 | l << 21) ^ (l >>> 25 | l << 7)) + (l & c ^ ~l & u) | 0) + (f + (_g[p] + this.temp[p] | 0) | 0) | 0, y = ((i >>> 2 | i << 30) ^ (i >>> 13 | i << 19) ^ (i >>> 22 | i << 10)) + (i & o ^ i & a ^ o & a) | 0;
13845
- f = u, u = c, c = l, l = s + v | 0, s = a, a = o, o = i, i = v + y | 0;
13844
+ var v = (((l >>> 6 | l << 26) ^ (l >>> 11 | l << 21) ^ (l >>> 25 | l << 7)) + (l & c ^ ~l & u) | 0) + (f + (_g[p] + this.temp[p] | 0) | 0) | 0, w = ((i >>> 2 | i << 30) ^ (i >>> 13 | i << 19) ^ (i >>> 22 | i << 10)) + (i & o ^ i & a ^ o & a) | 0;
13845
+ f = u, u = c, c = l, l = s + v | 0, s = a, a = o, o = i, i = v + w | 0;
13846
13846
  }
13847
13847
  r[0] += i, r[1] += o, r[2] += a, r[3] += s, r[4] += l, r[5] += c, r[6] += u, r[7] += f;
13848
13848
  }, e;
@@ -15098,9 +15098,9 @@ var Wn = /* @__PURE__ */ (function(e) {
15098
15098
  function n(r, i, o, a, s, l, c) {
15099
15099
  var u, f, p, d;
15100
15100
  yy(this, n), d = t.call(this, r), d.name = "GraphQLError", d.originalError = l ?? void 0, d.nodes = Oo(Array.isArray(i) ? i : i ? [i] : void 0);
15101
- for (var h = [], b = 0, v = (y = d.nodes) !== null && y !== void 0 ? y : []; b < v.length; b++) {
15102
- var y, _ = v[b], k = _.loc;
15103
- k != null && h.push(k);
15101
+ for (var h = [], b = 0, v = (w = d.nodes) !== null && w !== void 0 ? w : []; b < v.length; b++) {
15102
+ var w, _ = v[b], S = _.loc;
15103
+ S != null && h.push(S);
15104
15104
  }
15105
15105
  h = Oo(h), d.source = o ?? ((u = h) === null || u === void 0 ? void 0 : u[0].source), d.positions = a ?? ((f = h) === null || f === void 0 ? void 0 : f.map(function(N) {
15106
15106
  return N.start;
@@ -15109,8 +15109,8 @@ var Wn = /* @__PURE__ */ (function(e) {
15109
15109
  }) : (p = h) === null || p === void 0 ? void 0 : p.map(function(N) {
15110
15110
  return hr(N.source, N.start);
15111
15111
  }), d.path = s ?? void 0;
15112
- var L = l?.extensions;
15113
- return c == null && dy(L) ? d.extensions = gy({}, L) : d.extensions = c ?? {}, Object.defineProperties(It(d), {
15112
+ var O = l?.extensions;
15113
+ return c == null && dy(O) ? d.extensions = gy({}, O) : d.extensions = c ?? {}, Object.defineProperties(It(d), {
15114
15114
  message: {
15115
15115
  enumerable: !0
15116
15116
  },
@@ -15984,7 +15984,7 @@ class tw extends Qy {
15984
15984
  const Xt = new tw(), _t = /* @__PURE__ */ new Set();
15985
15985
  async function nw(e, t) {
15986
15986
  const n = Xy();
15987
- n.authenticationType = ln(t?.authMode, n.authenticationType), n.apiKey = n.apiKey, n.authToken = n.authToken, await Xt.connect(n);
15987
+ n.authenticationType = ln(t?.authMode, n.authenticationType), n.apiKey = t?.apiKey || n.apiKey, n.authToken = t?.authToken || n.authToken, await Xt.connect(n);
15988
15988
  const r = dr();
15989
15989
  _t.add(r);
15990
15990
  let i;
@@ -16062,90 +16062,93 @@ function dw({
16062
16062
  onConversationClosed: r,
16063
16063
  chatSettings: i
16064
16064
  }) {
16065
- const [o, a] = W(!1), s = le(!1), l = le(null), { publishError: c } = Vt(), u = i?.app_sync_url, f = i?.app_sync_region, p = i?.app_sync_api_key;
16065
+ const [o, a] = W(!1), s = le(!1), l = le(null), { publishError: c } = Vt(), u = i?.app_sync_url, f = i?.app_sync_region, p = i?.app_sync_api_key, d = i?.app_sync_token;
16066
16066
  re(() => {
16067
16067
  (u || f || p) && (ei.configure(
16068
16068
  Bl(u, p, f)
16069
16069
  ), a(!0));
16070
16070
  }, [u, p, f]);
16071
- const d = async (k) => {
16072
- if (!o || !k)
16071
+ const h = async (O) => {
16072
+ if (!o || !O)
16073
16073
  throw new Error(
16074
16074
  "Cannot connect: Amplify not ready or missing conversationId"
16075
16075
  );
16076
- y();
16077
- const L = `/default/chat/${k}`, N = await nw(L);
16078
- l.current = N, N.subscribe({
16079
- next: (S) => {
16080
- if (console.log("Received event:", S), S.type !== "data")
16081
- return console.warn("Unexpected event type:", S.type);
16076
+ _();
16077
+ const N = `/default/chat/${O}`, z = await nw(
16078
+ N,
16079
+ d ? { authMode: "lambda", authToken: d } : void 0
16080
+ );
16081
+ l.current = z, z.subscribe({
16082
+ next: (P) => {
16083
+ if (console.log("Received event:", P), P.type !== "data")
16084
+ return console.warn("Unexpected event type:", P.type);
16082
16085
  const M = fw.safeParse(
16083
- S.event
16086
+ P.event
16084
16087
  );
16085
16088
  if (!M.success)
16086
16089
  return console.error(
16087
16090
  "Invalid conversation response:",
16088
16091
  M.error
16089
16092
  );
16090
- const P = M.data, z = P.data.type;
16091
- switch (z) {
16093
+ const x = M.data, E = x.data.type;
16094
+ switch (E) {
16092
16095
  case "utterance":
16093
- return h(
16094
- P,
16095
- k
16096
+ return b(
16097
+ x,
16098
+ O
16096
16099
  );
16097
16100
  case "error":
16098
- return b(P);
16101
+ return v(x);
16099
16102
  case "agent_cognition":
16100
- return v(
16101
- P
16103
+ return w(
16104
+ x
16102
16105
  );
16103
16106
  case "chat_closed_expired":
16104
16107
  return r?.();
16105
16108
  default:
16106
- console.warn("Unknown notification type:", z);
16109
+ console.warn("Unknown notification type:", E);
16107
16110
  }
16108
16111
  },
16109
- error: (S) => {
16110
- console.error("Error in conversation channel:", S);
16112
+ error: (P) => {
16113
+ console.error("Error in conversation channel:", P);
16111
16114
  }
16112
- }), await _();
16113
- }, h = (k, L) => {
16114
- const N = {
16115
- message_id: k.message_id,
16115
+ }), await S();
16116
+ }, b = (O, N) => {
16117
+ const k = {
16118
+ message_id: O.message_id,
16116
16119
  response: {
16117
- id: k.message_id,
16118
- type: k.data.type,
16119
- content: k.data.content
16120
+ id: O.message_id,
16121
+ type: O.data.type,
16122
+ content: O.data.content
16120
16123
  }
16121
16124
  };
16122
- e(N, L);
16123
- }, b = (k) => {
16124
- const L = parseInt(k.data.code), N = fs(L);
16125
- n?.(), c({ code: L, message: N });
16126
- }, v = (k) => {
16127
- t(k.data.content);
16128
- }, y = () => {
16125
+ e(k, N);
16126
+ }, v = (O) => {
16127
+ const N = parseInt(O.data.code), k = fs(N);
16128
+ n?.(), c({ code: N, message: k });
16129
+ }, w = (O) => {
16130
+ t(O.data.content);
16131
+ }, _ = () => {
16129
16132
  l.current && (l.current.close(), l.current = null);
16130
- }, _ = async (k = 1e4) => s.current ? Promise.resolve() : new Promise((L, N) => {
16131
- const S = setTimeout(() => {
16132
- N(
16133
+ }, S = async (O = 1e4) => s.current ? Promise.resolve() : new Promise((N, k) => {
16134
+ const z = setTimeout(() => {
16135
+ k(
16133
16136
  new Error(
16134
- `AppSync connection timeout: Failed to connect within ${k}ms`
16137
+ `AppSync connection timeout: Failed to connect within ${O}ms`
16135
16138
  )
16136
16139
  );
16137
- }, k), M = () => {
16138
- s.current ? (clearTimeout(S), L()) : setTimeout(M, 100);
16140
+ }, O), P = () => {
16141
+ s.current ? (clearTimeout(z), N()) : setTimeout(P, 100);
16139
16142
  };
16140
- M();
16143
+ P();
16141
16144
  });
16142
16145
  return $r.listen(
16143
16146
  "api",
16144
- (k) => {
16145
- const { payload: L } = k;
16146
- L.event === Ys && (L.data?.connectionState === "Connected" ? s.current = !0 : s.current = !1);
16147
+ (O) => {
16148
+ const { payload: N } = O;
16149
+ N.event === Ys && (N.data?.connectionState === "Connected" ? s.current = !0 : s.current = !1);
16147
16150
  }
16148
- ), { connect: d, disconnect: y };
16151
+ ), { connect: h, disconnect: _ };
16149
16152
  }
16150
16153
  function pw({
16151
16154
  appId: e,
@@ -16164,7 +16167,7 @@ function pw({
16164
16167
  onConversationClosed: d,
16165
16168
  isConversationClosed: h
16166
16169
  }) {
16167
- const { saveConversationData: b, clearConversationData: v, updateLastActivity: y } = Hr({ appId: e }), { publishApiError: _, publishNetworkError: k } = Vt(), { showCognition: L, hideCognition: N } = cs(), S = te(
16170
+ const { saveConversationData: b, clearConversationData: v, updateLastActivity: w } = Hr({ appId: e }), { publishApiError: _, publishNetworkError: S } = Vt(), { showCognition: O, hideCognition: N } = cs(), k = te(
16168
16171
  (R, A) => {
16169
16172
  N(), c((U) => {
16170
16173
  const q = U.filter((m) => !m.isThinking);
@@ -16190,29 +16193,29 @@ function pw({
16190
16193
  });
16191
16194
  },
16192
16195
  [o, N, b, c, t]
16193
- ), M = te(() => {
16196
+ ), z = te(() => {
16194
16197
  N(), c((R) => R.filter((A) => !A.isThinking));
16195
- }, [c, N]), { connect: P, disconnect: z } = dw({
16196
- onReceiveMessage: S,
16197
- onReceiveCognition: L,
16198
- onError: M,
16198
+ }, [c, N]), { connect: P, disconnect: M } = dw({
16199
+ onReceiveMessage: k,
16200
+ onReceiveCognition: O,
16201
+ onError: z,
16199
16202
  onConversationClosed: d,
16200
16203
  chatSettings: s
16201
- }), { expectMessage: x, stopPolling: C } = Hm({
16204
+ }), { expectMessage: x, stopPolling: E } = Hm({
16202
16205
  apiClient: a,
16203
16206
  conversationId: u?.id || null,
16204
16207
  messages: l,
16205
16208
  setMessages: c,
16206
16209
  chatOpen: p,
16207
- onReceiveMessage: S,
16210
+ onReceiveMessage: k,
16208
16211
  onConversationClosed: d
16209
16212
  }), I = te(() => {
16210
- z(), C(), c(
16213
+ M(), E(), c(
16211
16214
  (R) => R.filter((A) => Array.isArray(A) ? !1 : A.isWelcomeMessage)
16212
16215
  ), v(), f(null);
16213
16216
  }, [
16214
- z,
16215
- C,
16217
+ M,
16218
+ E,
16216
16219
  v,
16217
16220
  c,
16218
16221
  f
@@ -16236,9 +16239,9 @@ function pw({
16236
16239
  // Temporary ID
16237
16240
  id: crypto.randomUUID()
16238
16241
  };
16239
- L();
16242
+ O();
16240
16243
  const U = [...l, A];
16241
- c(U), y();
16244
+ c(U), w();
16242
16245
  try {
16243
16246
  let q = u?.id;
16244
16247
  q || (q = (await a.createConversation({
@@ -16263,16 +16266,16 @@ function pw({
16263
16266
  } catch (q) {
16264
16267
  throw N(), c(
16265
16268
  (H) => H.filter((ne) => !ne.isThinking)
16266
- ), q instanceof jr || q instanceof Xe && q.status === 403 ? (k(), q) : (_(q), q instanceof Xe && q.status >= 500 && (f(null), v(), c((H) => H.slice(0, -1)), a.reset()), q);
16269
+ ), q instanceof jr || q instanceof Xe && q.status === 403 ? (S(), q) : (_(q), q instanceof Xe && q.status >= 500 && (f(null), v(), c((H) => H.slice(0, -1)), a.reset()), q);
16267
16270
  }
16268
16271
  },
16269
16272
  [
16270
16273
  a,
16271
16274
  h,
16272
- L,
16275
+ O,
16273
16276
  l,
16274
16277
  c,
16275
- y,
16278
+ w,
16276
16279
  u?.id,
16277
16280
  i,
16278
16281
  t,
@@ -16282,7 +16285,7 @@ function pw({
16282
16285
  P,
16283
16286
  N,
16284
16287
  _,
16285
- k,
16288
+ S,
16286
16289
  v,
16287
16290
  n,
16288
16291
  r
@@ -16355,38 +16358,38 @@ function gw({
16355
16358
  baseURL: p,
16356
16359
  appId: t
16357
16360
  })
16358
- ), [h, b] = W(null), [v, y] = W(null), [_, k] = W([]), [L, N] = W(!1), M = hw(`sdk-boot-${t}`, () => d.boot()).fetch;
16361
+ ), [h, b] = W(null), [v, w] = W(null), [_, S] = W([]), [O, N] = W(!1), z = hw(`sdk-boot-${t}`, () => d.boot()).fetch;
16359
16362
  return re(() => {
16360
16363
  if (c())
16361
16364
  u();
16362
16365
  else {
16363
16366
  const {
16364
16367
  conversationId: P,
16365
- userId: z,
16368
+ userId: M,
16366
16369
  messages: x
16367
16370
  } = f();
16368
- P && z && (y({
16371
+ P && M && (w({
16369
16372
  id: P
16370
- }), x && x.length > 0 && k(x));
16373
+ }), x && x.length > 0 && S(x));
16371
16374
  }
16372
16375
  }, [f, c, u]), re(() => {
16373
16376
  if (!l) return;
16374
16377
  (async () => {
16375
- const [z, x] = await si(
16378
+ const [M, x] = await si(
16376
16379
  d.getOrganizationByAppId(t)
16377
16380
  );
16378
16381
  if (x) {
16379
16382
  console.error("Failed to fetch organization data:", x), N(!0);
16380
16383
  return;
16381
16384
  }
16382
- d.setRegion(z.region);
16383
- const [C, I] = await si(M());
16385
+ d.setRegion(M.region);
16386
+ const [E, I] = await si(z());
16384
16387
  if (I) {
16385
16388
  N(!0);
16386
16389
  return;
16387
16390
  }
16388
- const D = C.chat_settings.welcome_message;
16389
- b(C.chat_settings), D && _.length === 0 && k([
16391
+ const D = E.chat_settings.welcome_message;
16392
+ b(E.chat_settings), D && _.length === 0 && S([
16390
16393
  {
16391
16394
  id: crypto.randomUUID(),
16392
16395
  content: D,
@@ -16406,7 +16409,7 @@ function gw({
16406
16409
  chatSettings: h,
16407
16410
  currentConversation: v,
16408
16411
  messages: _,
16409
- isReady: L
16412
+ isReady: O
16410
16413
  };
16411
16414
  }
16412
16415
  function bw(e) {
@@ -16449,18 +16452,18 @@ function yw({
16449
16452
  deviceId: h,
16450
16453
  apiClient: b,
16451
16454
  chatSettings: v,
16452
- currentConversation: y,
16455
+ currentConversation: w,
16453
16456
  messages: _,
16454
- isReady: k
16457
+ isReady: S
16455
16458
  } = gw({
16456
16459
  apiUrl: t,
16457
16460
  appId: n,
16458
16461
  initialUserId: r,
16459
16462
  userName: i,
16460
16463
  userData: o
16461
- }), L = Um({ chatProps: a, chatSettings: v }), [N, S] = W(l ?? u), M = br(N, 200), [P, z] = W(
16464
+ }), O = Um({ chatProps: a, chatSettings: v }), [N, k] = W(l ?? u), z = br(N, 200), [P, M] = W(
16462
16465
  a?.messages ?? []
16463
- ), [x, C] = W(y), [I, D] = W(!1), R = te(() => {
16466
+ ), [x, E] = W(w), [I, D] = W(!1), R = te(() => {
16464
16467
  D(!0);
16465
16468
  }, []), [A, U] = W({
16466
16469
  text: "",
@@ -16475,19 +16478,19 @@ function yw({
16475
16478
  deviceId: h,
16476
16479
  apiClient: b,
16477
16480
  chatSettings: v,
16478
- setMessages: z,
16481
+ setMessages: M,
16479
16482
  messages: P,
16480
16483
  currentConversation: x,
16481
- setCurrentConversation: C,
16484
+ setCurrentConversation: E,
16482
16485
  chatOpen: N,
16483
16486
  onConversationClosed: R,
16484
16487
  isConversationClosed: I
16485
16488
  });
16486
16489
  re(() => {
16487
- _.length > 0 && z(_);
16490
+ _.length > 0 && M(_);
16488
16491
  }, [_]), re(() => {
16489
- y && C(y);
16490
- }, [y]), re(() => {
16492
+ w && E(w);
16493
+ }, [w]), re(() => {
16491
16494
  x && d && b?.identifyUser({
16492
16495
  userId: p,
16493
16496
  userName: i,
@@ -16514,25 +16517,25 @@ function yw({
16514
16517
  }));
16515
16518
  }, []);
16516
16519
  return re(() => {
16517
- v?.auto_display_welcome_message && v?.welcome_message && k && U((ae) => ({
16520
+ v?.auto_display_welcome_message && v?.welcome_message && S && U((ae) => ({
16518
16521
  ...ae,
16519
16522
  text: v.welcome_message || ae.text,
16520
16523
  isVisible: !0
16521
16524
  }));
16522
16525
  }, [
16523
- k,
16526
+ S,
16524
16527
  v?.auto_display_welcome_message,
16525
16528
  v?.welcome_message
16526
16529
  ]), {
16527
- isReady: k,
16530
+ isReady: S,
16528
16531
  isMobile: u,
16529
- chatInterfaceProps: L,
16532
+ chatInterfaceProps: O,
16530
16533
  chatOpen: N,
16531
- chatOpenDebounced: M,
16534
+ chatOpenDebounced: z,
16532
16535
  messages: P,
16533
16536
  portalContainer: f,
16534
16537
  onSendMessage: q,
16535
- setChatOpen: S,
16538
+ setChatOpen: k,
16536
16539
  onCleanMessages: H,
16537
16540
  proactiveMessage: A,
16538
16541
  hideProactiveMessage: m,
@@ -16562,7 +16565,7 @@ function xw({
16562
16565
  children: e
16563
16566
  }) {
16564
16567
  const t = ww();
16565
- return /* @__PURE__ */ w(ls.Provider, { value: t, children: e });
16568
+ return /* @__PURE__ */ y(ls.Provider, { value: t, children: e });
16566
16569
  }
16567
16570
  const vw = ({
16568
16571
  children: e
@@ -16575,7 +16578,7 @@ const vw = ({
16575
16578
  publishNetworkError: () => i(!0),
16576
16579
  clearError: () => n(null)
16577
16580
  };
16578
- return /* @__PURE__ */ w(ds.Provider, { value: c, children: e });
16581
+ return /* @__PURE__ */ y(ds.Provider, { value: c, children: e });
16579
16582
  }, kw = 100;
16580
16583
  function Sw({
16581
16584
  appId: e,
@@ -16596,17 +16599,17 @@ function Sw({
16596
16599
  INTERNAL_ONLY_ENVIRONMENT: b = "live",
16597
16600
  INTERNAL_ONLY_API_URL: v
16598
16601
  }) {
16599
- const { hideSdk: y } = Vt(), {
16602
+ const { hideSdk: w } = Vt(), {
16600
16603
  isReady: _,
16601
- isMobile: k,
16602
- chatOpen: L,
16604
+ isMobile: S,
16605
+ chatOpen: O,
16603
16606
  chatInterfaceProps: N,
16604
- chatOpenDebounced: S,
16605
- messages: M,
16607
+ chatOpenDebounced: k,
16608
+ messages: z,
16606
16609
  portalContainer: P,
16607
- onSendMessage: z,
16610
+ onSendMessage: M,
16608
16611
  setChatOpen: x,
16609
- onCleanMessages: C,
16612
+ onCleanMessages: E,
16610
16613
  proactiveMessage: I,
16611
16614
  hideProactiveMessage: D,
16612
16615
  isConversationClosed: R,
@@ -16623,7 +16626,7 @@ function Sw({
16623
16626
  initialOpen: c,
16624
16627
  proactiveMessageHideDelay: o
16625
16628
  });
16626
- if (y) return null;
16629
+ if (w) return null;
16627
16630
  const U = () => /* @__PURE__ */ B(
16628
16631
  "div",
16629
16632
  {
@@ -16640,37 +16643,37 @@ function Sw({
16640
16643
  ...p ? { position: "relative", inset: 0, width: "100%", height: "100%" } : {}
16641
16644
  },
16642
16645
  children: [
16643
- /* @__PURE__ */ w("style", { children: _l }),
16644
- /* @__PURE__ */ w(
16646
+ /* @__PURE__ */ y("style", { children: _l }),
16647
+ /* @__PURE__ */ y(
16645
16648
  Bn,
16646
16649
  {
16647
16650
  className: "eloquentai-chat-messaging",
16648
16651
  head: /* @__PURE__ */ B(We, { children: [
16649
- /* @__PURE__ */ w("link", { rel: "preconnect", href: "https://fonts.googleapis.com" }),
16650
- /* @__PURE__ */ w("link", { rel: "preconnect", href: "https://fonts.gstatic.com" }),
16651
- /* @__PURE__ */ w(
16652
+ /* @__PURE__ */ y("link", { rel: "preconnect", href: "https://fonts.googleapis.com" }),
16653
+ /* @__PURE__ */ y("link", { rel: "preconnect", href: "https://fonts.gstatic.com" }),
16654
+ /* @__PURE__ */ y(
16652
16655
  "link",
16653
16656
  {
16654
16657
  href: "https://fonts.googleapis.com/css2?family=Roboto:ital,wght@0,100;0,300;0,400;0,500;0,700;0,900;1,100;1,300;1,400;1,500;1,700;1,900&display=swap",
16655
16658
  rel: "stylesheet"
16656
16659
  }
16657
16660
  ),
16658
- /* @__PURE__ */ w("style", { children: Sn })
16661
+ /* @__PURE__ */ y("style", { children: Sn })
16659
16662
  ] }),
16660
16663
  style: {
16661
- display: L || S ? "block" : "none",
16662
- width: k ? "100vw" : "400px",
16664
+ display: O || k ? "block" : "none",
16665
+ width: S ? "100vw" : "400px",
16663
16666
  // 100dvh accounts for mobile browser chrome (e.g. address bar); 100vh fallback for older browsers
16664
16667
  "--chat-mobile-viewport-height": "100dvh",
16665
- height: k ? "var(--chat-mobile-viewport-height, 100vh)" : "700px",
16666
- maxHeight: k ? "var(--chat-mobile-viewport-height, 100vh)" : `calc(100% - ${kw}px)`,
16668
+ height: S ? "var(--chat-mobile-viewport-height, 100vh)" : "700px",
16669
+ maxHeight: S ? "var(--chat-mobile-viewport-height, 100vh)" : `calc(100% - ${kw}px)`,
16667
16670
  border: "none",
16668
16671
  zIndex: 2147483e3,
16669
16672
  position: "fixed",
16670
- top: k ? 0 : void 0,
16671
- left: k ? 0 : void 0,
16672
- right: k ? 0 : 17,
16673
- bottom: k ? 0 : 84,
16673
+ top: S ? 0 : void 0,
16674
+ left: S ? 0 : void 0,
16675
+ right: S ? 0 : 17,
16676
+ bottom: S ? 0 : 84,
16674
16677
  ...p ? {
16675
16678
  position: "relative",
16676
16679
  top: 0,
@@ -16683,32 +16686,32 @@ function Sw({
16683
16686
  zIndex: 0
16684
16687
  } : {}
16685
16688
  },
16686
- children: _ ? /* @__PURE__ */ w(
16689
+ children: _ ? /* @__PURE__ */ y(
16687
16690
  zm,
16688
16691
  {
16689
16692
  ...N,
16690
- isOpen: L,
16691
- messages: M,
16692
- onSendMessage: z,
16693
+ isOpen: O,
16694
+ messages: z,
16695
+ onSendMessage: M,
16693
16696
  onMessageClick: d,
16694
- isMobile: k,
16697
+ isMobile: S,
16695
16698
  closeButton: s,
16696
16699
  cleanChatButton: l,
16697
16700
  isConversationClosed: R,
16698
16701
  onStartNewConversation: A,
16699
16702
  onClose: () => x(!1),
16700
16703
  onCleanChat: () => {
16701
- C(), h?.();
16704
+ E(), h?.();
16702
16705
  }
16703
16706
  }
16704
- ) : /* @__PURE__ */ w(ms, { isOpen: L, isMobile: k })
16707
+ ) : /* @__PURE__ */ y(ms, { isOpen: O, isMobile: S })
16705
16708
  }
16706
16709
  ),
16707
- !u && /* @__PURE__ */ w(
16710
+ !u && /* @__PURE__ */ y(
16708
16711
  Bn,
16709
16712
  {
16710
16713
  className: "eloquentai-chat-launcher",
16711
- head: /* @__PURE__ */ w("style", { children: Sn }),
16714
+ head: /* @__PURE__ */ y("style", { children: Sn }),
16712
16715
  style: {
16713
16716
  position: "fixed",
16714
16717
  bottom: 17,
@@ -16717,28 +16720,28 @@ function Sw({
16717
16720
  width: 48,
16718
16721
  height: 48,
16719
16722
  border: "none",
16720
- zIndex: k ? 2147482999 : 2147483e3
16723
+ zIndex: S ? 2147482999 : 2147483e3
16721
16724
  },
16722
- children: /* @__PURE__ */ w(
16725
+ children: /* @__PURE__ */ y(
16723
16726
  Al,
16724
16727
  {
16725
- isOpen: L,
16728
+ isOpen: O,
16726
16729
  toggleBubble: () => x((H) => !H)
16727
16730
  }
16728
16731
  )
16729
16732
  }
16730
16733
  ),
16731
- N?.displayWelcomeMessages ? /* @__PURE__ */ w(
16734
+ N?.displayWelcomeMessages ? /* @__PURE__ */ y(
16732
16735
  Bn,
16733
16736
  {
16734
16737
  className: "eloquentai-chat-proactive-message",
16735
- head: /* @__PURE__ */ w("style", { children: Sn }),
16738
+ head: /* @__PURE__ */ y("style", { children: Sn }),
16736
16739
  style: {
16737
16740
  position: "fixed",
16738
16741
  bottom: 30,
16739
16742
  right: 17
16740
16743
  },
16741
- children: /* @__PURE__ */ w(Vo, { ...N?.theme ?? {}, children: !f && I && !c && /* @__PURE__ */ w(
16744
+ children: /* @__PURE__ */ y(Vo, { ...N?.theme ?? {}, children: !f && I && !c && /* @__PURE__ */ y(
16742
16745
  qm,
16743
16746
  {
16744
16747
  message: I.text,
@@ -16755,15 +16758,15 @@ function Sw({
16755
16758
  ]
16756
16759
  }
16757
16760
  );
16758
- return /* @__PURE__ */ w(We, { children: p ? U() : P ? /* @__PURE__ */ w(Fm, { container: P, children: U() }) : null });
16761
+ return /* @__PURE__ */ y(We, { children: p ? U() : P ? /* @__PURE__ */ y(Fm, { container: P, children: U() }) : null });
16759
16762
  }
16760
16763
  function Ew(e) {
16761
- return /* @__PURE__ */ w(vw, { children: /* @__PURE__ */ w(xw, { children: /* @__PURE__ */ w(Sw, { ...e }) }) });
16764
+ return /* @__PURE__ */ y(vw, { children: /* @__PURE__ */ y(xw, { children: /* @__PURE__ */ y(Sw, { ...e }) }) });
16762
16765
  }
16763
16766
  function Mw(e, t) {
16764
16767
  return ((r, i, o) => {
16765
16768
  const a = Cl.createRoot(i);
16766
- return a.render(/* @__PURE__ */ w(r, { ...o })), a.unmount;
16769
+ return a.render(/* @__PURE__ */ y(r, { ...o })), a.unmount;
16767
16770
  })(Ew, e, t);
16768
16771
  }
16769
16772
  export {
@@ -16772,4 +16775,4 @@ export {
16772
16775
  aa as g,
16773
16776
  Mw as r
16774
16777
  };
16775
- //# sourceMappingURL=index-Bh7o228L.js.map
16778
+ //# sourceMappingURL=index-Dqos2v0b.js.map