@evelan/jexity-widget 0.12.1 → 0.12.2

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/index.mjs CHANGED
@@ -287,21 +287,21 @@ function c(t, e, n, r, i, o) {
287
287
  if (typeof t == "function" && (s = t.defaultProps)) for (l in s) a[l] === void 0 && (a[l] = s[l]);
288
288
  return b.vnode && b.vnode(u), u;
289
289
  }
290
- var ce, S, Nt, Vn, $e = 0, ri = [], j = b, Hn = j.__b, Wn = j.__r, Jn = j.diffed, Gn = j.__c, Kn = j.unmount, Zn = j.__;
291
- function Le(t, e) {
292
- j.__h && j.__h(S, t, $e || e), $e = 0;
293
- var n = S.__H || (S.__H = { __: [], __h: [] });
290
+ var ce, j, Nt, Vn, $e = 0, ri = [], S = b, Hn = S.__b, Wn = S.__r, Jn = S.diffed, Gn = S.__c, Kn = S.unmount, Zn = S.__;
291
+ function Me(t, e) {
292
+ S.__h && S.__h(j, t, $e || e), $e = 0;
293
+ var n = j.__H || (j.__H = { __: [], __h: [] });
294
294
  return t >= n.__.length && n.__.push({}), n.__[t];
295
295
  }
296
296
  function C(t) {
297
297
  return $e = 1, wn(ai, t);
298
298
  }
299
299
  function wn(t, e, n) {
300
- var r = Le(ce++, 2);
300
+ var r = Me(ce++, 2);
301
301
  if (r.t = t, !r.__c && (r.__ = [n ? n(e) : ai(void 0, e), function(l) {
302
302
  var a = r.__N ? r.__N[0] : r.__[0], u = r.t(a, l);
303
303
  a !== u && (r.__N = [u, r.__[1]], r.__c.setState({}));
304
- }], r.__c = S, !S.__f)) {
304
+ }], r.__c = j, !j.__f)) {
305
305
  var i = function(l, a, u) {
306
306
  if (!r.__c.__H) return !0;
307
307
  var d = r.__c.__H.__.filter(function(f) {
@@ -318,25 +318,25 @@ function wn(t, e, n) {
318
318
  }
319
319
  }), o && o.call(this, l, a, u) || h;
320
320
  };
321
- S.__f = !0;
322
- var o = S.shouldComponentUpdate, s = S.componentWillUpdate;
323
- S.componentWillUpdate = function(l, a, u) {
321
+ j.__f = !0;
322
+ var o = j.shouldComponentUpdate, s = j.componentWillUpdate;
323
+ j.componentWillUpdate = function(l, a, u) {
324
324
  if (this.__e) {
325
325
  var d = o;
326
326
  o = void 0, i(l, a, u), o = d;
327
327
  }
328
328
  s && s.call(this, l, a, u);
329
- }, S.shouldComponentUpdate = i;
329
+ }, j.shouldComponentUpdate = i;
330
330
  }
331
331
  return r.__N || r.__;
332
332
  }
333
333
  function T(t, e) {
334
- var n = Le(ce++, 3);
335
- !j.__s && kn(n.__H, e) && (n.__ = t, n.u = e, S.__H.__h.push(n));
334
+ var n = Me(ce++, 3);
335
+ !S.__s && kn(n.__H, e) && (n.__ = t, n.u = e, j.__H.__h.push(n));
336
336
  }
337
337
  function st(t, e) {
338
- var n = Le(ce++, 4);
339
- !j.__s && kn(n.__H, e) && (n.__ = t, n.u = e, S.__h.push(n));
338
+ var n = Me(ce++, 4);
339
+ !S.__s && kn(n.__H, e) && (n.__ = t, n.u = e, j.__h.push(n));
340
340
  }
341
341
  function ue(t) {
342
342
  return $e = 5, K(function() {
@@ -357,7 +357,7 @@ function ii(t, e, n) {
357
357
  }, n == null ? n : n.concat(t));
358
358
  }
359
359
  function K(t, e) {
360
- var n = Le(ce++, 7);
360
+ var n = Me(ce++, 7);
361
361
  return kn(n.__H, e) && (n.__ = t(), n.__H = e, n.__h = t), n.__;
362
362
  }
363
363
  function Re(t, e) {
@@ -366,45 +366,45 @@ function Re(t, e) {
366
366
  }, e);
367
367
  }
368
368
  function $t(t) {
369
- var e = S.context[t.__c], n = Le(ce++, 9);
370
- return n.c = t, e ? (n.__ == null && (n.__ = !0, e.sub(S)), e.props.value) : t.__;
369
+ var e = j.context[t.__c], n = Me(ce++, 9);
370
+ return n.c = t, e ? (n.__ == null && (n.__ = !0, e.sub(j)), e.props.value) : t.__;
371
371
  }
372
372
  function oi(t, e) {
373
- j.useDebugValue && j.useDebugValue(e ? e(t) : t);
373
+ S.useDebugValue && S.useDebugValue(e ? e(t) : t);
374
374
  }
375
375
  function si() {
376
- var t = Le(ce++, 11);
376
+ var t = Me(ce++, 11);
377
377
  if (!t.__) {
378
- for (var e = S.__v; e !== null && !e.__m && e.__ !== null; ) e = e.__;
378
+ for (var e = j.__v; e !== null && !e.__m && e.__ !== null; ) e = e.__;
379
379
  var n = e.__m || (e.__m = [0, 0]);
380
380
  t.__ = "P" + n[0] + "-" + n[1]++;
381
381
  }
382
382
  return t.__;
383
383
  }
384
- function So() {
384
+ function jo() {
385
385
  for (var t; t = ri.shift(); ) if (t.__P && t.__H) try {
386
386
  t.__H.__h.forEach(gt), t.__H.__h.forEach(en), t.__H.__h = [];
387
387
  } catch (e) {
388
- t.__H.__h = [], j.__e(e, t.__v);
388
+ t.__H.__h = [], S.__e(e, t.__v);
389
389
  }
390
390
  }
391
- j.__b = function(t) {
392
- S = null, Hn && Hn(t);
393
- }, j.__ = function(t, e) {
391
+ S.__b = function(t) {
392
+ j = null, Hn && Hn(t);
393
+ }, S.__ = function(t, e) {
394
394
  t && e.__k && e.__k.__m && (t.__m = e.__k.__m), Zn && Zn(t, e);
395
- }, j.__r = function(t) {
395
+ }, S.__r = function(t) {
396
396
  Wn && Wn(t), ce = 0;
397
- var e = (S = t.__c).__H;
398
- e && (Nt === S ? (e.__h = [], S.__h = [], e.__.forEach(function(n) {
397
+ var e = (j = t.__c).__H;
398
+ e && (Nt === j ? (e.__h = [], j.__h = [], e.__.forEach(function(n) {
399
399
  n.__N && (n.__ = n.__N), n.u = n.__N = void 0;
400
- })) : (e.__h.forEach(gt), e.__h.forEach(en), e.__h = [], ce = 0)), Nt = S;
401
- }, j.diffed = function(t) {
400
+ })) : (e.__h.forEach(gt), e.__h.forEach(en), e.__h = [], ce = 0)), Nt = j;
401
+ }, S.diffed = function(t) {
402
402
  Jn && Jn(t);
403
403
  var e = t.__c;
404
- e && e.__H && (e.__H.__h.length && (ri.push(e) !== 1 && Vn === j.requestAnimationFrame || ((Vn = j.requestAnimationFrame) || jo)(So)), e.__H.__.forEach(function(n) {
404
+ e && e.__H && (e.__H.__h.length && (ri.push(e) !== 1 && Vn === S.requestAnimationFrame || ((Vn = S.requestAnimationFrame) || So)(jo)), e.__H.__.forEach(function(n) {
405
405
  n.u && (n.__H = n.u), n.u = void 0;
406
- })), Nt = S = null;
407
- }, j.__c = function(t, e) {
406
+ })), Nt = j = null;
407
+ }, S.__c = function(t, e) {
408
408
  e.some(function(n) {
409
409
  try {
410
410
  n.__h.forEach(gt), n.__h = n.__h.filter(function(r) {
@@ -413,10 +413,10 @@ j.__b = function(t) {
413
413
  } catch (r) {
414
414
  e.some(function(i) {
415
415
  i.__h && (i.__h = []);
416
- }), e = [], j.__e(r, n.__v);
416
+ }), e = [], S.__e(r, n.__v);
417
417
  }
418
418
  }), Gn && Gn(t, e);
419
- }, j.unmount = function(t) {
419
+ }, S.unmount = function(t) {
420
420
  Kn && Kn(t);
421
421
  var e, n = t.__c;
422
422
  n && n.__H && (n.__H.__.forEach(function(r) {
@@ -425,22 +425,22 @@ j.__b = function(t) {
425
425
  } catch (i) {
426
426
  e = i;
427
427
  }
428
- }), n.__H = void 0, e && j.__e(e, n.__v));
428
+ }), n.__H = void 0, e && S.__e(e, n.__v));
429
429
  };
430
430
  var Yn = typeof requestAnimationFrame == "function";
