@enegelai/bot-widget 1.18.0 → 1.18.1

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,4 +1,4 @@
1
- import { css as K, LitElement as Fe, html as u, nothing as Ae, svg as pe } from "lit";
1
+ import { css as K, LitElement as Fe, html as b, nothing as Ae, svg as pe } from "lit";
2
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";
@@ -45,7 +45,7 @@ const Ht = class Ht extends Event {
45
45
  };
46
46
  Ht.eventName = "lit-state-changed";
47
47
  let at = Ht;
48
- const Hi = (a, e) => e !== a && (e === e || a === a), ba = class ba extends EventTarget {
48
+ const Hi = (a, e) => e !== a && (e === e || a === a), ua = class ua extends EventTarget {
49
49
  static initPropertyMap() {
50
50
  this.propertyMap || (this.propertyMap = /* @__PURE__ */ new Map());
51
51
  }
@@ -119,8 +119,8 @@ const Hi = (a, e) => e !== a && (e === e || a === a), ba = class ba extends Even
119
119
  this.dispatchEvent(new at(e, t, i));
120
120
  }
121
121
  };
122
- ba.finalized = !1;
123
- let Kt = ba;
122
+ ua.finalized = !1;
123
+ let Kt = ua;
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);
@@ -668,24 +668,24 @@ var Yi = Object.defineProperty, Ki = Object.getOwnPropertyDescriptor, ra = (a, e
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
  };
