@iota-uz/sdk 0.44.0 → 0.45.0

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.
Files changed (65) hide show
  1. package/dist/chat-ui/index.js +658 -656
  2. package/dist/client-host/identity.d.ts +4 -4
  3. package/dist/client-host/identity.js +2 -2
  4. package/dist/lens/{CascadePanel-BRmkM66c.js → CascadePanel-bXr7ekeZ.js} +74 -74
  5. package/dist/lens/{ChartDataEquivalent-CcGY9owW.js → ChartDataEquivalent-ZsncHfTF.js} +1 -1
  6. package/dist/lens/{ChartPanel-CdQYCwUh.js → ChartPanel-Cku9c87t.js} +105 -105
  7. package/dist/lens/{CoveragePanel-BdbUu97M.js → CoveragePanel-DE3fi5c7.js} +36 -36
  8. package/dist/lens/{GaugePanel-BPSnyl2f.js → GaugePanel-DwR4zylR.js} +8 -8
  9. package/dist/lens/{MapPanel-CMGzE0bO.js → MapPanel-DJSiLZSz.js} +22 -22
  10. package/dist/lens/{MetricFlowPanel-Qo6h8eYB.js → MetricFlowPanel-Dsp_ntas.js} +15 -15
  11. package/dist/lens/{MetricHierarchyPanel-M6Jj_8f3.js → MetricHierarchyPanel-BYcy4FNw.js} +19 -19
  12. package/dist/lens/{MetricRelationshipPanel-o1JgnNB5.js → MetricRelationshipPanel-Gh5RKIu1.js} +20 -20
  13. package/dist/lens/PrintReport-RnKpLle9.js +1954 -0
  14. package/dist/lens/QualityChip-BxAn3wh6.js +90 -0
  15. package/dist/lens/TablePanel-DU_ydQ1x.js +980 -0
  16. package/dist/lens/{adapter-LlQCVH2d.js → adapter-CZZIKpwb.js} +7 -7
  17. package/dist/lens/contract/schemas.d.ts +4 -0
  18. package/dist/lens/contract/schemas.d.ts.map +1 -1
  19. package/dist/lens/contract/types.d.ts +23 -0
  20. package/dist/lens/contract/types.d.ts.map +1 -1
  21. package/dist/lens/{dashboardEdit-CzTrZ9GY.js → dashboardEdit-BLzL02OH.js} +31 -31
  22. package/dist/lens/formula/FormulaTip.d.ts +20 -0
  23. package/dist/lens/formula/FormulaTip.d.ts.map +1 -0
  24. package/dist/lens/formula/FormulaView.d.ts +34 -0
  25. package/dist/lens/formula/FormulaView.d.ts.map +1 -0
  26. package/dist/lens/formula/PanelFormula.d.ts +17 -0
  27. package/dist/lens/formula/PanelFormula.d.ts.map +1 -0
  28. package/dist/lens/formula/element.d.ts +22 -0
  29. package/dist/lens/formula/element.d.ts.map +1 -0
  30. package/dist/lens/formula/values.d.ts +20 -0
  31. package/dist/lens/formula/values.d.ts.map +1 -0
  32. package/dist/lens/icons.d.ts +5 -0
  33. package/dist/lens/icons.d.ts.map +1 -1
  34. package/dist/lens/{index-C9_EJaLN.js → index-BJIuggdQ.js} +6232 -5521
  35. package/dist/lens/{index-ha5KBmiS.js → index-Dm3Y4NDq.js} +1 -1
  36. package/dist/lens/index.d.ts +2 -0
  37. package/dist/lens/index.d.ts.map +1 -1
  38. package/dist/lens/index.js +57 -54
  39. package/dist/lens/{install-B0hhW_BN.js → install-C48hgC9S.js} +1 -1
  40. package/dist/lens/{install-z4ugcXiK.js → install-DB0eod1K.js} +1 -1
  41. package/dist/lens/{install-0VKAMdaz.js → install-DCaRpfvv.js} +1 -1
  42. package/dist/lens/{install-D50hM31K.js → install-pvJpTP1f.js} +1 -1
  43. package/dist/lens/katex-B6_r1m5T.js +11681 -0
  44. package/dist/lens/{keys-B3RofDXR.js → keys-BAkGzg_y.js} +2 -2
  45. package/dist/lens/panels/PanelFrame.d.ts.map +1 -1
  46. package/dist/lens/panels/StatPanel.d.ts.map +1 -1
  47. package/dist/lens/panels/TablePanel.d.ts.map +1 -1
  48. package/dist/lens/{prefetch-BGXardWv.js → prefetch-j8VKR0tY.js} +2 -2
  49. package/dist/lens/{prefetchPanels-DXHorJDF.js → prefetchPanels-vwQqxrs4.js} +1 -1
  50. package/dist/lens/print/PrintReport.d.ts.map +1 -1
  51. package/dist/lens/print/formula.d.ts +9 -0
  52. package/dist/lens/print/formula.d.ts.map +1 -1
  53. package/dist/lens/{print-BSeT1zzv.js → print-CuBcYmVF.js} +1 -1
  54. package/dist/lens/runtime/messages.d.ts.map +1 -1
  55. package/dist/lens/runtime/provider.d.ts +1 -0
  56. package/dist/lens/runtime/provider.d.ts.map +1 -1
  57. package/dist/lens/{scales-nh-3WZ_4.js → scales-BSDq-uby.js} +3 -3
  58. package/dist/lens/style.css +1 -1
  59. package/dist/sdk-identity.cjs +3 -3
  60. package/dist/sdk-identity.js +3 -3
  61. package/dist/sdk-identity.json +2 -2
  62. package/package.json +1 -1
  63. package/dist/lens/PrintReport-xIL8mIuB.js +0 -1907
  64. package/dist/lens/TablePanel-DXQcrnkI.js +0 -947
  65. package/dist/lens/metricViews-KImVDfFt.js +0 -211
@@ -25,7 +25,7 @@ function Is(t, e) {
25
25
  }
26
26
  });
27
27
  }
