@iai-lib/any-chat-widget 0.1.0-alpha.38 → 0.1.0-alpha.39
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/any-chat-widget.es.js +137 -137
- package/dist/any-chat-widget.umd.js +28 -28
- package/package.json +3 -3
|
@@ -10,7 +10,7 @@ var Vn = (i, e, t) => (Ss(i, e, "read from private field"), t ? t.call(i) : e.ge
|
|
|
10
10
|
var $a = Object.defineProperty, Aa = (i, e, t) => e in i ? $a(i, e, { enumerable: !0, configurable: !0, writable: !0, value: t }) : i[e] = t, X = (i, e, t) => (Aa(i, typeof e != "symbol" ? e + "" : e, t), t), Ta = (i, e, t) => {
|
|
11
11
|
if (!e.has(i))
|
|
12
12
|
throw TypeError("Cannot " + t);
|
|
13
|
-
},
|
|
13
|
+
}, Cs = (i, e, t) => {
|
|
14
14
|
if (e.has(i))
|
|
15
15
|
throw TypeError("Cannot add the same private member more than once");
|
|
16
16
|
e instanceof WeakSet ? e.add(i) : e.set(i, t);
|
|
@@ -20,7 +20,7 @@ var $a = Object.defineProperty, Aa = (i, e, t) => e in i ? $a(i, e, { enumerable
|
|
|
20
20
|
* Copyright 2019 Google LLC
|
|
21
21
|
* SPDX-License-Identifier: BSD-3-Clause
|
|
22
22
|
*/
|
|
23
|
-
const qn = globalThis, ss = qn.ShadowRoot && (qn.ShadyCSS === void 0 || qn.ShadyCSS.nativeShadow) && "adoptedStyleSheets" in Document.prototype && "replace" in CSSStyleSheet.prototype, rs = Symbol(),
|
|
23
|
+
const qn = globalThis, ss = qn.ShadowRoot && (qn.ShadyCSS === void 0 || qn.ShadyCSS.nativeShadow) && "adoptedStyleSheets" in Document.prototype && "replace" in CSSStyleSheet.prototype, rs = Symbol(), Es = /* @__PURE__ */ new WeakMap();
|
|
24
24
|
let wr = class {
|
|
25
25
|
constructor(i, e, t) {
|
|
26
26
|
if (this._$cssResult$ = !0, t !== rs)
|
|
@@ -32,7 +32,7 @@ let wr = class {
|
|
|
32
32
|
const e = this.t;
|
|
33
33
|
if (ss && i === void 0) {
|
|
34
34
|
const t = e !== void 0 && e.length === 1;
|
|
35
|
-
t && (i =
|
|
35
|
+
t && (i = Es.get(e)), i === void 0 && ((this.o = i = new CSSStyleSheet()).replaceSync(this.cssText), t && Es.set(e, i));
|
|
36
36
|
}
|
|
37
37
|
return i;
|
|
38
38
|
}
|
|
@@ -49,7 +49,7 @@ const Sa = (i) => new wr(typeof i == "string" ? i : i + "", void 0, rs), jt = (i
|
|
|
49
49
|
throw Error("Value passed to 'css' function must be a 'css' function result: " + a + ". Use 'unsafeCSS' to pass non-literal values, but take care to ensure page security.");
|
|
50
50
|
})(s) + i[r + 1], i[0]);
|
|
51
51
|
return new wr(t, i, rs);
|
|
52
|
-
},
|
|
52
|
+
}, Ca = (i, e) => {
|
|
53
53
|
if (ss)
|
|
54
54
|
i.adoptedStyleSheets = e.map((t) => t instanceof CSSStyleSheet ? t : t.styleSheet);
|
|
55
55
|
else
|
|
@@ -68,7 +68,7 @@ const Sa = (i) => new wr(typeof i == "string" ? i : i + "", void 0, rs), jt = (i
|
|
|
68
68
|
* Copyright 2017 Google LLC
|
|
69
69
|
* SPDX-License-Identifier: BSD-3-Clause
|
|
70
70
|
*/
|
|
71
|
-
const { is:
|
|
71
|
+
const { is: Ea, defineProperty: Oa, getOwnPropertyDescriptor: Ia, getOwnPropertyNames: Ma, getOwnPropertySymbols: Na, getPrototypeOf: Ra } = Object, Kt = globalThis, Is = Kt.trustedTypes, Pa = Is ? Is.emptyScript : "", Ms = Kt.reactiveElementPolyfillSupport, dn = (i, e) => i, Gn = { toAttribute(i, e) {
|
|
72
72
|
switch (e) {
|
|
73
73
|
case Boolean:
|
|
74
74
|
i = i ? Pa : null;
|
|
@@ -96,7 +96,7 @@ const { is: Ca, defineProperty: Oa, getOwnPropertyDescriptor: Ia, getOwnProperty
|
|
|
96
96
|
}
|
|
97
97
|
}
|
|
98
98
|
return t;
|
|
99
|
-
} }, as = (i, e) => !
|
|
99
|
+
} }, as = (i, e) => !Ea(i, e), Ns = { attribute: !0, type: String, converter: Gn, reflect: !1, hasChanged: as };
|
|
100
100
|
Symbol.metadata ?? (Symbol.metadata = Symbol("metadata")), Kt.litPropertyMetadata ?? (Kt.litPropertyMetadata = /* @__PURE__ */ new WeakMap());
|
|
101
101
|
class Wt extends HTMLElement {
|
|
102
102
|
static addInitializer(e) {
|
|
@@ -192,7 +192,7 @@ class Wt extends HTMLElement {
|
|
|
192
192
|
}
|
|
193
193
|
createRenderRoot() {
|
|
194
194
|
const e = this.shadowRoot ?? this.attachShadow(this.constructor.shadowRootOptions);
|
|
195
|
-
return
|
|
195
|
+
return Ca(e, this.constructor.elementStyles), e;
|
|
196
196
|
}
|
|
197
197
|
connectedCallback() {
|
|
198
198
|
var e;
|
|
@@ -416,7 +416,7 @@ let La = class {
|
|
|
416
416
|
for (const t of this._$AV)
|
|
417
417
|
t !== void 0 && (t.strings !== void 0 ? (t._$AI(i, t, e), e += t.strings.length - 2) : t._$AI(i[e])), e++;
|
|
418
418
|
}
|
|
419
|
-
}, Sr = class
|
|
419
|
+
}, Sr = class Cr {
|
|
420
420
|
get _$AU() {
|
|
421
421
|
var e;
|
|
422
422
|
return ((e = this._$AM) == null ? void 0 : e._$AU) ?? this._$Cv;
|
|
@@ -466,7 +466,7 @@ let La = class {
|
|
|
466
466
|
const t = this._$AH;
|
|
467
467
|
let n, s = 0;
|
|
468
468
|
for (const r of e)
|
|
469
|
-
s === t.length ? t.push(n = new
|
|
469
|
+
s === t.length ? t.push(n = new Cr(this.S(ti()), this.S(ti()), this, this.options)) : n = t[s], n._$AI(r), s++;
|
|
470
470
|
s < t.length && (this._$AR(n && n._$AB.nextSibling, s), t.length = s);
|
|
471
471
|
}
|
|
472
472
|
_$AR(e = this._$AA.nextSibling, t) {
|
|
@@ -552,7 +552,7 @@ Zs == null || Zs(qi, Sr), (Xn.litHtmlVersions ?? (Xn.litHtmlVersions = [])).push
|
|
|
552
552
|
* Copyright 2017 Google LLC
|
|
553
553
|
* SPDX-License-Identifier: BSD-3-Clause
|
|
554
554
|
*/
|
|
555
|
-
const ni = globalThis, ii = ni.trustedTypes, Hs = ii ? ii.createPolicy("lit-html", { createHTML: (i) => i }) : void 0,
|
|
555
|
+
const ni = globalThis, ii = ni.trustedTypes, Hs = ii ? ii.createPolicy("lit-html", { createHTML: (i) => i }) : void 0, Er = "$lit$", it = `lit$${(Math.random() + "").slice(9)}$`, Or = "?" + it, Wa = `<${Or}>`, St = document, vn = () => St.createComment(""), bn = (i) => i === null || typeof i != "object" && typeof i != "function", Ir = Array.isArray, Va = (i) => Ir(i) || typeof (i == null ? void 0 : i[Symbol.iterator]) == "function", Bi = `[
|
|
556
556
|
\f\r]`, an = /<(?:(!--|\/[^a-zA-Z])|(\/?[a-zA-Z][^>\s]*)|(\/?$))/g, Us = /-->/g, Bs = />/g, mt = RegExp(`>|${Bi}(?:([^\\s"'>=/]+)(${Bi}*=${Bi}*(?:[^
|
|
557
557
|
\f\r"'\`<>=]|("|')|))|$)`, "g"), Ws = /'/g, Vs = /"/g, Mr = /^(?:script|style|textarea|title)$/i, Fa = (i) => (e, ...t) => ({ _$litType$: i, strings: e, values: t }), B = Fa(1), Jt = Symbol.for("lit-noChange"), ce = Symbol.for("lit-nothing"), Fs = /* @__PURE__ */ new WeakMap(), wt = St.createTreeWalker(St, 129);
|
|
558
558
|
function Nr(i, e) {
|
|
@@ -569,7 +569,7 @@ const Ka = (i, e) => {
|
|
|
569
569
|
for (; c < l.length && (a.lastIndex = c, u = a.exec(l), u !== null); )
|
|
570
570
|
c = a.lastIndex, a === an ? u[1] === "!--" ? a = Us : u[1] !== void 0 ? a = Bs : u[2] !== void 0 ? (Mr.test(u[2]) && (s = RegExp("</" + u[2], "g")), a = mt) : u[3] !== void 0 && (a = mt) : a === mt ? u[0] === ">" ? (a = s ?? an, h = -1) : u[1] === void 0 ? h = -2 : (h = a.lastIndex - u[2].length, d = u[1], a = u[3] === void 0 ? mt : u[3] === '"' ? Vs : Ws) : a === Vs || a === Ws ? a = mt : a === Us || a === Bs ? a = an : (a = mt, s = void 0);
|
|
571
571
|
const f = a === mt && i[o + 1].startsWith("/>") ? " " : "";
|
|
572
|
-
r += a === an ? l + Wa : h >= 0 ? (n.push(d), l.slice(0, h) +
|
|
572
|
+
r += a === an ? l + Wa : h >= 0 ? (n.push(d), l.slice(0, h) + Er + l.slice(h) + it + f) : l + it + (h === -2 ? o : f);
|
|
573
573
|
}
|
|
574
574
|
return [Nr(i, r + (i[t] || "<?>") + (e === 2 ? "</svg>" : "")), n];
|
|
575
575
|
};
|
|
@@ -587,7 +587,7 @@ let Ji = class Rr {
|
|
|
587
587
|
if (s.nodeType === 1) {
|
|
588
588
|
if (s.hasAttributes())
|
|
589
589
|
for (const h of s.getAttributeNames())
|
|
590
|
-
if (h.endsWith(
|
|
590
|
+
if (h.endsWith(Er)) {
|
|
591
591
|
const c = u[a++], f = s.getAttribute(h).split(it), A = /([.?@])?(.*)/.exec(c);
|
|
592
592
|
l.push({ type: 1, index: r, name: A[2], strings: f, ctor: A[1] === "." ? Ja : A[1] === "?" ? Qa : A[1] === "@" ? Ya : Ai }), s.removeAttribute(h);
|
|
593
593
|
} else
|
|
@@ -919,9 +919,9 @@ function Ti(i, e) {
|
|
|
919
919
|
* Copyright 2017 Google LLC
|
|
920
920
|
* SPDX-License-Identifier: BSD-3-Clause
|
|
921
921
|
*/
|
|
922
|
-
const si = globalThis, ri = si.trustedTypes, Ys = ri ? ri.createPolicy("lit-html", { createHTML: (i) => i }) : void 0, ls = "$lit$", We = `lit$${Math.random().toFixed(9).slice(2)}$`, cs = "?" + We, no = `<${cs}>`,
|
|
922
|
+
const si = globalThis, ri = si.trustedTypes, Ys = ri ? ri.createPolicy("lit-html", { createHTML: (i) => i }) : void 0, ls = "$lit$", We = `lit$${Math.random().toFixed(9).slice(2)}$`, cs = "?" + We, no = `<${cs}>`, Ct = document, ai = () => Ct.createComment(""), wn = (i) => i === null || typeof i != "object" && typeof i != "function", jr = Array.isArray, zr = (i) => jr(i) || typeof (i == null ? void 0 : i[Symbol.iterator]) == "function", Wi = `[
|
|
923
923
|
\f\r]`, on = /<(?:(!--|\/[^a-zA-Z])|(\/?[a-zA-Z][^>\s]*)|(\/?$))/g, Gs = /-->/g, Xs = />/g, gt = RegExp(`>|${Wi}(?:([^\\s"'>=/]+)(${Wi}*=${Wi}*(?:[^
|
|
924
|
-
\f\r"'\`<>=]|("|')|))|$)`, "g"), er = /'/g, tr = /"/g, Dr = /^(?:script|style|textarea|title)$/i, Yt = Symbol.for("lit-noChange"), de = Symbol.for("lit-nothing"), nr = /* @__PURE__ */ new WeakMap(), _t =
|
|
924
|
+
\f\r"'\`<>=]|("|')|))|$)`, "g"), er = /'/g, tr = /"/g, Dr = /^(?:script|style|textarea|title)$/i, Yt = Symbol.for("lit-noChange"), de = Symbol.for("lit-nothing"), nr = /* @__PURE__ */ new WeakMap(), _t = Ct.createTreeWalker(Ct, 129);
|
|
925
925
|
function Lr(i, e) {
|
|
926
926
|
if (!Array.isArray(i) || !i.hasOwnProperty("raw"))
|
|
927
927
|
throw Error("invalid template strings array");
|
|
@@ -980,17 +980,17 @@ class _n {
|
|
|
980
980
|
}
|
|
981
981
|
}
|
|
982
982
|
static createElement(e, t) {
|
|
983
|
-
const n =
|
|
983
|
+
const n = Ct.createElement("template");
|
|
984
984
|
return n.innerHTML = e, n;
|
|
985
985
|
}
|
|
986
986
|
}
|
|
987
|
-
function
|
|
987
|
+
function Et(i, e, t = i, n) {
|
|
988
988
|
var s, r;
|
|
989
989
|
if (e === Yt)
|
|
990
990
|
return e;
|
|
991
991
|
let a = n !== void 0 ? (s = t._$Co) == null ? void 0 : s[n] : t._$Cl;
|
|
992
992
|
const o = wn(e) ? void 0 : e._$litDirective$;
|
|
993
|
-
return (a == null ? void 0 : a.constructor) !== o && ((r = a == null ? void 0 : a._$AO) == null || r.call(a, !1), o === void 0 ? a = void 0 : (a = new o(i), a._$AT(i, t, n)), n !== void 0 ? (t._$Co ?? (t._$Co = []))[n] = a : t._$Cl = a), a !== void 0 && (e =
|
|
993
|
+
return (a == null ? void 0 : a.constructor) !== o && ((r = a == null ? void 0 : a._$AO) == null || r.call(a, !1), o === void 0 ? a = void 0 : (a = new o(i), a._$AT(i, t, n)), n !== void 0 ? (t._$Co ?? (t._$Co = []))[n] = a : t._$Cl = a), a !== void 0 && (e = Et(i, a._$AS(i, e.values), a, n)), e;
|
|
994
994
|
}
|
|
995
995
|
class Hr {
|
|
996
996
|
constructor(e, t) {
|
|
@@ -1003,7 +1003,7 @@ class Hr {
|
|
|
1003
1003
|
return this._$AM._$AU;
|
|
1004
1004
|
}
|
|
1005
1005
|
u(e) {
|
|
1006
|
-
const { el: { content: t }, parts: n } = this._$AD, s = ((e == null ? void 0 : e.creationScope) ??
|
|
1006
|
+
const { el: { content: t }, parts: n } = this._$AD, s = ((e == null ? void 0 : e.creationScope) ?? Ct).importNode(t, !0);
|
|
1007
1007
|
_t.currentNode = s;
|
|
1008
1008
|
let r = _t.nextNode(), a = 0, o = 0, l = n[0];
|
|
1009
1009
|
for (; l !== void 0; ) {
|
|
@@ -1013,7 +1013,7 @@ class Hr {
|
|
|
1013
1013
|
}
|
|
1014
1014
|
a !== (l == null ? void 0 : l.index) && (r = _t.nextNode(), a++);
|
|
1015
1015
|
}
|
|
1016
|
-
return _t.currentNode =
|
|
1016
|
+
return _t.currentNode = Ct, s;
|
|
1017
1017
|
}
|
|
1018
1018
|
p(e) {
|
|
1019
1019
|
let t = 0;
|
|
@@ -1041,7 +1041,7 @@ class zn {
|
|
|
1041
1041
|
return this._$AB;
|
|
1042
1042
|
}
|
|
1043
1043
|
_$AI(e, t = this) {
|
|
1044
|
-
e =
|
|
1044
|
+
e = Et(this, e, t), wn(e) ? e === de || e == null || e === "" ? (this._$AH !== de && this._$AR(), this._$AH = de) : e !== this._$AH && e !== Yt && this._(e) : e._$litType$ !== void 0 ? this.$(e) : e.nodeType !== void 0 ? this.T(e) : zr(e) ? this.k(e) : this._(e);
|
|
1045
1045
|
}
|
|
1046
1046
|
S(e) {
|
|
1047
1047
|
return this._$AA.parentNode.insertBefore(e, this._$AB);
|
|
@@ -1050,7 +1050,7 @@ class zn {
|
|
|
1050
1050
|
this._$AH !== e && (this._$AR(), this._$AH = this.S(e));
|
|
1051
1051
|
}
|
|
1052
1052
|
_(e) {
|
|
1053
|
-
this._$AH !== de && wn(this._$AH) ? this._$AA.nextSibling.data = e : this.T(
|
|
1053
|
+
this._$AH !== de && wn(this._$AH) ? this._$AA.nextSibling.data = e : this.T(Ct.createTextNode(e)), this._$AH = e;
|
|
1054
1054
|
}
|
|
1055
1055
|
$(e) {
|
|
1056
1056
|
var t;
|
|
@@ -1100,12 +1100,12 @@ class Dn {
|
|
|
1100
1100
|
const r = this.strings;
|
|
1101
1101
|
let a = !1;
|
|
1102
1102
|
if (r === void 0)
|
|
1103
|
-
e =
|
|
1103
|
+
e = Et(this, e, t, 0), a = !wn(e) || e !== this._$AH && e !== Yt, a && (this._$AH = e);
|
|
1104
1104
|
else {
|
|
1105
1105
|
const o = e;
|
|
1106
1106
|
let l, d;
|
|
1107
1107
|
for (e = r[0], l = 0; l < r.length - 1; l++)
|
|
1108
|
-
d =
|
|
1108
|
+
d = Et(this, o[n + l], t, l), d === Yt && (d = this._$AH[l]), a || (a = !wn(d) || d !== this._$AH[l]), d === de ? e = de : e !== de && (e += (d ?? "") + r[l + 1]), this._$AH[l] = d;
|
|
1109
1109
|
}
|
|
1110
1110
|
a && !s && this.j(e);
|
|
1111
1111
|
}
|
|
@@ -1134,7 +1134,7 @@ class Wr extends Dn {
|
|
|
1134
1134
|
super(e, t, n, s, r), this.type = 5;
|
|
1135
1135
|
}
|
|
1136
1136
|
_$AI(e, t = this) {
|
|
1137
|
-
if ((e =
|
|
1137
|
+
if ((e = Et(this, e, t, 0) ?? de) === Yt)
|
|
1138
1138
|
return;
|
|
1139
1139
|
const n = this._$AH, s = e === de && n !== de || e.capture !== n.capture || e.once !== n.once || e.passive !== n.passive, r = e !== de && (n === de || s);
|
|
1140
1140
|
s && this.element.removeEventListener(this.name, this, n), r && this.element.addEventListener(this.name, this, e), this._$AH = e;
|
|
@@ -1152,10 +1152,10 @@ class Vr {
|
|
|
1152
1152
|
return this._$AM._$AU;
|
|
1153
1153
|
}
|
|
1154
1154
|
_$AI(e) {
|
|
1155
|
-
|
|
1155
|
+
Et(this, e);
|
|
1156
1156
|
}
|
|
1157
1157
|
}
|
|
1158
|
-
const io = { P: ls, A: We, C: cs, M: 1, L: Zr, R: Hr, D: zr, V:
|
|
1158
|
+
const io = { P: ls, A: We, C: cs, M: 1, L: Zr, R: Hr, D: zr, V: Et, I: zn, H: Dn, N: Br, U: Wr, B: Ur, F: Vr }, ir = si.litHtmlPolyfillSupport;
|
|
1159
1159
|
ir == null || ir(_n, zn), (si.litHtmlVersions ?? (si.litHtmlVersions = [])).push("3.1.3");
|
|
1160
1160
|
/**
|
|
1161
1161
|
* @license
|
|
@@ -2067,7 +2067,7 @@ class L {
|
|
|
2067
2067
|
return this._refinement((n, s) => e(n) ? !0 : (s.addIssue(typeof t == "function" ? t(n, s) : t), !1));
|
|
2068
2068
|
}
|
|
2069
2069
|
_refinement(e) {
|
|
2070
|
-
return new
|
|
2070
|
+
return new Ee({
|
|
2071
2071
|
schema: this,
|
|
2072
2072
|
typeName: I.ZodEffects,
|
|
2073
2073
|
effect: { type: "refinement", refinement: e }
|
|
@@ -2086,7 +2086,7 @@ class L {
|
|
|
2086
2086
|
return this.nullable().optional();
|
|
2087
2087
|
}
|
|
2088
2088
|
array() {
|
|
2089
|
-
return
|
|
2089
|
+
return Ce.create(this, this._def);
|
|
2090
2090
|
}
|
|
2091
2091
|
promise() {
|
|
2092
2092
|
return en.create(this, this._def);
|
|
@@ -2095,10 +2095,10 @@ class L {
|
|
|
2095
2095
|
return Sn.create([this, e], this._def);
|
|
2096
2096
|
}
|
|
2097
2097
|
and(e) {
|
|
2098
|
-
return
|
|
2098
|
+
return Cn.create(this, e, this._def);
|
|
2099
2099
|
}
|
|
2100
2100
|
transform(e) {
|
|
2101
|
-
return new
|
|
2101
|
+
return new Ee({
|
|
2102
2102
|
...D(this._def),
|
|
2103
2103
|
schema: this,
|
|
2104
2104
|
typeName: I.ZodEffects,
|
|
@@ -2150,7 +2150,7 @@ class L {
|
|
|
2150
2150
|
return this.safeParse(null).success;
|
|
2151
2151
|
}
|
|
2152
2152
|
}
|
|
2153
|
-
const So = /^c[^\s-]{8,}$/i,
|
|
2153
|
+
const So = /^c[^\s-]{8,}$/i, Co = /^[a-z][a-z0-9]*$/, Eo = /^[0-9A-HJKMNP-TV-Z]{26}$/, Oo = /^[0-9a-fA-F]{8}\b-[0-9a-fA-F]{4}\b-[0-9a-fA-F]{4}\b-[0-9a-fA-F]{4}\b-[0-9a-fA-F]{12}$/i, Io = /^(?!\.)(?!.*\.\.)([A-Z0-9_+-\.]*)[A-Z0-9_+-]@([A-Z0-9][A-Z0-9\-]*\.)+[A-Z]{2,}$/i, Mo = "^(\\p{Extended_Pictographic}|\\p{Emoji_Component})+$";
|
|
2154
2154
|
let Fi;
|
|
2155
2155
|
const No = /^(((25[0-5])|(2[0-4][0-9])|(1[0-9]{2})|([0-9]{1,2}))\.){3}((25[0-5])|(2[0-4][0-9])|(1[0-9]{2})|([0-9]{1,2}))$/, Ro = /^(([a-f0-9]{1,4}:){7}|::([a-f0-9]{1,4}:){0,6}|([a-f0-9]{1,4}:){1}:([a-f0-9]{1,4}:){0,5}|([a-f0-9]{1,4}:){2}:([a-f0-9]{1,4}:){0,4}|([a-f0-9]{1,4}:){3}:([a-f0-9]{1,4}:){0,3}|([a-f0-9]{1,4}:){4}:([a-f0-9]{1,4}:){0,2}|([a-f0-9]{1,4}:){5}:([a-f0-9]{1,4}:){0,1})([a-f0-9]{1,4}|(((25[0-5])|(2[0-4][0-9])|(1[0-9]{2})|([0-9]{1,2}))\.){3}((25[0-5])|(2[0-4][0-9])|(1[0-9]{2})|([0-9]{1,2})))$/, Po = (i) => i.precision ? i.offset ? new RegExp(`^\\d{4}-\\d{2}-\\d{2}T\\d{2}:\\d{2}:\\d{2}\\.\\d{${i.precision}}(([+-]\\d{2}(:?\\d{2})?)|Z)$`) : new RegExp(`^\\d{4}-\\d{2}-\\d{2}T\\d{2}:\\d{2}:\\d{2}\\.\\d{${i.precision}}Z$`) : i.precision === 0 ? i.offset ? new RegExp("^\\d{4}-\\d{2}-\\d{2}T\\d{2}:\\d{2}:\\d{2}(([+-]\\d{2}(:?\\d{2})?)|Z)$") : new RegExp("^\\d{4}-\\d{2}-\\d{2}T\\d{2}:\\d{2}:\\d{2}Z$") : i.offset ? new RegExp("^\\d{4}-\\d{2}-\\d{2}T\\d{2}:\\d{2}:\\d{2}(\\.\\d+)?(([+-]\\d{2}(:?\\d{2})?)|Z)$") : new RegExp("^\\d{4}-\\d{2}-\\d{2}T\\d{2}:\\d{2}:\\d{2}(\\.\\d+)?Z$");
|
|
2156
2156
|
function jo(i, e) {
|
|
@@ -2233,13 +2233,13 @@ class Te extends L {
|
|
|
2233
2233
|
message: s.message
|
|
2234
2234
|
}), t.dirty());
|
|
2235
2235
|
else if (s.kind === "cuid2")
|
|
2236
|
-
|
|
2236
|
+
Co.test(e.data) || (n = this._getOrReturnCtx(e, n), w(n, {
|
|
2237
2237
|
validation: "cuid2",
|
|
2238
2238
|
code: m.invalid_string,
|
|
2239
2239
|
message: s.message
|
|
2240
2240
|
}), t.dirty());
|
|
2241
2241
|
else if (s.kind === "ulid")
|
|
2242
|
-
|
|
2242
|
+
Eo.test(e.data) || (n = this._getOrReturnCtx(e, n), w(n, {
|
|
2243
2243
|
validation: "ulid",
|
|
2244
2244
|
code: m.invalid_string,
|
|
2245
2245
|
message: s.message
|
|
@@ -2963,7 +2963,7 @@ pi.create = (i) => new pi({
|
|
|
2963
2963
|
typeName: I.ZodVoid,
|
|
2964
2964
|
...D(i)
|
|
2965
2965
|
});
|
|
2966
|
-
class
|
|
2966
|
+
class Ce extends L {
|
|
2967
2967
|
_parse(e) {
|
|
2968
2968
|
const { ctx: t, status: n } = this._processInputParams(e), s = this._def;
|
|
2969
2969
|
if (t.parsedType !== v.array)
|
|
@@ -3007,19 +3007,19 @@ class Ee extends L {
|
|
|
3007
3007
|
return this._def.type;
|
|
3008
3008
|
}
|
|
3009
3009
|
min(e, t) {
|
|
3010
|
-
return new
|
|
3010
|
+
return new Ce({
|
|
3011
3011
|
...this._def,
|
|
3012
3012
|
minLength: { value: e, message: T.toString(t) }
|
|
3013
3013
|
});
|
|
3014
3014
|
}
|
|
3015
3015
|
max(e, t) {
|
|
3016
|
-
return new
|
|
3016
|
+
return new Ce({
|
|
3017
3017
|
...this._def,
|
|
3018
3018
|
maxLength: { value: e, message: T.toString(t) }
|
|
3019
3019
|
});
|
|
3020
3020
|
}
|
|
3021
3021
|
length(e, t) {
|
|
3022
|
-
return new
|
|
3022
|
+
return new Ce({
|
|
3023
3023
|
...this._def,
|
|
3024
3024
|
exactLength: { value: e, message: T.toString(t) }
|
|
3025
3025
|
});
|
|
@@ -3028,7 +3028,7 @@ class Ee extends L {
|
|
|
3028
3028
|
return this.min(1, e);
|
|
3029
3029
|
}
|
|
3030
3030
|
}
|
|
3031
|
-
|
|
3031
|
+
Ce.create = (i, e) => new Ce({
|
|
3032
3032
|
type: i,
|
|
3033
3033
|
minLength: null,
|
|
3034
3034
|
maxLength: null,
|
|
@@ -3048,7 +3048,7 @@ function Vt(i) {
|
|
|
3048
3048
|
shape: () => e
|
|
3049
3049
|
});
|
|
3050
3050
|
} else
|
|
3051
|
-
return i instanceof
|
|
3051
|
+
return i instanceof Ce ? new Ce({
|
|
3052
3052
|
...i._def,
|
|
3053
3053
|
type: Vt(i.element)
|
|
3054
3054
|
}) : i instanceof Fe ? Fe.create(Vt(i.unwrap())) : i instanceof Mt ? Mt.create(Vt(i.unwrap())) : i instanceof ze ? ze.create(i.items.map((e) => Vt(e))) : i;
|
|
@@ -3414,8 +3414,8 @@ Sn.create = (i, e) => new Sn({
|
|
|
3414
3414
|
typeName: I.ZodUnion,
|
|
3415
3415
|
...D(e)
|
|
3416
3416
|
});
|
|
3417
|
-
const Jn = (i) => i instanceof On ? Jn(i.schema) : i instanceof
|
|
3418
|
-
class
|
|
3417
|
+
const Jn = (i) => i instanceof On ? Jn(i.schema) : i instanceof Ee ? Jn(i.innerType()) : i instanceof In ? [i.value] : i instanceof lt ? i.options : i instanceof Mn ? Object.keys(i.enum) : i instanceof Nn ? Jn(i._def.innerType) : i instanceof An ? [void 0] : i instanceof Tn ? [null] : null;
|
|
3418
|
+
class Ci extends L {
|
|
3419
3419
|
_parse(e) {
|
|
3420
3420
|
const { ctx: t } = this._processInputParams(e);
|
|
3421
3421
|
if (t.parsedType !== v.object)
|
|
@@ -3468,7 +3468,7 @@ class Ei extends L {
|
|
|
3468
3468
|
s.set(o, r);
|
|
3469
3469
|
}
|
|
3470
3470
|
}
|
|
3471
|
-
return new
|
|
3471
|
+
return new Ci({
|
|
3472
3472
|
typeName: I.ZodDiscriminatedUnion,
|
|
3473
3473
|
discriminator: e,
|
|
3474
3474
|
options: t,
|
|
@@ -3504,7 +3504,7 @@ function Xi(i, e) {
|
|
|
3504
3504
|
} else
|
|
3505
3505
|
return t === v.date && n === v.date && +i == +e ? { valid: !0, data: i } : { valid: !1 };
|
|
3506
3506
|
}
|
|
3507
|
-
class
|
|
3507
|
+
class Cn extends L {
|
|
3508
3508
|
_parse(e) {
|
|
3509
3509
|
const { status: t, ctx: n } = this._processInputParams(e), s = (r, a) => {
|
|
3510
3510
|
if (Yi(r) || Yi(a))
|
|
@@ -3536,7 +3536,7 @@ class En extends L {
|
|
|
3536
3536
|
}));
|
|
3537
3537
|
}
|
|
3538
3538
|
}
|
|
3539
|
-
|
|
3539
|
+
Cn.create = (i, e, t) => new Cn({
|
|
3540
3540
|
left: i,
|
|
3541
3541
|
right: e,
|
|
3542
3542
|
typeName: I.ZodIntersection,
|
|
@@ -3592,7 +3592,7 @@ ze.create = (i, e) => {
|
|
|
3592
3592
|
...D(e)
|
|
3593
3593
|
});
|
|
3594
3594
|
};
|
|
3595
|
-
class
|
|
3595
|
+
class En extends L {
|
|
3596
3596
|
get keySchema() {
|
|
3597
3597
|
return this._def.keyType;
|
|
3598
3598
|
}
|
|
@@ -3619,12 +3619,12 @@ class Cn extends L {
|
|
|
3619
3619
|
return this._def.valueType;
|
|
3620
3620
|
}
|
|
3621
3621
|
static create(e, t, n) {
|
|
3622
|
-
return t instanceof L ? new
|
|
3622
|
+
return t instanceof L ? new En({
|
|
3623
3623
|
keyType: e,
|
|
3624
3624
|
valueType: t,
|
|
3625
3625
|
typeName: I.ZodRecord,
|
|
3626
3626
|
...D(n)
|
|
3627
|
-
}) : new
|
|
3627
|
+
}) : new En({
|
|
3628
3628
|
keyType: Te.create(),
|
|
3629
3629
|
valueType: e,
|
|
3630
3630
|
typeName: I.ZodRecord,
|
|
@@ -3990,7 +3990,7 @@ en.create = (i, e) => new en({
|
|
|
3990
3990
|
typeName: I.ZodPromise,
|
|
3991
3991
|
...D(e)
|
|
3992
3992
|
});
|
|
3993
|
-
class
|
|
3993
|
+
class Ee extends L {
|
|
3994
3994
|
innerType() {
|
|
3995
3995
|
return this._def.schema;
|
|
3996
3996
|
}
|
|
@@ -4058,13 +4058,13 @@ class Ce extends L {
|
|
|
4058
4058
|
W.assertNever(s);
|
|
4059
4059
|
}
|
|
4060
4060
|
}
|
|
4061
|
-
|
|
4061
|
+
Ee.create = (i, e, t) => new Ee({
|
|
4062
4062
|
schema: i,
|
|
4063
4063
|
typeName: I.ZodEffects,
|
|
4064
4064
|
effect: e,
|
|
4065
4065
|
...D(t)
|
|
4066
4066
|
});
|
|
4067
|
-
|
|
4067
|
+
Ee.createWithPreprocess = (i, e, t) => new Ee({
|
|
4068
4068
|
schema: e,
|
|
4069
4069
|
effect: { type: "preprocess", transform: i },
|
|
4070
4070
|
typeName: I.ZodEffects,
|
|
@@ -4256,7 +4256,7 @@ var I;
|
|
|
4256
4256
|
})(I || (I = {}));
|
|
4257
4257
|
const Zo = (i, e = {
|
|
4258
4258
|
message: `Input not instance of ${i.name}`
|
|
4259
|
-
}) => ta((t) => t instanceof i, e), na = Te.create, ia = at.create, Ho = gi.create, Uo = ot.create, sa = $n.create, Bo = Ot.create, Wo = ui.create, Vo = An.create, Fo = Tn.create, Ko = Xt.create, qo = At.create, Jo = Ke.create, Qo = pi.create, Yo =
|
|
4259
|
+
}) => ta((t) => t instanceof i, e), na = Te.create, ia = at.create, Ho = gi.create, Uo = ot.create, sa = $n.create, Bo = Ot.create, Wo = ui.create, Vo = An.create, Fo = Tn.create, Ko = Xt.create, qo = At.create, Jo = Ke.create, Qo = pi.create, Yo = Ce.create, Go = te.create, Xo = te.strictCreate, el = Sn.create, tl = Ci.create, nl = Cn.create, il = ze.create, sl = En.create, rl = fi.create, al = It.create, ol = Ft.create, ll = On.create, cl = In.create, dl = lt.create, hl = Mn.create, ul = en.create, dr = Ee.create, pl = Fe.create, fl = Mt.create, ml = Ee.createWithPreprocess, gl = Ln.create, yl = () => na().optional(), vl = () => ia().optional(), bl = () => sa().optional(), wl = {
|
|
4260
4260
|
string: (i) => Te.create({ ...i, coerce: !0 }),
|
|
4261
4261
|
number: (i) => at.create({ ...i, coerce: !0 }),
|
|
4262
4262
|
boolean: (i) => $n.create({
|
|
@@ -4303,13 +4303,13 @@ var x = /* @__PURE__ */ Object.freeze({
|
|
|
4303
4303
|
ZodUnknown: At,
|
|
4304
4304
|
ZodNever: Ke,
|
|
4305
4305
|
ZodVoid: pi,
|
|
4306
|
-
ZodArray:
|
|
4306
|
+
ZodArray: Ce,
|
|
4307
4307
|
ZodObject: te,
|
|
4308
4308
|
ZodUnion: Sn,
|
|
4309
|
-
ZodDiscriminatedUnion:
|
|
4310
|
-
ZodIntersection:
|
|
4309
|
+
ZodDiscriminatedUnion: Ci,
|
|
4310
|
+
ZodIntersection: Cn,
|
|
4311
4311
|
ZodTuple: ze,
|
|
4312
|
-
ZodRecord:
|
|
4312
|
+
ZodRecord: En,
|
|
4313
4313
|
ZodMap: fi,
|
|
4314
4314
|
ZodSet: It,
|
|
4315
4315
|
ZodFunction: Ft,
|
|
@@ -4318,8 +4318,8 @@ var x = /* @__PURE__ */ Object.freeze({
|
|
|
4318
4318
|
ZodEnum: lt,
|
|
4319
4319
|
ZodNativeEnum: Mn,
|
|
4320
4320
|
ZodPromise: en,
|
|
4321
|
-
ZodEffects:
|
|
4322
|
-
ZodTransformer:
|
|
4321
|
+
ZodEffects: Ee,
|
|
4322
|
+
ZodTransformer: Ee,
|
|
4323
4323
|
ZodOptional: Fe,
|
|
4324
4324
|
ZodNullable: Mt,
|
|
4325
4325
|
ZodDefault: Nn,
|
|
@@ -4381,7 +4381,7 @@ var x = /* @__PURE__ */ Object.freeze({
|
|
|
4381
4381
|
quotelessJson: $o,
|
|
4382
4382
|
ZodError: Se
|
|
4383
4383
|
});
|
|
4384
|
-
const
|
|
4384
|
+
const Ei = x.object({
|
|
4385
4385
|
assistantId: x.string(),
|
|
4386
4386
|
params: x.record(x.any()).default({}),
|
|
4387
4387
|
config: x.object({
|
|
@@ -4462,7 +4462,7 @@ let Nt = class extends _e {
|
|
|
4462
4462
|
};
|
|
4463
4463
|
}
|
|
4464
4464
|
connectedCallback() {
|
|
4465
|
-
super.connectedCallback(), this.cleanOptions =
|
|
4465
|
+
super.connectedCallback(), this.cleanOptions = Ei.parse(this.options), this.onResizeHandler(), window.addEventListener("resize", this.onResizeHandler, { passive: !0 });
|
|
4466
4466
|
}
|
|
4467
4467
|
disconnectedCallback() {
|
|
4468
4468
|
super.disconnectedCallback(), or(this), window.removeEventListener("resize", this.onResizeHandler);
|
|
@@ -4552,8 +4552,8 @@ async function $l(i, e = {}) {
|
|
|
4552
4552
|
})).json();
|
|
4553
4553
|
}
|
|
4554
4554
|
async function Al(i, e = "No reason provided") {
|
|
4555
|
-
await fetch(`${Oi}/threads/${i}`, {
|
|
4556
|
-
method: "
|
|
4555
|
+
await fetch(`${Oi}/threads/${i}/end`, {
|
|
4556
|
+
method: "POST",
|
|
4557
4557
|
headers: {
|
|
4558
4558
|
"Content-Type": "application/json"
|
|
4559
4559
|
},
|
|
@@ -4578,7 +4578,7 @@ async function Sl(i, e, t, n = !1) {
|
|
|
4578
4578
|
body: JSON.stringify({ params: t, rerunLLM: n })
|
|
4579
4579
|
})).json();
|
|
4580
4580
|
}
|
|
4581
|
-
function
|
|
4581
|
+
function Cl(i) {
|
|
4582
4582
|
return { all: i = i || /* @__PURE__ */ new Map(), on: function(e, t) {
|
|
4583
4583
|
var n = i.get(e);
|
|
4584
4584
|
n ? n.push(t) : i.set(e, [t]);
|
|
@@ -4594,7 +4594,7 @@ function El(i) {
|
|
|
4594
4594
|
});
|
|
4595
4595
|
} };
|
|
4596
4596
|
}
|
|
4597
|
-
class
|
|
4597
|
+
class El {
|
|
4598
4598
|
constructor(e, t = {}) {
|
|
4599
4599
|
if (this._assistantId = "", this._conversationDetails = null, this._messages = [], this.isTyping = !1, this.inputDisabled = !1, this.chatEndingWarningSent = !1, this.chatEnded = !1, this.onStorageEvent = (n) => {
|
|
4600
4600
|
var s;
|
|
@@ -4629,7 +4629,7 @@ class Cl {
|
|
|
4629
4629
|
resetEndedChatOnLoad: !1,
|
|
4630
4630
|
historyKey: "main",
|
|
4631
4631
|
...t
|
|
4632
|
-
}, this._emitter =
|
|
4632
|
+
}, this._emitter = Cl(), this.on = this._emitter.on.bind(this._emitter), this.off = this._emitter.off.bind(this._emitter), t.events && Object.entries(t.events).forEach(([n, s]) => {
|
|
4633
4633
|
this._emitter.on(n, s);
|
|
4634
4634
|
}), t.historyKey) {
|
|
4635
4635
|
this._messages = this.storageGet("messageHistory", []);
|
|
@@ -6430,7 +6430,7 @@ X(fn, "passThroughHooks", /* @__PURE__ */ new Set([
|
|
|
6430
6430
|
var Qn, ns, is, yr;
|
|
6431
6431
|
class ga {
|
|
6432
6432
|
constructor(...e) {
|
|
6433
|
-
|
|
6433
|
+
Cs(this, Qn), Cs(this, is), X(this, "defaults", gs()), X(this, "options", this.setOptions), X(this, "parse", Ki(this, Qn, ns).call(this, Re.lex, Pe.parse)), X(this, "parseInline", Ki(this, Qn, ns).call(this, Re.lexInline, Pe.parseInline)), X(this, "Parser", Pe), X(this, "Renderer", Pn), X(this, "TextRenderer", xs), X(this, "Lexer", Re), X(this, "Tokenizer", vi), X(this, "Hooks", fn), this.use(...e);
|
|
6434
6434
|
}
|
|
6435
6435
|
/**
|
|
6436
6436
|
* Run callback for every token
|
|
@@ -6675,9 +6675,9 @@ let be = class extends _e {
|
|
|
6675
6675
|
}
|
|
6676
6676
|
// Lifecycle Events
|
|
6677
6677
|
connectedCallback() {
|
|
6678
|
-
super.connectedCallback(), this.cleanOptions =
|
|
6678
|
+
super.connectedCallback(), this.cleanOptions = Ei.parse(this.options || {});
|
|
6679
6679
|
const { assistantId: i, params: e, config: t } = this.cleanOptions;
|
|
6680
|
-
this.checkIfDisclaimerShouldBeShown(), br(this, tt, new
|
|
6680
|
+
this.checkIfDisclaimerShouldBeShown(), br(this, tt, new El(i, {
|
|
6681
6681
|
params: e,
|
|
6682
6682
|
simulateDelays: t.simulateDelays,
|
|
6683
6683
|
historyKey: t.historyKey,
|
|
@@ -7086,8 +7086,8 @@ var va = { exports: {} };
|
|
|
7086
7086
|
function ge(p, _) {
|
|
7087
7087
|
Ye("warn", p, _, !0);
|
|
7088
7088
|
}
|
|
7089
|
-
function Ye(p, _, Z,
|
|
7090
|
-
|
|
7089
|
+
function Ye(p, _, Z, C) {
|
|
7090
|
+
C === !0 && typeof window.console == "object" && console[p](Zt(_), Z);
|
|
7091
7091
|
}
|
|
7092
7092
|
function re(p) {
|
|
7093
7093
|
function _() {
|
|
@@ -7101,12 +7101,12 @@ var va = { exports: {} };
|
|
|
7101
7101
|
return {
|
|
7102
7102
|
iframe: Y,
|
|
7103
7103
|
id: k[0],
|
|
7104
|
-
height: z +
|
|
7104
|
+
height: z + C(G) + H(G),
|
|
7105
7105
|
width: k[2],
|
|
7106
7106
|
type: k[3]
|
|
7107
7107
|
};
|
|
7108
7108
|
}
|
|
7109
|
-
function
|
|
7109
|
+
function C(k) {
|
|
7110
7110
|
if (k.boxSizing !== "border-box")
|
|
7111
7111
|
return 0;
|
|
7112
7112
|
var z = k.paddingTop ? parseInt(k.paddingTop, 10) : 0, Y = k.paddingBottom ? parseInt(k.paddingBottom, 10) : 0;
|
|
@@ -7222,7 +7222,7 @@ var va = { exports: {} };
|
|
|
7222
7222
|
var k = !0;
|
|
7223
7223
|
return F.iframe === null && (ge(N, "IFrame (" + F.id + ") not found"), k = !1), k;
|
|
7224
7224
|
}
|
|
7225
|
-
function
|
|
7225
|
+
function E(k) {
|
|
7226
7226
|
var z = k.getBoundingClientRect();
|
|
7227
7227
|
return M(N), {
|
|
7228
7228
|
x: Math.floor(Number(z.left) + Number(d.x)),
|
|
@@ -7248,7 +7248,7 @@ var va = { exports: {} };
|
|
|
7248
7248
|
"Unable to scroll to requested position, window.parentIFrame not found"
|
|
7249
7249
|
);
|
|
7250
7250
|
}
|
|
7251
|
-
var ue = k ?
|
|
7251
|
+
var ue = k ? E(F.iframe) : { x: 0, y: 0 }, ye = Y();
|
|
7252
7252
|
j(
|
|
7253
7253
|
N,
|
|
7254
7254
|
"Reposition requested from iFrame (offset x:" + ue.x + " y:" + ue.y + ")"
|
|
@@ -7259,7 +7259,7 @@ var va = { exports: {} };
|
|
|
7259
7259
|
}
|
|
7260
7260
|
function fe(k) {
|
|
7261
7261
|
function z() {
|
|
7262
|
-
var Ue =
|
|
7262
|
+
var Ue = E(ye);
|
|
7263
7263
|
j(
|
|
7264
7264
|
N,
|
|
7265
7265
|
"Moving to in page link (#" + G + ") at x: " + Ue.x + " y: " + Ue.y
|
|
@@ -7381,10 +7381,10 @@ var va = { exports: {} };
|
|
|
7381
7381
|
Ae === "[iFrameResizerChild]Ready" ? Li() : ut() ? (F = Z(), N = F.id, c[N] && (c[N].loaded = !0), !Ze() && Di(N) && (j(N, "Received: " + Ae), ji() && Ne() && zi())) : sn(N, "Ignored: " + Ae);
|
|
7382
7382
|
}
|
|
7383
7383
|
function U(p, _, Z) {
|
|
7384
|
-
var
|
|
7384
|
+
var C = null, H = null;
|
|
7385
7385
|
if (c[p])
|
|
7386
|
-
if (
|
|
7387
|
-
H =
|
|
7386
|
+
if (C = c[p][_], typeof C == "function")
|
|
7387
|
+
H = C(Z);
|
|
7388
7388
|
else
|
|
7389
7389
|
throw new TypeError(
|
|
7390
7390
|
_ + " on iFrame[" + p + "] is not a function"
|
|
@@ -7450,44 +7450,44 @@ var va = { exports: {} };
|
|
|
7450
7450
|
function Z(q) {
|
|
7451
7451
|
!s && p[q] === "0" && (s = !0, j(H, "Hidden iFrame detected, creating visibility listener"), De());
|
|
7452
7452
|
}
|
|
7453
|
-
function
|
|
7453
|
+
function C(q) {
|
|
7454
7454
|
_(q), Z(q);
|
|
7455
7455
|
}
|
|
7456
7456
|
var H = p.iframe.id;
|
|
7457
|
-
c[H] && (c[H].sizeHeight &&
|
|
7457
|
+
c[H] && (c[H].sizeHeight && C("height"), c[H].sizeWidth && C("width"));
|
|
7458
7458
|
}
|
|
7459
7459
|
function R(p, _, Z) {
|
|
7460
7460
|
Z !== _.type && u && // including check for jasmine because had trouble getting spy to work in unit test using requestAnimationFrame
|
|
7461
7461
|
!window.jasmine ? (j(_.id, "Requesting animation frame"), u(p)) : p();
|
|
7462
7462
|
}
|
|
7463
|
-
function S(p, _, Z,
|
|
7463
|
+
function S(p, _, Z, C, H) {
|
|
7464
7464
|
function q() {
|
|
7465
|
-
var Xe = c[
|
|
7465
|
+
var Xe = c[C] && c[C].targetOrigin;
|
|
7466
7466
|
j(
|
|
7467
|
-
|
|
7468
|
-
"[" + p + "] Sending msg to iframe[" +
|
|
7467
|
+
C,
|
|
7468
|
+
"[" + p + "] Sending msg to iframe[" + C + "] (" + _ + ") targetOrigin: " + Xe
|
|
7469
7469
|
), Z.contentWindow.postMessage(o + _, Xe);
|
|
7470
7470
|
}
|
|
7471
7471
|
function Ne() {
|
|
7472
|
-
ge(
|
|
7472
|
+
ge(C, "[" + p + "] IFrame(" + C + ") not found");
|
|
7473
7473
|
}
|
|
7474
7474
|
function ut() {
|
|
7475
7475
|
Z && "contentWindow" in Z && Z.contentWindow !== null ? q() : Ne();
|
|
7476
7476
|
}
|
|
7477
7477
|
function Ze() {
|
|
7478
7478
|
function Xe() {
|
|
7479
|
-
c[
|
|
7480
|
-
|
|
7481
|
-
"IFrame has not responded within " + c[
|
|
7479
|
+
c[C] && !c[C].loaded && !He && (He = !0, ge(
|
|
7480
|
+
C,
|
|
7481
|
+
"IFrame has not responded within " + c[C].warningTimeout / 1e3 + " seconds. Check iFrameResizer.contentWindow.js has been loaded in iFrame. This message can be ignored if everything is working, or you can set the warningTimeout option to a higher value or zero to suppress this warning."
|
|
7482
7482
|
));
|
|
7483
7483
|
}
|
|
7484
|
-
H && c[
|
|
7484
|
+
H && c[C] && c[C].warningTimeout && (c[C].msgTimeout = setTimeout(
|
|
7485
7485
|
Xe,
|
|
7486
|
-
c[
|
|
7486
|
+
c[C].warningTimeout
|
|
7487
7487
|
));
|
|
7488
7488
|
}
|
|
7489
7489
|
var He = !1;
|
|
7490
|
-
|
|
7490
|
+
C = C || Z.id, c[C] && (ut(), Ze());
|
|
7491
7491
|
}
|
|
7492
7492
|
function K(p) {
|
|
7493
7493
|
return p + ":" + c[p].bodyMarginV1 + ":" + c[p].sizeWidth + ":" + c[p].log + ":" + c[p].interval + ":" + c[p].enablePublicMethods + ":" + c[p].autoResize + ":" + c[p].bodyMargin + ":" + c[p].heightCalculationMethod + ":" + c[p].bodyBackground + ":" + c[p].bodyPadding + ":" + c[p].tolerance + ":" + c[p].inPageLinks + ":" + c[p].resizeFrom + ":" + c[p].widthCalculationMethod + ":" + c[p].mouseEvents;
|
|
@@ -7498,34 +7498,34 @@ var va = { exports: {} };
|
|
|
7498
7498
|
function ie(p, _) {
|
|
7499
7499
|
function Z() {
|
|
7500
7500
|
function O(fe) {
|
|
7501
|
-
var $e = c[
|
|
7502
|
-
$e !== 1 / 0 && $e !== 0 && (p.style[fe] = ee($e) ? $e + "px" : $e, j(
|
|
7501
|
+
var $e = c[E][fe];
|
|
7502
|
+
$e !== 1 / 0 && $e !== 0 && (p.style[fe] = ee($e) ? $e + "px" : $e, j(E, "Set " + fe + " = " + p.style[fe]));
|
|
7503
7503
|
}
|
|
7504
7504
|
function le(fe) {
|
|
7505
|
-
if (c[
|
|
7505
|
+
if (c[E]["min" + fe] > c[E]["max" + fe])
|
|
7506
7506
|
throw new Error(
|
|
7507
7507
|
"Value for min" + fe + " can not be greater than max" + fe
|
|
7508
7508
|
);
|
|
7509
7509
|
}
|
|
7510
7510
|
le("Height"), le("Width"), O("maxHeight"), O("minHeight"), O("maxWidth"), O("minWidth");
|
|
7511
7511
|
}
|
|
7512
|
-
function
|
|
7512
|
+
function C() {
|
|
7513
7513
|
var O = _ && _.id || A.id + t++;
|
|
7514
7514
|
return document.getElementById(O) !== null && (O += t++), O;
|
|
7515
7515
|
}
|
|
7516
7516
|
function H(O) {
|
|
7517
7517
|
if (typeof O != "string")
|
|
7518
7518
|
throw new TypeError("Invaild id for iFrame. Expected String");
|
|
7519
|
-
return O === "" && (p.id = O =
|
|
7519
|
+
return O === "" && (p.id = O = C(), n = (_ || {}).log, j(
|
|
7520
7520
|
O,
|
|
7521
7521
|
"Added missing iframe ID: " + O + " (" + p.src + ")"
|
|
7522
7522
|
)), O;
|
|
7523
7523
|
}
|
|
7524
7524
|
function q() {
|
|
7525
7525
|
switch (j(
|
|
7526
|
-
|
|
7527
|
-
"IFrame scrolling " + (c[
|
|
7528
|
-
), p.style.overflow = (c[
|
|
7526
|
+
E,
|
|
7527
|
+
"IFrame scrolling " + (c[E] && c[E].scrolling ? "enabled" : "disabled") + " for " + E
|
|
7528
|
+
), p.style.overflow = (c[E] && c[E].scrolling) === !1 ? "hidden" : "auto", c[E] && c[E].scrolling) {
|
|
7529
7529
|
case "omit":
|
|
7530
7530
|
break;
|
|
7531
7531
|
case !0: {
|
|
@@ -7537,43 +7537,43 @@ var va = { exports: {} };
|
|
|
7537
7537
|
break;
|
|
7538
7538
|
}
|
|
7539
7539
|
default:
|
|
7540
|
-
p.scrolling = c[
|
|
7540
|
+
p.scrolling = c[E] ? c[E].scrolling : "no";
|
|
7541
7541
|
}
|
|
7542
7542
|
}
|
|
7543
7543
|
function Ne() {
|
|
7544
|
-
(typeof (c[
|
|
7544
|
+
(typeof (c[E] && c[E].bodyMargin) == "number" || (c[E] && c[E].bodyMargin) === "0") && (c[E].bodyMarginV1 = c[E].bodyMargin, c[E].bodyMargin = "" + c[E].bodyMargin + "px");
|
|
7545
7545
|
}
|
|
7546
7546
|
function ut() {
|
|
7547
|
-
var O = c[
|
|
7547
|
+
var O = c[E] && c[E].firstRun, le = c[E] && c[E].heightCalculationMethod in h;
|
|
7548
7548
|
!O && le && $({ iframe: p, height: 0, width: 0, type: "init" });
|
|
7549
7549
|
}
|
|
7550
7550
|
function Ze() {
|
|
7551
|
-
c[
|
|
7552
|
-
close: Ht.bind(null, c[
|
|
7551
|
+
c[E] && (c[E].iframe.iFrameResizer = {
|
|
7552
|
+
close: Ht.bind(null, c[E].iframe),
|
|
7553
7553
|
removeListeners: dt.bind(
|
|
7554
7554
|
null,
|
|
7555
|
-
c[
|
|
7555
|
+
c[E].iframe
|
|
7556
7556
|
),
|
|
7557
7557
|
resize: S.bind(
|
|
7558
7558
|
null,
|
|
7559
7559
|
"Window resize",
|
|
7560
7560
|
"resize",
|
|
7561
|
-
c[
|
|
7561
|
+
c[E].iframe
|
|
7562
7562
|
),
|
|
7563
7563
|
moveToAnchor: function(O) {
|
|
7564
7564
|
S(
|
|
7565
7565
|
"Move to anchor",
|
|
7566
7566
|
"moveToAnchor:" + O,
|
|
7567
|
-
c[
|
|
7568
|
-
|
|
7567
|
+
c[E].iframe,
|
|
7568
|
+
E
|
|
7569
7569
|
);
|
|
7570
7570
|
},
|
|
7571
7571
|
sendMessage: function(O) {
|
|
7572
7572
|
O = JSON.stringify(O), S(
|
|
7573
7573
|
"Send Message",
|
|
7574
7574
|
"message:" + O,
|
|
7575
|
-
c[
|
|
7576
|
-
|
|
7575
|
+
c[E].iframe,
|
|
7576
|
+
E
|
|
7577
7577
|
);
|
|
7578
7578
|
}
|
|
7579
7579
|
});
|
|
@@ -7606,7 +7606,7 @@ var va = { exports: {} };
|
|
|
7606
7606
|
}
|
|
7607
7607
|
function Ni(O) {
|
|
7608
7608
|
for (var le in A)
|
|
7609
|
-
Object.prototype.hasOwnProperty.call(A, le) && (c[
|
|
7609
|
+
Object.prototype.hasOwnProperty.call(A, le) && (c[E][le] = Object.prototype.hasOwnProperty.call(
|
|
7610
7610
|
O,
|
|
7611
7611
|
le
|
|
7612
7612
|
) ? O[le] : A[le]);
|
|
@@ -7619,19 +7619,19 @@ var va = { exports: {} };
|
|
|
7619
7619
|
if (le.length === 2) {
|
|
7620
7620
|
var fe = "on" + le[0].charAt(0).toUpperCase() + le[0].slice(1);
|
|
7621
7621
|
this[fe] = this[O], delete this[O], ge(
|
|
7622
|
-
|
|
7622
|
+
E,
|
|
7623
7623
|
"Deprecated: '" + O + "' has been renamed '" + fe + "'. The old method will be removed in the next major version."
|
|
7624
7624
|
);
|
|
7625
7625
|
}
|
|
7626
7626
|
}
|
|
7627
7627
|
function Pi(O) {
|
|
7628
|
-
O = O || {}, c[
|
|
7628
|
+
O = O || {}, c[E] = /* @__PURE__ */ Object.create(null), c[E].iframe = p, c[E].firstRun = !0, c[E].remoteHost = p.src && p.src.split("/").slice(0, 3).join("/"), Xe(O), Object.keys(O).forEach(Ri, O), Ni(O), c[E] && (c[E].targetOrigin = c[E].checkOrigin === !0 ? Wn(c[E].remoteHost) : "*");
|
|
7629
7629
|
}
|
|
7630
7630
|
function ji() {
|
|
7631
|
-
return
|
|
7631
|
+
return E in c && "iFrameResizer" in p;
|
|
7632
7632
|
}
|
|
7633
|
-
var
|
|
7634
|
-
ji() ? ge(
|
|
7633
|
+
var E = H(p.id);
|
|
7634
|
+
ji() ? ge(E, "Ignored iFrame, already setup.") : (Pi(_), q(), Z(), Ne(), He(K(E)), Ze());
|
|
7635
7635
|
}
|
|
7636
7636
|
function ae(p, _) {
|
|
7637
7637
|
f === null && (f = setTimeout(function() {
|
|
@@ -7678,11 +7678,11 @@ var va = { exports: {} };
|
|
|
7678
7678
|
characterDataOldValue: !1,
|
|
7679
7679
|
childList: !0,
|
|
7680
7680
|
subtree: !0
|
|
7681
|
-
}, Ne = new
|
|
7681
|
+
}, Ne = new C(_);
|
|
7682
7682
|
Ne.observe(H, q);
|
|
7683
7683
|
}
|
|
7684
|
-
var
|
|
7685
|
-
|
|
7684
|
+
var C = V();
|
|
7685
|
+
C && Z();
|
|
7686
7686
|
}
|
|
7687
7687
|
function ht(p) {
|
|
7688
7688
|
function _() {
|
|
@@ -7697,11 +7697,11 @@ var va = { exports: {} };
|
|
|
7697
7697
|
document.visibilityState !== "hidden" && (j("document", "Trigger event: Visibility change"), ae(p, 16));
|
|
7698
7698
|
}
|
|
7699
7699
|
function he(p, _) {
|
|
7700
|
-
function Z(
|
|
7701
|
-
return c[
|
|
7700
|
+
function Z(C) {
|
|
7701
|
+
return c[C] && c[C].resizeFrom === "parent" && c[C].autoResize && !c[C].firstRun;
|
|
7702
7702
|
}
|
|
7703
|
-
Object.keys(c).forEach(function(
|
|
7704
|
-
Z(
|
|
7703
|
+
Object.keys(c).forEach(function(C) {
|
|
7704
|
+
Z(C) && S(p, _, c[C].iframe, C);
|
|
7705
7705
|
});
|
|
7706
7706
|
}
|
|
7707
7707
|
function Me() {
|
|
@@ -7710,7 +7710,7 @@ var va = { exports: {} };
|
|
|
7710
7710
|
}), se(document, "visibilitychange", Ie), se(document, "-webkit-visibilitychange", Ie);
|
|
7711
7711
|
}
|
|
7712
7712
|
function Le() {
|
|
7713
|
-
function p(
|
|
7713
|
+
function p(C, H) {
|
|
7714
7714
|
function q() {
|
|
7715
7715
|
if (H.tagName) {
|
|
7716
7716
|
if (H.tagName.toUpperCase() !== "IFRAME")
|
|
@@ -7720,26 +7720,26 @@ var va = { exports: {} };
|
|
|
7720
7720
|
} else
|
|
7721
7721
|
throw new TypeError("Object is not a valid DOM element");
|
|
7722
7722
|
}
|
|
7723
|
-
H && (q(), ie(H,
|
|
7723
|
+
H && (q(), ie(H, C), Z.push(H));
|
|
7724
7724
|
}
|
|
7725
|
-
function _(
|
|
7726
|
-
|
|
7725
|
+
function _(C) {
|
|
7726
|
+
C && C.enablePublicMethods && ge(
|
|
7727
7727
|
"enablePublicMethods option has been removed, public methods are now always available in the iFrame"
|
|
7728
7728
|
);
|
|
7729
7729
|
}
|
|
7730
7730
|
var Z;
|
|
7731
|
-
return Lt(), Me(), function(
|
|
7732
|
-
switch (Z = [], _(
|
|
7731
|
+
return Lt(), Me(), function(C, H) {
|
|
7732
|
+
switch (Z = [], _(C), typeof H) {
|
|
7733
7733
|
case "undefined":
|
|
7734
7734
|
case "string": {
|
|
7735
7735
|
Array.prototype.forEach.call(
|
|
7736
7736
|
document.querySelectorAll(H || "iframe"),
|
|
7737
|
-
p.bind(e,
|
|
7737
|
+
p.bind(e, C)
|
|
7738
7738
|
);
|
|
7739
7739
|
break;
|
|
7740
7740
|
}
|
|
7741
7741
|
case "object": {
|
|
7742
|
-
p(
|
|
7742
|
+
p(C, H);
|
|
7743
7743
|
break;
|
|
7744
7744
|
}
|
|
7745
7745
|
default:
|
|
@@ -7750,7 +7750,7 @@ var va = { exports: {} };
|
|
|
7750
7750
|
}
|
|
7751
7751
|
function Ut(p) {
|
|
7752
7752
|
p.fn ? p.fn.iFrameResize || (p.fn.iFrameResize = function(_) {
|
|
7753
|
-
function Z(
|
|
7753
|
+
function Z(C, H) {
|
|
7754
7754
|
ie(H, _);
|
|
7755
7755
|
}
|
|
7756
7756
|
return this.filter("iframe").each(Z).end();
|
|
@@ -7890,8 +7890,8 @@ nn([
|
|
|
7890
7890
|
ct = nn([
|
|
7891
7891
|
qe("iai-chat-iframe-modal")
|
|
7892
7892
|
], ct);
|
|
7893
|
-
var Sc = Object.defineProperty,
|
|
7894
|
-
for (var s = n > 1 ? void 0 : n ?
|
|
7893
|
+
var Sc = Object.defineProperty, Cc = Object.getOwnPropertyDescriptor, ba = (i, e, t, n) => {
|
|
7894
|
+
for (var s = n > 1 ? void 0 : n ? Cc(e, t) : e, r = i.length - 1, a; r >= 0; r--)
|
|
7895
7895
|
(a = i[r]) && (s = (n ? a(e, t, s) : a(s)) || s);
|
|
7896
7896
|
return n && s && Sc(e, t, s), s;
|
|
7897
7897
|
};
|
|
@@ -7921,7 +7921,7 @@ ba([
|
|
|
7921
7921
|
wi = ba([
|
|
7922
7922
|
qe("iai-chat-message-assistant")
|
|
7923
7923
|
], wi);
|
|
7924
|
-
async function
|
|
7924
|
+
async function Ec(i, e) {
|
|
7925
7925
|
const { type: t, params: n } = i, s = e[t];
|
|
7926
7926
|
if (!s)
|
|
7927
7927
|
throw new Error(`No handler for enhanced content type ${t}`);
|
|
@@ -7939,7 +7939,7 @@ let Pt = class extends _e {
|
|
|
7939
7939
|
async connectedCallback() {
|
|
7940
7940
|
if (super.connectedCallback(), this.enhancedContent)
|
|
7941
7941
|
try {
|
|
7942
|
-
this.contentHtmlTemplate = await
|
|
7942
|
+
this.contentHtmlTemplate = await Ec(this.enhancedContent, this.options.handlers.enhancedContent);
|
|
7943
7943
|
} catch (i) {
|
|
7944
7944
|
console.warn("Error processing enhanced content", i);
|
|
7945
7945
|
}
|
|
@@ -8090,7 +8090,7 @@ function _a(i, e = "") {
|
|
|
8090
8090
|
}
|
|
8091
8091
|
class zc {
|
|
8092
8092
|
constructor(e) {
|
|
8093
|
-
this.widget = null, this.options =
|
|
8093
|
+
this.widget = null, this.options = Ei.parse(e);
|
|
8094
8094
|
const t = document.createElement("iai-chat-popup");
|
|
8095
8095
|
t.options = this.options;
|
|
8096
8096
|
const n = _a(this.options.config.styles);
|
|
@@ -8608,7 +8608,7 @@ function ka(i, e) {
|
|
|
8608
8608
|
}
|
|
8609
8609
|
class qc {
|
|
8610
8610
|
constructor(e, t) {
|
|
8611
|
-
const n =
|
|
8611
|
+
const n = Ei.parse({
|
|
8612
8612
|
assistantId: "7e59c8c1-a4ff-40f1-9a68-86ea294a4e75",
|
|
8613
8613
|
...e,
|
|
8614
8614
|
config: {
|