@enegelai/bot-widget 1.4.11 → 1.5.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,10 +1,10 @@
1
- var Ea = Object.defineProperty;
2
- var Ma = (a, t, c) => t in a ? Ea(a, t, { enumerable: !0, configurable: !0, writable: !0, value: c }) : a[t] = c;
3
- var se = (a, t, c) => (Ma(a, typeof t != "symbol" ? t + "" : t, c), c);
1
+ var Ma = Object.defineProperty;
2
+ var Ea = (a, t, c) => t in a ? Ma(a, t, { enumerable: !0, configurable: !0, writable: !0, value: c }) : a[t] = c;
3
+ var se = (a, t, c) => (Ea(a, typeof t != "symbol" ? t + "" : t, c), c);
4
4
  import { css as U, LitElement as rt, html as w, svg as He } from "lit";
5
- import { property as C, customElement as Y, queryAll as Nt, query as De, eventOptions as xt } from "lit/decorators.js";
5
+ import { property as k, customElement as Y, queryAll as Nt, query as De, eventOptions as xt } from "lit/decorators.js";
6
6
  import { unsafeHTML as ke } from "lit-html/directives/unsafe-html.js";
7
- import { when as ue } from "lit/directives/when.js";
7
+ import { when as ge } from "lit/directives/when.js";
8
8
  import "@shoelace-style/shoelace/dist/themes/light.css";
9
9
  import "@shoelace-style/shoelace/dist/themes/dark.css";
10
10
  import "@shoelace-style/shoelace/dist/components/button/button.js";
@@ -90,8 +90,8 @@ class Ke extends EventTarget {
90
90
  return this[i];
91
91
  },
92
92
  set(b) {
93
- const x = this[c];
94
- this[i] = b, f(b, x) === !0 && this.dispatchStateEvent(c, b, this);
93
+ const C = this[c];
94
+ this[i] = b, f(b, C) === !0 && this.dispatchStateEvent(c, b, this);
95
95
  },
96
96
  configurable: !0,
97
97
  enumerable: !0