28
- function fz(t) {
28
+ function pz(t) {
29
29
  return new Proxy({}, {
30
30
  get: (e, r) => Reflect.get(t(), r),
31
31
  has: (e, r) => Reflect.has(t(), r),
@@ -1850,7 +1850,7 @@ function Ob() {
1850
1850
  return Is(t.subscribeInput, t.getInputSnapshot);
1851
1851
  }
1852
1852
  const cc = mi(null);
1853
- function pz(t) {
1853
+ function mz(t) {
1854
1854
  const e = t.context ?? (typeof window < "u" ? window.__APPLET_CONTEXT__ : void 0);
1855
1855
  if (!e)
1856
1856
  throw new Error("APPLET_CONTEXT not found. Pass a `context` prop or ensure the server injected context into window.__APPLET_CONTEXT__.");
@@ -1870,7 +1870,7 @@ function zs() {
1870
1870
  throw new Error("useIotaContext must be used within IotaContextProvider");
1871
1871
  return t;
1872
1872
  }
1873
- function mz(t) {
1873
+ function bz(t) {
1874
1874
  const e = typeof window < "u" ? window.__APPLET_CONTEXT__ : void 0;
1875
1875
  return e ? e.user.permissions.includes(t) : !1;
1876
1876
  }
@@ -3463,7 +3463,7 @@ function Na(t, e = Ih) {
3463
3463
  throw new Error(`File too large: ${p}MB exceeds ${m}MB limit`);
3464
3464
  }
3465
3465
  }
3466
- function bz(t, e = Ih) {
3466
+ function xz(t, e = Ih) {
3467
3467
  if (Na(t, e), !dc(t.type))
3468
3468
  throw new Error(`Invalid file type: ${t.type}. Only image files are allowed.`);
3469
3469
  }
@@ -20283,7 +20283,7 @@ function H3(t) {
20283
20283
  }
20284
20284
  });
20285
20285
  }
20286
- function xz(t) {
20286
+ function vz(t) {
20287
20287
  const [e, r] = Da(t, ["dataSource", "sessionId", "rateLimiter", "onSessionCreated"]);
20288
20288
  return X(Bb, {
20289
20289
  get dataSource() {
@@ -20309,7 +20309,7 @@ function xz(t) {
20309
20309
  }
20310
20310
  $t(["click", "mousedown", "keydown"]);
20311
20311
  var X3 = /* @__PURE__ */ G('<div class="flex items-center justify-between px-4 pt-3 pb-1"><div class="inline-flex rounded-lg bg-gray-100 p-0.5 dark:bg-gray-800"></div><span class="hidden select-none text-[10px] text-gray-400 sm:block dark:text-gray-500">⇧M'), Y3 = /* @__PURE__ */ G("<button type=button><span>");
20312
- function vz() {
20312
+ function yz() {
20313
20313
  const t = Ls(), e = zs(), r = Tt(), i = le(() => {
20314
20314
  var g, p;
20315
20315
  return ((p = (g = e.extensions) == null ? void 0 : g.llm) == null ? void 0 : p.models) ?? [];
@@ -41203,7 +41203,10 @@ function hE(t) {
41203
41203
  });
41204
41204
  };
41205
41205
  }
41206
- const aa = ["ariaDescribedBy", "ariaLabel", "ariaLabelledBy"], Pd = {
41206
+ const gE = {
41207
+ strict: "ignore",
41208
+ trust: !1
41209
+ }, aa = ["ariaDescribedBy", "ariaLabel", "ariaLabelledBy"], Pd = {
41207
41210
  ancestors: {
41208
41211
  tbody: ["table"],
41209
41212
  td: ["table"],
@@ -41398,7 +41401,7 @@ const aa = ["ariaDescribedBy", "ariaLabel", "ariaLabelledBy"], Pd = {
41398
41401
  "var"
41399
41402
  ]
41400
41403
  }, Un = {}.hasOwnProperty;
41401
- function gE(t, e) {
41404
+ function fE(t, e) {
41402
41405
  let r = { type: "root", children: [] };
41403
41406
  const i = {
41404
41407
  schema: e ? { ...Pd, ...e } : Pd,
@@ -41414,37 +41417,37 @@ function gp(t, e) {
41414
41417
  );
41415
41418
  switch (typeof r.type == "string" ? r.type : "") {
41416
41419
  case "comment":
41417
- return fE(t, r);
41418
- case "doctype":
41419
41420
  return pE(t, r);
41420
- case "element":
41421
+ case "doctype":
41421
41422
  return mE(t, r);
41422
- case "root":
41423
+ case "element":
41423
41424
  return bE(t, r);
41424
- case "text":
41425
+ case "root":
41425
41426
  return xE(t, r);
41427
+ case "text":
41428
+ return vE(t, r);
41426
41429
  }
41427
41430
  }
41428
41431
  }
41429
- function fE(t, e) {
41432
+ function pE(t, e) {
41430
41433
  if (t.schema.allowComments) {
41431
41434
  const r = typeof e.value == "string" ? e.value : "", i = r.indexOf("-->"), c = { type: "comment", value: i < 0 ? r : r.slice(0, i) };
41432
41435
  return Ti(c, e), c;
41433
41436
  }
41434
41437
  }
41435
- function pE(t, e) {
41438
+ function mE(t, e) {
41436
41439
  if (t.schema.allowDoctypes) {
41437
41440
  const r = { type: "doctype" };
41438
41441
  return Ti(r, e), r;
41439
41442
  }
41440
41443
  }
41441
- function mE(t, e) {
41444
+ function bE(t, e) {
41442
41445
  const r = typeof e.tagName == "string" ? e.tagName : "";
41443
41446
  t.stack.push(r);
41444
41447
  const i = (
41445
41448
  /** @type {Array<ElementContent>} */
41446
41449
  fp(t, e.children)
41447
- ), s = vE(t, e.properties);
41450
+ ), s = yE(t, e.properties);
41448
41451
  t.stack.pop();
41449
41452
  let c = !1;
41450
41453
  if (r && r !== "*" && (!t.schema.tagNames || t.schema.tagNames.includes(r)) && (c = !0, t.schema.ancestors && Un.call(t.schema.ancestors, r))) {
@@ -41463,14 +41466,14 @@ function mE(t, e) {
41463
41466
  };
41464
41467
  return Ti(u, e), u;
41465
41468
  }
41466
- function bE(t, e) {
41469
+ function xE(t, e) {
41467
41470
  const i = { type: "root", children: (
41468
41471
  /** @type {Array<RootContent>} */
41469
41472
  fp(t, e.children)
41470
41473
  ) };
41471
41474
  return Ti(i, e), i;
41472
41475
  }
41473
- function xE(t, e) {
41476
+ function vE(t, e) {
41474
41477
  const i = { type: "text", value: typeof e.value == "string" ? e.value : "" };
41475
41478
  return Ti(i, e), i;
41476
41479
  }
@@ -41489,7 +41492,7 @@ function fp(t, e) {
41489
41492
  }
41490
41493
  return r;
41491
41494
  }
41492
- function vE(t, e) {
41495
+ function yE(t, e) {
41493
41496
  const r = t.stack[t.stack.length - 1], i = t.schema.attributes, s = t.schema.required, c = i && Un.call(i, r) ? i[r] : void 0, u = i && Un.call(i, "*") ? i["*"] : void 0, g = (
41494
41497
  /** @type {Readonly<Record<string, Readonly<unknown>>>} */
41495
41498
  e && typeof e == "object" ? e : {}
@@ -41514,9 +41517,9 @@ function vE(t, e) {
41514
41517
  return p;
41515
41518
  }
41516
41519
  function Hd(t, e, r, i) {
41517
- return e ? Array.isArray(i) ? yE(t, e, r, i) : pp(t, e, r, i) : void 0;
41520
+ return e ? Array.isArray(i) ? wE(t, e, r, i) : pp(t, e, r, i) : void 0;
41518
41521
  }
41519
- function yE(t, e, r, i) {
41522
+ function wE(t, e, r, i) {
41520
41523
  let s = -1;
41521
41524
  const c = [];
41522
41525
  for (; ++s < i.length; ) {
@@ -41526,7 +41529,7 @@ function yE(t, e, r, i) {
41526
41529
  return c;
41527
41530
  }
41528
41531
  function pp(t, e, r, i) {
41529
- if (!(typeof i != "boolean" && typeof i != "number" && typeof i != "string") && wE(t, r, i)) {
41532
+ if (!(typeof i != "boolean" && typeof i != "number" && typeof i != "string") && kE(t, r, i)) {
41530
41533
  if (typeof e == "object" && e.length > 1) {
41531
41534
  let s = !1, c = 0;
41532
41535
  for (; ++c < e.length; ) {
@@ -41546,7 +41549,7 @@ function pp(t, e, r, i) {
41546
41549
  return t.schema.clobber && t.schema.clobberPrefix && t.schema.clobber.includes(r) ? t.schema.clobberPrefix + i : i;
41547
41550
  }
41548
41551
  }
41549
- function wE(t, e, r) {
41552
+ function kE(t, e, r) {
41550
41553
  const i = t.schema.protocols && Un.call(t.schema.protocols, e) ? t.schema.protocols[e] : void 0;
41551
41554
  if (!i || i.length === 0)
41552
41555
  return !0;
@@ -41581,15 +41584,15 @@ function Xd(t, e) {
41581
41584
  if (e.length > 4 && e.slice(0, 4).toLowerCase() === "data")
41582
41585
  return r;
41583
41586
  }
41584
- function kE(t) {
41587
+ function SE(t) {
41585
41588
  return function(e) {
41586
41589
  return (
41587
41590
  /** @type {Root} */
41588
- gE(e, t)
41591
+ fE(e, t)
41589
41592
  );
41590
41593
  };
41591
41594
  }
41592
- const SE = [
41595
+ const CE = [
41593
41596
  "area",
41594
41597
  "base",
41595
41598
  "basefont",
@@ -41610,17 +41613,17 @@ const SE = [
41610
41613
  "source",
41611
41614
  "track",
41612
41615
  "wbr"
41613
- ], CE = /["&'<>`]/g, AE = /[\uD800-\uDBFF][\uDC00-\uDFFF]/g, TE = (
41616
+ ], AE = /["&'<>`]/g, TE = /[\uD800-\uDBFF][\uDC00-\uDFFF]/g, EE = (
41614
41617
  // eslint-disable-next-line no-control-regex, unicorn/no-hex-escape
41615
41618
  /[\x01-\t\v\f\x0E-\x1F\x7F\x81\x8D\x8F\x90\x9D\xA0-\uFFFF]/g
41616
- ), EE = /[|\\{}()[\]^$+*?.]/g, Yd = /* @__PURE__ */ new WeakMap();
41617
- function $E(t, e) {
41619
+ ), $E = /[|\\{}()[\]^$+*?.]/g, Yd = /* @__PURE__ */ new WeakMap();
41620
+ function _E(t, e) {
41618
41621
  if (t = t.replace(
41619
- e.subset ? _E(e.subset) : CE,
41622
+ e.subset ? ME(e.subset) : AE,
41620
41623
  i
41621
41624
  ), e.subset || e.escapeOnly)
41622
41625
  return t;
41623
- return t.replace(AE, r).replace(TE, i);
41626
+ return t.replace(TE, r).replace(EE, i);
41624
41627
  function r(s, c, u) {
41625
41628
  return e.format(
41626
41629
  (s.charCodeAt(0) - 55296) * 1024 + s.charCodeAt(1) - 56320 + 65536,
@@ -41636,28 +41639,28 @@ function $E(t, e) {
41636
41639
  );
41637
41640
  }
41638
41641
  }
41639
- function _E(t) {
41642
+ function ME(t) {
41640
41643
  let e = Yd.get(t);
41641
- return e || (e = ME(t), Yd.set(t, e)), e;
41644
+ return e || (e = IE(t), Yd.set(t, e)), e;
41642
41645
  }
41643
- function ME(t) {
41646
+ function IE(t) {
41644
41647
  const e = [];
41645
41648
  let r = -1;
41646
41649
  for (; ++r < t.length; )
41647
- e.push(t[r].replace(EE, "\\$&"));
41650
+ e.push(t[r].replace($E, "\\$&"));
41648
41651
  return new RegExp("(?:" + e.join("|") + ")", "g");
41649
41652
  }
41650
- const IE = /[\dA-Fa-f]/;
41651
- function LE(t, e, r) {
41653
+ const LE = /[\dA-Fa-f]/;
41654
+ function zE(t, e, r) {
41652
41655
  const i = "&#x" + t.toString(16).toUpperCase();
41653
- return r && e && !IE.test(String.fromCharCode(e)) ? i : i + ";";
41656
+ return r && e && !LE.test(String.fromCharCode(e)) ? i : i + ";";
41654
41657
  }
41655
- const zE = /\d/;
41656
- function RE(t, e, r) {
41658
+ const RE = /\d/;
41659
+ function DE(t, e, r) {
41657
41660
  const i = "&#" + String(t);
41658
- return r && e && !zE.test(String.fromCharCode(e)) ? i : i + ";";
41661
+ return r && e && !RE.test(String.fromCharCode(e)) ? i : i + ";";
41659
41662
  }
41660
- const DE = [
41663
+ const NE = [
41661
41664
  "AElig",
41662
41665
  "AMP",
41663
41666
  "Aacute",
@@ -42017,7 +42020,7 @@ const DE = [
42017
42020
  lsaquo: "‹",
42018
42021
  rsaquo: "›",
42019
42022
  euro: "€"
42020
- }, NE = [
42023
+ }, BE = [
42021
42024
  "cent",
42022
42025
  "copy",
42023
42026
  "divide",
@@ -42030,63 +42033,63 @@ const DE = [
42030
42033
  let ji;
42031
42034
  for (ji in Qo)
42032
42035
  mp.call(Qo, ji) && (Ul[Qo[ji]] = ji);
42033
- const BE = /[^\dA-Za-z]/;
42034
- function FE(t, e, r, i) {
42036
+ const FE = /[^\dA-Za-z]/;
42037
+ function OE(t, e, r, i) {
42035
42038
  const s = String.fromCharCode(t);
42036
42039
  if (mp.call(Ul, s)) {
42037
42040
  const c = Ul[s], u = "&" + c;
42038
- return r && DE.includes(c) && !NE.includes(c) && (!i || e && e !== 61 && BE.test(String.fromCharCode(e))) ? u : u + ";";
42041
+ return r && NE.includes(c) && !BE.includes(c) && (!i || e && e !== 61 && FE.test(String.fromCharCode(e))) ? u : u + ";";
42039
42042
  }
42040
42043
  return "";
42041
42044
  }
42042
- function OE(t, e, r) {
42043
- let i = LE(t, e, r.omitOptionalSemicolons), s;
42044
- if ((r.useNamedReferences || r.useShortestReferences) && (s = FE(
42045
+ function PE(t, e, r) {
42046
+ let i = zE(t, e, r.omitOptionalSemicolons), s;
42047
+ if ((r.useNamedReferences || r.useShortestReferences) && (s = OE(
42045
42048
  t,
42046
42049
  e,
42047
42050
  r.omitOptionalSemicolons,
42048
42051
  r.attribute
42049
42052
  )), (r.useShortestReferences || !s) && r.useShortestReferences) {
42050
- const c = RE(t, e, r.omitOptionalSemicolons);
42053
+ const c = DE(t, e, r.omitOptionalSemicolons);
42051
42054
  c.length < i.length && (i = c);
42052
42055
  }
42053
42056
  return s && (!r.useShortestReferences || s.length < i.length) ? s : i;
42054
42057
  }
42055
42058
  function Ma(t, e) {
42056
- return $E(t, Object.assign({ format: OE }, e));
42059
+ return _E(t, Object.assign({ format: PE }, e));
42057
42060
  }
42058
- const PE = /^>|^->|<!--|-->|--!>|<!-$/g, HE = [">"], XE = ["<", ">"];
42059
- function YE(t, e, r, i) {
42061
+ const HE = /^>|^->|<!--|-->|--!>|<!-$/g, XE = [">"], YE = ["<", ">"];
42062
+ function WE(t, e, r, i) {
42060
42063
  return i.settings.bogusComments ? "<?" + Ma(
42061
42064
  t.value,
42062
42065
  Object.assign({}, i.settings.characterReferences, {
42063
- subset: HE
42066
+ subset: XE
42064
42067
  })
42065
- ) + ">" : "<!--" + t.value.replace(PE, s) + "-->";
42068
+ ) + ">" : "<!--" + t.value.replace(HE, s) + "-->";
42066
42069
  function s(c) {
42067
42070
  return Ma(
42068
42071
  c,
42069
42072
  Object.assign({}, i.settings.characterReferences, {
42070
- subset: XE
42073
+ subset: YE
42071
42074
  })
42072
42075
  );
42073
42076
  }
42074
42077
  }
42075
- function WE(t, e, r, i) {
42078
+ function UE(t, e, r, i) {
42076
42079
  return "<!" + (i.settings.upperDoctype ? "DOCTYPE" : "doctype") + (i.settings.tightDoctype ? "" : " ") + "html>";
42077
42080
  }
42078
- const UE = /[ \t\n\f\r]/g;
42081
+ const GE = /[ \t\n\f\r]/g;
42079
42082
  function tu(t) {
42080
42083
  return typeof t == "object" ? t.type === "text" ? Wd(t.value) : !1 : Wd(t);
42081
42084
  }
42082
42085
  function Wd(t) {
42083
- return t.replace(UE, "") === "";
42086
+ return t.replace(GE, "") === "";
42084
42087
  }
42085
- const Cr = xp(1), bp = xp(-1), GE = [];
42088
+ const Cr = xp(1), bp = xp(-1), jE = [];
42086
42089
  function xp(t) {
42087
42090
  return e;
42088
42091
  function e(r, i, s) {
42089
- const c = r ? r.children : GE;
42092
+ const c = r ? r.children : jE;
42090
42093
  let u = (i || 0) + t, g = c[u];
42091
42094
  if (!s)
42092
42095
  for (; g && tu(g); )
@@ -42094,60 +42097,60 @@ function xp(t) {
42094
42097
  return g;
42095
42098
  }
42096
42099
  }
42097
- const jE = {}.hasOwnProperty;
42100
+ const qE = {}.hasOwnProperty;
42098
42101
  function vp(t) {
42099
42102
  return e;
42100
42103
  function e(r, i, s) {
42101
- return jE.call(t, r.tagName) && t[r.tagName](r, i, s);
42104
+ return qE.call(t, r.tagName) && t[r.tagName](r, i, s);
42102
42105
  }
42103
42106
  }
42104
42107
  const ru = vp({
42105
- body: VE,
42108
+ body: QE,
42106
42109
  caption: Zo,
42107
42110
  colgroup: Zo,
42108
- dd: JE,
42109
- dt: KE,
42111
+ dd: e$,
42112
+ dt: JE,
42110
42113
  head: Zo,
42111
- html: qE,
42112
- li: ZE,
42113
- optgroup: e$,
42114
- option: t$,
42115
- p: QE,
42114
+ html: VE,
42115
+ li: KE,
42116
+ optgroup: t$,
42117
+ option: r$,
42118
+ p: ZE,
42116
42119
  rp: Ud,
42117
42120
  rt: Ud,
42118
- tbody: n$,
42121
+ tbody: a$,
42119
42122
  td: Gd,
42120
- tfoot: a$,
42123
+ tfoot: i$,
42121
42124
  th: Gd,
42122
- thead: r$,
42123
- tr: i$
42125
+ thead: n$,
42126
+ tr: s$
42124
42127
  });
42125
42128
  function Zo(t, e, r) {
42126
42129
  const i = Cr(r, e, !0);
42127
42130
  return !i || i.type !== "comment" && !(i.type === "text" && tu(i.value.charAt(0)));
42128
42131
  }
42129
- function qE(t, e, r) {
42132
+ function VE(t, e, r) {
42130
42133
  const i = Cr(r, e);
42131
42134
  return !i || i.type !== "comment";
42132
42135
  }
42133
- function VE(t, e, r) {
42136
+ function QE(t, e, r) {
42134
42137
  const i = Cr(r, e);
42135
42138
  return !i || i.type !== "comment";
42136
42139
  }
42137
- function QE(t, e, r) {
42140
+ function ZE(t, e, r) {
42138
42141
  const i = Cr(r, e);
42139
42142
  return i ? i.type === "element" && (i.tagName === "address" || i.tagName === "article" || i.tagName === "aside" || i.tagName === "blockquote" || i.tagName === "details" || i.tagName === "div" || i.tagName === "dl" || i.tagName === "fieldset" || i.tagName === "figcaption" || i.tagName === "figure" || i.tagName === "footer" || i.tagName === "form" || i.tagName === "h1" || i.tagName === "h2" || i.tagName === "h3" || i.tagName === "h4" || i.tagName === "h5" || i.tagName === "h6" || i.tagName === "header" || i.tagName === "hgroup" || i.tagName === "hr" || i.tagName === "main" || i.tagName === "menu" || i.tagName === "nav" || i.tagName === "ol" || i.tagName === "p" || i.tagName === "pre" || i.tagName === "section" || i.tagName === "table" || i.tagName === "ul") : !r || // Confusing parent.
42140
42143
  !(r.type === "element" && (r.tagName === "a" || r.tagName === "audio" || r.tagName === "del" || r.tagName === "ins" || r.tagName === "map" || r.tagName === "noscript" || r.tagName === "video"));
42141
42144
  }
42142
- function ZE(t, e, r) {
42145
+ function KE(t, e, r) {
42143
42146
  const i = Cr(r, e);
42144
42147
  return !i || i.type === "element" && i.tagName === "li";
42145
42148
  }
42146
- function KE(t, e, r) {
42149
+ function JE(t, e, r) {
42147
42150
  const i = Cr(r, e);
42148
42151
  return !!(i && i.type === "element" && (i.tagName === "dt" || i.tagName === "dd"));
42149
42152
  }
42150
- function JE(t, e, r) {
42153
+ function e$(t, e, r) {
42151
42154
  const i = Cr(r, e);
42152
42155
  return !i || i.type === "element" && (i.tagName === "dt" || i.tagName === "dd");
42153
42156
  }
@@ -42155,26 +42158,26 @@ function Ud(t, e, r) {
42155
42158
  const i = Cr(r, e);
42156
42159
  return !i || i.type === "element" && (i.tagName === "rp" || i.tagName === "rt");
42157
42160
  }
42158
- function e$(t, e, r) {
42161
+ function t$(t, e, r) {
42159
42162
  const i = Cr(r, e);
42160
42163
  return !i || i.type === "element" && i.tagName === "optgroup";
42161
42164
  }
42162
- function t$(t, e, r) {
42165
+ function r$(t, e, r) {
42163
42166
  const i = Cr(r, e);
42164
42167
  return !i || i.type === "element" && (i.tagName === "option" || i.tagName === "optgroup");
42165
42168
  }
42166
- function r$(t, e, r) {
42169
+ function n$(t, e, r) {
42167
42170
  const i = Cr(r, e);
42168
42171
  return !!(i && i.type === "element" && (i.tagName === "tbody" || i.tagName === "tfoot"));
42169
42172
  }
42170
- function n$(t, e, r) {
42173
+ function a$(t, e, r) {
42171
42174
  const i = Cr(r, e);
42172
42175
  return !i || i.type === "element" && (i.tagName === "tbody" || i.tagName === "tfoot");
42173
42176
  }
42174
- function a$(t, e, r) {
42177
+ function i$(t, e, r) {
42175
42178
  return !Cr(r, e);
42176
42179
  }
42177
- function i$(t, e, r) {
42180
+ function s$(t, e, r) {
42178
42181
  const i = Cr(r, e);
42179
42182
  return !i || i.type === "element" && i.tagName === "tr";
42180
42183
  }
@@ -42182,18 +42185,18 @@ function Gd(t, e, r) {
42182
42185
  const i = Cr(r, e);
42183
42186
  return !i || i.type === "element" && (i.tagName === "td" || i.tagName === "th");
42184
42187
  }
42185
- const s$ = vp({
42186
- body: c$,
42187
- colgroup: u$,
42188
- head: l$,
42189
- html: o$,
42190
- tbody: d$
42188
+ const o$ = vp({
42189
+ body: u$,
42190
+ colgroup: d$,
42191
+ head: c$,
42192
+ html: l$,
42193
+ tbody: h$
42191
42194
  });
42192
- function o$(t) {
42195
+ function l$(t) {
42193
42196
  const e = Cr(t, -1);
42194
42197
  return !e || e.type !== "comment";
42195
42198
  }
42196
- function l$(t) {
42199
+ function c$(t) {
42197
42200
  const e = /* @__PURE__ */ new Set();
42198
42201
  for (const i of t.children)
42199
42202
  if (i.type === "element" && (i.tagName === "base" || i.tagName === "title")) {
@@ -42203,15 +42206,15 @@ function l$(t) {
42203
42206
  const r = t.children[0];
42204
42207
  return !r || r.type === "element";
42205
42208
  }
42206
- function c$(t) {
42209
+ function u$(t) {
42207
42210
  const e = Cr(t, -1, !0);
42208
42211
  return !e || e.type !== "comment" && !(e.type === "text" && tu(e.value.charAt(0))) && !(e.type === "element" && (e.tagName === "meta" || e.tagName === "link" || e.tagName === "script" || e.tagName === "style" || e.tagName === "template"));
42209
42212
  }
42210
- function u$(t, e, r) {
42213
+ function d$(t, e, r) {
42211
42214
  const i = bp(r, e), s = Cr(t, -1, !0);
42212
42215
  return r && i && i.type === "element" && i.tagName === "colgroup" && ru(i, r.children.indexOf(i), r) ? !1 : !!(s && s.type === "element" && s.tagName === "col");
42213
42216
  }
42214
- function d$(t, e, r) {
42217
+ function h$(t, e, r) {
42215
42218
  const i = bp(r, e), s = Cr(t, -1);
42216
42219
  return r && i && i.type === "element" && (i.tagName === "thead" || i.tagName === "tbody") && ru(i, r.children.indexOf(i), r) ? !1 : !!(s && s.type === "element" && s.tagName === "tr");
42217
42220
  }
@@ -42245,24 +42248,24 @@ const qi = {
42245
42248
  ['\0"&'.split(""), "\0\"&'`".split("")]
42246
42249
  ]
42247
42250
  };
42248
- function h$(t, e, r, i) {
42251
+ function g$(t, e, r, i) {
42249
42252
  const s = i.schema, c = s.space === "svg" ? !1 : i.settings.omitOptionalTags;
42250
42253
  let u = s.space === "svg" ? i.settings.closeEmptyElements : i.settings.voids.includes(t.tagName.toLowerCase());
42251
42254
  const g = [];
42252
42255
  let p;
42253
42256
  s.space === "html" && t.tagName === "svg" && (i.schema = Jc);
42254
- const m = g$(i, t.properties), x = i.all(
42257
+ const m = f$(i, t.properties), x = i.all(
42255
42258
  s.space === "html" && t.tagName === "template" ? t.content : t
42256
42259
  );
42257
- return i.schema = s, x && (u = !1), (m || !c || !s$(t, e, r)) && (g.push("<", t.tagName, m ? " " + m : ""), u && (s.space === "svg" || i.settings.closeSelfClosing) && (p = m.charAt(m.length - 1), (!i.settings.tightSelfClosing || p === "/" || p && p !== '"' && p !== "'") && g.push(" "), g.push("/")), g.push(">")), g.push(x), !u && (!c || !ru(t, e, r)) && g.push("</" + t.tagName + ">"), g.join("");
42260
+ return i.schema = s, x && (u = !1), (m || !c || !o$(t, e, r)) && (g.push("<", t.tagName, m ? " " + m : ""), u && (s.space === "svg" || i.settings.closeSelfClosing) && (p = m.charAt(m.length - 1), (!i.settings.tightSelfClosing || p === "/" || p && p !== '"' && p !== "'") && g.push(" "), g.push("/")), g.push(">")), g.push(x), !u && (!c || !ru(t, e, r)) && g.push("</" + t.tagName + ">"), g.join("");
42258
42261
  }
42259
- function g$(t, e) {
42262
+ function f$(t, e) {
42260
42263
  const r = [];
42261
42264
  let i = -1, s;
42262
42265
  if (e) {
42263
42266
  for (s in e)
42264
42267
  if (e[s] !== null && e[s] !== void 0) {
42265
- const c = f$(t, s, e[s]);
42268
+ const c = p$(t, s, e[s]);
42266
42269
  c && r.push(c);
42267
42270
  }
42268
42271
  }
@@ -42272,7 +42275,7 @@ function g$(t, e) {
42272
42275
  }
42273
42276
  return r.join("");
42274
42277
  }
42275
- function f$(t, e, r) {
42278
+ function p$(t, e, r) {
42276
42279
  const i = ap(t.schema, e), s = t.settings.allowParseErrors && t.schema.space === "html" ? 0 : 1, c = t.settings.allowDangerousCharacters ? 0 : 1;
42277
42280
  let u = t.quote, g;
42278
42281
  if (i.overloadedBoolean && (r === i.attribute || r === "") ? r = !0 : (i.boolean || i.overloadedBoolean) && (typeof r != "string" || r === i.attribute || r === "") && (r = !!r), r == null || r === !1 || typeof r == "number" && Number.isNaN(r))
@@ -42301,44 +42304,44 @@ function f$(t, e, r) {
42301
42304
  })
42302
42305
  ) + u), p + (g && "=" + g));
42303
42306
  }
42304
- const p$ = ["<", "&"];
42307
+ const m$ = ["<", "&"];
42305
42308
  function yp(t, e, r, i) {
42306
42309
  return r && r.type === "element" && (r.tagName === "script" || r.tagName === "style") ? t.value : Ma(
42307
42310
  t.value,
42308
42311
  Object.assign({}, i.settings.characterReferences, {
42309
- subset: p$
42312
+ subset: m$
42310
42313
  })
42311
42314
  );
42312
42315
  }
42313
- function m$(t, e, r, i) {
42316
+ function b$(t, e, r, i) {
42314
42317
  return i.settings.allowDangerousHtml ? t.value : yp(t, e, r, i);
42315
42318
  }
42316
- function b$(t, e, r, i) {
42319
+ function x$(t, e, r, i) {
42317
42320
  return i.all(t);
42318
42321
  }
42319
- const x$ = nC("type", {
42320
- invalid: v$,
42321
- unknown: y$,
42322
- handlers: { comment: YE, doctype: WE, element: h$, raw: m$, root: b$, text: yp }
42322
+ const v$ = nC("type", {
42323
+ invalid: y$,
42324
+ unknown: w$,
42325
+ handlers: { comment: WE, doctype: UE, element: g$, raw: b$, root: x$, text: yp }
42323
42326
  });
42324
- function v$(t) {
42327
+ function y$(t) {
42325
42328
  throw new Error("Expected node, not `" + t + "`");
42326
42329
  }
42327
- function y$(t) {
42330
+ function w$(t) {
42328
42331
  const e = (
42329
42332
  /** @type {Nodes} */
42330
42333
  t
42331
42334
  );
42332
42335
  throw new Error("Cannot compile unknown node `" + e.type + "`");
42333
42336
  }
42334
- const w$ = {}, k$ = {}, S$ = [];
42335
- function C$(t, e) {
42336
- const r = e || w$, i = r.quote || '"', s = i === '"' ? "'" : '"';
42337
+ const k$ = {}, S$ = {}, C$ = [];
42338
+ function A$(t, e) {
42339
+ const r = e || k$, i = r.quote || '"', s = i === '"' ? "'" : '"';
42337
42340
  if (i !== '"' && i !== "'")
42338
42341
  throw new Error("Invalid quote `" + i + "`, expected `'` or `\"`");
42339
42342
  return {
42340
- one: A$,
42341
- all: T$,
42343
+ one: T$,
42344
+ all: E$,
42342
42345
  settings: {
42343
42346
  omitOptionalTags: r.omitOptionalTags || !1,
42344
42347
  allowParseErrors: r.allowParseErrors || !1,
@@ -42353,8 +42356,8 @@ function C$(t, e) {
42353
42356
  tightSelfClosing: r.tightSelfClosing || !1,
42354
42357
  collapseEmptyAttributes: r.collapseEmptyAttributes || !1,
42355
42358
  allowDangerousHtml: r.allowDangerousHtml || !1,
42356
- voids: r.voids || SE,
42357
- characterReferences: r.characterReferences || k$,
42359
+ voids: r.voids || CE,
42360
+ characterReferences: r.characterReferences || S$,
42358
42361
  closeSelfClosing: r.closeSelfClosing || !1,
42359
42362
  closeEmptyElements: r.closeEmptyElements || !1
42360
42363
  },
@@ -42367,24 +42370,24 @@ function C$(t, e) {
42367
42370
  void 0
42368
42371
  );
42369
42372
  }
42370
- function A$(t, e, r) {
42371
- return x$(t, e, r, this);
42373
+ function T$(t, e, r) {
42374
+ return v$(t, e, r, this);
42372
42375
  }
42373
- function T$(t) {
42374
- const e = [], r = t && t.children || S$;
42376
+ function E$(t) {
42377
+ const e = [], r = t && t.children || C$;
42375
42378
  let i = -1;
42376
42379
  for (; ++i < r.length; )
42377
42380
  e[i] = this.one(r[i], i, t);
42378
42381
  return e.join("");
42379
42382
  }
42380
- function E$(t) {
42383
+ function $$(t) {
42381
42384
  const e = this, r = { ...e.data("settings"), ...t };
42382
42385
  e.compiler = i;
42383
42386
  function i(s) {
42384
- return C$(s, r);
42387
+ return A$(s, r);
42385
42388
  }
42386
42389
  }
42387
- function $$(t, e) {
42390
+ function _$(t, e) {
42388
42391
  if (!e || e.length === 0)
42389
42392
  return { content: t, citations: [] };
42390
42393
  const r = [...e].sort((c, u) => u.startIndex - c.startIndex);
@@ -42410,15 +42413,15 @@ function $$(t, e) {
42410
42413
  citations: s
42411
42414
  };
42412
42415
  }
42413
- function _$(t) {
42414
- if (!t || !M$(t))
42416
+ function M$(t) {
42417
+ if (!t || !I$(t))
42415
42418
  return t;
42416
42419
  const e = t.split(`
42417
42420
  `);
42418
42421
  let r = !1, i = "";
42419
42422
  const s = [];
42420
42423
  for (const c of e) {
42421
- const u = I$(c);
42424
+ const u = L$(c);
42422
42425
  if (u) {
42423
42426
  r ? u[0] === i[0] && u.length >= i.length && (r = !1, i = "") : (r = !0, i = u), s.push(c);
42424
42427
  continue;
@@ -42427,19 +42430,19 @@ function _$(t) {
42427
42430
  s.push(c);
42428
42431
  continue;
42429
42432
  }
42430
- s.push(L$(c));
42433
+ s.push(z$(c));
42431
42434
  }
42432
42435
  return s.join(`
42433
42436
  `);
42434
42437
  }
42435
- function M$(t) {
42438
+ function I$(t) {
42436
42439
  return t.includes("\\[") || t.includes("\\]") || t.includes("\\(") || t.includes("\\)");
42437
42440
  }
42438
- function I$(t) {
42441
+ function L$(t) {
42439
42442
  const e = t.match(/^\s*(`{3,}|~{3,})/);
42440
42443
  return e ? e[1] : null;
42441
42444
  }
42442
- function L$(t) {
42445
+ function z$(t) {
42443
42446
  const e = t.split(/(`+[^`]*`+)/g);
42444
42447
  for (let r = 0; r < e.length; r++) {
42445
42448
  const i = e[r];
@@ -42447,8 +42450,8 @@ function L$(t) {
42447
42450
  }
42448
42451
  return e.join("");
42449
42452
  }
42450
- var z$ = /* @__PURE__ */ G('<div class="markdown-table-wrapper overflow-x-auto"><table class="markdown-table w-full border-collapse">'), R$ = /* @__PURE__ */ G('<div class="flex justify-end mt-1">');
42451
- const D$ = function(e) {
42453
+ var R$ = /* @__PURE__ */ G('<div class="markdown-table-wrapper overflow-x-auto"><table class="markdown-table w-full border-collapse">'), D$ = /* @__PURE__ */ G('<div class="flex justify-end mt-1">');
42454
+ const N$ = function(e) {
42452
42455
  const r = Mt({
42453
42456
  disabled: !1
42454
42457
  }, e), i = Tt(), s = le(() => r.exportMessage ?? i.t("BiChat.ExportTableToExcel")), c = le(() => r.exportLabel ?? i.t("BiChat.Export")), u = () => {
@@ -42456,10 +42459,10 @@ const D$ = function(e) {
42456
42459
  (g = r.sendMessage) == null || g.call(r, s());
42457
42460
  };
42458
42461
  return [(() => {
42459
- var g = z$(), p = g.firstChild;
42462
+ var g = R$(), p = g.firstChild;
42460
42463
  return C(p, () => r.children), g;
42461
42464
  })(), ee(() => ee(() => !!r.sendMessage)() && (() => {
42462
- var g = R$();
42465
+ var g = D$();
42463
42466
  return C(g, X(Yh, {
42464
42467
  onClick: u,
42465
42468
  get disabled() {
@@ -43628,8 +43631,8 @@ var wp = { exports: {} };
43628
43631
  };
43629
43632
  }();
43630
43633
  })(wp);
43631
- var N$ = wp.exports;
43632
- const Ko = /* @__PURE__ */ fc(N$);
43634
+ var B$ = wp.exports;
43635
+ const Ko = /* @__PURE__ */ fc(B$);
43633
43636
  Prism.languages.javascript = Prism.languages.extend("clike", {
43634
43637
  "class-name": [
43635
43638
  Prism.languages.clike["class-name"],
@@ -45406,8 +45409,8 @@ delete Prism.languages.c.boolean;
45406
45409
  t.languages["markup-templating"].tokenizePlaceholders(p, "php");
45407
45410
  });
45408
45411
  })(Prism);
45409
- var B$ = /* @__PURE__ */ G('<div class="group relative my-4 overflow-hidden rounded-lg border border-gray-300 dark:border-gray-700"><div class="flex items-center justify-between border-b border-gray-300 bg-gray-100 px-4 py-2 dark:border-gray-700 dark:bg-gray-800"><span class="text-xs font-medium uppercase text-gray-600 dark:text-gray-400"></span><button type=button class="flex items-center gap-1.5 text-xs"aria-live=polite></button></div><pre class="bichat-code overflow-x-auto p-4 text-sm leading-6"><code>'), F$ = /* @__PURE__ */ G('<code class="rounded bg-gray-100 px-1.5 py-0.5 font-mono text-sm dark:bg-gray-800">');
45410
- const O$ = {
45412
+ var F$ = /* @__PURE__ */ G('<div class="group relative my-4 overflow-hidden rounded-lg border border-gray-300 dark:border-gray-700"><div class="flex items-center justify-between border-b border-gray-300 bg-gray-100 px-4 py-2 dark:border-gray-700 dark:bg-gray-800"><span class="text-xs font-medium uppercase text-gray-600 dark:text-gray-400"></span><button type=button class="flex items-center gap-1.5 text-xs"aria-live=polite></button></div><pre class="bichat-code overflow-x-auto p-4 text-sm leading-6"><code>'), O$ = /* @__PURE__ */ G('<code class="rounded bg-gray-100 px-1.5 py-0.5 font-mono text-sm dark:bg-gray-800">');
45413
+ const P$ = {
45411
45414
  js: "javascript",
45412
45415
  ts: "typescript",
45413
45416
  py: "python",
@@ -45417,7 +45420,7 @@ const O$ = {
45417
45420
  xml: "markup",
45418
45421
  html: "markup"
45419
45422
  };
45420
- function P$(t) {
45423
+ function H$(t) {
45421
45424
  const {
45422
45425
  t: e
45423
45426
  } = Tt(), [r, i] = Me(!1), [s, c] = Me(!1);
@@ -45425,7 +45428,7 @@ function P$(t) {
45425
45428
  tt(() => {
45426
45429
  g = !0, clearTimeout(u);
45427
45430
  });
45428
- const p = le(() => O$[t.language.toLowerCase()] ?? t.language.toLowerCase() ?? "text"), m = le(() => {
45431
+ const p = le(() => P$[t.language.toLowerCase()] ?? t.language.toLowerCase() ?? "text"), m = le(() => {
45429
45432
  const y = Ko.languages[p()];
45430
45433
  return y ? Ko.highlight(t.value, y, p()) : String(Ko.util.encode(t.value));
45431
45434
  }), x = async () => {
@@ -45446,12 +45449,12 @@ function P$(t) {
45446
45449
  },
45447
45450
  get fallback() {
45448
45451
  return (() => {
45449
- var y = F$();
45452
+ var y = O$();
45450
45453
  return C(y, () => t.value), y;
45451
45454
  })();
45452
45455
  },
45453
45456
  get children() {
45454
- var y = B$(), A = y.firstChild, E = A.firstChild, $ = E.nextSibling, R = A.nextSibling, H = R.firstChild;
45457
+ var y = F$(), A = y.firstChild, E = A.firstChild, $ = E.nextSibling, R = A.nextSibling, H = R.firstChild;
45455
45458
  return C(E, p), $.$$click = () => void x(), C($, X(ir, {
45456
45459
  get when() {
45457
45460
  return r();
@@ -45481,12 +45484,11 @@ function P$(t) {
45481
45484
  });
45482
45485
  }
45483
45486
  $t(["click"]);
45484
- var H$ = /* @__PURE__ */ G("<span>"), X$ = /* @__PURE__ */ G("<div class=markdown-content>");
45485
- const jd = ag().use(c7).use(_8).use(B9).use(AT).use(kE).use(hE, {
45486
- strict: "ignore",
45487
- trust: !1,
45487
+ var X$ = /* @__PURE__ */ G("<span>"), Y$ = /* @__PURE__ */ G("<div class=markdown-content>");
45488
+ const jd = ag().use(c7).use(_8).use(B9).use(AT).use(SE).use(hE, {
45489
+ ...gE,
45488
45490
  output: "mathml"
45489
- }), Y$ = ag().use(E$);
45491
+ }), W$ = ag().use($$);
45490
45492
  function kp(t) {
45491
45493
  var e;
45492
45494
  return t.value ?? ((e = t.children) == null ? void 0 : e.map(kp).join("")) ?? "";
@@ -45499,7 +45501,7 @@ function Sp(t) {
45499
45501
  get each() {
45500
45502
  return t.nodes;
45501
45503
  },
45502
- children: (e) => X(U$, {
45504
+ children: (e) => X(G$, {
45503
45505
  get node() {
45504
45506
  return e();
45505
45507
  },
@@ -45509,7 +45511,7 @@ function Sp(t) {
45509
45511
  })
45510
45512
  });
45511
45513
  }
45512
- function W$(t) {
45514
+ function U$(t) {
45513
45515
  const e = le(() => {
45514
45516
  var u;
45515
45517
  return ((u = t.node.children) == null ? void 0 : u.find((g) => g.tagName === "code")) ?? t.node;
@@ -45526,7 +45528,7 @@ function W$(t) {
45526
45528
  },
45527
45529
  keyed: !0,
45528
45530
  get fallback() {
45529
- return X(P$, {
45531
+ return X(H$, {
45530
45532
  get language() {
45531
45533
  return i();
45532
45534
  },
@@ -45546,7 +45548,7 @@ function W$(t) {
45546
45548
  })
45547
45549
  });
45548
45550
  }
45549
- function U$(t) {
45551
+ function G$(t) {
45550
45552
  const e = () => t.node.tagName ?? "span", r = () => X(Sp, {
45551
45553
  get nodes() {
45552
45554
  return t.node.children ?? [];
@@ -45568,7 +45570,7 @@ function U$(t) {
45568
45570
  return e() !== "pre";
45569
45571
  },
45570
45572
  get fallback() {
45571
- return X(W$, {
45573
+ return X(U$, {
45572
45574
  get node() {
45573
45575
  return t.node;
45574
45576
  },
@@ -45583,7 +45585,7 @@ function U$(t) {
45583
45585
  return e() !== "table";
45584
45586
  },
45585
45587
  get fallback() {
45586
- return X(D$, {
45588
+ return X(N$, {
45587
45589
  get sendMessage() {
45588
45590
  return t.options.sendMessage;
45589
45591
  },
@@ -45605,8 +45607,8 @@ function U$(t) {
45605
45607
  },
45606
45608
  get fallback() {
45607
45609
  return (() => {
45608
- var i = H$();
45609
- return we(() => i.innerHTML = String(Y$.stringify({
45610
+ var i = X$();
45611
+ return we(() => i.innerHTML = String(W$.stringify({
45610
45612
  type: "root",
45611
45613
  children: [t.node]
45612
45614
  }))), i;
@@ -45642,11 +45644,11 @@ function U$(t) {
45642
45644
  }
45643
45645
  function Vd(t) {
45644
45646
  const e = le(() => {
45645
- const r = _$($$(t.content, t.citations).content);
45647
+ const r = M$(_$(t.content, t.citations).content);
45646
45648
  return jd.runSync(jd.parse(r));
45647
45649
  });
45648
45650
  return (() => {
45649
- var r = X$();
45651
+ var r = Y$();
45650
45652
  return C(r, X(Sp, {
45651
45653
  get nodes() {
45652
45654
  return e().children ?? [];
@@ -45660,8 +45662,8 @@ const nu = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
45660
45662
  MarkdownRenderer: Vd,
45661
45663
  default: Vd
45662
45664
  }, Symbol.toStringTag, { value: "Module" }));
45663
- var G$ = /* @__PURE__ */ G('<div><div class="text-center max-w-md"><h3>'), j$ = /* @__PURE__ */ G('<div class="mb-4 flex justify-center">'), q$ = /* @__PURE__ */ G("<p>"), V$ = /* @__PURE__ */ G("<div>");
45664
- const Q$ = {
45665
+ var j$ = /* @__PURE__ */ G('<div><div class="text-center max-w-md"><h3>'), q$ = /* @__PURE__ */ G('<div class="mb-4 flex justify-center">'), V$ = /* @__PURE__ */ G("<p>"), Q$ = /* @__PURE__ */ G("<div>");
45666
+ const Z$ = {
45665
45667
  sm: {
45666
45668
  container: "py-6 px-3",
45667
45669
  title: "text-sm",
@@ -45678,29 +45680,29 @@ const Q$ = {
45678
45680
  description: "text-base"
45679
45681
  }
45680
45682
  };
45681
- function Z$(t) {
45683
+ function K$(t) {
45682
45684
  const e = Mt({
45683
45685
  className: "",
45684
45686
  size: "md"
45685
- }, t), r = le(() => Q$[e.size]);
45687
+ }, t), r = le(() => Z$[e.size]);
45686
45688
  return bc()(), (() => {
45687
- var s = G$(), c = s.firstChild, u = c.firstChild;
45689
+ var s = j$(), c = s.firstChild, u = c.firstChild;
45688
45690
  return C(c, (() => {
45689
45691
  var g = ee(() => !!e.icon);
45690
45692
  return () => g() && (() => {
45691
- var p = j$();
45693
+ var p = q$();
45692
45694
  return C(p, () => e.icon), p;
45693
45695
  })();
45694
45696
  })(), u), C(u, () => e.title), C(c, (() => {
45695
45697
  var g = ee(() => !!e.description);
45696
45698
  return () => g() && (() => {
45697
- var p = q$();
45699
+ var p = V$();
45698
45700
  return C(p, () => e.description), we(() => Be(p, `${r().description} text-gray-500 dark:text-gray-400 mb-4`)), p;
45699
45701
  })();
45700
45702
  })(), null), C(c, (() => {
45701
45703
  var g = ee(() => !!e.action);
45702
45704
  return () => g() && (() => {
45703
- var p = V$();
45705
+ var p = Q$();
45704
45706
  return C(p, () => e.action), p;
45705
45707
  })();
45706
45708
  })(), null), we((g) => {
@@ -45712,13 +45714,13 @@ function Z$(t) {
45712
45714
  }), s;
45713
45715
  })();
45714
45716
  }
45715
- const ks = Z$;
45716
- var K$ = /* @__PURE__ */ G('<div class="flex items-center gap-2 flex-1"><input type=text>'), J$ = /* @__PURE__ */ G("<span role=button tabindex=0>"), e_ = /* @__PURE__ */ G('<span class="inline-flex items-center gap-2 text-gray-400 dark:text-gray-500"><span class=italic>'), t_ = /* @__PURE__ */ G("<span>");
45717
- const r_ = {
45717
+ const ks = K$;
45718
+ var J$ = /* @__PURE__ */ G('<div class="flex items-center gap-2 flex-1"><input type=text>'), e_ = /* @__PURE__ */ G("<span role=button tabindex=0>"), t_ = /* @__PURE__ */ G('<span class="inline-flex items-center gap-2 text-gray-400 dark:text-gray-500"><span class=italic>'), r_ = /* @__PURE__ */ G("<span>");
45719
+ const n_ = {
45718
45720
  sm: "text-sm",
45719
45721
  md: "text-base",
45720
45722
  lg: "text-lg"
45721
- }, n_ = (t) => {
45723
+ }, a_ = (t) => {
45722
45724
  var B;
45723
45725
  const e = Mt({
45724
45726
  maxLength: 100,
@@ -45766,10 +45768,10 @@ const r_ = {
45766
45768
  c(!0);
45767
45769
  }, $ = () => {
45768
45770
  x();
45769
- }, R = r_[e.size];
45771
+ }, R = n_[e.size];
45770
45772
  if (s())
45771
45773
  return (() => {
45772
- var N = K$(), O = N.firstChild;
45774
+ var N = J$(), O = N.firstChild;
45773
45775
  return N.$$pointerdown = (Q) => Q.stopPropagation(), N.$$click = (Q) => {
45774
45776
  Q.preventDefault(), Q.stopPropagation();
45775
45777
  }, O.$$pointerdown = (Q) => Q.stopPropagation(), O.$$click = (Q) => Q.stopPropagation(), O.addEventListener("blur", $), O.$$keyup = (Q) => Q.stopPropagation(), O.$$keydown = A, O.$$input = (Q) => g(Q.target.value), Ht((Q) => p.current = Q, O), ve(O, "placeholder", i), we((Q) => {
@@ -45783,19 +45785,19 @@ const r_ = {
45783
45785
  })();
45784
45786
  const H = e.value || i;
45785
45787
  return (() => {
45786
- var N = J$();
45788
+ var N = e_();
45787
45789
  return N.$$keydown = (O) => {
45788
45790
  (O.key === "Enter" || O.key === " ") && (O.preventDefault(), E());
45789
45791
  }, N.$$dblclick = E, C(N, (() => {
45790
45792
  var O = ee(() => !!e.isLoading);
45791
45793
  return () => O() ? (() => {
45792
- var Q = e_(), D = Q.firstChild;
45794
+ var Q = t_(), D = Q.firstChild;
45793
45795
  return C(Q, X(_s, {
45794
45796
  size: 12,
45795
45797
  className: "animate-spin"
45796
45798
  }), D), C(D, H), Q;
45797
45799
  })() : (() => {
45798
- var Q = t_();
45800
+ var Q = r_();
45799
45801
  return C(Q, H), we(() => Be(Q, e.value ? "" : "text-gray-400 dark:text-gray-500 italic")), Q;
45800
45802
  })();
45801
45803
  })()), we((O) => {
@@ -45806,10 +45808,10 @@ const r_ = {
45806
45808
  t: void 0
45807
45809
  }), N;
45808
45810
  })();
45809
- }, a_ = n_;
45811
+ }, i_ = a_;
45810
45812
  $t(["click", "pointerdown", "input", "keydown", "keyup", "dblclick"]);
45811
- var i_ = /* @__PURE__ */ G('<div role=search><span class="absolute inset-y-0 left-3 flex items-center pointer-events-none"></span><input type=search>'), s_ = /* @__PURE__ */ G("<button type=button>");
45812
- const o_ = {
45813
+ var s_ = /* @__PURE__ */ G('<div role=search><span class="absolute inset-y-0 left-3 flex items-center pointer-events-none"></span><input type=search>'), o_ = /* @__PURE__ */ G("<button type=button>");
45814
+ const l_ = {
45813
45815
  sm: {
45814
45816
  container: "py-1.5 pl-8 pr-8 text-xs",
45815
45817
  icon: 14,
@@ -45826,7 +45828,7 @@ const o_ = {
45826
45828
  clearBtn: "p-2"
45827
45829
  }
45828
45830
  };
45829
- function l_(t) {
45831
+ function c_(t) {
45830
45832
  const e = Mt({
45831
45833
  autofocus: !1,
45832
45834
  className: "",
@@ -45834,7 +45836,7 @@ function l_(t) {
45834
45836
  disabled: !1
45835
45837
  }, t), r = Tt(), i = le(() => e.placeholder ?? r.t("BiChat.Common.Search")), s = le(() => e.ariaLabel ?? r.t("BiChat.Common.Search")), c = {
45836
45838
  current: null
45837
- }, u = le(() => o_[e.size]);
45839
+ }, u = le(() => l_[e.size]);
45838
45840
  pt(mt(() => [e.autofocus], () => {
45839
45841
  const m = ct(() => {
45840
45842
  e.autofocus && c.current && c.current.focus();
@@ -45849,7 +45851,7 @@ function l_(t) {
45849
45851
  m.key === "Enter" && e.onSubmit ? (m.preventDefault(), (x = e.onSubmit) == null || x.call(e, e.value)) : m.key === "Escape" && (m.preventDefault(), e.value && !e.onEscape ? g() : e.onEscape && ((y = e.onEscape) == null || y.call(e)));
45850
45852
  };
45851
45853
  return (() => {
45852
- var m = i_(), x = m.firstChild, y = x.nextSibling;
45854
+ var m = s_(), x = m.firstChild, y = x.nextSibling;
45853
45855
  return C(x, X(Ts, {
45854
45856
  get size() {
45855
45857
  return u().icon;
@@ -45863,7 +45865,7 @@ function l_(t) {
45863
45865
  }, Ht((A) => c.current = A, y), C(m, (() => {
45864
45866
  var A = ee(() => !!(e.value && !e.disabled));
45865
45867
  return () => A() && (() => {
45866
- var E = s_();
45868
+ var E = o_();
45867
45869
  return E.$$click = g, C(E, X(ur, {
45868
45870
  get size() {
45869
45871
  return u().icon - 2;
@@ -45890,15 +45892,15 @@ function l_(t) {
45890
45892
  }), we(() => y.value = e.value), m;
45891
45893
  })();
45892
45894
  }
45893
- const Cp = l_;
45895
+ const Cp = c_;
45894
45896
  $t(["input", "keydown", "click"]);
45895
45897
  var au = /* @__PURE__ */ G("<div aria-hidden=true>"), Ap = /* @__PURE__ */ G("<div>");
45896
- const c_ = {
45898
+ const u_ = {
45897
45899
  text: "rounded",
45898
45900
  circular: "rounded-full",
45899
45901
  rectangular: "rounded-none",
45900
45902
  rounded: "rounded-lg"
45901
- }, u_ = {
45903
+ }, d_ = {
45902
45904
  sm: "space-y-1",
45903
45905
  md: "space-y-2",
45904
45906
  lg: "space-y-3"
@@ -45908,7 +45910,7 @@ function fa(t) {
45908
45910
  variant: "text",
45909
45911
  className: "",
45910
45912
  animate: !0
45911
- }, t), r = le(() => c_[e.variant]), i = le(() => ({
45913
+ }, t), r = le(() => u_[e.variant]), i = le(() => ({
45912
45914
  width: typeof e.width == "number" ? `${e.width}px` : e.width,
45913
45915
  height: typeof e.height == "number" ? `${e.height}px` : e.height
45914
45916
  }));
@@ -45923,12 +45925,12 @@ function fa(t) {
45923
45925
  }), s;
45924
45926
  })();
45925
45927
  }
45926
- function wz(t) {
45928
+ function kz(t) {
45927
45929
  const e = Mt({
45928
45930
  count: 3,
45929
45931
  gap: "md",
45930
45932
  className: ""
45931
- }, t), r = le(() => u_[e.gap]);
45933
+ }, t), r = le(() => d_[e.gap]);
45932
45934
  return (() => {
45933
45935
  var i = au();
45934
45936
  return C(i, () => Array.from({
@@ -45942,7 +45944,7 @@ function wz(t) {
45942
45944
  }))), we(() => Be(i, `${r()} ${e.className}`)), i;
45943
45945
  })();
45944
45946
  }
45945
- function kz(t) {
45947
+ function Sz(t) {
45946
45948
  const e = Mt({
45947
45949
  lines: 1,
45948
45950
  className: ""
@@ -45960,7 +45962,7 @@ function kz(t) {
45960
45962
  }))), we(() => Be(i, `space-y-2 ${e.className}`)), i;
45961
45963
  })();
45962
45964
  }
45963
- function Sz(t) {
45965
+ function Cz(t) {
45964
45966
  const e = Mt({
45965
45967
  size: 40,
45966
45968
  className: ""
@@ -45978,7 +45980,7 @@ function Sz(t) {
45978
45980
  }
45979
45981
  });
45980
45982
  }
45981
- function Cz(t) {
45983
+ function Az(t) {
45982
45984
  const e = Mt({
45983
45985
  height: 120,
45984
45986
  className: ""
@@ -45996,7 +45998,7 @@ function Cz(t) {
45996
45998
  }
45997
45999
  });
45998
46000
  }
45999
- function Az(t) {
46001
+ function Tz(t) {
46000
46002
  const e = Mt({
46001
46003
  className: ""
46002
46004
  }, t);
@@ -46013,9 +46015,9 @@ function Az(t) {
46013
46015
  }), null), we(() => Be(r, `flex items-center gap-3 px-3 py-2 ${e.className}`)), r;
46014
46016
  })();
46015
46017
  }
46016
- const Tz = fa;
46017
- var d_ = /* @__PURE__ */ G('<div class="flex flex-col items-center justify-center"role=status aria-live=polite>'), Tp = /* @__PURE__ */ G('<p class="mt-2 text-sm text-gray-600 dark:text-gray-400">'), Ep = /* @__PURE__ */ G('<div class="flex flex-col items-center justify-center"role=status aria-live=polite><div>'), h_ = /* @__PURE__ */ G("<div>"), g_ = /* @__PURE__ */ G('<p class="mt-3 text-sm text-gray-600 dark:text-gray-400">');
46018
- function f_(t) {
46018
+ const Ez = fa;
46019
+ var h_ = /* @__PURE__ */ G('<div class="flex flex-col items-center justify-center"role=status aria-live=polite>'), Tp = /* @__PURE__ */ G('<p class="mt-2 text-sm text-gray-600 dark:text-gray-400">'), Ep = /* @__PURE__ */ G('<div class="flex flex-col items-center justify-center"role=status aria-live=polite><div>'), g_ = /* @__PURE__ */ G("<div>"), f_ = /* @__PURE__ */ G('<p class="mt-3 text-sm text-gray-600 dark:text-gray-400">');
46020
+ function p_(t) {
46019
46021
  const e = Mt({
46020
46022
  size: "md"
46021
46023
  }, t), r = {
@@ -46028,7 +46030,7 @@ function f_(t) {
46028
46030
  lg: "h-12 w-12"
46029
46031
  };
46030
46032
  return (() => {
46031
- var s = d_();
46033
+ var s = h_();
46032
46034
  return C(s, X(_s, {
46033
46035
  get size() {
46034
46036
  return r[e.size];
@@ -46045,7 +46047,7 @@ function f_(t) {
46045
46047
  })(), null), s;
46046
46048
  })();
46047
46049
  }
46048
- function p_(t) {
46050
+ function m_(t) {
46049
46051
  const e = Mt({
46050
46052
  size: "md"
46051
46053
  }, t), r = {
@@ -46060,18 +46062,18 @@ function p_(t) {
46060
46062
  return (() => {
46061
46063
  var s = Ep(), c = s.firstChild;
46062
46064
  return C(c, () => [0, 1, 2].map((u) => (() => {
46063
- var g = h_();
46065
+ var g = g_();
46064
46066
  return sr(g, "animation-delay", `${u * 0.15}s`), we(() => Be(g, `${r[e.size]} bg-[var(--bichat-primary)] rounded-full animate-bounce motion-reduce:animate-none`)), g;
46065
46067
  })())), C(s, (() => {
46066
46068
  var u = ee(() => !!e.message);
46067
46069
  return () => u() && (() => {
46068
- var g = g_();
46070
+ var g = f_();
46069
46071
  return C(g, () => e.message), g;
46070
46072
  })();
46071
46073
  })(), null), we(() => Be(c, `flex ${i[e.size]}`)), s;
46072
46074
  })();
46073
46075
  }
46074
- function m_(t) {
46076
+ function b_(t) {
46075
46077
  const e = Mt({
46076
46078
  size: "md"
46077
46079
  }, t), r = {
@@ -46090,7 +46092,7 @@ function m_(t) {
46090
46092
  })(), null), we(() => Be(s, `${r[e.size]} bg-[var(--bichat-primary)] rounded-full animate-pulse motion-reduce:animate-none`)), i;
46091
46093
  })();
46092
46094
  }
46093
- function b_(t) {
46095
+ function x_(t) {
46094
46096
  const e = Mt({
46095
46097
  variant: "spinner",
46096
46098
  size: "md"
@@ -46098,7 +46100,7 @@ function b_(t) {
46098
46100
  return ee(() => le(() => {
46099
46101
  switch (e.variant) {
46100
46102
  case "dots":
46101
- return X(p_, {
46103
+ return X(m_, {
46102
46104
  get size() {
46103
46105
  return e.size;
46104
46106
  },
@@ -46107,7 +46109,7 @@ function b_(t) {
46107
46109
  }
46108
46110
  });
46109
46111
  case "pulse":
46110
- return X(m_, {
46112
+ return X(b_, {
46111
46113
  get size() {
46112
46114
  return e.size;
46113
46115
  },
@@ -46117,7 +46119,7 @@ function b_(t) {
46117
46119
  });
46118
46120
  case "spinner":
46119
46121
  default:
46120
- return X(f_, {
46122
+ return X(p_, {
46121
46123
  get size() {
46122
46124
  return e.size;
46123
46125
  },
@@ -46128,9 +46130,9 @@ function b_(t) {
46128
46130
  }
46129
46131
  }));
46130
46132
  }
46131
- const fi = b_;
46132
- var x_ = /* @__PURE__ */ G("<div style=display:contents>");
46133
- function v_(t) {
46133
+ const fi = x_;
46134
+ var v_ = /* @__PURE__ */ G("<div style=display:contents>");
46135
+ function y_(t) {
46134
46136
  const [e, r] = Me(t.show);
46135
46137
  let i;
46136
46138
  const s = (c) => (c == null ? void 0 : c.split(/\s+/).filter(Boolean)) ?? [];
@@ -46154,13 +46156,13 @@ function v_(t) {
46154
46156
  return e();
46155
46157
  },
46156
46158
  get children() {
46157
- var c = x_(), u = i;
46159
+ var c = v_(), u = i;
46158
46160
  return typeof u == "function" ? Ht(u, c) : i = c, C(c, () => t.children), c;
46159
46161
  }
46160
46162
  });
46161
46163
  }
46162
- var y_ = /* @__PURE__ */ G('<div aria-atomic=true><div></div><p class="flex-1 pt-0.5 text-sm font-medium leading-snug text-gray-800 dark:text-gray-100"></p><button class="mt-0.5 -mr-1 cursor-pointer shrink-0 rounded-lg p-1 text-gray-400 hover:text-gray-600 hover:bg-gray-200/60 dark:text-gray-500 dark:hover:text-gray-300 dark:hover:bg-gray-700/60 transition-colors duration-100"></button><div class="absolute inset-x-0 bottom-0 h-0.5 bg-black/5 dark:bg-white/5"><div>'), w_ = /* @__PURE__ */ G("<button type=button>");
46163
- const k_ = {
46164
+ var w_ = /* @__PURE__ */ G('<div aria-atomic=true><div></div><p class="flex-1 pt-0.5 text-sm font-medium leading-snug text-gray-800 dark:text-gray-100"></p><button class="mt-0.5 -mr-1 cursor-pointer shrink-0 rounded-lg p-1 text-gray-400 hover:text-gray-600 hover:bg-gray-200/60 dark:text-gray-500 dark:hover:text-gray-300 dark:hover:bg-gray-700/60 transition-colors duration-100"></button><div class="absolute inset-x-0 bottom-0 h-0.5 bg-black/5 dark:bg-white/5"><div>'), k_ = /* @__PURE__ */ G("<button type=button>");
46165
+ const S_ = {
46164
46166
  success: {
46165
46167
  accent: "text-emerald-600 dark:text-emerald-400",
46166
46168
  bg: "bg-emerald-50 dark:bg-emerald-950/40 border-emerald-200/80 dark:border-emerald-800/50",
@@ -46189,31 +46191,31 @@ const k_ = {
46189
46191
  progress: "bg-amber-500 dark:bg-amber-400",
46190
46192
  iconEl: Es
46191
46193
  }
46192
- }, S_ = "(prefers-reduced-motion: reduce)";
46194
+ }, C_ = "(prefers-reduced-motion: reduce)";
46193
46195
  let Jo = null;
46194
46196
  function $p() {
46195
- return typeof window > "u" ? null : (Jo || (Jo = window.matchMedia(S_)), Jo);
46197
+ return typeof window > "u" ? null : (Jo || (Jo = window.matchMedia(C_)), Jo);
46196
46198
  }
46197
- function C_(t) {
46199
+ function A_(t) {
46198
46200
  const e = $p();
46199
46201
  return e ? (e.addEventListener("change", t), () => e.removeEventListener("change", t)) : () => {
46200
46202
  };
46201
46203
  }
46202
- function A_() {
46204
+ function T_() {
46203
46205
  const t = $p();
46204
46206
  return t ? t.matches : !1;
46205
46207
  }
46206
- function T_(t) {
46208
+ function E_(t) {
46207
46209
  const e = Mt({
46208
46210
  duration: 5e3
46209
- }, t), r = Tt(), i = le(() => e.dismissLabel ?? r.t("BiChat.Chat.DismissNotification")), s = le(() => k_[e.type]), c = s().iconEl, [u, g] = Me(!1), [p, m] = Me(!1), x = le(() => ({
46211
+ }, t), r = Tt(), i = le(() => e.dismissLabel ?? r.t("BiChat.Chat.DismissNotification")), s = le(() => S_[e.type]), c = s().iconEl, [u, g] = Me(!1), [p, m] = Me(!1), x = le(() => ({
46210
46212
  current: e.duration
46211
46213
  })), y = {
46212
46214
  current: Date.now()
46213
46215
  };
46214
46216
  let A;
46215
46217
  tt(() => clearTimeout(A));
46216
- const E = bh(C_, A_);
46218
+ const E = bh(A_, T_);
46217
46219
  Sr(() => {
46218
46220
  const B = ct(() => {
46219
46221
  const N = requestAnimationFrame(() => g(!0));
@@ -46244,7 +46246,7 @@ function T_(t) {
46244
46246
  return (B = e.onDismiss) == null ? void 0 : B.call(e, e.id);
46245
46247
  }, 200);
46246
46248
  }, R = le(() => e.type === "error" ? "assertive" : "polite"), H = le(() => e.type === "error" || e.type === "warning" ? "alert" : "status");
46247
- return X(v_, {
46249
+ return X(y_, {
46248
46250
  get show() {
46249
46251
  return u();
46250
46252
  },
@@ -46255,7 +46257,7 @@ function T_(t) {
46255
46257
  leaveFrom: "translate-y-0 opacity-100 scale-100",
46256
46258
  leaveTo: "-translate-y-2 opacity-0 scale-95",
46257
46259
  get children() {
46258
- var B = y_(), N = B.firstChild, O = N.nextSibling, Q = O.nextSibling, D = Q.nextSibling, K = D.firstChild;
46260
+ var B = w_(), N = B.firstChild, O = N.nextSibling, Q = O.nextSibling, D = Q.nextSibling, K = D.firstChild;
46259
46261
  return B.addEventListener("mouseleave", () => m(!1)), B.addEventListener("mouseenter", () => m(!0)), C(N, X(c, {
46260
46262
  size: 16,
46261
46263
  get className() {
@@ -46265,7 +46267,7 @@ function T_(t) {
46265
46267
  })), C(O, () => e.message), C(B, (() => {
46266
46268
  var ie = ee(() => !!e.action);
46267
46269
  return () => ie() && (() => {
46268
- var te = w_();
46270
+ var te = k_();
46269
46271
  return te.$$click = () => {
46270
46272
  var de;
46271
46273
  (de = e.action) == null || de.onClick(), $();
@@ -46293,7 +46295,7 @@ function T_(t) {
46293
46295
  });
46294
46296
  }
46295
46297
  $t(["click"]);
46296
- var E_ = /* @__PURE__ */ G('<div class="fixed top-6 right-6 z-[var(--bichat-z-toast,60)] flex flex-col gap-2 pointer-events-none">'), $_ = /* @__PURE__ */ G("<div class=pointer-events-auto>");
46298
+ var $_ = /* @__PURE__ */ G('<div class="fixed top-6 right-6 z-[var(--bichat-z-toast,60)] flex flex-col gap-2 pointer-events-none">'), __ = /* @__PURE__ */ G("<div class=pointer-events-auto>");
46297
46299
  function _p(t) {
46298
46300
  const e = Tt();
46299
46301
  return X(ir, {
@@ -46306,14 +46308,14 @@ function _p(t) {
46306
46308
  return e.t("BiChat.Common.Notifications");
46307
46309
  },
46308
46310
  get children() {
46309
- var i = E_();
46311
+ var i = $_();
46310
46312
  return C(i, X(lm, {
46311
46313
  get each() {
46312
46314
  return t.toasts;
46313
46315
  },
46314
46316
  children: (s) => (() => {
46315
- var c = $_();
46316
- return C(c, X(T_, an(s, {
46317
+ var c = __();
46318
+ return C(c, X(E_, an(s, {
46317
46319
  get onDismiss() {
46318
46320
  return t.onDismiss;
46319
46321
  },
@@ -46327,20 +46329,20 @@ function _p(t) {
46327
46329
  })
46328
46330
  });
46329
46331
  }
46330
- function Ez(t) {
46332
+ function $z(t) {
46331
46333
  const e = Mt({
46332
46334
  mode: "all",
46333
46335
  fallback: null
46334
46336
  }, t);
46335
46337
  return ee(() => le(() => e.permissions.length === 0 ? ee(() => e.children) : le(() => e.mode === "all" ? e.permissions.every((i) => e.hasPermission(i)) : e.permissions.some((i) => e.hasPermission(i)))() ? ee(() => e.children) : ee(() => e.fallback)));
46336
46338
  }
46337
- var __ = /* @__PURE__ */ G('<div class="flex flex-col items-center justify-center p-8 text-center min-h-[200px]"><div class="absolute inset-0 overflow-hidden pointer-events-none opacity-[0.03] dark:opacity-[0.04]"aria-hidden=true><svg class="absolute -top-8 -right-8 w-64 h-64 text-red-500"viewBox="0 0 200 200"fill=currentColor><circle cx=100 cy=100 r=80 opacity=0.5></circle><circle cx=100 cy=100 r=50 opacity=0.3></circle><circle cx=100 cy=100 r=25 opacity=0.2></circle></svg></div><div class="relative flex flex-col items-center"><div class="relative mb-5"><div class="absolute inset-0 rounded-full bg-red-100 dark:bg-red-900/30 scale-150 blur-md"></div><div class="relative flex items-center justify-center w-14 h-14 rounded-full bg-red-50 dark:bg-red-900/20 border border-red-200/60 dark:border-red-800/40"></div></div><h2 class="text-lg font-semibold text-gray-900 dark:text-white mb-1.5"></h2><p class="text-sm text-gray-500 dark:text-gray-400 mb-5 max-w-md leading-relaxed">'), Mp = /* @__PURE__ */ G('<button type=button class="flex items-center gap-2 px-5 py-2.5 bg-red-600 hover:bg-red-700 active:bg-red-800 text-white rounded-lg transition-colors shadow-sm text-sm font-medium">'), M_ = /* @__PURE__ */ G('<div class="flex flex-col items-center justify-center p-8 text-center min-h-[200px]"><div class="relative flex flex-col items-center"><div class="relative mb-5"><div class="absolute inset-0 rounded-full bg-red-100 scale-150 blur-md"></div><div class="relative flex items-center justify-center w-14 h-14 rounded-full bg-red-50 border border-red-200/60"></div></div><h2 class="text-lg font-semibold text-gray-900 mb-1.5"></h2><p class="text-sm text-gray-500 mb-5 max-w-md leading-relaxed">');
46338
- function I_(t) {
46339
+ var M_ = /* @__PURE__ */ G('<div class="flex flex-col items-center justify-center p-8 text-center min-h-[200px]"><div class="absolute inset-0 overflow-hidden pointer-events-none opacity-[0.03] dark:opacity-[0.04]"aria-hidden=true><svg class="absolute -top-8 -right-8 w-64 h-64 text-red-500"viewBox="0 0 200 200"fill=currentColor><circle cx=100 cy=100 r=80 opacity=0.5></circle><circle cx=100 cy=100 r=50 opacity=0.3></circle><circle cx=100 cy=100 r=25 opacity=0.2></circle></svg></div><div class="relative flex flex-col items-center"><div class="relative mb-5"><div class="absolute inset-0 rounded-full bg-red-100 dark:bg-red-900/30 scale-150 blur-md"></div><div class="relative flex items-center justify-center w-14 h-14 rounded-full bg-red-50 dark:bg-red-900/20 border border-red-200/60 dark:border-red-800/40"></div></div><h2 class="text-lg font-semibold text-gray-900 dark:text-white mb-1.5"></h2><p class="text-sm text-gray-500 dark:text-gray-400 mb-5 max-w-md leading-relaxed">'), Mp = /* @__PURE__ */ G('<button type=button class="flex items-center gap-2 px-5 py-2.5 bg-red-600 hover:bg-red-700 active:bg-red-800 text-white rounded-lg transition-colors shadow-sm text-sm font-medium">'), I_ = /* @__PURE__ */ G('<div class="flex flex-col items-center justify-center p-8 text-center min-h-[200px]"><div class="relative flex flex-col items-center"><div class="relative mb-5"><div class="absolute inset-0 rounded-full bg-red-100 scale-150 blur-md"></div><div class="relative flex items-center justify-center w-14 h-14 rounded-full bg-red-50 border border-red-200/60"></div></div><h2 class="text-lg font-semibold text-gray-900 mb-1.5"></h2><p class="text-sm text-gray-500 mb-5 max-w-md leading-relaxed">');
46340
+ function L_(t) {
46339
46341
  const [e, r] = Da(t, ["error", "onReset", "resetLabel", "errorTitle"]), {
46340
46342
  t: i
46341
46343
  } = Tt(), s = e.resetLabel ?? i("BiChat.Common.TryAgain"), c = e.errorTitle ?? i("BiChat.Error.SomethingWentWrong");
46342
46344
  return (() => {
46343
- var u = __(), g = u.firstChild, p = g.nextSibling, m = p.firstChild, x = m.firstChild, y = x.nextSibling, A = m.nextSibling, E = A.nextSibling;
46345
+ var u = M_(), g = u.firstChild, p = g.nextSibling, m = p.firstChild, x = m.firstChild, y = x.nextSibling, A = m.nextSibling, E = A.nextSibling;
46344
46346
  return C(y, X(Ms, {
46345
46347
  size: 28,
46346
46348
  className: "text-red-500 dark:text-red-400",
@@ -46360,10 +46362,10 @@ function I_(t) {
46360
46362
  })(), null), u;
46361
46363
  })();
46362
46364
  }
46363
- function L_(t) {
46365
+ function z_(t) {
46364
46366
  const [e, r] = Da(t, ["error", "onReset", "titleText", "fallbackText", "retryText"]);
46365
46367
  return (() => {
46366
- var i = M_(), s = i.firstChild, c = s.firstChild, u = c.firstChild, g = u.nextSibling, p = c.nextSibling, m = p.nextSibling;
46368
+ var i = I_(), s = i.firstChild, c = s.firstChild, u = c.firstChild, g = u.nextSibling, p = c.nextSibling, m = p.nextSibling;
46367
46369
  return C(g, X(Ms, {
46368
46370
  size: 28,
46369
46371
  className: "text-red-500",
@@ -46383,7 +46385,7 @@ function L_(t) {
46383
46385
  })(), null), i;
46384
46386
  })();
46385
46387
  }
46386
- function $z(t) {
46388
+ function _z(t) {
46387
46389
  const e = (r) => {
46388
46390
  var s;
46389
46391
  const i = r instanceof Error ? r : new Error(String(r));
@@ -46393,7 +46395,7 @@ function $z(t) {
46393
46395
  fallback: (r, i) => {
46394
46396
  const s = e(r);
46395
46397
  return X(mu, {
46396
- fallback: (c) => (e(c), X(L_, {
46398
+ fallback: (c) => (e(c), X(z_, {
46397
46399
  error: s,
46398
46400
  onReset: i,
46399
46401
  get titleText() {
@@ -46410,7 +46412,7 @@ function $z(t) {
46410
46412
  }
46411
46413
  })),
46412
46414
  get children() {
46413
- return ee(() => typeof t.fallback == "function")() ? t.fallback(s, i) : t.fallback ?? X(I_, {
46415
+ return ee(() => typeof t.fallback == "function")() ? t.fallback(s, i) : t.fallback ?? X(L_, {
46414
46416
  error: s,
46415
46417
  onReset: i
46416
46418
  });
@@ -46423,16 +46425,16 @@ function $z(t) {
46423
46425
  });
46424
46426
  }
46425
46427
  $t(["click"]);
46426
- var z_ = /* @__PURE__ */ G('<div class="space-y-1 px-2">'), R_ = /* @__PURE__ */ G('<div class="animate-pulse px-3 py-2 rounded-lg"><div class="flex items-center gap-2"><div class="w-5 h-5 bg-gray-300 dark:bg-gray-700 rounded"></div><div class=flex-1><div class="h-4 bg-gray-300 dark:bg-gray-700 rounded w-3/4">');
46428
+ var R_ = /* @__PURE__ */ G('<div class="space-y-1 px-2">'), D_ = /* @__PURE__ */ G('<div class="animate-pulse px-3 py-2 rounded-lg"><div class="flex items-center gap-2"><div class="w-5 h-5 bg-gray-300 dark:bg-gray-700 rounded"></div><div class=flex-1><div class="h-4 bg-gray-300 dark:bg-gray-700 rounded w-3/4">');
46427
46429
  function Gl(t) {
46428
46430
  const e = Mt({
46429
46431
  count: 5
46430
46432
  }, t);
46431
46433
  return (() => {
46432
- var r = z_();
46434
+ var r = R_();
46433
46435
  return C(r, () => Array.from({
46434
46436
  length: e.count
46435
- }).map((i, s) => R_())), r;
46437
+ }).map((i, s) => D_())), r;
46436
46438
  })();
46437
46439
  }
46438
46440
  function Ip(t) {
@@ -46471,7 +46473,7 @@ function Ip(t) {
46471
46473
  }
46472
46474
  };
46473
46475
  }
46474
- function D_(t) {
46476
+ function N_(t) {
46475
46477
  const { delay: e = 500, onLongPress: r, onPressStart: i, onPressCancel: s, moveThreshold: c = 10, hapticFeedback: u = !0 } = t, [g, p] = Me(!1), m = { current: null }, x = { current: null }, y = { current: null }, A = () => {
46476
46478
  m.current && (clearTimeout(m.current), m.current = null);
46477
46479
  }, E = (B) => {
@@ -46509,8 +46511,8 @@ function D_(t) {
46509
46511
  }
46510
46512
  };
46511
46513
  }
46512
- var N_ = /* @__PURE__ */ G('<div class="fixed inset-0 z-[9998]">'), B_ = /* @__PURE__ */ G('<div role=menu class="rounded-xl shadow-xl backdrop-blur bg-white dark:bg-gray-800 border border-gray-200 dark:border-gray-700 overflow-hidden"><div class=py-2>'), F_ = /* @__PURE__ */ G("<button role=menuitem><span class=flex-1>"), O_ = /* @__PURE__ */ G('<span class="flex-shrink-0 w-5 h-5 flex items-center justify-center">');
46513
- const P_ = (t) => {
46514
+ var B_ = /* @__PURE__ */ G('<div class="fixed inset-0 z-[9998]">'), F_ = /* @__PURE__ */ G('<div role=menu class="rounded-xl shadow-xl backdrop-blur bg-white dark:bg-gray-800 border border-gray-200 dark:border-gray-700 overflow-hidden"><div class=py-2>'), O_ = /* @__PURE__ */ G("<button role=menuitem><span class=flex-1>"), P_ = /* @__PURE__ */ G('<span class="flex-shrink-0 w-5 h-5 flex items-center justify-center">');
46515
+ const H_ = (t) => {
46514
46516
  const e = Tt(), [r, i] = Me(-1), s = {
46515
46517
  current: []
46516
46518
  }, c = le(() => t.items.reduce((g, p, m) => (p.disabled || g.push(m), g), [])), u = (g) => {
@@ -46585,12 +46587,12 @@ const P_ = (t) => {
46585
46587
  },
46586
46588
  get children() {
46587
46589
  return ee(() => ee(() => !!t.isOpen)() && [(() => {
46588
- var $ = N_();
46590
+ var $ = B_();
46589
46591
  return zt($, "click", t.onClose, !0), $;
46590
46592
  })(), (() => {
46591
- var $ = B_(), R = $.firstChild;
46593
+ var $ = F_(), R = $.firstChild;
46592
46594
  return Ht((H) => H, $), C(R, () => t.items.map((H, B) => (() => {
46593
- var N = F_(), O = N.firstChild;
46595
+ var N = O_(), O = N.firstChild;
46594
46596
  return N.$$click = () => {
46595
46597
  var Q;
46596
46598
  H.disabled || (H.onClick(), (Q = t.onClose) == null || Q.call(t));
@@ -46599,7 +46601,7 @@ const P_ = (t) => {
46599
46601
  }, N), C(N, (() => {
46600
46602
  var Q = ee(() => !!H.icon);
46601
46603
  return () => Q() && (() => {
46602
- var D = O_();
46604
+ var D = P_();
46603
46605
  return C(D, () => H.icon), D;
46604
46606
  })();
46605
46607
  })(), O), C(O, () => H.label), we((Q) => {
@@ -46629,7 +46631,7 @@ const P_ = (t) => {
46629
46631
  });
46630
46632
  };
46631
46633
  $t(["click"]);
46632
- var H_ = /* @__PURE__ */ G('<div class="relative overflow-hidden rounded-lg"><div><div role=button tabindex=0 data-session-item><div class="flex items-center justify-between gap-2"><div class="flex items-start gap-2 min-w-0 flex-1"><div class="flex flex-col min-w-0 flex-1"><span class="text-[11px] text-gray-400 dark:text-gray-500 truncate mt-0.5">'), X_ = /* @__PURE__ */ G('<div class="absolute inset-y-0 right-0 w-20 flex items-center justify-center bg-gray-500 dark:bg-gray-600 rounded-r-lg"aria-hidden=true>'), Y_ = /* @__PURE__ */ G('<span class="inline-flex items-center ml-1 rounded-full bg-primary-50 dark:bg-primary-900/30 px-1.5 text-[10px] font-medium text-primary-600 dark:text-primary-400">'), Ca = /* @__PURE__ */ G("<button>");
46634
+ var X_ = /* @__PURE__ */ G('<div class="relative overflow-hidden rounded-lg"><div><div role=button tabindex=0 data-session-item><div class="flex items-center justify-between gap-2"><div class="flex items-start gap-2 min-w-0 flex-1"><div class="flex flex-col min-w-0 flex-1"><span class="text-[11px] text-gray-400 dark:text-gray-500 truncate mt-0.5">'), Y_ = /* @__PURE__ */ G('<div class="absolute inset-y-0 right-0 w-20 flex items-center justify-center bg-gray-500 dark:bg-gray-600 rounded-r-lg"aria-hidden=true>'), W_ = /* @__PURE__ */ G('<span class="inline-flex items-center ml-1 rounded-full bg-primary-50 dark:bg-primary-900/30 px-1.5 text-[10px] font-medium text-primary-600 dark:text-primary-400">'), Ca = /* @__PURE__ */ G("<button>");
46633
46635
  const jl = (t) => {
46634
46636
  const e = Mt({
46635
46637
  mode: "active",
@@ -46666,7 +46668,7 @@ const jl = (t) => {
46666
46668
  }), N = le(() => B() ? x.t("BiChat.Common.Generating") : e.session.title ?? x.t("BiChat.Common.Untitled")), O = le(() => Ds(e.session.updatedAt, x.t)), Q = le(() => {
46667
46669
  var ue;
46668
46670
  return ((ue = e.session.access) == null ? void 0 : ue.role) ?? "owner";
46669
- }), D = le(() => Q() === "editor" ? x.t("BiChat.Share.RoleEditor") : Q() === "viewer" ? x.t("BiChat.Share.RoleViewer") : Q() === "read_all" ? x.t("BiChat.Share.RoleReadOnly") : ""), K = le(() => e.session.isGroup ? x.t("BiChat.Sidebar.GroupChat") : Q() === "editor" || Q() === "viewer" ? x.t("BiChat.Sidebar.SharedWithYou") : ""), ie = le(() => !!(e.session.isGroup || e.session.memberCount && e.session.memberCount > 1)), te = le(() => [O(), K(), D()].filter(Boolean)), de = D_({
46671
+ }), D = le(() => Q() === "editor" ? x.t("BiChat.Share.RoleEditor") : Q() === "viewer" ? x.t("BiChat.Share.RoleViewer") : Q() === "read_all" ? x.t("BiChat.Share.RoleReadOnly") : ""), K = le(() => e.session.isGroup ? x.t("BiChat.Sidebar.GroupChat") : Q() === "editor" || Q() === "viewer" ? x.t("BiChat.Sidebar.SharedWithYou") : ""), ie = le(() => !!(e.session.isGroup || e.session.memberCount && e.session.memberCount > 1)), te = le(() => [O(), K(), D()].filter(Boolean)), de = N_({
46670
46672
  delay: 500,
46671
46673
  onLongPress: (ue) => {
46672
46674
  const ge = ue.currentTarget;
@@ -46764,11 +46766,11 @@ const jl = (t) => {
46764
46766
  variant: "danger"
46765
46767
  }] : []]), fe = le(() => se().length > 0);
46766
46768
  return [(() => {
46767
- var ue = H_(), ge = ue.firstChild, Ae = ge.firstChild, ce = Ae.firstChild, Ee = ce.firstChild, Ce = Ee.firstChild, Se = Ce.firstChild;
46769
+ var ue = X_(), ge = ue.firstChild, Ae = ge.firstChild, ce = Ae.firstChild, Ee = ce.firstChild, Ce = Ee.firstChild, Se = Ce.firstChild;
46768
46770
  return C(ue, (() => {
46769
46771
  var $e = ee(() => !!R());
46770
46772
  return () => $e() && (() => {
46771
- var ne = X_();
46773
+ var ne = Y_();
46772
46774
  return C(ne, X(ln, {
46773
46775
  size: 20,
46774
46776
  className: "text-white"
@@ -46812,7 +46814,7 @@ const jl = (t) => {
46812
46814
  weight: "duotone",
46813
46815
  className: "text-primary-500 dark:text-primary-400 mt-1 flex-shrink-0"
46814
46816
  });
46815
- })(), Ce), C(Ce, X(a_, {
46817
+ })(), Ce), C(Ce, X(i_, {
46816
46818
  ref: ($e) => r.current = $e ?? null,
46817
46819
  get value() {
46818
46820
  return N();
@@ -46827,7 +46829,7 @@ const jl = (t) => {
46827
46829
  }), Se), C(Se, () => te().join(" • "), null), C(Se, (() => {
46828
46830
  var $e = ee(() => !!(ie() && e.session.memberCount && e.session.memberCount > 0));
46829
46831
  return () => $e() && (() => {
46830
- var ne = Y_();
46832
+ var ne = W_();
46831
46833
  return C(ne, () => e.session.memberCount), ne;
46832
46834
  })();
46833
46835
  })(), null), C(ce, (() => {
@@ -46979,7 +46981,7 @@ const jl = (t) => {
46979
46981
  }
46980
46982
  });
46981
46983
  })(), null), ue;
46982
- })(), X(P_, {
46984
+ })(), X(H_, {
46983
46985
  get items() {
46984
46986
  return se();
46985
46987
  },
@@ -46993,18 +46995,18 @@ const jl = (t) => {
46993
46995
  })];
46994
46996
  };
46995
46997
  $t(["click", "keydown"]);
46996
- var W_ = /* @__PURE__ */ G('<div class="sticky top-0 bg-surface-300 dark:bg-gray-900 px-4 py-2 text-sm font-medium z-10 border-b border-gray-100 dark:border-gray-800"><div class="flex items-center justify-between"><span class="text-gray-700 dark:text-gray-300 font-semibold"></span><span class="text-xs text-gray-500 dark:text-gray-400 bg-gray-100 dark:bg-gray-800 px-2 py-0.5 rounded-full">');
46998
+ var U_ = /* @__PURE__ */ G('<div class="sticky top-0 bg-surface-300 dark:bg-gray-900 px-4 py-2 text-sm font-medium z-10 border-b border-gray-100 dark:border-gray-800"><div class="flex items-center justify-between"><span class="text-gray-700 dark:text-gray-300 font-semibold"></span><span class="text-xs text-gray-500 dark:text-gray-400 bg-gray-100 dark:bg-gray-800 px-2 py-0.5 rounded-full">');
46997
46999
  function ql(t) {
46998
47000
  return (() => {
46999
- var e = W_(), r = e.firstChild, i = r.firstChild, s = i.nextSibling;
47001
+ var e = U_(), r = e.firstChild, i = r.firstChild, s = i.nextSibling;
47000
47002
  return C(i, () => t.groupName), C(s, () => t.count), e;
47001
47003
  })();
47002
47004
  }
47003
- var U_ = /* @__PURE__ */ G("<div class=relative>"), G_ = /* @__PURE__ */ G('<div class="flex items-center gap-1 flex-shrink-0">'), j_ = /* @__PURE__ */ G('<div class="flex items-center gap-2 min-w-0 flex-1"><span class="truncate text-gray-900 dark:text-gray-100"> '), q_ = /* @__PURE__ */ G('<span class="text-gray-500 dark:text-gray-400">'), V_ = /* @__PURE__ */ G('<button class="cursor-pointer p-1 rounded hover:bg-gray-200 dark:hover:bg-gray-600 transition-smooth">'), Q_ = /* @__PURE__ */ G("<button>"), Z_ = /* @__PURE__ */ G('<div class="border-t border-gray-200 dark:border-gray-700 my-1">'), K_ = /* @__PURE__ */ G("<button><span class=truncate> "), J_ = /* @__PURE__ */ G('<div class="px-3 py-6 text-center"><p class="text-sm text-gray-700 dark:text-gray-300">');
47004
- function eM(t) {
47005
+ var G_ = /* @__PURE__ */ G("<div class=relative>"), j_ = /* @__PURE__ */ G('<div class="flex items-center gap-1 flex-shrink-0">'), q_ = /* @__PURE__ */ G('<div class="flex items-center gap-2 min-w-0 flex-1"><span class="truncate text-gray-900 dark:text-gray-100"> '), V_ = /* @__PURE__ */ G('<span class="text-gray-500 dark:text-gray-400">'), Q_ = /* @__PURE__ */ G('<button class="cursor-pointer p-1 rounded hover:bg-gray-200 dark:hover:bg-gray-600 transition-smooth">'), Z_ = /* @__PURE__ */ G("<button>"), K_ = /* @__PURE__ */ G('<div class="border-t border-gray-200 dark:border-gray-700 my-1">'), J_ = /* @__PURE__ */ G("<button><span class=truncate> "), eM = /* @__PURE__ */ G('<div class="px-3 py-6 text-center"><p class="text-sm text-gray-700 dark:text-gray-300">');
47006
+ function tM(t) {
47005
47007
  const e = Tt();
47006
47008
  return (() => {
47007
- var r = U_();
47009
+ var r = G_();
47008
47010
  return C(r, X(Ba, {
47009
47011
  children: (i) => [X(Fa, {
47010
47012
  get disabled() {
@@ -47025,7 +47027,7 @@ function eM(t) {
47025
47027
  },
47026
47028
  get children() {
47027
47029
  return [ee(() => ee(() => !!t.selectedUser)() ? (() => {
47028
- var s = j_(), c = s.firstChild, u = c.firstChild;
47030
+ var s = q_(), c = s.firstChild, u = c.firstChild;
47029
47031
  return C(s, X(ha, {
47030
47032
  get firstName() {
47031
47033
  return t.selectedUser.firstName;
@@ -47039,17 +47041,17 @@ function eM(t) {
47039
47041
  size: "sm"
47040
47042
  }), c), C(c, () => t.selectedUser.firstName, u), C(c, () => t.selectedUser.lastName, null), s;
47041
47043
  })() : (() => {
47042
- var s = q_();
47044
+ var s = V_();
47043
47045
  return C(s, (() => {
47044
47046
  var c = ee(() => !!t.loading);
47045
47047
  return () => c() ? e.t("BiChat.AllChats.LoadingUsers") : e.t("BiChat.AllChats.AllUsers");
47046
47048
  })()), s;
47047
47049
  })()), (() => {
47048
- var s = G_();
47050
+ var s = j_();
47049
47051
  return C(s, (() => {
47050
47052
  var c = ee(() => !!t.selectedUser);
47051
47053
  return () => c() && (() => {
47052
- var u = V_();
47054
+ var u = Q_();
47053
47055
  return u.$$click = (g) => {
47054
47056
  var p;
47055
47057
  g.preventDefault(), g.stopPropagation(), (p = t.onUserChange) == null || p.call(t, null);
@@ -47081,7 +47083,7 @@ function eM(t) {
47081
47083
  get children() {
47082
47084
  return [X(Nr, {
47083
47085
  children: (s) => (() => {
47084
- var c = Q_();
47086
+ var c = Z_();
47085
47087
  return c.$$click = () => {
47086
47088
  var u;
47087
47089
  return (u = t.onUserChange) == null ? void 0 : u.call(t, null);
@@ -47092,9 +47094,9 @@ function eM(t) {
47092
47094
  ${t.selectedUser ? "text-gray-900 dark:text-gray-100" : "text-primary-700 dark:text-primary-400 font-medium"}
47093
47095
  `)), c;
47094
47096
  })()
47095
- }), ee(() => ee(() => t.users.length > 0)() && Z_()), ee(() => t.users.map((s) => X(Nr, {
47097
+ }), ee(() => ee(() => t.users.length > 0)() && K_()), ee(() => t.users.map((s) => X(Nr, {
47096
47098
  children: (c) => (() => {
47097
- var u = K_(), g = u.firstChild, p = g.firstChild;
47099
+ var u = J_(), g = u.firstChild, p = g.firstChild;
47098
47100
  return u.$$click = () => {
47099
47101
  var m;
47100
47102
  return (m = t.onUserChange) == null ? void 0 : m.call(t, s);
@@ -47121,7 +47123,7 @@ function eM(t) {
47121
47123
  }), u;
47122
47124
  })()
47123
47125
  }))), ee(() => ee(() => t.users.length === 0)() && (() => {
47124
- var s = J_(), c = s.firstChild;
47126
+ var s = eM(), c = s.firstChild;
47125
47127
  return C(c, () => e.t("BiChat.AllChats.NoUsersFound")), s;
47126
47128
  })())];
47127
47129
  }
@@ -47129,10 +47131,10 @@ function eM(t) {
47129
47131
  })), r;
47130
47132
  })();
47131
47133
  }
47132
- const tM = eM;
47134
+ const rM = tM;
47133
47135
  $t(["click"]);
47134
- var rM = /* @__PURE__ */ G('<div class="flex flex-col h-full overflow-hidden"><div class="px-4 py-3 space-y-3 border-b border-gray-200 dark:border-gray-700 flex-shrink-0"><label class="flex items-center gap-2 cursor-pointer select-none"><input type=checkbox class="w-4 h-4 rounded border-gray-300 dark:border-gray-600 text-primary-600 focus:ring-primary-500 focus:ring-offset-0 bg-white dark:bg-gray-800 cursor-pointer"><span class="text-sm text-gray-700 dark:text-gray-300 flex items-center gap-1.5"></span></label></div><nav class="flex-1 overflow-y-auto px-2 pb-4 hide-scrollbar">'), nM = /* @__PURE__ */ G('<p class="text-xs text-gray-500 dark:text-gray-400">'), aM = /* @__PURE__ */ G('<div class="space-y-1 mt-2"role=list>'), iM = /* @__PURE__ */ G('<div class=mb-1><div role=button tabindex=0 class="flex items-center gap-2 px-3 py-2 cursor-pointer hover:bg-gray-50 dark:hover:bg-gray-800 rounded-lg transition-smooth select-none"><span class="text-sm font-medium text-gray-700 dark:text-gray-300 truncate flex-1 min-w-0"></span><span class="text-xs text-gray-500 dark:text-gray-400 bg-gray-100 dark:bg-gray-800 px-2 py-0.5 rounded-full flex-shrink-0">'), sM = /* @__PURE__ */ G('<div class=overflow-hidden><div class="space-y-0.5 pl-6">'), oM = /* @__PURE__ */ G('<div><div role=link tabindex=0><div class="flex items-center gap-2 min-w-0"><p class="text-sm truncate flex-1 min-w-0"></p><div class="flex items-center gap-1.5 flex-shrink-0">'), lM = /* @__PURE__ */ G('<span class="text-xs text-gray-400 dark:text-gray-500">'), cM = /* @__PURE__ */ G('<span class="inline-flex items-center gap-1 px-2 py-0.5 bg-gray-100 dark:bg-gray-800 text-gray-600 dark:text-gray-400 rounded-full text-xs">'), uM = /* @__PURE__ */ G('<div><div role=link tabindex=0><div class="flex items-start gap-2"><div class="flex-1 min-w-0"><p class="text-sm font-medium truncate">'), dM = /* @__PURE__ */ G('<p class="text-xs text-gray-500 dark:text-gray-400 truncate">'), hM = /* @__PURE__ */ G('<span class="inline-flex items-center gap-1 mt-1 px-2 py-0.5 bg-gray-100 dark:bg-gray-800 text-gray-600 dark:text-gray-400 rounded-full text-xs">'), gM = /* @__PURE__ */ G('<div class="py-4 text-center">'), fM = /* @__PURE__ */ G('<button class="text-sm text-primary-600 dark:text-primary-400 hover:underline">'), pM = /* @__PURE__ */ G('<div class="mx-2 mt-4 p-3 bg-red-50 dark:bg-red-900/20 border border-red-200 dark:border-red-800 rounded-lg"><p class="text-xs text-red-600 dark:text-red-400">');
47135
- function mM(t) {
47136
+ var nM = /* @__PURE__ */ G('<div class="flex flex-col h-full overflow-hidden"><div class="px-4 py-3 space-y-3 border-b border-gray-200 dark:border-gray-700 flex-shrink-0"><label class="flex items-center gap-2 cursor-pointer select-none"><input type=checkbox class="w-4 h-4 rounded border-gray-300 dark:border-gray-600 text-primary-600 focus:ring-primary-500 focus:ring-offset-0 bg-white dark:bg-gray-800 cursor-pointer"><span class="text-sm text-gray-700 dark:text-gray-300 flex items-center gap-1.5"></span></label></div><nav class="flex-1 overflow-y-auto px-2 pb-4 hide-scrollbar">'), aM = /* @__PURE__ */ G('<p class="text-xs text-gray-500 dark:text-gray-400">'), iM = /* @__PURE__ */ G('<div class="space-y-1 mt-2"role=list>'), sM = /* @__PURE__ */ G('<div class=mb-1><div role=button tabindex=0 class="flex items-center gap-2 px-3 py-2 cursor-pointer hover:bg-gray-50 dark:hover:bg-gray-800 rounded-lg transition-smooth select-none"><span class="text-sm font-medium text-gray-700 dark:text-gray-300 truncate flex-1 min-w-0"></span><span class="text-xs text-gray-500 dark:text-gray-400 bg-gray-100 dark:bg-gray-800 px-2 py-0.5 rounded-full flex-shrink-0">'), oM = /* @__PURE__ */ G('<div class=overflow-hidden><div class="space-y-0.5 pl-6">'), lM = /* @__PURE__ */ G('<div><div role=link tabindex=0><div class="flex items-center gap-2 min-w-0"><p class="text-sm truncate flex-1 min-w-0"></p><div class="flex items-center gap-1.5 flex-shrink-0">'), cM = /* @__PURE__ */ G('<span class="text-xs text-gray-400 dark:text-gray-500">'), uM = /* @__PURE__ */ G('<span class="inline-flex items-center gap-1 px-2 py-0.5 bg-gray-100 dark:bg-gray-800 text-gray-600 dark:text-gray-400 rounded-full text-xs">'), dM = /* @__PURE__ */ G('<div><div role=link tabindex=0><div class="flex items-start gap-2"><div class="flex-1 min-w-0"><p class="text-sm font-medium truncate">'), hM = /* @__PURE__ */ G('<p class="text-xs text-gray-500 dark:text-gray-400 truncate">'), gM = /* @__PURE__ */ G('<span class="inline-flex items-center gap-1 mt-1 px-2 py-0.5 bg-gray-100 dark:bg-gray-800 text-gray-600 dark:text-gray-400 rounded-full text-xs">'), fM = /* @__PURE__ */ G('<div class="py-4 text-center">'), pM = /* @__PURE__ */ G('<button class="text-sm text-primary-600 dark:text-primary-400 hover:underline">'), mM = /* @__PURE__ */ G('<div class="mx-2 mt-4 p-3 bg-red-50 dark:bg-red-900/20 border border-red-200 dark:border-red-800 rounded-lg"><p class="text-xs text-red-600 dark:text-red-400">');
47137
+ function bM(t) {
47136
47138
  const e = Tt(), [r, i] = Me(!1), [s, c] = Me(null), [u, g] = Me(0), [p, m] = Me(!1), [x, y] = Me(null), [A, E] = Me([]), [$, R] = Me(0), [H, B] = Me(!1), [N, O] = Me([]), [Q, D] = Me(!1), K = 20;
47137
47139
  pt(mt(() => [t.dataSource], () => {
47138
47140
  const ce = ct(() => {
@@ -47245,8 +47247,8 @@ function mM(t) {
47245
47247
  }), Array.from(ce.values()).sort((Ee, Ce) => Ce.latestUpdatedAt.localeCompare(Ee.latestUpdatedAt));
47246
47248
  });
47247
47249
  return (() => {
47248
- var ce = rM(), Ee = ce.firstChild, Ce = Ee.firstChild, Se = Ce.firstChild, $e = Se.nextSibling, ne = Ee.nextSibling;
47249
- return ce.$$pointerdown = (me) => me.stopPropagation(), ce.$$click = (me) => me.stopPropagation(), C(Ee, X(tM, {
47250
+ var ce = nM(), Ee = ce.firstChild, Ce = Ee.firstChild, Se = Ce.firstChild, $e = Se.nextSibling, ne = Ee.nextSibling;
47251
+ return ce.$$pointerdown = (me) => me.stopPropagation(), ce.$$click = (me) => me.stopPropagation(), C(Ee, X(rM, {
47250
47252
  get users() {
47251
47253
  return se();
47252
47254
  },
@@ -47263,7 +47265,7 @@ function mM(t) {
47263
47265
  }), null), C($e, () => e.t("BiChat.AllChats.IncludeArchived"), null), C(Ee, (() => {
47264
47266
  var me = ee(() => $() > 0);
47265
47267
  return () => me() && (() => {
47266
- var xe = nM();
47268
+ var xe = aM();
47267
47269
  return C(xe, (() => {
47268
47270
  var Z = ee(() => $() === 1);
47269
47271
  return () => Z() ? e.t("BiChat.AllChats.ChatFound", {
@@ -47278,7 +47280,7 @@ function mM(t) {
47278
47280
  return () => me() ? X(Gl, {
47279
47281
  count: 5
47280
47282
  }) : ee(() => ee(() => A().length > 0)() ? (() => {
47281
- var xe = aM();
47283
+ var xe = iM();
47282
47284
  return C(xe, (() => {
47283
47285
  var Z = ee(() => !!Ae());
47284
47286
  return () => Z() ? (
@@ -47286,7 +47288,7 @@ function mM(t) {
47286
47288
  Ae().map((_e) => {
47287
47289
  const Fe = _e.owner.id, Ue = [_e.owner.firstName, _e.owner.lastName].filter(Boolean).join(" "), rt = le(() => !fe().has(Fe));
47288
47290
  return (() => {
47289
- var He = iM(), Pe = He.firstChild, et = Pe.firstChild, Le = et.nextSibling;
47291
+ var He = sM(), Pe = He.firstChild, et = Pe.firstChild, Le = et.nextSibling;
47290
47292
  return Pe.$$keydown = (We) => {
47291
47293
  (We.key === "Enter" || We.key === " ") && (We.preventDefault(), ge(Fe));
47292
47294
  }, Pe.$$click = () => ge(Fe), C(Pe, X(As, {
@@ -47309,9 +47311,9 @@ function mM(t) {
47309
47311
  }), et), C(et, () => Ue || e.t("BiChat.Common.Untitled")), C(Le, () => _e.chats.length), C(He, (() => {
47310
47312
  var We = ee(() => !rt());
47311
47313
  return () => We() && (() => {
47312
- var Ze = sM(), st = Ze.firstChild;
47314
+ var Ze = oM(), st = Ze.firstChild;
47313
47315
  return C(st, () => _e.chats.map((Ke) => (() => {
47314
- var ut = oM(), De = ut.firstChild, ot = De.firstChild, ze = ot.firstChild, Xe = ze.nextSibling;
47316
+ var ut = lM(), De = ut.firstChild, ot = De.firstChild, ze = ot.firstChild, Xe = ze.nextSibling;
47315
47317
  return De.$$keydown = (nt) => {
47316
47318
  var Re;
47317
47319
  (nt.key === "Enter" || nt.key === " ") && (nt.preventDefault(), (Re = t.onSessionSelect) == null || Re.call(t, Ke.id));
@@ -47321,13 +47323,13 @@ function mM(t) {
47321
47323
  }, C(ze, () => Ke.title || e.t("BiChat.Common.Untitled")), C(Xe, (() => {
47322
47324
  var nt = ee(() => !!(Ke.isGroup && Ke.memberCount && Ke.memberCount > 1));
47323
47325
  return () => nt() && (() => {
47324
- var Re = lM();
47326
+ var Re = cM();
47325
47327
  return C(Re, () => Ke.memberCount), Re;
47326
47328
  })();
47327
47329
  })(), null), C(Xe, (() => {
47328
47330
  var nt = ee(() => Ke.status === "archived");
47329
47331
  return () => nt() && (() => {
47330
- var Re = cM();
47332
+ var Re = uM();
47331
47333
  return C(Re, X(ln, {
47332
47334
  size: 12,
47333
47335
  className: "w-3 h-3"
@@ -47357,7 +47359,7 @@ function mM(t) {
47357
47359
  initials: ""
47358
47360
  }, Ue = [Fe.firstName, Fe.lastName].filter(Boolean).join(" ");
47359
47361
  return (() => {
47360
- var rt = uM(), He = rt.firstChild, Pe = He.firstChild, et = Pe.firstChild, Le = et.firstChild;
47362
+ var rt = dM(), He = rt.firstChild, Pe = He.firstChild, et = Pe.firstChild, Le = et.firstChild;
47361
47363
  return He.$$keydown = (We) => {
47362
47364
  var Ze;
47363
47365
  (We.key === "Enter" || We.key === " ") && (We.preventDefault(), (Ze = t.onSessionSelect) == null || Ze.call(t, _e.id));
@@ -47376,12 +47378,12 @@ function mM(t) {
47376
47378
  },
47377
47379
  size: "sm"
47378
47380
  }), et), C(Le, () => _e.title || e.t("BiChat.Common.Untitled")), C(et, Ue && (() => {
47379
- var We = dM();
47381
+ var We = hM();
47380
47382
  return C(We, Ue), We;
47381
47383
  })(), null), C(et, (() => {
47382
47384
  var We = ee(() => _e.status === "archived");
47383
47385
  return () => We() && (() => {
47384
- var Ze = hM();
47386
+ var Ze = gM();
47385
47387
  return C(Ze, X(ln, {
47386
47388
  size: 12,
47387
47389
  className: "w-3 h-3"
@@ -47403,13 +47405,13 @@ function mM(t) {
47403
47405
  })(), null), C(xe, (() => {
47404
47406
  var Z = ee(() => !!H());
47405
47407
  return () => Z() && (() => {
47406
- var _e = gM();
47408
+ var _e = fM();
47407
47409
  return Ht(de, _e), C(_e, (() => {
47408
47410
  var Fe = ee(() => !!p());
47409
47411
  return () => Fe() ? X(Gl, {
47410
47412
  count: 2
47411
47413
  }) : (() => {
47412
- var Ue = fM();
47414
+ var Ue = pM();
47413
47415
  return Ue.$$click = ie, C(Ue, () => e.t("BiChat.AllChats.LoadMore")), Ue;
47414
47416
  })();
47415
47417
  })()), _e;
@@ -47429,14 +47431,14 @@ function mM(t) {
47429
47431
  })(), null), C(ne, (() => {
47430
47432
  var me = ee(() => !!x());
47431
47433
  return () => me() && (() => {
47432
- var xe = pM(), Z = xe.firstChild;
47434
+ var xe = mM(), Z = xe.firstChild;
47433
47435
  return C(Z, x), xe;
47434
47436
  })();
47435
47437
  })(), null), we(() => ve(ne, "aria-label", e.t("BiChat.AllChats.OrganizationChats"))), we(() => Se.checked = r()), ce;
47436
47438
  })();
47437
47439
  }
47438
47440
  $t(["click", "pointerdown", "keydown"]);
47439
- function bM() {
47441
+ function xM() {
47440
47442
  return Math.random().toString(36).substring(7);
47441
47443
  }
47442
47444
  const Qd = 2500, Zd = 5;
@@ -47448,7 +47450,7 @@ function no() {
47448
47450
  for (const [O, Q] of r.current.entries())
47449
47451
  H - Q > Qd * 4 && r.current.delete(O);
47450
47452
  r.current.set(R, H);
47451
- const N = bM();
47453
+ const N = xM();
47452
47454
  e((O) => {
47453
47455
  const Q = [...O, { id: N, type: x, message: y, duration: A, action: E }];
47454
47456
  return Q.length <= Zd ? Q : Q.slice(Q.length - Zd);
@@ -47495,23 +47497,23 @@ function Lp(t, e) {
47495
47497
  m.length > 0 && p.push({ name: u[x] || x, sessions: m });
47496
47498
  }), p;
47497
47499
  }
47498
- var xM = /* @__PURE__ */ G("<div><p>"), vM = /* @__PURE__ */ G("<p>"), yM = /* @__PURE__ */ G("<aside role=navigation style=will-change:width><div>"), wM = /* @__PURE__ */ G('<div><div class="group/tooltip relative"><button class="w-10 h-10 rounded-lg bg-primary-600 hover:bg-primary-700 active:bg-primary-800 text-white shadow-sm flex items-center justify-center disabled:opacity-40 disabled:cursor-not-allowed cursor-pointer transition-colors focus-visible:ring-2 focus-visible:ring-primary-400/50"></button><span class="pointer-events-none absolute left-full ml-2 top-1/2 -translate-y-1/2 rounded-md bg-gray-900 dark:bg-gray-100 px-2 py-1 text-xs font-medium text-white dark:text-gray-900 opacity-0 group-hover/tooltip:opacity-100 transition-opacity whitespace-nowrap shadow-lg"></span></div><div class="group/search relative"><button class="w-10 h-10 rounded-lg bg-gray-100 dark:bg-gray-800 hover:bg-gray-200 dark:hover:bg-gray-700 text-gray-500 dark:text-gray-400 flex items-center justify-center cursor-pointer transition-colors focus-visible:ring-2 focus-visible:ring-primary-400/50 focus-visible:outline-none"></button><span class="pointer-events-none absolute left-full ml-2 top-1/2 -translate-y-1/2 rounded-md bg-gray-900 dark:bg-gray-100 px-2 py-1 text-xs font-medium text-white dark:text-gray-900 opacity-0 group-hover/search:opacity-100 group-focus-within/search:opacity-100 transition-opacity whitespace-nowrap shadow-lg">'), kM = /* @__PURE__ */ G('<div class="w-4 h-4 border-2 border-white/50 border-t-transparent rounded-full animate-spin">'), SM = /* @__PURE__ */ G('<div class="flex flex-col items-center gap-1.5 mt-1">'), CM = /* @__PURE__ */ G('<div class="group/indicator relative"><button></button><div class="pointer-events-none absolute left-full ml-2 top-1/2 -translate-y-1/2 w-52 rounded-lg bg-gray-900 dark:bg-gray-100 px-3 py-2 text-xs font-medium text-white dark:text-gray-900 opacity-0 group-hover/indicator:opacity-100 group-focus-within/indicator:opacity-100 transition-opacity shadow-lg break-words">'), AM = /* @__PURE__ */ G('<div class="group/overflow relative"><button class="w-9 h-9 rounded-full flex items-center justify-center text-[10px] font-semibold bg-gray-50 dark:bg-gray-800/60 text-gray-500 dark:text-gray-500 hover:bg-gray-200 dark:hover:bg-gray-700 cursor-pointer transition-colors focus-visible:ring-2 focus-visible:ring-primary-400/50 focus-visible:outline-none">+</button><span class="pointer-events-none absolute left-full ml-2 top-1/2 -translate-y-1/2 rounded-md bg-gray-900 dark:bg-gray-100 px-2 py-1 text-xs font-medium text-white dark:text-gray-900 opacity-0 group-hover/overflow:opacity-100 group-focus-within/overflow:opacity-100 transition-opacity whitespace-nowrap shadow-lg">'), TM = /* @__PURE__ */ G('<div class="p-4 border-b border-gray-200 dark:border-gray-700 flex items-center justify-between">'), EM = /* @__PURE__ */ G('<button class="cursor-pointer p-2 rounded-lg hover:bg-gray-100 dark:hover:bg-gray-800 transition-smooth text-gray-600 dark:text-gray-400">'), $M = /* @__PURE__ */ G('<div class="mt-3 px-4">'), _M = /* @__PURE__ */ G('<div class=p-4><button class="cursor-pointer w-full px-4 py-2.5 bg-primary-600 dark:bg-primary-700 text-white rounded-lg hover:bg-primary-700 hover:-translate-y-0.5 active:bg-primary-800 transition-all duration-150 font-medium shadow-sm disabled:opacity-40 disabled:cursor-not-allowed flex items-center justify-center gap-2 focus-visible:ring-2 focus-visible:ring-primary-400/50 focus-visible:ring-offset-2 dark:focus-visible:ring-offset-gray-900">'), MM = /* @__PURE__ */ G('<nav class="flex-1 overflow-y-auto px-2 pb-4 hide-scrollbar">'), Kd = /* @__PURE__ */ G("<span>"), IM = /* @__PURE__ */ G('<div class=mb-4><div class="space-y-1 mt-2"role=list></div><div class="border-b border-gray-200 dark:border-gray-700 my-3">'), LM = /* @__PURE__ */ G('<div class=mb-4><div class="space-y-1 mt-2"role=list>'), zM = /* @__PURE__ */ G('<button class="cursor-pointer text-sm text-primary-600 dark:text-primary-400 hover:underline">'), RM = /* @__PURE__ */ G('<div class="mt-auto border-t border-gray-100 dark:border-gray-800/80 px-4 py-3 flex items-center justify-between"><button class="flex items-center gap-2 rounded-lg px-3 py-2 text-gray-500 dark:text-gray-400 hover:text-gray-700 dark:hover:text-gray-200 hover:bg-gray-100 dark:hover:bg-gray-800 transition-colors cursor-pointer focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-primary-500/50"><span class="text-xs font-medium">'), el = /* @__PURE__ */ G("<button>"), DM = /* @__PURE__ */ G("<div>"), NM = /* @__PURE__ */ G('<div class="absolute bottom-0 inset-x-0 z-10 border-t border-gray-100 dark:border-gray-800/80 py-3 flex justify-center"><div class="group/tooltip relative"><button class="w-10 h-10 flex items-center justify-center rounded-lg text-gray-500 dark:text-gray-400 hover:text-gray-700 dark:hover:text-gray-200 hover:bg-gray-100 dark:hover:bg-gray-800 transition-colors cursor-pointer focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-primary-500/50"></button><span class="pointer-events-none absolute left-full ml-2 top-1/2 -translate-y-1/2 rounded-md bg-gray-900 dark:bg-gray-100 px-2 py-1 text-xs font-medium text-white dark:text-gray-900 opacity-0 group-hover/tooltip:opacity-100 transition-opacity whitespace-nowrap shadow-lg">');
47499
- const BM = 350;
47500
+ var vM = /* @__PURE__ */ G("<div><p>"), yM = /* @__PURE__ */ G("<p>"), wM = /* @__PURE__ */ G("<aside role=navigation style=will-change:width><div>"), kM = /* @__PURE__ */ G('<div><div class="group/tooltip relative"><button class="w-10 h-10 rounded-lg bg-primary-600 hover:bg-primary-700 active:bg-primary-800 text-white shadow-sm flex items-center justify-center disabled:opacity-40 disabled:cursor-not-allowed cursor-pointer transition-colors focus-visible:ring-2 focus-visible:ring-primary-400/50"></button><span class="pointer-events-none absolute left-full ml-2 top-1/2 -translate-y-1/2 rounded-md bg-gray-900 dark:bg-gray-100 px-2 py-1 text-xs font-medium text-white dark:text-gray-900 opacity-0 group-hover/tooltip:opacity-100 transition-opacity whitespace-nowrap shadow-lg"></span></div><div class="group/search relative"><button class="w-10 h-10 rounded-lg bg-gray-100 dark:bg-gray-800 hover:bg-gray-200 dark:hover:bg-gray-700 text-gray-500 dark:text-gray-400 flex items-center justify-center cursor-pointer transition-colors focus-visible:ring-2 focus-visible:ring-primary-400/50 focus-visible:outline-none"></button><span class="pointer-events-none absolute left-full ml-2 top-1/2 -translate-y-1/2 rounded-md bg-gray-900 dark:bg-gray-100 px-2 py-1 text-xs font-medium text-white dark:text-gray-900 opacity-0 group-hover/search:opacity-100 group-focus-within/search:opacity-100 transition-opacity whitespace-nowrap shadow-lg">'), SM = /* @__PURE__ */ G('<div class="w-4 h-4 border-2 border-white/50 border-t-transparent rounded-full animate-spin">'), CM = /* @__PURE__ */ G('<div class="flex flex-col items-center gap-1.5 mt-1">'), AM = /* @__PURE__ */ G('<div class="group/indicator relative"><button></button><div class="pointer-events-none absolute left-full ml-2 top-1/2 -translate-y-1/2 w-52 rounded-lg bg-gray-900 dark:bg-gray-100 px-3 py-2 text-xs font-medium text-white dark:text-gray-900 opacity-0 group-hover/indicator:opacity-100 group-focus-within/indicator:opacity-100 transition-opacity shadow-lg break-words">'), TM = /* @__PURE__ */ G('<div class="group/overflow relative"><button class="w-9 h-9 rounded-full flex items-center justify-center text-[10px] font-semibold bg-gray-50 dark:bg-gray-800/60 text-gray-500 dark:text-gray-500 hover:bg-gray-200 dark:hover:bg-gray-700 cursor-pointer transition-colors focus-visible:ring-2 focus-visible:ring-primary-400/50 focus-visible:outline-none">+</button><span class="pointer-events-none absolute left-full ml-2 top-1/2 -translate-y-1/2 rounded-md bg-gray-900 dark:bg-gray-100 px-2 py-1 text-xs font-medium text-white dark:text-gray-900 opacity-0 group-hover/overflow:opacity-100 group-focus-within/overflow:opacity-100 transition-opacity whitespace-nowrap shadow-lg">'), EM = /* @__PURE__ */ G('<div class="p-4 border-b border-gray-200 dark:border-gray-700 flex items-center justify-between">'), $M = /* @__PURE__ */ G('<button class="cursor-pointer p-2 rounded-lg hover:bg-gray-100 dark:hover:bg-gray-800 transition-smooth text-gray-600 dark:text-gray-400">'), _M = /* @__PURE__ */ G('<div class="mt-3 px-4">'), MM = /* @__PURE__ */ G('<div class=p-4><button class="cursor-pointer w-full px-4 py-2.5 bg-primary-600 dark:bg-primary-700 text-white rounded-lg hover:bg-primary-700 hover:-translate-y-0.5 active:bg-primary-800 transition-all duration-150 font-medium shadow-sm disabled:opacity-40 disabled:cursor-not-allowed flex items-center justify-center gap-2 focus-visible:ring-2 focus-visible:ring-primary-400/50 focus-visible:ring-offset-2 dark:focus-visible:ring-offset-gray-900">'), IM = /* @__PURE__ */ G('<nav class="flex-1 overflow-y-auto px-2 pb-4 hide-scrollbar">'), Kd = /* @__PURE__ */ G("<span>"), LM = /* @__PURE__ */ G('<div class=mb-4><div class="space-y-1 mt-2"role=list></div><div class="border-b border-gray-200 dark:border-gray-700 my-3">'), zM = /* @__PURE__ */ G('<div class=mb-4><div class="space-y-1 mt-2"role=list>'), RM = /* @__PURE__ */ G('<button class="cursor-pointer text-sm text-primary-600 dark:text-primary-400 hover:underline">'), DM = /* @__PURE__ */ G('<div class="mt-auto border-t border-gray-100 dark:border-gray-800/80 px-4 py-3 flex items-center justify-between"><button class="flex items-center gap-2 rounded-lg px-3 py-2 text-gray-500 dark:text-gray-400 hover:text-gray-700 dark:hover:text-gray-200 hover:bg-gray-100 dark:hover:bg-gray-800 transition-colors cursor-pointer focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-primary-500/50"><span class="text-xs font-medium">'), el = /* @__PURE__ */ G("<button>"), NM = /* @__PURE__ */ G("<div>"), BM = /* @__PURE__ */ G('<div class="absolute bottom-0 inset-x-0 z-10 border-t border-gray-100 dark:border-gray-800/80 py-3 flex justify-center"><div class="group/tooltip relative"><button class="w-10 h-10 flex items-center justify-center rounded-lg text-gray-500 dark:text-gray-400 hover:text-gray-700 dark:hover:text-gray-200 hover:bg-gray-100 dark:hover:bg-gray-800 transition-colors cursor-pointer focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-primary-500/50"></button><span class="pointer-events-none absolute left-full ml-2 top-1/2 -translate-y-1/2 rounded-md bg-gray-900 dark:bg-gray-100 px-2 py-1 text-xs font-medium text-white dark:text-gray-900 opacity-0 group-hover/tooltip:opacity-100 transition-opacity whitespace-nowrap shadow-lg">');
47501
+ const FM = 350;
47500
47502
  function Jd(t) {
47501
47503
  const e = t.error.isPermissionDenied;
47502
47504
  return (() => {
47503
- var r = xM(), i = r.firstChild;
47505
+ var r = vM(), i = r.firstChild;
47504
47506
  return Be(r, `mx-2 mt-4 p-3 border rounded-xl cursor-default ${e ? "bg-amber-50 dark:bg-amber-900/20 border-amber-200 dark:border-amber-800" : "bg-red-50 dark:bg-red-900/20 border-red-200 dark:border-red-800"}`), Be(i, `text-xs font-medium ${e ? "text-amber-700 dark:text-amber-300" : "text-red-600 dark:text-red-400"}`), C(i, () => t.error.title), C(r, (() => {
47505
47507
  var s = ee(() => !!t.error.description);
47506
47508
  return () => s() && (() => {
47507
- var c = vM();
47509
+ var c = yM();
47508
47510
  return Be(c, `mt-1 text-xs ${e ? "text-amber-600 dark:text-amber-400" : "text-red-500 dark:text-red-300"}`), C(c, () => t.error.description), c;
47509
47511
  })();
47510
47512
  })(), null), r;
47511
47513
  })();
47512
47514
  }
47513
- const Vi = "bichat-sidebar-collapsed", FM = 2e3, OM = 30, PM = 8, HM = 1e3, XM = 5;
47514
- function YM() {
47515
+ const Vi = "bichat-sidebar-collapsed", OM = 2e3, PM = 30, HM = 8, XM = 1e3, YM = 5;
47516
+ function WM() {
47515
47517
  const [t, e] = Me((() => {
47516
47518
  try {
47517
47519
  return localStorage.getItem(Vi) === "true";
@@ -47559,7 +47561,7 @@ function YM() {
47559
47561
  }
47560
47562
  };
47561
47563
  }
47562
- function _z(t) {
47564
+ function Mz(t) {
47563
47565
  const e = Mt({
47564
47566
  className: ""
47565
47567
  }, t), r = Tt(), i = no();
@@ -47570,7 +47572,7 @@ function _z(t) {
47570
47572
  current: null
47571
47573
  }, u = {
47572
47574
  current: {}
47573
- }, g = YM(), p = le(() => !e.onClose), m = (Re) => {
47575
+ }, g = WM(), p = le(() => !e.onClose), m = (Re) => {
47574
47576
  !p() || Re.target.closest('a, button, input, textarea, select, summary, label, [role="button"], [role="link"], [contenteditable="true"], [data-no-sidebar-toggle]') || g.toggle();
47575
47577
  };
47576
47578
  pt(mt(() => [p(), g.toggle], () => {
@@ -47657,12 +47659,12 @@ function _z(t) {
47657
47659
  return;
47658
47660
  }
47659
47661
  const qe = u.current[e.activeSessionId] ?? 0;
47660
- if (qe >= PM)
47662
+ if (qe >= HM)
47661
47663
  return;
47662
47664
  u.current[e.activeSessionId] = qe + 1;
47663
47665
  const Ge = window.setTimeout(() => {
47664
47666
  ge((it) => it + 1), ce((it) => it + 1);
47665
- }, HM);
47667
+ }, XM);
47666
47668
  return () => window.clearTimeout(Ge);
47667
47669
  });
47668
47670
  typeof Re == "function" && tt(Re);
@@ -47685,8 +47687,8 @@ function _z(t) {
47685
47687
  Q(Ge.sessions);
47686
47688
  } catch {
47687
47689
  }
47688
- Je >= OM && clearInterval(qe);
47689
- }, FM);
47690
+ Je >= PM && clearInterval(qe);
47691
+ }, OM);
47690
47692
  return () => clearInterval(qe);
47691
47693
  });
47692
47694
  typeof Re == "function" && tt(Re);
@@ -47776,7 +47778,7 @@ function _z(t) {
47776
47778
  }), De = le(() => ut().flatMap((Re) => Re.sessions)), ot = le(() => {
47777
47779
  const Re = /* @__PURE__ */ new Set(), Je = [];
47778
47780
  for (const qe of [...st(), ...De()])
47779
- if (!Re.has(qe.id) && (Re.add(qe.id), Je.push(qe), Je.length >= XM))
47781
+ if (!Re.has(qe.id) && (Re.add(qe.id), Je.push(qe), Je.length >= YM))
47780
47782
  break;
47781
47783
  return Je;
47782
47784
  }), ze = le(() => Ze().length), Xe = le(() => Math.max(0, ze() - ot().length)), nt = (Re) => {
@@ -47805,17 +47807,17 @@ function _z(t) {
47805
47807
  it !== null && qe[it].focus();
47806
47808
  };
47807
47809
  return [(() => {
47808
- var Re = yM(), Je = Re.firstChild;
47810
+ var Re = wM(), Je = Re.firstChild;
47809
47811
  return zt(Re, "click", p() ? m : void 0, !0), C(Re, (() => {
47810
47812
  var qe = ee(() => !!p());
47811
47813
  return () => qe() && (() => {
47812
- var Ge = wM(), it = Ge.firstChild, he = it.firstChild, Ie = he.nextSibling, Ye = it.nextSibling, je = Ye.firstChild, vt = je.nextSibling;
47814
+ var Ge = kM(), it = Ge.firstChild, he = it.firstChild, Ie = he.nextSibling, Ye = it.nextSibling, je = Ye.firstChild, vt = je.nextSibling;
47813
47815
  return he.$$click = (yt) => {
47814
47816
  var Dt;
47815
47817
  yt.stopPropagation(), (Dt = e.onNewChat) == null || Dt.call(e);
47816
47818
  }, C(he, (() => {
47817
47819
  var yt = ee(() => !!e.creating);
47818
- return () => yt() ? kM() : X(nl, {
47820
+ return () => yt() ? SM() : X(nl, {
47819
47821
  size: 18,
47820
47822
  weight: "bold"
47821
47823
  });
@@ -47824,18 +47826,18 @@ function _z(t) {
47824
47826
  var Yt;
47825
47827
  const Dt = (Yt = c.current) == null ? void 0 : Yt.querySelector("input");
47826
47828
  Dt == null || Dt.focus();
47827
- }, BM);
47829
+ }, FM);
47828
47830
  }, C(je, X(Ts, {
47829
47831
  size: 18
47830
47832
  })), C(vt, () => r.t("BiChat.Sidebar.SearchChats")), C(Ge, (() => {
47831
47833
  var yt = ee(() => ot().length > 0);
47832
47834
  return () => yt() && (() => {
47833
- var Dt = SM();
47835
+ var Dt = CM();
47834
47836
  return C(Dt, () => ot().map((Yt) => {
47835
47837
  var Jt, Ir, on;
47836
47838
  const fr = le(() => Yt.id === e.activeSessionId), ar = (on = (Ir = (Jt = Yt.title) == null ? void 0 : Jt.trim()) == null ? void 0 : Ir[0]) == null ? void 0 : on.toUpperCase();
47837
47839
  return (() => {
47838
- var yr = CM(), Pr = yr.firstChild, jr = Pr.nextSibling;
47840
+ var yr = AM(), Pr = yr.firstChild, jr = Pr.nextSibling;
47839
47841
  return Pr.$$click = (Hr) => {
47840
47842
  var Bn;
47841
47843
  Hr.stopPropagation(), (Bn = e.onSessionSelect) == null || Bn.call(e, Yt.id);
@@ -47853,7 +47855,7 @@ function _z(t) {
47853
47855
  }), null), C(Dt, (() => {
47854
47856
  var Yt = ee(() => Xe() > 0);
47855
47857
  return () => Yt() && (() => {
47856
- var fr = AM(), ar = fr.firstChild;
47858
+ var fr = TM(), ar = fr.firstChild;
47857
47859
  ar.firstChild;
47858
47860
  var Jt = ar.nextSibling;
47859
47861
  return ar.$$click = (Ir) => {
@@ -47878,11 +47880,11 @@ function _z(t) {
47878
47880
  })(), Je), C(Je, (() => {
47879
47881
  var qe = ee(() => !!(e.headerSlot || e.onClose));
47880
47882
  return () => qe() && (() => {
47881
- var Ge = TM();
47883
+ var Ge = EM();
47882
47884
  return C(Ge, () => e.headerSlot, null), C(Ge, (() => {
47883
47885
  var it = ee(() => !!e.onClose);
47884
47886
  return () => it() && (() => {
47885
- var he = EM();
47887
+ var he = $M();
47886
47888
  return zt(he, "click", e.onClose, !0), C(he, X(ur, {
47887
47889
  size: 20,
47888
47890
  className: "w-5 h-5"
@@ -47898,7 +47900,7 @@ function _z(t) {
47898
47900
  })();
47899
47901
  })(), null), C(Je, (() => {
47900
47902
  var qe = ee(() => !!(R() === "all-chats" && e.showAllChatsTab));
47901
- return () => qe() ? X(mM, {
47903
+ return () => qe() ? X(bM, {
47902
47904
  get dataSource() {
47903
47905
  return e.dataSource;
47904
47906
  },
@@ -47909,7 +47911,7 @@ function _z(t) {
47909
47911
  return e.activeSessionId;
47910
47912
  }
47911
47913
  }) : [(() => {
47912
- var Ge = $M();
47914
+ var Ge = _M();
47913
47915
  return Ht((it) => c.current = it, Ge), C(Ge, X(Cp, {
47914
47916
  get value() {
47915
47917
  return B();
@@ -47920,7 +47922,7 @@ function _z(t) {
47920
47922
  }
47921
47923
  })), Ge;
47922
47924
  })(), (() => {
47923
- var Ge = _M(), it = Ge.firstChild;
47925
+ var Ge = MM(), it = Ge.firstChild;
47924
47926
  return it.$$click = (he) => {
47925
47927
  var Ie;
47926
47928
  he.stopPropagation(), (Ie = e.onNewChat) == null || Ie.call(e);
@@ -47948,13 +47950,13 @@ function _z(t) {
47948
47950
  a: void 0
47949
47951
  }), Ge;
47950
47952
  })(), (() => {
47951
- var Ge = MM();
47953
+ var Ge = IM();
47952
47954
  return Ge.$$keydown = nt, Ht((it) => s.current = it, Ge), C(Ge, (() => {
47953
47955
  var it = ee(() => !!(D() && O().length === 0));
47954
47956
  return () => it() ? X(Gl, {
47955
47957
  count: 5
47956
47958
  }) : [ee(() => ee(() => st().length > 0)() && (() => {
47957
- var he = IM(), Ie = he.firstChild;
47959
+ var he = LM(), Ie = he.firstChild;
47958
47960
  return C(he, X(ql, {
47959
47961
  get groupName() {
47960
47962
  return r.t("BiChat.Common.Pinned");
@@ -47978,7 +47980,7 @@ function _z(t) {
47978
47980
  });
47979
47981
  })), we(() => ve(Ie, "aria-label", r.t("BiChat.Sidebar.PinnedChats"))), he;
47980
47982
  })()), ee(() => ut().map((he) => (() => {
47981
- var Ie = LM(), Ye = Ie.firstChild;
47983
+ var Ie = zM(), Ye = Ie.firstChild;
47982
47984
  return C(Ie, X(ql, {
47983
47985
  get groupName() {
47984
47986
  return he.name;
@@ -48012,7 +48014,7 @@ function _z(t) {
48012
48014
  },
48013
48015
  get action() {
48014
48016
  return ee(() => !!B())() ? (() => {
48015
- var he = zM();
48017
+ var he = RM();
48016
48018
  return he.$$click = () => N(""), C(he, () => r.t("BiChat.Common.Clear")), he;
48017
48019
  })() : void 0;
48018
48020
  }
@@ -48036,7 +48038,7 @@ function _z(t) {
48036
48038
  })(), null), C(Je, (() => {
48037
48039
  var qe = ee(() => !!p());
48038
48040
  return () => qe() && (() => {
48039
- var Ge = RM(), it = Ge.firstChild, he = it.firstChild;
48041
+ var Ge = DM(), it = Ge.firstChild, he = it.firstChild;
48040
48042
  return C(Ge, (() => {
48041
48043
  var Ie = ee(() => !!(e.onArchivedView || e.showAllChatsTab));
48042
48044
  return () => Ie() ? X(Ba, {
@@ -48117,7 +48119,7 @@ function _z(t) {
48117
48119
  }
48118
48120
  })];
48119
48121
  }
48120
- }) : DM();
48122
+ }) : NM();
48121
48123
  })(), it), it.$$click = (Ie) => {
48122
48124
  Ie.stopPropagation(), g.toggle();
48123
48125
  }, C(it, X(jm, {
@@ -48133,7 +48135,7 @@ function _z(t) {
48133
48135
  })(), null), C(Re, (() => {
48134
48136
  var qe = ee(() => !!(p() && x()));
48135
48137
  return () => qe() && (() => {
48136
- var Ge = NM(), it = Ge.firstChild, he = it.firstChild, Ie = he.nextSibling;
48138
+ var Ge = BM(), it = Ge.firstChild, he = it.firstChild, Ie = he.nextSibling;
48137
48139
  return he.$$click = (Ye) => {
48138
48140
  Ye.stopPropagation(), g.toggle();
48139
48141
  }, C(he, X(qm, {
@@ -48185,8 +48187,8 @@ function _z(t) {
48185
48187
  })];
48186
48188
  }
48187
48189
  $t(["click", "keydown"]);
48188
- var WM = /* @__PURE__ */ G('<div><div class="border-b border-gray-200 dark:border-gray-700 bg-white dark:bg-gray-800 px-6 py-4"><div class="flex items-center gap-3 mb-4"><button class="inline-flex items-center gap-2 px-3 py-2 rounded-lg hover:bg-gray-100 dark:hover:bg-gray-700 transition-colors text-gray-600 dark:text-gray-400"></button></div><div class="flex items-center gap-2 mb-4"><h1 class="text-2xl font-bold text-gray-900 dark:text-white"></h1></div></div><div class="flex-1 overflow-y-auto">'), UM = /* @__PURE__ */ G('<div class="flex items-center justify-center h-full">'), eh = /* @__PURE__ */ G('<div class="flex items-center justify-center h-full px-6">'), GM = /* @__PURE__ */ G('<div class="px-4 py-4 space-y-4">'), jM = /* @__PURE__ */ G('<div><ul class="space-y-1 mt-3 mb-4"role=list>'), qM = /* @__PURE__ */ G("<li class=opacity-70>");
48189
- function Mz(t) {
48190
+ var UM = /* @__PURE__ */ G('<div><div class="border-b border-gray-200 dark:border-gray-700 bg-white dark:bg-gray-800 px-6 py-4"><div class="flex items-center gap-3 mb-4"><button class="inline-flex items-center gap-2 px-3 py-2 rounded-lg hover:bg-gray-100 dark:hover:bg-gray-700 transition-colors text-gray-600 dark:text-gray-400"></button></div><div class="flex items-center gap-2 mb-4"><h1 class="text-2xl font-bold text-gray-900 dark:text-white"></h1></div></div><div class="flex-1 overflow-y-auto">'), GM = /* @__PURE__ */ G('<div class="flex items-center justify-center h-full">'), eh = /* @__PURE__ */ G('<div class="flex items-center justify-center h-full px-6">'), jM = /* @__PURE__ */ G('<div class="px-4 py-4 space-y-4">'), qM = /* @__PURE__ */ G('<div><ul class="space-y-1 mt-3 mb-4"role=list>'), VM = /* @__PURE__ */ G("<li class=opacity-70>");
48191
+ function Iz(t) {
48190
48192
  const e = Mt({
48191
48193
  className: ""
48192
48194
  }, t), r = Tt(), i = no(), s = le(() => e.toast ?? i), c = le(() => !e.toast), [u, g] = Me(""), [p, m] = Me([]), [x, y] = Me(!0), [A, E] = Me(0), [$, R] = Me(!1), [H, B] = Me(null), N = async () => {
@@ -48248,7 +48250,7 @@ function Mz(t) {
48248
48250
  })) : [];
48249
48251
  }), te = le(() => p().length === 0), de = le(() => K().length === 0 && !!u());
48250
48252
  return (() => {
48251
- var se = WM(), fe = se.firstChild, ue = fe.firstChild, ge = ue.firstChild, Ae = ue.nextSibling, ce = Ae.firstChild, Ee = fe.nextSibling;
48253
+ var se = UM(), fe = se.firstChild, ue = fe.firstChild, ge = ue.firstChild, Ae = ue.nextSibling, ce = Ae.firstChild, Ee = fe.nextSibling;
48252
48254
  return zt(ge, "click", e.onBack, !0), C(ge, X(dh, {
48253
48255
  size: 20,
48254
48256
  className: "w-5 h-5"
@@ -48266,7 +48268,7 @@ function Mz(t) {
48266
48268
  }), null), C(Ee, (() => {
48267
48269
  var Ce = ee(() => !!(x() && p().length === 0));
48268
48270
  return () => Ce() ? (() => {
48269
- var Se = UM();
48271
+ var Se = GM();
48270
48272
  return C(Se, X(fi, {})), Se;
48271
48273
  })() : ee(() => !!te())() ? (() => {
48272
48274
  var Se = eh();
@@ -48303,9 +48305,9 @@ function Mz(t) {
48303
48305
  }
48304
48306
  })), Se;
48305
48307
  })() : (() => {
48306
- var Se = GM();
48308
+ var Se = jM();
48307
48309
  return C(Se, () => ie().map(($e) => (() => {
48308
- var ne = jM(), me = ne.firstChild;
48310
+ var ne = qM(), me = ne.firstChild;
48309
48311
  return C(ne, X(ql, {
48310
48312
  get groupName() {
48311
48313
  return $e.name;
@@ -48314,7 +48316,7 @@ function Mz(t) {
48314
48316
  return $e.sessions.length;
48315
48317
  }
48316
48318
  }), me), C(me, () => $e.sessions.map((xe) => (() => {
48317
- var Z = qM();
48319
+ var Z = VM();
48318
48320
  return C(Z, X(jl, {
48319
48321
  session: xe,
48320
48322
  get isActive() {
@@ -48373,20 +48375,20 @@ function Mz(t) {
48373
48375
  })();
48374
48376
  }
48375
48377
  $t(["click"]);
48376
- var VM = /* @__PURE__ */ G('<a href=#main-content class="sr-only focus-visible:not-sr-only focus-visible:absolute focus-visible:top-4 focus-visible:left-4 focus-visible:z-50 focus-visible:bg-primary-600 focus-visible:text-white focus-visible:px-4 focus-visible:py-2 focus-visible:rounded-lg focus-visible:shadow-lg">');
48377
- function QM() {
48378
+ var QM = /* @__PURE__ */ G('<a href=#main-content class="sr-only focus-visible:not-sr-only focus-visible:absolute focus-visible:top-4 focus-visible:left-4 focus-visible:z-50 focus-visible:bg-primary-600 focus-visible:text-white focus-visible:px-4 focus-visible:py-2 focus-visible:rounded-lg focus-visible:shadow-lg">');
48379
+ function ZM() {
48378
48380
  const t = Tt();
48379
48381
  return (() => {
48380
- var e = VM();
48382
+ var e = QM();
48381
48383
  return C(e, () => t.t("BiChat.SkipLink.Label")), e;
48382
48384
  })();
48383
48385
  }
48384
48386
  const zp = "(max-width: 767px)";
48385
- function ZM() {
48387
+ function KM() {
48386
48388
  return typeof window > "u" ? !1 : window.matchMedia(zp).matches;
48387
48389
  }
48388
- function KM() {
48389
- const [t, e] = Me(ZM()), [r, i] = Me(!1);
48390
+ function JM() {
48391
+ const [t, e] = Me(KM()), [r, i] = Me(!1);
48390
48392
  return Sr(() => {
48391
48393
  const g = ct(() => {
48392
48394
  if (typeof window > "u")
@@ -48405,11 +48407,11 @@ function KM() {
48405
48407
  return r();
48406
48408
  }, openMobile: () => i(!0), closeMobile: () => i(!1), toggleMobile: () => i((g) => !g) };
48407
48409
  }
48408
- var JM = /* @__PURE__ */ G('<div><div class="hidden md:block"></div><main id=main-content class="relative flex-1 min-w-0 flex flex-col min-h-0 overflow-hidden"><div class="flex flex-1 min-w-0 min-h-0">'), eI = /* @__PURE__ */ G('<div class="fixed inset-0 z-[var(--bichat-z-overlay,30)] bg-black/40"aria-hidden=true>'), tI = /* @__PURE__ */ G('<div class="fixed inset-y-0 left-0 z-[var(--bichat-z-modal,40)] w-64 max-w-[85vw] shadow-2xl"><div class="h-full bg-white dark:bg-gray-900">'), rI = /* @__PURE__ */ G('<button class="md:hidden absolute top-3 left-3 z-[var(--bichat-z-sticky,20)] w-10 h-10 rounded-xl bg-white/90 dark:bg-gray-900/90 text-gray-700 dark:text-gray-200 border border-gray-200/60 dark:border-gray-800/80 shadow-sm flex items-center justify-center hover:bg-white dark:hover:bg-gray-900 transition-colors cursor-pointer focus-visible:ring-2 focus-visible:ring-primary-400/50">');
48409
- function Iz(t) {
48410
+ var eI = /* @__PURE__ */ G('<div><div class="hidden md:block"></div><main id=main-content class="relative flex-1 min-w-0 flex flex-col min-h-0 overflow-hidden"><div class="flex flex-1 min-w-0 min-h-0">'), tI = /* @__PURE__ */ G('<div class="fixed inset-0 z-[var(--bichat-z-overlay,30)] bg-black/40"aria-hidden=true>'), rI = /* @__PURE__ */ G('<div class="fixed inset-y-0 left-0 z-[var(--bichat-z-modal,40)] w-64 max-w-[85vw] shadow-2xl"><div class="h-full bg-white dark:bg-gray-900">'), nI = /* @__PURE__ */ G('<button class="md:hidden absolute top-3 left-3 z-[var(--bichat-z-sticky,20)] w-10 h-10 rounded-xl bg-white/90 dark:bg-gray-900/90 text-gray-700 dark:text-gray-200 border border-gray-200/60 dark:border-gray-800/80 shadow-sm flex items-center justify-center hover:bg-white dark:hover:bg-gray-900 transition-colors cursor-pointer focus-visible:ring-2 focus-visible:ring-primary-400/50">');
48411
+ function Lz(t) {
48410
48412
  const e = Mt({
48411
48413
  className: ""
48412
- }, t), r = Tt(), i = KM(), s = le(() => e.onNewChat ? [{
48414
+ }, t), r = Tt(), i = JM(), s = le(() => e.onNewChat ? [{
48413
48415
  key: "n",
48414
48416
  ctrl: !0,
48415
48417
  callback: e.onNewChat,
@@ -48423,8 +48425,8 @@ function Iz(t) {
48423
48425
  p.offset.x < -80 && i.closeMobile();
48424
48426
  };
48425
48427
  return (() => {
48426
- var g = JM(), p = g.firstChild, m = p.nextSibling, x = m.firstChild;
48427
- return C(g, X(QM, {}), p), C(p, () => e.renderSidebar({})), C(g, (() => {
48428
+ var g = eI(), p = g.firstChild, m = p.nextSibling, x = m.firstChild;
48429
+ return C(g, X(ZM, {}), p), C(p, () => e.renderSidebar({})), C(g, (() => {
48428
48430
  var y = ee(() => !!(i.isMobile && i.isMobileOpen));
48429
48431
  return () => y() && X(pi, {
48430
48432
  class: "fixed inset-0",
@@ -48437,10 +48439,10 @@ function Iz(t) {
48437
48439
  },
48438
48440
  get children() {
48439
48441
  return [(() => {
48440
- var A = eI();
48442
+ var A = tI();
48441
48443
  return zt(A, "click", i.closeMobile, !0), A;
48442
48444
  })(), (() => {
48443
- var A = tI(), E = A.firstChild;
48445
+ var A = rI(), E = A.firstChild;
48444
48446
  return dn(A, an(() => c.handlers, {
48445
48447
  get style() {
48446
48448
  return {
@@ -48458,7 +48460,7 @@ function Iz(t) {
48458
48460
  })(), m), C(m, (() => {
48459
48461
  var y = ee(() => !!i.isMobile);
48460
48462
  return () => y() && (() => {
48461
- var A = rI();
48463
+ var A = nI();
48462
48464
  return zt(A, "click", i.openMobile, !0), Ht((E) => E, A), C(A, X(uh, {
48463
48465
  size: 20,
48464
48466
  weight: "bold"
@@ -48481,8 +48483,8 @@ function Iz(t) {
48481
48483
  })();
48482
48484
  }
48483
48485
  $t(["click"]);
48484
- var nI = /* @__PURE__ */ G('<div class="flex items-center gap-2"><button class="cursor-pointer text-gray-500 dark:text-gray-400 hover:bg-gray-100 dark:hover:bg-gray-700 hover:text-gray-700 dark:hover:text-gray-300 rounded-md transition-colors disabled:opacity-50 p-2 focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-primary-500/50">'), aI = /* @__PURE__ */ G('<button class="cursor-pointer text-gray-500 dark:text-gray-400 hover:bg-gray-100 dark:hover:bg-gray-700 hover:text-gray-700 dark:hover:text-gray-300 rounded-md transition-colors disabled:opacity-50 p-2 focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-primary-500/50">'), iI = /* @__PURE__ */ G('<button class="cursor-pointer text-gray-500 dark:text-gray-400 hover:bg-gray-100 dark:hover:bg-gray-700 hover:text-gray-700 dark:hover:text-gray-300 rounded-md transition-colors p-2 focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-primary-500/50">');
48485
- function Lz(t) {
48486
+ var aI = /* @__PURE__ */ G('<div class="flex items-center gap-2"><button class="cursor-pointer text-gray-500 dark:text-gray-400 hover:bg-gray-100 dark:hover:bg-gray-700 hover:text-gray-700 dark:hover:text-gray-300 rounded-md transition-colors disabled:opacity-50 p-2 focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-primary-500/50">'), iI = /* @__PURE__ */ G('<button class="cursor-pointer text-gray-500 dark:text-gray-400 hover:bg-gray-100 dark:hover:bg-gray-700 hover:text-gray-700 dark:hover:text-gray-300 rounded-md transition-colors disabled:opacity-50 p-2 focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-primary-500/50">'), sI = /* @__PURE__ */ G('<button class="cursor-pointer text-gray-500 dark:text-gray-400 hover:bg-gray-100 dark:hover:bg-gray-700 hover:text-gray-700 dark:hover:text-gray-300 rounded-md transition-colors p-2 focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-primary-500/50">');
48487
+ function zz(t) {
48486
48488
  const [e, r] = Me(!1), [i, s] = Me(!1), c = no(), u = Tt(), g = t.message.role === Zr.User, p = async () => {
48487
48489
  var x;
48488
48490
  r(!0);
@@ -48505,7 +48507,7 @@ function Lz(t) {
48505
48507
  }
48506
48508
  };
48507
48509
  return (() => {
48508
- var x = nI(), y = x.firstChild;
48510
+ var x = aI(), y = x.firstChild;
48509
48511
  return y.$$click = p, C(y, (() => {
48510
48512
  var A = ee(() => !!e());
48511
48513
  return () => A() ? X(fi, {
@@ -48518,7 +48520,7 @@ function Lz(t) {
48518
48520
  })()), C(x, (() => {
48519
48521
  var A = ee(() => !!(!g && t.onRegenerate));
48520
48522
  return () => A() && (() => {
48521
- var E = aI();
48523
+ var E = iI();
48522
48524
  return E.$$click = m, C(E, (() => {
48523
48525
  var $ = ee(() => !!i());
48524
48526
  return () => $() ? X(fi, {
@@ -48540,7 +48542,7 @@ function Lz(t) {
48540
48542
  })(), null), C(x, (() => {
48541
48543
  var A = ee(() => !!(g && t.onEdit));
48542
48544
  return () => A() && (() => {
48543
- var E = iI();
48545
+ var E = sI();
48544
48546
  return E.$$click = () => {
48545
48547
  var $;
48546
48548
  return ($ = t.onEdit) == null ? void 0 : $.call(t, t.message);
@@ -48566,41 +48568,41 @@ function Lz(t) {
48566
48568
  })();
48567
48569
  }
48568
48570
  $t(["click"]);
48569
- var sI = /* @__PURE__ */ G('<div><div class="relative mb-2 overflow-hidden rounded-md bg-gray-100 dark:bg-gray-700 aspect-square"><img>'), oI = /* @__PURE__ */ G('<div class="absolute inset-0 animate-pulse bg-gray-200 dark:bg-gray-600">'), lI = /* @__PURE__ */ G('<div class="absolute inset-0 flex items-center justify-center bg-gray-100 dark:bg-gray-700"><span class="text-xs text-gray-500 dark:text-gray-400">'), cI = /* @__PURE__ */ G('<div class="h-3 w-3/4 bg-gray-200 dark:bg-gray-600 rounded animate-pulse mb-1">'), uI = /* @__PURE__ */ G('<p class="text-xs font-medium text-gray-700 dark:text-gray-300 truncate">'), dI = /* @__PURE__ */ G('<div class="h-3 w-1/2 bg-gray-200 dark:bg-gray-600 rounded animate-pulse mb-1">'), hI = /* @__PURE__ */ G('<p class="text-xs text-gray-500 dark:text-gray-400 mb-1">'), gI = /* @__PURE__ */ G('<button type=button class="absolute top-1 right-1 flex items-center justify-center bg-red-500 hover:bg-red-600 dark:bg-red-600 dark:hover:bg-red-700 text-white rounded-full transition-all duration-200 shadow-sm hover:shadow-md active:scale-90 w-6 h-6">');
48570
- const zz = (t) => {
48571
+ var oI = /* @__PURE__ */ G('<div><div class="relative mb-2 overflow-hidden rounded-md bg-gray-100 dark:bg-gray-700 aspect-square"><img>'), lI = /* @__PURE__ */ G('<div class="absolute inset-0 animate-pulse bg-gray-200 dark:bg-gray-600">'), cI = /* @__PURE__ */ G('<div class="absolute inset-0 flex items-center justify-center bg-gray-100 dark:bg-gray-700"><span class="text-xs text-gray-500 dark:text-gray-400">'), uI = /* @__PURE__ */ G('<div class="h-3 w-3/4 bg-gray-200 dark:bg-gray-600 rounded animate-pulse mb-1">'), dI = /* @__PURE__ */ G('<p class="text-xs font-medium text-gray-700 dark:text-gray-300 truncate">'), hI = /* @__PURE__ */ G('<div class="h-3 w-1/2 bg-gray-200 dark:bg-gray-600 rounded animate-pulse mb-1">'), gI = /* @__PURE__ */ G('<p class="text-xs text-gray-500 dark:text-gray-400 mb-1">'), fI = /* @__PURE__ */ G('<button type=button class="absolute top-1 right-1 flex items-center justify-center bg-red-500 hover:bg-red-600 dark:bg-red-600 dark:hover:bg-red-700 text-white rounded-full transition-all duration-200 shadow-sm hover:shadow-md active:scale-90 w-6 h-6">');
48572
+ const Rz = (t) => {
48571
48573
  const e = Mt({
48572
48574
  readonly: !1
48573
48575
  }, t), r = Tt(), [i, s] = Me(!1), [c, u] = Me(!1), g = le(() => e.attachment.preview || vi(e.attachment.base64Data, e.attachment.mimeType)), p = le(() => e.onClick !== void 0 && !e.readonly), m = le(() => e.onRemove !== void 0 && !e.readonly);
48574
48576
  return (() => {
48575
- var x = sI(), y = x.firstChild, A = y.firstChild;
48577
+ var x = oI(), y = x.firstChild, A = y.firstChild;
48576
48578
  return zt(x, "keydown", p() ? (E) => {
48577
48579
  var $;
48578
48580
  (E.key === "Enter" || E.key === " ") && (E.preventDefault(), ($ = e.onClick) == null || $.call(e));
48579
48581
  } : void 0, !0), zt(x, "click", p() ? e.onClick : void 0, !0), C(y, (() => {
48580
48582
  var E = ee(() => !i() && !c());
48581
- return () => E() && oI();
48583
+ return () => E() && lI();
48582
48584
  })(), A), C(y, (() => {
48583
48585
  var E = ee(() => !!c());
48584
48586
  return () => E() && (() => {
48585
- var $ = lI(), R = $.firstChild;
48587
+ var $ = cI(), R = $.firstChild;
48586
48588
  return C(R, () => r.t("BiChat.Attachment.PreviewUnavailable")), $;
48587
48589
  })();
48588
48590
  })(), A), A.addEventListener("error", () => u(!0)), A.addEventListener("load", () => s(!0)), C(x, (() => {
48589
48591
  var E = ee(() => !i() && !c());
48590
- return () => E() ? cI() : (() => {
48591
- var $ = uI();
48592
+ return () => E() ? uI() : (() => {
48593
+ var $ = dI();
48592
48594
  return C($, () => e.attachment.filename), we(() => ve($, "title", e.attachment.filename)), $;
48593
48595
  })();
48594
48596
  })(), null), C(x, (() => {
48595
48597
  var E = ee(() => !i() && !c());
48596
- return () => E() ? dI() : (() => {
48597
- var $ = hI();
48598
+ return () => E() ? hI() : (() => {
48599
+ var $ = gI();
48598
48600
  return C($, () => _n(e.attachment.sizeBytes)), $;
48599
48601
  })();
48600
48602
  })(), null), C(x, (() => {
48601
48603
  var E = ee(() => !!m());
48602
48604
  return () => E() && (() => {
48603
- var $ = gI();
48605
+ var $ = fI();
48604
48606
  return $.$$click = (R) => {
48605
48607
  var H;
48606
48608
  R.stopPropagation(), (H = e.onRemove) == null || H.call(e);
@@ -48645,8 +48647,8 @@ const zz = (t) => {
48645
48647
  })();
48646
48648
  };
48647
48649
  $t(["click", "keydown"]);
48648
- var fI = /* @__PURE__ */ G('<div class=relative><input type=file multiple class=sr-only><button type=button class="flex items-center justify-center w-8 h-8 text-gray-600 dark:text-gray-400 hover:text-gray-800 dark:hover:text-gray-200 hover:bg-gray-100 dark:hover:bg-gray-700 disabled:text-gray-400 dark:disabled:text-gray-600 disabled:opacity-50 disabled:cursor-not-allowed rounded-lg transition-all duration-200 active:scale-95 focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-primary-500/50">');
48649
- const Rz = (t) => {
48650
+ var pI = /* @__PURE__ */ G('<div class=relative><input type=file multiple class=sr-only><button type=button class="flex items-center justify-center w-8 h-8 text-gray-600 dark:text-gray-400 hover:text-gray-800 dark:hover:text-gray-200 hover:bg-gray-100 dark:hover:bg-gray-700 disabled:text-gray-400 dark:disabled:text-gray-600 disabled:opacity-50 disabled:cursor-not-allowed rounded-lg transition-all duration-200 active:scale-95 focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-primary-500/50">');
48651
+ const Dz = (t) => {
48650
48652
  const e = Mt({
48651
48653
  maxAttachments: 10,
48652
48654
  maxSizeBytes: 20971520,
@@ -48713,7 +48715,7 @@ const Rz = (t) => {
48713
48715
  (x = r.current) == null || x.click();
48714
48716
  }, m = le(() => e.disabled || i());
48715
48717
  return (() => {
48716
- var x = fI(), y = x.firstChild, A = y.nextSibling;
48718
+ var x = pI(), y = x.firstChild, A = y.nextSibling;
48717
48719
  return y.addEventListener("change", g), Ht((E) => r.current = E, y), ve(y, "accept", zh), A.$$click = p, C(A, (() => {
48718
48720
  var E = ee(() => !!i());
48719
48721
  return () => E() ? X(_s, {
@@ -48738,8 +48740,8 @@ const Rz = (t) => {
48738
48740
  })();
48739
48741
  };
48740
48742
  $t(["click"]);
48741
- var pI = /* @__PURE__ */ G("<div role=status aria-atomic=true class=sr-only>");
48742
- function Dz(t) {
48743
+ var mI = /* @__PURE__ */ G("<div role=status aria-atomic=true class=sr-only>");
48744
+ function Nz(t) {
48743
48745
  const e = Mt({
48744
48746
  politeness: "polite"
48745
48747
  }, t), [r, i] = Me(e.message);
@@ -48754,12 +48756,12 @@ function Dz(t) {
48754
48756
  });
48755
48757
  typeof s == "function" && tt(s);
48756
48758
  })), (() => {
48757
- var s = pI();
48759
+ var s = mI();
48758
48760
  return C(s, r), we(() => ve(s, "aria-live", e.politeness)), s;
48759
48761
  })();
48760
48762
  }
48761
- var mI = /* @__PURE__ */ G('<div class=space-y-6><div><h3 class="text-lg font-semibold text-gray-900 dark:text-white mb-2"></h3></div><div class="grid grid-cols-1 gap-3 sm:grid-cols-2"></div><div><label for=other-input class="block text-sm font-medium text-gray-700 dark:text-gray-300 mb-2">:</label><textarea id=other-input rows=3 class="w-full px-4 py-3 border-2 border-gray-200 dark:border-gray-700 rounded-lg bg-white dark:bg-gray-800 text-gray-900 dark:text-white placeholder-gray-400 dark:placeholder-gray-500 focus:outline-none focus:ring-2 focus:ring-primary-500 focus:border-primary-500 resize-none">'), bI = /* @__PURE__ */ G('<p class="text-sm text-gray-500 dark:text-gray-500 italic">'), xI = /* @__PURE__ */ G('<button type=button><div class="flex items-start gap-3"><div class="flex-shrink-0 mt-1"></div><div class="flex-1 min-w-0"><p class="font-medium text-gray-900 dark:text-white">'), vI = /* @__PURE__ */ G('<input type=checkbox readonly class="w-5 h-5 text-primary-600 border-gray-300 rounded focus:ring-0 dark:bg-gray-700 dark:border-gray-600">'), yI = /* @__PURE__ */ G('<input type=radio readonly class="w-5 h-5 text-primary-600 border-gray-300 focus:ring-0 dark:bg-gray-700 dark:border-gray-600">');
48762
- function wI(t) {
48763
+ var bI = /* @__PURE__ */ G('<div class=space-y-6><div><h3 class="text-lg font-semibold text-gray-900 dark:text-white mb-2"></h3></div><div class="grid grid-cols-1 gap-3 sm:grid-cols-2"></div><div><label for=other-input class="block text-sm font-medium text-gray-700 dark:text-gray-300 mb-2">:</label><textarea id=other-input rows=3 class="w-full px-4 py-3 border-2 border-gray-200 dark:border-gray-700 rounded-lg bg-white dark:bg-gray-800 text-gray-900 dark:text-white placeholder-gray-400 dark:placeholder-gray-500 focus:outline-none focus:ring-2 focus:ring-primary-500 focus:border-primary-500 resize-none">'), xI = /* @__PURE__ */ G('<p class="text-sm text-gray-500 dark:text-gray-500 italic">'), vI = /* @__PURE__ */ G('<button type=button><div class="flex items-start gap-3"><div class="flex-shrink-0 mt-1"></div><div class="flex-1 min-w-0"><p class="font-medium text-gray-900 dark:text-white">'), yI = /* @__PURE__ */ G('<input type=checkbox readonly class="w-5 h-5 text-primary-600 border-gray-300 rounded focus:ring-0 dark:bg-gray-700 dark:border-gray-600">'), wI = /* @__PURE__ */ G('<input type=radio readonly class="w-5 h-5 text-primary-600 border-gray-300 focus:ring-0 dark:bg-gray-700 dark:border-gray-600">');
48764
+ function kI(t) {
48763
48765
  const e = Tt(), r = t.selectedAnswers[t.question.id] || {
48764
48766
  options: []
48765
48767
  }, i = r.options || [], s = t.question.type === "MULTIPLE_CHOICE", [c, u] = Me(r.customText || "");
@@ -48791,23 +48793,23 @@ function wI(t) {
48791
48793
  });
48792
48794
  };
48793
48795
  return (() => {
48794
- var m = mI(), x = m.firstChild, y = x.firstChild, A = x.nextSibling, E = A.nextSibling, $ = E.firstChild, R = $.firstChild, H = $.nextSibling;
48796
+ var m = bI(), x = m.firstChild, y = x.firstChild, A = x.nextSibling, E = A.nextSibling, $ = E.firstChild, R = $.firstChild, H = $.nextSibling;
48795
48797
  return C(y, () => t.question.text), C(m, s && (() => {
48796
- var B = bI();
48798
+ var B = xI();
48797
48799
  return C(B, () => e.t("BiChat.Question.SelectMulti")), B;
48798
48800
  })(), A), C(A, () => (t.question.options || []).map((B) => {
48799
48801
  const N = i.includes(B.id);
48800
48802
  return (() => {
48801
- var O = xI(), Q = O.firstChild, D = Q.firstChild, K = D.nextSibling, ie = K.firstChild;
48803
+ var O = vI(), Q = O.firstChild, D = Q.firstChild, K = D.nextSibling, ie = K.firstChild;
48802
48804
  return O.$$click = () => g(B.id), Be(O, `
48803
48805
  cursor-pointer relative p-4 text-left border-2 rounded-lg transition-all
48804
48806
  ${N ? "border-primary-500 bg-white dark:bg-gray-800" : "border-gray-200 dark:border-gray-700 bg-white dark:bg-gray-800 hover:border-gray-300 dark:hover:border-gray-600"}
48805
48807
  focus:outline-none focus:ring-2 focus:ring-primary-500 focus:ring-offset-2 dark:focus:ring-offset-gray-900
48806
48808
  `), ve(O, "aria-pressed", N), C(D, s ? (() => {
48807
- var te = vI();
48809
+ var te = yI();
48808
48810
  return te.checked = N, te;
48809
48811
  })() : (() => {
48810
- var te = yI();
48812
+ var te = wI();
48811
48813
  return te.checked = N, te;
48812
48814
  })()), C(ie, () => B.label), O;
48813
48815
  })();
@@ -48815,28 +48817,28 @@ function wI(t) {
48815
48817
  })();
48816
48818
  }
48817
48819
  $t(["input", "click"]);
48818
- var kI = /* @__PURE__ */ G('<div class=space-y-6><div><h3 class="text-lg font-semibold text-gray-900 dark:text-white"></h3><p class="text-gray-600 dark:text-gray-400 mt-1"></p></div><div class=space-y-4>'), SI = /* @__PURE__ */ G('<div class="p-4 border border-gray-200 dark:border-gray-700 rounded-lg bg-gray-50 dark:bg-gray-800"><h4 class="font-medium text-gray-900 dark:text-white mb-2">'), CI = /* @__PURE__ */ G('<div class="flex flex-wrap gap-2">'), AI = /* @__PURE__ */ G('<span class="inline-flex items-center px-3 py-1 rounded-lg text-sm font-medium border border-primary-500 bg-primary-500/10 text-primary-600 dark:border-primary-400 dark:bg-primary-400/10 dark:text-primary-400">'), TI = /* @__PURE__ */ G('<span class="inline-flex items-center px-3 py-1 rounded-lg text-sm font-medium border border-amber-500 bg-amber-500/10 text-amber-600 dark:border-amber-400 dark:bg-amber-400/10 dark:text-amber-400"><span class="font-semibold mr-1">:</span><span class=italic>'), EI = /* @__PURE__ */ G('<p class="text-sm text-gray-400 dark:text-gray-500 italic">');
48819
- function $I(t) {
48820
+ var SI = /* @__PURE__ */ G('<div class=space-y-6><div><h3 class="text-lg font-semibold text-gray-900 dark:text-white"></h3><p class="text-gray-600 dark:text-gray-400 mt-1"></p></div><div class=space-y-4>'), CI = /* @__PURE__ */ G('<div class="p-4 border border-gray-200 dark:border-gray-700 rounded-lg bg-gray-50 dark:bg-gray-800"><h4 class="font-medium text-gray-900 dark:text-white mb-2">'), AI = /* @__PURE__ */ G('<div class="flex flex-wrap gap-2">'), TI = /* @__PURE__ */ G('<span class="inline-flex items-center px-3 py-1 rounded-lg text-sm font-medium border border-primary-500 bg-primary-500/10 text-primary-600 dark:border-primary-400 dark:bg-primary-400/10 dark:text-primary-400">'), EI = /* @__PURE__ */ G('<span class="inline-flex items-center px-3 py-1 rounded-lg text-sm font-medium border border-amber-500 bg-amber-500/10 text-amber-600 dark:border-amber-400 dark:bg-amber-400/10 dark:text-amber-400"><span class="font-semibold mr-1">:</span><span class=italic>'), $I = /* @__PURE__ */ G('<p class="text-sm text-gray-400 dark:text-gray-500 italic">');
48821
+ function _I(t) {
48820
48822
  const e = Tt();
48821
48823
  return (() => {
48822
- var r = kI(), i = r.firstChild, s = i.firstChild, c = s.nextSibling, u = i.nextSibling;
48824
+ var r = SI(), i = r.firstChild, s = i.firstChild, c = s.nextSibling, u = i.nextSibling;
48823
48825
  return C(s, () => e.t("BiChat.QuestionForm.ReviewTitle")), C(c, () => e.t("BiChat.QuestionForm.ReviewDescription")), C(u, () => t.questions.map((g) => {
48824
48826
  const p = t.answers[g.id] || {
48825
48827
  options: []
48826
48828
  }, m = p.options || [], x = p.customText, y = new Map((g.options || []).map((E) => [E.id, E.label])), A = m.length > 0 || !!x;
48827
48829
  return (() => {
48828
- var E = SI(), $ = E.firstChild;
48830
+ var E = CI(), $ = E.firstChild;
48829
48831
  return C($, () => g.text), C(E, A ? (() => {
48830
- var R = CI();
48832
+ var R = AI();
48831
48833
  return C(R, () => m.map((H) => (() => {
48832
- var B = AI();
48834
+ var B = TI();
48833
48835
  return C(B, () => y.get(H) || H), B;
48834
48836
  })()), null), C(R, x && (() => {
48835
- var H = TI(), B = H.firstChild, N = B.firstChild, O = B.nextSibling;
48837
+ var H = EI(), B = H.firstChild, N = B.firstChild, O = B.nextSibling;
48836
48838
  return C(B, () => e.t("BiChat.Question.OtherOption"), N), C(O, x), H;
48837
48839
  })(), null), R;
48838
48840
  })() : (() => {
48839
- var R = EI();
48841
+ var R = $I();
48840
48842
  return C(R, () => e.t("BiChat.QuestionForm.Skip")), R;
48841
48843
  })(), null), E;
48842
48844
  })();
@@ -48847,7 +48849,7 @@ function Rp(t) {
48847
48849
  var e;
48848
48850
  return t ? (((e = t.options) == null ? void 0 : e.length) ?? 0) > 0 || !!t.customText : !1;
48849
48851
  }
48850
- function _I(t, e, r) {
48852
+ function MI(t, e, r) {
48851
48853
  var s;
48852
48854
  if (!t.every((c) => Rp(e[c.id])))
48853
48855
  return r ? r("BiChat.Error.AllQuestionsRequired") : "Please answer all questions before submitting";
@@ -48858,8 +48860,8 @@ function _I(t, e, r) {
48858
48860
  }
48859
48861
  return null;
48860
48862
  }
48861
- var MI = /* @__PURE__ */ G('<div class="fixed inset-0 z-50 flex items-center justify-center bg-black bg-opacity-50 p-4"><div class="bg-white dark:bg-gray-800 rounded-lg shadow-xl max-w-2xl w-full max-h-[90vh] overflow-y-auto"><div class="border-b border-gray-200 dark:border-gray-700 p-6"><div class="flex items-center justify-between mb-4"><h2 class="text-2xl font-bold text-gray-900 dark:text-white"></h2><button class="cursor-pointer text-gray-400 hover:text-gray-600 dark:hover:text-gray-300 disabled:opacity-50"></button></div><div class="text-sm text-gray-600 dark:text-gray-400"></div><div class="mt-3 h-2 bg-gray-200 dark:bg-gray-700 rounded-full overflow-hidden"><div class="h-full bg-primary-600 transition-all duration-300"></div></div></div><div class=p-6></div><div class="border-t border-gray-200 dark:border-gray-700 p-6 flex gap-3 justify-between"><div class=flex-1>'), II = /* @__PURE__ */ G('<div class="mb-6 p-4 bg-red-50 dark:bg-red-900/20 border border-red-200 dark:border-red-800 rounded-lg"><p class="text-red-700 dark:text-red-400 text-sm">'), LI = /* @__PURE__ */ G('<button class="cursor-pointer px-6 py-2 text-gray-700 dark:text-gray-300 bg-gray-100 dark:bg-gray-700 rounded-lg hover:bg-gray-200 dark:hover:bg-gray-600 disabled:opacity-50 font-medium transition-colors">'), zI = /* @__PURE__ */ G('<button class="cursor-pointer px-6 py-2 text-gray-700 dark:text-gray-300 border border-gray-300 dark:border-gray-600 rounded-lg hover:bg-gray-50 dark:hover:bg-gray-700 disabled:opacity-50 font-medium transition-colors">'), RI = /* @__PURE__ */ G('<button class="cursor-pointer px-6 py-2 bg-primary-600 hover:bg-primary-700 disabled:opacity-50 text-white rounded-lg font-medium transition-colors flex items-center gap-2">'), DI = /* @__PURE__ */ G('<button class="cursor-pointer px-6 py-2 bg-primary-600 hover:bg-primary-700 disabled:opacity-50 text-white rounded-lg font-medium transition-colors">');
48862
- function Nz(t) {
48863
+ var II = /* @__PURE__ */ G('<div class="fixed inset-0 z-50 flex items-center justify-center bg-black bg-opacity-50 p-4"><div class="bg-white dark:bg-gray-800 rounded-lg shadow-xl max-w-2xl w-full max-h-[90vh] overflow-y-auto"><div class="border-b border-gray-200 dark:border-gray-700 p-6"><div class="flex items-center justify-between mb-4"><h2 class="text-2xl font-bold text-gray-900 dark:text-white"></h2><button class="cursor-pointer text-gray-400 hover:text-gray-600 dark:hover:text-gray-300 disabled:opacity-50"></button></div><div class="text-sm text-gray-600 dark:text-gray-400"></div><div class="mt-3 h-2 bg-gray-200 dark:bg-gray-700 rounded-full overflow-hidden"><div class="h-full bg-primary-600 transition-all duration-300"></div></div></div><div class=p-6></div><div class="border-t border-gray-200 dark:border-gray-700 p-6 flex gap-3 justify-between"><div class=flex-1>'), LI = /* @__PURE__ */ G('<div class="mb-6 p-4 bg-red-50 dark:bg-red-900/20 border border-red-200 dark:border-red-800 rounded-lg"><p class="text-red-700 dark:text-red-400 text-sm">'), zI = /* @__PURE__ */ G('<button class="cursor-pointer px-6 py-2 text-gray-700 dark:text-gray-300 bg-gray-100 dark:bg-gray-700 rounded-lg hover:bg-gray-200 dark:hover:bg-gray-600 disabled:opacity-50 font-medium transition-colors">'), RI = /* @__PURE__ */ G('<button class="cursor-pointer px-6 py-2 text-gray-700 dark:text-gray-300 border border-gray-300 dark:border-gray-600 rounded-lg hover:bg-gray-50 dark:hover:bg-gray-700 disabled:opacity-50 font-medium transition-colors">'), DI = /* @__PURE__ */ G('<button class="cursor-pointer px-6 py-2 bg-primary-600 hover:bg-primary-700 disabled:opacity-50 text-white rounded-lg font-medium transition-colors flex items-center gap-2">'), NI = /* @__PURE__ */ G('<button class="cursor-pointer px-6 py-2 bg-primary-600 hover:bg-primary-700 disabled:opacity-50 text-white rounded-lg font-medium transition-colors">');
48864
+ function Bz(t) {
48863
48865
  const e = Tt(), [r, i] = Me(0), [s, c] = Me({}), [u, g] = Me(!1), [p, m] = Me(null), x = t.pendingQuestion.questions, y = le(() => r() === x.length), A = le(() => r() === 0), E = le(() => r() === x.length - 1), $ = le(() => {
48864
48866
  var D;
48865
48867
  return y() || ((D = x[r()]) == null ? void 0 : D.id) && Rp(s()[x[r()].id]);
@@ -48875,7 +48877,7 @@ function Nz(t) {
48875
48877
  r() > 0 && i(r() - 1);
48876
48878
  }, N = async () => {
48877
48879
  var K;
48878
- const D = _I(x, s(), e.t);
48880
+ const D = MI(x, s(), e.t);
48879
48881
  if (D) {
48880
48882
  m(D);
48881
48883
  return;
@@ -48895,23 +48897,23 @@ function Nz(t) {
48895
48897
  total: O
48896
48898
  }));
48897
48899
  return (() => {
48898
- var D = MI(), K = D.firstChild, ie = K.firstChild, te = ie.firstChild, de = te.firstChild, se = de.nextSibling, fe = te.nextSibling, ue = fe.nextSibling, ge = ue.firstChild, Ae = ie.nextSibling, ce = Ae.nextSibling, Ee = ce.firstChild;
48900
+ var D = II(), K = D.firstChild, ie = K.firstChild, te = ie.firstChild, de = te.firstChild, se = de.nextSibling, fe = te.nextSibling, ue = fe.nextSibling, ge = ue.firstChild, Ae = ie.nextSibling, ce = Ae.nextSibling, Ee = ce.firstChild;
48899
48901
  return C(de, () => e.t("BiChat.QuestionForm.Title")), zt(se, "click", t.onCancel, !0), C(se, X(ur, {
48900
48902
  className: "w-6 h-6"
48901
48903
  })), C(fe, Q), C(Ae, (() => {
48902
48904
  var Ce = ee(() => !!p());
48903
48905
  return () => Ce() && (() => {
48904
- var Se = II(), $e = Se.firstChild;
48906
+ var Se = LI(), $e = Se.firstChild;
48905
48907
  return C($e, p), Se;
48906
48908
  })();
48907
48909
  })(), null), C(Ae, (() => {
48908
48910
  var Ce = ee(() => !!y());
48909
- return () => Ce() ? X($I, {
48911
+ return () => Ce() ? X(_I, {
48910
48912
  questions: x,
48911
48913
  get answers() {
48912
48914
  return s();
48913
48915
  }
48914
- }) : X(wI, {
48916
+ }) : X(kI, {
48915
48917
  get question() {
48916
48918
  return x[r()];
48917
48919
  },
@@ -48923,16 +48925,16 @@ function Nz(t) {
48923
48925
  })(), null), C(ce, (() => {
48924
48926
  var Ce = ee(() => !A());
48925
48927
  return () => Ce() && (() => {
48926
- var Se = LI();
48928
+ var Se = zI();
48927
48929
  return Se.$$click = B, C(Se, () => e.t("BiChat.QuestionForm.Back")), we(() => Se.disabled = u()), Se;
48928
48930
  })();
48929
48931
  })(), Ee), C(ce, (() => {
48930
48932
  var Ce = ee(() => !!y());
48931
48933
  return () => Ce() ? [(() => {
48932
- var Se = zI();
48934
+ var Se = RI();
48933
48935
  return zt(Se, "click", t.onCancel, !0), C(Se, () => e.t("BiChat.Message.Cancel")), we(() => Se.disabled = u()), Se;
48934
48936
  })(), (() => {
48935
- var Se = RI();
48937
+ var Se = DI();
48936
48938
  return Se.$$click = N, C(Se, (() => {
48937
48939
  var $e = ee(() => !!u());
48938
48940
  return () => $e() && X(fi, {
@@ -48945,7 +48947,7 @@ function Nz(t) {
48945
48947
  })()] : (
48946
48948
  /* Next Button */
48947
48949
  (() => {
48948
- var Se = DI();
48950
+ var Se = NI();
48949
48951
  return Se.$$click = H, C(Se, () => e.t("BiChat.QuestionForm.Next")), we(() => Se.disabled = !$() || u()), Se;
48950
48952
  })()
48951
48953
  );
@@ -48960,12 +48962,12 @@ function Nz(t) {
48960
48962
  })();
48961
48963
  }
48962
48964
  $t(["click"]);
48963
- const NI = /* @__PURE__ */ new Set([
48965
+ const BI = /* @__PURE__ */ new Set([
48964
48966
  "completed",
48965
48967
  "cancelled",
48966
48968
  "failed"
48967
48969
  ]);
48968
- function Bz(t, e = {}) {
48970
+ function Fz(t, e = {}) {
48969
48971
  const [r, i] = Me({}), [s, c] = Me(!1);
48970
48972
  e.onError, e.onError;
48971
48973
  const u = () => typeof t == "function" ? t() : t, g = () => e.enabled ?? !0, p = () => e.retainTerminalMs ?? 0, m = () => e.emptyStateTimeoutMs ?? 250;
@@ -49002,7 +49004,7 @@ function Bz(t, e = {}) {
49002
49004
  }, $ === void 0 && ($ = setTimeout(N, 16));
49003
49005
  return;
49004
49006
  }
49005
- if (NI.has(D.status)) {
49007
+ if (BI.has(D.status)) {
49006
49008
  if (p() <= 0) {
49007
49009
  i((de) => {
49008
49010
  if (!(D.sessionId in de))
@@ -49072,7 +49074,7 @@ function Bz(t, e = {}) {
49072
49074
  } };
49073
49075
  }
49074
49076
  let Qi = 0, ns = null;
49075
- function BI() {
49077
+ function FI() {
49076
49078
  const t = document.body, e = t.style.overflow, r = t.style.paddingRight, i = window.innerWidth - document.documentElement.clientWidth;
49077
49079
  if (t.style.overflow = "hidden", i > 0) {
49078
49080
  const s = parseFloat(window.getComputedStyle(t).paddingRight) || 0;
@@ -49082,11 +49084,11 @@ function BI() {
49082
49084
  t.style.overflow = e, t.style.paddingRight = r;
49083
49085
  };
49084
49086
  }
49085
- function Fz(t) {
49087
+ function Oz(t) {
49086
49088
  pt(mt(() => [t()], () => {
49087
49089
  const e = ct(() => {
49088
49090
  if (t())
49089
- return Qi === 0 && BI(), Qi += 1, () => {
49091
+ return Qi === 0 && FI(), Qi += 1, () => {
49090
49092
  Qi -= 1, Qi === 0 && ns && (ns(), ns = null);
49091
49093
  };
49092
49094
  });
@@ -49100,7 +49102,7 @@ function th(t) {
49100
49102
  e = e.shadowRoot.activeElement;
49101
49103
  return e instanceof HTMLElement ? e : null;
49102
49104
  }
49103
- function Oz(t, e, r) {
49105
+ function Pz(t, e, r) {
49104
49106
  pt(mt(() => [t, e(), r], () => {
49105
49107
  const i = ct(() => {
49106
49108
  if (!e() || !t.current)
@@ -49133,7 +49135,7 @@ function Oz(t, e, r) {
49133
49135
  typeof i == "function" && tt(i);
49134
49136
  }));
49135
49137
  }
49136
- function Pz(t = {}) {
49138
+ function Hz(t = {}) {
49137
49139
  const { images: e = [], wrap: r = !1, onOpen: i, onClose: s, onNavigate: c } = t, [u, g] = Me(!1), [p, m] = Me(0), [x, y] = Me(e), A = le(() => x()[p()]), E = le(() => r ? x().length > 1 : p() > 0), $ = le(() => r ? x().length > 1 : p() < x().length - 1);
49138
49140
  return {
49139
49141
  get isOpen() {
@@ -49188,7 +49190,7 @@ function Pz(t = {}) {
49188
49190
  }
49189
49191
  };
49190
49192
  }
49191
- function Hz(t = {}) {
49193
+ function Xz(t = {}) {
49192
49194
  const { threshold: e = 100, smooth: r = !0, onScroll: i } = t, s = { current: null }, [c, u] = Me(!0), [g, p] = Me(!0), m = (E) => {
49193
49195
  const { scrollTop: $, scrollHeight: R, clientHeight: H } = E;
49194
49196
  return R - $ - H <= e;
@@ -49249,7 +49251,7 @@ function Hz(t = {}) {
49249
49251
  handleScroll: x
49250
49252
  };
49251
49253
  }
49252
- function Xz(t = {}) {
49254
+ function Yz(t = {}) {
49253
49255
  const { onCopy: e, onCopyError: r, onRegenerate: i, onEdit: s, copiedDuration: c = 2e3 } = t, [u, g] = Me(!1), [p, m] = Me(!1), [x, y] = Me(!1), A = { current: null };
49254
49256
  return Sr(() => {
49255
49257
  const B = ct(() => () => {
@@ -49301,9 +49303,9 @@ function Xz(t = {}) {
49301
49303
  }
49302
49304
  };
49303
49305
  }
49304
- const FI = 10, OI = 20 * 1024 * 1024, PI = [];
49305
- function Yz(t = {}) {
49306
- const { maxFiles: e = FI, maxFileSize: r = OI, allowedTypes: i = PI, validate: s, onAdd: c, onRemove: u, onError: g } = t, [p, m] = Me([]), [x, y] = Me([]), [A, E] = Me(!1), $ = { current: null }, R = le(() => p().length >= e), H = le(() => Math.max(0, e - p().length)), B = (ie, te) => {
49306
+ const OI = 10, PI = 20 * 1024 * 1024, HI = [];
49307
+ function Wz(t = {}) {
49308
+ const { maxFiles: e = OI, maxFileSize: r = PI, allowedTypes: i = HI, validate: s, onAdd: c, onRemove: u, onError: g } = t, [p, m] = Me([]), [x, y] = Me([]), [A, E] = Me(!1), $ = { current: null }, R = le(() => p().length >= e), H = le(() => Math.max(0, e - p().length)), B = (ie, te) => {
49307
49309
  if (te >= e)
49308
49310
  return {
49309
49311
  file: ie,
@@ -49420,7 +49422,7 @@ function Yz(t = {}) {
49420
49422
  }
49421
49423
  };
49422
49424
  }
49423
- function Wz(t = {}) {
49425
+ function Uz(t = {}) {
49424
49426
  const { copiedDuration: e = 2e3, onCopy: r, onError: i } = t, [s, c] = Me(/* @__PURE__ */ new Map()), u = { current: /* @__PURE__ */ new Map() };
49425
49427
  return Sr(() => {
49426
49428
  const y = ct(() => {
@@ -49468,8 +49470,8 @@ function Wz(t = {}) {
49468
49470
  }
49469
49471
  };
49470
49472
  }
49471
- const HI = 100;
49472
- function Uz(t) {
49473
+ const XI = 100;
49474
+ function Gz(t) {
49473
49475
  const e = { current: null }, [r, i] = Me(!1), s = { current: !0 }, c = () => {
49474
49476
  e.current && (e.current.scroll({
49475
49477
  top: e.current.scrollHeight,
@@ -49478,7 +49480,7 @@ function Uz(t) {
49478
49480
  }, u = () => {
49479
49481
  if (!e.current)
49480
49482
  return;
49481
- const g = e.current, { scrollTop: p, scrollHeight: m, clientHeight: x } = g, A = m - p - x < HI;
49483
+ const g = e.current, { scrollTop: p, scrollHeight: m, clientHeight: x } = g, A = m - p - x < XI;
49482
49484
  s.current = A, i(!A && m > x);
49483
49485
  };
49484
49486
  return pt(mt(() => [t, c], () => {
@@ -49511,7 +49513,7 @@ function Uz(t) {
49511
49513
  scrollToBottom: c
49512
49514
  };
49513
49515
  }
49514
- function Gz(t) {
49516
+ function jz(t) {
49515
49517
  return le(() => {
49516
49518
  var c, u, g;
49517
49519
  const e = typeof window < "u" ? window.__APPLET_CONTEXT__ : void 0;
@@ -49528,11 +49530,11 @@ function Gz(t) {
49528
49530
  };
49529
49531
  })();
49530
49532
  }
49531
- const XI = /\/session\/([^/]+)/;
49532
- function jz(t) {
49533
+ const YI = /\/session\/([^/]+)/;
49534
+ function qz(t) {
49533
49535
  const e = le(() => t.pathname.startsWith("/all-chats")), r = le(() => {
49534
49536
  var y;
49535
- return (y = t.pathname.match(XI)) == null ? void 0 : y[1];
49537
+ return (y = t.pathname.match(YI)) == null ? void 0 : y[1];
49536
49538
  }), i = le(() => e() ? "all-chats" : "my-chats"), s = () => {
49537
49539
  var y;
49538
49540
  (y = t.onNavigate) == null || y.call(t);
@@ -49569,7 +49571,7 @@ function jz(t) {
49569
49571
  }
49570
49572
  };
49571
49573
  }
49572
- const qz = {
49574
+ const Vz = {
49573
49575
  initial: { opacity: 0 },
49574
49576
  animate: {
49575
49577
  opacity: 1,
@@ -49579,7 +49581,7 @@ const qz = {
49579
49581
  opacity: 0,
49580
49582
  transition: { duration: 0.15 }
49581
49583
  }
49582
- }, Vz = {
49584
+ }, Qz = {
49583
49585
  initial: { opacity: 0, y: 8 },
49584
49586
  animate: {
49585
49587
  opacity: 1,
@@ -49594,7 +49596,7 @@ const qz = {
49594
49596
  y: 8,
49595
49597
  transition: { duration: 0.15 }
49596
49598
  }
49597
- }, Qz = {
49599
+ }, Zz = {
49598
49600
  initial: { opacity: 0, scale: 0.98 },
49599
49601
  animate: {
49600
49602
  opacity: 1,
@@ -49606,7 +49608,7 @@ const qz = {
49606
49608
  scale: 0.98,
49607
49609
  transition: { duration: 0.1 }
49608
49610
  }
49609
- }, Zz = {
49611
+ }, Kz = {
49610
49612
  initial: { opacity: 0 },
49611
49613
  animate: {
49612
49614
  opacity: 1,
@@ -49616,11 +49618,11 @@ const qz = {
49616
49618
  opacity: 0,
49617
49619
  transition: { duration: 0.15 }
49618
49620
  }
49619
- }, Kz = {
49621
+ }, Jz = {
49620
49622
  tap: {
49621
49623
  scale: 0.98
49622
49624
  }
49623
- }, Jz = {
49625
+ }, eR = {
49624
49626
  hidden: { opacity: 0 },
49625
49627
  visible: {
49626
49628
  opacity: 1,
@@ -49629,7 +49631,7 @@ const qz = {
49629
49631
  delayChildren: 0.05
49630
49632
  }
49631
49633
  }
49632
- }, eR = {
49634
+ }, tR = {
49633
49635
  initial: { opacity: 0, x: -8 },
49634
49636
  animate: {
49635
49637
  opacity: 1,
@@ -49641,7 +49643,7 @@ const qz = {
49641
49643
  x: -8,
49642
49644
  transition: { duration: 0.15 }
49643
49645
  }
49644
- }, tR = {
49646
+ }, rR = {
49645
49647
  initial: {
49646
49648
  opacity: 0,
49647
49649
  y: 8
@@ -49658,7 +49660,7 @@ const qz = {
49658
49660
  opacity: 0,
49659
49661
  transition: { duration: 0.15 }
49660
49662
  }
49661
- }, rR = {
49663
+ }, nR = {
49662
49664
  initial: { opacity: 0 },
49663
49665
  animate: {
49664
49666
  opacity: 1,
@@ -49667,7 +49669,7 @@ const qz = {
49667
49669
  delayChildren: 0.05
49668
49670
  }
49669
49671
  }
49670
- }, nR = {
49672
+ }, aR = {
49671
49673
  initial: { opacity: 0.4 },
49672
49674
  animate: {
49673
49675
  opacity: [0.4, 1, 0.4],
@@ -49677,7 +49679,7 @@ const qz = {
49677
49679
  ease: "easeInOut"
49678
49680
  }
49679
49681
  }
49680
- }, aR = {
49682
+ }, iR = {
49681
49683
  initial: {
49682
49684
  y: 16,
49683
49685
  opacity: 0
@@ -49695,7 +49697,7 @@ const qz = {
49695
49697
  opacity: 0,
49696
49698
  transition: { duration: 0.15 }
49697
49699
  }
49698
- }, iR = {
49700
+ }, sR = {
49699
49701
  initial: {
49700
49702
  opacity: 0,
49701
49703
  scale: 0.9
@@ -49710,7 +49712,7 @@ const qz = {
49710
49712
  scale: 0.9,
49711
49713
  transition: { duration: 0.15 }
49712
49714
  }
49713
- }, sR = {
49715
+ }, oR = {
49714
49716
  initial: { opacity: 0, y: -4 },
49715
49717
  animate: {
49716
49718
  opacity: 1,
@@ -49722,7 +49724,7 @@ const qz = {
49722
49724
  y: -4,
49723
49725
  transition: { duration: 0.1 }
49724
49726
  }
49725
- }, oR = {
49727
+ }, lR = {
49726
49728
  initial: { opacity: 0, x: -20 },
49727
49729
  animate: {
49728
49730
  opacity: 1,
@@ -49738,7 +49740,7 @@ const qz = {
49738
49740
  x: -20,
49739
49741
  transition: { duration: 0.2 }
49740
49742
  }
49741
- }, lR = {
49743
+ }, cR = {
49742
49744
  initial: { opacity: 0, y: -10, height: 0 },
49743
49745
  animate: {
49744
49746
  opacity: 1,
@@ -49756,7 +49758,7 @@ const qz = {
49756
49758
  transition: { duration: 0.2 }
49757
49759
  }
49758
49760
  }, iu = mi(null);
49759
- function cR(t) {
49761
+ function uR(t) {
49760
49762
  var i, s, c, u, g, p, m, x, y, A, E;
49761
49763
  const e = Mt({
49762
49764
  useGlobalConfig: !1
@@ -49796,16 +49798,16 @@ function cR(t) {
49796
49798
  }
49797
49799
  });
49798
49800
  }
49799
- function uR() {
49801
+ function dR() {
49800
49802
  return pa(iu);
49801
49803
  }
49802
- function dR() {
49804
+ function hR() {
49803
49805
  const t = pa(iu);
49804
49806
  if (!t)
49805
49807
  throw new Error("BiChat configuration not found. Wrap your app with <ConfigProvider config={...}> or use useGlobalConfig={true}.");
49806
49808
  return t;
49807
49809
  }
49808
- const hR = {
49810
+ const gR = {
49809
49811
  name: "light",
49810
49812
  colors: {
49811
49813
  background: "#f9fafb",
@@ -49850,7 +49852,7 @@ const hR = {
49850
49852
  lg: "0.75rem",
49851
49853
  full: "9999px"
49852
49854
  }
49853
- }, gR = {
49855
+ }, fR = {
49854
49856
  name: "dark",
49855
49857
  colors: {
49856
49858
  background: "#111827",
@@ -49896,17 +49898,17 @@ const hR = {
49896
49898
  full: "9999px"
49897
49899
  }
49898
49900
  };
49899
- function YI() {
49901
+ function WI() {
49900
49902
  const t = window.__CSRF_TOKEN__;
49901
49903
  return t || (console.warn("CSRF token not found in window object"), "");
49902
49904
  }
49903
- function WI(t) {
49904
- const e = YI();
49905
+ function UI(t) {
49906
+ const e = WI();
49905
49907
  return e && t.set("X-CSRF-Token", e), t;
49906
49908
  }
49907
- function fR(t) {
49909
+ function pR(t) {
49908
49910
  const e = new Headers(t);
49909
- return WI(e);
49911
+ return UI(e);
49910
49912
  }
49911
49913
  function $r(t, e) {
49912
49914
  console.warn(`[BiChat] ${t}`, e || {});
@@ -49926,7 +49928,7 @@ function Gn(t, e = 0) {
49926
49928
  function Rr(t) {
49927
49929
  return typeof t == "number" && Number.isFinite(t) ? t : void 0;
49928
49930
  }
49929
- function UI(t) {
49931
+ function GI(t) {
49930
49932
  const e = xt(t);
49931
49933
  if (!e)
49932
49934
  return null;
@@ -49951,11 +49953,11 @@ function UI(t) {
49951
49953
  }
49952
49954
  }
49953
49955
  }
49954
- function GI(t) {
49956
+ function jI(t) {
49955
49957
  const e = xt(t.name);
49956
49958
  if (e)
49957
49959
  return e;
49958
- const r = UI(t.url);
49960
+ const r = GI(t.url);
49959
49961
  if (r)
49960
49962
  return r;
49961
49963
  const s = (xt(t.type) || "artifact").replace(/_/g, " ");
@@ -49979,7 +49981,7 @@ function Dp(t) {
49979
49981
  initials: c
49980
49982
  };
49981
49983
  }
49982
- function jI(t) {
49984
+ function qI(t) {
49983
49985
  if (!Ut(t))
49984
49986
  return;
49985
49987
  const e = Ot(t.role).toLowerCase(), r = Ot(t.source).toLowerCase(), i = e === "owner" || e === "editor" || e === "viewer" || e === "read_all" ? e : "none", s = r === "owner" || r === "member" || r === "permission" ? r : "none", c = t.canRead === !0 || t.canRead === "true", u = t.canWrite === !0 || t.canWrite === "true", g = t.canManageMembers === !0 || t.canManageMembers === "true";
@@ -50003,7 +50005,7 @@ function Sn(t) {
50003
50005
  owner: Dp(t.owner),
50004
50006
  isGroup: !!t.isGroup,
50005
50007
  memberCount: typeof t.memberCount == "number" ? t.memberCount : void 0,
50006
- access: jI(t.access)
50008
+ access: qI(t.access)
50007
50009
  };
50008
50010
  }
50009
50011
  function su(t) {
@@ -50016,7 +50018,7 @@ function su(t) {
50016
50018
  messageId: xt(t.messageId) || void 0,
50017
50019
  uploadId: Rr(t.uploadId),
50018
50020
  type: xt(t.type) || "other",
50019
- name: GI(t),
50021
+ name: jI(t),
50020
50022
  description: xt(t.description) || void 0,
50021
50023
  mimeType: xt(t.mimeType) || void 0,
50022
50024
  url: xt(t.url) || void 0,
@@ -50025,10 +50027,10 @@ function su(t) {
50025
50027
  createdAt: r
50026
50028
  };
50027
50029
  }
50028
- function qI(t) {
50030
+ function VI(t) {
50029
50031
  return Ot(t).trim().toUpperCase().replace(/[\s-]+/g, "_") === "MULTIPLE_CHOICE" ? "MULTIPLE_CHOICE" : "SINGLE_CHOICE";
50030
50032
  }
50031
- function VI(t) {
50033
+ function QI(t) {
50032
50034
  const e = Ot(t).trim().toUpperCase();
50033
50035
  switch (e) {
50034
50036
  case "ANSWER_SUBMITTED":
@@ -50043,11 +50045,11 @@ function VI(t) {
50043
50045
  return "PENDING";
50044
50046
  }
50045
50047
  }
50046
- function QI(t) {
50048
+ function ZI(t) {
50047
50049
  const e = Ot(t).trim().toLowerCase();
50048
50050
  return e === Zr.User ? Zr.User : e === Zr.System ? Zr.System : e === Zr.Tool ? Zr.Tool : Zr.Assistant;
50049
50051
  }
50050
- function ZI(t, e, r) {
50052
+ function KI(t, e, r) {
50051
50053
  if (!Ut(t))
50052
50054
  return $r("Dropped malformed attachment entry", {
50053
50055
  turnId: e,
@@ -50066,17 +50068,17 @@ function ZI(t, e, r) {
50066
50068
  preview: xt(t.preview) || void 0
50067
50069
  };
50068
50070
  }
50069
- function KI(t, e) {
50071
+ function JI(t, e) {
50070
50072
  if (!Array.isArray(t))
50071
50073
  return [];
50072
50074
  const r = [];
50073
50075
  for (let i = 0; i < t.length; i++) {
50074
- const s = ZI(t[i], e, i);
50076
+ const s = KI(t[i], e, i);
50075
50077
  s && r.push(s);
50076
50078
  }
50077
50079
  return r;
50078
50080
  }
50079
- function JI(t, e) {
50081
+ function eL(t, e) {
50080
50082
  if (!Array.isArray(t))
50081
50083
  return [];
50082
50084
  const r = [];
@@ -50111,7 +50113,7 @@ function JI(t, e) {
50111
50113
  }
50112
50114
  return r;
50113
50115
  }
50114
- function eL(t, e, r) {
50116
+ function tL(t, e, r) {
50115
50117
  if (t == null)
50116
50118
  return;
50117
50119
  if (!Ut(t)) {
@@ -50236,21 +50238,21 @@ function eL(t, e, r) {
50236
50238
  } : void 0;
50237
50239
  return {
50238
50240
  id: i,
50239
- role: QI(t.role),
50241
+ role: ZI(t.role),
50240
50242
  content: Ot(t.content),
50241
50243
  explanation: xt(t.explanation) || void 0,
50242
50244
  citations: s,
50243
50245
  toolCalls: c,
50244
50246
  charts: void 0,
50245
50247
  renderTables: void 0,
50246
- artifacts: JI(t.artifacts, r),
50248
+ artifacts: eL(t.artifacts, r),
50247
50249
  codeOutputs: u,
50248
50250
  lifecycle: "complete",
50249
50251
  debug: g,
50250
50252
  createdAt: Ot(t.createdAt, e)
50251
50253
  };
50252
50254
  }
50253
- function tL(t, e, r) {
50255
+ function rL(t, e, r) {
50254
50256
  if (!Ut(t))
50255
50257
  return $r("Dropped malformed turn payload (not an object)", { index: e }), null;
50256
50258
  if (!Ut(t.userTurn))
@@ -50265,21 +50267,21 @@ function tL(t, e, r) {
50265
50267
  userTurn: {
50266
50268
  id: i,
50267
50269
  content: Ot(t.userTurn.content),
50268
- attachments: KI(t.userTurn.attachments, s),
50270
+ attachments: JI(t.userTurn.attachments, s),
50269
50271
  author: Dp(t.userTurn.author),
50270
50272
  createdAt: Ot(t.userTurn.createdAt, c)
50271
50273
  },
50272
- assistantTurn: eL(t.assistantTurn, c, s),
50274
+ assistantTurn: tL(t.assistantTurn, c, s),
50273
50275
  createdAt: c
50274
50276
  };
50275
50277
  }
50276
- function rL(t, e) {
50278
+ function nL(t, e) {
50277
50279
  if (!Array.isArray(t))
50278
50280
  return $r("Session payload contained non-array turns field", { sessionID: e }), [];
50279
50281
  const r = [];
50280
50282
  let i = 0;
50281
50283
  for (let s = 0; s < t.length; s++) {
50282
- const c = tL(t[s], s, e);
50284
+ const c = rL(t[s], s, e);
50283
50285
  c ? r.push(c) : i++;
50284
50286
  }
50285
50287
  return i > 0 && $r("Dropped malformed turns from session payload", {
@@ -50288,7 +50290,7 @@ function rL(t, e) {
50288
50290
  total: t.length
50289
50291
  }), r;
50290
50292
  }
50291
- function nL(t, e) {
50293
+ function aL(t, e) {
50292
50294
  if (!t)
50293
50295
  return null;
50294
50296
  const r = xt(t.checkpointId);
@@ -50317,7 +50319,7 @@ function nL(t, e) {
50317
50319
  return {
50318
50320
  id: u,
50319
50321
  text: Ot(s.text),
50320
- type: qI(s.type),
50322
+ type: VI(s.type),
50321
50323
  options: g
50322
50324
  };
50323
50325
  }) : [];
@@ -50326,7 +50328,7 @@ function nL(t, e) {
50326
50328
  turnId: Ot(t.turnId),
50327
50329
  agentName: xt(t.agentName) || void 0,
50328
50330
  questions: i,
50329
- status: VI(t.status)
50331
+ status: QI(t.status)
50330
50332
  };
50331
50333
  }
50332
50334
  function Np(t) {
@@ -50354,12 +50356,12 @@ function Bp(t) {
50354
50356
  return i;
50355
50357
  }
50356
50358
  }
50357
- function aL(t) {
50359
+ function iL(t) {
50358
50360
  var u, g, p;
50359
50361
  const e = ((u = t.mimeType) == null ? void 0 : u.toLowerCase()) || "", r = ((g = t.name) == null ? void 0 : g.toLowerCase()) || "", i = ((p = t.url) == null ? void 0 : p.split("?")[0].toLowerCase()) || "";
50360
50362
  return e.includes("pdf") || r.endsWith(".pdf") || i.endsWith(".pdf") ? "pdf" : e.includes("spreadsheet") || e.includes("excel") || r.endsWith(".xlsx") || r.endsWith(".xls") || i.endsWith(".xlsx") || i.endsWith(".xls") ? "excel" : null;
50361
50363
  }
50362
- function iL(t) {
50364
+ function sL(t) {
50363
50365
  var s, c;
50364
50366
  const e = (s = t.name) == null ? void 0 : s.trim();
50365
50367
  if (e)
@@ -50367,13 +50369,13 @@ function iL(t) {
50367
50369
  const i = (((c = t.url) == null ? void 0 : c.split("?")[0]) || "").split("/").filter(Boolean).pop();
50368
50370
  return i || "download";
50369
50371
  }
50370
- function sL(t) {
50372
+ function oL(t) {
50371
50373
  if (!t.url)
50372
50374
  return null;
50373
- const e = aL(t);
50375
+ const e = iL(t);
50374
50376
  return e ? {
50375
50377
  type: e,
50376
- filename: iL(t),
50378
+ filename: sL(t),
50377
50379
  url: t.url,
50378
50380
  sizeReadable: Np(t.sizeBytes),
50379
50381
  rowCount: Bp(t.metadata),
@@ -50390,7 +50392,7 @@ function ou(t) {
50390
50392
  options: t.options && typeof t.options == "object" && !Array.isArray(t.options) ? JSON.parse(JSON.stringify(t.options)) : t.options
50391
50393
  };
50392
50394
  }
50393
- function oL(t) {
50395
+ function lL(t) {
50394
50396
  if (!t)
50395
50397
  return [];
50396
50398
  const e = [];
@@ -50422,17 +50424,17 @@ function Fp(t) {
50422
50424
  }
50423
50425
  return e;
50424
50426
  }
50425
- const lL = {
50427
+ const cL = {
50426
50428
  export_query_to_excel: "excel",
50427
50429
  export_data_to_excel: "excel",
50428
50430
  export_to_pdf: "pdf"
50429
50431
  };
50430
- function cL(t) {
50432
+ function uL(t) {
50431
50433
  if (!t)
50432
50434
  return [];
50433
50435
  const e = [];
50434
50436
  for (const r of t) {
50435
- const i = lL[r.name];
50437
+ const i = cL[r.name];
50436
50438
  if (!i || !r.result)
50437
50439
  continue;
50438
50440
  let s;
@@ -50455,12 +50457,12 @@ function cL(t) {
50455
50457
  }
50456
50458
  return e;
50457
50459
  }
50458
- function uL(t) {
50460
+ function dL(t) {
50459
50461
  var p;
50460
- const e = t.artifacts || [], r = cL(t.toolCalls), i = t.renderTables || Fp(t.toolCalls), s = [...e];
50462
+ const e = t.artifacts || [], r = uL(t.toolCalls), i = t.renderTables || Fp(t.toolCalls), s = [...e];
50461
50463
  for (const m of r)
50462
50464
  s.some((x) => x.url === m.url && x.filename === m.filename) || s.push(m);
50463
- const c = (p = t.charts) != null && p.length ? t.charts : oL(t.toolCalls), u = (c == null ? void 0 : c.map(ou)) ?? [], g = i.map(lu);
50465
+ const c = (p = t.charts) != null && p.length ? t.charts : lL(t.toolCalls), u = (c == null ? void 0 : c.map(ou)) ?? [], g = i.map(lu);
50464
50466
  return {
50465
50467
  ...t,
50466
50468
  role: t.role || Zr.Assistant,
@@ -50472,21 +50474,21 @@ function uL(t) {
50472
50474
  lifecycle: t.lifecycle || "complete"
50473
50475
  };
50474
50476
  }
50475
- function dL(t) {
50477
+ function hL(t) {
50476
50478
  return t.map((e) => e.assistantTurn ? {
50477
50479
  ...e,
50478
- assistantTurn: uL(e.assistantTurn)
50480
+ assistantTurn: dL(e.assistantTurn)
50479
50481
  } : e);
50480
50482
  }
50481
50483
  function Aa(t) {
50482
50484
  const e = Date.parse(t);
50483
50485
  return Number.isFinite(e) ? e : Number.NaN;
50484
50486
  }
50485
- function hL(t, e) {
50487
+ function gL(t, e) {
50486
50488
  var g, p, m;
50487
50489
  if (e.length === 0)
50488
50490
  return t;
50489
- const r = e.map((x) => ({ raw: x, mapped: sL(x) })).filter((x) => x.mapped !== null).sort((x, y) => Aa(x.raw.createdAt) - Aa(y.raw.createdAt)), i = e.filter((x) => x.type === "chart").sort((x, y) => Aa(x.createdAt) - Aa(y.createdAt)), s = e.filter((x) => x.type === "table").sort((x, y) => Aa(x.createdAt) - Aa(y.createdAt));
50491
+ const r = e.map((x) => ({ raw: x, mapped: oL(x) })).filter((x) => x.mapped !== null).sort((x, y) => Aa(x.raw.createdAt) - Aa(y.raw.createdAt)), i = e.filter((x) => x.type === "chart").sort((x, y) => Aa(x.createdAt) - Aa(y.createdAt)), s = e.filter((x) => x.type === "table").sort((x, y) => Aa(x.createdAt) - Aa(y.createdAt));
50490
50492
  if (r.length === 0 && i.length === 0 && s.length === 0)
50491
50493
  return t;
50492
50494
  const c = t.map((x) => x.assistantTurn ? {
@@ -50553,19 +50555,19 @@ function hL(t, e) {
50553
50555
  }
50554
50556
  return c;
50555
50557
  }
50556
- function gL(t) {
50558
+ function fL(t) {
50557
50559
  return t instanceof ca ? t.code === "not_found" || t.code === "session_not_found" : !1;
50558
50560
  }
50559
- async function fL(t) {
50561
+ async function pL(t) {
50560
50562
  const e = await t("bichat.session.create", { title: "" });
50561
50563
  return Sn(e.session);
50562
50564
  }
50563
- async function pL(t, e, r) {
50565
+ async function mL(t, e, r) {
50564
50566
  try {
50565
50567
  const [i, s] = await Promise.all([
50566
50568
  e("bichat.session.get", { id: t }),
50567
50569
  r(t, { limit: 200, offset: 0 }).catch((p) => (console.warn("Failed to fetch session artifacts:", p), { artifacts: [], hasMore: !1, nextOffset: 0 }))
50568
- ]), c = rL(i.turns, t), u = hL(dL(c), s.artifacts || []), g = nL(i.pendingQuestion, t);
50570
+ ]), c = nL(i.turns, t), u = gL(hL(c), s.artifacts || []), g = aL(i.pendingQuestion, t);
50569
50571
  return i.pendingQuestion && g && g.questions.length === 0 && $r("Pending question normalized to zero renderable questions", {
50570
50572
  sessionID: t,
50571
50573
  checkpointID: g.id
@@ -50575,12 +50577,12 @@ async function pL(t, e, r) {
50575
50577
  pendingQuestion: g
50576
50578
  };
50577
50579
  } catch (i) {
50578
- if (gL(i))
50580
+ if (fL(i))
50579
50581
  return null;
50580
50582
  throw console.error("Failed to fetch session:", i), i instanceof Error ? i : new Error("Failed to fetch session");
50581
50583
  }
50582
50584
  }
50583
- async function mL(t, e) {
50585
+ async function bL(t, e) {
50584
50586
  const r = await t("bichat.session.list", {
50585
50587
  limit: (e == null ? void 0 : e.limit) ?? 200,
50586
50588
  offset: (e == null ? void 0 : e.offset) ?? 0,
@@ -50592,37 +50594,37 @@ async function mL(t, e) {
50592
50594
  hasMore: typeof r.hasMore == "boolean" ? r.hasMore : !1
50593
50595
  };
50594
50596
  }
50595
- async function bL(t, e) {
50597
+ async function xL(t, e) {
50596
50598
  const r = await t("bichat.session.archive", { id: e });
50597
50599
  return Sn(r.session);
50598
50600
  }
50599
- async function xL(t, e) {
50601
+ async function vL(t, e) {
50600
50602
  const r = await t("bichat.session.unarchive", { id: e });
50601
50603
  return Sn(r.session);
50602
50604
  }
50603
- async function vL(t, e) {
50605
+ async function yL(t, e) {
50604
50606
  const r = await t("bichat.session.pin", { id: e });
50605
50607
  return Sn(r.session);
50606
50608
  }
50607
- async function yL(t, e) {
50609
+ async function wL(t, e) {
50608
50610
  const r = await t("bichat.session.unpin", { id: e });
50609
50611
  return Sn(r.session);
50610
50612
  }
50611
- async function wL(t, e) {
50613
+ async function kL(t, e) {
50612
50614
  await t("bichat.session.delete", { id: e });
50613
50615
  }
50614
- async function kL(t, e, r) {
50616
+ async function SL(t, e, r) {
50615
50617
  const i = await t("bichat.session.updateTitle", { id: e, title: r });
50616
50618
  return Sn(i.session);
50617
50619
  }
50618
- async function SL(t, e) {
50620
+ async function CL(t, e) {
50619
50621
  const r = await t("bichat.session.regenerateTitle", { id: e });
50620
50622
  return Sn(r.session);
50621
50623
  }
50622
- async function CL(t, e) {
50624
+ async function AL(t, e) {
50623
50625
  return t("bichat.session.clear", { id: e });
50624
50626
  }
50625
- async function AL(t, e) {
50627
+ async function TL(t, e) {
50626
50628
  const r = await t("bichat.session.compact", { id: e });
50627
50629
  if (!r.accepted)
50628
50630
  throw new Error("Session compact request was not accepted");
@@ -50638,7 +50640,7 @@ async function AL(t, e) {
50638
50640
  startedAt: r.startedAt
50639
50641
  };
50640
50642
  }
50641
- async function TL(t) {
50643
+ async function EL(t) {
50642
50644
  return (await t("bichat.user.list", {})).users.map((r) => ({
50643
50645
  id: String(r.id),
50644
50646
  firstName: r.firstName || "",
@@ -50646,7 +50648,7 @@ async function TL(t) {
50646
50648
  initials: r.initials || ""
50647
50649
  }));
50648
50650
  }
50649
- async function EL(t, e) {
50651
+ async function $L(t, e) {
50650
50652
  const r = await t("bichat.session.listAll", {
50651
50653
  limit: (e == null ? void 0 : e.limit) ?? 50,
50652
50654
  offset: (e == null ? void 0 : e.offset) ?? 0,
@@ -50659,7 +50661,7 @@ async function EL(t, e) {
50659
50661
  hasMore: !!r.hasMore
50660
50662
  };
50661
50663
  }
50662
- async function $L(t, e) {
50664
+ async function _L(t, e) {
50663
50665
  return (await t("bichat.session.members.list", { sessionId: e })).members.map((i) => ({
50664
50666
  user: {
50665
50667
  id: String(i.user.id),
@@ -50675,21 +50677,21 @@ async function $L(t, e) {
50675
50677
  updatedAt: i.updatedAt
50676
50678
  }));
50677
50679
  }
50678
- async function _L(t, e, r, i) {
50680
+ async function ML(t, e, r, i) {
50679
50681
  await t("bichat.session.members.add", {
50680
50682
  sessionId: e,
50681
50683
  userId: r,
50682
50684
  role: i.toUpperCase()
50683
50685
  });
50684
50686
  }
50685
- async function ML(t, e, r, i) {
50687
+ async function IL(t, e, r, i) {
50686
50688
  await t("bichat.session.members.updateRole", {
50687
50689
  sessionId: e,
50688
50690
  userId: r,
50689
50691
  role: i.toUpperCase()
50690
50692
  });
50691
50693
  }
50692
- async function IL(t, e, r) {
50694
+ async function LL(t, e, r) {
50693
50695
  await t("bichat.session.members.remove", { sessionId: e, userId: r });
50694
50696
  }
50695
50697
  function* rh(t) {
@@ -50708,7 +50710,7 @@ function* rh(t) {
50708
50710
  }
50709
50711
  }
50710
50712
  }
50711
- async function* LL(t) {
50713
+ async function* zL(t) {
50712
50714
  const e = new TextDecoder();
50713
50715
  let r = "";
50714
50716
  try {
@@ -50731,27 +50733,27 @@ async function* LL(t) {
50731
50733
  t.releaseLock();
50732
50734
  }
50733
50735
  }
50734
- const zL = /* @__PURE__ */ new Set(["done", "error"]);
50736
+ const RL = /* @__PURE__ */ new Set(["done", "error"]);
50735
50737
  async function* cu(t) {
50736
50738
  let e = !1;
50737
- for await (const r of LL(t)) {
50739
+ for await (const r of zL(t)) {
50738
50740
  if (r.type === "ping")
50739
50741
  continue;
50740
50742
  const i = r, s = i.type || (i.content ? "content" : "error"), c = {
50741
50743
  ...i,
50742
50744
  type: s
50743
50745
  };
50744
- zL.has(s) && (e = !0), yield c;
50746
+ RL.has(s) && (e = !0), yield c;
50745
50747
  }
50746
50748
  e || (yield { type: "done" });
50747
50749
  }
50748
- async function* pR(t) {
50750
+ async function* mR(t) {
50749
50751
  for await (const e of cu(t)) {
50750
- const r = RL(e);
50752
+ const r = DL(e);
50751
50753
  r && (yield r);
50752
50754
  }
50753
50755
  }
50754
- function RL(t) {
50756
+ function DL(t) {
50755
50757
  switch (t.type) {
50756
50758
  case "chunk":
50757
50759
  case "content":
@@ -50778,7 +50780,7 @@ function RL(t) {
50778
50780
  return null;
50779
50781
  }
50780
50782
  }
50781
- const DL = [
50783
+ const NL = [
50782
50784
  "chunk",
50783
50785
  "content",
50784
50786
  "thinking",
@@ -50795,14 +50797,14 @@ const DL = [
50795
50797
  "cancelled",
50796
50798
  "error",
50797
50799
  "failed"
50798
- ], NL = [
50800
+ ], BL = [
50799
50801
  "done",
50800
50802
  "cancelled",
50801
50803
  "error",
50802
50804
  "failed"
50803
50805
  ];
50804
50806
  function nh(t) {
50805
- return NL.includes(t);
50807
+ return BL.includes(t);
50806
50808
  }
50807
50809
  function Op(t) {
50808
50810
  const e = t.connectGraceMs ?? 500;
@@ -50851,7 +50853,7 @@ const Pp = {
50851
50853
  "image/gif": "gif",
50852
50854
  "application/pdf": "pdf"
50853
50855
  }, ah = new Set(Object.keys(Pp));
50854
- function BL(t) {
50856
+ function FL(t) {
50855
50857
  if (t.length >= 8 && t[0] === 137 && t[1] === 80 && t[2] === 78 && t[3] === 71 && t[4] === 13 && t[5] === 10 && t[6] === 26 && t[7] === 10)
50856
50858
  return "image/png";
50857
50859
  if (t.length >= 3 && t[0] === 255 && t[1] === 216 && t[2] === 255)
@@ -50861,7 +50863,7 @@ function BL(t) {
50861
50863
  if (t.length >= 4 && t[0] === 37 && t[1] === 80 && t[2] === 68 && t[3] === 70)
50862
50864
  return "application/pdf";
50863
50865
  }
50864
- function FL(t, e) {
50866
+ function OL(t, e) {
50865
50867
  const r = Pp[e];
50866
50868
  if (!r)
50867
50869
  return t;
@@ -50882,15 +50884,15 @@ function oa(t, e) {
50882
50884
  return;
50883
50885
  }
50884
50886
  }
50885
- async function OL(t, e) {
50886
- const r = new Uint8Array(await e.slice(0, 16).arrayBuffer()), i = BL(r), s = (t.mimeType || e.type || "").trim().toLowerCase();
50887
+ async function PL(t, e) {
50888
+ const r = new Uint8Array(await e.slice(0, 16).arrayBuffer()), i = FL(r), s = (t.mimeType || e.type || "").trim().toLowerCase();
50887
50889
  let c = s || i || "application/octet-stream", u = !1;
50888
50890
  if (i && s && i !== s) {
50889
50891
  if (!(ah.has(i) && ah.has(s)))
50890
50892
  throw new Error(`Attachment "${t.filename}" MIME mismatch: declared "${s}", detected "${i}"`);
50891
50893
  c = i, u = !0;
50892
50894
  } else i && !s && (c = i);
50893
- const g = FL(t.filename, c), p = new File([e], g, {
50895
+ const g = OL(t.filename, c), p = new File([e], g, {
50894
50896
  type: c,
50895
50897
  lastModified: e.lastModified
50896
50898
  });
@@ -50905,7 +50907,7 @@ async function OL(t, e) {
50905
50907
  sizeBytes: p.size
50906
50908
  }), p;
50907
50909
  }
50908
- async function PL(t) {
50910
+ async function HL(t) {
50909
50911
  var e;
50910
50912
  if (t.base64Data && t.base64Data.trim().length > 0)
50911
50913
  try {
@@ -50935,7 +50937,7 @@ async function PL(t) {
50935
50937
  }
50936
50938
  throw new Error(`Attachment "${t.filename}" has no uploadable data`);
50937
50939
  }
50938
- async function HL(t, e, r, i, s = fetch) {
50940
+ async function XL(t, e, r, i, s = fetch) {
50939
50941
  const c = new FormData();
50940
50942
  c.append("file", t);
50941
50943
  const u = await s(`${e}${r}`, {
@@ -50964,14 +50966,14 @@ async function HL(t, e, r, i, s = fetch) {
50964
50966
  size: typeof g.size == "number" && Number.isFinite(g.size) ? g.size : t.size
50965
50967
  };
50966
50968
  }
50967
- function XL(t) {
50969
+ function YL(t) {
50968
50970
  return t.map((e, r) => {
50969
50971
  if (typeof e.id != "number" || !Number.isFinite(e.id) || e.id <= 0)
50970
50972
  throw new Error(`Attachment upload reference is invalid at index ${r}`);
50971
50973
  return { uploadId: e.id };
50972
50974
  });
50973
50975
  }
50974
- async function YL(t, e, r) {
50976
+ async function WL(t, e, r) {
50975
50977
  if (typeof t.uploadId == "number" && t.uploadId > 0)
50976
50978
  return oa("attachment_upload_success", {
50977
50979
  sessionId: e.sessionId,
@@ -50998,8 +51000,8 @@ async function YL(t, e, r) {
50998
51000
  });
50999
51001
  let i;
51000
51002
  try {
51001
- const s = await PL(t);
51002
- i = await OL(t, s), Na(i);
51003
+ const s = await HL(t);
51004
+ i = await PL(t, s), Na(i);
51003
51005
  } catch (s) {
51004
51006
  const c = s instanceof Error ? s.message : "Unknown attachment decode/validation error";
51005
51007
  throw oa("attachment_decode_fail", {
@@ -51039,14 +51041,14 @@ async function YL(t, e, r) {
51039
51041
  }), new Error(`Attachment "${t.filename}" upload failed: ${c}`);
51040
51042
  }
51041
51043
  }
51042
- class WL extends Error {
51044
+ class UL extends Error {
51043
51045
  constructor(r, i) {
51044
51046
  super(r);
51045
51047
  kt(this, "cause");
51046
51048
  this.name = "RunEventsConnectError", this.cause = i;
51047
51049
  }
51048
51050
  }
51049
- function UL() {
51051
+ function GL() {
51050
51052
  if (typeof crypto < "u" && typeof crypto.randomUUID == "function")
51051
51053
  return crypto.randomUUID();
51052
51054
  const t = new Uint8Array(16);
@@ -51056,7 +51058,7 @@ function UL() {
51056
51058
  const e = Array.from(t, (r) => r.toString(16).padStart(2, "0")).join("");
51057
51059
  return `${e.slice(0, 8)}-${e.slice(8, 12)}-${e.slice(12, 16)}-${e.slice(16, 20)}-${e.slice(20)}`;
51058
51060
  }
51059
- async function* GL(t, e, r, i = [], s, c) {
51061
+ async function* jL(t, e, r, i = [], s, c) {
51060
51062
  const u = new AbortController();
51061
51063
  let g;
51062
51064
  s && (g = () => {
@@ -51065,12 +51067,12 @@ async function* GL(t, e, r, i = [], s, c) {
51065
51067
  const p = `${t.baseUrl}${t.streamEndpoint}`;
51066
51068
  let m, x = !1;
51067
51069
  try {
51068
- const y = await Promise.all(i.map((N, O) => YL(N, { sessionId: e, attachmentIndex: O }, t.uploadFileFn))), A = XL(y);
51070
+ const y = await Promise.all(i.map((N, O) => WL(N, { sessionId: e, attachmentIndex: O }, t.uploadFileFn))), A = YL(y);
51069
51071
  t.logAttachmentLifecycle("stream_send_with_upload_ids", {
51070
51072
  sessionId: e,
51071
51073
  attachmentCount: A.length
51072
51074
  });
51073
- const E = (c == null ? void 0 : c.requestId) ?? UL(), $ = {
51075
+ const E = (c == null ? void 0 : c.requestId) ?? GL(), $ = {
51074
51076
  sessionId: e,
51075
51077
  content: r,
51076
51078
  debugMode: (c == null ? void 0 : c.debugMode) ?? !1,
@@ -51125,9 +51127,9 @@ function Ei(t, e) {
51125
51127
  const r = t.baseUrl.replace(/\/+$/, ""), i = t.streamEndpoint.replace(/\/$/, "");
51126
51128
  return `${r}${i}${e}`;
51127
51129
  }
51128
- const jL = 5e3;
51129
- async function qL(t, e) {
51130
- const r = t.timeoutMs ?? jL, i = new AbortController(), s = setTimeout(() => i.abort(), r);
51130
+ const qL = 5e3;
51131
+ async function VL(t, e) {
51132
+ const r = t.timeoutMs ?? qL, i = new AbortController(), s = setTimeout(() => i.abort(), r);
51131
51133
  try {
51132
51134
  const c = Ei(t, "/stop"), u = await fetch(c, {
51133
51135
  method: "POST",
@@ -51145,9 +51147,9 @@ async function qL(t, e) {
51145
51147
  clearTimeout(s);
51146
51148
  }
51147
51149
  }
51148
- const VL = 5e3;
51149
- async function QL(t, e) {
51150
- const r = t.timeoutMs ?? VL, i = new AbortController(), s = setTimeout(() => i.abort(), r);
51150
+ const QL = 5e3;
51151
+ async function ZL(t, e) {
51152
+ const r = t.timeoutMs ?? QL, i = new AbortController(), s = setTimeout(() => i.abort(), r);
51151
51153
  try {
51152
51154
  const c = Ei(t, `/status?sessionId=${encodeURIComponent(e)}`), u = await fetch(c, {
51153
51155
  method: "GET",
@@ -51163,7 +51165,7 @@ async function QL(t, e) {
51163
51165
  clearTimeout(s);
51164
51166
  }
51165
51167
  }
51166
- async function ZL(t, e, r, i, s) {
51168
+ async function KL(t, e, r, i, s) {
51167
51169
  const c = Ei(t, "/resume"), u = new AbortController();
51168
51170
  let g;
51169
51171
  const p = t.connectTimeoutMs;
@@ -51187,17 +51189,17 @@ async function ZL(t, e, r, i, s) {
51187
51189
  g !== void 0 && clearTimeout(g);
51188
51190
  }
51189
51191
  }
51190
- function KL(t, e, r, i) {
51192
+ function JL(t, e, r, i) {
51191
51193
  const s = Ei(t, "/events"), c = new URLSearchParams({ sessionId: e, runId: r }), u = `${s}?${c.toString()}`, g = i.lastEventId ? `${u}&${new URLSearchParams({ lastEventId: i.lastEventId }).toString()}` : u, p = new AbortController();
51192
51194
  return i.signal && (i.signal.aborted ? p.abort() : i.signal.addEventListener("abort", () => p.abort(), {
51193
51195
  once: !0
51194
51196
  })), Op({
51195
51197
  url: g,
51196
- events: DL,
51198
+ events: NL,
51197
51199
  withCredentials: !0,
51198
51200
  signal: p.signal,
51199
51201
  onError: i.onError,
51200
- onConnectError: (m) => new WL("EventSource failed to connect before first event", m),
51202
+ onConnectError: (m) => new UL("EventSource failed to connect before first event", m),
51201
51203
  onMessage: (m, x) => {
51202
51204
  if (typeof x == "object" && x !== null && x.__unparseable) {
51203
51205
  i.onChunk({
@@ -51211,7 +51213,7 @@ function KL(t, e, r, i) {
51211
51213
  }
51212
51214
  });
51213
51215
  }
51214
- function JL(t, e) {
51216
+ function ez(t, e) {
51215
51217
  const r = Ei(t, "/active-runs");
51216
51218
  return Op({
51217
51219
  url: r,
@@ -51227,7 +51229,7 @@ function JL(t, e) {
51227
51229
  }
51228
51230
  });
51229
51231
  }
51230
- async function ez(t, e, r, i) {
51232
+ async function tz(t, e, r, i) {
51231
51233
  try {
51232
51234
  const s = {};
51233
51235
  for (const [u, g] of Object.entries(i))
@@ -51245,7 +51247,7 @@ async function ez(t, e, r, i) {
51245
51247
  return { success: !1, error: s instanceof Error ? s.message : "Unknown error" };
51246
51248
  }
51247
51249
  }
51248
- async function tz(t, e) {
51250
+ async function rz(t, e) {
51249
51251
  try {
51250
51252
  const r = await t("bichat.question.reject", { sessionId: e });
51251
51253
  return { success: !0, data: Hp(r) };
@@ -51253,13 +51255,13 @@ async function tz(t, e) {
51253
51255
  return { success: !1, error: r instanceof Error ? r.message : "Unknown error" };
51254
51256
  }
51255
51257
  }
51256
- function rz(t) {
51258
+ function nz(t) {
51257
51259
  return t === "question_submit" || t === "question_reject" || t === "session_compact";
51258
51260
  }
51259
51261
  function Hp(t) {
51260
51262
  if (!t.accepted)
51261
51263
  throw new Error("Async run request was not accepted");
51262
- if (!rz(t.operation))
51264
+ if (!nz(t.operation))
51263
51265
  throw new Error(`Unexpected async operation: ${t.operation}`);
51264
51266
  if (!t.sessionId || !t.runId)
51265
51267
  throw new Error("Missing async run metadata");
@@ -51271,7 +51273,7 @@ function Hp(t) {
51271
51273
  startedAt: t.startedAt
51272
51274
  };
51273
51275
  }
51274
- async function nz(t, e, r) {
51276
+ async function az(t, e, r) {
51275
51277
  const i = (r == null ? void 0 : r.limit) ?? 50, s = (r == null ? void 0 : r.offset) ?? 0, c = await t("bichat.session.artifacts", {
51276
51278
  sessionId: e,
51277
51279
  limit: i,
@@ -51283,7 +51285,7 @@ async function nz(t, e, r) {
51283
51285
  nextOffset: p
51284
51286
  };
51285
51287
  }
51286
- async function az(t, e, r, i) {
51288
+ async function iz(t, e, r, i) {
51287
51289
  if (!Array.isArray(r) || r.length === 0)
51288
51290
  return { artifacts: [] };
51289
51291
  Rh(0, r.length, 10), r.forEach((u) => Na(u));
@@ -51302,7 +51304,7 @@ async function az(t, e, r, i) {
51302
51304
  })).artifacts || []).map((u) => su(u))
51303
51305
  };
51304
51306
  }
51305
- async function iz(t, e, r, i = "") {
51307
+ async function sz(t, e, r, i = "") {
51306
51308
  const s = await t("bichat.artifact.update", {
51307
51309
  id: e,
51308
51310
  name: r,
@@ -51310,7 +51312,7 @@ async function iz(t, e, r, i = "") {
51310
51312
  });
51311
51313
  return su(s.artifact);
51312
51314
  }
51313
- async function sz(t, e) {
51315
+ async function oz(t, e) {
51314
51316
  await t("bichat.artifact.delete", { id: e });
51315
51317
  }
51316
51318
  class Xp {
@@ -51319,7 +51321,7 @@ class Xp {
51319
51321
  kt(this, "abortController", null);
51320
51322
  kt(this, "rpc");
51321
51323
  kt(this, "boundCallRPC", (e, r) => this.callRPC(e, r));
51322
- kt(this, "boundUploadFile", (e) => HL(e, this.config.baseUrl, this.config.uploadEndpoint, () => this.createUploadHeaders(), this.config.fetcher));
51324
+ kt(this, "boundUploadFile", (e) => XL(e, this.config.baseUrl, this.config.uploadEndpoint, () => this.createUploadHeaders(), this.config.fetcher));
51323
51325
  this.config = {
51324
51326
  streamEndpoint: "/stream",
51325
51327
  uploadEndpoint: "/api/uploads",
@@ -51360,71 +51362,71 @@ class Xp {
51360
51362
  // Session management (delegates to SessionManager)
51361
51363
  // -------------------------------------------------------------------------
51362
51364
  async createSession() {
51363
- return fL(this.boundCallRPC);
51365
+ return pL(this.boundCallRPC);
51364
51366
  }
51365
51367
  async fetchSession(e) {
51366
- return pL(e, this.boundCallRPC, (r, i) => this.fetchSessionArtifacts(r, i));
51368
+ return mL(e, this.boundCallRPC, (r, i) => this.fetchSessionArtifacts(r, i));
51367
51369
  }
51368
51370
  async listSessions(e) {
51369
- return mL(this.boundCallRPC, e);
51371
+ return bL(this.boundCallRPC, e);
51370
51372
  }
51371
51373
  async archiveSession(e) {
51372
- return bL(this.boundCallRPC, e);
51374
+ return xL(this.boundCallRPC, e);
51373
51375
  }
51374
51376
  async unarchiveSession(e) {
51375
- return xL(this.boundCallRPC, e);
51377
+ return vL(this.boundCallRPC, e);
51376
51378
  }
51377
51379
  async pinSession(e) {
51378
- return vL(this.boundCallRPC, e);
51380
+ return yL(this.boundCallRPC, e);
51379
51381
  }
51380
51382
  async unpinSession(e) {
51381
- return yL(this.boundCallRPC, e);
51383
+ return wL(this.boundCallRPC, e);
51382
51384
  }
51383
51385
  async deleteSession(e) {
51384
- return wL(this.boundCallRPC, e);
51386
+ return kL(this.boundCallRPC, e);
51385
51387
  }
51386
51388
  async renameSession(e, r) {
51387
- return kL(this.boundCallRPC, e, r);
51389
+ return SL(this.boundCallRPC, e, r);
51388
51390
  }
51389
51391
  async regenerateSessionTitle(e) {
51390
- return SL(this.boundCallRPC, e);
51392
+ return CL(this.boundCallRPC, e);
51391
51393
  }
51392
51394
  async clearSessionHistory(e) {
51393
- return CL(this.boundCallRPC, e);
51395
+ return AL(this.boundCallRPC, e);
51394
51396
  }
51395
51397
  async compactSessionHistory(e) {
51396
- return AL(this.boundCallRPC, e);
51398
+ return TL(this.boundCallRPC, e);
51397
51399
  }
51398
51400
  async listUsers() {
51399
- return TL(this.boundCallRPC);
51401
+ return EL(this.boundCallRPC);
51400
51402
  }
51401
51403
  async listAllSessions(e) {
51402
- return EL(this.boundCallRPC, e);
51404
+ return $L(this.boundCallRPC, e);
51403
51405
  }
51404
51406
  async listSessionMembers(e) {
51405
- return $L(this.boundCallRPC, e);
51407
+ return _L(this.boundCallRPC, e);
51406
51408
  }
51407
51409
  async addSessionMember(e, r, i) {
51408
- return _L(this.boundCallRPC, e, r, i);
51410
+ return ML(this.boundCallRPC, e, r, i);
51409
51411
  }
51410
51412
  async updateSessionMemberRole(e, r, i) {
51411
- return ML(this.boundCallRPC, e, r, i);
51413
+ return IL(this.boundCallRPC, e, r, i);
51412
51414
  }
51413
51415
  async removeSessionMember(e, r) {
51414
- return IL(this.boundCallRPC, e, r);
51416
+ return LL(this.boundCallRPC, e, r);
51415
51417
  }
51416
51418
  // -------------------------------------------------------------------------
51417
51419
  // Message transport (delegates to MessageTransport)
51418
51420
  // -------------------------------------------------------------------------
51419
51421
  async stopGeneration(e) {
51420
- this.cancelStream(), await qL({
51422
+ this.cancelStream(), await VL({
51421
51423
  baseUrl: this.config.baseUrl,
51422
51424
  streamEndpoint: this.config.streamEndpoint,
51423
51425
  createHeaders: (r) => this.createHeaders(r)
51424
51426
  }, e);
51425
51427
  }
51426
51428
  async getStreamStatus(e) {
51427
- return QL({
51429
+ return ZL({
51428
51430
  baseUrl: this.config.baseUrl,
51429
51431
  streamEndpoint: this.config.streamEndpoint,
51430
51432
  createHeaders: (r) => this.createHeaders(r),
@@ -51432,7 +51434,7 @@ class Xp {
51432
51434
  }, e);
51433
51435
  }
51434
51436
  async resumeStream(e, r, i, s) {
51435
- await ZL({
51437
+ await KL({
51436
51438
  baseUrl: this.config.baseUrl,
51437
51439
  streamEndpoint: this.config.streamEndpoint,
51438
51440
  createHeaders: (c) => this.createHeaders(c),
@@ -51447,7 +51449,7 @@ class Xp {
51447
51449
  * another tab started.
51448
51450
  */
51449
51451
  subscribeRunEvents(e, r, i) {
51450
- return KL({
51452
+ return JL({
51451
51453
  baseUrl: this.config.baseUrl,
51452
51454
  streamEndpoint: this.config.streamEndpoint
51453
51455
  }, e, r, i);
@@ -51459,7 +51461,7 @@ class Xp {
51459
51461
  * that mounts for the lifetime of the chat app.
51460
51462
  */
51461
51463
  subscribeActiveRuns(e) {
51462
- return JL({
51464
+ return ez({
51463
51465
  baseUrl: this.config.baseUrl,
51464
51466
  streamEndpoint: this.config.streamEndpoint
51465
51467
  }, e);
@@ -51473,7 +51475,7 @@ class Xp {
51473
51475
  }, s.addEventListener("abort", u));
51474
51476
  try {
51475
51477
  const g = this.abortController.signal;
51476
- yield* GL({
51478
+ yield* jL({
51477
51479
  callRPC: this.boundCallRPC,
51478
51480
  baseUrl: this.config.baseUrl,
51479
51481
  streamEndpoint: this.config.streamEndpoint,
@@ -51492,31 +51494,31 @@ class Xp {
51492
51494
  this.abortController && (this.abortController.abort(), this.abortController = null);
51493
51495
  }
51494
51496
  async submitQuestionAnswers(e, r, i) {
51495
- return ez(this.boundCallRPC, e, r, i);
51497
+ return tz(this.boundCallRPC, e, r, i);
51496
51498
  }
51497
51499
  async rejectPendingQuestion(e) {
51498
- return tz(this.boundCallRPC, e);
51500
+ return rz(this.boundCallRPC, e);
51499
51501
  }
51500
51502
  // -------------------------------------------------------------------------
51501
51503
  // Artifact management (delegates to ArtifactManager)
51502
51504
  // -------------------------------------------------------------------------
51503
51505
  async fetchSessionArtifacts(e, r) {
51504
- return nz(this.boundCallRPC, e, r);
51506
+ return az(this.boundCallRPC, e, r);
51505
51507
  }
51506
51508
  async uploadSessionArtifacts(e, r) {
51507
- return az(this.boundCallRPC, e, r, this.boundUploadFile);
51509
+ return iz(this.boundCallRPC, e, r, this.boundUploadFile);
51508
51510
  }
51509
51511
  async renameSessionArtifact(e, r, i = "") {
51510
- return iz(this.boundCallRPC, e, r, i);
51512
+ return sz(this.boundCallRPC, e, r, i);
51511
51513
  }
51512
51514
  async deleteSessionArtifact(e) {
51513
- return sz(this.boundCallRPC, e);
51515
+ return oz(this.boundCallRPC, e);
51514
51516
  }
51515
51517
  }
51516
- function mR(t) {
51518
+ function bR(t) {
51517
51519
  return new Xp(t);
51518
51520
  }
51519
- function bR(t, e) {
51521
+ function xR(t, e) {
51520
51522
  if (!t)
51521
51523
  return [];
51522
51524
  if (!e || e.length === 0)
@@ -51532,7 +51534,7 @@ function bR(t, e) {
51532
51534
  }
51533
51535
  return s < t.length && i.push({ seq: i.length, content: t.slice(s) }), i;
51534
51536
  }
51535
- function xR(t) {
51537
+ function vR(t) {
51536
51538
  if (!t)
51537
51539
  return [];
51538
51540
  const e = t.text_block_offsets;
@@ -51544,7 +51546,7 @@ function xR(t) {
51544
51546
  return r;
51545
51547
  }
51546
51548
  const ni = /* @__PURE__ */ new Set(["done", "error", "cancelled", "failed"]);
51547
- class oz {
51549
+ class lz {
51548
51550
  constructor() {
51549
51551
  kt(this, "chunks", []);
51550
51552
  kt(this, "waiter");
@@ -51566,7 +51568,7 @@ class oz {
51566
51568
  }
51567
51569
  }
51568
51570
  }
51569
- class vR extends Xp {
51571
+ class yR extends Xp {
51570
51572
  constructor(r, i) {
51571
51573
  const s = new AbortController(), c = r.fetcher ?? fetch;
51572
51574
  super({ ...r, fetcher: (u, g) => c(u, { ...g, signal: g != null && g.signal ? AbortSignal.any([s.signal, g.signal]) : s.signal }) });
@@ -51586,7 +51588,7 @@ class vR extends Xp {
51586
51588
  requestId: (u == null ? void 0 : u.requestId) ?? crypto.randomUUID(),
51587
51589
  ...u != null && u.reasoningEffort ? { reasoningEffort: u.reasoningEffort } : {},
51588
51590
  ...u != null && u.model ? { model: u.model } : {}
51589
- }, m = new oz(), x = this.openPOSTStream("", p, m), y = () => {
51591
+ }, m = new lz(), x = this.openPOSTStream("", p, m), y = () => {
51590
51592
  x.close(), m.push({ type: "error", error: "Stream cancelled" });
51591
51593
  };
51592
51594
  this.subscriptions.set(x, y), c == null || c.addEventListener("abort", y, { once: !0 }), c != null && c.aborted && y();
@@ -51694,57 +51696,57 @@ export {
51694
51696
  zh as ATTACHMENT_ACCEPT_ATTRIBUTE,
51695
51697
  P4 as ActivityTrace,
51696
51698
  Kh as Alert,
51697
- mM as AllChatsList,
51699
+ bM as AllChatsList,
51698
51700
  nk as ArchiveBanner,
51699
- Mz as ArchivedChatList,
51701
+ Iz as ArchivedChatList,
51700
51702
  U2 as AssistantMessage,
51701
51703
  r4 as AssistantTurnView,
51702
51704
  Fh as AttachmentGrid,
51703
- zz as AttachmentPreview,
51704
- Rz as AttachmentUpload,
51705
+ Rz as AttachmentPreview,
51706
+ Dz as AttachmentUpload,
51705
51707
  Zb as AvatarStack,
51706
- Iz as BiChatLayout,
51708
+ Lz as BiChatLayout,
51707
51709
  Tv as CHART_VISUAL,
51708
51710
  Os as ChartCard,
51709
51711
  ox as ChatHeader,
51710
51712
  Rb as ChatMachine,
51711
- xz as ChatSession,
51713
+ vz as ChatSession,
51712
51714
  Bb as ChatSessionProvider,
51713
- P$ as CodeBlock,
51715
+ H$ as CodeBlock,
51714
51716
  Ey as CodeOutputsPanel,
51715
51717
  Y5 as CompactionDoodle,
51716
- cR as ConfigProvider,
51718
+ uR as ConfigProvider,
51717
51719
  yc as ConfirmModal,
51718
- $I as ConfirmationStep,
51720
+ _I as ConfirmationStep,
51719
51721
  ql as DateGroupHeader,
51720
51722
  _2 as DebugPanel,
51721
- I_ as DefaultErrorContent,
51723
+ L_ as DefaultErrorContent,
51722
51724
  Ow as DownloadCard,
51723
- a_ as EditableText,
51725
+ i_ as EditableText,
51724
51726
  ks as EmptyState,
51725
- $z as ErrorBoundary,
51727
+ _z as ErrorBoundary,
51726
51728
  Xp as HttpDataSource,
51727
51729
  Ph as ImageModal,
51728
51730
  Vw as InlineQuestionForm,
51729
51731
  mc as InteractiveTableCard,
51730
- pz as IotaContextProvider,
51731
- Az as ListItemSkeleton,
51732
+ mz as IotaContextProvider,
51733
+ Tz as ListItemSkeleton,
51732
51734
  fi as LoadingSpinner,
51733
- vR as ManagedHttpDataSource,
51735
+ yR as ManagedHttpDataSource,
51734
51736
  Vd as MarkdownRenderer,
51735
- Lz as MessageActions,
51737
+ zz as MessageActions,
51736
51738
  Uu as MessageInput,
51737
51739
  l5 as MessageList,
51738
51740
  Zr as MessageRole,
51739
- vz as ModelSelector,
51740
- Ez as PermissionGuard,
51741
- Nz as QuestionForm,
51742
- wI as QuestionStep,
51741
+ yz as ModelSelector,
51742
+ $z as PermissionGuard,
51743
+ Bz as QuestionForm,
51744
+ kI as QuestionStep,
51743
51745
  Qm as RateLimiter,
51744
51746
  Zw as RetryActionArea,
51745
- WL as RunEventsConnectError,
51746
- DL as STREAM_EVENT_TYPES,
51747
- Dz as ScreenReaderAnnouncer,
51747
+ UL as RunEventsConnectError,
51748
+ NL as STREAM_EVENT_TYPES,
51749
+ Nz as ScreenReaderAnnouncer,
51748
51750
  U4 as ScrollToBottomButton,
51749
51751
  Cp as SearchInput,
51750
51752
  yk as SessionArtifactList,
@@ -51753,97 +51755,97 @@ export {
51753
51755
  jl as SessionItem,
51754
51756
  _3 as SessionMembersModal,
51755
51757
  Gl as SessionSkeleton,
51756
- _z as Sidebar,
51757
- Tz as Skeleton,
51758
- Sz as SkeletonAvatar,
51759
- Cz as SkeletonCard,
51760
- wz as SkeletonGroup,
51761
- kz as SkeletonText,
51762
- QM as SkipLink,
51758
+ Mz as Sidebar,
51759
+ Ez as Skeleton,
51760
+ Cz as SkeletonAvatar,
51761
+ Az as SkeletonCard,
51762
+ kz as SkeletonGroup,
51763
+ Sz as SkeletonText,
51764
+ ZM as SkipLink,
51763
51765
  Iw as SourcesPanel,
51764
51766
  qh as StreamError,
51765
51767
  Hh as StreamingCursor,
51766
51768
  t4 as SystemMessage,
51767
- NL as TERMINAL_STREAM_EVENT_TYPES,
51769
+ BL as TERMINAL_STREAM_EVENT_TYPES,
51768
51770
  ww as TabbedChartGroup,
51769
51771
  fw as TabbedTableGroup,
51770
51772
  Yh as TableExportButton,
51771
- D$ as TableWithExport,
51772
- T_ as Toast,
51773
+ N$ as TableWithExport,
51774
+ E_ as Toast,
51773
51775
  _p as ToastContainer,
51774
- P_ as TouchContextMenu,
51776
+ H_ as TouchContextMenu,
51775
51777
  n4 as TurnBubble,
51776
51778
  x4 as TypingIndicator,
51777
51779
  ha as UserAvatar,
51778
- tM as UserFilter,
51780
+ rM as UserFilter,
51779
51781
  py as UserMessage,
51780
51782
  my as UserTurnView,
51781
51783
  K5 as WelcomeContent,
51782
- WI as addCSRFHeader,
51783
- Zz as backdropVariants,
51784
- Kz as buttonVariants,
51784
+ UI as addCSRFHeader,
51785
+ Kz as backdropVariants,
51786
+ Jz as buttonVariants,
51785
51787
  hc as convertToBase64,
51786
51788
  vi as createDataUrl,
51787
- fR as createHeadersWithCSRF,
51788
- mR as createHttpDataSource,
51789
+ pR as createHeadersWithCSRF,
51790
+ bR as createHttpDataSource,
51789
51791
  Is as createReactiveSnapshot,
51790
- fz as createReactiveValue,
51791
- gR as darkTheme,
51792
- sR as dropdownVariants,
51793
- lR as errorMessageVariants,
51794
- Vz as fadeInUpVariants,
51795
- qz as fadeInVariants,
51796
- iR as floatingButtonVariants,
51792
+ pz as createReactiveValue,
51793
+ fR as darkTheme,
51794
+ oR as dropdownVariants,
51795
+ cR as errorMessageVariants,
51796
+ Qz as fadeInUpVariants,
51797
+ Vz as fadeInVariants,
51798
+ sR as floatingButtonVariants,
51797
51799
  _n as formatFileSize,
51798
- YI as getCSRFToken,
51800
+ WI as getCSRFToken,
51799
51801
  ds as getFileVisual,
51800
51802
  w4 as getToolLabel,
51801
51803
  Lp as groupSessionsByDate,
51802
51804
  k4 as groupSteps,
51803
- mz as hasPermission,
51805
+ bz as hasPermission,
51804
51806
  dc as isImageMimeType,
51805
51807
  Jm as isPermissionDeniedError,
51806
51808
  nh as isTerminalEvent,
51807
- hR as lightTheme,
51808
- eR as listItemVariants,
51809
- rR as messageContainerVariants,
51810
- tR as messageVariants,
51809
+ gR as lightTheme,
51810
+ tR as listItemVariants,
51811
+ nR as messageContainerVariants,
51812
+ rR as messageVariants,
51811
51813
  cu as parseBichatStream,
51812
- pR as parseBichatStreamEvents,
51813
- LL as parseSSEStream,
51814
- xR as readTextBlockOffsets,
51815
- Qz as scaleFadeVariants,
51816
- oR as sessionItemVariants,
51817
- bR as splitIntoTextBlocks,
51818
- Jz as staggerContainerVariants,
51814
+ mR as parseBichatStreamEvents,
51815
+ zL as parseSSEStream,
51816
+ vR as readTextBlockOffsets,
51817
+ Zz as scaleFadeVariants,
51818
+ lR as sessionItemVariants,
51819
+ xR as splitIntoTextBlocks,
51820
+ eR as staggerContainerVariants,
51819
51821
  ja as toErrorDisplay,
51820
- nR as typingDotVariants,
51821
- Bz as useActiveRuns,
51822
- Yz as useAttachments,
51823
- Hz as useAutoScroll,
51824
- jz as useBichatRouter,
51822
+ aR as typingDotVariants,
51823
+ Fz as useActiveRuns,
51824
+ Wz as useAttachments,
51825
+ Xz as useAutoScroll,
51826
+ qz as useBichatRouter,
51825
51827
  Ob as useChatInput,
51826
51828
  xi as useChatMessaging,
51827
51829
  Ls as useChatSession,
51828
- uR as useConfig,
51830
+ dR as useConfig,
51829
51831
  Zy as useDataTable,
51830
- Oz as useFocusTrap,
51831
- Gz as useHttpDataSourceConfigFromApplet,
51832
- Pz as useImageGallery,
51832
+ Pz as useFocusTrap,
51833
+ jz as useHttpDataSourceConfigFromApplet,
51834
+ Hz as useImageGallery,
51833
51835
  zs as useIotaContext,
51834
51836
  Qh as useKeyboardShortcuts,
51835
- D_ as useLongPress,
51836
- Wz as useMarkdownCopy,
51837
- Xz as useMessageActions,
51838
- Fz as useModalLock,
51837
+ N_ as useLongPress,
51838
+ Uz as useMarkdownCopy,
51839
+ Yz as useMessageActions,
51840
+ Oz as useModalLock,
51839
51841
  Fb as useOptionalChatMessaging,
51840
- dR as useRequiredConfig,
51841
- Uz as useScrollToBottom,
51842
- KM as useSidebarState,
51842
+ hR as useRequiredConfig,
51843
+ Gz as useScrollToBottom,
51844
+ JM as useSidebarState,
51843
51845
  no as useToast,
51844
51846
  Tt as useTranslation,
51845
51847
  Na as validateAttachmentFile,
51846
51848
  Rh as validateFileCount,
51847
- bz as validateImageFile,
51848
- aR as verbTransitionVariants
51849
+ xz as validateImageFile,
51850
+ iR as verbTransitionVariants
51849
51851
  };