671
- let ut = class extends Fe {
671
+ let bt = class extends Fe {
672
672
  constructor() {
673
673
  super(...arguments), this.color = "primary", this.svg = "";
674
674
  }
675
675
  render() {
676
- return u`<span class="cb-icon" part="base">${G(this.svg)}</span>`;
676
+ return b`<span class="cb-icon" part="base">${G(this.svg)}</span>`;
677
677
  }
678
678
  };
679
- ut.styles = Ga;
679
+ bt.styles = Ga;
680
680
  ra([
681
681
  x({ type: String })
682
- ], ut.prototype, "color", 2);
682
+ ], bt.prototype, "color", 2);
683
683
  ra([
684
684
  x({ type: String })
685
- ], ut.prototype, "svg", 2);
686
- ut = ra([
685
+ ], bt.prototype, "svg", 2);
686
+ bt = ra([
687
687
  J("cb-icon")
688
- ], ut);
688
+ ], bt);
689
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) => {
@@ -728,26 +728,26 @@ function Vt(a) {
728
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
729
  return i = i.replace(/&lt;br\s*\/?&gt;/gi, "<br>"), i = i.replace(new RegExp(e, "g"), "&"), i;
730
730
  }
731
- const se = Ke.noConflict();
732
- se.setLevel("info");
731
+ const ne = Ke.noConflict();
732
+ ne.setLevel("info");
733
733
  const Sa = 3e4;
734
734
  class as {
735
735
  constructor(e = {}) {
736
- this.id = 0, this.url = e?.url || null, this.orgId = e?.orgId || null, this.botId = e?.botId || null, this.convId = e?.convId || null, this._options = e || {}, this._ws = null, this.started = !1, this.connected = !1, this.connecting = !1, this.suspendDetected = !1, this.onMessage = e?.onMessage || null, this.onConnecting = e?.onConnecting || null, this.onConnectError = e?.onConnectError || null, this.onClose = e?.onClose || null, this.queue = e?.queue || [], this.pause = (t) => new Promise((i) => setTimeout(i, t)), this.lastTickTs = 0, this.lastAckTs = 0, this.tickInterval = null, se.info(`WSC: Created, url: ${this.url}`);
736
+ this.id = 0, this.url = e?.url || null, this.orgId = e?.orgId || null, this.botId = e?.botId || null, this.convId = e?.convId || null, this._options = e || {}, this._ws = null, this.started = !1, this.connected = !1, this.connecting = !1, this.suspendDetected = !1, this.onMessage = e?.onMessage || null, this.onConnecting = e?.onConnecting || null, this.onConnectError = e?.onConnectError || null, this.onClose = e?.onClose || null, this.queue = e?.queue || [], this.pause = (t) => new Promise((i) => setTimeout(i, t)), this.lastTickTs = 0, this.lastAckTs = 0, this.tickInterval = null, ne.info(`WSC: Created, url: ${this.url}`);
737
737
  }
738
738
  connect(e = {}) {
739
739
  if (this._ws)
740
- return se.info("WSC: connect - already connecting"), null;
740
+ return ne.info("WSC: connect - already connecting"), null;
741
741
  if (this.url = e?.url || this.url, this.connected = !1, !this.url)
742
- return se.error("WSC: URL must be provided to connect"), null;
742
+ return ne.error("WSC: URL must be provided to connect"), null;
743
743
  this.setConnecting(!0);
744
744
  const t = this.url;
745
- se.info(`WSC: ${Date.now()}: Connecting to ${t} ...`), this._ws = new WebSocket(t);
745
+ ne.info(`WSC: ${Date.now()}: Connecting to ${t} ...`), this._ws = new WebSocket(t);
746
746
  let i = setTimeout(() => {
747
- se.error(`WSC: ${Date.now()}: connected message not received in time - closing ...`), this._ws.close(), this._ws = null, this.connected = !1;
747
+ ne.error(`WSC: ${Date.now()}: connected message not received in time - closing ...`), this._ws.close(), this._ws = null, this.connected = !1;
748
748
  }, 3e4);
749
749
  this._ws.onopen = () => {
750
- se.info(`WSC: ${Date.now()}: Connection to ${t} opened`);
750
+ ne.info(`WSC: ${Date.now()}: Connection to ${t} opened`);
751
751
  }, this._ws.onmessage = (s) => {
752
752
  let r = s?.data || null;
753
753
  if (!r)
@@ -756,13 +756,13 @@ class as {
756
756
  try {
757
757
  o = JSON.parse(r);
758
758
  } catch {
759
- se.error(`WSC: ${Date.now()}: Failed to parse message: ${r}`);
759
+ ne.error(`WSC: ${Date.now()}: Failed to parse message: ${r}`);
760
760
  return;
761
761
  }
762
762
  if (o?.type === "connected")
763
- se.info(`WSC: ${Date.now()}: Got connected message`, o), clearTimeout(i), this.connected = !0, this.suspendDetected = !1, this.lastTickTs = Date.now(), this.setConnecting(!1), this.sendClientInfoMessage(), this.sendQueuedMessages();
763
+ ne.info(`WSC: ${Date.now()}: Got connected message`, o), clearTimeout(i), this.connected = !0, this.suspendDetected = !1, this.lastTickTs = Date.now(), this.setConnecting(!1), this.sendClientInfoMessage(), this.sendQueuedMessages();
764
764
  else if (o?.type === "connection-error")
765
- se.error(`WSC: ${Date.now()}: Connect error`, o), clearTimeout(i), this.stop().catch(() => {
765
+ ne.error(`WSC: ${Date.now()}: Connect error`, o), clearTimeout(i), this.stop().catch(() => {
766
766
  }), this.handleWscConnectError(o);
767
767
  else if (o?.type === "ack") {
768
768
  const f = Date.now();
@@ -770,9 +770,9 @@ class as {
770
770
  }
771
771
  this.handleWscMessage(o);
772
772
  }, this._ws.onerror = (s) => {
773
- se.error(`WSC: ${Date.now()}: Socket error`), clearTimeout(i), this.connected = !1, this._ws = null, this.setConnecting(!1);
773
+ ne.error(`WSC: ${Date.now()}: Socket error`), clearTimeout(i), this.connected = !1, this._ws = null, this.setConnecting(!1);
774
774
  }, this._ws.onclose = (s) => {
775
- se.info(`WSC: ${Date.now()}: Closed - code:${s.code}, reason:"${s.reason}"`), this.connected = !1, this._ws = null, this.handleWscClose(s), this.setConnecting(!1), this.reconnect();
775
+ ne.info(`WSC: ${Date.now()}: Closed - code:${s.code}, reason:"${s.reason}"`), this.connected = !1, this._ws = null, this.handleWscClose(s), this.setConnecting(!1), this.reconnect();
776
776
  };
777
777
  }
778
778
  reconnect(e = 1e3) {
@@ -782,10 +782,10 @@ class as {
782
782
  }
783
783
  disconnect() {
784
784
  if (this.connected = !1, !this._ws) {
785
- se.info("WSC: already disconnected");
785
+ ne.info("WSC: already disconnected");
786
786
  return;
787
787
  }
788
- se.info("WSC: disconnect"), this._ws.close();
788
+ ne.info("WSC: disconnect"), this._ws.close();
789
789
  }
790
790
  setConnecting(e = !1) {
791
791
  this.connecting !== e && (this.connecting = e, this.onConnecting && typeof this.onConnecting == "function" && this.onConnecting(this.connecting));
@@ -808,11 +808,11 @@ class as {
808
808
  async startOld() {
809
809
  let e = 1, t = !0;
810
810
  for (; t; ) {
811
- if (se.info(`WSC: start: connecting, attempt ${e}`), await this.connect(), this.connected)
812
- return se.info("WSC: connected"), !0;
811
+ if (ne.info(`WSC: start: connecting, attempt ${e}`), await this.connect(), this.connected)
812
+ return ne.info("WSC: connected"), !0;
813
813
  e++, t = e <= 4, t && await this.pause(1e3);
814
814
  }
815
- return se.error(`WSC: start: failed to connect after ${e} attempts, exiting`), !1;
815
+ return ne.error(`WSC: start: failed to connect after ${e} attempts, exiting`), !1;
816
816
  }
817
817
  handleWscConnectError(e) {
818
818
  this.onConnectError && typeof this.onConnectError == "function" && this.onConnectError(e);
@@ -842,7 +842,7 @@ class as {
842
842
  const e = Date.now();
843
843
  let t = !1;
844
844
  const i = e - this.lastAckTs;
845
- i > Sa + 5e3 && (t = !0, se.info(`WSC: checkConnection: connection loss detected - last ack delay ${i} msec, reconnecting`)), t && this.disconnect();
845
+ i > Sa + 5e3 && (t = !0, ne.info(`WSC: checkConnection: connection loss detected - last ack delay ${i} msec, reconnecting`)), t && this.disconnect();
846
846
  }
847
847
  sendMessage(e) {
848
848
  if (this.checkConnection(), !this.connected) {
@@ -857,7 +857,7 @@ class as {
857
857
  sendQueuedMessages() {
858
858
  if (Array.isArray(this.queue) && this.queue.length > 0)
859
859
  for (let e = 0; e < this.queue.length; e++)
860
- se.info("Sending queued message", this.queue[e]), this._ws.send(this.queue[e]);
860
+ ne.info("Sending queued message", this.queue[e]), this._ws.send(this.queue[e]);
861
861
  this.queue = [];
862
862
  }
863
863
  // Request assumes that response will be received.
@@ -1909,9 +1909,9 @@ class AudioProcessor extends AudioWorkletProcessor {
1909
1909
  }
1910
1910
 
1911
1911
  registerProcessor('audio_processor', AudioProcessor);
1912
- `, bs = new Blob([hs], {
1912
+ `, us = new Blob([hs], {
1913
1913
  type: "application/javascript"
1914
- }), us = URL.createObjectURL(bs), ps = us;
1914
+ }), bs = URL.createObjectURL(us), ps = bs;
1915
1915
  class gs {
1916
1916
  /**
1917
1917
  * Create a new WavRecorder instance
@@ -3231,17 +3231,17 @@ let qe = class extends Fe {
3231
3231
  }
3232
3232
  render() {
3233
3233
  const a = ["toast", this.variant, this._open ? "open" : "", this._closing ? "closing" : ""].filter(Boolean).join(" "), e = this.icon || this._defaultIcons[this.variant] || this._defaultIcons.success;
3234
- return u`
3234
+ return b`
3235
3235
  <div
3236
3236
  class=${a}
3237
3237
  role="status"
3238
3238
  aria-live=${this.ariaLive}
3239
3239
  >
3240
- ${u`<span class="icon" aria-hidden="true">${this._renderIcon(e)}</span>`}
3240
+ ${b`<span class="icon" aria-hidden="true">${this._renderIcon(e)}</span>`}
3241
3241
  <div class="msg">
3242
- ${this.message ? u`${this.message}` : u`<slot></slot>`}
3242
+ ${this.message ? b`${this.message}` : b`<slot></slot>`}
3243
3243
  </div>
3244
- ${this.closeable ? u`<button class="close" @click=${this.close} aria-label="Close">×</button>` : Ae}
3244
+ ${this.closeable ? b`<button class="close" @click=${this.close} aria-label="Close">×</button>` : Ae}
3245
3245
  </div>
3246
3246
  `;
3247
3247
  }
@@ -3256,7 +3256,7 @@ let qe = class extends Fe {
3256
3256
  this._timer && (clearTimeout(this._timer), this._timer = void 0);
3257
3257
  }
3258
3258
  _renderIcon(a) {
3259
- return a.trim().startsWith("<") ? u`${G(a)}` : a;
3259
+ return a.trim().startsWith("<") ? b`${G(a)}` : a;
3260
3260
  }
3261
3261
  };
3262
3262
  qe.styles = K`
@@ -3478,7 +3478,7 @@ var $s = Object.defineProperty, O = (a, e, t, i) => {
3478
3478
  };
3479
3479
  const T = Ke.noConflict();
3480
3480
  T.setLevel("info");
3481
- const ne = "cb_", Ps = (a) => new Promise((e) => setTimeout(e, a));
3481
+ const ie = "cb_", Ps = (a) => new Promise((e) => setTimeout(e, a));
3482
3482
  class R extends Kt {
3483
3483
  constructor() {
3484
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}`);
@@ -3527,7 +3527,7 @@ class R extends Kt {
3527
3527
  }, this.botSettingsRetryTimeout * 1e3), this.botSettingsRetryTimeout = this.botSettingsRetryTimeout * 2;
3528
3528
  return;
3529
3529
  }
3530
- T.info("Got bot settings - bot is enabled", o), this.disabled = !1, this.setting.welcomeMessage = o?.welcomeMessage || "How can I help ?", this.setting.disclaimerMessage = o?.disclaimerMessage && o.disclaimerMessage !== "" ? o.disclaimerMessage : null, this.setting.engageMessage = o?.engageMessage || "How can I help ?", this.setting.engageTimeout = o?.engageTimeout || 5, this.setting.splitMessagesAtBreak = "splitMessagesAtBreak" in o ? o.splitMessagesAtBreak : !1, this.setting.feedbackEnabled = "feedbackEnabled" in o ? o.feedbackEnabled : !1, this.setting.uploadImages = "uploadImages" in o ? o.uploadImages : !1, this.setting.newConversationTimeoutInSec = o?.newConversationTimeoutInSec || 86400, this.setting.enableNotificationSound = "enableNotificationSound" in o ? o.enableNotificationSound : !0, this.setting.botAdvancedSettings = o?.botAdvancedSettings ?? {}, this.setting.startFeedbackFromMessage = "startFeedbackFromMessage" in this.setting.botAdvancedSettings ? this.setting.botAdvancedSettings.startFeedbackFromMessage : 1, this.setting.enableMultiModalConnection = this.setting.botAdvancedSettings?.enableMultiModalConnection ?? !1, this.setting.enablePassContextOnConnect = this.setting.botAdvancedSettings?.enablePassContextOnConnect ?? !1, this.setting.enableShowFullDisclaimerMessage = this.setting.botAdvancedSettings?.enableShowFullDisclaimerMessage ?? !1, this.setting.fileUploadEnabledExtensions = this.setting.botAdvancedSettings?.fileUploadEnabledExtensions || ".jpeg,.jpg,.png,.pdf,.txt,.har,.zip,.mov,.mp4,.mp3", this.setting.fileUploadMaxFileSizeMB = this.setting.botAdvancedSettings?.fileUploadMaxFileSizeMB || 30, this.setting.enableAgentDisconnectedMessage = this.setting.botAdvancedSettings?.enableAgentDisconnectedMessage ?? !1, this.setting.showNewConversationOnAgentDisconnected = this.setting.botAdvancedSettings?.showNewConversationOnAgentDisconnected ?? !1, this.setting.enableMultiModalConnection ? this.setting.enableAudio = !0 : this.setting.enableAudio = !1, this.initConversation(), this.shouldEngage === "true" && setTimeout(() => {
3530
+ T.info("Got bot settings - bot is enabled", o), this.disabled = !1, this.setting.welcomeMessage = o?.welcomeMessage || "How can I help ?", this.setting.disclaimerMessage = o?.disclaimerMessage && o.disclaimerMessage !== "" ? o.disclaimerMessage : null, this.setting.engageMessage = o?.engageMessage || "How can I help ?", this.setting.engageTimeout = o?.engageTimeout || 5, this.setting.splitMessagesAtBreak = "splitMessagesAtBreak" in o ? o.splitMessagesAtBreak : !1, this.setting.feedbackEnabled = "feedbackEnabled" in o ? o.feedbackEnabled : !1, this.setting.uploadImages = "uploadImages" in o ? o.uploadImages : !1, this.setting.newConversationTimeoutInSec = o?.newConversationTimeoutInSec || 86400, this.setting.enableNotificationSound = "enableNotificationSound" in o ? o.enableNotificationSound : !0, this.setting.botAdvancedSettings = o?.botAdvancedSettings ?? {}, this.setting.startFeedbackFromMessage = "startFeedbackFromMessage" in this.setting.botAdvancedSettings ? this.setting.botAdvancedSettings.startFeedbackFromMessage : 1, this.setting.enableMultiModalConnection = this.setting.botAdvancedSettings?.enableMultiModalConnection ?? !1, this.setting.enablePassContextOnConnect = this.setting.botAdvancedSettings?.enablePassContextOnConnect ?? !1, this.setting.enableShowFullDisclaimerMessage = this.setting.botAdvancedSettings?.enableShowFullDisclaimerMessage ?? !1, this.setting.fileUploadEnabledExtensions = this.setting.botAdvancedSettings?.fileUploadEnabledExtensions || ".jpeg,.jpg,.png,.pdf,.txt,.har,.zip,.mov,.mp4,.mp3", this.setting.fileUploadMaxFileSizeMB = this.setting.botAdvancedSettings?.fileUploadMaxFileSizeMB || 30, this.setting.enableAgentDisconnectedMessage = this.setting.botAdvancedSettings?.enableAgentDisconnectedMessage ?? !1, this.setting.showNewConversationOnAgentDisconnected = this.setting.botAdvancedSettings?.showNewConversationOnAgentDisconnected ?? !1, this.setting.engagePopupSuppressPermanently = this.setting.botAdvancedSettings?.engagePopupSuppressPermanently || 0, this.setting.enableMultiModalConnection ? this.setting.enableAudio = !0 : this.setting.enableAudio = !1, this.initConversation(), this.shouldEngage === "true" && setTimeout(() => {
3531
3531
  this.showEngagePopup();
3532
3532
  }, this.setting.engageTimeout * 1e3);
3533
3533
  }
@@ -3762,7 +3762,7 @@ class R extends Kt {
3762
3762
  T.info("form has no fields", e);
3763
3763
  return;
3764
3764
  }
3765
- const r = `${ne}${this.setting.botId}.${this.conversationId}.form.${i}`, o = localStorage.getItem(r);
3765
+ const r = `${ie}${this.setting.botId}.${this.conversationId}.form.${i}`, o = localStorage.getItem(r);
3766
3766
  if (o) {
3767
3767
  let f = null;
3768
3768
  try {
@@ -3780,10 +3780,23 @@ class R extends Kt {
3780
3780
  this.form = t;
3781
3781
  }
3782
3782
  suppressEngagePopup() {
3783
- this.engage = !1, this.shouldEngage = "false";
3783
+ if (this.engage = !1, this.shouldEngage = "false", this.setting.engagePopupSuppressPermanently && this.setting.engagePopupSuppressPermanently > 0) {
3784
+ const e = Date.now();
3785
+ localStorage.setItem(`${ie}_engagePopupSuppressed`, `${e}`), T.info(`Engage popup suppressed for ${this.setting.engagePopupSuppressPermanently} days`);
3786
+ }
3784
3787
  }
3785
3788
  showEngagePopup() {
3786
- this.open || (T.info("Engaging User !"), this.engage = !0, this.playAudioNotification());
3789
+ if (!this.open) {
3790
+ if (this.setting.engagePopupSuppressPermanently && this.setting.engagePopupSuppressPermanently > 0) {
3791
+ const e = Date.now(), t = this.setting.engagePopupSuppressPermanently * 24 * 60 * 60 * 1e3, i = localStorage.getItem(`${ie}_engagePopupSuppressed`);
3792
+ if (i) {
3793
+ const s = parseInt(i, 10);
3794
+ if (!isNaN(s) && e - s < t)
3795
+ return;
3796
+ }
3797
+ }
3798
+ T.info("Engaging User"), this.engage = !0, this.playAudioNotification();
3799
+ }
3787
3800
  }
3788
3801
  playAudioNotification() {
3789
3802
  if (!this.setting.enableNotificationSound)
@@ -4198,7 +4211,7 @@ class R extends Kt {
4198
4211
  T.info("submitForm: No form is active - ignored");
4199
4212
  return;
4200
4213
  }
4201
- const t = `${ne}${this.setting.botId}.${this.conversationId}.form.${this.form.name}`;
4214
+ const t = `${ie}${this.setting.botId}.${this.conversationId}.form.${this.form.name}`;
4202
4215
  await this.sendFormData(this.form.name, e), localStorage.setItem(t, JSON.stringify(e)), "name" in e && (this.feedbackName = e.name), "email" in e && (this.feedbackEmail = e.email), this.form = null;
4203
4216
  }
4204
4217
  async sendFormData(e, t) {
@@ -4284,7 +4297,7 @@ class R extends Kt {
4284
4297
  }
4285
4298
  async uploadFiles(e) {
4286
4299
  if (!e?.length) return;
4287
- const t = b.setting.fileUploadMaxFileSizeMB || 30, i = t * 1024 * 1024, s = e?.find((v) => v.size > i);
4300
+ const t = u.setting.fileUploadMaxFileSizeMB || 30, i = t * 1024 * 1024, s = e?.find((v) => v.size > i);
4288
4301
  if (s) {
4289
4302
  T.error(
4290
4303
  `File "${s.name}" exceeds the ${t} MB limit and will not be uploaded.`
@@ -4329,42 +4342,42 @@ class R extends Kt {
4329
4342
  }
4330
4343
  }
4331
4344
  O([
4332
- ce({ prefix: ne }),
4345
+ ce({ prefix: ie }),
4333
4346
  z({ value: "en" })
4334
4347
  ], R.prototype, "language");
4335
4348
  O([
4336
- ce({ prefix: ne }),
4349
+ ce({ prefix: ie }),
4337
4350
  z({ value: "light" })
4338
4351
  ], R.prototype, "theme");
4339
4352
  O([
4340
- ce({ prefix: ne }),
4353
+ ce({ prefix: ie }),
4341
4354
  z({ type: Boolean, value: !1 })
4342
4355
  ], R.prototype, "open");
4343
4356
  O([
4344
4357
  z({ type: Boolean, value: !1 })
4345
4358
  ], R.prototype, "alwaysOpen");
4346
4359
  O([
4347
- ce({ prefix: ne }),
4360
+ ce({ prefix: ie }),
4348
4361
  z({ value: "false" })
4349
4362
  ], R.prototype, "connectWs");
4350
4363
  O([
4351
- ce({ prefix: ne }),
4364
+ ce({ prefix: ie }),
4352
4365
  z({ value: fe() })
4353
4366
  ], R.prototype, "conversationId");
4354
4367
  O([
4355
- ce({ prefix: ne }),
4368
+ ce({ prefix: ie }),
4356
4369
  z({ value: 0 })
4357
4370
  ], R.prototype, "lastConversationUpdate");
4358
4371
  O([
4359
- ce({ prefix: ne }),
4372
+ ce({ prefix: ie }),
4360
4373
  z({ type: Array, value: [] })
4361
4374
  ], R.prototype, "messages");
4362
4375
  O([
4363
- ce({ prefix: ne }),
4376
+ ce({ prefix: ie }),
4364
4377
  z({ value: 0 })
4365
4378
  ], R.prototype, "unreadMessages");
4366
4379
  O([
4367
- ce({ prefix: ne }),
4380
+ ce({ prefix: ie }),
4368
4381
  z({
4369
4382
  type: Array,
4370
4383
  value: []
@@ -4409,7 +4422,7 @@ O([
4409
4422
  })
4410
4423
  ], R.prototype, "actions");
4411
4424
  O([
4412
- ce({ prefix: ne }),
4425
+ ce({ prefix: ie }),
4413
4426
  z({ type: Object, value: null })
4414
4427
  ], R.prototype, "form");
4415
4428
  O([
@@ -4431,21 +4444,21 @@ O([
4431
4444
  z({ type: Boolean, value: !1 })
4432
4445
  ], R.prototype, "connected");
4433
4446
  O([
4434
- ce({ prefix: ne }),
4447
+ ce({ prefix: ie }),
4435
4448
  z({ value: "true" })
4436
4449
  ], R.prototype, "shouldEngage");
4437
4450
  O([
4438
4451
  z({ type: Boolean, value: !1 })
4439
4452
  ], R.prototype, "engage");
4440
4453
  O([
4441
- ce({ prefix: ne }),
4454
+ ce({ prefix: ie }),
4442
4455
  z({ type: Boolean, value: !1 })
4443
4456
  ], R.prototype, "showNewConversation");
4444
4457
  O([
4445
4458
  z({ type: Boolean, value: !1 })
4446
4459
  ], R.prototype, "typingActive");
4447
4460
  O([
4448
- ce({ prefix: ne }),
4461
+ ce({ prefix: ie }),
4449
4462
  z({
4450
4463
  type: Object,
4451
4464
  value: {
@@ -4469,12 +4482,13 @@ O([
4469
4482
  fileUploadEnabledExtensions: ".jpeg,.jpg,.png,.pdf,.txt,.har,.zip,.mov,.mp4,.mp3",
4470
4483
  fileUploadMaxFileSizeMB: 30,
4471
4484
  enableAgentDisconnectedMessage: !1,
4472
- showNewConversationOnAgentDisconnected: !1
4485
+ showNewConversationOnAgentDisconnected: !1,
4486
+ engagePopupSuppressPermanently: 0
4473
4487
  }
4474
4488
  })
4475
4489
  ], R.prototype, "setting");
4476
4490
  O([
4477
- ce({ prefix: ne }),
4491
+ ce({ prefix: ie }),
4478
4492
  z({ type: Object, value: {} })
4479
4493
  ], R.prototype, "context");
4480
4494
  O([
@@ -4508,11 +4522,11 @@ O([
4508
4522
  z({ type: Array, value: [] })
4509
4523
  ], R.prototype, "feedbackMessages");
4510
4524
  O([
4511
- ce({ prefix: ne }),
4525
+ ce({ prefix: ie }),
4512
4526
  z({ type: String, value: "" })
4513
4527
  ], R.prototype, "feedbackName");
4514
4528
  O([
4515
- ce({ prefix: ne }),
4529
+ ce({ prefix: ie }),
4516
4530
  z({ type: String, value: "" })
4517
4531
  ], R.prototype, "feedbackEmail");
4518
4532
  O([
@@ -4527,7 +4541,7 @@ O([
4527
4541
  O([
4528
4542
  z({ type: Boolean, value: !1 })
4529
4543
  ], R.prototype, "webAudioMuted");
4530
- const b = new R(), Ls = K`
4544
+ const u = new R(), Ls = K`
4531
4545
  ${ke}
4532
4546
  :host {
4533
4547
  position: relative;
@@ -4663,32 +4677,32 @@ let Ot = class extends re {
4663
4677
  }
4664
4678
  */
4665
4679
  renderExp() {
4666
- return u` <header class="cb-header" part="header">
4680
+ return b` <header class="cb-header" part="header">
4667
4681
  ${W(
4668
- b.setting.logoUrl !== "",
4669
- () => u`<img class="cb-header-logo" part="header-logo" src="${b.setting.logoUrl}" />`,
4670
- () => u`<div class="cb-header-logo" part="header-logo">${G(b.setting.logoSvg)}</div>`
4682
+ u.setting.logoUrl !== "",
4683
+ () => b`<img class="cb-header-logo" part="header-logo" src="${u.setting.logoUrl}" />`,
4684
+ () => b`<div class="cb-header-logo" part="header-logo">${G(u.setting.logoSvg)}</div>`
4671
4685
  )}
4672
4686
  <div class="cb-header-title" part="header-title">${Vt(this.title)}</div>
4673
4687
  ${W(
4674
- b.alwaysOpen,
4675
- () => u``,
4676
- () => u`<div class="cb-header-close" part="header-close">${G(qs)}</div>`
4688
+ u.alwaysOpen,
4689
+ () => b``,
4690
+ () => b`<div class="cb-header-close" part="header-close">${G(qs)}</div>`
4677
4691
  )}
4678
4692
  </header>`;
4679
4693
  }
4680
4694
  render() {
4681
- return u`<header class="cb-header" part="header">
4695
+ return b`<header class="cb-header" part="header">
4682
4696
  ${W(
4683
- b.setting.logoUrl !== "",
4684
- () => u`<img class="cb-header-img" part="header-logo" src="${b.setting.logoUrl}" />`,
4685
- () => u`<div class="cb-header-logo" part="header-logo">${G(b.setting.logoSvg)}</div>`
4697
+ u.setting.logoUrl !== "",
4698
+ () => b`<img class="cb-header-img" part="header-logo" src="${u.setting.logoUrl}" />`,
4699
+ () => b`<div class="cb-header-logo" part="header-logo">${G(u.setting.logoSvg)}</div>`
4686
4700
  )}
4687
4701
  <div class="cb-header-title" part="header-title">${this.title}</div>
4688
4702
  ${W(
4689
- b.alwaysOpen,
4690
- () => u`<div></div>`,
4691
- () => u`<div @click=${this._clickCloseHandler} class="cb-header-close" part="header-close">${G(b.setting.closeSvg)}</div>`
4703
+ u.alwaysOpen,
4704
+ () => b`<div></div>`,
4705
+ () => b`<div @click=${this._clickCloseHandler} class="cb-header-close" part="header-close">${G(u.setting.closeSvg)}</div>`
4692
4706
  )}
4693
4707
  </header>`;
4694
4708
  }
@@ -4747,7 +4761,7 @@ let Jt = class extends re {
4747
4761
  super(...arguments), this.year = (/* @__PURE__ */ new Date()).getFullYear();
4748
4762
  }
4749
4763
  render() {
4750
- return u`
4764
+ return b`
4751
4765
  <div class="cb-footer" part="footer">
4752
4766
  yugasun@${this.year}
4753
4767
  <a
@@ -5237,10 +5251,10 @@ let gt = class extends Fe {
5237
5251
  super(...arguments), this.options = [], this.minWidth = 180;
5238
5252
  }
5239
5253
  render() {
5240
- return u`
5254
+ return b`
5241
5255
  <div class="menu" part="menu" style="min-width:${Math.max(this.minWidth, 180)}px">
5242
5256
  <div class="list" role="menu">
5243
- ${this.options.map((a, e) => u`
5257
+ ${this.options.map((a, e) => b`
5244
5258
  <a
5245
5259
  class="item"
5246
5260
  role="menuitem"
@@ -5340,7 +5354,7 @@ let Ge = class extends Fe {
5340
5354
  }
5341
5355
  render() {
5342
5356
  const a = ["split-btn", this.variant, this.size].filter(Boolean).join(" ");
5343
- return u`
5357
+ return b`
5344
5358
  <button
5345
5359
  type="button"
5346
5360
  class=${a}
@@ -5545,21 +5559,21 @@ let Me = class extends Fe {
5545
5559
  renderCard(a) {
5546
5560
  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 = () => {
5547
5561
  if (!i) return 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;
5551
- return u`
5562
+ const N = b`<img class="card__image" src=${i} alt=${s ?? e ?? "Image"} draggable="false" />`;
5563
+ return p ? b`<a class="card__image-link" href=${o} target=${f || "_blank"} rel="noopener noreferrer" draggable="false" aria-label=${e ? `Open: ${e}` : "Open"}>${N}</a>` : N;
5564
+ }, Z = () => e ? p && !i ? b`<h3 class="card__title"><a class="card__title-link" href=${o} target=${f || "_blank"} rel="noopener noreferrer" draggable="false">${e}</a></h3>` : b`<h3 class="card__title">${e}</h3>` : Ae;
5565
+ return b`
5552
5566
  <div class="card" role="group" aria-label=${e ? `Card: ${e}` : "Card"}>
5553
5567
  ${C()}
5554
5568
  <div class="card__content">
5555
5569
  ${Z()}
5556
- ${t ? u`<div class="card__subtitle">${t}</div>` : Ae}
5557
- ${w || _ ? u`
5570
+ ${t ? b`<div class="card__subtitle">${t}</div>` : Ae}
5571
+ ${w || _ ? b`
5558
5572
  <div class=${P}>
5559
- ${w ? u`<div class="card__info-text">${v}</div>` : Ae}
5573
+ ${w ? b`<div class="card__info-text">${v}</div>` : Ae}
5560
5574
  ${_ ? this.renderRating(k) : Ae}
5561
5575
  </div>` : Ae}
5562
- ${r.length ? u`
5576
+ ${r.length ? b`
5563
5577
  <div class=${L}>
5564
5578
  ${r.map((N, X) => this.renderAnyButton(N, X))}
5565
5579
  </div>` : Ae}
@@ -5573,7 +5587,7 @@ let Me = class extends Fe {
5573
5587
  }
5574
5588
  renderSingleButton(a) {
5575
5589
  const t = `card-btn ${(a.type ?? "primary").toLowerCase() === "secondary" ? "secondary" : "primary"}`, i = a.text || "Open";
5576
- return a.url ? u`
5590
+ return a.url ? b`
5577
5591
  <a
5578
5592
  class=${t}
5579
5593
  href=${a.url}
@@ -5583,7 +5597,7 @@ let Me = class extends Fe {
5583
5597
  @click=${() => this.emitButtonClick(a)}
5584
5598
  @pointerdown=${(s) => s.stopPropagation()}
5585
5599
  >${i}</a>
5586
- ` : u`
5600
+ ` : b`
5587
5601
  <button
5588
5602
  type="button"
5589
5603
  class=${t}
@@ -5594,7 +5608,7 @@ let Me = class extends Fe {
5594
5608
  }
5595
5609
  renderSplitButton(a, e) {
5596
5610
  const t = (a.type ?? "primary").toLowerCase();
5597
- return u`
5611
+ return b`
5598
5612
  <cb-split-button
5599
5613
  .label=${a.text || "Select"}
5600
5614
  .variant=${t}
@@ -5610,7 +5624,7 @@ let Me = class extends Fe {
5610
5624
  /* ----------------- Rating ----------------- */
5611
5625
  renderRating(a) {
5612
5626
  const e = Math.max(0, Math.min(5, a)), t = [0, 1, 2, 3, 4].map((i) => Math.max(0, Math.min(1, e - i)));
5613
- return u`<div class="rating" aria-label="${e} out of 5 stars">
5627
+ return b`<div class="rating" aria-label="${e} out of 5 stars">
5614
5628
  <span class="stars">${t.map((i) => this.renderStar(i))}</span>
5615
5629
  </div>`;
5616
5630
  }
@@ -5620,7 +5634,7 @@ let Me = class extends Fe {
5620
5634
  -webkit-mask: linear-gradient(to right, #000 0, #000 ${t}, transparent ${t}, transparent 100%);
5621
5635
  mask: linear-gradient(to right, #000 0, #000 ${t}, transparent ${t}, transparent 100%);
5622
5636
  `;
5623
- return u`
5637
+ return b`
5624
5638
  <span class="star" role="img" aria-label="${e.toFixed(2)} filled">
5625
5639
  <svg class="star__base" viewBox="0 0 16 16" aria-hidden="true"><path d="${$a}"/></svg>
5626
5640
  <div class="star__fill" style="${s}">
@@ -5632,7 +5646,7 @@ let Me = class extends Fe {
5632
5646
  /* ----------------- Carousel ----------------- */
5633
5647
  renderCarouselSimple(a) {
5634
5648
  const e = Array.isArray(a.items) ? a.items : [], t = Math.max(1, a.slidesPerPage || 1), i = t > 1 ? `width: calc((100% - ${(t - 1) * 0.75}em) / ${t}); max-width: none;` : "";
5635
- return u`
5649
+ return b`
5636
5650
  <div class="hc-wrapper">
5637
5651
  <button
5638
5652
  type="button"
@@ -5643,7 +5657,7 @@ let Me = class extends Fe {
5643
5657
  >&#x276E;</button>
5644
5658
 
5645
5659
  <div class="horizontal-carousel" @scroll=${this.onCarouselScroll}>
5646
- ${e.map((s) => u`
5660
+ ${e.map((s) => b`
5647
5661
  <div class="horizontal-carousel__item" style=${i}>
5648
5662
  <cb-block .block=${s}></cb-block>
5649
5663
  </div>
@@ -5708,7 +5722,7 @@ let Me = class extends Fe {
5708
5722
  }
5709
5723
  }
5710
5724
  renderUnknown(a) {
5711
- return u`<div class="unknown">Unknown block type: <code>${a?.type ?? "—"}</code></div>`;
5725
+ return b`<div class="unknown">Unknown block type: <code>${a?.type ?? "—"}</code></div>`;
5712
5726
  }
5713
5727
  /* ----------------- handle clicks ----------------- */
5714
5728
  emitButtonClick(a) {
@@ -5793,9 +5807,9 @@ let Bt = class extends Fe {
5793
5807
  super(...arguments), this.blocks = [];
5794
5808
  }
5795
5809
  render() {
5796
- return !this.blocks || this.blocks.length === 0 ? Ae : u`
5810
+ return !this.blocks || this.blocks.length === 0 ? Ae : b`
5797
5811
  <div class="stack">
5798
- ${this.blocks.map((a) => u`<cb-block .block=${a}></cb-block>`)}
5812
+ ${this.blocks.map((a) => b`<cb-block .block=${a}></cb-block>`)}
5799
5813
  </div>
5800
5814
  `;
5801
5815
  }
@@ -5868,16 +5882,16 @@ function Js() {
5868
5882
  return n;
5869
5883
  }
5870
5884
  function v(n, c) {
5871
- if ((U(n) || n === window || n === document) && (n = [n]), Pe(n) || Ve(n) || (n = [n]), ua(n) != 0) {
5885
+ if ((U(n) || n === window || n === document) && (n = [n]), Pe(n) || Ve(n) || (n = [n]), ba(n) != 0) {
5872
5886
  if (Pe(n) && !Ve(n)) for (var l = n.length, d = 0; d < l && c.call(n[d], n[d], d, n) !== !1; d++) ;
5873
5887
  else if (Ve(n)) {
5874
- for (var h in n) if (ie(n, h) && c.call(n[h], n[h], h, n) === !1) break;
5888
+ for (var h in n) if (se(n, h) && c.call(n[h], n[h], h, n) === !1) break;
5875
5889
  }
5876
5890
  }
5877
5891
  }
5878
5892
  function k(n) {
5879
5893
  var c = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : null, l = arguments.length > 2 && arguments[2] !== void 0 ? arguments[2] : null, d = n[f] = n[f] || [], h = { all: d, evt: null, found: null };
5880
- return c && l && ua(d) > 0 && v(d, (function(m, g) {
5894
+ return c && l && ba(d) > 0 && v(d, (function(m, g) {
5881
5895
  if (m.eventName == c && m.fn.toString() == l.toString()) return h.found = !0, h.evt = g, !1;
5882
5896
  })), h;
5883
5897
  }
@@ -5962,7 +5976,7 @@ function Js() {
5962
5976
  }
5963
5977
  }
5964
5978
  function he(n, c, l) {
5965
- if (be(n)) console.error("Inject assets error");
5979
+ if (ue(n)) console.error("Inject assets error");
5966
5980
  else if (j(c) && (l = c, c = !1), H(c) && c in window) j(l) && l();
5967
5981
  else {
5968
5982
  var d;
@@ -6016,17 +6030,17 @@ function Js() {
6016
6030
  function Ve(n) {
6017
6031
  return o(n) === "object" && n != null && !j(n) && !$e(n);
6018
6032
  }
6019
- function be(n) {
6033
+ function ue(n) {
6020
6034
  return n == null;
6021
6035
  }
6022
- function ie(n, c) {
6036
+ function se(n, c) {
6023
6037
  return n !== null && hasOwnProperty.call(n, c);
6024
6038
  }
6025
- function ua(n) {
6039
+ function ba(n) {
6026
6040
  if (Ve(n)) {
6027
6041
  if (n.keys) return n.keys().length;
6028
6042
  var c = 0;
6029
- for (var l in n) ie(n, l) && c++;
6043
+ for (var l in n) se(n, l) && c++;
6030
6044
  return c;
6031
6045
  }
6032
6046
  return n.length;
@@ -6173,7 +6187,7 @@ function Js() {
6173
6187
  var h = n.querySelector(".gslide-media"), m = new Image(), g = "gSlideTitle_" + l, y = "gSlideDesc_" + l;
6174
6188
  m.addEventListener("load", (function() {
6175
6189
  j(d) && d();
6176
- }), !1), m.src = c.href, c.sizes != "" && c.srcset != "" && (m.sizes = c.sizes, m.srcset = c.srcset), m.alt = "", be(c.alt) || c.alt === "" || (m.alt = c.alt), c.title !== "" && m.setAttribute("aria-labelledby", g), c.description !== "" && m.setAttribute("aria-describedby", y), c.hasOwnProperty("_hasCustomWidth") && c._hasCustomWidth && (m.style.width = c.width), c.hasOwnProperty("_hasCustomHeight") && c._hasCustomHeight && (m.style.height = c.height), h.insertBefore(m, h.firstChild);
6190
+ }), !1), m.src = c.href, c.sizes != "" && c.srcset != "" && (m.sizes = c.sizes, m.srcset = c.srcset), m.alt = "", ue(c.alt) || c.alt === "" || (m.alt = c.alt), c.title !== "" && m.setAttribute("aria-labelledby", g), c.description !== "" && m.setAttribute("aria-describedby", y), c.hasOwnProperty("_hasCustomWidth") && c._hasCustomWidth && (m.style.width = c.width), c.hasOwnProperty("_hasCustomHeight") && c._hasCustomHeight && (m.style.height = c.height), h.insertBefore(m, h.firstChild);
6177
6191
  }
6178
6192
  function _i(n, c, l, d) {
6179
6193
  var h = this, m = n.querySelector(".ginner-container"), g = "gvideo" + l, y = n.querySelector(".gslide-media"), A = this.getAllPlayers();
@@ -6189,9 +6203,9 @@ function Js() {
6189
6203
  }
6190
6204
  var D = B || X('<div id="'.concat(g, '" data-plyr-provider="').concat($, '" data-plyr-embed-id="').concat(I, '"></div>'));
6191
6205
  _(S, "".concat($, "-video gvideo")), S.appendChild(D), S.setAttribute("data-id", g), S.setAttribute("data-index", l);
6192
- var ee = ie(h.settings.plyr, "config") ? h.settings.plyr.config : {}, me = new Plyr("#" + g, ee);
6193
- me.on("ready", (function(ue) {
6194
- A[g] = ue.detail.plyr, j(d) && d();
6206
+ var ee = se(h.settings.plyr, "config") ? h.settings.plyr.config : {}, me = new Plyr("#" + g, ee);
6207
+ me.on("ready", (function(be) {
6208
+ A[g] = be.detail.plyr, j(d) && d();
6195
6209
  })), ae((function() {
6196
6210
  return n.querySelector("iframe") && n.querySelector("iframe").dataset.ready == "true";
6197
6211
  }), (function() {
@@ -6204,7 +6218,7 @@ function Js() {
6204
6218
  n.type === "enterfullscreen" && _(c, "fullscreen"), n.type === "exitfullscreen" && P(c, "fullscreen");
6205
6219
  }
6206
6220
  function Si(n, c, l, d) {
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;
6221
+ var h, m = this, g = n.querySelector(".gslide-media"), y = !(!se(c, "href") || !c.href) && c.href.split("#").pop().trim(), A = !(!se(c, "content") || !c.content) && c.content;
6208
6222
  if (A && (H(A) && (h = X('<div class="ginlined-content">'.concat(A, "</div>"))), U(A))) {
6209
6223
  A.style.display == "none" && (A.style.display = "block");
6210
6224
  var S = document.createElement("div");
@@ -6239,32 +6253,32 @@ function Js() {
6239
6253
  } }, { key: "parseConfig", value: function(n, c) {
6240
6254
  var l = this, d = p({ descPosition: c.descPosition }, this.defaults);
6241
6255
  if (Ve(n) && !U(n)) {
6242
- ie(n, "type") || (ie(n, "content") && n.content ? n.type = "inline" : ie(n, "href") && (n.type = this.sourceType(n.href)));
6256
+ se(n, "type") || (se(n, "content") && n.content ? n.type = "inline" : se(n, "href") && (n.type = this.sourceType(n.href)));
6243
6257
  var h = p(d, n);
6244
6258
  return this.setSize(h, c), h;
6245
6259
  }
6246
6260
  var m = "", g = n.getAttribute("data-glightbox"), y = n.nodeName.toLowerCase();
6247
6261
  if (y === "a" && (m = n.href), y === "img" && (m = n.src, d.alt = n.alt), d.href = m, v(d, (function(q, D) {
6248
- ie(c, D) && D !== "width" && (d[D] = c[D]);
6262
+ se(c, D) && D !== "width" && (d[D] = c[D]);
6249
6263
  var ee = n.dataset[D];
6250
- be(ee) || (d[D] = l.sanitizeValue(ee));
6251
- })), d.content && (d.type = "inline"), !d.type && m && (d.type = this.sourceType(m)), be(g)) {
6264
+ ue(ee) || (d[D] = l.sanitizeValue(ee));
6265
+ })), d.content && (d.type = "inline"), !d.type && m && (d.type = this.sourceType(m)), ue(g)) {
6252
6266
  if (!d.title && y == "a") {
6253
6267
  var A = n.title;
6254
- be(A) || A === "" || (d.title = A);
6268
+ ue(A) || A === "" || (d.title = A);
6255
6269
  }
6256
6270
  if (!d.title && y == "img") {
6257
6271
  var S = n.alt;
6258
- be(S) || S === "" || (d.title = S);
6272
+ ue(S) || S === "" || (d.title = S);
6259
6273
  }
6260
6274
  } else {
6261
6275
  var I = [];
6262
6276
  v(d, (function(q, D) {
6263
6277
  I.push(";\\s?" + D);
6264
6278
  })), I = I.join("\\s?:|"), g.trim() !== "" && v(d, (function(q, D) {
6265
- var ee = g, me = new RegExp("s?" + D + "s?:s?(.*?)(" + I + "s?:|$)"), ue = ee.match(me);
6266
- if (ue && ue.length && ue[1]) {
6267
- var Le = ue[1].trim().replace(/;\s*$/, "");
6279
+ var ee = g, me = new RegExp("s?" + D + "s?:s?(.*?)(" + I + "s?:|$)"), be = ee.match(me);
6280
+ if (be && be.length && be[1]) {
6281
+ var Le = be[1].trim().replace(/;\s*$/, "");
6268
6282
  d[D] = l.sanitizeValue(Le);
6269
6283
  }
6270
6284
  }));
@@ -6285,7 +6299,7 @@ function Js() {
6285
6299
  return this.setSize(d, c, n), this.slideConfig = d, d;
6286
6300
  } }, { key: "setSize", value: function(n, c) {
6287
6301
  var l = arguments.length > 2 && arguments[2] !== void 0 ? arguments[2] : null, d = n.type == "video" ? this.checkSize(c.videosWidth) : this.checkSize(c.width), h = this.checkSize(c.height);
6288
- return n.width = ie(n, "width") && n.width !== "" ? this.checkSize(n.width) : d, n.height = ie(n, "height") && n.height !== "" ? this.checkSize(n.height) : h, l && n.type == "image" && (n._hasCustomWidth = !!l.dataset.width, n._hasCustomHeight = !!l.dataset.height), n;
6302
+ return n.width = se(n, "width") && n.width !== "" ? this.checkSize(n.width) : d, n.height = se(n, "height") && n.height !== "" ? this.checkSize(n.height) : h, l && n.type == "image" && (n._hasCustomWidth = !!l.dataset.width, n._hasCustomHeight = !!l.dataset.height), n;
6289
6303
  } }, { key: "checkSize", value: function(n) {
6290
6304
  return xt(n) ? "".concat(n, "px") : n;
6291
6305
  } }, { key: "sanitizeValue", value: function(n) {
@@ -6445,7 +6459,7 @@ function Js() {
6445
6459
  }
6446
6460
  function Ei(n) {
6447
6461
  if (n.events.hasOwnProperty("touch")) return !1;
6448
- var c, l, d, h = te(), m = h.width, g = h.height, y = !1, A = null, S = null, I = null, $ = !1, B = 1, q = 1, D = !1, ee = !1, me = null, ue = null, Le = null, oe = null, Re = 0, ze = 0, ht = !1, rt = !1, _e = {}, Se = {}, xa = 0, ka = 0, Li = document.getElementById("glightbox-slider"), St = document.querySelector(".goverlay"), Ri = new Ii(Li, { touchStart: function(Y) {
6462
+ var c, l, d, h = te(), m = h.width, g = h.height, y = !1, A = null, S = null, I = null, $ = !1, B = 1, q = 1, D = !1, ee = !1, me = null, be = null, Le = null, oe = null, Re = 0, ze = 0, ht = !1, rt = !1, _e = {}, Se = {}, xa = 0, ka = 0, Li = document.getElementById("glightbox-slider"), St = document.querySelector(".goverlay"), Ri = new Ii(Li, { touchStart: function(Y) {
6449
6463
  if (y = !0, (E(Y.targetTouches[0].target, "ginner-container") || M(Y.targetTouches[0].target, ".gslide-desc") || Y.targetTouches[0].target.nodeName.toLowerCase() == "a") && (y = !1), M(Y.targetTouches[0].target, ".gslide-inline") && !E(Y.targetTouches[0].target.parentNode, "gslide-inline") && (y = !1), y) {
6450
6464
  if (Se = Y.targetTouches[0], _e.pageX = Y.targetTouches[0].pageX, _e.pageY = Y.targetTouches[0].pageY, xa = Y.targetTouches[0].clientX, ka = Y.targetTouches[0].clientY, A = n.activeSlide, S = A.querySelector(".gslide-media"), d = A.querySelector(".gslide-inline"), I = null, E(S, "gslide-image") && (I = S.querySelector("img")), (window.innerWidth || document.documentElement.clientWidth || document.body.clientWidth) > 769 && (S = A.querySelector(".ginner-container")), P(St, "greset"), Y.pageX > 20 && Y.pageX < window.innerWidth - 20) return;
6451
6465
  Y.preventDefault();
@@ -6463,7 +6477,7 @@ function Js() {
6463
6477
  }
6464
6478
  }, touchEnd: function() {
6465
6479
  if (y) {
6466
- if ($ = !1, ee || D) return Le = me, void (oe = ue);
6480
+ if ($ = !1, ee || D) return Le = me, void (oe = be);
6467
6481
  var Y = Math.abs(parseInt(ze)), de = Math.abs(parseInt(Re));
6468
6482
  if (!(Y > 29 && I)) return Y < 29 && de < 25 ? (_(St, "greset"), St.style.opacity = 1, Nt(S)) : void 0;
6469
6483
  n.close();
@@ -6478,12 +6492,12 @@ function Js() {
6478
6492
  if (!I || $) return !1;
6479
6493
  D = !0, I.scaleX = I.scaleY = B * Y.zoom;
6480
6494
  var de = B * Y.zoom;
6481
- if (ee = !0, de <= 1) return ee = !1, de = 1, oe = null, Le = null, me = null, ue = null, void I.setAttribute("style", "");
6495
+ if (ee = !0, de <= 1) return ee = !1, de = 1, oe = null, Le = null, me = null, be = null, void I.setAttribute("style", "");
6482
6496
  de > 4.5 && (de = 4.5), I.style.transform = "scale3d(".concat(de, ", ").concat(de, ", 1)"), q = de;
6483
6497
  }, pressMove: function(Y) {
6484
6498
  if (ee && !D) {
6485
6499
  var de = Se.pageX - _e.pageX, Ue = Se.pageY - _e.pageY;
6486
- Le && (de += Le), oe && (Ue += oe), me = de, ue = Ue;
6500
+ Le && (de += Le), oe && (Ue += oe), me = de, be = Ue;
6487
6501
  var Ct = "translate3d(".concat(de, "px, ").concat(Ue, "px, 0)");
6488
6502
  q && (Ct += " scale3d(".concat(q, ", ").concat(q, ", 1)")), C(I, Ct);
6489
6503
  }
@@ -6539,7 +6553,7 @@ function Js() {
6539
6553
  var l = xt(c) ? c : this.settings.startAt;
6540
6554
  if (U(n)) {
6541
6555
  var d = n.getAttribute("data-gallery");
6542
- d && (this.fullElementsList = this.elements, this.elements = this.getGalleryElements(this.elements, d)), be(l) && (l = this.getElementIndex(n)) < 0 && (l = 0);
6556
+ d && (this.fullElementsList = this.elements, this.elements = this.getGalleryElements(this.elements, d)), ue(l) && (l = this.getElementIndex(n)) < 0 && (l = 0);
6543
6557
  }
6544
6558
  xt(l) || (l = 0), this.build(), L(this.overlay, this.settings.openEffect === "none" ? "none" : this.settings.cssEfects.fade.in);
6545
6559
  var h = document.body, m = window.innerWidth - document.documentElement.clientWidth;
@@ -6568,7 +6582,7 @@ function Js() {
6568
6582
  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;
6569
6583
  } }, { key: "preloadSlide", value: function(n) {
6570
6584
  var c = this;
6571
- if (n < 0 || n > this.elements.length - 1 || be(this.elements[n])) return !1;
6585
+ if (n < 0 || n > this.elements.length - 1 || ue(this.elements[n])) return !1;
6572
6586
  var l = this.slidesContainer.querySelectorAll(".gslide")[n];
6573
6587
  if (E(l, "loaded")) return !1;
6574
6588
  var d = this.elements[n], h = d.type, m = { index: n, slide: l, slideNode: l, slideConfig: d.slideConfig, slideIndex: n, trigger: d.node, player: null };
@@ -6608,7 +6622,7 @@ function Js() {
6608
6622
  var c = this.slidesContainer && this.slidesContainer.querySelectorAll(".gslide")[n];
6609
6623
  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);
6610
6624
  } }, { key: "slideAnimateIn", value: function(n, c) {
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) };
6625
+ 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: ue(this.prevActiveSlideIndex) ? null : this.elements[this.prevActiveSlideIndex].slideConfig, trigger: ue(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) };
6612
6626
  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() {
6613
6627
  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]);
6614
6628
  }));
@@ -6626,7 +6640,7 @@ function Js() {
6626
6640
  var n = this.prevActiveSlide;
6627
6641
  P(n, this.effectsClasses), _(n, "prev");
6628
6642
  var c = this.settings.slideEffect, l = c !== "none" ? this.settings.cssEfects[c].out : c;
6629
- this.slidePlayerPause(n), this.trigger("slide_before_change", { prev: { index: this.prevActiveSlideIndex, slide: this.prevActiveSlide, slideNode: this.prevActiveSlide, slideIndex: this.prevActiveSlideIndex, 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) }, current: { index: this.index, slide: this.activeSlide, slideNode: this.activeSlide, slideIndex: this.index, slideConfig: this.elements[this.index].slideConfig, trigger: this.elements[this.index].node, player: this.getSlidePlayerInstance(this.index) } }), j(this.settings.beforeSlideChange) && this.settings.beforeSlideChange.apply(this, [{ index: this.prevActiveSlideIndex, slide: this.prevActiveSlide, player: this.getSlidePlayerInstance(this.prevActiveSlideIndex) }, { index: this.index, slide: this.activeSlide, player: this.getSlidePlayerInstance(this.index) }]), this.prevActiveSlideIndex > this.index && this.settings.slideEffect == "slide" && (l = this.settings.cssEfects.slideBack.out), L(n, l, (function() {
6643
+ this.slidePlayerPause(n), this.trigger("slide_before_change", { prev: { index: this.prevActiveSlideIndex, slide: this.prevActiveSlide, slideNode: this.prevActiveSlide, slideIndex: this.prevActiveSlideIndex, slideConfig: ue(this.prevActiveSlideIndex) ? null : this.elements[this.prevActiveSlideIndex].slideConfig, trigger: ue(this.prevActiveSlideIndex) ? null : this.elements[this.prevActiveSlideIndex].node, player: this.getSlidePlayerInstance(this.prevActiveSlideIndex) }, current: { index: this.index, slide: this.activeSlide, slideNode: this.activeSlide, slideIndex: this.index, slideConfig: this.elements[this.index].slideConfig, trigger: this.elements[this.index].node, player: this.getSlidePlayerInstance(this.index) } }), j(this.settings.beforeSlideChange) && this.settings.beforeSlideChange.apply(this, [{ index: this.prevActiveSlideIndex, slide: this.prevActiveSlide, player: this.getSlidePlayerInstance(this.prevActiveSlideIndex) }, { index: this.index, slide: this.activeSlide, player: this.getSlidePlayerInstance(this.index) }]), this.prevActiveSlideIndex > this.index && this.settings.slideEffect == "slide" && (l = this.settings.cssEfects.slideBack.out), L(n, l, (function() {
6630
6644
  var d = n.querySelector(".ginner-container"), h = n.querySelector(".gslide-media"), m = n.querySelector(".gslide-description");
6631
6645
  d.style.transform = "", h.style.transform = "", P(h, "greset"), h.style.opacity = "", m && (m.style.opacity = ""), P(n, "prev");
6632
6646
  }));
@@ -6634,7 +6648,7 @@ function Js() {
6634
6648
  return this.videoPlayers;
6635
6649
  } }, { key: "getSlidePlayerInstance", value: function(n) {
6636
6650
  var c = "gvideo" + n, l = this.getAllPlayers();
6637
- return !(!ie(l, c) || !l[c]) && l[c];
6651
+ return !(!se(l, c) || !l[c]) && l[c];
6638
6652
  } }, { key: "stopSlideVideo", value: function(n) {
6639
6653
  if (U(n)) {
6640
6654
  var c = n.querySelector(".gvideo-wrapper");
@@ -6682,11 +6696,11 @@ function Js() {
6682
6696
  } }, { key: "getElementIndex", value: function(n) {
6683
6697
  var c = !1;
6684
6698
  return v(this.elements, (function(l, d) {
6685
- if (ie(l, "node") && l.node == n) return c = d, !0;
6699
+ if (se(l, "node") && l.node == n) return c = d, !0;
6686
6700
  })), c;
6687
6701
  } }, { key: "getElements", value: function() {
6688
6702
  var n = this, c = [];
6689
- this.elements = this.elements ? this.elements : [], !be(this.settings.elements) && $e(this.settings.elements) && this.settings.elements.length && v(this.settings.elements, (function(d, h) {
6703
+ this.elements = this.elements ? this.elements : [], !ue(this.settings.elements) && $e(this.settings.elements) && this.settings.elements.length && v(this.settings.elements, (function(d, h) {
6690
6704
  var m = new kt(d, n, h), g = m.getConfig(), y = p({}, g);
6691
6705
  y.node = !1, y.index = h, y.instance = m, y.slideConfig = g, c.push(y);
6692
6706
  }));
@@ -6719,7 +6733,7 @@ function Js() {
6719
6733
  v(c, (function(S) {
6720
6734
  S.parentNode == document.body && S.nodeName.charAt(0) !== "#" && S.hasAttribute && !S.hasAttribute("aria-hidden") && (l.push(S), S.setAttribute("aria-hidden", "true"));
6721
6735
  }));
6722
- var d = ie(this.settings.svg, "next") ? this.settings.svg.next : "", h = ie(this.settings.svg, "prev") ? this.settings.svg.prev : "", m = ie(this.settings.svg, "close") ? this.settings.svg.close : "", g = this.settings.lightboxHTML;
6736
+ var d = se(this.settings.svg, "next") ? this.settings.svg.next : "", h = se(this.settings.svg, "prev") ? this.settings.svg.prev : "", m = se(this.settings.svg, "close") ? this.settings.svg.close : "", g = this.settings.lightboxHTML;
6723
6737
  g = X(g = (g = (g = g.replace(/{nextSVG}/g, d)).replace(/{prevSVG}/g, h)).replace(/{closeSVG}/g, m)), document.body.appendChild(g);
6724
6738
  var y = document.getElementById("glightbox-body");
6725
6739
  this.modal = y;
@@ -6751,10 +6765,10 @@ function Js() {
6751
6765
  }
6752
6766
  }
6753
6767
  if (l) {
6754
- var D = ie(this.settings.plyr.config, "ratio") ? this.settings.plyr.config.ratio : "";
6768
+ var D = se(this.settings.plyr.config, "ratio") ? this.settings.plyr.config.ratio : "";
6755
6769
  if (!D) {
6756
- var ee = l.clientWidth, me = l.clientHeight, ue = ee / me;
6757
- D = "".concat(ee / ue, ":").concat(me / ue);
6770
+ var ee = l.clientWidth, me = l.clientHeight, be = ee / me;
6771
+ D = "".concat(ee / be, ":").concat(me / be);
6758
6772
  }
6759
6773
  var Le = D.split(":"), oe = this.settings.videosWidth, Re = this.settings.videosWidth, ze = (Re = xt(oe) || oe.indexOf("px") !== -1 ? parseInt(oe) : oe.indexOf("vw") !== -1 ? m * parseInt(oe) / 100 : oe.indexOf("vh") !== -1 ? g * parseInt(oe) / 100 : oe.indexOf("%") !== -1 ? m * parseInt(oe) / 100 : parseInt(l.clientWidth)) / (parseInt(Le[0]) / parseInt(Le[1]));
6760
6774
  if (ze = Math.floor(ze), y && (g -= h.offsetHeight), Re > m || ze > g || g < ze && m > Re) {
@@ -6770,8 +6784,8 @@ function Js() {
6770
6784
  var n = this.loop();
6771
6785
  P(this.nextButton, "disabled"), P(this.prevButton, "disabled"), this.index == 0 && this.elements.length - 1 == 0 ? (_(this.prevButton, "disabled"), _(this.nextButton, "disabled")) : this.index !== 0 || n ? this.index !== this.elements.length - 1 || n || _(this.nextButton, "disabled") : _(this.prevButton, "disabled");
6772
6786
  } }, { key: "loop", value: function() {
6773
- var n = ie(this.settings, "loopAtEnd") ? this.settings.loopAtEnd : null;
6774
- return n = ie(this.settings, "loop") ? this.settings.loop : n, n;
6787
+ var n = se(this.settings, "loopAtEnd") ? this.settings.loopAtEnd : null;
6788
+ return n = se(this.settings, "loop") ? this.settings.loop : n, n;
6775
6789
  } }, { key: "close", value: function() {
6776
6790
  var n = this;
6777
6791
  if (!this.lightboxOpen) {
@@ -6831,7 +6845,7 @@ var en = Object.getOwnPropertyDescriptor, tn = (a, e, t, i) => {
6831
6845
  };
6832
6846
  let Zt = class extends Fe {
6833
6847
  render() {
6834
- return u` <div class="cb-thinking"><span></span><span></span><span></span></div>`;
6848
+ return b` <div class="cb-thinking"><span></span><span></span><span></span></div>`;
6835
6849
  }
6836
6850
  };
6837
6851
  Zt.styles = K`
@@ -6885,13 +6899,13 @@ let qt = class extends re {
6885
6899
  super(...arguments), this.files = [];
6886
6900
  }
6887
6901
  render() {
6888
- return u` <div class="cb-uploading">
6902
+ return b` <div class="cb-uploading">
6889
6903
  <div class="cb-uploading__title">
6890
6904
  <sl-spinner class="cb-spinner"></sl-spinner>
6891
6905
  <span>Uploading...</span>
6892
6906
  </div>
6893
6907
  <div class="cb-uploading__filelist">
6894
- ${this.files.map((a) => u`${a.name}<br />`)}
6908
+ ${this.files.map((a) => b`${a.name}<br />`)}
6895
6909
  </div>
6896
6910
  </div>`;
6897
6911
  }
@@ -6951,7 +6965,7 @@ let mt = class extends Fe {
6951
6965
  super(...arguments), this.url = "", this.inverse = !1;
6952
6966
  }
6953
6967
  render() {
6954
- return u`
6968
+ return b`
6955
6969
  <a
6956
6970
  class="
6957
6971
  cb-external-link link__item
@@ -7000,7 +7014,7 @@ ca([
7000
7014
  mt = ca([
7001
7015
  J("cb-external-link")
7002
7016
  ], mt);
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>';
7017
+ 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>', un = '<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>', bn = '<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>';
7004
7018
  var pn = Object.defineProperty, gn = Object.getOwnPropertyDescriptor, la = (a, e, t, i) => {
7005
7019
  for (var s = i > 1 ? void 0 : i ? gn(e, t) : e, r = a.length - 1, o; r >= 0; r--)
7006
7020
  (o = a[r]) && (s = (i ? o(e, t, s) : o(s)) || s);
@@ -7012,8 +7026,8 @@ const La = {
7012
7026
  md: dn,
7013
7027
  csv: fn,
7014
7028
  ppd: hn,
7015
- doc: bn,
7016
- docx: un
7029
+ doc: un,
7030
+ docx: bn
7017
7031
  };
7018
7032
  let yt = class extends re {
7019
7033
  constructor() {
@@ -7026,7 +7040,7 @@ let yt = class extends re {
7026
7040
  return e ? e.toLowerCase() : "txt";
7027
7041
  }
7028
7042
  render() {
7029
- return u`
7043
+ return b`
7030
7044
  <cb-external-link url="${this.url}" inverse>
7031
7045
  <div class="cb-file">
7032
7046
  ${this.renderFileIcon()}
@@ -7036,7 +7050,7 @@ let yt = class extends re {
7036
7050
  `;
7037
7051
  }
7038
7052
  renderFileIcon() {
7039
- return u`
7053
+ return b`
7040
7054
  <cb-icon
7041
7055
  class="cb-file-icon"
7042
7056
  svg="${La[this.type] || La.txt}"
@@ -8532,7 +8546,7 @@ function wn() {
8532
8546
  }
8533
8547
  async function Qt(a) {
8534
8548
  const t = wn().render(a);
8535
- return u`${G(t)}`;
8549
+ return b`${G(t)}`;
8536
8550
  }
8537
8551
  var xn = Object.defineProperty, kn = Object.getOwnPropertyDescriptor, nt = (a, e, t, i) => {
8538
8552
  for (var s = i > 1 ? void 0 : i ? kn(e, t) : e, r = a.length - 1, o; r >= 0; r--)
@@ -8541,7 +8555,7 @@ var xn = Object.defineProperty, kn = Object.getOwnPropertyDescriptor, nt = (a, e
8541
8555
  };
8542
8556
  let De = class extends re {
8543
8557
  constructor() {
8544
- super(...arguments), this.store = new it(this, b), this.type = "assistant", this.suppressFeedback = !1, this.lightbox = Qs({
8558
+ super(...arguments), this.store = new it(this, u), this.type = "assistant", this.suppressFeedback = !1, this.lightbox = Qs({
8545
8559
  touchNavigation: !0,
8546
8560
  loop: !0,
8547
8561
  autoplayVideos: !0,
@@ -8625,11 +8639,11 @@ let De = class extends re {
8625
8639
  return this.renderInfoMessage(this.message);
8626
8640
  if (this.message?.type === "blocks") {
8627
8641
  const a = this.message?.data?.blocks ?? [];
8628
- return u`<cb-blocks .blocks=${a}></cb-blocks>`;
8642
+ return b`<cb-blocks .blocks=${a}></cb-blocks>`;
8629
8643
  }
8630
8644
  return W(
8631
8645
  this.message.data || this.message.isThinking,
8632
- () => u`
8646
+ () => b`
8633
8647
  <div class="cb-message-row" part="bot-message">
8634
8648
  <!-- message -->
8635
8649
  ${W(
@@ -8643,7 +8657,7 @@ let De = class extends re {
8643
8657
  );
8644
8658
  }
8645
8659
  renderButtons(a = "left") {
8646
- return u`<div class="cb-message__buttons ${a}">
8660
+ return b`<div class="cb-message__buttons ${a}">
8647
8661
  <!-- delete button -->
8648
8662
  <sl-button class="cb-message__delete-button" name="trash" @click=${this._removeMessageHandler} circle variant="text" size="small">
8649
8663
  <cb-icon svg="${mn}" style="font-size: 1em !important;"></cb-icon>
@@ -8651,7 +8665,7 @@ let De = class extends re {
8651
8665
  </div>`;
8652
8666
  }
8653
8667
  renderInfoMessage(a) {
8654
- return u`
8668
+ return b`
8655
8669
  <div class="cb-message cb-bot-message-wrapper" part="cb-message">
8656
8670
  <div class="avatar info-avatar xsmall" part="info-avatar" style="margin-top:4px;">${this.renderInfoMessageAvatar(a)}</div>
8657
8671
  <div
@@ -8663,7 +8677,7 @@ let De = class extends re {
8663
8677
  >
8664
8678
  <div class="cb-message-text">
8665
8679
  ${Pt(
8666
- this._getMessageText(a).then((e) => u`${e}`)
8680
+ this._getMessageText(a).then((e) => b`${e}`)
8667
8681
  )}
8668
8682
  </div>
8669
8683
  </div>
@@ -8672,10 +8686,10 @@ let De = class extends re {
8672
8686
  }
8673
8687
  renderInfoMessageAvatar(a) {
8674
8688
  const e = a.data?.userAvatar || "";
8675
- return e !== "" ? u` <img src="${e}" style="width: 24px;height: 24px;" /> ` : pe`${G(b.setting.infoIconSvg)}`;
8689
+ return e !== "" ? b` <img src="${e}" style="width: 24px;height: 24px;" /> ` : pe`${G(u.setting.infoIconSvg)}`;
8676
8690
  }
8677
8691
  renderMessage(a, e = "bot-message-content") {
8678
- return u`
8692
+ return b`
8679
8693
  <div
8680
8694
  class="cb-message__content
8681
8695
  ${a.author}-message
@@ -8692,48 +8706,48 @@ let De = class extends re {
8692
8706
  return Qt(Vt(a.data.text));
8693
8707
  }
8694
8708
  renderMessageContent(a) {
8695
- return a.isThinking ? u`<cb-thinking></cb-thinking>` : a.isUploading ? u`<cb-uploading .files="${a.data.files || []}"></cb-uploading>` : a.type === "text" ? u`<div class="cb-message-text">
8709
+ return a.isThinking ? b`<cb-thinking></cb-thinking>` : a.isUploading ? b`<cb-uploading .files="${a.data.files || []}"></cb-uploading>` : a.type === "text" ? b`<div class="cb-message-text">
8696
8710
  ${W(
8697
8711
  a.data.userName,
8698
- () => u`<div class="assistant-message-user-name">${a.data.userName}</div>`,
8712
+ () => b`<div class="assistant-message-user-name">${a.data.userName}</div>`,
8699
8713
  () => null
8700
8714
  )}
8701
8715
  ${Pt(
8702
- this._getMessageText(a).then((e) => u`${e}`)
8716
+ this._getMessageText(a).then((e) => b`${e}`)
8703
8717
  )}
8704
- </div>` : a.type === "file" ? u`${et(
8718
+ </div>` : a.type === "file" ? b`${et(
8705
8719
  a.data.files || [],
8706
8720
  (e) => e.id,
8707
- (e) => u`<cb-file filename="${e.name}" url="${e.url}"></cb-file>`
8708
- )}` : a.type === "upload" ? u`${et(
8721
+ (e) => b`<cb-file filename="${e.name}" url="${e.url}"></cb-file>`
8722
+ )}` : a.type === "upload" ? b`${et(
8709
8723
  a.data.uploadedFiles || [],
8710
8724
  (e) => e.name,
8711
- (e) => u`<div>${e.name}</div>`
8712
- )}` : u`<div class="cb-message-text">
8725
+ (e) => b`<div>${e.name}</div>`
8726
+ )}` : b`<div class="cb-message-text">
8713
8727
  ${Pt(
8714
- Qt(a.data.text?.toString() || "").then((e) => u`${e}`)
8728
+ Qt(a.data.text?.toString() || "").then((e) => b`${e}`)
8715
8729
  )}
8716
8730
  </div>`;
8717
8731
  }
8718
8732
  renderMessageUploads(a) {
8719
8733
  if (a.type === "upload")
8720
- return u`<div class="user-message-uploads">
8734
+ return b`<div class="user-message-uploads">
8721
8735
  ${et(
8722
8736
  a.data.uploadedFiles || [],
8723
8737
  (e) => e.name,
8724
- (e) => (e?.type || "").startsWith("image/") ? u`<img src="data:${e.type};base64,${e.base64}" alt="${e.name}" />` : null
8738
+ (e) => (e?.type || "").startsWith("image/") ? b`<img src="data:${e.type};base64,${e.base64}" alt="${e.name}" />` : null
8725
8739
  )}
8726
8740
  </div>`;
8727
8741
  }
8728
8742
  renderBotMessageAvatar(a) {
8729
8743
  if (a.data.userName && a.data.userName !== "") {
8730
8744
  const e = a.data?.userAvatar || "";
8731
- return e !== "" ? u` <img src="${e}" style="width: 24px;height: 24px;" /> ` : pe`${G(b.setting.agentIconSvg)}`;
8745
+ return e !== "" ? b` <img src="${e}" style="width: 24px;height: 24px;" /> ` : pe`${G(u.setting.agentIconSvg)}`;
8732
8746
  }
8733
- return a.author === "system" ? pe`${G(b.setting.systemIconSvg)}` : pe`${G(b.setting.botIconSvg)}`;
8747
+ return a.author === "system" ? pe`${G(u.setting.systemIconSvg)}` : pe`${G(u.setting.botIconSvg)}`;
8734
8748
  }
8735
8749
  renderBotMessage(a) {
8736
- return u`
8750
+ return b`
8737
8751
  <div class="cb-message cb-bot-message-wrapper" part="cb-message">
8738
8752
  <div class="avatar assistant-avatar xsmall" part="assistant-avatar" style="margin-top:4px;">${this.renderBotMessageAvatar(a)}</div>
8739
8753
  ${this.renderMessage(a, "bot-message-content")}
@@ -8742,7 +8756,7 @@ let De = class extends re {
8742
8756
  `;
8743
8757
  }
8744
8758
  renderBotMessageFeedback(a) {
8745
- return this.suppressFeedback || !b.setting.feedbackEnabled || this.index < b.setting.startFeedbackFromMessage * 2 ? null : u`
8759
+ return this.suppressFeedback || !u.setting.feedbackEnabled || this.index < u.setting.startFeedbackFromMessage * 2 ? null : b`
8746
8760
  <div class="cb-message-feedback-tools" part="feedback-wrapper">
8747
8761
  <div class="cb-message-feedback-icon cb-feedback-up" part="feedback-up" @click="${() => this.startFeedback(!0, a)}">${pe`${G(ai)}`}</div>
8748
8762
  <div class="cb-message-feedback-icon cb-feedback-down" part="feedback-down" @click="${() => this.startFeedback(!1, a)}">${pe`${G(ii)}`}</div>
@@ -8750,24 +8764,24 @@ let De = class extends re {
8750
8764
  `;
8751
8765
  }
8752
8766
  startFeedback(a, e) {
8753
- console.log("startFeedback", e), b.collectFeedback(a, e);
8767
+ console.log("startFeedback", e), u.collectFeedback(a, e);
8754
8768
  }
8755
8769
  renderUserMessage(a) {
8756
- return u`
8770
+ return b`
8757
8771
  <div class="cb-message" part="cb-message" style="display: flex; justify-content: end;align-items: start;">
8758
8772
  <!--<sl-avatar class="avatar user-avatar small" label="User">
8759
8773
  <cb-icon slot="icon" svg="${Ra}" color="white"></cb-icon>
8760
8774
  //appState.appearanceUserMessageAvatarPosition
8761
8775
  </sl-avatar>-->
8762
8776
  ${W(
8763
- b.appearanceUserMessageAvatarPosition === "left",
8764
- () => u`
8765
- <div class="avatar user-avatar" part="user-avatar">${G(b.setting.userIconSvg)}</div>
8777
+ u.appearanceUserMessageAvatarPosition === "left",
8778
+ () => b`
8779
+ <div class="avatar user-avatar" part="user-avatar">${G(u.setting.userIconSvg)}</div>
8766
8780
  ${this.renderMessage(a, "user-message-content")}
8767
8781
  `,
8768
- () => u`
8782
+ () => b`
8769
8783
  ${this.renderMessage(a, "user-message-content")}
8770
- <div class="avatar user-avatar" part="user-avatar">${G(b.setting.userIconSvg)}</div>
8784
+ <div class="avatar user-avatar" part="user-avatar">${G(u.setting.userIconSvg)}</div>
8771
8785
  `
8772
8786
  )}
8773
8787
  </div>
@@ -8776,21 +8790,21 @@ let De = class extends re {
8776
8790
  }
8777
8791
  // todo ???
8778
8792
  renderUserMessageUpload(a) {
8779
- return u`
8793
+ return b`
8780
8794
  <div class="cb-message" part="cb-message" style="display: flex; justify-content: end;align-items: start;">
8781
8795
  <!--<sl-avatar class="avatar user-avatar small" label="User">
8782
8796
  <cb-icon slot="icon" svg="${Ra}" color="white"></cb-icon>
8783
8797
  //appState.appearanceUserMessageAvatarPosition
8784
8798
  </sl-avatar>-->
8785
8799
  ${W(
8786
- b.appearanceUserMessageAvatarPosition === "left",
8787
- () => u`
8788
- <div class="avatar user-avatar">${G(b.setting.userIconSvg)}</div>
8800
+ u.appearanceUserMessageAvatarPosition === "left",
8801
+ () => b`
8802
+ <div class="avatar user-avatar">${G(u.setting.userIconSvg)}</div>
8789
8803
  ${this.renderMessage(a, "user-message-content")}
8790
8804
  `,
8791
- () => u`
8805
+ () => b`
8792
8806
  ${this.renderMessage(a, "user-message-content")}
8793
- <div class="avatar user-avatar">${G(b.setting.userIconSvg)}</div>
8807
+ <div class="avatar user-avatar">${G(u.setting.userIconSvg)}</div>
8794
8808
  `
8795
8809
  )}
8796
8810
  </div>
@@ -8854,13 +8868,13 @@ let ye = class extends re {
8854
8868
  autoplayVideos: true,
8855
8869
  });*/
8856
8870
  render() {
8857
- return u`
8871
+ return b`
8858
8872
  <div id="cb-message-list-container" class="cb-message-list" part="bot-message-list">
8859
8873
  ${this.renderDisclaimerMessage()}
8860
8874
  ${et(
8861
8875
  this.messages,
8862
8876
  (a) => a.id + JSON.stringify(a.data),
8863
- (a, e) => u`<cb-message .message="${a}" .index="${e}" exportparts="bot-message, cb-message, bot-message-content, user-message-content, user-avatar, assistant-avatar,feedback-wrapper,feedback-up,feedback-down" ?suppressFeedback=${this.suppressFeedback}></cb-message>`
8877
+ (a, e) => b`<cb-message .message="${a}" .index="${e}" exportparts="bot-message, cb-message, bot-message-content, user-message-content, user-avatar, assistant-avatar,feedback-wrapper,feedback-up,feedback-down" ?suppressFeedback=${this.suppressFeedback}></cb-message>`
8864
8878
  )}
8865
8879
  ${this.renderActions()} ${this.renderForm()}
8866
8880
  <div id="cb-message-list-bottom-anchor"></div>
@@ -8868,28 +8882,28 @@ let ye = class extends re {
8868
8882
  `;
8869
8883
  }
8870
8884
  renderDisclaimerMessage() {
8871
- return !b.setting.disclaimerMessage || !b.isConversationStart() ? null : u`
8872
- <details class="cb-disclaimer-wrapper" part="disclaimer-wrapper" ?open=${b.setting.enableShowFullDisclaimerMessage}>
8885
+ return !u.setting.disclaimerMessage || !u.isConversationStart() ? null : b`
8886
+ <details class="cb-disclaimer-wrapper" part="disclaimer-wrapper" ?open=${u.setting.enableShowFullDisclaimerMessage}>
8873
8887
  <summary class="cb-disclaimer-message" part="disclaimer-message">
8874
8888
  ${Pt(
8875
- Qt(b.setting.disclaimerMessage).then((a) => u`${a}`)
8889
+ Qt(u.setting.disclaimerMessage).then((a) => b`${a}`)
8876
8890
  )}
8877
8891
  </summary>
8878
8892
  </details>
8879
8893
  `;
8880
8894
  }
8881
8895
  renderForm() {
8882
- return this.form ? u` <form class="cb-input-form" part="form" @submit="${this.handleFormSubmit.bind(this)}">
8896
+ return this.form ? b` <form class="cb-input-form" part="form" @submit="${this.handleFormSubmit.bind(this)}">
8883
8897
  <div class="cb-input-form-title" part="form-title">${this.form.title}</div>
8884
8898
  ${et(
8885
8899
  this.form.fields,
8886
8900
  (a, e) => e,
8887
8901
  (a) => {
8888
- const e = a?.required || !1, t = b.getPrefilledFormFieldValue(a.name);
8902
+ const e = a?.required || !1, t = u.getPrefilledFormFieldValue(a.name);
8889
8903
  switch (a.type) {
8890
8904
  case "name":
8891
8905
  case "string":
8892
- return u`<sl-input
8906
+ return b`<sl-input
8893
8907
  value="${t}"
8894
8908
  part="form-input"
8895
8909
  class="cb-input-form-input"
@@ -8899,7 +8913,7 @@ let ye = class extends re {
8899
8913
  ?required="${e}"
8900
8914
  ></sl-input>`;
8901
8915
  case "email":
8902
- return u`<sl-input
8916
+ return b`<sl-input
8903
8917
  part="form-input"
8904
8918
  value="${t}"
8905
8919
  class="cb-input-form-input"
@@ -8910,7 +8924,7 @@ let ye = class extends re {
8910
8924
  ?required="${e}"
8911
8925
  ></sl-input>`;
8912
8926
  case "phone":
8913
- return u`<sl-input
8927
+ return b`<sl-input
8914
8928
  part="form-input"
8915
8929
  value="${t}"
8916
8930
  class="cb-input-form-input"
@@ -8922,20 +8936,20 @@ let ye = class extends re {
8922
8936
  ></sl-input>`;
8923
8937
  case "select": {
8924
8938
  const i = Array.isArray(a.options) ? a.options : a.options.split(",").map((s) => s.trim());
8925
- return t || i[0], u`<div class="cb-form-field">
8939
+ return t || i[0], b`<div class="cb-form-field">
8926
8940
  <label class="cb-form-field-label"
8927
8941
  >${a.title}
8928
8942
  ${W(
8929
8943
  e,
8930
- () => u`*`,
8931
- () => u``
8944
+ () => b`*`,
8945
+ () => b``
8932
8946
  )}
8933
8947
  </label>
8934
8948
  <select id="${"cb-form-field" + a.name}" class="cb-form-field-select" part="form-input" name="${a.name}">
8935
8949
  ${et(
8936
8950
  i,
8937
8951
  (s, r) => r,
8938
- (s) => u`<option value="${s}">${s}</option>`
8952
+ (s) => b`<option value="${s}">${s}</option>`
8939
8953
  )}
8940
8954
  </select>
8941
8955
  </div>`;
@@ -8960,7 +8974,7 @@ let ye = class extends re {
8960
8974
  return;
8961
8975
  }
8962
8976
  }
8963
- b.submitForm(e).then(() => {
8977
+ u.submitForm(e).then(() => {
8964
8978
  Oe.info("Form submitted", e), this.emit("form:submit", {
8965
8979
  detail: {
8966
8980
  formData: e
@@ -8982,7 +8996,7 @@ let ye = class extends re {
8982
8996
  <br /><br />
8983
8997
  */
8984
8998
  renderActions() {
8985
- return !Array.isArray(this.actions) || this.actions.length <= 0 ? null : u`
8999
+ return !Array.isArray(this.actions) || this.actions.length <= 0 ? null : b`
8986
9000
  <div class="cb-actions-list">
8987
9001
  ${et(
8988
9002
  this.actions,
@@ -9015,7 +9029,7 @@ let ye = class extends re {
9015
9029
  switch (Oe.info("Got Calendly Event:", a.data), a.data.event) {
9016
9030
  case "calendly.event_scheduled": {
9017
9031
  const e = this.activeCalendlyAction;
9018
- e >= 0 && (b.removeAction(e, !0, a.data), b.addSystemMessage("Your meeting has been scheduled!"), this.activeCalendlyAction = -1);
9032
+ e >= 0 && (u.removeAction(e, !0, a.data), u.addSystemMessage("Your meeting has been scheduled!"), this.activeCalendlyAction = -1);
9019
9033
  }
9020
9034
  }
9021
9035
  }
@@ -9036,7 +9050,7 @@ let ye = class extends re {
9036
9050
  s.origin === "https://calendly.com" && s.data.event && s.data.event.indexOf("calendly.") !== -1 && this.handleCalendlyEvent(s);
9037
9051
  }), this.calendlyInjected = !0;
9038
9052
  }
9039
- return u`
9053
+ return b`
9040
9054
  <div class="cb-actions-list">
9041
9055
  <div class="cb-action ripple" @click="${this.invokeCalendlyAction.bind(this, a)}">
9042
9056
  <div class="cb-action-icon">
@@ -9053,7 +9067,7 @@ let ye = class extends re {
9053
9067
  `;
9054
9068
  }
9055
9069
  renderLinkAction(a) {
9056
- return u`
9070
+ return b`
9057
9071
  <div class="cb-actions-list">
9058
9072
  <div class="cb-action ripple" @click="${this.invokeLinkAction.bind(this, a)}">
9059
9073
  <div class="cb-action-icon">
@@ -9076,7 +9090,7 @@ let ye = class extends re {
9076
9090
  const t = document.getElementById("enegelai-bot-hubspot-meeting-container"), i = document.querySelector(".enegelai-bot-hubspot-meeting-widget");
9077
9091
  if (t && i) {
9078
9092
  const s = a.url + "?embed=true";
9079
- i.setAttribute("data-src", s), this.activeHubspotMeetingAction = a.internalId, t.style.display = "block", window.hbspt.meetings.create(".enegelai-bot-hubspot-meeting-widget"), b.updateAction(a, {
9093
+ i.setAttribute("data-src", s), this.activeHubspotMeetingAction = a.internalId, t.style.display = "block", window.hbspt.meetings.create(".enegelai-bot-hubspot-meeting-widget"), u.updateAction(a, {
9080
9094
  triggered: e
9081
9095
  });
9082
9096
  }
@@ -9088,7 +9102,7 @@ let ye = class extends re {
9088
9102
  return;
9089
9103
  const t = this.activeHubspotMeetingAction;
9090
9104
  if (t >= 0) {
9091
- b.removeAction(t, !0, a.data), b.addSystemMessage("Your meeting has been scheduled!"), this.activeHubspotMeetingAction = -1;
9105
+ u.removeAction(t, !0, a.data), u.addSystemMessage("Your meeting has been scheduled!"), this.activeHubspotMeetingAction = -1;
9092
9106
  const i = document.getElementById("enegelai-bot-hubspot-meeting-container");
9093
9107
  i && (i.style.display = "none");
9094
9108
  }
@@ -9119,7 +9133,7 @@ let ye = class extends re {
9119
9133
  }
9120
9134
  return a?.hubspotMeetingAuto && !("triggered" in a) && setTimeout(() => {
9121
9135
  this.invokeHubspotMeetingAction(a);
9122
- }, 500), u`
9136
+ }, 500), b`
9123
9137
  <div class="cb-actions-list">
9124
9138
  <div class="cb-action ripple" @click="${this.invokeHubspotMeetingAction.bind(this, a)}">
9125
9139
  <div class="cb-action-icon">
@@ -9217,7 +9231,7 @@ var An = Object.defineProperty, Mn = Object.getOwnPropertyDescriptor, Ie = (a, e
9217
9231
  };
9218
9232
  let ve = class extends re {
9219
9233
  constructor() {
9220
- super(...arguments), this.store = new it(this, b), this.placeholder = "Type a message...", this.sendButtonLabel = "Send", this.enableFileUpload = !1, this.enableAudio = !1, this.value = "", this.loading = !1, this.disabled = !1, this.currentKey = "";
9234
+ super(...arguments), this.store = new it(this, u), this.placeholder = "Type a message...", this.sendButtonLabel = "Send", this.enableFileUpload = !1, this.enableAudio = !1, this.value = "", this.loading = !1, this.disabled = !1, this.currentKey = "";
9221
9235
  }
9222
9236
  connectedCallback() {
9223
9237
  super.connectedCallback(), addEventListener("form:submit", this._formSubmitHandler.bind(this)), addEventListener("c7o:bot:input:setvalue", this._inputSetValueHandler.bind(this));
@@ -9250,7 +9264,7 @@ let ve = class extends re {
9250
9264
  });
9251
9265
  }
9252
9266
  async _sendFileHandler() {
9253
- const a = await Xa(!1, b.setting.fileUploadEnabledExtensions);
9267
+ const a = await Xa(!1, u.setting.fileUploadEnabledExtensions);
9254
9268
  this.emit("message:send:file", {
9255
9269
  detail: {
9256
9270
  files: a
@@ -9261,11 +9275,11 @@ let ve = class extends re {
9261
9275
  this.emit("audio:toggle", {});
9262
9276
  }
9263
9277
  render() {
9264
- return u`
9278
+ return b`
9265
9279
  ${W(
9266
9280
  this.loading,
9267
- () => u`<sl-progress-bar style="--height: 2px;" indeterminate></sl-progress-bar>`,
9268
- () => u``
9281
+ () => b`<sl-progress-bar style="--height: 2px;" indeterminate></sl-progress-bar>`,
9282
+ () => b``
9269
9283
  )}
9270
9284
  <div class="cb-user-input-wrapper" part="user-input-wrapper">
9271
9285
  <sl-textarea
@@ -9287,38 +9301,38 @@ let ve = class extends re {
9287
9301
  <div class="cb-input-buttons" part="user-input-buttons-wrapper">
9288
9302
  <sl-button @click=${this._sendHandler} name="send" label="Send" size="small" class="send-button" variant="text" ?disabled=${this.value.length === 0} ?loading=${this.loading} circle>
9289
9303
  ${W(
9290
- b.setting.sendIconSvg !== "",
9291
- () => u`<cb-icon part="user-input-send-icon" svg="${b.setting.sendIconSvg}"></cb-icon>`,
9292
- () => u`<cb-icon part="user-input-send-icon" svg="${si}"></cb-icon>`
9304
+ u.setting.sendIconSvg !== "",
9305
+ () => b`<cb-icon part="user-input-send-icon" svg="${u.setting.sendIconSvg}"></cb-icon>`,
9306
+ () => b`<cb-icon part="user-input-send-icon" svg="${si}"></cb-icon>`
9293
9307
  )}
9294
9308
  </sl-button>
9295
9309
  ${W(
9296
9310
  this.enableFileUpload,
9297
- () => u`
9311
+ () => b`
9298
9312
  <sl-button @click=${this._sendFileHandler} name="paperclip" label="Attachment" size="small" class="paperclip-button" variant="text" circle>
9299
9313
  ${W(
9300
- b.setting.attachIconSvg !== "",
9301
- () => u`<cb-icon part="user-input-attach-icon" svg="${b.setting.attachIconSvg}"></cb-icon>`,
9302
- () => u`<cb-icon part="user-input-attach-icon" svg="${ni}"></cb-icon>`
9314
+ u.setting.attachIconSvg !== "",
9315
+ () => b`<cb-icon part="user-input-attach-icon" svg="${u.setting.attachIconSvg}"></cb-icon>`,
9316
+ () => b`<cb-icon part="user-input-attach-icon" svg="${ni}"></cb-icon>`
9303
9317
  )}
9304
9318
  <!-- select file input -->
9305
9319
  <input type="file" id="file" name="file" class="file-input" />
9306
9320
  </sl-button>
9307
9321
  `,
9308
- () => u``
9322
+ () => b``
9309
9323
  )}
9310
9324
  ${W(
9311
9325
  this.enableAudio,
9312
- () => u`
9326
+ () => b`
9313
9327
  <sl-button @click=${this._toggleAudioHandler} name="paperclip" label="Audio" size="small" class="audio-button" variant="text" circle>
9314
9328
  ${W(
9315
- b.webAudioStarted,
9316
- () => u`<cb-icon svg="${da}"></cb-icon>`,
9317
- () => u`<cb-icon svg="${ri}"></cb-icon>`
9329
+ u.webAudioStarted,
9330
+ () => b`<cb-icon svg="${da}"></cb-icon>`,
9331
+ () => b`<cb-icon svg="${ri}"></cb-icon>`
9318
9332
  )}
9319
9333
  </sl-button>
9320
9334
  `,
9321
- () => u``
9335
+ () => b``
9322
9336
  )}
9323
9337
  </div>
9324
9338
  </div>
@@ -9425,7 +9439,7 @@ var $n = Object.defineProperty, Pn = Object.getOwnPropertyDescriptor, Ee = (a, e
9425
9439
  };
9426
9440
  let we = class extends re {
9427
9441
  constructor() {
9428
- super(...arguments), this.store = new it(this, b), this.placeholder = "Type a message...", this.sendButtonLabel = "Send", this.enableFileUpload = !1, this.enableAudio = !1, this.value = "", this.loading = !1, this.disabled = !1, this.currentKey = "";
9442
+ super(...arguments), this.store = new it(this, u), this.placeholder = "Type a message...", this.sendButtonLabel = "Send", this.enableFileUpload = !1, this.enableAudio = !1, this.value = "", this.loading = !1, this.disabled = !1, this.currentKey = "";
9429
9443
  }
9430
9444
  connectedCallback() {
9431
9445
  super.connectedCallback(), addEventListener("form:submit", this._formSubmitHandler.bind(this)), addEventListener("c7o:bot:input:setvalue", this._inputSetValueHandler.bind(this));
@@ -9446,7 +9460,7 @@ let we = class extends re {
9446
9460
  _ctrlHandler() {
9447
9461
  if (this.value && this.value !== "")
9448
9462
  return this._sendHandler();
9449
- if (!b.webAudioStarted)
9463
+ if (!u.webAudioStarted)
9450
9464
  return this._toggleAudioHandler();
9451
9465
  }
9452
9466
  _sendHandler() {
@@ -9464,7 +9478,7 @@ let we = class extends re {
9464
9478
  });
9465
9479
  }
9466
9480
  async _sendFileHandler() {
9467
- const a = await Xa(!1, b.setting.fileUploadEnabledExtensions);
9481
+ const a = await Xa(!1, u.setting.fileUploadEnabledExtensions);
9468
9482
  this.emit("message:send:file", {
9469
9483
  detail: {
9470
9484
  files: a
@@ -9493,31 +9507,31 @@ let we = class extends re {
9493
9507
  }
9494
9508
  }
9495
9509
  async _toggleAudioHandler() {
9496
- await b.toggleAudio();
9510
+ await u.toggleAudio();
9497
9511
  }
9498
9512
  getCtrlIconSvg() {
9499
- return this.value && this.value !== "" || b.webAudioStarted ? Oa : En;
9513
+ return this.value && this.value !== "" || u.webAudioStarted ? Oa : En;
9500
9514
  }
9501
9515
  getCtrlClass() {
9502
- return this.value && this.value !== "" ? "" : b.webAudioStarted || b.mediaStartAudioRequested ? "disabled" : "";
9516
+ return this.value && this.value !== "" ? "" : u.webAudioStarted || u.mediaStartAudioRequested ? "disabled" : "";
9503
9517
  }
9504
9518
  render() {
9505
- return u`
9519
+ return b`
9506
9520
  ${W(
9507
9521
  this.loading,
9508
- () => u`<sl-progress-bar style="--height: 2px;" indeterminate></sl-progress-bar>`,
9509
- () => u``
9522
+ () => b`<sl-progress-bar style="--height: 2px;" indeterminate></sl-progress-bar>`,
9523
+ () => b``
9510
9524
  )}
9511
9525
  <div class="cb-user-input-mm-wrapper" part="user-input-wrapper">
9512
9526
  <div class="cb-user-input-mm" part="user-input-inner">
9513
9527
  ${W(
9514
9528
  this.enableFileUpload,
9515
- () => u`
9529
+ () => b`
9516
9530
  <button type="button" class="circle-btn" part="upload-button" title="Upload" @click=${this._sendFileHandler}>
9517
9531
  ${G(In)}
9518
9532
  </button>
9519
9533
  `,
9520
- () => u``
9534
+ () => b``
9521
9535
  )}
9522
9536
  <sl-textarea
9523
9537
  part="user-input"
@@ -9541,11 +9555,11 @@ let we = class extends re {
9541
9555
  `;
9542
9556
  }
9543
9557
  renderOld() {
9544
- return u`
9558
+ return b`
9545
9559
  ${W(
9546
9560
  this.loading,
9547
- () => u`<sl-progress-bar style="--height: 2px;" indeterminate></sl-progress-bar>`,
9548
- () => u``
9561
+ () => b`<sl-progress-bar style="--height: 2px;" indeterminate></sl-progress-bar>`,
9562
+ () => b``
9549
9563
  )}
9550
9564
  <div class="cb-user-input-mm-wrapper" part="user-input-wrapper">
9551
9565
  <sl-textarea
@@ -9567,38 +9581,38 @@ let we = class extends re {
9567
9581
  <div class="cb-input-buttons" part="user-input-buttons-wrapper">
9568
9582
  <sl-button @click=${this._sendHandler} name="send" label="Send" size="small" class="send-button" variant="text" ?disabled=${this.value.length === 0} ?loading=${this.loading} circle>
9569
9583
  ${W(
9570
- b.setting.sendIconSvg !== "",
9571
- () => u`<cb-icon part="user-input-send-icon" svg="${b.setting.sendIconSvg}"></cb-icon>`,
9572
- () => u`<cb-icon part="user-input-send-icon" svg="${si}"></cb-icon>`
9584
+ u.setting.sendIconSvg !== "",
9585
+ () => b`<cb-icon part="user-input-send-icon" svg="${u.setting.sendIconSvg}"></cb-icon>`,
9586
+ () => b`<cb-icon part="user-input-send-icon" svg="${si}"></cb-icon>`
9573
9587
  )}
9574
9588
  </sl-button>
9575
9589
  ${W(
9576
9590
  this.enableFileUpload,
9577
- () => u`
9591
+ () => b`
9578
9592
  <sl-button @click=${this._sendFileHandler} name="paperclip" label="Attachment" size="small" class="paperclip-button" variant="text" circle>
9579
9593
  ${W(
9580
- b.setting.attachIconSvg !== "",
9581
- () => u`<cb-icon part="user-input-attach-icon" svg="${b.setting.attachIconSvg}"></cb-icon>`,
9582
- () => u`<cb-icon part="user-input-attach-icon" svg="${ni}"></cb-icon>`
9594
+ u.setting.attachIconSvg !== "",
9595
+ () => b`<cb-icon part="user-input-attach-icon" svg="${u.setting.attachIconSvg}"></cb-icon>`,
9596
+ () => b`<cb-icon part="user-input-attach-icon" svg="${ni}"></cb-icon>`
9583
9597
  )}
9584
9598
  <!-- select file input -->
9585
9599
  <input type="file" id="file" name="file" class="file-input" />
9586
9600
  </sl-button>
9587
9601
  `,
9588
- () => u``
9602
+ () => b``
9589
9603
  )}
9590
9604
  ${W(
9591
9605
  this.enableAudio,
9592
- () => u`
9606
+ () => b`
9593
9607
  <sl-button @click=${this._toggleAudioHandler} name="paperclip" label="Audio" size="small" class="audio-button" variant="text" circle>
9594
9608
  ${W(
9595
- b.webAudioStarted,
9596
- () => u`<cb-icon svg="${da}"></cb-icon>`,
9597
- () => u`<cb-icon svg="${ri}"></cb-icon>`
9609
+ u.webAudioStarted,
9610
+ () => b`<cb-icon svg="${da}"></cb-icon>`,
9611
+ () => b`<cb-icon svg="${ri}"></cb-icon>`
9598
9612
  )}
9599
9613
  </sl-button>
9600
9614
  `,
9601
- () => u``
9615
+ () => b``
9602
9616
  )}
9603
9617
  </div>
9604
9618
  </div>
@@ -9687,7 +9701,7 @@ let ct = class extends re {
9687
9701
  this.emit("cancel");
9688
9702
  }
9689
9703
  render() {
9690
- return u` <sl-dialog
9704
+ return b` <sl-dialog
9691
9705
  label="Setting"
9692
9706
  class="cb-dialog"
9693
9707
  style="sl-dialog::part(base) { z-index: ${this.zindex}; }"
@@ -9697,7 +9711,7 @@ let ct = class extends re {
9697
9711
  >
9698
9712
  <header class="cb-header">
9699
9713
  <div class="cb-header__left">
9700
- ${this.label ? u`<span class="title">${this.label}</span>` : ""}
9714
+ ${this.label ? b`<span class="title">${this.label}</span>` : ""}
9701
9715
  </div>
9702
9716
  <sl-button
9703
9717
  @click=${this._settingCancelHandler}
@@ -9746,7 +9760,7 @@ let Dt = class extends re {
9746
9760
  super(...arguments), this.open = !1;
9747
9761
  }
9748
9762
  render() {
9749
- return u` <cb-dialog
9763
+ return b` <cb-dialog
9750
9764
  label="Confirm"
9751
9765
  class="cb-clear-message-dialog"
9752
9766
  ?open=${this.open}
@@ -9859,7 +9873,7 @@ let Xe = class extends re {
9859
9873
  super(...arguments), this.open = !1, this.clearMessageDialogOpen = !1, this.customRequest = !1;
9860
9874
  }
9861
9875
  render() {
9862
- return this.customRequest = this.setting.customRequest, u`
9876
+ return this.customRequest = this.setting.customRequest, b`
9863
9877
  <cb-dialog label="Setting" class="cb-dialog" ?open=${this.open} ?no-header=${!0} @cancel=${this._settingCancelHandler}>
9864
9878
  <form>
9865
9879
  <div class="form-item">
@@ -9923,7 +9937,7 @@ let Xe = class extends re {
9923
9937
  `;
9924
9938
  }
9925
9939
  renderInternalServices() {
9926
- return u`
9940
+ return b`
9927
9941
  <div class="form-item">
9928
9942
  <label class="label">Service</label>
9929
9943
  <sl-radio-group name="openai" value="openai" size="small">
@@ -10113,7 +10127,7 @@ var Hn = Object.defineProperty, Vn = Object.getOwnPropertyDescriptor, li = (a, e
10113
10127
  };
10114
10128
  let Ft = class extends re {
10115
10129
  constructor() {
10116
- super(...arguments), this.store = new it(this, b), this.open = !1;
10130
+ super(...arguments), this.store = new it(this, u), this.open = !1;
10117
10131
  }
10118
10132
  // handler click
10119
10133
  _clickHandler() {
@@ -10125,7 +10139,7 @@ let Ft = class extends re {
10125
10139
  }), this.open = a;
10126
10140
  }
10127
10141
  _engageClickHandler(a) {
10128
- console.log("engage close clicked!"), b.suppressEngagePopup(), a.stopPropagation();
10142
+ console.log("engage close clicked!"), u.suppressEngagePopup(), a.stopPropagation();
10129
10143
  }
10130
10144
  /*
10131
10145
  ${when(
@@ -10136,28 +10150,28 @@ let Ft = class extends re {
10136
10150
  */
10137
10151
  getPopupPlacement() {
10138
10152
  let a = "top-end";
10139
- return a = b.appearanceAnchorPopupPosition, a;
10153
+ return a = u.appearanceAnchorPopupPosition, a;
10140
10154
  }
10141
10155
  getBadgeVariant() {
10142
10156
  let a = "danger";
10143
- return a = b.appearanceAnchorBadgeVariant, a;
10157
+ return a = u.appearanceAnchorBadgeVariant, a;
10144
10158
  }
10145
10159
  renderPopupLogo() {
10146
- return b.setting.popupLogoUrl !== "" ? u`<img class="cb-engage-popup-img" src="${b.setting.popupLogoUrl}" />` : b.setting.popupLogoSvg !== "" ? u`<div class="cb-engage-popup-logo">${pe`${G(b.setting.popupLogoSvg)}`}</div>` : b.setting.logoUrl !== "" ? u`<img class="cb-engage-popup-img" src="${b.setting.logoUrl}" />` : b.setting.logoSvg !== "" ? u`<div class="cb-engage-popup-logo">${pe`${G(b.setting.logoSvg)}`}</div>` : null;
10160
+ return u.setting.popupLogoUrl !== "" ? b`<img class="cb-engage-popup-img" src="${u.setting.popupLogoUrl}" />` : u.setting.popupLogoSvg !== "" ? b`<div class="cb-engage-popup-logo">${pe`${G(u.setting.popupLogoSvg)}`}</div>` : u.setting.logoUrl !== "" ? b`<img class="cb-engage-popup-img" src="${u.setting.logoUrl}" />` : u.setting.logoSvg !== "" ? b`<div class="cb-engage-popup-logo">${pe`${G(u.setting.logoSvg)}`}</div>` : null;
10147
10161
  }
10148
10162
  render() {
10149
- return u`
10163
+ return b`
10150
10164
  <div class="cb-anchor ${this.open ? "open" : ""}" part="anchor" @click=${this._clickHandler.bind(this)}>
10151
- <sl-popup placement="${this.getPopupPlacement()}" distance="16" ?active="${b.engage && !b.open}">
10165
+ <sl-popup placement="${this.getPopupPlacement()}" distance="16" ?active="${u.engage && !u.open}">
10152
10166
  <sl-button slot="anchor" label="Start" size="large" variant="primary" class="anchor-button" circle>
10153
10167
  ${W(
10154
10168
  this.open,
10155
- () => u`<div class="cb-anchor-icon" part="anchor-icon">${pe`${G(b.setting.anchorCloseSvg)}`}</div>`,
10156
- () => u`<div class="cb-anchor-icon" part="anchor-icon">${pe`${G(b.setting.anchorOpenSvg)}`}</div>`
10169
+ () => b`<div class="cb-anchor-icon" part="anchor-icon">${pe`${G(u.setting.anchorCloseSvg)}`}</div>`,
10170
+ () => b`<div class="cb-anchor-icon" part="anchor-icon">${pe`${G(u.setting.anchorOpenSvg)}`}</div>`
10157
10171
  )}
10158
10172
  ${W(
10159
- !this.open && b.unreadMessages > 0,
10160
- () => u`<sl-badge part="anchor-badge" class="cb-anchor-badge" variant="${this.getBadgeVariant()}" pill>${b.unreadMessages}</sl-badge>`,
10173
+ !this.open && u.unreadMessages > 0,
10174
+ () => b`<sl-badge part="anchor-badge" class="cb-anchor-badge" variant="${this.getBadgeVariant()}" pill>${u.unreadMessages}</sl-badge>`,
10161
10175
  () => null
10162
10176
  )}
10163
10177
  </sl-button>
@@ -10165,7 +10179,7 @@ let Ft = class extends re {
10165
10179
  <div class="cb-engage-popup-close" @click=${this._engageClickHandler.bind(this)}>${pe`${G(oi)}`}</div>
10166
10180
  <div class="cb-engage-popup-content">
10167
10181
  ${this.renderPopupLogo()}
10168
- <div>${b.setting.engageMessage}</div>
10182
+ <div>${u.setting.engageMessage}</div>
10169
10183
  </div>
10170
10184
  </div>
10171
10185
  </sl-popup>
@@ -10216,7 +10230,7 @@ let jt = class extends re {
10216
10230
  }
10217
10231
  render() {
10218
10232
  const { variant: a, icon: e } = qa[this.status] || qa.info;
10219
- return u`<cb-icon svg=${e} color="${a}"></cb-icon>`;
10233
+ return b`<cb-icon svg=${e} color="${a}"></cb-icon>`;
10220
10234
  }
10221
10235
  };
10222
10236
  jt.styles = Ga;
@@ -10233,7 +10247,7 @@ var Kn = Object.getOwnPropertyDescriptor, Jn = (a, e, t, i) => {
10233
10247
  };
10234
10248
  let ea = class extends re {
10235
10249
  render() {
10236
- return u` <sl-alert variant="danger" open>
10250
+ return b` <sl-alert variant="danger" open>
10237
10251
  <cb-status-icon status="error" slot="icon"></cb-status-icon>
10238
10252
  Please config openai api key in the settings.
10239
10253
  <span
@@ -10343,7 +10357,7 @@ var Qn = Object.defineProperty, er = Object.getOwnPropertyDescriptor, ft = (a, e
10343
10357
  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>';
10344
10358
  let Ye = class extends re {
10345
10359
  constructor() {
10346
- super(...arguments), this.store = new it(this, b), this.zindex = 100;
10360
+ super(...arguments), this.store = new it(this, u), this.zindex = 100;
10347
10361
  }
10348
10362
  connectedCallback() {
10349
10363
  super.connectedCallback(), Da.info("connectedCallback");
@@ -10356,39 +10370,39 @@ let Ye = class extends re {
10356
10370
  Da.info(`FEEDBACK: stateEvent: ${t}`, e);
10357
10371
  }
10358
10372
  _cancelHandler() {
10359
- b.feedback && (console.log("Feedback dialog cancelled"), b.feedback = !1);
10373
+ u.feedback && (console.log("Feedback dialog cancelled"), u.feedback = !1);
10360
10374
  }
10361
10375
  // todo render empty if feedback is disabled
10362
10376
  render() {
10363
- return u` <sl-dialog ?no-header=${!0} ?open=${b.feedback} @sl-hide=${this._cancelHandler} class="cb-feedback-dialog">
10377
+ return b` <sl-dialog ?no-header=${!0} ?open=${u.feedback} @sl-hide=${this._cancelHandler} class="cb-feedback-dialog">
10364
10378
  <div style="">
10365
10379
  <h2>Please share your feedback</h2>
10366
10380
  <div class="cb-feedback-messages-wrapper">
10367
- <cb-message-list style="width: 50%;" .messages=${b.feedbackMessages} ?suppressFeedback=${!0}></cb-message-list>
10381
+ <cb-message-list style="width: 50%;" .messages=${u.feedbackMessages} ?suppressFeedback=${!0}></cb-message-list>
10368
10382
  </div>
10369
10383
  <div class="cb-feedback-rating-label">Please rate this answer</div>
10370
10384
  <div class="cb-feedback-rating-wrapper">
10371
10385
  <div
10372
10386
  class="cb-feedback-rating-icon"
10373
10387
  @click="${() => {
10374
- b.feedbackScore = 0;
10388
+ u.feedbackScore = 0;
10375
10389
  }}"
10376
10390
  >
10377
10391
  ${pe`${G(ii)}`}
10378
10392
  </div>
10379
- <sl-rating id="cb-feedback-rating-el" class="cb-feedback-rating" @sl-change="${this._ratingChangeHandler}" label="Rating" precision="1" .value=${b.feedbackScore}></sl-rating>
10393
+ <sl-rating id="cb-feedback-rating-el" class="cb-feedback-rating" @sl-change="${this._ratingChangeHandler}" label="Rating" precision="1" .value=${u.feedbackScore}></sl-rating>
10380
10394
  <div
10381
10395
  class="cb-feedback-rating-icon"
10382
10396
  @click="${() => {
10383
- b.feedbackScore = 5;
10397
+ u.feedbackScore = 5;
10384
10398
  }}"
10385
10399
  >
10386
10400
  ${pe`${G(ai)}`}
10387
10401
  </div>
10388
10402
  </div>
10389
10403
  <div style="display: flex">
10390
- <sl-input style="margin-bottom: 4px;width:50%" id="cb-feedback-name-el" placeholder="Your name" value="${b.feedbackName}" size="medium"></sl-input>
10391
- <sl-input type="email" style="margin-bottom: 4px;margin-left: 1px;width:50%" id="cb-feedback-email-el" placeholder="Your email" value="${b.feedbackEmail}" size="medium"></sl-input>
10404
+ <sl-input style="margin-bottom: 4px;width:50%" id="cb-feedback-name-el" placeholder="Your name" value="${u.feedbackName}" size="medium"></sl-input>
10405
+ <sl-input type="email" style="margin-bottom: 4px;margin-left: 1px;width:50%" id="cb-feedback-email-el" placeholder="Your email" value="${u.feedbackEmail}" size="medium"></sl-input>
10392
10406
  </div>
10393
10407
  <sl-textarea id="cb-feedback-comments-el" placeholder="Your comments" size="medium" value="" rows="3"></sl-textarea>
10394
10408
  </div>
@@ -10397,11 +10411,11 @@ let Ye = class extends re {
10397
10411
  </sl-dialog>`;
10398
10412
  }
10399
10413
  _ratingChangeHandler() {
10400
- b.feedbackScore = this._rating.value;
10414
+ u.feedbackScore = this._rating.value;
10401
10415
  }
10402
10416
  async _submitHandler() {
10403
10417
  const a = this._name?.value || "", e = this._email?.value || "", t = Vt(this._comments?.value || "");
10404
- this._comments.value = "", await b.submitFeedback(a, e, t);
10418
+ this._comments.value = "", await u.submitFeedback(a, e, t);
10405
10419
  }
10406
10420
  };
10407
10421
  Ye.styles = Zn;
@@ -10971,11 +10985,11 @@ var or = Object.getOwnPropertyDescriptor, cr = (a, e, t, i) => {
10971
10985
  (o = a[r]) && (s = o(s) || s);
10972
10986
  return s;
10973
10987
  };
10974
- const bt = Ke.noConflict();
10975
- bt.setLevel("info");
10988
+ const ut = Ke.noConflict();
10989
+ ut.setLevel("info");
10976
10990
  let ta = class extends re {
10977
10991
  constructor() {
10978
- super(...arguments), this.store = new it(this, b), this.unsubscribeTypingActive = b.subscribe(
10992
+ super(...arguments), this.store = new it(this, u), this.unsubscribeTypingActive = u.subscribe(
10979
10993
  this._handleTypingActiveChanged.bind(this),
10980
10994
  ["typingActive"]
10981
10995
  ), this.volumeVisualizerRef = ji(), this.volumeVisualizerInitialized = !1;
@@ -11002,16 +11016,16 @@ let ta = class extends re {
11002
11016
  </header>`;
11003
11017
  }*/
11004
11018
  render() {
11005
- return b.webAudioStarted ? u`<div class="cb-audio-controls-wrapper" part="audio-controls-wrapper">
11019
+ return u.webAudioStarted ? b`<div class="cb-audio-controls-wrapper" part="audio-controls-wrapper">
11006
11020
  <div class="cb-audio-controls" part="audio-controls" @click=${this._toggleMute}>
11007
11021
  ${W(
11008
11022
  !0,
11009
- () => u`
11010
- <button type="button" part="${b.webAudioMuted ? "audio-unmute-button" : "audio-mute-button"}" class="circle-btn ${b.webAudioMuted ? "danger" : "clear"}" title="${b.webAudioMuted ? "Unmute" : "Mute"}" @click=${this._toggleMute}>
11023
+ () => b`
11024
+ <button type="button" part="${u.webAudioMuted ? "audio-unmute-button" : "audio-mute-button"}" class="circle-btn ${u.webAudioMuted ? "danger" : "clear"}" title="${u.webAudioMuted ? "Unmute" : "Mute"}" @click=${this._toggleMute}>
11011
11025
  ${G(rr)}
11012
11026
  </button>
11013
11027
  `,
11014
- () => u``
11028
+ () => b``
11015
11029
  )}
11016
11030
  <div class="cb-audio-controls-viz" part="audio-controls-viz">
11017
11031
  ${this.renderVisualizer()}
@@ -11023,21 +11037,21 @@ let ta = class extends re {
11023
11037
  </div>` : null;
11024
11038
  }
11025
11039
  renderVisualizer() {
11026
- switch (b.setting.botAdvancedSettings?.audioVisualizerName || "bars") {
11040
+ switch (u.setting.botAdvancedSettings?.audioVisualizerName || "bars") {
11027
11041
  case "default":
11028
- return u`
11042
+ return b`
11029
11043
  <volume-visualizer ${At(this.volumeVisualizerRef)}></volume-visualizer>
11030
11044
  `;
11031
11045
  case "liquid":
11032
- return u`
11046
+ return b`
11033
11047
  <volume-visualizer-liquid ${At(this.volumeVisualizerRef)}></volume-visualizer-liquid>
11034
11048
  `;
11035
11049
  case "bars":
11036
- return u`
11050
+ return b`
11037
11051
  <volume-visualizer-bars ${At(this.volumeVisualizerRef)}></volume-visualizer-bars>
11038
11052
  `;
11039
11053
  default:
11040
- return u`
11054
+ return b`
11041
11055
  <volume-visualizer ${At(this.volumeVisualizerRef)}></volume-visualizer>
11042
11056
  `;
11043
11057
  }
@@ -11045,8 +11059,8 @@ let ta = class extends re {
11045
11059
  updated(a) {
11046
11060
  if (super.updated(a), this.volumeVisualizerRef.value) {
11047
11061
  if (!this.volumeVisualizerInitialized) {
11048
- const e = this.volumeVisualizerRef.value, t = b.getAudioAnalyzers();
11049
- t && (e.connectAnalyzers(t), bt.info("volumeVisualizerInitialized set to true"), this.volumeVisualizerInitialized = !0);
11062
+ const e = this.volumeVisualizerRef.value, t = u.getAudioAnalyzers();
11063
+ t && (e.connectAnalyzers(t), ut.info("volumeVisualizerInitialized set to true"), this.volumeVisualizerInitialized = !0);
11050
11064
  }
11051
11065
  } else
11052
11066
  this.volumeVisualizerInitialized && (this.volumeVisualizerInitialized = !1);
@@ -11064,13 +11078,13 @@ let ta = class extends re {
11064
11078
  )}
11065
11079
  * */
11066
11080
  async _toggleMute(a) {
11067
- a.stopPropagation(), bt.info("_toggleMute called"), await b.toggleMute(), this.volumeVisualizerRef.value && this.volumeVisualizerRef.value.setMuted(b.webAudioMuted);
11081
+ a.stopPropagation(), ut.info("_toggleMute called"), await u.toggleMute(), this.volumeVisualizerRef.value && this.volumeVisualizerRef.value.setMuted(u.webAudioMuted);
11068
11082
  }
11069
11083
  async _toggleHangup(a) {
11070
- a.stopPropagation(), bt.info("_toggleHangup called"), await b.stopAudio();
11084
+ a.stopPropagation(), ut.info("_toggleHangup called"), await u.stopAudio();
11071
11085
  }
11072
11086
  _handleTypingActiveChanged(a, e, t) {
11073
- b.webAudioStarted && (bt.info(`Typing state changed: ${e}`), this.volumeVisualizerRef.value && this.volumeVisualizerRef.value.setThinking(e));
11087
+ u.webAudioStarted && (ut.info(`Typing state changed: ${e}`), this.volumeVisualizerRef.value && this.volumeVisualizerRef.value.setThinking(e));
11074
11088
  }
11075
11089
  };
11076
11090
  ta.styles = ar;
@@ -11127,7 +11141,7 @@ const ja = (() => {
11127
11141
  throw s;
11128
11142
  }
11129
11143
  return a && !e;
11130
- })(), lr = typeof globalThis.AbortController == "function", bi = typeof globalThis.AbortSignal == "function" && typeof globalThis.AbortSignal.any == "function", dr = typeof globalThis.ReadableStream == "function", fr = typeof globalThis.FormData == "function", ui = ["get", "post", "put", "patch", "head", "delete"], hr = {
11144
+ })(), lr = typeof globalThis.AbortController == "function", ui = typeof globalThis.AbortSignal == "function" && typeof globalThis.AbortSignal.any == "function", dr = typeof globalThis.ReadableStream == "function", fr = typeof globalThis.FormData == "function", bi = ["get", "post", "put", "patch", "head", "delete"], hr = {
11131
11145
  json: "application/json",
11132
11146
  text: "text/*",
11133
11147
  formData: "multipart/form-data",
@@ -11136,14 +11150,14 @@ const ja = (() => {
11136
11150
  // Supported in modern Fetch implementations (for example, browsers and recent Node.js/undici).
11137
11151
  // We still feature-check at runtime before exposing the shortcut.
11138
11152
  bytes: "*/*"
11139
- }, Yt = 2147483647, br = new TextEncoder().encode("------WebKitFormBoundaryaxpyiPgbbPti10Rw").length, pi = Symbol("stop");
11153
+ }, Yt = 2147483647, ur = new TextEncoder().encode("------WebKitFormBoundaryaxpyiPgbbPti10Rw").length, pi = Symbol("stop");
11140
11154
  class gi {
11141
11155
  options;
11142
11156
  constructor(e) {
11143
11157
  this.options = e;
11144
11158
  }
11145
11159
  }
11146
- const ur = (a) => new gi(a), pr = {
11160
+ const br = (a) => new gi(a), pr = {
11147
11161
  json: !0,
11148
11162
  parseJson: !0,
11149
11163
  stringifyJson: !0,
@@ -11181,7 +11195,7 @@ const ur = (a) => new gi(a), pr = {
11181
11195
  if (a instanceof FormData) {
11182
11196
  let e = 0;
11183
11197
  for (const [t, i] of a)
11184
- e += br, e += new TextEncoder().encode(`Content-Disposition: form-data; name="${t}"`).length, e += typeof i == "string" ? new TextEncoder().encode(i).length : i.size;
11198
+ e += ur, e += new TextEncoder().encode(`Content-Disposition: form-data; name="${t}"`).length, e += typeof i == "string" ? new TextEncoder().encode(i).length : i.size;
11185
11199
  return e;
11186
11200
  }
11187
11201
  if (a instanceof Blob)
@@ -11311,8 +11325,8 @@ const vi = (a = {}, e = {}) => ({
11311
11325
  }
11312
11326
  Qe(o.hooks) && (i = vi(i, o.hooks), e.hooks = i), Qe(o.headers) && (t = yi(t, o.headers), e.headers = t);
11313
11327
  }
11314
- return s !== void 0 && (e.searchParams = s), r.length > 0 && (r.length === 1 ? e.signal = r[0] : bi ? e.signal = AbortSignal.any(r) : e.signal = r.at(-1)), e.context === void 0 && (e.context = {}), e;
11315
- }, kr = (a) => ui.includes(a) ? a.toUpperCase() : a, _r = ["get", "put", "head", "delete", "options", "trace"], Sr = [408, 413, 429, 500, 502, 503, 504], Cr = [413, 429, 503], Ha = {
11328
+ return s !== void 0 && (e.searchParams = s), r.length > 0 && (r.length === 1 ? e.signal = r[0] : ui ? e.signal = AbortSignal.any(r) : e.signal = r.at(-1)), e.context === void 0 && (e.context = {}), e;
11329
+ }, kr = (a) => bi.includes(a) ? a.toUpperCase() : a, _r = ["get", "put", "head", "delete", "options", "trace"], Sr = [408, 413, 429, 500, 502, 503, 504], Cr = [413, 429, 503], Ha = {
11316
11330
  limit: 2,
11317
11331
  methods: _r,
11318
11332
  statusCodes: Sr,
@@ -11424,7 +11438,7 @@ class vt {
11424
11438
  return r;
11425
11439
  }
11426
11440
  // eslint-disable-next-line unicorn/prevent-abbreviations
11427
- static #b(e) {
11441
+ static #u(e) {
11428
11442
  return e && typeof e == "object" && !Array.isArray(e) && !(e instanceof URLSearchParams) ? Object.fromEntries(Object.entries(e).filter(([, t]) => t !== void 0)) : e;
11429
11443
  }
11430
11444
  request;
@@ -11462,10 +11476,10 @@ class vt {
11462
11476
  throw new Error("`input` must not begin with a slash when using `prefixUrl`");
11463
11477
  this.#e.prefixUrl.endsWith("/") || (this.#e.prefixUrl += "/"), this.#t = this.#e.prefixUrl + this.#t;
11464
11478
  }
11465
- lr && bi && (this.#s = this.#e.signal ?? this.#t.signal, this.#i = new globalThis.AbortController(), this.#e.signal = this.#s ? AbortSignal.any([this.#s, this.#i.signal]) : this.#i.signal), ja && (this.#e.duplex = "half"), this.#e.json !== void 0 && (this.#e.body = this.#e.stringifyJson?.(this.#e.json) ?? JSON.stringify(this.#e.json), this.#e.headers.set("content-type", this.#e.headers.get("content-type") ?? "application/json"));
11479
+ lr && ui && (this.#s = this.#e.signal ?? this.#t.signal, this.#i = new globalThis.AbortController(), this.#e.signal = this.#s ? AbortSignal.any([this.#s, this.#i.signal]) : this.#i.signal), ja && (this.#e.duplex = "half"), this.#e.json !== void 0 && (this.#e.body = this.#e.stringifyJson?.(this.#e.json) ?? JSON.stringify(this.#e.json), this.#e.headers.set("content-type", this.#e.headers.get("content-type") ?? "application/json"));
11466
11480
  const i = t.headers && new globalThis.Headers(t.headers).has("content-type");
11467
11481
  if (this.#t instanceof globalThis.Request && (fr && this.#e.body instanceof globalThis.FormData || this.#e.body instanceof URLSearchParams) && !i && this.#e.headers.delete("content-type"), this.request = new globalThis.Request(this.#t, this.#e), Er(this.#e.searchParams)) {
11468
- const r = "?" + (typeof this.#e.searchParams == "string" ? this.#e.searchParams.replace(/^\?/, "") : new URLSearchParams(vt.#b(this.#e.searchParams)).toString()), o = this.request.url.replace(/(?:\?.*?)?(?=#|$)/, r);
11482
+ const r = "?" + (typeof this.#e.searchParams == "string" ? this.#e.searchParams.replace(/^\?/, "") : new URLSearchParams(vt.#u(this.#e.searchParams)).toString()), o = this.request.url.replace(/(?:\?.*?)?(?=#|$)/, r);
11469
11483
  this.request = new globalThis.Request(o, this.#e);
11470
11484
  }
11471
11485
  if (this.#e.onUploadProgress) {
@@ -11481,7 +11495,7 @@ class vt {
11481
11495
  let t = e;
11482
11496
  return this.#e.retry.jitter === !0 ? t = Math.random() * e : typeof this.#e.retry.jitter == "function" && (t = this.#e.retry.jitter(e), (!Number.isFinite(t) || t < 0) && (t = e)), Math.min(this.#e.retry.backoffLimit, t);
11483
11497
  }
11484
- async #u(e) {
11498
+ async #b(e) {
11485
11499
  if (this.#a++, this.#a > this.#e.retry.limit)
11486
11500
  throw e;
11487
11501
  const t = e instanceof Error ? e : new hi(e);
@@ -11520,7 +11534,7 @@ class vt {
11520
11534
  try {
11521
11535
  return await e();
11522
11536
  } catch (t) {
11523
- const i = Math.min(await this.#u(t), Yt);
11537
+ const i = Math.min(await this.#b(t), Yt);
11524
11538
  if (this.#a < 1)
11525
11539
  throw t;
11526
11540
  if (await Tr(i, this.#s ? { signal: this.#s } : {}), t instanceof Xt && t.customRequest) {
@@ -11576,9 +11590,9 @@ class vt {
11576
11590
  }
11577
11591
  const sa = (a) => {
11578
11592
  const e = (t, i) => vt.create(t, Et(a, i));
11579
- for (const t of ui)
11593
+ for (const t of bi)
11580
11594
  e[t] = (i, s) => vt.create(i, Et(a, s, { method: t }));
11581
- return e.create = (t) => sa(Et(t)), e.extend = (t) => (typeof t == "function" && (t = t(a ?? {})), sa(Et(a, t))), e.stop = pi, e.retry = ur, e;
11595
+ return e.create = (t) => sa(Et(t)), e.extend = (t) => (typeof t == "function" && (t = t(a ?? {})), sa(Et(a, t))), e.stop = pi, e.retry = br, e;
11582
11596
  }, Lr = sa();
11583
11597
  Lr.extend({
11584
11598
  hooks: {
@@ -11622,7 +11636,7 @@ function Br() {
11622
11636
  }
11623
11637
  let F = class extends re {
11624
11638
  constructor() {
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">
11639
+ super(...arguments), this.store = new it(this, u), 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">
11626
11640
  <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;"/>
11627
11641
  </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">
11628
11642
  <g clip-path="url(#clip0_830_884)">
@@ -11649,13 +11663,13 @@ let F = class extends re {
11649
11663
  }, this.handleFormSubmitEvent = (a) => {
11650
11664
  this._formSubmitHandler(a);
11651
11665
  }, this.boundScrollToBottomOnUpdate = this._scrollToBottomOnUpdate.bind(this), this.handleVisibilityChange = () => {
11652
- b.handleLifecycleResume("visibilitychange", this.boundScrollToBottomOnUpdate);
11666
+ u.handleLifecycleResume("visibilitychange", this.boundScrollToBottomOnUpdate);
11653
11667
  }, this.handlePageShow = () => {
11654
- b.handleLifecycleResume("pageshow", this.boundScrollToBottomOnUpdate);
11668
+ u.handleLifecycleResume("pageshow", this.boundScrollToBottomOnUpdate);
11655
11669
  }, this.handleWindowFocus = () => {
11656
- b.handleLifecycleResume("focus", this.boundScrollToBottomOnUpdate);
11670
+ u.handleLifecycleResume("focus", this.boundScrollToBottomOnUpdate);
11657
11671
  }, this.handleWindowOnline = () => {
11658
- b.handleLifecycleResume("online", this.boundScrollToBottomOnUpdate);
11672
+ u.handleLifecycleResume("online", this.boundScrollToBottomOnUpdate);
11659
11673
  }, this.fetchStream = Rr;
11660
11674
  }
11661
11675
  /**
@@ -11671,10 +11685,10 @@ let F = class extends re {
11671
11685
  isThinking: !0,
11672
11686
  data: {}
11673
11687
  };
11674
- return b.addMessage(a), a;
11688
+ return u.addMessage(a), a;
11675
11689
  }
11676
11690
  addTestMessageRaw(a) {
11677
- b.addMessage(a);
11691
+ u.addMessage(a);
11678
11692
  }
11679
11693
  addTestMessage(a = "") {
11680
11694
  const t = {
@@ -11685,58 +11699,58 @@ let F = class extends re {
11685
11699
  text: a !== "" ? a : "Long text.The element may not be scrolled completely to the top or bottom depending on the layout of other elements.The element may not be scrolled completely to the top or bottom depending on the layout of other elements."
11686
11700
  }
11687
11701
  };
11688
- return b.addMessage(t), t;
11702
+ return u.addMessage(t), t;
11689
11703
  }
11690
11704
  addActions(a = []) {
11691
- b.addActions(a);
11705
+ u.addActions(a);
11692
11706
  }
11693
11707
  render() {
11694
- return b.disabled && !this.alwaysOpen ? (Be.info("Bot is disabled until settings are loaded"), null) : u`
11695
- <div class="cb-wrapper${b.open ? " cb-open" : ""}" part="wrapper${b.open ? " open" : ""}" exportparts="new-conversation-wrapper new-conversation-button wrapper${b.open ? " open" : ""}">
11708
+ return u.disabled && !this.alwaysOpen ? (Be.info("Bot is disabled until settings are loaded"), null) : b`
11709
+ <div class="cb-wrapper${u.open ? " cb-open" : ""}" part="wrapper${u.open ? " open" : ""}" exportparts="new-conversation-wrapper new-conversation-button wrapper${u.open ? " open" : ""}">
11696
11710
  <cb-header title="${this.name}" exportparts="header, header-logo, header-title, header-close"></cb-header>
11697
11711
  <cb-message-list
11698
- .messages=${b.messages}
11699
- .actions=${b.actions}
11700
- .form=${b.form}
11712
+ .messages=${u.messages}
11713
+ .actions=${u.actions}
11714
+ .form=${u.form}
11701
11715
  exportparts="bot-message-list, disclaimer-message, bot-message, cb-message, bot-message-content, user-message-content, user-avatar, assistant-avatar, feedback-wrapper,feedback-up,feedback-down,form, form-title, form-input, form-submit"
11702
11716
  ></cb-message-list>
11703
11717
  ${W(
11704
- b.showNewConversation,
11705
- () => u`
11718
+ u.showNewConversation,
11719
+ () => b`
11706
11720
  <div class="cb-new-conversation-wrapper" part="new-conversation-wrapper">
11707
11721
  <button type="button" class="card-btn info" part="new-conversation-button" @click=${this.clearConversation}>Start New Conversation</button>
11708
11722
  </div>
11709
11723
  `,
11710
- () => u``
11724
+ () => b``
11711
11725
  )}
11712
11726
  <cb-audio-controls exportparts="audio-controls-wrapper, audio-controls, audio-mute-button, audio-unmute-button, audio-end-button, audio-controls-viz"></cb-audio-controls>
11713
11727
  ${this.renderUserInput()} ${this.renderFeedbackDialog()}
11714
11728
  </div>
11715
- <cb-anchor ?open=${b.open} exportparts="anchor, anchor-badge, anchor-icon"></cb-anchor>
11729
+ <cb-anchor ?open=${u.open} exportparts="anchor, anchor-badge, anchor-icon"></cb-anchor>
11716
11730
  `;
11717
11731
  }
11718
11732
  renderFeedbackDialog() {
11719
- return u`<cb-dialog-feedback></cb-dialog-feedback>`;
11733
+ return b`<cb-dialog-feedback></cb-dialog-feedback>`;
11720
11734
  }
11721
11735
  _dialogCancelHandler() {
11722
- console.log("Feedback dialog cancelled"), b.feedback = !1;
11736
+ console.log("Feedback dialog cancelled"), u.feedback = !1;
11723
11737
  }
11724
11738
  renderUserInput() {
11725
- return b.form || b.disabled && this.alwaysOpen ? null : b.setting.enableAudio ? u`
11739
+ return u.form || u.disabled && this.alwaysOpen ? null : u.setting.enableAudio ? b`
11726
11740
  <cb-user-input-mm
11727
11741
  part="user-input-control"
11728
- ?loading=${b.connecting}
11729
- ?disabled=${b.connecting || b.form}
11730
- ?enable-file-upload=${b.setting.uploadImages && b.connected}
11731
- ?enable-audio=${b.setting.enableAudio && b.connected}
11742
+ ?loading=${u.connecting}
11743
+ ?disabled=${u.connecting || u.form}
11744
+ ?enable-file-upload=${u.setting.uploadImages && u.connected}
11745
+ ?enable-audio=${u.setting.enableAudio && u.connected}
11732
11746
  exportparts="user-input-control,user-input, user-input-wrapper, user-input-inner, user-input-base, upload-button, control-button, user-input-textarea, user-input-buttons-wrapper, user-input-send-icon, user-input-attach-icon"
11733
- ></cb-user-input-mm>` : u`
11747
+ ></cb-user-input-mm>` : b`
11734
11748
  <cb-user-input
11735
11749
  part="user-input-control"
11736
- ?loading=${b.connecting}
11737
- ?disabled=${b.connecting || b.form}
11738
- ?enable-file-upload=${b.setting.uploadImages && b.connected}
11739
- ?enable-audio=${b.setting.enableAudio && b.connected}
11750
+ ?loading=${u.connecting}
11751
+ ?disabled=${u.connecting || u.form}
11752
+ ?enable-file-upload=${u.setting.uploadImages && u.connected}
11753
+ ?enable-audio=${u.setting.enableAudio && u.connected}
11740
11754
  exportparts="user-input-control,user-input, user-input-wrapper, user-input-base, user-input-textarea, user-input-buttons-wrapper, user-input-send-icon, user-input-attach-icon"
11741
11755
  ></cb-user-input>`;
11742
11756
  }
@@ -11750,7 +11764,7 @@ let F = class extends re {
11750
11764
  // Extract css variables that control the appearance of the chatbot
11751
11765
  initCssVariables() {
11752
11766
  let a = getComputedStyle(this);
11753
- b.appearanceAnchorPopupPosition = this.extractCssVariable(a, "--enegelai-bot-anchor-popup-position", "top-end"), b.appearanceAnchorBadgeVariant = this.extractCssVariable(a, "--enegelai-bot-anchor-badge-variant", b.appearanceAnchorBadgeVariant), b.appearanceUserMessageAvatarPosition = this.extractCssVariable(a, "--enegelai-bot-user-message-avatar-position", "left");
11767
+ u.appearanceAnchorPopupPosition = this.extractCssVariable(a, "--enegelai-bot-anchor-popup-position", "top-end"), u.appearanceAnchorBadgeVariant = this.extractCssVariable(a, "--enegelai-bot-anchor-badge-variant", u.appearanceAnchorBadgeVariant), u.appearanceUserMessageAvatarPosition = this.extractCssVariable(a, "--enegelai-bot-user-message-avatar-position", "left");
11754
11768
  }
11755
11769
  /*
11756
11770
  private getPopupPlacement() {
@@ -11792,34 +11806,34 @@ let F = class extends re {
11792
11806
  // initialize setting
11793
11807
  _initSetting() {
11794
11808
  Be.info("_initSetting");
11795
- const a = b.setting;
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);
11809
+ const a = u.setting;
11810
+ 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, u.setSetting(a);
11797
11811
  let e = {};
11798
11812
  try {
11799
11813
  e = JSON.parse(this.prefilledFormFields);
11800
11814
  } catch (t) {
11801
11815
  Be.error(`Failed to parse prefilled-form-fields attribute value, error: ${t?.message || ""}`), e = {};
11802
11816
  }
11803
- b.setPrefilledFormFields(e), this.open && (b.open = !0), this.alwaysOpen && (b.open = !0, b.alwaysOpen = !0);
11817
+ u.setPrefilledFormFields(e), this.open && (u.open = !0), this.alwaysOpen && (u.open = !0, u.alwaysOpen = !0);
11804
11818
  }
11805
11819
  setLoading(a) {
11806
11820
  this.loading = a;
11807
11821
  }
11808
11822
  clearConversation() {
11809
- b.clearConversation().catch((a) => {
11823
+ u.clearConversation().catch((a) => {
11810
11824
  });
11811
11825
  }
11812
11826
  setPrefilledFormFields(a) {
11813
- b.setPrefilledFormFields(a);
11827
+ u.setPrefilledFormFields(a);
11814
11828
  }
11815
11829
  setOpen(a = !1) {
11816
- b.open = a;
11830
+ u.open = a;
11817
11831
  }
11818
11832
  getOpen() {
11819
- return b.open;
11833
+ return u.open;
11820
11834
  }
11821
11835
  toggleOpen() {
11822
- b.open = !b.open;
11836
+ u.open = !u.open;
11823
11837
  }
11824
11838
  setInputValue(a = "") {
11825
11839
  this.emitExt("c7o:bot:input:setvalue", {
@@ -11832,15 +11846,15 @@ let F = class extends re {
11832
11846
  // It can be any data related with current user / current conversation,
11833
11847
  // for example, user profile, current product user is viewing on the web page, etc.
11834
11848
  setContext(a = {}) {
11835
- b.setContext(a).catch((e) => {
11849
+ u.setContext(a).catch((e) => {
11836
11850
  Be.error(`Failed to set context, error: ${e?.message || ""}`);
11837
11851
  });
11838
11852
  }
11839
11853
  getContext() {
11840
- return b.getContext();
11854
+ return u.getContext();
11841
11855
  }
11842
11856
  clearContext() {
11843
- return b.clearContext();
11857
+ return u.clearContext();
11844
11858
  }
11845
11859
  // check auth
11846
11860
  _checkAuth() {
@@ -11897,11 +11911,11 @@ let F = class extends re {
11897
11911
  }
11898
11912
  // [sv2] for testing only
11899
11913
  processAgentConnected(a) {
11900
- b.handleAgentConnected(a).catch((e) => {
11914
+ u.handleAgentConnected(a).catch((e) => {
11901
11915
  });
11902
11916
  }
11903
11917
  processAgentDisconnected(a) {
11904
- b.handleAgentDisconnected(a).catch((e) => {
11918
+ u.handleAgentDisconnected(a).catch((e) => {
11905
11919
  });
11906
11920
  }
11907
11921
  _processSendMessage(a) {
@@ -11909,9 +11923,9 @@ let F = class extends re {
11909
11923
  console.log("_processSendMessage: input text is empty, ignored", a);
11910
11924
  return;
11911
11925
  }
11912
- a.data.text = Vt(a.data.text.trim()), b.isConversationStart() && (console.log("Start of conversation detected, emitting c7o:bot:conversationStart", a), a.conversationId = b.conversationId, this.emitExt("c7o:bot:conversationStart", {
11926
+ a.data.text = Vt(a.data.text.trim()), u.isConversationStart() && (console.log("Start of conversation detected, emitting c7o:bot:conversationStart", a), a.conversationId = u.conversationId, this.emitExt("c7o:bot:conversationStart", {
11913
11927
  detail: a
11914
- })), b.sendMessage(a), setTimeout(() => {
11928
+ })), u.sendMessage(a), setTimeout(() => {
11915
11929
  this._scrollToBottom();
11916
11930
  }, 50);
11917
11931
  }
@@ -11926,27 +11940,27 @@ let F = class extends re {
11926
11940
  }
11927
11941
  _chatbotToggleHandler(a) {
11928
11942
  const e = a.detail;
11929
- b.open = e.open, b.notifyWidgetOpenState(), this.emitExt(e.open ? "c7o:bot:open" : "c7o:bot:close"), b.unreadMessages = 0, b.suppressEngagePopup();
11943
+ u.open = e.open, u.notifyWidgetOpenState(), this.emitExt(e.open ? "c7o:bot:open" : "c7o:bot:close"), u.unreadMessages = 0, u.suppressEngagePopup();
11930
11944
  }
11931
11945
  _deleteMessageHandler(a) {
11932
11946
  const e = a.detail;
11933
- b.removeMessage(e.id);
11947
+ u.removeMessage(e.id);
11934
11948
  }
11935
11949
  async _uploadFileHandler(a) {
11936
11950
  const e = a.detail;
11937
- await b.uploadFiles(e.files);
11951
+ await u.uploadFiles(e.files);
11938
11952
  }
11939
11953
  async _audioToggleHandler(a) {
11940
- Be.info("_audioToggleHandler called"), await b.toggleAudio();
11954
+ Be.info("_audioToggleHandler called"), await u.toggleAudio();
11941
11955
  }
11942
11956
  // setting confirm handler
11943
11957
  _settingConfirmHandler(a) {
11944
11958
  const e = a.detail;
11945
- b.setSetting(e.setting), this.showSetting = !1, this._checkAuth();
11959
+ u.setSetting(e.setting), this.showSetting = !1, this._checkAuth();
11946
11960
  }
11947
11961
  _formSubmitHandler(a) {
11948
11962
  const e = a.detail;
11949
- e.conversationId = b.conversationId, this.emitExt("c7o:bot:formSubmit", {
11963
+ e.conversationId = u.conversationId, this.emitExt("c7o:bot:formSubmit", {
11950
11964
  detail: e
11951
11965
  });
11952
11966
  }