@@ -150,8 +150,8 @@ const Yt = ({ finisher: a, descriptor: t }) => (c, i) => {
150
150
  var n;
151
151
  if (i === void 0) {
152
152
  const f = (n = c.originalKey) !== null && n !== void 0 ? n : c.key, b = t != null ? { kind: "method", placement: "prototype", key: f, descriptor: t(c.key) } : { ...c, key: f };
153
- return a != null && (b.finisher = function(x) {
154
- a(x, f);
153
+ return a != null && (b.finisher = function(C) {
154
+ a(C, f);
155
155
  }), b;
156
156
  }
157
157
  {
@@ -182,7 +182,7 @@ new URL(window.location.href);
182
182
  const ja = {
183
183
  prefix: "_ls"
184
184
  };
185
- function pe(a) {
185
+ function he(a) {
186
186
  return a = { ...ja, ...a }, Yt({
187
187
  // @ts-ignore ctor is typof State and not typeof ReactiveElement
188
188
  finisher: (t, c) => {
@@ -194,10 +194,10 @@ function pe(a) {
194
194
  const L = f.initialValue;
195
195
  f.initialValue = () => La(localStorage.getItem(n), b) ?? Ut(L), t.propertyMap.set(c, { ...f, ...a });
196
196
  }
197
- const x = i == null ? void 0 : i.set, V = {
197
+ const C = i == null ? void 0 : i.set, V = {
198
198
  ...i,
199
199
  set: function(L) {
200
- L !== void 0 && localStorage.setItem(n, b === Object || b === Array ? JSON.stringify(L) : L), x && x.call(this, L);
200
+ L !== void 0 && localStorage.setItem(n, b === Object || b === Array ? JSON.stringify(L) : L), C && C.call(this, L);
201
201
  }
202
202
  };
203
203
  Object.defineProperty(t.prototype, c, V);
@@ -221,44 +221,44 @@ var Gt = { exports: {} };
221
221
  "warn",
222
222
  "error"
223
223
  ];
224
- function f(M, P) {
225
- var D = M[P];
224
+ function f(E, z) {
225
+ var D = E[z];
226
226
  if (typeof D.bind == "function")
227
- return D.bind(M);
227
+ return D.bind(E);
228
228
  try {
229
- return Function.prototype.bind.call(D, M);
229
+ return Function.prototype.bind.call(D, E);
230
230
  } catch {
231
231
  return function() {
232
- return Function.prototype.apply.apply(D, [M, arguments]);
232
+ return Function.prototype.apply.apply(D, [E, arguments]);
233
233
  };
234
234
  }
235
235
  }
236
236
  function b() {
237
237
  console.log && (console.log.apply ? console.log.apply(console, arguments) : Function.prototype.apply.apply(console.log, [console, arguments])), console.trace && console.trace();
238
238
  }
239
- function x(M) {
240
- return M === "debug" && (M = "log"), typeof console === c ? !1 : M === "trace" && i ? b : console[M] !== void 0 ? f(console, M) : console.log !== void 0 ? f(console, "log") : t;
239
+ function C(E) {
240
+ return E === "debug" && (E = "log"), typeof console === c ? !1 : E === "trace" && i ? b : console[E] !== void 0 ? f(console, E) : console.log !== void 0 ? f(console, "log") : t;
241
241
  }
242
- function S(M, P) {
242
+ function S(E, z) {
243
243
  for (var D = 0; D < n.length; D++) {
244
244
  var $ = n[D];
245
- this[$] = D < M ? t : this.methodFactory($, M, P);
245
+ this[$] = D < E ? t : this.methodFactory($, E, z);
246
246
  }
247
247
  this.log = this.debug;
248
248
  }
249
- function V(M, P, D) {
249
+ function V(E, z, D) {
250
250
  return function() {
251
- typeof console !== c && (S.call(this, P, D), this[M].apply(this, arguments));
251
+ typeof console !== c && (S.call(this, z, D), this[E].apply(this, arguments));
252
252
  };
253
253
  }
254
- function L(M, P, D) {
255
- return x(M) || V.apply(this, arguments);
254
+ function L(E, z, D) {
255
+ return C(E) || V.apply(this, arguments);
256
256
  }
257
- function T(M, P, D) {
257
+ function T(E, z, D) {
258
258
  var $ = this, le;
259
- P = P ?? "WARN";
259
+ z = z ?? "WARN";
260
260
  var ee = "loglevel";
261
- typeof M == "string" ? ee += ":" + M : typeof M == "symbol" && (ee = void 0);
261
+ typeof E == "string" ? ee += ":" + E : typeof E == "symbol" && (ee = void 0);
262
262
  function lt(y) {
263
263
  var ie = (n[y] || "silent").toUpperCase();
264
264
  if (!(typeof window === c || !ee)) {
@@ -304,7 +304,7 @@ var Gt = { exports: {} };
304
304
  }
305
305
  }
306
306
  }
307
- $.name = M, $.levels = {
307
+ $.name = E, $.levels = {
308
308
  TRACE: 0,
309
309
  DEBUG: 1,
310
310
  INFO: 2,
@@ -315,29 +315,29 @@ var Gt = { exports: {} };
315
315
  return le;
316
316
  }, $.setLevel = function(y, ie) {
317
317
  if (typeof y == "string" && $.levels[y.toUpperCase()] !== void 0 && (y = $.levels[y.toUpperCase()]), typeof y == "number" && y >= 0 && y <= $.levels.SILENT) {
318
- if (le = y, ie !== !1 && lt(y), S.call($, y, M), typeof console === c && y < $.levels.SILENT)
318
+ if (le = y, ie !== !1 && lt(y), S.call($, y, E), typeof console === c && y < $.levels.SILENT)
319
319
  return "No console available for logging";
320
320
  } else
321
321
  throw "log.setLevel() called with invalid level: " + y;
322
322
  }, $.setDefaultLevel = function(y) {
323
- P = y, Ie() || $.setLevel(y, !1);
323
+ z = y, Ie() || $.setLevel(y, !1);
324
324
  }, $.resetLevel = function() {
325
- $.setLevel(P, !1), Fe();
325
+ $.setLevel(z, !1), Fe();
326
326
  }, $.enableAll = function(y) {
327
327
  $.setLevel($.levels.TRACE, y);
328
328
  }, $.disableAll = function(y) {
329
329
  $.setLevel($.levels.SILENT, y);
330
330
  };
331
331
  var Se = Ie();
332
- Se == null && (Se = P), $.setLevel(Se, !1);
332
+ Se == null && (Se = z), $.setLevel(Se, !1);
333
333
  }
334
334
  var A = new T(), F = {};
335
- A.getLogger = function(P) {
336
- if (typeof P != "symbol" && typeof P != "string" || P === "")
335
+ A.getLogger = function(z) {
336
+ if (typeof z != "symbol" && typeof z != "string" || z === "")
337
337
  throw new TypeError("You must supply a name when creating a logger.");
338
- var D = F[P];
339
- return D || (D = F[P] = new T(
340
- P,
338
+ var D = F[z];
339
+ return D || (D = F[z] = new T(
340
+ z,
341
341
  A.getLevel(),
342
342
  A.methodFactory
343
343
  )), D;
@@ -418,7 +418,7 @@ const ft = /* @__PURE__ */ Zt(Oa), Pa = U`
418
418
  border-radius: 0;
419
419
  }
420
420
  }
421
- `, he = U`
421
+ `, ue = U`
422
422
  :host {
423
423
  --primary-color: var(--sl-color-primary-600);
424
424
  }
@@ -486,7 +486,7 @@ const ft = /* @__PURE__ */ Zt(Oa), Pa = U`
486
486
  text-decoration: underline;
487
487
  }
488
488
  `, Jt = U`
489
- ${he}
489
+ ${ue}
490
490
 
491
491
  :host {
492
492
  display: inline-flex;
@@ -523,10 +523,10 @@ let Be = class extends rt {
523
523
  };
524
524
  Be.styles = Jt;
525
525
  kt([
526
- C({ type: String })
526
+ k({ type: String })
527
527
  ], Be.prototype, "color", 2);
528
528
  kt([
529
- C({ type: String })
529
+ k({ type: String })
530
530
  ], Be.prototype, "svg", 2);
531
531
  Be = kt([
532
532
  Y("cb-icon")
@@ -536,9 +536,9 @@ let Ba = (a) => crypto.getRandomValues(new Uint8Array(a)), qa = (a, t, c) => {
536
536
  return (f = t) => {
537
537
  let b = "";
538
538
  for (; ; ) {
539
- let x = c(n), S = n;
539
+ let C = c(n), S = n;
540
540
  for (; S--; )
541
- if (b += a[x[S] & i] || "", b.length === f)
541
+ if (b += a[C[S] & i] || "", b.length === f)
542
542
  return b;
543
543
  }
544
544
  };
@@ -677,12 +677,12 @@ class Na {
677
677
  });
678
678
  }*/
679
679
  }
680
- function q(a) {
680
+ function R(a) {
681
681
  return a != null && typeof a == "object" && a["@@functional/placeholder"] === !0;
682
682
  }
683
- function Me(a) {
683
+ function Ee(a) {
684
684
  return function t(c) {
685
- return arguments.length === 0 || q(c) ? t : a.apply(this, arguments);
685
+ return arguments.length === 0 || R(c) ? t : a.apply(this, arguments);
686
686
  };
687
687
  }
688
688
  function be(a) {
@@ -691,13 +691,13 @@ function be(a) {
691
691
  case 0:
692
692
  return t;
693
693
  case 1:
694
- return q(c) ? t : Me(function(n) {
694
+ return R(c) ? t : Ee(function(n) {
695
695
  return a(c, n);
696
696
  });
697
697
  default:
698
- return q(c) && q(i) ? t : q(c) ? Me(function(n) {
698
+ return R(c) && R(i) ? t : R(c) ? Ee(function(n) {
699
699
  return a(n, i);
700
- }) : q(i) ? Me(function(n) {
700
+ }) : R(i) ? Ee(function(n) {
701
701
  return a(c, n);
702
702
  }) : a(c, i);
703
703
  }
@@ -709,29 +709,29 @@ function Ua(a) {
709
709
  case 0:
710
710
  return t;
711
711
  case 1:
712
- return q(c) ? t : be(function(f, b) {
712
+ return R(c) ? t : be(function(f, b) {
713
713
  return a(c, f, b);
714
714
  });
715
715
  case 2:
716
- return q(c) && q(i) ? t : q(c) ? be(function(f, b) {
716
+ return R(c) && R(i) ? t : R(c) ? be(function(f, b) {
717
717
  return a(f, i, b);
718
- }) : q(i) ? be(function(f, b) {
718
+ }) : R(i) ? be(function(f, b) {
719
719
  return a(c, f, b);
720
- }) : Me(function(f) {
720
+ }) : Ee(function(f) {
721
721
  return a(c, i, f);
722
722
  });
723
723
  default:
724
- return q(c) && q(i) && q(n) ? t : q(c) && q(i) ? be(function(f, b) {
724
+ return R(c) && R(i) && R(n) ? t : R(c) && R(i) ? be(function(f, b) {
725
725
  return a(f, b, n);
726
- }) : q(c) && q(n) ? be(function(f, b) {
726
+ }) : R(c) && R(n) ? be(function(f, b) {
727
727
  return a(f, i, b);
728
- }) : q(i) && q(n) ? be(function(f, b) {
728
+ }) : R(i) && R(n) ? be(function(f, b) {
729
729
  return a(c, f, b);
730
- }) : q(c) ? Me(function(f) {
730
+ }) : R(c) ? Ee(function(f) {
731
731
  return a(f, i, n);
732
- }) : q(i) ? Me(function(f) {
732
+ }) : R(i) ? Ee(function(f) {
733
733
  return a(c, f, n);
734
- }) : q(n) ? Me(function(f) {
734
+ }) : R(n) ? Ee(function(f) {
735
735
  return a(c, i, f);
736
736
  }) : a(c, i, n);
737
737
  }
@@ -776,17 +776,17 @@ var ic = Object.defineProperty, nc = Object.getOwnPropertyDescriptor, Z = (a, t,
776
776
  (b = a[f]) && (n = (i ? b(t, c, n) : b(n)) || n);
777
777
  return i && n && ic(t, c, n), n;
778
778
  };
779
- const B = ft.noConflict();
780
- B.setLevel("info");
781
- const re = "cb_";
779
+ const q = ft.noConflict();
780
+ q.setLevel("info");
781
+ const oe = "cb_";
782
782
  class W extends Ke {
783
783
  constructor() {
784
784
  super(...arguments), this.actionIdCounter = 0, this.prefilledFormValues = {}, this.wsClient = null, this.replyMessage = null, this.streamingResponseInProgress = !1, this.streamingResponseBuffer = null, this.streamingResponseTagStartPos = 0;
785
785
  }
786
786
  // this is called at startup
787
787
  setSetting(t) {
788
- B.info("appState: Startup: setSetting", t), this.setting = t, this.initBot().catch((c) => {
789
- B.info(`Exception during bot initialization: ${c.message}`);
788
+ q.info("appState: Startup: setSetting", t), this.setting = t, this.initBot().catch((c) => {
789
+ q.info(`Exception during bot initialization: ${c.message}`);
790
790
  });
791
791
  }
792
792
  // set language
@@ -800,7 +800,7 @@ class W extends Ke {
800
800
  async initBot() {
801
801
  if (!this.botSettingsInitialized) {
802
802
  const c = `${this.setting.url.startsWith("localhost") ? "http" : "https"}://${this.setting.url}/api/bot/settings/${this.setting.orgId}/${this.setting.botId}`;
803
- B.info(`Getting bot settings at ${c} ...`);
803
+ q.info(`Getting bot settings at ${c} ...`);
804
804
  let i = null, n = null;
805
805
  try {
806
806
  i = await fetch(c, {
@@ -808,13 +808,13 @@ class W extends Ke {
808
808
  "Access-Control-Allow-Origin": "null",
809
809
  "X-Enegel-Signature": this.setting.botId
810
810
  }
811
- }), !i.ok || i.status !== 200 ? B.error(`Failed to get bot ${this.setting.botId} settings: ${i.status} ${i.statusText}`) : n = await i.json();
811
+ }), !i.ok || i.status !== 200 ? q.error(`Failed to get bot ${this.setting.botId} settings: ${i.status} ${i.statusText}`) : n = await i.json();
812
812
  } catch (f) {
813
- B.error(`Failed to get bot ${this.setting.botId} settings: ${f.message}`), n = null;
813
+ q.error(`Failed to get bot ${this.setting.botId} settings: ${f.message}`), n = null;
814
814
  }
815
815
  if (this.botSettingsInitialized = !0, this.botSettings = n, !n) {
816
- if (B.error(`Unable to retrieve bot settings - bot disabled. Retry in ${this.botSettingsRetryTimeout} seconds.`), this.disabled = !0, this.botSettingsRetryTimeout > 80) {
817
- B.error("Failed to retrieve bot settings - bot disabled. Retries exhausted. Refresh page to attempt again.");
816
+ if (q.error(`Unable to retrieve bot settings - bot disabled. Retry in ${this.botSettingsRetryTimeout} seconds.`), this.disabled = !0, this.botSettingsRetryTimeout > 80) {
817
+ q.error("Failed to retrieve bot settings - bot disabled. Retries exhausted. Refresh page to attempt again.");
818
818
  return;
819
819
  }
820
820
  this.botSettingsInitialized = !1, setTimeout(async () => {
@@ -822,12 +822,12 @@ class W extends Ke {
822
822
  }, this.botSettingsRetryTimeout * 1e3), this.botSettingsRetryTimeout = this.botSettingsRetryTimeout * 2;
823
823
  return;
824
824
  }
825
- B.info("Got bot settings - bot is enabled", n), this.disabled = !1, this.setting.welcomeMessage = (n == null ? void 0 : n.welcomeMessage) || "How can I help ?", this.setting.engageMessage = (n == null ? void 0 : n.engageMessage) || "How can I help ?", this.setting.engageTimeout = (n == null ? void 0 : n.engageTimeout) || 5, this.setting.splitMessagesAtBreak = "splitMessagesAtBreak" in n ? n.splitMessagesAtBreak : !1, this.initConversation(), this.shouldEngage === "true" && setTimeout(() => {
825
+ q.info("Got bot settings - bot is enabled", n), this.disabled = !1, this.setting.welcomeMessage = (n == null ? void 0 : n.welcomeMessage) || "How can I help ?", this.setting.engageMessage = (n == null ? void 0 : n.engageMessage) || "How can I help ?", this.setting.engageTimeout = (n == null ? void 0 : n.engageTimeout) || 5, this.setting.splitMessagesAtBreak = "splitMessagesAtBreak" in n ? n.splitMessagesAtBreak : !1, this.initConversation(), this.shouldEngage === "true" && setTimeout(() => {
826
826
  this.showEngagePopup();
827
827
  }, this.setting.engageTimeout * 1e3);
828
828
  }
829
- this.connectWs === "true" && (B.info("appState: connectWs is true"), this.getWsClient().catch((t) => {
830
- B.error(`Exception during ws client startup: ${t.message}`);
829
+ this.connectWs === "true" && (q.info("appState: connectWs is true"), this.getWsClient().catch((t) => {
830
+ q.error(`Exception during ws client startup: ${t.message}`);
831
831
  }));
832
832
  }
833
833
  initConversation() {
@@ -856,7 +856,7 @@ class W extends Ke {
856
856
  initStartupForm() {
857
857
  const t = ut(null, ["startupForm"], this.botSettings);
858
858
  if (!t || !(t != null && t.name)) {
859
- B.info("Startup form not present");
859
+ q.info("Startup form not present");
860
860
  return;
861
861
  }
862
862
  this.initForm(t);
@@ -867,20 +867,20 @@ class W extends Ke {
867
867
  return;
868
868
  const n = ut(null, ["fields"], t);
869
869
  if (!Array.isArray(n) || n.length <= 0) {
870
- B.info("form has no fields", t);
870
+ q.info("form has no fields", t);
871
871
  return;
872
872
  }
873
- const f = `${re}${this.setting.botId}.${this.conversationId}.form.${i}`, b = localStorage.getItem(f);
873
+ const f = `${oe}${this.setting.botId}.${this.conversationId}.form.${i}`, b = localStorage.getItem(f);
874
874
  if (b) {
875
- let x = null;
875
+ let C = null;
876
876
  try {
877
- x = JSON.parse(b);
877
+ C = JSON.parse(b);
878
878
  } catch (S) {
879
- B.error(`Failed to parse stored form data: ${S.message}`), x = null;
879
+ q.error(`Failed to parse stored form data: ${S.message}`), C = null;
880
880
  }
881
- if (x) {
882
- this.sendFormData(i, x).catch((S) => {
883
- B.error(`Error when submitting form: ${S.message}`);
881
+ if (C) {
882
+ this.sendFormData(i, C).catch((S) => {
883
+ q.error(`Error when submitting form: ${S.message}`);
884
884
  });
885
885
  return;
886
886
  }
@@ -893,11 +893,11 @@ class W extends Ke {
893
893
  showEngagePopup() {
894
894
  if (this.open)
895
895
  return;
896
- B.info("Engaging User !"), this.engage = !0;
896
+ q.info("Engaging User !"), this.engage = !0;
897
897
  const t = (f) => {
898
898
  const b = new Uint8Array(f.length / 2);
899
- for (let x = 0; x < b.length; x++)
900
- b[x] = parseInt(f.substr(x * 2, 2), 16);
899
+ for (let C = 0; C < b.length; C++)
900
+ b[C] = parseInt(f.substr(C * 2, 2), 16);
901
901
  return b;
902
902
  };
903
903
  let c = new Blob([t(cc)], { type: "application/octet-stream" });
@@ -911,7 +911,7 @@ class W extends Ke {
911
911
  if (this.wsClient)
912
912
  return this.wsClient;
913
913
  const c = `${this.setting.url.startsWith("localhost") ? "ws" : "wss"}://${this.setting.url}/api/bot/connect/${this.setting.orgId}/${this.setting.botId}/${this.conversationId}`;
914
- return B.info(`Initiating ws connection to ${c} ...`), this.wsClient = new Na({
914
+ return q.info(`Initiating ws connection to ${c} ...`), this.wsClient = new Na({
915
915
  url: c,
916
916
  orgId: this.setting.orgId,
917
917
  botId: this.setting.botId,
@@ -956,7 +956,7 @@ class W extends Ke {
956
956
  break;
957
957
  }
958
958
  case "form": {
959
- if (B.info("Got form:", t), this.replyMessage && this.replyMessage.id) {
959
+ if (q.info("Got form:", t), this.replyMessage && this.replyMessage.id) {
960
960
  const i = ((c = this.replyMessage.data) == null ? void 0 : c.text) || "";
961
961
  (this.replyMessage.isThinking || i.trim() === "") && (this.removeMessage(this.replyMessage.id), this.replyMessage = null);
962
962
  }
@@ -984,7 +984,7 @@ class W extends Ke {
984
984
  if (i !== -1) {
985
985
  if (this.setting.splitMessagesAtBreak) {
986
986
  const n = this.streamingResponseBuffer.substring(0, i).trim(), f = this.streamingResponseBuffer.substring(i + 4).trim();
987
- B.info(`BREAK: Splitting the message: ${this.streamingResponseBuffer} >>> prev: ${n} next: ${f}`), this.replyMessage = this.updateMessage(this.replyMessage, n), this.replyMessage = { author: "assistant", type: "text", isThinking: !1, data: { text: "" } }, this.addMessage(this.replyMessage), c = f;
987
+ q.info(`BREAK: Splitting the message: ${this.streamingResponseBuffer} >>> prev: ${n} next: ${f}`), this.replyMessage = this.updateMessage(this.replyMessage, n), this.replyMessage = { author: "assistant", type: "text", isThinking: !1, data: { text: "" } }, this.addMessage(this.replyMessage), c = f;
988
988
  } else
989
989
  c = this.streamingResponseBuffer;
990
990
  this.streamingResponseBuffer = null, this.streamingResponseTagStartPos = 0;
@@ -1019,11 +1019,20 @@ class W extends Ke {
1019
1019
  this.actions = i.concat(this.actions);
1020
1020
  }
1021
1021
  }
1022
+ updateAction(t, c) {
1023
+ const i = this.actions.findIndex((n) => n.internalId === t.internalId);
1024
+ if (i !== -1) {
1025
+ const n = Object.assign({}, this.actions[i], c);
1026
+ this.actions.splice(i, 1, n);
1027
+ const f = [];
1028
+ this.actions = f.concat(this.actions);
1029
+ }
1030
+ }
1022
1031
  async sendMessage(t) {
1023
- t = this.formatMessage(t), B.info("Send Message:", t), this.messages = this.messages.concat([t]), this.lastConversationUpdate = Date.now();
1032
+ t = this.formatMessage(t), q.info("Send Message:", t), this.messages = this.messages.concat([t]), this.lastConversationUpdate = Date.now();
1024
1033
  const c = await this.getWsClient();
1025
1034
  if (!c) {
1026
- B.error("Error - failed to obtain ws client"), this.replyMessage = null;
1035
+ q.error("Error - failed to obtain ws client"), this.replyMessage = null;
1027
1036
  return;
1028
1037
  }
1029
1038
  c.sendMessage({
@@ -1066,16 +1075,16 @@ class W extends Ke {
1066
1075
  // Submit current form data
1067
1076
  async submitForm(t) {
1068
1077
  if (!this.form) {
1069
- B.info("submitForm: No form is active - ignored");
1078
+ q.info("submitForm: No form is active - ignored");
1070
1079
  return;
1071
1080
  }
1072
- const c = `${re}${this.setting.botId}.${this.conversationId}.form.${this.form.name}`;
1081
+ const c = `${oe}${this.setting.botId}.${this.conversationId}.form.${this.form.name}`;
1073
1082
  await this.sendFormData(this.form.name, t), localStorage.setItem(c, JSON.stringify(t)), this.form = null;
1074
1083
  }
1075
1084
  async sendFormData(t, c) {
1076
1085
  const i = await this.getWsClient();
1077
1086
  if (!i) {
1078
- B.error("Error - failed to obtain ws client");
1087
+ q.error("Error - failed to obtain ws client");
1079
1088
  return;
1080
1089
  }
1081
1090
  i.sendMessage({
@@ -1086,37 +1095,38 @@ class W extends Ke {
1086
1095
  }
1087
1096
  }
1088
1097
  Z([
1089
- pe({ prefix: re }),
1098
+ he({ prefix: oe }),
1090
1099
  X({ value: "en" })
1091
1100
  ], W.prototype, "language", 2);
1092
1101
  Z([
1093
- pe({ prefix: re }),
1102
+ he({ prefix: oe }),
1094
1103
  X({ value: "light" })
1095
1104
  ], W.prototype, "theme", 2);
1096
1105
  Z([
1097
- pe({ prefix: re }),
1106
+ he({ prefix: oe }),
1098
1107
  X({ type: Boolean, value: !1 })
1099
1108
  ], W.prototype, "open", 2);
1100
1109
  Z([
1101
1110
  X({ type: Boolean, value: !1 })
1102
1111
  ], W.prototype, "alwaysOpen", 2);
1103
1112
  Z([
1104
- pe({ prefix: re }),
1113
+ he({ prefix: oe }),
1105
1114
  X({ value: "false" })
1106
1115
  ], W.prototype, "connectWs", 2);
1107
1116
  Z([
1108
- pe({ prefix: re }),
1117
+ he({ prefix: oe }),
1109
1118
  X({ value: gt() })
1110
1119
  ], W.prototype, "conversationId", 2);
1111
1120
  Z([
1112
- pe({ prefix: re }),
1121
+ he({ prefix: oe }),
1113
1122
  X({ value: 0 })
1114
1123
  ], W.prototype, "lastConversationUpdate", 2);
1115
1124
  Z([
1116
- pe({ prefix: re }),
1125
+ he({ prefix: oe }),
1117
1126
  X({ type: Array, value: [] })
1118
1127
  ], W.prototype, "messages", 2);
1119
1128
  Z([
1129
+ he({ prefix: oe }),
1120
1130
  X({
1121
1131
  type: Array,
1122
1132
  value: []
@@ -1176,14 +1186,14 @@ Z([
1176
1186
  X({ type: Boolean, value: !0 })
1177
1187
  ], W.prototype, "disabled", 2);
1178
1188
  Z([
1179
- pe({ prefix: re }),
1189
+ he({ prefix: oe }),
1180
1190
  X({ value: "true" })
1181
1191
  ], W.prototype, "shouldEngage", 2);
1182
1192
  Z([
1183
1193
  X({ type: Boolean, value: !1 })
1184
1194
  ], W.prototype, "engage", 2);
1185
1195
  Z([
1186
- pe({ prefix: re }),
1196
+ he({ prefix: oe }),
1187
1197
  X({
1188
1198
  type: Object,
1189
1199
  value: {
@@ -1195,8 +1205,8 @@ Z([
1195
1205
  }
1196
1206
  })
1197
1207
  ], W.prototype, "setting", 2);
1198
- const k = new W(), sc = U`
1199
- ${he}
1208
+ const x = new W(), sc = U`
1209
+ ${ue}
1200
1210
  :host {
1201
1211
  position: relative;
1202
1212
  font-weight: bold;
@@ -1274,7 +1284,7 @@ class Q extends rt {
1274
1284
  }
1275
1285
  }
1276
1286
  fc([
1277
- C({ type: String })
1287
+ k({ type: String })
1278
1288
  ], Q.prototype, "lang", 2);
1279
1289
  const et = '<svg viewBox="0 0 16 16" width="1.2em" height="1.2em" ><path fill="currentColor" d="M2.146 2.854a.5.5 0 1 1 .708-.708L8 7.293l5.146-5.147a.5.5 0 0 1 .708.708L8.707 8l5.147 5.146a.5.5 0 0 1-.708.708L8 8.707l-5.146 5.147a.5.5 0 0 1-.708-.708L7.293 8z"/></svg>';
1280
1290
  var dc = Object.defineProperty, lc = Object.getOwnPropertyDescriptor, Kt = (a, t, c, i) => {
@@ -1293,16 +1303,16 @@ let tt = class extends Q {
1293
1303
  */
1294
1304
  render() {
1295
1305
  return w` <header class="cb-header" part="header">
1296
- ${ue(
1297
- k.setting.logoUrl !== "",
1298
- () => w`<img class="cb-header-img" src="${k.setting.logoUrl}" />`,
1306
+ ${ge(
1307
+ x.setting.logoUrl !== "",
1308
+ () => w`<img class="cb-header-img" src="${x.setting.logoUrl}" />`,
1299
1309
  () => w`<sl-button class="cb-setting-button" variant="text" circle>
1300
- <cb-icon class="cb-header-logo" svg="${k.setting.logoSvg}"></cb-icon>
1310
+ <cb-icon class="cb-header-logo" svg="${x.setting.logoSvg}"></cb-icon>
1301
1311
  </sl-button>`
1302
1312
  )}
1303
1313
  <span class="center title">${this.title}</span>
1304
- ${ue(
1305
- k.alwaysOpen,
1314
+ ${ge(
1315
+ x.alwaysOpen,
1306
1316
  () => w``,
1307
1317
  () => w`<span class="right">
1308
1318
  <sl-button @click=${this._clickCloseHandler} class="cb-setting-button" variant="text" circle>
@@ -1325,13 +1335,13 @@ let tt = class extends Q {
1325
1335
  };
1326
1336
  tt.styles = sc;
1327
1337
  Kt([
1328
- C({ type: String, attribute: "title" })
1338
+ k({ type: String, attribute: "title" })
1329
1339
  ], tt.prototype, "title", 2);
1330
1340
  tt = Kt([
1331
1341
  Y("cb-header")
1332
1342
  ], tt);
1333
1343
  const bc = U`
1334
- ${he}
1344
+ ${ue}
1335
1345
  .cb-footer {
1336
1346
  line-height: 60px;
1337
1347
  font-size: 16px;
@@ -1390,7 +1400,7 @@ mt = pc([
1390
1400
  Y("cb-footer")
1391
1401
  ], mt);
1392
1402
  const gc = U`
1393
- ${he}
1403
+ ${ue}
1394
1404
 
1395
1405
  :host {
1396
1406
  width: 100%;
@@ -1478,7 +1488,7 @@ const gc = U`
1478
1488
  border-radius: 6px;
1479
1489
  cursor: pointer;
1480
1490
  color: rgba(255, 255, 255, 1);
1481
- background-color: #ff9119;
1491
+ background-color: #f97316; //#ff9119;
1482
1492
  display: flex;
1483
1493
  align-items: center;
1484
1494
  font-size: 14px;
@@ -1508,7 +1518,8 @@ const gc = U`
1508
1518
  transition: background 0.8s;
1509
1519
  }
1510
1520
  .ripple:hover {
1511
- background: #ff9119 radial-gradient(circle, transparent 1%, #ff9119 1%) center/15000%;
1521
+ //background: #ff9119 radial-gradient(circle, transparent 1%, #ff9119 1%) center/15000%;
1522
+ background: #ea580c radial-gradient(circle, transparent 1%, #ea580c 1%) center/15000%;
1512
1523
  }
1513
1524
  .ripple:active {
1514
1525
  background-color: #fdba74;
@@ -1542,12 +1553,12 @@ var Qt = { exports: {} };
1542
1553
  return e && n(r.prototype, e), s && n(r, s), r;
1543
1554
  }
1544
1555
  var b = Date.now();
1545
- function x() {
1556
+ function C() {
1546
1557
  var r = {}, e = !0, s = 0, o = arguments.length;
1547
1558
  Object.prototype.toString.call(arguments[0]) === "[object Boolean]" && (e = arguments[0], s++);
1548
1559
  for (var d = function(h) {
1549
1560
  for (var u in h)
1550
- Object.prototype.hasOwnProperty.call(h, u) && (e && Object.prototype.toString.call(h[u]) === "[object Object]" ? r[u] = x(!0, r[u], h[u]) : r[u] = h[u]);
1561
+ Object.prototype.hasOwnProperty.call(h, u) && (e && Object.prototype.toString.call(h[u]) === "[object Object]" ? r[u] = C(!0, r[u], h[u]) : r[u] = h[u]);
1551
1562
  }; s < o; s++) {
1552
1563
  var l = arguments[s];
1553
1564
  d(l);
@@ -1555,7 +1566,7 @@ var Qt = { exports: {} };
1555
1566
  return r;
1556
1567
  }
1557
1568
  function S(r, e) {
1558
- if ((te(r) || r === window || r === document) && (r = [r]), Tt(r) || Le(r) || (r = [r]), Et(r) != 0) {
1569
+ if ((te(r) || r === window || r === document) && (r = [r]), Tt(r) || Le(r) || (r = [r]), Mt(r) != 0) {
1559
1570
  if (Tt(r) && !Le(r))
1560
1571
  for (var s = r.length, o = 0; o < s && e.call(r[o], r[o], o, r) !== !1; o++)
1561
1572
  ;
@@ -1568,25 +1579,25 @@ var Qt = { exports: {} };
1568
1579
  }
1569
1580
  function V(r) {
1570
1581
  var e = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : null, s = arguments.length > 2 && arguments[2] !== void 0 ? arguments[2] : null, o = r[b] = r[b] || [], d = { all: o, evt: null, found: null };
1571
- return e && s && Et(o) > 0 && S(o, function(l, h) {
1582
+ return e && s && Mt(o) > 0 && S(o, function(l, h) {
1572
1583
  if (l.eventName == e && l.fn.toString() == s.toString())
1573
1584
  return d.found = !0, d.evt = h, !1;
1574
1585
  }), d;
1575
1586
  }
1576
1587
  function L(r) {
1577
1588
  var e = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : {}, s = e.onElement, o = e.withCallback, d = e.avoidDuplicate, l = d === void 0 || d, h = e.once, u = h !== void 0 && h, p = e.useCapture, v = p !== void 0 && p, g = arguments.length > 2 ? arguments[2] : void 0, m = s || [];
1578
- function E(_) {
1579
- y(o) && o.call(g, _, this), u && E.destroy();
1589
+ function M(_) {
1590
+ y(o) && o.call(g, _, this), u && M.destroy();
1580
1591
  }
1581
- return ie(m) && (m = document.querySelectorAll(m)), E.destroy = function() {
1592
+ return ie(m) && (m = document.querySelectorAll(m)), M.destroy = function() {
1582
1593
  S(m, function(_) {
1583
- var j = V(_, r, E);
1584
- j.found && j.all.splice(j.evt, 1), _.removeEventListener && _.removeEventListener(r, E, v);
1594
+ var j = V(_, r, M);
1595
+ j.found && j.all.splice(j.evt, 1), _.removeEventListener && _.removeEventListener(r, M, v);
1585
1596
  });
1586
1597
  }, S(m, function(_) {
1587
- var j = V(_, r, E);
1588
- (_.addEventListener && l && !j.found || !l) && (_.addEventListener(r, E, v), j.all.push({ eventName: r, fn: E }));
1589
- }), E;
1598
+ var j = V(_, r, M);
1599
+ (_.addEventListener && l && !j.found || !l) && (_.addEventListener(r, M, v), j.all.push({ eventName: r, fn: M }));
1600
+ }), M;
1590
1601
  }
1591
1602
  function T(r, e) {
1592
1603
  S(e.split(" "), function(s) {
@@ -1609,7 +1620,7 @@ var Qt = { exports: {} };
1609
1620
  return r;
1610
1621
  }
1611
1622
  }
1612
- function M(r) {
1623
+ function E(r) {
1613
1624
  var e = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : "", s = arguments.length > 2 && arguments[2] !== void 0 && arguments[2];
1614
1625
  if (!r || e === "")
1615
1626
  return !1;
@@ -1624,7 +1635,7 @@ var Qt = { exports: {} };
1624
1635
  }), y(s) && s();
1625
1636
  } });
1626
1637
  }
1627
- function P(r) {
1638
+ function z(r) {
1628
1639
  var e = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : "";
1629
1640
  if (e === "")
1630
1641
  return r.style.webkitTransform = "", r.style.MozTransform = "", r.style.msTransform = "", r.style.OTransform = "", r.style.transform = "", !1;
@@ -1731,7 +1742,7 @@ var Qt = { exports: {} };
1731
1742
  function N(r, e) {
1732
1743
  return r !== null && hasOwnProperty.call(r, e);
1733
1744
  }
1734
- function Et(r) {
1745
+ function Mt(r) {
1735
1746
  if (Le(r)) {
1736
1747
  if (r.keys)
1737
1748
  return r.keys().length;
@@ -1745,7 +1756,7 @@ var Qt = { exports: {} };
1745
1756
  function Ue(r) {
1746
1757
  return !isNaN(parseFloat(r)) && isFinite(r);
1747
1758
  }
1748
- function Mt() {
1759
+ function Et() {
1749
1760
  var r = arguments.length > 0 && arguments[0] !== void 0 ? arguments[0] : -1, e = document.querySelectorAll(".gbtn[data-taborder]:not(.disabled)");
1750
1761
  if (!e.length)
1751
1762
  return !1;
@@ -1782,10 +1793,10 @@ var Qt = { exports: {} };
1782
1793
  if (!h || h.length <= 0)
1783
1794
  return;
1784
1795
  if (!d) {
1785
- var u = Mt();
1796
+ var u = Et();
1786
1797
  return void (u && (u.focus(), T(u, "focused")));
1787
1798
  }
1788
- var p = Mt(d.getAttribute("data-taborder"));
1799
+ var p = Et(d.getAttribute("data-taborder"));
1789
1800
  A(d, "focused"), p && (p.focus(), T(p, "focused"));
1790
1801
  }
1791
1802
  o == 39 && r.nextSlide(), o == 37 && r.prevSlide(), o == 27 && r.close();
@@ -1906,37 +1917,37 @@ var Qt = { exports: {} };
1906
1917
  if (u.style[h] !== void 0)
1907
1918
  return p[h];
1908
1919
  }(), s = window.innerWidth || document.documentElement.clientWidth || document.body.clientWidth, o = F(r, "gslide-media") ? r : r.querySelector(".gslide-media"), d = ce(o, ".ginner-container"), l = r.querySelector(".gslide-description");
1909
- s > 769 && (o = d), T(o, "greset"), P(o, "translate3d(0, 0, 0)"), L(e, { onElement: o, once: !0, withCallback: function(h, u) {
1920
+ s > 769 && (o = d), T(o, "greset"), z(o, "translate3d(0, 0, 0)"), L(e, { onElement: o, once: !0, withCallback: function(h, u) {
1910
1921
  A(o, "greset");
1911
1922
  } }), o.style.opacity = "", l && (l.style.opacity = "");
1912
1923
  }
1913
1924
  function ha(r) {
1914
1925
  if (r.events.hasOwnProperty("touch"))
1915
1926
  return !1;
1916
- var e, s, o, d = ee(), l = d.width, h = d.height, u = !1, p = null, v = null, g = null, m = !1, E = 1, _ = 1, j = !1, z = !1, I = null, oe = null, ae = null, ye = null, ve = 0, _e = 0, je = !1, ht = !1, Te = {}, Ee = {}, Ot = 0, Pt = 0, ka = document.getElementById("glightbox-slider"), Xe = document.querySelector(".goverlay"), Ca = new ba(ka, { touchStart: function(O) {
1927
+ var e, s, o, d = ee(), l = d.width, h = d.height, u = !1, p = null, v = null, g = null, m = !1, M = 1, _ = 1, j = !1, H = !1, I = null, re = null, ae = null, ve = null, we = 0, _e = 0, je = !1, ht = !1, Te = {}, Me = {}, Ot = 0, Pt = 0, ka = document.getElementById("glightbox-slider"), Xe = document.querySelector(".goverlay"), Ca = new ba(ka, { touchStart: function(O) {
1917
1928
  if (u = !0, (F(O.targetTouches[0].target, "ginner-container") || ce(O.targetTouches[0].target, ".gslide-desc") || O.targetTouches[0].target.nodeName.toLowerCase() == "a") && (u = !1), ce(O.targetTouches[0].target, ".gslide-inline") && !F(O.targetTouches[0].target.parentNode, "gslide-inline") && (u = !1), u) {
1918
- if (Ee = O.targetTouches[0], Te.pageX = O.targetTouches[0].pageX, Te.pageY = O.targetTouches[0].pageY, Ot = O.targetTouches[0].clientX, Pt = O.targetTouches[0].clientY, p = r.activeSlide, v = p.querySelector(".gslide-media"), o = p.querySelector(".gslide-inline"), g = null, F(v, "gslide-image") && (g = v.querySelector("img")), (window.innerWidth || document.documentElement.clientWidth || document.body.clientWidth) > 769 && (v = p.querySelector(".ginner-container")), A(Xe, "greset"), O.pageX > 20 && O.pageX < window.innerWidth - 20)
1929
+ if (Me = O.targetTouches[0], Te.pageX = O.targetTouches[0].pageX, Te.pageY = O.targetTouches[0].pageY, Ot = O.targetTouches[0].clientX, Pt = O.targetTouches[0].clientY, p = r.activeSlide, v = p.querySelector(".gslide-media"), o = p.querySelector(".gslide-inline"), g = null, F(v, "gslide-image") && (g = v.querySelector("img")), (window.innerWidth || document.documentElement.clientWidth || document.body.clientWidth) > 769 && (v = p.querySelector(".ginner-container")), A(Xe, "greset"), O.pageX > 20 && O.pageX < window.innerWidth - 20)
1919
1930
  return;
1920
1931
  O.preventDefault();
1921
1932
  }
1922
1933
  }, touchMove: function(O) {
1923
- if (u && (Ee = O.targetTouches[0], !j && !z)) {
1934
+ if (u && (Me = O.targetTouches[0], !j && !H)) {
1924
1935
  if (o && o.offsetHeight > h) {
1925
- var K = Te.pageX - Ee.pageX;
1936
+ var K = Te.pageX - Me.pageX;
1926
1937
  if (Math.abs(K) <= 13)
1927
1938
  return !1;
1928
1939
  }
1929
1940
  m = !0;
1930
- var we, Ze = O.targetTouches[0].clientX, Sa = O.targetTouches[0].clientY, _a = Ot - Ze, Ta = Pt - Sa;
1931
- if (Math.abs(_a) > Math.abs(Ta) ? (je = !1, ht = !0) : (ht = !1, je = !0), e = Ee.pageX - Te.pageX, ve = 100 * e / l, s = Ee.pageY - Te.pageY, _e = 100 * s / h, je && g && (we = 1 - Math.abs(s) / h, Xe.style.opacity = we, r.settings.touchFollowAxis && (ve = 0)), ht && (we = 1 - Math.abs(e) / l, v.style.opacity = we, r.settings.touchFollowAxis && (_e = 0)), !g)
1932
- return P(v, "translate3d(".concat(ve, "%, 0, 0)"));
1933
- P(v, "translate3d(".concat(ve, "%, ").concat(_e, "%, 0)"));
1941
+ var xe, Ze = O.targetTouches[0].clientX, Sa = O.targetTouches[0].clientY, _a = Ot - Ze, Ta = Pt - Sa;
1942
+ if (Math.abs(_a) > Math.abs(Ta) ? (je = !1, ht = !0) : (ht = !1, je = !0), e = Me.pageX - Te.pageX, we = 100 * e / l, s = Me.pageY - Te.pageY, _e = 100 * s / h, je && g && (xe = 1 - Math.abs(s) / h, Xe.style.opacity = xe, r.settings.touchFollowAxis && (we = 0)), ht && (xe = 1 - Math.abs(e) / l, v.style.opacity = xe, r.settings.touchFollowAxis && (_e = 0)), !g)
1943
+ return z(v, "translate3d(".concat(we, "%, 0, 0)"));
1944
+ z(v, "translate3d(".concat(we, "%, ").concat(_e, "%, 0)"));
1934
1945
  }
1935
1946
  }, touchEnd: function() {
1936
1947
  if (u) {
1937
- if (m = !1, z || j)
1938
- return ae = I, void (ye = oe);
1939
- var O = Math.abs(parseInt(_e)), K = Math.abs(parseInt(ve));
1948
+ if (m = !1, H || j)
1949
+ return ae = I, void (ve = re);
1950
+ var O = Math.abs(parseInt(_e)), K = Math.abs(parseInt(we));
1940
1951
  if (!(O > 29 && g))
1941
1952
  return O < 29 && K < 25 ? (T(Xe, "greset"), Xe.style.opacity = 1, bt(v)) : void 0;
1942
1953
  r.close();
@@ -1946,24 +1957,24 @@ var Qt = { exports: {} };
1946
1957
  j = !1;
1947
1958
  }, 50);
1948
1959
  }, multipointStart: function() {
1949
- j = !0, E = _ || 1;
1960
+ j = !0, M = _ || 1;
1950
1961
  }, pinch: function(O) {
1951
1962
  if (!g || m)
1952
1963
  return !1;
1953
- j = !0, g.scaleX = g.scaleY = E * O.zoom;
1954
- var K = E * O.zoom;
1955
- if (z = !0, K <= 1)
1956
- return z = !1, K = 1, ye = null, ae = null, I = null, oe = null, void g.setAttribute("style", "");
1964
+ j = !0, g.scaleX = g.scaleY = M * O.zoom;
1965
+ var K = M * O.zoom;
1966
+ if (H = !0, K <= 1)
1967
+ return H = !1, K = 1, ve = null, ae = null, I = null, re = null, void g.setAttribute("style", "");
1957
1968
  K > 4.5 && (K = 4.5), g.style.transform = "scale3d(".concat(K, ", ").concat(K, ", 1)"), _ = K;
1958
1969
  }, pressMove: function(O) {
1959
- if (z && !j) {
1960
- var K = Ee.pageX - Te.pageX, we = Ee.pageY - Te.pageY;
1961
- ae && (K += ae), ye && (we += ye), I = K, oe = we;
1962
- var Ze = "translate3d(".concat(K, "px, ").concat(we, "px, 0)");
1963
- _ && (Ze += " scale3d(".concat(_, ", ").concat(_, ", 1)")), P(g, Ze);
1970
+ if (H && !j) {
1971
+ var K = Me.pageX - Te.pageX, xe = Me.pageY - Te.pageY;
1972
+ ae && (K += ae), ve && (xe += ve), I = K, re = xe;
1973
+ var Ze = "translate3d(".concat(K, "px, ").concat(xe, "px, 0)");
1974
+ _ && (Ze += " scale3d(".concat(_, ", ").concat(_, ", 1)")), z(g, Ze);
1964
1975
  }
1965
1976
  }, swipe: function(O) {
1966
- if (!z)
1977
+ if (!H)
1967
1978
  if (j)
1968
1979
  j = !1;
1969
1980
  else {
@@ -2032,12 +2043,12 @@ var Qt = { exports: {} };
2032
2043
  var e = this, s = arguments.length > 0 && arguments[0] !== void 0 ? arguments[0] : {};
2033
2044
  i(this, r);
2034
2045
  var o = s.dragEl, d = s.toleranceX, l = d === void 0 ? 40 : d, h = s.toleranceY, u = h === void 0 ? 65 : h, p = s.slide, v = p === void 0 ? null : p, g = s.instance, m = g === void 0 ? null : g;
2035
- this.el = o, this.active = !1, this.dragging = !1, this.currentX = null, this.currentY = null, this.initialX = null, this.initialY = null, this.xOffset = 0, this.yOffset = 0, this.direction = null, this.lastDirection = null, this.toleranceX = l, this.toleranceY = u, this.toleranceReached = !1, this.dragContainer = this.el, this.slide = v, this.instance = m, this.el.addEventListener("mousedown", function(E) {
2036
- return e.dragStart(E);
2037
- }, !1), this.el.addEventListener("mouseup", function(E) {
2038
- return e.dragEnd(E);
2039
- }, !1), this.el.addEventListener("mousemove", function(E) {
2040
- return e.drag(E);
2046
+ this.el = o, this.active = !1, this.dragging = !1, this.currentX = null, this.currentY = null, this.initialX = null, this.initialY = null, this.xOffset = 0, this.yOffset = 0, this.direction = null, this.lastDirection = null, this.toleranceX = l, this.toleranceY = u, this.toleranceReached = !1, this.dragContainer = this.el, this.slide = v, this.instance = m, this.el.addEventListener("mousedown", function(M) {
2047
+ return e.dragStart(M);
2048
+ }, !1), this.el.addEventListener("mouseup", function(M) {
2049
+ return e.dragEnd(M);
2050
+ }, !1), this.el.addEventListener("mousemove", function(M) {
2051
+ return e.drag(M);
2041
2052
  }, !1);
2042
2053
  }
2043
2054
  return f(r, [{ key: "dragStart", value: function(e) {
@@ -2095,18 +2106,18 @@ var Qt = { exports: {} };
2095
2106
  T(l, "gvideo-container"), u.insertBefore(le('<div class="gvideo-wrapper"></div>'), u.firstChild);
2096
2107
  var v = r.querySelector(".gvideo-wrapper");
2097
2108
  Fe(this.settings.plyr.css, "Plyr");
2098
- var g = e.href, m = e == null ? void 0 : e.videoProvider, E = !1;
2109
+ var g = e.href, m = e == null ? void 0 : e.videoProvider, M = !1;
2099
2110
  u.style.maxWidth = e.width, Fe(this.settings.plyr.js, "Plyr", function() {
2100
2111
  if (!m && g.match(/vimeo\.com\/([0-9]*)/) && (m = "vimeo"), !m && (g.match(/(youtube\.com|youtube-nocookie\.com)\/watch\?v=([a-zA-Z0-9\-_]+)/) || g.match(/youtu\.be\/([a-zA-Z0-9\-_]+)/) || g.match(/(youtube\.com|youtube-nocookie\.com)\/embed\/([a-zA-Z0-9\-_]+)/)) && (m = "youtube"), m === "local" || !m) {
2101
2112
  m = "local";
2102
2113
  var _ = '<video id="' + h + '" ';
2103
- _ += 'style="background:#000; max-width: '.concat(e.width, ';" '), _ += 'preload="metadata" ', _ += 'x-webkit-airplay="allow" ', _ += "playsinline ", _ += "controls ", _ += 'class="gvideo-local">', _ += '<source src="'.concat(g, '">'), E = le(_ += "</video>");
2114
+ _ += 'style="background:#000; max-width: '.concat(e.width, ';" '), _ += 'preload="metadata" ', _ += 'x-webkit-airplay="allow" ', _ += "playsinline ", _ += "controls ", _ += 'class="gvideo-local">', _ += '<source src="'.concat(g, '">'), M = le(_ += "</video>");
2104
2115
  }
2105
- var j = E || le('<div id="'.concat(h, '" data-plyr-provider="').concat(m, '" data-plyr-embed-id="').concat(g, '"></div>'));
2116
+ var j = M || le('<div id="'.concat(h, '" data-plyr-provider="').concat(m, '" data-plyr-embed-id="').concat(g, '"></div>'));
2106
2117
  T(v, "".concat(m, "-video gvideo")), v.appendChild(j), v.setAttribute("data-id", h), v.setAttribute("data-index", s);
2107
- var z = N(d.settings.plyr, "config") ? d.settings.plyr.config : {}, I = new Plyr("#" + h, z);
2108
- I.on("ready", function(oe) {
2109
- p[h] = oe.detail.plyr, y(o) && o();
2118
+ var H = N(d.settings.plyr, "config") ? d.settings.plyr.config : {}, I = new Plyr("#" + h, H);
2119
+ I.on("ready", function(re) {
2120
+ p[h] = re.detail.plyr, y(o) && o();
2110
2121
  }), Ie(function() {
2111
2122
  return r.querySelector("iframe") && r.querySelector("iframe").dataset.ready == "true";
2112
2123
  }, function() {
@@ -2134,8 +2145,8 @@ var Qt = { exports: {} };
2134
2145
  }
2135
2146
  if (!d)
2136
2147
  return console.error("Unable to append inline slide content", e), !1;
2137
- h.style.height = e.height, h.style.width = e.width, h.appendChild(d), this.events["inlineclose" + u] = L("click", { onElement: h.querySelectorAll(".gtrigger-close"), withCallback: function(E) {
2138
- E.preventDefault(), l.close();
2148
+ h.style.height = e.height, h.style.width = e.width, h.appendChild(d), this.events["inlineclose" + u] = L("click", { onElement: h.querySelectorAll(".gtrigger-close"), withCallback: function(M) {
2149
+ M.preventDefault(), l.close();
2139
2150
  } }), y(o) && o();
2140
2151
  }
2141
2152
  function ya(r, e, s, o) {
@@ -2150,23 +2161,23 @@ var Qt = { exports: {} };
2150
2161
  var va = function() {
2151
2162
  function r() {
2152
2163
  var e = arguments.length > 0 && arguments[0] !== void 0 ? arguments[0] : {};
2153
- i(this, r), this.defaults = { href: "", sizes: "", srcset: "", title: "", type: "", videoProvider: "", description: "", alt: "", descPosition: "bottom", effect: "", width: "", height: "", content: !1, zoomable: !0, draggable: !0 }, Le(e) && (this.defaults = x(this.defaults, e));
2164
+ i(this, r), this.defaults = { href: "", sizes: "", srcset: "", title: "", type: "", videoProvider: "", description: "", alt: "", descPosition: "bottom", effect: "", width: "", height: "", content: !1, zoomable: !0, draggable: !0 }, Le(e) && (this.defaults = C(this.defaults, e));
2154
2165
  }
2155
2166
  return f(r, [{ key: "sourceType", value: function(e) {
2156
2167
  var s = e;
2157
2168
  return (e = e.toLowerCase()).match(/\.(jpeg|jpg|jpe|gif|png|apn|webp|avif|svg)/) !== null ? "image" : e.match(/(youtube\.com|youtube-nocookie\.com)\/watch\?v=([a-zA-Z0-9\-_]+)/) || e.match(/youtu\.be\/([a-zA-Z0-9\-_]+)/) || e.match(/(youtube\.com|youtube-nocookie\.com)\/embed\/([a-zA-Z0-9\-_]+)/) || e.match(/vimeo\.com\/([0-9]*)/) || e.match(/\.(mp4|ogg|webm|mov)/) !== null ? "video" : e.match(/\.(mp3|wav|wma|aac|ogg)/) !== null ? "audio" : e.indexOf("#") > -1 && s.split("#").pop().trim() !== "" ? "inline" : e.indexOf("goajax=true") > -1 ? "ajax" : "external";
2158
2169
  } }, { key: "parseConfig", value: function(e, s) {
2159
- var o = this, d = x({ descPosition: s.descPosition }, this.defaults);
2170
+ var o = this, d = C({ descPosition: s.descPosition }, this.defaults);
2160
2171
  if (Le(e) && !te(e)) {
2161
2172
  N(e, "type") || (N(e, "content") && e.content ? e.type = "inline" : N(e, "href") && (e.type = this.sourceType(e.href)));
2162
- var l = x(d, e);
2173
+ var l = C(d, e);
2163
2174
  return this.setSize(l, s), l;
2164
2175
  }
2165
2176
  var h = "", u = e.getAttribute("data-glightbox"), p = e.nodeName.toLowerCase();
2166
- if (p === "a" && (h = e.href), p === "img" && (h = e.src, d.alt = e.alt), d.href = h, S(d, function(j, z) {
2167
- N(s, z) && z !== "width" && (d[z] = s[z]);
2168
- var I = e.dataset[z];
2169
- ne(I) || (d[z] = o.sanitizeValue(I));
2177
+ if (p === "a" && (h = e.href), p === "img" && (h = e.src, d.alt = e.alt), d.href = h, S(d, function(j, H) {
2178
+ N(s, H) && H !== "width" && (d[H] = s[H]);
2179
+ var I = e.dataset[H];
2180
+ ne(I) || (d[H] = o.sanitizeValue(I));
2170
2181
  }), d.content && (d.type = "inline"), !d.type && h && (d.type = this.sourceType(h)), ne(u)) {
2171
2182
  if (!d.title && p == "a") {
2172
2183
  var v = e.title;
@@ -2178,25 +2189,25 @@ var Qt = { exports: {} };
2178
2189
  }
2179
2190
  } else {
2180
2191
  var m = [];
2181
- S(d, function(j, z) {
2182
- m.push(";\\s?" + z);
2183
- }), m = m.join("\\s?:|"), u.trim() !== "" && S(d, function(j, z) {
2184
- var I = u, oe = new RegExp("s?" + z + "s?:s?(.*?)(" + m + "s?:|$)"), ae = I.match(oe);
2192
+ S(d, function(j, H) {
2193
+ m.push(";\\s?" + H);
2194
+ }), m = m.join("\\s?:|"), u.trim() !== "" && S(d, function(j, H) {
2195
+ var I = u, re = new RegExp("s?" + H + "s?:s?(.*?)(" + m + "s?:|$)"), ae = I.match(re);
2185
2196
  if (ae && ae.length && ae[1]) {
2186
- var ye = ae[1].trim().replace(/;\s*$/, "");
2187
- d[z] = o.sanitizeValue(ye);
2197
+ var ve = ae[1].trim().replace(/;\s*$/, "");
2198
+ d[H] = o.sanitizeValue(ve);
2188
2199
  }
2189
2200
  });
2190
2201
  }
2191
2202
  if (d.description && d.description.substring(0, 1) === ".") {
2192
- var E;
2203
+ var M;
2193
2204
  try {
2194
- E = document.querySelector(d.description).innerHTML;
2205
+ M = document.querySelector(d.description).innerHTML;
2195
2206
  } catch (j) {
2196
2207
  if (!(j instanceof DOMException))
2197
2208
  throw j;
2198
2209
  }
2199
- E && (d.description = E);
2210
+ M && (d.description = M);
2200
2211
  }
2201
2212
  if (!d.description) {
2202
2213
  var _ = e.querySelector(".glightbox-desc");
@@ -2221,10 +2232,10 @@ var Qt = { exports: {} };
2221
2232
  return !1;
2222
2233
  var d = this.instance.settings, l = this.slideConfig, h = Se();
2223
2234
  y(d.beforeSlideLoad) && d.beforeSlideLoad({ index: this.index, slide: s, player: !1 });
2224
- var u = l.type, p = l.descPosition, v = s.querySelector(".gslide-media"), g = s.querySelector(".gslide-title"), m = s.querySelector(".gslide-desc"), E = s.querySelector(".gdesc-inner"), _ = o, j = "gSlideTitle_" + this.index, z = "gSlideDesc_" + this.index;
2235
+ var u = l.type, p = l.descPosition, v = s.querySelector(".gslide-media"), g = s.querySelector(".gslide-title"), m = s.querySelector(".gslide-desc"), M = s.querySelector(".gdesc-inner"), _ = o, j = "gSlideTitle_" + this.index, H = "gSlideDesc_" + this.index;
2225
2236
  if (y(d.afterSlideLoad) && (_ = function() {
2226
2237
  y(o) && o(), d.afterSlideLoad({ index: e.index, slide: s, player: e.instance.getSlidePlayerInstance(e.index) });
2227
- }), l.title == "" && l.description == "" ? E && E.parentNode.parentNode.removeChild(E.parentNode) : (g && l.title !== "" ? (g.id = j, g.innerHTML = l.title) : g.parentNode.removeChild(g), m && l.description !== "" ? (m.id = z, h && d.moreLength > 0 ? (l.smallDescription = this.slideShortDesc(l.description, d.moreLength, d.moreText), m.innerHTML = l.smallDescription, this.descriptionEvents(m, l)) : m.innerHTML = l.description) : m.parentNode.removeChild(m), T(v.parentNode, "desc-".concat(p)), T(E.parentNode, "description-".concat(p))), T(v, "gslide-".concat(u)), T(s, "loaded"), u !== "video") {
2238
+ }), l.title == "" && l.description == "" ? M && M.parentNode.parentNode.removeChild(M.parentNode) : (g && l.title !== "" ? (g.id = j, g.innerHTML = l.title) : g.parentNode.removeChild(g), m && l.description !== "" ? (m.id = H, h && d.moreLength > 0 ? (l.smallDescription = this.slideShortDesc(l.description, d.moreLength, d.moreText), m.innerHTML = l.smallDescription, this.descriptionEvents(m, l)) : m.innerHTML = l.description) : m.parentNode.removeChild(m), T(v.parentNode, "desc-".concat(p)), T(M.parentNode, "description-".concat(p))), T(v, "gslide-".concat(u)), T(s, "loaded"), u !== "video") {
2228
2239
  if (u !== "external")
2229
2240
  return u === "inline" ? (ma.apply(this.instance, [s, l, this.index, _]), void (l.draggable && new At({ dragEl: s.querySelector(".gslide-inline"), toleranceX: d.dragToleranceX, toleranceY: d.dragToleranceY, slide: s, instance: this.instance }))) : void (u !== "image" ? y(_) && _() : pa(s, l, this.index, function() {
2230
2241
  var I = s.querySelector("img");
@@ -2291,7 +2302,7 @@ var Qt = { exports: {} };
2291
2302
  </div>` }, xa = function() {
2292
2303
  function r() {
2293
2304
  var e = arguments.length > 0 && arguments[0] !== void 0 ? arguments[0] : {};
2294
- i(this, r), this.customOptions = e, this.settings = x(wa, e), this.effectsClasses = this.getAnimationClasses(), this.videoPlayers = {}, this.apiEvents = [], this.fullElementsList = !1;
2305
+ i(this, r), this.customOptions = e, this.settings = C(wa, e), this.effectsClasses = this.getAnimationClasses(), this.videoPlayers = {}, this.apiEvents = [], this.fullElementsList = !1;
2295
2306
  }
2296
2307
  return f(r, [{ key: "init", value: function() {
2297
2308
  var e = this, s = this.getSelector();
@@ -2308,7 +2319,7 @@ var Qt = { exports: {} };
2308
2319
  var d = e.getAttribute("data-gallery");
2309
2320
  d && (this.fullElementsList = this.elements, this.elements = this.getGalleryElements(this.elements, d)), ne(o) && (o = this.getElementIndex(e)) < 0 && (o = 0);
2310
2321
  }
2311
- Ue(o) || (o = 0), this.build(), M(this.overlay, this.settings.openEffect === "none" ? "none" : this.settings.cssEfects.fade.in);
2322
+ Ue(o) || (o = 0), this.build(), E(this.overlay, this.settings.openEffect === "none" ? "none" : this.settings.cssEfects.fade.in);
2312
2323
  var l = document.body, h = window.innerWidth - document.documentElement.clientWidth;
2313
2324
  if (h > 0) {
2314
2325
  var u = document.createElement("style");
@@ -2361,7 +2372,7 @@ var Qt = { exports: {} };
2361
2372
  } }, { key: "insertSlide", value: function() {
2362
2373
  var e = arguments.length > 0 && arguments[0] !== void 0 ? arguments[0] : {}, s = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : -1;
2363
2374
  s < 0 && (s = this.elements.length);
2364
- var o = new Ye(e, this, s), d = o.getConfig(), l = x({}, d), h = o.create(), u = this.elements.length - 1;
2375
+ var o = new Ye(e, this, s), d = o.getConfig(), l = C({}, d), h = o.create(), u = this.elements.length - 1;
2365
2376
  l.index = s, l.node = !1, l.instance = o, l.slideConfig = d, this.elements.splice(s, 0, l);
2366
2377
  var p = null, v = null;
2367
2378
  if (this.slidesContainer) {
@@ -2383,12 +2394,12 @@ var Qt = { exports: {} };
2383
2394
  } }, { key: "slideAnimateIn", value: function(e, s) {
2384
2395
  var o = this, d = e.querySelector(".gslide-media"), l = e.querySelector(".gslide-description"), h = { index: this.prevActiveSlideIndex, slide: this.prevActiveSlide, slideNode: this.prevActiveSlide, slideIndex: this.prevActiveSlide, slideConfig: ne(this.prevActiveSlideIndex) ? null : this.elements[this.prevActiveSlideIndex].slideConfig, trigger: ne(this.prevActiveSlideIndex) ? null : this.elements[this.prevActiveSlideIndex].node, player: this.getSlidePlayerInstance(this.prevActiveSlideIndex) }, u = { 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) };
2385
2396
  if (d.offsetWidth > 0 && l && ($(l), l.style.display = ""), A(e, this.effectsClasses), s)
2386
- M(e, this.settings.cssEfects[this.settings.openEffect].in, function() {
2397
+ E(e, this.settings.cssEfects[this.settings.openEffect].in, function() {
2387
2398
  o.settings.autoplayVideos && o.slidePlayerPlay(e), o.trigger("slide_changed", { prev: h, current: u }), y(o.settings.afterSlideChange) && o.settings.afterSlideChange.apply(o, [h, u]);
2388
2399
  });
2389
2400
  else {
2390
2401
  var p = this.settings.slideEffect, v = p !== "none" ? this.settings.cssEfects[p].in : p;
2391
- this.prevActiveSlideIndex > this.index && this.settings.slideEffect == "slide" && (v = this.settings.cssEfects.slideBack.in), M(e, v, function() {
2402
+ this.prevActiveSlideIndex > this.index && this.settings.slideEffect == "slide" && (v = this.settings.cssEfects.slideBack.in), E(e, v, function() {
2392
2403
  o.settings.autoplayVideos && o.slidePlayerPlay(e), o.trigger("slide_changed", { prev: h, current: u }), y(o.settings.afterSlideChange) && o.settings.afterSlideChange.apply(o, [h, u]);
2393
2404
  });
2394
2405
  }
@@ -2401,7 +2412,7 @@ var Qt = { exports: {} };
2401
2412
  var e = this.prevActiveSlide;
2402
2413
  A(e, this.effectsClasses), T(e, "prev");
2403
2414
  var s = this.settings.slideEffect, o = s !== "none" ? this.settings.cssEfects[s].out : s;
2404
- this.slidePlayerPause(e), this.trigger("slide_before_change", { prev: { index: this.prevActiveSlideIndex, slide: this.prevActiveSlide, slideNode: this.prevActiveSlide, slideIndex: this.prevActiveSlideIndex, slideConfig: ne(this.prevActiveSlideIndex) ? null : this.elements[this.prevActiveSlideIndex].slideConfig, trigger: ne(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) } }), y(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" && (o = this.settings.cssEfects.slideBack.out), M(e, o, function() {
2415
+ this.slidePlayerPause(e), this.trigger("slide_before_change", { prev: { index: this.prevActiveSlideIndex, slide: this.prevActiveSlide, slideNode: this.prevActiveSlide, slideIndex: this.prevActiveSlideIndex, slideConfig: ne(this.prevActiveSlideIndex) ? null : this.elements[this.prevActiveSlideIndex].slideConfig, trigger: ne(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) } }), y(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" && (o = this.settings.cssEfects.slideBack.out), E(e, o, function() {
2405
2416
  var d = e.querySelector(".ginner-container"), l = e.querySelector(".gslide-media"), h = e.querySelector(".gslide-description");
2406
2417
  d.style.transform = "", l.style.transform = "", A(l, "greset"), l.style.opacity = "", h && (h.style.opacity = ""), A(e, "prev");
2407
2418
  });
@@ -2448,7 +2459,7 @@ var Qt = { exports: {} };
2448
2459
  this.settings.elements = !1;
2449
2460
  var o = [];
2450
2461
  e && e.length && S(e, function(d, l) {
2451
- var h = new Ye(d, s, l), u = h.getConfig(), p = x({}, u);
2462
+ var h = new Ye(d, s, l), u = h.getConfig(), p = C({}, u);
2452
2463
  p.slideConfig = u, p.instance = h, p.index = l, o.push(p);
2453
2464
  }), this.elements = o, this.lightboxOpen && (this.slidesContainer.innerHTML = "", this.elements.length && (S(this.elements, function() {
2454
2465
  var d = le(s.settings.slideHTML);
@@ -2463,12 +2474,12 @@ var Qt = { exports: {} };
2463
2474
  } }, { key: "getElements", value: function() {
2464
2475
  var e = this, s = [];
2465
2476
  this.elements = this.elements ? this.elements : [], !ne(this.settings.elements) && Ne(this.settings.elements) && this.settings.elements.length && S(this.settings.elements, function(d, l) {
2466
- var h = new Ye(d, e, l), u = h.getConfig(), p = x({}, u);
2477
+ var h = new Ye(d, e, l), u = h.getConfig(), p = C({}, u);
2467
2478
  p.node = !1, p.index = l, p.instance = h, p.slideConfig = u, s.push(p);
2468
2479
  });
2469
2480
  var o = !1;
2470
2481
  return this.getSelector() && (o = document.querySelectorAll(this.getSelector())), o && S(o, function(d, l) {
2471
- var h = new Ye(d, e, l), u = h.getConfig(), p = x({}, u);
2482
+ var h = new Ye(d, e, l), u = h.getConfig(), p = C({}, u);
2472
2483
  p.node = d, p.index = l, p.instance = h, p.slideConfig = u, p.gallery = d.getAttribute("data-gallery"), s.push(p);
2473
2484
  }), s;
2474
2485
  } }, { key: "getGalleryElements", value: function(e, s) {
@@ -2532,12 +2543,12 @@ var Qt = { exports: {} };
2532
2543
  if (o) {
2533
2544
  var m = N(this.settings.plyr.config, "ratio") ? this.settings.plyr.config.ratio : "";
2534
2545
  if (!m) {
2535
- var E = o.clientWidth, _ = o.clientHeight, j = E / _;
2536
- m = "".concat(E / j, ":").concat(_ / j);
2546
+ var M = o.clientWidth, _ = o.clientHeight, j = M / _;
2547
+ m = "".concat(M / j, ":").concat(_ / j);
2537
2548
  }
2538
- var z = m.split(":"), I = this.settings.videosWidth, oe = this.settings.videosWidth, ae = (oe = Ue(I) || I.indexOf("px") !== -1 ? parseInt(I) : I.indexOf("vw") !== -1 ? h * parseInt(I) / 100 : I.indexOf("vh") !== -1 ? u * parseInt(I) / 100 : I.indexOf("%") !== -1 ? h * parseInt(I) / 100 : parseInt(o.clientWidth)) / (parseInt(z[0]) / parseInt(z[1]));
2539
- if (ae = Math.floor(ae), p && (u -= l.offsetHeight), oe > h || ae > u || u < ae && h > oe) {
2540
- var ye = o.offsetWidth, ve = o.offsetHeight, _e = u / ve, je = { width: ye * _e, height: ve * _e };
2549
+ var H = m.split(":"), I = this.settings.videosWidth, re = this.settings.videosWidth, ae = (re = Ue(I) || I.indexOf("px") !== -1 ? parseInt(I) : I.indexOf("vw") !== -1 ? h * parseInt(I) / 100 : I.indexOf("vh") !== -1 ? u * parseInt(I) / 100 : I.indexOf("%") !== -1 ? h * parseInt(I) / 100 : parseInt(o.clientWidth)) / (parseInt(H[0]) / parseInt(H[1]));
2550
+ if (ae = Math.floor(ae), p && (u -= l.offsetHeight), re > h || ae > u || u < ae && h > re) {
2551
+ var ve = o.offsetWidth, we = o.offsetHeight, _e = u / we, je = { width: ve * _e, height: we * _e };
2541
2552
  o.parentNode.setAttribute("style", "max-width: ".concat(je.width, "px")), p && l.setAttribute("style", "max-width: ".concat(je.width, "px;"));
2542
2553
  } else
2543
2554
  o.parentNode.style.maxWidth = "".concat(I), p && l.setAttribute("style", "max-width: ".concat(I, ";"));
@@ -2566,7 +2577,7 @@ var Qt = { exports: {} };
2566
2577
  return !1;
2567
2578
  this.closing = !0, this.slidePlayerPause(this.activeSlide), this.fullElementsList && (this.elements = this.fullElementsList), this.bodyHiddenChildElms.length && S(this.bodyHiddenChildElms, function(o) {
2568
2579
  o.removeAttribute("aria-hidden");
2569
- }), T(this.modal, "glightbox-closing"), M(this.overlay, this.settings.openEffect == "none" ? "none" : this.settings.cssEfects.fade.out), M(this.activeSlide, this.settings.cssEfects[this.settings.closeEffect].out, function() {
2580
+ }), T(this.modal, "glightbox-closing"), E(this.overlay, this.settings.openEffect == "none" ? "none" : this.settings.cssEfects.fade.out), E(this.activeSlide, this.settings.cssEfects[this.settings.closeEffect].out, function() {
2570
2581
  if (e.activeSlide = null, e.prevActiveSlideIndex = null, e.prevActiveSlide = null, e.built = !1, e.events) {
2571
2582
  for (var o in e.events)
2572
2583
  e.events.hasOwnProperty(o) && e.events[o].destroy();
@@ -2699,13 +2710,13 @@ at.styles = U`
2699
2710
  }
2700
2711
  `;
2701
2712
  ea([
2702
- C({ type: Array })
2713
+ k({ type: Array })
2703
2714
  ], at.prototype, "files", 2);
2704
2715
  at = ea([
2705
2716
  Y("cb-uploading")
2706
2717
  ], at);
2707
2718
  const Sc = U`
2708
- ${he}
2719
+ ${ue}
2709
2720
  :host {
2710
2721
  }
2711
2722
 
@@ -2776,23 +2787,23 @@ qe.styles = U`
2776
2787
  }
2777
2788
  `;
2778
2789
  Ct([
2779
- C({ type: String })
2790
+ k({ type: String })
2780
2791
  ], qe.prototype, "url", 2);
2781
2792
  Ct([
2782
- C({ type: Boolean })
2793
+ k({ type: Boolean })
2783
2794
  ], qe.prototype, "inverse", 2);
2784
2795
  qe = Ct([
2785
2796
  Y("cb-external-link")
2786
2797
  ], qe);
2787
- const Ec = '<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>', Mc = '<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.803c.287 0 .531-.057.732-.173c.203-.117.358-.275.463-.474a1.42 1.42 0 0 0 .161-.677c0-.25-.053-.476-.158-.677a1.176 1.176 0 0 0-.46-.477c-.2-.12-.443-.179-.732-.179Zm.545 1.333a.795.795 0 0 1-.085.38a.574.574 0 0 1-.238.241a.794.794 0 0 1-.375.082H.788V12.48h.66c.218 0 .389.06.512.181c.123.122.185.296.185.522Zm1.217-1.333v3.999h1.46c.401 0 .734-.08.998-.237a1.45 1.45 0 0 0 .595-.689c.13-.3.196-.662.196-1.084c0-.42-.065-.778-.196-1.075a1.426 1.426 0 0 0-.589-.68c-.264-.156-.599-.234-1.005-.234H3.362Zm.791.645h.563c.248 0 .45.05.609.152a.89.89 0 0 1 .354.454c.079.201.118.452.118.753a2.3 2.3 0 0 1-.068.592a1.14 1.14 0 0 1-.196.422a.8.8 0 0 1-.334.252a1.298 1.298 0 0 1-.483.082h-.563v-2.707Zm3.743 1.763v1.591h-.79V11.85h2.548v.653H7.896v1.117h1.606v.638H7.896Z"/></svg>', Ac = '<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.459c.406 0 .741.078 1.005.234c.263.157.46.383.589.68c.13.297.196.655.196 1.075c0 .422-.066.784-.196 1.084c-.131.301-.33.53-.595.689c-.264.158-.597.237-1 .237H4.626Zm1.353-3.354h-.562v2.707h.562c.186 0 .347-.028.484-.082a.8.8 0 0 0 .334-.252a1.14 1.14 0 0 0 .196-.422c.045-.168.067-.365.067-.592a2.1 2.1 0 0 0-.117-.753a.89.89 0 0 0-.354-.454c-.159-.102-.362-.152-.61-.152Z"/></svg>', $c = '<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.823c.13.108.289.192.478.252c.19.061.411.091.665.091c.338 0 .624-.053.859-.158c.236-.105.416-.252.539-.44c.125-.189.187-.408.187-.656c0-.224-.045-.41-.134-.56a1.001 1.001 0 0 0-.375-.357a2.027 2.027 0 0 0-.566-.21l-.621-.144a.97.97 0 0 1-.404-.176a.37.37 0 0 1-.144-.299c0-.156.062-.284.185-.384c.125-.101.296-.152.512-.152c.143 0 .266.023.37.068a.624.624 0 0 1 .246.181a.56.56 0 0 1 .12.258h.75a1.092 1.092 0 0 0-.2-.566a1.21 1.21 0 0 0-.5-.41a1.813 1.813 0 0 0-.78-.152c-.293 0-.551.05-.776.15c-.225.099-.4.24-.527.421c-.127.182-.19.395-.19.639c0 .201.04.376.122.524c.082.149.2.27.352.367c.152.095.332.167.539.213l.618.144c.207.049.361.113.463.193a.387.387 0 0 1 .152.326a.505.505 0 0 1-.085.29a.559.559 0 0 1-.255.193c-.111.047-.249.07-.413.07c-.117 0-.223-.013-.32-.04a.838.838 0 0 1-.248-.115a.578.578 0 0 1-.255-.384h-.765ZM.806 13.693c0-.248.034-.46.102-.633a.868.868 0 0 1 .302-.399a.814.814 0 0 1 .475-.137c.15 0 .283.032.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.441 1.441 0 0 0-.489-.272a1.838 1.838 0 0 0-.606-.097c-.356 0-.66.074-.911.223c-.25.148-.44.359-.572.632c-.13.274-.196.6-.196.979v.498c0 .379.064.704.193.976c.131.271.322.48.572.626c.25.145.554.217.914.217c.293 0 .554-.055.785-.164c.23-.11.414-.26.55-.454a1.27 1.27 0 0 0 .226-.674v-.076h-.764a.799.799 0 0 1-.118.363a.7.7 0 0 1-.272.25a.874.874 0 0 1-.401.087a.845.845 0 0 1-.478-.132a.833.833 0 0 1-.299-.392a1.699 1.699 0 0 1-.102-.627v-.495Zm8.239 2.238h-.953l-1.338-3.999h.917l.896 3.138h.038l.888-3.138h.879l-1.327 4Z"/></svg>', Ic = '<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.803c.287 0 .531-.057.732-.173c.203-.117.358-.275.463-.474a1.42 1.42 0 0 0 .161-.677c0-.25-.053-.476-.158-.677a1.176 1.176 0 0 0-.46-.477c-.2-.12-.443-.179-.732-.179Zm.545 1.333a.795.795 0 0 1-.085.38a.574.574 0 0 1-.238.241a.794.794 0 0 1-.375.082H.788V12.48h.66c.218 0 .389.06.512.181c.123.122.185.296.185.522Zm2.817-1.333h-1.6v3.999h.791v-1.342h.803c.287 0 .531-.057.732-.173c.203-.117.358-.275.463-.474c.108-.201.161-.427.161-.677c0-.25-.052-.476-.158-.677a1.176 1.176 0 0 0-.46-.477c-.2-.12-.443-.179-.732-.179Zm.545 1.333a.795.795 0 0 1-.085.38a.574.574 0 0 1-.238.241a.793.793 0 0 1-.375.082H4.15V12.48h.66c.218 0 .389.06.512.181c.123.122.185.296.185.522Zm2.767-.67v3.336H7.48v-3.337H6.346v-.662h3.065v.662H8.274Z"/></svg>', Lc = '<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.522c0 .256-.039.47-.117.641a.861.861 0 0 1-.322.387a.877.877 0 0 1-.469.126a.883.883 0 0 1-.471-.126a.868.868 0 0 1-.32-.386a1.55 1.55 0 0 1-.117-.642v-.522c0-.257.04-.471.117-.641a.868.868 0 0 1 .32-.387a.868.868 0 0 1 .471-.129c.176 0 .332.043.469.13a.861.861 0 0 1 .322.386c.078.17.117.384.117.641Zm.803.519v-.513c0-.377-.068-.7-.205-.972a1.46 1.46 0 0 0-.589-.63c-.254-.147-.56-.22-.917-.22c-.355 0-.662.073-.92.22a1.441 1.441 0 0 0-.589.627c-.136.271-.205.596-.205.975v.513c0 .375.069.7.205.973c.137.271.333.48.59.627c.257.144.564.216.92.216c.357 0 .662-.072.916-.216c.256-.147.452-.356.59-.627c.136-.274.204-.598.204-.973ZM0 11.926v4h1.459c.402 0 .735-.08.999-.238a1.45 1.45 0 0 0 .595-.689c.13-.3.196-.662.196-1.084c0-.42-.065-.778-.196-1.075a1.426 1.426 0 0 0-.59-.68c-.263-.156-.598-.234-1.004-.234H0Zm.791.645h.563c.248 0 .45.05.609.152a.89.89 0 0 1 .354.454c.079.201.118.452.118.753a2.3 2.3 0 0 1-.068.592a1.141 1.141 0 0 1-.196.422a.8.8 0 0 1-.334.252a1.298 1.298 0 0 1-.483.082H.79V12.57Zm7.422.483a1.732 1.732 0 0 0-.103.633v.495c0 .246.034.455.103.627a.834.834 0 0 0 .298.393a.845.845 0 0 0 .478.131a.868.868 0 0 0 .401-.088a.699.699 0 0 0 .273-.248a.8.8 0 0 0 .117-.364h.765v.076a1.268 1.268 0 0 1-.226.674c-.137.194-.32.345-.55.454a1.81 1.81 0 0 1-.786.164c-.36 0-.664-.072-.914-.216a1.424 1.424 0 0 1-.571-.627c-.13-.272-.194-.597-.194-.976v-.498c0-.379.066-.705.197-.978c.13-.274.321-.485.571-.633c.252-.149.556-.223.911-.223c.219 0 .421.032.607.097c.187.062.35.153.489.272a1.326 1.326 0 0 1 .466.964v.073H9.78a.85.85 0 0 0-.12-.38a.7.7 0 0 0-.273-.261a.802.802 0 0 0-.398-.097a.814.814 0 0 0-.475.138a.868.868 0 0 0-.301.398Z"/></svg>', jc = '<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.54 1.54 0 0 0-.117-.641a.861.861 0 0 0-.322-.387a.862.862 0 0 0-.469-.129a.868.868 0 0 0-.471.13a.868.868 0 0 0-.32.386a1.54 1.54 0 0 0-.117.641v.522c0 .256.04.47.117.641a.868.868 0 0 0 .32.387a.883.883 0 0 0 .471.126a.877.877 0 0 0 .469-.126a.861.861 0 0 0 .322-.386a1.55 1.55 0 0 0 .117-.642Zm.803-.516v.513c0 .375-.068.7-.205.973a1.47 1.47 0 0 1-.589.627c-.254.144-.56.216-.917.216a1.86 1.86 0 0 1-.92-.216a1.463 1.463 0 0 1-.589-.627a2.151 2.151 0 0 1-.205-.973v-.513c0-.379.069-.704.205-.975c.137-.274.333-.483.59-.627c.257-.147.564-.22.92-.22c.357 0 .662.073.916.22c.256.146.452.356.59.63c.136.271.204.595.204.972M1 15.925v-3.999h1.459c.406 0 .741.078 1.005.235c.264.156.46.382.589.68c.13.296.196.655.196 1.074c0 .422-.065.784-.196 1.084c-.131.301-.33.53-.595.689c-.264.158-.597.237-.999.237H1Zm1.354-3.354H1.79v2.707h.563c.185 0 .346-.028.483-.082a.8.8 0 0 0 .334-.252c.088-.114.153-.254.196-.422a2.3 2.3 0 0 0 .068-.592c0-.3-.04-.552-.118-.753a.89.89 0 0 0-.354-.454c-.158-.102-.361-.152-.61-.152Zm6.756 1.116c0-.248.034-.46.103-.633a.868.868 0 0 1 .301-.398a.814.814 0 0 1 .475-.138c.15 0 .283.032.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.44 1.44 0 0 0-.49-.272a1.836 1.836 0 0 0-.606-.097c-.355 0-.66.074-.911.223c-.25.148-.44.359-.571.633c-.131.273-.197.6-.197.978v.498c0 .379.065.704.194.976c.13.271.321.48.571.627c.25.144.555.216.914.216c.293 0 .555-.054.785-.164c.23-.11.414-.26.551-.454a1.27 1.27 0 0 0 .226-.674v-.076h-.765a.8.8 0 0 1-.117.364a.699.699 0 0 1-.273.248a.874.874 0 0 1-.401.088a.845.845 0 0 1-.478-.131a.834.834 0 0 1-.298-.393a1.7 1.7 0 0 1-.103-.627v-.495Zm5.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.035l.823-1.439Z"/></svg>';
2798
+ const Mc = '<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>', Ec = '<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.803c.287 0 .531-.057.732-.173c.203-.117.358-.275.463-.474a1.42 1.42 0 0 0 .161-.677c0-.25-.053-.476-.158-.677a1.176 1.176 0 0 0-.46-.477c-.2-.12-.443-.179-.732-.179Zm.545 1.333a.795.795 0 0 1-.085.38a.574.574 0 0 1-.238.241a.794.794 0 0 1-.375.082H.788V12.48h.66c.218 0 .389.06.512.181c.123.122.185.296.185.522Zm1.217-1.333v3.999h1.46c.401 0 .734-.08.998-.237a1.45 1.45 0 0 0 .595-.689c.13-.3.196-.662.196-1.084c0-.42-.065-.778-.196-1.075a1.426 1.426 0 0 0-.589-.68c-.264-.156-.599-.234-1.005-.234H3.362Zm.791.645h.563c.248 0 .45.05.609.152a.89.89 0 0 1 .354.454c.079.201.118.452.118.753a2.3 2.3 0 0 1-.068.592a1.14 1.14 0 0 1-.196.422a.8.8 0 0 1-.334.252a1.298 1.298 0 0 1-.483.082h-.563v-2.707Zm3.743 1.763v1.591h-.79V11.85h2.548v.653H7.896v1.117h1.606v.638H7.896Z"/></svg>', Ac = '<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.459c.406 0 .741.078 1.005.234c.263.157.46.383.589.68c.13.297.196.655.196 1.075c0 .422-.066.784-.196 1.084c-.131.301-.33.53-.595.689c-.264.158-.597.237-1 .237H4.626Zm1.353-3.354h-.562v2.707h.562c.186 0 .347-.028.484-.082a.8.8 0 0 0 .334-.252a1.14 1.14 0 0 0 .196-.422c.045-.168.067-.365.067-.592a2.1 2.1 0 0 0-.117-.753a.89.89 0 0 0-.354-.454c-.159-.102-.362-.152-.61-.152Z"/></svg>', $c = '<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.823c.13.108.289.192.478.252c.19.061.411.091.665.091c.338 0 .624-.053.859-.158c.236-.105.416-.252.539-.44c.125-.189.187-.408.187-.656c0-.224-.045-.41-.134-.56a1.001 1.001 0 0 0-.375-.357a2.027 2.027 0 0 0-.566-.21l-.621-.144a.97.97 0 0 1-.404-.176a.37.37 0 0 1-.144-.299c0-.156.062-.284.185-.384c.125-.101.296-.152.512-.152c.143 0 .266.023.37.068a.624.624 0 0 1 .246.181a.56.56 0 0 1 .12.258h.75a1.092 1.092 0 0 0-.2-.566a1.21 1.21 0 0 0-.5-.41a1.813 1.813 0 0 0-.78-.152c-.293 0-.551.05-.776.15c-.225.099-.4.24-.527.421c-.127.182-.19.395-.19.639c0 .201.04.376.122.524c.082.149.2.27.352.367c.152.095.332.167.539.213l.618.144c.207.049.361.113.463.193a.387.387 0 0 1 .152.326a.505.505 0 0 1-.085.29a.559.559 0 0 1-.255.193c-.111.047-.249.07-.413.07c-.117 0-.223-.013-.32-.04a.838.838 0 0 1-.248-.115a.578.578 0 0 1-.255-.384h-.765ZM.806 13.693c0-.248.034-.46.102-.633a.868.868 0 0 1 .302-.399a.814.814 0 0 1 .475-.137c.15 0 .283.032.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.441 1.441 0 0 0-.489-.272a1.838 1.838 0 0 0-.606-.097c-.356 0-.66.074-.911.223c-.25.148-.44.359-.572.632c-.13.274-.196.6-.196.979v.498c0 .379.064.704.193.976c.131.271.322.48.572.626c.25.145.554.217.914.217c.293 0 .554-.055.785-.164c.23-.11.414-.26.55-.454a1.27 1.27 0 0 0 .226-.674v-.076h-.764a.799.799 0 0 1-.118.363a.7.7 0 0 1-.272.25a.874.874 0 0 1-.401.087a.845.845 0 0 1-.478-.132a.833.833 0 0 1-.299-.392a1.699 1.699 0 0 1-.102-.627v-.495Zm8.239 2.238h-.953l-1.338-3.999h.917l.896 3.138h.038l.888-3.138h.879l-1.327 4Z"/></svg>', Ic = '<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.803c.287 0 .531-.057.732-.173c.203-.117.358-.275.463-.474a1.42 1.42 0 0 0 .161-.677c0-.25-.053-.476-.158-.677a1.176 1.176 0 0 0-.46-.477c-.2-.12-.443-.179-.732-.179Zm.545 1.333a.795.795 0 0 1-.085.38a.574.574 0 0 1-.238.241a.794.794 0 0 1-.375.082H.788V12.48h.66c.218 0 .389.06.512.181c.123.122.185.296.185.522Zm2.817-1.333h-1.6v3.999h.791v-1.342h.803c.287 0 .531-.057.732-.173c.203-.117.358-.275.463-.474c.108-.201.161-.427.161-.677c0-.25-.052-.476-.158-.677a1.176 1.176 0 0 0-.46-.477c-.2-.12-.443-.179-.732-.179Zm.545 1.333a.795.795 0 0 1-.085.38a.574.574 0 0 1-.238.241a.793.793 0 0 1-.375.082H4.15V12.48h.66c.218 0 .389.06.512.181c.123.122.185.296.185.522Zm2.767-.67v3.336H7.48v-3.337H6.346v-.662h3.065v.662H8.274Z"/></svg>', Lc = '<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.522c0 .256-.039.47-.117.641a.861.861 0 0 1-.322.387a.877.877 0 0 1-.469.126a.883.883 0 0 1-.471-.126a.868.868 0 0 1-.32-.386a1.55 1.55 0 0 1-.117-.642v-.522c0-.257.04-.471.117-.641a.868.868 0 0 1 .32-.387a.868.868 0 0 1 .471-.129c.176 0 .332.043.469.13a.861.861 0 0 1 .322.386c.078.17.117.384.117.641Zm.803.519v-.513c0-.377-.068-.7-.205-.972a1.46 1.46 0 0 0-.589-.63c-.254-.147-.56-.22-.917-.22c-.355 0-.662.073-.92.22a1.441 1.441 0 0 0-.589.627c-.136.271-.205.596-.205.975v.513c0 .375.069.7.205.973c.137.271.333.48.59.627c.257.144.564.216.92.216c.357 0 .662-.072.916-.216c.256-.147.452-.356.59-.627c.136-.274.204-.598.204-.973ZM0 11.926v4h1.459c.402 0 .735-.08.999-.238a1.45 1.45 0 0 0 .595-.689c.13-.3.196-.662.196-1.084c0-.42-.065-.778-.196-1.075a1.426 1.426 0 0 0-.59-.68c-.263-.156-.598-.234-1.004-.234H0Zm.791.645h.563c.248 0 .45.05.609.152a.89.89 0 0 1 .354.454c.079.201.118.452.118.753a2.3 2.3 0 0 1-.068.592a1.141 1.141 0 0 1-.196.422a.8.8 0 0 1-.334.252a1.298 1.298 0 0 1-.483.082H.79V12.57Zm7.422.483a1.732 1.732 0 0 0-.103.633v.495c0 .246.034.455.103.627a.834.834 0 0 0 .298.393a.845.845 0 0 0 .478.131a.868.868 0 0 0 .401-.088a.699.699 0 0 0 .273-.248a.8.8 0 0 0 .117-.364h.765v.076a1.268 1.268 0 0 1-.226.674c-.137.194-.32.345-.55.454a1.81 1.81 0 0 1-.786.164c-.36 0-.664-.072-.914-.216a1.424 1.424 0 0 1-.571-.627c-.13-.272-.194-.597-.194-.976v-.498c0-.379.066-.705.197-.978c.13-.274.321-.485.571-.633c.252-.149.556-.223.911-.223c.219 0 .421.032.607.097c.187.062.35.153.489.272a1.326 1.326 0 0 1 .466.964v.073H9.78a.85.85 0 0 0-.12-.38a.7.7 0 0 0-.273-.261a.802.802 0 0 0-.398-.097a.814.814 0 0 0-.475.138a.868.868 0 0 0-.301.398Z"/></svg>', jc = '<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.54 1.54 0 0 0-.117-.641a.861.861 0 0 0-.322-.387a.862.862 0 0 0-.469-.129a.868.868 0 0 0-.471.13a.868.868 0 0 0-.32.386a1.54 1.54 0 0 0-.117.641v.522c0 .256.04.47.117.641a.868.868 0 0 0 .32.387a.883.883 0 0 0 .471.126a.877.877 0 0 0 .469-.126a.861.861 0 0 0 .322-.386a1.55 1.55 0 0 0 .117-.642Zm.803-.516v.513c0 .375-.068.7-.205.973a1.47 1.47 0 0 1-.589.627c-.254.144-.56.216-.917.216a1.86 1.86 0 0 1-.92-.216a1.463 1.463 0 0 1-.589-.627a2.151 2.151 0 0 1-.205-.973v-.513c0-.379.069-.704.205-.975c.137-.274.333-.483.59-.627c.257-.147.564-.22.92-.22c.357 0 .662.073.916.22c.256.146.452.356.59.63c.136.271.204.595.204.972M1 15.925v-3.999h1.459c.406 0 .741.078 1.005.235c.264.156.46.382.589.68c.13.296.196.655.196 1.074c0 .422-.065.784-.196 1.084c-.131.301-.33.53-.595.689c-.264.158-.597.237-.999.237H1Zm1.354-3.354H1.79v2.707h.563c.185 0 .346-.028.483-.082a.8.8 0 0 0 .334-.252c.088-.114.153-.254.196-.422a2.3 2.3 0 0 0 .068-.592c0-.3-.04-.552-.118-.753a.89.89 0 0 0-.354-.454c-.158-.102-.361-.152-.61-.152Zm6.756 1.116c0-.248.034-.46.103-.633a.868.868 0 0 1 .301-.398a.814.814 0 0 1 .475-.138c.15 0 .283.032.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.44 1.44 0 0 0-.49-.272a1.836 1.836 0 0 0-.606-.097c-.355 0-.66.074-.911.223c-.25.148-.44.359-.571.633c-.131.273-.197.6-.197.978v.498c0 .379.065.704.194.976c.13.271.321.48.571.627c.25.144.555.216.914.216c.293 0 .555-.054.785-.164c.23-.11.414-.26.551-.454a1.27 1.27 0 0 0 .226-.674v-.076h-.765a.8.8 0 0 1-.117.364a.699.699 0 0 1-.273.248a.874.874 0 0 1-.401.088a.845.845 0 0 1-.478-.131a.834.834 0 0 1-.298-.393a1.7 1.7 0 0 1-.103-.627v-.495Zm5.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.035l.823-1.439Z"/></svg>';
2788
2799
  var Oc = Object.defineProperty, Pc = Object.getOwnPropertyDescriptor, St = (a, t, c, i) => {
2789
2800
  for (var n = i > 1 ? void 0 : i ? Pc(t, c) : t, f = a.length - 1, b; f >= 0; f--)
2790
2801
  (b = a[f]) && (n = (i ? b(t, c, n) : b(n)) || n);
2791
2802
  return i && n && Oc(t, c, n), n;
2792
2803
  };
2793
2804
  const Ht = {
2794
- pdf: Mc,
2795
- txt: Ec,
2805
+ pdf: Ec,
2806
+ txt: Mc,
2796
2807
  md: Ac,
2797
2808
  csv: $c,
2798
2809
  ppd: Ic,
@@ -2831,10 +2842,10 @@ let Re = class extends Q {
2831
2842
  };
2832
2843
  Re.styles = Sc;
2833
2844
  St([
2834
- C({ type: String })
2845
+ k({ type: String })
2835
2846
  ], Re.prototype, "filename", 2);
2836
2847
  St([
2837
- C({ type: String })
2848
+ k({ type: String })
2838
2849
  ], Re.prototype, "url", 2);
2839
2850
  Re = St([
2840
2851
  Y("cb-file")
@@ -4005,7 +4016,7 @@ const zc = '<svg viewBox="0 0 16 16" width="1.2em" height="1.2em" ><g fill="curr
4005
4016
  background-color: #282c34;
4006
4017
  }
4007
4018
  `, qc = U`
4008
- ${he}
4019
+ ${ue}
4009
4020
  ${Bc}
4010
4021
 
4011
4022
  .cb-message-row {
@@ -4242,7 +4253,10 @@ let $e = class extends Q {
4242
4253
  this.glightboxImages.forEach((t, c) => {
4243
4254
  t.addEventListener("click", (i) => {
4244
4255
  console.log(`Image clicked >>> ${c}`), i.preventDefault(), this.lightbox.openAt(c);
4245
- }), a.push(t);
4256
+ }), "src" in t && a.push({
4257
+ href: t.src,
4258
+ type: "image"
4259
+ });
4246
4260
  }), this.lightbox.setElements(a), console.log(`Added ${a.length} glightbox elements`);
4247
4261
  }
4248
4262
  get _isBot() {
@@ -4273,12 +4287,12 @@ let $e = class extends Q {
4273
4287
  });
4274
4288
  }
4275
4289
  render() {
4276
- return ue(
4290
+ return ge(
4277
4291
  this.message.data || this.message.isThinking,
4278
4292
  () => w`
4279
4293
  <div class="cb-message-row" part="cb-message-row">
4280
4294
  <!-- message -->
4281
- ${ue(
4295
+ ${ge(
4282
4296
  this._isBot,
4283
4297
  () => this.renderBotMessage(this.message),
4284
4298
  () => this.renderUserMessage(this.message)
@@ -4315,7 +4329,7 @@ let $e = class extends Q {
4315
4329
  renderMessageContent(a) {
4316
4330
  var t;
4317
4331
  return a.isThinking ? w`<cb-thinking></cb-thinking>` : a.isUploading ? w`<cb-uploading .files="${a.data.files || []}"></cb-uploading>` : a.type === "text" ? w`<div class="cb-message-text">
4318
- ${ue(
4332
+ ${ge(
4319
4333
  a.data.userName,
4320
4334
  () => w`<div style="font-size: 12px; color:#9ca3af">${a.data.userName}</div>`,
4321
4335
  () => null
@@ -4337,9 +4351,9 @@ let $e = class extends Q {
4337
4351
  var t;
4338
4352
  if (a.data.userName && a.data.userName !== "") {
4339
4353
  const c = ((t = a.data) == null ? void 0 : t.userAvatar) || "";
4340
- return c !== "" ? w` <img src="${c}" style="width: 24px;height: 24px;" /> ` : He`${ke(k.setting.agentIconSvg)}`;
4354
+ return c !== "" ? w` <img src="${c}" style="width: 24px;height: 24px;" /> ` : He`${ke(x.setting.agentIconSvg)}`;
4341
4355
  }
4342
- return a.author === "system" ? He`${ke(k.setting.systemIconSvg)}` : He`${ke(k.setting.botIconSvg)}`;
4356
+ return a.author === "system" ? He`${ke(x.setting.systemIconSvg)}` : He`${ke(x.setting.botIconSvg)}`;
4343
4357
  }
4344
4358
  renderBotMessage(a) {
4345
4359
  return w`
@@ -4355,7 +4369,7 @@ let $e = class extends Q {
4355
4369
  <!--<sl-avatar class="avatar user-avatar small" label="User">
4356
4370
  <cb-icon slot="icon" svg="${Hc}" color="white"></cb-icon>
4357
4371
  </sl-avatar>-->
4358
- <div class="avatar user-avatar">${ke(k.setting.userIconSvg)}</div>
4372
+ <div class="avatar user-avatar">${ke(x.setting.userIconSvg)}</div>
4359
4373
  ${this.renderMessage(a)}
4360
4374
  </div>
4361
4375
  `;
@@ -4363,10 +4377,10 @@ let $e = class extends Q {
4363
4377
  };
4364
4378
  $e.styles = qc;
4365
4379
  Ve([
4366
- C({ type: Object })
4380
+ k({ type: Object })
4367
4381
  ], $e.prototype, "message", 2);
4368
4382
  Ve([
4369
- C({ type: String })
4383
+ k({ type: String })
4370
4384
  ], $e.prototype, "type", 2);
4371
4385
  Ve([
4372
4386
  Nt(".code-block-header__copy")
@@ -4377,13 +4391,13 @@ Ve([
4377
4391
  $e = Ve([
4378
4392
  Y("cb-message")
4379
4393
  ], $e);
4380
- var Fc = Object.defineProperty, Nc = Object.getOwnPropertyDescriptor, ge = (a, t, c, i) => {
4394
+ var Fc = Object.defineProperty, Nc = Object.getOwnPropertyDescriptor, me = (a, t, c, i) => {
4381
4395
  for (var n = i > 1 ? void 0 : i ? Nc(t, c) : t, f = a.length - 1, b; f >= 0; f--)
4382
4396
  (b = a[f]) && (n = (i ? b(t, c, n) : b(n)) || n);
4383
4397
  return i && n && Fc(t, c, n), n;
4384
4398
  };
4385
- const xe = ft.noConflict();
4386
- xe.setLevel("info");
4399
+ const pe = ft.noConflict();
4400
+ pe.setLevel("info");
4387
4401
  let fe = class extends Q {
4388
4402
  constructor() {
4389
4403
  super(...arguments), this.messages = [], this.actions = [], this.form = null, this.calendlyInjected = !1, this.activeCalendlyAction = -1, this.hubspotMeetingInjected = !1, this.activeHubspotMeetingAction = -1;
@@ -4415,7 +4429,7 @@ let fe = class extends Q {
4415
4429
  this.form.fields,
4416
4430
  (a, t) => t,
4417
4431
  (a) => {
4418
- const t = (a == null ? void 0 : a.required) || !1, c = k.getPrefilledFormFieldValue(a.name);
4432
+ const t = (a == null ? void 0 : a.required) || !1, c = x.getPrefilledFormFieldValue(a.name);
4419
4433
  switch (a.type) {
4420
4434
  case "string":
4421
4435
  return w`<sl-input value="${c}" class="cb-input-form-input" id="${"cb-form-field" + a.name}" name="${a.name}" label="${a.title}" ?required="${t}"></sl-input>`;
@@ -4449,14 +4463,14 @@ let fe = class extends Q {
4449
4463
  return;
4450
4464
  }
4451
4465
  }
4452
- k.submitForm(t).then(() => {
4453
- xe.info("Form submitted", t), this.emit("form:submit", {
4466
+ x.submitForm(t).then(() => {
4467
+ pe.info("Form submitted", t), this.emit("form:submit", {
4454
4468
  detail: {
4455
4469
  formData: t
4456
4470
  }
4457
4471
  });
4458
4472
  }).catch((c) => {
4459
- xe.error(`Error when submitting form: ${c.message}`);
4473
+ pe.error(`Error when submitting form: ${c.message}`);
4460
4474
  });
4461
4475
  }
4462
4476
  /* Form sample
@@ -4496,18 +4510,18 @@ let fe = class extends Q {
4496
4510
  return null;
4497
4511
  }
4498
4512
  handleCalendlyEvent(a) {
4499
- switch (xe.info("Got Calendly Event:", a.data), a.data.event) {
4513
+ switch (pe.info("Got Calendly Event:", a.data), a.data.event) {
4500
4514
  case "calendly.event_scheduled": {
4501
4515
  const t = this.activeCalendlyAction;
4502
- t >= 0 && (k.removeAction(t), k.addSystemMessage("Your meeting has been scheduled!"), this.activeCalendlyAction = -1);
4516
+ t >= 0 && (x.removeAction(t), x.addSystemMessage("Your meeting has been scheduled!"), this.activeCalendlyAction = -1);
4503
4517
  }
4504
4518
  }
4505
4519
  }
4506
4520
  invokeLinkAction(a = {}) {
4507
- xe.info("invokeLinkAction:", a), window.open(a.url, "_blank");
4521
+ pe.info("invokeLinkAction:", a), window.open(a.url, "_blank");
4508
4522
  }
4509
4523
  invokeCalendlyAction(a = {}) {
4510
- return xe.info("invokeCalendlyAction:", a), "Calendly" in window && (this.activeCalendlyAction = a.internalId, window.Calendly.initPopupWidget({ url: a.url })), !1;
4524
+ return pe.info("invokeCalendlyAction:", a), "Calendly" in window && (this.activeCalendlyAction = a.internalId, window.Calendly.initPopupWidget({ url: a.url })), !1;
4511
4525
  }
4512
4526
  renderCalendlyAction(a) {
4513
4527
  if (!("Calendly" in window) && !this.calendlyInjected) {
@@ -4551,23 +4565,30 @@ let fe = class extends Q {
4551
4565
  `;
4552
4566
  }
4553
4567
  invokeHubspotMeetingAction(a = {}) {
4554
- var t, c;
4555
- if (xe.info("invokeHubspotMeetingAction:", a), "hbspt" in window && typeof ((c = (t = window.hbspt) == null ? void 0 : t.meetings) == null ? void 0 : c.create) == "function") {
4556
- const i = document.getElementById("enegelai-bot-hubspot-meeting-container"), n = document.querySelector(".enegelai-bot-hubspot-meeting-widget");
4557
- if (i && n) {
4558
- const f = a.url + "?embed=true";
4559
- n.setAttribute("data-src", f), this.activeHubspotMeetingAction = a.internalId, i.style.display = "block", window.hbspt.meetings.create(".enegelai-bot-hubspot-meeting-widget");
4568
+ var c, i;
4569
+ const t = Date.now();
4570
+ if (this.activeHubspotMeetingAction !== -1) {
4571
+ pe.info(`invokeHubspotMeetingAction: action ${this.activeHubspotMeetingAction} is already active - ignored`);
4572
+ return;
4573
+ }
4574
+ if (pe.info("invokeHubspotMeetingAction:", a), "hbspt" in window && typeof ((i = (c = window.hbspt) == null ? void 0 : c.meetings) == null ? void 0 : i.create) == "function") {
4575
+ const n = document.getElementById("enegelai-bot-hubspot-meeting-container"), f = document.querySelector(".enegelai-bot-hubspot-meeting-widget");
4576
+ if (n && f) {
4577
+ const b = a.url + "?embed=true";
4578
+ f.setAttribute("data-src", b), this.activeHubspotMeetingAction = a.internalId, n.style.display = "block", window.hbspt.meetings.create(".enegelai-bot-hubspot-meeting-widget"), x.updateAction(a, {
4579
+ triggered: t
4580
+ });
4560
4581
  }
4561
4582
  }
4562
4583
  return !1;
4563
4584
  }
4564
4585
  handleHubspotEvent(a) {
4565
4586
  var i;
4566
- if (xe.info("Got Hubspot Event:", a.data), !(((i = a == null ? void 0 : a.data) == null ? void 0 : i.meetingBookSucceeded) || !1))
4587
+ if (pe.info("Got Hubspot Event:", a.data), !(((i = a == null ? void 0 : a.data) == null ? void 0 : i.meetingBookSucceeded) || !1))
4567
4588
  return;
4568
4589
  const c = this.activeHubspotMeetingAction;
4569
4590
  if (c >= 0) {
4570
- k.removeAction(c), k.addSystemMessage("Your meeting has been scheduled!"), this.activeHubspotMeetingAction = -1;
4591
+ x.removeAction(c), x.addSystemMessage("Your meeting has been scheduled!"), this.activeHubspotMeetingAction = -1;
4571
4592
  const n = document.getElementById("enegelai-bot-hubspot-meeting-container");
4572
4593
  n && (n.style.display = "none");
4573
4594
  }
@@ -4582,8 +4603,8 @@ let fe = class extends Q {
4582
4603
  const t = document.createElement("script");
4583
4604
  t.src = "https://static.hsappstatic.net/MeetingsEmbed/ex/MeetingsEmbedCode.js", document.getElementsByTagName("head")[0].appendChild(t);
4584
4605
  let c = document.createElement("div");
4585
- c.innerHTML = `<div id="enegelai-bot-hubspot-meeting-container" style="display:none;position:fixed;top:0;left:0;z-index:10100;width: 100%;height: 100vh;background-color: rgba(0,0,0,0.5)">
4586
- <div style="max-width: 850px; margin: 10px auto 0 auto; text-align: right;">
4606
+ c.innerHTML = `<div id="enegelai-bot-hubspot-meeting-container" style="display:none;position:fixed;top:0;left:0;z-index:10100;width: 100%;height: 100vh;background-color: rgba(0,0,0,0.6)">
4607
+ <div style="display:flex;align-items: center;justify-content:end;max-width: 850px; margin: 10px auto 0 auto;">
4587
4608
  <svg id="enegelai-bot-hubspot-meeting-cancel" style="cursor:pointer;color: black;padding: 4px 4px;border-radius: 9999px;background-color: white;" xmlns="http://www.w3.org/2000/svg" width="32px" height="32px" viewBox="0 0 24 24"><path fill="currentColor" d="M19,6.41L17.59,5L12,10.59L6.41,5L5,6.41L10.59,12L5,17.59L6.41,19L12,13.41L17.59,19L19,17.59L13.41,12L19,6.41Z" /></svg>
4588
4609
  </div>
4589
4610
  <div class="enegelai-bot-hubspot-meeting-widget"></div>
@@ -4596,7 +4617,9 @@ let fe = class extends Q {
4596
4617
  this.handleHubspotMeetingCancel();
4597
4618
  }), this.hubspotMeetingInjected = !0;
4598
4619
  }
4599
- return w`
4620
+ return a != null && a.hubspotMeetingAuto && !("triggered" in a) && setTimeout(() => {
4621
+ this.invokeHubspotMeetingAction(a);
4622
+ }, 500), w`
4600
4623
  <div class="cb-actions-list">
4601
4624
  <div class="cb-action ripple" @click="${this.invokeHubspotMeetingAction.bind(this, a)}">
4602
4625
  <div class="cb-action-icon">
@@ -4614,35 +4637,35 @@ let fe = class extends Q {
4614
4637
  }
4615
4638
  };
4616
4639
  fe.styles = gc;
4617
- ge([
4618
- C({ type: Array })
4640
+ me([
4641
+ k({ type: Array })
4619
4642
  ], fe.prototype, "messages", 2);
4620
- ge([
4621
- C({ type: Array })
4643
+ me([
4644
+ k({ type: Array })
4622
4645
  ], fe.prototype, "actions", 2);
4623
- ge([
4624
- C({ type: Object })
4646
+ me([
4647
+ k({ type: Object })
4625
4648
  ], fe.prototype, "form", 2);
4626
- ge([
4649
+ me([
4627
4650
  De("#cb-message-list-bottom-anchor")
4628
4651
  ], fe.prototype, "_messageListBottomAnchor", 2);
4629
- ge([
4652
+ me([
4630
4653
  De(".cb-input-form")
4631
4654
  ], fe.prototype, "_inputForm", 2);
4632
- ge([
4655
+ me([
4633
4656
  xt({ capture: !1, passive: !0 })
4634
4657
  ], fe.prototype, "invokeLinkAction", 1);
4635
- ge([
4658
+ me([
4636
4659
  xt({ capture: !1, passive: !0 })
4637
4660
  ], fe.prototype, "invokeCalendlyAction", 1);
4638
- ge([
4661
+ me([
4639
4662
  xt({ capture: !1, passive: !0 })
4640
4663
  ], fe.prototype, "invokeHubspotMeetingAction", 1);
4641
- fe = ge([
4664
+ fe = me([
4642
4665
  Y("cb-message-list")
4643
4666
  ], fe);
4644
4667
  const Uc = U`
4645
- ${he}
4668
+ ${ue}
4646
4669
 
4647
4670
  :host {
4648
4671
  width: 100%;
@@ -4685,7 +4708,7 @@ const Uc = U`
4685
4708
  padding: 0 5px;
4686
4709
  }
4687
4710
  `, Wc = '<svg viewBox="0 0 16 16" width="1.2em" height="1.2em" ><path fill="currentColor" d="M15.854.146a.5.5 0 0 1 .11.54l-5.819 14.547a.75.75 0 0 1-1.329.124l-3.178-4.995L.643 7.184a.75.75 0 0 1 .124-1.33L15.314.037a.5.5 0 0 1 .54.11ZM6.636 10.07l2.761 4.338L14.13 2.576zm6.787-8.201L1.591 6.602l4.339 2.76l7.494-7.493Z"/></svg>', Yc = '<svg viewBox="0 0 16 16" width="1.2em" height="1.2em" ><path fill="currentColor" d="M4.5 3a2.5 2.5 0 0 1 5 0v9a1.5 1.5 0 0 1-3 0V5a.5.5 0 0 1 1 0v7a.5.5 0 0 0 1 0V3a1.5 1.5 0 1 0-3 0v9a2.5 2.5 0 0 0 5 0V5a.5.5 0 0 1 1 0v7a3.5 3.5 0 1 1-7 0z"/></svg>';
4688
- var Xc = Object.defineProperty, Zc = Object.getOwnPropertyDescriptor, me = (a, t, c, i) => {
4711
+ var Xc = Object.defineProperty, Zc = Object.getOwnPropertyDescriptor, ye = (a, t, c, i) => {
4689
4712
  for (var n = i > 1 ? void 0 : i ? Zc(t, c) : t, f = a.length - 1, b; f >= 0; f--)
4690
4713
  (b = a[f]) && (n = (i ? b(t, c, n) : b(n)) || n);
4691
4714
  return i && n && Xc(t, c, n), n;
@@ -4746,7 +4769,7 @@ let de = class extends Q {
4746
4769
  ></sl-textarea>
4747
4770
 
4748
4771
  <span class="cb-input-buttons">
4749
- ${ue(
4772
+ ${ge(
4750
4773
  this.enableFileUpload,
4751
4774
  () => w`
4752
4775
  <sl-button @click=${this._sendFileHandler} name="paperclip" label="Attachment" size="large" class="paperclip-button" variant="text" circle>
@@ -4769,35 +4792,35 @@ let de = class extends Q {
4769
4792
  }
4770
4793
  };
4771
4794
  de.styles = Uc;
4772
- me([
4773
- C({ type: String, attribute: "placeholder" })
4795
+ ye([
4796
+ k({ type: String, attribute: "placeholder" })
4774
4797
  ], de.prototype, "placeholder", 2);
4775
- me([
4776
- C({ type: String, attribute: "send-button-label" })
4798
+ ye([
4799
+ k({ type: String, attribute: "send-button-label" })
4777
4800
  ], de.prototype, "sendButtonLabel", 2);
4778
- me([
4779
- C({ type: Boolean, attribute: "enable-file-upload" })
4801
+ ye([
4802
+ k({ type: Boolean, attribute: "enable-file-upload" })
4780
4803
  ], de.prototype, "enableFileUpload", 2);
4781
- me([
4782
- C({ type: String })
4804
+ ye([
4805
+ k({ type: String })
4783
4806
  ], de.prototype, "value", 2);
4784
- me([
4785
- C({ type: Boolean })
4807
+ ye([
4808
+ k({ type: Boolean })
4786
4809
  ], de.prototype, "loading", 2);
4787
- me([
4788
- C({ type: Boolean })
4810
+ ye([
4811
+ k({ type: Boolean })
4789
4812
  ], de.prototype, "disabled", 2);
4790
- me([
4791
- C({ type: String })
4813
+ ye([
4814
+ k({ type: String })
4792
4815
  ], de.prototype, "currentKey", 2);
4793
- me([
4816
+ ye([
4794
4817
  De("sl-textarea")
4795
4818
  ], de.prototype, "inputElement", 2);
4796
- de = me([
4819
+ de = ye([
4797
4820
  Y("cb-user-input")
4798
4821
  ], de);
4799
4822
  const Gc = U`
4800
- ${he}
4823
+ ${ue}
4801
4824
 
4802
4825
  sl-dialog::part(base) {
4803
4826
  z-index: 1000;
@@ -4882,13 +4905,13 @@ let Oe = class extends Q {
4882
4905
  };
4883
4906
  Oe.styles = Gc;
4884
4907
  dt([
4885
- C({ type: Boolean })
4908
+ k({ type: Boolean })
4886
4909
  ], Oe.prototype, "open", 2);
4887
4910
  dt([
4888
- C({ type: String, attribute: "label" })
4911
+ k({ type: String, attribute: "label" })
4889
4912
  ], Oe.prototype, "label", 2);
4890
4913
  dt([
4891
- C({ type: Number })
4914
+ k({ type: Number })
4892
4915
  ], Oe.prototype, "zindex", 2);
4893
4916
  Oe = dt([
4894
4917
  Y("cb-dialog")
@@ -4941,7 +4964,7 @@ ct.styles = U`
4941
4964
  }
4942
4965
  `;
4943
4966
  ta([
4944
- C({ type: Boolean })
4967
+ k({ type: Boolean })
4945
4968
  ], ct.prototype, "open", 2);
4946
4969
  ct = ta([
4947
4970
  Y("cb-clear-message-dialog")
@@ -5050,7 +5073,7 @@ let Ce = class extends Q {
5050
5073
  Enable it for your own backend.
5051
5074
  </sl-switch>
5052
5075
  </div> -->
5053
- ${ue(
5076
+ ${ge(
5054
5077
  this.customRequest,
5055
5078
  () => null,
5056
5079
  () => this.renderInternalServices()
@@ -5176,25 +5199,25 @@ let Ce = class extends Q {
5176
5199
  };
5177
5200
  Ce.styles = ti;
5178
5201
  Pe([
5179
- C({ type: Boolean })
5202
+ k({ type: Boolean })
5180
5203
  ], Ce.prototype, "open", 2);
5181
5204
  Pe([
5182
- C({ type: Object })
5205
+ k({ type: Object })
5183
5206
  ], Ce.prototype, "setting", 2);
5184
5207
  Pe([
5185
- C({ type: Boolean })
5208
+ k({ type: Boolean })
5186
5209
  ], Ce.prototype, "clearMessageDialogOpen", 2);
5187
5210
  Pe([
5188
5211
  De("sl-dialog")
5189
5212
  ], Ce.prototype, "dialog", 2);
5190
5213
  Pe([
5191
- C({ type: Boolean })
5214
+ k({ type: Boolean })
5192
5215
  ], Ce.prototype, "customRequest", 2);
5193
5216
  Ce = Pe([
5194
5217
  Y("cb-setting")
5195
5218
  ], Ce);
5196
5219
  const ii = U`
5197
- ${he}
5220
+ ${ue}
5198
5221
  :host {
5199
5222
  --primary-color: var(--sl-color-primary-600);
5200
5223
 
@@ -5296,7 +5319,7 @@ var si = Object.defineProperty, oi = Object.getOwnPropertyDescriptor, aa = (a, t
5296
5319
  };
5297
5320
  let it = class extends Q {
5298
5321
  constructor() {
5299
- super(...arguments), this.store = new Wt(this, k), this.open = !1;
5322
+ super(...arguments), this.store = new Wt(this, x), this.open = !1;
5300
5323
  }
5301
5324
  // handler click
5302
5325
  _clickHandler() {
@@ -5308,14 +5331,14 @@ let it = class extends Q {
5308
5331
  }), this.open = a;
5309
5332
  }
5310
5333
  _engageClickHandler(a) {
5311
- console.log("engage close clicked!"), k.suppressEngagePopup(), a.stopPropagation();
5334
+ console.log("engage close clicked!"), x.suppressEngagePopup(), a.stopPropagation();
5312
5335
  }
5313
5336
  render() {
5314
5337
  return w`
5315
5338
  <div class="cb-anchor ${this.open ? "open" : ""}" part="cb-anchor" @click=${this._clickHandler.bind(this)}>
5316
- <sl-popup placement="top-end" distance="16" ?active="${k.engage && !k.open}">
5339
+ <sl-popup placement="top-end" distance="16" ?active="${x.engage && !x.open}">
5317
5340
  <sl-button slot="anchor" label="Start" size="large" variant="primary" class="icon anchor-button" circle>
5318
- ${ue(
5341
+ ${ge(
5319
5342
  this.open,
5320
5343
  () => w`<cb-icon color="white" svg="${et}"></cb-icon>`,
5321
5344
  () => w`<cb-icon color="white" svg="${ni}"></cb-icon>`
@@ -5324,13 +5347,13 @@ let it = class extends Q {
5324
5347
  <div class="cb-engage-popup">
5325
5348
  <div class="cb-engage-popup-close" @click=${this._engageClickHandler.bind(this)}>${He`${ke(et)}`}</div>
5326
5349
  <div class="cb-engage-popup-content">
5327
- ${ue(
5328
- k.setting.logoUrl !== "",
5329
- () => w`<img class="cb-engage-popup-img" src="${k.setting.logoUrl}" />`,
5330
- () => w`<div class="cb-engage-popup-logo">${He`${ke(k.setting.logoSvg)}`}</div>`
5350
+ ${ge(
5351
+ x.setting.logoUrl !== "",
5352
+ () => w`<img class="cb-engage-popup-img" src="${x.setting.logoUrl}" />`,
5353
+ () => w`<div class="cb-engage-popup-logo">${He`${ke(x.setting.logoSvg)}`}</div>`
5331
5354
  )}
5332
- <!--<cb-icon class="cb-engage-popup-logo" svg="${k.setting.logoSvg}"></cb-icon>-->
5333
- <div>${k.setting.engageMessage}</div>
5355
+ <!--<cb-icon class="cb-engage-popup-logo" svg="${x.setting.logoSvg}"></cb-icon>-->
5356
+ <div>${x.setting.engageMessage}</div>
5334
5357
  </div>
5335
5358
  </div>
5336
5359
  </sl-popup>
@@ -5340,13 +5363,13 @@ let it = class extends Q {
5340
5363
  };
5341
5364
  it.styles = ii;
5342
5365
  aa([
5343
- C({ type: Boolean })
5366
+ k({ type: Boolean })
5344
5367
  ], it.prototype, "open", 2);
5345
5368
  it = aa([
5346
5369
  Y("cb-anchor")
5347
5370
  ], it);
5348
5371
  const ri = U`
5349
- ${he}
5372
+ ${ue}
5350
5373
  `, qt = '<svg viewBox="0 0 16 16" width="1.2em" height="1.2em" ><g fill="currentColor"><path d="M4.54.146A.5.5 0 0 1 4.893 0h6.214a.5.5 0 0 1 .353.146l4.394 4.394a.5.5 0 0 1 .146.353v6.214a.5.5 0 0 1-.146.353l-4.394 4.394a.5.5 0 0 1-.353.146H4.893a.5.5 0 0 1-.353-.146L.146 11.46A.5.5 0 0 1 0 11.107V4.893a.5.5 0 0 1 .146-.353L4.54.146zM5.1 1L1 5.1v5.8L5.1 15h5.8l4.1-4.1V5.1L10.9 1z"/><path d="M7.002 11a1 1 0 1 1 2 0a1 1 0 0 1-2 0zM7.1 4.995a.905.905 0 1 1 1.8 0l-.35 3.507a.552.552 0 0 1-1.1 0z"/></g></svg>', fi = '<svg viewBox="0 0 16 16" width="1.2em" height="1.2em" ><g fill="currentColor"><path d="M7.938 2.016A.13.13 0 0 1 8.002 2a.13.13 0 0 1 .063.016a.146.146 0 0 1 .054.057l6.857 11.667c.036.06.035.124.002.183a.163.163 0 0 1-.054.06a.116.116 0 0 1-.066.017H1.146a.115.115 0 0 1-.066-.017a.163.163 0 0 1-.054-.06a.176.176 0 0 1 .002-.183L7.884 2.073a.147.147 0 0 1 .054-.057zm1.044-.45a1.13 1.13 0 0 0-1.96 0L.165 13.233c-.457.778.091 1.767.98 1.767h13.713c.889 0 1.438-.99.98-1.767L8.982 1.566z"/><path d="M7.002 12a1 1 0 1 1 2 0a1 1 0 0 1-2 0zM7.1 5.995a.905.905 0 1 1 1.8 0l-.35 3.507a.552.552 0 0 1-1.1 0z"/></g></svg>', di = '<svg viewBox="0 0 16 16" width="1.2em" height="1.2em" ><g fill="currentColor"><path d="M2.5 8a5.5 5.5 0 0 1 8.25-4.764a.5.5 0 0 0 .5-.866A6.5 6.5 0 1 0 14.5 8a.5.5 0 0 0-1 0a5.5 5.5 0 1 1-11 0"/><path d="M15.354 3.354a.5.5 0 0 0-.708-.708L8 9.293L5.354 6.646a.5.5 0 1 0-.708.708l3 3a.5.5 0 0 0 .708 0l7-7z"/></g></svg>', li = '<svg viewBox="0 0 16 16" width="1.2em" height="1.2em" ><g fill="currentColor"><path d="M8 15A7 7 0 1 1 8 1a7 7 0 0 1 0 14m0 1A8 8 0 1 0 8 0a8 8 0 0 0 0 16"/><path d="m8.93 6.588l-2.29.287l-.082.38l.45.083c.294.07.352.176.288.469l-.738 3.468c-.194.897.105 1.319.808 1.319c.545 0 1.178-.252 1.465-.598l.088-.416c-.2.176-.492.246-.686.246c-.275 0-.375-.193-.304-.533zM9 4.5a1 1 0 1 1-2 0a1 1 0 0 1 2 0"/></g></svg>';
5351
5374
  var bi = Object.defineProperty, hi = Object.getOwnPropertyDescriptor, ca = (a, t, c, i) => {
5352
5375
  for (var n = i > 1 ? void 0 : i ? hi(t, c) : t, f = a.length - 1, b; f >= 0; f--)
@@ -5386,7 +5409,7 @@ let nt = class extends Q {
5386
5409
  };
5387
5410
  nt.styles = Jt;
5388
5411
  ca([
5389
- C({ type: String })
5412
+ k({ type: String })
5390
5413
  ], nt.prototype, "status", 2);
5391
5414
  nt = ca([
5392
5415
  Y("cb-status-icon")
@@ -5418,8 +5441,8 @@ vt = gi([
5418
5441
  ], vt);
5419
5442
  class Dt extends Error {
5420
5443
  constructor(t, c, i) {
5421
- const n = t.status || t.status === 0 ? t.status : "", f = t.statusText || "", b = `${n} ${f}`.trim(), x = b ? `status code ${b}` : "an unknown error";
5422
- super(`Request failed with ${x}`), Object.defineProperty(this, "response", {
5444
+ const n = t.status || t.status === 0 ? t.status : "", f = t.statusText || "", b = `${n} ${f}`.trim(), C = b ? `status code ${b}` : "an unknown error";
5445
+ super(`Request failed with ${C}`), Object.defineProperty(this, "response", {
5423
5446
  enumerable: !0,
5424
5447
  configurable: !0,
5425
5448
  writable: !0,
@@ -5518,14 +5541,14 @@ async function Ti(a, t, c) {
5518
5541
  });
5519
5542
  });
5520
5543
  }
5521
- const Ei = !!globalThis.DOMException;
5544
+ const Mi = !!globalThis.DOMException;
5522
5545
  function Ft(a) {
5523
- if (Ei)
5546
+ if (Mi)
5524
5547
  return new DOMException((a == null ? void 0 : a.reason) ?? "The operation was aborted.", "AbortError");
5525
5548
  const t = new Error((a == null ? void 0 : a.reason) ?? "The operation was aborted.");
5526
5549
  return t.name = "AbortError", t;
5527
5550
  }
5528
- async function Mi(a, { signal: t }) {
5551
+ async function Ei(a, { signal: t }) {
5529
5552
  return new Promise((c, i) => {
5530
5553
  if (t) {
5531
5554
  if (t.aborted) {
@@ -5549,13 +5572,13 @@ class st {
5549
5572
  if (i._options.timeout > pt)
5550
5573
  throw new RangeError(`The \`timeout\` option cannot be greater than ${pt}`);
5551
5574
  await Promise.resolve();
5552
- let x = await i._fetch();
5575
+ let C = await i._fetch();
5553
5576
  for (const S of i._options.hooks.afterResponse) {
5554
- const V = await S(i.request, i._options, i._decorateResponse(x.clone()));
5555
- V instanceof globalThis.Response && (x = V);
5577
+ const V = await S(i.request, i._options, i._decorateResponse(C.clone()));
5578
+ V instanceof globalThis.Response && (C = V);
5556
5579
  }
5557
- if (i._decorateResponse(x), !x.ok && i._options.throwHttpErrors) {
5558
- let S = new Dt(x, i.request, i._options);
5580
+ if (i._decorateResponse(C), !C.ok && i._options.throwHttpErrors) {
5581
+ let S = new Dt(C, i.request, i._options);
5559
5582
  for (const V of i._options.hooks.beforeError)
5560
5583
  S = await V(S);
5561
5584
  throw S;
@@ -5565,21 +5588,21 @@ class st {
5565
5588
  throw new TypeError("The `onDownloadProgress` option must be a function");
5566
5589
  if (!vi)
5567
5590
  throw new Error("Streams are not supported in your environment. `ReadableStream` is missing.");
5568
- return i._stream(x.clone(), i._options.onDownloadProgress);
5591
+ return i._stream(C.clone(), i._options.onDownloadProgress);
5569
5592
  }
5570
- return x;
5593
+ return C;
5571
5594
  }, b = i._options.retry.methods.includes(i.request.method.toLowerCase()) ? i._retry(n) : n();
5572
- for (const [x, S] of Object.entries(xi))
5573
- b[x] = async () => {
5595
+ for (const [C, S] of Object.entries(xi))
5596
+ b[C] = async () => {
5574
5597
  i.request.headers.set("accept", i.request.headers.get("accept") || S);
5575
5598
  const L = (await b).clone();
5576
- if (x === "json") {
5599
+ if (C === "json") {
5577
5600
  if (L.status === 204 || (await L.clone().arrayBuffer()).byteLength === 0)
5578
5601
  return "";
5579
5602
  if (c.parseJson)
5580
5603
  return c.parseJson(await L.text());
5581
5604
  }
5582
- return L[x]();
5605
+ return L[C]();
5583
5606
  };
5584
5607
  return b;
5585
5608
  }
@@ -5677,7 +5700,7 @@ class st {
5677
5700
  } catch (c) {
5678
5701
  const i = Math.min(this._calculateRetryDelay(c), pt);
5679
5702
  if (i !== 0 && this._retryCount > 0) {
5680
- await Mi(i, { signal: this._options.signal });
5703
+ await Ei(i, { signal: this._options.signal });
5681
5704
  for (const n of this._options.hooks.beforeRetry)
5682
5705
  if (await n({
5683
5706
  request: this.request,
@@ -5715,7 +5738,7 @@ class st {
5715
5738
  async start(f) {
5716
5739
  const b = t.body.getReader();
5717
5740
  c && c({ percent: 0, transferredBytes: 0, totalBytes: i }, new Uint8Array());
5718
- async function x() {
5741
+ async function C() {
5719
5742
  const { done: S, value: V } = await b.read();
5720
5743
  if (S) {
5721
5744
  f.close();
@@ -5726,9 +5749,9 @@ class st {
5726
5749
  const L = i === 0 ? 0 : n / i;
5727
5750
  c({ percent: L, transferredBytes: n, totalBytes: i }, V);
5728
5751
  }
5729
- f.enqueue(V), await x();
5752
+ f.enqueue(V), await C();
5730
5753
  }
5731
- await x();
5754
+ await C();
5732
5755
  }
5733
5756
  }), {
5734
5757
  status: t.status,
@@ -5752,17 +5775,17 @@ const wt = (a) => {
5752
5775
  }
5753
5776
  });
5754
5777
  async function Li(a, t) {
5755
- const { onmessage: c, onclose: i, ...n } = t, f = async (b, x) => {
5756
- const { value: S, done: V } = await x.read();
5757
- V ? (b.close(), i == null || i()) : (c == null || c(S), b.enqueue(S), f(b, x));
5778
+ const { onmessage: c, onclose: i, ...n } = t, f = async (b, C) => {
5779
+ const { value: S, done: V } = await C.read();
5780
+ V ? (b.close(), i == null || i()) : (c == null || c(S), b.enqueue(S), f(b, C));
5758
5781
  };
5759
5782
  return n.body && typeof n.body == "object" && (n.body = JSON.stringify(n.body)), console.log("Fetching:", n), fetch(a, n).then((b) => {
5760
- const x = b.body.getReader();
5783
+ const C = b.body.getReader();
5761
5784
  return new ReadableStream({
5762
5785
  start(V) {
5763
5786
  f(
5764
5787
  V,
5765
- x
5788
+ C
5766
5789
  );
5767
5790
  }
5768
5791
  });
@@ -5789,22 +5812,22 @@ async function ji(a, t) {
5789
5812
  };
5790
5813
  }
5791
5814
  }
5792
- var Oi = Object.defineProperty, Pi = Object.getOwnPropertyDescriptor, R = (a, t, c, i) => {
5815
+ var Oi = Object.defineProperty, Pi = Object.getOwnPropertyDescriptor, B = (a, t, c, i) => {
5793
5816
  for (var n = i > 1 ? void 0 : i ? Pi(t, c) : t, f = a.length - 1, b; f >= 0; f--)
5794
5817
  (b = a[f]) && (n = (i ? b(t, c, n) : b(n)) || n);
5795
5818
  return i && n && Oi(t, c, n), n;
5796
5819
  };
5797
5820
  const ze = ft.noConflict();
5798
5821
  ze.setLevel("info");
5799
- let H = class extends Q {
5822
+ let P = class extends Q {
5800
5823
  constructor() {
5801
- super(...arguments), this.store = new Wt(this, k), this.displayLicense = !1, this.name = "ChatBot", this.orgId = "", this.botId = "", this.url = "ws://localhost:3070", this.logoUrl = "", this.logoSvg = ` <svg width="24" height="24" viewBox="0 0 40 40">
5824
+ super(...arguments), this.store = new Wt(this, x), this.displayLicense = !1, this.name = "ChatBot", this.orgId = "", this.botId = "", this.url = "ws://localhost:3070", this.logoUrl = "", this.logoSvg = ` <svg width="24" height="24" viewBox="0 0 40 40">
5802
5825
  <path
5803
5826
  d="M34.728 0.275L2.245 15.267c-3.748 1.749 -2.498 7.246 1.499 7.246h13.743v13.743c0 3.998 5.497 5.248 7.246 1.499l14.992 -32.483c1.249 -2.999 -1.999 -6.248 -4.998 -4.998z"
5804
5827
  fill="#E24D42"
5805
5828
  ></path>
5806
5829
  </svg>
5807
- `, this.botIconSvg = '<svg fill="currentColor" width="24" height="24" viewBox="0 0 24 24"> <path d="M16 17V19H2V17S2 13 9 13 16 17 16 17M12.5 7.5A3.5 3.5 0 1 0 9 11A3.5 3.5 0 0 0 12.5 7.5M15.94 13A5.32 5.32 0 0 1 18 17V19H22V17S22 13.37 15.94 13M15 4A3.39 3.39 0 0 0 13.07 4.59A5 5 0 0 1 13.07 10.41A3.39 3.39 0 0 0 15 11A3.5 3.5 0 0 0 15 4Z" /></svg>', this.userIconSvg = '<svg fill="currentColor" viewBox="0 0 24 24" width="24" height="24"> <path d="M12 4a4 4 0 0 1 4 4a4 4 0 0 1-4 4a4 4 0 0 1-4-4a4 4 0 0 1 4-4m0 10c4.42 0 8 1.79 8 4v2H4v-2c0-2.21 3.58-4 8-4Z" /></svg>', this.systemIconSvg = '<svg fill="currentColor" width="24" height="24" viewBox="0 0 24 24"> <path d="M11,9H13V7H11M12,20C7.59,20 4,16.41 4,12C4,7.59 7.59,4 12,4C16.41,4 20,7.59 20,12C20,16.41 16.41,20 12,20M12,2A10,10 0 0,0 2,12A10,10 0 0,0 12,22A10,10 0 0,0 22,12A10,10 0 0,0 12,2M11,17H13V11H11V17Z"/></svg>', this.agentIconSvg = '<svg fill="currentColor" width="24" height="24" viewBox="0 0 24 24"> <path d="M18.72,14.76C19.07,13.91 19.26,13 19.26,12C19.26,11.28 19.15,10.59 18.96,9.95C18.31,10.1 17.63,10.18 16.92,10.18C13.86,10.18 11.15,8.67 9.5,6.34C8.61,8.5 6.91,10.26 4.77,11.22C4.73,11.47 4.73,11.74 4.73,12A7.27,7.27 0 0,0 12,19.27C13.05,19.27 14.06,19.04 14.97,18.63C15.54,19.72 15.8,20.26 15.78,20.26C14.14,20.81 12.87,21.08 12,21.08C9.58,21.08 7.27,20.13 5.57,18.42C4.53,17.38 3.76,16.11 3.33,14.73H2V10.18H3.09C3.93,6.04 7.6,2.92 12,2.92C14.4,2.92 16.71,3.87 18.42,5.58C19.69,6.84 20.54,8.45 20.89,10.18H22V14.67H22V14.69L22,14.73H21.94L18.38,18L13.08,17.4V15.73H17.91L18.72,14.76M9.27,11.77C9.57,11.77 9.86,11.89 10.07,12.11C10.28,12.32 10.4,12.61 10.4,12.91C10.4,13.21 10.28,13.5 10.07,13.71C9.86,13.92 9.57,14.04 9.27,14.04C8.64,14.04 8.13,13.54 8.13,12.91C8.13,12.28 8.64,11.77 9.27,11.77M14.72,11.77C15.35,11.77 15.85,12.28 15.85,12.91C15.85,13.54 15.35,14.04 14.72,14.04C14.09,14.04 13.58,13.54 13.58,12.91A1.14,1.14 0 0,1 14.72,11.77Z" /></svg>', this.stream = !1, this.customRequest = !1, this.enableFileUpload = !1, this.uploadFileUrl = "", this.open = !1, this.alwaysOpen = !1, this.prefilledFormFields = "{}", this.loading = !1, this.showSetting = !1, this.showAuthAlert = !1, this.fetchStream = Li;
5830
+ `, this.popupLogoSvg = "", this.popupLogoUrl = "", this.botIconSvg = '<svg fill="currentColor" width="24" height="24" viewBox="0 0 24 24"> <path d="M16 17V19H2V17S2 13 9 13 16 17 16 17M12.5 7.5A3.5 3.5 0 1 0 9 11A3.5 3.5 0 0 0 12.5 7.5M15.94 13A5.32 5.32 0 0 1 18 17V19H22V17S22 13.37 15.94 13M15 4A3.39 3.39 0 0 0 13.07 4.59A5 5 0 0 1 13.07 10.41A3.39 3.39 0 0 0 15 11A3.5 3.5 0 0 0 15 4Z" /></svg>', this.userIconSvg = '<svg fill="currentColor" viewBox="0 0 24 24" width="24" height="24"> <path d="M12 4a4 4 0 0 1 4 4a4 4 0 0 1-4 4a4 4 0 0 1-4-4a4 4 0 0 1 4-4m0 10c4.42 0 8 1.79 8 4v2H4v-2c0-2.21 3.58-4 8-4Z" /></svg>', this.systemIconSvg = '<svg fill="currentColor" width="24" height="24" viewBox="0 0 24 24"> <path d="M11,9H13V7H11M12,20C7.59,20 4,16.41 4,12C4,7.59 7.59,4 12,4C16.41,4 20,7.59 20,12C20,16.41 16.41,20 12,20M12,2A10,10 0 0,0 2,12A10,10 0 0,0 12,22A10,10 0 0,0 22,12A10,10 0 0,0 12,2M11,17H13V11H11V17Z"/></svg>', this.agentIconSvg = '<svg fill="currentColor" width="24" height="24" viewBox="0 0 24 24"> <path d="M18.72,14.76C19.07,13.91 19.26,13 19.26,12C19.26,11.28 19.15,10.59 18.96,9.95C18.31,10.1 17.63,10.18 16.92,10.18C13.86,10.18 11.15,8.67 9.5,6.34C8.61,8.5 6.91,10.26 4.77,11.22C4.73,11.47 4.73,11.74 4.73,12A7.27,7.27 0 0,0 12,19.27C13.05,19.27 14.06,19.04 14.97,18.63C15.54,19.72 15.8,20.26 15.78,20.26C14.14,20.81 12.87,21.08 12,21.08C9.58,21.08 7.27,20.13 5.57,18.42C4.53,17.38 3.76,16.11 3.33,14.73H2V10.18H3.09C3.93,6.04 7.6,2.92 12,2.92C14.4,2.92 16.71,3.87 18.42,5.58C19.69,6.84 20.54,8.45 20.89,10.18H22V14.67H22V14.69L22,14.73H21.94L18.38,18L13.08,17.4V15.73H17.91L18.72,14.76M9.27,11.77C9.57,11.77 9.86,11.89 10.07,12.11C10.28,12.32 10.4,12.61 10.4,12.91C10.4,13.21 10.28,13.5 10.07,13.71C9.86,13.92 9.57,14.04 9.27,14.04C8.64,14.04 8.13,13.54 8.13,12.91C8.13,12.28 8.64,11.77 9.27,11.77M14.72,11.77C15.35,11.77 15.85,12.28 15.85,12.91C15.85,13.54 15.35,14.04 14.72,14.04C14.09,14.04 13.58,13.54 13.58,12.91A1.14,1.14 0 0,1 14.72,11.77Z" /></svg>', this.stream = !1, this.customRequest = !1, this.enableFileUpload = !1, this.uploadFileUrl = "", this.open = !1, this.alwaysOpen = !1, this.prefilledFormFields = "{}", this.loading = !1, this.showSetting = !1, this.showAuthAlert = !1, this.fetchStream = Li;
5808
5831
  }
5809
5832
  //HTMLElement;
5810
5833
  /**
@@ -5820,7 +5843,7 @@ let H = class extends Q {
5820
5843
  isThinking: !0,
5821
5844
  data: {}
5822
5845
  };
5823
- return k.addMessage(a), a;
5846
+ return x.addMessage(a), a;
5824
5847
  }
5825
5848
  addTestMessage(a = "") {
5826
5849
  const c = {
@@ -5831,23 +5854,23 @@ let H = class extends Q {
5831
5854
  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."
5832
5855
  }
5833
5856
  };
5834
- return k.addMessage(c), c;
5857
+ return x.addMessage(c), c;
5835
5858
  }
5836
5859
  addActions(a = []) {
5837
- k.addActions(a);
5860
+ x.addActions(a);
5838
5861
  }
5839
5862
  render() {
5840
- return k.disabled && !this.alwaysOpen ? (ze.error("Bot is disabled"), null) : w`
5841
- <div class="cb-wrapper" style="${k.open ? "display:flex" : "display:none"}">
5863
+ return x.disabled && !this.alwaysOpen ? (ze.error("Bot is disabled"), null) : w`
5864
+ <div class="cb-wrapper" style="${x.open ? "display:flex" : "display:none"}">
5842
5865
  <cb-header title="${this.name}" exportparts="header"></cb-header>
5843
- <cb-message-list .messages=${k.messages} .actions=${k.actions} .form=${k.form} exportparts="form"></cb-message-list>
5866
+ <cb-message-list .messages=${x.messages} .actions=${x.actions} .form=${x.form} exportparts="form"></cb-message-list>
5844
5867
  ${this.renderUserInput()}
5845
5868
  </div>
5846
- <cb-anchor ?open=${k.open}></cb-anchor>
5869
+ <cb-anchor ?open=${x.open}></cb-anchor>
5847
5870
  `;
5848
5871
  }
5849
5872
  renderUserInput() {
5850
- return k.form || k.disabled && this.alwaysOpen ? null : w`<cb-user-input ?loading=${this.loading} ?disabled=${this.loading || k.form} ?enable-file-upload=${this.enableFileUpload}></cb-user-input>`;
5873
+ return x.form || x.disabled && this.alwaysOpen ? null : w`<cb-user-input ?loading=${this.loading} ?disabled=${this.loading || x.form} ?enable-file-upload=${this.enableFileUpload}></cb-user-input>`;
5851
5874
  }
5852
5875
  connectedCallback() {
5853
5876
  super.connectedCallback(), ze.info("connectedCallback"), addEventListener("setting:show", () => {
@@ -5856,9 +5879,9 @@ let H = class extends Q {
5856
5879
  this.showSetting = !1;
5857
5880
  }), addEventListener("chatbot:toggle", (a) => {
5858
5881
  const t = a.detail;
5859
- k.open = t.open, k.suppressEngagePopup();
5882
+ x.open = t.open, x.suppressEngagePopup();
5860
5883
  }), addEventListener("message:clear", () => {
5861
- k.clearMessages();
5884
+ x.clearMessages();
5862
5885
  }), addEventListener("message:send:file", this._sendFileHandler.bind(this)), addEventListener("setting:show", () => {
5863
5886
  this.showSetting = !0;
5864
5887
  }), addEventListener("form:submit", this._formSubmitHandler.bind(this));
@@ -5874,38 +5897,38 @@ let H = class extends Q {
5874
5897
  // initialize setting
5875
5898
  _initSetting() {
5876
5899
  ze.info("_initSetting");
5877
- const a = k.setting;
5878
- a.orgId = this.orgId, a.botId = this.botId, a.url = this.url, a.logoUrl = this.logoUrl, a.logoSvg = this.logoSvg, a.botIconSvg = this.botIconSvg, a.userIconSvg = this.userIconSvg, a.systemIconSvg = this.systemIconSvg, a.agentIconSvg = this.agentIconSvg, k.setSetting(a);
5900
+ const a = x.setting;
5901
+ a.orgId = this.orgId, a.botId = this.botId, a.url = this.url, a.logoUrl = this.logoUrl, a.logoSvg = this.logoSvg, a.popupLogoSvg = this.popupLogoSvg, a.popupLogoUrl = this.popupLogoUrl, a.botIconSvg = this.botIconSvg, a.userIconSvg = this.userIconSvg, a.systemIconSvg = this.systemIconSvg, a.agentIconSvg = this.agentIconSvg, x.setSetting(a);
5879
5902
  let t = {};
5880
5903
  try {
5881
5904
  t = JSON.parse(this.prefilledFormFields);
5882
5905
  } catch (c) {
5883
5906
  console.log(`Failed to parse prefilled-form-fields attribute value, error: ${(c == null ? void 0 : c.message) || ""}`), t = {};
5884
5907
  }
5885
- k.setPrefilledFormFields(t), this.open && (k.open = !0), this.alwaysOpen && (k.open = !0, k.alwaysOpen = !0);
5908
+ x.setPrefilledFormFields(t), this.open && (x.open = !0), this.alwaysOpen && (x.open = !0, x.alwaysOpen = !0);
5886
5909
  }
5887
5910
  setLoading(a) {
5888
5911
  this.loading = a;
5889
5912
  }
5890
5913
  clearConversation() {
5891
- k.clearConversation();
5914
+ x.clearConversation();
5892
5915
  }
5893
5916
  setPrefilledFormFields(a) {
5894
- k.setPrefilledFormFields(a);
5917
+ x.setPrefilledFormFields(a);
5895
5918
  }
5896
5919
  setOpen(a = !1) {
5897
- k.open = a;
5920
+ x.open = a;
5898
5921
  }
5899
5922
  // check auth
5900
5923
  _checkAuth() {
5901
5924
  }
5902
5925
  _addMessageHandler(a) {
5903
5926
  const t = a.detail;
5904
- k.sendMessage(t);
5927
+ x.sendMessage(t);
5905
5928
  }
5906
5929
  _deleteMessageHandler(a) {
5907
5930
  const t = a.detail;
5908
- k.removeMessage(t.id);
5931
+ x.removeMessage(t.id);
5909
5932
  }
5910
5933
  async _sendFileHandler(a) {
5911
5934
  const t = a.detail, i = {
@@ -5922,11 +5945,11 @@ let H = class extends Q {
5922
5945
  }))
5923
5946
  }
5924
5947
  };
5925
- if (k.addMessage(i), this.uploadFileUrl) {
5948
+ if (x.addMessage(i), this.uploadFileUrl) {
5926
5949
  const n = await ji(this.uploadFileUrl, t.files);
5927
5950
  n.code === 0 && n.data && (i.isUploading = !1, i.data = {
5928
5951
  files: n.data
5929
- }, k.updateMessage(i));
5952
+ }, x.updateMessage(i));
5930
5953
  }
5931
5954
  this.emit("chatbot:file:send", {
5932
5955
  detail: {
@@ -5938,7 +5961,7 @@ let H = class extends Q {
5938
5961
  // setting confirm handler
5939
5962
  _settingConfirmHandler(a) {
5940
5963
  const t = a.detail;
5941
- k.setSetting(t.setting), this.showSetting = !1, this._checkAuth();
5964
+ x.setSetting(t.setting), this.showSetting = !1, this._checkAuth();
5942
5965
  }
5943
5966
  async _formSubmitHandler(a) {
5944
5967
  }
@@ -5948,76 +5971,82 @@ let H = class extends Q {
5948
5971
  (t = this._messageList) == null || t.scrollToBottom();
5949
5972
  }
5950
5973
  };
5951
- H.styles = Pa;
5952
- R([
5953
- C({ type: Boolean, attribute: "display-license" })
5954
- ], H.prototype, "displayLicense", 2);
5955
- R([
5956
- C({ type: String, attribute: "name" })
5957
- ], H.prototype, "name", 2);
5958
- R([
5959
- C({ type: String, attribute: "org-id" })
5960
- ], H.prototype, "orgId", 2);
5961
- R([
5962
- C({ type: String, attribute: "bot-id" })
5963
- ], H.prototype, "botId", 2);
5964
- R([
5965
- C({ type: String, attribute: "url" })
5966
- ], H.prototype, "url", 2);
5967
- R([
5968
- C({ type: String, attribute: "logo-url" })
5969
- ], H.prototype, "logoUrl", 2);
5970
- R([
5971
- C({ type: String, attribute: "logo-svg" })
5972
- ], H.prototype, "logoSvg", 2);
5973
- R([
5974
- C({ type: String, attribute: "bot-icon-svg" })
5975
- ], H.prototype, "botIconSvg", 2);
5976
- R([
5977
- C({ type: String, attribute: "user-icon-svg" })
5978
- ], H.prototype, "userIconSvg", 2);
5979
- R([
5980
- C({ type: String, attribute: "system-icon-svg" })
5981
- ], H.prototype, "systemIconSvg", 2);
5982
- R([
5983
- C({ type: String, attribute: "agent-icon-svg" })
5984
- ], H.prototype, "agentIconSvg", 2);
5985
- R([
5986
- C({ type: Boolean, attribute: "stream" })
5987
- ], H.prototype, "stream", 2);
5988
- R([
5989
- C({ type: Boolean, attribute: "custom-request" })
5990
- ], H.prototype, "customRequest", 2);
5991
- R([
5992
- C({ type: Boolean, attribute: "enable-file-upload" })
5993
- ], H.prototype, "enableFileUpload", 2);
5994
- R([
5995
- C({ type: String, attribute: "upload-file-url" })
5996
- ], H.prototype, "uploadFileUrl", 2);
5997
- R([
5998
- C({ type: Boolean, attribute: "open" })
5999
- ], H.prototype, "open", 2);
6000
- R([
6001
- C({ type: Boolean, attribute: "always-open" })
6002
- ], H.prototype, "alwaysOpen", 2);
6003
- R([
6004
- C({ type: String, attribute: "prefilled-form-fields" })
6005
- ], H.prototype, "prefilledFormFields", 2);
6006
- R([
6007
- C({ type: Boolean })
6008
- ], H.prototype, "loading", 2);
6009
- R([
6010
- C({ type: Boolean })
6011
- ], H.prototype, "showSetting", 2);
6012
- R([
6013
- C({ type: Boolean })
6014
- ], H.prototype, "showAuthAlert", 2);
6015
- R([
5974
+ P.styles = Pa;
5975
+ B([
5976
+ k({ type: Boolean, attribute: "display-license" })
5977
+ ], P.prototype, "displayLicense", 2);
5978
+ B([
5979
+ k({ type: String, attribute: "name" })
5980
+ ], P.prototype, "name", 2);
5981
+ B([
5982
+ k({ type: String, attribute: "org-id" })
5983
+ ], P.prototype, "orgId", 2);
5984
+ B([
5985
+ k({ type: String, attribute: "bot-id" })
5986
+ ], P.prototype, "botId", 2);
5987
+ B([
5988
+ k({ type: String, attribute: "url" })
5989
+ ], P.prototype, "url", 2);
5990
+ B([
5991
+ k({ type: String, attribute: "logo-url" })
5992
+ ], P.prototype, "logoUrl", 2);
5993
+ B([
5994
+ k({ type: String, attribute: "logo-svg" })
5995
+ ], P.prototype, "logoSvg", 2);
5996
+ B([
5997
+ k({ type: String, attribute: "popup-logo-svg" })
5998
+ ], P.prototype, "popupLogoSvg", 2);
5999
+ B([
6000
+ k({ type: String, attribute: "popup-logo-url" })
6001
+ ], P.prototype, "popupLogoUrl", 2);
6002
+ B([
6003
+ k({ type: String, attribute: "bot-icon-svg" })
6004
+ ], P.prototype, "botIconSvg", 2);
6005
+ B([
6006
+ k({ type: String, attribute: "user-icon-svg" })
6007
+ ], P.prototype, "userIconSvg", 2);
6008
+ B([
6009
+ k({ type: String, attribute: "system-icon-svg" })
6010
+ ], P.prototype, "systemIconSvg", 2);
6011
+ B([
6012
+ k({ type: String, attribute: "agent-icon-svg" })
6013
+ ], P.prototype, "agentIconSvg", 2);
6014
+ B([
6015
+ k({ type: Boolean, attribute: "stream" })
6016
+ ], P.prototype, "stream", 2);
6017
+ B([
6018
+ k({ type: Boolean, attribute: "custom-request" })
6019
+ ], P.prototype, "customRequest", 2);
6020
+ B([
6021
+ k({ type: Boolean, attribute: "enable-file-upload" })
6022
+ ], P.prototype, "enableFileUpload", 2);
6023
+ B([
6024
+ k({ type: String, attribute: "upload-file-url" })
6025
+ ], P.prototype, "uploadFileUrl", 2);
6026
+ B([
6027
+ k({ type: Boolean, attribute: "open" })
6028
+ ], P.prototype, "open", 2);
6029
+ B([
6030
+ k({ type: Boolean, attribute: "always-open" })
6031
+ ], P.prototype, "alwaysOpen", 2);
6032
+ B([
6033
+ k({ type: String, attribute: "prefilled-form-fields" })
6034
+ ], P.prototype, "prefilledFormFields", 2);
6035
+ B([
6036
+ k({ type: Boolean })
6037
+ ], P.prototype, "loading", 2);
6038
+ B([
6039
+ k({ type: Boolean })
6040
+ ], P.prototype, "showSetting", 2);
6041
+ B([
6042
+ k({ type: Boolean })
6043
+ ], P.prototype, "showAuthAlert", 2);
6044
+ B([
6016
6045
  De("cb-message-list")
6017
- ], H.prototype, "_messageList", 2);
6018
- H = R([
6046
+ ], P.prototype, "_messageList", 2);
6047
+ P = B([
6019
6048
  Y("enegelai-bot")
6020
- ], H);
6049
+ ], P);
6021
6050
  export {
6022
- H as default
6051
+ P as default
6023
6052
  };