431
- function jo(t) {
431
+ function So(t) {
432
432
  var e, n = function() {
433
433
  clearTimeout(r), Yn && cancelAnimationFrame(e), setTimeout(t);
434
434
  }, r = setTimeout(n, 35);
435
435
  Yn && (e = requestAnimationFrame(n));
436
436
  }
437
437
  function gt(t) {
438
- var e = S, n = t.__c;
439
- typeof n == "function" && (t.__c = void 0, n()), S = e;
438
+ var e = j, n = t.__c;
439
+ typeof n == "function" && (t.__c = void 0, n()), j = e;
440
440
  }
441
441
  function en(t) {
442
- var e = S;
443
- t.__c = t.__(), S = e;
442
+ var e = j;
443
+ t.__c = t.__(), j = e;
444
444
  }
445
445
  function kn(t, e) {
446
446
  return !t || t.length !== e.length || e.some(function(n, r) {
@@ -629,7 +629,7 @@ function Po(t) {
629
629
  }
630
630
  ge(V(Io, { context: e.context }, t.__v), e.v);
631
631
  }
632
- function Mo(t, e) {
632
+ function Lo(t, e) {
633
633
  var n = V(Po, { __v: t, h: e });
634
634
  return n.containerInfo = e, n;
635
635
  }
@@ -653,7 +653,7 @@ function Mo(t, e) {
653
653
  nr(t, n, e);
654
654
  });
655
655
  };
656
- var xi = typeof Symbol < "u" && Symbol.for && /* @__PURE__ */ Symbol.for("react.element") || 60103, Lo = /^(?:accent|alignment|arabic|baseline|cap|clip(?!PathU)|color|dominant|fill|flood|font|glyph(?!R)|horiz|image(!S)|letter|lighting|marker(?!H|W|U)|overline|paint|pointer|shape|stop|strikethrough|stroke|text(?!L)|transform|underline|unicode|units|v|vector|vert|word|writing|x(?!C))[A-Z]/, qo = /^on(Ani|Tra|Tou|BeforeInp|Compo)/, Oo = /[A-Z0-9]/g, No = typeof document < "u", zo = function(t) {
656
+ var xi = typeof Symbol < "u" && Symbol.for && /* @__PURE__ */ Symbol.for("react.element") || 60103, Mo = /^(?:accent|alignment|arabic|baseline|cap|clip(?!PathU)|color|dominant|fill|flood|font|glyph(?!R)|horiz|image(!S)|letter|lighting|marker(?!H|W|U)|overline|paint|pointer|shape|stop|strikethrough|stroke|text(?!L)|transform|underline|unicode|units|v|vector|vert|word|writing|x(?!C))[A-Z]/, qo = /^on(Ani|Tra|Tou|BeforeInp|Compo)/, Oo = /[A-Z0-9]/g, No = typeof document < "u", zo = function(t) {
657
657
  return (typeof Symbol < "u" && typeof /* @__PURE__ */ Symbol() == "symbol" ? /fil|che|rad/ : /fil|che|ra/).test(t);
658
658
  };
659
659
  function Bo(t, e, n) {
@@ -681,7 +681,7 @@ function Do() {
681
681
  b.event = function(t) {
682
682
  return rr && (t = rr(t)), t.persist = Uo, t.isPropagationStopped = Qo, t.isDefaultPrevented = Do, t.nativeEvent = t;
683
683
  };
684
- var Sn, Vo = { enumerable: !1, configurable: !0, get: function() {
684
+ var jn, Vo = { enumerable: !1, configurable: !0, get: function() {
685
685
  return this.class;
686
686
  } }, ir = b.vnode;
687
687
  b.vnode = function(t) {
@@ -691,7 +691,7 @@ b.vnode = function(t) {
691
691
  var l = n[s];
692
692
  if (!(s === "value" && "defaultValue" in n && l == null || No && s === "children" && r === "noscript" || s === "class" || s === "className")) {
693
693
  var a = s.toLowerCase();
694
- s === "defaultValue" && "value" in n && n.value == null ? s = "value" : s === "download" && l === !0 ? l = "" : a === "translate" && l === "no" ? l = !1 : a[0] === "o" && a[1] === "n" ? a === "ondoubleclick" ? s = "ondblclick" : a !== "onchange" || r !== "input" && r !== "textarea" || zo(n.type) ? a === "onfocus" ? s = "onfocusin" : a === "onblur" ? s = "onfocusout" : qo.test(s) && (s = a) : a = s = "oninput" : o && Lo.test(s) ? s = s.replace(Oo, "-$&").toLowerCase() : l === null && (l = void 0), a === "oninput" && i[s = a] && (s = "oninputCapture"), i[s] = l;
694
+ s === "defaultValue" && "value" in n && n.value == null ? s = "value" : s === "download" && l === !0 ? l = "" : a === "translate" && l === "no" ? l = !1 : a[0] === "o" && a[1] === "n" ? a === "ondoubleclick" ? s = "ondblclick" : a !== "onchange" || r !== "input" && r !== "textarea" || zo(n.type) ? a === "onfocus" ? s = "onfocusin" : a === "onblur" ? s = "onfocusout" : qo.test(s) && (s = a) : a = s = "oninput" : o && Mo.test(s) ? s = s.replace(Oo, "-$&").toLowerCase() : l === null && (l = void 0), a === "oninput" && i[s = a] && (s = "oninputCapture"), i[s] = l;
695
695
  }
696
696
  }
697
697
  r == "select" && i.multiple && Array.isArray(i.value) && (i.value = ne(n.children).forEach(function(u) {
@@ -703,16 +703,16 @@ b.vnode = function(t) {
703
703
  };
704
704
  var or = b.__r;
705
705
  b.__r = function(t) {
706
- or && or(t), Sn = t.__c;
706
+ or && or(t), jn = t.__c;
707
707
  };
708
708
  var sr = b.diffed;
709
709
  b.diffed = function(t) {
710
710
  sr && sr(t);
711
711
  var e = t.props, n = t.__e;
712
- n != null && t.type === "textarea" && "value" in e && e.value !== n.value && (n.value = e.value == null ? "" : e.value), Sn = null;
712
+ n != null && t.type === "textarea" && "value" in e && e.value !== n.value && (n.value = e.value == null ? "" : e.value), jn = null;
713
713
  };
714
714
  var Ho = { ReactCurrentDispatcher: { current: { readContext: function(t) {
715
- return Sn.__n[t.__c].props.value;
715
+ return jn.__n[t.__c].props.value;
716
716
  }, useCallback: Re, useContext: $t, useDebugValue: oi, useDeferredValue: hi, useEffect: T, useId: si, useImperativeHandle: ii, useInsertionEffect: fi, useLayoutEffect: st, useMemo: K, useReducer: wn, useRef: ue, useState: C, useSyncExternalStore: ci, useTransition: di } } };
717
717
  function Wo(t) {
718
718
  return V.bind(null, t);
@@ -739,7 +739,7 @@ var Xo = function(t, e) {
739
739
  return t(e);
740
740
  }, es = function(t, e) {
741
741
  return t(e);
742
- }, ts = F, ns = Et, jn = { useState: C, useId: si, useReducer: wn, useEffect: T, useLayoutEffect: st, useInsertionEffect: fi, useTransition: di, useDeferredValue: hi, useSyncExternalStore: ci, startTransition: ui, useRef: ue, useImperativeHandle: ii, useMemo: K, useCallback: Re, useContext: $t, useDebugValue: oi, version: "18.3.1", Children: Ao, render: Bo, hydrate: Fo, unmountComponentAtNode: Zo, createPortal: Mo, createElement: V, createContext: wo, createFactory: Wo, cloneElement: Ko, createRef: mo, Fragment: F, isValidElement: Et, isElement: ns, isFragment: Jo, isMemo: Go, findDOMNode: Yo, Component: G, PureComponent: nn, memo: Co, forwardRef: Ro, flushSync: es, unstable_batchedUpdates: Xo, StrictMode: ts, Suspense: mt, SuspenseList: Qe, lazy: Eo, __SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED: Ho }, ee = [], D = [], rs = Uint8Array, Bt = "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/";
742
+ }, ts = F, ns = Et, Sn = { useState: C, useId: si, useReducer: wn, useEffect: T, useLayoutEffect: st, useInsertionEffect: fi, useTransition: di, useDeferredValue: hi, useSyncExternalStore: ci, startTransition: ui, useRef: ue, useImperativeHandle: ii, useMemo: K, useCallback: Re, useContext: $t, useDebugValue: oi, version: "18.3.1", Children: Ao, render: Bo, hydrate: Fo, unmountComponentAtNode: Zo, createPortal: Lo, createElement: V, createContext: wo, createFactory: Wo, cloneElement: Ko, createRef: mo, Fragment: F, isValidElement: Et, isElement: ns, isFragment: Jo, isMemo: Go, findDOMNode: Yo, Component: G, PureComponent: nn, memo: Co, forwardRef: Ro, flushSync: es, unstable_batchedUpdates: Xo, StrictMode: ts, Suspense: mt, SuspenseList: Qe, lazy: Eo, __SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED: Ho }, ee = [], D = [], rs = Uint8Array, Bt = "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/";
743
743
  for (var we = 0, is = Bt.length; we < is; ++we)
744
744
  ee[we] = Bt[we], D[Bt.charCodeAt(we)] = we;
745
745
  D[45] = 62;
@@ -1027,7 +1027,7 @@ function ki(t) {
1027
1027
  return "?";
1028
1028
  }
1029
1029
  }
1030
- class Si {
1030
+ class ji {
1031
1031
  constructor(e) {
1032
1032
  dr(this, "_onLogLineFuncs"), dr(this, "_verbose"), this._onLogLineFuncs = {}, this._verbose = e.verbose;
1033
1033
  }
@@ -1057,8 +1057,8 @@ class Si {
1057
1057
  n("error", ...e);
1058
1058
  }
1059
1059
  }
1060
- function ji(t) {
1061
- const e = new Si(t);
1060
+ function Si(t) {
1061
+ const e = new ji(t);
1062
1062
  return e.addLogLineListener((n, ...r) => {
1063
1063
  switch (n) {
1064
1064
  case "debug":
@@ -1079,7 +1079,7 @@ function ji(t) {
1079
1079
  }), e;
1080
1080
  }
1081
1081
  function Ci(t) {
1082
- return new Si(t);
1082
+ return new ji(t);
1083
1083
  }
1084
1084
  function vt(t, e, n, r, i) {
1085
1085
  const o = ki(n);
@@ -1096,7 +1096,7 @@ function vt(t, e, n, r, i) {
1096
1096
  } else
1097
1097
  t.error(`[CONVEX ${o}(${r})] ${i}`);
1098
1098
  }
1099
- function Ss(t, e) {
1099
+ function js(t, e) {
1100
1100
  const n = `[CONVEX FATAL ERROR] ${e}`;
1101
1101
  return t.error(n), new Error(n);
1102
1102
  }
@@ -1127,7 +1127,7 @@ function fr(t, e, n) {
1127
1127
  options: re({ initialNumItems: r, id: i })
1128
1128
  });
1129
1129
  }
1130
- var js = Object.defineProperty, Cs = (t, e, n) => e in t ? js(t, e, { enumerable: !0, configurable: !0, writable: !0, value: n }) : t[e] = n, Y = (t, e, n) => Cs(t, typeof e != "symbol" ? e + "" : e, n);
1130
+ var Ss = Object.defineProperty, Cs = (t, e, n) => e in t ? Ss(t, e, { enumerable: !0, configurable: !0, writable: !0, value: n }) : t[e] = n, Y = (t, e, n) => Cs(t, typeof e != "symbol" ? e + "" : e, n);
1131
1131
  class Ts {
1132
1132
  constructor() {
1133
1133
  Y(this, "nextQueryId"), Y(this, "querySetVersion"), Y(this, "querySet"), Y(this, "queryIdToToken"), Y(this, "identityVersion"), Y(this, "auth"), Y(this, "outstandingQueriesOlderThanRestart"), Y(this, "outstandingAuthOlderThanRestart"), Y(this, "paused"), Y(this, "pendingQuerySetModifications"), this.nextQueryId = 0, this.querySetVersion = 0, this.identityVersion = 0, this.querySet = /* @__PURE__ */ new Map(), this.queryIdToToken = /* @__PURE__ */ new Map(), this.outstandingQueriesOlderThanRestart = /* @__PURE__ */ new Set(), this.outstandingAuthOlderThanRestart = !1, this.paused = !1, this.pendingQuerySetModifications = /* @__PURE__ */ new Map();
@@ -1477,7 +1477,7 @@ function Is(t) {
1477
1477
  function Ps(t) {
1478
1478
  return t.startsWith("function://");
1479
1479
  }
1480
- function Ms(t) {
1480
+ function Ls(t) {
1481
1481
  let e;
1482
1482
  if (typeof t == "string")
1483
1483
  Ps(t) ? e = { functionHandle: t } : e = { name: t };
@@ -1492,7 +1492,7 @@ function Ms(t) {
1492
1492
  return e;
1493
1493
  }
1494
1494
  function O(t) {
1495
- const e = Ms(t);
1495
+ const e = Ls(t);
1496
1496
  if (e.name === void 0)
1497
1497
  throw e.functionHandle !== void 0 ? new Error(
1498
1498
  `Expected function reference like "api.file.func" or "internal.file.func", but received function handle ${e.functionHandle}`
@@ -1531,7 +1531,7 @@ function Ri(t = []) {
1531
1531
  return new Proxy({}, e);
1532
1532
  }
1533
1533
  Ri();
1534
- var Ls = Object.defineProperty, qs = (t, e, n) => e in t ? Ls(t, e, { enumerable: !0, configurable: !0, writable: !0, value: n }) : t[e] = n, _t = (t, e, n) => qs(t, typeof e != "symbol" ? e + "" : e, n);
1534
+ var Ms = Object.defineProperty, qs = (t, e, n) => e in t ? Ms(t, e, { enumerable: !0, configurable: !0, writable: !0, value: n }) : t[e] = n, _t = (t, e, n) => qs(t, typeof e != "symbol" ? e + "" : e, n);
1535
1535
  class tt {
1536
1536
  constructor(e) {
1537
1537
  _t(this, "queryResults"), _t(this, "modifiedQueries"), this.queryResults = e, this.modifiedQueries = [];
@@ -1802,11 +1802,11 @@ function Vs(t) {
1802
1802
  var Hs = Object.defineProperty, Ws = (t, e, n) => e in t ? Hs(t, e, { enumerable: !0, configurable: !0, writable: !0, value: n }) : t[e] = n, $ = (t, e, n) => Ws(t, typeof e != "symbol" ? e + "" : e, n);
1803
1803
  const Js = 1e3, Gs = 1001, Ks = 1005, Zs = 4040;
1804
1804
  let xt;
1805
- function Se() {
1805
+ function je() {
1806
1806
  return xt === void 0 && (xt = Date.now()), typeof performance > "u" || !performance.now ? Date.now() : Math.round(xt + performance.now());
1807
1807
  }
1808
1808
  function br() {
1809
- return `t=${Math.round((Se() - xt) / 100) / 10}s`;
1809
+ return `t=${Math.round((je() - xt) / 100) / 10}s`;
1810
1810
  }
1811
1811
  const Ai = {
1812
1812
  // A known error, e.g. during a restart or push
@@ -1901,7 +1901,7 @@ class Xs {
1901
1901
  }), this.resetServerInactivityTimeout(), this.socket.paused === "no" && (this._hasEverConnected = !0, this.onOpen({
1902
1902
  connectionCount: this.connectionCount,
1903
1903
  lastCloseReason: this.lastCloseReason,
1904
- clientTs: Se()
1904
+ clientTs: je()
1905
1905
  })), this.lastCloseReason !== "InitialConnect" && (this.lastCloseReason ? this.logger.log(
1906
1906
  "WebSocket reconnected at",
1907
1907
  br(),
@@ -1999,7 +1999,7 @@ class Xs {
1999
1999
  this.scheduledReconnect && (clearTimeout(this.scheduledReconnect.timeout), this.scheduledReconnect = null), this.socket = { state: "disconnected" };
2000
2000
  const n = this.nextBackoff(e);
2001
2001
  this.markConnectionStateDirty(), this.logger.log(`Attempting reconnect in ${Math.round(n)}ms`);
2002
- const r = Se(), i = setTimeout(() => {
2002
+ const r = je(), i = setTimeout(() => {
2003
2003
  this.scheduledReconnect?.timeout === i && (this.scheduledReconnect = null, this.connect());
2004
2004
  }, n);
2005
2005
  this.scheduledReconnect = {
@@ -2156,7 +2156,7 @@ class Xs {
2156
2156
  }
2157
2157
  let e = null;
2158
2158
  if (this.scheduledReconnect) {
2159
- const n = Se() - this.scheduledReconnect.scheduledAt;
2159
+ const n = je() - this.scheduledReconnect.scheduledAt;
2160
2160
  e = Math.max(0, this.scheduledReconnect.backoffMs - n), this._logVerbose(
2161
2161
  `would have waited ${Math.round(e)}ms more (backoff was ${Math.round(this.scheduledReconnect.backoffMs)}ms, elapsed ${Math.round(n)}ms)`
2162
2162
  ), clearTimeout(this.scheduledReconnect.timeout), this.scheduledReconnect = null, this._logVerbose("canceled scheduled reconnect");
@@ -2175,7 +2175,7 @@ class Xs {
2175
2175
  this.socket.paused === "uninitialized" ? (this.socket = { ...this.socket, paused: "no" }, this._hasEverConnected = !0, this.onOpen({
2176
2176
  connectionCount: this.connectionCount,
2177
2177
  lastCloseReason: this.lastCloseReason,
2178
- clientTs: Se()
2178
+ clientTs: je()
2179
2179
  })) : this.socket.paused === "yes" && (this.socket = { ...this.socket, paused: "no" }, this.onResume());
2180
2180
  return;
2181
2181
  case "terminated":
@@ -2210,7 +2210,7 @@ class Xs {
2210
2210
  }) {
2211
2211
  if (e.clientClockSkew === void 0 || e.serverTs === void 0)
2212
2212
  return;
2213
- const r = Se() - // client time now
2213
+ const r = je() - // client time now
2214
2214
  // clientClockSkew = (server time + upstream latency) - client time
2215
2215
  // clientClockSkew is "how many milliseconds behind (slow) is the client clock"
2216
2216
  // but the latency of the Connect message inflates this, making it appear further behind
@@ -2545,7 +2545,7 @@ class pa {
2545
2545
  throw new Error(
2546
2546
  "No WebSocket global variable defined! To use Convex in an environment without WebSocket try the HTTP client: https://docs.convex.dev/api/classes/browser.ConvexHttpClient"
2547
2547
  );
2548
- o = o || WebSocket, this.debug = r.reportDebugInfoToConvex ?? !1, this.address = e, this.logger = r.logger === !1 ? Ci({ verbose: r.verbose ?? !1 }) : r.logger !== !0 && r.logger ? r.logger : ji({ verbose: r.verbose ?? !1 });
2548
+ o = o || WebSocket, this.debug = r.reportDebugInfoToConvex ?? !1, this.address = e, this.logger = r.logger === !1 ? Ci({ verbose: r.verbose ?? !1 }) : r.logger !== !0 && r.logger ? r.logger : Si({ verbose: r.verbose ?? !1 });
2549
2549
  const s = e.search("://");
2550
2550
  if (s === -1)
2551
2551
  throw new Error("Provided address was not an absolute URL.");
@@ -2659,7 +2659,7 @@ class pa {
2659
2659
  break;
2660
2660
  }
2661
2661
  case "FatalError": {
2662
- const g = Ss(this.logger, p.error);
2662
+ const g = js(this.logger, p.error);
2663
2663
  throw this.webSocketManager.terminate(), g;
2664
2664
  }
2665
2665
  }
@@ -3408,11 +3408,11 @@ function ba({
3408
3408
  }
3409
3409
  var ya = Object.defineProperty, va = (t, e, n) => e in t ? ya(t, e, { enumerable: !0, configurable: !0, writable: !0, value: n }) : t[e] = n, ie = (t, e, n) => va(t, typeof e != "symbol" ? e + "" : e, n);
3410
3410
  const _a = 5e3;
3411
- if (typeof jn > "u")
3411
+ if (typeof Sn > "u")
3412
3412
  throw new Error("Required dependency 'react' not found");
3413
3413
  function Ei(t, e, n) {
3414
3414
  function r(i) {
3415
- return ja(i), e.mutation(t, i, {
3415
+ return Sa(i), e.mutation(t, i, {
3416
3416
  optimisticUpdate: n
3417
3417
  });
3418
3418
  }
@@ -3443,7 +3443,7 @@ class wa {
3443
3443
  );
3444
3444
  if (!e.includes("://"))
3445
3445
  throw new Error("Provided address was not an absolute URL.");
3446
- this.address = e, this.listeners = /* @__PURE__ */ new Map(), this._logger = n?.logger === !1 ? Ci({ verbose: n?.verbose ?? !1 }) : n?.logger !== !0 && n?.logger ? n.logger : ji({ verbose: n?.verbose ?? !1 }), this.options = { ...n, logger: this._logger };
3446
+ this.address = e, this.listeners = /* @__PURE__ */ new Map(), this._logger = n?.logger === !1 ? Ci({ verbose: n?.verbose ?? !1 }) : n?.logger !== !0 && n?.logger ? n.logger : Si({ verbose: n?.verbose ?? !1 }), this.options = { ...n, logger: this._logger };
3447
3447
  }
3448
3448
  /**
3449
3449
  * Return the address for this client, useful for creating a new client.
@@ -3730,14 +3730,14 @@ class wa {
3730
3730
  }
3731
3731
  }
3732
3732
  }
3733
- const Tn = jn.createContext(
3733
+ const Tn = Sn.createContext(
3734
3734
  void 0
3735
3735
  // in the future this will be a mocked client for testing
3736
3736
  );
3737
3737
  function ka() {
3738
3738
  return $t(Tn);
3739
3739
  }
3740
- const Sa = ({ client: t, children: e }) => jn.createElement(
3740
+ const ja = ({ client: t, children: e }) => Sn.createElement(
3741
3741
  Tn.Provider,
3742
3742
  { value: t },
3743
3743
  e
@@ -3766,7 +3766,7 @@ function It(t) {
3766
3766
  [n, O(e)]
3767
3767
  );
3768
3768
  }
3769
- function ja(t) {
3769
+ function Sa(t) {
3770
3770
  if (typeof t == "object" && t !== null && "bubbles" in t && "persist" in t && "isDefaultPrevented" in t)
3771
3771
  throw new Error(
3772
3772
  "Convex function called with SyntheticEvent object. Did you use a Convex function as an event handler directly? Event handlers like onClick receive an event object as their first argument. These SyntheticEvent objects are not valid Convex values. Try wrapping the function like `const handler = () => myMutation();` and using `handler` in the event handler."
@@ -3907,7 +3907,7 @@ function Pt() {
3907
3907
  var n = Ge;
3908
3908
  for (Ge = void 0, an++; n !== void 0; ) {
3909
3909
  var r = n.o;
3910
- if (n.o = void 0, n.f &= -3, !(8 & n.f) && Mi(n)) try {
3910
+ if (n.o = void 0, n.f &= -3, !(8 & n.f) && Li(n)) try {
3911
3911
  n.c();
3912
3912
  } catch (i) {
3913
3913
  e || (t = i, e = !0);
@@ -3947,21 +3947,21 @@ function Pi(t) {
3947
3947
  return e.i = 0, e.n !== void 0 && (e.n.p = e.p, e.p !== void 0 && (e.p.n = e.n), e.p = w.s, e.n = void 0, w.s.n = e, w.s = e), e;
3948
3948
  }
3949
3949
  }
3950
- function M(t, e) {
3950
+ function L(t, e) {
3951
3951
  this.v = t, this.i = 0, this.n = void 0, this.t = void 0, this.W = e?.watched, this.Z = e?.unwatched, this.name = e?.name;
3952
3952
  }
3953
- M.prototype.brand = Ea;
3954
- M.prototype.h = function() {
3953
+ L.prototype.brand = Ea;
3954
+ L.prototype.h = function() {
3955
3955
  return !0;
3956
3956
  };
3957
- M.prototype.S = function(t) {
3957
+ L.prototype.S = function(t) {
3958
3958
  var e = this, n = this.t;
3959
3959
  n !== t && t.e === void 0 && (t.x = n, this.t = t, n !== void 0 ? n.e = t : Ii(function() {
3960
3960
  var r;
3961
3961
  (r = e.W) == null || r.call(e);
3962
3962
  }));
3963
3963
  };
3964
- M.prototype.U = function(t) {
3964
+ L.prototype.U = function(t) {
3965
3965
  var e = this;
3966
3966
  if (this.t !== void 0) {
3967
3967
  var n = t.e, r = t.x;
@@ -3971,7 +3971,7 @@ M.prototype.U = function(t) {
3971
3971
  }));
3972
3972
  }
3973
3973
  };
3974
- M.prototype.subscribe = function(t) {
3974
+ L.prototype.subscribe = function(t) {
3975
3975
  var e = this;
3976
3976
  return at(function() {
3977
3977
  var n = e.value, r = w;
@@ -3983,16 +3983,16 @@ M.prototype.subscribe = function(t) {
3983
3983
  }
3984
3984
  }, { name: "sub" });
3985
3985
  };
3986
- M.prototype.valueOf = function() {
3986
+ L.prototype.valueOf = function() {
3987
3987
  return this.value;
3988
3988
  };
3989
- M.prototype.toString = function() {
3989
+ L.prototype.toString = function() {
3990
3990
  return this.value + "";
3991
3991
  };
3992
- M.prototype.toJSON = function() {
3992
+ L.prototype.toJSON = function() {
3993
3993
  return this.value;
3994
3994
  };
3995
- M.prototype.peek = function() {
3995
+ L.prototype.peek = function() {
3996
3996
  var t = w;
3997
3997
  w = void 0;
3998
3998
  try {
@@ -4001,7 +4001,7 @@ M.prototype.peek = function() {
4001
4001
  w = t;
4002
4002
  }
4003
4003
  };
4004
- Object.defineProperty(M.prototype, "value", { get: function() {
4004
+ Object.defineProperty(L.prototype, "value", { get: function() {
4005
4005
  var t = Pi(this);
4006
4006
  return t !== void 0 && (t.i = this.i), this.v;
4007
4007
  }, set: function(t) {
@@ -4015,14 +4015,14 @@ Object.defineProperty(M.prototype, "value", { get: function() {
4015
4015
  }
4016
4016
  }
4017
4017
  } });
4018
- function R(t, e) {
4019
- return new M(t, e);
4018
+ function A(t, e) {
4019
+ return new L(t, e);
4020
4020
  }
4021
- function Mi(t) {
4021
+ function Li(t) {
4022
4022
  for (var e = t.s; e !== void 0; e = e.n) if (e.S.i !== e.i || !e.S.h() || e.S.i !== e.i) return !0;
4023
4023
  return !1;
4024
4024
  }
4025
- function Li(t) {
4025
+ function Mi(t) {
4026
4026
  for (var e = t.s; e !== void 0; e = e.n) {
4027
4027
  var n = e.S.n;
4028
4028
  if (n !== void 0 && (e.r = n), e.S.n = e, e.i = -1, e.n === void 0) {
@@ -4039,17 +4039,17 @@ function qi(t) {
4039
4039
  t.s = n;
4040
4040
  }
4041
4041
  function ye(t, e) {
4042
- M.call(this, void 0), this.x = t, this.s = void 0, this.g = wt - 1, this.f = 4, this.W = e?.watched, this.Z = e?.unwatched, this.name = e?.name;
4042
+ L.call(this, void 0), this.x = t, this.s = void 0, this.g = wt - 1, this.f = 4, this.W = e?.watched, this.Z = e?.unwatched, this.name = e?.name;
4043
4043
  }
4044
- ye.prototype = new M();
4044
+ ye.prototype = new L();
4045
4045
  ye.prototype.h = function() {
4046
4046
  if (this.f &= -3, 1 & this.f) return !1;
4047
4047
  if ((36 & this.f) == 32 || (this.f &= -5, this.g === wt)) return !0;
4048
- if (this.g = wt, this.f |= 1, this.i > 0 && !Mi(this))
4048
+ if (this.g = wt, this.f |= 1, this.i > 0 && !Li(this))
4049
4049
  return this.f &= -2, !0;
4050
4050
  var t = w;
4051
4051
  try {
4052
- Li(this), w = this;
4052
+ Mi(this), w = this;
4053
4053
  var e = this.x();
4054
4054
  (16 & this.f || this.v !== e || this.i === 0) && (this.v = e, this.f &= -17, this.i++);
4055
4055
  } catch (n) {
@@ -4062,10 +4062,10 @@ ye.prototype.S = function(t) {
4062
4062
  this.f |= 36;
4063
4063
  for (var e = this.s; e !== void 0; e = e.n) e.S.S(e);
4064
4064
  }
4065
- M.prototype.S.call(this, t);
4065
+ L.prototype.S.call(this, t);
4066
4066
  };
4067
4067
  ye.prototype.U = function(t) {
4068
- if (this.t !== void 0 && (M.prototype.U.call(this, t), this.t === void 0)) {
4068
+ if (this.t !== void 0 && (L.prototype.U.call(this, t), this.t === void 0)) {
4069
4069
  this.f &= -33;
4070
4070
  for (var e = this.s; e !== void 0; e = e.n) e.S.U(e);
4071
4071
  }
@@ -4123,7 +4123,7 @@ qe.prototype.c = function() {
4123
4123
  };
4124
4124
  qe.prototype.S = function() {
4125
4125
  if (1 & this.f) throw new Error("Cycle detected");
4126
- this.f |= 1, this.f &= -9, Oi(this), Li(this), ae++;
4126
+ this.f |= 1, this.f &= -9, Oi(this), Mi(this), ae++;
4127
4127
  var t = w;
4128
4128
  return w = this, Pa.bind(this, t);
4129
4129
  };
@@ -4146,7 +4146,7 @@ function at(t, e) {
4146
4146
  var r = n.d.bind(n);
4147
4147
  return r[Symbol.dispose] = r, r;
4148
4148
  }
4149
- var Ni, ft, Ma = typeof window < "u" && !!window.__PREACT_SIGNALS_DEVTOOLS__, zi = [];
4149
+ var Ni, ft, La = typeof window < "u" && !!window.__PREACT_SIGNALS_DEVTOOLS__, zi = [];
4150
4150
  at(function() {
4151
4151
  Ni = this.N;
4152
4152
  })();
@@ -4187,7 +4187,7 @@ function Bi(t) {
4187
4187
  return o.value ? s.peek() : s.value;
4188
4188
  }
4189
4189
  Bi.displayName = "ReactiveTextNode";
4190
- Object.defineProperties(M.prototype, { constructor: { configurable: !0, value: void 0 }, type: { configurable: !0, value: Bi }, props: { configurable: !0, get: function() {
4190
+ Object.defineProperties(L.prototype, { constructor: { configurable: !0, value: void 0 }, type: { configurable: !0, value: Bi }, props: { configurable: !0, get: function() {
4191
4191
  return { data: this };
4192
4192
  } }, __b: { configurable: !0, value: 1 } });
4193
4193
  Oe("__b", function(t, e) {
@@ -4195,7 +4195,7 @@ Oe("__b", function(t, e) {
4195
4195
  var n, r = e.props;
4196
4196
  for (var i in r) if (i !== "children") {
4197
4197
  var o = r[i];
4198
- o instanceof M && (n || (e.__np = n = {}), n[i] = o, r[i] = o.peek());
4198
+ o instanceof L && (n || (e.__np = n = {}), n[i] = o, r[i] = o.peek());
4199
4199
  }
4200
4200
  }
4201
4201
  t(e);
@@ -4211,7 +4211,7 @@ Oe("__r", function(t, e) {
4211
4211
  }, { name: o }), s.c = i, s;
4212
4212
  })(function() {
4213
4213
  var i;
4214
- Ma && ((i = n.y) == null || i.call(n)), r.__$f |= 1, r.setState({});
4214
+ La && ((i = n.y) == null || i.call(n)), r.__$f |= 1, r.setState({});
4215
4215
  }, typeof e.type == "function" ? e.type.displayName || e.type.name : ""))), kt(n);
4216
4216
  }
4217
4217
  });
@@ -4233,14 +4233,14 @@ Oe("diffed", function(t, e) {
4233
4233
  o = {}, n.U = o;
4234
4234
  for (var a in r) {
4235
4235
  var u = o[a], d = r[a];
4236
- u === void 0 ? (u = La(n, a, d, i), o[a] = u) : u.o(d, i);
4236
+ u === void 0 ? (u = Ma(n, a, d, i), o[a] = u) : u.o(d, i);
4237
4237
  }
4238
4238
  }
4239
4239
  }
4240
4240
  t(e);
4241
4241
  });
4242
- function La(t, e, n, r) {
4243
- var i = e in t && t.ownerSVGElement === void 0, o = R(n);
4242
+ function Ma(t, e, n, r) {
4243
+ var i = e in t && t.ownerSVGElement === void 0, o = A(n);
4244
4244
  return { o: function(s, l) {
4245
4245
  o.value = s, r = l;
4246
4246
  }, d: at(function() {
@@ -4288,7 +4288,7 @@ G.prototype.shouldComponentUpdate = function(t, e) {
4288
4288
  };
4289
4289
  function Te(t, e) {
4290
4290
  return K(function() {
4291
- return R(t, e);
4291
+ return A(t, e);
4292
4292
  }, []);
4293
4293
  }
4294
4294
  var qa = function(t) {
@@ -4304,7 +4304,7 @@ function Oa() {
4304
4304
  function Fi() {
4305
4305
  zi.push(this) === 1 && (b.requestAnimationFrame || qa)(Oa);
4306
4306
  }
4307
- const P = R(!1), St = R(void 0), le = R(void 0), cn = R([]), un = R([]), Ui = R(null);
4307
+ const P = A(!1), jt = A(void 0), le = A(void 0), cn = A([]), un = A([]), Ui = A(null);
4308
4308
  function Na(t) {
4309
4309
  return t.replace(/\.convex\.site\b/, ".convex.cloud");
4310
4310
  }
@@ -4430,7 +4430,7 @@ function Qa({
4430
4430
  };
4431
4431
  }, [t, e, n, r]);
4432
4432
  }
4433
- const jt = /* @__PURE__ */ new Set();
4433
+ const St = /* @__PURE__ */ new Set();
4434
4434
  let kr = !1;
4435
4435
  function Da() {
4436
4436
  if (kr)
@@ -4438,14 +4438,14 @@ function Da() {
4438
4438
  kr = !0;
4439
4439
  const t = history.pushState.bind(history), e = history.replaceState.bind(history);
4440
4440
  history.pushState = function(...n) {
4441
- t(...n), jt.forEach((r) => r());
4441
+ t(...n), St.forEach((r) => r());
4442
4442
  }, history.replaceState = function(...n) {
4443
- e(...n), jt.forEach((r) => r());
4443
+ e(...n), St.forEach((r) => r());
4444
4444
  };
4445
4445
  }
4446
4446
  function Va(t) {
4447
- return jt.add(t), window.addEventListener("popstate", t), Da(), () => {
4448
- jt.delete(t), window.removeEventListener("popstate", t);
4447
+ return St.add(t), window.addEventListener("popstate", t), Da(), () => {
4448
+ St.delete(t), window.removeEventListener("popstate", t);
4449
4449
  };
4450
4450
  }
4451
4451
  function Ha() {
@@ -4509,7 +4509,8 @@ const Vi = {
4509
4509
  escalationSubmit: "Send to team",
4510
4510
  escalationSubmitting: "Sending…",
4511
4511
  escalationSubmitted: "Request submitted",
4512
- escalationConsent: "We’ll only use your email to respond to this conversation.",
4512
+ escalationConsent: "By submitting, you agree to our",
4513
+ escalationPrivacyLinkText: "Privacy Policy",
4513
4514
  escalationSkip: "Skip, I’ll wait here",
4514
4515
  escalationPromptTitle: "Talk to our team",
4515
4516
  escalationPromptSubtitle: "We can notify you by email when our team replies.",
@@ -4545,7 +4546,9 @@ Use it to resume this conversation from any device.`,
4545
4546
  noticeAgentHandling: "Your conversation is with a human agent who will respond shortly.",
4546
4547
  replyTo: "Reply to {name}",
4547
4548
  sourcesCountOne: "{count} source",
4548
- sourcesCountOther: "{count} sources"
4549
+ sourcesCountOther: "{count} sources",
4550
+ privacyNoticePre: "By chatting, you agree to our",
4551
+ privacyPolicyLinkText: "Privacy Policy"
4549
4552
  }, Wa = {
4550
4553
  title: "Assistent",
4551
4554
  statusOnline: "Online · Antwortet in Sekunden",
@@ -4593,7 +4596,8 @@ Use it to resume this conversation from any device.`,
4593
4596
  escalationSubmit: "An Team senden",
4594
4597
  escalationSubmitting: "Wird gesendet…",
4595
4598
  escalationSubmitted: "Anfrage gesendet",
4596
- escalationConsent: "Wir verwenden Ihre E-Mail nur, um auf diese Unterhaltung zu antworten.",
4599
+ escalationConsent: "Mit dem Absenden stimmen Sie unserer",
4600
+ escalationPrivacyLinkText: "Datenschutzerklärung",
4597
4601
  escalationSkip: "Überspringen, ich warte hier",
4598
4602
  escalationPromptTitle: "Sprechen Sie mit unserem Team",
4599
4603
  escalationPromptSubtitle: "Wir benachrichtigen Sie per E-Mail, wenn wir antworten.",
@@ -4629,12 +4633,14 @@ Verwenden Sie sie, um diese Unterhaltung auf jedem Gerät fortzusetzen.`,
4629
4633
  noticeAgentHandling: "Ihre Unterhaltung wird von einem menschlichen Mitarbeiter betreut, der in Kürze antwortet.",
4630
4634
  replyTo: "Antworten an {name}",
4631
4635
  sourcesCountOne: "{count} Quelle",
4632
- sourcesCountOther: "{count} Quellen"
4636
+ sourcesCountOther: "{count} Quellen",
4637
+ privacyNoticePre: "Mit dem Chatten stimmst du unserer",
4638
+ privacyPolicyLinkText: "Datenschutzerklärung"
4633
4639
  }, Ja = [
4634
4640
  { value: "de", label: "Deutsch", flag: "🇩🇪" },
4635
4641
  { value: "en", label: "English", flag: "🇬🇧" }
4636
- ], Ga = "de", Ka = "jex-locale", An = R("de"), Za = { en: Vi, de: Wa };
4637
- function A() {
4642
+ ], Ga = "de", Ka = "jex-locale", An = A("de"), Za = { en: Vi, de: Wa };
4643
+ function R() {
4638
4644
  return Za[An.value] ?? Vi;
4639
4645
  }
4640
4646
  function Wt(t) {
@@ -4674,7 +4680,7 @@ function Ya(t) {
4674
4680
  };
4675
4681
  }, [t]);
4676
4682
  }
4677
- const Wi = "jex-session-history", Ji = Wi, Gi = 900 * 1e3, N = R([]), xe = R(null), Ki = ln(() => N.value.length > 0), Ke = R(null);
4683
+ const Wi = "jex-session-history", Ji = Wi, Gi = 3600 * 1e3, N = A([]), xe = A(null), Ki = ln(() => N.value.length > 0), Ke = A(null);
4678
4684
  function Xa() {
4679
4685
  return "JEX-" + Math.random().toString(36).slice(2, 8).toUpperCase();
4680
4686
  }
@@ -4689,7 +4695,7 @@ function el(t) {
4689
4695
  return [];
4690
4696
  }
4691
4697
  }
4692
- function Mt(t) {
4698
+ function Lt(t) {
4693
4699
  try {
4694
4700
  const e = { v: 1, entries: t };
4695
4701
  sessionStorage.setItem(Ji, JSON.stringify(e));
@@ -4698,17 +4704,17 @@ function Mt(t) {
4698
4704
  }
4699
4705
  function tl() {
4700
4706
  const t = Date.now(), e = el(t);
4701
- N.value = e, Mt(e), xe.value = e.length > 0 ? e[e.length - 1].ref : null;
4707
+ N.value = e, Lt(e), xe.value = e[e.length - 1]?.ref ?? null;
4702
4708
  }
4703
- function Sr() {
4709
+ function jr() {
4704
4710
  const t = Xa(), e = Date.now(), n = [...N.value, { ref: t, startedAt: e, lastActivityAt: e }];
4705
- return N.value = n, xe.value = t, Mt(n), t;
4711
+ return N.value = n, xe.value = t, Lt(n), t;
4706
4712
  }
4707
- function jr(t) {
4713
+ function Sr(t) {
4708
4714
  const e = Date.now(), n = N.value.map(
4709
4715
  (r) => r.ref === t ? { ...r, lastActivityAt: e } : r
4710
4716
  );
4711
- N.value = n, xe.value = t, Mt(n);
4717
+ N.value = n, xe.value = t, Lt(n);
4712
4718
  }
4713
4719
  function $n(t) {
4714
4720
  if (!t)
@@ -4716,16 +4722,16 @@ function $n(t) {
4716
4722
  const e = Date.now(), n = N.value.map(
4717
4723
  (r) => r.ref === t ? { ...r, lastActivityAt: e } : r
4718
4724
  );
4719
- N.value = n, Mt(n);
4725
+ N.value = n, Lt(n);
4720
4726
  }
4721
- const z = R(Zi());
4727
+ const z = A(Zi());
4722
4728
  function Zi() {
4723
4729
  return Ki.value ? [{ id: "home" }] : [{ id: "chat" }];
4724
4730
  }
4725
4731
  function nl() {
4726
4732
  z.value = Zi();
4727
4733
  }
4728
- const rl = R("screen");
4734
+ const rl = A("screen");
4729
4735
  function pe(t) {
4730
4736
  z.value = [...z.value, t];
4731
4737
  }
@@ -4735,7 +4741,7 @@ function Ct() {
4735
4741
  function hn(t) {
4736
4742
  z.value = [...z.value.slice(0, -1), t];
4737
4743
  }
4738
- const il = 6e4, nt = R(!1), dn = R(!1), fn = /* @__PURE__ */ new Set();
4744
+ const il = 6e4, nt = A(!1), dn = A(!1), fn = /* @__PURE__ */ new Set();
4739
4745
  function ol(t) {
4740
4746
  return fn.add(t), () => {
4741
4747
  fn.delete(t);
@@ -4813,7 +4819,7 @@ function En({ size: t = 24 }) {
4813
4819
  ] });
4814
4820
  }
4815
4821
  function ul() {
4816
- const t = A();
4822
+ const t = R();
4817
4823
  return z.value.length > 1 ? /* @__PURE__ */ c(
4818
4824
  "button",
4819
4825
  {
@@ -4825,7 +4831,7 @@ function ul() {
4825
4831
  ) : /* @__PURE__ */ c(En, { size: 24 });
4826
4832
  }
4827
4833
  function hl({ title: t }) {
4828
- const e = A();
4834
+ const e = R();
4829
4835
  return /* @__PURE__ */ c("div", { class: "jex-header-info", children: [
4830
4836
  /* @__PURE__ */ c("h3", { children: t }),
4831
4837
  /* @__PURE__ */ c("p", { children: e.statusOnline })
@@ -4838,7 +4844,7 @@ function Yi({ size: t = 28 }) {
4838
4844
  ] });
4839
4845
  }
4840
4846
  function dl() {
4841
- const t = A();
4847
+ const t = R();
4842
4848
  return /* @__PURE__ */ c(
4843
4849
  "button",
4844
4850
  {
@@ -4919,7 +4925,7 @@ const ml = {
4919
4925
  full: "9999px"
4920
4926
  };
4921
4927
  function bl({ radius: t = "full", iconOption: e = "chat", label: n }) {
4922
- const r = A(), i = n ?? r.fabLabel, o = i !== "";
4928
+ const r = R(), i = n ?? r.fabLabel, o = i !== "";
4923
4929
  return /* @__PURE__ */ c(
4924
4930
  "button",
4925
4931
  {
@@ -4937,17 +4943,17 @@ function bl({ radius: t = "full", iconOption: e = "chat", label: n }) {
4937
4943
  );
4938
4944
  }
4939
4945
  function yl({ title: t, onStartFresh: e, onResetSession: n }) {
4940
- const r = A(), [i, o] = C("");
4946
+ const r = R(), [i, o] = C("");
4941
4947
  function s() {
4942
4948
  Jt(), Ke.value = "fresh", n(), e(), pe({ id: "chat" });
4943
4949
  }
4944
4950
  function l(u) {
4945
- Jt(), Ke.value = "resume", n(), jr(u), pe({ id: "chat" });
4951
+ Jt(), Ke.value = "resume", n(), Sr(u), pe({ id: "chat" });
4946
4952
  }
4947
4953
  function a(u) {
4948
4954
  u.preventDefault();
4949
4955
  const d = i.trim().toUpperCase();
4950
- d && (Jt(), Ke.value = "resume", n(), jr(d), pe({ id: "chat" }));
4956
+ d && (Jt(), Ke.value = "resume", n(), Sr(d), pe({ id: "chat" }));
4951
4957
  }
4952
4958
  return /* @__PURE__ */ c("div", { class: "jex-home", children: [
4953
4959
  nt.value && /* @__PURE__ */ c("div", { class: "jex-session-prompt", role: "status", children: /* @__PURE__ */ c("div", { class: "jex-session-prompt-text", children: r.sessionLocked }) }),
@@ -5008,7 +5014,7 @@ function yl({ title: t, onStartFresh: e, onResetSession: n }) {
5008
5014
  ] });
5009
5015
  }
5010
5016
  function vl({ title: t }) {
5011
- const e = A();
5017
+ const e = R();
5012
5018
  return /* @__PURE__ */ c("div", { class: "jex-selection", children: [
5013
5019
  /* @__PURE__ */ c("h2", { class: "jex-selection-title", children: e.howCanWeHelp }),
5014
5020
  /* @__PURE__ */ c("div", { class: "jex-selection-options", children: [
@@ -5060,13 +5066,13 @@ var kl = {
5060
5066
  "stroke-linecap": "round",
5061
5067
  "stroke-linejoin": "round"
5062
5068
  };
5063
- const Sl = (t) => {
5069
+ const jl = (t) => {
5064
5070
  for (const e in t)
5065
5071
  if (e.startsWith("aria-") || e === "role" || e === "title")
5066
5072
  return !0;
5067
5073
  return !1;
5068
5074
  };
5069
- const jl = ({
5075
+ const Sl = ({
5070
5076
  color: t = "currentColor",
5071
5077
  size: e = 24,
5072
5078
  strokeWidth: n = 2,
@@ -5084,14 +5090,14 @@ const jl = ({
5084
5090
  stroke: t,
5085
5091
  "stroke-width": r ? Number(n) * 24 / Number(e) : n,
5086
5092
  class: ["lucide", s].join(" "),
5087
- ...!i && !Sl(l) && { "aria-hidden": "true" },
5093
+ ...!i && !jl(l) && { "aria-hidden": "true" },
5088
5094
  ...l
5089
5095
  },
5090
5096
  [...o.map(([a, u]) => V(a, u)), ...ne(i)]
5091
5097
  );
5092
5098
  const Cl = (t, e) => {
5093
5099
  const n = ({ class: r = "", className: i = "", children: o, ...s }) => V(
5094
- jl,
5100
+ Sl,
5095
5101
  {
5096
5102
  ...s,
5097
5103
  iconNode: e,
@@ -5121,7 +5127,7 @@ var de = { exec: () => null };
5121
5127
  function _(t, e = "") {
5122
5128
  let n = typeof t == "string" ? t : t.source, r = { replace: (i, o) => {
5123
5129
  let s = typeof o == "string" ? o : o.source;
5124
- return s = s.replace(L.caret, "$1"), n = n.replace(i, s), r;
5130
+ return s = s.replace(M.caret, "$1"), n = n.replace(i, s), r;
5125
5131
  }, getRegex: () => new RegExp(n, e) };
5126
5132
  return r;
5127
5133
  }
@@ -5131,31 +5137,31 @@ var Rl = (() => {
5131
5137
  } catch {
5132
5138
  return !1;
5133
5139
  }
5134
- })(), L = { codeRemoveIndent: /^(?: {1,4}| {0,3}\t)/gm, outputLinkReplace: /\\([\[\]])/g, indentCodeCompensation: /^(\s+)(?:```)/, beginningSpace: /^\s+/, endingHash: /#$/, startingSpaceChar: /^ /, endingSpaceChar: / $/, nonSpaceChar: /[^ ]/, newLineCharGlobal: /\n/g, tabCharGlobal: /\t/g, multipleSpaceGlobal: /\s+/g, blankLine: /^[ \t]*$/, doubleBlankLine: /\n[ \t]*\n[ \t]*$/, blockquoteStart: /^ {0,3}>/, blockquoteSetextReplace: /\n {0,3}((?:=+|-+) *)(?=\n|$)/g, blockquoteSetextReplace2: /^ {0,3}>[ \t]?/gm, listReplaceNesting: /^ {1,4}(?=( {4})*[^ ])/g, listIsTask: /^\[[ xX]\] +\S/, listReplaceTask: /^\[[ xX]\] +/, listTaskCheckbox: /\[[ xX]\]/, anyLine: /\n.*\n/, hrefBrackets: /^<(.*)>$/, tableDelimiter: /[:|]/, tableAlignChars: /^\||\| *$/g, tableRowBlankLine: /\n[ \t]*$/, tableAlignRight: /^ *-+: *$/, tableAlignCenter: /^ *:-+: *$/, tableAlignLeft: /^ *:-+ *$/, startATag: /^<a /i, endATag: /^<\/a>/i, startPreScriptTag: /^<(pre|code|kbd|script)(\s|>)/i, endPreScriptTag: /^<\/(pre|code|kbd|script)(\s|>)/i, startAngleBracket: /^</, endAngleBracket: />$/, pedanticHrefTitle: /^([^'"]*[^\s])\s+(['"])(.*)\2/, unicodeAlphaNumeric: /[\p{L}\p{N}]/u, escapeTest: /[&<>"']/, escapeReplace: /[&<>"']/g, escapeTestNoEncode: /[<>"']|&(?!(#\d{1,7}|#[Xx][a-fA-F0-9]{1,6}|\w+);)/, escapeReplaceNoEncode: /[<>"']|&(?!(#\d{1,7}|#[Xx][a-fA-F0-9]{1,6}|\w+);)/g, caret: /(^|[^\[])\^/g, percentDecode: /%25/g, findPipe: /\|/g, splitPipe: / \|/, slashPipe: /\\\|/g, carriageReturn: /\r\n|\r/g, spaceLine: /^ +$/gm, notSpaceStart: /^\S*/, endingNewline: /\n$/, listItemRegex: (t) => new RegExp(`^( {0,3}${t})((?:[ ][^\\n]*)?(?:\\n|$))`), nextBulletRegex: (t) => new RegExp(`^ {0,${Math.min(3, t - 1)}}(?:[*+-]|\\d{1,9}[.)])((?:[ ][^\\n]*)?(?:\\n|$))`), hrRegex: (t) => new RegExp(`^ {0,${Math.min(3, t - 1)}}((?:- *){3,}|(?:_ *){3,}|(?:\\* *){3,})(?:\\n+|$)`), fencesBeginRegex: (t) => new RegExp(`^ {0,${Math.min(3, t - 1)}}(?:\`\`\`|~~~)`), headingBeginRegex: (t) => new RegExp(`^ {0,${Math.min(3, t - 1)}}#`), htmlBeginRegex: (t) => new RegExp(`^ {0,${Math.min(3, t - 1)}}<(?:[a-z].*>|!--)`, "i"), blockquoteBeginRegex: (t) => new RegExp(`^ {0,${Math.min(3, t - 1)}}>`) }, Al = /^(?:[ \t]*(?:\n|$))+/, $l = /^((?: {4}| {0,3}\t)[^\n]+(?:\n(?:[ \t]*(?:\n|$))*)?)+/, El = /^ {0,3}(`{3,}(?=[^`\n]*(?:\n|$))|~{3,})([^\n]*)(?:\n|$)(?:|([\s\S]*?)(?:\n|$))(?: {0,3}\1[~`]* *(?=\n|$)|$)/, lt = /^ {0,3}((?:-[\t ]*){3,}|(?:_[ \t]*){3,}|(?:\*[ \t]*){3,})(?:\n+|$)/, Il = /^ {0,3}(#{1,6})(?=\s|$)(.*)(?:\n+|$)/, Pn = / {0,3}(?:[*+-]|\d{1,9}[.)])/, to = /^(?!bull |blockCode|fences|blockquote|heading|html|table)((?:.|\n(?!\s*?\n|bull |blockCode|fences|blockquote|heading|html|table))+?)\n {0,3}(=+|-+) *(?:\n+|$)/, no = _(to).replace(/bull/g, Pn).replace(/blockCode/g, /(?: {4}| {0,3}\t)/).replace(/fences/g, / {0,3}(?:`{3,}|~{3,})/).replace(/blockquote/g, / {0,3}>/).replace(/heading/g, / {0,3}#{1,6}/).replace(/html/g, / {0,3}<[^\n>]+>\n/).replace(/\|table/g, "").getRegex(), Pl = _(to).replace(/bull/g, Pn).replace(/blockCode/g, /(?: {4}| {0,3}\t)/).replace(/fences/g, / {0,3}(?:`{3,}|~{3,})/).replace(/blockquote/g, / {0,3}>/).replace(/heading/g, / {0,3}#{1,6}/).replace(/html/g, / {0,3}<[^\n>]+>\n/).replace(/table/g, / {0,3}\|?(?:[:\- ]*\|)+[\:\- ]*\n/).getRegex(), Mn = /^([^\n]+(?:\n(?!hr|heading|lheading|blockquote|fences|list|html|table| +\n)[^\n]+)*)/, Ml = /^[^\n]+/, Ln = /(?!\s*\])(?:\\[\s\S]|[^\[\]\\])+/, Ll = _(/^ {0,3}\[(label)\]: *(?:\n[ \t]*)?([^<\s][^\s]*|<.*?>)(?:(?: +(?:\n[ \t]*)?| *\n[ \t]*)(title))? *(?:\n+|$)/).replace("label", Ln).replace("title", /(?:"(?:\\"?|[^"\\])*"|'[^'\n]*(?:\n[^'\n]+)*\n?'|\([^()]*\))/).getRegex(), ql = _(/^(bull)([ \t][^\n]+?)?(?:\n|$)/).replace(/bull/g, Pn).getRegex(), Lt = "address|article|aside|base|basefont|blockquote|body|caption|center|col|colgroup|dd|details|dialog|dir|div|dl|dt|fieldset|figcaption|figure|footer|form|frame|frameset|h[1-6]|head|header|hr|html|iframe|legend|li|link|main|menu|menuitem|meta|nav|noframes|ol|optgroup|option|p|param|search|section|summary|table|tbody|td|tfoot|th|thead|title|tr|track|ul", qn = /<!--(?:-?>|[\s\S]*?(?:-->|$))/, Ol = _("^ {0,3}(?:<(script|pre|style|textarea)[\\s>][\\s\\S]*?(?:</\\1>[^\\n]*\\n+|$)|comment[^\\n]*(\\n+|$)|<\\?[\\s\\S]*?(?:\\?>\\n*|$)|<![A-Z][\\s\\S]*?(?:>\\n*|$)|<!\\[CDATA\\[[\\s\\S]*?(?:\\]\\]>\\n*|$)|</?(tag)(?: +|\\n|/?>)[\\s\\S]*?(?:(?:\\n[ ]*)+\\n|$)|<(?!script|pre|style|textarea)([a-z][\\w-]*)(?:attribute)*? */?>(?=[ \\t]*(?:\\n|$))[\\s\\S]*?(?:(?:\\n[ ]*)+\\n|$)|</(?!script|pre|style|textarea)[a-z][\\w-]*\\s*>(?=[ \\t]*(?:\\n|$))[\\s\\S]*?(?:(?:\\n[ ]*)+\\n|$))", "i").replace("comment", qn).replace("tag", Lt).replace("attribute", / +[a-zA-Z:_][\w.:-]*(?: *= *"[^"\n]*"| *= *'[^'\n]*'| *= *[^\s"'=<>`]+)?/).getRegex(), ro = _(Mn).replace("hr", lt).replace("heading", " {0,3}#{1,6}(?:\\s|$)").replace("|lheading", "").replace("|table", "").replace("blockquote", " {0,3}>").replace("fences", " {0,3}(?:`{3,}(?=[^`\\n]*\\n)|~{3,})[^\\n]*\\n").replace("list", " {0,3}(?:[*+-]|1[.)])[ \\t]").replace("html", "</?(?:tag)(?: +|\\n|/?>)|<(?:script|pre|style|textarea|!--)").replace("tag", Lt).getRegex(), Nl = _(/^( {0,3}> ?(paragraph|[^\n]*)(?:\n|$))+/).replace("paragraph", ro).getRegex(), On = { blockquote: Nl, code: $l, def: Ll, fences: El, heading: Il, hr: lt, html: Ol, lheading: no, list: ql, newline: Al, paragraph: ro, table: de, text: Ml }, Er = _("^ *([^\\n ].*)\\n {0,3}((?:\\| *)?:?-+:? *(?:\\| *:?-+:? *)*(?:\\| *)?)(?:\\n((?:(?! *\\n|hr|heading|blockquote|code|fences|list|html).*(?:\\n|$))*)\\n*|$)").replace("hr", lt).replace("heading", " {0,3}#{1,6}(?:\\s|$)").replace("blockquote", " {0,3}>").replace("code", "(?: {4}| {0,3} )[^\\n]").replace("fences", " {0,3}(?:`{3,}(?=[^`\\n]*\\n)|~{3,})[^\\n]*\\n").replace("list", " {0,3}(?:[*+-]|1[.)])[ \\t]").replace("html", "</?(?:tag)(?: +|\\n|/?>)|<(?:script|pre|style|textarea|!--)").replace("tag", Lt).getRegex(), zl = { ...On, lheading: Pl, table: Er, paragraph: _(Mn).replace("hr", lt).replace("heading", " {0,3}#{1,6}(?:\\s|$)").replace("|lheading", "").replace("table", Er).replace("blockquote", " {0,3}>").replace("fences", " {0,3}(?:`{3,}(?=[^`\\n]*\\n)|~{3,})[^\\n]*\\n").replace("list", " {0,3}(?:[*+-]|1[.)])[ \\t]").replace("html", "</?(?:tag)(?: +|\\n|/?>)|<(?:script|pre|style|textarea|!--)").replace("tag", Lt).getRegex() }, Bl = { ...On, html: _(`^ *(?:comment *(?:\\n|\\s*$)|<(tag)[\\s\\S]+?</\\1> *(?:\\n{2,}|\\s*$)|<tag(?:"[^"]*"|'[^']*'|\\s[^'"/>\\s]*)*?/?> *(?:\\n{2,}|\\s*$))`).replace("comment", qn).replace(/tag/g, "(?!(?:a|em|strong|small|s|cite|q|dfn|abbr|data|time|code|var|samp|kbd|sub|sup|i|b|u|mark|ruby|rt|rp|bdi|bdo|span|br|wbr|ins|del|img)\\b)\\w+(?!:|[^\\w\\s@]*@)\\b").getRegex(), def: /^ *\[([^\]]+)\]: *<?([^\s>]+)>?(?: +(["(][^\n]+[")]))? *(?:\n+|$)/, heading: /^(#{1,6})(.*)(?:\n+|$)/, fences: de, lheading: /^(.+?)\n {0,3}(=+|-+) *(?:\n+|$)/, paragraph: _(Mn).replace("hr", lt).replace("heading", ` *#{1,6} *[^
5135
- ]`).replace("lheading", no).replace("|table", "").replace("blockquote", " {0,3}>").replace("|fences", "").replace("|list", "").replace("|html", "").replace("|tag", "").getRegex() }, Fl = /^\\([!"#$%&'()*+,\-./:;<=>?@\[\]\\^_`{|}~])/, Ul = /^(`+)([^`]|[^`][\s\S]*?[^`])\1(?!`)/, io = /^( {2,}|\\)\n(?!\s*$)/, Ql = /^(`+|[^`])(?:(?= {2,}\n)|[\s\S]*?(?:(?=[\\<!\[`*_]|\b_|$)|[^ ](?= {2,}\n)))/, Ne = /[\p{P}\p{S}]/u, qt = /[\s\p{P}\p{S}]/u, Nn = /[^\s\p{P}\p{S}]/u, Dl = _(/^((?![*_])punctSpace)/, "u").replace(/punctSpace/g, qt).getRegex(), oo = /(?!~)[\p{P}\p{S}]/u, Vl = /(?!~)[\s\p{P}\p{S}]/u, Hl = /(?:[^\s\p{P}\p{S}]|~)/u, Wl = _(/link|precode-code|html/, "g").replace("link", /\[(?:[^\[\]`]|(?<a>`+)[^`]+\k<a>(?!`))*?\]\((?:\\[\s\S]|[^\\\(\)]|\((?:\\[\s\S]|[^\\\(\)])*\))*\)/).replace("precode-", Rl ? "(?<!`)()" : "(^^|[^`])").replace("code", /(?<b>`+)[^`]+\k<b>(?!`)/).replace("html", /<(?! )[^<>]*?>/).getRegex(), so = /^(?:\*+(?:((?!\*)punct)|([^\s*]))?)|^_+(?:((?!_)punct)|([^\s_]))?/, Jl = _(so, "u").replace(/punct/g, Ne).getRegex(), Gl = _(so, "u").replace(/punct/g, oo).getRegex(), ao = "^[^_*]*?__[^_*]*?\\*[^_*]*?(?=__)|[^*]+(?=[^*])|(?!\\*)punct(\\*+)(?=[\\s]|$)|notPunctSpace(\\*+)(?!\\*)(?=punctSpace|$)|(?!\\*)punctSpace(\\*+)(?=notPunctSpace)|[\\s](\\*+)(?!\\*)(?=punct)|(?!\\*)punct(\\*+)(?!\\*)(?=punct)|notPunctSpace(\\*+)(?=notPunctSpace)", Kl = _(ao, "gu").replace(/notPunctSpace/g, Nn).replace(/punctSpace/g, qt).replace(/punct/g, Ne).getRegex(), Zl = _(ao, "gu").replace(/notPunctSpace/g, Hl).replace(/punctSpace/g, Vl).replace(/punct/g, oo).getRegex(), Yl = _("^[^_*]*?\\*\\*[^_*]*?_[^_*]*?(?=\\*\\*)|[^_]+(?=[^_])|(?!_)punct(_+)(?=[\\s]|$)|notPunctSpace(_+)(?!_)(?=punctSpace|$)|(?!_)punctSpace(_+)(?=notPunctSpace)|[\\s](_+)(?!_)(?=punct)|(?!_)punct(_+)(?!_)(?=punct)", "gu").replace(/notPunctSpace/g, Nn).replace(/punctSpace/g, qt).replace(/punct/g, Ne).getRegex(), Xl = _(/^~~?(?:((?!~)punct)|[^\s~])/, "u").replace(/punct/g, Ne).getRegex(), ec = "^[^~]+(?=[^~])|(?!~)punct(~~?)(?=[\\s]|$)|notPunctSpace(~~?)(?!~)(?=punctSpace|$)|(?!~)punctSpace(~~?)(?=notPunctSpace)|[\\s](~~?)(?!~)(?=punct)|(?!~)punct(~~?)(?!~)(?=punct)|notPunctSpace(~~?)(?=notPunctSpace)", tc = _(ec, "gu").replace(/notPunctSpace/g, Nn).replace(/punctSpace/g, qt).replace(/punct/g, Ne).getRegex(), nc = _(/\\(punct)/, "gu").replace(/punct/g, Ne).getRegex(), rc = _(/^<(scheme:[^\s\x00-\x1f<>]*|email)>/).replace("scheme", /[a-zA-Z][a-zA-Z0-9+.-]{1,31}/).replace("email", /[a-zA-Z0-9.!#$%&'*+/=?^_`{|}~-]+(@)[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?(?:\.[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?)+(?![-_])/).getRegex(), ic = _(qn).replace("(?:-->|$)", "-->").getRegex(), oc = _("^comment|^</[a-zA-Z][\\w:-]*\\s*>|^<[a-zA-Z][\\w-]*(?:attribute)*?\\s*/?>|^<\\?[\\s\\S]*?\\?>|^<![a-zA-Z]+\\s[\\s\\S]*?>|^<!\\[CDATA\\[[\\s\\S]*?\\]\\]>").replace("comment", ic).replace("attribute", /\s+[a-zA-Z:_][\w.:-]*(?:\s*=\s*"[^"]*"|\s*=\s*'[^']*'|\s*=\s*[^\s"'=<>`]+)?/).getRegex(), Tt = /(?:\[(?:\\[\s\S]|[^\[\]\\])*\]|\\[\s\S]|`+(?!`)[^`]*?`+(?!`)|``+(?=\])|[^\[\]\\`])*?/, sc = _(/^!?\[(label)\]\(\s*(href)(?:(?:[ \t]+(?:\n[ \t]*)?|\n[ \t]*)(title))?\s*\)/).replace("label", Tt).replace("href", /<(?:\\.|[^\n<>\\])+>|[^ \t\n\x00-\x1f]*/).replace("title", /"(?:\\"?|[^"\\])*"|'(?:\\'?|[^'\\])*'|\((?:\\\)?|[^)\\])*\)/).getRegex(), lo = _(/^!?\[(label)\]\[(ref)\]/).replace("label", Tt).replace("ref", Ln).getRegex(), co = _(/^!?\[(ref)\](?:\[\])?/).replace("ref", Ln).getRegex(), ac = _("reflink|nolink(?!\\()", "g").replace("reflink", lo).replace("nolink", co).getRegex(), Ir = /[hH][tT][tT][pP][sS]?|[fF][tT][pP]/, zn = { _backpedal: de, anyPunctuation: nc, autolink: rc, blockSkip: Wl, br: io, code: Ul, del: de, delLDelim: de, delRDelim: de, emStrongLDelim: Jl, emStrongRDelimAst: Kl, emStrongRDelimUnd: Yl, escape: Fl, link: sc, nolink: co, punctuation: Dl, reflink: lo, reflinkSearch: ac, tag: oc, text: Ql, url: de }, lc = { ...zn, link: _(/^!?\[(label)\]\((.*?)\)/).replace("label", Tt).getRegex(), reflink: _(/^!?\[(label)\]\s*\[([^\]]*)\]/).replace("label", Tt).getRegex() }, pn = { ...zn, emStrongRDelimAst: Zl, emStrongLDelim: Gl, delLDelim: Xl, delRDelim: tc, url: _(/^((?:protocol):\/\/|www\.)(?:[a-zA-Z0-9\-]+\.?)+[^\s<]*|^email/).replace("protocol", Ir).replace("email", /[A-Za-z0-9._+-]+(@)[a-zA-Z0-9-_]+(?:\.[a-zA-Z0-9-_]*[a-zA-Z0-9])+(?![-_])/).getRegex(), _backpedal: /(?:[^?!.,:;*_'"~()&]+|\([^)]*\)|&(?![a-zA-Z0-9]+;$)|[?!.,:;*_'"~)]+(?!$))+/, del: /^(~~?)(?=[^\s~])((?:\\[\s\S]|[^\\])*?(?:\\[\s\S]|[^\s~\\]))\1(?=[^~]|$)/, text: _(/^([`~]+|[^`~])(?:(?= {2,}\n)|(?=[a-zA-Z0-9.!#$%&'*+\/=?_`{\|}~-]+@)|[\s\S]*?(?:(?=[\\<!\[`*~_]|\b_|protocol:\/\/|www\.|$)|[^ ](?= {2,}\n)|[^a-zA-Z0-9.!#$%&'*+\/=?_`{\|}~-](?=[a-zA-Z0-9.!#$%&'*+\/=?_`{\|}~-]+@)))/).replace("protocol", Ir).getRegex() }, cc = { ...pn, br: _(io).replace("{2,}", "*").getRegex(), text: _(pn.text).replace("\\b_", "\\b_| {2,}\\n").replace(/\{2,\}/g, "*").getRegex() }, pt = { normal: On, gfm: zl, pedantic: Bl }, Be = { normal: zn, gfm: pn, breaks: cc, pedantic: lc }, uc = { "&": "&amp;", "<": "&lt;", ">": "&gt;", '"': "&quot;", "'": "&#39;" }, Pr = (t) => uc[t];
5140
+ })(), M = { codeRemoveIndent: /^(?: {1,4}| {0,3}\t)/gm, outputLinkReplace: /\\([\[\]])/g, indentCodeCompensation: /^(\s+)(?:```)/, beginningSpace: /^\s+/, endingHash: /#$/, startingSpaceChar: /^ /, endingSpaceChar: / $/, nonSpaceChar: /[^ ]/, newLineCharGlobal: /\n/g, tabCharGlobal: /\t/g, multipleSpaceGlobal: /\s+/g, blankLine: /^[ \t]*$/, doubleBlankLine: /\n[ \t]*\n[ \t]*$/, blockquoteStart: /^ {0,3}>/, blockquoteSetextReplace: /\n {0,3}((?:=+|-+) *)(?=\n|$)/g, blockquoteSetextReplace2: /^ {0,3}>[ \t]?/gm, listReplaceNesting: /^ {1,4}(?=( {4})*[^ ])/g, listIsTask: /^\[[ xX]\] +\S/, listReplaceTask: /^\[[ xX]\] +/, listTaskCheckbox: /\[[ xX]\]/, anyLine: /\n.*\n/, hrefBrackets: /^<(.*)>$/, tableDelimiter: /[:|]/, tableAlignChars: /^\||\| *$/g, tableRowBlankLine: /\n[ \t]*$/, tableAlignRight: /^ *-+: *$/, tableAlignCenter: /^ *:-+: *$/, tableAlignLeft: /^ *:-+ *$/, startATag: /^<a /i, endATag: /^<\/a>/i, startPreScriptTag: /^<(pre|code|kbd|script)(\s|>)/i, endPreScriptTag: /^<\/(pre|code|kbd|script)(\s|>)/i, startAngleBracket: /^</, endAngleBracket: />$/, pedanticHrefTitle: /^([^'"]*[^\s])\s+(['"])(.*)\2/, unicodeAlphaNumeric: /[\p{L}\p{N}]/u, escapeTest: /[&<>"']/, escapeReplace: /[&<>"']/g, escapeTestNoEncode: /[<>"']|&(?!(#\d{1,7}|#[Xx][a-fA-F0-9]{1,6}|\w+);)/, escapeReplaceNoEncode: /[<>"']|&(?!(#\d{1,7}|#[Xx][a-fA-F0-9]{1,6}|\w+);)/g, caret: /(^|[^\[])\^/g, percentDecode: /%25/g, findPipe: /\|/g, splitPipe: / \|/, slashPipe: /\\\|/g, carriageReturn: /\r\n|\r/g, spaceLine: /^ +$/gm, notSpaceStart: /^\S*/, endingNewline: /\n$/, listItemRegex: (t) => new RegExp(`^( {0,3}${t})((?:[ ][^\\n]*)?(?:\\n|$))`), nextBulletRegex: (t) => new RegExp(`^ {0,${Math.min(3, t - 1)}}(?:[*+-]|\\d{1,9}[.)])((?:[ ][^\\n]*)?(?:\\n|$))`), hrRegex: (t) => new RegExp(`^ {0,${Math.min(3, t - 1)}}((?:- *){3,}|(?:_ *){3,}|(?:\\* *){3,})(?:\\n+|$)`), fencesBeginRegex: (t) => new RegExp(`^ {0,${Math.min(3, t - 1)}}(?:\`\`\`|~~~)`), headingBeginRegex: (t) => new RegExp(`^ {0,${Math.min(3, t - 1)}}#`), htmlBeginRegex: (t) => new RegExp(`^ {0,${Math.min(3, t - 1)}}<(?:[a-z].*>|!--)`, "i"), blockquoteBeginRegex: (t) => new RegExp(`^ {0,${Math.min(3, t - 1)}}>`) }, Al = /^(?:[ \t]*(?:\n|$))+/, $l = /^((?: {4}| {0,3}\t)[^\n]+(?:\n(?:[ \t]*(?:\n|$))*)?)+/, El = /^ {0,3}(`{3,}(?=[^`\n]*(?:\n|$))|~{3,})([^\n]*)(?:\n|$)(?:|([\s\S]*?)(?:\n|$))(?: {0,3}\1[~`]* *(?=\n|$)|$)/, lt = /^ {0,3}((?:-[\t ]*){3,}|(?:_[ \t]*){3,}|(?:\*[ \t]*){3,})(?:\n+|$)/, Il = /^ {0,3}(#{1,6})(?=\s|$)(.*)(?:\n+|$)/, Pn = / {0,3}(?:[*+-]|\d{1,9}[.)])/, to = /^(?!bull |blockCode|fences|blockquote|heading|html|table)((?:.|\n(?!\s*?\n|bull |blockCode|fences|blockquote|heading|html|table))+?)\n {0,3}(=+|-+) *(?:\n+|$)/, no = _(to).replace(/bull/g, Pn).replace(/blockCode/g, /(?: {4}| {0,3}\t)/).replace(/fences/g, / {0,3}(?:`{3,}|~{3,})/).replace(/blockquote/g, / {0,3}>/).replace(/heading/g, / {0,3}#{1,6}/).replace(/html/g, / {0,3}<[^\n>]+>\n/).replace(/\|table/g, "").getRegex(), Pl = _(to).replace(/bull/g, Pn).replace(/blockCode/g, /(?: {4}| {0,3}\t)/).replace(/fences/g, / {0,3}(?:`{3,}|~{3,})/).replace(/blockquote/g, / {0,3}>/).replace(/heading/g, / {0,3}#{1,6}/).replace(/html/g, / {0,3}<[^\n>]+>\n/).replace(/table/g, / {0,3}\|?(?:[:\- ]*\|)+[\:\- ]*\n/).getRegex(), Ln = /^([^\n]+(?:\n(?!hr|heading|lheading|blockquote|fences|list|html|table| +\n)[^\n]+)*)/, Ll = /^[^\n]+/, Mn = /(?!\s*\])(?:\\[\s\S]|[^\[\]\\])+/, Ml = _(/^ {0,3}\[(label)\]: *(?:\n[ \t]*)?([^<\s][^\s]*|<.*?>)(?:(?: +(?:\n[ \t]*)?| *\n[ \t]*)(title))? *(?:\n+|$)/).replace("label", Mn).replace("title", /(?:"(?:\\"?|[^"\\])*"|'[^'\n]*(?:\n[^'\n]+)*\n?'|\([^()]*\))/).getRegex(), ql = _(/^(bull)([ \t][^\n]+?)?(?:\n|$)/).replace(/bull/g, Pn).getRegex(), Mt = "address|article|aside|base|basefont|blockquote|body|caption|center|col|colgroup|dd|details|dialog|dir|div|dl|dt|fieldset|figcaption|figure|footer|form|frame|frameset|h[1-6]|head|header|hr|html|iframe|legend|li|link|main|menu|menuitem|meta|nav|noframes|ol|optgroup|option|p|param|search|section|summary|table|tbody|td|tfoot|th|thead|title|tr|track|ul", qn = /<!--(?:-?>|[\s\S]*?(?:-->|$))/, Ol = _("^ {0,3}(?:<(script|pre|style|textarea)[\\s>][\\s\\S]*?(?:</\\1>[^\\n]*\\n+|$)|comment[^\\n]*(\\n+|$)|<\\?[\\s\\S]*?(?:\\?>\\n*|$)|<![A-Z][\\s\\S]*?(?:>\\n*|$)|<!\\[CDATA\\[[\\s\\S]*?(?:\\]\\]>\\n*|$)|</?(tag)(?: +|\\n|/?>)[\\s\\S]*?(?:(?:\\n[ ]*)+\\n|$)|<(?!script|pre|style|textarea)([a-z][\\w-]*)(?:attribute)*? */?>(?=[ \\t]*(?:\\n|$))[\\s\\S]*?(?:(?:\\n[ ]*)+\\n|$)|</(?!script|pre|style|textarea)[a-z][\\w-]*\\s*>(?=[ \\t]*(?:\\n|$))[\\s\\S]*?(?:(?:\\n[ ]*)+\\n|$))", "i").replace("comment", qn).replace("tag", Mt).replace("attribute", / +[a-zA-Z:_][\w.:-]*(?: *= *"[^"\n]*"| *= *'[^'\n]*'| *= *[^\s"'=<>`]+)?/).getRegex(), ro = _(Ln).replace("hr", lt).replace("heading", " {0,3}#{1,6}(?:\\s|$)").replace("|lheading", "").replace("|table", "").replace("blockquote", " {0,3}>").replace("fences", " {0,3}(?:`{3,}(?=[^`\\n]*\\n)|~{3,})[^\\n]*\\n").replace("list", " {0,3}(?:[*+-]|1[.)])[ \\t]").replace("html", "</?(?:tag)(?: +|\\n|/?>)|<(?:script|pre|style|textarea|!--)").replace("tag", Mt).getRegex(), Nl = _(/^( {0,3}> ?(paragraph|[^\n]*)(?:\n|$))+/).replace("paragraph", ro).getRegex(), On = { blockquote: Nl, code: $l, def: Ml, fences: El, heading: Il, hr: lt, html: Ol, lheading: no, list: ql, newline: Al, paragraph: ro, table: de, text: Ll }, Er = _("^ *([^\\n ].*)\\n {0,3}((?:\\| *)?:?-+:? *(?:\\| *:?-+:? *)*(?:\\| *)?)(?:\\n((?:(?! *\\n|hr|heading|blockquote|code|fences|list|html).*(?:\\n|$))*)\\n*|$)").replace("hr", lt).replace("heading", " {0,3}#{1,6}(?:\\s|$)").replace("blockquote", " {0,3}>").replace("code", "(?: {4}| {0,3} )[^\\n]").replace("fences", " {0,3}(?:`{3,}(?=[^`\\n]*\\n)|~{3,})[^\\n]*\\n").replace("list", " {0,3}(?:[*+-]|1[.)])[ \\t]").replace("html", "</?(?:tag)(?: +|\\n|/?>)|<(?:script|pre|style|textarea|!--)").replace("tag", Mt).getRegex(), zl = { ...On, lheading: Pl, table: Er, paragraph: _(Ln).replace("hr", lt).replace("heading", " {0,3}#{1,6}(?:\\s|$)").replace("|lheading", "").replace("table", Er).replace("blockquote", " {0,3}>").replace("fences", " {0,3}(?:`{3,}(?=[^`\\n]*\\n)|~{3,})[^\\n]*\\n").replace("list", " {0,3}(?:[*+-]|1[.)])[ \\t]").replace("html", "</?(?:tag)(?: +|\\n|/?>)|<(?:script|pre|style|textarea|!--)").replace("tag", Mt).getRegex() }, Bl = { ...On, html: _(`^ *(?:comment *(?:\\n|\\s*$)|<(tag)[\\s\\S]+?</\\1> *(?:\\n{2,}|\\s*$)|<tag(?:"[^"]*"|'[^']*'|\\s[^'"/>\\s]*)*?/?> *(?:\\n{2,}|\\s*$))`).replace("comment", qn).replace(/tag/g, "(?!(?:a|em|strong|small|s|cite|q|dfn|abbr|data|time|code|var|samp|kbd|sub|sup|i|b|u|mark|ruby|rt|rp|bdi|bdo|span|br|wbr|ins|del|img)\\b)\\w+(?!:|[^\\w\\s@]*@)\\b").getRegex(), def: /^ *\[([^\]]+)\]: *<?([^\s>]+)>?(?: +(["(][^\n]+[")]))? *(?:\n+|$)/, heading: /^(#{1,6})(.*)(?:\n+|$)/, fences: de, lheading: /^(.+?)\n {0,3}(=+|-+) *(?:\n+|$)/, paragraph: _(Ln).replace("hr", lt).replace("heading", ` *#{1,6} *[^
5141
+ ]`).replace("lheading", no).replace("|table", "").replace("blockquote", " {0,3}>").replace("|fences", "").replace("|list", "").replace("|html", "").replace("|tag", "").getRegex() }, Fl = /^\\([!"#$%&'()*+,\-./:;<=>?@\[\]\\^_`{|}~])/, Ul = /^(`+)([^`]|[^`][\s\S]*?[^`])\1(?!`)/, io = /^( {2,}|\\)\n(?!\s*$)/, Ql = /^(`+|[^`])(?:(?= {2,}\n)|[\s\S]*?(?:(?=[\\<!\[`*_]|\b_|$)|[^ ](?= {2,}\n)))/, Ne = /[\p{P}\p{S}]/u, qt = /[\s\p{P}\p{S}]/u, Nn = /[^\s\p{P}\p{S}]/u, Dl = _(/^((?![*_])punctSpace)/, "u").replace(/punctSpace/g, qt).getRegex(), oo = /(?!~)[\p{P}\p{S}]/u, Vl = /(?!~)[\s\p{P}\p{S}]/u, Hl = /(?:[^\s\p{P}\p{S}]|~)/u, Wl = _(/link|precode-code|html/, "g").replace("link", /\[(?:[^\[\]`]|(?<a>`+)[^`]+\k<a>(?!`))*?\]\((?:\\[\s\S]|[^\\\(\)]|\((?:\\[\s\S]|[^\\\(\)])*\))*\)/).replace("precode-", Rl ? "(?<!`)()" : "(^^|[^`])").replace("code", /(?<b>`+)[^`]+\k<b>(?!`)/).replace("html", /<(?! )[^<>]*?>/).getRegex(), so = /^(?:\*+(?:((?!\*)punct)|([^\s*]))?)|^_+(?:((?!_)punct)|([^\s_]))?/, Jl = _(so, "u").replace(/punct/g, Ne).getRegex(), Gl = _(so, "u").replace(/punct/g, oo).getRegex(), ao = "^[^_*]*?__[^_*]*?\\*[^_*]*?(?=__)|[^*]+(?=[^*])|(?!\\*)punct(\\*+)(?=[\\s]|$)|notPunctSpace(\\*+)(?!\\*)(?=punctSpace|$)|(?!\\*)punctSpace(\\*+)(?=notPunctSpace)|[\\s](\\*+)(?!\\*)(?=punct)|(?!\\*)punct(\\*+)(?!\\*)(?=punct)|notPunctSpace(\\*+)(?=notPunctSpace)", Kl = _(ao, "gu").replace(/notPunctSpace/g, Nn).replace(/punctSpace/g, qt).replace(/punct/g, Ne).getRegex(), Zl = _(ao, "gu").replace(/notPunctSpace/g, Hl).replace(/punctSpace/g, Vl).replace(/punct/g, oo).getRegex(), Yl = _("^[^_*]*?\\*\\*[^_*]*?_[^_*]*?(?=\\*\\*)|[^_]+(?=[^_])|(?!_)punct(_+)(?=[\\s]|$)|notPunctSpace(_+)(?!_)(?=punctSpace|$)|(?!_)punctSpace(_+)(?=notPunctSpace)|[\\s](_+)(?!_)(?=punct)|(?!_)punct(_+)(?!_)(?=punct)", "gu").replace(/notPunctSpace/g, Nn).replace(/punctSpace/g, qt).replace(/punct/g, Ne).getRegex(), Xl = _(/^~~?(?:((?!~)punct)|[^\s~])/, "u").replace(/punct/g, Ne).getRegex(), ec = "^[^~]+(?=[^~])|(?!~)punct(~~?)(?=[\\s]|$)|notPunctSpace(~~?)(?!~)(?=punctSpace|$)|(?!~)punctSpace(~~?)(?=notPunctSpace)|[\\s](~~?)(?!~)(?=punct)|(?!~)punct(~~?)(?!~)(?=punct)|notPunctSpace(~~?)(?=notPunctSpace)", tc = _(ec, "gu").replace(/notPunctSpace/g, Nn).replace(/punctSpace/g, qt).replace(/punct/g, Ne).getRegex(), nc = _(/\\(punct)/, "gu").replace(/punct/g, Ne).getRegex(), rc = _(/^<(scheme:[^\s\x00-\x1f<>]*|email)>/).replace("scheme", /[a-zA-Z][a-zA-Z0-9+.-]{1,31}/).replace("email", /[a-zA-Z0-9.!#$%&'*+/=?^_`{|}~-]+(@)[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?(?:\.[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?)+(?![-_])/).getRegex(), ic = _(qn).replace("(?:-->|$)", "-->").getRegex(), oc = _("^comment|^</[a-zA-Z][\\w:-]*\\s*>|^<[a-zA-Z][\\w-]*(?:attribute)*?\\s*/?>|^<\\?[\\s\\S]*?\\?>|^<![a-zA-Z]+\\s[\\s\\S]*?>|^<!\\[CDATA\\[[\\s\\S]*?\\]\\]>").replace("comment", ic).replace("attribute", /\s+[a-zA-Z:_][\w.:-]*(?:\s*=\s*"[^"]*"|\s*=\s*'[^']*'|\s*=\s*[^\s"'=<>`]+)?/).getRegex(), Tt = /(?:\[(?:\\[\s\S]|[^\[\]\\])*\]|\\[\s\S]|`+(?!`)[^`]*?`+(?!`)|``+(?=\])|[^\[\]\\`])*?/, sc = _(/^!?\[(label)\]\(\s*(href)(?:(?:[ \t]+(?:\n[ \t]*)?|\n[ \t]*)(title))?\s*\)/).replace("label", Tt).replace("href", /<(?:\\.|[^\n<>\\])+>|[^ \t\n\x00-\x1f]*/).replace("title", /"(?:\\"?|[^"\\])*"|'(?:\\'?|[^'\\])*'|\((?:\\\)?|[^)\\])*\)/).getRegex(), lo = _(/^!?\[(label)\]\[(ref)\]/).replace("label", Tt).replace("ref", Mn).getRegex(), co = _(/^!?\[(ref)\](?:\[\])?/).replace("ref", Mn).getRegex(), ac = _("reflink|nolink(?!\\()", "g").replace("reflink", lo).replace("nolink", co).getRegex(), Ir = /[hH][tT][tT][pP][sS]?|[fF][tT][pP]/, zn = { _backpedal: de, anyPunctuation: nc, autolink: rc, blockSkip: Wl, br: io, code: Ul, del: de, delLDelim: de, delRDelim: de, emStrongLDelim: Jl, emStrongRDelimAst: Kl, emStrongRDelimUnd: Yl, escape: Fl, link: sc, nolink: co, punctuation: Dl, reflink: lo, reflinkSearch: ac, tag: oc, text: Ql, url: de }, lc = { ...zn, link: _(/^!?\[(label)\]\((.*?)\)/).replace("label", Tt).getRegex(), reflink: _(/^!?\[(label)\]\s*\[([^\]]*)\]/).replace("label", Tt).getRegex() }, pn = { ...zn, emStrongRDelimAst: Zl, emStrongLDelim: Gl, delLDelim: Xl, delRDelim: tc, url: _(/^((?:protocol):\/\/|www\.)(?:[a-zA-Z0-9\-]+\.?)+[^\s<]*|^email/).replace("protocol", Ir).replace("email", /[A-Za-z0-9._+-]+(@)[a-zA-Z0-9-_]+(?:\.[a-zA-Z0-9-_]*[a-zA-Z0-9])+(?![-_])/).getRegex(), _backpedal: /(?:[^?!.,:;*_'"~()&]+|\([^)]*\)|&(?![a-zA-Z0-9]+;$)|[?!.,:;*_'"~)]+(?!$))+/, del: /^(~~?)(?=[^\s~])((?:\\[\s\S]|[^\\])*?(?:\\[\s\S]|[^\s~\\]))\1(?=[^~]|$)/, text: _(/^([`~]+|[^`~])(?:(?= {2,}\n)|(?=[a-zA-Z0-9.!#$%&'*+\/=?_`{\|}~-]+@)|[\s\S]*?(?:(?=[\\<!\[`*~_]|\b_|protocol:\/\/|www\.|$)|[^ ](?= {2,}\n)|[^a-zA-Z0-9.!#$%&'*+\/=?_`{\|}~-](?=[a-zA-Z0-9.!#$%&'*+\/=?_`{\|}~-]+@)))/).replace("protocol", Ir).getRegex() }, cc = { ...pn, br: _(io).replace("{2,}", "*").getRegex(), text: _(pn.text).replace("\\b_", "\\b_| {2,}\\n").replace(/\{2,\}/g, "*").getRegex() }, pt = { normal: On, gfm: zl, pedantic: Bl }, Be = { normal: zn, gfm: pn, breaks: cc, pedantic: lc }, uc = { "&": "&amp;", "<": "&lt;", ">": "&gt;", '"': "&quot;", "'": "&#39;" }, Pr = (t) => uc[t];
5136
5142
  function X(t, e) {
5137
5143
  if (e) {
5138
- if (L.escapeTest.test(t)) return t.replace(L.escapeReplace, Pr);
5139
- } else if (L.escapeTestNoEncode.test(t)) return t.replace(L.escapeReplaceNoEncode, Pr);
5144
+ if (M.escapeTest.test(t)) return t.replace(M.escapeReplace, Pr);
5145
+ } else if (M.escapeTestNoEncode.test(t)) return t.replace(M.escapeReplaceNoEncode, Pr);
5140
5146
  return t;
5141
5147
  }
5142
- function Mr(t) {
5148
+ function Lr(t) {
5143
5149
  try {
5144
- t = encodeURI(t).replace(L.percentDecode, "%");
5150
+ t = encodeURI(t).replace(M.percentDecode, "%");
5145
5151
  } catch {
5146
5152
  return null;
5147
5153
  }
5148
5154
  return t;
5149
5155
  }
5150
- function Lr(t, e) {
5151
- let n = t.replace(L.findPipe, (o, s, l) => {
5156
+ function Mr(t, e) {
5157
+ let n = t.replace(M.findPipe, (o, s, l) => {
5152
5158
  let a = !1, u = s;
5153
5159
  for (; --u >= 0 && l[u] === "\\"; ) a = !a;
5154
5160
  return a ? "|" : " |";
5155
- }), r = n.split(L.splitPipe), i = 0;
5161
+ }), r = n.split(M.splitPipe), i = 0;
5156
5162
  if (r[0].trim() || r.shift(), r.length > 0 && !r.at(-1)?.trim() && r.pop(), e) if (r.length > e) r.splice(e);
5157
5163
  else for (; r.length < e; ) r.push("");
5158
- for (; i < r.length; i++) r[i] = r[i].trim().replace(L.slashPipe, "|");
5164
+ for (; i < r.length; i++) r[i] = r[i].trim().replace(M.slashPipe, "|");
5159
5165
  return r;
5160
5166
  }
5161
5167
  function Fe(t, e, n) {
@@ -5361,12 +5367,12 @@ ${d}` : d;
5361
5367
  table(t) {
5362
5368
  let e = this.rules.block.table.exec(t);
5363
5369
  if (!e || !this.rules.other.tableDelimiter.test(e[2])) return;
5364
- let n = Lr(e[1]), r = e[2].replace(this.rules.other.tableAlignChars, "").split("|"), i = e[3]?.trim() ? e[3].replace(this.rules.other.tableRowBlankLine, "").split(`
5370
+ let n = Mr(e[1]), r = e[2].replace(this.rules.other.tableAlignChars, "").split("|"), i = e[3]?.trim() ? e[3].replace(this.rules.other.tableRowBlankLine, "").split(`
5365
5371
  `) : [], o = { type: "table", raw: e[0], header: [], align: [], rows: [] };
5366
5372
  if (n.length === r.length) {
5367
5373
  for (let s of r) this.rules.other.tableAlignRight.test(s) ? o.align.push("right") : this.rules.other.tableAlignCenter.test(s) ? o.align.push("center") : this.rules.other.tableAlignLeft.test(s) ? o.align.push("left") : o.align.push(null);
5368
5374
  for (let s = 0; s < n.length; s++) o.header.push({ text: n[s], tokens: this.lexer.inline(n[s]), header: !0, align: o.align[s] });
5369
- for (let s of i) o.rows.push(Lr(s, o.header.length).map((l, a) => ({ text: l, tokens: this.lexer.inline(l), header: !1, align: o.align[a] })));
5375
+ for (let s of i) o.rows.push(Mr(s, o.header.length).map((l, a) => ({ text: l, tokens: this.lexer.inline(l), header: !1, align: o.align[a] })));
5370
5376
  return o;
5371
5377
  }
5372
5378
  }
@@ -5522,7 +5528,7 @@ ${d}` : d;
5522
5528
  tokenizer;
5523
5529
  constructor(e) {
5524
5530
  this.tokens = [], this.tokens.links = /* @__PURE__ */ Object.create(null), this.options = e || ve, this.options.tokenizer = this.options.tokenizer || new Rt(), this.tokenizer = this.options.tokenizer, this.tokenizer.options = this.options, this.tokenizer.lexer = this, this.inlineQueue = [], this.state = { inLink: !1, inRawBlock: !1, top: !0 };
5525
- let n = { other: L, block: pt.normal, inline: Be.normal };
5531
+ let n = { other: M, block: pt.normal, inline: Be.normal };
5526
5532
  this.options.pedantic ? (n.block = pt.pedantic, n.inline = Be.pedantic) : this.options.gfm && (n.block = pt.gfm, this.options.breaks ? n.inline = Be.breaks : n.inline = Be.gfm), this.tokenizer.rules = n;
5527
5533
  }
5528
5534
  static get rules() {
@@ -5535,7 +5541,7 @@ ${d}` : d;
5535
5541
  return new gn(n).inlineTokens(e);
5536
5542
  }
5537
5543
  lex(e) {
5538
- e = e.replace(L.carriageReturn, `
5544
+ e = e.replace(M.carriageReturn, `
5539
5545
  `), this.blockTokens(e, this.tokens);
5540
5546
  for (let n = 0; n < this.inlineQueue.length; n++) {
5541
5547
  let r = this.inlineQueue[n];
@@ -5544,7 +5550,7 @@ ${d}` : d;
5544
5550
  return this.inlineQueue = [], this.tokens;
5545
5551
  }
5546
5552
  blockTokens(e, n = [], r = !1) {
5547
- for (this.tokenizer.lexer = this, this.options.pedantic && (e = e.replace(L.tabCharGlobal, " ").replace(L.spaceLine, "")); e; ) {
5553
+ for (this.tokenizer.lexer = this, this.options.pedantic && (e = e.replace(M.tabCharGlobal, " ").replace(M.spaceLine, "")); e; ) {
5548
5554
  let i;
5549
5555
  if (this.options.extensions?.block?.some((s) => (i = s.call({ lexer: this }, e, n)) ? (e = e.substring(i.raw.length), n.push(i), !0) : !1)) continue;
5550
5556
  if (i = this.tokenizer.space(e)) {
@@ -5732,7 +5738,7 @@ ${d}` : d;
5732
5738
  return "";
5733
5739
  }
5734
5740
  code({ text: t, lang: e, escaped: n }) {
5735
- let r = (e || "").match(L.notSpaceStart)?.[0], i = t.replace(L.endingNewline, "") + `
5741
+ let r = (e || "").match(M.notSpaceStart)?.[0], i = t.replace(M.endingNewline, "") + `
5736
5742
  `;
5737
5743
  return r ? '<pre><code class="language-' + X(r) + '">' + (n ? i : X(i, !0)) + `</code></pre>
5738
5744
  ` : "<pre><code>" + (n ? i : X(i, !0)) + `</code></pre>
@@ -5822,7 +5828,7 @@ ${t}</tr>
5822
5828
  return `<del>${this.parser.parseInline(t)}</del>`;
5823
5829
  }
5824
5830
  link({ href: t, title: e, tokens: n }) {
5825
- let r = this.parser.parseInline(n), i = Mr(t);
5831
+ let r = this.parser.parseInline(n), i = Lr(t);
5826
5832
  if (i === null) return r;
5827
5833
  t = i;
5828
5834
  let o = '<a href="' + t + '"';
@@ -5830,7 +5836,7 @@ ${t}</tr>
5830
5836
  }
5831
5837
  image({ href: t, title: e, text: n, tokens: r }) {
5832
5838
  r && (n = this.parser.parseInline(r, this.parser.textRenderer));
5833
- let i = Mr(t);
5839
+ let i = Lr(t);
5834
5840
  if (i === null) return X(n);
5835
5841
  t = i;
5836
5842
  let o = `<img src="${t}" alt="${X(n)}"`;
@@ -6252,7 +6258,7 @@ function gc({ text: t }) {
6252
6258
  }, [t]);
6253
6259
  return /* @__PURE__ */ c("div", { class: "jex-md", dangerouslySetInnerHTML: { __html: e } });
6254
6260
  }
6255
- const Pe = R("");
6261
+ const Pe = A("");
6256
6262
  function mc(t) {
6257
6263
  if (!t)
6258
6264
  return;
@@ -6262,7 +6268,7 @@ function mc(t) {
6262
6268
  const n = `@${e} `, r = Pe.value;
6263
6269
  r.includes(n) || r.includes(`@${e}`) || (Pe.value = r.trimStart() ? `${n}${r.trimStart()}` : n);
6264
6270
  }
6265
- const rt = R(null), Or = R(Date.now()), se = R([]), xc = 4, bc = 8 * 1024 * 1024;
6271
+ const rt = A(null), Or = A(Date.now()), se = A([]), xc = 4, bc = 8 * 1024 * 1024;
6266
6272
  function yc() {
6267
6273
  return typeof crypto < "u" && typeof crypto.randomUUID == "function" ? crypto.randomUUID() : `att-${Date.now().toString(36)}-${Math.random().toString(36).slice(2, 11)}`;
6268
6274
  }
@@ -6295,7 +6301,7 @@ BigInt("9223372036854775807");
6295
6301
  BigInt("0");
6296
6302
  BigInt("8");
6297
6303
  BigInt("256");
6298
- const kc = /* @__PURE__ */ Symbol.for("functionName"), Sc = /* @__PURE__ */ Symbol.for("toReferencePath");
6304
+ const kc = /* @__PURE__ */ Symbol.for("functionName"), jc = /* @__PURE__ */ Symbol.for("toReferencePath");
6299
6305
  function uo(t = []) {
6300
6306
  const e = {
6301
6307
  get(n, r) {
@@ -6316,14 +6322,14 @@ function uo(t = []) {
6316
6322
  };
6317
6323
  return new Proxy({}, e);
6318
6324
  }
6319
- const jc = uo();
6325
+ const Sc = uo();
6320
6326
  function ho(t, e) {
6321
6327
  const n = {
6322
6328
  get(r, i) {
6323
6329
  if (typeof i == "string") {
6324
6330
  const o = [...e, i];
6325
6331
  return ho(t, o);
6326
- } else if (i === Sc) {
6332
+ } else if (i === jc) {
6327
6333
  if (e.length < 1) {
6328
6334
  const o = [t, ...e].join(".");
6329
6335
  throw new Error(
@@ -6337,10 +6343,10 @@ function ho(t, e) {
6337
6343
  };
6338
6344
  return new Proxy({}, n);
6339
6345
  }
6340
- const Cc = () => ho("components", []), Me = jc;
6346
+ const Cc = () => ho("components", []), Le = Sc;
6341
6347
  Cc();
6342
6348
  function Tc({ sessionId: t, visitorId: e, ensureSession: n }) {
6343
- const r = It(Me.functions.chat.public.conversations.send);
6349
+ const r = It(Le.functions.chat.public.conversations.send);
6344
6350
  return async function(o) {
6345
6351
  const s = t && e ? { sessionId: t, visitorId: e } : await n();
6346
6352
  if (s) {
@@ -6376,12 +6382,12 @@ function Rc() {
6376
6382
  return { isActive: n, remainingSeconds: r };
6377
6383
  }
6378
6384
  function Ac() {
6379
- const t = A(), { isActive: e, remainingSeconds: n } = Rc();
6385
+ const t = R(), { isActive: e, remainingSeconds: n } = Rc();
6380
6386
  return e ? /* @__PURE__ */ c("div", { class: "jex-rate-limit-notice", role: "status", "aria-live": "polite", children: t.errorRateLimited.replace("{seconds}", String(n)) }) : null;
6381
6387
  }
6382
- const je = R(null);
6388
+ const Se = A(null);
6383
6389
  function $c() {
6384
- const t = A(), e = je.value;
6390
+ const t = R(), e = Se.value;
6385
6391
  if (e === null)
6386
6392
  return null;
6387
6393
  const n = e === "no-token" ? t.errorSessionNoToken : e === "unauthorized" ? t.errorSessionUnauthorized : e === "network" ? t.errorNetwork : t.somethingWentWrong;
@@ -6421,7 +6427,7 @@ function Ic({ onSend: t }) {
6421
6427
  return { textareaRef: e, fileInputRef: n, onKeyDown: r, onAttachClick: i, onFilesPicked: o, onCardClick: s };
6422
6428
  }
6423
6429
  function Pc({ isStreaming: t, disabled: e, inputDisabled: n, onSend: r }) {
6424
- const i = A(), o = Pe, s = se, { textareaRef: l, fileInputRef: a, onKeyDown: u, onAttachClick: d, onFilesPicked: h, onCardClick: f } = Ic({ onSend: r }), p = o.value.trim().length > 0, g = s.value.length > 0, m = (p || g) && !e;
6430
+ const i = R(), o = Pe, s = se, { textareaRef: l, fileInputRef: a, onKeyDown: u, onAttachClick: d, onFilesPicked: h, onCardClick: f } = Ic({ onSend: r }), p = o.value.trim().length > 0, g = s.value.length > 0, m = (p || g) && !e;
6425
6431
  return /* @__PURE__ */ c("div", { class: "jex-composer-card", onClick: f, children: [
6426
6432
  g && /* @__PURE__ */ c("div", { class: "jex-composer-attachments", role: "list", children: s.value.map((x) => /* @__PURE__ */ c("div", { class: "jex-attachment-chip", role: "listitem", children: [
6427
6433
  /* @__PURE__ */ c("img", { src: x.previewUrl, alt: x.file.name, class: "jex-attachment-thumb" }),
@@ -6499,8 +6505,27 @@ function Pc({ isStreaming: t, disabled: e, inputDisabled: n, onSend: r }) {
6499
6505
  ] })
6500
6506
  ] });
6501
6507
  }
6502
- function Mc({ sessionId: t, visitorId: e, isLoading: n, isStreaming: r, sessionStatus: i, ensureSession: o, onStartFresh: s }) {
6503
- const l = A(), a = Pe, u = Tc({ sessionId: t, visitorId: e, ensureSession: o }), d = rt.value !== null && rt.value > Date.now(), h = n || r || d;
6508
+ const Lc = "https://jexitychat.de/privacy";
6509
+ function Mc() {
6510
+ const t = R();
6511
+ return /* @__PURE__ */ c("p", { class: "jex-privacy-notice", children: [
6512
+ t.privacyNoticePre,
6513
+ " ",
6514
+ /* @__PURE__ */ c(
6515
+ "a",
6516
+ {
6517
+ href: Lc,
6518
+ target: "_blank",
6519
+ rel: "noopener noreferrer",
6520
+ class: "jex-privacy-notice-link",
6521
+ children: t.privacyPolicyLinkText
6522
+ }
6523
+ ),
6524
+ "."
6525
+ ] });
6526
+ }
6527
+ function qc({ sessionId: t, visitorId: e, isLoading: n, isStreaming: r, sessionStatus: i, ensureSession: o, onStartFresh: s }) {
6528
+ const l = R(), a = Pe, u = Tc({ sessionId: t, visitorId: e, ensureSession: o }), d = rt.value !== null && rt.value > Date.now(), h = n || r || d;
6504
6529
  if (i === "resolved")
6505
6530
  return /* @__PURE__ */ c("div", { class: "jex-chat-input-resolved", children: [
6506
6531
  /* @__PURE__ */ c("div", { class: "jex-resolved-notice", children: l.sessionResolved }),
@@ -6531,20 +6556,21 @@ function Mc({ sessionId: t, visitorId: e, isLoading: n, isStreaming: r, sessionS
6531
6556
  inputDisabled: n || r,
6532
6557
  onSend: f
6533
6558
  }
6534
- )
6559
+ ),
6560
+ /* @__PURE__ */ c(Mc, {})
6535
6561
  ] });
6536
6562
  }
6537
- function Lc(t) {
6563
+ function Oc(t) {
6538
6564
  const e = t.trim().split(/\s+/).filter(Boolean);
6539
6565
  return e.length === 0 ? "?" : e.map((n) => n[0]).join("").slice(0, 2).toUpperCase();
6540
6566
  }
6541
6567
  function ke({ text: t, streaming: e, error: n, authorId: r, authorName: i, authorImage: o, botAvatarUrl: s }) {
6542
- const l = A(), a = !!r, [u, d] = C(!1), h = Re(() => d(!0), []), f = l.replyTo.replace("{name}", i ?? ""), p = [
6568
+ const l = R(), a = !!r, [u, d] = C(!1), h = Re(() => d(!0), []), f = l.replyTo.replace("{name}", i ?? ""), p = [
6543
6569
  "jex-message bot",
6544
6570
  n ? "jex-message-error" : ""
6545
6571
  ].filter(Boolean).join(" ");
6546
6572
  return /* @__PURE__ */ c("div", { class: "jex-message-row bot", children: [
6547
- /* @__PURE__ */ c("div", { class: `jex-avatar ${a ? "jex-avatar-agent" : "jex-avatar-bot"}`, children: a && o && !u ? /* @__PURE__ */ c("img", { src: o, alt: i ?? "", class: "jex-avatar-img", onError: h }) : a ? /* @__PURE__ */ c("span", { class: "jex-avatar-initials", children: Lc(i ?? "") }) : s && !u ? /* @__PURE__ */ c("img", { src: s, alt: "", class: "jex-avatar-img", onError: h }) : /* @__PURE__ */ c(En, { size: 14 }) }),
6573
+ /* @__PURE__ */ c("div", { class: `jex-avatar ${a ? "jex-avatar-agent" : "jex-avatar-bot"}`, children: a && o && !u ? /* @__PURE__ */ c("img", { src: o, alt: i ?? "", class: "jex-avatar-img", onError: h }) : a ? /* @__PURE__ */ c("span", { class: "jex-avatar-initials", children: Oc(i ?? "") }) : s && !u ? /* @__PURE__ */ c("img", { src: s, alt: "", class: "jex-avatar-img", onError: h }) : /* @__PURE__ */ c(En, { size: 14 }) }),
6548
6574
  /* @__PURE__ */ c("div", { class: "jex-message-content", children: [
6549
6575
  /* @__PURE__ */ c("div", { class: p, children: [
6550
6576
  /* @__PURE__ */ c(gc, { text: t }),
@@ -6569,14 +6595,14 @@ function ke({ text: t, streaming: e, error: n, authorId: r, authorName: i, autho
6569
6595
  ] })
6570
6596
  ] });
6571
6597
  }
6572
- function qc({ text: t }) {
6598
+ function Nc({ text: t }) {
6573
6599
  return /* @__PURE__ */ c("div", { class: "jex-message user", children: t });
6574
6600
  }
6575
6601
  function fo() {
6576
- return It(Me.functions.chat.public.helpdesk.submitEscalation);
6602
+ return It(Le.functions.chat.public.helpdesk.submitEscalation);
6577
6603
  }
6578
- function Oc({ message: t, sessionId: e, visitorId: n }) {
6579
- const r = A();
6604
+ function zc({ message: t, sessionId: e, visitorId: n }) {
6605
+ const r = R();
6580
6606
  return t.formData ? /* @__PURE__ */ c("div", { class: "jex-inline-form-submitted", children: [
6581
6607
  /* @__PURE__ */ c("span", { class: "jex-inline-form-check", children: "✓" }),
6582
6608
  /* @__PURE__ */ c("div", { children: [
@@ -6588,7 +6614,7 @@ function Oc({ message: t, sessionId: e, visitorId: n }) {
6588
6614
  ] })
6589
6615
  ] })
6590
6616
  ] }) : /* @__PURE__ */ c("div", { class: "jex-message-row bot", children: /* @__PURE__ */ c(
6591
- Nc,
6617
+ Bc,
6592
6618
  {
6593
6619
  messageId: t._id,
6594
6620
  sessionId: e,
@@ -6596,8 +6622,8 @@ function Oc({ message: t, sessionId: e, visitorId: n }) {
6596
6622
  }
6597
6623
  ) });
6598
6624
  }
6599
- function Nc({ messageId: t, sessionId: e, visitorId: n }) {
6600
- const r = A(), [i, o] = C(""), [s, l] = C(""), [a, u] = C(!1), d = fo();
6625
+ function Bc({ messageId: t, sessionId: e, visitorId: n }) {
6626
+ const r = R(), [i, o] = C(""), [s, l] = C(""), [a, u] = C(!1), d = fo();
6601
6627
  async function h(f) {
6602
6628
  if (f.preventDefault(), !a) {
6603
6629
  u(!0);
@@ -6649,17 +6675,22 @@ function Nc({ messageId: t, sessionId: e, visitorId: n }) {
6649
6675
  ),
6650
6676
  /* @__PURE__ */ c("button", { class: "jex-form-submit", type: "submit", disabled: a, children: a ? r.escalationSubmitting : r.escalationSubmit })
6651
6677
  ] }),
6652
- /* @__PURE__ */ c("div", { class: "jex-inline-form-consent", children: r.escalationConsent })
6678
+ /* @__PURE__ */ c("div", { class: "jex-inline-form-consent", children: [
6679
+ r.escalationConsent,
6680
+ " ",
6681
+ /* @__PURE__ */ c("a", { href: "https://jexitychat.de/privacy", target: "_blank", rel: "noopener noreferrer", class: "jex-privacy-notice-link", children: r.escalationPrivacyLinkText }),
6682
+ "."
6683
+ ] })
6653
6684
  ] });
6654
6685
  }
6655
- const zc = {
6686
+ const Fc = {
6656
6687
  crawl: "🌐",
6657
6688
  file: "📄",
6658
6689
  snippet: "💡",
6659
6690
  qa: "❓"
6660
6691
  };
6661
- function Bc({ sources: t }) {
6662
- const e = A(), [n, r] = C(!1);
6692
+ function Uc({ sources: t }) {
6693
+ const e = R(), [n, r] = C(!1);
6663
6694
  return t.length === 0 ? null : /* @__PURE__ */ c("div", { class: "jex-sources-row", children: [
6664
6695
  /* @__PURE__ */ c(
6665
6696
  "button",
@@ -6681,10 +6712,10 @@ function Bc({ sources: t }) {
6681
6712
  }
6682
6713
  ),
6683
6714
  n ? /* @__PURE__ */ c("div", { class: "jex-sources-pills", children: t.map((i, o) => {
6684
- const s = i.sourceType === "crawl", l = Fc(i), a = s && i.url ? `${i.title}
6715
+ const s = i.sourceType === "crawl", l = Qc(i), a = s && i.url ? `${i.title}
6685
6716
  ${i.url}` : i.title, u = /* @__PURE__ */ c(F, { children: [
6686
6717
  typeof i.id == "number" ? /* @__PURE__ */ c("span", { class: "jex-source-id", children: i.id }) : null,
6687
- /* @__PURE__ */ c("span", { class: "jex-source-type", children: zc[i.sourceType] }),
6718
+ /* @__PURE__ */ c("span", { class: "jex-source-type", children: Fc[i.sourceType] }),
6688
6719
  /* @__PURE__ */ c("span", { class: "jex-source-label", children: l }),
6689
6720
  /* @__PURE__ */ c("span", { class: "jex-source-score", children: [
6690
6721
  "· ",
@@ -6706,7 +6737,7 @@ ${i.url}` : i.title, u = /* @__PURE__ */ c(F, { children: [
6706
6737
  }) }) : null
6707
6738
  ] });
6708
6739
  }
6709
- function Fc(t) {
6740
+ function Qc(t) {
6710
6741
  if (t.sourceType === "crawl" && t.url)
6711
6742
  try {
6712
6743
  const e = new URL(t.url);
@@ -6715,19 +6746,19 @@ function Fc(t) {
6715
6746
  }
6716
6747
  return t.title;
6717
6748
  }
6718
- function Uc() {
6749
+ function Dc() {
6719
6750
  return /* @__PURE__ */ c("div", { class: "jex-typing", children: [
6720
6751
  /* @__PURE__ */ c("span", {}),
6721
6752
  /* @__PURE__ */ c("span", {}),
6722
6753
  /* @__PURE__ */ c("span", {})
6723
6754
  ] });
6724
6755
  }
6725
- const Qc = /\s?\[\d+\]/g;
6756
+ const Vc = /\s?\[\d+\]/g;
6726
6757
  function zr(t) {
6727
- return t.replace(Qc, "");
6758
+ return t.replace(Vc, "");
6728
6759
  }
6729
- function Dc({ conversations: t, greeting: e, sessionNotFound: n, resumeFailed: r, onStartFresh: i, sessionId: o, visitorId: s }) {
6730
- const l = A(), a = ue(null), [u, d] = C(null), h = ue(null);
6760
+ function Hc({ conversations: t, greeting: e, sessionNotFound: n, resumeFailed: r, onStartFresh: i, sessionId: o, visitorId: s }) {
6761
+ const l = R(), a = ue(null), [u, d] = C(null), h = ue(null);
6731
6762
  return T(() => {
6732
6763
  if (!s || !t || t.length === 0)
6733
6764
  return;
@@ -6782,19 +6813,19 @@ function Dc({ conversations: t, greeting: e, sessionNotFound: n, resumeFailed: r
6782
6813
  children: l.escalationSkip
6783
6814
  }
6784
6815
  )
6785
- ] }, f._id) : /* @__PURE__ */ c(Oc, { message: f, sessionId: o, visitorId: s }, f._id);
6816
+ ] }, f._id) : /* @__PURE__ */ c(zc, { message: f, sessionId: o, visitorId: s }, f._id);
6786
6817
  if (f.contentType === "escalation-confirm") {
6787
6818
  const g = f.noticeKind === "escalation-confirmed" ? l.noticeEscalationConfirmed.replace("{name}", f.noticeData?.visitorName ?? "").replace("{email}", f.noticeData?.visitorEmail ?? "").replace("{ref}", f.noticeData?.visitorId ?? "") : f.content;
6788
6819
  return /* @__PURE__ */ c(ke, { text: g }, f._id);
6789
6820
  }
6790
6821
  if (f.role === "user")
6791
- return /* @__PURE__ */ c(qc, { text: f.content }, f._id);
6822
+ return /* @__PURE__ */ c(Nc, { text: f.content }, f._id);
6792
6823
  const p = {
6793
6824
  authorId: f.authorId,
6794
6825
  authorName: f.authorName,
6795
6826
  authorImage: f.authorImage
6796
6827
  };
6797
- return f.status === "streaming" && f.content === "" ? /* @__PURE__ */ c(Uc, {}, f._id) : f.status === "streaming" ? /* @__PURE__ */ c(ke, { text: zr(f.content), streaming: !0, ...p }, f._id) : f.status === "error" ? /* @__PURE__ */ c(
6828
+ return f.status === "streaming" && f.content === "" ? /* @__PURE__ */ c(Dc, {}, f._id) : f.status === "streaming" ? /* @__PURE__ */ c(ke, { text: zr(f.content), streaming: !0, ...p }, f._id) : f.status === "error" ? /* @__PURE__ */ c(
6798
6829
  ke,
6799
6830
  {
6800
6831
  text: f.errorMessage ?? `${l.somethingWentWrong}. ${l.tryAgain}.`,
@@ -6804,7 +6835,7 @@ function Dc({ conversations: t, greeting: e, sessionNotFound: n, resumeFailed: r
6804
6835
  f._id
6805
6836
  ) : /* @__PURE__ */ c("div", { children: [
6806
6837
  /* @__PURE__ */ c(ke, { text: zr(f.content), ...p }),
6807
- f.sources && f.sources.length > 0 ? /* @__PURE__ */ c(Bc, { sources: f.sources }) : null
6838
+ f.sources && f.sources.length > 0 ? /* @__PURE__ */ c(Uc, { sources: f.sources }) : null
6808
6839
  ] }, f._id);
6809
6840
  }),
6810
6841
  /* @__PURE__ */ c("div", { ref: a })
@@ -6824,12 +6855,12 @@ function xn({ message: t }) {
6824
6855
  t && /* @__PURE__ */ c("p", { class: "jex-loading-message", children: t })
6825
6856
  ] }) : null;
6826
6857
  }
6827
- function Vc({ sessionId: t, visitorId: e }) {
6858
+ function Wc({ sessionId: t, visitorId: e }) {
6828
6859
  const n = _r(
6829
- Me.functions.chat.public.conversations.listBySession,
6860
+ Le.functions.chat.public.conversations.listBySession,
6830
6861
  t && e ? { sessionId: t, visitorId: e } : "skip"
6831
6862
  ), r = _r(
6832
- Me.functions.chat.public.sessions.getSessionStatus,
6863
+ Le.functions.chat.public.sessions.getSessionStatus,
6833
6864
  t && e ? { sessionId: t, visitorId: e } : "skip"
6834
6865
  ), i = t !== null && n === void 0, o = n?.some((s) => s.status === "streaming") ?? !1;
6835
6866
  return {
@@ -6839,8 +6870,8 @@ function Vc({ sessionId: t, visitorId: e }) {
6839
6870
  isStreaming: o
6840
6871
  };
6841
6872
  }
6842
- function Hc({ greeting: t, orgSlug: e, projSlug: n, sessionId: r, visitorId: i, isLoading: o, sessionNotFound: s, resumeFailed: l, isOrgDeleted: a, ensureSession: u, startFresh: d }) {
6843
- const h = A(), { conversations: f, sessionStatus: p, isLoading: g, isStreaming: m } = Vc({ sessionId: r, visitorId: i }), x = ue(
6873
+ function Jc({ greeting: t, orgSlug: e, projSlug: n, sessionId: r, visitorId: i, isLoading: o, sessionNotFound: s, resumeFailed: l, isOrgDeleted: a, ensureSession: u, startFresh: d }) {
6874
+ const h = R(), { conversations: f, sessionStatus: p, isLoading: g, isStreaming: m } = Wc({ sessionId: r, visitorId: i }), x = ue(
6844
6875
  (() => {
6845
6876
  const I = Ke.peek();
6846
6877
  return I !== null ? I : Ki.peek() ? "resume" : "fresh";
@@ -6857,7 +6888,7 @@ function Hc({ greeting: t, orgSlug: e, projSlug: n, sessionId: r, visitorId: i,
6857
6888
  const v = x === "fresh" && !r, y = x === "resume" && (!r || g);
6858
6889
  return v ? /* @__PURE__ */ c(xn, { message: h.startingConversation }) : y ? /* @__PURE__ */ c(xn, { message: h.resumeConversation }) : /* @__PURE__ */ c(F, { children: [
6859
6890
  /* @__PURE__ */ c(
6860
- Dc,
6891
+ Hc,
6861
6892
  {
6862
6893
  conversations: f,
6863
6894
  greeting: t,
@@ -6869,7 +6900,7 @@ function Hc({ greeting: t, orgSlug: e, projSlug: n, sessionId: r, visitorId: i,
6869
6900
  }
6870
6901
  ),
6871
6902
  /* @__PURE__ */ c(
6872
- Mc,
6903
+ qc,
6873
6904
  {
6874
6905
  sessionId: r,
6875
6906
  visitorId: i,
@@ -6882,8 +6913,8 @@ function Hc({ greeting: t, orgSlug: e, projSlug: n, sessionId: r, visitorId: i,
6882
6913
  )
6883
6914
  ] });
6884
6915
  }
6885
- function Wc({ formMessageId: t, sessionId: e, visitorId: n }) {
6886
- const r = A(), [i, o] = C(""), [s, l] = C(""), a = fo(), [u, d] = C(!1), [h, f] = C(null);
6916
+ function Gc({ formMessageId: t, sessionId: e, visitorId: n }) {
6917
+ const r = R(), [i, o] = C(""), [s, l] = C(""), a = fo(), [u, d] = C(!1), [h, f] = C(null);
6887
6918
  async function p(g) {
6888
6919
  g.preventDefault(), d(!0), f(null);
6889
6920
  try {
@@ -6935,17 +6966,22 @@ function Wc({ formMessageId: t, sessionId: e, visitorId: n }) {
6935
6966
  ),
6936
6967
  /* @__PURE__ */ c("button", { class: "jex-form-submit", type: "submit", disabled: u, children: r.escalationSubmit })
6937
6968
  ] }),
6938
- /* @__PURE__ */ c("div", { class: "jex-inline-form-consent", style: { textAlign: "center", margin: "16px 0 8px 0" }, children: r.escalationConsent }),
6969
+ /* @__PURE__ */ c("div", { class: "jex-inline-form-consent", style: { textAlign: "center", margin: "16px 0 8px 0" }, children: [
6970
+ r.escalationConsent,
6971
+ " ",
6972
+ /* @__PURE__ */ c("a", { href: "https://jexitychat.de/privacy", target: "_blank", rel: "noopener noreferrer", class: "jex-privacy-notice-link", children: r.escalationPrivacyLinkText }),
6973
+ "."
6974
+ ] }),
6939
6975
  /* @__PURE__ */ c("button", { class: "jex-escalation-skip", type: "button", onClick: () => {
6940
6976
  Ct();
6941
6977
  }, children: r.escalationSkip })
6942
6978
  ] });
6943
6979
  }
6944
- function Jc() {
6945
- return It(Me.functions.chat.public.helpdesk.createEscalationRequest);
6980
+ function Kc() {
6981
+ return It(Le.functions.chat.public.helpdesk.createEscalationRequest);
6946
6982
  }
6947
6983
  function Br({ sessionId: t, visitorId: e }) {
6948
- const n = A(), [r, i] = C(!1), [o, s] = C(null), l = Jc();
6984
+ const n = R(), [r, i] = C(!1), [o, s] = C(null), l = Kc();
6949
6985
  async function a() {
6950
6986
  if (!t || !e)
6951
6987
  return;
@@ -6988,7 +7024,7 @@ function Br({ sessionId: t, visitorId: e }) {
6988
7024
  o && /* @__PURE__ */ c("div", { class: "jex-handoff-error", role: "alert", children: o })
6989
7025
  ] });
6990
7026
  }
6991
- async function Gc() {
7027
+ async function Zc() {
6992
7028
  const t = Ui.value;
6993
7029
  if (!t)
6994
7030
  return console.warn("[JexityChat] Bootstrap refresh skipped — inputs missing"), { ok: !1, reason: "no-inputs" };
@@ -7004,7 +7040,7 @@ function Fr(t) {
7004
7040
  function po(t) {
7005
7041
  return t instanceof yt ? t.data?.code === "UNAUTHORIZED_ORIGIN" : !1;
7006
7042
  }
7007
- function Kc(t = 1e4) {
7043
+ function Yc(t = 1e4) {
7008
7044
  return le.value ? Promise.resolve(le.value) : new Promise((e) => {
7009
7045
  let n = !1;
7010
7046
  const r = (s) => {
@@ -7016,17 +7052,17 @@ function Kc(t = 1e4) {
7016
7052
  });
7017
7053
  });
7018
7054
  }
7019
- function Zc(t, e) {
7020
- const n = ue(null), r = Te(!1), i = Te(!1), o = Te(!1), s = Te(null), l = It(Me.functions.chat.public.sessions.createOrResume), a = async (p) => {
7021
- const g = await Kc();
7055
+ function Xc(t, e) {
7056
+ const n = ue(null), r = Te(!1), i = Te(!1), o = Te(!1), s = Te(null), l = It(Le.functions.chat.public.sessions.createOrResume), a = async (p) => {
7057
+ const g = await Yc();
7022
7058
  if (!g)
7023
- return console.warn("[JexityChat] No bootstrap token after 10s — session creation blocked."), je.value = "no-token", null;
7059
+ return console.warn("[JexityChat] No bootstrap token after 10s — session creation blocked."), Se.value = "no-token", null;
7024
7060
  const m = (y) => ({
7025
7061
  orgSlug: t,
7026
7062
  ...e ? { projSlug: e } : {},
7027
7063
  visitorId: p,
7028
7064
  bootstrapToken: y,
7029
- ...St.value ? { source: St.value } : {}
7065
+ ...jt.value ? { source: jt.value } : {}
7030
7066
  });
7031
7067
  dn.value = !0;
7032
7068
  let x;
@@ -7036,15 +7072,15 @@ function Zc(t, e) {
7036
7072
  } catch (y) {
7037
7073
  if (!po(y))
7038
7074
  throw y;
7039
- const I = await Gc();
7075
+ const I = await Zc();
7040
7076
  if (!I.ok)
7041
- return je.value = I.reason === "rate_limited" ? "network" : "unauthorized", null;
7077
+ return Se.value = I.reason === "rate_limited" ? "network" : "unauthorized", null;
7042
7078
  x = await l(m(I.token));
7043
7079
  }
7044
7080
  } finally {
7045
7081
  dn.value = !1;
7046
7082
  }
7047
- je.value = null, s.value = x.status;
7083
+ Se.value = null, s.value = x.status;
7048
7084
  const v = { sessionId: x.sessionId, visitorId: p };
7049
7085
  return n.current = v, { session: v, result: x };
7050
7086
  }, u = Re(async () => {
@@ -7053,12 +7089,12 @@ function Zc(t, e) {
7053
7089
  if (o.value)
7054
7090
  return null;
7055
7091
  r.value = !0;
7056
- const p = xe.value !== null, g = xe.value ?? Sr();
7092
+ const p = xe.value !== null, g = xe.value ?? jr();
7057
7093
  try {
7058
7094
  const m = await a(g);
7059
7095
  return m ? (p && m.result.isNew && (i.value = !0, o.value = !0), m.session) : null;
7060
7096
  } catch (m) {
7061
- return console.error("[JexityChat] Failed to create session:", m), je.value = Fr(m), null;
7097
+ return console.error("[JexityChat] Failed to create session:", m), Se.value = Fr(m), null;
7062
7098
  } finally {
7063
7099
  r.value = !1;
7064
7100
  }
@@ -7068,12 +7104,12 @@ function Zc(t, e) {
7068
7104
  T(() => ol(d), [d]);
7069
7105
  const h = Re(async () => {
7070
7106
  n.current = null, o.value = !1, i.value = !1;
7071
- const p = Sr();
7107
+ const p = jr();
7072
7108
  r.value = !0;
7073
7109
  try {
7074
7110
  return (await a(p))?.session ?? null;
7075
7111
  } catch (g) {
7076
- return console.error("[JexityChat] Failed to create fresh session:", g), je.value = Fr(g), null;
7112
+ return console.error("[JexityChat] Failed to create fresh session:", g), Se.value = Fr(g), null;
7077
7113
  } finally {
7078
7114
  r.value = !1;
7079
7115
  }
@@ -7091,8 +7127,8 @@ function Zc(t, e) {
7091
7127
  resetSession: d
7092
7128
  };
7093
7129
  }
7094
- function Yc() {
7095
- const t = A(), [e, n] = C(""), [r, i] = C(""), [o, s] = C("");
7130
+ function eu() {
7131
+ const t = R(), [e, n] = C(""), [r, i] = C(""), [o, s] = C("");
7096
7132
  async function l(a) {
7097
7133
  a.preventDefault(), hn({ id: "loading", message: t.submittingTicket }), await new Promise((d) => {
7098
7134
  setTimeout(d, 1200);
@@ -7147,8 +7183,8 @@ function Yc() {
7147
7183
  ] })
7148
7184
  ] });
7149
7185
  }
7150
- function Xc({ ticketRef: t }) {
7151
- const e = A();
7186
+ function tu({ ticketRef: t }) {
7187
+ const e = R();
7152
7188
  return /* @__PURE__ */ c("div", { class: "jex-confirmation", children: [
7153
7189
  /* @__PURE__ */ c("div", { class: "jex-confirmation-icon", "aria-hidden": "true", children: "✓" }),
7154
7190
  /* @__PURE__ */ c("h2", { class: "jex-confirmation-title", children: e.ticketSubmitted }),
@@ -7167,8 +7203,8 @@ function Xc({ ticketRef: t }) {
7167
7203
  )
7168
7204
  ] });
7169
7205
  }
7170
- function eu({ message: t, onRetry: e, onBack: n }) {
7171
- const r = A();
7206
+ function nu({ message: t, onRetry: e, onBack: n }) {
7207
+ const r = R();
7172
7208
  return /* @__PURE__ */ c("div", { class: "jex-overlay jex-error", children: [
7173
7209
  /* @__PURE__ */ c("p", { class: "jex-error-message", children: t }),
7174
7210
  /* @__PURE__ */ c("div", { class: "jex-error-actions", children: [
@@ -7184,18 +7220,18 @@ function Ur({ greeting: t, title: e, orgSlug: n, projSlug: r, sessionId: i, visi
7184
7220
  return /* @__PURE__ */ c("div", { class: "jex-screen-container", children: [
7185
7221
  g.id === "home" && /* @__PURE__ */ c(yl, { greeting: t, title: e, onStartFresh: h, onResetSession: f }),
7186
7222
  g.id === "selection" && /* @__PURE__ */ c(vl, { title: e }),
7187
- g.id === "form" && /* @__PURE__ */ c(Yc, {}),
7223
+ g.id === "form" && /* @__PURE__ */ c(eu, {}),
7188
7224
  g.id === "escalation-form" && /* @__PURE__ */ c(
7189
- Wc,
7225
+ Gc,
7190
7226
  {
7191
7227
  formMessageId: g.formMessageId,
7192
7228
  sessionId: g.sessionId,
7193
7229
  visitorId: g.visitorId
7194
7230
  }
7195
7231
  ),
7196
- g.id === "confirmation" && m && /* @__PURE__ */ c(Xc, { ticketRef: m.ref }),
7232
+ g.id === "confirmation" && m && /* @__PURE__ */ c(tu, { ticketRef: m.ref }),
7197
7233
  g.id === "chat" && /* @__PURE__ */ c(
7198
- Hc,
7234
+ Jc,
7199
7235
  {
7200
7236
  greeting: t,
7201
7237
  orgSlug: n,
@@ -7212,7 +7248,7 @@ function Ur({ greeting: t, title: e, orgSlug: n, projSlug: r, sessionId: i, visi
7212
7248
  ),
7213
7249
  g.id === "loading" && /* @__PURE__ */ c(xn, { message: g.message }),
7214
7250
  g.id === "error" && /* @__PURE__ */ c(
7215
- eu,
7251
+ nu,
7216
7252
  {
7217
7253
  message: g.message,
7218
7254
  onRetry: () => hn({ id: "loading" }),
@@ -7221,7 +7257,7 @@ function Ur({ greeting: t, title: e, orgSlug: n, projSlug: r, sessionId: i, visi
7221
7257
  )
7222
7258
  ] });
7223
7259
  }
7224
- function tu({ options: t }) {
7260
+ function ru({ options: t }) {
7225
7261
  return Qa({
7226
7262
  orgSlug: t.orgSlug,
7227
7263
  projSlug: t.projSlug,
@@ -7229,14 +7265,14 @@ function tu({ options: t }) {
7229
7265
  convexUrl: t.convexUrl,
7230
7266
  preAllowedUrls: t.allowedUrls ?? [],
7231
7267
  preExcludedPaths: t.excludePaths
7232
- }), Ha() ? /* @__PURE__ */ c(nu, { options: t }) : null;
7268
+ }), Ha() ? /* @__PURE__ */ c(iu, { options: t }) : null;
7233
7269
  }
7234
- function nu({ options: t }) {
7270
+ function iu({ options: t }) {
7235
7271
  const e = Fa(t.orgSlug, t.projSlug, t.convexUrl);
7236
7272
  Ya(t.parentOrigin), T(() => {
7237
7273
  tl(), nl();
7238
7274
  }, []);
7239
- const { sessionId: n, visitorId: r, isLoading: i, sessionNotFound: o, resumeFailed: s, isOrgDeleted: l, ensureSession: a, startFresh: u, resetSession: d } = Zc(t.orgSlug, t.projSlug), h = za(t, e);
7275
+ const { sessionId: n, visitorId: r, isLoading: i, sessionNotFound: o, resumeFailed: s, isOrgDeleted: l, ensureSession: a, startFresh: u, resetSession: d } = Xc(t.orgSlug, t.projSlug), h = za(t, e);
7240
7276
  T(() => {
7241
7277
  An.value = Hi(h.locale);
7242
7278
  }, [h.locale]), T(() => {
@@ -7339,34 +7375,34 @@ function nu({ options: t }) {
7339
7375
  }
7340
7376
  );
7341
7377
  }
7342
- const ru = '.jex-widget{--jex-primary: #115A62;--jex-primary-hover: var(--jex-accent, color-mix(in srgb, var(--jex-primary) 85%, #000));--jex-radius: .75rem;--jex-font-family: "Inter", system-ui, -apple-system, sans-serif;--jex-font-size: 14px;--jex-window-width: 380px;--jex-window-height: 600px;--jex-shadow: 0 16px 48px -12px rgba(13, 127, 138, .25), 0 4px 16px rgba(0, 0, 0, .08);pointer-events:auto;--jex-bg-trigger: var(--jex-primary);--jex-bg-header: var(--jex-primary);--jex-bg-msg-user: var(--jex-primary);--jex-bg-send-btn: var(--jex-primary);--jex-bg-window: rgba(255, 255, 255, .95);--jex-bg-msg-bot: #f1f5f9;--jex-bg-input: rgba(247, 253, 253, .6);--jex-text-header: #ffffff;--jex-text-msg-user: #ffffff;--jex-text-msg-bot: #0f172a;--jex-text-main: #0f172a;--jex-text-muted: #64748b;--jex-bg-avatar-agent: #d1fae5;--jex-text-avatar-agent: #065f46;--jex-border-window: rgba(226, 232, 240, .8);--jex-border-input: rgba(203, 213, 225, .8);--jex-bg-glass: var(--jex-bg-window);--jex-border-glass: var(--jex-border-window);font-family:var(--jex-font-family);-webkit-font-smoothing:antialiased}.dark .jex-widget,.jex-widget.dark{--jex-primary: #1cb0bf;--jex-primary-hover: var(--jex-accent, color-mix(in srgb, var(--jex-primary) 85%, #000));--jex-bg-window: rgba(10, 15, 26, .95);--jex-bg-msg-bot: #233146;--jex-bg-input: rgba(10, 15, 26, .6);--jex-text-msg-bot: #f8fafc;--jex-text-main: #f8fafc;--jex-text-muted: #94a3b8;--jex-border-window: rgba(30, 41, 59, .8);--jex-border-input: rgba(51, 65, 85, .9);--jex-bg-avatar-agent: #064e3b;--jex-text-avatar-agent: #6ee7b7;--jex-bg-error: #3b1318;--jex-border-error: #5c1d24;--jex-text-error: #fca5a5}@media(prefers-color-scheme:dark){:host:not(.light) .jex-widget:not(.light){--jex-primary: #1cb0bf;--jex-primary-hover: var(--jex-accent, color-mix(in srgb, var(--jex-primary) 85%, #000));--jex-bg-window: rgba(10, 15, 26, .95);--jex-bg-msg-bot: #233146;--jex-bg-input: rgba(10, 15, 26, .6);--jex-text-msg-bot: #f8fafc;--jex-text-main: #f8fafc;--jex-text-muted: #94a3b8;--jex-border-window: rgba(30, 41, 59, .8);--jex-border-input: rgba(51, 65, 85, .9);--jex-bg-error: #3b1318;--jex-border-error: #5c1d24;--jex-text-error: #fca5a5}}.jex-widget *{box-sizing:border-box;margin:0;padding:0}.jex-container{position:fixed;bottom:24px;right:24px;display:flex;flex-direction:column;align-items:flex-end;gap:16px;z-index:9999}.jex-container.jex-pos-left{right:auto;left:24px;align-items:flex-start}:host(.jex-mode-embedded){display:block;width:100%;height:100%}:host(.jex-mode-embedded) .jex-widget{width:100%;height:100%}.jex-embedded{display:flex;flex-direction:column;width:100%;height:100%;background:var(--jex-bg-window);border:1px solid var(--jex-border-window);overflow:hidden}.jex-embedded .jex-screen-container{flex:1;overflow:hidden;display:flex;flex-direction:column}.jex-floating-button{height:56px;min-width:56px;padding:0;background:var(--jex-bg-trigger);color:var(--jex-text-header);border:none;cursor:pointer;display:flex;align-items:center;justify-content:center;box-shadow:var(--jex-shadow);transition:transform .3s cubic-bezier(.175,.885,.32,1.275),background .2s,width .3s ease,border-radius .3s ease}.jex-floating-button.jex-has-label{min-width:110px;padding:0 20px}.jex-fab-inner{display:flex;align-items:center;gap:12px}.jex-fab-label{font-size:15px;font-weight:600;white-space:nowrap}.jex-floating-button:hover{transform:scale(1.1);background:var(--jex-primary-hover)}.jex-floating-button:active{transform:scale(.95)}.jex-chat-window{width:var(--jex-window-width);height:var(--jex-window-height);max-height:calc(100vh - 120px);background:var(--jex-bg-window);backdrop-filter:blur(24px);-webkit-backdrop-filter:blur(24px);border:1px solid var(--jex-border-window);border-radius:calc(var(--jex-radius) * 2);box-shadow:var(--jex-shadow);display:flex;flex-direction:column;overflow:hidden;animation:jexSlideUp .4s cubic-bezier(.16,1,.3,1);transform-origin:bottom right;touch-action:manipulation}@keyframes jexSlideUp{0%{opacity:0;transform:scale(.8) translateY(20px)}to{opacity:1;transform:scale(1) translateY(0)}}@media(max-width:480px),(pointer:coarse)and (max-width:768px){.jex-chat-window{position:fixed;inset:0;width:100vw;height:100vh;height:100dvh;max-height:none;border:none;border-radius:0;animation:jexSlideUpMobile .3s cubic-bezier(.16,1,.3,1);transform-origin:bottom center}.jex-container:has(.jex-chat-window) .jex-floating-button{display:none}}@keyframes jexSlideUpMobile{0%{opacity:0;transform:translateY(100%)}to{opacity:1;transform:translateY(0)}}.jex-chat-header{padding:20px;background:var(--jex-bg-header);color:var(--jex-text-header);display:flex;align-items:center;gap:12px;flex-shrink:0}.jex-header-info h3{font-size:16px;font-weight:600;color:var(--jex-text-header);margin:0}.jex-header-info p{font-size:12px;opacity:.8;color:var(--jex-text-header);margin:0}.jex-header-right{margin-left:auto;display:flex;align-items:center;gap:4px}.jex-header-handoff{display:inline-flex;align-items:center;justify-content:center;width:32px;height:32px;background:transparent;border:1px solid color-mix(in srgb,currentColor 50%,transparent);border-radius:999px;padding:0;color:inherit;cursor:pointer;transition:background .15s ease,border-color .15s ease}.jex-header-handoff:hover:not(:disabled){background:color-mix(in srgb,currentColor 12%,transparent);border-color:currentColor}.jex-header-handoff:disabled{opacity:.5;cursor:not-allowed}.jex-header-close{display:inline-flex;align-items:center;justify-content:center;width:32px;height:32px;background:transparent;border:none;border-radius:999px;padding:0;color:inherit;cursor:pointer;transition:background .15s ease}.jex-header-close:hover{background:color-mix(in srgb,currentColor 14%,transparent)}.jex-handoff-error{position:absolute;top:100%;right:8px;background:#fee;color:#b00;padding:4px 8px;font-size:12px;border-radius:4px}.jex-header-back{background:none;border:none;color:var(--jex-text-header);cursor:pointer;padding:4px;display:flex;align-items:center;opacity:.8;transition:opacity .2s;flex-shrink:0}.jex-header-back:hover{opacity:1}.jex-screen-container{flex:1;overflow:hidden;display:flex;flex-direction:column}.jex-home{flex:1;display:flex;flex-direction:column;padding:24px;gap:20px;overflow-y:auto}.jex-home-hero{display:flex;align-items:center;gap:14px;animation:jexFadeIn .4s ease both}.jex-home-avatar{position:relative;width:48px;height:48px;border-radius:14px;background:var(--jex-primary);color:var(--jex-text-header);display:flex;align-items:center;justify-content:center;flex-shrink:0;box-shadow:0 4px 12px color-mix(in srgb,var(--jex-primary) 30%,transparent)}.jex-home-status-dot{position:absolute;bottom:-2px;right:-2px;width:14px;height:14px;border-radius:50%;background:#22c55e;border:2.5px solid var(--jex-bg-window);animation:jexPulse 2s ease-in-out infinite}@keyframes jexPulse{0%,to{box-shadow:0 0 #22c55e66}50%{box-shadow:0 0 0 6px #22c55e00}}.jex-home-hero-text{display:flex;flex-direction:column;gap:2px;min-width:0}.jex-home-title{font-size:17px;font-weight:700;color:var(--jex-text-main);margin:0;line-height:1.2;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.jex-home-status{font-size:12px;font-weight:500;color:#22c55e;letter-spacing:.02em}.jex-home-greeting{background:var(--jex-bg-msg-bot);border:1px solid var(--jex-border-window);border-radius:4px 16px 16px;padding:16px 18px;font-size:14px;line-height:1.55;color:var(--jex-text-main);animation:jexFadeIn .4s .1s ease both}.jex-home-greeting p{margin:0}@keyframes jexFadeIn{0%{opacity:0;transform:translateY(8px)}to{opacity:1;transform:translateY(0)}}.jex-home-actions{display:flex;flex-direction:column;gap:10px;animation:jexFadeIn .4s .2s ease both}.jex-home-start-btn{background:var(--jex-bg-send-btn);color:var(--jex-text-header);border:none;border-radius:12px;padding:14px 20px;font-size:15px;font-weight:600;cursor:pointer;font-family:inherit;transition:background .2s,transform .15s,box-shadow .2s;width:100%;box-shadow:0 2px 8px color-mix(in srgb,var(--jex-primary) 25%,transparent)}.jex-home-start-btn:hover{background:var(--jex-primary-hover);transform:translateY(-1px);box-shadow:0 4px 16px color-mix(in srgb,var(--jex-primary) 35%,transparent)}.jex-home-start-btn:active{transform:translateY(0);box-shadow:0 1px 4px color-mix(in srgb,var(--jex-primary) 20%,transparent)}.jex-home-resume-card{display:flex;flex-direction:column;gap:8px;width:100%;text-align:left;padding:16px 18px;border-radius:14px;border:1.5px solid var(--jex-primary);background:color-mix(in srgb,var(--jex-primary) 6%,var(--jex-bg-window));cursor:pointer;font-family:inherit;transition:background .2s,border-color .2s,transform .15s,box-shadow .2s;box-shadow:0 2px 8px color-mix(in srgb,var(--jex-primary) 12%,transparent)}.jex-home-resume-card:hover{background:color-mix(in srgb,var(--jex-primary) 10%,var(--jex-bg-window));transform:translateY(-1px);box-shadow:0 4px 16px color-mix(in srgb,var(--jex-primary) 20%,transparent)}.jex-home-resume-card:active{transform:translateY(0)}.jex-home-resume-top{display:flex;align-items:center;justify-content:space-between}.jex-home-resume-label{font-size:14px;font-weight:600;color:var(--jex-primary)}.jex-home-resume-arrow{color:var(--jex-primary);opacity:.6;transition:opacity .2s,transform .2s}.jex-home-resume-card:hover .jex-home-resume-arrow{opacity:1;transform:translate(2px)}.jex-home-resume-ref{font-family:ui-monospace,Cascadia Code,Fira Code,monospace;font-size:13px;font-weight:600;letter-spacing:.06em;color:var(--jex-text-muted)}.jex-home-history{display:flex;flex-direction:column;gap:8px}.jex-home-resume-meta{font-size:11px;opacity:.7;margin-top:4px}.jex-home-new-btn{background:transparent;color:var(--jex-text-muted);border:1px solid var(--jex-border-input);border-radius:12px;padding:12px 20px;font-size:14px;font-weight:500;cursor:pointer;font-family:inherit;transition:color .2s,border-color .2s,background .2s;width:100%}.jex-home-new-btn:hover{color:var(--jex-text-main);border-color:var(--jex-text-muted);background:color-mix(in srgb,var(--jex-primary) 3%,transparent)}.jex-session-ref{display:flex;align-items:center;gap:8px;padding:8px 12px;background:var(--jex-bg-msg-bot);border:1px solid var(--jex-border-window);border-radius:8px;font-size:12px}.jex-session-ref-label{color:var(--jex-text-muted);font-weight:500}.jex-session-ref-code{color:var(--jex-primary);font-weight:700;font-family:ui-monospace,Cascadia Code,monospace;letter-spacing:.05em}.jex-chat-messages{flex:1;padding:20px;overflow-y:auto;display:flex;flex-direction:column;gap:12px}.jex-message-row{display:flex;align-items:flex-end;gap:8px;max-width:85%}.jex-message-row.bot{align-self:flex-start}.jex-message-content{flex:1;min-width:0}.jex-avatar{width:24px;height:24px;border-radius:50%;flex-shrink:0;display:flex;align-items:center;justify-content:center;font-size:12px;margin-bottom:2px}.jex-avatar-bot{background:var(--jex-bg-msg-bot);color:var(--jex-primary)}.jex-avatar-agent{background:var(--jex-bg-avatar-agent)}.jex-avatar-img{width:100%;height:100%;border-radius:50%;object-fit:cover}.jex-avatar-initials{font-size:9px;font-weight:700;color:var(--jex-text-avatar-agent)}.jex-message-author-row{display:flex;align-items:center;gap:6px;margin-top:2px;padding-left:4px}.jex-message-author{font-size:10px;color:var(--jex-text-muted)}.jex-reply-tag-btn{display:inline-flex;align-items:center;justify-content:center;width:16px;height:16px;padding:0;border:none;border-radius:4px;background:transparent;color:var(--jex-text-muted, #6b7280);cursor:pointer;transition:background .15s,color .15s}.jex-reply-tag-btn:hover{background:#0000000f;color:var(--jex-primary, #115A62)}.jex-reply-tag-btn:focus-visible{outline:2px solid var(--jex-primary, #115A62);outline-offset:1px}.jex-message{padding:12px 16px;border-radius:18px;font-size:14px;line-height:1.4}.jex-message.bot{background:var(--jex-bg-msg-bot);border:1px solid var(--jex-border-window);color:var(--jex-text-msg-bot);border-bottom-left-radius:4px}.jex-message.user{align-self:flex-end;max-width:80%;background:var(--jex-bg-msg-user);color:var(--jex-text-msg-user);border-bottom-right-radius:4px}.jex-typing{align-self:flex-start;display:flex;gap:4px;padding:12px 16px}.jex-typing span{width:8px;height:8px;border-radius:50%;background:var(--jex-text-muted);animation:jexTypingDot 1.2s infinite ease-in-out}.jex-typing span:nth-child(2){animation-delay:.2s}.jex-typing span:nth-child(3){animation-delay:.4s}@keyframes jexTypingDot{0%,80%,to{transform:scale(.8);opacity:.4}40%{transform:scale(1);opacity:1}}.jex-md{word-break:break-word;overflow-wrap:anywhere}.jex-md p{margin:0 0 8px}.jex-md p:last-child{margin-bottom:0}.jex-md strong{font-weight:600}.jex-md em{font-style:italic}.jex-md ul,.jex-md ol{margin:0 0 8px;padding-left:20px}.jex-md ul:last-child,.jex-md ol:last-child{margin-bottom:0}.jex-md ul{list-style-type:disc}.jex-md ol{list-style-type:decimal}.jex-md li{margin-bottom:2px}.jex-md li:last-child{margin-bottom:0}.jex-md a{color:var(--jex-primary);text-decoration:underline;text-underline-offset:2px}.jex-md a:hover{opacity:.8}.jex-md code{background:#00000014;padding:1px 5px;border-radius:4px;font-size:.9em;font-family:ui-monospace,Cascadia Code,Fira Code,monospace}.jex-md pre{background:#0000000f;border-radius:8px;padding:10px 12px;margin:0 0 8px;overflow-x:auto;font-size:.85em}.jex-md pre:last-child{margin-bottom:0}.jex-md pre code{background:none;padding:0;border-radius:0;font-size:inherit}.jex-md h1,.jex-md h2,.jex-md h3,.jex-md h4{font-weight:600;margin:8px 0 4px}.jex-md h1:first-child,.jex-md h2:first-child,.jex-md h3:first-child,.jex-md h4:first-child{margin-top:0}.jex-md h3{font-size:1em}.jex-md h4{font-size:.95em}.jex-md hr{border:none;border-top:1px solid var(--jex-border-window);margin:8px 0}.jex-md blockquote{border-left:3px solid var(--jex-primary);margin:0 0 8px;padding:4px 12px;color:var(--jex-text-muted)}.jex-md blockquote:last-child{margin-bottom:0}.dark .jex-md code,.jex-widget.dark .jex-md code{background:#ffffff1a}.dark .jex-md pre,.jex-widget.dark .jex-md pre{background:#ffffff14}@media(prefers-color-scheme:dark){:host:not(.light) .jex-widget:not(.light) .jex-md code{background:#ffffff1a}:host:not(.light) .jex-widget:not(.light) .jex-md pre{background:#ffffff14}}.jex-streaming-cursor:after{content:"◊";margin-left:2px;animation:jexBlinkCursor .8s ease-in-out infinite}@keyframes jexBlinkCursor{0%,to{opacity:1}50%{opacity:0}}.jex-session-notice{align-self:center;text-align:center;padding:8px 16px;margin:8px 0;font-size:12px;color:var(--jex-text-muted);background:var(--jex-bg-input, #f1f5f9);border-radius:8px;line-height:1.4}.jex-message-error{background:var(--jex-bg-error, #fef2f2)!important;border-color:var(--jex-border-error, #fecaca)!important;color:var(--jex-text-error, #991b1b)!important}.jex-chat-input{padding:12px 16px;border-top:1px solid var(--jex-border-window);display:flex;flex-direction:column;gap:8px;flex-shrink:0}.jex-composer-card{display:flex;flex-direction:column;gap:6px;padding:10px 12px 8px;background:var(--jex-bg-input);border:1px solid var(--jex-border-input);border-radius:16px;cursor:text;transition:border-color .15s ease,background .15s ease,box-shadow .15s ease}.jex-composer-card:focus-within{border-color:var(--jex-primary);background:var(--jex-bg-window);box-shadow:0 0 0 3px color-mix(in srgb,var(--jex-primary, #115A62) 14%,transparent)}.jex-composer-attachments{display:flex;flex-wrap:wrap;gap:6px;padding:2px 2px 4px}.jex-attachment-chip{position:relative;width:44px;height:44px;border-radius:8px;overflow:hidden;background:var(--jex-bg-msg-bot, #f1f5f9);flex-shrink:0;box-shadow:0 1px 2px #0000000f}.jex-attachment-thumb{width:100%;height:100%;object-fit:cover;display:block;pointer-events:none}.jex-attachment-remove{position:absolute;top:2px;right:2px;width:16px;height:16px;padding:0;border:none;border-radius:50%;background:#0f172ac7;color:#fff;display:inline-flex;align-items:center;justify-content:center;cursor:pointer;opacity:0;transition:opacity .12s ease,transform .12s ease}.jex-attachment-chip:hover .jex-attachment-remove,.jex-attachment-chip:focus-within .jex-attachment-remove{opacity:1}.jex-attachment-remove:hover{transform:scale(1.08)}.jex-composer-textarea{width:100%;min-height:22px;background:transparent;border:none;outline:none;resize:none;padding:2px 4px;color:var(--jex-text-main);font-family:inherit;font-size:16px;line-height:1.45;overflow-y:hidden}.jex-composer-textarea::placeholder{color:var(--jex-text-muted);opacity:.85}.jex-composer-textarea:disabled{cursor:not-allowed;opacity:.7}.jex-composer-actions{display:flex;align-items:center;justify-content:space-between;gap:8px}.jex-composer-actions-left{display:inline-flex;align-items:center;gap:4px}.jex-attach-btn{width:30px;height:30px;padding:0;border:none;border-radius:50%;background:transparent;color:var(--jex-text-muted);display:inline-flex;align-items:center;justify-content:center;cursor:pointer;transition:background .12s ease,color .12s ease,transform .12s ease}.jex-attach-btn:hover:not(:disabled){background:color-mix(in srgb,var(--jex-text-muted, #64748b) 12%,transparent);color:var(--jex-text-main)}.jex-attach-btn:active:not(:disabled){transform:scale(.92)}.jex-attach-btn:disabled{opacity:.4;cursor:not-allowed}.jex-visually-hidden{position:absolute;width:1px;height:1px;padding:0;margin:-1px;overflow:hidden;clip:rect(0,0,0,0);white-space:nowrap;border:0}.jex-rate-limit-notice{flex:1 0 100%;order:-1;margin-bottom:8px;padding:8px 12px;border-radius:10px;background:var(--jex-bg-msg-bot, #f1f5f9);color:var(--jex-text-muted, #64748b);font-size:12px;line-height:1.4;text-align:center}.jex-session-error-notice{flex:1 0 100%;order:-1;margin-bottom:8px;padding:8px 12px;border-radius:10px;background:var(--jex-bg-error, #fef2f2);border:1px solid var(--jex-border-error, #fecaca);color:var(--jex-text-error, #991b1b);font-size:12px;line-height:1.4;text-align:center}.jex-chat-input input{flex:1;background:var(--jex-bg-input);border:1px solid var(--jex-border-input);border-radius:12px;padding:10px 14px;color:var(--jex-text-main);outline:none;font-family:inherit;font-size:14px}.jex-chat-input input:focus{border-color:var(--jex-primary)}.jex-send-btn{background:color-mix(in srgb,var(--jex-text-muted, #64748b) 18%,transparent);color:var(--jex-text-muted);border:none;border-radius:999px;width:30px;height:30px;display:inline-flex;align-items:center;justify-content:center;cursor:pointer;transition:background .15s ease,color .15s ease,opacity .15s ease,transform .15s ease;flex-shrink:0}.jex-send-btn-active{background:var(--jex-bg-send-btn, var(--jex-primary));color:var(--jex-text-header, #fff)}.jex-send-btn-active:hover:not(:disabled){background:var(--jex-primary-hover)}.jex-send-btn:active:not(:disabled){transform:scale(.9)}.jex-send-btn:disabled{opacity:.45;cursor:default}.jex-widget-footer{display:flex;align-items:center;justify-content:center;padding:8px 16px;border-top:1px solid var(--jex-border-glass);background:#00000005;flex-shrink:0}.jex-widget.dark .jex-widget-footer{background:#ffffff05}@media(prefers-color-scheme:dark){:host:not(.light) .jex-widget:not(.light) .jex-widget-footer{background:#ffffff05}}.jex-branding{display:flex;align-items:center;gap:6px;text-decoration:none;color:var(--jex-text-muted);font-size:11px;font-weight:500;transition:color .2s}.jex-branding:hover{color:var(--jex-text-main)}.jex-branding-icon{color:var(--jex-primary)}.jex-branding span strong{font-weight:700;color:var(--jex-text-main)}.jex-locale-select-wrapper{position:relative;display:flex;align-items:center}.jex-locale-select{appearance:none;-webkit-appearance:none;background:transparent;border:1px solid transparent;padding:4px 20px 4px 6px;border-radius:6px;font-family:inherit;font-size:11px;font-weight:600;color:var(--jex-text-muted);background-color:transparent;cursor:pointer;outline:none;transition:all .2s ease}.jex-locale-select option{background-color:#fff;color:#0f172a}.jex-locale-select:hover,.jex-locale-select:focus-visible{color:var(--jex-text-main);background:#0000000a}.jex-widget.dark .jex-locale-select:hover,.jex-widget.dark .jex-locale-select:focus-visible{background:#ffffff0d}.jex-widget.dark .jex-locale-select option{background-color:#0f172a;color:#f8fafc}@media(prefers-color-scheme:dark){:host:not(.light) .jex-widget:not(.light) .jex-locale-select:hover,:host:not(.light) .jex-widget:not(.light) .jex-locale-select:focus-visible{background:#ffffff0d}:host:not(.light) .jex-widget:not(.light) .jex-locale-select option{background-color:#0f172a;color:#f8fafc}}.jex-locale-select:focus-visible{border-color:var(--jex-primary)}.jex-locale-chevron{position:absolute;right:4px;pointer-events:none;color:var(--jex-text-muted);transition:color .2s ease}.jex-locale-select-wrapper:hover .jex-locale-chevron{color:var(--jex-text-main)}.jex-overlay{position:absolute;inset:0;display:flex;flex-direction:column;align-items:center;justify-content:center;gap:12px;background:var(--jex-bg-window, #fff);z-index:10;padding:24px;text-align:center}.jex-loading-spinner{width:32px;height:32px;border:3px solid var(--jex-border-input, #e2e8f0);border-top-color:var(--jex-primary, #115A62);border-radius:50%;animation:jex-spin .7s linear infinite}@keyframes jex-spin{to{transform:rotate(360deg)}}.jex-loading-message{font-size:14px;color:var(--jex-text-muted, #64748b)}.jex-error-message{font-size:14px;color:var(--jex-text-main, #334155)}.jex-error-actions{display:flex;gap:8px}.jex-error-retry,.jex-error-back{padding:8px 16px;border-radius:8px;font-size:13px;font-weight:600;cursor:pointer;border:none}.jex-error-retry{background:var(--jex-primary, #115A62);color:#fff}.jex-error-back{background:transparent;color:var(--jex-text-muted, #64748b);border:1px solid var(--jex-border-input, #e2e8f0)}.jex-selection{display:flex;flex-direction:column;gap:12px;padding:24px 16px;height:100%}.jex-selection-title{font-size:16px;font-weight:700;color:var(--jex-text-main, #0f172a);margin:0 0 8px}.jex-selection-options{display:flex;flex-direction:column;gap:10px}.jex-selection-option{display:flex;flex-direction:column;align-items:flex-start;gap:2px;padding:16px;border-radius:12px;border:1px solid var(--jex-border-window, #e2e8f0);background:transparent;cursor:pointer;text-align:left;transition:border-color .15s ease,background .15s ease}.jex-selection-option:hover{border-color:var(--jex-primary, #115A62);background:color-mix(in srgb,var(--jex-primary, #115A62) 5%,transparent)}.jex-selection-icon{font-size:20px}.jex-selection-label{font-size:14px;font-weight:600;color:var(--jex-text-main, #0f172a)}.jex-selection-sub{font-size:12px;color:var(--jex-text-muted, #64748b)}.jex-form-screen{display:flex;flex-direction:column;padding:20px 16px;height:100%;overflow-y:auto}.jex-form-title{font-size:16px;font-weight:700;color:var(--jex-text-main, #0f172a);margin:0 0 16px}.jex-form{display:flex;flex-direction:column;gap:10px}.jex-form-input,.jex-form-textarea{padding:10px 12px;border-radius:8px;border:1px solid var(--jex-border-input, #e2e8f0);font-size:14px;background:transparent;color:var(--jex-text-main, #0f172a);outline:none}@media(pointer:coarse){.jex-form-input,.jex-form-textarea{font-size:16px}}.jex-form-input:focus,.jex-form-textarea:focus{border-color:var(--jex-primary, #115A62)}.jex-form-textarea{min-height:80px;resize:vertical}.jex-form-submit{padding:10px;border-radius:8px;border:none;background:var(--jex-primary, #115A62);color:#fff;font-size:14px;font-weight:600;cursor:pointer;margin-top:4px}.jex-inline-form{display:flex;flex-direction:column;gap:8px;padding:12px;background:var(--jex-bg-msg-bot, #f1f5f9);border:1px solid var(--jex-border-input, #e2e8f0);border-radius:var(--jex-radius, .75rem);width:100%}.jex-inline-form-title{font-weight:600;font-size:15px;color:var(--jex-text-main, #0f172a);margin:0}.jex-inline-form-subtitle{font-size:13px;color:var(--jex-text-muted, #64748b);line-height:1.4;margin:0 0 4px}.jex-inline-form-consent{font-size:11px;color:var(--jex-text-muted, #64748b);line-height:1.3;margin-top:4px;text-align:center}.jex-inline-form .jex-form-submit:disabled{opacity:.7;cursor:not-allowed}.jex-escalation-subtitle{font-size:13px;color:var(--jex-text-muted, #64748b);line-height:1.45;margin:0 0 8px}.jex-escalation-skip{padding:8px 12px;border:none;background:transparent;color:var(--jex-text-muted, #64748b);font-size:13px;cursor:pointer;text-decoration:underline;text-underline-offset:2px;text-align:center}.jex-escalation-skip:hover{color:var(--jex-text-main, #0f172a)}.jex-inline-form-card{position:relative;padding:14px;gap:8px}.jex-inline-form-dismiss{position:absolute;top:10px;right:10px;width:24px;height:24px;border-radius:50%;border:1px solid var(--jex-border-input, #e2e8f0);background:var(--jex-bg-window, #fff);color:var(--jex-text-muted, #64748b);font-size:12px;cursor:pointer;display:flex;align-items:center;justify-content:center;line-height:1}.jex-inline-form-dismiss:hover{background:var(--jex-bg-msg-bot, #f1f5f9);color:var(--jex-text-main, #0f172a)}.jex-inline-form-submitted{display:flex;align-items:center;gap:10px;padding:10px 12px;background:var(--jex-bg-msg-bot, #f1f5f9);border:1px solid var(--jex-border-input, #e2e8f0);border-radius:var(--jex-radius, .75rem);width:100%}.jex-inline-form-check{display:flex;align-items:center;justify-content:center;width:24px;height:24px;border-radius:50%;background:color-mix(in srgb,var(--jex-primary) 15%,transparent);color:var(--jex-primary, #115A62);font-size:14px;font-weight:700;flex-shrink:0}.jex-inline-form-submitted-title{font-weight:600;font-size:var(--jex-font-size, 14px);color:var(--jex-text-main, #0f172a)}.jex-inline-form-submitted-detail{font-size:12px;color:var(--jex-text-muted, #64748b);margin-top:2px}.jex-escalation-confirm{border-left:3px solid var(--jex-primary, #115A62);padding-left:8px}.jex-session-prompt{display:flex;flex-direction:column;align-items:center;gap:8px;padding:12px 16px;margin:8px 0;text-align:center}.jex-session-prompt-text{font-size:13px;color:var(--jex-text-muted, #64748b)}.jex-session-prompt-btn{padding:8px 16px;border-radius:8px;border:1px solid var(--jex-primary, #115A62);background:transparent;color:var(--jex-primary, #115A62);font-size:13px;font-weight:600;cursor:pointer}.jex-session-prompt-btn:hover{background:color-mix(in srgb,var(--jex-primary) 10%,transparent)}.jex-chat-input-resolved{display:flex;flex-direction:column;align-items:center;gap:10px;padding:14px 16px;border-top:1px solid var(--jex-border-input, #e2e8f0);background:var(--jex-bg-msg-bot, #f1f5f9);text-align:center}.jex-resolved-notice{font-size:13px;font-weight:500;color:var(--jex-text-muted, #64748b)}.jex-resolved-new-btn{padding:10px 20px;border-radius:8px;border:none;background:var(--jex-primary, #115A62);color:#fff;font-size:13px;font-weight:600;cursor:pointer;width:100%}.jex-resolved-new-btn:hover{opacity:.9}.jex-confirmation{display:flex;flex-direction:column;align-items:center;justify-content:center;gap:10px;padding:32px 24px;height:100%;text-align:center}.jex-confirmation-icon{width:48px;height:48px;border-radius:50%;background:color-mix(in srgb,var(--jex-primary, #115A62) 15%,transparent);color:var(--jex-primary, #115A62);font-size:22px;display:flex;align-items:center;justify-content:center}.jex-confirmation-title{font-size:18px;font-weight:700;color:var(--jex-text-main, #0f172a);margin:0}.jex-confirmation-body{font-size:13px;color:var(--jex-text-muted, #64748b);margin:0}.jex-confirmation-ref{font-size:20px;font-weight:700;letter-spacing:.05em;color:var(--jex-primary, #115A62);background:color-mix(in srgb,var(--jex-primary, #115A62) 10%,transparent);padding:10px 20px;border-radius:10px}.jex-confirmation-hint{font-size:12px;color:var(--jex-text-muted, #64748b);margin:0}.jex-confirmation-done{margin-top:8px;padding:10px 28px;border-radius:8px;border:none;background:var(--jex-primary, #115A62);color:#fff;font-size:14px;font-weight:600;cursor:pointer}.jex-home-lookup-link{background:none;border:none;font-size:12px;color:var(--jex-text-muted, #64748b);cursor:pointer;text-decoration:underline;padding:0;align-self:center}.jex-home-lookup{display:flex;gap:8px;width:100%;animation:jexFadeIn .4s .1s ease both}.jex-home-lookup-input{flex:1;padding:10px 14px;border-radius:10px;border:1px solid var(--jex-border-input, #e2e8f0);background:var(--jex-bg-input);color:var(--jex-text-main);font-size:14px;font-family:ui-monospace,Cascadia Code,Fira Code,monospace;letter-spacing:.04em;outline:none;transition:border-color .2s}@media(pointer:coarse){.jex-home-lookup-input{font-size:16px}}.jex-home-lookup-input::placeholder{font-family:inherit;letter-spacing:.04em;color:var(--jex-text-muted);opacity:.7}.jex-home-lookup-input:focus{border-color:var(--jex-primary, #115A62)}.jex-home-lookup-submit{padding:10px 16px;border-radius:10px;border:none;background:var(--jex-primary, #115A62);color:#fff;font-size:13px;font-weight:600;cursor:pointer;font-family:inherit;transition:background .2s,opacity .2s;flex-shrink:0}.jex-home-lookup-submit:hover:not(:disabled){background:var(--jex-primary-hover)}.jex-home-lookup-submit:disabled{opacity:.4;cursor:default}.jex-sources-row{margin-top:6px;margin-left:32px;display:flex;flex-direction:column;gap:6px}.jex-sources-toggle{display:inline-flex;align-items:center;gap:4px;padding:2px 8px;background:transparent;border:none;border-radius:6px;cursor:pointer;font-size:11px;color:var(--jex-text-muted, #6b7280);font-family:inherit;align-self:flex-start;transition:background .15s,color .15s}.jex-sources-toggle:hover{background:#0000000a;color:inherit}.jex-sources-icon{font-size:12px;line-height:1}.jex-sources-chevron{display:inline-block;font-size:10px;transition:transform .15s}.jex-sources-chevron--open{transform:rotate(180deg)}.jex-sources-pills{display:flex;flex-wrap:wrap;align-items:center;gap:6px}.jex-source-pill{display:inline-flex;align-items:center;gap:6px;max-width:240px;padding:2px 8px;border-radius:999px;border:1px solid rgba(0,0,0,.1);background:#0000000a;color:var(--jex-text-muted, #6b7280);font-size:11px;text-decoration:none;cursor:pointer;transition:background .15s,color .15s}.jex-source-pill:hover{background:#00000014;color:inherit}.jex-source-id{display:inline-flex;align-items:center;justify-content:center;min-width:16px;height:16px;padding:0 4px;border-radius:4px;background:var(--jex-primary, #115A62);color:#fff;font-size:10px;font-weight:600;line-height:1;flex-shrink:0;font-variant-numeric:tabular-nums}.jex-source-type{font-size:10px;flex-shrink:0}.jex-source-label{overflow:hidden;text-overflow:ellipsis;white-space:nowrap;font-weight:500}.jex-source-score{opacity:.6;flex-shrink:0;font-variant-numeric:tabular-nums}';
7343
- function iu(t) {
7378
+ const ou = '.jex-widget{--jex-primary: #115A62;--jex-primary-hover: var(--jex-accent, color-mix(in srgb, var(--jex-primary) 85%, #000));--jex-radius: .75rem;--jex-font-family: "Inter", system-ui, -apple-system, sans-serif;--jex-font-size: 14px;--jex-window-width: 380px;--jex-window-height: 600px;--jex-shadow: 0 16px 48px -12px rgba(13, 127, 138, .25), 0 4px 16px rgba(0, 0, 0, .08);pointer-events:auto;--jex-bg-trigger: var(--jex-primary);--jex-bg-header: var(--jex-primary);--jex-bg-msg-user: var(--jex-primary);--jex-bg-send-btn: var(--jex-primary);--jex-bg-window: rgba(255, 255, 255, .95);--jex-bg-msg-bot: #f1f5f9;--jex-bg-input: rgba(247, 253, 253, .6);--jex-text-header: #ffffff;--jex-text-msg-user: #ffffff;--jex-text-msg-bot: #0f172a;--jex-text-main: #0f172a;--jex-text-muted: #64748b;--jex-bg-avatar-agent: #d1fae5;--jex-text-avatar-agent: #065f46;--jex-border-window: rgba(226, 232, 240, .8);--jex-border-input: rgba(203, 213, 225, .8);--jex-bg-glass: var(--jex-bg-window);--jex-border-glass: var(--jex-border-window);font-family:var(--jex-font-family);-webkit-font-smoothing:antialiased}.dark .jex-widget,.jex-widget.dark{--jex-primary: #1cb0bf;--jex-primary-hover: var(--jex-accent, color-mix(in srgb, var(--jex-primary) 85%, #000));--jex-bg-window: rgba(10, 15, 26, .95);--jex-bg-msg-bot: #233146;--jex-bg-input: rgba(10, 15, 26, .6);--jex-text-msg-bot: #f8fafc;--jex-text-main: #f8fafc;--jex-text-muted: #94a3b8;--jex-border-window: rgba(30, 41, 59, .8);--jex-border-input: rgba(51, 65, 85, .9);--jex-bg-avatar-agent: #064e3b;--jex-text-avatar-agent: #6ee7b7;--jex-bg-error: #3b1318;--jex-border-error: #5c1d24;--jex-text-error: #fca5a5}@media(prefers-color-scheme:dark){:host:not(.light) .jex-widget:not(.light){--jex-primary: #1cb0bf;--jex-primary-hover: var(--jex-accent, color-mix(in srgb, var(--jex-primary) 85%, #000));--jex-bg-window: rgba(10, 15, 26, .95);--jex-bg-msg-bot: #233146;--jex-bg-input: rgba(10, 15, 26, .6);--jex-text-msg-bot: #f8fafc;--jex-text-main: #f8fafc;--jex-text-muted: #94a3b8;--jex-border-window: rgba(30, 41, 59, .8);--jex-border-input: rgba(51, 65, 85, .9);--jex-bg-error: #3b1318;--jex-border-error: #5c1d24;--jex-text-error: #fca5a5}}.jex-widget *{box-sizing:border-box;margin:0;padding:0}.jex-container{position:fixed;bottom:24px;right:24px;display:flex;flex-direction:column;align-items:flex-end;gap:16px;z-index:9999}.jex-container.jex-pos-left{right:auto;left:24px;align-items:flex-start}:host(.jex-mode-embedded){display:block;width:100%;height:100%}:host(.jex-mode-embedded) .jex-widget{width:100%;height:100%}.jex-embedded{display:flex;flex-direction:column;width:100%;height:100%;background:var(--jex-bg-window);border:1px solid var(--jex-border-window);overflow:hidden}.jex-embedded .jex-screen-container{flex:1;overflow:hidden;display:flex;flex-direction:column}.jex-floating-button{height:56px;min-width:56px;padding:0;background:var(--jex-bg-trigger);color:var(--jex-text-header);border:none;cursor:pointer;display:flex;align-items:center;justify-content:center;box-shadow:var(--jex-shadow);transition:transform .3s cubic-bezier(.175,.885,.32,1.275),background .2s,width .3s ease,border-radius .3s ease}.jex-floating-button.jex-has-label{min-width:110px;padding:0 20px}.jex-fab-inner{display:flex;align-items:center;gap:12px}.jex-fab-label{font-size:15px;font-weight:600;white-space:nowrap}.jex-floating-button:hover{transform:scale(1.1);background:var(--jex-primary-hover)}.jex-floating-button:active{transform:scale(.95)}.jex-chat-window{width:var(--jex-window-width);height:var(--jex-window-height);max-height:calc(100vh - 120px);background:var(--jex-bg-window);backdrop-filter:blur(24px);-webkit-backdrop-filter:blur(24px);border:1px solid var(--jex-border-window);border-radius:calc(var(--jex-radius) * 2);box-shadow:var(--jex-shadow);display:flex;flex-direction:column;overflow:hidden;animation:jexSlideUp .4s cubic-bezier(.16,1,.3,1);transform-origin:bottom right;touch-action:manipulation}@keyframes jexSlideUp{0%{opacity:0;transform:scale(.8) translateY(20px)}to{opacity:1;transform:scale(1) translateY(0)}}@media(max-width:480px),(pointer:coarse)and (max-width:768px){.jex-chat-window{position:fixed;inset:0;width:100vw;height:100vh;height:100dvh;max-height:none;border:none;border-radius:0;animation:jexSlideUpMobile .3s cubic-bezier(.16,1,.3,1);transform-origin:bottom center}.jex-container:has(.jex-chat-window) .jex-floating-button{display:none}}@keyframes jexSlideUpMobile{0%{opacity:0;transform:translateY(100%)}to{opacity:1;transform:translateY(0)}}.jex-chat-header{padding:20px;background:var(--jex-bg-header);color:var(--jex-text-header);display:flex;align-items:center;gap:12px;flex-shrink:0}.jex-header-info h3{font-size:16px;font-weight:600;color:var(--jex-text-header);margin:0}.jex-header-info p{font-size:12px;opacity:.8;color:var(--jex-text-header);margin:0}.jex-header-right{margin-left:auto;display:flex;align-items:center;gap:4px}.jex-header-handoff{display:inline-flex;align-items:center;justify-content:center;width:32px;height:32px;background:transparent;border:1px solid color-mix(in srgb,currentColor 50%,transparent);border-radius:999px;padding:0;color:inherit;cursor:pointer;transition:background .15s ease,border-color .15s ease}.jex-header-handoff:hover:not(:disabled){background:color-mix(in srgb,currentColor 12%,transparent);border-color:currentColor}.jex-header-handoff:disabled{opacity:.5;cursor:not-allowed}.jex-header-close{display:inline-flex;align-items:center;justify-content:center;width:32px;height:32px;background:transparent;border:none;border-radius:999px;padding:0;color:inherit;cursor:pointer;transition:background .15s ease}.jex-header-close:hover{background:color-mix(in srgb,currentColor 14%,transparent)}.jex-handoff-error{position:absolute;top:100%;right:8px;background:#fee;color:#b00;padding:4px 8px;font-size:12px;border-radius:4px}.jex-header-back{background:none;border:none;color:var(--jex-text-header);cursor:pointer;padding:4px;display:flex;align-items:center;opacity:.8;transition:opacity .2s;flex-shrink:0}.jex-header-back:hover{opacity:1}.jex-screen-container{flex:1;overflow:hidden;display:flex;flex-direction:column}.jex-home{flex:1;display:flex;flex-direction:column;padding:24px;gap:20px;overflow-y:auto}.jex-home-hero{display:flex;align-items:center;gap:14px;animation:jexFadeIn .4s ease both}.jex-home-avatar{position:relative;width:48px;height:48px;border-radius:14px;background:var(--jex-primary);color:var(--jex-text-header);display:flex;align-items:center;justify-content:center;flex-shrink:0;box-shadow:0 4px 12px color-mix(in srgb,var(--jex-primary) 30%,transparent)}.jex-home-status-dot{position:absolute;bottom:-2px;right:-2px;width:14px;height:14px;border-radius:50%;background:#22c55e;border:2.5px solid var(--jex-bg-window);animation:jexPulse 2s ease-in-out infinite}@keyframes jexPulse{0%,to{box-shadow:0 0 #22c55e66}50%{box-shadow:0 0 0 6px #22c55e00}}.jex-home-hero-text{display:flex;flex-direction:column;gap:2px;min-width:0}.jex-home-title{font-size:17px;font-weight:700;color:var(--jex-text-main);margin:0;line-height:1.2;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.jex-home-status{font-size:12px;font-weight:500;color:#22c55e;letter-spacing:.02em}.jex-home-greeting{background:var(--jex-bg-msg-bot);border:1px solid var(--jex-border-window);border-radius:4px 16px 16px;padding:16px 18px;font-size:14px;line-height:1.55;color:var(--jex-text-main);animation:jexFadeIn .4s .1s ease both}.jex-home-greeting p{margin:0}@keyframes jexFadeIn{0%{opacity:0;transform:translateY(8px)}to{opacity:1;transform:translateY(0)}}.jex-home-actions{display:flex;flex-direction:column;gap:10px;animation:jexFadeIn .4s .2s ease both}.jex-home-start-btn{background:var(--jex-bg-send-btn);color:var(--jex-text-header);border:none;border-radius:12px;padding:14px 20px;font-size:15px;font-weight:600;cursor:pointer;font-family:inherit;transition:background .2s,transform .15s,box-shadow .2s;width:100%;box-shadow:0 2px 8px color-mix(in srgb,var(--jex-primary) 25%,transparent)}.jex-home-start-btn:hover{background:var(--jex-primary-hover);transform:translateY(-1px);box-shadow:0 4px 16px color-mix(in srgb,var(--jex-primary) 35%,transparent)}.jex-home-start-btn:active{transform:translateY(0);box-shadow:0 1px 4px color-mix(in srgb,var(--jex-primary) 20%,transparent)}.jex-home-resume-card{display:flex;flex-direction:column;gap:8px;width:100%;text-align:left;padding:16px 18px;border-radius:14px;border:1.5px solid var(--jex-primary);background:color-mix(in srgb,var(--jex-primary) 6%,var(--jex-bg-window));cursor:pointer;font-family:inherit;transition:background .2s,border-color .2s,transform .15s,box-shadow .2s;box-shadow:0 2px 8px color-mix(in srgb,var(--jex-primary) 12%,transparent)}.jex-home-resume-card:hover{background:color-mix(in srgb,var(--jex-primary) 10%,var(--jex-bg-window));transform:translateY(-1px);box-shadow:0 4px 16px color-mix(in srgb,var(--jex-primary) 20%,transparent)}.jex-home-resume-card:active{transform:translateY(0)}.jex-home-resume-top{display:flex;align-items:center;justify-content:space-between}.jex-home-resume-label{font-size:14px;font-weight:600;color:var(--jex-primary)}.jex-home-resume-arrow{color:var(--jex-primary);opacity:.6;transition:opacity .2s,transform .2s}.jex-home-resume-card:hover .jex-home-resume-arrow{opacity:1;transform:translate(2px)}.jex-home-resume-ref{font-family:ui-monospace,Cascadia Code,Fira Code,monospace;font-size:13px;font-weight:600;letter-spacing:.06em;color:var(--jex-text-muted)}.jex-home-history{display:flex;flex-direction:column;gap:8px}.jex-home-resume-meta{font-size:11px;opacity:.7;margin-top:4px}.jex-home-new-btn{background:transparent;color:var(--jex-text-muted);border:1px solid var(--jex-border-input);border-radius:12px;padding:12px 20px;font-size:14px;font-weight:500;cursor:pointer;font-family:inherit;transition:color .2s,border-color .2s,background .2s;width:100%}.jex-home-new-btn:hover{color:var(--jex-text-main);border-color:var(--jex-text-muted);background:color-mix(in srgb,var(--jex-primary) 3%,transparent)}.jex-session-ref{display:flex;align-items:center;gap:8px;padding:8px 12px;background:var(--jex-bg-msg-bot);border:1px solid var(--jex-border-window);border-radius:8px;font-size:12px}.jex-session-ref-label{color:var(--jex-text-muted);font-weight:500}.jex-session-ref-code{color:var(--jex-primary);font-weight:700;font-family:ui-monospace,Cascadia Code,monospace;letter-spacing:.05em}.jex-chat-messages{flex:1;padding:20px;overflow-y:auto;display:flex;flex-direction:column;gap:12px}.jex-message-row{display:flex;align-items:flex-end;gap:8px;max-width:85%}.jex-message-row.bot{align-self:flex-start}.jex-message-content{flex:1;min-width:0}.jex-avatar{width:24px;height:24px;border-radius:50%;flex-shrink:0;display:flex;align-items:center;justify-content:center;font-size:12px;margin-bottom:2px}.jex-avatar-bot{background:var(--jex-bg-msg-bot);color:var(--jex-primary)}.jex-avatar-agent{background:var(--jex-bg-avatar-agent)}.jex-avatar-img{width:100%;height:100%;border-radius:50%;object-fit:cover}.jex-avatar-initials{font-size:9px;font-weight:700;color:var(--jex-text-avatar-agent)}.jex-message-author-row{display:flex;align-items:center;gap:6px;margin-top:2px;padding-left:4px}.jex-message-author{font-size:10px;color:var(--jex-text-muted)}.jex-reply-tag-btn{display:inline-flex;align-items:center;justify-content:center;width:16px;height:16px;padding:0;border:none;border-radius:4px;background:transparent;color:var(--jex-text-muted, #6b7280);cursor:pointer;transition:background .15s,color .15s}.jex-reply-tag-btn:hover{background:#0000000f;color:var(--jex-primary, #115A62)}.jex-reply-tag-btn:focus-visible{outline:2px solid var(--jex-primary, #115A62);outline-offset:1px}.jex-message{padding:12px 16px;border-radius:18px;font-size:14px;line-height:1.4}.jex-message.bot{background:var(--jex-bg-msg-bot);border:1px solid var(--jex-border-window);color:var(--jex-text-msg-bot);border-bottom-left-radius:4px}.jex-message.user{align-self:flex-end;max-width:80%;background:var(--jex-bg-msg-user);color:var(--jex-text-msg-user);border-bottom-right-radius:4px}.jex-typing{align-self:flex-start;display:flex;gap:4px;padding:12px 16px}.jex-typing span{width:8px;height:8px;border-radius:50%;background:var(--jex-text-muted);animation:jexTypingDot 1.2s infinite ease-in-out}.jex-typing span:nth-child(2){animation-delay:.2s}.jex-typing span:nth-child(3){animation-delay:.4s}@keyframes jexTypingDot{0%,80%,to{transform:scale(.8);opacity:.4}40%{transform:scale(1);opacity:1}}.jex-md{word-break:break-word;overflow-wrap:anywhere}.jex-md p{margin:0 0 8px}.jex-md p:last-child{margin-bottom:0}.jex-md strong{font-weight:600}.jex-md em{font-style:italic}.jex-md ul,.jex-md ol{margin:0 0 8px;padding-left:20px}.jex-md ul:last-child,.jex-md ol:last-child{margin-bottom:0}.jex-md ul{list-style-type:disc}.jex-md ol{list-style-type:decimal}.jex-md li{margin-bottom:2px}.jex-md li:last-child{margin-bottom:0}.jex-md a{color:var(--jex-primary);text-decoration:underline;text-underline-offset:2px}.jex-md a:hover{opacity:.8}.jex-md code{background:#00000014;padding:1px 5px;border-radius:4px;font-size:.9em;font-family:ui-monospace,Cascadia Code,Fira Code,monospace}.jex-md pre{background:#0000000f;border-radius:8px;padding:10px 12px;margin:0 0 8px;overflow-x:auto;font-size:.85em}.jex-md pre:last-child{margin-bottom:0}.jex-md pre code{background:none;padding:0;border-radius:0;font-size:inherit}.jex-md h1,.jex-md h2,.jex-md h3,.jex-md h4{font-weight:600;margin:8px 0 4px}.jex-md h1:first-child,.jex-md h2:first-child,.jex-md h3:first-child,.jex-md h4:first-child{margin-top:0}.jex-md h3{font-size:1em}.jex-md h4{font-size:.95em}.jex-md hr{border:none;border-top:1px solid var(--jex-border-window);margin:8px 0}.jex-md blockquote{border-left:3px solid var(--jex-primary);margin:0 0 8px;padding:4px 12px;color:var(--jex-text-muted)}.jex-md blockquote:last-child{margin-bottom:0}.dark .jex-md code,.jex-widget.dark .jex-md code{background:#ffffff1a}.dark .jex-md pre,.jex-widget.dark .jex-md pre{background:#ffffff14}@media(prefers-color-scheme:dark){:host:not(.light) .jex-widget:not(.light) .jex-md code{background:#ffffff1a}:host:not(.light) .jex-widget:not(.light) .jex-md pre{background:#ffffff14}}.jex-streaming-cursor:after{content:"◊";margin-left:2px;animation:jexBlinkCursor .8s ease-in-out infinite}@keyframes jexBlinkCursor{0%,to{opacity:1}50%{opacity:0}}.jex-session-notice{align-self:center;text-align:center;padding:8px 16px;margin:8px 0;font-size:12px;color:var(--jex-text-muted);background:var(--jex-bg-input, #f1f5f9);border-radius:8px;line-height:1.4}.jex-message-error{background:var(--jex-bg-error, #fef2f2)!important;border-color:var(--jex-border-error, #fecaca)!important;color:var(--jex-text-error, #991b1b)!important}.jex-chat-input{padding:12px 16px;border-top:1px solid var(--jex-border-window);display:flex;flex-direction:column;gap:8px;flex-shrink:0}.jex-composer-card{display:flex;flex-direction:column;gap:6px;padding:10px 12px 8px;background:var(--jex-bg-input);border:1px solid var(--jex-border-input);border-radius:16px;cursor:text;transition:border-color .15s ease,background .15s ease,box-shadow .15s ease}.jex-composer-card:focus-within{border-color:var(--jex-primary);background:var(--jex-bg-window);box-shadow:0 0 0 3px color-mix(in srgb,var(--jex-primary, #115A62) 14%,transparent)}.jex-composer-attachments{display:flex;flex-wrap:wrap;gap:6px;padding:2px 2px 4px}.jex-attachment-chip{position:relative;width:44px;height:44px;border-radius:8px;overflow:hidden;background:var(--jex-bg-msg-bot, #f1f5f9);flex-shrink:0;box-shadow:0 1px 2px #0000000f}.jex-attachment-thumb{width:100%;height:100%;object-fit:cover;display:block;pointer-events:none}.jex-attachment-remove{position:absolute;top:2px;right:2px;width:16px;height:16px;padding:0;border:none;border-radius:50%;background:#0f172ac7;color:#fff;display:inline-flex;align-items:center;justify-content:center;cursor:pointer;opacity:0;transition:opacity .12s ease,transform .12s ease}.jex-attachment-chip:hover .jex-attachment-remove,.jex-attachment-chip:focus-within .jex-attachment-remove{opacity:1}.jex-attachment-remove:hover{transform:scale(1.08)}.jex-composer-textarea{width:100%;min-height:22px;background:transparent;border:none;outline:none;resize:none;padding:2px 4px;color:var(--jex-text-main);font-family:inherit;font-size:16px;line-height:1.45;overflow-y:hidden}.jex-composer-textarea::placeholder{color:var(--jex-text-muted);opacity:.85}.jex-composer-textarea:disabled{cursor:not-allowed;opacity:.7}.jex-composer-actions{display:flex;align-items:center;justify-content:space-between;gap:8px}.jex-composer-actions-left{display:inline-flex;align-items:center;gap:4px}.jex-attach-btn{width:30px;height:30px;padding:0;border:none;border-radius:50%;background:transparent;color:var(--jex-text-muted);display:inline-flex;align-items:center;justify-content:center;cursor:pointer;transition:background .12s ease,color .12s ease,transform .12s ease}.jex-attach-btn:hover:not(:disabled){background:color-mix(in srgb,var(--jex-text-muted, #64748b) 12%,transparent);color:var(--jex-text-main)}.jex-attach-btn:active:not(:disabled){transform:scale(.92)}.jex-attach-btn:disabled{opacity:.4;cursor:not-allowed}.jex-visually-hidden{position:absolute;width:1px;height:1px;padding:0;margin:-1px;overflow:hidden;clip:rect(0,0,0,0);white-space:nowrap;border:0}.jex-rate-limit-notice{flex:1 0 100%;order:-1;margin-bottom:8px;padding:8px 12px;border-radius:10px;background:var(--jex-bg-msg-bot, #f1f5f9);color:var(--jex-text-muted, #64748b);font-size:12px;line-height:1.4;text-align:center}.jex-session-error-notice{flex:1 0 100%;order:-1;margin-bottom:8px;padding:8px 12px;border-radius:10px;background:var(--jex-bg-error, #fef2f2);border:1px solid var(--jex-border-error, #fecaca);color:var(--jex-text-error, #991b1b);font-size:12px;line-height:1.4;text-align:center}.jex-chat-input input{flex:1;background:var(--jex-bg-input);border:1px solid var(--jex-border-input);border-radius:12px;padding:10px 14px;color:var(--jex-text-main);outline:none;font-family:inherit;font-size:14px}.jex-chat-input input:focus{border-color:var(--jex-primary)}.jex-send-btn{background:color-mix(in srgb,var(--jex-text-muted, #64748b) 18%,transparent);color:var(--jex-text-muted);border:none;border-radius:999px;width:30px;height:30px;display:inline-flex;align-items:center;justify-content:center;cursor:pointer;transition:background .15s ease,color .15s ease,opacity .15s ease,transform .15s ease;flex-shrink:0}.jex-send-btn-active{background:var(--jex-bg-send-btn, var(--jex-primary));color:var(--jex-text-header, #fff)}.jex-send-btn-active:hover:not(:disabled){background:var(--jex-primary-hover)}.jex-send-btn:active:not(:disabled){transform:scale(.9)}.jex-send-btn:disabled{opacity:.45;cursor:default}.jex-widget-footer{display:flex;align-items:center;justify-content:center;padding:8px 16px;border-top:1px solid var(--jex-border-glass);background:#00000005;flex-shrink:0}.jex-widget.dark .jex-widget-footer{background:#ffffff05}@media(prefers-color-scheme:dark){:host:not(.light) .jex-widget:not(.light) .jex-widget-footer{background:#ffffff05}}.jex-branding{display:flex;align-items:center;gap:6px;text-decoration:none;color:var(--jex-text-muted);font-size:11px;font-weight:500;transition:color .2s}.jex-branding:hover{color:var(--jex-text-main)}.jex-branding-icon{color:var(--jex-primary)}.jex-branding span strong{font-weight:700;color:var(--jex-text-main)}.jex-privacy-notice{margin:0;text-align:center;font-size:10px;line-height:1.5;color:var(--jex-text-muted)}.jex-privacy-notice-link{color:var(--jex-primary);text-decoration:underline;text-underline-offset:2px;text-decoration-color:color-mix(in srgb,var(--jex-primary) 50%,transparent);transition:text-decoration-color .15s}.jex-privacy-notice-link:hover{text-decoration-color:var(--jex-primary)}.jex-locale-select-wrapper{position:relative;display:flex;align-items:center}.jex-locale-select{appearance:none;-webkit-appearance:none;background:transparent;border:1px solid transparent;padding:4px 20px 4px 6px;border-radius:6px;font-family:inherit;font-size:11px;font-weight:600;color:var(--jex-text-muted);background-color:transparent;cursor:pointer;outline:none;transition:all .2s ease}.jex-locale-select option{background-color:#fff;color:#0f172a}.jex-locale-select:hover,.jex-locale-select:focus-visible{color:var(--jex-text-main);background:#0000000a}.jex-widget.dark .jex-locale-select:hover,.jex-widget.dark .jex-locale-select:focus-visible{background:#ffffff0d}.jex-widget.dark .jex-locale-select option{background-color:#0f172a;color:#f8fafc}@media(prefers-color-scheme:dark){:host:not(.light) .jex-widget:not(.light) .jex-locale-select:hover,:host:not(.light) .jex-widget:not(.light) .jex-locale-select:focus-visible{background:#ffffff0d}:host:not(.light) .jex-widget:not(.light) .jex-locale-select option{background-color:#0f172a;color:#f8fafc}}.jex-locale-select:focus-visible{border-color:var(--jex-primary)}.jex-locale-chevron{position:absolute;right:4px;pointer-events:none;color:var(--jex-text-muted);transition:color .2s ease}.jex-locale-select-wrapper:hover .jex-locale-chevron{color:var(--jex-text-main)}.jex-overlay{position:absolute;inset:0;display:flex;flex-direction:column;align-items:center;justify-content:center;gap:12px;background:var(--jex-bg-window, #fff);z-index:10;padding:24px;text-align:center}.jex-loading-spinner{width:32px;height:32px;border:3px solid var(--jex-border-input, #e2e8f0);border-top-color:var(--jex-primary, #115A62);border-radius:50%;animation:jex-spin .7s linear infinite}@keyframes jex-spin{to{transform:rotate(360deg)}}.jex-loading-message{font-size:14px;color:var(--jex-text-muted, #64748b)}.jex-error-message{font-size:14px;color:var(--jex-text-main, #334155)}.jex-error-actions{display:flex;gap:8px}.jex-error-retry,.jex-error-back{padding:8px 16px;border-radius:8px;font-size:13px;font-weight:600;cursor:pointer;border:none}.jex-error-retry{background:var(--jex-primary, #115A62);color:#fff}.jex-error-back{background:transparent;color:var(--jex-text-muted, #64748b);border:1px solid var(--jex-border-input, #e2e8f0)}.jex-selection{display:flex;flex-direction:column;gap:12px;padding:24px 16px;height:100%}.jex-selection-title{font-size:16px;font-weight:700;color:var(--jex-text-main, #0f172a);margin:0 0 8px}.jex-selection-options{display:flex;flex-direction:column;gap:10px}.jex-selection-option{display:flex;flex-direction:column;align-items:flex-start;gap:2px;padding:16px;border-radius:12px;border:1px solid var(--jex-border-window, #e2e8f0);background:transparent;cursor:pointer;text-align:left;transition:border-color .15s ease,background .15s ease}.jex-selection-option:hover{border-color:var(--jex-primary, #115A62);background:color-mix(in srgb,var(--jex-primary, #115A62) 5%,transparent)}.jex-selection-icon{font-size:20px}.jex-selection-label{font-size:14px;font-weight:600;color:var(--jex-text-main, #0f172a)}.jex-selection-sub{font-size:12px;color:var(--jex-text-muted, #64748b)}.jex-form-screen{display:flex;flex-direction:column;padding:20px 16px;height:100%;overflow-y:auto}.jex-form-title{font-size:16px;font-weight:700;color:var(--jex-text-main, #0f172a);margin:0 0 16px}.jex-form{display:flex;flex-direction:column;gap:10px}.jex-form-input,.jex-form-textarea{padding:10px 12px;border-radius:8px;border:1px solid var(--jex-border-input, #e2e8f0);font-size:14px;background:transparent;color:var(--jex-text-main, #0f172a);outline:none}@media(pointer:coarse){.jex-form-input,.jex-form-textarea{font-size:16px}}.jex-form-input:focus,.jex-form-textarea:focus{border-color:var(--jex-primary, #115A62)}.jex-form-textarea{min-height:80px;resize:vertical}.jex-form-submit{padding:10px;border-radius:8px;border:none;background:var(--jex-primary, #115A62);color:#fff;font-size:14px;font-weight:600;cursor:pointer;margin-top:4px}.jex-inline-form{display:flex;flex-direction:column;gap:8px;padding:12px;background:var(--jex-bg-msg-bot, #f1f5f9);border:1px solid var(--jex-border-input, #e2e8f0);border-radius:var(--jex-radius, .75rem);width:100%}.jex-inline-form-title{font-weight:600;font-size:15px;color:var(--jex-text-main, #0f172a);margin:0}.jex-inline-form-subtitle{font-size:13px;color:var(--jex-text-muted, #64748b);line-height:1.4;margin:0 0 4px}.jex-inline-form-consent{font-size:11px;color:var(--jex-text-muted, #64748b);line-height:1.3;margin-top:4px;text-align:center}.jex-inline-form .jex-form-submit:disabled{opacity:.7;cursor:not-allowed}.jex-escalation-subtitle{font-size:13px;color:var(--jex-text-muted, #64748b);line-height:1.45;margin:0 0 8px}.jex-escalation-skip{padding:8px 12px;border:none;background:transparent;color:var(--jex-text-muted, #64748b);font-size:13px;cursor:pointer;text-decoration:underline;text-underline-offset:2px;text-align:center}.jex-escalation-skip:hover{color:var(--jex-text-main, #0f172a)}.jex-inline-form-card{position:relative;padding:14px;gap:8px}.jex-inline-form-dismiss{position:absolute;top:10px;right:10px;width:24px;height:24px;border-radius:50%;border:1px solid var(--jex-border-input, #e2e8f0);background:var(--jex-bg-window, #fff);color:var(--jex-text-muted, #64748b);font-size:12px;cursor:pointer;display:flex;align-items:center;justify-content:center;line-height:1}.jex-inline-form-dismiss:hover{background:var(--jex-bg-msg-bot, #f1f5f9);color:var(--jex-text-main, #0f172a)}.jex-inline-form-submitted{display:flex;align-items:center;gap:10px;padding:10px 12px;background:var(--jex-bg-msg-bot, #f1f5f9);border:1px solid var(--jex-border-input, #e2e8f0);border-radius:var(--jex-radius, .75rem);width:100%}.jex-inline-form-check{display:flex;align-items:center;justify-content:center;width:24px;height:24px;border-radius:50%;background:color-mix(in srgb,var(--jex-primary) 15%,transparent);color:var(--jex-primary, #115A62);font-size:14px;font-weight:700;flex-shrink:0}.jex-inline-form-submitted-title{font-weight:600;font-size:var(--jex-font-size, 14px);color:var(--jex-text-main, #0f172a)}.jex-inline-form-submitted-detail{font-size:12px;color:var(--jex-text-muted, #64748b);margin-top:2px}.jex-escalation-confirm{border-left:3px solid var(--jex-primary, #115A62);padding-left:8px}.jex-session-prompt{display:flex;flex-direction:column;align-items:center;gap:8px;padding:12px 16px;margin:8px 0;text-align:center}.jex-session-prompt-text{font-size:13px;color:var(--jex-text-muted, #64748b)}.jex-session-prompt-btn{padding:8px 16px;border-radius:8px;border:1px solid var(--jex-primary, #115A62);background:transparent;color:var(--jex-primary, #115A62);font-size:13px;font-weight:600;cursor:pointer}.jex-session-prompt-btn:hover{background:color-mix(in srgb,var(--jex-primary) 10%,transparent)}.jex-chat-input-resolved{display:flex;flex-direction:column;align-items:center;gap:10px;padding:14px 16px;border-top:1px solid var(--jex-border-input, #e2e8f0);background:var(--jex-bg-msg-bot, #f1f5f9);text-align:center}.jex-resolved-notice{font-size:13px;font-weight:500;color:var(--jex-text-muted, #64748b)}.jex-resolved-new-btn{padding:10px 20px;border-radius:8px;border:none;background:var(--jex-primary, #115A62);color:#fff;font-size:13px;font-weight:600;cursor:pointer;width:100%}.jex-resolved-new-btn:hover{opacity:.9}.jex-confirmation{display:flex;flex-direction:column;align-items:center;justify-content:center;gap:10px;padding:32px 24px;height:100%;text-align:center}.jex-confirmation-icon{width:48px;height:48px;border-radius:50%;background:color-mix(in srgb,var(--jex-primary, #115A62) 15%,transparent);color:var(--jex-primary, #115A62);font-size:22px;display:flex;align-items:center;justify-content:center}.jex-confirmation-title{font-size:18px;font-weight:700;color:var(--jex-text-main, #0f172a);margin:0}.jex-confirmation-body{font-size:13px;color:var(--jex-text-muted, #64748b);margin:0}.jex-confirmation-ref{font-size:20px;font-weight:700;letter-spacing:.05em;color:var(--jex-primary, #115A62);background:color-mix(in srgb,var(--jex-primary, #115A62) 10%,transparent);padding:10px 20px;border-radius:10px}.jex-confirmation-hint{font-size:12px;color:var(--jex-text-muted, #64748b);margin:0}.jex-confirmation-done{margin-top:8px;padding:10px 28px;border-radius:8px;border:none;background:var(--jex-primary, #115A62);color:#fff;font-size:14px;font-weight:600;cursor:pointer}.jex-home-lookup-link{background:none;border:none;font-size:12px;color:var(--jex-text-muted, #64748b);cursor:pointer;text-decoration:underline;padding:0;align-self:center}.jex-home-lookup{display:flex;gap:8px;width:100%;animation:jexFadeIn .4s .1s ease both}.jex-home-lookup-input{flex:1;padding:10px 14px;border-radius:10px;border:1px solid var(--jex-border-input, #e2e8f0);background:var(--jex-bg-input);color:var(--jex-text-main);font-size:14px;font-family:ui-monospace,Cascadia Code,Fira Code,monospace;letter-spacing:.04em;outline:none;transition:border-color .2s}@media(pointer:coarse){.jex-home-lookup-input{font-size:16px}}.jex-home-lookup-input::placeholder{font-family:inherit;letter-spacing:.04em;color:var(--jex-text-muted);opacity:.7}.jex-home-lookup-input:focus{border-color:var(--jex-primary, #115A62)}.jex-home-lookup-submit{padding:10px 16px;border-radius:10px;border:none;background:var(--jex-primary, #115A62);color:#fff;font-size:13px;font-weight:600;cursor:pointer;font-family:inherit;transition:background .2s,opacity .2s;flex-shrink:0}.jex-home-lookup-submit:hover:not(:disabled){background:var(--jex-primary-hover)}.jex-home-lookup-submit:disabled{opacity:.4;cursor:default}.jex-sources-row{margin-top:6px;margin-left:32px;display:flex;flex-direction:column;gap:6px}.jex-sources-toggle{display:inline-flex;align-items:center;gap:4px;padding:2px 8px;background:transparent;border:none;border-radius:6px;cursor:pointer;font-size:11px;color:var(--jex-text-muted, #6b7280);font-family:inherit;align-self:flex-start;transition:background .15s,color .15s}.jex-sources-toggle:hover{background:#0000000a;color:inherit}.jex-sources-icon{font-size:12px;line-height:1}.jex-sources-chevron{display:inline-block;font-size:10px;transition:transform .15s}.jex-sources-chevron--open{transform:rotate(180deg)}.jex-sources-pills{display:flex;flex-wrap:wrap;align-items:center;gap:6px}.jex-source-pill{display:inline-flex;align-items:center;gap:6px;max-width:240px;padding:2px 8px;border-radius:999px;border:1px solid rgba(0,0,0,.1);background:#0000000a;color:var(--jex-text-muted, #6b7280);font-size:11px;text-decoration:none;cursor:pointer;transition:background .15s,color .15s}.jex-source-pill:hover{background:#00000014;color:inherit}.jex-source-id{display:inline-flex;align-items:center;justify-content:center;min-width:16px;height:16px;padding:0 4px;border-radius:4px;background:var(--jex-primary, #115A62);color:#fff;font-size:10px;font-weight:600;line-height:1;flex-shrink:0;font-variant-numeric:tabular-nums}.jex-source-type{font-size:10px;flex-shrink:0}.jex-source-label{overflow:hidden;text-overflow:ellipsis;white-space:nowrap;font-weight:500}.jex-source-score{opacity:.6;flex-shrink:0;font-variant-numeric:tabular-nums}';
7379
+ function su(t) {
7344
7380
  const e = document.createElement("style");
7345
- e.textContent = ru, t.appendChild(e);
7381
+ e.textContent = ou, t.appendChild(e);
7346
7382
  }
7347
- const ou = "https://festive-mouse-978.eu-west-1.convex.cloud";
7383
+ const au = "https://festive-mouse-978.eu-west-1.convex.cloud";
7348
7384
  let Gt = null;
7349
- function su(t) {
7350
- const e = t ?? ou;
7385
+ function lu(t) {
7386
+ const e = t ?? au;
7351
7387
  if (!e)
7352
7388
  throw new Error("[jexity] No Convex URL — set VITE_CONVEX_URL at build time or data-convex-url on the script tag");
7353
7389
  return Gt || (Gt = new wa(Na(e))), Gt;
7354
7390
  }
7355
- function au(t, e) {
7391
+ function cu(t, e) {
7356
7392
  const n = t.shadowRoot ?? t.attachShadow({ mode: "open" });
7357
7393
  for (; n.firstChild; )
7358
7394
  n.removeChild(n.firstChild);
7359
- iu(n), St.value = e.source, le.value = e.bootstrapToken, z.value = [{ id: "home" }], e.mode === "embedded" && (t.classList.add("jex-mode-embedded"), P.value = !0);
7395
+ su(n), jt.value = e.source, le.value = e.bootstrapToken, z.value = [{ id: "home" }], e.mode === "embedded" && (t.classList.add("jex-mode-embedded"), P.value = !0);
7360
7396
  const r = document.createElement("div");
7361
7397
  return e.mode === "embedded" && (r.style.cssText = "width:100%;height:100%"), n.appendChild(r), ge(
7362
- /* @__PURE__ */ c(Sa, { client: su(e.convexUrl), children: /* @__PURE__ */ c(tu, { options: e }) }),
7398
+ /* @__PURE__ */ c(ja, { client: lu(e.convexUrl), children: /* @__PURE__ */ c(ru, { options: e }) }),
7363
7399
  r
7364
7400
  ), function() {
7365
- ge(null, r), P.value = !1, St.value = void 0, le.value = void 0, z.value = [{ id: "home" }];
7401
+ ge(null, r), P.value = !1, jt.value = void 0, le.value = void 0, z.value = [{ id: "home" }];
7366
7402
  };
7367
7403
  }
7368
- function lu(t, e, n) {
7369
- const r = au(t, e), i = /* @__PURE__ */ new Set(), o = P.subscribe((l) => {
7404
+ function uu(t, e, n) {
7405
+ const r = cu(t, e), i = /* @__PURE__ */ new Set(), o = P.subscribe((l) => {
7370
7406
  for (const a of i)
7371
7407
  a(l);
7372
7408
  });
@@ -7394,16 +7430,16 @@ function lu(t, e, n) {
7394
7430
  };
7395
7431
  }
7396
7432
  let Ue = null;
7397
- function cu(t) {
7433
+ function hu(t) {
7398
7434
  Ue && Ue.shutdown();
7399
7435
  let e;
7400
7436
  t.container ? e = typeof t.container == "string" ? document.querySelector(t.container) : t.container : (e = document.createElement("div"), e.id = "jexity-chat-widget", document.body.appendChild(e));
7401
- const n = lu(e, t, () => {
7437
+ const n = uu(e, t, () => {
7402
7438
  t.container || e.remove(), Ue === n && (Ue = null);
7403
7439
  });
7404
7440
  return Ue = n, n;
7405
7441
  }
7406
7442
  export {
7407
- cu as JexityChat
7443
+ hu as JexityChat
7408
7444
  };
7409
7445
  //# sourceMappingURL=index.mjs.map