@iai-lib/any-chat-widget 0.1.0-alpha.14 → 0.1.0-alpha.15

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.
@@ -1,30 +1,30 @@
1
- var ri = (s, e, t) => {
1
+ var ai = (s, e, t) => {
2
2
  if (!e.has(s))
3
3
  throw TypeError("Cannot " + t);
4
4
  };
5
- var Zt = (s, e, t) => (ri(s, e, "read from private field"), t ? t.call(s) : e.get(s)), $s = (s, e, t) => {
5
+ var zt = (s, e, t) => (ai(s, e, "read from private field"), t ? t.call(s) : e.get(s)), Cs = (s, e, t) => {
6
6
  if (e.has(s))
7
7
  throw TypeError("Cannot add the same private member more than once");
8
8
  e instanceof WeakSet ? e.add(s) : e.set(s, t);
9
- }, Se = (s, e, t, i) => (ri(s, e, "write to private field"), i ? i.call(s, t) : e.set(s, t), t);
9
+ }, Te = (s, e, t, i) => (ai(s, e, "write to private field"), i ? i.call(s, t) : e.set(s, t), t);
10
10
  /**
11
11
  * @license
12
12
  * Copyright 2019 Google LLC
13
13
  * SPDX-License-Identifier: BSD-3-Clause
14
14
  */
15
- const Lt = globalThis, Rs = Lt.ShadowRoot && (Lt.ShadyCSS === void 0 || Lt.ShadyCSS.nativeShadow) && "adoptedStyleSheets" in Document.prototype && "replace" in CSSStyleSheet.prototype, Zs = Symbol(), ai = /* @__PURE__ */ new WeakMap();
16
- let Oi = class {
15
+ const Ut = globalThis, Zs = Ut.ShadowRoot && (Ut.ShadyCSS === void 0 || Ut.ShadyCSS.nativeShadow) && "adoptedStyleSheets" in Document.prototype && "replace" in CSSStyleSheet.prototype, Ls = Symbol(), oi = /* @__PURE__ */ new WeakMap();
16
+ let Ii = class {
17
17
  constructor(s, e, t) {
18
- if (this._$cssResult$ = !0, t !== Zs)
18
+ if (this._$cssResult$ = !0, t !== Ls)
19
19
  throw Error("CSSResult is not constructable. Use `unsafeCSS` or `css` instead.");
20
20
  this.cssText = s, this.t = e;
21
21
  }
22
22
  get styleSheet() {
23
23
  let s = this.o;
24
24
  const e = this.t;
25
- if (Rs && s === void 0) {
25
+ if (Zs && s === void 0) {
26
26
  const t = e !== void 0 && e.length === 1;
27
- t && (s = ai.get(e)), s === void 0 && ((this.o = s = new CSSStyleSheet()).replaceSync(this.cssText), t && ai.set(e, s));
27
+ t && (s = oi.get(e)), s === void 0 && ((this.o = s = new CSSStyleSheet()).replaceSync(this.cssText), t && oi.set(e, s));
28
28
  }
29
29
  return s;
30
30
  }
@@ -32,7 +32,7 @@ let Oi = class {
32
32
  return this.cssText;
33
33
  }
34
34
  };
35
- const gn = (s) => new Oi(typeof s == "string" ? s : s + "", void 0, Zs), rt = (s, ...e) => {
35
+ const gn = (s) => new Ii(typeof s == "string" ? s : s + "", void 0, Ls), ot = (s, ...e) => {
36
36
  const t = s.length === 1 ? s[0] : e.reduce((i, n, r) => i + ((a) => {
37
37
  if (a._$cssResult$ === !0)
38
38
  return a.cssText;
@@ -40,16 +40,16 @@ const gn = (s) => new Oi(typeof s == "string" ? s : s + "", void 0, Zs), rt = (s
40
40
  return a;
41
41
  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.");
42
42
  })(n) + s[r + 1], s[0]);
43
- return new Oi(t, s, Zs);
43
+ return new Ii(t, s, Ls);
44
44
  }, yn = (s, e) => {
45
- if (Rs)
45
+ if (Zs)
46
46
  s.adoptedStyleSheets = e.map((t) => t instanceof CSSStyleSheet ? t : t.styleSheet);
47
47
  else
48
48
  for (const t of e) {
49
- const i = document.createElement("style"), n = Lt.litNonce;
49
+ const i = document.createElement("style"), n = Ut.litNonce;
50
50
  n !== void 0 && i.setAttribute("nonce", n), i.textContent = t.cssText, s.appendChild(i);
51
51
  }
52
- }, oi = Rs ? (s) => s : (s) => s instanceof CSSStyleSheet ? ((e) => {
52
+ }, ci = Zs ? (s) => s : (s) => s instanceof CSSStyleSheet ? ((e) => {
53
53
  let t = "";
54
54
  for (const i of e.cssRules)
55
55
  t += i.cssText;
@@ -60,10 +60,10 @@ const gn = (s) => new Oi(typeof s == "string" ? s : s + "", void 0, Zs), rt = (s
60
60
  * Copyright 2017 Google LLC
61
61
  * SPDX-License-Identifier: BSD-3-Clause
62
62
  */
63
- const { is: vn, defineProperty: bn, getOwnPropertyDescriptor: wn, getOwnPropertyNames: _n, getOwnPropertySymbols: xn, getPrototypeOf: kn } = Object, tt = globalThis, ci = tt.trustedTypes, Tn = ci ? ci.emptyScript : "", di = tt.reactiveElementPolyfillSupport, lt = (s, e) => s, Ut = { toAttribute(s, e) {
63
+ const { is: vn, defineProperty: bn, getOwnPropertyDescriptor: wn, getOwnPropertyNames: _n, getOwnPropertySymbols: xn, getPrototypeOf: kn } = Object, it = globalThis, di = it.trustedTypes, Sn = di ? di.emptyScript : "", li = it.reactiveElementPolyfillSupport, pt = (s, e) => s, Ft = { toAttribute(s, e) {
64
64
  switch (e) {
65
65
  case Boolean:
66
- s = s ? Tn : null;
66
+ s = s ? Sn : null;
67
67
  break;
68
68
  case Object:
69
69
  case Array:
@@ -88,16 +88,16 @@ const { is: vn, defineProperty: bn, getOwnPropertyDescriptor: wn, getOwnProperty
88
88
  }
89
89
  }
90
90
  return t;
91
- } }, Ls = (s, e) => !vn(s, e), li = { attribute: !0, type: String, converter: Ut, reflect: !1, hasChanged: Ls };
92
- Symbol.metadata ?? (Symbol.metadata = Symbol("metadata")), tt.litPropertyMetadata ?? (tt.litPropertyMetadata = /* @__PURE__ */ new WeakMap());
93
- class Ge extends HTMLElement {
91
+ } }, Ds = (s, e) => !vn(s, e), ui = { attribute: !0, type: String, converter: Ft, reflect: !1, hasChanged: Ds };
92
+ Symbol.metadata ?? (Symbol.metadata = Symbol("metadata")), it.litPropertyMetadata ?? (it.litPropertyMetadata = /* @__PURE__ */ new WeakMap());
93
+ class Qe extends HTMLElement {
94
94
  static addInitializer(e) {
95
95
  this._$Ei(), (this.l ?? (this.l = [])).push(e);
96
96
  }
97
97
  static get observedAttributes() {
98
98
  return this.finalize(), this._$Eh && [...this._$Eh.keys()];
99
99
  }
100
- static createProperty(e, t = li) {
100
+ static createProperty(e, t = ui) {
101
101
  if (t.state && (t.attribute = !1), this._$Ei(), this.elementProperties.set(e, t), !t.noAccessor) {
102
102
  const i = Symbol(), n = this.getPropertyDescriptor(e, i, t);
103
103
  n !== void 0 && bn(this.prototype, e, n);
@@ -117,18 +117,18 @@ class Ge extends HTMLElement {
117
117
  }, configurable: !0, enumerable: !0 };
118
118
  }
119
119
  static getPropertyOptions(e) {
120
- return this.elementProperties.get(e) ?? li;
120
+ return this.elementProperties.get(e) ?? ui;
121
121
  }
122
122
  static _$Ei() {
123
- if (this.hasOwnProperty(lt("elementProperties")))
123
+ if (this.hasOwnProperty(pt("elementProperties")))
124
124
  return;
125
125
  const e = kn(this);
126
126
  e.finalize(), e.l !== void 0 && (this.l = [...e.l]), this.elementProperties = new Map(e.elementProperties);
127
127
  }
128
128
  static finalize() {
129
- if (this.hasOwnProperty(lt("finalized")))
129
+ if (this.hasOwnProperty(pt("finalized")))
130
130
  return;
131
- if (this.finalized = !0, this._$Ei(), this.hasOwnProperty(lt("properties"))) {
131
+ if (this.finalized = !0, this._$Ei(), this.hasOwnProperty(pt("properties"))) {
132
132
  const t = this.properties, i = [..._n(t), ...xn(t)];
133
133
  for (const n of i)
134
134
  this.createProperty(n, t[n]);
@@ -152,9 +152,9 @@ class Ge extends HTMLElement {
152
152
  if (Array.isArray(e)) {
153
153
  const i = new Set(e.flat(1 / 0).reverse());
154
154
  for (const n of i)
155
- t.unshift(oi(n));
155
+ t.unshift(ci(n));
156
156
  } else
157
- e !== void 0 && t.push(oi(e));
157
+ e !== void 0 && t.push(ci(e));
158
158
  return t;
159
159
  }
160
160
  static _$Eu(e, t) {
@@ -209,7 +209,7 @@ class Ge extends HTMLElement {
209
209
  var i;
210
210
  const n = this.constructor.elementProperties.get(e), r = this.constructor._$Eu(e, n);
211
211
  if (r !== void 0 && n.reflect === !0) {
212
- const a = (((i = n.converter) == null ? void 0 : i.toAttribute) !== void 0 ? n.converter : Ut).toAttribute(t, n.type);
212
+ const a = (((i = n.converter) == null ? void 0 : i.toAttribute) !== void 0 ? n.converter : Ft).toAttribute(t, n.type);
213
213
  this._$Em = e, a == null ? this.removeAttribute(r) : this.setAttribute(r, a), this._$Em = null;
214
214
  }
215
215
  }
@@ -217,13 +217,13 @@ class Ge extends HTMLElement {
217
217
  var i;
218
218
  const n = this.constructor, r = n._$Eh.get(e);
219
219
  if (r !== void 0 && this._$Em !== r) {
220
- const a = n.getPropertyOptions(r), o = typeof a.converter == "function" ? { fromAttribute: a.converter } : ((i = a.converter) == null ? void 0 : i.fromAttribute) !== void 0 ? a.converter : Ut;
220
+ const a = n.getPropertyOptions(r), o = typeof a.converter == "function" ? { fromAttribute: a.converter } : ((i = a.converter) == null ? void 0 : i.fromAttribute) !== void 0 ? a.converter : Ft;
221
221
  this._$Em = r, this[r] = o.fromAttribute(t, a.type), this._$Em = null;
222
222
  }
223
223
  }
224
224
  requestUpdate(e, t, i) {
225
225
  if (e !== void 0) {
226
- if (i ?? (i = this.constructor.getPropertyOptions(e)), !(i.hasChanged ?? Ls)(this[e], t))
226
+ if (i ?? (i = this.constructor.getPropertyOptions(e)), !(i.hasChanged ?? Ds)(this[e], t))
227
227
  return;
228
228
  this.P(e, t, i);
229
229
  }
@@ -301,63 +301,63 @@ class Ge extends HTMLElement {
301
301
  firstUpdated(e) {
302
302
  }
303
303
  }
304
- Ge.elementStyles = [], Ge.shadowRootOptions = { mode: "open" }, Ge[lt("elementProperties")] = /* @__PURE__ */ new Map(), Ge[lt("finalized")] = /* @__PURE__ */ new Map(), di == null || di({ ReactiveElement: Ge }), (tt.reactiveElementVersions ?? (tt.reactiveElementVersions = [])).push("2.0.4");
304
+ Qe.elementStyles = [], Qe.shadowRootOptions = { mode: "open" }, Qe[pt("elementProperties")] = /* @__PURE__ */ new Map(), Qe[pt("finalized")] = /* @__PURE__ */ new Map(), li == null || li({ ReactiveElement: Qe }), (it.reactiveElementVersions ?? (it.reactiveElementVersions = [])).push("2.0.4");
305
305
  /**
306
306
  * @license
307
307
  * Copyright 2017 Google LLC
308
308
  * SPDX-License-Identifier: BSD-3-Clause
309
309
  */
310
- const Ht = globalThis, Bt = Ht.trustedTypes, ui = Bt ? Bt.createPolicy("lit-html", { createHTML: (s) => s }) : void 0, zs = "$lit$", we = `lit$${(Math.random() + "").slice(9)}$`, Ds = "?" + we, Sn = `<${Ds}>`, He = document, gt = () => He.createComment(""), yt = (s) => s === null || typeof s != "object" && typeof s != "function", Ii = Array.isArray, Mi = (s) => Ii(s) || typeof (s == null ? void 0 : s[Symbol.iterator]) == "function", Es = `[
311
- \f\r]`, ct = /<(?:(!--|\/[^a-zA-Z])|(\/?[a-zA-Z][^>\s]*)|(\/?$))/g, hi = /-->/g, pi = />/g, je = RegExp(`>|${Es}(?:([^\\s"'>=/]+)(${Es}*=${Es}*(?:[^
312
- \f\r"'\`<>=]|("|')|))|$)`, "g"), mi = /'/g, fi = /"/g, Ni = /^(?:script|style|textarea|title)$/i, $n = (s) => (e, ...t) => ({ _$litType$: s, strings: e, values: t }), z = $n(1), le = Symbol.for("lit-noChange"), B = Symbol.for("lit-nothing"), gi = /* @__PURE__ */ new WeakMap(), Le = He.createTreeWalker(He, 129);
313
- function Pi(s, e) {
310
+ const Vt = globalThis, Wt = Vt.trustedTypes, hi = Wt ? Wt.createPolicy("lit-html", { createHTML: (s) => s }) : void 0, zs = "$lit$", we = `lit$${(Math.random() + "").slice(9)}$`, Us = "?" + we, Tn = `<${Us}>`, Fe = document, vt = () => Fe.createComment(""), bt = (s) => s === null || typeof s != "object" && typeof s != "function", Mi = Array.isArray, Ni = (s) => Mi(s) || typeof (s == null ? void 0 : s[Symbol.iterator]) == "function", As = `[
311
+ \f\r]`, ut = /<(?:(!--|\/[^a-zA-Z])|(\/?[a-zA-Z][^>\s]*)|(\/?$))/g, pi = /-->/g, mi = />/g, Ze = RegExp(`>|${As}(?:([^\\s"'>=/]+)(${As}*=${As}*(?:[^
312
+ \f\r"'\`<>=]|("|')|))|$)`, "g"), fi = /'/g, gi = /"/g, Pi = /^(?:script|style|textarea|title)$/i, $n = (s) => (e, ...t) => ({ _$litType$: s, strings: e, values: t }), L = $n(1), le = Symbol.for("lit-noChange"), B = Symbol.for("lit-nothing"), yi = /* @__PURE__ */ new WeakMap(), ze = Fe.createTreeWalker(Fe, 129);
313
+ function ji(s, e) {
314
314
  if (!Array.isArray(s) || !s.hasOwnProperty("raw"))
315
315
  throw Error("invalid template strings array");
316
- return ui !== void 0 ? ui.createHTML(e) : e;
316
+ return hi !== void 0 ? hi.createHTML(e) : e;
317
317
  }
318
- const ji = (s, e) => {
318
+ const Ri = (s, e) => {
319
319
  const t = s.length - 1, i = [];
320
- let n, r = e === 2 ? "<svg>" : "", a = ct;
320
+ let n, r = e === 2 ? "<svg>" : "", a = ut;
321
321
  for (let o = 0; o < t; o++) {
322
322
  const c = s[o];
323
323
  let l, h, p = -1, d = 0;
324
324
  for (; d < c.length && (a.lastIndex = d, h = a.exec(c), h !== null); )
325
- d = a.lastIndex, a === ct ? h[1] === "!--" ? a = hi : h[1] !== void 0 ? a = pi : h[2] !== void 0 ? (Ni.test(h[2]) && (n = RegExp("</" + h[2], "g")), a = je) : h[3] !== void 0 && (a = je) : a === je ? h[0] === ">" ? (a = n ?? ct, p = -1) : h[1] === void 0 ? p = -2 : (p = a.lastIndex - h[2].length, l = h[1], a = h[3] === void 0 ? je : h[3] === '"' ? fi : mi) : a === fi || a === mi ? a = je : a === hi || a === pi ? a = ct : (a = je, n = void 0);
326
- const b = a === je && s[o + 1].startsWith("/>") ? " " : "";
327
- r += a === ct ? c + Sn : p >= 0 ? (i.push(l), c.slice(0, p) + zs + c.slice(p) + we + b) : c + we + (p === -2 ? o : b);
325
+ d = a.lastIndex, a === ut ? h[1] === "!--" ? a = pi : h[1] !== void 0 ? a = mi : h[2] !== void 0 ? (Pi.test(h[2]) && (n = RegExp("</" + h[2], "g")), a = Ze) : h[3] !== void 0 && (a = Ze) : a === Ze ? h[0] === ">" ? (a = n ?? ut, p = -1) : h[1] === void 0 ? p = -2 : (p = a.lastIndex - h[2].length, l = h[1], a = h[3] === void 0 ? Ze : h[3] === '"' ? gi : fi) : a === gi || a === fi ? a = Ze : a === pi || a === mi ? a = ut : (a = Ze, n = void 0);
326
+ const b = a === Ze && s[o + 1].startsWith("/>") ? " " : "";
327
+ r += a === ut ? c + Tn : p >= 0 ? (i.push(l), c.slice(0, p) + zs + c.slice(p) + we + b) : c + we + (p === -2 ? o : b);
328
328
  }
329
- return [Pi(s, r + (s[t] || "<?>") + (e === 2 ? "</svg>" : "")), i];
329
+ return [ji(s, r + (s[t] || "<?>") + (e === 2 ? "</svg>" : "")), i];
330
330
  };
331
- class vt {
331
+ class wt {
332
332
  constructor({ strings: e, _$litType$: t }, i) {
333
333
  let n;
334
334
  this.parts = [];
335
335
  let r = 0, a = 0;
336
- const o = e.length - 1, c = this.parts, [l, h] = ji(e, t);
337
- if (this.el = vt.createElement(l, i), Le.currentNode = this.el.content, t === 2) {
336
+ const o = e.length - 1, c = this.parts, [l, h] = Ri(e, t);
337
+ if (this.el = wt.createElement(l, i), ze.currentNode = this.el.content, t === 2) {
338
338
  const p = this.el.content.firstChild;
339
339
  p.replaceWith(...p.childNodes);
340
340
  }
341
- for (; (n = Le.nextNode()) !== null && c.length < o; ) {
341
+ for (; (n = ze.nextNode()) !== null && c.length < o; ) {
342
342
  if (n.nodeType === 1) {
343
343
  if (n.hasAttributes())
344
344
  for (const p of n.getAttributeNames())
345
345
  if (p.endsWith(zs)) {
346
346
  const d = h[a++], b = n.getAttribute(p).split(we), N = /([.?@])?(.*)/.exec(d);
347
- c.push({ type: 1, index: r, name: N[2], strings: b, ctor: N[1] === "." ? Zi : N[1] === "?" ? Li : N[1] === "@" ? zi : Mt }), n.removeAttribute(p);
347
+ c.push({ type: 1, index: r, name: N[2], strings: b, ctor: N[1] === "." ? Li : N[1] === "?" ? Di : N[1] === "@" ? zi : jt }), n.removeAttribute(p);
348
348
  } else
349
349
  p.startsWith(we) && (c.push({ type: 6, index: r }), n.removeAttribute(p));
350
- if (Ni.test(n.tagName)) {
350
+ if (Pi.test(n.tagName)) {
351
351
  const p = n.textContent.split(we), d = p.length - 1;
352
352
  if (d > 0) {
353
- n.textContent = Bt ? Bt.emptyScript : "";
353
+ n.textContent = Wt ? Wt.emptyScript : "";
354
354
  for (let b = 0; b < d; b++)
355
- n.append(p[b], gt()), Le.nextNode(), c.push({ type: 2, index: ++r });
356
- n.append(p[d], gt());
355
+ n.append(p[b], vt()), ze.nextNode(), c.push({ type: 2, index: ++r });
356
+ n.append(p[d], vt());
357
357
  }
358
358
  }
359
359
  } else if (n.nodeType === 8)
360
- if (n.data === Ds)
360
+ if (n.data === Us)
361
361
  c.push({ type: 2, index: r });
362
362
  else {
363
363
  let p = -1;
@@ -368,19 +368,19 @@ class vt {
368
368
  }
369
369
  }
370
370
  static createElement(e, t) {
371
- const i = He.createElement("template");
371
+ const i = Fe.createElement("template");
372
372
  return i.innerHTML = e, i;
373
373
  }
374
374
  }
375
- function Be(s, e, t = s, i) {
375
+ function Ve(s, e, t = s, i) {
376
376
  var n, r;
377
377
  if (e === le)
378
378
  return e;
379
379
  let a = i !== void 0 ? (n = t._$Co) == null ? void 0 : n[i] : t._$Cl;
380
- const o = yt(e) ? void 0 : e._$litDirective$;
381
- 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(s), a._$AT(s, t, i)), i !== void 0 ? (t._$Co ?? (t._$Co = []))[i] = a : t._$Cl = a), a !== void 0 && (e = Be(s, a._$AS(s, e.values), a, i)), e;
380
+ const o = bt(e) ? void 0 : e._$litDirective$;
381
+ 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(s), a._$AT(s, t, i)), i !== void 0 ? (t._$Co ?? (t._$Co = []))[i] = a : t._$Cl = a), a !== void 0 && (e = Ve(s, a._$AS(s, e.values), a, i)), e;
382
382
  }
383
- class Ri {
383
+ class Zi {
384
384
  constructor(e, t) {
385
385
  this._$AV = [], this._$AN = void 0, this._$AD = e, this._$AM = t;
386
386
  }
@@ -391,17 +391,17 @@ class Ri {
391
391
  return this._$AM._$AU;
392
392
  }
393
393
  u(e) {
394
- const { el: { content: t }, parts: i } = this._$AD, n = ((e == null ? void 0 : e.creationScope) ?? He).importNode(t, !0);
395
- Le.currentNode = n;
396
- let r = Le.nextNode(), a = 0, o = 0, c = i[0];
394
+ const { el: { content: t }, parts: i } = this._$AD, n = ((e == null ? void 0 : e.creationScope) ?? Fe).importNode(t, !0);
395
+ ze.currentNode = n;
396
+ let r = ze.nextNode(), a = 0, o = 0, c = i[0];
397
397
  for (; c !== void 0; ) {
398
398
  if (a === c.index) {
399
399
  let l;
400
- c.type === 2 ? l = new at(r, r.nextSibling, this, e) : c.type === 1 ? l = new c.ctor(r, c.name, c.strings, this, e) : c.type === 6 && (l = new Di(r, this, e)), this._$AV.push(l), c = i[++o];
400
+ c.type === 2 ? l = new ct(r, r.nextSibling, this, e) : c.type === 1 ? l = new c.ctor(r, c.name, c.strings, this, e) : c.type === 6 && (l = new Ui(r, this, e)), this._$AV.push(l), c = i[++o];
401
401
  }
402
- a !== (c == null ? void 0 : c.index) && (r = Le.nextNode(), a++);
402
+ a !== (c == null ? void 0 : c.index) && (r = ze.nextNode(), a++);
403
403
  }
404
- return Le.currentNode = He, n;
404
+ return ze.currentNode = Fe, n;
405
405
  }
406
406
  p(e) {
407
407
  let t = 0;
@@ -409,7 +409,7 @@ class Ri {
409
409
  i !== void 0 && (i.strings !== void 0 ? (i._$AI(e, i, t), t += i.strings.length - 2) : i._$AI(e[t])), t++;
410
410
  }
411
411
  }
412
- class at {
412
+ class ct {
413
413
  get _$AU() {
414
414
  var e;
415
415
  return ((e = this._$AM) == null ? void 0 : e._$AU) ?? this._$Cv;
@@ -429,7 +429,7 @@ class at {
429
429
  return this._$AB;
430
430
  }
431
431
  _$AI(e, t = this) {
432
- e = Be(this, e, t), yt(e) ? e === B || e == null || e === "" ? (this._$AH !== B && this._$AR(), this._$AH = B) : e !== this._$AH && e !== le && this._(e) : e._$litType$ !== void 0 ? this.$(e) : e.nodeType !== void 0 ? this.T(e) : Mi(e) ? this.k(e) : this._(e);
432
+ e = Ve(this, e, t), bt(e) ? e === B || e == null || e === "" ? (this._$AH !== B && this._$AR(), this._$AH = B) : e !== this._$AH && e !== le && this._(e) : e._$litType$ !== void 0 ? this.$(e) : e.nodeType !== void 0 ? this.T(e) : Ni(e) ? this.k(e) : this._(e);
433
433
  }
434
434
  S(e) {
435
435
  return this._$AA.parentNode.insertBefore(e, this._$AB);
@@ -438,28 +438,28 @@ class at {
438
438
  this._$AH !== e && (this._$AR(), this._$AH = this.S(e));
439
439
  }
440
440
  _(e) {
441
- this._$AH !== B && yt(this._$AH) ? this._$AA.nextSibling.data = e : this.T(He.createTextNode(e)), this._$AH = e;
441
+ this._$AH !== B && bt(this._$AH) ? this._$AA.nextSibling.data = e : this.T(Fe.createTextNode(e)), this._$AH = e;
442
442
  }
443
443
  $(e) {
444
444
  var t;
445
- const { values: i, _$litType$: n } = e, r = typeof n == "number" ? this._$AC(e) : (n.el === void 0 && (n.el = vt.createElement(Pi(n.h, n.h[0]), this.options)), n);
445
+ const { values: i, _$litType$: n } = e, r = typeof n == "number" ? this._$AC(e) : (n.el === void 0 && (n.el = wt.createElement(ji(n.h, n.h[0]), this.options)), n);
446
446
  if (((t = this._$AH) == null ? void 0 : t._$AD) === r)
447
447
  this._$AH.p(i);
448
448
  else {
449
- const a = new Ri(r, this), o = a.u(this.options);
449
+ const a = new Zi(r, this), o = a.u(this.options);
450
450
  a.p(i), this.T(o), this._$AH = a;
451
451
  }
452
452
  }
453
453
  _$AC(e) {
454
- let t = gi.get(e.strings);
455
- return t === void 0 && gi.set(e.strings, t = new vt(e)), t;
454
+ let t = yi.get(e.strings);
455
+ return t === void 0 && yi.set(e.strings, t = new wt(e)), t;
456
456
  }
457
457
  k(e) {
458
- Ii(this._$AH) || (this._$AH = [], this._$AR());
458
+ Mi(this._$AH) || (this._$AH = [], this._$AR());
459
459
  const t = this._$AH;
460
460
  let i, n = 0;
461
461
  for (const r of e)
462
- n === t.length ? t.push(i = new at(this.S(gt()), this.S(gt()), this, this.options)) : i = t[n], i._$AI(r), n++;
462
+ n === t.length ? t.push(i = new ct(this.S(vt()), this.S(vt()), this, this.options)) : i = t[n], i._$AI(r), n++;
463
463
  n < t.length && (this._$AR(i && i._$AB.nextSibling, n), t.length = n);
464
464
  }
465
465
  _$AR(e = this._$AA.nextSibling, t) {
@@ -474,7 +474,7 @@ class at {
474
474
  this._$AM === void 0 && (this._$Cv = e, (t = this._$AP) == null || t.call(this, e));
475
475
  }
476
476
  }
477
- class Mt {
477
+ class jt {
478
478
  get tagName() {
479
479
  return this.element.tagName;
480
480
  }
@@ -488,12 +488,12 @@ class Mt {
488
488
  const r = this.strings;
489
489
  let a = !1;
490
490
  if (r === void 0)
491
- e = Be(this, e, t, 0), a = !yt(e) || e !== this._$AH && e !== le, a && (this._$AH = e);
491
+ e = Ve(this, e, t, 0), a = !bt(e) || e !== this._$AH && e !== le, a && (this._$AH = e);
492
492
  else {
493
493
  const o = e;
494
494
  let c, l;
495
495
  for (e = r[0], c = 0; c < r.length - 1; c++)
496
- l = Be(this, o[i + c], t, c), l === le && (l = this._$AH[c]), a || (a = !yt(l) || l !== this._$AH[c]), l === B ? e = B : e !== B && (e += (l ?? "") + r[c + 1]), this._$AH[c] = l;
496
+ l = Ve(this, o[i + c], t, c), l === le && (l = this._$AH[c]), a || (a = !bt(l) || l !== this._$AH[c]), l === B ? e = B : e !== B && (e += (l ?? "") + r[c + 1]), this._$AH[c] = l;
497
497
  }
498
498
  a && !n && this.j(e);
499
499
  }
@@ -501,7 +501,7 @@ class Mt {
501
501
  e === B ? this.element.removeAttribute(this.name) : this.element.setAttribute(this.name, e ?? "");
502
502
  }
503
503
  }
504
- class Zi extends Mt {
504
+ class Li extends jt {
505
505
  constructor() {
506
506
  super(...arguments), this.type = 3;
507
507
  }
@@ -509,7 +509,7 @@ class Zi extends Mt {
509
509
  this.element[this.name] = e === B ? void 0 : e;
510
510
  }
511
511
  }
512
- class Li extends Mt {
512
+ class Di extends jt {
513
513
  constructor() {
514
514
  super(...arguments), this.type = 4;
515
515
  }
@@ -517,12 +517,12 @@ class Li extends Mt {
517
517
  this.element.toggleAttribute(this.name, !!e && e !== B);
518
518
  }
519
519
  }
520
- class zi extends Mt {
520
+ class zi extends jt {
521
521
  constructor(e, t, i, n, r) {
522
522
  super(e, t, i, n, r), this.type = 5;
523
523
  }
524
524
  _$AI(e, t = this) {
525
- if ((e = Be(this, e, t, 0) ?? B) === le)
525
+ if ((e = Ve(this, e, t, 0) ?? B) === le)
526
526
  return;
527
527
  const i = this._$AH, n = e === B && i !== B || e.capture !== i.capture || e.once !== i.once || e.passive !== i.passive, r = e !== B && (i === B || n);
528
528
  n && this.element.removeEventListener(this.name, this, i), r && this.element.addEventListener(this.name, this, e), this._$AH = e;
@@ -532,7 +532,7 @@ class zi extends Mt {
532
532
  typeof this._$AH == "function" ? this._$AH.call(((t = this.options) == null ? void 0 : t.host) ?? this.element, e) : this._$AH.handleEvent(e);
533
533
  }
534
534
  }
535
- class Di {
535
+ class Ui {
536
536
  constructor(e, t, i) {
537
537
  this.element = e, this.type = 6, this._$AN = void 0, this._$AM = t, this.options = i;
538
538
  }
@@ -540,17 +540,17 @@ class Di {
540
540
  return this._$AM._$AU;
541
541
  }
542
542
  _$AI(e) {
543
- Be(this, e);
543
+ Ve(this, e);
544
544
  }
545
545
  }
546
- const En = { P: zs, A: we, C: Ds, M: 1, L: ji, R: Ri, D: Mi, V: Be, I: at, H: Mt, N: Li, U: zi, B: Zi, F: Di }, yi = Ht.litHtmlPolyfillSupport;
547
- yi == null || yi(vt, at), (Ht.litHtmlVersions ?? (Ht.litHtmlVersions = [])).push("3.1.2");
546
+ const En = { P: zs, A: we, C: Us, M: 1, L: Ri, R: Zi, D: Ni, V: Ve, I: ct, H: jt, N: Di, U: zi, B: Li, F: Ui }, vi = Vt.litHtmlPolyfillSupport;
547
+ vi == null || vi(wt, ct), (Vt.litHtmlVersions ?? (Vt.litHtmlVersions = [])).push("3.1.2");
548
548
  const Cn = (s, e, t) => {
549
549
  const i = (t == null ? void 0 : t.renderBefore) ?? e;
550
550
  let n = i._$litPart$;
551
551
  if (n === void 0) {
552
552
  const r = (t == null ? void 0 : t.renderBefore) ?? null;
553
- i._$litPart$ = n = new at(e.insertBefore(gt(), r), r, void 0, t ?? {});
553
+ i._$litPart$ = n = new ct(e.insertBefore(vt(), r), r, void 0, t ?? {});
554
554
  }
555
555
  return n._$AI(s), n;
556
556
  };
@@ -559,7 +559,7 @@ const Cn = (s, e, t) => {
559
559
  * Copyright 2017 Google LLC
560
560
  * SPDX-License-Identifier: BSD-3-Clause
561
561
  */
562
- let Q = class extends Ge {
562
+ let Q = class extends Qe {
563
563
  constructor() {
564
564
  super(...arguments), this.renderOptions = { host: this }, this._$Do = void 0;
565
565
  }
@@ -584,18 +584,18 @@ let Q = class extends Ge {
584
584
  return le;
585
585
  }
586
586
  };
587
- var vi;
588
- Q._$litElement$ = !0, Q.finalized = !0, (vi = globalThis.litElementHydrateSupport) == null || vi.call(globalThis, { LitElement: Q });
589
- const bi = globalThis.litElementPolyfillSupport;
590
- bi == null || bi({ LitElement: Q });
587
+ var bi;
588
+ Q._$litElement$ = !0, Q.finalized = !0, (bi = globalThis.litElementHydrateSupport) == null || bi.call(globalThis, { LitElement: Q });
589
+ const wi = globalThis.litElementPolyfillSupport;
590
+ wi == null || wi({ LitElement: Q });
591
591
  (globalThis.litElementVersions ?? (globalThis.litElementVersions = [])).push("4.0.4");
592
- const Ie = rt`*,:before,:after{box-sizing:border-box;border-width:0;border-style:solid;border-color:#e5e7eb}:before,:after{--tw-content: \"\"}html,:host{line-height:1.5;-webkit-text-size-adjust:100%;-moz-tab-size:4;-o-tab-size:4;tab-size:4;font-family:ui-sans-serif,system-ui,sans-serif,\"Apple Color Emoji\",\"Segoe UI Emoji\",Segoe UI Symbol,\"Noto Color Emoji\";font-feature-settings:normal;font-variation-settings:normal;-webkit-tap-highlight-color:transparent}body{margin:0;line-height:inherit}hr{height:0;color:inherit;border-top-width:1px}abbr:where([title]){-webkit-text-decoration:underline dotted;text-decoration:underline dotted}h1,h2,h3,h4,h5,h6{font-size:inherit;font-weight:inherit}a{color:inherit;text-decoration:inherit}b,strong{font-weight:bolder}code,kbd,samp,pre{font-family:ui-monospace,SFMono-Regular,Menlo,Monaco,Consolas,Liberation Mono,Courier New,monospace;font-feature-settings:normal;font-variation-settings:normal;font-size:1em}small{font-size:80%}sub,sup{font-size:75%;line-height:0;position:relative;vertical-align:baseline}sub{bottom:-.25em}sup{top:-.5em}table{text-indent:0;border-color:inherit;border-collapse:collapse}button,input,optgroup,select,textarea{font-family:inherit;font-feature-settings:inherit;font-variation-settings:inherit;font-size:100%;font-weight:inherit;line-height:inherit;color:inherit;margin:0;padding:0}button,select{text-transform:none}button,[type=button],[type=reset],[type=submit]{-webkit-appearance:button;background-color:transparent;background-image:none}:-moz-focusring{outline:auto}:-moz-ui-invalid{box-shadow:none}progress{vertical-align:baseline}::-webkit-inner-spin-button,::-webkit-outer-spin-button{height:auto}[type=search]{-webkit-appearance:textfield;outline-offset:-2px}::-webkit-search-decoration{-webkit-appearance:none}::-webkit-file-upload-button{-webkit-appearance:button;font:inherit}summary{display:list-item}blockquote,dl,dd,h1,h2,h3,h4,h5,h6,hr,figure,p,pre{margin:0}fieldset{margin:0;padding:0}legend{padding:0}ol,ul,menu{list-style:none;margin:0;padding:0}dialog{padding:0}textarea{resize:vertical}input::-moz-placeholder,textarea::-moz-placeholder{opacity:1;color:#9ca3af}input::placeholder,textarea::placeholder{opacity:1;color:#9ca3af}button,[role=button]{cursor:pointer}:disabled{cursor:default}img,svg,video,canvas,audio,iframe,embed,object{display:block;vertical-align:middle}img,video{max-width:100%;height:auto}[hidden]{display:none}*,:before,:after{--tw-border-spacing-x: 0;--tw-border-spacing-y: 0;--tw-translate-x: 0;--tw-translate-y: 0;--tw-rotate: 0;--tw-skew-x: 0;--tw-skew-y: 0;--tw-scale-x: 1;--tw-scale-y: 1;--tw-pan-x: ;--tw-pan-y: ;--tw-pinch-zoom: ;--tw-scroll-snap-strictness: proximity;--tw-gradient-from-position: ;--tw-gradient-via-position: ;--tw-gradient-to-position: ;--tw-ordinal: ;--tw-slashed-zero: ;--tw-numeric-figure: ;--tw-numeric-spacing: ;--tw-numeric-fraction: ;--tw-ring-inset: ;--tw-ring-offset-width: 0px;--tw-ring-offset-color: #fff;--tw-ring-color: rgb(59 130 246 / .5);--tw-ring-offset-shadow: 0 0 #0000;--tw-ring-shadow: 0 0 #0000;--tw-shadow: 0 0 #0000;--tw-shadow-colored: 0 0 #0000;--tw-blur: ;--tw-brightness: ;--tw-contrast: ;--tw-grayscale: ;--tw-hue-rotate: ;--tw-invert: ;--tw-saturate: ;--tw-sepia: ;--tw-drop-shadow: ;--tw-backdrop-blur: ;--tw-backdrop-brightness: ;--tw-backdrop-contrast: ;--tw-backdrop-grayscale: ;--tw-backdrop-hue-rotate: ;--tw-backdrop-invert: ;--tw-backdrop-opacity: ;--tw-backdrop-saturate: ;--tw-backdrop-sepia: }::backdrop{--tw-border-spacing-x: 0;--tw-border-spacing-y: 0;--tw-translate-x: 0;--tw-translate-y: 0;--tw-rotate: 0;--tw-skew-x: 0;--tw-skew-y: 0;--tw-scale-x: 1;--tw-scale-y: 1;--tw-pan-x: ;--tw-pan-y: ;--tw-pinch-zoom: ;--tw-scroll-snap-strictness: proximity;--tw-gradient-from-position: ;--tw-gradient-via-position: ;--tw-gradient-to-position: ;--tw-ordinal: ;--tw-slashed-zero: ;--tw-numeric-figure: ;--tw-numeric-spacing: ;--tw-numeric-fraction: ;--tw-ring-inset: ;--tw-ring-offset-width: 0px;--tw-ring-offset-color: #fff;--tw-ring-color: rgb(59 130 246 / .5);--tw-ring-offset-shadow: 0 0 #0000;--tw-ring-shadow: 0 0 #0000;--tw-shadow: 0 0 #0000;--tw-shadow-colored: 0 0 #0000;--tw-blur: ;--tw-brightness: ;--tw-contrast: ;--tw-grayscale: ;--tw-hue-rotate: ;--tw-invert: ;--tw-saturate: ;--tw-sepia: ;--tw-drop-shadow: ;--tw-backdrop-blur: ;--tw-backdrop-brightness: ;--tw-backdrop-contrast: ;--tw-backdrop-grayscale: ;--tw-backdrop-hue-rotate: ;--tw-backdrop-invert: ;--tw-backdrop-opacity: ;--tw-backdrop-saturate: ;--tw-backdrop-sepia: }.visible{visibility:visible}.static{position:static}.fixed{position:fixed}.absolute{position:absolute}.relative{position:relative}.inset-0{top:0;right:0;bottom:0;left:0}.bottom-0{bottom:0}.bottom-8{bottom:2rem}.left-0{left:0}.left-8{left:2rem}.right-0{right:0}.right-8{right:2rem}.top-0{top:0}.z-50{z-index:50}.m-0{margin:0}.m-0\\.5{margin:.125rem}.mx-4{margin-left:1rem;margin-right:1rem}.mx-auto{margin-left:auto;margin-right:auto}.my-auto{margin-top:auto;margin-bottom:auto}.mb-1{margin-bottom:.25rem}.mb-\\[-8px\\]{margin-bottom:-8px}.ml-1{margin-left:.25rem}.ml-2{margin-left:.5rem}.ml-20{margin-left:5rem}.mr-2{margin-right:.5rem}.mr-20{margin-right:5rem}.mt-4{margin-top:1rem}.block{display:block}.flex{display:flex}.hidden{display:none}.h-0{height:0px}.h-3\\/5{height:60%}.h-5{height:1.25rem}.h-6{height:1.5rem}.h-9{height:2.25rem}.h-fit{height:-moz-fit-content;height:fit-content}.h-full{height:100%}.max-h-\\[90vh\\]{max-height:90vh}.w-0{width:0px}.w-3\\/5{width:60%}.w-5{width:1.25rem}.w-6{width:1.5rem}.w-fit{width:-moz-fit-content;width:fit-content}.w-full{width:100%}.max-w-\\[90vw\\]{max-width:90vw}.flex-1{flex:1 1 0%}.flex-grow{flex-grow:1}.resize{resize:both}.flex-row{flex-direction:row}.flex-col{flex-direction:column}.items-end{align-items:flex-end}.items-center{align-items:center}.justify-end{justify-content:flex-end}.justify-center{justify-content:center}.justify-between{justify-content:space-between}.gap-2{gap:.5rem}.gap-3{gap:.75rem}.gap-4{gap:1rem}.space-x-2>:not([hidden])~:not([hidden]){--tw-space-x-reverse: 0;margin-right:calc(.5rem * var(--tw-space-x-reverse));margin-left:calc(.5rem * calc(1 - var(--tw-space-x-reverse)))}.overflow-hidden{overflow:hidden}.overflow-y-auto{overflow-y:auto}.rounded-full{border-radius:9999px}.rounded-lg{border-radius:.5rem}.rounded-t-lg{border-top-left-radius:.5rem;border-top-right-radius:.5rem}.border{border-width:1px}.border-x-8{border-left-width:8px;border-right-width:8px}.border-t-8{border-top-width:8px}.border-white{--tw-border-opacity: 1;border-color:rgb(255 255 255 / var(--tw-border-opacity))}.border-x-transparent{border-left-color:transparent;border-right-color:transparent}.bg-black{--tw-bg-opacity: 1;background-color:rgb(0 0 0 / var(--tw-bg-opacity))}.bg-white{--tw-bg-opacity: 1;background-color:rgb(255 255 255 / var(--tw-bg-opacity))}.bg-opacity-50{--tw-bg-opacity: .5}.p-2{padding:.5rem}.p-4{padding:1rem}.p-5{padding:1.25rem}.px-0{padding-left:0;padding-right:0}.px-4{padding-left:1rem;padding-right:1rem}.px-8{padding-left:2rem;padding-right:2rem}.py-2{padding-top:.5rem;padding-bottom:.5rem}.pb-0{padding-bottom:0}.pb-8{padding-bottom:2rem}.text-center{text-align:center}.text-lg{font-size:1.125rem;line-height:1.75rem}.text-sm{font-size:.875rem;line-height:1.25rem}.font-semibold{font-weight:600}.text-gray-400{--tw-text-opacity: 1;color:rgb(156 163 175 / var(--tw-text-opacity))}.text-white{--tw-text-opacity: 1;color:rgb(255 255 255 / var(--tw-text-opacity))}.shadow{--tw-shadow: 0 1px 3px 0 rgb(0 0 0 / .1), 0 1px 2px -1px rgb(0 0 0 / .1);--tw-shadow-colored: 0 1px 3px 0 var(--tw-shadow-color), 0 1px 2px -1px var(--tw-shadow-color);box-shadow:var(--tw-ring-offset-shadow, 0 0 #0000),var(--tw-ring-shadow, 0 0 #0000),var(--tw-shadow)}.shadow-lg{--tw-shadow: 0 10px 15px -3px rgb(0 0 0 / .1), 0 4px 6px -4px rgb(0 0 0 / .1);--tw-shadow-colored: 0 10px 15px -3px var(--tw-shadow-color), 0 4px 6px -4px var(--tw-shadow-color);box-shadow:var(--tw-ring-offset-shadow, 0 0 #0000),var(--tw-ring-shadow, 0 0 #0000),var(--tw-shadow)}.shadow-md{--tw-shadow: 0 4px 6px -1px rgb(0 0 0 / .1), 0 2px 4px -2px rgb(0 0 0 / .1);--tw-shadow-colored: 0 4px 6px -1px var(--tw-shadow-color), 0 2px 4px -2px var(--tw-shadow-color);box-shadow:var(--tw-ring-offset-shadow, 0 0 #0000),var(--tw-ring-shadow, 0 0 #0000),var(--tw-shadow)}.filter{filter:var(--tw-blur) var(--tw-brightness) var(--tw-contrast) var(--tw-grayscale) var(--tw-hue-rotate) var(--tw-invert) var(--tw-saturate) var(--tw-sepia) var(--tw-drop-shadow)}:host{font-size:16px;line-height:1.2;color:#000;text-align:left;--iai-chat-i-primary-color: var(--iai-chat-primary-color, #3B82F6);--iai-chat-i-text-color: var(--iai-chat-text-color, #FFF);--iai-chat-i-header-bg: var(--iai-chat-header-background-color, var(--iai-chat-i-primary-color));--iai-chat-i-header-fg: var(--iai-chat-header-text-color, var(--iai-chat-i-text-color));--iai-chat-i-button-bg: var(--iai-chat-button-background-color, var(--iai-chat-i-primary-color));--iai-chat-i-button-fg: var(--iai-chat-button-text-color, var(--iai-chat-i-text-color));--iai-chat-i-message-user-bg: var(--iai-chat-messages-user-background-color, var(--iai-chat-i-primary-color));--iai-chat-i-message-user-fg: var(--iai-chat-messages-user-text-color, var(--iai-chat-i-text-color));--iai-chat-i-message-assistant-bg: var(--iai-chat-messages-assistant-background-color, #6B7280);--iai-chat-i-message-assistant-fg: var(--iai-chat-messages-assistant-text-color, var(--iai-chat-i-text-color));--iai-chat-i-ocb-bg: var(--iai-chat-open-chat-button-background-color, var(--iai-chat-i-primary-color));--iai-chat-i-ocb-fg: var(--iai-chat-open-chat-button-icon-color, var(--iai-chat-i-text-color));--iai-chat-i-iframe-modal-header-bg: var(--iai-chat-iframe-modal-background-color, var(--iai-chat-i-primary-color));--iai-chat-i-iframe-modal-header-fg: var(--iai-chat-iframe-modal-text-color, var(--iai-chat-i-text-color))}input{background-color:#fff}.focus\\:outline-none:focus{outline:2px solid transparent;outline-offset:2px}.disabled\\:bg-gray-200:disabled{--tw-bg-opacity: 1;background-color:rgb(229 231 235 / var(--tw-bg-opacity))}.disabled\\:opacity-50:disabled{opacity:.5}@media (min-width: 768px){.md\\:bottom-8{bottom:2rem}.md\\:left-8{left:2rem}.md\\:right-8{right:2rem}.md\\:flex{display:flex}.md\\:h-\\[500px\\]{height:500px}.md\\:h-fit{height:-moz-fit-content;height:fit-content}.md\\:w-\\[350px\\]{width:350px}.md\\:w-fit{width:-moz-fit-content;width:fit-content}.md\\:p-0{padding:0}.md\\:px-0{padding-left:0;padding-right:0}.md\\:pb-0{padding-bottom:0}}`;
592
+ const Ne = ot`*,:before,:after{box-sizing:border-box;border-width:0;border-style:solid;border-color:#e5e7eb}:before,:after{--tw-content: \"\"}html,:host{line-height:1.5;-webkit-text-size-adjust:100%;-moz-tab-size:4;-o-tab-size:4;tab-size:4;font-family:ui-sans-serif,system-ui,sans-serif,\"Apple Color Emoji\",\"Segoe UI Emoji\",Segoe UI Symbol,\"Noto Color Emoji\";font-feature-settings:normal;font-variation-settings:normal;-webkit-tap-highlight-color:transparent}body{margin:0;line-height:inherit}hr{height:0;color:inherit;border-top-width:1px}abbr:where([title]){-webkit-text-decoration:underline dotted;text-decoration:underline dotted}h1,h2,h3,h4,h5,h6{font-size:inherit;font-weight:inherit}a{color:inherit;text-decoration:inherit}b,strong{font-weight:bolder}code,kbd,samp,pre{font-family:ui-monospace,SFMono-Regular,Menlo,Monaco,Consolas,Liberation Mono,Courier New,monospace;font-feature-settings:normal;font-variation-settings:normal;font-size:1em}small{font-size:80%}sub,sup{font-size:75%;line-height:0;position:relative;vertical-align:baseline}sub{bottom:-.25em}sup{top:-.5em}table{text-indent:0;border-color:inherit;border-collapse:collapse}button,input,optgroup,select,textarea{font-family:inherit;font-feature-settings:inherit;font-variation-settings:inherit;font-size:100%;font-weight:inherit;line-height:inherit;color:inherit;margin:0;padding:0}button,select{text-transform:none}button,[type=button],[type=reset],[type=submit]{-webkit-appearance:button;background-color:transparent;background-image:none}:-moz-focusring{outline:auto}:-moz-ui-invalid{box-shadow:none}progress{vertical-align:baseline}::-webkit-inner-spin-button,::-webkit-outer-spin-button{height:auto}[type=search]{-webkit-appearance:textfield;outline-offset:-2px}::-webkit-search-decoration{-webkit-appearance:none}::-webkit-file-upload-button{-webkit-appearance:button;font:inherit}summary{display:list-item}blockquote,dl,dd,h1,h2,h3,h4,h5,h6,hr,figure,p,pre{margin:0}fieldset{margin:0;padding:0}legend{padding:0}ol,ul,menu{list-style:none;margin:0;padding:0}dialog{padding:0}textarea{resize:vertical}input::-moz-placeholder,textarea::-moz-placeholder{opacity:1;color:#9ca3af}input::placeholder,textarea::placeholder{opacity:1;color:#9ca3af}button,[role=button]{cursor:pointer}:disabled{cursor:default}img,svg,video,canvas,audio,iframe,embed,object{display:block;vertical-align:middle}img,video{max-width:100%;height:auto}[hidden]{display:none}*,:before,:after{--tw-border-spacing-x: 0;--tw-border-spacing-y: 0;--tw-translate-x: 0;--tw-translate-y: 0;--tw-rotate: 0;--tw-skew-x: 0;--tw-skew-y: 0;--tw-scale-x: 1;--tw-scale-y: 1;--tw-pan-x: ;--tw-pan-y: ;--tw-pinch-zoom: ;--tw-scroll-snap-strictness: proximity;--tw-gradient-from-position: ;--tw-gradient-via-position: ;--tw-gradient-to-position: ;--tw-ordinal: ;--tw-slashed-zero: ;--tw-numeric-figure: ;--tw-numeric-spacing: ;--tw-numeric-fraction: ;--tw-ring-inset: ;--tw-ring-offset-width: 0px;--tw-ring-offset-color: #fff;--tw-ring-color: rgb(59 130 246 / .5);--tw-ring-offset-shadow: 0 0 #0000;--tw-ring-shadow: 0 0 #0000;--tw-shadow: 0 0 #0000;--tw-shadow-colored: 0 0 #0000;--tw-blur: ;--tw-brightness: ;--tw-contrast: ;--tw-grayscale: ;--tw-hue-rotate: ;--tw-invert: ;--tw-saturate: ;--tw-sepia: ;--tw-drop-shadow: ;--tw-backdrop-blur: ;--tw-backdrop-brightness: ;--tw-backdrop-contrast: ;--tw-backdrop-grayscale: ;--tw-backdrop-hue-rotate: ;--tw-backdrop-invert: ;--tw-backdrop-opacity: ;--tw-backdrop-saturate: ;--tw-backdrop-sepia: }::backdrop{--tw-border-spacing-x: 0;--tw-border-spacing-y: 0;--tw-translate-x: 0;--tw-translate-y: 0;--tw-rotate: 0;--tw-skew-x: 0;--tw-skew-y: 0;--tw-scale-x: 1;--tw-scale-y: 1;--tw-pan-x: ;--tw-pan-y: ;--tw-pinch-zoom: ;--tw-scroll-snap-strictness: proximity;--tw-gradient-from-position: ;--tw-gradient-via-position: ;--tw-gradient-to-position: ;--tw-ordinal: ;--tw-slashed-zero: ;--tw-numeric-figure: ;--tw-numeric-spacing: ;--tw-numeric-fraction: ;--tw-ring-inset: ;--tw-ring-offset-width: 0px;--tw-ring-offset-color: #fff;--tw-ring-color: rgb(59 130 246 / .5);--tw-ring-offset-shadow: 0 0 #0000;--tw-ring-shadow: 0 0 #0000;--tw-shadow: 0 0 #0000;--tw-shadow-colored: 0 0 #0000;--tw-blur: ;--tw-brightness: ;--tw-contrast: ;--tw-grayscale: ;--tw-hue-rotate: ;--tw-invert: ;--tw-saturate: ;--tw-sepia: ;--tw-drop-shadow: ;--tw-backdrop-blur: ;--tw-backdrop-brightness: ;--tw-backdrop-contrast: ;--tw-backdrop-grayscale: ;--tw-backdrop-hue-rotate: ;--tw-backdrop-invert: ;--tw-backdrop-opacity: ;--tw-backdrop-saturate: ;--tw-backdrop-sepia: }.visible{visibility:visible}.static{position:static}.fixed{position:fixed}.absolute{position:absolute}.relative{position:relative}.inset-0{top:0;right:0;bottom:0;left:0}.bottom-0{bottom:0}.bottom-8{bottom:2rem}.left-0{left:0}.left-8{left:2rem}.right-0{right:0}.right-8{right:2rem}.top-0{top:0}.z-50{z-index:50}.m-0{margin:0}.m-0\\.5{margin:.125rem}.m-2{margin:.5rem}.mx-4{margin-left:1rem;margin-right:1rem}.mx-auto{margin-left:auto;margin-right:auto}.my-auto{margin-top:auto;margin-bottom:auto}.mb-1{margin-bottom:.25rem}.mb-\\[-8px\\]{margin-bottom:-8px}.ml-1{margin-left:.25rem}.ml-2{margin-left:.5rem}.ml-20{margin-left:5rem}.mr-2{margin-right:.5rem}.mr-20{margin-right:5rem}.mt-4{margin-top:1rem}.block{display:block}.flex{display:flex}.hidden{display:none}.h-0{height:0px}.h-3\\/5{height:60%}.h-5{height:1.25rem}.h-6{height:1.5rem}.h-9{height:2.25rem}.h-fit{height:-moz-fit-content;height:fit-content}.h-full{height:100%}.max-h-\\[90vh\\]{max-height:90vh}.w-0{width:0px}.w-3\\/5{width:60%}.w-5{width:1.25rem}.w-fit{width:-moz-fit-content;width:fit-content}.w-full{width:100%}.max-w-\\[90vw\\]{max-width:90vw}.flex-1{flex:1 1 0%}.flex-grow{flex-grow:1}.resize{resize:both}.flex-row{flex-direction:row}.flex-col{flex-direction:column}.items-end{align-items:flex-end}.items-center{align-items:center}.justify-end{justify-content:flex-end}.justify-center{justify-content:center}.justify-between{justify-content:space-between}.gap-2{gap:.5rem}.gap-3{gap:.75rem}.gap-4{gap:1rem}.space-x-2>:not([hidden])~:not([hidden]){--tw-space-x-reverse: 0;margin-right:calc(.5rem * var(--tw-space-x-reverse));margin-left:calc(.5rem * calc(1 - var(--tw-space-x-reverse)))}.overflow-hidden{overflow:hidden}.overflow-y-auto{overflow-y:auto}.rounded-full{border-radius:9999px}.rounded-lg{border-radius:.5rem}.rounded-t-lg{border-top-left-radius:.5rem;border-top-right-radius:.5rem}.border{border-width:1px}.border-x-8{border-left-width:8px;border-right-width:8px}.border-t-8{border-top-width:8px}.border-white{--tw-border-opacity: 1;border-color:rgb(255 255 255 / var(--tw-border-opacity))}.border-x-transparent{border-left-color:transparent;border-right-color:transparent}.bg-black{--tw-bg-opacity: 1;background-color:rgb(0 0 0 / var(--tw-bg-opacity))}.bg-white{--tw-bg-opacity: 1;background-color:rgb(255 255 255 / var(--tw-bg-opacity))}.bg-opacity-50{--tw-bg-opacity: .5}.p-2{padding:.5rem}.p-4{padding:1rem}.p-5{padding:1.25rem}.px-0{padding-left:0;padding-right:0}.px-4{padding-left:1rem;padding-right:1rem}.px-8{padding-left:2rem;padding-right:2rem}.py-2{padding-top:.5rem;padding-bottom:.5rem}.pb-0{padding-bottom:0}.pb-8{padding-bottom:2rem}.text-center{text-align:center}.text-lg{font-size:1.125rem;line-height:1.75rem}.text-sm{font-size:.875rem;line-height:1.25rem}.font-semibold{font-weight:600}.text-gray-400{--tw-text-opacity: 1;color:rgb(156 163 175 / var(--tw-text-opacity))}.text-white{--tw-text-opacity: 1;color:rgb(255 255 255 / var(--tw-text-opacity))}.shadow{--tw-shadow: 0 1px 3px 0 rgb(0 0 0 / .1), 0 1px 2px -1px rgb(0 0 0 / .1);--tw-shadow-colored: 0 1px 3px 0 var(--tw-shadow-color), 0 1px 2px -1px var(--tw-shadow-color);box-shadow:var(--tw-ring-offset-shadow, 0 0 #0000),var(--tw-ring-shadow, 0 0 #0000),var(--tw-shadow)}.shadow-lg{--tw-shadow: 0 10px 15px -3px rgb(0 0 0 / .1), 0 4px 6px -4px rgb(0 0 0 / .1);--tw-shadow-colored: 0 10px 15px -3px var(--tw-shadow-color), 0 4px 6px -4px var(--tw-shadow-color);box-shadow:var(--tw-ring-offset-shadow, 0 0 #0000),var(--tw-ring-shadow, 0 0 #0000),var(--tw-shadow)}.shadow-md{--tw-shadow: 0 4px 6px -1px rgb(0 0 0 / .1), 0 2px 4px -2px rgb(0 0 0 / .1);--tw-shadow-colored: 0 4px 6px -1px var(--tw-shadow-color), 0 2px 4px -2px var(--tw-shadow-color);box-shadow:var(--tw-ring-offset-shadow, 0 0 #0000),var(--tw-ring-shadow, 0 0 #0000),var(--tw-shadow)}.filter{filter:var(--tw-blur) var(--tw-brightness) var(--tw-contrast) var(--tw-grayscale) var(--tw-hue-rotate) var(--tw-invert) var(--tw-saturate) var(--tw-sepia) var(--tw-drop-shadow)}:host{font-size:16px;line-height:1.2;color:#000;text-align:left;--iai-chat-i-primary-color: var(--iai-chat-primary-color, #3B82F6);--iai-chat-i-text-color: var(--iai-chat-text-color, #FFF);--iai-chat-i-header-bg: var(--iai-chat-header-background-color, var(--iai-chat-i-primary-color));--iai-chat-i-header-fg: var(--iai-chat-header-text-color, var(--iai-chat-i-text-color));--iai-chat-i-button-bg: var(--iai-chat-button-background-color, var(--iai-chat-i-primary-color));--iai-chat-i-button-fg: var(--iai-chat-button-text-color, var(--iai-chat-i-text-color));--iai-chat-i-message-user-bg: var(--iai-chat-messages-user-background-color, var(--iai-chat-i-primary-color));--iai-chat-i-message-user-fg: var(--iai-chat-messages-user-text-color, var(--iai-chat-i-text-color));--iai-chat-i-message-assistant-bg: var(--iai-chat-messages-assistant-background-color, #6B7280);--iai-chat-i-message-assistant-fg: var(--iai-chat-messages-assistant-text-color, var(--iai-chat-i-text-color));--iai-chat-i-ocb-bg: var(--iai-chat-open-chat-button-background-color, var(--iai-chat-i-primary-color));--iai-chat-i-ocb-fg: var(--iai-chat-open-chat-button-icon-color, var(--iai-chat-i-text-color));--iai-chat-i-iframe-modal-header-bg: var(--iai-chat-iframe-modal-background-color, var(--iai-chat-i-primary-color));--iai-chat-i-iframe-modal-header-fg: var(--iai-chat-iframe-modal-text-color, var(--iai-chat-i-text-color))}input{background-color:#fff}.focus\\:outline-none:focus{outline:2px solid transparent;outline-offset:2px}.disabled\\:bg-gray-200:disabled{--tw-bg-opacity: 1;background-color:rgb(229 231 235 / var(--tw-bg-opacity))}.disabled\\:opacity-50:disabled{opacity:.5}@media (min-width: 768px){.md\\:bottom-8{bottom:2rem}.md\\:left-8{left:2rem}.md\\:right-8{right:2rem}.md\\:flex{display:flex}.md\\:h-\\[500px\\]{height:500px}.md\\:h-fit{height:-moz-fit-content;height:fit-content}.md\\:w-\\[350px\\]{width:350px}.md\\:w-fit{width:-moz-fit-content;width:fit-content}.md\\:p-0{padding:0}.md\\:px-0{padding-left:0;padding-right:0}.md\\:pb-0{padding-bottom:0}}`;
593
593
  /**
594
594
  * @license
595
595
  * Copyright 2017 Google LLC
596
596
  * SPDX-License-Identifier: BSD-3-Clause
597
597
  */
598
- const Me = (s) => (e, t) => {
598
+ const Pe = (s) => (e, t) => {
599
599
  t !== void 0 ? t.addInitializer(() => {
600
600
  customElements.define(s, e);
601
601
  }) : customElements.define(s, e);
@@ -605,7 +605,7 @@ const Me = (s) => (e, t) => {
605
605
  * Copyright 2017 Google LLC
606
606
  * SPDX-License-Identifier: BSD-3-Clause
607
607
  */
608
- const An = { attribute: !0, type: String, converter: Ut, reflect: !1, hasChanged: Ls }, On = (s = An, e, t) => {
608
+ const An = { attribute: !0, type: String, converter: Ft, reflect: !1, hasChanged: Ds }, On = (s = An, e, t) => {
609
609
  const { kind: i, metadata: n } = t;
610
610
  let r = globalThis.litPropertyMetadata.get(n);
611
611
  if (r === void 0 && globalThis.litPropertyMetadata.set(n, r = /* @__PURE__ */ new Map()), r.set(t.name, s), i === "accessor") {
@@ -626,7 +626,7 @@ const An = { attribute: !0, type: String, converter: Ut, reflect: !1, hasChanged
626
626
  }
627
627
  throw Error("Unsupported decorator location: " + i);
628
628
  };
629
- function J(s) {
629
+ function F(s) {
630
630
  return (e, t) => typeof t == "object" ? On(s, e, t) : ((i, n, r) => {
631
631
  const a = n.hasOwnProperty(r);
632
632
  return n.constructor.createProperty(r, a ? { ...i, wrapped: !0 } : i), a ? Object.getOwnPropertyDescriptor(n, r) : void 0;
@@ -637,15 +637,15 @@ function J(s) {
637
637
  * Copyright 2017 Google LLC
638
638
  * SPDX-License-Identifier: BSD-3-Clause
639
639
  */
640
- function ot(s) {
641
- return J({ ...s, state: !0, attribute: !1 });
640
+ function dt(s) {
641
+ return F({ ...s, state: !0, attribute: !1 });
642
642
  }
643
643
  /**
644
644
  * @license
645
645
  * Copyright 2017 Google LLC
646
646
  * SPDX-License-Identifier: BSD-3-Clause
647
647
  */
648
- const wi = (s, e, t) => (t.configurable = !0, t.enumerable = !0, Reflect.decorate && typeof e != "object" && Object.defineProperty(s, e, t), t);
648
+ const _i = (s, e, t) => (t.configurable = !0, t.enumerable = !0, Reflect.decorate && typeof e != "object" && Object.defineProperty(s, e, t), t);
649
649
  /**
650
650
  * @license
651
651
  * Copyright 2017 Google LLC
@@ -666,12 +666,12 @@ function In(s, e) {
666
666
  this[c] = l;
667
667
  } };
668
668
  })();
669
- return wi(t, i, { get() {
669
+ return _i(t, i, { get() {
670
670
  let c = a.call(this);
671
671
  return c === void 0 && (c = r(this), (c !== null || this.hasUpdated) && o.call(this, c)), c;
672
672
  } });
673
673
  }
674
- return wi(t, i, { get() {
674
+ return _i(t, i, { get() {
675
675
  return r(this);
676
676
  } });
677
677
  };
@@ -681,8 +681,8 @@ function In(s, e) {
681
681
  * Copyright 2017 Google LLC
682
682
  * SPDX-License-Identifier: BSD-3-Clause
683
683
  */
684
- const as = { ATTRIBUTE: 1, CHILD: 2, PROPERTY: 3, BOOLEAN_ATTRIBUTE: 4, EVENT: 5, ELEMENT: 6 }, os = (s) => (...e) => ({ _$litDirective$: s, values: e });
685
- let cs = class {
684
+ const cs = { ATTRIBUTE: 1, CHILD: 2, PROPERTY: 3, BOOLEAN_ATTRIBUTE: 4, EVENT: 5, ELEMENT: 6 }, ds = (s) => (...e) => ({ _$litDirective$: s, values: e });
685
+ let ls = class {
686
686
  constructor(s) {
687
687
  }
688
688
  get _$AU() {
@@ -703,10 +703,10 @@ let cs = class {
703
703
  * Copyright 2018 Google LLC
704
704
  * SPDX-License-Identifier: BSD-3-Clause
705
705
  */
706
- const _i = os(class extends cs {
706
+ const xi = ds(class extends ls {
707
707
  constructor(s) {
708
708
  var e;
709
- if (super(s), s.type !== as.ATTRIBUTE || s.name !== "class" || ((e = s.strings) == null ? void 0 : e.length) > 2)
709
+ if (super(s), s.type !== cs.ATTRIBUTE || s.name !== "class" || ((e = s.strings) == null ? void 0 : e.length) > 2)
710
710
  throw Error("`classMap()` can only be used in the `class` attribute and must be the only part in the attribute.");
711
711
  }
712
712
  render(s) {
@@ -735,10 +735,10 @@ const _i = os(class extends cs {
735
735
  * Copyright 2018 Google LLC
736
736
  * SPDX-License-Identifier: BSD-3-Clause
737
737
  */
738
- const Ui = "important", Mn = " !" + Ui, ut = os(class extends cs {
738
+ const Hi = "important", Mn = " !" + Hi, tt = ds(class extends ls {
739
739
  constructor(s) {
740
740
  var e;
741
- if (super(s), s.type !== as.ATTRIBUTE || s.name !== "style" || ((e = s.strings) == null ? void 0 : e.length) > 2)
741
+ if (super(s), s.type !== cs.ATTRIBUTE || s.name !== "style" || ((e = s.strings) == null ? void 0 : e.length) > 2)
742
742
  throw Error("The `styleMap` directive must be used in the `style` attribute and must be the only part in the attribute.");
743
743
  }
744
744
  render(s) {
@@ -758,7 +758,7 @@ const Ui = "important", Mn = " !" + Ui, ut = os(class extends cs {
758
758
  if (n != null) {
759
759
  this.ft.add(i);
760
760
  const r = typeof n == "string" && n.endsWith(Mn);
761
- i.includes("-") || r ? t.setProperty(i, r ? n.slice(0, -11) : n, r ? Ui : "") : t[i] = n;
761
+ i.includes("-") || r ? t.setProperty(i, r ? n.slice(0, -11) : n, r ? Hi : "") : t[i] = n;
762
762
  }
763
763
  }
764
764
  return le;
@@ -800,14 +800,14 @@ var j;
800
800
  }
801
801
  s.joinValues = i, s.jsonStringifyReplacer = (n, r) => typeof r == "bigint" ? r.toString() : r;
802
802
  })(j || (j = {}));
803
- var Os;
803
+ var Ms;
804
804
  (function(s) {
805
805
  s.mergeShapes = (e, t) => ({
806
806
  ...e,
807
807
  ...t
808
808
  // second overwrites first
809
809
  });
810
- })(Os || (Os = {}));
810
+ })(Ms || (Ms = {}));
811
811
  const f = j.arrayToEnum([
812
812
  "string",
813
813
  "nan",
@@ -924,7 +924,7 @@ class ne extends Error {
924
924
  }
925
925
  }
926
926
  ne.create = (s) => new ne(s);
927
- const bt = (s, e) => {
927
+ const _t = (s, e) => {
928
928
  let t;
929
929
  switch (s.code) {
930
930
  case m.invalid_type:
@@ -980,14 +980,14 @@ const bt = (s, e) => {
980
980
  }
981
981
  return { message: t };
982
982
  };
983
- let Hi = bt;
983
+ let Bi = _t;
984
984
  function Pn(s) {
985
- Hi = s;
985
+ Bi = s;
986
986
  }
987
- function Ft() {
988
- return Hi;
987
+ function Kt() {
988
+ return Bi;
989
989
  }
990
- const Vt = (s) => {
990
+ const Jt = (s) => {
991
991
  const { data: e, path: t, errorMaps: i, issueData: n } = s, r = [...t, ...n.path || []], a = {
992
992
  ...n,
993
993
  path: r
@@ -1003,21 +1003,21 @@ const Vt = (s) => {
1003
1003
  };
1004
1004
  }, jn = [];
1005
1005
  function g(s, e) {
1006
- const t = Vt({
1006
+ const t = Jt({
1007
1007
  issueData: e,
1008
1008
  data: s.data,
1009
1009
  path: s.path,
1010
1010
  errorMaps: [
1011
1011
  s.common.contextualErrorMap,
1012
1012
  s.schemaErrorMap,
1013
- Ft(),
1014
- bt
1013
+ Kt(),
1014
+ _t
1015
1015
  // then global default map
1016
1016
  ].filter((i) => !!i)
1017
1017
  });
1018
1018
  s.common.issues.push(t);
1019
1019
  }
1020
- class K {
1020
+ class J {
1021
1021
  constructor() {
1022
1022
  this.value = "valid";
1023
1023
  }
@@ -1043,7 +1043,7 @@ class K {
1043
1043
  key: await n.key,
1044
1044
  value: await n.value
1045
1045
  });
1046
- return K.mergeObjectSync(e, i);
1046
+ return J.mergeObjectSync(e, i);
1047
1047
  }
1048
1048
  static mergeObjectSync(e, t) {
1049
1049
  const i = {};
@@ -1058,7 +1058,7 @@ class K {
1058
1058
  }
1059
1059
  const E = Object.freeze({
1060
1060
  status: "aborted"
1061
- }), Bi = (s) => ({ status: "dirty", value: s }), Y = (s) => ({ status: "valid", value: s }), Is = (s) => s.status === "aborted", Ms = (s) => s.status === "dirty", wt = (s) => s.status === "valid", Wt = (s) => typeof Promise < "u" && s instanceof Promise;
1061
+ }), Fi = (s) => ({ status: "dirty", value: s }), Y = (s) => ({ status: "valid", value: s }), Ns = (s) => s.status === "aborted", Ps = (s) => s.status === "dirty", xt = (s) => s.status === "valid", qt = (s) => typeof Promise < "u" && s instanceof Promise;
1062
1062
  var _;
1063
1063
  (function(s) {
1064
1064
  s.errToObj = (e) => typeof e == "string" ? { message: e } : e || {}, s.toString = (e) => typeof e == "string" ? e : e == null ? void 0 : e.message;
@@ -1071,8 +1071,8 @@ class ue {
1071
1071
  return this._cachedPath.length || (this._key instanceof Array ? this._cachedPath.push(...this._path, ...this._key) : this._cachedPath.push(...this._path, this._key)), this._cachedPath;
1072
1072
  }
1073
1073
  }
1074
- const xi = (s, e) => {
1075
- if (wt(e))
1074
+ const ki = (s, e) => {
1075
+ if (xt(e))
1076
1076
  return { success: !0, data: e.value };
1077
1077
  if (!s.common.issues.length)
1078
1078
  throw new Error("Validation failed but no issues detected.");
@@ -1116,7 +1116,7 @@ class I {
1116
1116
  }
1117
1117
  _processInputParams(e) {
1118
1118
  return {
1119
- status: new K(),
1119
+ status: new J(),
1120
1120
  ctx: {
1121
1121
  common: e.parent.common,
1122
1122
  data: e.data,
@@ -1129,7 +1129,7 @@ class I {
1129
1129
  }
1130
1130
  _parseSync(e) {
1131
1131
  const t = this._parse(e);
1132
- if (Wt(t))
1132
+ if (qt(t))
1133
1133
  throw new Error("Synchronous parse encountered promise.");
1134
1134
  return t;
1135
1135
  }
@@ -1157,7 +1157,7 @@ class I {
1157
1157
  data: e,
1158
1158
  parsedType: Ee(e)
1159
1159
  }, r = this._parseSync({ data: e, path: n.path, parent: n });
1160
- return xi(n, r);
1160
+ return ki(n, r);
1161
1161
  }
1162
1162
  async parseAsync(e, t) {
1163
1163
  const i = await this.safeParseAsync(e, t);
@@ -1177,8 +1177,8 @@ class I {
1177
1177
  parent: null,
1178
1178
  data: e,
1179
1179
  parsedType: Ee(e)
1180
- }, n = this._parse({ data: e, path: i.path, parent: i }), r = await (Wt(n) ? n : Promise.resolve(n));
1181
- return xi(i, r);
1180
+ }, n = this._parse({ data: e, path: i.path, parent: i }), r = await (qt(n) ? n : Promise.resolve(n));
1181
+ return ki(i, r);
1182
1182
  }
1183
1183
  refine(e, t) {
1184
1184
  const i = (n) => typeof t == "string" || typeof t > "u" ? { message: t } : typeof t == "function" ? t(n) : t;
@@ -1196,7 +1196,7 @@ class I {
1196
1196
  _refinement(e) {
1197
1197
  return new ae({
1198
1198
  schema: this,
1199
- typeName: S.ZodEffects,
1199
+ typeName: T.ZodEffects,
1200
1200
  effect: { type: "refinement", refinement: e }
1201
1201
  });
1202
1202
  }
@@ -1207,7 +1207,7 @@ class I {
1207
1207
  return _e.create(this, this._def);
1208
1208
  }
1209
1209
  nullable() {
1210
- return We.create(this, this._def);
1210
+ return Je.create(this, this._def);
1211
1211
  }
1212
1212
  nullish() {
1213
1213
  return this.nullable().optional();
@@ -1216,45 +1216,45 @@ class I {
1216
1216
  return re.create(this, this._def);
1217
1217
  }
1218
1218
  promise() {
1219
- return it.create(this, this._def);
1219
+ return rt.create(this, this._def);
1220
1220
  }
1221
1221
  or(e) {
1222
- return Tt.create([this, e], this._def);
1222
+ return $t.create([this, e], this._def);
1223
1223
  }
1224
1224
  and(e) {
1225
- return St.create(this, e, this._def);
1225
+ return Et.create(this, e, this._def);
1226
1226
  }
1227
1227
  transform(e) {
1228
1228
  return new ae({
1229
1229
  ...A(this._def),
1230
1230
  schema: this,
1231
- typeName: S.ZodEffects,
1231
+ typeName: T.ZodEffects,
1232
1232
  effect: { type: "transform", transform: e }
1233
1233
  });
1234
1234
  }
1235
1235
  default(e) {
1236
1236
  const t = typeof e == "function" ? e : () => e;
1237
- return new Ot({
1237
+ return new Mt({
1238
1238
  ...A(this._def),
1239
1239
  innerType: this,
1240
1240
  defaultValue: t,
1241
- typeName: S.ZodDefault
1241
+ typeName: T.ZodDefault
1242
1242
  });
1243
1243
  }
1244
1244
  brand() {
1245
- return new Vi({
1246
- typeName: S.ZodBranded,
1245
+ return new Wi({
1246
+ typeName: T.ZodBranded,
1247
1247
  type: this,
1248
1248
  ...A(this._def)
1249
1249
  });
1250
1250
  }
1251
1251
  catch(e) {
1252
1252
  const t = typeof e == "function" ? e : () => e;
1253
- return new Yt({
1253
+ return new Qt({
1254
1254
  ...A(this._def),
1255
1255
  innerType: this,
1256
1256
  catchValue: t,
1257
- typeName: S.ZodCatch
1257
+ typeName: T.ZodCatch
1258
1258
  });
1259
1259
  }
1260
1260
  describe(e) {
@@ -1265,10 +1265,10 @@ class I {
1265
1265
  });
1266
1266
  }
1267
1267
  pipe(e) {
1268
- return Nt.create(this, e);
1268
+ return Rt.create(this, e);
1269
1269
  }
1270
1270
  readonly() {
1271
- return Xt.create(this);
1271
+ return ts.create(this);
1272
1272
  }
1273
1273
  isOptional() {
1274
1274
  return this.safeParse(void 0).success;
@@ -1277,8 +1277,8 @@ class I {
1277
1277
  return this.safeParse(null).success;
1278
1278
  }
1279
1279
  }
1280
- const Rn = /^c[^\s-]{8,}$/i, Zn = /^[a-z][a-z0-9]*$/, Ln = /^[0-9A-HJKMNP-TV-Z]{26}$/, zn = /^[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, Dn = /^(?!\.)(?!.*\.\.)([A-Z0-9_+-\.]*)[A-Z0-9_+-]@([A-Z0-9][A-Z0-9\-]*\.)+[A-Z]{2,}$/i, Un = "^(\\p{Extended_Pictographic}|\\p{Emoji_Component})+$";
1281
- let Cs;
1280
+ const Rn = /^c[^\s-]{8,}$/i, Zn = /^[a-z][a-z0-9]*$/, Ln = /^[0-9A-HJKMNP-TV-Z]{26}$/, Dn = /^[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, zn = /^(?!\.)(?!.*\.\.)([A-Z0-9_+-\.]*)[A-Z0-9_+-]@([A-Z0-9][A-Z0-9\-]*\.)+[A-Z]{2,}$/i, Un = "^(\\p{Extended_Pictographic}|\\p{Emoji_Component})+$";
1281
+ let Os;
1282
1282
  const Hn = /^(((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}))$/, Bn = /^(([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})))$/, Fn = (s) => s.precision ? s.offset ? new RegExp(`^\\d{4}-\\d{2}-\\d{2}T\\d{2}:\\d{2}:\\d{2}\\.\\d{${s.precision}}(([+-]\\d{2}(:?\\d{2})?)|Z)$`) : new RegExp(`^\\d{4}-\\d{2}-\\d{2}T\\d{2}:\\d{2}:\\d{2}\\.\\d{${s.precision}}Z$`) : s.precision === 0 ? s.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$") : s.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$");
1283
1283
  function Vn(s, e) {
1284
1284
  return !!((e === "v4" || !e) && Hn.test(s) || (e === "v6" || !e) && Bn.test(s));
@@ -1297,7 +1297,7 @@ class ie extends I {
1297
1297
  //
1298
1298
  ), E;
1299
1299
  }
1300
- const t = new K();
1300
+ const t = new J();
1301
1301
  let i;
1302
1302
  for (const n of this._def.checks)
1303
1303
  if (n.kind === "min")
@@ -1336,19 +1336,19 @@ class ie extends I {
1336
1336
  message: n.message
1337
1337
  }), t.dirty());
1338
1338
  } else if (n.kind === "email")
1339
- Dn.test(e.data) || (i = this._getOrReturnCtx(e, i), g(i, {
1339
+ zn.test(e.data) || (i = this._getOrReturnCtx(e, i), g(i, {
1340
1340
  validation: "email",
1341
1341
  code: m.invalid_string,
1342
1342
  message: n.message
1343
1343
  }), t.dirty());
1344
1344
  else if (n.kind === "emoji")
1345
- Cs || (Cs = new RegExp(Un, "u")), Cs.test(e.data) || (i = this._getOrReturnCtx(e, i), g(i, {
1345
+ Os || (Os = new RegExp(Un, "u")), Os.test(e.data) || (i = this._getOrReturnCtx(e, i), g(i, {
1346
1346
  validation: "emoji",
1347
1347
  code: m.invalid_string,
1348
1348
  message: n.message
1349
1349
  }), t.dirty());
1350
1350
  else if (n.kind === "uuid")
1351
- zn.test(e.data) || (i = this._getOrReturnCtx(e, i), g(i, {
1351
+ Dn.test(e.data) || (i = this._getOrReturnCtx(e, i), g(i, {
1352
1352
  validation: "uuid",
1353
1353
  code: m.invalid_string,
1354
1354
  message: n.message
@@ -1579,7 +1579,7 @@ ie.create = (s) => {
1579
1579
  var e;
1580
1580
  return new ie({
1581
1581
  checks: [],
1582
- typeName: S.ZodString,
1582
+ typeName: T.ZodString,
1583
1583
  coerce: (e = s == null ? void 0 : s.coerce) !== null && e !== void 0 ? e : !1,
1584
1584
  ...A(s)
1585
1585
  });
@@ -1588,7 +1588,7 @@ function Wn(s, e) {
1588
1588
  const t = (s.toString().split(".")[1] || "").length, i = (e.toString().split(".")[1] || "").length, n = t > i ? t : i, r = parseInt(s.toFixed(n).replace(".", "")), a = parseInt(e.toFixed(n).replace(".", ""));
1589
1589
  return r % a / Math.pow(10, n);
1590
1590
  }
1591
- class Ce extends I {
1591
+ class Ae extends I {
1592
1592
  constructor() {
1593
1593
  super(...arguments), this.min = this.gte, this.max = this.lte, this.step = this.multipleOf;
1594
1594
  }
@@ -1602,7 +1602,7 @@ class Ce extends I {
1602
1602
  }), E;
1603
1603
  }
1604
1604
  let t;
1605
- const i = new K();
1605
+ const i = new J();
1606
1606
  for (const n of this._def.checks)
1607
1607
  n.kind === "int" ? j.isInteger(e.data) || (t = this._getOrReturnCtx(e, t), g(t, {
1608
1608
  code: m.invalid_type,
@@ -1646,7 +1646,7 @@ class Ce extends I {
1646
1646
  return this.setLimit("max", e, !1, _.toString(t));
1647
1647
  }
1648
1648
  setLimit(e, t, i, n) {
1649
- return new Ce({
1649
+ return new Ae({
1650
1650
  ...this._def,
1651
1651
  checks: [
1652
1652
  ...this._def.checks,
@@ -1660,7 +1660,7 @@ class Ce extends I {
1660
1660
  });
1661
1661
  }
1662
1662
  _addCheck(e) {
1663
- return new Ce({
1663
+ return new Ae({
1664
1664
  ...this._def,
1665
1665
  checks: [...this._def.checks, e]
1666
1666
  });
@@ -1754,13 +1754,13 @@ class Ce extends I {
1754
1754
  return Number.isFinite(t) && Number.isFinite(e);
1755
1755
  }
1756
1756
  }
1757
- Ce.create = (s) => new Ce({
1757
+ Ae.create = (s) => new Ae({
1758
1758
  checks: [],
1759
- typeName: S.ZodNumber,
1759
+ typeName: T.ZodNumber,
1760
1760
  coerce: (s == null ? void 0 : s.coerce) || !1,
1761
1761
  ...A(s)
1762
1762
  });
1763
- class Ae extends I {
1763
+ class Oe extends I {
1764
1764
  constructor() {
1765
1765
  super(...arguments), this.min = this.gte, this.max = this.lte;
1766
1766
  }
@@ -1774,7 +1774,7 @@ class Ae extends I {
1774
1774
  }), E;
1775
1775
  }
1776
1776
  let t;
1777
- const i = new K();
1777
+ const i = new J();
1778
1778
  for (const n of this._def.checks)
1779
1779
  n.kind === "min" ? (n.inclusive ? e.data < n.value : e.data <= n.value) && (t = this._getOrReturnCtx(e, t), g(t, {
1780
1780
  code: m.too_small,
@@ -1808,7 +1808,7 @@ class Ae extends I {
1808
1808
  return this.setLimit("max", e, !1, _.toString(t));
1809
1809
  }
1810
1810
  setLimit(e, t, i, n) {
1811
- return new Ae({
1811
+ return new Oe({
1812
1812
  ...this._def,
1813
1813
  checks: [
1814
1814
  ...this._def.checks,
@@ -1822,7 +1822,7 @@ class Ae extends I {
1822
1822
  });
1823
1823
  }
1824
1824
  _addCheck(e) {
1825
- return new Ae({
1825
+ return new Oe({
1826
1826
  ...this._def,
1827
1827
  checks: [...this._def.checks, e]
1828
1828
  });
@@ -1879,16 +1879,16 @@ class Ae extends I {
1879
1879
  return e;
1880
1880
  }
1881
1881
  }
1882
- Ae.create = (s) => {
1882
+ Oe.create = (s) => {
1883
1883
  var e;
1884
- return new Ae({
1884
+ return new Oe({
1885
1885
  checks: [],
1886
- typeName: S.ZodBigInt,
1886
+ typeName: T.ZodBigInt,
1887
1887
  coerce: (e = s == null ? void 0 : s.coerce) !== null && e !== void 0 ? e : !1,
1888
1888
  ...A(s)
1889
1889
  });
1890
1890
  };
1891
- class _t extends I {
1891
+ class kt extends I {
1892
1892
  _parse(e) {
1893
1893
  if (this._def.coerce && (e.data = !!e.data), this._getType(e) !== f.boolean) {
1894
1894
  const t = this._getOrReturnCtx(e);
@@ -1901,12 +1901,12 @@ class _t extends I {
1901
1901
  return Y(e.data);
1902
1902
  }
1903
1903
  }
1904
- _t.create = (s) => new _t({
1905
- typeName: S.ZodBoolean,
1904
+ kt.create = (s) => new kt({
1905
+ typeName: T.ZodBoolean,
1906
1906
  coerce: (s == null ? void 0 : s.coerce) || !1,
1907
1907
  ...A(s)
1908
1908
  });
1909
- class Fe extends I {
1909
+ class We extends I {
1910
1910
  _parse(e) {
1911
1911
  if (this._def.coerce && (e.data = new Date(e.data)), this._getType(e) !== f.date) {
1912
1912
  const n = this._getOrReturnCtx(e);
@@ -1922,7 +1922,7 @@ class Fe extends I {
1922
1922
  code: m.invalid_date
1923
1923
  }), E;
1924
1924
  }
1925
- const t = new K();
1925
+ const t = new J();
1926
1926
  let i;
1927
1927
  for (const n of this._def.checks)
1928
1928
  n.kind === "min" ? e.data.getTime() < n.value && (i = this._getOrReturnCtx(e, i), g(i, {
@@ -1946,7 +1946,7 @@ class Fe extends I {
1946
1946
  };
1947
1947
  }
1948
1948
  _addCheck(e) {
1949
- return new Fe({
1949
+ return new We({
1950
1950
  ...this._def,
1951
1951
  checks: [...this._def.checks, e]
1952
1952
  });
@@ -1978,13 +1978,13 @@ class Fe extends I {
1978
1978
  return e != null ? new Date(e) : null;
1979
1979
  }
1980
1980
  }
1981
- Fe.create = (s) => new Fe({
1981
+ We.create = (s) => new We({
1982
1982
  checks: [],
1983
1983
  coerce: (s == null ? void 0 : s.coerce) || !1,
1984
- typeName: S.ZodDate,
1984
+ typeName: T.ZodDate,
1985
1985
  ...A(s)
1986
1986
  });
1987
- class Kt extends I {
1987
+ class Yt extends I {
1988
1988
  _parse(e) {
1989
1989
  if (this._getType(e) !== f.symbol) {
1990
1990
  const t = this._getOrReturnCtx(e);
@@ -1997,11 +1997,11 @@ class Kt extends I {
1997
1997
  return Y(e.data);
1998
1998
  }
1999
1999
  }
2000
- Kt.create = (s) => new Kt({
2001
- typeName: S.ZodSymbol,
2000
+ Yt.create = (s) => new Yt({
2001
+ typeName: T.ZodSymbol,
2002
2002
  ...A(s)
2003
2003
  });
2004
- class xt extends I {
2004
+ class St extends I {
2005
2005
  _parse(e) {
2006
2006
  if (this._getType(e) !== f.undefined) {
2007
2007
  const t = this._getOrReturnCtx(e);
@@ -2014,11 +2014,11 @@ class xt extends I {
2014
2014
  return Y(e.data);
2015
2015
  }
2016
2016
  }
2017
- xt.create = (s) => new xt({
2018
- typeName: S.ZodUndefined,
2017
+ St.create = (s) => new St({
2018
+ typeName: T.ZodUndefined,
2019
2019
  ...A(s)
2020
2020
  });
2021
- class kt extends I {
2021
+ class Tt extends I {
2022
2022
  _parse(e) {
2023
2023
  if (this._getType(e) !== f.null) {
2024
2024
  const t = this._getOrReturnCtx(e);
@@ -2031,11 +2031,11 @@ class kt extends I {
2031
2031
  return Y(e.data);
2032
2032
  }
2033
2033
  }
2034
- kt.create = (s) => new kt({
2035
- typeName: S.ZodNull,
2034
+ Tt.create = (s) => new Tt({
2035
+ typeName: T.ZodNull,
2036
2036
  ...A(s)
2037
2037
  });
2038
- class st extends I {
2038
+ class nt extends I {
2039
2039
  constructor() {
2040
2040
  super(...arguments), this._any = !0;
2041
2041
  }
@@ -2043,11 +2043,11 @@ class st extends I {
2043
2043
  return Y(e.data);
2044
2044
  }
2045
2045
  }
2046
- st.create = (s) => new st({
2047
- typeName: S.ZodAny,
2046
+ nt.create = (s) => new nt({
2047
+ typeName: T.ZodAny,
2048
2048
  ...A(s)
2049
2049
  });
2050
- class De extends I {
2050
+ class He extends I {
2051
2051
  constructor() {
2052
2052
  super(...arguments), this._unknown = !0;
2053
2053
  }
@@ -2055,8 +2055,8 @@ class De extends I {
2055
2055
  return Y(e.data);
2056
2056
  }
2057
2057
  }
2058
- De.create = (s) => new De({
2059
- typeName: S.ZodUnknown,
2058
+ He.create = (s) => new He({
2059
+ typeName: T.ZodUnknown,
2060
2060
  ...A(s)
2061
2061
  });
2062
2062
  class xe extends I {
@@ -2070,10 +2070,10 @@ class xe extends I {
2070
2070
  }
2071
2071
  }
2072
2072
  xe.create = (s) => new xe({
2073
- typeName: S.ZodNever,
2073
+ typeName: T.ZodNever,
2074
2074
  ...A(s)
2075
2075
  });
2076
- class Jt extends I {
2076
+ class Gt extends I {
2077
2077
  _parse(e) {
2078
2078
  if (this._getType(e) !== f.undefined) {
2079
2079
  const t = this._getOrReturnCtx(e);
@@ -2086,8 +2086,8 @@ class Jt extends I {
2086
2086
  return Y(e.data);
2087
2087
  }
2088
2088
  }
2089
- Jt.create = (s) => new Jt({
2090
- typeName: S.ZodVoid,
2089
+ Gt.create = (s) => new Gt({
2090
+ typeName: T.ZodVoid,
2091
2091
  ...A(s)
2092
2092
  });
2093
2093
  class re extends I {
@@ -2126,9 +2126,9 @@ class re extends I {
2126
2126
  exact: !1,
2127
2127
  message: n.maxLength.message
2128
2128
  }), i.dirty()), t.common.async)
2129
- return Promise.all([...t.data].map((a, o) => n.type._parseAsync(new ue(t, a, t.path, o)))).then((a) => K.mergeArray(i, a));
2129
+ return Promise.all([...t.data].map((a, o) => n.type._parseAsync(new ue(t, a, t.path, o)))).then((a) => J.mergeArray(i, a));
2130
2130
  const r = [...t.data].map((a, o) => n.type._parseSync(new ue(t, a, t.path, o)));
2131
- return K.mergeArray(i, r);
2131
+ return J.mergeArray(i, r);
2132
2132
  }
2133
2133
  get element() {
2134
2134
  return this._def.type;
@@ -2160,15 +2160,15 @@ re.create = (s, e) => new re({
2160
2160
  minLength: null,
2161
2161
  maxLength: null,
2162
2162
  exactLength: null,
2163
- typeName: S.ZodArray,
2163
+ typeName: T.ZodArray,
2164
2164
  ...A(e)
2165
2165
  });
2166
- function Xe(s) {
2166
+ function et(s) {
2167
2167
  if (s instanceof H) {
2168
2168
  const e = {};
2169
2169
  for (const t in s.shape) {
2170
2170
  const i = s.shape[t];
2171
- e[t] = _e.create(Xe(i));
2171
+ e[t] = _e.create(et(i));
2172
2172
  }
2173
2173
  return new H({
2174
2174
  ...s._def,
@@ -2177,8 +2177,8 @@ function Xe(s) {
2177
2177
  } else
2178
2178
  return s instanceof re ? new re({
2179
2179
  ...s._def,
2180
- type: Xe(s.element)
2181
- }) : s instanceof _e ? _e.create(Xe(s.unwrap())) : s instanceof We ? We.create(Xe(s.unwrap())) : s instanceof he ? he.create(s.items.map((e) => Xe(e))) : s;
2180
+ type: et(s.element)
2181
+ }) : s instanceof _e ? _e.create(et(s.unwrap())) : s instanceof Je ? Je.create(et(s.unwrap())) : s instanceof he ? he.create(s.items.map((e) => et(e))) : s;
2182
2182
  }
2183
2183
  class H extends I {
2184
2184
  constructor() {
@@ -2252,7 +2252,7 @@ class H extends I {
2252
2252
  });
2253
2253
  }
2254
2254
  return c;
2255
- }).then((c) => K.mergeObjectSync(t, c)) : K.mergeObjectSync(t, o);
2255
+ }).then((c) => J.mergeObjectSync(t, c)) : J.mergeObjectSync(t, o);
2256
2256
  }
2257
2257
  get shape() {
2258
2258
  return this._def.shape();
@@ -2325,7 +2325,7 @@ class H extends I {
2325
2325
  ...this._def.shape(),
2326
2326
  ...e._def.shape()
2327
2327
  }),
2328
- typeName: S.ZodObject
2328
+ typeName: T.ZodObject
2329
2329
  });
2330
2330
  }
2331
2331
  // merge<
@@ -2415,7 +2415,7 @@ class H extends I {
2415
2415
  * @deprecated
2416
2416
  */
2417
2417
  deepPartial() {
2418
- return Xe(this);
2418
+ return et(this);
2419
2419
  }
2420
2420
  partial(e) {
2421
2421
  const t = {};
@@ -2444,31 +2444,31 @@ class H extends I {
2444
2444
  });
2445
2445
  }
2446
2446
  keyof() {
2447
- return Fi(j.objectKeys(this.shape));
2447
+ return Vi(j.objectKeys(this.shape));
2448
2448
  }
2449
2449
  }
2450
2450
  H.create = (s, e) => new H({
2451
2451
  shape: () => s,
2452
2452
  unknownKeys: "strip",
2453
2453
  catchall: xe.create(),
2454
- typeName: S.ZodObject,
2454
+ typeName: T.ZodObject,
2455
2455
  ...A(e)
2456
2456
  });
2457
2457
  H.strictCreate = (s, e) => new H({
2458
2458
  shape: () => s,
2459
2459
  unknownKeys: "strict",
2460
2460
  catchall: xe.create(),
2461
- typeName: S.ZodObject,
2461
+ typeName: T.ZodObject,
2462
2462
  ...A(e)
2463
2463
  });
2464
2464
  H.lazycreate = (s, e) => new H({
2465
2465
  shape: s,
2466
2466
  unknownKeys: "strip",
2467
2467
  catchall: xe.create(),
2468
- typeName: S.ZodObject,
2468
+ typeName: T.ZodObject,
2469
2469
  ...A(e)
2470
2470
  });
2471
- class Tt extends I {
2471
+ class $t extends I {
2472
2472
  _parse(e) {
2473
2473
  const { ctx: t } = this._processInputParams(e), i = this._def.options;
2474
2474
  function n(r) {
@@ -2536,13 +2536,13 @@ class Tt extends I {
2536
2536
  return this._def.options;
2537
2537
  }
2538
2538
  }
2539
- Tt.create = (s, e) => new Tt({
2539
+ $t.create = (s, e) => new $t({
2540
2540
  options: s,
2541
- typeName: S.ZodUnion,
2541
+ typeName: T.ZodUnion,
2542
2542
  ...A(e)
2543
2543
  });
2544
- const zt = (s) => s instanceof Et ? zt(s.schema) : s instanceof ae ? zt(s.innerType()) : s instanceof Ct ? [s.value] : s instanceof Oe ? s.options : s instanceof At ? Object.keys(s.enum) : s instanceof Ot ? zt(s._def.innerType) : s instanceof xt ? [void 0] : s instanceof kt ? [null] : null;
2545
- class ds extends I {
2544
+ const Ht = (s) => s instanceof At ? Ht(s.schema) : s instanceof ae ? Ht(s.innerType()) : s instanceof Ot ? [s.value] : s instanceof Ie ? s.options : s instanceof It ? Object.keys(s.enum) : s instanceof Mt ? Ht(s._def.innerType) : s instanceof St ? [void 0] : s instanceof Tt ? [null] : null;
2545
+ class us extends I {
2546
2546
  _parse(e) {
2547
2547
  const { ctx: t } = this._processInputParams(e);
2548
2548
  if (t.parsedType !== f.object)
@@ -2586,7 +2586,7 @@ class ds extends I {
2586
2586
  static create(e, t, i) {
2587
2587
  const n = /* @__PURE__ */ new Map();
2588
2588
  for (const r of t) {
2589
- const a = zt(r.shape[e]);
2589
+ const a = Ht(r.shape[e]);
2590
2590
  if (!a)
2591
2591
  throw new Error(`A discriminator value for key \`${e}\` could not be extracted from all schema options`);
2592
2592
  for (const o of a) {
@@ -2595,8 +2595,8 @@ class ds extends I {
2595
2595
  n.set(o, r);
2596
2596
  }
2597
2597
  }
2598
- return new ds({
2599
- typeName: S.ZodDiscriminatedUnion,
2598
+ return new us({
2599
+ typeName: T.ZodDiscriminatedUnion,
2600
2600
  discriminator: e,
2601
2601
  options: t,
2602
2602
  optionsMap: n,
@@ -2604,14 +2604,14 @@ class ds extends I {
2604
2604
  });
2605
2605
  }
2606
2606
  }
2607
- function Ns(s, e) {
2607
+ function js(s, e) {
2608
2608
  const t = Ee(s), i = Ee(e);
2609
2609
  if (s === e)
2610
2610
  return { valid: !0, data: s };
2611
2611
  if (t === f.object && i === f.object) {
2612
2612
  const n = j.objectKeys(e), r = j.objectKeys(s).filter((o) => n.indexOf(o) !== -1), a = { ...s, ...e };
2613
2613
  for (const o of r) {
2614
- const c = Ns(s[o], e[o]);
2614
+ const c = js(s[o], e[o]);
2615
2615
  if (!c.valid)
2616
2616
  return { valid: !1 };
2617
2617
  a[o] = c.data;
@@ -2622,7 +2622,7 @@ function Ns(s, e) {
2622
2622
  return { valid: !1 };
2623
2623
  const n = [];
2624
2624
  for (let r = 0; r < s.length; r++) {
2625
- const a = s[r], o = e[r], c = Ns(a, o);
2625
+ const a = s[r], o = e[r], c = js(a, o);
2626
2626
  if (!c.valid)
2627
2627
  return { valid: !1 };
2628
2628
  n.push(c.data);
@@ -2631,13 +2631,13 @@ function Ns(s, e) {
2631
2631
  } else
2632
2632
  return t === f.date && i === f.date && +s == +e ? { valid: !0, data: s } : { valid: !1 };
2633
2633
  }
2634
- class St extends I {
2634
+ class Et extends I {
2635
2635
  _parse(e) {
2636
2636
  const { status: t, ctx: i } = this._processInputParams(e), n = (r, a) => {
2637
- if (Is(r) || Is(a))
2637
+ if (Ns(r) || Ns(a))
2638
2638
  return E;
2639
- const o = Ns(r.value, a.value);
2640
- return o.valid ? ((Ms(r) || Ms(a)) && t.dirty(), { status: t.value, value: o.data }) : (g(i, {
2639
+ const o = js(r.value, a.value);
2640
+ return o.valid ? ((Ps(r) || Ps(a)) && t.dirty(), { status: t.value, value: o.data }) : (g(i, {
2641
2641
  code: m.invalid_intersection_types
2642
2642
  }), E);
2643
2643
  };
@@ -2663,10 +2663,10 @@ class St extends I {
2663
2663
  }));
2664
2664
  }
2665
2665
  }
2666
- St.create = (s, e, t) => new St({
2666
+ Et.create = (s, e, t) => new Et({
2667
2667
  left: s,
2668
2668
  right: e,
2669
- typeName: S.ZodIntersection,
2669
+ typeName: T.ZodIntersection,
2670
2670
  ...A(t)
2671
2671
  });
2672
2672
  class he extends I {
@@ -2697,7 +2697,7 @@ class he extends I {
2697
2697
  const o = this._def.items[a] || this._def.rest;
2698
2698
  return o ? o._parse(new ue(i, r, i.path, a)) : null;
2699
2699
  }).filter((r) => !!r);
2700
- return i.common.async ? Promise.all(n).then((r) => K.mergeArray(t, r)) : K.mergeArray(t, n);
2700
+ return i.common.async ? Promise.all(n).then((r) => J.mergeArray(t, r)) : J.mergeArray(t, n);
2701
2701
  }
2702
2702
  get items() {
2703
2703
  return this._def.items;
@@ -2714,12 +2714,12 @@ he.create = (s, e) => {
2714
2714
  throw new Error("You must pass an array of schemas to z.tuple([ ... ])");
2715
2715
  return new he({
2716
2716
  items: s,
2717
- typeName: S.ZodTuple,
2717
+ typeName: T.ZodTuple,
2718
2718
  rest: null,
2719
2719
  ...A(e)
2720
2720
  });
2721
2721
  };
2722
- class $t extends I {
2722
+ class Ct extends I {
2723
2723
  get keySchema() {
2724
2724
  return this._def.keyType;
2725
2725
  }
@@ -2740,26 +2740,26 @@ class $t extends I {
2740
2740
  key: r._parse(new ue(i, o, i.path, o)),
2741
2741
  value: a._parse(new ue(i, i.data[o], i.path, o))
2742
2742
  });
2743
- return i.common.async ? K.mergeObjectAsync(t, n) : K.mergeObjectSync(t, n);
2743
+ return i.common.async ? J.mergeObjectAsync(t, n) : J.mergeObjectSync(t, n);
2744
2744
  }
2745
2745
  get element() {
2746
2746
  return this._def.valueType;
2747
2747
  }
2748
2748
  static create(e, t, i) {
2749
- return t instanceof I ? new $t({
2749
+ return t instanceof I ? new Ct({
2750
2750
  keyType: e,
2751
2751
  valueType: t,
2752
- typeName: S.ZodRecord,
2752
+ typeName: T.ZodRecord,
2753
2753
  ...A(i)
2754
- }) : new $t({
2754
+ }) : new Ct({
2755
2755
  keyType: ie.create(),
2756
2756
  valueType: e,
2757
- typeName: S.ZodRecord,
2757
+ typeName: T.ZodRecord,
2758
2758
  ...A(t)
2759
2759
  });
2760
2760
  }
2761
2761
  }
2762
- class qt extends I {
2762
+ class Xt extends I {
2763
2763
  get keySchema() {
2764
2764
  return this._def.keyType;
2765
2765
  }
@@ -2801,13 +2801,13 @@ class qt extends I {
2801
2801
  }
2802
2802
  }
2803
2803
  }
2804
- qt.create = (s, e, t) => new qt({
2804
+ Xt.create = (s, e, t) => new Xt({
2805
2805
  valueType: e,
2806
2806
  keyType: s,
2807
- typeName: S.ZodMap,
2807
+ typeName: T.ZodMap,
2808
2808
  ...A(t)
2809
2809
  });
2810
- class Ve extends I {
2810
+ class Ke extends I {
2811
2811
  _parse(e) {
2812
2812
  const { status: t, ctx: i } = this._processInputParams(e);
2813
2813
  if (i.parsedType !== f.set)
@@ -2846,13 +2846,13 @@ class Ve extends I {
2846
2846
  return i.common.async ? Promise.all(o).then((c) => a(c)) : a(o);
2847
2847
  }
2848
2848
  min(e, t) {
2849
- return new Ve({
2849
+ return new Ke({
2850
2850
  ...this._def,
2851
2851
  minSize: { value: e, message: _.toString(t) }
2852
2852
  });
2853
2853
  }
2854
2854
  max(e, t) {
2855
- return new Ve({
2855
+ return new Ke({
2856
2856
  ...this._def,
2857
2857
  maxSize: { value: e, message: _.toString(t) }
2858
2858
  });
@@ -2864,14 +2864,14 @@ class Ve extends I {
2864
2864
  return this.min(1, e);
2865
2865
  }
2866
2866
  }
2867
- Ve.create = (s, e) => new Ve({
2867
+ Ke.create = (s, e) => new Ke({
2868
2868
  valueType: s,
2869
2869
  minSize: null,
2870
2870
  maxSize: null,
2871
- typeName: S.ZodSet,
2871
+ typeName: T.ZodSet,
2872
2872
  ...A(e)
2873
2873
  });
2874
- class Qe extends I {
2874
+ class st extends I {
2875
2875
  constructor() {
2876
2876
  super(...arguments), this.validate = this.implement;
2877
2877
  }
@@ -2884,14 +2884,14 @@ class Qe extends I {
2884
2884
  received: t.parsedType
2885
2885
  }), E;
2886
2886
  function i(o, c) {
2887
- return Vt({
2887
+ return Jt({
2888
2888
  data: o,
2889
2889
  path: t.path,
2890
2890
  errorMaps: [
2891
2891
  t.common.contextualErrorMap,
2892
2892
  t.schemaErrorMap,
2893
- Ft(),
2894
- bt
2893
+ Kt(),
2894
+ _t
2895
2895
  ].filter((l) => !!l),
2896
2896
  issueData: {
2897
2897
  code: m.invalid_arguments,
@@ -2900,14 +2900,14 @@ class Qe extends I {
2900
2900
  });
2901
2901
  }
2902
2902
  function n(o, c) {
2903
- return Vt({
2903
+ return Jt({
2904
2904
  data: o,
2905
2905
  path: t.path,
2906
2906
  errorMaps: [
2907
2907
  t.common.contextualErrorMap,
2908
2908
  t.schemaErrorMap,
2909
- Ft(),
2910
- bt
2909
+ Kt(),
2910
+ _t
2911
2911
  ].filter((l) => !!l),
2912
2912
  issueData: {
2913
2913
  code: m.invalid_return_type,
@@ -2916,7 +2916,7 @@ class Qe extends I {
2916
2916
  });
2917
2917
  }
2918
2918
  const r = { errorMap: t.common.contextualErrorMap }, a = t.data;
2919
- if (this._def.returns instanceof it) {
2919
+ if (this._def.returns instanceof rt) {
2920
2920
  const o = this;
2921
2921
  return Y(async function(...c) {
2922
2922
  const l = new ne([]), h = await o._def.args.parseAsync(c, r).catch((d) => {
@@ -2946,13 +2946,13 @@ class Qe extends I {
2946
2946
  return this._def.returns;
2947
2947
  }
2948
2948
  args(...e) {
2949
- return new Qe({
2949
+ return new st({
2950
2950
  ...this._def,
2951
- args: he.create(e).rest(De.create())
2951
+ args: he.create(e).rest(He.create())
2952
2952
  });
2953
2953
  }
2954
2954
  returns(e) {
2955
- return new Qe({
2955
+ return new st({
2956
2956
  ...this._def,
2957
2957
  returns: e
2958
2958
  });
@@ -2964,15 +2964,15 @@ class Qe extends I {
2964
2964
  return this.parse(e);
2965
2965
  }
2966
2966
  static create(e, t, i) {
2967
- return new Qe({
2968
- args: e || he.create([]).rest(De.create()),
2969
- returns: t || De.create(),
2970
- typeName: S.ZodFunction,
2967
+ return new st({
2968
+ args: e || he.create([]).rest(He.create()),
2969
+ returns: t || He.create(),
2970
+ typeName: T.ZodFunction,
2971
2971
  ...A(i)
2972
2972
  });
2973
2973
  }
2974
2974
  }
2975
- class Et extends I {
2975
+ class At extends I {
2976
2976
  get schema() {
2977
2977
  return this._def.getter();
2978
2978
  }
@@ -2981,12 +2981,12 @@ class Et extends I {
2981
2981
  return this._def.getter()._parse({ data: t.data, path: t.path, parent: t });
2982
2982
  }
2983
2983
  }
2984
- Et.create = (s, e) => new Et({
2984
+ At.create = (s, e) => new At({
2985
2985
  getter: s,
2986
- typeName: S.ZodLazy,
2986
+ typeName: T.ZodLazy,
2987
2987
  ...A(e)
2988
2988
  });
2989
- class Ct extends I {
2989
+ class Ot extends I {
2990
2990
  _parse(e) {
2991
2991
  if (e.data !== this._def.value) {
2992
2992
  const t = this._getOrReturnCtx(e);
@@ -3002,19 +3002,19 @@ class Ct extends I {
3002
3002
  return this._def.value;
3003
3003
  }
3004
3004
  }
3005
- Ct.create = (s, e) => new Ct({
3005
+ Ot.create = (s, e) => new Ot({
3006
3006
  value: s,
3007
- typeName: S.ZodLiteral,
3007
+ typeName: T.ZodLiteral,
3008
3008
  ...A(e)
3009
3009
  });
3010
- function Fi(s, e) {
3011
- return new Oe({
3010
+ function Vi(s, e) {
3011
+ return new Ie({
3012
3012
  values: s,
3013
- typeName: S.ZodEnum,
3013
+ typeName: T.ZodEnum,
3014
3014
  ...A(e)
3015
3015
  });
3016
3016
  }
3017
- class Oe extends I {
3017
+ class Ie extends I {
3018
3018
  _parse(e) {
3019
3019
  if (typeof e.data != "string") {
3020
3020
  const t = this._getOrReturnCtx(e), i = this._def.values;
@@ -3056,14 +3056,14 @@ class Oe extends I {
3056
3056
  return e;
3057
3057
  }
3058
3058
  extract(e) {
3059
- return Oe.create(e);
3059
+ return Ie.create(e);
3060
3060
  }
3061
3061
  exclude(e) {
3062
- return Oe.create(this.options.filter((t) => !e.includes(t)));
3062
+ return Ie.create(this.options.filter((t) => !e.includes(t)));
3063
3063
  }
3064
3064
  }
3065
- Oe.create = Fi;
3066
- class At extends I {
3065
+ Ie.create = Vi;
3066
+ class It extends I {
3067
3067
  _parse(e) {
3068
3068
  const t = j.getValidEnumValues(this._def.values), i = this._getOrReturnCtx(e);
3069
3069
  if (i.parsedType !== f.string && i.parsedType !== f.number) {
@@ -3088,12 +3088,12 @@ class At extends I {
3088
3088
  return this._def.values;
3089
3089
  }
3090
3090
  }
3091
- At.create = (s, e) => new At({
3091
+ It.create = (s, e) => new It({
3092
3092
  values: s,
3093
- typeName: S.ZodNativeEnum,
3093
+ typeName: T.ZodNativeEnum,
3094
3094
  ...A(e)
3095
3095
  });
3096
- class it extends I {
3096
+ class rt extends I {
3097
3097
  unwrap() {
3098
3098
  return this._def.type;
3099
3099
  }
@@ -3112,9 +3112,9 @@ class it extends I {
3112
3112
  })));
3113
3113
  }
3114
3114
  }
3115
- it.create = (s, e) => new it({
3115
+ rt.create = (s, e) => new rt({
3116
3116
  type: s,
3117
- typeName: S.ZodPromise,
3117
+ typeName: T.ZodPromise,
3118
3118
  ...A(e)
3119
3119
  });
3120
3120
  class ae extends I {
@@ -3122,7 +3122,7 @@ class ae extends I {
3122
3122
  return this._def.schema;
3123
3123
  }
3124
3124
  sourceType() {
3125
- return this._def.schema._def.typeName === S.ZodEffects ? this._def.schema.sourceType() : this._def.schema;
3125
+ return this._def.schema._def.typeName === T.ZodEffects ? this._def.schema.sourceType() : this._def.schema;
3126
3126
  }
3127
3127
  _parse(e) {
3128
3128
  const { status: t, ctx: i } = this._processInputParams(e), n = this._def.effect || null, r = {
@@ -3174,27 +3174,27 @@ class ae extends I {
3174
3174
  path: i.path,
3175
3175
  parent: i
3176
3176
  });
3177
- if (!wt(a))
3177
+ if (!xt(a))
3178
3178
  return a;
3179
3179
  const o = n.transform(a.value, r);
3180
3180
  if (o instanceof Promise)
3181
3181
  throw new Error("Asynchronous transform encountered during synchronous parse operation. Use .parseAsync instead.");
3182
3182
  return { status: t.value, value: o };
3183
3183
  } else
3184
- return this._def.schema._parseAsync({ data: i.data, path: i.path, parent: i }).then((a) => wt(a) ? Promise.resolve(n.transform(a.value, r)).then((o) => ({ status: t.value, value: o })) : a);
3184
+ return this._def.schema._parseAsync({ data: i.data, path: i.path, parent: i }).then((a) => xt(a) ? Promise.resolve(n.transform(a.value, r)).then((o) => ({ status: t.value, value: o })) : a);
3185
3185
  j.assertNever(n);
3186
3186
  }
3187
3187
  }
3188
3188
  ae.create = (s, e, t) => new ae({
3189
3189
  schema: s,
3190
- typeName: S.ZodEffects,
3190
+ typeName: T.ZodEffects,
3191
3191
  effect: e,
3192
3192
  ...A(t)
3193
3193
  });
3194
3194
  ae.createWithPreprocess = (s, e, t) => new ae({
3195
3195
  schema: e,
3196
3196
  effect: { type: "preprocess", transform: s },
3197
- typeName: S.ZodEffects,
3197
+ typeName: T.ZodEffects,
3198
3198
  ...A(t)
3199
3199
  });
3200
3200
  class _e extends I {
@@ -3207,10 +3207,10 @@ class _e extends I {
3207
3207
  }
3208
3208
  _e.create = (s, e) => new _e({
3209
3209
  innerType: s,
3210
- typeName: S.ZodOptional,
3210
+ typeName: T.ZodOptional,
3211
3211
  ...A(e)
3212
3212
  });
3213
- class We extends I {
3213
+ class Je extends I {
3214
3214
  _parse(e) {
3215
3215
  return this._getType(e) === f.null ? Y(null) : this._def.innerType._parse(e);
3216
3216
  }
@@ -3218,12 +3218,12 @@ class We extends I {
3218
3218
  return this._def.innerType;
3219
3219
  }
3220
3220
  }
3221
- We.create = (s, e) => new We({
3221
+ Je.create = (s, e) => new Je({
3222
3222
  innerType: s,
3223
- typeName: S.ZodNullable,
3223
+ typeName: T.ZodNullable,
3224
3224
  ...A(e)
3225
3225
  });
3226
- class Ot extends I {
3226
+ class Mt extends I {
3227
3227
  _parse(e) {
3228
3228
  const { ctx: t } = this._processInputParams(e);
3229
3229
  let i = t.data;
@@ -3237,13 +3237,13 @@ class Ot extends I {
3237
3237
  return this._def.innerType;
3238
3238
  }
3239
3239
  }
3240
- Ot.create = (s, e) => new Ot({
3240
+ Mt.create = (s, e) => new Mt({
3241
3241
  innerType: s,
3242
- typeName: S.ZodDefault,
3242
+ typeName: T.ZodDefault,
3243
3243
  defaultValue: typeof e.default == "function" ? e.default : () => e.default,
3244
3244
  ...A(e)
3245
3245
  });
3246
- class Yt extends I {
3246
+ class Qt extends I {
3247
3247
  _parse(e) {
3248
3248
  const { ctx: t } = this._processInputParams(e), i = {
3249
3249
  ...t,
@@ -3258,7 +3258,7 @@ class Yt extends I {
3258
3258
  ...i
3259
3259
  }
3260
3260
  });
3261
- return Wt(n) ? n.then((r) => ({
3261
+ return qt(n) ? n.then((r) => ({
3262
3262
  status: "valid",
3263
3263
  value: r.status === "valid" ? r.value : this._def.catchValue({
3264
3264
  get error() {
@@ -3280,13 +3280,13 @@ class Yt extends I {
3280
3280
  return this._def.innerType;
3281
3281
  }
3282
3282
  }
3283
- Yt.create = (s, e) => new Yt({
3283
+ Qt.create = (s, e) => new Qt({
3284
3284
  innerType: s,
3285
- typeName: S.ZodCatch,
3285
+ typeName: T.ZodCatch,
3286
3286
  catchValue: typeof e.catch == "function" ? e.catch : () => e.catch,
3287
3287
  ...A(e)
3288
3288
  });
3289
- class Gt extends I {
3289
+ class es extends I {
3290
3290
  _parse(e) {
3291
3291
  if (this._getType(e) !== f.nan) {
3292
3292
  const t = this._getOrReturnCtx(e);
@@ -3299,12 +3299,12 @@ class Gt extends I {
3299
3299
  return { status: "valid", value: e.data };
3300
3300
  }
3301
3301
  }
3302
- Gt.create = (s) => new Gt({
3303
- typeName: S.ZodNaN,
3302
+ es.create = (s) => new es({
3303
+ typeName: T.ZodNaN,
3304
3304
  ...A(s)
3305
3305
  });
3306
3306
  const Kn = Symbol("zod_brand");
3307
- class Vi extends I {
3307
+ class Wi extends I {
3308
3308
  _parse(e) {
3309
3309
  const { ctx: t } = this._processInputParams(e), i = t.data;
3310
3310
  return this._def.type._parse({
@@ -3317,7 +3317,7 @@ class Vi extends I {
3317
3317
  return this._def.type;
3318
3318
  }
3319
3319
  }
3320
- class Nt extends I {
3320
+ class Rt extends I {
3321
3321
  _parse(e) {
3322
3322
  const { status: t, ctx: i } = this._processInputParams(e);
3323
3323
  if (i.common.async)
@@ -3327,7 +3327,7 @@ class Nt extends I {
3327
3327
  path: i.path,
3328
3328
  parent: i
3329
3329
  });
3330
- return n.status === "aborted" ? E : n.status === "dirty" ? (t.dirty(), Bi(n.value)) : this._def.out._parseAsync({
3330
+ return n.status === "aborted" ? E : n.status === "dirty" ? (t.dirty(), Fi(n.value)) : this._def.out._parseAsync({
3331
3331
  data: n.value,
3332
3332
  path: i.path,
3333
3333
  parent: i
@@ -3350,127 +3350,127 @@ class Nt extends I {
3350
3350
  }
3351
3351
  }
3352
3352
  static create(e, t) {
3353
- return new Nt({
3353
+ return new Rt({
3354
3354
  in: e,
3355
3355
  out: t,
3356
- typeName: S.ZodPipeline
3356
+ typeName: T.ZodPipeline
3357
3357
  });
3358
3358
  }
3359
3359
  }
3360
- class Xt extends I {
3360
+ class ts extends I {
3361
3361
  _parse(e) {
3362
3362
  const t = this._def.innerType._parse(e);
3363
- return wt(t) && (t.value = Object.freeze(t.value)), t;
3363
+ return xt(t) && (t.value = Object.freeze(t.value)), t;
3364
3364
  }
3365
3365
  }
3366
- Xt.create = (s, e) => new Xt({
3366
+ ts.create = (s, e) => new ts({
3367
3367
  innerType: s,
3368
- typeName: S.ZodReadonly,
3368
+ typeName: T.ZodReadonly,
3369
3369
  ...A(e)
3370
3370
  });
3371
- const Wi = (s, e = {}, t) => s ? st.create().superRefine((i, n) => {
3371
+ const Ki = (s, e = {}, t) => s ? nt.create().superRefine((i, n) => {
3372
3372
  var r, a;
3373
3373
  if (!s(i)) {
3374
3374
  const o = typeof e == "function" ? e(i) : typeof e == "string" ? { message: e } : e, c = (a = (r = o.fatal) !== null && r !== void 0 ? r : t) !== null && a !== void 0 ? a : !0, l = typeof o == "string" ? { message: o } : o;
3375
3375
  n.addIssue({ code: "custom", ...l, fatal: c });
3376
3376
  }
3377
- }) : st.create(), Jn = {
3377
+ }) : nt.create(), Jn = {
3378
3378
  object: H.lazycreate
3379
3379
  };
3380
- var S;
3380
+ var T;
3381
3381
  (function(s) {
3382
3382
  s.ZodString = "ZodString", s.ZodNumber = "ZodNumber", s.ZodNaN = "ZodNaN", s.ZodBigInt = "ZodBigInt", s.ZodBoolean = "ZodBoolean", s.ZodDate = "ZodDate", s.ZodSymbol = "ZodSymbol", s.ZodUndefined = "ZodUndefined", s.ZodNull = "ZodNull", s.ZodAny = "ZodAny", s.ZodUnknown = "ZodUnknown", s.ZodNever = "ZodNever", s.ZodVoid = "ZodVoid", s.ZodArray = "ZodArray", s.ZodObject = "ZodObject", s.ZodUnion = "ZodUnion", s.ZodDiscriminatedUnion = "ZodDiscriminatedUnion", s.ZodIntersection = "ZodIntersection", s.ZodTuple = "ZodTuple", s.ZodRecord = "ZodRecord", s.ZodMap = "ZodMap", s.ZodSet = "ZodSet", s.ZodFunction = "ZodFunction", s.ZodLazy = "ZodLazy", s.ZodLiteral = "ZodLiteral", s.ZodEnum = "ZodEnum", s.ZodEffects = "ZodEffects", s.ZodNativeEnum = "ZodNativeEnum", s.ZodOptional = "ZodOptional", s.ZodNullable = "ZodNullable", s.ZodDefault = "ZodDefault", s.ZodCatch = "ZodCatch", s.ZodPromise = "ZodPromise", s.ZodBranded = "ZodBranded", s.ZodPipeline = "ZodPipeline", s.ZodReadonly = "ZodReadonly";
3383
- })(S || (S = {}));
3383
+ })(T || (T = {}));
3384
3384
  const qn = (s, e = {
3385
3385
  message: `Input not instance of ${s.name}`
3386
- }) => Wi((t) => t instanceof s, e), Ki = ie.create, Ji = Ce.create, Yn = Gt.create, Gn = Ae.create, qi = _t.create, Xn = Fe.create, Qn = Kt.create, er = xt.create, tr = kt.create, sr = st.create, ir = De.create, nr = xe.create, rr = Jt.create, ar = re.create, or = H.create, cr = H.strictCreate, dr = Tt.create, lr = ds.create, ur = St.create, hr = he.create, pr = $t.create, mr = qt.create, fr = Ve.create, gr = Qe.create, yr = Et.create, vr = Ct.create, br = Oe.create, wr = At.create, _r = it.create, ki = ae.create, xr = _e.create, kr = We.create, Tr = ae.createWithPreprocess, Sr = Nt.create, $r = () => Ki().optional(), Er = () => Ji().optional(), Cr = () => qi().optional(), Ar = {
3386
+ }) => Ki((t) => t instanceof s, e), Ji = ie.create, qi = Ae.create, Yn = es.create, Gn = Oe.create, Yi = kt.create, Xn = We.create, Qn = Yt.create, er = St.create, tr = Tt.create, sr = nt.create, ir = He.create, nr = xe.create, rr = Gt.create, ar = re.create, or = H.create, cr = H.strictCreate, dr = $t.create, lr = us.create, ur = Et.create, hr = he.create, pr = Ct.create, mr = Xt.create, fr = Ke.create, gr = st.create, yr = At.create, vr = Ot.create, br = Ie.create, wr = It.create, _r = rt.create, Si = ae.create, xr = _e.create, kr = Je.create, Sr = ae.createWithPreprocess, Tr = Rt.create, $r = () => Ji().optional(), Er = () => qi().optional(), Cr = () => Yi().optional(), Ar = {
3387
3387
  string: (s) => ie.create({ ...s, coerce: !0 }),
3388
- number: (s) => Ce.create({ ...s, coerce: !0 }),
3389
- boolean: (s) => _t.create({
3388
+ number: (s) => Ae.create({ ...s, coerce: !0 }),
3389
+ boolean: (s) => kt.create({
3390
3390
  ...s,
3391
3391
  coerce: !0
3392
3392
  }),
3393
- bigint: (s) => Ae.create({ ...s, coerce: !0 }),
3394
- date: (s) => Fe.create({ ...s, coerce: !0 })
3393
+ bigint: (s) => Oe.create({ ...s, coerce: !0 }),
3394
+ date: (s) => We.create({ ...s, coerce: !0 })
3395
3395
  }, Or = E;
3396
3396
  var w = /* @__PURE__ */ Object.freeze({
3397
3397
  __proto__: null,
3398
- defaultErrorMap: bt,
3398
+ defaultErrorMap: _t,
3399
3399
  setErrorMap: Pn,
3400
- getErrorMap: Ft,
3401
- makeIssue: Vt,
3400
+ getErrorMap: Kt,
3401
+ makeIssue: Jt,
3402
3402
  EMPTY_PATH: jn,
3403
3403
  addIssueToContext: g,
3404
- ParseStatus: K,
3404
+ ParseStatus: J,
3405
3405
  INVALID: E,
3406
- DIRTY: Bi,
3406
+ DIRTY: Fi,
3407
3407
  OK: Y,
3408
- isAborted: Is,
3409
- isDirty: Ms,
3410
- isValid: wt,
3411
- isAsync: Wt,
3408
+ isAborted: Ns,
3409
+ isDirty: Ps,
3410
+ isValid: xt,
3411
+ isAsync: qt,
3412
3412
  get util() {
3413
3413
  return j;
3414
3414
  },
3415
3415
  get objectUtil() {
3416
- return Os;
3416
+ return Ms;
3417
3417
  },
3418
3418
  ZodParsedType: f,
3419
3419
  getParsedType: Ee,
3420
3420
  ZodType: I,
3421
3421
  ZodString: ie,
3422
- ZodNumber: Ce,
3423
- ZodBigInt: Ae,
3424
- ZodBoolean: _t,
3425
- ZodDate: Fe,
3426
- ZodSymbol: Kt,
3427
- ZodUndefined: xt,
3428
- ZodNull: kt,
3429
- ZodAny: st,
3430
- ZodUnknown: De,
3422
+ ZodNumber: Ae,
3423
+ ZodBigInt: Oe,
3424
+ ZodBoolean: kt,
3425
+ ZodDate: We,
3426
+ ZodSymbol: Yt,
3427
+ ZodUndefined: St,
3428
+ ZodNull: Tt,
3429
+ ZodAny: nt,
3430
+ ZodUnknown: He,
3431
3431
  ZodNever: xe,
3432
- ZodVoid: Jt,
3432
+ ZodVoid: Gt,
3433
3433
  ZodArray: re,
3434
3434
  ZodObject: H,
3435
- ZodUnion: Tt,
3436
- ZodDiscriminatedUnion: ds,
3437
- ZodIntersection: St,
3435
+ ZodUnion: $t,
3436
+ ZodDiscriminatedUnion: us,
3437
+ ZodIntersection: Et,
3438
3438
  ZodTuple: he,
3439
- ZodRecord: $t,
3440
- ZodMap: qt,
3441
- ZodSet: Ve,
3442
- ZodFunction: Qe,
3443
- ZodLazy: Et,
3444
- ZodLiteral: Ct,
3445
- ZodEnum: Oe,
3446
- ZodNativeEnum: At,
3447
- ZodPromise: it,
3439
+ ZodRecord: Ct,
3440
+ ZodMap: Xt,
3441
+ ZodSet: Ke,
3442
+ ZodFunction: st,
3443
+ ZodLazy: At,
3444
+ ZodLiteral: Ot,
3445
+ ZodEnum: Ie,
3446
+ ZodNativeEnum: It,
3447
+ ZodPromise: rt,
3448
3448
  ZodEffects: ae,
3449
3449
  ZodTransformer: ae,
3450
3450
  ZodOptional: _e,
3451
- ZodNullable: We,
3452
- ZodDefault: Ot,
3453
- ZodCatch: Yt,
3454
- ZodNaN: Gt,
3451
+ ZodNullable: Je,
3452
+ ZodDefault: Mt,
3453
+ ZodCatch: Qt,
3454
+ ZodNaN: es,
3455
3455
  BRAND: Kn,
3456
- ZodBranded: Vi,
3457
- ZodPipeline: Nt,
3458
- ZodReadonly: Xt,
3459
- custom: Wi,
3456
+ ZodBranded: Wi,
3457
+ ZodPipeline: Rt,
3458
+ ZodReadonly: ts,
3459
+ custom: Ki,
3460
3460
  Schema: I,
3461
3461
  ZodSchema: I,
3462
3462
  late: Jn,
3463
3463
  get ZodFirstPartyTypeKind() {
3464
- return S;
3464
+ return T;
3465
3465
  },
3466
3466
  coerce: Ar,
3467
3467
  any: sr,
3468
3468
  array: ar,
3469
3469
  bigint: Gn,
3470
- boolean: qi,
3470
+ boolean: Yi,
3471
3471
  date: Xn,
3472
3472
  discriminatedUnion: lr,
3473
- effect: ki,
3473
+ effect: Si,
3474
3474
  enum: br,
3475
3475
  function: gr,
3476
3476
  instanceof: qn,
@@ -3483,21 +3483,21 @@ var w = /* @__PURE__ */ Object.freeze({
3483
3483
  never: nr,
3484
3484
  null: tr,
3485
3485
  nullable: kr,
3486
- number: Ji,
3486
+ number: qi,
3487
3487
  object: or,
3488
3488
  oboolean: Cr,
3489
3489
  onumber: Er,
3490
3490
  optional: xr,
3491
3491
  ostring: $r,
3492
- pipeline: Sr,
3493
- preprocess: Tr,
3492
+ pipeline: Tr,
3493
+ preprocess: Sr,
3494
3494
  promise: _r,
3495
3495
  record: pr,
3496
3496
  set: fr,
3497
3497
  strictObject: cr,
3498
- string: Ki,
3498
+ string: Ji,
3499
3499
  symbol: Qn,
3500
- transformer: ki,
3500
+ transformer: Si,
3501
3501
  tuple: hr,
3502
3502
  undefined: er,
3503
3503
  union: dr,
@@ -3508,7 +3508,7 @@ var w = /* @__PURE__ */ Object.freeze({
3508
3508
  quotelessJson: Nn,
3509
3509
  ZodError: ne
3510
3510
  });
3511
- const ls = w.object({
3511
+ const hs = w.object({
3512
3512
  assistantId: w.string(),
3513
3513
  params: w.record(w.any()).default({}),
3514
3514
  config: w.object({
@@ -3573,37 +3573,37 @@ function Ir(s) {
3573
3573
  } else
3574
3574
  return Array.from(s);
3575
3575
  }
3576
- var Us = !1;
3576
+ var Hs = !1;
3577
3577
  if (typeof window < "u") {
3578
3578
  var Ti = {
3579
3579
  get passive() {
3580
- Us = !0;
3580
+ Hs = !0;
3581
3581
  }
3582
3582
  };
3583
3583
  window.addEventListener("testPassive", null, Ti), window.removeEventListener("testPassive", null, Ti);
3584
3584
  }
3585
- var Qt = typeof window < "u" && window.navigator && window.navigator.platform && (/iP(ad|hone|od)/.test(window.navigator.platform) || window.navigator.platform === "MacIntel" && window.navigator.maxTouchPoints > 1), Ue = [], es = !1, Yi = -1, ht = void 0, Ze = void 0, pt = void 0, Gi = function(s) {
3586
- return Ue.some(function(e) {
3585
+ var ss = typeof window < "u" && window.navigator && window.navigator.platform && (/iP(ad|hone|od)/.test(window.navigator.platform) || window.navigator.platform === "MacIntel" && window.navigator.maxTouchPoints > 1), Be = [], is = !1, Gi = -1, mt = void 0, De = void 0, ft = void 0, Xi = function(s) {
3586
+ return Be.some(function(e) {
3587
3587
  return !!(e.options.allowTouchMove && e.options.allowTouchMove(s));
3588
3588
  });
3589
- }, Hs = function(s) {
3589
+ }, Bs = function(s) {
3590
3590
  var e = s || window.event;
3591
- return Gi(e.target) || e.touches.length > 1 ? !0 : (e.preventDefault && e.preventDefault(), !1);
3591
+ return Xi(e.target) || e.touches.length > 1 ? !0 : (e.preventDefault && e.preventDefault(), !1);
3592
3592
  }, Mr = function(s) {
3593
- if (pt === void 0) {
3593
+ if (ft === void 0) {
3594
3594
  var e = !!s && s.reserveScrollBarGap === !0, t = window.innerWidth - document.documentElement.clientWidth;
3595
3595
  if (e && t > 0) {
3596
3596
  var i = parseInt(window.getComputedStyle(document.body).getPropertyValue("padding-right"), 10);
3597
- pt = document.body.style.paddingRight, document.body.style.paddingRight = i + t + "px";
3597
+ ft = document.body.style.paddingRight, document.body.style.paddingRight = i + t + "px";
3598
3598
  }
3599
3599
  }
3600
- ht === void 0 && (ht = document.body.style.overflow, document.body.style.overflow = "hidden");
3600
+ mt === void 0 && (mt = document.body.style.overflow, document.body.style.overflow = "hidden");
3601
3601
  }, Nr = function() {
3602
- pt !== void 0 && (document.body.style.paddingRight = pt, pt = void 0), ht !== void 0 && (document.body.style.overflow = ht, ht = void 0);
3602
+ ft !== void 0 && (document.body.style.paddingRight = ft, ft = void 0), mt !== void 0 && (document.body.style.overflow = mt, mt = void 0);
3603
3603
  }, Pr = function() {
3604
3604
  return window.requestAnimationFrame(function() {
3605
- if (Ze === void 0) {
3606
- Ze = {
3605
+ if (De === void 0) {
3606
+ De = {
3607
3607
  position: document.body.style.position,
3608
3608
  top: document.body.style.top,
3609
3609
  left: document.body.style.left
@@ -3618,46 +3618,46 @@ var Qt = typeof window < "u" && window.navigator && window.navigator.platform &&
3618
3618
  }
3619
3619
  });
3620
3620
  }, jr = function() {
3621
- if (Ze !== void 0) {
3621
+ if (De !== void 0) {
3622
3622
  var s = -parseInt(document.body.style.top, 10), e = -parseInt(document.body.style.left, 10);
3623
- document.body.style.position = Ze.position, document.body.style.top = Ze.top, document.body.style.left = Ze.left, window.scrollTo(e, s), Ze = void 0;
3623
+ document.body.style.position = De.position, document.body.style.top = De.top, document.body.style.left = De.left, window.scrollTo(e, s), De = void 0;
3624
3624
  }
3625
3625
  }, Rr = function(s) {
3626
3626
  return s ? s.scrollHeight - s.scrollTop <= s.clientHeight : !1;
3627
3627
  }, Zr = function(s, e) {
3628
- var t = s.targetTouches[0].clientY - Yi;
3629
- return Gi(s.target) ? !1 : e && e.scrollTop === 0 && t > 0 || Rr(e) && t < 0 ? Hs(s) : (s.stopPropagation(), !0);
3628
+ var t = s.targetTouches[0].clientY - Gi;
3629
+ return Xi(s.target) ? !1 : e && e.scrollTop === 0 && t > 0 || Rr(e) && t < 0 ? Bs(s) : (s.stopPropagation(), !0);
3630
3630
  }, Lr = function(s, e) {
3631
3631
  if (!s) {
3632
3632
  console.error("disableBodyScroll unsuccessful - targetElement must be provided when calling disableBodyScroll on IOS devices.");
3633
3633
  return;
3634
3634
  }
3635
- if (!Ue.some(function(i) {
3635
+ if (!Be.some(function(i) {
3636
3636
  return i.targetElement === s;
3637
3637
  })) {
3638
3638
  var t = {
3639
3639
  targetElement: s,
3640
3640
  options: e || {}
3641
3641
  };
3642
- Ue = [].concat(Ir(Ue), [t]), Qt ? Pr() : Mr(e), Qt && (s.ontouchstart = function(i) {
3643
- i.targetTouches.length === 1 && (Yi = i.targetTouches[0].clientY);
3642
+ Be = [].concat(Ir(Be), [t]), ss ? Pr() : Mr(e), ss && (s.ontouchstart = function(i) {
3643
+ i.targetTouches.length === 1 && (Gi = i.targetTouches[0].clientY);
3644
3644
  }, s.ontouchmove = function(i) {
3645
3645
  i.targetTouches.length === 1 && Zr(i, s);
3646
- }, es || (document.addEventListener("touchmove", Hs, Us ? { passive: !1 } : void 0), es = !0));
3646
+ }, is || (document.addEventListener("touchmove", Bs, Hs ? { passive: !1 } : void 0), is = !0));
3647
3647
  }
3648
- }, Si = function(s) {
3648
+ }, $i = function(s) {
3649
3649
  if (!s) {
3650
3650
  console.error("enableBodyScroll unsuccessful - targetElement must be provided when calling enableBodyScroll on IOS devices.");
3651
3651
  return;
3652
3652
  }
3653
- Ue = Ue.filter(function(e) {
3653
+ Be = Be.filter(function(e) {
3654
3654
  return e.targetElement !== s;
3655
- }), Qt && (s.ontouchstart = null, s.ontouchmove = null, es && Ue.length === 0 && (document.removeEventListener("touchmove", Hs, Us ? { passive: !1 } : void 0), es = !1)), Qt ? jr() : Nr();
3656
- }, zr = typeof globalThis < "u" ? globalThis : typeof window < "u" ? window : typeof global < "u" ? global : typeof self < "u" ? self : {};
3657
- function Xi(s) {
3655
+ }), ss && (s.ontouchstart = null, s.ontouchmove = null, is && Be.length === 0 && (document.removeEventListener("touchmove", Bs, Hs ? { passive: !1 } : void 0), is = !1)), ss ? jr() : Nr();
3656
+ }, Dr = typeof globalThis < "u" ? globalThis : typeof window < "u" ? window : typeof global < "u" ? global : typeof self < "u" ? self : {};
3657
+ function Qi(s) {
3658
3658
  return s && s.__esModule && Object.prototype.hasOwnProperty.call(s, "default") ? s.default : s;
3659
3659
  }
3660
- var Bs = {};
3660
+ var Fs = {};
3661
3661
  (function(s) {
3662
3662
  function e(o) {
3663
3663
  o && o.options && clearTimeout(o.options.timer);
@@ -3712,26 +3712,26 @@ var Bs = {};
3712
3712
  return r.apply(void 0, [l, h].concat(o));
3713
3713
  }
3714
3714
  Object.defineProperty(s, "__esModule", { value: !0 }), s.cancel = e, s.debounce = a;
3715
- })(Bs);
3716
- var Dr = Object.defineProperty, Ur = Object.getOwnPropertyDescriptor, Pt = (s, e, t, i) => {
3715
+ })(Fs);
3716
+ var zr = Object.defineProperty, Ur = Object.getOwnPropertyDescriptor, Zt = (s, e, t, i) => {
3717
3717
  for (var n = i > 1 ? void 0 : i ? Ur(e, t) : e, r = s.length - 1, a; r >= 0; r--)
3718
3718
  (a = s[r]) && (n = (i ? a(e, t, n) : a(n)) || n);
3719
- return i && n && Dr(e, t, n), n;
3719
+ return i && n && zr(e, t, n), n;
3720
3720
  };
3721
- let Ke = class extends Q {
3721
+ let qe = class extends Q {
3722
3722
  constructor() {
3723
3723
  super(...arguments), this.isOpen = !0, this.onResizeHandler = () => {
3724
- this.isOpen && window.innerWidth < 768 ? Lr(this) : Si(this);
3724
+ this.isOpen && window.innerWidth < 768 ? Lr(this) : $i(this);
3725
3725
  };
3726
3726
  }
3727
3727
  connectedCallback() {
3728
- super.connectedCallback(), this.cleanOptions = ls.parse(this.options), this.onResizeHandler(), window.addEventListener("resize", this.onResizeHandler, { passive: !0 });
3728
+ super.connectedCallback(), this.cleanOptions = hs.parse(this.options), this.onResizeHandler(), window.addEventListener("resize", this.onResizeHandler, { passive: !0 });
3729
3729
  }
3730
3730
  disconnectedCallback() {
3731
- super.disconnectedCallback(), Si(this), window.removeEventListener("resize", this.onResizeHandler);
3731
+ super.disconnectedCallback(), $i(this), window.removeEventListener("resize", this.onResizeHandler);
3732
3732
  }
3733
3733
  render() {
3734
- const s = this.cleanOptions.config.placement !== "left", e = _i({
3734
+ const s = this.cleanOptions.config.placement !== "left", e = xi({
3735
3735
  fixed: !0,
3736
3736
  "bottom-0": !0,
3737
3737
  "w-full": this.isOpen,
@@ -3741,7 +3741,7 @@ let Ke = class extends Q {
3741
3741
  "md:bottom-8": !0,
3742
3742
  "md:w-fit": !0,
3743
3743
  "md:h-fit": !0
3744
- }), t = _i({
3744
+ }), t = xi({
3745
3745
  "mt-4": !0,
3746
3746
  "px-8": !0,
3747
3747
  "pb-8": !0,
@@ -3756,13 +3756,13 @@ let Ke = class extends Q {
3756
3756
  "md:flex": !0
3757
3757
  // override 'hidden' to ALWAYS show button on larger screens, whether chat is open or not
3758
3758
  });
3759
- return z`
3759
+ return L`
3760
3760
  <div
3761
3761
  class=${e}
3762
3762
  >
3763
3763
  <div
3764
3764
  class="w-full h-full p-2 md:w-[350px] md:h-[500px] md:p-0"
3765
- style=${ut({ display: this.isOpen ? "block" : "none" })}
3765
+ style=${tt({ display: this.isOpen ? "block" : "none" })}
3766
3766
  >
3767
3767
  <iai-chat
3768
3768
  .options=${this.options}
@@ -3772,7 +3772,7 @@ let Ke = class extends Q {
3772
3772
 
3773
3773
  <div
3774
3774
  class=${t}
3775
- style=${ut({ justifyContent: s ? "flex-end" : "flex-start" })}
3775
+ style=${tt({ justifyContent: s ? "flex-end" : "flex-start" })}
3776
3776
  >
3777
3777
  <iai-chat-open-chat-button
3778
3778
  .options=${this.cleanOptions}
@@ -3787,25 +3787,25 @@ let Ke = class extends Q {
3787
3787
  this.isOpen = !this.isOpen, this.onResizeHandler();
3788
3788
  }
3789
3789
  };
3790
- Ke.styles = [Ie];
3791
- Pt([
3792
- J({ type: Object })
3793
- ], Ke.prototype, "options", 2);
3794
- Pt([
3795
- ot()
3796
- ], Ke.prototype, "isOpen", 2);
3797
- Pt([
3790
+ qe.styles = [Ne];
3791
+ Zt([
3792
+ F({ type: Object })
3793
+ ], qe.prototype, "options", 2);
3794
+ Zt([
3795
+ dt()
3796
+ ], qe.prototype, "isOpen", 2);
3797
+ Zt([
3798
3798
  In("iai-chat")
3799
- ], Ke.prototype, "chatWindow", 2);
3800
- Pt([
3801
- Bs.debounce(250)
3802
- ], Ke.prototype, "onResizeHandler", 2);
3803
- Ke = Pt([
3804
- Me("iai-chat-popup")
3805
- ], Ke);
3806
- const Fs = "https://ai-dev.anyonehome.xyz";
3799
+ ], qe.prototype, "chatWindow", 2);
3800
+ Zt([
3801
+ Fs.debounce(250)
3802
+ ], qe.prototype, "onResizeHandler", 2);
3803
+ qe = Zt([
3804
+ Pe("iai-chat-popup")
3805
+ ], qe);
3806
+ const Vs = "https://ai-dev.anyonehome.xyz";
3807
3807
  async function Hr(s, e = {}) {
3808
- return await (await fetch(`${Fs}/threads`, {
3808
+ return await (await fetch(`${Vs}/threads`, {
3809
3809
  method: "POST",
3810
3810
  headers: {
3811
3811
  "Content-Type": "application/json"
@@ -3814,7 +3814,7 @@ async function Hr(s, e = {}) {
3814
3814
  })).json();
3815
3815
  }
3816
3816
  async function Br(s, e) {
3817
- return await (await fetch(`${Fs}/threads/${s}/messages`, {
3817
+ return await (await fetch(`${Vs}/threads/${s}/messages`, {
3818
3818
  method: "POST",
3819
3819
  headers: {
3820
3820
  "Content-Type": "application/json"
@@ -3823,7 +3823,7 @@ async function Br(s, e) {
3823
3823
  })).json();
3824
3824
  }
3825
3825
  async function Fr(s, e, t, i = !1) {
3826
- return await (await fetch(`${Fs}/threads/${s}/functions/${e}`, {
3826
+ return await (await fetch(`${Vs}/threads/${s}/functions/${e}`, {
3827
3827
  method: "POST",
3828
3828
  headers: {
3829
3829
  "Content-Type": "application/json"
@@ -4033,7 +4033,7 @@ function Kr(s) {
4033
4033
  * Copyright 2021 Google LLC
4034
4034
  * SPDX-License-Identifier: BSD-3-Clause
4035
4035
  */
4036
- function et(s, e, t) {
4036
+ function Ce(s, e, t) {
4037
4037
  return s ? e(s) : t == null ? void 0 : t(s);
4038
4038
  }
4039
4039
  /**
@@ -4041,11 +4041,11 @@ function et(s, e, t) {
4041
4041
  * Copyright 2020 Google LLC
4042
4042
  * SPDX-License-Identifier: BSD-3-Clause
4043
4043
  */
4044
- const { I: Jr } = En, $i = () => document.createComment(""), dt = (s, e, t) => {
4044
+ const { I: Jr } = En, Ei = () => document.createComment(""), ht = (s, e, t) => {
4045
4045
  var i;
4046
4046
  const n = s._$AA.parentNode, r = e === void 0 ? s._$AB : e._$AA;
4047
4047
  if (t === void 0) {
4048
- const a = n.insertBefore($i(), r), o = n.insertBefore($i(), r);
4048
+ const a = n.insertBefore(Ei(), r), o = n.insertBefore(Ei(), r);
4049
4049
  t = new Jr(a, o, s, s.options);
4050
4050
  } else {
4051
4051
  const a = t._$AB.nextSibling, o = t._$AM, c = o !== s;
@@ -4062,7 +4062,7 @@ const { I: Jr } = En, $i = () => document.createComment(""), dt = (s, e, t) => {
4062
4062
  }
4063
4063
  }
4064
4064
  return t;
4065
- }, Re = (s, e, t = s) => (s._$AI(e, t), s), qr = {}, Yr = (s, e = qr) => s._$AH = e, Gr = (s) => s._$AH, As = (s) => {
4065
+ }, Le = (s, e, t = s) => (s._$AI(e, t), s), qr = {}, Yr = (s, e = qr) => s._$AH = e, Gr = (s) => s._$AH, Is = (s) => {
4066
4066
  var e;
4067
4067
  (e = s._$AP) == null || e.call(s, !1, !0);
4068
4068
  let t = s._$AA;
@@ -4077,14 +4077,14 @@ const { I: Jr } = En, $i = () => document.createComment(""), dt = (s, e, t) => {
4077
4077
  * Copyright 2017 Google LLC
4078
4078
  * SPDX-License-Identifier: BSD-3-Clause
4079
4079
  */
4080
- const Ei = (s, e, t) => {
4080
+ const Ci = (s, e, t) => {
4081
4081
  const i = /* @__PURE__ */ new Map();
4082
4082
  for (let n = e; n <= t; n++)
4083
4083
  i.set(s[n], n);
4084
4084
  return i;
4085
- }, Xr = os(class extends cs {
4085
+ }, Xr = ds(class extends ls {
4086
4086
  constructor(s) {
4087
- if (super(s), s.type !== as.CHILD)
4087
+ if (super(s), s.type !== cs.CHILD)
4088
4088
  throw Error("repeat() can only be used in text expressions");
4089
4089
  }
4090
4090
  dt(s, e, t) {
@@ -4111,37 +4111,37 @@ const Ei = (s, e, t) => {
4111
4111
  else if (n[d] === null)
4112
4112
  d--;
4113
4113
  else if (o[p] === a[b])
4114
- c[b] = Re(n[p], r[b]), p++, b++;
4114
+ c[b] = Le(n[p], r[b]), p++, b++;
4115
4115
  else if (o[d] === a[N])
4116
- c[N] = Re(n[d], r[N]), d--, N--;
4116
+ c[N] = Le(n[d], r[N]), d--, N--;
4117
4117
  else if (o[p] === a[N])
4118
- c[N] = Re(n[p], r[N]), dt(s, c[N + 1], n[p]), p++, N--;
4118
+ c[N] = Le(n[p], r[N]), ht(s, c[N + 1], n[p]), p++, N--;
4119
4119
  else if (o[d] === a[b])
4120
- c[b] = Re(n[d], r[b]), dt(s, n[p], n[d]), d--, b++;
4121
- else if (l === void 0 && (l = Ei(a, b, N), h = Ei(o, p, d)), l.has(o[p]))
4120
+ c[b] = Le(n[d], r[b]), ht(s, n[p], n[d]), d--, b++;
4121
+ else if (l === void 0 && (l = Ci(a, b, N), h = Ci(o, p, d)), l.has(o[p]))
4122
4122
  if (l.has(o[d])) {
4123
4123
  const U = h.get(a[b]), G = U !== void 0 ? n[U] : null;
4124
4124
  if (G === null) {
4125
- const pe = dt(s, n[p]);
4126
- Re(pe, r[b]), c[b] = pe;
4125
+ const pe = ht(s, n[p]);
4126
+ Le(pe, r[b]), c[b] = pe;
4127
4127
  } else
4128
- c[b] = Re(G, r[b]), dt(s, n[p], G), n[U] = null;
4128
+ c[b] = Le(G, r[b]), ht(s, n[p], G), n[U] = null;
4129
4129
  b++;
4130
4130
  } else
4131
- As(n[d]), d--;
4131
+ Is(n[d]), d--;
4132
4132
  else
4133
- As(n[p]), p++;
4133
+ Is(n[p]), p++;
4134
4134
  for (; b <= N; ) {
4135
- const U = dt(s, c[N + 1]);
4136
- Re(U, r[b]), c[b++] = U;
4135
+ const U = ht(s, c[N + 1]);
4136
+ Le(U, r[b]), c[b++] = U;
4137
4137
  }
4138
4138
  for (; p <= d; ) {
4139
4139
  const U = n[p++];
4140
- U !== null && As(U);
4140
+ U !== null && Is(U);
4141
4141
  }
4142
4142
  return this.ut = a, Yr(s, c), le;
4143
4143
  }
4144
- }), Ps = z`
4144
+ }), Nt = L`
4145
4145
  <svg
4146
4146
  xmlns="http://www.w3.org/2000/svg"
4147
4147
  viewBox="0 0 24 24"
@@ -4153,7 +4153,7 @@ const Ei = (s, e, t) => {
4153
4153
  <path
4154
4154
  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"/>
4155
4155
  </svg>
4156
- `, Qr = z`
4156
+ `, Qr = L`
4157
4157
  <svg
4158
4158
  xmlns="http://www.w3.org/2000/svg"
4159
4159
  viewBox="0 0 24 24"
@@ -4165,7 +4165,7 @@ const Ei = (s, e, t) => {
4165
4165
  <path
4166
4166
  d="M12,3C17.5,3 22,6.58 22,11C22,15.42 17.5,19 12,19C10.76,19 9.57,18.82 8.47,18.5C5.55,21 2,21 2,21C4.33,18.67 4.7,17.1 4.75,16.5C3.05,15.07 2,13.13 2,11C2,6.58 6.5,3 12,3Z"/>
4167
4167
  </svg>
4168
- `, ea = z`
4168
+ `, ea = L`
4169
4169
  <svg
4170
4170
  xmlns="http://www.w3.org/2000/svg"
4171
4171
  viewBox="0 0 24 24"
@@ -4176,7 +4176,7 @@ const Ei = (s, e, t) => {
4176
4176
  <title>send</title>
4177
4177
  <path d="M2,21L23,12L2,3V10L17,12L2,14V21Z"/>
4178
4178
  </svg>
4179
- `, ta = z`
4179
+ `, ta = L`
4180
4180
  <svg
4181
4181
  xmlns="http://www.w3.org/2000/svg"
4182
4182
  viewBox="0 0 24 24"
@@ -4192,17 +4192,17 @@ var sa = Object.defineProperty, ia = Object.getOwnPropertyDescriptor, ke = (s, e
4192
4192
  for (var n = i > 1 ? void 0 : i ? ia(e, t) : e, r = s.length - 1, a; r >= 0; r--)
4193
4193
  (a = s[r]) && (n = (i ? a(e, t, n) : a(n)) || n);
4194
4194
  return i && n && sa(e, t, n), n;
4195
- }, Qi = (s, e, t) => {
4195
+ }, en = (s, e, t) => {
4196
4196
  if (!e.has(s))
4197
4197
  throw TypeError("Cannot " + t);
4198
- }, Ye = (s, e, t) => (Qi(s, e, "read from private field"), t ? t.call(s) : e.get(s)), Ci = (s, e, t) => {
4198
+ }, Xe = (s, e, t) => (en(s, e, "read from private field"), t ? t.call(s) : e.get(s)), Ai = (s, e, t) => {
4199
4199
  if (e.has(s))
4200
4200
  throw TypeError("Cannot add the same private member more than once");
4201
4201
  e instanceof WeakSet ? e.add(s) : e.set(s, t);
4202
- }, Ai = (s, e, t, i) => (Qi(s, e, "write to private field"), i ? i.call(s, t) : e.set(s, t), t), $e, Dt;
4202
+ }, Oi = (s, e, t, i) => (en(s, e, "write to private field"), i ? i.call(s, t) : e.set(s, t), t), $e, Bt;
4203
4203
  let oe = class extends Q {
4204
4204
  constructor() {
4205
- super(), Ci(this, $e, void 0), Ci(this, Dt, Promise.resolve()), this.disableInput = !1, this.showTyping = !1, this.messages = [], this.inputValue = "", this.internalDisableInput = !1, this.internalShowTyping = !1, this._emitter = Kr(), this._emitter.on("*", (s, e) => this.dispatchEvent(
4205
+ super(), Ai(this, $e, void 0), Ai(this, Bt, Promise.resolve()), this.disableInput = !1, this.showTyping = !1, this.messages = [], this.inputValue = "", this.internalDisableInput = !1, this.internalShowTyping = !1, this._emitter = Kr(), this._emitter.on("*", (s, e) => this.dispatchEvent(
4206
4206
  new CustomEvent(`iai-chat-${s.toString()}`, {
4207
4207
  bubbles: !0,
4208
4208
  // Allow events to be reached through other elements
@@ -4215,20 +4215,20 @@ let oe = class extends Q {
4215
4215
  }
4216
4216
  // Lifecycle Events
4217
4217
  connectedCallback() {
4218
- super.connectedCallback(), this.cleanOptions = ls.parse(this.options || {});
4218
+ super.connectedCallback(), this.cleanOptions = hs.parse(this.options || {});
4219
4219
  const { assistantId: s, params: e, config: t } = this.cleanOptions;
4220
- Ai(this, $e, new Wr(s, {
4220
+ Oi(this, $e, new Wr(s, {
4221
4221
  params: e,
4222
4222
  simulateDelays: !0,
4223
4223
  historyKey: t.historyKey,
4224
4224
  initialReplyMessage: t.initialReplyMessage
4225
- })), this.updateMessages(Ye(this, $e).messages), this.showTyping = Ye(this, $e).isTyping, this.disableInput = Ye(this, $e).inputDisabled, this.chatManager.on("functionCall", ({ id: i, name: n, params: r }) => {
4225
+ })), this.updateMessages(Xe(this, $e).messages), this.showTyping = Xe(this, $e).isTyping, this.disableInput = Xe(this, $e).inputDisabled, this.chatManager.on("functionCall", ({ id: i, name: n, params: r }) => {
4226
4226
  const a = this.cleanOptions.handlers.functionCalls[n];
4227
4227
  if (!a) {
4228
4228
  console.warn(`No function call handler found for ${n}`);
4229
4229
  return;
4230
4230
  }
4231
- a.call(this, { id: i, params: r, html: z, chatWindow: this });
4231
+ a.call(this, { id: i, params: r, html: L, chatWindow: this });
4232
4232
  }), this.chatManager.on("typing", (i) => {
4233
4233
  this.showTyping = i;
4234
4234
  }), this.chatManager.on("inputDisabled", (i) => {
@@ -4242,7 +4242,7 @@ let oe = class extends Q {
4242
4242
  }), this.chatManager.on("*", this._emitter.emit);
4243
4243
  }
4244
4244
  disconnectedCallback() {
4245
- super.disconnectedCallback(), this._emitter.all.clear(), Ye(this, $e).destroy();
4245
+ super.disconnectedCallback(), this._emitter.all.clear(), Xe(this, $e).destroy();
4246
4246
  }
4247
4247
  firstUpdated() {
4248
4248
  this.focusOnInput();
@@ -4252,14 +4252,14 @@ let oe = class extends Q {
4252
4252
  }
4253
4253
  render() {
4254
4254
  const { header: s, showCloseButton: e } = this.cleanOptions.config.chatWindow;
4255
- return z`
4255
+ return L`
4256
4256
  <div class="flex flex-col h-full rounded-lg shadow-lg bg-white">
4257
4257
  <div class="header rounded-t-lg text-lg p-2 flex justify-between items-center">
4258
4258
  <div class="flex flex-row h-full items-center">
4259
- ${et(s.imageSrc, () => z`
4259
+ ${Ce(s.imageSrc, () => L`
4260
4260
  <img src="${s.imageSrc}" alt="Logo" style="max-height: 100%" />
4261
4261
  `)}
4262
- ${et(s.text, () => z`
4262
+ ${Ce(s.text, () => L`
4263
4263
  <span class="text-lg font-semibold ml-2">${s.text}</span>
4264
4264
  `)}
4265
4265
  </div>
@@ -4273,9 +4273,9 @@ let oe = class extends Q {
4273
4273
  ${ta}
4274
4274
  </button>
4275
4275
 
4276
- ${et(e, () => z`
4276
+ ${Ce(e, () => L`
4277
4277
  <button class="mr-2 h-6 focus:outline-none" @click="${this.closeChat}">
4278
- ${Ps}
4278
+ ${Nt}
4279
4279
  </button>
4280
4280
  `)}
4281
4281
  </div>
@@ -4283,7 +4283,7 @@ let oe = class extends Q {
4283
4283
  <div id="chat-container" class="flex-1 overflow-y-auto p-4 flex flex-col gap-2">
4284
4284
  ${this.chatMessage({ id: "intro-message", role: "assistant", content: this.cleanOptions.config.welcomeMessage })}
4285
4285
 
4286
- ${Xr(this.messages, (t) => t.id, (t, i) => z`
4286
+ ${Xr(this.messages, (t) => t.id, (t, i) => L`
4287
4287
  <div>
4288
4288
  ${this.nameLabel(i)}
4289
4289
  ${this.chatMessage(t)}
@@ -4323,7 +4323,7 @@ let oe = class extends Q {
4323
4323
  }
4324
4324
  // Getters
4325
4325
  get chatManager() {
4326
- return Ye(this, $e);
4326
+ return Xe(this, $e);
4327
4327
  }
4328
4328
  resetChat() {
4329
4329
  this.chatManager.reset();
@@ -4359,7 +4359,7 @@ let oe = class extends Q {
4359
4359
  message: this.inputValue
4360
4360
  },
4361
4361
  cancelable: !0
4362
- })) && (await Ye(this, Dt), Ai(this, Dt, this.chatManager.sendUserMessage(this.inputValue))), this.inputValue = "", this.internalDisableInput = !1, setTimeout(() => {
4362
+ })) && (await Xe(this, Bt), Oi(this, Bt, this.chatManager.sendUserMessage(this.inputValue))), this.inputValue = "", this.internalDisableInput = !1, setTimeout(() => {
4363
4363
  this.focusOnInput();
4364
4364
  }, 0));
4365
4365
  }
@@ -4381,28 +4381,28 @@ let oe = class extends Q {
4381
4381
  if (e.role !== "assistant")
4382
4382
  return null;
4383
4383
  const t = e.name || "Assistant", i = this.messages[s - 1];
4384
- return ((i == null ? void 0 : i.name) || "Assistant") === t ? null : z`
4384
+ return ((i == null ? void 0 : i.name) || "Assistant") === t ? null : L`
4385
4385
  <div class="name text-sm">${e.name || "Assistant"}</div>
4386
4386
  `;
4387
4387
  }
4388
4388
  chatMessage(s) {
4389
4389
  switch (s.role) {
4390
4390
  case "assistant":
4391
- return z`
4391
+ return L`
4392
4392
  <iai-chat-message-assistant
4393
4393
  id="message-${s.id}"
4394
4394
  .content="${s.content}"
4395
4395
  ></iai-chat-message-assistant>
4396
4396
  `;
4397
4397
  case "user":
4398
- return z`
4398
+ return L`
4399
4399
  <iai-chat-message-user
4400
4400
  id="message-${s.id}"
4401
4401
  .content="${s.content}"
4402
4402
  ></iai-chat-message-user>
4403
4403
  `;
4404
4404
  case "system":
4405
- return z`
4405
+ return L`
4406
4406
  <iai-chat-message-system
4407
4407
  id="message-${s.id}"
4408
4408
  .content="${s.content}"
@@ -4420,8 +4420,8 @@ let oe = class extends Q {
4420
4420
  }
4421
4421
  };
4422
4422
  $e = /* @__PURE__ */ new WeakMap();
4423
- Dt = /* @__PURE__ */ new WeakMap();
4424
- oe.styles = [Ie, rt`
4423
+ Bt = /* @__PURE__ */ new WeakMap();
4424
+ oe.styles = [Ne, ot`
4425
4425
  .header {
4426
4426
  background-color: var(--iai-chat-i-header-bg);
4427
4427
  color: var(--iai-chat-i-header-fg);
@@ -4439,33 +4439,33 @@ oe.styles = [Ie, rt`
4439
4439
  }
4440
4440
  `];
4441
4441
  ke([
4442
- J({ type: Object })
4442
+ F({ type: Object })
4443
4443
  ], oe.prototype, "options", 2);
4444
4444
  ke([
4445
- J()
4445
+ F()
4446
4446
  ], oe.prototype, "disableInput", 2);
4447
4447
  ke([
4448
- J()
4448
+ F()
4449
4449
  ], oe.prototype, "showTyping", 2);
4450
4450
  ke([
4451
- ot()
4451
+ dt()
4452
4452
  ], oe.prototype, "messages", 2);
4453
4453
  ke([
4454
- ot()
4454
+ dt()
4455
4455
  ], oe.prototype, "inputValue", 2);
4456
4456
  ke([
4457
- ot()
4457
+ dt()
4458
4458
  ], oe.prototype, "internalDisableInput", 2);
4459
4459
  ke([
4460
- ot()
4460
+ dt()
4461
4461
  ], oe.prototype, "internalShowTyping", 2);
4462
4462
  ke([
4463
- Bs.debounce(1)
4463
+ Fs.debounce(1)
4464
4464
  ], oe.prototype, "scrollChatToBottom", 1);
4465
4465
  oe = ke([
4466
- Me("iai-chat")
4466
+ Pe("iai-chat")
4467
4467
  ], oe);
4468
- var en = { exports: {} };
4468
+ var tn = { exports: {} };
4469
4469
  (function(s) {
4470
4470
  (function(e) {
4471
4471
  if (typeof window > "u")
@@ -4539,37 +4539,37 @@ var en = { exports: {} };
4539
4539
  var y = "Host page: " + u;
4540
4540
  return window.top !== window.self && (y = window.parentIFrame && window.parentIFrame.getId ? window.parentIFrame.getId() + ": " + u : "Nested host page: " + u), y;
4541
4541
  }
4542
- function qe(u) {
4542
+ function Ge(u) {
4543
4543
  return o + "[" + X(u) + "]";
4544
4544
  }
4545
4545
  function fe(u) {
4546
4546
  return d[u] ? d[u].log : i;
4547
4547
  }
4548
4548
  function O(u, y) {
4549
- hs("log", u, y, fe(u));
4549
+ ms("log", u, y, fe(u));
4550
4550
  }
4551
- function Ws(u, y) {
4552
- hs("info", u, y, fe(u));
4551
+ function Ks(u, y) {
4552
+ ms("info", u, y, fe(u));
4553
4553
  }
4554
4554
  function ee(u, y) {
4555
- hs("warn", u, y, !0);
4555
+ ms("warn", u, y, !0);
4556
4556
  }
4557
- function hs(u, y, M, x) {
4558
- x === !0 && typeof window.console == "object" && console[u](qe(y), M);
4557
+ function ms(u, y, M, x) {
4558
+ x === !0 && typeof window.console == "object" && console[u](Ge(y), M);
4559
4559
  }
4560
4560
  function dn(u) {
4561
4561
  function y() {
4562
4562
  function v() {
4563
- Xs(R), qs($), Pe("onResized", R);
4563
+ Qs(R), Ys($), Re("onResized", R);
4564
4564
  }
4565
- Z("Height"), Z("Width"), Qs(v, R, "init");
4565
+ Z("Height"), Z("Width"), ei(v, R, "init");
4566
4566
  }
4567
4567
  function M() {
4568
- var v = se.slice(c).split(":"), C = v[1] ? parseInt(v[1], 10) : 0, L = d[v[0]] && d[v[0]].iframe, D = getComputedStyle(L);
4568
+ var v = se.slice(c).split(":"), C = v[1] ? parseInt(v[1], 10) : 0, D = d[v[0]] && d[v[0]].iframe, z = getComputedStyle(D);
4569
4569
  return {
4570
- iframe: L,
4570
+ iframe: D,
4571
4571
  id: v[0],
4572
- height: C + x(D) + P(D),
4572
+ height: C + x(z) + P(z),
4573
4573
  width: v[2],
4574
4574
  type: v[3]
4575
4575
  };
@@ -4577,47 +4577,47 @@ var en = { exports: {} };
4577
4577
  function x(v) {
4578
4578
  if (v.boxSizing !== "border-box")
4579
4579
  return 0;
4580
- var C = v.paddingTop ? parseInt(v.paddingTop, 10) : 0, L = v.paddingBottom ? parseInt(v.paddingBottom, 10) : 0;
4581
- return C + L;
4580
+ var C = v.paddingTop ? parseInt(v.paddingTop, 10) : 0, D = v.paddingBottom ? parseInt(v.paddingBottom, 10) : 0;
4581
+ return C + D;
4582
4582
  }
4583
4583
  function P(v) {
4584
4584
  if (v.boxSizing !== "border-box")
4585
4585
  return 0;
4586
- var C = v.borderTopWidth ? parseInt(v.borderTopWidth, 10) : 0, L = v.borderBottomWidth ? parseInt(v.borderBottomWidth, 10) : 0;
4587
- return C + L;
4586
+ var C = v.borderTopWidth ? parseInt(v.borderTopWidth, 10) : 0, D = v.borderBottomWidth ? parseInt(v.borderBottomWidth, 10) : 0;
4587
+ return C + D;
4588
4588
  }
4589
4589
  function Z(v) {
4590
- var C = Number(d[$]["max" + v]), L = Number(d[$]["min" + v]), D = v.toLowerCase(), V = Number(R[D]);
4591
- O($, "Checking " + D + " is in range " + L + "-" + C), V < L && (V = L, O($, "Set " + D + " to min value")), V > C && (V = C, O($, "Set " + D + " to max value")), R[D] = "" + V;
4590
+ var C = Number(d[$]["max" + v]), D = Number(d[$]["min" + v]), z = v.toLowerCase(), W = Number(R[z]);
4591
+ O($, "Checking " + z + " is in range " + D + "-" + C), W < D && (W = D, O($, "Set " + z + " to min value")), W > C && (W = C, O($, "Set " + z + " to max value")), R[z] = "" + W;
4592
4592
  }
4593
4593
  function de() {
4594
4594
  function v() {
4595
- function D() {
4595
+ function z() {
4596
4596
  var q = 0, ve = !1;
4597
4597
  for (O(
4598
4598
  $,
4599
- "Checking connection is from allowed list of origins: " + L
4600
- ); q < L.length; q++)
4601
- if (L[q] === C) {
4599
+ "Checking connection is from allowed list of origins: " + D
4600
+ ); q < D.length; q++)
4601
+ if (D[q] === C) {
4602
4602
  ve = !0;
4603
4603
  break;
4604
4604
  }
4605
4605
  return ve;
4606
4606
  }
4607
- function V() {
4607
+ function W() {
4608
4608
  var q = d[$] && d[$].remoteHost;
4609
4609
  return O($, "Checking connection is from: " + q), C === q;
4610
4610
  }
4611
- return L.constructor === Array ? D() : V();
4611
+ return D.constructor === Array ? z() : W();
4612
4612
  }
4613
- var C = u.origin, L = d[$] && d[$].checkOrigin;
4614
- if (L && "" + C != "null" && !v())
4613
+ var C = u.origin, D = d[$] && d[$].checkOrigin;
4614
+ if (D && "" + C != "null" && !v())
4615
4615
  throw new Error(
4616
4616
  "Unexpected message received from: " + C + " for " + R.iframe.id + ". Message was: " + u.data + ". This error can be disabled by setting the checkOrigin: false option or by providing of array of trusted domains."
4617
4617
  );
4618
4618
  return !0;
4619
4619
  }
4620
- function Ne() {
4620
+ function je() {
4621
4621
  return o === ("" + se).slice(0, c) && se.slice(c).split(":")[0] in d;
4622
4622
  }
4623
4623
  function ge() {
@@ -4627,16 +4627,16 @@ var en = { exports: {} };
4627
4627
  function ye(v) {
4628
4628
  return se.slice(se.indexOf(":") + a + v);
4629
4629
  }
4630
- function Te(v) {
4630
+ function Se(v) {
4631
4631
  O(
4632
4632
  $,
4633
4633
  "onMessage passed: {iframe: " + R.iframe.id + ", message: " + v + "}"
4634
- ), Pe("onMessage", {
4634
+ ), Re("onMessage", {
4635
4635
  iframe: R.iframe,
4636
4636
  message: JSON.parse(v)
4637
4637
  }), O($, "--");
4638
4638
  }
4639
- function vs() {
4639
+ function ws() {
4640
4640
  var v = document.body.getBoundingClientRect(), C = R.iframe.getBoundingClientRect();
4641
4641
  return JSON.stringify({
4642
4642
  iframeHeight: C.height,
@@ -4659,55 +4659,55 @@ var en = { exports: {} };
4659
4659
  windowWidth: window.innerWidth
4660
4660
  });
4661
4661
  }
4662
- function Rt(v, C) {
4663
- function L() {
4664
- ce("Send Page Info", "pageInfo:" + vs(), v, C);
4662
+ function Dt(v, C) {
4663
+ function D() {
4664
+ ce("Send Page Info", "pageInfo:" + ws(), v, C);
4665
4665
  }
4666
- un(L, 32, C);
4666
+ un(D, 32, C);
4667
4667
  }
4668
- function bs() {
4669
- function v(V, q) {
4668
+ function _s() {
4669
+ function v(W, q) {
4670
4670
  function ve() {
4671
- d[D] ? Rt(d[D].iframe, D) : C();
4671
+ d[z] ? Dt(d[z].iframe, z) : C();
4672
4672
  }
4673
- ["scroll", "resize"].forEach(function(ni) {
4674
- O(D, V + ni + " listener for sendPageInfo"), q(window, ni, ve);
4673
+ ["scroll", "resize"].forEach(function(ri) {
4674
+ O(z, W + ri + " listener for sendPageInfo"), q(window, ri, ve);
4675
4675
  });
4676
4676
  }
4677
4677
  function C() {
4678
4678
  v("Remove ", pe);
4679
4679
  }
4680
- function L() {
4680
+ function D() {
4681
4681
  v("Add ", G);
4682
4682
  }
4683
- var D = $;
4684
- L(), d[D] && (d[D].stopPageInfo = C);
4683
+ var z = $;
4684
+ D(), d[z] && (d[z].stopPageInfo = C);
4685
4685
  }
4686
- function ws() {
4686
+ function xs() {
4687
4687
  d[$] && d[$].stopPageInfo && (d[$].stopPageInfo(), delete d[$].stopPageInfo);
4688
4688
  }
4689
- function _s() {
4689
+ function ks() {
4690
4690
  var v = !0;
4691
4691
  return R.iframe === null && (ee($, "IFrame (" + R.id + ") not found"), v = !1), v;
4692
4692
  }
4693
4693
  function k(v) {
4694
4694
  var C = v.getBoundingClientRect();
4695
- return Js($), {
4695
+ return qs($), {
4696
4696
  x: Math.floor(Number(C.left) + Number(l.x)),
4697
4697
  y: Math.floor(Number(C.top) + Number(l.y))
4698
4698
  };
4699
4699
  }
4700
- function T(v) {
4700
+ function S(v) {
4701
4701
  function C() {
4702
- l = q, F(), O($, "--");
4702
+ l = q, V(), O($, "--");
4703
4703
  }
4704
- function L() {
4704
+ function D() {
4705
4705
  return {
4706
- x: Number(R.width) + V.x,
4707
- y: Number(R.height) + V.y
4706
+ x: Number(R.width) + W.x,
4707
+ y: Number(R.height) + W.y
4708
4708
  };
4709
4709
  }
4710
- function D() {
4710
+ function z() {
4711
4711
  window.parentIFrame ? window.parentIFrame["scrollTo" + (v ? "Offset" : "")](
4712
4712
  q.x,
4713
4713
  q.y
@@ -4716,66 +4716,66 @@ var en = { exports: {} };
4716
4716
  "Unable to scroll to requested position, window.parentIFrame not found"
4717
4717
  );
4718
4718
  }
4719
- var V = v ? k(R.iframe) : { x: 0, y: 0 }, q = L();
4719
+ var W = v ? k(R.iframe) : { x: 0, y: 0 }, q = D();
4720
4720
  O(
4721
4721
  $,
4722
- "Reposition requested from iFrame (offset x:" + V.x + " y:" + V.y + ")"
4723
- ), window.top === window.self ? C() : D();
4722
+ "Reposition requested from iFrame (offset x:" + W.x + " y:" + W.y + ")"
4723
+ ), window.top === window.self ? C() : z();
4724
4724
  }
4725
- function F() {
4726
- Pe("onScroll", l) === !1 ? Ys() : qs($);
4725
+ function V() {
4726
+ Re("onScroll", l) === !1 ? Gs() : Ys($);
4727
4727
  }
4728
- function W(v) {
4728
+ function K(v) {
4729
4729
  function C() {
4730
4730
  var ve = k(q);
4731
4731
  O(
4732
4732
  $,
4733
- "Moving to in page link (#" + D + ") at x: " + ve.x + " y: " + ve.y
4733
+ "Moving to in page link (#" + z + ") at x: " + ve.x + " y: " + ve.y
4734
4734
  ), l = {
4735
4735
  x: ve.x,
4736
4736
  y: ve.y
4737
- }, F(), O($, "--");
4737
+ }, V(), O($, "--");
4738
4738
  }
4739
- function L() {
4740
- window.parentIFrame ? window.parentIFrame.moveToAnchor(D) : O(
4739
+ function D() {
4740
+ window.parentIFrame ? window.parentIFrame.moveToAnchor(z) : O(
4741
4741
  $,
4742
- "In page link #" + D + " not found and window.parentIFrame not found"
4742
+ "In page link #" + z + " not found and window.parentIFrame not found"
4743
4743
  );
4744
4744
  }
4745
- var D = v.split("#")[1] || "", V = decodeURIComponent(D), q = document.getElementById(V) || document.getElementsByName(V)[0];
4746
- q ? C() : window.top === window.self ? O($, "In page link #" + D + " not found") : L();
4745
+ var z = v.split("#")[1] || "", W = decodeURIComponent(z), q = document.getElementById(W) || document.getElementsByName(W)[0];
4746
+ q ? C() : window.top === window.self ? O($, "In page link #" + z + " not found") : D();
4747
4747
  }
4748
4748
  function te(v) {
4749
4749
  var C = {};
4750
4750
  if (Number(R.width) === 0 && Number(R.height) === 0) {
4751
- var L = ye(9).split(":");
4751
+ var D = ye(9).split(":");
4752
4752
  C = {
4753
- x: L[1],
4754
- y: L[0]
4753
+ x: D[1],
4754
+ y: D[0]
4755
4755
  };
4756
4756
  } else
4757
4757
  C = {
4758
4758
  x: R.width,
4759
4759
  y: R.height
4760
4760
  };
4761
- Pe(v, {
4761
+ Re(v, {
4762
4762
  iframe: R.iframe,
4763
4763
  screenX: Number(C.x),
4764
4764
  screenY: Number(C.y),
4765
4765
  type: R.type
4766
4766
  });
4767
4767
  }
4768
- function Pe(v, C) {
4769
- return ps($, v, C);
4768
+ function Re(v, C) {
4769
+ return fs($, v, C);
4770
4770
  }
4771
- function xs() {
4772
- switch (d[$] && d[$].firstRun && Ss(), R.type) {
4771
+ function Ss() {
4772
+ switch (d[$] && d[$].firstRun && Es(), R.type) {
4773
4773
  case "close": {
4774
- ms(R.iframe);
4774
+ gs(R.iframe);
4775
4775
  break;
4776
4776
  }
4777
4777
  case "message": {
4778
- Te(ye(6));
4778
+ Se(ye(6));
4779
4779
  break;
4780
4780
  }
4781
4781
  case "mouseenter": {
@@ -4791,34 +4791,34 @@ var en = { exports: {} };
4791
4791
  break;
4792
4792
  }
4793
4793
  case "scrollTo": {
4794
- T(!1);
4794
+ S(!1);
4795
4795
  break;
4796
4796
  }
4797
4797
  case "scrollToOffset": {
4798
- T(!0);
4798
+ S(!0);
4799
4799
  break;
4800
4800
  }
4801
4801
  case "pageInfo": {
4802
- Rt(
4802
+ Dt(
4803
4803
  d[$] && d[$].iframe,
4804
4804
  $
4805
- ), bs();
4805
+ ), _s();
4806
4806
  break;
4807
4807
  }
4808
4808
  case "pageInfoStop": {
4809
- ws();
4809
+ xs();
4810
4810
  break;
4811
4811
  }
4812
4812
  case "inPageLink": {
4813
- W(ye(9));
4813
+ K(ye(9));
4814
4814
  break;
4815
4815
  }
4816
4816
  case "reset": {
4817
- Gs(R);
4817
+ Xs(R);
4818
4818
  break;
4819
4819
  }
4820
4820
  case "init": {
4821
- y(), Pe("onInit", R.iframe);
4821
+ y(), Re("onInit", R.iframe);
4822
4822
  break;
4823
4823
  }
4824
4824
  default:
@@ -4827,28 +4827,28 @@ var en = { exports: {} };
4827
4827
  ) : y();
4828
4828
  }
4829
4829
  }
4830
- function ks(v) {
4830
+ function Ts(v) {
4831
4831
  var C = !0;
4832
4832
  return d[v] || (C = !1, ee(
4833
4833
  R.type + " No settings for " + v + ". Message was: " + se
4834
4834
  )), C;
4835
4835
  }
4836
- function Ts() {
4836
+ function $s() {
4837
4837
  for (var v in d)
4838
4838
  ce(
4839
4839
  "iFrame requested init",
4840
- ei(v),
4840
+ ti(v),
4841
4841
  d[v].iframe,
4842
4842
  v
4843
4843
  );
4844
4844
  }
4845
- function Ss() {
4845
+ function Es() {
4846
4846
  d[$] && (d[$].firstRun = !1);
4847
4847
  }
4848
4848
  var se = u.data, R = {}, $ = null;
4849
- se === "[iFrameResizerChild]Ready" ? Ts() : Ne() ? (R = M(), $ = R.id, d[$] && (d[$].loaded = !0), !ge() && ks($) && (O($, "Received: " + se), _s() && de() && xs())) : Ws($, "Ignored: " + se);
4849
+ se === "[iFrameResizerChild]Ready" ? $s() : je() ? (R = M(), $ = R.id, d[$] && (d[$].loaded = !0), !ge() && Ts($) && (O($, "Received: " + se), ks() && de() && Ss())) : Ks($, "Ignored: " + se);
4850
4850
  }
4851
- function ps(u, y, M) {
4851
+ function fs(u, y, M) {
4852
4852
  var x = null, P = null;
4853
4853
  if (d[u])
4854
4854
  if (x = d[u][y], typeof x == "function")
@@ -4859,13 +4859,13 @@ var en = { exports: {} };
4859
4859
  );
4860
4860
  return P;
4861
4861
  }
4862
- function Ks(u) {
4862
+ function Js(u) {
4863
4863
  var y = u.id;
4864
4864
  delete d[y];
4865
4865
  }
4866
- function ms(u) {
4866
+ function gs(u) {
4867
4867
  var y = u.id;
4868
- if (ps(y, "onClose", y) === !1) {
4868
+ if (fs(y, "onClose", y) === !1) {
4869
4869
  O(y, "Close iframe cancelled by onClose event");
4870
4870
  return;
4871
4871
  }
@@ -4875,9 +4875,9 @@ var en = { exports: {} };
4875
4875
  } catch (M) {
4876
4876
  ee(M);
4877
4877
  }
4878
- ps(y, "onClosed", y), O(y, "--"), Ks(u);
4878
+ fs(y, "onClosed", y), O(y, "--"), Js(u);
4879
4879
  }
4880
- function Js(u) {
4880
+ function qs(u) {
4881
4881
  l === null && (l = {
4882
4882
  x: window.pageXOffset === e ? document.documentElement.scrollLeft : window.pageXOffset,
4883
4883
  y: window.pageYOffset === e ? document.documentElement.scrollTop : window.pageYOffset
@@ -4886,25 +4886,25 @@ var en = { exports: {} };
4886
4886
  "Get page position: " + l.x + "," + l.y
4887
4887
  ));
4888
4888
  }
4889
- function qs(u) {
4889
+ function Ys(u) {
4890
4890
  l !== null && (window.scrollTo(l.x, l.y), O(
4891
4891
  u,
4892
4892
  "Set page position: " + l.x + "," + l.y
4893
- ), Ys());
4893
+ ), Gs());
4894
4894
  }
4895
- function Ys() {
4895
+ function Gs() {
4896
4896
  l = null;
4897
4897
  }
4898
- function Gs(u) {
4898
+ function Xs(u) {
4899
4899
  function y() {
4900
- Xs(u), ce("reset", "reset", u.iframe, u.id);
4900
+ Qs(u), ce("reset", "reset", u.iframe, u.id);
4901
4901
  }
4902
4902
  O(
4903
4903
  u.id,
4904
4904
  "Size reset requested by " + (u.type === "init" ? "host page" : "iFrame")
4905
- ), Js(u.id), Qs(y, u, "reset");
4905
+ ), qs(u.id), ei(y, u, "reset");
4906
4906
  }
4907
- function Xs(u) {
4907
+ function Qs(u) {
4908
4908
  function y(Z) {
4909
4909
  if (!u.id) {
4910
4910
  O("undefined", "messageData id not set");
@@ -4924,70 +4924,70 @@ var en = { exports: {} };
4924
4924
  var P = u.iframe.id;
4925
4925
  d[P] && (d[P].sizeHeight && x("height"), d[P].sizeWidth && x("width"));
4926
4926
  }
4927
- function Qs(u, y, M) {
4927
+ function ei(u, y, M) {
4928
4928
  M !== y.type && h && // including check for jasmine because had trouble getting spy to work in unit test using requestAnimationFrame
4929
4929
  !window.jasmine ? (O(y.id, "Requesting animation frame"), h(u)) : u();
4930
4930
  }
4931
4931
  function ce(u, y, M, x, P) {
4932
4932
  function Z() {
4933
- var Te = d[x] && d[x].targetOrigin;
4933
+ var Se = d[x] && d[x].targetOrigin;
4934
4934
  O(
4935
4935
  x,
4936
- "[" + u + "] Sending msg to iframe[" + x + "] (" + y + ") targetOrigin: " + Te
4937
- ), M.contentWindow.postMessage(o + y, Te);
4936
+ "[" + u + "] Sending msg to iframe[" + x + "] (" + y + ") targetOrigin: " + Se
4937
+ ), M.contentWindow.postMessage(o + y, Se);
4938
4938
  }
4939
4939
  function de() {
4940
4940
  ee(x, "[" + u + "] IFrame(" + x + ") not found");
4941
4941
  }
4942
- function Ne() {
4942
+ function je() {
4943
4943
  M && "contentWindow" in M && M.contentWindow !== null ? Z() : de();
4944
4944
  }
4945
4945
  function ge() {
4946
- function Te() {
4946
+ function Se() {
4947
4947
  d[x] && !d[x].loaded && !ye && (ye = !0, ee(
4948
4948
  x,
4949
4949
  "IFrame has not responded within " + d[x].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."
4950
4950
  ));
4951
4951
  }
4952
4952
  P && d[x] && d[x].warningTimeout && (d[x].msgTimeout = setTimeout(
4953
- Te,
4953
+ Se,
4954
4954
  d[x].warningTimeout
4955
4955
  ));
4956
4956
  }
4957
4957
  var ye = !1;
4958
- x = x || M.id, d[x] && (Ne(), ge());
4958
+ x = x || M.id, d[x] && (je(), ge());
4959
4959
  }
4960
- function ei(u) {
4960
+ function ti(u) {
4961
4961
  return u + ":" + d[u].bodyMarginV1 + ":" + d[u].sizeWidth + ":" + d[u].log + ":" + d[u].interval + ":" + d[u].enablePublicMethods + ":" + d[u].autoResize + ":" + d[u].bodyMargin + ":" + d[u].heightCalculationMethod + ":" + d[u].bodyBackground + ":" + d[u].bodyPadding + ":" + d[u].tolerance + ":" + d[u].inPageLinks + ":" + d[u].resizeFrom + ":" + d[u].widthCalculationMethod + ":" + d[u].mouseEvents;
4962
4962
  }
4963
4963
  function ln(u) {
4964
4964
  return typeof u == "number";
4965
4965
  }
4966
- function ti(u, y) {
4966
+ function si(u, y) {
4967
4967
  function M() {
4968
- function T(W) {
4969
- var te = d[k][W];
4970
- te !== 1 / 0 && te !== 0 && (u.style[W] = ln(te) ? te + "px" : te, O(k, "Set " + W + " = " + u.style[W]));
4968
+ function S(K) {
4969
+ var te = d[k][K];
4970
+ te !== 1 / 0 && te !== 0 && (u.style[K] = ln(te) ? te + "px" : te, O(k, "Set " + K + " = " + u.style[K]));
4971
4971
  }
4972
- function F(W) {
4973
- if (d[k]["min" + W] > d[k]["max" + W])
4972
+ function V(K) {
4973
+ if (d[k]["min" + K] > d[k]["max" + K])
4974
4974
  throw new Error(
4975
- "Value for min" + W + " can not be greater than max" + W
4975
+ "Value for min" + K + " can not be greater than max" + K
4976
4976
  );
4977
4977
  }
4978
- F("Height"), F("Width"), T("maxHeight"), T("minHeight"), T("maxWidth"), T("minWidth");
4978
+ V("Height"), V("Width"), S("maxHeight"), S("minHeight"), S("maxWidth"), S("minWidth");
4979
4979
  }
4980
4980
  function x() {
4981
- var T = y && y.id || N.id + t++;
4982
- return document.getElementById(T) !== null && (T += t++), T;
4981
+ var S = y && y.id || N.id + t++;
4982
+ return document.getElementById(S) !== null && (S += t++), S;
4983
4983
  }
4984
- function P(T) {
4985
- if (typeof T != "string")
4984
+ function P(S) {
4985
+ if (typeof S != "string")
4986
4986
  throw new TypeError("Invaild id for iFrame. Expected String");
4987
- return T === "" && (u.id = T = x(), i = (y || {}).log, O(
4988
- T,
4989
- "Added missing iframe ID: " + T + " (" + u.src + ")"
4990
- )), T;
4987
+ return S === "" && (u.id = S = x(), i = (y || {}).log, O(
4988
+ S,
4989
+ "Added missing iframe ID: " + S + " (" + u.src + ")"
4990
+ )), S;
4991
4991
  }
4992
4992
  function Z() {
4993
4993
  switch (O(
@@ -5011,14 +5011,14 @@ var en = { exports: {} };
5011
5011
  function de() {
5012
5012
  (typeof (d[k] && d[k].bodyMargin) == "number" || (d[k] && d[k].bodyMargin) === "0") && (d[k].bodyMarginV1 = d[k].bodyMargin, d[k].bodyMargin = "" + d[k].bodyMargin + "px");
5013
5013
  }
5014
- function Ne() {
5015
- var T = d[k] && d[k].firstRun, F = d[k] && d[k].heightCalculationMethod in p;
5016
- !T && F && Gs({ iframe: u, height: 0, width: 0, type: "init" });
5014
+ function je() {
5015
+ var S = d[k] && d[k].firstRun, V = d[k] && d[k].heightCalculationMethod in p;
5016
+ !S && V && Xs({ iframe: u, height: 0, width: 0, type: "init" });
5017
5017
  }
5018
5018
  function ge() {
5019
5019
  d[k] && (d[k].iframe.iFrameResizer = {
5020
- close: ms.bind(null, d[k].iframe),
5021
- removeListeners: Ks.bind(
5020
+ close: gs.bind(null, d[k].iframe),
5021
+ removeListeners: Js.bind(
5022
5022
  null,
5023
5023
  d[k].iframe
5024
5024
  ),
@@ -5028,88 +5028,88 @@ var en = { exports: {} };
5028
5028
  "resize",
5029
5029
  d[k].iframe
5030
5030
  ),
5031
- moveToAnchor: function(T) {
5031
+ moveToAnchor: function(S) {
5032
5032
  ce(
5033
5033
  "Move to anchor",
5034
- "moveToAnchor:" + T,
5034
+ "moveToAnchor:" + S,
5035
5035
  d[k].iframe,
5036
5036
  k
5037
5037
  );
5038
5038
  },
5039
- sendMessage: function(T) {
5040
- T = JSON.stringify(T), ce(
5039
+ sendMessage: function(S) {
5040
+ S = JSON.stringify(S), ce(
5041
5041
  "Send Message",
5042
- "message:" + T,
5042
+ "message:" + S,
5043
5043
  d[k].iframe,
5044
5044
  k
5045
5045
  );
5046
5046
  }
5047
5047
  });
5048
5048
  }
5049
- function ye(T) {
5050
- function F() {
5051
- ce("iFrame.onload", T, u, e, !0), Ne();
5049
+ function ye(S) {
5050
+ function V() {
5051
+ ce("iFrame.onload", S, u, e, !0), je();
5052
5052
  }
5053
- function W(Pe) {
5053
+ function K(Re) {
5054
5054
  if (u.parentNode) {
5055
- var xs = new Pe(function(ks) {
5056
- ks.forEach(function(Ts) {
5057
- var Ss = Array.prototype.slice.call(Ts.removedNodes);
5058
- Ss.forEach(function(se) {
5059
- se === u && ms(u);
5055
+ var Ss = new Re(function(Ts) {
5056
+ Ts.forEach(function($s) {
5057
+ var Es = Array.prototype.slice.call($s.removedNodes);
5058
+ Es.forEach(function(se) {
5059
+ se === u && gs(u);
5060
5060
  });
5061
5061
  });
5062
5062
  });
5063
- xs.observe(u.parentNode, {
5063
+ Ss.observe(u.parentNode, {
5064
5064
  childList: !0
5065
5065
  });
5066
5066
  }
5067
5067
  }
5068
5068
  var te = U();
5069
- te && W(te), G(u, "load", F), ce("init", T, u, e, !0);
5069
+ te && K(te), G(u, "load", V), ce("init", S, u, e, !0);
5070
5070
  }
5071
- function Te(T) {
5072
- if (typeof T != "object")
5071
+ function Se(S) {
5072
+ if (typeof S != "object")
5073
5073
  throw new TypeError("Options is not an object");
5074
5074
  }
5075
- function vs(T) {
5076
- for (var F in N)
5077
- Object.prototype.hasOwnProperty.call(N, F) && (d[k][F] = Object.prototype.hasOwnProperty.call(
5078
- T,
5079
- F
5080
- ) ? T[F] : N[F]);
5075
+ function ws(S) {
5076
+ for (var V in N)
5077
+ Object.prototype.hasOwnProperty.call(N, V) && (d[k][V] = Object.prototype.hasOwnProperty.call(
5078
+ S,
5079
+ V
5080
+ ) ? S[V] : N[V]);
5081
5081
  }
5082
- function Rt(T) {
5083
- return T === "" || T.match(/^(about:blank|javascript:|file:\/\/)/) !== null ? "*" : T;
5082
+ function Dt(S) {
5083
+ return S === "" || S.match(/^(about:blank|javascript:|file:\/\/)/) !== null ? "*" : S;
5084
5084
  }
5085
- function bs(T) {
5086
- var F = T.split("Callback");
5087
- if (F.length === 2) {
5088
- var W = "on" + F[0].charAt(0).toUpperCase() + F[0].slice(1);
5089
- this[W] = this[T], delete this[T], ee(
5085
+ function _s(S) {
5086
+ var V = S.split("Callback");
5087
+ if (V.length === 2) {
5088
+ var K = "on" + V[0].charAt(0).toUpperCase() + V[0].slice(1);
5089
+ this[K] = this[S], delete this[S], ee(
5090
5090
  k,
5091
- "Deprecated: '" + T + "' has been renamed '" + W + "'. The old method will be removed in the next major version."
5091
+ "Deprecated: '" + S + "' has been renamed '" + K + "'. The old method will be removed in the next major version."
5092
5092
  );
5093
5093
  }
5094
5094
  }
5095
- function ws(T) {
5096
- T = T || {}, d[k] = /* @__PURE__ */ Object.create(null), d[k].iframe = u, d[k].firstRun = !0, d[k].remoteHost = u.src && u.src.split("/").slice(0, 3).join("/"), Te(T), Object.keys(T).forEach(bs, T), vs(T), d[k] && (d[k].targetOrigin = d[k].checkOrigin === !0 ? Rt(d[k].remoteHost) : "*");
5095
+ function xs(S) {
5096
+ S = S || {}, d[k] = /* @__PURE__ */ Object.create(null), d[k].iframe = u, d[k].firstRun = !0, d[k].remoteHost = u.src && u.src.split("/").slice(0, 3).join("/"), Se(S), Object.keys(S).forEach(_s, S), ws(S), d[k] && (d[k].targetOrigin = d[k].checkOrigin === !0 ? Dt(d[k].remoteHost) : "*");
5097
5097
  }
5098
- function _s() {
5098
+ function ks() {
5099
5099
  return k in d && "iFrameResizer" in u;
5100
5100
  }
5101
5101
  var k = P(u.id);
5102
- _s() ? ee(k, "Ignored iFrame, already setup.") : (ws(y), Z(), M(), de(), ye(ei(k)), ge());
5102
+ ks() ? ee(k, "Ignored iFrame, already setup.") : (xs(y), Z(), M(), de(), ye(ti(k)), ge());
5103
5103
  }
5104
- function fs(u, y) {
5104
+ function ys(u, y) {
5105
5105
  b === null && (b = setTimeout(function() {
5106
5106
  b = null, u();
5107
5107
  }, y));
5108
5108
  }
5109
- var gs = {};
5109
+ var vs = {};
5110
5110
  function un(u, y, M) {
5111
- gs[M] || (gs[M] = setTimeout(function() {
5112
- gs[M] = null, u();
5111
+ vs[M] || (vs[M] = setTimeout(function() {
5112
+ vs[M] = null, u();
5113
5113
  }, y));
5114
5114
  }
5115
5115
  function hn() {
@@ -5118,10 +5118,10 @@ var en = { exports: {} };
5118
5118
  function de(ge) {
5119
5119
  return (d[Z] && d[Z].iframe.style[ge]) === "0px";
5120
5120
  }
5121
- function Ne(ge) {
5121
+ function je(ge) {
5122
5122
  return ge.offsetParent !== null;
5123
5123
  }
5124
- d[Z] && Ne(d[Z].iframe) && (de("height") || de("width")) && ce(
5124
+ d[Z] && je(d[Z].iframe) && (de("height") || de("width")) && ce(
5125
5125
  "Visibility change",
5126
5126
  "resize",
5127
5127
  d[Z].iframe,
@@ -5136,7 +5136,7 @@ var en = { exports: {} };
5136
5136
  O(
5137
5137
  "window",
5138
5138
  "Mutation observed: " + P[0].target + " " + P[0].type
5139
- ), fs(u, 16);
5139
+ ), ys(u, 16);
5140
5140
  }
5141
5141
  function M() {
5142
5142
  var P = document.querySelector("body"), Z = {
@@ -5154,17 +5154,17 @@ var en = { exports: {} };
5154
5154
  }
5155
5155
  function pn(u) {
5156
5156
  function y() {
5157
- ii("Window " + u, "resize");
5157
+ ni("Window " + u, "resize");
5158
5158
  }
5159
- O("window", "Trigger event: " + u), fs(y, 16);
5159
+ O("window", "Trigger event: " + u), ys(y, 16);
5160
5160
  }
5161
- function si() {
5161
+ function ii() {
5162
5162
  function u() {
5163
- ii("Tab Visible", "resize");
5163
+ ni("Tab Visible", "resize");
5164
5164
  }
5165
- document.visibilityState !== "hidden" && (O("document", "Trigger event: Visibility change"), fs(u, 16));
5165
+ document.visibilityState !== "hidden" && (O("document", "Trigger event: Visibility change"), ys(u, 16));
5166
5166
  }
5167
- function ii(u, y) {
5167
+ function ni(u, y) {
5168
5168
  function M(x) {
5169
5169
  return d[x] && d[x].resizeFrom === "parent" && d[x].autoResize && !d[x].firstRun;
5170
5170
  }
@@ -5175,9 +5175,9 @@ var en = { exports: {} };
5175
5175
  function mn() {
5176
5176
  G(window, "message", dn), G(window, "resize", function() {
5177
5177
  pn("resize");
5178
- }), G(document, "visibilitychange", si), G(document, "-webkit-visibilitychange", si);
5178
+ }), G(document, "visibilitychange", ii), G(document, "-webkit-visibilitychange", ii);
5179
5179
  }
5180
- function ys() {
5180
+ function bs() {
5181
5181
  function u(x, P) {
5182
5182
  function Z() {
5183
5183
  if (P.tagName) {
@@ -5188,7 +5188,7 @@ var en = { exports: {} };
5188
5188
  } else
5189
5189
  throw new TypeError("Object is not a valid DOM element");
5190
5190
  }
5191
- P && (Z(), ti(P, x), M.push(P));
5191
+ P && (Z(), si(P, x), M.push(P));
5192
5192
  }
5193
5193
  function y(x) {
5194
5194
  x && x.enablePublicMethods && ee(
@@ -5219,24 +5219,24 @@ var en = { exports: {} };
5219
5219
  function fn(u) {
5220
5220
  u.fn ? u.fn.iFrameResize || (u.fn.iFrameResize = function(y) {
5221
5221
  function M(x, P) {
5222
- ti(P, y);
5222
+ si(P, y);
5223
5223
  }
5224
5224
  return this.filter("iframe").each(M).end();
5225
- }) : Ws("", "Unable to bind to jQuery, it is not fully loaded.");
5225
+ }) : Ks("", "Unable to bind to jQuery, it is not fully loaded.");
5226
5226
  }
5227
- window.jQuery !== e && fn(window.jQuery), typeof e == "function" && e.amd ? e([], ys) : s.exports = ys(), window.iFrameResize = window.iFrameResize || ys();
5227
+ window.jQuery !== e && fn(window.jQuery), typeof e == "function" && e.amd ? e([], bs) : s.exports = bs(), window.iFrameResize = window.iFrameResize || bs();
5228
5228
  })();
5229
- })(en);
5230
- var na = en.exports;
5231
- const ra = /* @__PURE__ */ Xi(na);
5232
- var aa = Object.defineProperty, oa = Object.getOwnPropertyDescriptor, tn = (s, e, t, i) => {
5229
+ })(tn);
5230
+ var na = tn.exports;
5231
+ const ra = /* @__PURE__ */ Qi(na);
5232
+ var aa = Object.defineProperty, oa = Object.getOwnPropertyDescriptor, Ws = (s, e, t, i) => {
5233
5233
  for (var n = i > 1 ? void 0 : i ? oa(e, t) : e, r = s.length - 1, a; r >= 0; r--)
5234
5234
  (a = s[r]) && (n = (i ? a(e, t, n) : a(n)) || n);
5235
5235
  return i && n && aa(e, t, n), n;
5236
5236
  };
5237
- let ts = class extends Q {
5237
+ let Pt = class extends Q {
5238
5238
  constructor() {
5239
- super(...arguments), this.src = "";
5239
+ super(...arguments), this.src = "", this.showCloseButton = !1;
5240
5240
  }
5241
5241
  async onLoad(s) {
5242
5242
  ra({
@@ -5251,31 +5251,45 @@ let ts = class extends Q {
5251
5251
  }
5252
5252
  }, s.target);
5253
5253
  }
5254
+ close() {
5255
+ this.dispatchEvent(new CustomEvent("close"));
5256
+ }
5254
5257
  render() {
5255
- return z`
5256
- <iframe
5257
- src=${this.src}
5258
- width="100%"
5259
- @load=${this.onLoad}
5260
- ></iframe>
5258
+ return L`
5259
+ <div class="relative">
5260
+ ${Ce(this.showCloseButton, () => L`
5261
+ <button class="absolute top-0 right-0 m-2 h-6 text-white focus:outline-none" @click="${this.close}">
5262
+ ${Nt}
5263
+ </button>
5264
+ `)}
5265
+
5266
+ <iframe
5267
+ src=${this.src}
5268
+ width="100%"
5269
+ @load=${this.onLoad}
5270
+ ></iframe>
5271
+ </div>
5261
5272
  `;
5262
5273
  }
5263
5274
  };
5264
- ts.styles = [Ie];
5265
- tn([
5266
- J({ type: String })
5267
- ], ts.prototype, "src", 2);
5268
- ts = tn([
5269
- Me("iai-chat-iframe")
5270
- ], ts);
5271
- var ca = Object.defineProperty, da = Object.getOwnPropertyDescriptor, Vs = (s, e, t, i) => {
5275
+ Pt.styles = [Ne];
5276
+ Ws([
5277
+ F({ type: String })
5278
+ ], Pt.prototype, "src", 2);
5279
+ Ws([
5280
+ F({ type: Boolean })
5281
+ ], Pt.prototype, "showCloseButton", 2);
5282
+ Pt = Ws([
5283
+ Pe("iai-chat-iframe")
5284
+ ], Pt);
5285
+ var ca = Object.defineProperty, da = Object.getOwnPropertyDescriptor, lt = (s, e, t, i) => {
5272
5286
  for (var n = i > 1 ? void 0 : i ? da(e, t) : e, r = s.length - 1, a; r >= 0; r--)
5273
5287
  (a = s[r]) && (n = (i ? a(e, t, n) : a(n)) || n);
5274
5288
  return i && n && ca(e, t, n), n;
5275
5289
  };
5276
- let It = class extends Q {
5290
+ let Me = class extends Q {
5277
5291
  constructor() {
5278
- super(...arguments), this.title = "", this.src = "";
5292
+ super(...arguments), this.title = "", this.src = "", this.width = "500px", this.height = null, this.showHeader = !0;
5279
5293
  }
5280
5294
  async connectedCallback() {
5281
5295
  super.connectedCallback();
@@ -5284,27 +5298,34 @@ let It = class extends Q {
5284
5298
  this.dispatchEvent(new CustomEvent("close"));
5285
5299
  }
5286
5300
  render() {
5287
- return z`
5301
+ const s = tt({
5302
+ width: this.width,
5303
+ height: this.height
5304
+ });
5305
+ return L`
5288
5306
  <div class="fixed inset-0 z-50 bg-black bg-opacity-50 flex justify-center items-center">
5289
5307
  <div
5290
5308
  class="flex flex-col rounded-lg shadow-lg bg-white mx-auto my-auto max-h-[90vh] max-w-[90vw] overflow-hidden"
5309
+ style=${s}
5291
5310
  part="modal"
5292
5311
  >
5293
- <div class="header text-lg p-2 flex justify-between items-center">
5294
- <div class="flex flex-row h-full items-center">
5295
- <span class="text-lg font-semibold ml-2">${this.title}</span>
5296
- </div>
5312
+ ${Ce(this.showHeader, () => L`
5313
+ <div class="header text-lg p-2 flex justify-between items-center">
5314
+ <div class="flex flex-row h-full items-center">
5315
+ <span class="text-lg font-semibold ml-2">${this.title}</span>
5316
+ </div>
5297
5317
 
5298
- <button class="mr-2 focus:outline-none" @click="${this.close}">
5299
- <svg class="h-6 w-6 text-white" fill="none" viewBox="0 0 24 24" stroke="currentColor">
5300
- <path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M6 18L18 6M6 6l12 12"/>
5301
- </svg>
5302
- </button>
5303
- </div>
5318
+ <button class="mr-2 h-6 text-white focus:outline-none" @click="${this.close}">
5319
+ ${Nt}
5320
+ </button>
5321
+ </div>
5322
+ `)}
5304
5323
 
5305
5324
  <div class="overflow-y-auto">
5306
5325
  <iai-chat-iframe
5307
5326
  src=${this.src}
5327
+ showCloseButton=${!this.showHeader}
5328
+ @close=${this.close}
5308
5329
  ></iai-chat-iframe>
5309
5330
  </div>
5310
5331
  </div>
@@ -5312,30 +5333,39 @@ let It = class extends Q {
5312
5333
  `;
5313
5334
  }
5314
5335
  };
5315
- It.styles = [Ie, rt`
5336
+ Me.styles = [Ne, ot`
5316
5337
  .header {
5317
5338
  background-color: var(--iai-chat-i-iframe-modal-header-bg);
5318
5339
  color: var(--iai-chat-i-iframe-modal-header-fg);
5319
5340
  height: 50px;
5320
5341
  }
5321
5342
  `];
5322
- Vs([
5323
- J({ type: String })
5324
- ], It.prototype, "title", 2);
5325
- Vs([
5326
- J({ type: String })
5327
- ], It.prototype, "src", 2);
5328
- It = Vs([
5329
- Me("iai-chat-iframe-modal")
5330
- ], It);
5343
+ lt([
5344
+ F({ type: String })
5345
+ ], Me.prototype, "title", 2);
5346
+ lt([
5347
+ F({ type: String })
5348
+ ], Me.prototype, "src", 2);
5349
+ lt([
5350
+ F({ type: String })
5351
+ ], Me.prototype, "width", 2);
5352
+ lt([
5353
+ F({ type: String })
5354
+ ], Me.prototype, "height", 2);
5355
+ lt([
5356
+ F({ type: Boolean })
5357
+ ], Me.prototype, "showHeader", 2);
5358
+ Me = lt([
5359
+ Pe("iai-chat-iframe-modal")
5360
+ ], Me);
5331
5361
  /**
5332
5362
  * @license
5333
5363
  * Copyright 2017 Google LLC
5334
5364
  * SPDX-License-Identifier: BSD-3-Clause
5335
5365
  */
5336
- class js extends cs {
5366
+ class Rs extends ls {
5337
5367
  constructor(e) {
5338
- if (super(e), this.it = B, e.type !== as.CHILD)
5368
+ if (super(e), this.it = B, e.type !== cs.CHILD)
5339
5369
  throw Error(this.constructor.directiveName + "() can only be used in child bindings");
5340
5370
  }
5341
5371
  render(e) {
@@ -5352,13 +5382,13 @@ class js extends cs {
5352
5382
  return t.raw = t, this._t = { _$litType$: this.constructor.resultType, strings: t, values: [] };
5353
5383
  }
5354
5384
  }
5355
- js.directiveName = "unsafeHTML", js.resultType = 1;
5356
- const la = os(js);
5385
+ Rs.directiveName = "unsafeHTML", Rs.resultType = 1;
5386
+ const la = ds(Rs);
5357
5387
  var sn = { exports: {} };
5358
5388
  (function(s, e) {
5359
5389
  (function(t, i) {
5360
5390
  s.exports = i();
5361
- })(zr, function() {
5391
+ })(Dr, function() {
5362
5392
  function t(o) {
5363
5393
  return o.replace(/\\([(){}[\]#*+\-.!_\\])/g, function(c, l) {
5364
5394
  return String.fromCharCode(1, n.indexOf(l) + r);
@@ -5396,13 +5426,13 @@ var sn = { exports: {} };
5396
5426
  var me = "", X = [];
5397
5427
  for (b = 0, N = p.length; N > b; ++b) {
5398
5428
  h = p[b];
5399
- var qe = h[0], fe = h[1], O = h[2];
5429
+ var Ge = h[0], fe = h[1], O = h[2];
5400
5430
  if (fe === "ul" || fe === "ol")
5401
- !X.length || O > X[0][1] ? (X.unshift([fe, O]), me += "<" + X[0][0] + "><li>" + qe) : X.length > 1 && O <= X[1][1] ? (me += "</li></" + X.shift()[0] + ">", --b) : me += "</li><li>" + qe;
5431
+ !X.length || O > X[0][1] ? (X.unshift([fe, O]), me += "<" + X[0][0] + "><li>" + Ge) : X.length > 1 && O <= X[1][1] ? (me += "</li></" + X.shift()[0] + ">", --b) : me += "</li><li>" + Ge;
5402
5432
  else {
5403
5433
  for (; X.length; )
5404
5434
  me += "</li></" + X.shift()[0] + ">";
5405
- me += fe === "hr" ? "<hr/>" : "<" + fe + O + a.headAttrs(O, qe) + ">" + qe + "</" + fe + O + ">";
5435
+ me += fe === "hr" ? "<hr/>" : "<" + fe + O + a.headAttrs(O, Ge) + ">" + Ge + "</" + fe + O + ">";
5406
5436
  }
5407
5437
  }
5408
5438
  for (; X.length; )
@@ -5418,13 +5448,13 @@ var sn = { exports: {} };
5418
5448
  });
5419
5449
  })(sn);
5420
5450
  var ua = sn.exports;
5421
- const ha = /* @__PURE__ */ Xi(ua);
5451
+ const ha = /* @__PURE__ */ Qi(ua);
5422
5452
  var pa = Object.defineProperty, ma = Object.getOwnPropertyDescriptor, nn = (s, e, t, i) => {
5423
5453
  for (var n = i > 1 ? void 0 : i ? ma(e, t) : e, r = s.length - 1, a; r >= 0; r--)
5424
5454
  (a = s[r]) && (n = (i ? a(e, t, n) : a(n)) || n);
5425
5455
  return i && n && pa(e, t, n), n;
5426
5456
  };
5427
- let ss = class extends Q {
5457
+ let ns = class extends Q {
5428
5458
  constructor() {
5429
5459
  super(...arguments), this.content = "";
5430
5460
  }
@@ -5432,7 +5462,7 @@ let ss = class extends Q {
5432
5462
  return ha(this.content);
5433
5463
  }
5434
5464
  render() {
5435
- return z`
5465
+ return L`
5436
5466
  <div class="flex items-end mr-20">
5437
5467
  <div class="message rounded-lg px-4 py-2 flex flex-col gap-3">
5438
5468
  ${la(this.htmlContent)}
@@ -5441,7 +5471,7 @@ let ss = class extends Q {
5441
5471
  `;
5442
5472
  }
5443
5473
  };
5444
- ss.styles = [Ie, rt`
5474
+ ns.styles = [Ne, ot`
5445
5475
  .message {
5446
5476
  background-color: var(--iai-chat-i-message-assistant-bg);
5447
5477
  color: var(--iai-chat-i-message-assistant-fg);
@@ -5472,23 +5502,23 @@ ss.styles = [Ie, rt`
5472
5502
  }
5473
5503
  `];
5474
5504
  nn([
5475
- J({ type: String })
5476
- ], ss.prototype, "content", 2);
5477
- ss = nn([
5478
- Me("iai-chat-message-assistant")
5479
- ], ss);
5505
+ F({ type: String })
5506
+ ], ns.prototype, "content", 2);
5507
+ ns = nn([
5508
+ Pe("iai-chat-message-assistant")
5509
+ ], ns);
5480
5510
  async function fa(s, e) {
5481
5511
  const { type: t, params: i } = s, n = e[t];
5482
5512
  if (!n)
5483
5513
  throw new Error(`No handler for enhanced content type ${t}`);
5484
- return n({ params: i, html: z });
5514
+ return n({ params: i, html: L });
5485
5515
  }
5486
- var ga = Object.defineProperty, ya = Object.getOwnPropertyDescriptor, jt = (s, e, t, i) => {
5516
+ var ga = Object.defineProperty, ya = Object.getOwnPropertyDescriptor, Lt = (s, e, t, i) => {
5487
5517
  for (var n = i > 1 ? void 0 : i ? ya(e, t) : e, r = s.length - 1, a; r >= 0; r--)
5488
5518
  (a = s[r]) && (n = (i ? a(e, t, n) : a(n)) || n);
5489
5519
  return i && n && ga(e, t, n), n;
5490
5520
  };
5491
- let Je = class extends Q {
5521
+ let Ye = class extends Q {
5492
5522
  constructor() {
5493
5523
  super(...arguments), this.content = "";
5494
5524
  }
@@ -5501,43 +5531,43 @@ let Je = class extends Q {
5501
5531
  console.warn("Error processing enhanced content", s);
5502
5532
  }
5503
5533
  else
5504
- this.contentHtmlTemplate || (this.contentHtmlTemplate = z`<p class="text-center text-gray-400 text-sm">${this.content}</p>`);
5534
+ this.contentHtmlTemplate || (this.contentHtmlTemplate = L`<p class="text-center text-gray-400 text-sm">${this.content}</p>`);
5505
5535
  }
5506
5536
  render() {
5507
- return z`
5537
+ return L`
5508
5538
  <div>
5509
5539
  ${this.contentHtmlTemplate}
5510
5540
  </div>
5511
5541
  `;
5512
5542
  }
5513
5543
  };
5514
- Je.styles = [Ie];
5515
- jt([
5516
- J({ type: Object })
5517
- ], Je.prototype, "options", 2);
5518
- jt([
5519
- J({ type: String })
5520
- ], Je.prototype, "content", 2);
5521
- jt([
5522
- J({ type: Object })
5523
- ], Je.prototype, "enhancedContent", 2);
5524
- jt([
5525
- J()
5526
- ], Je.prototype, "contentHtmlTemplate", 2);
5527
- Je = jt([
5528
- Me("iai-chat-message-system")
5529
- ], Je);
5544
+ Ye.styles = [Ne];
5545
+ Lt([
5546
+ F({ type: Object })
5547
+ ], Ye.prototype, "options", 2);
5548
+ Lt([
5549
+ F({ type: String })
5550
+ ], Ye.prototype, "content", 2);
5551
+ Lt([
5552
+ F({ type: Object })
5553
+ ], Ye.prototype, "enhancedContent", 2);
5554
+ Lt([
5555
+ F()
5556
+ ], Ye.prototype, "contentHtmlTemplate", 2);
5557
+ Ye = Lt([
5558
+ Pe("iai-chat-message-system")
5559
+ ], Ye);
5530
5560
  var va = Object.defineProperty, ba = Object.getOwnPropertyDescriptor, rn = (s, e, t, i) => {
5531
5561
  for (var n = i > 1 ? void 0 : i ? ba(e, t) : e, r = s.length - 1, a; r >= 0; r--)
5532
5562
  (a = s[r]) && (n = (i ? a(e, t, n) : a(n)) || n);
5533
5563
  return i && n && va(e, t, n), n;
5534
5564
  };
5535
- let is = class extends Q {
5565
+ let rs = class extends Q {
5536
5566
  constructor() {
5537
5567
  super(...arguments), this.content = "";
5538
5568
  }
5539
5569
  render() {
5540
- return z`
5570
+ return L`
5541
5571
  <div class="flex items-end justify-end ml-20">
5542
5572
  <div class="message rounded-lg px-4 py-2 flex gap-2">
5543
5573
  <p>${this.content}</p>
@@ -5546,24 +5576,24 @@ let is = class extends Q {
5546
5576
  `;
5547
5577
  }
5548
5578
  };
5549
- is.styles = [Ie, rt`
5579
+ rs.styles = [Ne, ot`
5550
5580
  .message {
5551
5581
  background-color: var(--iai-chat-i-message-user-bg);
5552
5582
  color: var(--iai-chat-i-message-user-fg);
5553
5583
  }
5554
5584
  `];
5555
5585
  rn([
5556
- J({ type: String })
5557
- ], is.prototype, "content", 2);
5558
- is = rn([
5559
- Me("iai-chat-message-user")
5560
- ], is);
5561
- var wa = Object.defineProperty, _a = Object.getOwnPropertyDescriptor, us = (s, e, t, i) => {
5586
+ F({ type: String })
5587
+ ], rs.prototype, "content", 2);
5588
+ rs = rn([
5589
+ Pe("iai-chat-message-user")
5590
+ ], rs);
5591
+ var wa = Object.defineProperty, _a = Object.getOwnPropertyDescriptor, ps = (s, e, t, i) => {
5562
5592
  for (var n = i > 1 ? void 0 : i ? _a(e, t) : e, r = s.length - 1, a; r >= 0; r--)
5563
5593
  (a = s[r]) && (n = (i ? a(e, t, n) : a(n)) || n);
5564
5594
  return i && n && wa(e, t, n), n;
5565
5595
  };
5566
- let nt = class extends Q {
5596
+ let at = class extends Q {
5567
5597
  constructor() {
5568
5598
  super(...arguments), this.isChatWindowOpen = !1, this.isCtaOpen = !0;
5569
5599
  }
@@ -5571,33 +5601,33 @@ let nt = class extends Q {
5571
5601
  const {
5572
5602
  openChatButton: { width: s, height: e, imageSrc: t, cta: i },
5573
5603
  placement: n
5574
- } = this.options.config, r = ut({ alignItems: n !== "left" ? "end" : "start" }), a = ut({ width: s, height: e });
5575
- return z`
5604
+ } = this.options.config, r = tt({ alignItems: n !== "left" ? "end" : "start" }), a = tt({ width: s, height: e });
5605
+ return L`
5576
5606
  <div class="flex flex-col gap-4" style=${r}>
5577
- ${et(i && this.isCtaOpen && !this.isChatWindowOpen, () => z`
5607
+ ${Ce(i && this.isCtaOpen && !this.isChatWindowOpen, () => L`
5578
5608
  <div class="relative rounded-lg p-5 shadow-md bg-white" style="max-width: 350px;">
5579
5609
  <button
5580
5610
  class="absolute top-0 right-0 w-5 h-5 m-0.5"
5581
5611
  @click="${() => this.isCtaOpen = !1}"
5582
- >${Ps}</button>
5612
+ >${Nt}</button>
5583
5613
 
5584
5614
  <span>${i}</span>
5585
5615
 
5586
5616
  <div
5587
5617
  class="absolute bottom-0 mx-4 mb-[-8px] w-0 h-0 border-x-8 border-t-8 border-x-transparent border-white"
5588
- style=${ut({ [n]: 0 })}
5618
+ style=${tt({ [n]: 0 })}
5589
5619
  />
5590
5620
  </div>
5591
5621
  `)}
5592
5622
 
5593
5623
  <button @click="${this.toggleChat}">
5594
- ${et(
5624
+ ${Ce(
5595
5625
  t,
5596
- () => z`<img src="${t}" alt="Chat Icon" style=${a}/>`,
5597
- () => z`
5626
+ () => L`<img src="${t}" alt="Chat Icon" style=${a}/>`,
5627
+ () => L`
5598
5628
  <div class="button rounded-full flex items-center justify-center" style=${a}>
5599
5629
  <div class="h-3/5 w-3/5">
5600
- ${et(this.isChatWindowOpen, () => Ps, () => Qr)}
5630
+ ${Ce(this.isChatWindowOpen, () => Nt, () => Qr)}
5601
5631
  </div>
5602
5632
  </div>
5603
5633
  `
@@ -5610,24 +5640,24 @@ let nt = class extends Q {
5610
5640
  this.dispatchEvent(new CustomEvent("toggle-chat"));
5611
5641
  }
5612
5642
  };
5613
- nt.styles = [Ie, rt`
5643
+ at.styles = [Ne, ot`
5614
5644
  .button {
5615
5645
  background-color: var(--iai-chat-i-ocb-bg);
5616
5646
  color: var(--iai-chat-i-ocb-fg);
5617
5647
  }
5618
5648
  `];
5619
- us([
5620
- J({ type: Object })
5621
- ], nt.prototype, "options", 2);
5622
- us([
5623
- J({ type: Boolean })
5624
- ], nt.prototype, "isChatWindowOpen", 2);
5625
- us([
5626
- ot()
5627
- ], nt.prototype, "isCtaOpen", 2);
5628
- nt = us([
5629
- Me("iai-chat-open-chat-button")
5630
- ], nt);
5649
+ ps([
5650
+ F({ type: Object })
5651
+ ], at.prototype, "options", 2);
5652
+ ps([
5653
+ F({ type: Boolean })
5654
+ ], at.prototype, "isChatWindowOpen", 2);
5655
+ ps([
5656
+ dt()
5657
+ ], at.prototype, "isCtaOpen", 2);
5658
+ at = ps([
5659
+ Pe("iai-chat-open-chat-button")
5660
+ ], at);
5631
5661
  function xa(s) {
5632
5662
  return s.replace(/([a-z0-9])([A-Z])/g, "$1-$2").toLowerCase();
5633
5663
  }
@@ -5639,7 +5669,7 @@ function an(s, e = "") {
5639
5669
  }
5640
5670
  class ka {
5641
5671
  constructor(e) {
5642
- this.widget = null, this.options = ls.parse(e);
5672
+ this.widget = null, this.options = hs.parse(e);
5643
5673
  const t = document.createElement("iai-chat-popup");
5644
5674
  t.options = this.options;
5645
5675
  const i = an(this.options.config.styles);
@@ -5658,7 +5688,7 @@ class ka {
5658
5688
  (e = this.widget) == null || e.remove(), this.widget = null;
5659
5689
  }
5660
5690
  }
5661
- var ns;
5691
+ var as;
5662
5692
  ((s) => {
5663
5693
  ((e) => {
5664
5694
  e.TEXT = "TEXT";
@@ -5671,7 +5701,7 @@ var ns;
5671
5701
  })(s.ConversationEventOrigin || (s.ConversationEventOrigin = {})), ((e) => {
5672
5702
  e.PENDING = "PENDING", e.ACTIVE = "ACTIVE", e.TERMINATED = "TERMINATED";
5673
5703
  })(s.ConversationStatus || (s.ConversationStatus = {}));
5674
- })(ns || (ns = {}));
5704
+ })(as || (as = {}));
5675
5705
  function on(s) {
5676
5706
  return { all: s = s || /* @__PURE__ */ new Map(), on: function(e, t) {
5677
5707
  var i = s.get(e);
@@ -5688,7 +5718,7 @@ function on(s) {
5688
5718
  });
5689
5719
  } };
5690
5720
  }
5691
- class Ta {
5721
+ class Sa {
5692
5722
  constructor(e) {
5693
5723
  this.chatWsUrl = e, this._emitter = on(), this.on = this._emitter.on.bind(this._emitter), this.off = this._emitter.off.bind(this._emitter), this.reconnectCodes = /* @__PURE__ */ new Set([
5694
5724
  1006
@@ -5719,15 +5749,15 @@ class Ta {
5719
5749
  this.disconnect(), this._emitter.all.clear();
5720
5750
  }
5721
5751
  }
5722
- const Sa = ns.AcknowledgeType, $a = "Anyone Home", Ea = "IB Chat Leasing - Development";
5752
+ const Ta = as.AcknowledgeType, $a = "Anyone Home", Ea = "IB Chat Leasing - Development";
5723
5753
  let Ca = "https://five9.ah.inhabit.work";
5724
5754
  const Aa = "https://five9.ah.inhabit.work".replace("http", "ws").replace(/\/$/, "");
5725
- var be, ze;
5726
- const ft = class ft {
5755
+ var be, Ue;
5756
+ const yt = class yt {
5727
5757
  constructor() {
5728
- $s(this, be, void 0);
5729
- $s(this, ze, void 0);
5730
- this._emitter = on(), this.on = this._emitter.on.bind(this._emitter), this.off = this._emitter.off.bind(this._emitter), Se(this, be, null), Se(this, ze, null), this.conversationStarted = !1;
5758
+ Cs(this, be, void 0);
5759
+ Cs(this, Ue, void 0);
5760
+ this._emitter = on(), this.on = this._emitter.on.bind(this._emitter), this.off = this._emitter.off.bind(this._emitter), Te(this, be, null), Te(this, Ue, null), this.conversationStarted = !1;
5731
5761
  }
5732
5762
  serialize() {
5733
5763
  return JSON.stringify({
@@ -5737,14 +5767,14 @@ const ft = class ft {
5737
5767
  });
5738
5768
  }
5739
5769
  static deserialize(e) {
5740
- const t = JSON.parse(e), i = new ft();
5770
+ const t = JSON.parse(e), i = new yt();
5741
5771
  return t.sessionToken && i.setSession(t.sessionToken), t.conversationId && i.setConversationId(t.conversationId), i.conversationStarted = t.conversationStarted || !1, i;
5742
5772
  }
5743
5773
  static generateBaseUrl(e) {
5744
5774
  return `https://${e}/appsvcs/rs/svc`;
5745
5775
  }
5746
5776
  async createSession() {
5747
- const e = await fetch(`${ft.generateBaseUrl("app-scl.five9.com")}/auth/anon?cookieless=true`, {
5777
+ const e = await fetch(`${yt.generateBaseUrl("app-scl.five9.com")}/auth/anon?cookieless=true`, {
5748
5778
  method: "POST",
5749
5779
  headers: {
5750
5780
  "Content-Type": "application/json",
@@ -5752,13 +5782,13 @@ const ft = class ft {
5752
5782
  },
5753
5783
  body: JSON.stringify({ tenantName: $a })
5754
5784
  });
5755
- return Se(this, be, await e.json()), Zt(this, be);
5785
+ return Te(this, be, await e.json()), zt(this, be);
5756
5786
  }
5757
5787
  setSession(e) {
5758
- Se(this, be, e);
5788
+ Te(this, be, e);
5759
5789
  }
5760
5790
  setConversationId(e) {
5761
- Se(this, ze, e), this.five9WebSocket && (this.five9WebSocket.destroy(), this.five9WebSocket = void 0, e && this.connectToWebSocket());
5791
+ Te(this, Ue, e), this.five9WebSocket && (this.five9WebSocket.destroy(), this.five9WebSocket = void 0, e && this.connectToWebSocket());
5762
5792
  }
5763
5793
  connect() {
5764
5794
  if (!this.sessionToken)
@@ -5771,7 +5801,7 @@ const ft = class ft {
5771
5801
  if (!this.conversationId)
5772
5802
  throw new Error("Conversation not started");
5773
5803
  this.five9WebSocket && this.five9WebSocket.destroy();
5774
- const e = new Ta(`${Aa}/conversations/${this.conversationId}/ws`);
5804
+ const e = new Sa(`${Aa}/conversations/${this.conversationId}/ws`);
5775
5805
  e.on("*", (t, i) => {
5776
5806
  this._emitter.emit(t, i);
5777
5807
  }), e.on("conversationCreated", (t) => {
@@ -5793,7 +5823,7 @@ const ft = class ft {
5793
5823
  messages: [
5794
5824
  {
5795
5825
  messageId: t.messageId,
5796
- type: Sa.READ
5826
+ type: Ta.READ
5797
5827
  }
5798
5828
  ]
5799
5829
  });
@@ -5808,7 +5838,7 @@ const ft = class ft {
5808
5838
  if (!i)
5809
5839
  throw new Error("Session not found");
5810
5840
  e = e.startsWith("/") ? e : `/${e}`;
5811
- const n = i.metadata.dataCenters[0].apiUrls[0].host, r = await fetch(`${ft.generateBaseUrl(n)}${e}`, {
5841
+ const n = i.metadata.dataCenters[0].apiUrls[0].host, r = await fetch(`${yt.generateBaseUrl(n)}${e}`, {
5812
5842
  ...t,
5813
5843
  headers: {
5814
5844
  ...t.headers,
@@ -5848,7 +5878,7 @@ const ft = class ft {
5848
5878
  if (!t || !i)
5849
5879
  throw new Error("Conversation not started");
5850
5880
  const n = {
5851
- messageType: ns.MessageType.TEXT,
5881
+ messageType: as.MessageType.TEXT,
5852
5882
  message: e
5853
5883
  };
5854
5884
  await this.authenticatedFetch(`/conversations/${t}/messages`, {
@@ -5882,14 +5912,14 @@ const ft = class ft {
5882
5912
  }), this.destroy();
5883
5913
  }
5884
5914
  destroy() {
5885
- this.five9WebSocket && this.five9WebSocket.destroy(), Se(this, be, null), Se(this, ze, null);
5915
+ this.five9WebSocket && this.five9WebSocket.destroy(), Te(this, be, null), Te(this, Ue, null);
5886
5916
  }
5887
5917
  // Getters
5888
5918
  get sessionToken() {
5889
- return Zt(this, be);
5919
+ return zt(this, be);
5890
5920
  }
5891
5921
  get conversationId() {
5892
- return Zt(this, ze);
5922
+ return zt(this, Ue);
5893
5923
  }
5894
5924
  get dataCenter() {
5895
5925
  var e;
@@ -5912,9 +5942,9 @@ const ft = class ft {
5912
5942
  return (e = this.sessionToken) == null ? void 0 : e.context.farmId;
5913
5943
  }
5914
5944
  };
5915
- be = new WeakMap(), ze = new WeakMap();
5916
- let rs = ft;
5917
- function mt(s) {
5945
+ be = new WeakMap(), Ue = new WeakMap();
5946
+ let os = yt;
5947
+ function gt(s) {
5918
5948
  return `any-${s || "main"}-chatSession`;
5919
5949
  }
5920
5950
  async function Oa({
@@ -5937,7 +5967,7 @@ async function Oa({
5937
5967
  role: "system",
5938
5968
  content: "Please wait while we connect you to a live agent"
5939
5969
  });
5940
- const a = new rs();
5970
+ const a = new os();
5941
5971
  await a.createSession();
5942
5972
  const { summary: o, subject: c, ...l } = e;
5943
5973
  await a.createConversation({
@@ -5947,7 +5977,7 @@ async function Oa({
5947
5977
  "AI Summary": o
5948
5978
  }
5949
5979
  }), localStorage.setItem(
5950
- mt(t.cleanOptions.config.historyKey),
5980
+ gt(t.cleanOptions.config.historyKey),
5951
5981
  a.serialize()
5952
5982
  ), cn(t, a);
5953
5983
  };
@@ -5990,7 +6020,7 @@ function cn(s, e) {
5990
6020
  console.log("event:", r, a);
5991
6021
  }), e.on("conversationCreated", () => {
5992
6022
  s.setInputDisabled(!1), localStorage.setItem(
5993
- mt(s.cleanOptions.config.historyKey),
6023
+ gt(s.cleanOptions.config.historyKey),
5994
6024
  e.serialize()
5995
6025
  );
5996
6026
  }), e.on(
@@ -6042,7 +6072,7 @@ function cn(s, e) {
6042
6072
  role: "system",
6043
6073
  content: "The chat has ended"
6044
6074
  }), s.setInputDisabled(!0), localStorage.removeItem(
6045
- mt(s.cleanOptions.config.historyKey)
6075
+ gt(s.cleanOptions.config.historyKey)
6046
6076
  );
6047
6077
  }
6048
6078
  ), e.on("message", (r) => {
@@ -6080,7 +6110,7 @@ function cn(s, e) {
6080
6110
  );
6081
6111
  }, n = async () => {
6082
6112
  console.log("reset fired"), await e.terminateConversation(), await i(), localStorage.removeItem(
6083
- mt(s.cleanOptions.config.historyKey)
6113
+ gt(s.cleanOptions.config.historyKey)
6084
6114
  );
6085
6115
  };
6086
6116
  s.addEventListener(
@@ -6096,9 +6126,10 @@ function Ia(s) {
6096
6126
  ...i.customerFirstName && { firstName: i.customerFirstName },
6097
6127
  ...i.customerLastName && { lastName: i.customerLastName },
6098
6128
  ...i.customerEmail && { email: i.customerEmail },
6099
- ...i.customerPhoneNumber && { phone: i.customerPhoneNumber }
6129
+ ...i.customerPhoneNumber && { phone: i.customerPhoneNumber },
6130
+ ...i.desiredMoveInDate && { moveInDate: i.desiredMoveInDate }
6100
6131
  }, a = document.createElement("iai-chat-iframe-modal");
6101
- a.title = "Schedule a Tour", a.src = `${s}?${new URLSearchParams(r).toString()}`;
6132
+ a.title = "Schedule a Tour", a.src = `${s}?${new URLSearchParams(r).toString()}`, a.showHeader = !1;
6102
6133
  const o = () => {
6103
6134
  a.remove(), window.removeEventListener("beforeunload", h), n.setInputDisabled(!1);
6104
6135
  }, c = async ({ detail: p }) => {
@@ -6135,14 +6166,14 @@ function Ia(s) {
6135
6166
  }
6136
6167
  class Na {
6137
6168
  constructor(e, t) {
6138
- const i = ls.parse({
6169
+ const i = hs.parse({
6139
6170
  assistantId: "7e59c8c1-a4ff-40f1-9a68-86ea294a4e75",
6140
6171
  ...e
6141
6172
  });
6142
6173
  i.handlers.functionCalls.transferToLiveAgent = Oa, i.handlers.functionCalls.showScheduleTourWidget = Ia(t.schedulerUrl), this.chatWidget = new ka(i);
6143
- const n = localStorage.getItem(mt(i.config.historyKey));
6174
+ const n = localStorage.getItem(gt(i.config.historyKey));
6144
6175
  if (n) {
6145
- const r = rs.deserialize(n);
6176
+ const r = os.deserialize(n);
6146
6177
  setTimeout(() => {
6147
6178
  cn(this.chatWidget.api.chatWindow, r);
6148
6179
  }, 0);