@enegelai/bot-widget 1.17.0 → 1.18.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/index.es.js CHANGED
@@ -1,5 +1,5 @@
1
- import { css as J, LitElement as Fe, html as u, nothing as Ae, svg as pe } from "lit";
2
- import { property as x, customElement as Z, query as xe, state as Va, queryAll as Na, eventOptions as na } from "lit/decorators.js";
1
+ import { css as K, LitElement as Fe, html as u, nothing as Ae, svg as pe } from "lit";
2
+ import { property as x, customElement as J, query as xe, state as Va, queryAll as Ua, eventOptions as na } from "lit/decorators.js";
3
3
  import { when as W } from "lit/directives/when.js";
4
4
  import { unsafeHTML as G } from "lit-html/directives/unsafe-html.js";
5
5
  import { registerIconLibrary as qi } from "@shoelace-style/shoelace";
@@ -29,7 +29,7 @@ import Wt from "highlight.js";
29
29
  import "@shoelace-style/shoelace/dist/components/popup/popup.js";
30
30
  import "@shoelace-style/shoelace/dist/components/rating/rating.js";
31
31
  import { createRef as ji, ref as At } from "lit/directives/ref.js";
32
- function Ua(a) {
32
+ function Na(a) {
33
33
  return typeof a == "function" ? a() : a;
34
34
  }
35
35
  const Ht = class Ht extends Event {
@@ -58,7 +58,7 @@ const Hi = (a, e) => e !== a && (e === e || a === a), ba = class ba extends Even
58
58
  constructor() {
59
59
  super(), this.hookMap = /* @__PURE__ */ new Map(), this.constructor.finalize(), this.propertyMap && [...this.propertyMap].forEach(([e, t]) => {
60
60
  if (t.initialValue !== void 0) {
61
- const i = Ua(t.initialValue);
61
+ const i = Na(t.initialValue);
62
62
  this[e] = i, t.value = i;
63
63
  }
64
64
  });
@@ -120,7 +120,7 @@ const Hi = (a, e) => e !== a && (e === e || a === a), ba = class ba extends Even
120
120
  }
121
121
  };
122
122
  ba.finalized = !1;
123
- let Jt = ba;
123
+ let Kt = ba;
124
124
  class it {
125
125
  constructor(e, t, i) {
126
126
  this.host = e, this.state = t, this.callback = i || (() => this.host.requestUpdate()), this.host.addController(this);
@@ -156,18 +156,18 @@ function Vi(a, e) {
156
156
  return a;
157
157
  }
158
158
  new URL(location.href);
159
- const Ni = {
159
+ const Ui = {
160
160
  prefix: "_ls"
161
161
  };
162
162
  function ce(a) {
163
- return a = { ...Ni, ...a }, (e, t) => {
163
+ return a = { ...Ui, ...a }, (e, t) => {
164
164
  const i = Object.getOwnPropertyDescriptor(e, t);
165
165
  if (!i)
166
166
  throw new Error("@local-storage decorator need to be called after @property");
167
167
  const s = `${a?.prefix || ""}_${a?.key || String(t)}`, r = e.constructor, o = r.propertyMap.get(t), f = o?.type;
168
168
  if (o) {
169
169
  const w = o.initialValue;
170
- o.initialValue = () => Vi(localStorage.getItem(s), f) ?? Ua(w), r.propertyMap.set(t, { ...o, ...a });
170
+ o.initialValue = () => Vi(localStorage.getItem(s), f) ?? Na(w), r.propertyMap.set(t, { ...o, ...a });
171
171
  }
172
172
  const p = i?.set, k = {
173
173
  ...i,
@@ -181,12 +181,12 @@ function ce(a) {
181
181
  function Wa(a) {
182
182
  return a && a.__esModule && Object.prototype.hasOwnProperty.call(a, "default") ? a.default : a;
183
183
  }
184
- var Lt = { exports: {} }, Ui = Lt.exports, _a;
184
+ var Lt = { exports: {} }, Ni = Lt.exports, _a;
185
185
  function Wi() {
186
186
  return _a || (_a = 1, (function(a) {
187
187
  (function(e, t) {
188
188
  a.exports ? a.exports = t() : e.log = t();
189
- })(Ui, function() {
189
+ })(Ni, function() {
190
190
  var e = function() {
191
191
  }, t = "undefined", i = typeof window !== t && typeof window.navigator !== t && /Trident\/|MSIE /.test(window.navigator.userAgent), s = [
192
192
  "trace",
@@ -230,18 +230,18 @@ function Wi() {
230
230
  return v(M) || w.apply(this, arguments);
231
231
  }
232
232
  function P(M, L) {
233
- var C = this, K, U, X, te = "loglevel";
233
+ var C = this, Z, N, X, te = "loglevel";
234
234
  typeof M == "string" ? te += ":" + M : typeof M == "symbol" && (te = void 0);
235
235
  function He(H) {
236
- var N = (s[H] || "silent").toUpperCase();
236
+ var U = (s[H] || "silent").toUpperCase();
237
237
  if (!(typeof window === t || !te)) {
238
238
  try {
239
- window.localStorage[te] = N;
239
+ window.localStorage[te] = U;
240
240
  return;
241
241
  } catch {
242
242
  }
243
243
  try {
244
- window.document.cookie = encodeURIComponent(te) + "=" + N + ";";
244
+ window.document.cookie = encodeURIComponent(te) + "=" + U + ";";
245
245
  } catch {
246
246
  }
247
247
  }
@@ -255,9 +255,9 @@ function Wi() {
255
255
  }
256
256
  if (typeof H === t)
257
257
  try {
258
- var N = window.document.cookie, $e = encodeURIComponent(te), Pe = N.indexOf($e + "=");
258
+ var U = window.document.cookie, $e = encodeURIComponent(te), Pe = U.indexOf($e + "=");
259
259
  Pe !== -1 && (H = /^([^;]+)/.exec(
260
- N.slice(Pe + $e.length + 1)
260
+ U.slice(Pe + $e.length + 1)
261
261
  )[1]);
262
262
  } catch {
263
263
  }
@@ -277,9 +277,9 @@ function Wi() {
277
277
  }
278
278
  }
279
279
  function ge(H) {
280
- var N = H;
281
- if (typeof N == "string" && C.levels[N.toUpperCase()] !== void 0 && (N = C.levels[N.toUpperCase()]), typeof N == "number" && N >= 0 && N <= C.levels.SILENT)
282
- return N;
280
+ var U = H;
281
+ if (typeof U == "string" && C.levels[U.toUpperCase()] !== void 0 && (U = C.levels[U.toUpperCase()]), typeof U == "number" && U >= 0 && U <= C.levels.SILENT)
282
+ return U;
283
283
  throw new TypeError("log.setLevel() called with invalid level: " + H);
284
284
  }
285
285
  C.name = M, C.levels = {
@@ -290,11 +290,11 @@ function Wi() {
290
290
  ERROR: 4,
291
291
  SILENT: 5
292
292
  }, C.methodFactory = L || _, C.getLevel = function() {
293
- return X ?? U ?? K;
294
- }, C.setLevel = function(H, N) {
295
- return X = ge(H), N !== !1 && He(X), k.call(C);
293
+ return X ?? N ?? Z;
294
+ }, C.setLevel = function(H, U) {
295
+ return X = ge(H), U !== !1 && He(X), k.call(C);
296
296
  }, C.setDefaultLevel = function(H) {
297
- U = ge(H), ae() || C.setLevel(H, !1);
297
+ N = ge(H), ae() || C.setLevel(H, !1);
298
298
  }, C.resetLevel = function() {
299
299
  X = null, he(), k.call(C);
300
300
  }, C.enableAll = function(H) {
@@ -302,10 +302,10 @@ function Wi() {
302
302
  }, C.disableAll = function(H) {
303
303
  C.setLevel(C.levels.SILENT, H);
304
304
  }, C.rebuild = function() {
305
- if (o !== C && (K = ge(o.getLevel())), k.call(C), o === C)
305
+ if (o !== C && (Z = ge(o.getLevel())), k.call(C), o === C)
306
306
  for (var H in r)
307
307
  r[H].rebuild();
308
- }, K = ge(
308
+ }, Z = ge(
309
309
  o ? o.getLevel() : "WARN"
310
310
  );
311
311
  var j = ae();
@@ -330,7 +330,7 @@ function Wi() {
330
330
  })(Lt)), Lt.exports;
331
331
  }
332
332
  var Gi = Wi();
333
- const Je = /* @__PURE__ */ Wa(Gi), Xi = J`
333
+ const Ke = /* @__PURE__ */ Wa(Gi), Xi = K`
334
334
  :host {
335
335
  --enegelai-bot-width: 420px;
336
336
  --enegelai-bot-base-font-size: 16px;
@@ -414,7 +414,7 @@ const Je = /* @__PURE__ */ Wa(Gi), Xi = J`
414
414
  border-radius: 0;
415
415
  }
416
416
  }
417
- `, ke = J`
417
+ `, ke = K`
418
418
  :host {
419
419
  --primary-color: var(--sl-color-primary-600);
420
420
  }
@@ -638,7 +638,7 @@ const Je = /* @__PURE__ */ Wa(Gi), Xi = J`
638
638
  }
639
639
 
640
640
 
641
- `, Ga = J`
641
+ `, Ga = K`
642
642
  ${ke}
643
643
 
644
644
  :host {
@@ -663,8 +663,8 @@ const Je = /* @__PURE__ */ Wa(Gi), Xi = J`
663
663
  color: white;
664
664
  }
665
665
  `;
666
- var Yi = Object.defineProperty, Ji = Object.getOwnPropertyDescriptor, ra = (a, e, t, i) => {
667
- for (var s = i > 1 ? void 0 : i ? Ji(e, t) : e, r = a.length - 1, o; r >= 0; r--)
666
+ var Yi = Object.defineProperty, Ki = Object.getOwnPropertyDescriptor, ra = (a, e, t, i) => {
667
+ for (var s = i > 1 ? void 0 : i ? Ki(e, t) : e, r = a.length - 1, o; r >= 0; r--)
668
668
  (o = a[r]) && (s = (i ? o(e, t, s) : o(s)) || s);
669
669
  return i && s && Yi(e, t, s), s;
670
670
  };
@@ -684,9 +684,9 @@ ra([
684
684
  x({ type: String })
685
685
  ], ut.prototype, "svg", 2);
686
686
  ut = ra([
687
- Z("cb-icon")
687
+ J("cb-icon")
688
688
  ], ut);
689
- let Zi = (a) => crypto.getRandomValues(new Uint8Array(a)), Ki = (a, e, t) => {
689
+ let Ji = (a) => crypto.getRandomValues(new Uint8Array(a)), Zi = (a, e, t) => {
690
690
  let i = (2 << Math.log2(a.length - 1)) - 1, s = -~(1.6 * i * e / a.length);
691
691
  return (r = e) => {
692
692
  let o = "";
@@ -696,7 +696,7 @@ let Zi = (a) => crypto.getRandomValues(new Uint8Array(a)), Ki = (a, e, t) => {
696
696
  if (o += a[f[p] & i] || "", o.length >= r) return o;
697
697
  }
698
698
  };
699
- }, Qi = (a, e = 21) => Ki(a, e | 0, Zi);
699
+ }, Qi = (a, e = 21) => Zi(a, e | 0, Ji);
700
700
  const es = Qi("1234567890abcdefghijklmnopqrstuvwxyz", 10);
701
701
  function fe(a = 10) {
702
702
  return es(a);
@@ -724,10 +724,11 @@ function Xa(a = !0, e = null) {
724
724
  function Vt(a) {
725
725
  if (!a || typeof a != "string")
726
726
  return "";
727
- let e = a.replace(/&(?!lt;|gt;)/g, "&amp;").replace(/</g, "&lt;").replace(/>/g, "&gt;");
728
- return e = e.replace(/&lt;br\s*\/?&gt;/gi, "<br>"), e;
727
+ const e = "__AMP__TOKEN__";
728
+ let i = a.replace(/https?:\/\/[^\s<]+/g, (s) => s.replace(/&/g, e)).replace(/&(?!lt;|gt;)/g, "&amp;").replace(/</g, "&lt;").replace(/>/g, "&gt;");
729
+ return i = i.replace(/&lt;br\s*\/?&gt;/gi, "<br>"), i = i.replace(new RegExp(e, "g"), "&"), i;
729
730
  }
730
- const se = Je.noConflict();
731
+ const se = Ke.noConflict();
731
732
  se.setLevel("info");
732
733
  const Sa = 3e4;
733
734
  class as {
@@ -929,7 +930,7 @@ class is {
929
930
  }
930
931
  }
931
932
  }
932
- class Ze {
933
+ class Je {
933
934
  /**
934
935
  * Converts Float32Array of amplitude data to ArrayBuffer in Int16Array format
935
936
  * @param {Float32Array} float32Array
@@ -1024,7 +1025,7 @@ class Ze {
1024
1025
  };
1025
1026
  }
1026
1027
  }
1027
- globalThis.WavPacker = Ze;
1028
+ globalThis.WavPacker = Je;
1028
1029
  const Ca = [
1029
1030
  4186.01,
1030
1031
  4434.92,
@@ -1077,10 +1078,10 @@ class lt {
1077
1078
  if (s === "music" || s === "voice") {
1078
1079
  const E = s === "voice" ? Aa : We, M = Array(E.length).fill(r);
1079
1080
  for (let L = 0; L < i.length; L++) {
1080
- const C = L * p, K = i[L];
1081
- for (let U = E.length - 1; U >= 0; U--)
1082
- if (C > E[U]) {
1083
- M[U] = Math.max(M[U], K);
1081
+ const C = L * p, Z = i[L];
1082
+ for (let N = E.length - 1; N >= 0; N--)
1083
+ if (C > E[N]) {
1084
+ M[N] = Math.max(M[N], Z);
1084
1085
  break;
1085
1086
  }
1086
1087
  }
@@ -1553,8 +1554,8 @@ class Ya {
1553
1554
  const p = navigator.userAgent || "", v = /iP(hone|ad|od)/.test(p), k = /CriOS/.test(p), w = /FxiOS/.test(p), _ = /EdgiOS/.test(p), P = /Safari/.test(p) && !/Chrome|Chromium|Edg/.test(p);
1554
1555
  this._isSafariMobile = v && P && !k && !w && !_;
1555
1556
  const E = !!(navigator.userAgentData && typeof navigator.userAgentData.mobile == "boolean" && navigator.userAgentData.mobile), M = /Android|iPhone|iPod|Mobile/.test(p), L = (() => {
1556
- const K = navigator.platform || "";
1557
- return /iPad/.test(p) || K === "MacIntel" && navigator.maxTouchPoints > 1;
1557
+ const Z = navigator.platform || "";
1558
+ return /iPad/.test(p) || Z === "MacIntel" && navigator.maxTouchPoints > 1;
1558
1559
  })(), C = E || M || L;
1559
1560
  this._firstTurnRampInMs = s ?? (this._isSafariMobile ? 140 : 0), this._primeMs = r ?? (this._isSafariMobile ? 220 : 0), this._requireGestureToUnlock = o != null ? !!o : !!this._isSafariMobile, this._enableLoopbackRef = f != null ? !!f : !!C, this.context = null, this.analyser = null, this._worklet = null, this._audibleGain = null, this._renderDest = null, this._pcSend = null, this._pcRecv = null, this._firstTurn = !0, this._unlocked = !this._requireGestureToUnlock, this.trackSampleOffsets = {}, this.interruptedTrackIds = {}, this._onGestureUnlock = this._onGestureUnlock.bind(this);
1560
1561
  }
@@ -1958,13 +1959,13 @@ class gs {
1958
1959
  throw new Error('Must specify "fromSampleRate" when reading from Float32Array, In16Array or Array');
1959
1960
  if (i < 3e3)
1960
1961
  throw new Error('Minimum "fromSampleRate" is 3000 (3kHz)');
1961
- w || (w = Ze.floatTo16BitPCM(k));
1962
+ w || (w = Je.floatTo16BitPCM(k));
1962
1963
  const _ = {
1963
1964
  bitsPerSample: 16,
1964
1965
  channels: [k],
1965
1966
  data: w
1966
1967
  };
1967
- o = new Ze().pack(i, _).blob, r = await o.arrayBuffer();
1968
+ o = new Je().pack(i, _).blob, r = await o.arrayBuffer();
1968
1969
  }
1969
1970
  const f = await s.decodeAudioData(r), p = f.getChannelData(0), v = URL.createObjectURL(o);
1970
1971
  return {
@@ -2137,8 +2138,8 @@ class gs {
2137
2138
  if (this._chunkProcessorSize) {
2138
2139
  const w = this._chunkProcessorBuffer;
2139
2140
  this._chunkProcessorBuffer = {
2140
- raw: Ze.mergeBuffers(w.raw, k.raw),
2141
- mono: Ze.mergeBuffers(w.mono, k.mono)
2141
+ raw: Je.mergeBuffers(w.raw, k.raw),
2142
+ mono: Je.mergeBuffers(w.mono, k.mono)
2142
2143
  }, this._chunkProcessorBuffer.mono.byteLength >= this._chunkProcessorSize && (this._chunkProcessor(this._chunkProcessorBuffer), this._chunkProcessorBuffer = {
2143
2144
  raw: new ArrayBuffer(0),
2144
2145
  mono: new ArrayBuffer(0)
@@ -2224,7 +2225,7 @@ use only for debugging`), o.connect(t.destination)), this.source = i, this.node
2224
2225
  throw new Error("Currently recording: please call .pause() first, or call .save(true) to force");
2225
2226
  this.log("Exporting ...");
2226
2227
  const t = await this._event("export");
2227
- return new Ze().pack(this.sampleRate, t.audio);
2228
+ return new Je().pack(this.sampleRate, t.audio);
2228
2229
  }
2229
2230
  /**
2230
2231
  * Ends the current recording session and saves the result
@@ -2236,7 +2237,7 @@ use only for debugging`), o.connect(t.destination)), this.source = i, this.node
2236
2237
  const e = this.processor;
2237
2238
  this.log("Stopping ..."), await this._event("stop"), this.recording = !1, this.stream.getTracks().forEach((o) => o.stop()), this.log("Exporting ...");
2238
2239
  const i = await this._event("export", {}, e);
2239
- return this.processor.disconnect(), this.source.disconnect(), this.node.disconnect(), this.analyser.disconnect(), this.stream = null, this.processor = null, this.source = null, this.node = null, new Ze().pack(this.sampleRate, i.audio);
2240
+ return this.processor.disconnect(), this.source.disconnect(), this.node.disconnect(), this.analyser.disconnect(), this.stream = null, this.processor = null, this.source = null, this.node = null, new Je().pack(this.sampleRate, i.audio);
2240
2241
  }
2241
2242
  /**
2242
2243
  * Performs a full cleanup of WavRecorder instance
@@ -2589,15 +2590,15 @@ class ys {
2589
2590
  this.guardRemain > 0 && this.guardRemain--;
2590
2591
  const M = e[E] / 32768, L = M * M;
2591
2592
  f = f + (1 - this.alphaFast) * (L - f), p = p + (1 - this.alphaSlow) * (L - p), this.vadEnabled && (f / (p + _) >= P ? v < this.vadAttackSamples && v++ : v = 0, v >= this.vadAttackSamples ? (w = !0, k = this.vadHangSamples) : k > 0 ? (w = !0, k--) : w = !1), w && this._shieldActive && (this._shieldActive = !1, this.target = 1, o = this.escapeAttackSamples, r = o > 0 ? (1 - s) / o : 0);
2592
- let C = 1, K = 0, U = !1;
2593
+ let C = 1, Z = 0, N = !1;
2593
2594
  if (this.duckActive) {
2594
2595
  const te = this.guardRemain > 0;
2595
- te && this._shieldActive && !w ? (U = this._shieldHardMute, C = this._shieldHardMute ? 0 : this._shieldFloor, K = this.attackSamples, this.guardRemain === 0 && (this._shieldActive = !1, this._shieldHardMute = !1)) : w ? (C = 1, K = this.escapeAttackSamples) : te ? (C = this.floor, K = this.attackSamples) : (C = 1, K = this.releaseSamples);
2596
+ te && this._shieldActive && !w ? (N = this._shieldHardMute, C = this._shieldHardMute ? 0 : this._shieldFloor, Z = this.attackSamples, this.guardRemain === 0 && (this._shieldActive = !1, this._shieldHardMute = !1)) : w ? (C = 1, Z = this.escapeAttackSamples) : te ? (C = this.floor, Z = this.attackSamples) : (C = 1, Z = this.releaseSamples);
2596
2597
  } else
2597
- C = 1, K = this.releaseSamples;
2598
- Math.abs(C - this.target) > 1e-4 && (this.target = C, o = K, r = o > 0 ? (C - s) / o : 0, o === 0 && (s = C)), o > 0 && (s += r, o--, o === 0 && (s = this.target, r = 0));
2598
+ C = 1, Z = this.releaseSamples;
2599
+ Math.abs(C - this.target) > 1e-4 && (this.target = C, o = Z, r = o > 0 ? (C - s) / o : 0, o === 0 && (s = C)), o > 0 && (s += r, o--, o === 0 && (s = this.target, r = 0));
2599
2600
  let X;
2600
- U && !w ? X = 0 : (X = e[E] * s, X > 32767 ? X = 32767 : X < -32768 && (X = -32768)), i[E] = X | 0;
2601
+ N && !w ? X = 0 : (X = e[E] * s, X > 32767 ? X = 32767 : X < -32768 && (X = -32768)), i[E] = X | 0;
2601
2602
  }
2602
2603
  return this.gain = s, this._step = r, this.rampRemain = o, this.vadFast = f, this.vadSlow = p, this._speechCount = v, this._hangRemain = k, this._speaking = w, i;
2603
2604
  }
@@ -2700,15 +2701,15 @@ class vs {
2700
2701
  E += he * he;
2701
2702
  }
2702
2703
  E = Math.sqrt(E) + 1e-12;
2703
- const M = this.sr / this.ds, L = (this.baseLatencySec + this.outputLatencySec) * 1e3 + this.latencyCompMs, C = Math.max(0, Math.round(L * M / 1e3)), K = Math.max(1, Math.round(this.windowMs * M / 1e3));
2704
- let U = 0, X = k;
2705
- C > 0 && (U = Math.max(0, Math.min(k, C - K)), X = Math.max(U, Math.min(k, C + K)));
2704
+ const M = this.sr / this.ds, L = (this.baseLatencySec + this.outputLatencySec) * 1e3 + this.latencyCompMs, C = Math.max(0, Math.round(L * M / 1e3)), Z = Math.max(1, Math.round(this.windowMs * M / 1e3));
2705
+ let N = 0, X = k;
2706
+ C > 0 && (N = Math.max(0, Math.min(k, C - Z)), X = Math.max(N, Math.min(k, C + Z)));
2706
2707
  const te = Math.max(1, Math.floor(this.hop / this.ds));
2707
2708
  let He = -1;
2708
- for (let ae = U; ae <= X; ae += te) {
2709
+ for (let ae = N; ae <= X; ae += te) {
2709
2710
  let he = 0, ge = 0;
2710
- for (let N = 0; N < o; N++) {
2711
- const $e = _[N], Pe = P[ae + N];
2711
+ for (let U = 0; U < o; U++) {
2712
+ const $e = _[U], Pe = P[ae + U];
2712
2713
  he += $e * Pe, ge += Pe * Pe;
2713
2714
  }
2714
2715
  const j = E * (Math.sqrt(ge) + 1e-12), H = j > 0 ? he / j : 0;
@@ -2953,8 +2954,8 @@ class xs {
2953
2954
  }
2954
2955
  }
2955
2956
  }
2956
- const Ue = Je.noConflict();
2957
- Ue.setLevel("info");
2957
+ const Ne = Ke.noConflict();
2958
+ Ne.setLevel("info");
2958
2959
  class pt extends is {
2959
2960
  constructor(e = {}) {
2960
2961
  super({ name: "WebAudioProcessorV2" }), this.options = e, this.muted = !1, this.audioRecorder = new ot({
@@ -3033,13 +3034,13 @@ class pt extends is {
3033
3034
  e(), this._latencyTimer = setInterval(e, 1e3);
3034
3035
  try {
3035
3036
  const t = this.audioRecorder.captureInfo?.aecGranted;
3036
- t && Ue.info("AEC granted:", t);
3037
+ t && Ne.info("AEC granted:", t);
3037
3038
  } catch {
3038
3039
  }
3039
- Ue.info("WebAudioProcessorV2 started");
3040
+ Ne.info("WebAudioProcessorV2 started");
3040
3041
  }
3041
3042
  async stop() {
3042
- this._stopRecWatchdog(), this.audioRecorder.getStatus() !== "ended" && (await this.audioRecorder.end(), this.audioRecorder = null), this.audioRecorderAnalyzer = null, this.audioPlayer?.context && (await this.audioPlayer.disconnect(), this.audioPlayer = null), this._latencyTimer && (clearInterval(this._latencyTimer), this._latencyTimer = null), this._didPlayOnce = !1, Ue.info("WebAudioProcessorV2 stopped");
3043
+ this._stopRecWatchdog(), this.audioRecorder.getStatus() !== "ended" && (await this.audioRecorder.end(), this.audioRecorder = null), this.audioRecorderAnalyzer = null, this.audioPlayer?.context && (await this.audioPlayer.disconnect(), this.audioPlayer = null), this._latencyTimer && (clearInterval(this._latencyTimer), this._latencyTimer = null), this._didPlayOnce = !1, Ne.info("WebAudioProcessorV2 stopped");
3043
3044
  }
3044
3045
  get started() {
3045
3046
  return !!(this.audioRecorder && this.audioRecorder.getStatus() !== "ended");
@@ -3061,7 +3062,7 @@ class pt extends is {
3061
3062
  }
3062
3063
  async _checkRecordingHealth(e) {
3063
3064
  const i = Date.now() - this._lastMicCaptureTime;
3064
- i > 2e3 && (Ue.warn(`WebAudioProcessorV2: large gap between mic frames: ${i} ms detected, possible lock or suspend - terminating audio`), this.emit("terminate").catch(() => {
3065
+ i > 2e3 && (Ne.warn(`WebAudioProcessorV2: large gap between mic frames: ${i} ms detected, possible lock or suspend - terminating audio`), this.emit("terminate").catch(() => {
3065
3066
  }));
3066
3067
  }
3067
3068
  // ---- Capture ----
@@ -3070,7 +3071,7 @@ class pt extends is {
3070
3071
  * Your existing 'audio' event is preserved: payload includes base64 of Int16 PCM.
3071
3072
  */
3072
3073
  async beginAudioCapture() {
3073
- !this.started || this.recording || (Ue.info("WebAudioProcessorV2: beginAudioCapture"), this._lastMicCaptureTime = Date.now(), this._startRecWatchdog(), await this.audioRecorder.record((e) => {
3074
+ !this.started || this.recording || (Ne.info("WebAudioProcessorV2: beginAudioCapture"), this._lastMicCaptureTime = Date.now(), this._startRecWatchdog(), await this.audioRecorder.record((e) => {
3074
3075
  if (e?.mono && e.mono?.byteLength) {
3075
3076
  this._lastMicCaptureTime = Date.now();
3076
3077
  let t = new Int16Array(e.mono);
@@ -3080,12 +3081,12 @@ class pt extends is {
3080
3081
  const i = this.useAdaptiveSuppressor ? this.mixMinusSmooth.filterMicFrame(t) : this.mixMinus.filterMicFrame(t) || new Int16Array(0);
3081
3082
  if (i.length === 0) return;
3082
3083
  const s = pt.arrayBufferToBase64(i);
3083
- Ue.info(`Audio: mono ${e.mono.byteLength} bytes, base64 ${s.length} bytes`), this.emit("audio", { audio: s });
3084
+ Ne.info(`Audio: mono ${e.mono.byteLength} bytes, base64 ${s.length} bytes`), this.emit("audio", { audio: s });
3084
3085
  }
3085
3086
  }));
3086
3087
  }
3087
3088
  async endAudioCapture() {
3088
- !this.started || !this.recording || (Ue.info("WebAudioProcessorV2: endAudioCapture"), this._stopRecWatchdog(), await this.audioRecorder.pause());
3089
+ !this.started || !this.recording || (Ne.info("WebAudioProcessorV2: endAudioCapture"), this._stopRecWatchdog(), await this.audioRecorder.pause());
3089
3090
  }
3090
3091
  // ---- Playback ----
3091
3092
  /**
@@ -3207,7 +3208,7 @@ function Ss() {
3207
3208
  }
3208
3209
  return a;
3209
3210
  }
3210
- function Ja(a) {
3211
+ function Ka(a) {
3211
3212
  const e = Ss(), t = document.createElement("cb-toast");
3212
3213
  return t.message = a.message, t.variant = a.variant ?? "success", t.duration = typeof a.duration == "number" ? a.duration : 3e3, t.closeable = !!a.closeable, t.icon = a.icon ?? "", t.ariaLive = a.ariaLive ?? "polite", e.appendChild(t), t;
3213
3214
  }
@@ -3258,7 +3259,7 @@ let qe = class extends Fe {
3258
3259
  return a.trim().startsWith("<") ? u`${G(a)}` : a;
3259
3260
  }
3260
3261
  };
3261
- qe.styles = J`
3262
+ qe.styles = K`
3262
3263
  :host {
3263
3264
  display: block;
3264
3265
  pointer-events: auto; /* receive pointer events within toast */
@@ -3385,7 +3386,7 @@ st([
3385
3386
  x({ type: String })
3386
3387
  ], qe.prototype, "ariaLive", 2);
3387
3388
  qe = st([
3388
- Z("cb-toast")
3389
+ J("cb-toast")
3389
3390
  ], qe);
3390
3391
  function Q(a) {
3391
3392
  return a != null && typeof a == "object" && a["@@functional/placeholder"] === !0;
@@ -3395,7 +3396,7 @@ function tt(a) {
3395
3396
  return arguments.length === 0 || Q(t) ? e : a.apply(this, arguments);
3396
3397
  };
3397
3398
  }
3398
- function Ke(a) {
3399
+ function Ze(a) {
3399
3400
  return function e(t, i) {
3400
3401
  switch (arguments.length) {
3401
3402
  case 0:
@@ -3419,23 +3420,23 @@ function Cs(a) {
3419
3420
  case 0:
3420
3421
  return e;
3421
3422
  case 1:
3422
- return Q(t) ? e : Ke(function(r, o) {
3423
+ return Q(t) ? e : Ze(function(r, o) {
3423
3424
  return a(t, r, o);
3424
3425
  });
3425
3426
  case 2:
3426
- return Q(t) && Q(i) ? e : Q(t) ? Ke(function(r, o) {
3427
+ return Q(t) && Q(i) ? e : Q(t) ? Ze(function(r, o) {
3427
3428
  return a(r, i, o);
3428
- }) : Q(i) ? Ke(function(r, o) {
3429
+ }) : Q(i) ? Ze(function(r, o) {
3429
3430
  return a(t, r, o);
3430
3431
  }) : tt(function(r) {
3431
3432
  return a(t, i, r);
3432
3433
  });
3433
3434
  default:
3434
- return Q(t) && Q(i) && Q(s) ? e : Q(t) && Q(i) ? Ke(function(r, o) {
3435
+ return Q(t) && Q(i) && Q(s) ? e : Q(t) && Q(i) ? Ze(function(r, o) {
3435
3436
  return a(r, o, s);
3436
- }) : Q(t) && Q(s) ? Ke(function(r, o) {
3437
+ }) : Q(t) && Q(s) ? Ze(function(r, o) {
3437
3438
  return a(r, i, o);
3438
- }) : Q(i) && Q(s) ? Ke(function(r, o) {
3439
+ }) : Q(i) && Q(s) ? Ze(function(r, o) {
3439
3440
  return a(t, r, o);
3440
3441
  }) : Q(t) ? tt(function(r) {
3441
3442
  return a(r, i, s);
@@ -3454,7 +3455,7 @@ function Ms(a, e) {
3454
3455
  var t = a < 0 ? e.length + a : a;
3455
3456
  return e[t];
3456
3457
  }
3457
- var Ts = /* @__PURE__ */ Ke(function(e, t) {
3458
+ var Ts = /* @__PURE__ */ Ze(function(e, t) {
3458
3459
  return t == null || t !== t ? e : t;
3459
3460
  });
3460
3461
  function Is(a, e) {
@@ -3475,18 +3476,18 @@ var $s = Object.defineProperty, O = (a, e, t, i) => {
3475
3476
  (o = a[r]) && (s = o(e, t, s) || s);
3476
3477
  return s && $s(e, t, s), s;
3477
3478
  };
3478
- const T = Je.noConflict();
3479
+ const T = Ke.noConflict();
3479
3480
  T.setLevel("info");
3480
3481
  const ne = "cb_", Ps = (a) => new Promise((e) => setTimeout(e, a));
3481
- class R extends Jt {
3482
+ class R extends Kt {
3482
3483
  constructor() {
3483
- super(), this.actionIdCounter = 0, this.currentLoadContext = {}, this.prefilledFormValues = {}, this.wsClient = null, this.webAudioProcessor = null, this.webAudioTrackId = null, this.webAudioCurrentMark = null, this.replyMessage = null, this.streamingResponseInProgress = !1, this.streamingResponseLastText = null, this.streamingResponseBuffer = null, this.streamingResponseTagStartPos = 0, this.streamingResponseCurrentTag = null, this.tabsBroadcastChannel = new BroadcastChannel("c7o-bot-tabs"), this.tabId = "c7o-bot-tab-" + (self.crypto?.randomUUID?.() || Math.random().toString(36).slice(2)), this.tabsBroadcastChannel.addEventListener("message", this.handleBroadcastMessage.bind(this)), console.log(`c7o: AppState: created, tabId=${this.tabId}`);
3484
+ super(), this.actionIdCounter = 0, this.currentLoadContext = {}, this.prefilledFormValues = {}, this.wsClient = null, this.checkConnectionPromise = null, this.webAudioProcessor = null, this.webAudioTrackId = null, this.webAudioCurrentMark = null, this.replyMessage = null, this.streamingResponseInProgress = !1, this.streamingResponseLastText = null, this.streamingResponseBuffer = null, this.streamingResponseTagStartPos = 0, this.streamingResponseCurrentTag = null, this.tabsBroadcastChannel = new BroadcastChannel("c7o-bot-tabs"), this.tabId = "c7o-bot-tab-" + (self.crypto?.randomUUID?.() || Math.random().toString(36).slice(2)), this.tabsBroadcastChannel.addEventListener("message", this.handleBroadcastMessage.bind(this)), console.log(`c7o: AppState: created, tabId=${this.tabId}`);
3484
3485
  }
3485
3486
  // this is called at startup
3486
3487
  setSetting(e) {
3487
3488
  T.info("appState: Startup: setSetting", e);
3488
3489
  const t = this.setting;
3489
- !!t && (t.orgId !== e.orgId || t.botId !== e.botId || t.url !== e.url || t.version !== e.version) && (this.botSettingsInitialized = !1, this.botSettings = null, this.botSettingsRetryTimeout = 5, this.disabled = !1), this.setting = e, this.initBot().catch((s) => {
3490
+ !!t && (t.orgId !== e.orgId || t.botId !== e.botId || t.url !== e.url || t.version !== e.version || t.testMode !== e.testMode) && (this.botSettingsInitialized = !1, this.botSettings = null, this.botSettingsRetryTimeout = 5, this.disabled = !1), this.setting = e, this.initBot().catch((s) => {
3490
3491
  T.info(`Exception during bot initialization: ${s.message}`);
3491
3492
  });
3492
3493
  }
@@ -3807,7 +3808,7 @@ class R extends Jt {
3807
3808
  return this.wsClient;
3808
3809
  let t = `${this.setting.url.startsWith("localhost") ? "ws" : "wss"}://${this.setting.url}/api/bot/connect/${this.setting.orgId}/${this.setting.botId}/${this.conversationId}`;
3809
3810
  const i = new URL(t);
3810
- if (this.setting.version && this.setting.version !== "current" && i.searchParams.set("version", this.setting.version), this.setting.enableMultiModalConnection && (i.searchParams.set("multiModal", "true"), T.info("MultiModal connection enabled - adding multiModal=true parameter")), this.setting.enablePassContextOnConnect && this.context && typeof this.context == "object")
3811
+ if (this.setting.version && this.setting.version !== "current" && i.searchParams.set("version", this.setting.version), this.setting.testMode && (i.searchParams.set("testMode", "true"), T.info("Test Mode enabled - adding testMode=true parameter")), this.setting.enableMultiModalConnection && (i.searchParams.set("multiModal", "true"), T.info("MultiModal connection enabled - adding multiModal=true parameter")), this.setting.enablePassContextOnConnect && this.context && typeof this.context == "object")
3811
3812
  try {
3812
3813
  const s = JSON.stringify(this.context);
3813
3814
  i.searchParams.set("context", s), T.info("Adding context to connect URL");
@@ -3837,6 +3838,39 @@ class R extends Jt {
3837
3838
  T.info(`WSC: connection closed, connected: ${this.wsClient?.connected}`, e), this.stopWebAudio().catch((t) => {
3838
3839
  }), this.connected = !1;
3839
3840
  }
3841
+ async _checkConnection() {
3842
+ try {
3843
+ const e = await this.getWsClient();
3844
+ if (!e) {
3845
+ T.error("Error - failed to obtain ws client for check connection");
3846
+ return;
3847
+ }
3848
+ e.checkConnection();
3849
+ } catch (e) {
3850
+ T.error(`Check connection failed: ${e.message}`);
3851
+ }
3852
+ }
3853
+ // Check connection for parallel calls - if there is already a check in progress, wait for it instead of starting a new one
3854
+ async checkConnection() {
3855
+ return this.checkConnectionPromise || (this.checkConnectionPromise = this._checkConnection().finally(() => {
3856
+ this.checkConnectionPromise = null;
3857
+ })), this.checkConnectionPromise;
3858
+ }
3859
+ // Called on browser/app lifecycle resume events to quickly recover stale socket state.
3860
+ handleLifecycleResume(e = "unknown", t = () => {
3861
+ }) {
3862
+ if (e === "visibilitychange" && document.visibilityState !== "visible") {
3863
+ T.info("WSC: lifecycle resume - document not visible, skipping connection check");
3864
+ return;
3865
+ }
3866
+ if (this.isConversationStart()) {
3867
+ T.info("WSC: lifecycle resume - conversation just started, skipping connection check");
3868
+ return;
3869
+ }
3870
+ T.info(`WSC: lifecycle resume (${e})`), this.checkConnection().finally(() => {
3871
+ t();
3872
+ });
3873
+ }
3840
3874
  async handleWscConnectError(e) {
3841
3875
  T.info("WSC: connect error - resetting conversation", e);
3842
3876
  const t = this.wsClient?.url || null;
@@ -4254,7 +4288,7 @@ class R extends Jt {
4254
4288
  if (s) {
4255
4289
  T.error(
4256
4290
  `File "${s.name}" exceeds the ${t} MB limit and will not be uploaded.`
4257
- ), Ja({
4291
+ ), Ka({
4258
4292
  message: `File is larger than ${t} MB`,
4259
4293
  variant: "danger",
4260
4294
  duration: 3800,
@@ -4419,6 +4453,7 @@ O([
4419
4453
  botId: null,
4420
4454
  url: null,
4421
4455
  version: "current",
4456
+ testMode: !1,
4422
4457
  welcomeMessage: null,
4423
4458
  disclaimerMessage: null,
4424
4459
  enableShowFullDisclaimerMessage: !1,
@@ -4492,7 +4527,7 @@ O([
4492
4527
  O([
4493
4528
  z({ type: Boolean, value: !1 })
4494
4529
  ], R.prototype, "webAudioMuted");
4495
- const b = new R(), Ls = J`
4530
+ const b = new R(), Ls = K`
4496
4531
  ${ke}
4497
4532
  :host {
4498
4533
  position: relative;
@@ -4612,7 +4647,7 @@ class re extends Fe {
4612
4647
  zs([
4613
4648
  x({ type: String })
4614
4649
  ], re.prototype, "lang");
4615
- var Os = Object.defineProperty, Bs = Object.getOwnPropertyDescriptor, Za = (a, e, t, i) => {
4650
+ var Os = Object.defineProperty, Bs = Object.getOwnPropertyDescriptor, Ja = (a, e, t, i) => {
4616
4651
  for (var s = i > 1 ? void 0 : i ? Bs(e, t) : e, r = a.length - 1, o; r >= 0; r--)
4617
4652
  (o = a[r]) && (s = (i ? o(e, t, s) : o(s)) || s);
4618
4653
  return i && s && Os(e, t, s), s;
@@ -4681,13 +4716,13 @@ let Ot = class extends re {
4681
4716
  }
4682
4717
  };
4683
4718
  Ot.styles = Ls;
4684
- Za([
4719
+ Ja([
4685
4720
  x({ type: String, attribute: "title" })
4686
4721
  ], Ot.prototype, "title", 2);
4687
- Ot = Za([
4688
- Z("cb-header")
4722
+ Ot = Ja([
4723
+ J("cb-header")
4689
4724
  ], Ot);
4690
- const Ds = J`
4725
+ const Ds = K`
4691
4726
  ${ke}
4692
4727
  .cb-footer {
4693
4728
  line-height: 60px;
@@ -4707,7 +4742,7 @@ var Fs = Object.getOwnPropertyDescriptor, js = (a, e, t, i) => {
4707
4742
  (o = a[r]) && (s = o(s) || s);
4708
4743
  return s;
4709
4744
  };
4710
- let Zt = class extends re {
4745
+ let Jt = class extends re {
4711
4746
  constructor() {
4712
4747
  super(...arguments), this.year = (/* @__PURE__ */ new Date()).getFullYear();
4713
4748
  }
@@ -4742,11 +4777,11 @@ let Zt = class extends re {
4742
4777
  `;
4743
4778
  }
4744
4779
  };
4745
- Zt.styles = Ds;
4746
- Zt = js([
4747
- Z("cb-footer")
4748
- ], Zt);
4749
- const Hs = J`
4780
+ Jt.styles = Ds;
4781
+ Jt = js([
4782
+ J("cb-footer")
4783
+ ], Jt);
4784
+ const Hs = K`
4750
4785
  ${ke}
4751
4786
 
4752
4787
  :host {
@@ -4947,7 +4982,7 @@ const Hs = J`
4947
4982
  background-size: 100%;
4948
4983
  transition: background 0s;
4949
4984
  }
4950
- `, Ka = J`
4985
+ `, Za = K`
4951
4986
  :host {
4952
4987
  --primary-color: var(--sl-color-primary-600);
4953
4988
  }
@@ -5101,7 +5136,7 @@ const Hs = J`
5101
5136
  .card-btn[aria-disabled="true"]:focus-visible {
5102
5137
  box-shadow: none;
5103
5138
  }
5104
- `, Qa = J`
5139
+ `, Qa = K`
5105
5140
  :host {
5106
5141
  --primary-color: var(--sl-color-primary-600);
5107
5142
  }
@@ -5192,8 +5227,8 @@ const Hs = J`
5192
5227
  }
5193
5228
  .split-btn[aria-expanded="true"] .split-btn__caret { transform: rotate(180deg); }
5194
5229
  `;
5195
- var Vs = Object.defineProperty, Ns = Object.getOwnPropertyDescriptor, je = (a, e, t, i) => {
5196
- for (var s = i > 1 ? void 0 : i ? Ns(e, t) : e, r = a.length - 1, o; r >= 0; r--)
5230
+ var Vs = Object.defineProperty, Us = Object.getOwnPropertyDescriptor, je = (a, e, t, i) => {
5231
+ for (var s = i > 1 ? void 0 : i ? Us(e, t) : e, r = a.length - 1, o; r >= 0; r--)
5197
5232
  (o = a[r]) && (s = (i ? o(e, t, s) : o(s)) || s);
5198
5233
  return i && s && Vs(e, t, s), s;
5199
5234
  };
@@ -5229,7 +5264,7 @@ let gt = class extends Fe {
5229
5264
  this.dispatchEvent(new CustomEvent("select", { detail: { option: e }, bubbles: !0, composed: !0 }));
5230
5265
  }
5231
5266
  };
5232
- gt.styles = J`
5267
+ gt.styles = K`
5233
5268
  :host {
5234
5269
  position: fixed; /* overlay */
5235
5270
  left: 0;
@@ -5289,7 +5324,7 @@ je([
5289
5324
  x({ type: Number })
5290
5325
  ], gt.prototype, "minWidth", 2);
5291
5326
  gt = je([
5292
- Z("cb-split-menu")
5327
+ J("cb-split-menu")
5293
5328
  ], gt);
5294
5329
  let Ge = class extends Fe {
5295
5330
  constructor() {
@@ -5393,14 +5428,14 @@ je([
5393
5428
  xe(".split-btn")
5394
5429
  ], Ge.prototype, "_btn", 2);
5395
5430
  Ge = je([
5396
- Z("cb-split-button")
5431
+ J("cb-split-button")
5397
5432
  ], Ge);
5398
- var Us = Object.defineProperty, Ws = Object.getOwnPropertyDescriptor, wt = (a, e, t, i) => {
5433
+ var Ns = Object.defineProperty, Ws = Object.getOwnPropertyDescriptor, wt = (a, e, t, i) => {
5399
5434
  for (var s = i > 1 ? void 0 : i ? Ws(e, t) : e, r = a.length - 1, o; r >= 0; r--)
5400
5435
  (o = a[r]) && (s = (i ? o(e, t, s) : o(s)) || s);
5401
- return i && s && Us(e, t, s), s;
5436
+ return i && s && Ns(e, t, s), s;
5402
5437
  };
5403
- const Tt = Je.noConflict(), $a = "M3.612 15.443c-.386.198-.824-.149-.746-.592l.83-4.73L.173 6.765c-.329-.314-.158-.888.283-.95l4.898-.696L7.538.792c.197-.39.73-.39.927 0l2.184 4.327 4.898.696c.441.062.612.636.282.95l-3.522 3.356.83 4.73c.078.443-.36.79-.746.592L8 13.187l-4.389 2.256z", Gs = J`
5438
+ const Tt = Ke.noConflict(), $a = "M3.612 15.443c-.386.198-.824-.149-.746-.592l.83-4.73L.173 6.765c-.329-.314-.158-.888.283-.95l4.898-.696L7.538.792c.197-.39.73-.39.927 0l2.184 4.327 4.898.696c.441.062.612.636.282.95l-3.522 3.356.83 4.73c.078.443-.36.79-.746.592L8 13.187l-4.389 2.256z", Gs = K`
5404
5439
  :host { display: block; width: 100%; color: var(--cb-fg, #111827); }
5405
5440
 
5406
5441
  /* CARD */
@@ -5508,16 +5543,16 @@ let Me = class extends Fe {
5508
5543
  }
5509
5544
  /* ----------------- CARD ----------------- */
5510
5545
  renderCard(a) {
5511
- const { title: e, subtitle: t, image_url: i, image_alt: s, buttons: r = [] } = a, o = (a.url || "").trim(), f = (a.target || "").trim(), p = o.length > 0, v = a.info?.text, k = typeof a.info?.rating == "number" ? a.info.rating : typeof a.rating == "number" ? a.rating : void 0, w = !!v, _ = typeof k == "number", P = ["card__info", w && _ ? "card__info--between" : ""].filter(Boolean).join(" "), E = r.some((U) => (U.type ?? "").toLowerCase() === "primary"), M = r.some((U) => (U.type ?? "").toLowerCase() === "secondary"), L = ["card__actions", E && M ? "card__actions--between" : ""].filter(Boolean).join(" "), C = () => {
5546
+ const { title: e, subtitle: t, image_url: i, image_alt: s, buttons: r = [] } = a, o = (a.url || "").trim(), f = (a.target || "").trim(), p = o.length > 0, v = a.info?.text, k = typeof a.info?.rating == "number" ? a.info.rating : typeof a.rating == "number" ? a.rating : void 0, w = !!v, _ = typeof k == "number", P = ["card__info", w && _ ? "card__info--between" : ""].filter(Boolean).join(" "), E = r.some((N) => (N.type ?? "").toLowerCase() === "primary"), M = r.some((N) => (N.type ?? "").toLowerCase() === "secondary"), L = ["card__actions", E && M ? "card__actions--between" : ""].filter(Boolean).join(" "), C = () => {
5512
5547
  if (!i) return Ae;
5513
- const U = u`<img class="card__image" src=${i} alt=${s ?? e ?? "Image"} draggable="false" />`;
5514
- return p ? u`<a class="card__image-link" href=${o} target=${f || "_blank"} rel="noopener noreferrer" draggable="false" aria-label=${e ? `Open: ${e}` : "Open"}>${U}</a>` : U;
5515
- }, K = () => e ? p && !i ? u`<h3 class="card__title"><a class="card__title-link" href=${o} target=${f || "_blank"} rel="noopener noreferrer" draggable="false">${e}</a></h3>` : u`<h3 class="card__title">${e}</h3>` : Ae;
5548
+ const N = u`<img class="card__image" src=${i} alt=${s ?? e ?? "Image"} draggable="false" />`;
5549
+ return p ? u`<a class="card__image-link" href=${o} target=${f || "_blank"} rel="noopener noreferrer" draggable="false" aria-label=${e ? `Open: ${e}` : "Open"}>${N}</a>` : N;
5550
+ }, Z = () => e ? p && !i ? u`<h3 class="card__title"><a class="card__title-link" href=${o} target=${f || "_blank"} rel="noopener noreferrer" draggable="false">${e}</a></h3>` : u`<h3 class="card__title">${e}</h3>` : Ae;
5516
5551
  return u`
5517
5552
  <div class="card" role="group" aria-label=${e ? `Card: ${e}` : "Card"}>
5518
5553
  ${C()}
5519
5554
  <div class="card__content">
5520
- ${K()}
5555
+ ${Z()}
5521
5556
  ${t ? u`<div class="card__subtitle">${t}</div>` : Ae}
5522
5557
  ${w || _ ? u`
5523
5558
  <div class=${P}>
@@ -5526,7 +5561,7 @@ let Me = class extends Fe {
5526
5561
  </div>` : Ae}
5527
5562
  ${r.length ? u`
5528
5563
  <div class=${L}>
5529
- ${r.map((U, X) => this.renderAnyButton(U, X))}
5564
+ ${r.map((N, X) => this.renderAnyButton(N, X))}
5530
5565
  </div>` : Ae}
5531
5566
  </div>
5532
5567
  </div>
@@ -5720,7 +5755,7 @@ let Me = class extends Fe {
5720
5755
  body: JSON.stringify(r)
5721
5756
  });
5722
5757
  if (!o.ok) {
5723
- Tt.error("c7o: cart/add.js failed"), Ja({
5758
+ Tt.error("c7o: cart/add.js failed"), Ka({
5724
5759
  message: "Unable to add item to cart.",
5725
5760
  variant: "danger",
5726
5761
  duration: 2800,
@@ -5731,7 +5766,7 @@ let Me = class extends Fe {
5731
5766
  await o.json(), Tt.info("c7o: cart/add.js - cart updated"), Tt.info("c7o: reloading window after cart update"), window.location.reload();
5732
5767
  }
5733
5768
  };
5734
- Me.styles = [Gs, Ka, Qa];
5769
+ Me.styles = [Gs, Za, Qa];
5735
5770
  Me.DRAG_THRESHOLD_PX = 10;
5736
5771
  wt([
5737
5772
  x({ type: Object })
@@ -5746,7 +5781,7 @@ wt([
5746
5781
  Va()
5747
5782
  ], Me.prototype, "_canNext", 2);
5748
5783
  Me = wt([
5749
- Z("cb-block")
5784
+ J("cb-block")
5750
5785
  ], Me);
5751
5786
  var Xs = Object.defineProperty, Ys = Object.getOwnPropertyDescriptor, ei = (a, e, t, i) => {
5752
5787
  for (var s = i > 1 ? void 0 : i ? Ys(e, t) : e, r = a.length - 1, o; r >= 0; r--)
@@ -5765,7 +5800,7 @@ let Bt = class extends Fe {
5765
5800
  `;
5766
5801
  }
5767
5802
  };
5768
- Bt.styles = J`
5803
+ Bt.styles = K`
5769
5804
  :host {
5770
5805
  display: block;
5771
5806
  }
@@ -5780,14 +5815,14 @@ ei([
5780
5815
  x({ type: Array })
5781
5816
  ], Bt.prototype, "blocks", 2);
5782
5817
  Bt = ei([
5783
- Z("cb-blocks")
5818
+ J("cb-blocks")
5784
5819
  ], Bt);
5785
- var Rt = { exports: {} }, Js = Rt.exports, Pa;
5786
- function Zs() {
5820
+ var Rt = { exports: {} }, Ks = Rt.exports, Pa;
5821
+ function Js() {
5787
5822
  return Pa || (Pa = 1, (function(a, e) {
5788
5823
  (function(t, i) {
5789
5824
  a.exports = i();
5790
- })(Js, (function() {
5825
+ })(Ks, (function() {
5791
5826
  function t(n, c) {
5792
5827
  if (!(n instanceof c)) throw new TypeError("Cannot call a class as a function");
5793
5828
  }
@@ -5833,7 +5868,7 @@ function Zs() {
5833
5868
  return n;
5834
5869
  }
5835
5870
  function v(n, c) {
5836
- if ((N(n) || n === window || n === document) && (n = [n]), Pe(n) || Ve(n) || (n = [n]), ua(n) != 0) {
5871
+ if ((U(n) || n === window || n === document) && (n = [n]), Pe(n) || Ve(n) || (n = [n]), ua(n) != 0) {
5837
5872
  if (Pe(n) && !Ve(n)) for (var l = n.length, d = 0; d < l && c.call(n[d], n[d], d, n) !== !1; d++) ;
5838
5873
  else if (Ve(n)) {
5839
5874
  for (var h in n) if (ie(n, h) && c.call(n[h], n[h], h, n) === !1) break;
@@ -5898,10 +5933,10 @@ function Zs() {
5898
5933
  if (c === "") return n.style.webkitTransform = "", n.style.MozTransform = "", n.style.msTransform = "", n.style.OTransform = "", n.style.transform = "", !1;
5899
5934
  n.style.webkitTransform = c, n.style.MozTransform = c, n.style.msTransform = c, n.style.OTransform = c, n.style.transform = c;
5900
5935
  }
5901
- function K(n) {
5936
+ function Z(n) {
5902
5937
  n.style.display = "block";
5903
5938
  }
5904
- function U(n) {
5939
+ function N(n) {
5905
5940
  n.style.display = "none";
5906
5941
  }
5907
5942
  function X(n) {
@@ -5969,7 +6004,7 @@ function Zs() {
5969
6004
  function H(n) {
5970
6005
  return typeof n == "string";
5971
6006
  }
5972
- function N(n) {
6007
+ function U(n) {
5973
6008
  return !(!n || !n.nodeType || n.nodeType != 1);
5974
6009
  }
5975
6010
  function $e(n) {
@@ -6170,7 +6205,7 @@ function Zs() {
6170
6205
  }
6171
6206
  function Si(n, c, l, d) {
6172
6207
  var h, m = this, g = n.querySelector(".gslide-media"), y = !(!ie(c, "href") || !c.href) && c.href.split("#").pop().trim(), A = !(!ie(c, "content") || !c.content) && c.content;
6173
- if (A && (H(A) && (h = X('<div class="ginlined-content">'.concat(A, "</div>"))), N(A))) {
6208
+ if (A && (H(A) && (h = X('<div class="ginlined-content">'.concat(A, "</div>"))), U(A))) {
6174
6209
  A.style.display == "none" && (A.style.display = "block");
6175
6210
  var S = document.createElement("div");
6176
6211
  S.className = "ginlined-content", S.appendChild(A), h = S;
@@ -6203,7 +6238,7 @@ function Zs() {
6203
6238
  return (n = n.toLowerCase()).match(/\.(jpeg|jpg|jpe|gif|png|apn|webp|avif|svg)/) !== null ? "image" : n.match(/(youtube\.com|youtube-nocookie\.com)\/watch\?v=([a-zA-Z0-9\-_]+)/) || n.match(/youtu\.be\/([a-zA-Z0-9\-_]+)/) || n.match(/(youtube\.com|youtube-nocookie\.com)\/embed\/([a-zA-Z0-9\-_]+)/) || n.match(/(youtube\.com|youtube-nocookie\.com)\/shorts\/([a-zA-Z0-9\-_]+)/) || n.match(/vimeo\.com\/([0-9]*)/) || n.match(/\.(mp4|ogg|webm|mov)/) !== null ? "video" : n.match(/\.(mp3|wav|wma|aac|ogg)/) !== null ? "audio" : n.indexOf("#") > -1 && c.split("#").pop().trim() !== "" ? "inline" : n.indexOf("goajax=true") > -1 ? "ajax" : "external";
6204
6239
  } }, { key: "parseConfig", value: function(n, c) {
6205
6240
  var l = this, d = p({ descPosition: c.descPosition }, this.defaults);
6206
- if (Ve(n) && !N(n)) {
6241
+ if (Ve(n) && !U(n)) {
6207
6242
  ie(n, "type") || (ie(n, "content") && n.content ? n.type = "inline" : ie(n, "href") && (n.type = this.sourceType(n.href)));
6208
6243
  var h = p(d, n);
6209
6244
  return this.setSize(h, c), h;
@@ -6298,7 +6333,7 @@ function Zs() {
6298
6333
  } }, { key: "create", value: function() {
6299
6334
  return X(this.instance.settings.slideHTML);
6300
6335
  } }, { key: "getConfig", value: function() {
6301
- N(this.element) || this.element.hasOwnProperty("draggable") || (this.element.draggable = this.instance.settings.draggable);
6336
+ U(this.element) || this.element.hasOwnProperty("draggable") || (this.element.draggable = this.instance.settings.draggable);
6302
6337
  var n = new Ai(this.instance.settings.slideExtraAttributes);
6303
6338
  return this.slideConfig = n.parseConfig(this.element, this.instance.settings), this.slideConfig;
6304
6339
  } }]);
@@ -6399,7 +6434,7 @@ function Zs() {
6399
6434
  } }, { key: "destroy", value: function() {
6400
6435
  return this.singleTapTimeout && clearTimeout(this.singleTapTimeout), this.tapTimeout && clearTimeout(this.tapTimeout), this.longTapTimeout && clearTimeout(this.longTapTimeout), this.swipeTimeout && clearTimeout(this.swipeTimeout), this.element.removeEventListener("touchstart", this.start), this.element.removeEventListener("touchmove", this.move), this.element.removeEventListener("touchend", this.end), this.element.removeEventListener("touchcancel", this.cancel), this.rotate.del(), this.touchStart.del(), this.multipointStart.del(), this.multipointEnd.del(), this.pinch.del(), this.swipe.del(), this.tap.del(), this.doubleTap.del(), this.longTap.del(), this.singleTap.del(), this.pressMove.del(), this.twoFingerPressMove.del(), this.touchMove.del(), this.touchEnd.del(), this.touchCancel.del(), this.preV = this.pinchStartLen = this.zoom = this.isDoubleTap = this.delta = this.last = this.now = this.tapTimeout = this.singleTapTimeout = this.longTapTimeout = this.swipeTimeout = this.x1 = this.x2 = this.y1 = this.y2 = this.preTapPosition = this.rotate = this.touchStart = this.multipointStart = this.multipointEnd = this.pinch = this.swipe = this.tap = this.doubleTap = this.longTap = this.singleTap = this.pressMove = this.touchMove = this.touchEnd = this.touchCancel = this.twoFingerPressMove = null, window.removeEventListener("scroll", this._cancelAllHandler), null;
6401
6436
  } }]);
6402
- function Ut(n) {
6437
+ function Nt(n) {
6403
6438
  var c = (function() {
6404
6439
  var g, y = document.createElement("fakeelement"), A = { transition: "transitionend", OTransition: "oTransitionEnd", MozTransition: "transitionend", WebkitTransition: "webkitTransitionEnd" };
6405
6440
  for (g in A) if (y.style[g] !== void 0) return A[g];
@@ -6422,15 +6457,15 @@ function Zs() {
6422
6457
  if (Math.abs(de) <= 13) return !1;
6423
6458
  }
6424
6459
  $ = !0;
6425
- var Ne, Ct = Y.targetTouches[0].clientX, zi = Y.targetTouches[0].clientY, Oi = xa - Ct, Bi = ka - zi;
6426
- if (Math.abs(Oi) > Math.abs(Bi) ? (ht = !1, rt = !0) : (rt = !1, ht = !0), c = Se.pageX - _e.pageX, Re = 100 * c / m, l = Se.pageY - _e.pageY, ze = 100 * l / g, ht && I && (Ne = 1 - Math.abs(l) / g, St.style.opacity = Ne, n.settings.touchFollowAxis && (Re = 0)), rt && (Ne = 1 - Math.abs(c) / m, S.style.opacity = Ne, n.settings.touchFollowAxis && (ze = 0)), !I) return C(S, "translate3d(".concat(Re, "%, 0, 0)"));
6460
+ var Ue, Ct = Y.targetTouches[0].clientX, zi = Y.targetTouches[0].clientY, Oi = xa - Ct, Bi = ka - zi;
6461
+ if (Math.abs(Oi) > Math.abs(Bi) ? (ht = !1, rt = !0) : (rt = !1, ht = !0), c = Se.pageX - _e.pageX, Re = 100 * c / m, l = Se.pageY - _e.pageY, ze = 100 * l / g, ht && I && (Ue = 1 - Math.abs(l) / g, St.style.opacity = Ue, n.settings.touchFollowAxis && (Re = 0)), rt && (Ue = 1 - Math.abs(c) / m, S.style.opacity = Ue, n.settings.touchFollowAxis && (ze = 0)), !I) return C(S, "translate3d(".concat(Re, "%, 0, 0)"));
6427
6462
  C(S, "translate3d(".concat(Re, "%, ").concat(ze, "%, 0)"));
6428
6463
  }
6429
6464
  }, touchEnd: function() {
6430
6465
  if (y) {
6431
6466
  if ($ = !1, ee || D) return Le = me, void (oe = ue);
6432
6467
  var Y = Math.abs(parseInt(ze)), de = Math.abs(parseInt(Re));
6433
- if (!(Y > 29 && I)) return Y < 29 && de < 25 ? (_(St, "greset"), St.style.opacity = 1, Ut(S)) : void 0;
6468
+ if (!(Y > 29 && I)) return Y < 29 && de < 25 ? (_(St, "greset"), St.style.opacity = 1, Nt(S)) : void 0;
6434
6469
  n.close();
6435
6470
  }
6436
6471
  }, multipointEnd: function() {
@@ -6447,20 +6482,20 @@ function Zs() {
6447
6482
  de > 4.5 && (de = 4.5), I.style.transform = "scale3d(".concat(de, ", ").concat(de, ", 1)"), q = de;
6448
6483
  }, pressMove: function(Y) {
6449
6484
  if (ee && !D) {
6450
- var de = Se.pageX - _e.pageX, Ne = Se.pageY - _e.pageY;
6451
- Le && (de += Le), oe && (Ne += oe), me = de, ue = Ne;
6452
- var Ct = "translate3d(".concat(de, "px, ").concat(Ne, "px, 0)");
6485
+ var de = Se.pageX - _e.pageX, Ue = Se.pageY - _e.pageY;
6486
+ Le && (de += Le), oe && (Ue += oe), me = de, ue = Ue;
6487
+ var Ct = "translate3d(".concat(de, "px, ").concat(Ue, "px, 0)");
6453
6488
  q && (Ct += " scale3d(".concat(q, ", ").concat(q, ", 1)")), C(I, Ct);
6454
6489
  }
6455
6490
  }, swipe: function(Y) {
6456
6491
  if (!ee) if (D) D = !1;
6457
6492
  else {
6458
6493
  if (Y.direction == "Left") {
6459
- if (n.index == n.elements.length - 1) return Ut(S);
6494
+ if (n.index == n.elements.length - 1) return Nt(S);
6460
6495
  n.nextSlide();
6461
6496
  }
6462
6497
  if (Y.direction == "Right") {
6463
- if (n.index == 0) return Ut(S);
6498
+ if (n.index == 0) return Nt(S);
6464
6499
  n.prevSlide();
6465
6500
  }
6466
6501
  }
@@ -6502,7 +6537,7 @@ function Zs() {
6502
6537
  if (this.elements.length === 0) return !1;
6503
6538
  this.activeSlide = null, this.prevActiveSlideIndex = null, this.prevActiveSlide = null;
6504
6539
  var l = xt(c) ? c : this.settings.startAt;
6505
- if (N(n)) {
6540
+ if (U(n)) {
6506
6541
  var d = n.getAttribute("data-gallery");
6507
6542
  d && (this.fullElementsList = this.elements, this.elements = this.getGalleryElements(this.elements, d)), be(l) && (l = this.getElementIndex(n)) < 0 && (l = 0);
6508
6543
  }
@@ -6518,16 +6553,16 @@ function Zs() {
6518
6553
  this.open(null, n);
6519
6554
  } }, { key: "showSlide", value: function() {
6520
6555
  var n = this, c = arguments.length > 0 && arguments[0] !== void 0 ? arguments[0] : 0, l = arguments.length > 1 && arguments[1] !== void 0 && arguments[1];
6521
- K(this.loader), this.index = parseInt(c);
6556
+ Z(this.loader), this.index = parseInt(c);
6522
6557
  var d = this.slidesContainer.querySelector(".current");
6523
6558
  d && P(d, "current"), this.slideAnimateOut();
6524
6559
  var h = this.slidesContainer.querySelectorAll(".gslide")[c];
6525
- if (E(h, "loaded")) this.slideAnimateIn(h, l), U(this.loader);
6560
+ if (E(h, "loaded")) this.slideAnimateIn(h, l), N(this.loader);
6526
6561
  else {
6527
- K(this.loader);
6562
+ Z(this.loader);
6528
6563
  var m = this.elements[c], g = { index: this.index, slide: h, slideNode: h, slideConfig: m.slideConfig, slideIndex: this.index, trigger: m.node, player: null };
6529
6564
  this.trigger("slide_before_load", g), m.instance.setContent(h, (function() {
6530
- U(n.loader), n.resize(), n.slideAnimateIn(h, l), n.trigger("slide_after_load", g);
6565
+ N(n.loader), n.resize(), n.slideAnimateIn(h, l), n.trigger("slide_after_load", g);
6531
6566
  }));
6532
6567
  }
6533
6568
  this.slideDescription = h.querySelector(".gslide-description"), this.slideDescriptionContained = this.slideDescription && E(this.slideDescription.parentNode, "gslide-media"), this.settings.preload && (this.preloadSlide(c + 1), this.preloadSlide(c - 1)), this.updateNavigationClasses(), this.activeSlide = h;
@@ -6574,7 +6609,7 @@ function Zs() {
6574
6609
  c && (this.getActiveSlideIndex() == n && (n == this.elements.length - 1 ? this.prevSlide() : this.nextSlide()), c.parentNode.removeChild(c)), this.elements.splice(n, 1), this.trigger("slide_removed", n), j(this.settings.slideRemoved) && this.settings.slideRemoved(n);
6575
6610
  } }, { key: "slideAnimateIn", value: function(n, c) {
6576
6611
  var l = this, d = n.querySelector(".gslide-media"), h = n.querySelector(".gslide-description"), m = { index: this.prevActiveSlideIndex, slide: this.prevActiveSlide, slideNode: this.prevActiveSlide, slideIndex: this.prevActiveSlide, slideConfig: be(this.prevActiveSlideIndex) ? null : this.elements[this.prevActiveSlideIndex].slideConfig, trigger: be(this.prevActiveSlideIndex) ? null : this.elements[this.prevActiveSlideIndex].node, player: this.getSlidePlayerInstance(this.prevActiveSlideIndex) }, g = { index: this.index, slide: this.activeSlide, slideNode: this.activeSlide, slideConfig: this.elements[this.index].slideConfig, slideIndex: this.index, trigger: this.elements[this.index].node, player: this.getSlidePlayerInstance(this.index) };
6577
- if (d.offsetWidth > 0 && h && (U(h), h.style.display = ""), P(n, this.effectsClasses), c) L(n, this.settings.cssEfects[this.settings.openEffect].in, (function() {
6612
+ if (d.offsetWidth > 0 && h && (N(h), h.style.display = ""), P(n, this.effectsClasses), c) L(n, this.settings.cssEfects[this.settings.openEffect].in, (function() {
6578
6613
  l.settings.autoplayVideos && l.slidePlayerPlay(n), l.trigger("slide_changed", { prev: m, current: g }), j(l.settings.afterSlideChange) && l.settings.afterSlideChange.apply(l, [m, g]);
6579
6614
  }));
6580
6615
  else {
@@ -6601,7 +6636,7 @@ function Zs() {
6601
6636
  var c = "gvideo" + n, l = this.getAllPlayers();
6602
6637
  return !(!ie(l, c) || !l[c]) && l[c];
6603
6638
  } }, { key: "stopSlideVideo", value: function(n) {
6604
- if (N(n)) {
6639
+ if (U(n)) {
6605
6640
  var c = n.querySelector(".gvideo-wrapper");
6606
6641
  c && (n = c.getAttribute("data-index"));
6607
6642
  }
@@ -6609,14 +6644,14 @@ function Zs() {
6609
6644
  var l = this.getSlidePlayerInstance(n);
6610
6645
  l && l.playing && l.pause();
6611
6646
  } }, { key: "slidePlayerPause", value: function(n) {
6612
- if (N(n)) {
6647
+ if (U(n)) {
6613
6648
  var c = n.querySelector(".gvideo-wrapper");
6614
6649
  c && (n = c.getAttribute("data-index"));
6615
6650
  }
6616
6651
  var l = this.getSlidePlayerInstance(n);
6617
6652
  l && l.playing && l.pause();
6618
6653
  } }, { key: "playSlideVideo", value: function(n) {
6619
- if (N(n)) {
6654
+ if (U(n)) {
6620
6655
  var c = n.querySelector(".gvideo-wrapper");
6621
6656
  c && (n = c.getAttribute("data-index"));
6622
6657
  }
@@ -6626,7 +6661,7 @@ function Zs() {
6626
6661
  } }, { key: "slidePlayerPlay", value: function(n) {
6627
6662
  var c;
6628
6663
  if (!ya || (c = this.settings.plyr.config) !== null && c !== void 0 && c.muted) {
6629
- if (N(n)) {
6664
+ if (U(n)) {
6630
6665
  var l = n.querySelector(".gvideo-wrapper");
6631
6666
  l && (n = l.getAttribute("data-index"));
6632
6667
  }
@@ -6787,19 +6822,19 @@ function Zs() {
6787
6822
  }));
6788
6823
  })(Rt)), Rt.exports;
6789
6824
  }
6790
- var Ks = Zs();
6791
- const Qs = /* @__PURE__ */ Wa(Ks);
6825
+ var Zs = Js();
6826
+ const Qs = /* @__PURE__ */ Wa(Zs);
6792
6827
  var en = Object.getOwnPropertyDescriptor, tn = (a, e, t, i) => {
6793
6828
  for (var s = i > 1 ? void 0 : i ? en(e, t) : e, r = a.length - 1, o; r >= 0; r--)
6794
6829
  (o = a[r]) && (s = o(s) || s);
6795
6830
  return s;
6796
6831
  };
6797
- let Kt = class extends Fe {
6832
+ let Zt = class extends Fe {
6798
6833
  render() {
6799
6834
  return u` <div class="cb-thinking"><span></span><span></span><span></span></div>`;
6800
6835
  }
6801
6836
  };
6802
- Kt.styles = J`
6837
+ Zt.styles = K`
6803
6838
  .cb-thinking {
6804
6839
  text-align: center;
6805
6840
  }
@@ -6837,9 +6872,9 @@ Kt.styles = J`
6837
6872
  }
6838
6873
  }
6839
6874
  `;
6840
- Kt = tn([
6841
- Z("cb-thinking")
6842
- ], Kt);
6875
+ Zt = tn([
6876
+ J("cb-thinking")
6877
+ ], Zt);
6843
6878
  var an = Object.defineProperty, sn = Object.getOwnPropertyDescriptor, ti = (a, e, t, i) => {
6844
6879
  for (var s = i > 1 ? void 0 : i ? sn(e, t) : e, r = a.length - 1, o; r >= 0; r--)
6845
6880
  (o = a[r]) && (s = (i ? o(e, t, s) : o(s)) || s);
@@ -6861,7 +6896,7 @@ let qt = class extends re {
6861
6896
  </div>`;
6862
6897
  }
6863
6898
  };
6864
- qt.styles = J`
6899
+ qt.styles = K`
6865
6900
  .cb-uploading {
6866
6901
  text-align: left;
6867
6902
  }
@@ -6883,9 +6918,9 @@ ti([
6883
6918
  x({ type: Array })
6884
6919
  ], qt.prototype, "files", 2);
6885
6920
  qt = ti([
6886
- Z("cb-uploading")
6921
+ J("cb-uploading")
6887
6922
  ], qt);
6888
- const nn = J`
6923
+ const nn = K`
6889
6924
  ${ke}
6890
6925
  :host {
6891
6926
  }
@@ -6931,7 +6966,7 @@ let mt = class extends Fe {
6931
6966
  `;
6932
6967
  }
6933
6968
  };
6934
- mt.styles = J`
6969
+ mt.styles = K`
6935
6970
  :host {
6936
6971
  --primary-color: var(--sl-color-primary-600);
6937
6972
  }
@@ -6963,7 +6998,7 @@ ca([
6963
6998
  x({ type: Boolean })
6964
6999
  ], mt.prototype, "inverse", 2);
6965
7000
  mt = ca([
6966
- Z("cb-external-link")
7001
+ J("cb-external-link")
6967
7002
  ], mt);
6968
7003
  const cn = '<svg viewBox="0 0 16 16" width="1.2em" height="1.2em" ><path fill="currentColor" fill-rule="evenodd" d="M14 4.5V14a2 2 0 0 1-2 2h-2v-1h2a1 1 0 0 0 1-1V4.5h-2A1.5 1.5 0 0 1 9.5 3V1H4a1 1 0 0 0-1 1v9H2V2a2 2 0 0 1 2-2h5.5zM1.928 15.849v-3.337h1.136v-.662H0v.662h1.134v3.337zm4.689-3.999h-.894L4.9 13.289h-.035l-.832-1.439h-.932l1.228 1.983l-1.24 2.016h.862l.853-1.415h.035l.85 1.415h.907l-1.253-1.992zm1.93.662v3.337h-.794v-3.337H6.619v-.662h3.064v.662H8.546Z"/></svg>', ln = '<svg viewBox="0 0 16 16" width="1.2em" height="1.2em" ><path fill="currentColor" fill-rule="evenodd" d="M14 4.5V14a2 2 0 0 1-2 2h-1v-1h1a1 1 0 0 0 1-1V4.5h-2A1.5 1.5 0 0 1 9.5 3V1H4a1 1 0 0 0-1 1v9H2V2a2 2 0 0 1 2-2h5.5zM1.6 11.85H0v3.999h.791v-1.342h.803q.43 0 .732-.173q.305-.175.463-.474a1.4 1.4 0 0 0 .161-.677q0-.375-.158-.677a1.2 1.2 0 0 0-.46-.477q-.3-.18-.732-.179m.545 1.333a.8.8 0 0 1-.085.38a.57.57 0 0 1-.238.241a.8.8 0 0 1-.375.082H.788V12.48h.66q.327 0 .512.181q.185.183.185.522m1.217-1.333v3.999h1.46q.602 0 .998-.237a1.45 1.45 0 0 0 .595-.689q.196-.45.196-1.084q0-.63-.196-1.075a1.43 1.43 0 0 0-.589-.68q-.396-.234-1.005-.234zm.791.645h.563q.371 0 .609.152a.9.9 0 0 1 .354.454q.118.302.118.753a2.3 2.3 0 0 1-.068.592a1.1 1.1 0 0 1-.196.422a.8.8 0 0 1-.334.252a1.3 1.3 0 0 1-.483.082h-.563zm3.743 1.763v1.591h-.79V11.85h2.548v.653H7.896v1.117h1.606v.638z"/></svg>', dn = '<svg viewBox="0 0 16 16" width="1.2em" height="1.2em" ><path fill="currentColor" fill-rule="evenodd" d="M14 4.5V14a2 2 0 0 1-2 2H9v-1h3a1 1 0 0 0 1-1V4.5h-2A1.5 1.5 0 0 1 9.5 3V1H4a1 1 0 0 0-1 1v9H2V2a2 2 0 0 1 2-2h5.5zM.706 13.189v2.66H0V11.85h.806l1.14 2.596h.026l1.14-2.596h.8v3.999h-.716v-2.66h-.038l-.946 2.159h-.516l-.952-2.16H.706Zm3.919 2.66V11.85h1.459q.609 0 1.005.234t.589.68q.195.445.196 1.075q0 .634-.196 1.084q-.197.451-.595.689q-.396.237-1 .237H4.626Zm1.353-3.354h-.562v2.707h.562q.279 0 .484-.082a.8.8 0 0 0 .334-.252a1.1 1.1 0 0 0 .196-.422q.067-.252.067-.592a2.1 2.1 0 0 0-.117-.753a.9.9 0 0 0-.354-.454q-.238-.152-.61-.152"/></svg>', fn = '<svg viewBox="0 0 16 16" width="1.2em" height="1.2em" ><path fill="currentColor" fill-rule="evenodd" d="M14 4.5V14a2 2 0 0 1-2 2h-1v-1h1a1 1 0 0 0 1-1V4.5h-2A1.5 1.5 0 0 1 9.5 3V1H4a1 1 0 0 0-1 1v9H2V2a2 2 0 0 1 2-2h5.5zM3.517 14.841a1.13 1.13 0 0 0 .401.823q.195.162.478.252q.284.091.665.091q.507 0 .859-.158q.354-.158.539-.44q.187-.284.187-.656q0-.336-.134-.56a1 1 0 0 0-.375-.357a2 2 0 0 0-.566-.21l-.621-.144a1 1 0 0 1-.404-.176a.37.37 0 0 1-.144-.299q0-.234.185-.384q.188-.152.512-.152q.214 0 .37.068a.6.6 0 0 1 .246.181a.56.56 0 0 1 .12.258h.75a1.1 1.1 0 0 0-.2-.566a1.2 1.2 0 0 0-.5-.41a1.8 1.8 0 0 0-.78-.152q-.439 0-.776.15q-.337.149-.527.421q-.19.273-.19.639q0 .302.122.524q.124.223.352.367q.228.143.539.213l.618.144q.31.073.463.193a.39.39 0 0 1 .152.326a.5.5 0 0 1-.085.29a.56.56 0 0 1-.255.193q-.167.07-.413.07q-.175 0-.32-.04a.8.8 0 0 1-.248-.115a.58.58 0 0 1-.255-.384zM.806 13.693q0-.373.102-.633a.87.87 0 0 1 .302-.399a.8.8 0 0 1 .475-.137q.225 0 .398.097a.7.7 0 0 1 .272.26a.85.85 0 0 1 .12.381h.765v-.072a1.33 1.33 0 0 0-.466-.964a1.4 1.4 0 0 0-.489-.272a1.8 1.8 0 0 0-.606-.097q-.534 0-.911.223q-.375.222-.572.632q-.195.41-.196.979v.498q0 .568.193.976q.197.407.572.626q.375.217.914.217q.439 0 .785-.164t.55-.454a1.27 1.27 0 0 0 .226-.674v-.076h-.764a.8.8 0 0 1-.118.363a.7.7 0 0 1-.272.25a.9.9 0 0 1-.401.087a.85.85 0 0 1-.478-.132a.83.83 0 0 1-.299-.392a1.7 1.7 0 0 1-.102-.627zm8.239 2.238h-.953l-1.338-3.999h.917l.896 3.138h.038l.888-3.138h.879z"/></svg>', hn = '<svg viewBox="0 0 16 16" width="1.2em" height="1.2em" ><path fill="currentColor" fill-rule="evenodd" d="M14 4.5V14a2 2 0 0 1-2 2h-1v-1h1a1 1 0 0 0 1-1V4.5h-2A1.5 1.5 0 0 1 9.5 3V1H4a1 1 0 0 0-1 1v9H2V2a2 2 0 0 1 2-2h5.5zM1.6 11.85H0v3.999h.791v-1.342h.803q.43 0 .732-.173q.305-.175.463-.474a1.4 1.4 0 0 0 .161-.677q0-.375-.158-.677a1.2 1.2 0 0 0-.46-.477q-.3-.18-.732-.179m.545 1.333a.8.8 0 0 1-.085.38a.57.57 0 0 1-.238.241a.8.8 0 0 1-.375.082H.788V12.48h.66q.327 0 .512.181q.185.183.185.522m2.817-1.333h-1.6v3.999h.791v-1.342h.803q.43 0 .732-.173q.305-.175.463-.474q.162-.302.161-.677q0-.375-.158-.677a1.2 1.2 0 0 0-.46-.477q-.3-.18-.732-.179m.545 1.333a.8.8 0 0 1-.085.38a.57.57 0 0 1-.238.241a.8.8 0 0 1-.375.082H4.15V12.48h.66q.327 0 .512.181q.185.183.185.522m2.767-.67v3.336H7.48v-3.337H6.346v-.662h3.065v.662z"/></svg>', bn = '<svg viewBox="0 0 16 16" width="1.2em" height="1.2em" ><path fill="currentColor" fill-rule="evenodd" d="M14 4.5V14a2 2 0 0 1-2 2v-1a1 1 0 0 0 1-1V4.5h-2A1.5 1.5 0 0 1 9.5 3V1H4a1 1 0 0 0-1 1v9H2V2a2 2 0 0 1 2-2h5.5zm-7.839 9.166v.522q0 .384-.117.641a.86.86 0 0 1-.322.387a.9.9 0 0 1-.469.126a.9.9 0 0 1-.471-.126a.87.87 0 0 1-.32-.386a1.55 1.55 0 0 1-.117-.642v-.522q0-.386.117-.641a.87.87 0 0 1 .32-.387a.87.87 0 0 1 .471-.129q.264 0 .469.13a.86.86 0 0 1 .322.386q.117.255.117.641m.803.519v-.513q0-.565-.205-.972a1.46 1.46 0 0 0-.589-.63q-.381-.22-.917-.22q-.533 0-.92.22a1.44 1.44 0 0 0-.589.627q-.204.406-.205.975v.513q0 .563.205.973q.205.406.59.627q.386.216.92.216q.535 0 .916-.216q.383-.22.59-.627q.204-.41.204-.973M0 11.926v4h1.459q.603 0 .999-.238a1.45 1.45 0 0 0 .595-.689q.196-.45.196-1.084q0-.63-.196-1.075a1.43 1.43 0 0 0-.59-.68q-.395-.234-1.004-.234zm.791.645h.563q.371 0 .609.152a.9.9 0 0 1 .354.454q.118.302.118.753a2.3 2.3 0 0 1-.068.592a1.1 1.1 0 0 1-.196.422a.8.8 0 0 1-.334.252a1.3 1.3 0 0 1-.483.082H.79V12.57Zm7.422.483a1.7 1.7 0 0 0-.103.633v.495q0 .369.103.627a.83.83 0 0 0 .298.393a.85.85 0 0 0 .478.131a.9.9 0 0 0 .401-.088a.7.7 0 0 0 .273-.248a.8.8 0 0 0 .117-.364h.765v.076a1.27 1.27 0 0 1-.226.674q-.205.29-.55.454a1.8 1.8 0 0 1-.786.164q-.54 0-.914-.216a1.4 1.4 0 0 1-.571-.627q-.194-.408-.194-.976v-.498q0-.568.197-.978q.195-.411.571-.633q.378-.223.911-.223q.328 0 .607.097q.28.093.489.272a1.33 1.33 0 0 1 .466.964v.073H9.78a.85.85 0 0 0-.12-.38a.7.7 0 0 0-.273-.261a.8.8 0 0 0-.398-.097a.8.8 0 0 0-.475.138a.87.87 0 0 0-.301.398"/></svg>', un = '<svg viewBox="0 0 16 16" width="1.2em" height="1.2em" ><path fill="currentColor" fill-rule="evenodd" d="M14 4.5V11h-1V4.5h-2A1.5 1.5 0 0 1 9.5 3V1H4a1 1 0 0 0-1 1v9H2V2a2 2 0 0 1 2-2h5.5zm-6.839 9.688v-.522a1.5 1.5 0 0 0-.117-.641a.86.86 0 0 0-.322-.387a.86.86 0 0 0-.469-.129a.87.87 0 0 0-.471.13a.87.87 0 0 0-.32.386a1.5 1.5 0 0 0-.117.641v.522q0 .384.117.641a.87.87 0 0 0 .32.387a.9.9 0 0 0 .471.126a.9.9 0 0 0 .469-.126a.86.86 0 0 0 .322-.386a1.55 1.55 0 0 0 .117-.642m.803-.516v.513q0 .563-.205.973a1.47 1.47 0 0 1-.589.627q-.381.216-.917.216a1.86 1.86 0 0 1-.92-.216a1.46 1.46 0 0 1-.589-.627a2.15 2.15 0 0 1-.205-.973v-.513q0-.569.205-.975q.205-.411.59-.627q.386-.22.92-.22q.535 0 .916.22q.383.219.59.63q.204.406.204.972M1 15.925v-3.999h1.459q.609 0 1.005.235q.396.233.589.68q.196.445.196 1.074q0 .634-.196 1.084q-.197.451-.595.689q-.396.237-.999.237zm1.354-3.354H1.79v2.707h.563q.277 0 .483-.082a.8.8 0 0 0 .334-.252q.132-.17.196-.422a2.3 2.3 0 0 0 .068-.592q0-.45-.118-.753a.9.9 0 0 0-.354-.454q-.237-.152-.61-.152Zm6.756 1.116q0-.373.103-.633a.87.87 0 0 1 .301-.398a.8.8 0 0 1 .475-.138q.225 0 .398.097a.7.7 0 0 1 .273.26a.85.85 0 0 1 .12.381h.765v-.073a1.33 1.33 0 0 0-.466-.964a1.4 1.4 0 0 0-.49-.272a1.8 1.8 0 0 0-.606-.097q-.534 0-.911.223q-.375.222-.571.633q-.197.41-.197.978v.498q0 .568.194.976q.195.406.571.627q.375.216.914.216q.44 0 .785-.164t.551-.454a1.27 1.27 0 0 0 .226-.674v-.076h-.765a.8.8 0 0 1-.117.364a.7.7 0 0 1-.273.248a.9.9 0 0 1-.401.088a.85.85 0 0 1-.478-.131a.83.83 0 0 1-.298-.393a1.7 1.7 0 0 1-.103-.627zm5.092-1.76h.894l-1.275 2.006l1.254 1.992h-.908l-.85-1.415h-.035l-.852 1.415h-.862l1.24-2.015l-1.228-1.984h.932l.832 1.439h.035z"/></svg>';
6969
7004
  var pn = Object.defineProperty, gn = Object.getOwnPropertyDescriptor, la = (a, e, t, i) => {
@@ -7017,9 +7052,9 @@ la([
7017
7052
  x({ type: String })
7018
7053
  ], yt.prototype, "url", 2);
7019
7054
  yt = la([
7020
- Z("cb-file")
7055
+ J("cb-file")
7021
7056
  ], yt);
7022
- const mn = '<svg viewBox="0 0 16 16" width="1.2em" height="1.2em" ><g fill="currentColor"><path d="M5.5 5.5A.5.5 0 0 1 6 6v6a.5.5 0 0 1-1 0V6a.5.5 0 0 1 .5-.5m2.5 0a.5.5 0 0 1 .5.5v6a.5.5 0 0 1-1 0V6a.5.5 0 0 1 .5-.5m3 .5a.5.5 0 0 0-1 0v6a.5.5 0 0 0 1 0z"/><path d="M14.5 3a1 1 0 0 1-1 1H13v9a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2V4h-.5a1 1 0 0 1-1-1V2a1 1 0 0 1 1-1H6a1 1 0 0 1 1-1h2a1 1 0 0 1 1 1h3.5a1 1 0 0 1 1 1zM4.118 4L4 4.059V13a1 1 0 0 0 1 1h6a1 1 0 0 0 1-1V4.059L11.882 4zM2.5 3h11V2h-11z"/></g></svg>', Ra = '<svg viewBox="0 0 16 16" width="1.2em" height="1.2em" ><path fill="currentColor" d="M8 8a3 3 0 1 0 0-6a3 3 0 0 0 0 6m2-3a2 2 0 1 1-4 0a2 2 0 0 1 4 0m4 8c0 1-1 1-1 1H3s-1 0-1-1s1-4 6-4s6 3 6 4m-1-.004c-.001-.246-.154-.986-.832-1.664C11.516 10.68 10.289 10 8 10s-3.516.68-4.168 1.332c-.678.678-.83 1.418-.832 1.664z"/></svg>', ai = '<svg viewBox="0 0 24 24" width="1.2em" height="1.2em" ><path fill="currentColor" d="M5 9v12H1V9zm4 12a2 2 0 0 1-2-2V9c0-.55.22-1.05.59-1.41L14.17 1l1.06 1.06c.27.27.44.64.44 1.05l-.03.32L14.69 8H21a2 2 0 0 1 2 2v2c0 .26-.05.5-.14.73l-3.02 7.05C19.54 20.5 18.83 21 18 21zm0-2h9.03L21 12v-2h-8.79l1.13-5.32L9 9.03z"/></svg>', ii = '<svg viewBox="0 0 24 24" width="1.2em" height="1.2em" ><path fill="currentColor" d="M19 15V3h4v12zM15 3a2 2 0 0 1 2 2v10c0 .55-.22 1.05-.59 1.41L9.83 23l-1.06-1.06c-.27-.27-.44-.64-.44-1.06l.03-.31l.95-4.57H3a2 2 0 0 1-2-2v-2c0-.26.05-.5.14-.73l3.02-7.05C4.46 3.5 5.17 3 6 3zm0 2H5.97L3 12v2h8.78l-1.13 5.32L15 14.97z"/></svg>', yn = J`
7057
+ const mn = '<svg viewBox="0 0 16 16" width="1.2em" height="1.2em" ><g fill="currentColor"><path d="M5.5 5.5A.5.5 0 0 1 6 6v6a.5.5 0 0 1-1 0V6a.5.5 0 0 1 .5-.5m2.5 0a.5.5 0 0 1 .5.5v6a.5.5 0 0 1-1 0V6a.5.5 0 0 1 .5-.5m3 .5a.5.5 0 0 0-1 0v6a.5.5 0 0 0 1 0z"/><path d="M14.5 3a1 1 0 0 1-1 1H13v9a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2V4h-.5a1 1 0 0 1-1-1V2a1 1 0 0 1 1-1H6a1 1 0 0 1 1-1h2a1 1 0 0 1 1 1h3.5a1 1 0 0 1 1 1zM4.118 4L4 4.059V13a1 1 0 0 0 1 1h6a1 1 0 0 0 1-1V4.059L11.882 4zM2.5 3h11V2h-11z"/></g></svg>', Ra = '<svg viewBox="0 0 16 16" width="1.2em" height="1.2em" ><path fill="currentColor" d="M8 8a3 3 0 1 0 0-6a3 3 0 0 0 0 6m2-3a2 2 0 1 1-4 0a2 2 0 0 1 4 0m4 8c0 1-1 1-1 1H3s-1 0-1-1s1-4 6-4s6 3 6 4m-1-.004c-.001-.246-.154-.986-.832-1.664C11.516 10.68 10.289 10 8 10s-3.516.68-4.168 1.332c-.678.678-.83 1.418-.832 1.664z"/></svg>', ai = '<svg viewBox="0 0 24 24" width="1.2em" height="1.2em" ><path fill="currentColor" d="M5 9v12H1V9zm4 12a2 2 0 0 1-2-2V9c0-.55.22-1.05.59-1.41L14.17 1l1.06 1.06c.27.27.44.64.44 1.05l-.03.32L14.69 8H21a2 2 0 0 1 2 2v2c0 .26-.05.5-.14.73l-3.02 7.05C19.54 20.5 18.83 21 18 21zm0-2h9.03L21 12v-2h-8.79l1.13-5.32L9 9.03z"/></svg>', ii = '<svg viewBox="0 0 24 24" width="1.2em" height="1.2em" ><path fill="currentColor" d="M19 15V3h4v12zM15 3a2 2 0 0 1 2 2v10c0 .55-.22 1.05-.59 1.41L9.83 23l-1.06-1.06c-.27-.27-.44-.64-.44-1.06l.03-.31l.95-4.57H3a2 2 0 0 1-2-2v-2c0-.26.05-.5.14-.73l3.02-7.05C4.46 3.5 5.17 3 6 3zm0 2H5.97L3 12v2h8.78l-1.13 5.32L15 14.97z"/></svg>', yn = K`
7023
7058
  pre code.hljs {
7024
7059
  display: block;
7025
7060
  overflow-x: auto;
@@ -8234,7 +8269,7 @@ const mn = '<svg viewBox="0 0 16 16" width="1.2em" height="1.2em" ><g fill="curr
8234
8269
  white-space: pre-wrap;
8235
8270
  color: var(--n-text-color);
8236
8271
  }
8237
- `, vn = J`
8272
+ `, vn = K`
8238
8273
  ${ke}
8239
8274
  ${yn}
8240
8275
 
@@ -8776,20 +8811,20 @@ nt([
8776
8811
  x({ type: Boolean })
8777
8812
  ], De.prototype, "suppressFeedback", 2);
8778
8813
  nt([
8779
- Na(".code-block-header__copy")
8814
+ Ua(".code-block-header__copy")
8780
8815
  ], De.prototype, "copyBtns", 2);
8781
8816
  nt([
8782
- Na("img")
8817
+ Ua("img")
8783
8818
  ], De.prototype, "glightboxImages", 2);
8784
8819
  De = nt([
8785
- Z("cb-message")
8820
+ J("cb-message")
8786
8821
  ], De);
8787
8822
  var _n = Object.defineProperty, Sn = Object.getOwnPropertyDescriptor, Te = (a, e, t, i) => {
8788
8823
  for (var s = i > 1 ? void 0 : i ? Sn(e, t) : e, r = a.length - 1, o; r >= 0; r--)
8789
8824
  (o = a[r]) && (s = (i ? o(e, t, s) : o(s)) || s);
8790
8825
  return i && s && _n(e, t, s), s;
8791
8826
  };
8792
- const Oe = Je.noConflict();
8827
+ const Oe = Ke.noConflict();
8793
8828
  Oe.setLevel("info");
8794
8829
  let ye = class extends re {
8795
8830
  constructor() {
@@ -9130,9 +9165,9 @@ Te([
9130
9165
  na({ capture: !1, passive: !0 })
9131
9166
  ], ye.prototype, "invokeHubspotMeetingAction", 1);
9132
9167
  ye = Te([
9133
- Z("cb-message-list")
9168
+ J("cb-message-list")
9134
9169
  ], ye);
9135
- const Cn = J`
9170
+ const Cn = K`
9136
9171
  ${ke}
9137
9172
 
9138
9173
  :host {
@@ -9322,9 +9357,9 @@ Ie([
9322
9357
  xe("sl-textarea")
9323
9358
  ], ve.prototype, "inputElement", 2);
9324
9359
  ve = Ie([
9325
- Z("cb-user-input")
9360
+ J("cb-user-input")
9326
9361
  ], ve);
9327
- const Tn = J`
9362
+ const Tn = K`
9328
9363
  ${ke}
9329
9364
 
9330
9365
  :host {
@@ -9602,9 +9637,9 @@ Ee([
9602
9637
  xe("sl-textarea")
9603
9638
  ], we.prototype, "inputElement", 2);
9604
9639
  we = Ee([
9605
- Z("cb-user-input-mm")
9640
+ J("cb-user-input-mm")
9606
9641
  ], we);
9607
- const oi = '<svg viewBox="0 0 16 16" width="1.2em" height="1.2em" ><path fill="currentColor" d="M2.146 2.854a.5.5 0 1 1 .708-.708L8 7.293l5.146-5.147a.5.5 0 0 1 .708.708L8.707 8l5.147 5.146a.5.5 0 0 1-.708.708L8 8.707l-5.146 5.147a.5.5 0 0 1-.708-.708L7.293 8z"/></svg>', Ln = J`
9642
+ const oi = '<svg viewBox="0 0 16 16" width="1.2em" height="1.2em" ><path fill="currentColor" d="M2.146 2.854a.5.5 0 1 1 .708-.708L8 7.293l5.146-5.147a.5.5 0 0 1 .708.708L8.707 8l5.147 5.146a.5.5 0 0 1-.708.708L8 8.707l-5.146 5.147a.5.5 0 0 1-.708-.708L7.293 8z"/></svg>', Ln = K`
9608
9643
  ${ke}
9609
9644
 
9610
9645
  sl-dialog::part(base) {
@@ -9639,7 +9674,7 @@ const oi = '<svg viewBox="0 0 16 16" width="1.2em" height="1.2em" ><path fill="c
9639
9674
  gap: 8px;
9640
9675
  }
9641
9676
  `;
9642
- var Rn = Object.defineProperty, zn = Object.getOwnPropertyDescriptor, Nt = (a, e, t, i) => {
9677
+ var Rn = Object.defineProperty, zn = Object.getOwnPropertyDescriptor, Ut = (a, e, t, i) => {
9643
9678
  for (var s = i > 1 ? void 0 : i ? zn(e, t) : e, r = a.length - 1, o; r >= 0; r--)
9644
9679
  (o = a[r]) && (s = (i ? o(e, t, s) : o(s)) || s);
9645
9680
  return i && s && Rn(e, t, s), s;
@@ -9689,17 +9724,17 @@ let ct = class extends re {
9689
9724
  }
9690
9725
  };
9691
9726
  ct.styles = Ln;
9692
- Nt([
9727
+ Ut([
9693
9728
  x({ type: Boolean })
9694
9729
  ], ct.prototype, "open", 2);
9695
- Nt([
9730
+ Ut([
9696
9731
  x({ type: String, attribute: "label" })
9697
9732
  ], ct.prototype, "label", 2);
9698
- Nt([
9733
+ Ut([
9699
9734
  x({ type: Number })
9700
9735
  ], ct.prototype, "zindex", 2);
9701
- ct = Nt([
9702
- Z("cb-dialog")
9736
+ ct = Ut([
9737
+ J("cb-dialog")
9703
9738
  ], ct);
9704
9739
  var On = Object.defineProperty, Bn = Object.getOwnPropertyDescriptor, ci = (a, e, t, i) => {
9705
9740
  for (var s = i > 1 ? void 0 : i ? Bn(e, t) : e, r = a.length - 1, o; r >= 0; r--)
@@ -9740,7 +9775,7 @@ let Dt = class extends re {
9740
9775
  this.emit("cancel");
9741
9776
  }
9742
9777
  };
9743
- Dt.styles = J`
9778
+ Dt.styles = K`
9744
9779
  .cb-clear-message-dialog {
9745
9780
  }
9746
9781
 
@@ -9752,9 +9787,9 @@ ci([
9752
9787
  x({ type: Boolean })
9753
9788
  ], Dt.prototype, "open", 2);
9754
9789
  Dt = ci([
9755
- Z("cb-clear-message-dialog")
9790
+ J("cb-clear-message-dialog")
9756
9791
  ], Dt);
9757
- const qn = J`
9792
+ const qn = K`
9758
9793
  :host {
9759
9794
  // width: 380px;
9760
9795
 
@@ -9955,9 +9990,9 @@ dt([
9955
9990
  x({ type: Boolean })
9956
9991
  ], Xe.prototype, "customRequest", 2);
9957
9992
  Xe = dt([
9958
- Z("cb-setting")
9993
+ J("cb-setting")
9959
9994
  ], Xe);
9960
- const jn = J`
9995
+ const jn = K`
9961
9996
  ${ke}
9962
9997
  :host {
9963
9998
  --primary-color: var(--sl-color-primary-600);
@@ -9983,7 +10018,7 @@ const jn = J`
9983
10018
 
9984
10019
  transition: all 0.3s ease-in-out;
9985
10020
 
9986
- z-index: 99;
10021
+ z-index: 99999;
9987
10022
  }
9988
10023
 
9989
10024
  .cb-anchor-icon {
@@ -10143,11 +10178,11 @@ li([
10143
10178
  x({ type: Boolean })
10144
10179
  ], Ft.prototype, "open", 2);
10145
10180
  Ft = li([
10146
- Z("cb-anchor")
10181
+ J("cb-anchor")
10147
10182
  ], Ft);
10148
- const Nn = J`
10183
+ const Un = K`
10149
10184
  ${ke}
10150
- `, Ba = '<svg viewBox="0 0 16 16" width="1.2em" height="1.2em" ><g fill="currentColor"><path d="M4.54.146A.5.5 0 0 1 4.893 0h6.214a.5.5 0 0 1 .353.146l4.394 4.394a.5.5 0 0 1 .146.353v6.214a.5.5 0 0 1-.146.353l-4.394 4.394a.5.5 0 0 1-.353.146H4.893a.5.5 0 0 1-.353-.146L.146 11.46A.5.5 0 0 1 0 11.107V4.893a.5.5 0 0 1 .146-.353zM5.1 1L1 5.1v5.8L5.1 15h5.8l4.1-4.1V5.1L10.9 1z"/><path d="M7.002 11a1 1 0 1 1 2 0a1 1 0 0 1-2 0M7.1 4.995a.905.905 0 1 1 1.8 0l-.35 3.507a.552.552 0 0 1-1.1 0z"/></g></svg>', Un = '<svg viewBox="0 0 16 16" width="1.2em" height="1.2em" ><g fill="currentColor"><path d="M7.938 2.016A.13.13 0 0 1 8.002 2a.13.13 0 0 1 .063.016a.15.15 0 0 1 .054.057l6.857 11.667c.036.06.035.124.002.183a.2.2 0 0 1-.054.06a.1.1 0 0 1-.066.017H1.146a.1.1 0 0 1-.066-.017a.2.2 0 0 1-.054-.06a.18.18 0 0 1 .002-.183L7.884 2.073a.15.15 0 0 1 .054-.057m1.044-.45a1.13 1.13 0 0 0-1.96 0L.165 13.233c-.457.778.091 1.767.98 1.767h13.713c.889 0 1.438-.99.98-1.767z"/><path d="M7.002 12a1 1 0 1 1 2 0a1 1 0 0 1-2 0M7.1 5.995a.905.905 0 1 1 1.8 0l-.35 3.507a.552.552 0 0 1-1.1 0z"/></g></svg>', Wn = '<svg viewBox="0 0 16 16" width="1.2em" height="1.2em" ><g fill="currentColor"><path d="M2.5 8a5.5 5.5 0 0 1 8.25-4.764a.5.5 0 0 0 .5-.866A6.5 6.5 0 1 0 14.5 8a.5.5 0 0 0-1 0a5.5 5.5 0 1 1-11 0"/><path d="M15.354 3.354a.5.5 0 0 0-.708-.708L8 9.293L5.354 6.646a.5.5 0 1 0-.708.708l3 3a.5.5 0 0 0 .708 0z"/></g></svg>', Gn = '<svg viewBox="0 0 16 16" width="1.2em" height="1.2em" ><g fill="currentColor"><path d="M8 15A7 7 0 1 1 8 1a7 7 0 0 1 0 14m0 1A8 8 0 1 0 8 0a8 8 0 0 0 0 16"/><path d="m8.93 6.588l-2.29.287l-.082.38l.45.083c.294.07.352.176.288.469l-.738 3.468c-.194.897.105 1.319.808 1.319c.545 0 1.178-.252 1.465-.598l.088-.416c-.2.176-.492.246-.686.246c-.275 0-.375-.193-.304-.533zM9 4.5a1 1 0 1 1-2 0a1 1 0 0 1 2 0"/></g></svg>';
10185
+ `, Ba = '<svg viewBox="0 0 16 16" width="1.2em" height="1.2em" ><g fill="currentColor"><path d="M4.54.146A.5.5 0 0 1 4.893 0h6.214a.5.5 0 0 1 .353.146l4.394 4.394a.5.5 0 0 1 .146.353v6.214a.5.5 0 0 1-.146.353l-4.394 4.394a.5.5 0 0 1-.353.146H4.893a.5.5 0 0 1-.353-.146L.146 11.46A.5.5 0 0 1 0 11.107V4.893a.5.5 0 0 1 .146-.353zM5.1 1L1 5.1v5.8L5.1 15h5.8l4.1-4.1V5.1L10.9 1z"/><path d="M7.002 11a1 1 0 1 1 2 0a1 1 0 0 1-2 0M7.1 4.995a.905.905 0 1 1 1.8 0l-.35 3.507a.552.552 0 0 1-1.1 0z"/></g></svg>', Nn = '<svg viewBox="0 0 16 16" width="1.2em" height="1.2em" ><g fill="currentColor"><path d="M7.938 2.016A.13.13 0 0 1 8.002 2a.13.13 0 0 1 .063.016a.15.15 0 0 1 .054.057l6.857 11.667c.036.06.035.124.002.183a.2.2 0 0 1-.054.06a.1.1 0 0 1-.066.017H1.146a.1.1 0 0 1-.066-.017a.2.2 0 0 1-.054-.06a.18.18 0 0 1 .002-.183L7.884 2.073a.15.15 0 0 1 .054-.057m1.044-.45a1.13 1.13 0 0 0-1.96 0L.165 13.233c-.457.778.091 1.767.98 1.767h13.713c.889 0 1.438-.99.98-1.767z"/><path d="M7.002 12a1 1 0 1 1 2 0a1 1 0 0 1-2 0M7.1 5.995a.905.905 0 1 1 1.8 0l-.35 3.507a.552.552 0 0 1-1.1 0z"/></g></svg>', Wn = '<svg viewBox="0 0 16 16" width="1.2em" height="1.2em" ><g fill="currentColor"><path d="M2.5 8a5.5 5.5 0 0 1 8.25-4.764a.5.5 0 0 0 .5-.866A6.5 6.5 0 1 0 14.5 8a.5.5 0 0 0-1 0a5.5 5.5 0 1 1-11 0"/><path d="M15.354 3.354a.5.5 0 0 0-.708-.708L8 9.293L5.354 6.646a.5.5 0 1 0-.708.708l3 3a.5.5 0 0 0 .708 0z"/></g></svg>', Gn = '<svg viewBox="0 0 16 16" width="1.2em" height="1.2em" ><g fill="currentColor"><path d="M8 15A7 7 0 1 1 8 1a7 7 0 0 1 0 14m0 1A8 8 0 1 0 8 0a8 8 0 0 0 0 16"/><path d="m8.93 6.588l-2.29.287l-.082.38l.45.083c.294.07.352.176.288.469l-.738 3.468c-.194.897.105 1.319.808 1.319c.545 0 1.178-.252 1.465-.598l.088-.416c-.2.176-.492.246-.686.246c-.275 0-.375-.193-.304-.533zM9 4.5a1 1 0 1 1-2 0a1 1 0 0 1 2 0"/></g></svg>';
10151
10186
  var Xn = Object.defineProperty, Yn = Object.getOwnPropertyDescriptor, di = (a, e, t, i) => {
10152
10187
  for (var s = i > 1 ? void 0 : i ? Yn(e, t) : e, r = a.length - 1, o; r >= 0; r--)
10153
10188
  (o = a[r]) && (s = (i ? o(e, t, s) : o(s)) || s);
@@ -10164,7 +10199,7 @@ const qa = {
10164
10199
  },
10165
10200
  warning: {
10166
10201
  variant: "warning",
10167
- icon: Un
10202
+ icon: Nn
10168
10203
  },
10169
10204
  success: {
10170
10205
  variant: "success",
@@ -10189,10 +10224,10 @@ di([
10189
10224
  x({ type: String })
10190
10225
  ], jt.prototype, "status", 2);
10191
10226
  jt = di([
10192
- Z("cb-status-icon")
10227
+ J("cb-status-icon")
10193
10228
  ], jt);
10194
- var Jn = Object.getOwnPropertyDescriptor, Zn = (a, e, t, i) => {
10195
- for (var s = i > 1 ? void 0 : i ? Jn(e, t) : e, r = a.length - 1, o; r >= 0; r--)
10229
+ var Kn = Object.getOwnPropertyDescriptor, Jn = (a, e, t, i) => {
10230
+ for (var s = i > 1 ? void 0 : i ? Kn(e, t) : e, r = a.length - 1, o; r >= 0; r--)
10196
10231
  (o = a[r]) && (s = o(s) || s);
10197
10232
  return s;
10198
10233
  };
@@ -10212,11 +10247,11 @@ let ea = class extends re {
10212
10247
  this.emit("setting:show");
10213
10248
  }
10214
10249
  };
10215
- ea.styles = Nn;
10216
- ea = Zn([
10217
- Z("cb-auth-alert")
10250
+ ea.styles = Un;
10251
+ ea = Jn([
10252
+ J("cb-auth-alert")
10218
10253
  ], ea);
10219
- const Kn = J`
10254
+ const Zn = K`
10220
10255
  sl-dialog::part(base) {
10221
10256
  z-index: 1000;
10222
10257
  }
@@ -10305,7 +10340,7 @@ var Qn = Object.defineProperty, er = Object.getOwnPropertyDescriptor, ft = (a, e
10305
10340
  (o = a[r]) && (s = (i ? o(e, t, s) : o(s)) || s);
10306
10341
  return i && s && Qn(e, t, s), s;
10307
10342
  };
10308
- const Da = Je.noConflict(), tr = '<svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" fill="currentColor" class="bi bi-star-fill" viewBox="0 0 16 16"><path d="M3.612 15.443c-.386.198-.824-.149-.746-.592l.83-4.73L.173 6.765c-.329-.314-.158-.888.283-.95l4.898-.696L7.538.792c.197-.39.73-.39.927 0l2.184 4.327 4.898.696c.441.062.612.636.282.95l-3.522 3.356.83 4.73c.078.443-.36.79-.746.592L8 13.187l-4.389 2.256z"/></svg>';
10343
+ const Da = Ke.noConflict(), tr = '<svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" fill="currentColor" class="bi bi-star-fill" viewBox="0 0 16 16"><path d="M3.612 15.443c-.386.198-.824-.149-.746-.592l.83-4.73L.173 6.765c-.329-.314-.158-.888.283-.95l4.898-.696L7.538.792c.197-.39.73-.39.927 0l2.184 4.327 4.898.696c.441.062.612.636.282.95l-3.522 3.356.83 4.73c.078.443-.36.79-.746.592L8 13.187l-4.389 2.256z"/></svg>';
10309
10344
  let Ye = class extends re {
10310
10345
  constructor() {
10311
10346
  super(...arguments), this.store = new it(this, b), this.zindex = 100;
@@ -10369,7 +10404,7 @@ let Ye = class extends re {
10369
10404
  this._comments.value = "", await b.submitFeedback(a, e, t);
10370
10405
  }
10371
10406
  };
10372
- Ye.styles = Kn;
10407
+ Ye.styles = Zn;
10373
10408
  ft([
10374
10409
  x({ type: Number })
10375
10410
  ], Ye.prototype, "zindex", 2);
@@ -10386,9 +10421,9 @@ ft([
10386
10421
  xe("#cb-feedback-email-el")
10387
10422
  ], Ye.prototype, "_email", 2);
10388
10423
  Ye = ft([
10389
- Z("cb-dialog-feedback")
10424
+ J("cb-dialog-feedback")
10390
10425
  ], Ye);
10391
- const ar = J`
10426
+ const ar = K`
10392
10427
  ${ke}
10393
10428
  :host {
10394
10429
  display: block;
@@ -10936,7 +10971,7 @@ var or = Object.getOwnPropertyDescriptor, cr = (a, e, t, i) => {
10936
10971
  (o = a[r]) && (s = o(s) || s);
10937
10972
  return s;
10938
10973
  };
10939
- const bt = Je.noConflict();
10974
+ const bt = Ke.noConflict();
10940
10975
  bt.setLevel("info");
10941
10976
  let ta = class extends re {
10942
10977
  constructor() {
@@ -11040,7 +11075,7 @@ let ta = class extends re {
11040
11075
  };
11041
11076
  ta.styles = ar;
11042
11077
  ta = cr([
11043
- Z("cb-audio-controls")
11078
+ J("cb-audio-controls")
11044
11079
  ], ta);
11045
11080
  class aa extends Error {
11046
11081
  response;
@@ -11579,11 +11614,15 @@ var zr = Object.defineProperty, Or = Object.getOwnPropertyDescriptor, V = (a, e,
11579
11614
  (o = a[r]) && (s = (i ? o(e, t, s) : o(s)) || s);
11580
11615
  return i && s && zr(e, t, s), s;
11581
11616
  };
11582
- const Be = Je.noConflict();
11617
+ const Be = Ke.noConflict();
11583
11618
  Be.setLevel("info");
11619
+ function Br() {
11620
+ const a = navigator.userAgent, e = /iPhone|iPad|iPod/.test(a), t = /AppleWebKit/.test(a), i = /Safari/.test(a) && !/CriOS|FxiOS|EdgiOS|OPiOS/.test(a);
11621
+ return e && t && !i;
11622
+ }
11584
11623
  let F = class extends re {
11585
11624
  constructor() {
11586
- super(...arguments), this.store = new it(this, b), this.displayLicense = !1, this.name = "ChatBot", this.orgId = "", this.botId = "", this.version = "current", this.url = "ws://localhost:3070", this.logoUrl = "", this.logoSvg = `<svg width="24" height="24" viewBox="0 0 203 200" fill="none" xmlns="http://www.w3.org/2000/svg">
11625
+ super(...arguments), this.store = new it(this, b), this.displayLicense = !1, this.name = "ChatBot", this.orgId = "", this.botId = "", this.version = "current", this.testMode = "false", this.url = "ws://localhost:3070", this.logoUrl = "", this.logoSvg = `<svg width="24" height="24" viewBox="0 0 203 200" fill="none" xmlns="http://www.w3.org/2000/svg">
11587
11626
  <path d="M100.438 0C155.665 0 200.438 44.7723 200.438 100C200.438 155.228 155.665 200 100.438 200C45.2098 200 0.4375 155.228 0.4375 100C0.4375 44.7723 45.2098 0 100.438 0ZM130.093 60.6063C120.409 60.6063 115.205 61.458 109.344 65.0325C100.122 70.6592 95.629 80.1958 94.2273 93.877C94.1468 94.5544 93.8048 97.2571 93.4091 100.349C93.3152 101.06 93.2281 101.771 93.1409 102.455C92.7318 105.573 92.3093 108.739 92.0142 110.408C90.8808 117.041 89.2914 123.761 83.8927 126.759C83.6915 126.873 83.4702 126.967 83.2556 127.067C78.6013 129.093 72.2905 128.898 72.2905 128.898C72.2905 128.898 69.1988 128.885 69.1787 128.885C69.172 128.885 69.1921 128.885 69.1921 128.898L68.1057 143.632C87.7824 143.666 93.0537 139.213 93.0537 139.213C102.275 133.586 106.768 124.049 108.17 110.368C108.251 109.677 108.593 106.894 109.002 103.735C109.096 103.004 109.196 102.273 109.283 101.576C109.679 98.5246 110.095 95.4798 110.383 93.8435C111.517 87.2108 113.106 80.4842 118.505 77.4931C118.706 77.3791 118.921 77.2852 119.135 77.1846C123.756 75.1727 130.107 75.3471 130.107 75.3471C132.494 75.3269 133.219 75.4007 133.286 75.4074L134.292 60.6264C132.783 60.6264 130.107 60.6264 130.107 60.6264L130.093 60.6063Z" fill="#010101" style="fill:#010101;fill:color(display-p3 0.0039 0.0039 0.0039);fill-opacity:1;"/>
11588
11627
  </svg>`, this.closeSvg = '<svg viewBox="0 0 16 16" width="1.4em" height="1.4em"><path fill="currentColor" d="M2.146 2.854a.5.5 0 1 1 .708-.708L8 7.293l5.146-5.147a.5.5 0 0 1 .708.708L8.707 8l5.147 5.146a.5.5 0 0 1-.708.708L8 8.707l-5.146 5.147a.5.5 0 0 1-.708-.708L7.293 8z"></path></svg>', this.logoSvgGradient = `<svg width="28" height="28" viewBox="0 0 400 400" fill="none" xmlns="http://www.w3.org/2000/svg">
11589
11628
  <g clip-path="url(#clip0_830_884)">
@@ -11601,7 +11640,7 @@ let F = class extends re {
11601
11640
  <rect width="400" height="400" fill="white"/>
11602
11641
  </clipPath>
11603
11642
  </defs>
11604
- </svg>`, this.popupLogoSvg = "", this.popupLogoUrl = "", this.botIconSvg = '<svg fill="currentColor" width="24" height="24" viewBox="0 0 24 24"> <path d="M16 17V19H2V17S2 13 9 13 16 17 16 17M12.5 7.5A3.5 3.5 0 1 0 9 11A3.5 3.5 0 0 0 12.5 7.5M15.94 13A5.32 5.32 0 0 1 18 17V19H22V17S22 13.37 15.94 13M15 4A3.39 3.39 0 0 0 13.07 4.59A5 5 0 0 1 13.07 10.41A3.39 3.39 0 0 0 15 11A3.5 3.5 0 0 0 15 4Z" /></svg>', this.userIconSvg = '<svg fill="currentColor" viewBox="0 0 24 24" width="24" height="24"> <path d="M12 4a4 4 0 0 1 4 4a4 4 0 0 1-4 4a4 4 0 0 1-4-4a4 4 0 0 1 4-4m0 10c4.42 0 8 1.79 8 4v2H4v-2c0-2.21 3.58-4 8-4Z" /></svg>', this.systemIconSvg = '<svg fill="currentColor" width="24" height="24" viewBox="0 0 24 24"> <path d="M11,9H13V7H11M12,20C7.59,20 4,16.41 4,12C4,7.59 7.59,4 12,4C16.41,4 20,7.59 20,12C20,16.41 16.41,20 12,20M12,2A10,10 0 0,0 2,12A10,10 0 0,0 12,22A10,10 0 0,0 22,12A10,10 0 0,0 12,2M11,17H13V11H11V17Z"/></svg>', this.agentIconSvg = '<svg fill="currentColor" width="24" height="24" viewBox="0 0 24 24"> <path d="M18.72,14.76C19.07,13.91 19.26,13 19.26,12C19.26,11.28 19.15,10.59 18.96,9.95C18.31,10.1 17.63,10.18 16.92,10.18C13.86,10.18 11.15,8.67 9.5,6.34C8.61,8.5 6.91,10.26 4.77,11.22C4.73,11.47 4.73,11.74 4.73,12A7.27,7.27 0 0,0 12,19.27C13.05,19.27 14.06,19.04 14.97,18.63C15.54,19.72 15.8,20.26 15.78,20.26C14.14,20.81 12.87,21.08 12,21.08C9.58,21.08 7.27,20.13 5.57,18.42C4.53,17.38 3.76,16.11 3.33,14.73H2V10.18H3.09C3.93,6.04 7.6,2.92 12,2.92C14.4,2.92 16.71,3.87 18.42,5.58C19.69,6.84 20.54,8.45 20.89,10.18H22V14.67H22V14.69L22,14.73H21.94L18.38,18L13.08,17.4V15.73H17.91L18.72,14.76M9.27,11.77C9.57,11.77 9.86,11.89 10.07,12.11C10.28,12.32 10.4,12.61 10.4,12.91C10.4,13.21 10.28,13.5 10.07,13.71C9.86,13.92 9.57,14.04 9.27,14.04C8.64,14.04 8.13,13.54 8.13,12.91C8.13,12.28 8.64,11.77 9.27,11.77M14.72,11.77C15.35,11.77 15.85,12.28 15.85,12.91C15.85,13.54 15.35,14.04 14.72,14.04C14.09,14.04 13.58,13.54 13.58,12.91A1.14,1.14 0 0,1 14.72,11.77Z" /></svg>', this.infoIconSvg = '<svg fill="currentColor" width="24" height="24" viewBox="0 0 24 24"> <path d="M11,9H13V7H11M12,20C7.59,20 4,16.41 4,12C4,7.59 7.59,4 12,4C16.41,4 20,7.59 20,12C20,16.41 16.41,20 12,20M12,2A10,10 0 0,0 2,12A10,10 0 0,0 12,22A10,10 0 0,0 22,12A10,10 0 0,0 12,2M11,17H13V11H11V17Z" /></svg>', this.anchorOpenSvg = '<svg viewBox="0 0 16 16" width="1.2em" height="1.2em" ><path fill="currentColor" d="M16 8c0 3.866-3.582 7-8 7a9 9 0 0 1-2.347-.306c-.584.296-1.925.864-4.181 1.234c-.2.032-.352-.176-.273-.362c.354-.836.674-1.95.77-2.966C.744 11.37 0 9.76 0 8c0-3.866 3.582-7 8-7s8 3.134 8 7M5 8a1 1 0 1 0-2 0a1 1 0 0 0 2 0m4 0a1 1 0 1 0-2 0a1 1 0 0 0 2 0m3 1a1 1 0 1 0 0-2a1 1 0 0 0 0 2"/></svg>', this.anchorCloseSvg = '<svg viewBox="0 0 16 16" width="1.2em" height="1.2em" ><path fill="currentColor" d="M2.146 2.854a.5.5 0 1 1 .708-.708L8 7.293l5.146-5.147a.5.5 0 0 1 .708.708L8.707 8l5.147 5.146a.5.5 0 0 1-.708.708L8 8.707l-5.146 5.147a.5.5 0 0 1-.708-.708L7.293 8z"/></svg>', this.sendIconSvg = "", this.attachIconSvg = "", this.stream = !1, this.customRequest = !1, this.enableFileUpload = !1, this.uploadFileUrl = "", this.open = !1, this.alwaysOpen = !1, this.prefilledFormFields = "{}", this.loading = !1, this.showSetting = !1, this.showAuthAlert = !1, this.handleAddMessage = (a) => {
11643
+ </svg>`, this.popupLogoSvg = "", this.popupLogoUrl = "", this.botIconSvg = '<svg fill="currentColor" width="24" height="24" viewBox="0 0 24 24"> <path d="M16 17V19H2V17S2 13 9 13 16 17 16 17M12.5 7.5A3.5 3.5 0 1 0 9 11A3.5 3.5 0 0 0 12.5 7.5M15.94 13A5.32 5.32 0 0 1 18 17V19H22V17S22 13.37 15.94 13M15 4A3.39 3.39 0 0 0 13.07 4.59A5 5 0 0 1 13.07 10.41A3.39 3.39 0 0 0 15 11A3.5 3.5 0 0 0 15 4Z" /></svg>', this.userIconSvg = '<svg fill="currentColor" viewBox="0 0 24 24" width="24" height="24"> <path d="M12 4a4 4 0 0 1 4 4a4 4 0 0 1-4 4a4 4 0 0 1-4-4a4 4 0 0 1 4-4m0 10c4.42 0 8 1.79 8 4v2H4v-2c0-2.21 3.58-4 8-4Z" /></svg>', this.systemIconSvg = '<svg fill="currentColor" width="24" height="24" viewBox="0 0 24 24"> <path d="M11,9H13V7H11M12,20C7.59,20 4,16.41 4,12C4,7.59 7.59,4 12,4C16.41,4 20,7.59 20,12C20,16.41 16.41,20 12,20M12,2A10,10 0 0,0 2,12A10,10 0 0,0 12,22A10,10 0 0,0 22,12A10,10 0 0,0 12,2M11,17H13V11H11V17Z"/></svg>', this.agentIconSvg = '<svg fill="currentColor" width="24" height="24" viewBox="0 0 24 24"> <path d="M18.72,14.76C19.07,13.91 19.26,13 19.26,12C19.26,11.28 19.15,10.59 18.96,9.95C18.31,10.1 17.63,10.18 16.92,10.18C13.86,10.18 11.15,8.67 9.5,6.34C8.61,8.5 6.91,10.26 4.77,11.22C4.73,11.47 4.73,11.74 4.73,12A7.27,7.27 0 0,0 12,19.27C13.05,19.27 14.06,19.04 14.97,18.63C15.54,19.72 15.8,20.26 15.78,20.26C14.14,20.81 12.87,21.08 12,21.08C9.58,21.08 7.27,20.13 5.57,18.42C4.53,17.38 3.76,16.11 3.33,14.73H2V10.18H3.09C3.93,6.04 7.6,2.92 12,2.92C14.4,2.92 16.71,3.87 18.42,5.58C19.69,6.84 20.54,8.45 20.89,10.18H22V14.67H22V14.69L22,14.73H21.94L18.38,18L13.08,17.4V15.73H17.91L18.72,14.76M9.27,11.77C9.57,11.77 9.86,11.89 10.07,12.11C10.28,12.32 10.4,12.61 10.4,12.91C10.4,13.21 10.28,13.5 10.07,13.71C9.86,13.92 9.57,14.04 9.27,14.04C8.64,14.04 8.13,13.54 8.13,12.91C8.13,12.28 8.64,11.77 9.27,11.77M14.72,11.77C15.35,11.77 15.85,12.28 15.85,12.91C15.85,13.54 15.35,14.04 14.72,14.04C14.09,14.04 13.58,13.54 13.58,12.91A1.14,1.14 0 0,1 14.72,11.77Z" /></svg>', this.infoIconSvg = '<svg fill="currentColor" width="24" height="24" viewBox="0 0 24 24"> <path d="M11,9H13V7H11M12,20C7.59,20 4,16.41 4,12C4,7.59 7.59,4 12,4C16.41,4 20,7.59 20,12C20,16.41 16.41,20 12,20M12,2A10,10 0 0,0 2,12A10,10 0 0,0 12,22A10,10 0 0,0 22,12A10,10 0 0,0 12,2M11,17H13V11H11V17Z" /></svg>', this.anchorOpenSvg = '<svg viewBox="0 0 16 16" width="1.2em" height="1.2em" ><path fill="currentColor" d="M16 8c0 3.866-3.582 7-8 7a9 9 0 0 1-2.347-.306c-.584.296-1.925.864-4.181 1.234c-.2.032-.352-.176-.273-.362c.354-.836.674-1.95.77-2.966C.744 11.37 0 9.76 0 8c0-3.866 3.582-7 8-7s8 3.134 8 7M5 8a1 1 0 1 0-2 0a1 1 0 0 0 2 0m4 0a1 1 0 1 0-2 0a1 1 0 0 0 2 0m3 1a1 1 0 1 0 0-2a1 1 0 0 0 0 2"/></svg>', this.anchorCloseSvg = '<svg viewBox="0 0 16 16" width="1.2em" height="1.2em" ><path fill="currentColor" d="M2.146 2.854a.5.5 0 1 1 .708-.708L8 7.293l5.146-5.147a.5.5 0 0 1 .708.708L8.707 8l5.147 5.146a.5.5 0 0 1-.708.708L8 8.707l-5.146 5.147a.5.5 0 0 1-.708-.708L7.293 8z"/></svg>', this.sendIconSvg = "", this.attachIconSvg = "", this.stream = !1, this.customRequest = !1, this.enableFileUpload = !1, this.uploadFileUrl = "", this.open = !1, this.alwaysOpen = !1, this.prefilledFormFields = "{}", this.loading = !1, this.showSetting = !1, this.showAuthAlert = !1, this.lifecycleListenersAttached = !1, this.handleAddMessage = (a) => {
11605
11644
  this._addMessageHandler(a);
11606
11645
  }, this.handleStateEvent = (a) => {
11607
11646
  this._stateEventHandler(a);
@@ -11609,6 +11648,14 @@ let F = class extends re {
11609
11648
  this._chatbotToggleHandler(a);
11610
11649
  }, this.handleFormSubmitEvent = (a) => {
11611
11650
  this._formSubmitHandler(a);
11651
+ }, this.boundScrollToBottomOnUpdate = this._scrollToBottomOnUpdate.bind(this), this.handleVisibilityChange = () => {
11652
+ b.handleLifecycleResume("visibilitychange", this.boundScrollToBottomOnUpdate);
11653
+ }, this.handlePageShow = () => {
11654
+ b.handleLifecycleResume("pageshow", this.boundScrollToBottomOnUpdate);
11655
+ }, this.handleWindowFocus = () => {
11656
+ b.handleLifecycleResume("focus", this.boundScrollToBottomOnUpdate);
11657
+ }, this.handleWindowOnline = () => {
11658
+ b.handleLifecycleResume("online", this.boundScrollToBottomOnUpdate);
11612
11659
  }, this.fetchStream = Rr;
11613
11660
  }
11614
11661
  /**
@@ -11694,7 +11741,7 @@ let F = class extends re {
11694
11741
  ></cb-user-input>`;
11695
11742
  }
11696
11743
  connectedCallback() {
11697
- super.connectedCallback(), Be.info("connectedCallback"), this.initCssVariables(), addEventListener("c7o:bot:stateEvent", this.handleStateEvent), addEventListener("message:send", this.handleAddMessage), addEventListener("chatbot:toggle", this.handleToggleEvent), addEventListener("form:submit", this.handleFormSubmitEvent), addEventListener("message:send:file", this._uploadFileHandler), addEventListener("audio:toggle", this._audioToggleHandler);
11744
+ super.connectedCallback(), Be.info("connectedCallback"), this.initCssVariables(), addEventListener("c7o:bot:stateEvent", this.handleStateEvent), addEventListener("message:send", this.handleAddMessage), addEventListener("chatbot:toggle", this.handleToggleEvent), addEventListener("form:submit", this.handleFormSubmitEvent), addEventListener("message:send:file", this._uploadFileHandler), addEventListener("audio:toggle", this._audioToggleHandler), this.attachLifecycleListeners();
11698
11745
  }
11699
11746
  extractCssVariable(a, e, t) {
11700
11747
  let i = a.getPropertyValue(e).trim();
@@ -11723,13 +11770,22 @@ let F = class extends re {
11723
11770
 
11724
11771
  */
11725
11772
  disconnectedCallback() {
11726
- Be.info("disconnectedCallback"), super.disconnectedCallback(), window.removeEventListener("c7o:bot:stateEvent", this.handleStateEvent), window.removeEventListener("message:send", this.handleAddMessage), window.removeEventListener("chatbot:toggle", this.handleToggleEvent), window.removeEventListener("form:submit", this.handleFormSubmitEvent), window.removeEventListener("message:send:file", this._uploadFileHandler), window.removeEventListener("audio:toggle", this._audioToggleHandler);
11773
+ Be.info("disconnectedCallback"), super.disconnectedCallback(), window.removeEventListener("c7o:bot:stateEvent", this.handleStateEvent), window.removeEventListener("message:send", this.handleAddMessage), window.removeEventListener("chatbot:toggle", this.handleToggleEvent), window.removeEventListener("form:submit", this.handleFormSubmitEvent), window.removeEventListener("message:send:file", this._uploadFileHandler), window.removeEventListener("audio:toggle", this._audioToggleHandler), this.detachLifecycleListeners();
11774
+ }
11775
+ attachLifecycleListeners() {
11776
+ this.lifecycleListenersAttached || Br() && (document.addEventListener("visibilitychange", this.handleVisibilityChange), window.addEventListener("pageshow", this.handlePageShow), window.addEventListener("focus", this.handleWindowFocus), window.addEventListener("online", this.handleWindowOnline), this.lifecycleListenersAttached = !0);
11777
+ }
11778
+ detachLifecycleListeners() {
11779
+ this.lifecycleListenersAttached && (document.removeEventListener("visibilitychange", this.handleVisibilityChange), window.removeEventListener("pageshow", this.handlePageShow), window.removeEventListener("focus", this.handleWindowFocus), window.removeEventListener("online", this.handleWindowOnline), this.lifecycleListenersAttached = !1);
11727
11780
  }
11728
11781
  // This is called when component is loaded, with all the settings (props) values
11729
11782
  // Use to initialize
11730
11783
  // This is also called when state changes - ??? - i.e. when message added to the array
11731
11784
  updated(a) {
11732
- super.updated(a), a.size > 0 && (Be.info("updated,_changedProperties:", a), this._initSetting()), !this._scrollToBottomTimeout && (this._scrollToBottomTimeout = setTimeout(() => {
11785
+ super.updated(a), a.size > 0 && (Be.info("updated,_changedProperties:", a), this._initSetting()), this._scrollToBottomOnUpdate();
11786
+ }
11787
+ _scrollToBottomOnUpdate() {
11788
+ this._scrollToBottomTimeout || (this._scrollToBottomTimeout = setTimeout(() => {
11733
11789
  this._scrollToBottom(), this._scrollToBottomTimeout = void 0;
11734
11790
  }, 200));
11735
11791
  }
@@ -11737,7 +11793,7 @@ let F = class extends re {
11737
11793
  _initSetting() {
11738
11794
  Be.info("_initSetting");
11739
11795
  const a = b.setting;
11740
- a.orgId = this.orgId, a.botId = this.botId, a.url = this.url, a.version = this.version || "current", a.logoUrl = this.logoUrl, a.logoSvg = this.logoSvg, a.closeSvg = this.closeSvg, a.popupLogoSvg = this.popupLogoSvg, a.popupLogoUrl = this.popupLogoUrl, a.botIconSvg = this.botIconSvg, a.userIconSvg = this.userIconSvg, a.systemIconSvg = this.systemIconSvg, a.agentIconSvg = this.agentIconSvg, a.infoIconSvg = this.infoIconSvg, a.anchorOpenSvg = this.anchorOpenSvg, a.anchorCloseSvg = this.anchorCloseSvg, a.sendIconSvg = this.sendIconSvg, a.attachIconSvg = this.attachIconSvg, b.setSetting(a);
11796
+ a.orgId = this.orgId, a.botId = this.botId, a.url = this.url, a.version = this.version || "current", a.testMode = this.testMode === "true", a.logoUrl = this.logoUrl, a.logoSvg = this.logoSvg, a.closeSvg = this.closeSvg, a.popupLogoSvg = this.popupLogoSvg, a.popupLogoUrl = this.popupLogoUrl, a.botIconSvg = this.botIconSvg, a.userIconSvg = this.userIconSvg, a.systemIconSvg = this.systemIconSvg, a.agentIconSvg = this.agentIconSvg, a.infoIconSvg = this.infoIconSvg, a.anchorOpenSvg = this.anchorOpenSvg, a.anchorCloseSvg = this.anchorCloseSvg, a.sendIconSvg = this.sendIconSvg, a.attachIconSvg = this.attachIconSvg, b.setSetting(a);
11741
11797
  let e = {};
11742
11798
  try {
11743
11799
  e = JSON.parse(this.prefilledFormFields);
@@ -11899,7 +11955,7 @@ let F = class extends re {
11899
11955
  this._messageList?.scrollToBottom();
11900
11956
  }
11901
11957
  };
11902
- F.styles = [Xi, Ka];
11958
+ F.styles = [Xi, Za];
11903
11959
  V([
11904
11960
  x({ type: Boolean, attribute: "display-license" })
11905
11961
  ], F.prototype, "displayLicense", 2);
@@ -11915,6 +11971,9 @@ V([
11915
11971
  V([
11916
11972
  x({ type: String, attribute: "version" })
11917
11973
  ], F.prototype, "version", 2);
11974
+ V([
11975
+ x({ type: String, attribute: "test-mode" })
11976
+ ], F.prototype, "testMode", 2);
11918
11977
  V([
11919
11978
  x({ type: String, attribute: "url" })
11920
11979
  ], F.prototype, "url", 2);
@@ -11994,7 +12053,7 @@ V([
11994
12053
  xe("cb-message-list")
11995
12054
  ], F.prototype, "_messageList", 2);
11996
12055
  F = V([
11997
- Z("enegelai-bot")
12056
+ J("enegelai-bot")
11998
12057
  ], F);
11999
12058
  export {
12000
12059
  F as default