@iai-lib/any-chat-widget 0.1.0-alpha.26 → 0.1.0-alpha.28

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.
@@ -2,37 +2,45 @@ var Ui = (i, e, t) => {
2
2
  if (!e.has(i))
3
3
  throw TypeError("Cannot " + t);
4
4
  };
5
- var en = (i, e, t) => (Ui(i, e, "read from private field"), t ? t.call(i) : e.get(i)), Yn = (i, e, t) => {
5
+ var en = (i, e, t) => (Ui(i, e, "read from private field"), t ? t.call(i) : e.get(i)), Gn = (i, e, t) => {
6
6
  if (e.has(i))
7
7
  throw TypeError("Cannot add the same private member more than once");
8
8
  e instanceof WeakSet ? e.add(i) : e.set(i, t);
9
9
  }, Ie = (i, e, t, n) => (Ui(i, e, "write to private field"), n ? n.call(i, t) : e.set(i, t), t);
10
+ var mr = Object.defineProperty, gr = (i, e, t) => e in i ? mr(i, e, { enumerable: !0, configurable: !0, writable: !0, value: t }) : i[e] = t, W = (i, e, t) => (gr(i, typeof e != "symbol" ? e + "" : e, t), t), fr = (i, e, t) => {
11
+ if (!e.has(i))
12
+ throw TypeError("Cannot " + t);
13
+ }, Hi = (i, e, t) => {
14
+ if (e.has(i))
15
+ throw TypeError("Cannot add the same private member more than once");
16
+ e instanceof WeakSet ? e.add(i) : e.set(i, t);
17
+ }, ni = (i, e, t) => (fr(i, e, "access private method"), t);
10
18
  /**
11
19
  * @license
12
20
  * Copyright 2019 Google LLC
13
21
  * SPDX-License-Identifier: BSD-3-Clause
14
22
  */
15
- const sn = globalThis, hi = sn.ShadowRoot && (sn.ShadyCSS === void 0 || sn.ShadyCSS.nativeShadow) && "adoptedStyleSheets" in Document.prototype && "replace" in CSSStyleSheet.prototype, ui = Symbol(), Hi = /* @__PURE__ */ new WeakMap();
23
+ const sn = globalThis, ui = sn.ShadowRoot && (sn.ShadyCSS === void 0 || sn.ShadyCSS.nativeShadow) && "adoptedStyleSheets" in Document.prototype && "replace" in CSSStyleSheet.prototype, hi = Symbol(), Bi = /* @__PURE__ */ new WeakMap();
16
24
  let bs = class {
17
- constructor(e, t, n) {
18
- if (this._$cssResult$ = !0, n !== ui)
25
+ constructor(i, e, t) {
26
+ if (this._$cssResult$ = !0, t !== hi)
19
27
  throw Error("CSSResult is not constructable. Use `unsafeCSS` or `css` instead.");
20
- this.cssText = e, this.t = t;
28
+ this.cssText = i, this.t = e;
21
29
  }
22
30
  get styleSheet() {
23
- let e = this.o;
24
- const t = this.t;
25
- if (hi && e === void 0) {
26
- const n = t !== void 0 && t.length === 1;
27
- n && (e = Hi.get(t)), e === void 0 && ((this.o = e = new CSSStyleSheet()).replaceSync(this.cssText), n && Hi.set(t, e));
31
+ let i = this.o;
32
+ const e = this.t;
33
+ if (ui && i === void 0) {
34
+ const t = e !== void 0 && e.length === 1;
35
+ t && (i = Bi.get(e)), i === void 0 && ((this.o = i = new CSSStyleSheet()).replaceSync(this.cssText), t && Bi.set(e, i));
28
36
  }
29
- return e;
37
+ return i;
30
38
  }
31
39
  toString() {
32
40
  return this.cssText;
33
41
  }
34
42
  };
35
- const mr = (i) => new bs(typeof i == "string" ? i : i + "", void 0, ui), nt = (i, ...e) => {
43
+ const yr = (i) => new bs(typeof i == "string" ? i : i + "", void 0, hi), nt = (i, ...e) => {
36
44
  const t = i.length === 1 ? i[0] : e.reduce((n, s, r) => n + ((a) => {
37
45
  if (a._$cssResult$ === !0)
38
46
  return a.cssText;
@@ -40,30 +48,30 @@ const mr = (i) => new bs(typeof i == "string" ? i : i + "", void 0, ui), nt = (i
40
48
  return a;
41
49
  throw Error("Value passed to 'css' function must be a 'css' function result: " + a + ". Use 'unsafeCSS' to pass non-literal values, but take care to ensure page security.");
42
50
  })(s) + i[r + 1], i[0]);
43
- return new bs(t, i, ui);
44
- }, fr = (i, e) => {
45
- if (hi)
51
+ return new bs(t, i, hi);
52
+ }, vr = (i, e) => {
53
+ if (ui)
46
54
  i.adoptedStyleSheets = e.map((t) => t instanceof CSSStyleSheet ? t : t.styleSheet);
47
55
  else
48
56
  for (const t of e) {
49
57
  const n = document.createElement("style"), s = sn.litNonce;
50
58
  s !== void 0 && n.setAttribute("nonce", s), n.textContent = t.cssText, i.appendChild(n);
51
59
  }
52
- }, Bi = hi ? (i) => i : (i) => i instanceof CSSStyleSheet ? ((e) => {
60
+ }, Wi = ui ? (i) => i : (i) => i instanceof CSSStyleSheet ? ((e) => {
53
61
  let t = "";
54
62
  for (const n of e.cssRules)
55
63
  t += n.cssText;
56
- return mr(t);
64
+ return yr(t);
57
65
  })(i) : i;
58
66
  /**
59
67
  * @license
60
68
  * Copyright 2017 Google LLC
61
69
  * SPDX-License-Identifier: BSD-3-Clause
62
70
  */
63
- const { is: gr, defineProperty: yr, getOwnPropertyDescriptor: vr, getOwnPropertyNames: br, getOwnPropertySymbols: wr, getPrototypeOf: xr } = Object, ct = globalThis, Wi = ct.trustedTypes, kr = Wi ? Wi.emptyScript : "", Fi = ct.reactiveElementPolyfillSupport, wt = (i, e) => i, ln = { toAttribute(i, e) {
71
+ const { is: br, defineProperty: wr, getOwnPropertyDescriptor: xr, getOwnPropertyNames: _r, getOwnPropertySymbols: kr, getPrototypeOf: $r } = Object, ct = globalThis, Fi = ct.trustedTypes, Tr = Fi ? Fi.emptyScript : "", Vi = ct.reactiveElementPolyfillSupport, wt = (i, e) => i, ln = { toAttribute(i, e) {
64
72
  switch (e) {
65
73
  case Boolean:
66
- i = i ? kr : null;
74
+ i = i ? Tr : null;
67
75
  break;
68
76
  case Object:
69
77
  case Array:
@@ -88,7 +96,7 @@ const { is: gr, defineProperty: yr, getOwnPropertyDescriptor: vr, getOwnProperty
88
96
  }
89
97
  }
90
98
  return t;
91
- } }, pi = (i, e) => !gr(i, e), Vi = { attribute: !0, type: String, converter: ln, reflect: !1, hasChanged: pi };
99
+ } }, pi = (i, e) => !br(i, e), qi = { attribute: !0, type: String, converter: ln, reflect: !1, hasChanged: pi };
92
100
  Symbol.metadata ?? (Symbol.metadata = Symbol("metadata")), ct.litPropertyMetadata ?? (ct.litPropertyMetadata = /* @__PURE__ */ new WeakMap());
93
101
  class at extends HTMLElement {
94
102
  static addInitializer(e) {
@@ -97,14 +105,14 @@ class at extends HTMLElement {
97
105
  static get observedAttributes() {
98
106
  return this.finalize(), this._$Eh && [...this._$Eh.keys()];
99
107
  }
100
- static createProperty(e, t = Vi) {
108
+ static createProperty(e, t = qi) {
101
109
  if (t.state && (t.attribute = !1), this._$Ei(), this.elementProperties.set(e, t), !t.noAccessor) {
102
110
  const n = Symbol(), s = this.getPropertyDescriptor(e, n, t);
103
- s !== void 0 && yr(this.prototype, e, s);
111
+ s !== void 0 && wr(this.prototype, e, s);
104
112
  }
105
113
  }
106
114
  static getPropertyDescriptor(e, t, n) {
107
- const { get: s, set: r } = vr(this.prototype, e) ?? { get() {
115
+ const { get: s, set: r } = xr(this.prototype, e) ?? { get() {
108
116
  return this[t];
109
117
  }, set(a) {
110
118
  this[t] = a;
@@ -117,19 +125,19 @@ class at extends HTMLElement {
117
125
  }, configurable: !0, enumerable: !0 };
118
126
  }
119
127
  static getPropertyOptions(e) {
120
- return this.elementProperties.get(e) ?? Vi;
128
+ return this.elementProperties.get(e) ?? qi;
121
129
  }
122
130
  static _$Ei() {
123
131
  if (this.hasOwnProperty(wt("elementProperties")))
124
132
  return;
125
- const e = xr(this);
133
+ const e = $r(this);
126
134
  e.finalize(), e.l !== void 0 && (this.l = [...e.l]), this.elementProperties = new Map(e.elementProperties);
127
135
  }
128
136
  static finalize() {
129
137
  if (this.hasOwnProperty(wt("finalized")))
130
138
  return;
131
139
  if (this.finalized = !0, this._$Ei(), this.hasOwnProperty(wt("properties"))) {
132
- const t = this.properties, n = [...br(t), ...wr(t)];
140
+ const t = this.properties, n = [..._r(t), ...kr(t)];
133
141
  for (const s of n)
134
142
  this.createProperty(s, t[s]);
135
143
  }
@@ -152,9 +160,9 @@ class at extends HTMLElement {
152
160
  if (Array.isArray(e)) {
153
161
  const n = new Set(e.flat(1 / 0).reverse());
154
162
  for (const s of n)
155
- t.unshift(Bi(s));
163
+ t.unshift(Wi(s));
156
164
  } else
157
- e !== void 0 && t.push(Bi(e));
165
+ e !== void 0 && t.push(Wi(e));
158
166
  return t;
159
167
  }
160
168
  static _$Eu(e, t) {
@@ -184,7 +192,7 @@ class at extends HTMLElement {
184
192
  }
185
193
  createRenderRoot() {
186
194
  const e = this.shadowRoot ?? this.attachShadow(this.constructor.shadowRootOptions);
187
- return fr(e, this.constructor.elementStyles), e;
195
+ return vr(e, this.constructor.elementStyles), e;
188
196
  }
189
197
  connectedCallback() {
190
198
  var e;
@@ -301,39 +309,39 @@ class at extends HTMLElement {
301
309
  firstUpdated(e) {
302
310
  }
303
311
  }
304
- at.elementStyles = [], at.shadowRootOptions = { mode: "open" }, at[wt("elementProperties")] = /* @__PURE__ */ new Map(), at[wt("finalized")] = /* @__PURE__ */ new Map(), Fi == null || Fi({ ReactiveElement: at }), (ct.reactiveElementVersions ?? (ct.reactiveElementVersions = [])).push("2.0.4");
312
+ at.elementStyles = [], at.shadowRootOptions = { mode: "open" }, at[wt("elementProperties")] = /* @__PURE__ */ new Map(), at[wt("finalized")] = /* @__PURE__ */ new Map(), Vi == null || Vi({ ReactiveElement: at }), (ct.reactiveElementVersions ?? (ct.reactiveElementVersions = [])).push("2.0.4");
305
313
  /**
306
314
  * @license
307
315
  * Copyright 2017 Google LLC
308
316
  * SPDX-License-Identifier: BSD-3-Clause
309
317
  */
310
- const cn = globalThis, dn = cn.trustedTypes, qi = dn ? dn.createPolicy("lit-html", { createHTML: (i) => i }) : void 0, mi = "$lit$", _e = `lit$${(Math.random() + "").slice(9)}$`, fi = "?" + _e, _r = `<${fi}>`, Ke = document, St = () => Ke.createComment(""), Ct = (i) => i === null || typeof i != "object" && typeof i != "function", ws = Array.isArray, xs = (i) => ws(i) || typeof (i == null ? void 0 : i[Symbol.iterator]) == "function", Xn = `[
311
- \f\r]`, yt = /<(?:(!--|\/[^a-zA-Z])|(\/?[a-zA-Z][^>\s]*)|(\/?$))/g, Ki = /-->/g, Ji = />/g, De = RegExp(`>|${Xn}(?:([^\\s"'>=/]+)(${Xn}*=${Xn}*(?:[^
312
- \f\r"'\`<>=]|("|')|))|$)`, "g"), Gi = /'/g, Qi = /"/g, ks = /^(?:script|style|textarea|title)$/i, $r = (i) => (e, ...t) => ({ _$litType$: i, strings: e, values: t }), z = $r(1), ge = Symbol.for("lit-noChange"), q = Symbol.for("lit-nothing"), Yi = /* @__PURE__ */ new WeakMap(), Be = Ke.createTreeWalker(Ke, 129);
313
- function _s(i, e) {
318
+ const cn = globalThis, dn = cn.trustedTypes, Ki = dn ? dn.createPolicy("lit-html", { createHTML: (i) => i }) : void 0, mi = "$lit$", ke = `lit$${(Math.random() + "").slice(9)}$`, gi = "?" + ke, Er = `<${gi}>`, Ke = document, St = () => Ke.createComment(""), Ct = (i) => i === null || typeof i != "object" && typeof i != "function", ws = Array.isArray, xs = (i) => ws(i) || typeof (i == null ? void 0 : i[Symbol.iterator]) == "function", Xn = `[
319
+ \f\r]`, yt = /<(?:(!--|\/[^a-zA-Z])|(\/?[a-zA-Z][^>\s]*)|(\/?$))/g, Ji = /-->/g, Qi = />/g, De = RegExp(`>|${Xn}(?:([^\\s"'>=/]+)(${Xn}*=${Xn}*(?:[^
320
+ \f\r"'\`<>=]|("|')|))|$)`, "g"), Yi = /'/g, Gi = /"/g, _s = /^(?:script|style|textarea|title)$/i, Sr = (i) => (e, ...t) => ({ _$litType$: i, strings: e, values: t }), z = Sr(1), fe = Symbol.for("lit-noChange"), q = Symbol.for("lit-nothing"), Xi = /* @__PURE__ */ new WeakMap(), Be = Ke.createTreeWalker(Ke, 129);
321
+ function ks(i, e) {
314
322
  if (!Array.isArray(i) || !i.hasOwnProperty("raw"))
315
323
  throw Error("invalid template strings array");
316
- return qi !== void 0 ? qi.createHTML(e) : e;
324
+ return Ki !== void 0 ? Ki.createHTML(e) : e;
317
325
  }
318
326
  const $s = (i, e) => {
319
327
  const t = i.length - 1, n = [];
320
328
  let s, r = e === 2 ? "<svg>" : "", a = yt;
321
329
  for (let o = 0; o < t; o++) {
322
330
  const l = i[o];
323
- let d, h, p = -1, c = 0;
324
- for (; c < l.length && (a.lastIndex = c, h = a.exec(l), h !== null); )
325
- c = a.lastIndex, a === yt ? h[1] === "!--" ? a = Ki : h[1] !== void 0 ? a = Ji : h[2] !== void 0 ? (ks.test(h[2]) && (s = RegExp("</" + h[2], "g")), a = De) : h[3] !== void 0 && (a = De) : a === De ? h[0] === ">" ? (a = s ?? yt, p = -1) : h[1] === void 0 ? p = -2 : (p = a.lastIndex - h[2].length, d = h[1], a = h[3] === void 0 ? De : h[3] === '"' ? Qi : Gi) : a === Qi || a === Gi ? a = De : a === Ki || a === Ji ? a = yt : (a = De, s = void 0);
326
- const f = a === De && i[o + 1].startsWith("/>") ? " " : "";
327
- r += a === yt ? l + _r : p >= 0 ? (n.push(d), l.slice(0, p) + mi + l.slice(p) + _e + f) : l + _e + (p === -2 ? o : f);
331
+ let d, u, p = -1, c = 0;
332
+ for (; c < l.length && (a.lastIndex = c, u = a.exec(l), u !== null); )
333
+ c = a.lastIndex, a === yt ? u[1] === "!--" ? a = Ji : u[1] !== void 0 ? a = Qi : u[2] !== void 0 ? (_s.test(u[2]) && (s = RegExp("</" + u[2], "g")), a = De) : u[3] !== void 0 && (a = De) : a === De ? u[0] === ">" ? (a = s ?? yt, p = -1) : u[1] === void 0 ? p = -2 : (p = a.lastIndex - u[2].length, d = u[1], a = u[3] === void 0 ? De : u[3] === '"' ? Gi : Yi) : a === Gi || a === Yi ? a = De : a === Ji || a === Qi ? a = yt : (a = De, s = void 0);
334
+ const g = a === De && i[o + 1].startsWith("/>") ? " " : "";
335
+ r += a === yt ? l + Er : p >= 0 ? (n.push(d), l.slice(0, p) + mi + l.slice(p) + ke + g) : l + ke + (p === -2 ? o : g);
328
336
  }
329
- return [_s(i, r + (i[t] || "<?>") + (e === 2 ? "</svg>" : "")), n];
337
+ return [ks(i, r + (i[t] || "<?>") + (e === 2 ? "</svg>" : "")), n];
330
338
  };
331
339
  class At {
332
340
  constructor({ strings: e, _$litType$: t }, n) {
333
341
  let s;
334
342
  this.parts = [];
335
343
  let r = 0, a = 0;
336
- const o = e.length - 1, l = this.parts, [d, h] = $s(e, t);
344
+ const o = e.length - 1, l = this.parts, [d, u] = $s(e, t);
337
345
  if (this.el = At.createElement(d, n), Be.currentNode = this.el.content, t === 2) {
338
346
  const p = this.el.content.firstChild;
339
347
  p.replaceWith(...p.childNodes);
@@ -343,26 +351,26 @@ class At {
343
351
  if (s.hasAttributes())
344
352
  for (const p of s.getAttributeNames())
345
353
  if (p.endsWith(mi)) {
346
- const c = h[a++], f = s.getAttribute(p).split(_e), O = /([.?@])?(.*)/.exec(c);
347
- l.push({ type: 1, index: r, name: O[2], strings: f, ctor: O[1] === "." ? Es : O[1] === "?" ? Ss : O[1] === "@" ? Cs : Wt }), s.removeAttribute(p);
354
+ const c = u[a++], g = s.getAttribute(p).split(ke), O = /([.?@])?(.*)/.exec(c);
355
+ l.push({ type: 1, index: r, name: O[2], strings: g, ctor: O[1] === "." ? Es : O[1] === "?" ? Ss : O[1] === "@" ? Cs : Wt }), s.removeAttribute(p);
348
356
  } else
349
- p.startsWith(_e) && (l.push({ type: 6, index: r }), s.removeAttribute(p));
350
- if (ks.test(s.tagName)) {
351
- const p = s.textContent.split(_e), c = p.length - 1;
357
+ p.startsWith(ke) && (l.push({ type: 6, index: r }), s.removeAttribute(p));
358
+ if (_s.test(s.tagName)) {
359
+ const p = s.textContent.split(ke), c = p.length - 1;
352
360
  if (c > 0) {
353
361
  s.textContent = dn ? dn.emptyScript : "";
354
- for (let f = 0; f < c; f++)
355
- s.append(p[f], St()), Be.nextNode(), l.push({ type: 2, index: ++r });
362
+ for (let g = 0; g < c; g++)
363
+ s.append(p[g], St()), Be.nextNode(), l.push({ type: 2, index: ++r });
356
364
  s.append(p[c], St());
357
365
  }
358
366
  }
359
367
  } else if (s.nodeType === 8)
360
- if (s.data === fi)
368
+ if (s.data === gi)
361
369
  l.push({ type: 2, index: r });
362
370
  else {
363
371
  let p = -1;
364
- for (; (p = s.data.indexOf(_e, p + 1)) !== -1; )
365
- l.push({ type: 7, index: r }), p += _e.length - 1;
372
+ for (; (p = s.data.indexOf(ke, p + 1)) !== -1; )
373
+ l.push({ type: 7, index: r }), p += ke.length - 1;
366
374
  }
367
375
  r++;
368
376
  }
@@ -374,13 +382,13 @@ class At {
374
382
  }
375
383
  function Je(i, e, t = i, n) {
376
384
  var s, r;
377
- if (e === ge)
385
+ if (e === fe)
378
386
  return e;
379
387
  let a = n !== void 0 ? (s = t._$Co) == null ? void 0 : s[n] : t._$Cl;
380
388
  const o = Ct(e) ? void 0 : e._$litDirective$;
381
389
  return (a == null ? void 0 : a.constructor) !== o && ((r = a == null ? void 0 : a._$AO) == null || r.call(a, !1), o === void 0 ? a = void 0 : (a = new o(i), a._$AT(i, t, n)), n !== void 0 ? (t._$Co ?? (t._$Co = []))[n] = a : t._$Cl = a), a !== void 0 && (e = Je(i, a._$AS(i, e.values), a, n)), e;
382
390
  }
383
- let Ts = class {
391
+ class Ts {
384
392
  constructor(e, t) {
385
393
  this._$AV = [], this._$AN = void 0, this._$AD = e, this._$AM = t;
386
394
  }
@@ -408,7 +416,7 @@ let Ts = class {
408
416
  for (const n of this._$AV)
409
417
  n !== void 0 && (n.strings !== void 0 ? (n._$AI(e, n, t), t += n.strings.length - 2) : n._$AI(e[t])), t++;
410
418
  }
411
- };
419
+ }
412
420
  class mt {
413
421
  get _$AU() {
414
422
  var e;
@@ -429,7 +437,7 @@ class mt {
429
437
  return this._$AB;
430
438
  }
431
439
  _$AI(e, t = this) {
432
- e = Je(this, e, t), Ct(e) ? e === q || e == null || e === "" ? (this._$AH !== q && this._$AR(), this._$AH = q) : e !== this._$AH && e !== ge && this._(e) : e._$litType$ !== void 0 ? this.$(e) : e.nodeType !== void 0 ? this.T(e) : xs(e) ? this.k(e) : this._(e);
440
+ e = Je(this, e, t), Ct(e) ? e === q || e == null || e === "" ? (this._$AH !== q && this._$AR(), this._$AH = q) : e !== this._$AH && e !== fe && this._(e) : e._$litType$ !== void 0 ? this.$(e) : e.nodeType !== void 0 ? this.T(e) : xs(e) ? this.k(e) : this._(e);
433
441
  }
434
442
  S(e) {
435
443
  return this._$AA.parentNode.insertBefore(e, this._$AB);
@@ -442,7 +450,7 @@ class mt {
442
450
  }
443
451
  $(e) {
444
452
  var t;
445
- const { values: n, _$litType$: s } = e, r = typeof s == "number" ? this._$AC(e) : (s.el === void 0 && (s.el = At.createElement(_s(s.h, s.h[0]), this.options)), s);
453
+ const { values: n, _$litType$: s } = e, r = typeof s == "number" ? this._$AC(e) : (s.el === void 0 && (s.el = At.createElement(ks(s.h, s.h[0]), this.options)), s);
446
454
  if (((t = this._$AH) == null ? void 0 : t._$AD) === r)
447
455
  this._$AH.p(n);
448
456
  else {
@@ -451,8 +459,8 @@ class mt {
451
459
  }
452
460
  }
453
461
  _$AC(e) {
454
- let t = Yi.get(e.strings);
455
- return t === void 0 && Yi.set(e.strings, t = new At(e)), t;
462
+ let t = Xi.get(e.strings);
463
+ return t === void 0 && Xi.set(e.strings, t = new At(e)), t;
456
464
  }
457
465
  k(e) {
458
466
  ws(this._$AH) || (this._$AH = [], this._$AR());
@@ -488,12 +496,12 @@ class Wt {
488
496
  const r = this.strings;
489
497
  let a = !1;
490
498
  if (r === void 0)
491
- e = Je(this, e, t, 0), a = !Ct(e) || e !== this._$AH && e !== ge, a && (this._$AH = e);
499
+ e = Je(this, e, t, 0), a = !Ct(e) || e !== this._$AH && e !== fe, a && (this._$AH = e);
492
500
  else {
493
501
  const o = e;
494
502
  let l, d;
495
503
  for (e = r[0], l = 0; l < r.length - 1; l++)
496
- d = Je(this, o[n + l], t, l), d === ge && (d = this._$AH[l]), a || (a = !Ct(d) || d !== this._$AH[l]), d === q ? e = q : e !== q && (e += (d ?? "") + r[l + 1]), this._$AH[l] = d;
504
+ d = Je(this, o[n + l], t, l), d === fe && (d = this._$AH[l]), a || (a = !Ct(d) || d !== this._$AH[l]), d === q ? e = q : e !== q && (e += (d ?? "") + r[l + 1]), this._$AH[l] = d;
497
505
  }
498
506
  a && !s && this.j(e);
499
507
  }
@@ -501,14 +509,14 @@ class Wt {
501
509
  e === q ? this.element.removeAttribute(this.name) : this.element.setAttribute(this.name, e ?? "");
502
510
  }
503
511
  }
504
- let Es = class extends Wt {
512
+ class Es extends Wt {
505
513
  constructor() {
506
514
  super(...arguments), this.type = 3;
507
515
  }
508
516
  j(e) {
509
517
  this.element[this.name] = e === q ? void 0 : e;
510
518
  }
511
- };
519
+ }
512
520
  class Ss extends Wt {
513
521
  constructor() {
514
522
  super(...arguments), this.type = 4;
@@ -517,12 +525,12 @@ class Ss extends Wt {
517
525
  this.element.toggleAttribute(this.name, !!e && e !== q);
518
526
  }
519
527
  }
520
- let Cs = class extends Wt {
528
+ class Cs extends Wt {
521
529
  constructor(e, t, n, s, r) {
522
530
  super(e, t, n, s, r), this.type = 5;
523
531
  }
524
532
  _$AI(e, t = this) {
525
- if ((e = Je(this, e, t, 0) ?? q) === ge)
533
+ if ((e = Je(this, e, t, 0) ?? q) === fe)
526
534
  return;
527
535
  const n = this._$AH, s = e === q && n !== q || e.capture !== n.capture || e.once !== n.once || e.passive !== n.passive, r = e !== q && (n === q || s);
528
536
  s && this.element.removeEventListener(this.name, this, n), r && this.element.addEventListener(this.name, this, e), this._$AH = e;
@@ -531,7 +539,7 @@ let Cs = class extends Wt {
531
539
  var t;
532
540
  typeof this._$AH == "function" ? this._$AH.call(((t = this.options) == null ? void 0 : t.host) ?? this.element, e) : this._$AH.handleEvent(e);
533
541
  }
534
- };
542
+ }
535
543
  class As {
536
544
  constructor(e, t, n) {
537
545
  this.element = e, this.type = 6, this._$AN = void 0, this._$AM = t, this.options = n;
@@ -543,9 +551,9 @@ class As {
543
551
  Je(this, e);
544
552
  }
545
553
  }
546
- const Tr = { P: mi, A: _e, C: fi, M: 1, L: $s, R: Ts, D: xs, V: Je, I: mt, H: Wt, N: Ss, U: Cs, B: Es, F: As }, Xi = cn.litHtmlPolyfillSupport;
547
- Xi == null || Xi(At, mt), (cn.litHtmlVersions ?? (cn.litHtmlVersions = [])).push("3.1.2");
548
- const Er = (i, e, t) => {
554
+ const Cr = { P: mi, A: ke, C: gi, M: 1, L: $s, R: Ts, D: xs, V: Je, I: mt, H: Wt, N: Ss, U: Cs, B: Es, F: As }, es = cn.litHtmlPolyfillSupport;
555
+ es == null || es(At, mt), (cn.litHtmlVersions ?? (cn.litHtmlVersions = [])).push("3.1.2");
556
+ const Ar = (i, e, t) => {
549
557
  const n = (t == null ? void 0 : t.renderBefore) ?? e;
550
558
  let s = n._$litPart$;
551
559
  if (s === void 0) {
@@ -570,7 +578,7 @@ let ne = class extends at {
570
578
  }
571
579
  update(i) {
572
580
  const e = this.render();
573
- this.hasUpdated || (this.renderOptions.isConnected = this.isConnected), super.update(i), this._$Do = Er(e, this.renderRoot, this.renderOptions);
581
+ this.hasUpdated || (this.renderOptions.isConnected = this.isConnected), super.update(i), this._$Do = Ar(e, this.renderRoot, this.renderOptions);
574
582
  }
575
583
  connectedCallback() {
576
584
  var i;
@@ -581,13 +589,13 @@ let ne = class extends at {
581
589
  super.disconnectedCallback(), (i = this._$Do) == null || i.setConnected(!1);
582
590
  }
583
591
  render() {
584
- return ge;
592
+ return fe;
585
593
  }
586
594
  };
587
- var es;
588
- ne._$litElement$ = !0, ne.finalized = !0, (es = globalThis.litElementHydrateSupport) == null || es.call(globalThis, { LitElement: ne });
589
- const ts = globalThis.litElementPolyfillSupport;
590
- ts == null || ts({ LitElement: ne });
595
+ var ts;
596
+ ne._$litElement$ = !0, ne.finalized = !0, (ts = globalThis.litElementHydrateSupport) == null || ts.call(globalThis, { LitElement: ne });
597
+ const ns = globalThis.litElementPolyfillSupport;
598
+ ns == null || ns({ LitElement: ne });
591
599
  (globalThis.litElementVersions ?? (globalThis.litElementVersions = [])).push("4.0.4");
592
600
  /**
593
601
  * @license
@@ -604,7 +612,7 @@ const Ee = (i) => (e, t) => {
604
612
  * Copyright 2017 Google LLC
605
613
  * SPDX-License-Identifier: BSD-3-Clause
606
614
  */
607
- const Sr = { attribute: !0, type: String, converter: ln, reflect: !1, hasChanged: pi }, Cr = (i = Sr, e, t) => {
615
+ const Ir = { attribute: !0, type: String, converter: ln, reflect: !1, hasChanged: pi }, Or = (i = Ir, e, t) => {
608
616
  const { kind: n, metadata: s } = t;
609
617
  let r = globalThis.litPropertyMetadata.get(s);
610
618
  if (r === void 0 && globalThis.litPropertyMetadata.set(s, r = /* @__PURE__ */ new Map()), r.set(t.name, i), n === "accessor") {
@@ -626,7 +634,7 @@ const Sr = { attribute: !0, type: String, converter: ln, reflect: !1, hasChanged
626
634
  throw Error("Unsupported decorator location: " + n);
627
635
  };
628
636
  function V(i) {
629
- return (e, t) => typeof t == "object" ? Cr(i, e, t) : ((n, s, r) => {
637
+ return (e, t) => typeof t == "object" ? Or(i, e, t) : ((n, s, r) => {
630
638
  const a = s.hasOwnProperty(r);
631
639
  return s.constructor.createProperty(r, a ? { ...n, wrapped: !0 } : n), a ? Object.getOwnPropertyDescriptor(s, r) : void 0;
632
640
  })(i, e, t);
@@ -636,7 +644,15 @@ function V(i) {
636
644
  * Copyright 2017 Google LLC
637
645
  * SPDX-License-Identifier: BSD-3-Clause
638
646
  */
639
- const ns = (i, e, t) => (t.configurable = !0, t.enumerable = !0, Reflect.decorate && typeof e != "object" && Object.defineProperty(i, e, t), t);
647
+ function gt(i) {
648
+ return V({ ...i, state: !0, attribute: !1 });
649
+ }
650
+ /**
651
+ * @license
652
+ * Copyright 2017 Google LLC
653
+ * SPDX-License-Identifier: BSD-3-Clause
654
+ */
655
+ const is = (i, e, t) => (t.configurable = !0, t.enumerable = !0, Reflect.decorate && typeof e != "object" && Object.defineProperty(i, e, t), t);
640
656
  /**
641
657
  * @license
642
658
  * Copyright 2017 Google LLC
@@ -657,12 +673,12 @@ function An(i, e) {
657
673
  this[l] = d;
658
674
  } };
659
675
  })();
660
- return ns(t, n, { get() {
676
+ return is(t, n, { get() {
661
677
  let l = a.call(this);
662
678
  return l === void 0 && (l = r(this), (l !== null || this.hasUpdated) && o.call(this, l)), l;
663
679
  } });
664
680
  }
665
- return ns(t, n, { get() {
681
+ return is(t, n, { get() {
666
682
  return r(this);
667
683
  } });
668
684
  };
@@ -673,34 +689,33 @@ function An(i, e) {
673
689
  * SPDX-License-Identifier: BSD-3-Clause
674
690
  */
675
691
  const In = { ATTRIBUTE: 1, CHILD: 2, PROPERTY: 3, BOOLEAN_ATTRIBUTE: 4, EVENT: 5, ELEMENT: 6 }, On = (i) => (...e) => ({ _$litDirective$: i, values: e });
676
- class Mn {
677
- constructor(e) {
692
+ let Mn = class {
693
+ constructor(i) {
678
694
  }
679
695
  get _$AU() {
680
696
  return this._$AM._$AU;
681
697
  }
682
- _$AT(e, t, n) {
683
- this._$Ct = e, this._$AM = t, this._$Ci = n;
698
+ _$AT(i, e, t) {
699
+ this._$Ct = i, this._$AM = e, this._$Ci = t;
684
700
  }
685
- _$AS(e, t) {
686
- return this.update(e, t);
701
+ _$AS(i, e) {
702
+ return this.update(i, e);
687
703
  }
688
- update(e, t) {
689
- return this.render(...t);
704
+ update(i, e) {
705
+ return this.render(...e);
690
706
  }
691
- }
692
- const Se = nt`*,: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: }.container{width:100%}@media (min-width: 640px){.container{max-width:640px}}@media (min-width: 768px){.container{max-width:768px}}@media (min-width: 1024px){.container{max-width:1024px}}@media (min-width: 1280px){.container{max-width:1280px}}@media (min-width: 1536px){.container{max-width:1536px}}.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}.inline-block{display:inline-block}.flex{display:flex}.hidden{display:none}.h-0{height:0px}.h-2{height:.5rem}.h-2\\.5{height:.625rem}.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-20{max-height:5rem}.max-h-\\[90vh\\]{max-height:90vh}.w-0{width:0px}.w-2{width:.5rem}.w-2\\.5{width:.625rem}.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}.cursor-pointer{cursor:pointer}.resize-none{resize:none}.resize{resize:both}.snap-x{scroll-snap-type:x var(--tw-scroll-snap-strictness)}.snap-mandatory{--tw-scroll-snap-strictness: mandatory}.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-x-auto{overflow-x:auto}.overflow-y-auto{overflow-y:auto}.whitespace-pre-wrap{white-space:pre-wrap}.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-gray-400{--tw-bg-opacity: 1;background-color:rgb(156 163 175 / var(--tw-bg-opacity))}.bg-gray-600{--tw-bg-opacity: 1;background-color:rgb(75 85 99 / 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-0{padding:0}.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, #0B64F4);--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}h1{font-size:1.5em}h2{font-size:1.17em}h3{font-size:1em}ol,ul{display:flex;flex-direction:column;padding:0;margin-left:20px;gap:8px}ol{list-style-type:decimal}.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}}`;
707
+ };
693
708
  /**
694
709
  * @license
695
710
  * Copyright 2020 Google LLC
696
711
  * SPDX-License-Identifier: BSD-3-Clause
697
712
  */
698
- const { I: Ar } = Tr, is = () => document.createComment(""), vt = (i, e, t) => {
713
+ const { I: Mr } = Cr, ss = () => document.createComment(""), vt = (i, e, t) => {
699
714
  var n;
700
715
  const s = i._$AA.parentNode, r = e === void 0 ? i._$AB : e._$AA;
701
716
  if (t === void 0) {
702
- const a = s.insertBefore(is(), r), o = s.insertBefore(is(), r);
703
- t = new Ar(a, o, i, i.options);
717
+ const a = s.insertBefore(ss(), r), o = s.insertBefore(ss(), r);
718
+ t = new Mr(a, o, i, i.options);
704
719
  } else {
705
720
  const a = t._$AB.nextSibling, o = t._$AM, l = o !== i;
706
721
  if (l) {
@@ -710,13 +725,13 @@ const { I: Ar } = Tr, is = () => document.createComment(""), vt = (i, e, t) => {
710
725
  if (a !== r || l) {
711
726
  let d = t._$AA;
712
727
  for (; d !== a; ) {
713
- const h = d.nextSibling;
714
- s.insertBefore(d, r), d = h;
728
+ const u = d.nextSibling;
729
+ s.insertBefore(d, r), d = u;
715
730
  }
716
731
  }
717
732
  }
718
733
  return t;
719
- }, Ue = (i, e, t = i) => (i._$AI(e, t), i), Ir = {}, Or = (i, e = Ir) => i._$AH = e, Mr = (i) => i._$AH, ei = (i) => {
734
+ }, Ue = (i, e, t = i) => (i._$AI(e, t), i), Rr = {}, Nr = (i, e = Rr) => i._$AH = e, Pr = (i) => i._$AH, ei = (i) => {
720
735
  var e;
721
736
  (e = i._$AP) == null || e.call(i, !1, !0);
722
737
  let t = i._$AA;
@@ -731,7 +746,7 @@ const { I: Ar } = Tr, is = () => document.createComment(""), vt = (i, e, t) => {
731
746
  * Copyright 2017 Google LLC
732
747
  * SPDX-License-Identifier: BSD-3-Clause
733
748
  */
734
- const ss = (i, e, t) => {
749
+ const rs = (i, e, t) => {
735
750
  const n = /* @__PURE__ */ new Map();
736
751
  for (let s = e; s <= t; s++)
737
752
  n.set(i[s], s);
@@ -754,57 +769,164 @@ const ss = (i, e, t) => {
754
769
  return this.dt(i, e, t).values;
755
770
  }
756
771
  update(i, [e, t, n]) {
757
- const s = Mr(i), { values: r, keys: a } = this.dt(e, t, n);
772
+ const s = Pr(i), { values: r, keys: a } = this.dt(e, t, n);
758
773
  if (!Array.isArray(s))
759
774
  return this.ut = a, r;
760
775
  const o = this.ut ?? (this.ut = []), l = [];
761
- let d, h, p = 0, c = s.length - 1, f = 0, O = r.length - 1;
762
- for (; p <= c && f <= O; )
776
+ let d, u, p = 0, c = s.length - 1, g = 0, O = r.length - 1;
777
+ for (; p <= c && g <= O; )
763
778
  if (s[p] === null)
764
779
  p++;
765
780
  else if (s[c] === null)
766
781
  c--;
767
- else if (o[p] === a[f])
768
- l[f] = Ue(s[p], r[f]), p++, f++;
782
+ else if (o[p] === a[g])
783
+ l[g] = Ue(s[p], r[g]), p++, g++;
769
784
  else if (o[c] === a[O])
770
785
  l[O] = Ue(s[c], r[O]), c--, O--;
771
786
  else if (o[p] === a[O])
772
787
  l[O] = Ue(s[p], r[O]), vt(i, l[O + 1], s[p]), p++, O--;
773
- else if (o[c] === a[f])
774
- l[f] = Ue(s[c], r[f]), vt(i, s[p], s[c]), c--, f++;
775
- else if (d === void 0 && (d = ss(a, f, O), h = ss(o, p, c)), d.has(o[p]))
788
+ else if (o[c] === a[g])
789
+ l[g] = Ue(s[c], r[g]), vt(i, s[p], s[c]), c--, g++;
790
+ else if (d === void 0 && (d = rs(a, g, O), u = rs(o, p, c)), d.has(o[p]))
776
791
  if (d.has(o[c])) {
777
- const H = h.get(a[f]), J = H !== void 0 ? s[H] : null;
792
+ const H = u.get(a[g]), J = H !== void 0 ? s[H] : null;
778
793
  if (J === null) {
779
794
  const Ce = vt(i, s[p]);
780
- Ue(Ce, r[f]), l[f] = Ce;
795
+ Ue(Ce, r[g]), l[g] = Ce;
781
796
  } else
782
- l[f] = Ue(J, r[f]), vt(i, s[p], J), s[H] = null;
783
- f++;
797
+ l[g] = Ue(J, r[g]), vt(i, s[p], J), s[H] = null;
798
+ g++;
784
799
  } else
785
800
  ei(s[c]), c--;
786
801
  else
787
802
  ei(s[p]), p++;
788
- for (; f <= O; ) {
803
+ for (; g <= O; ) {
789
804
  const H = vt(i, l[O + 1]);
790
- Ue(H, r[f]), l[f++] = H;
805
+ Ue(H, r[g]), l[g++] = H;
791
806
  }
792
807
  for (; p <= c; ) {
793
808
  const H = s[p++];
794
809
  H !== null && ei(H);
795
810
  }
796
- return this.ut = a, Or(i, l), ge;
811
+ return this.ut = a, Nr(i, l), fe;
797
812
  }
798
- });
799
- var Rr = Object.defineProperty, Pr = (i, e, t) => e in i ? Rr(i, e, { enumerable: !0, configurable: !0, writable: !0, value: t }) : i[e] = t, W = (i, e, t) => (Pr(i, typeof e != "symbol" ? e + "" : e, t), t), Nr = (i, e, t) => {
800
- if (!e.has(i))
801
- throw TypeError("Cannot " + t);
802
- }, rs = (i, e, t) => {
803
- if (e.has(i))
804
- throw TypeError("Cannot add the same private member more than once");
805
- e instanceof WeakSet ? e.add(i) : e.set(i, t);
806
- }, ni = (i, e, t) => (Nr(i, e, "access private method"), t);
807
- function jr(i) {
813
+ }), Se = nt`*,: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: }.container{width:100%}@media (min-width: 640px){.container{max-width:640px}}@media (min-width: 768px){.container{max-width:768px}}@media (min-width: 1024px){.container{max-width:1024px}}@media (min-width: 1280px){.container{max-width:1280px}}@media (min-width: 1536px){.container{max-width:1536px}}.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}.inline-block{display:inline-block}.flex{display:flex}.hidden{display:none}.h-0{height:0px}.h-2{height:.5rem}.h-2\\.5{height:.625rem}.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-20{max-height:5rem}.max-h-\\[90vh\\]{max-height:90vh}.w-0{width:0px}.w-2{width:.5rem}.w-2\\.5{width:.625rem}.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}.cursor-pointer{cursor:pointer}.resize-none{resize:none}.resize{resize:both}.snap-x{scroll-snap-type:x var(--tw-scroll-snap-strictness)}.snap-mandatory{--tw-scroll-snap-strictness: mandatory}.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-x-auto{overflow-x:auto}.overflow-y-auto{overflow-y:auto}.whitespace-pre-wrap{white-space:pre-wrap}.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-gray-400{--tw-bg-opacity: 1;background-color:rgb(156 163 175 / var(--tw-bg-opacity))}.bg-gray-600{--tw-bg-opacity: 1;background-color:rgb(75 85 99 / 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-0{padding:0}.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-2{padding-bottom:.5rem}.pb-8{padding-bottom:2rem}.pt-1{padding-top:.25rem}.pt-2{padding-top:.5rem}.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, #0B64F4);--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}h1{font-size:1.5em}h2{font-size:1.17em}h3{font-size:1em}ol,ul{display:flex;flex-direction:column;padding:0;margin-left:20px;gap:8px}ol{list-style-type:decimal}.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}}`;
814
+ var jr = Object.defineProperty, zr = Object.getOwnPropertyDescriptor, Rn = (i, e, t, n) => {
815
+ for (var s = n > 1 ? void 0 : n ? zr(e, t) : e, r = i.length - 1, a; r >= 0; r--)
816
+ (a = i[r]) && (s = (n ? a(e, t, s) : a(s)) || s);
817
+ return n && s && jr(e, t, s), s;
818
+ };
819
+ let dt = class extends ne {
820
+ constructor() {
821
+ super(...arguments), this.activeIndex = 0, this.items = [];
822
+ }
823
+ render() {
824
+ return z`
825
+ <div>
826
+ <div
827
+ id="carousel"
828
+ class="flex overflow-x-auto snap-x snap-mandatory overflow-scrolling-touch m-0 p-0"
829
+ @scroll="${this.onScroll}"
830
+ >
831
+ <slot @slotchange=${this.onSlotChange}>zzz</slot>
832
+ </div>
833
+
834
+ <div class="flex justify-between items-center">
835
+ <button class="cursor-pointer h-6" @click=${() => this.scrollCarousel(-1)}>
836
+
837
+ <svg
838
+ xmlns="http://www.w3.org/2000/svg"
839
+ viewBox="0 0 24 24"
840
+ width="100%"
841
+ height="100%"
842
+ fill="currentColor"
843
+ >
844
+ <title>arrow-left</title>
845
+ <path d="M20,11V13H8L13.5,18.5L12.08,19.92L4.16,12L12.08,4.08L13.5,5.5L8,11H20Z" />
846
+ </svg>
847
+ </button>
848
+
849
+ <div class="flex justify-center space-x-2">
850
+ ${Is(this.items, (i, e) => e, (i, e) => z`
851
+ <span
852
+ class="h-2.5 w-2.5 bg-gray-400 rounded-full inline-block ${this.activeIndex === e ? "bg-gray-600" : ""}"
853
+ @click=${() => this.scrollToIndex(e)}
854
+ />
855
+ `)}
856
+ </div>
857
+
858
+ <button class="cursor-pointer h-6" @click=${() => this.scrollCarousel(1)}>
859
+ <svg
860
+ xmlns="http://www.w3.org/2000/svg"
861
+ viewBox="0 0 24 24"
862
+ width="100%"
863
+ height="100%"
864
+ fill="currentColor"
865
+ >
866
+ <title>arrow-right</title>
867
+ <path d="M4,11V13H16L10.5,18.5L11.92,19.92L19.84,12L11.92,4.08L10.5,5.5L16,11H4Z" />
868
+ </svg>
869
+ </button>
870
+ </div>
871
+ </div>
872
+ `;
873
+ }
874
+ onSlotChange(i) {
875
+ const e = i.target;
876
+ this.items = (e == null ? void 0 : e.assignedElements()) || [];
877
+ }
878
+ onScroll() {
879
+ const { carousel: i } = this;
880
+ if (!i)
881
+ return;
882
+ let e = 0, t = 1 / 0;
883
+ this.items.forEach((n, s) => {
884
+ const r = Math.abs(n.offsetLeft - i.scrollLeft);
885
+ r < t && (t = r, e = s);
886
+ }), this.activeIndex = e;
887
+ }
888
+ scrollCarousel(i) {
889
+ this.scrollToIndex(this.activeIndex + i);
890
+ }
891
+ scrollToIndex(i) {
892
+ i !== this.activeIndex && (this.activeIndex = Math.max(0, Math.min(i, this.items.length - 1)), this.scrollToActiveItem());
893
+ }
894
+ scrollToActiveItem() {
895
+ const { carousel: i, items: e, activeIndex: t } = this;
896
+ if (!i)
897
+ return;
898
+ const n = e[t];
899
+ n && i.scrollTo({
900
+ left: n.offsetLeft - i.clientWidth / 2 + n.clientWidth / 2,
901
+ behavior: "smooth"
902
+ });
903
+ }
904
+ };
905
+ dt.styles = [Se, nt`
906
+ ::slotted(div) {
907
+ flex: 0 0 auto;
908
+ scroll-snap-align: start;
909
+ width: 100%;
910
+ padding: 1rem;
911
+ background-color: #f8f9fa;
912
+ border: 1px solid rgba(0, 0, 0, 0.125);
913
+ border-radius: 0.25rem;
914
+ margin-right: 1rem;
915
+ }
916
+ `];
917
+ Rn([
918
+ V({ type: Number })
919
+ ], dt.prototype, "activeIndex", 2);
920
+ Rn([
921
+ V({ type: Array })
922
+ ], dt.prototype, "items", 2);
923
+ Rn([
924
+ An("#carousel")
925
+ ], dt.prototype, "carousel", 2);
926
+ dt = Rn([
927
+ Ee("iai-chat-carousel")
928
+ ], dt);
929
+ function Zr(i) {
808
930
  if (Array.isArray(i)) {
809
931
  for (var e = 0, t = Array(i.length); e < i.length; e++)
810
932
  t[e] = i[e];
@@ -812,34 +934,34 @@ function jr(i) {
812
934
  } else
813
935
  return Array.from(i);
814
936
  }
815
- var gi = !1;
937
+ var fi = !1;
816
938
  if (typeof window < "u") {
817
939
  var as = {
818
940
  get passive() {
819
- gi = !0;
941
+ fi = !0;
820
942
  }
821
943
  };
822
944
  window.addEventListener("testPassive", null, as), window.removeEventListener("testPassive", null, as);
823
945
  }
824
- var hn = typeof window < "u" && window.navigator && window.navigator.platform && (/iP(ad|hone|od)/.test(window.navigator.platform) || window.navigator.platform === "MacIntel" && window.navigator.maxTouchPoints > 1), Fe = [], un = !1, Os = -1, xt = void 0, He = void 0, kt = void 0, Ms = function(i) {
946
+ var un = typeof window < "u" && window.navigator && window.navigator.platform && (/iP(ad|hone|od)/.test(window.navigator.platform) || window.navigator.platform === "MacIntel" && window.navigator.maxTouchPoints > 1), Fe = [], hn = !1, Os = -1, xt = void 0, He = void 0, _t = void 0, Ms = function(i) {
825
947
  return Fe.some(function(e) {
826
948
  return !!(e.options.allowTouchMove && e.options.allowTouchMove(i));
827
949
  });
828
950
  }, yi = function(i) {
829
951
  var e = i || window.event;
830
952
  return Ms(e.target) || e.touches.length > 1 ? !0 : (e.preventDefault && e.preventDefault(), !1);
831
- }, zr = function(i) {
832
- if (kt === void 0) {
953
+ }, Lr = function(i) {
954
+ if (_t === void 0) {
833
955
  var e = !!i && i.reserveScrollBarGap === !0, t = window.innerWidth - document.documentElement.clientWidth;
834
956
  if (e && t > 0) {
835
957
  var n = parseInt(window.getComputedStyle(document.body).getPropertyValue("padding-right"), 10);
836
- kt = document.body.style.paddingRight, document.body.style.paddingRight = n + t + "px";
958
+ _t = document.body.style.paddingRight, document.body.style.paddingRight = n + t + "px";
837
959
  }
838
960
  }
839
961
  xt === void 0 && (xt = document.body.style.overflow, document.body.style.overflow = "hidden");
840
- }, Zr = function() {
841
- kt !== void 0 && (document.body.style.paddingRight = kt, kt = void 0), xt !== void 0 && (document.body.style.overflow = xt, xt = void 0);
842
- }, Lr = function() {
962
+ }, Dr = function() {
963
+ _t !== void 0 && (document.body.style.paddingRight = _t, _t = void 0), xt !== void 0 && (document.body.style.overflow = xt, xt = void 0);
964
+ }, Ur = function() {
843
965
  return window.requestAnimationFrame(function() {
844
966
  if (He === void 0) {
845
967
  He = {
@@ -856,17 +978,17 @@ var hn = typeof window < "u" && window.navigator && window.navigator.platform &&
856
978
  }, 300);
857
979
  }
858
980
  });
859
- }, Dr = function() {
981
+ }, Hr = function() {
860
982
  if (He !== void 0) {
861
983
  var i = -parseInt(document.body.style.top, 10), e = -parseInt(document.body.style.left, 10);
862
984
  document.body.style.position = He.position, document.body.style.top = He.top, document.body.style.left = He.left, window.scrollTo(e, i), He = void 0;
863
985
  }
864
- }, Ur = function(i) {
986
+ }, Br = function(i) {
865
987
  return i ? i.scrollHeight - i.scrollTop <= i.clientHeight : !1;
866
- }, Hr = function(i, e) {
988
+ }, Wr = function(i, e) {
867
989
  var t = i.targetTouches[0].clientY - Os;
868
- return Ms(i.target) ? !1 : e && e.scrollTop === 0 && t > 0 || Ur(e) && t < 0 ? yi(i) : (i.stopPropagation(), !0);
869
- }, Br = function(i, e) {
990
+ return Ms(i.target) ? !1 : e && e.scrollTop === 0 && t > 0 || Br(e) && t < 0 ? yi(i) : (i.stopPropagation(), !0);
991
+ }, Fr = function(i, e) {
870
992
  if (!i) {
871
993
  console.error("disableBodyScroll unsuccessful - targetElement must be provided when calling disableBodyScroll on IOS devices.");
872
994
  return;
@@ -878,11 +1000,11 @@ var hn = typeof window < "u" && window.navigator && window.navigator.platform &&
878
1000
  targetElement: i,
879
1001
  options: e || {}
880
1002
  };
881
- Fe = [].concat(jr(Fe), [t]), hn ? Lr() : zr(e), hn && (i.ontouchstart = function(n) {
1003
+ Fe = [].concat(Zr(Fe), [t]), un ? Ur() : Lr(e), un && (i.ontouchstart = function(n) {
882
1004
  n.targetTouches.length === 1 && (Os = n.targetTouches[0].clientY);
883
1005
  }, i.ontouchmove = function(n) {
884
- n.targetTouches.length === 1 && Hr(n, i);
885
- }, un || (document.addEventListener("touchmove", yi, gi ? { passive: !1 } : void 0), un = !0));
1006
+ n.targetTouches.length === 1 && Wr(n, i);
1007
+ }, hn || (document.addEventListener("touchmove", yi, fi ? { passive: !1 } : void 0), hn = !0));
886
1008
  }
887
1009
  }, os = function(i) {
888
1010
  if (!i) {
@@ -891,16 +1013,8 @@ var hn = typeof window < "u" && window.navigator && window.navigator.platform &&
891
1013
  }
892
1014
  Fe = Fe.filter(function(e) {
893
1015
  return e.targetElement !== i;
894
- }), hn && (i.ontouchstart = null, i.ontouchmove = null, un && Fe.length === 0 && (document.removeEventListener("touchmove", yi, gi ? { passive: !1 } : void 0), un = !1)), hn ? Dr() : Zr();
1016
+ }), un && (i.ontouchstart = null, i.ontouchmove = null, hn && Fe.length === 0 && (document.removeEventListener("touchmove", yi, fi ? { passive: !1 } : void 0), hn = !1)), un ? Hr() : Dr();
895
1017
  };
896
- /**
897
- * @license
898
- * Copyright 2017 Google LLC
899
- * SPDX-License-Identifier: BSD-3-Clause
900
- */
901
- function ft(i) {
902
- return V({ ...i, state: !0, attribute: !1 });
903
- }
904
1018
  /**
905
1019
  * @license
906
1020
  * Copyright 2018 Google LLC
@@ -930,7 +1044,7 @@ const ls = On(class extends Mn {
930
1044
  const a = !!e[r];
931
1045
  a === this.st.has(r) || (n = this.nt) != null && n.has(r) || (a ? (s.add(r), this.st.add(r)) : (s.remove(r), this.st.delete(r)));
932
1046
  }
933
- return ge;
1047
+ return fe;
934
1048
  }
935
1049
  });
936
1050
  /**
@@ -938,7 +1052,7 @@ const ls = On(class extends Mn {
938
1052
  * Copyright 2018 Google LLC
939
1053
  * SPDX-License-Identifier: BSD-3-Clause
940
1054
  */
941
- const Rs = "important", Wr = " !" + Rs, Ve = On(class extends Mn {
1055
+ const Rs = "important", Vr = " !" + Rs, Ve = On(class extends Mn {
942
1056
  constructor(i) {
943
1057
  var e;
944
1058
  if (super(i), i.type !== In.ATTRIBUTE || i.name !== "style" || ((e = i.strings) == null ? void 0 : e.length) > 2)
@@ -960,14 +1074,14 @@ const Rs = "important", Wr = " !" + Rs, Ve = On(class extends Mn {
960
1074
  const s = e[n];
961
1075
  if (s != null) {
962
1076
  this.ft.add(n);
963
- const r = typeof s == "string" && s.endsWith(Wr);
1077
+ const r = typeof s == "string" && s.endsWith(Vr);
964
1078
  n.includes("-") || r ? t.setProperty(n, r ? s.slice(0, -11) : s, r ? Rs : "") : t[n] = s;
965
1079
  }
966
1080
  }
967
- return ge;
1081
+ return fe;
968
1082
  }
969
1083
  });
970
- function Fr(i) {
1084
+ function qr(i) {
971
1085
  return i && i.__esModule && Object.prototype.hasOwnProperty.call(i, "default") ? i.default : i;
972
1086
  }
973
1087
  var vi = {};
@@ -975,58 +1089,58 @@ var vi = {};
975
1089
  function e(o) {
976
1090
  o && o.options && clearTimeout(o.options.timer);
977
1091
  }
978
- function t(o, l, d, h) {
1092
+ function t(o, l, d, u) {
979
1093
  var p = { timer: void 0, lastArgs: [] }, c = function() {
980
- for (var f = this, O = [], H = 0; H < arguments.length; H++)
1094
+ for (var g = this, O = [], H = 0; H < arguments.length; H++)
981
1095
  O[H] = arguments[H];
982
1096
  p.lastArgs = O, p.timer ? clearTimeout(p.timer) : l && d.apply(this, p.lastArgs), p.timer = setTimeout(function() {
983
- l || d.apply(f, p.lastArgs), p.timer = void 0;
1097
+ l || d.apply(g, p.lastArgs), p.timer = void 0;
984
1098
  }, o);
985
1099
  };
986
- return h && (c = c.bind(h)), c.options = p, c;
1100
+ return u && (c = c.bind(u)), c.options = p, c;
987
1101
  }
988
- function n(o, l, d, h) {
1102
+ function n(o, l, d, u) {
989
1103
  var p;
990
- Object.defineProperty(d, h, { configurable: !0, enumerable: !1, get: function() {
1104
+ Object.defineProperty(d, u, { configurable: !0, enumerable: !1, get: function() {
991
1105
  return p;
992
1106
  }, set: function(c) {
993
1107
  p = t(o, l, c, this);
994
1108
  } });
995
1109
  }
996
1110
  function s(o, l, d) {
997
- var h = d.value;
998
- return d.value = t(o, l, h), d;
1111
+ var u = d.value;
1112
+ return d.value = t(o, l, u), d;
999
1113
  }
1000
1114
  function r(o, l) {
1001
- for (var d = [], h = 2; h < arguments.length; h++)
1002
- d[h - 2] = arguments[h];
1115
+ for (var d = [], u = 2; u < arguments.length; u++)
1116
+ d[u - 2] = arguments[u];
1003
1117
  if (d.length === 0)
1004
1118
  throw new Error("function applied debounce decorator should be a method");
1005
1119
  if (d.length === 1)
1006
1120
  throw new Error("method applied debounce decorator should have valid name");
1007
- var p = d[0], c = d[1], f = d.length === 3 && d[2] ? d[2] : Object.getOwnPropertyDescriptor(p, c);
1008
- if (f)
1009
- return s(o, l, f);
1121
+ var p = d[0], c = d[1], g = d.length === 3 && d[2] ? d[2] : Object.getOwnPropertyDescriptor(p, c);
1122
+ if (g)
1123
+ return s(o, l, g);
1010
1124
  n(o, l, p, c);
1011
1125
  }
1012
1126
  function a() {
1013
1127
  for (var o = [], l = 0; l < arguments.length; l++)
1014
1128
  o[l] = arguments[l];
1015
- var d = 500, h = !1;
1129
+ var d = 500, u = !1;
1016
1130
  if (o.length && (typeof o[0] == "number" || typeof o[0] == "object" && o[0].leading !== void 0)) {
1017
1131
  typeof o[0] == "number" && (d = o[0]);
1018
1132
  var p = void 0;
1019
- return typeof o[0] == "object" && o[0].leading !== void 0 && (p = o[0]), 1 < o.length && typeof o[1] == "object" && o[1].leading !== void 0 && (p = o[1]), p && (h = p.leading), function() {
1020
- for (var c = [], f = 0; f < arguments.length; f++)
1021
- c[f] = arguments[f];
1022
- return r.apply(void 0, [d, h].concat(c));
1133
+ return typeof o[0] == "object" && o[0].leading !== void 0 && (p = o[0]), 1 < o.length && typeof o[1] == "object" && o[1].leading !== void 0 && (p = o[1]), p && (u = p.leading), function() {
1134
+ for (var c = [], g = 0; g < arguments.length; g++)
1135
+ c[g] = arguments[g];
1136
+ return r.apply(void 0, [d, u].concat(c));
1023
1137
  };
1024
1138
  }
1025
- return r.apply(void 0, [d, h].concat(o));
1139
+ return r.apply(void 0, [d, u].concat(o));
1026
1140
  }
1027
1141
  Object.defineProperty(i, "__esModule", { value: !0 }), i.cancel = e, i.debounce = a;
1028
1142
  })(vi);
1029
- var N;
1143
+ var P;
1030
1144
  (function(i) {
1031
1145
  i.assertEqual = (s) => s;
1032
1146
  function e(s) {
@@ -1061,7 +1175,7 @@ var N;
1061
1175
  return s.map((a) => typeof a == "string" ? `'${a}'` : a).join(r);
1062
1176
  }
1063
1177
  i.joinValues = n, i.jsonStringifyReplacer = (s, r) => typeof r == "bigint" ? r.toString() : r;
1064
- })(N || (N = {}));
1178
+ })(P || (P = {}));
1065
1179
  var ii;
1066
1180
  (function(i) {
1067
1181
  i.mergeShapes = (e, t) => ({
@@ -1070,7 +1184,7 @@ var ii;
1070
1184
  // second overwrites first
1071
1185
  });
1072
1186
  })(ii || (ii = {}));
1073
- const g = N.arrayToEnum([
1187
+ const f = P.arrayToEnum([
1074
1188
  "string",
1075
1189
  "nan",
1076
1190
  "number",
@@ -1094,25 +1208,25 @@ const g = N.arrayToEnum([
1094
1208
  ]), Me = (i) => {
1095
1209
  switch (typeof i) {
1096
1210
  case "undefined":
1097
- return g.undefined;
1211
+ return f.undefined;
1098
1212
  case "string":
1099
- return g.string;
1213
+ return f.string;
1100
1214
  case "number":
1101
- return isNaN(i) ? g.nan : g.number;
1215
+ return isNaN(i) ? f.nan : f.number;
1102
1216
  case "boolean":
1103
- return g.boolean;
1217
+ return f.boolean;
1104
1218
  case "function":
1105
- return g.function;
1219
+ return f.function;
1106
1220
  case "bigint":
1107
- return g.bigint;
1221
+ return f.bigint;
1108
1222
  case "symbol":
1109
- return g.symbol;
1223
+ return f.symbol;
1110
1224
  case "object":
1111
- return Array.isArray(i) ? g.array : i === null ? g.null : i.then && typeof i.then == "function" && i.catch && typeof i.catch == "function" ? g.promise : typeof Map < "u" && i instanceof Map ? g.map : typeof Set < "u" && i instanceof Set ? g.set : typeof Date < "u" && i instanceof Date ? g.date : g.object;
1225
+ return Array.isArray(i) ? f.array : i === null ? f.null : i.then && typeof i.then == "function" && i.catch && typeof i.catch == "function" ? f.promise : typeof Map < "u" && i instanceof Map ? f.map : typeof Set < "u" && i instanceof Set ? f.set : typeof Date < "u" && i instanceof Date ? f.date : f.object;
1112
1226
  default:
1113
- return g.unknown;
1227
+ return f.unknown;
1114
1228
  }
1115
- }, m = N.arrayToEnum([
1229
+ }, m = P.arrayToEnum([
1116
1230
  "invalid_type",
1117
1231
  "invalid_literal",
1118
1232
  "custom",
@@ -1129,7 +1243,7 @@ const g = N.arrayToEnum([
1129
1243
  "invalid_intersection_types",
1130
1244
  "not_multiple_of",
1131
1245
  "not_finite"
1132
- ]), Vr = (i) => JSON.stringify(i, null, 2).replace(/"([^"]+)":/g, "$1:");
1246
+ ]), Kr = (i) => JSON.stringify(i, null, 2).replace(/"([^"]+)":/g, "$1:");
1133
1247
  class le extends Error {
1134
1248
  constructor(e) {
1135
1249
  super(), this.issues = [], this.addIssue = (n) => {
@@ -1170,7 +1284,7 @@ class le extends Error {
1170
1284
  return this.message;
1171
1285
  }
1172
1286
  get message() {
1173
- return JSON.stringify(this.issues, N.jsonStringifyReplacer, 2);
1287
+ return JSON.stringify(this.issues, P.jsonStringifyReplacer, 2);
1174
1288
  }
1175
1289
  get isEmpty() {
1176
1290
  return this.issues.length === 0;
@@ -1190,22 +1304,22 @@ const It = (i, e) => {
1190
1304
  let t;
1191
1305
  switch (i.code) {
1192
1306
  case m.invalid_type:
1193
- i.received === g.undefined ? t = "Required" : t = `Expected ${i.expected}, received ${i.received}`;
1307
+ i.received === f.undefined ? t = "Required" : t = `Expected ${i.expected}, received ${i.received}`;
1194
1308
  break;
1195
1309
  case m.invalid_literal:
1196
- t = `Invalid literal value, expected ${JSON.stringify(i.expected, N.jsonStringifyReplacer)}`;
1310
+ t = `Invalid literal value, expected ${JSON.stringify(i.expected, P.jsonStringifyReplacer)}`;
1197
1311
  break;
1198
1312
  case m.unrecognized_keys:
1199
- t = `Unrecognized key(s) in object: ${N.joinValues(i.keys, ", ")}`;
1313
+ t = `Unrecognized key(s) in object: ${P.joinValues(i.keys, ", ")}`;
1200
1314
  break;
1201
1315
  case m.invalid_union:
1202
1316
  t = "Invalid input";
1203
1317
  break;
1204
1318
  case m.invalid_union_discriminator:
1205
- t = `Invalid discriminator value. Expected ${N.joinValues(i.options)}`;
1319
+ t = `Invalid discriminator value. Expected ${P.joinValues(i.options)}`;
1206
1320
  break;
1207
1321
  case m.invalid_enum_value:
1208
- t = `Invalid enum value. Expected ${N.joinValues(i.options)}, received '${i.received}'`;
1322
+ t = `Invalid enum value. Expected ${P.joinValues(i.options)}, received '${i.received}'`;
1209
1323
  break;
1210
1324
  case m.invalid_arguments:
1211
1325
  t = "Invalid function arguments";
@@ -1217,7 +1331,7 @@ const It = (i, e) => {
1217
1331
  t = "Invalid date";
1218
1332
  break;
1219
1333
  case m.invalid_string:
1220
- typeof i.validation == "object" ? "includes" in i.validation ? (t = `Invalid input: must include "${i.validation.includes}"`, typeof i.validation.position == "number" && (t = `${t} at one or more positions greater than or equal to ${i.validation.position}`)) : "startsWith" in i.validation ? t = `Invalid input: must start with "${i.validation.startsWith}"` : "endsWith" in i.validation ? t = `Invalid input: must end with "${i.validation.endsWith}"` : N.assertNever(i.validation) : i.validation !== "regex" ? t = `Invalid ${i.validation}` : t = "Invalid";
1334
+ typeof i.validation == "object" ? "includes" in i.validation ? (t = `Invalid input: must include "${i.validation.includes}"`, typeof i.validation.position == "number" && (t = `${t} at one or more positions greater than or equal to ${i.validation.position}`)) : "startsWith" in i.validation ? t = `Invalid input: must start with "${i.validation.startsWith}"` : "endsWith" in i.validation ? t = `Invalid input: must end with "${i.validation.endsWith}"` : P.assertNever(i.validation) : i.validation !== "regex" ? t = `Invalid ${i.validation}` : t = "Invalid";
1221
1335
  break;
1222
1336
  case m.too_small:
1223
1337
  i.type === "array" ? t = `Array must contain ${i.exact ? "exactly" : i.inclusive ? "at least" : "more than"} ${i.minimum} element(s)` : i.type === "string" ? t = `String must contain ${i.exact ? "exactly" : i.inclusive ? "at least" : "over"} ${i.minimum} character(s)` : i.type === "number" ? t = `Number must be ${i.exact ? "exactly equal to " : i.inclusive ? "greater than or equal to " : "greater than "}${i.minimum}` : i.type === "date" ? t = `Date must be ${i.exact ? "exactly equal to " : i.inclusive ? "greater than or equal to " : "greater than "}${new Date(Number(i.minimum))}` : t = "Invalid input";
@@ -1238,16 +1352,16 @@ const It = (i, e) => {
1238
1352
  t = "Number must be finite";
1239
1353
  break;
1240
1354
  default:
1241
- t = e.defaultError, N.assertNever(i);
1355
+ t = e.defaultError, P.assertNever(i);
1242
1356
  }
1243
1357
  return { message: t };
1244
1358
  };
1245
- let Ps = It;
1246
- function qr(i) {
1247
- Ps = i;
1359
+ let Ns = It;
1360
+ function Jr(i) {
1361
+ Ns = i;
1248
1362
  }
1249
1363
  function pn() {
1250
- return Ps;
1364
+ return Ns;
1251
1365
  }
1252
1366
  const mn = (i) => {
1253
1367
  const { data: e, path: t, errorMaps: n, issueData: s } = i, r = [...t, ...s.path || []], a = {
@@ -1263,7 +1377,7 @@ const mn = (i) => {
1263
1377
  path: r,
1264
1378
  message: s.message || o
1265
1379
  };
1266
- }, Kr = [];
1380
+ }, Qr = [];
1267
1381
  function y(i, e) {
1268
1382
  const t = mn({
1269
1383
  issueData: e,
@@ -1279,7 +1393,7 @@ function y(i, e) {
1279
1393
  });
1280
1394
  i.common.issues.push(t);
1281
1395
  }
1282
- class Y {
1396
+ class G {
1283
1397
  constructor() {
1284
1398
  this.value = "valid";
1285
1399
  }
@@ -1305,7 +1419,7 @@ class Y {
1305
1419
  key: await s.key,
1306
1420
  value: await s.value
1307
1421
  });
1308
- return Y.mergeObjectSync(e, n);
1422
+ return G.mergeObjectSync(e, n);
1309
1423
  }
1310
1424
  static mergeObjectSync(e, t) {
1311
1425
  const n = {};
@@ -1320,7 +1434,7 @@ class Y {
1320
1434
  }
1321
1435
  const S = Object.freeze({
1322
1436
  status: "aborted"
1323
- }), Ns = (i) => ({ status: "dirty", value: i }), ee = (i) => ({ status: "valid", value: i }), si = (i) => i.status === "aborted", ri = (i) => i.status === "dirty", Ot = (i) => i.status === "valid", fn = (i) => typeof Promise < "u" && i instanceof Promise;
1437
+ }), Ps = (i) => ({ status: "dirty", value: i }), ee = (i) => ({ status: "valid", value: i }), si = (i) => i.status === "aborted", ri = (i) => i.status === "dirty", Ot = (i) => i.status === "valid", gn = (i) => typeof Promise < "u" && i instanceof Promise;
1324
1438
  var x;
1325
1439
  (function(i) {
1326
1440
  i.errToObj = (e) => typeof e == "string" ? { message: e } : e || {}, i.toString = (e) => typeof e == "string" ? e : e == null ? void 0 : e.message;
@@ -1378,7 +1492,7 @@ class I {
1378
1492
  }
1379
1493
  _processInputParams(e) {
1380
1494
  return {
1381
- status: new Y(),
1495
+ status: new G(),
1382
1496
  ctx: {
1383
1497
  common: e.parent.common,
1384
1498
  data: e.data,
@@ -1391,7 +1505,7 @@ class I {
1391
1505
  }
1392
1506
  _parseSync(e) {
1393
1507
  const t = this._parse(e);
1394
- if (fn(t))
1508
+ if (gn(t))
1395
1509
  throw new Error("Synchronous parse encountered promise.");
1396
1510
  return t;
1397
1511
  }
@@ -1439,7 +1553,7 @@ class I {
1439
1553
  parent: null,
1440
1554
  data: e,
1441
1555
  parsedType: Me(e)
1442
- }, s = this._parse({ data: e, path: n.path, parent: n }), r = await (fn(s) ? s : Promise.resolve(s));
1556
+ }, s = this._parse({ data: e, path: n.path, parent: n }), r = await (gn(s) ? s : Promise.resolve(s));
1443
1557
  return cs(n, r);
1444
1558
  }
1445
1559
  refine(e, t) {
@@ -1469,7 +1583,7 @@ class I {
1469
1583
  return $e.create(this, this._def);
1470
1584
  }
1471
1585
  nullable() {
1472
- return Ye.create(this, this._def);
1586
+ return Ge.create(this, this._def);
1473
1587
  }
1474
1588
  nullish() {
1475
1589
  return this.nullable().optional();
@@ -1481,7 +1595,7 @@ class I {
1481
1595
  return ht.create(this, this._def);
1482
1596
  }
1483
1597
  or(e) {
1484
- return Nt.create([this, e], this._def);
1598
+ return Pt.create([this, e], this._def);
1485
1599
  }
1486
1600
  and(e) {
1487
1601
  return jt.create(this, e, this._def);
@@ -1539,27 +1653,27 @@ class I {
1539
1653
  return this.safeParse(null).success;
1540
1654
  }
1541
1655
  }
1542
- const Jr = /^c[^\s-]{8,}$/i, Gr = /^[a-z][a-z0-9]*$/, Qr = /^[0-9A-HJKMNP-TV-Z]{26}$/, Yr = /^[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, Xr = /^(?!\.)(?!.*\.\.)([A-Z0-9_+-\.]*)[A-Z0-9_+-]@([A-Z0-9][A-Z0-9\-]*\.)+[A-Z]{2,}$/i, ea = "^(\\p{Extended_Pictographic}|\\p{Emoji_Component})+$";
1656
+ const Yr = /^c[^\s-]{8,}$/i, Gr = /^[a-z][a-z0-9]*$/, Xr = /^[0-9A-HJKMNP-TV-Z]{26}$/, ea = /^[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, ta = /^(?!\.)(?!.*\.\.)([A-Z0-9_+-\.]*)[A-Z0-9_+-]@([A-Z0-9][A-Z0-9\-]*\.)+[A-Z]{2,}$/i, na = "^(\\p{Extended_Pictographic}|\\p{Emoji_Component})+$";
1543
1657
  let ti;
1544
- const ta = /^(((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}))$/, na = /^(([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})))$/, ia = (i) => i.precision ? i.offset ? new RegExp(`^\\d{4}-\\d{2}-\\d{2}T\\d{2}:\\d{2}:\\d{2}\\.\\d{${i.precision}}(([+-]\\d{2}(:?\\d{2})?)|Z)$`) : new RegExp(`^\\d{4}-\\d{2}-\\d{2}T\\d{2}:\\d{2}:\\d{2}\\.\\d{${i.precision}}Z$`) : i.precision === 0 ? i.offset ? new RegExp("^\\d{4}-\\d{2}-\\d{2}T\\d{2}:\\d{2}:\\d{2}(([+-]\\d{2}(:?\\d{2})?)|Z)$") : new RegExp("^\\d{4}-\\d{2}-\\d{2}T\\d{2}:\\d{2}:\\d{2}Z$") : i.offset ? new RegExp("^\\d{4}-\\d{2}-\\d{2}T\\d{2}:\\d{2}:\\d{2}(\\.\\d+)?(([+-]\\d{2}(:?\\d{2})?)|Z)$") : new RegExp("^\\d{4}-\\d{2}-\\d{2}T\\d{2}:\\d{2}:\\d{2}(\\.\\d+)?Z$");
1545
- function sa(i, e) {
1546
- return !!((e === "v4" || !e) && ta.test(i) || (e === "v6" || !e) && na.test(i));
1658
+ const ia = /^(((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}))$/, sa = /^(([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})))$/, ra = (i) => i.precision ? i.offset ? new RegExp(`^\\d{4}-\\d{2}-\\d{2}T\\d{2}:\\d{2}:\\d{2}\\.\\d{${i.precision}}(([+-]\\d{2}(:?\\d{2})?)|Z)$`) : new RegExp(`^\\d{4}-\\d{2}-\\d{2}T\\d{2}:\\d{2}:\\d{2}\\.\\d{${i.precision}}Z$`) : i.precision === 0 ? i.offset ? new RegExp("^\\d{4}-\\d{2}-\\d{2}T\\d{2}:\\d{2}:\\d{2}(([+-]\\d{2}(:?\\d{2})?)|Z)$") : new RegExp("^\\d{4}-\\d{2}-\\d{2}T\\d{2}:\\d{2}:\\d{2}Z$") : i.offset ? new RegExp("^\\d{4}-\\d{2}-\\d{2}T\\d{2}:\\d{2}:\\d{2}(\\.\\d+)?(([+-]\\d{2}(:?\\d{2})?)|Z)$") : new RegExp("^\\d{4}-\\d{2}-\\d{2}T\\d{2}:\\d{2}:\\d{2}(\\.\\d+)?Z$");
1659
+ function aa(i, e) {
1660
+ return !!((e === "v4" || !e) && ia.test(i) || (e === "v6" || !e) && sa.test(i));
1547
1661
  }
1548
1662
  class oe extends I {
1549
1663
  _parse(e) {
1550
- if (this._def.coerce && (e.data = String(e.data)), this._getType(e) !== g.string) {
1664
+ if (this._def.coerce && (e.data = String(e.data)), this._getType(e) !== f.string) {
1551
1665
  const s = this._getOrReturnCtx(e);
1552
1666
  return y(
1553
1667
  s,
1554
1668
  {
1555
1669
  code: m.invalid_type,
1556
- expected: g.string,
1670
+ expected: f.string,
1557
1671
  received: s.parsedType
1558
1672
  }
1559
1673
  //
1560
1674
  ), S;
1561
1675
  }
1562
- const t = new Y();
1676
+ const t = new G();
1563
1677
  let n;
1564
1678
  for (const s of this._def.checks)
1565
1679
  if (s.kind === "min")
@@ -1598,25 +1712,25 @@ class oe extends I {
1598
1712
  message: s.message
1599
1713
  }), t.dirty());
1600
1714
  } else if (s.kind === "email")
1601
- Xr.test(e.data) || (n = this._getOrReturnCtx(e, n), y(n, {
1715
+ ta.test(e.data) || (n = this._getOrReturnCtx(e, n), y(n, {
1602
1716
  validation: "email",
1603
1717
  code: m.invalid_string,
1604
1718
  message: s.message
1605
1719
  }), t.dirty());
1606
1720
  else if (s.kind === "emoji")
1607
- ti || (ti = new RegExp(ea, "u")), ti.test(e.data) || (n = this._getOrReturnCtx(e, n), y(n, {
1721
+ ti || (ti = new RegExp(na, "u")), ti.test(e.data) || (n = this._getOrReturnCtx(e, n), y(n, {
1608
1722
  validation: "emoji",
1609
1723
  code: m.invalid_string,
1610
1724
  message: s.message
1611
1725
  }), t.dirty());
1612
1726
  else if (s.kind === "uuid")
1613
- Yr.test(e.data) || (n = this._getOrReturnCtx(e, n), y(n, {
1727
+ ea.test(e.data) || (n = this._getOrReturnCtx(e, n), y(n, {
1614
1728
  validation: "uuid",
1615
1729
  code: m.invalid_string,
1616
1730
  message: s.message
1617
1731
  }), t.dirty());
1618
1732
  else if (s.kind === "cuid")
1619
- Jr.test(e.data) || (n = this._getOrReturnCtx(e, n), y(n, {
1733
+ Yr.test(e.data) || (n = this._getOrReturnCtx(e, n), y(n, {
1620
1734
  validation: "cuid",
1621
1735
  code: m.invalid_string,
1622
1736
  message: s.message
@@ -1628,7 +1742,7 @@ class oe extends I {
1628
1742
  message: s.message
1629
1743
  }), t.dirty());
1630
1744
  else if (s.kind === "ulid")
1631
- Qr.test(e.data) || (n = this._getOrReturnCtx(e, n), y(n, {
1745
+ Xr.test(e.data) || (n = this._getOrReturnCtx(e, n), y(n, {
1632
1746
  validation: "ulid",
1633
1747
  code: m.invalid_string,
1634
1748
  message: s.message
@@ -1660,15 +1774,15 @@ class oe extends I {
1660
1774
  code: m.invalid_string,
1661
1775
  validation: { endsWith: s.value },
1662
1776
  message: s.message
1663
- }), t.dirty()) : s.kind === "datetime" ? ia(s).test(e.data) || (n = this._getOrReturnCtx(e, n), y(n, {
1777
+ }), t.dirty()) : s.kind === "datetime" ? ra(s).test(e.data) || (n = this._getOrReturnCtx(e, n), y(n, {
1664
1778
  code: m.invalid_string,
1665
1779
  validation: "datetime",
1666
1780
  message: s.message
1667
- }), t.dirty()) : s.kind === "ip" ? sa(e.data, s.version) || (n = this._getOrReturnCtx(e, n), y(n, {
1781
+ }), t.dirty()) : s.kind === "ip" ? aa(e.data, s.version) || (n = this._getOrReturnCtx(e, n), y(n, {
1668
1782
  validation: "ip",
1669
1783
  code: m.invalid_string,
1670
1784
  message: s.message
1671
- }), t.dirty()) : N.assertNever(s);
1785
+ }), t.dirty()) : P.assertNever(s);
1672
1786
  return { status: t.value, value: e.data };
1673
1787
  }
1674
1788
  _regex(e, t, n) {
@@ -1846,27 +1960,27 @@ oe.create = (i) => {
1846
1960
  ...A(i)
1847
1961
  });
1848
1962
  };
1849
- function ra(i, e) {
1963
+ function oa(i, e) {
1850
1964
  const t = (i.toString().split(".")[1] || "").length, n = (e.toString().split(".")[1] || "").length, s = t > n ? t : n, r = parseInt(i.toFixed(s).replace(".", "")), a = parseInt(e.toFixed(s).replace(".", ""));
1851
1965
  return r % a / Math.pow(10, s);
1852
1966
  }
1853
- class Pe extends I {
1967
+ class Ne extends I {
1854
1968
  constructor() {
1855
1969
  super(...arguments), this.min = this.gte, this.max = this.lte, this.step = this.multipleOf;
1856
1970
  }
1857
1971
  _parse(e) {
1858
- if (this._def.coerce && (e.data = Number(e.data)), this._getType(e) !== g.number) {
1972
+ if (this._def.coerce && (e.data = Number(e.data)), this._getType(e) !== f.number) {
1859
1973
  const s = this._getOrReturnCtx(e);
1860
1974
  return y(s, {
1861
1975
  code: m.invalid_type,
1862
- expected: g.number,
1976
+ expected: f.number,
1863
1977
  received: s.parsedType
1864
1978
  }), S;
1865
1979
  }
1866
1980
  let t;
1867
- const n = new Y();
1981
+ const n = new G();
1868
1982
  for (const s of this._def.checks)
1869
- s.kind === "int" ? N.isInteger(e.data) || (t = this._getOrReturnCtx(e, t), y(t, {
1983
+ s.kind === "int" ? P.isInteger(e.data) || (t = this._getOrReturnCtx(e, t), y(t, {
1870
1984
  code: m.invalid_type,
1871
1985
  expected: "integer",
1872
1986
  received: "float",
@@ -1885,14 +1999,14 @@ class Pe extends I {
1885
1999
  inclusive: s.inclusive,
1886
2000
  exact: !1,
1887
2001
  message: s.message
1888
- }), n.dirty()) : s.kind === "multipleOf" ? ra(e.data, s.value) !== 0 && (t = this._getOrReturnCtx(e, t), y(t, {
2002
+ }), n.dirty()) : s.kind === "multipleOf" ? oa(e.data, s.value) !== 0 && (t = this._getOrReturnCtx(e, t), y(t, {
1889
2003
  code: m.not_multiple_of,
1890
2004
  multipleOf: s.value,
1891
2005
  message: s.message
1892
2006
  }), n.dirty()) : s.kind === "finite" ? Number.isFinite(e.data) || (t = this._getOrReturnCtx(e, t), y(t, {
1893
2007
  code: m.not_finite,
1894
2008
  message: s.message
1895
- }), n.dirty()) : N.assertNever(s);
2009
+ }), n.dirty()) : P.assertNever(s);
1896
2010
  return { status: n.value, value: e.data };
1897
2011
  }
1898
2012
  gte(e, t) {
@@ -1908,7 +2022,7 @@ class Pe extends I {
1908
2022
  return this.setLimit("max", e, !1, x.toString(t));
1909
2023
  }
1910
2024
  setLimit(e, t, n, s) {
1911
- return new Pe({
2025
+ return new Ne({
1912
2026
  ...this._def,
1913
2027
  checks: [
1914
2028
  ...this._def.checks,
@@ -1922,7 +2036,7 @@ class Pe extends I {
1922
2036
  });
1923
2037
  }
1924
2038
  _addCheck(e) {
1925
- return new Pe({
2039
+ return new Ne({
1926
2040
  ...this._def,
1927
2041
  checks: [...this._def.checks, e]
1928
2042
  });
@@ -2004,7 +2118,7 @@ class Pe extends I {
2004
2118
  return e;
2005
2119
  }
2006
2120
  get isInt() {
2007
- return !!this._def.checks.find((e) => e.kind === "int" || e.kind === "multipleOf" && N.isInteger(e.value));
2121
+ return !!this._def.checks.find((e) => e.kind === "int" || e.kind === "multipleOf" && P.isInteger(e.value));
2008
2122
  }
2009
2123
  get isFinite() {
2010
2124
  let e = null, t = null;
@@ -2016,27 +2130,27 @@ class Pe extends I {
2016
2130
  return Number.isFinite(t) && Number.isFinite(e);
2017
2131
  }
2018
2132
  }
2019
- Pe.create = (i) => new Pe({
2133
+ Ne.create = (i) => new Ne({
2020
2134
  checks: [],
2021
2135
  typeName: T.ZodNumber,
2022
2136
  coerce: (i == null ? void 0 : i.coerce) || !1,
2023
2137
  ...A(i)
2024
2138
  });
2025
- class Ne extends I {
2139
+ class Pe extends I {
2026
2140
  constructor() {
2027
2141
  super(...arguments), this.min = this.gte, this.max = this.lte;
2028
2142
  }
2029
2143
  _parse(e) {
2030
- if (this._def.coerce && (e.data = BigInt(e.data)), this._getType(e) !== g.bigint) {
2144
+ if (this._def.coerce && (e.data = BigInt(e.data)), this._getType(e) !== f.bigint) {
2031
2145
  const s = this._getOrReturnCtx(e);
2032
2146
  return y(s, {
2033
2147
  code: m.invalid_type,
2034
- expected: g.bigint,
2148
+ expected: f.bigint,
2035
2149
  received: s.parsedType
2036
2150
  }), S;
2037
2151
  }
2038
2152
  let t;
2039
- const n = new Y();
2153
+ const n = new G();
2040
2154
  for (const s of this._def.checks)
2041
2155
  s.kind === "min" ? (s.inclusive ? e.data < s.value : e.data <= s.value) && (t = this._getOrReturnCtx(e, t), y(t, {
2042
2156
  code: m.too_small,
@@ -2054,7 +2168,7 @@ class Ne extends I {
2054
2168
  code: m.not_multiple_of,
2055
2169
  multipleOf: s.value,
2056
2170
  message: s.message
2057
- }), n.dirty()) : N.assertNever(s);
2171
+ }), n.dirty()) : P.assertNever(s);
2058
2172
  return { status: n.value, value: e.data };
2059
2173
  }
2060
2174
  gte(e, t) {
@@ -2070,7 +2184,7 @@ class Ne extends I {
2070
2184
  return this.setLimit("max", e, !1, x.toString(t));
2071
2185
  }
2072
2186
  setLimit(e, t, n, s) {
2073
- return new Ne({
2187
+ return new Pe({
2074
2188
  ...this._def,
2075
2189
  checks: [
2076
2190
  ...this._def.checks,
@@ -2084,7 +2198,7 @@ class Ne extends I {
2084
2198
  });
2085
2199
  }
2086
2200
  _addCheck(e) {
2087
- return new Ne({
2201
+ return new Pe({
2088
2202
  ...this._def,
2089
2203
  checks: [...this._def.checks, e]
2090
2204
  });
@@ -2141,9 +2255,9 @@ class Ne extends I {
2141
2255
  return e;
2142
2256
  }
2143
2257
  }
2144
- Ne.create = (i) => {
2258
+ Pe.create = (i) => {
2145
2259
  var e;
2146
- return new Ne({
2260
+ return new Pe({
2147
2261
  checks: [],
2148
2262
  typeName: T.ZodBigInt,
2149
2263
  coerce: (e = i == null ? void 0 : i.coerce) !== null && e !== void 0 ? e : !1,
@@ -2152,11 +2266,11 @@ Ne.create = (i) => {
2152
2266
  };
2153
2267
  class Mt extends I {
2154
2268
  _parse(e) {
2155
- if (this._def.coerce && (e.data = !!e.data), this._getType(e) !== g.boolean) {
2269
+ if (this._def.coerce && (e.data = !!e.data), this._getType(e) !== f.boolean) {
2156
2270
  const t = this._getOrReturnCtx(e);
2157
2271
  return y(t, {
2158
2272
  code: m.invalid_type,
2159
- expected: g.boolean,
2273
+ expected: f.boolean,
2160
2274
  received: t.parsedType
2161
2275
  }), S;
2162
2276
  }
@@ -2168,13 +2282,13 @@ Mt.create = (i) => new Mt({
2168
2282
  coerce: (i == null ? void 0 : i.coerce) || !1,
2169
2283
  ...A(i)
2170
2284
  });
2171
- class Ge extends I {
2285
+ class Qe extends I {
2172
2286
  _parse(e) {
2173
- if (this._def.coerce && (e.data = new Date(e.data)), this._getType(e) !== g.date) {
2287
+ if (this._def.coerce && (e.data = new Date(e.data)), this._getType(e) !== f.date) {
2174
2288
  const s = this._getOrReturnCtx(e);
2175
2289
  return y(s, {
2176
2290
  code: m.invalid_type,
2177
- expected: g.date,
2291
+ expected: f.date,
2178
2292
  received: s.parsedType
2179
2293
  }), S;
2180
2294
  }
@@ -2184,7 +2298,7 @@ class Ge extends I {
2184
2298
  code: m.invalid_date
2185
2299
  }), S;
2186
2300
  }
2187
- const t = new Y();
2301
+ const t = new G();
2188
2302
  let n;
2189
2303
  for (const s of this._def.checks)
2190
2304
  s.kind === "min" ? e.data.getTime() < s.value && (n = this._getOrReturnCtx(e, n), y(n, {
@@ -2201,14 +2315,14 @@ class Ge extends I {
2201
2315
  exact: !1,
2202
2316
  maximum: s.value,
2203
2317
  type: "date"
2204
- }), t.dirty()) : N.assertNever(s);
2318
+ }), t.dirty()) : P.assertNever(s);
2205
2319
  return {
2206
2320
  status: t.value,
2207
2321
  value: new Date(e.data.getTime())
2208
2322
  };
2209
2323
  }
2210
2324
  _addCheck(e) {
2211
- return new Ge({
2325
+ return new Qe({
2212
2326
  ...this._def,
2213
2327
  checks: [...this._def.checks, e]
2214
2328
  });
@@ -2240,36 +2354,36 @@ class Ge extends I {
2240
2354
  return e != null ? new Date(e) : null;
2241
2355
  }
2242
2356
  }
2243
- Ge.create = (i) => new Ge({
2357
+ Qe.create = (i) => new Qe({
2244
2358
  checks: [],
2245
2359
  coerce: (i == null ? void 0 : i.coerce) || !1,
2246
2360
  typeName: T.ZodDate,
2247
2361
  ...A(i)
2248
2362
  });
2249
- class gn extends I {
2363
+ class fn extends I {
2250
2364
  _parse(e) {
2251
- if (this._getType(e) !== g.symbol) {
2365
+ if (this._getType(e) !== f.symbol) {
2252
2366
  const t = this._getOrReturnCtx(e);
2253
2367
  return y(t, {
2254
2368
  code: m.invalid_type,
2255
- expected: g.symbol,
2369
+ expected: f.symbol,
2256
2370
  received: t.parsedType
2257
2371
  }), S;
2258
2372
  }
2259
2373
  return ee(e.data);
2260
2374
  }
2261
2375
  }
2262
- gn.create = (i) => new gn({
2376
+ fn.create = (i) => new fn({
2263
2377
  typeName: T.ZodSymbol,
2264
2378
  ...A(i)
2265
2379
  });
2266
2380
  class Rt extends I {
2267
2381
  _parse(e) {
2268
- if (this._getType(e) !== g.undefined) {
2382
+ if (this._getType(e) !== f.undefined) {
2269
2383
  const t = this._getOrReturnCtx(e);
2270
2384
  return y(t, {
2271
2385
  code: m.invalid_type,
2272
- expected: g.undefined,
2386
+ expected: f.undefined,
2273
2387
  received: t.parsedType
2274
2388
  }), S;
2275
2389
  }
@@ -2280,24 +2394,24 @@ Rt.create = (i) => new Rt({
2280
2394
  typeName: T.ZodUndefined,
2281
2395
  ...A(i)
2282
2396
  });
2283
- class Pt extends I {
2397
+ class Nt extends I {
2284
2398
  _parse(e) {
2285
- if (this._getType(e) !== g.null) {
2399
+ if (this._getType(e) !== f.null) {
2286
2400
  const t = this._getOrReturnCtx(e);
2287
2401
  return y(t, {
2288
2402
  code: m.invalid_type,
2289
- expected: g.null,
2403
+ expected: f.null,
2290
2404
  received: t.parsedType
2291
2405
  }), S;
2292
2406
  }
2293
2407
  return ee(e.data);
2294
2408
  }
2295
2409
  }
2296
- Pt.create = (i) => new Pt({
2410
+ Nt.create = (i) => new Nt({
2297
2411
  typeName: T.ZodNull,
2298
2412
  ...A(i)
2299
2413
  });
2300
- class dt extends I {
2414
+ class ut extends I {
2301
2415
  constructor() {
2302
2416
  super(...arguments), this._any = !0;
2303
2417
  }
@@ -2305,7 +2419,7 @@ class dt extends I {
2305
2419
  return ee(e.data);
2306
2420
  }
2307
2421
  }
2308
- dt.create = (i) => new dt({
2422
+ ut.create = (i) => new ut({
2309
2423
  typeName: T.ZodAny,
2310
2424
  ...A(i)
2311
2425
  });
@@ -2326,7 +2440,7 @@ class Te extends I {
2326
2440
  const t = this._getOrReturnCtx(e);
2327
2441
  return y(t, {
2328
2442
  code: m.invalid_type,
2329
- expected: g.never,
2443
+ expected: f.never,
2330
2444
  received: t.parsedType
2331
2445
  }), S;
2332
2446
  }
@@ -2337,11 +2451,11 @@ Te.create = (i) => new Te({
2337
2451
  });
2338
2452
  class yn extends I {
2339
2453
  _parse(e) {
2340
- if (this._getType(e) !== g.undefined) {
2454
+ if (this._getType(e) !== f.undefined) {
2341
2455
  const t = this._getOrReturnCtx(e);
2342
2456
  return y(t, {
2343
2457
  code: m.invalid_type,
2344
- expected: g.void,
2458
+ expected: f.void,
2345
2459
  received: t.parsedType
2346
2460
  }), S;
2347
2461
  }
@@ -2355,10 +2469,10 @@ yn.create = (i) => new yn({
2355
2469
  class ce extends I {
2356
2470
  _parse(e) {
2357
2471
  const { ctx: t, status: n } = this._processInputParams(e), s = this._def;
2358
- if (t.parsedType !== g.array)
2472
+ if (t.parsedType !== f.array)
2359
2473
  return y(t, {
2360
2474
  code: m.invalid_type,
2361
- expected: g.array,
2475
+ expected: f.array,
2362
2476
  received: t.parsedType
2363
2477
  }), S;
2364
2478
  if (s.exactLength !== null) {
@@ -2388,9 +2502,9 @@ class ce extends I {
2388
2502
  exact: !1,
2389
2503
  message: s.maxLength.message
2390
2504
  }), n.dirty()), t.common.async)
2391
- return Promise.all([...t.data].map((a, o) => s.type._parseAsync(new ye(t, a, t.path, o)))).then((a) => Y.mergeArray(n, a));
2505
+ return Promise.all([...t.data].map((a, o) => s.type._parseAsync(new ye(t, a, t.path, o)))).then((a) => G.mergeArray(n, a));
2392
2506
  const r = [...t.data].map((a, o) => s.type._parseSync(new ye(t, a, t.path, o)));
2393
- return Y.mergeArray(n, r);
2507
+ return G.mergeArray(n, r);
2394
2508
  }
2395
2509
  get element() {
2396
2510
  return this._def.type;
@@ -2440,7 +2554,7 @@ function ot(i) {
2440
2554
  return i instanceof ce ? new ce({
2441
2555
  ...i._def,
2442
2556
  type: ot(i.element)
2443
- }) : i instanceof $e ? $e.create(ot(i.unwrap())) : i instanceof Ye ? Ye.create(ot(i.unwrap())) : i instanceof ve ? ve.create(i.items.map((e) => ot(e))) : i;
2557
+ }) : i instanceof $e ? $e.create(ot(i.unwrap())) : i instanceof Ge ? Ge.create(ot(i.unwrap())) : i instanceof ve ? ve.create(i.items.map((e) => ot(e))) : i;
2444
2558
  }
2445
2559
  class F extends I {
2446
2560
  constructor() {
@@ -2449,15 +2563,15 @@ class F extends I {
2449
2563
  _getCached() {
2450
2564
  if (this._cached !== null)
2451
2565
  return this._cached;
2452
- const e = this._def.shape(), t = N.objectKeys(e);
2566
+ const e = this._def.shape(), t = P.objectKeys(e);
2453
2567
  return this._cached = { shape: e, keys: t };
2454
2568
  }
2455
2569
  _parse(e) {
2456
- if (this._getType(e) !== g.object) {
2570
+ if (this._getType(e) !== f.object) {
2457
2571
  const l = this._getOrReturnCtx(e);
2458
2572
  return y(l, {
2459
2573
  code: m.invalid_type,
2460
- expected: g.object,
2574
+ expected: f.object,
2461
2575
  received: l.parsedType
2462
2576
  }), S;
2463
2577
  }
@@ -2467,10 +2581,10 @@ class F extends I {
2467
2581
  r.includes(l) || a.push(l);
2468
2582
  const o = [];
2469
2583
  for (const l of r) {
2470
- const d = s[l], h = n.data[l];
2584
+ const d = s[l], u = n.data[l];
2471
2585
  o.push({
2472
2586
  key: { status: "valid", value: l },
2473
- value: d._parse(new ye(n, h, n.path, l)),
2587
+ value: d._parse(new ye(n, u, n.path, l)),
2474
2588
  alwaysSet: l in n.data
2475
2589
  });
2476
2590
  }
@@ -2492,11 +2606,11 @@ class F extends I {
2492
2606
  } else {
2493
2607
  const l = this._def.catchall;
2494
2608
  for (const d of a) {
2495
- const h = n.data[d];
2609
+ const u = n.data[d];
2496
2610
  o.push({
2497
2611
  key: { status: "valid", value: d },
2498
2612
  value: l._parse(
2499
- new ye(n, h, n.path, d)
2613
+ new ye(n, u, n.path, d)
2500
2614
  //, ctx.child(key), value, getParsedType(value)
2501
2615
  ),
2502
2616
  alwaysSet: d in n.data
@@ -2506,15 +2620,15 @@ class F extends I {
2506
2620
  return n.common.async ? Promise.resolve().then(async () => {
2507
2621
  const l = [];
2508
2622
  for (const d of o) {
2509
- const h = await d.key;
2623
+ const u = await d.key;
2510
2624
  l.push({
2511
- key: h,
2625
+ key: u,
2512
2626
  value: await d.value,
2513
2627
  alwaysSet: d.alwaysSet
2514
2628
  });
2515
2629
  }
2516
2630
  return l;
2517
- }).then((l) => Y.mergeObjectSync(t, l)) : Y.mergeObjectSync(t, o);
2631
+ }).then((l) => G.mergeObjectSync(t, l)) : G.mergeObjectSync(t, o);
2518
2632
  }
2519
2633
  get shape() {
2520
2634
  return this._def.shape();
@@ -2657,7 +2771,7 @@ class F extends I {
2657
2771
  }
2658
2772
  pick(e) {
2659
2773
  const t = {};
2660
- return N.objectKeys(e).forEach((n) => {
2774
+ return P.objectKeys(e).forEach((n) => {
2661
2775
  e[n] && this.shape[n] && (t[n] = this.shape[n]);
2662
2776
  }), new F({
2663
2777
  ...this._def,
@@ -2666,7 +2780,7 @@ class F extends I {
2666
2780
  }
2667
2781
  omit(e) {
2668
2782
  const t = {};
2669
- return N.objectKeys(this.shape).forEach((n) => {
2783
+ return P.objectKeys(this.shape).forEach((n) => {
2670
2784
  e[n] || (t[n] = this.shape[n]);
2671
2785
  }), new F({
2672
2786
  ...this._def,
@@ -2681,7 +2795,7 @@ class F extends I {
2681
2795
  }
2682
2796
  partial(e) {
2683
2797
  const t = {};
2684
- return N.objectKeys(this.shape).forEach((n) => {
2798
+ return P.objectKeys(this.shape).forEach((n) => {
2685
2799
  const s = this.shape[n];
2686
2800
  e && !e[n] ? t[n] = s : t[n] = s.optional();
2687
2801
  }), new F({
@@ -2691,7 +2805,7 @@ class F extends I {
2691
2805
  }
2692
2806
  required(e) {
2693
2807
  const t = {};
2694
- return N.objectKeys(this.shape).forEach((n) => {
2808
+ return P.objectKeys(this.shape).forEach((n) => {
2695
2809
  if (e && !e[n])
2696
2810
  t[n] = this.shape[n];
2697
2811
  else {
@@ -2706,7 +2820,7 @@ class F extends I {
2706
2820
  });
2707
2821
  }
2708
2822
  keyof() {
2709
- return js(N.objectKeys(this.shape));
2823
+ return js(P.objectKeys(this.shape));
2710
2824
  }
2711
2825
  }
2712
2826
  F.create = (i, e) => new F({
@@ -2730,7 +2844,7 @@ F.lazycreate = (i, e) => new F({
2730
2844
  typeName: T.ZodObject,
2731
2845
  ...A(e)
2732
2846
  });
2733
- class Nt extends I {
2847
+ class Pt extends I {
2734
2848
  _parse(e) {
2735
2849
  const { ctx: t } = this._processInputParams(e), n = this._def.options;
2736
2850
  function s(r) {
@@ -2776,14 +2890,14 @@ class Nt extends I {
2776
2890
  issues: []
2777
2891
  },
2778
2892
  parent: null
2779
- }, h = l._parseSync({
2893
+ }, u = l._parseSync({
2780
2894
  data: t.data,
2781
2895
  path: t.path,
2782
2896
  parent: d
2783
2897
  });
2784
- if (h.status === "valid")
2785
- return h;
2786
- h.status === "dirty" && !r && (r = { result: h, ctx: d }), d.common.issues.length && a.push(d.common.issues);
2898
+ if (u.status === "valid")
2899
+ return u;
2900
+ u.status === "dirty" && !r && (r = { result: u, ctx: d }), d.common.issues.length && a.push(d.common.issues);
2787
2901
  }
2788
2902
  if (r)
2789
2903
  return t.common.issues.push(...r.ctx.common.issues), r.result;
@@ -2798,19 +2912,19 @@ class Nt extends I {
2798
2912
  return this._def.options;
2799
2913
  }
2800
2914
  }
2801
- Nt.create = (i, e) => new Nt({
2915
+ Pt.create = (i, e) => new Pt({
2802
2916
  options: i,
2803
2917
  typeName: T.ZodUnion,
2804
2918
  ...A(e)
2805
2919
  });
2806
- const rn = (i) => i instanceof Zt ? rn(i.schema) : i instanceof de ? rn(i.innerType()) : i instanceof Lt ? [i.value] : i instanceof je ? i.options : i instanceof Dt ? Object.keys(i.enum) : i instanceof Ut ? rn(i._def.innerType) : i instanceof Rt ? [void 0] : i instanceof Pt ? [null] : null;
2807
- class Rn extends I {
2920
+ const rn = (i) => i instanceof Zt ? rn(i.schema) : i instanceof de ? rn(i.innerType()) : i instanceof Lt ? [i.value] : i instanceof je ? i.options : i instanceof Dt ? Object.keys(i.enum) : i instanceof Ut ? rn(i._def.innerType) : i instanceof Rt ? [void 0] : i instanceof Nt ? [null] : null;
2921
+ class Nn extends I {
2808
2922
  _parse(e) {
2809
2923
  const { ctx: t } = this._processInputParams(e);
2810
- if (t.parsedType !== g.object)
2924
+ if (t.parsedType !== f.object)
2811
2925
  return y(t, {
2812
2926
  code: m.invalid_type,
2813
- expected: g.object,
2927
+ expected: f.object,
2814
2928
  received: t.parsedType
2815
2929
  }), S;
2816
2930
  const n = this.discriminator, s = t.data[n], r = this.optionsMap.get(s);
@@ -2857,7 +2971,7 @@ class Rn extends I {
2857
2971
  s.set(o, r);
2858
2972
  }
2859
2973
  }
2860
- return new Rn({
2974
+ return new Nn({
2861
2975
  typeName: T.ZodDiscriminatedUnion,
2862
2976
  discriminator: e,
2863
2977
  options: t,
@@ -2870,8 +2984,8 @@ function ai(i, e) {
2870
2984
  const t = Me(i), n = Me(e);
2871
2985
  if (i === e)
2872
2986
  return { valid: !0, data: i };
2873
- if (t === g.object && n === g.object) {
2874
- const s = N.objectKeys(e), r = N.objectKeys(i).filter((o) => s.indexOf(o) !== -1), a = { ...i, ...e };
2987
+ if (t === f.object && n === f.object) {
2988
+ const s = P.objectKeys(e), r = P.objectKeys(i).filter((o) => s.indexOf(o) !== -1), a = { ...i, ...e };
2875
2989
  for (const o of r) {
2876
2990
  const l = ai(i[o], e[o]);
2877
2991
  if (!l.valid)
@@ -2879,7 +2993,7 @@ function ai(i, e) {
2879
2993
  a[o] = l.data;
2880
2994
  }
2881
2995
  return { valid: !0, data: a };
2882
- } else if (t === g.array && n === g.array) {
2996
+ } else if (t === f.array && n === f.array) {
2883
2997
  if (i.length !== e.length)
2884
2998
  return { valid: !1 };
2885
2999
  const s = [];
@@ -2891,7 +3005,7 @@ function ai(i, e) {
2891
3005
  }
2892
3006
  return { valid: !0, data: s };
2893
3007
  } else
2894
- return t === g.date && n === g.date && +i == +e ? { valid: !0, data: i } : { valid: !1 };
3008
+ return t === f.date && n === f.date && +i == +e ? { valid: !0, data: i } : { valid: !1 };
2895
3009
  }
2896
3010
  class jt extends I {
2897
3011
  _parse(e) {
@@ -2934,10 +3048,10 @@ jt.create = (i, e, t) => new jt({
2934
3048
  class ve extends I {
2935
3049
  _parse(e) {
2936
3050
  const { status: t, ctx: n } = this._processInputParams(e);
2937
- if (n.parsedType !== g.array)
3051
+ if (n.parsedType !== f.array)
2938
3052
  return y(n, {
2939
3053
  code: m.invalid_type,
2940
- expected: g.array,
3054
+ expected: f.array,
2941
3055
  received: n.parsedType
2942
3056
  }), S;
2943
3057
  if (n.data.length < this._def.items.length)
@@ -2959,7 +3073,7 @@ class ve extends I {
2959
3073
  const o = this._def.items[a] || this._def.rest;
2960
3074
  return o ? o._parse(new ye(n, r, n.path, a)) : null;
2961
3075
  }).filter((r) => !!r);
2962
- return n.common.async ? Promise.all(s).then((r) => Y.mergeArray(t, r)) : Y.mergeArray(t, s);
3076
+ return n.common.async ? Promise.all(s).then((r) => G.mergeArray(t, r)) : G.mergeArray(t, s);
2963
3077
  }
2964
3078
  get items() {
2965
3079
  return this._def.items;
@@ -2990,10 +3104,10 @@ class zt extends I {
2990
3104
  }
2991
3105
  _parse(e) {
2992
3106
  const { status: t, ctx: n } = this._processInputParams(e);
2993
- if (n.parsedType !== g.object)
3107
+ if (n.parsedType !== f.object)
2994
3108
  return y(n, {
2995
3109
  code: m.invalid_type,
2996
- expected: g.object,
3110
+ expected: f.object,
2997
3111
  received: n.parsedType
2998
3112
  }), S;
2999
3113
  const s = [], r = this._def.keyType, a = this._def.valueType;
@@ -3002,7 +3116,7 @@ class zt extends I {
3002
3116
  key: r._parse(new ye(n, o, n.path, o)),
3003
3117
  value: a._parse(new ye(n, n.data[o], n.path, o))
3004
3118
  });
3005
- return n.common.async ? Y.mergeObjectAsync(t, s) : Y.mergeObjectSync(t, s);
3119
+ return n.common.async ? G.mergeObjectAsync(t, s) : G.mergeObjectSync(t, s);
3006
3120
  }
3007
3121
  get element() {
3008
3122
  return this._def.valueType;
@@ -3030,10 +3144,10 @@ class vn extends I {
3030
3144
  }
3031
3145
  _parse(e) {
3032
3146
  const { status: t, ctx: n } = this._processInputParams(e);
3033
- if (n.parsedType !== g.map)
3147
+ if (n.parsedType !== f.map)
3034
3148
  return y(n, {
3035
3149
  code: m.invalid_type,
3036
- expected: g.map,
3150
+ expected: f.map,
3037
3151
  received: n.parsedType
3038
3152
  }), S;
3039
3153
  const s = this._def.keyType, r = this._def.valueType, a = [...n.data.entries()].map(([o, l], d) => ({
@@ -3044,20 +3158,20 @@ class vn extends I {
3044
3158
  const o = /* @__PURE__ */ new Map();
3045
3159
  return Promise.resolve().then(async () => {
3046
3160
  for (const l of a) {
3047
- const d = await l.key, h = await l.value;
3048
- if (d.status === "aborted" || h.status === "aborted")
3161
+ const d = await l.key, u = await l.value;
3162
+ if (d.status === "aborted" || u.status === "aborted")
3049
3163
  return S;
3050
- (d.status === "dirty" || h.status === "dirty") && t.dirty(), o.set(d.value, h.value);
3164
+ (d.status === "dirty" || u.status === "dirty") && t.dirty(), o.set(d.value, u.value);
3051
3165
  }
3052
3166
  return { status: t.value, value: o };
3053
3167
  });
3054
3168
  } else {
3055
3169
  const o = /* @__PURE__ */ new Map();
3056
3170
  for (const l of a) {
3057
- const d = l.key, h = l.value;
3058
- if (d.status === "aborted" || h.status === "aborted")
3171
+ const d = l.key, u = l.value;
3172
+ if (d.status === "aborted" || u.status === "aborted")
3059
3173
  return S;
3060
- (d.status === "dirty" || h.status === "dirty") && t.dirty(), o.set(d.value, h.value);
3174
+ (d.status === "dirty" || u.status === "dirty") && t.dirty(), o.set(d.value, u.value);
3061
3175
  }
3062
3176
  return { status: t.value, value: o };
3063
3177
  }
@@ -3069,13 +3183,13 @@ vn.create = (i, e, t) => new vn({
3069
3183
  typeName: T.ZodMap,
3070
3184
  ...A(t)
3071
3185
  });
3072
- class Qe extends I {
3186
+ class Ye extends I {
3073
3187
  _parse(e) {
3074
3188
  const { status: t, ctx: n } = this._processInputParams(e);
3075
- if (n.parsedType !== g.set)
3189
+ if (n.parsedType !== f.set)
3076
3190
  return y(n, {
3077
3191
  code: m.invalid_type,
3078
- expected: g.set,
3192
+ expected: f.set,
3079
3193
  received: n.parsedType
3080
3194
  }), S;
3081
3195
  const s = this._def;
@@ -3097,10 +3211,10 @@ class Qe extends I {
3097
3211
  const r = this._def.valueType;
3098
3212
  function a(l) {
3099
3213
  const d = /* @__PURE__ */ new Set();
3100
- for (const h of l) {
3101
- if (h.status === "aborted")
3214
+ for (const u of l) {
3215
+ if (u.status === "aborted")
3102
3216
  return S;
3103
- h.status === "dirty" && t.dirty(), d.add(h.value);
3217
+ u.status === "dirty" && t.dirty(), d.add(u.value);
3104
3218
  }
3105
3219
  return { status: t.value, value: d };
3106
3220
  }
@@ -3108,13 +3222,13 @@ class Qe extends I {
3108
3222
  return n.common.async ? Promise.all(o).then((l) => a(l)) : a(o);
3109
3223
  }
3110
3224
  min(e, t) {
3111
- return new Qe({
3225
+ return new Ye({
3112
3226
  ...this._def,
3113
3227
  minSize: { value: e, message: x.toString(t) }
3114
3228
  });
3115
3229
  }
3116
3230
  max(e, t) {
3117
- return new Qe({
3231
+ return new Ye({
3118
3232
  ...this._def,
3119
3233
  maxSize: { value: e, message: x.toString(t) }
3120
3234
  });
@@ -3126,7 +3240,7 @@ class Qe extends I {
3126
3240
  return this.min(1, e);
3127
3241
  }
3128
3242
  }
3129
- Qe.create = (i, e) => new Qe({
3243
+ Ye.create = (i, e) => new Ye({
3130
3244
  valueType: i,
3131
3245
  minSize: null,
3132
3246
  maxSize: null,
@@ -3139,10 +3253,10 @@ class lt extends I {
3139
3253
  }
3140
3254
  _parse(e) {
3141
3255
  const { ctx: t } = this._processInputParams(e);
3142
- if (t.parsedType !== g.function)
3256
+ if (t.parsedType !== f.function)
3143
3257
  return y(t, {
3144
3258
  code: m.invalid_type,
3145
- expected: g.function,
3259
+ expected: f.function,
3146
3260
  received: t.parsedType
3147
3261
  }), S;
3148
3262
  function n(o, l) {
@@ -3181,9 +3295,9 @@ class lt extends I {
3181
3295
  if (this._def.returns instanceof ht) {
3182
3296
  const o = this;
3183
3297
  return ee(async function(...l) {
3184
- const d = new le([]), h = await o._def.args.parseAsync(l, r).catch((c) => {
3298
+ const d = new le([]), u = await o._def.args.parseAsync(l, r).catch((c) => {
3185
3299
  throw d.addIssue(n(l, c)), d;
3186
- }), p = await Reflect.apply(a, this, h);
3300
+ }), p = await Reflect.apply(a, this, u);
3187
3301
  return await o._def.returns._def.type.parseAsync(p, r).catch((c) => {
3188
3302
  throw d.addIssue(s(p, c)), d;
3189
3303
  });
@@ -3194,9 +3308,9 @@ class lt extends I {
3194
3308
  const d = o._def.args.safeParse(l, r);
3195
3309
  if (!d.success)
3196
3310
  throw new le([n(l, d.error)]);
3197
- const h = Reflect.apply(a, this, d.data), p = o._def.returns.safeParse(h, r);
3311
+ const u = Reflect.apply(a, this, d.data), p = o._def.returns.safeParse(u, r);
3198
3312
  if (!p.success)
3199
- throw new le([s(h, p.error)]);
3313
+ throw new le([s(u, p.error)]);
3200
3314
  return p.data;
3201
3315
  });
3202
3316
  }
@@ -3281,7 +3395,7 @@ class je extends I {
3281
3395
  if (typeof e.data != "string") {
3282
3396
  const t = this._getOrReturnCtx(e), n = this._def.values;
3283
3397
  return y(t, {
3284
- expected: N.joinValues(n),
3398
+ expected: P.joinValues(n),
3285
3399
  received: t.parsedType,
3286
3400
  code: m.invalid_type
3287
3401
  }), S;
@@ -3327,17 +3441,17 @@ class je extends I {
3327
3441
  je.create = js;
3328
3442
  class Dt extends I {
3329
3443
  _parse(e) {
3330
- const t = N.getValidEnumValues(this._def.values), n = this._getOrReturnCtx(e);
3331
- if (n.parsedType !== g.string && n.parsedType !== g.number) {
3332
- const s = N.objectValues(t);
3444
+ const t = P.getValidEnumValues(this._def.values), n = this._getOrReturnCtx(e);
3445
+ if (n.parsedType !== f.string && n.parsedType !== f.number) {
3446
+ const s = P.objectValues(t);
3333
3447
  return y(n, {
3334
- expected: N.joinValues(s),
3448
+ expected: P.joinValues(s),
3335
3449
  received: n.parsedType,
3336
3450
  code: m.invalid_type
3337
3451
  }), S;
3338
3452
  }
3339
3453
  if (t.indexOf(e.data) === -1) {
3340
- const s = N.objectValues(t);
3454
+ const s = P.objectValues(t);
3341
3455
  return y(n, {
3342
3456
  received: n.data,
3343
3457
  code: m.invalid_enum_value,
@@ -3361,13 +3475,13 @@ class ht extends I {
3361
3475
  }
3362
3476
  _parse(e) {
3363
3477
  const { ctx: t } = this._processInputParams(e);
3364
- if (t.parsedType !== g.promise && t.common.async === !1)
3478
+ if (t.parsedType !== f.promise && t.common.async === !1)
3365
3479
  return y(t, {
3366
3480
  code: m.invalid_type,
3367
- expected: g.promise,
3481
+ expected: f.promise,
3368
3482
  received: t.parsedType
3369
3483
  }), S;
3370
- const n = t.parsedType === g.promise ? t.data : Promise.resolve(t.data);
3484
+ const n = t.parsedType === f.promise ? t.data : Promise.resolve(t.data);
3371
3485
  return ee(n.then((s) => this._def.type.parseAsync(s, {
3372
3486
  path: t.path,
3373
3487
  errorMap: t.common.contextualErrorMap
@@ -3444,7 +3558,7 @@ class de extends I {
3444
3558
  return { status: t.value, value: o };
3445
3559
  } else
3446
3560
  return this._def.schema._parseAsync({ data: n.data, path: n.path, parent: n }).then((a) => Ot(a) ? Promise.resolve(s.transform(a.value, r)).then((o) => ({ status: t.value, value: o })) : a);
3447
- N.assertNever(s);
3561
+ P.assertNever(s);
3448
3562
  }
3449
3563
  }
3450
3564
  de.create = (i, e, t) => new de({
@@ -3461,7 +3575,7 @@ de.createWithPreprocess = (i, e, t) => new de({
3461
3575
  });
3462
3576
  class $e extends I {
3463
3577
  _parse(e) {
3464
- return this._getType(e) === g.undefined ? ee(void 0) : this._def.innerType._parse(e);
3578
+ return this._getType(e) === f.undefined ? ee(void 0) : this._def.innerType._parse(e);
3465
3579
  }
3466
3580
  unwrap() {
3467
3581
  return this._def.innerType;
@@ -3472,15 +3586,15 @@ $e.create = (i, e) => new $e({
3472
3586
  typeName: T.ZodOptional,
3473
3587
  ...A(e)
3474
3588
  });
3475
- class Ye extends I {
3589
+ class Ge extends I {
3476
3590
  _parse(e) {
3477
- return this._getType(e) === g.null ? ee(null) : this._def.innerType._parse(e);
3591
+ return this._getType(e) === f.null ? ee(null) : this._def.innerType._parse(e);
3478
3592
  }
3479
3593
  unwrap() {
3480
3594
  return this._def.innerType;
3481
3595
  }
3482
3596
  }
3483
- Ye.create = (i, e) => new Ye({
3597
+ Ge.create = (i, e) => new Ge({
3484
3598
  innerType: i,
3485
3599
  typeName: T.ZodNullable,
3486
3600
  ...A(e)
@@ -3489,7 +3603,7 @@ class Ut extends I {
3489
3603
  _parse(e) {
3490
3604
  const { ctx: t } = this._processInputParams(e);
3491
3605
  let n = t.data;
3492
- return t.parsedType === g.undefined && (n = this._def.defaultValue()), this._def.innerType._parse({
3606
+ return t.parsedType === f.undefined && (n = this._def.defaultValue()), this._def.innerType._parse({
3493
3607
  data: n,
3494
3608
  path: t.path,
3495
3609
  parent: t
@@ -3520,7 +3634,7 @@ class bn extends I {
3520
3634
  ...n
3521
3635
  }
3522
3636
  });
3523
- return fn(s) ? s.then((r) => ({
3637
+ return gn(s) ? s.then((r) => ({
3524
3638
  status: "valid",
3525
3639
  value: r.status === "valid" ? r.value : this._def.catchValue({
3526
3640
  get error() {
@@ -3550,11 +3664,11 @@ bn.create = (i, e) => new bn({
3550
3664
  });
3551
3665
  class wn extends I {
3552
3666
  _parse(e) {
3553
- if (this._getType(e) !== g.nan) {
3667
+ if (this._getType(e) !== f.nan) {
3554
3668
  const t = this._getOrReturnCtx(e);
3555
3669
  return y(t, {
3556
3670
  code: m.invalid_type,
3557
- expected: g.nan,
3671
+ expected: f.nan,
3558
3672
  received: t.parsedType
3559
3673
  }), S;
3560
3674
  }
@@ -3565,7 +3679,7 @@ wn.create = (i) => new wn({
3565
3679
  typeName: T.ZodNaN,
3566
3680
  ...A(i)
3567
3681
  });
3568
- const aa = Symbol("zod_brand");
3682
+ const la = Symbol("zod_brand");
3569
3683
  class zs extends I {
3570
3684
  _parse(e) {
3571
3685
  const { ctx: t } = this._processInputParams(e), n = t.data;
@@ -3589,7 +3703,7 @@ class Ft extends I {
3589
3703
  path: n.path,
3590
3704
  parent: n
3591
3705
  });
3592
- return s.status === "aborted" ? S : s.status === "dirty" ? (t.dirty(), Ns(s.value)) : this._def.out._parseAsync({
3706
+ return s.status === "aborted" ? S : s.status === "dirty" ? (t.dirty(), Ps(s.value)) : this._def.out._parseAsync({
3593
3707
  data: s.value,
3594
3708
  path: n.path,
3595
3709
  parent: n
@@ -3630,77 +3744,77 @@ xn.create = (i, e) => new xn({
3630
3744
  typeName: T.ZodReadonly,
3631
3745
  ...A(e)
3632
3746
  });
3633
- const Zs = (i, e = {}, t) => i ? dt.create().superRefine((n, s) => {
3747
+ const Zs = (i, e = {}, t) => i ? ut.create().superRefine((n, s) => {
3634
3748
  var r, a;
3635
3749
  if (!i(n)) {
3636
3750
  const o = typeof e == "function" ? e(n) : typeof e == "string" ? { message: e } : e, l = (a = (r = o.fatal) !== null && r !== void 0 ? r : t) !== null && a !== void 0 ? a : !0, d = typeof o == "string" ? { message: o } : o;
3637
3751
  s.addIssue({ code: "custom", ...d, fatal: l });
3638
3752
  }
3639
- }) : dt.create(), oa = {
3753
+ }) : ut.create(), ca = {
3640
3754
  object: F.lazycreate
3641
3755
  };
3642
3756
  var T;
3643
3757
  (function(i) {
3644
3758
  i.ZodString = "ZodString", i.ZodNumber = "ZodNumber", i.ZodNaN = "ZodNaN", i.ZodBigInt = "ZodBigInt", i.ZodBoolean = "ZodBoolean", i.ZodDate = "ZodDate", i.ZodSymbol = "ZodSymbol", i.ZodUndefined = "ZodUndefined", i.ZodNull = "ZodNull", i.ZodAny = "ZodAny", i.ZodUnknown = "ZodUnknown", i.ZodNever = "ZodNever", i.ZodVoid = "ZodVoid", i.ZodArray = "ZodArray", i.ZodObject = "ZodObject", i.ZodUnion = "ZodUnion", i.ZodDiscriminatedUnion = "ZodDiscriminatedUnion", i.ZodIntersection = "ZodIntersection", i.ZodTuple = "ZodTuple", i.ZodRecord = "ZodRecord", i.ZodMap = "ZodMap", i.ZodSet = "ZodSet", i.ZodFunction = "ZodFunction", i.ZodLazy = "ZodLazy", i.ZodLiteral = "ZodLiteral", i.ZodEnum = "ZodEnum", i.ZodEffects = "ZodEffects", i.ZodNativeEnum = "ZodNativeEnum", i.ZodOptional = "ZodOptional", i.ZodNullable = "ZodNullable", i.ZodDefault = "ZodDefault", i.ZodCatch = "ZodCatch", i.ZodPromise = "ZodPromise", i.ZodBranded = "ZodBranded", i.ZodPipeline = "ZodPipeline", i.ZodReadonly = "ZodReadonly";
3645
3759
  })(T || (T = {}));
3646
- const la = (i, e = {
3760
+ const da = (i, e = {
3647
3761
  message: `Input not instance of ${i.name}`
3648
- }) => Zs((t) => t instanceof i, e), Ls = oe.create, Ds = Pe.create, ca = wn.create, da = Ne.create, Us = Mt.create, ha = Ge.create, ua = gn.create, pa = Rt.create, ma = Pt.create, fa = dt.create, ga = qe.create, ya = Te.create, va = yn.create, ba = ce.create, wa = F.create, xa = F.strictCreate, ka = Nt.create, _a = Rn.create, $a = jt.create, Ta = ve.create, Ea = zt.create, Sa = vn.create, Ca = Qe.create, Aa = lt.create, Ia = Zt.create, Oa = Lt.create, Ma = je.create, Ra = Dt.create, Pa = ht.create, ds = de.create, Na = $e.create, ja = Ye.create, za = de.createWithPreprocess, Za = Ft.create, La = () => Ls().optional(), Da = () => Ds().optional(), Ua = () => Us().optional(), Ha = {
3762
+ }) => Zs((t) => t instanceof i, e), Ls = oe.create, Ds = Ne.create, ua = wn.create, ha = Pe.create, Us = Mt.create, pa = Qe.create, ma = fn.create, ga = Rt.create, fa = Nt.create, ya = ut.create, va = qe.create, ba = Te.create, wa = yn.create, xa = ce.create, _a = F.create, ka = F.strictCreate, $a = Pt.create, Ta = Nn.create, Ea = jt.create, Sa = ve.create, Ca = zt.create, Aa = vn.create, Ia = Ye.create, Oa = lt.create, Ma = Zt.create, Ra = Lt.create, Na = je.create, Pa = Dt.create, ja = ht.create, ds = de.create, za = $e.create, Za = Ge.create, La = de.createWithPreprocess, Da = Ft.create, Ua = () => Ls().optional(), Ha = () => Ds().optional(), Ba = () => Us().optional(), Wa = {
3649
3763
  string: (i) => oe.create({ ...i, coerce: !0 }),
3650
- number: (i) => Pe.create({ ...i, coerce: !0 }),
3764
+ number: (i) => Ne.create({ ...i, coerce: !0 }),
3651
3765
  boolean: (i) => Mt.create({
3652
3766
  ...i,
3653
3767
  coerce: !0
3654
3768
  }),
3655
- bigint: (i) => Ne.create({ ...i, coerce: !0 }),
3656
- date: (i) => Ge.create({ ...i, coerce: !0 })
3657
- }, Ba = S;
3769
+ bigint: (i) => Pe.create({ ...i, coerce: !0 }),
3770
+ date: (i) => Qe.create({ ...i, coerce: !0 })
3771
+ }, Fa = S;
3658
3772
  var w = /* @__PURE__ */ Object.freeze({
3659
3773
  __proto__: null,
3660
3774
  defaultErrorMap: It,
3661
- setErrorMap: qr,
3775
+ setErrorMap: Jr,
3662
3776
  getErrorMap: pn,
3663
3777
  makeIssue: mn,
3664
- EMPTY_PATH: Kr,
3778
+ EMPTY_PATH: Qr,
3665
3779
  addIssueToContext: y,
3666
- ParseStatus: Y,
3780
+ ParseStatus: G,
3667
3781
  INVALID: S,
3668
- DIRTY: Ns,
3782
+ DIRTY: Ps,
3669
3783
  OK: ee,
3670
3784
  isAborted: si,
3671
3785
  isDirty: ri,
3672
3786
  isValid: Ot,
3673
- isAsync: fn,
3787
+ isAsync: gn,
3674
3788
  get util() {
3675
- return N;
3789
+ return P;
3676
3790
  },
3677
3791
  get objectUtil() {
3678
3792
  return ii;
3679
3793
  },
3680
- ZodParsedType: g,
3794
+ ZodParsedType: f,
3681
3795
  getParsedType: Me,
3682
3796
  ZodType: I,
3683
3797
  ZodString: oe,
3684
- ZodNumber: Pe,
3685
- ZodBigInt: Ne,
3798
+ ZodNumber: Ne,
3799
+ ZodBigInt: Pe,
3686
3800
  ZodBoolean: Mt,
3687
- ZodDate: Ge,
3688
- ZodSymbol: gn,
3801
+ ZodDate: Qe,
3802
+ ZodSymbol: fn,
3689
3803
  ZodUndefined: Rt,
3690
- ZodNull: Pt,
3691
- ZodAny: dt,
3804
+ ZodNull: Nt,
3805
+ ZodAny: ut,
3692
3806
  ZodUnknown: qe,
3693
3807
  ZodNever: Te,
3694
3808
  ZodVoid: yn,
3695
3809
  ZodArray: ce,
3696
3810
  ZodObject: F,
3697
- ZodUnion: Nt,
3698
- ZodDiscriminatedUnion: Rn,
3811
+ ZodUnion: Pt,
3812
+ ZodDiscriminatedUnion: Nn,
3699
3813
  ZodIntersection: jt,
3700
3814
  ZodTuple: ve,
3701
3815
  ZodRecord: zt,
3702
3816
  ZodMap: vn,
3703
- ZodSet: Qe,
3817
+ ZodSet: Ye,
3704
3818
  ZodFunction: lt,
3705
3819
  ZodLazy: Zt,
3706
3820
  ZodLiteral: Lt,
@@ -3710,64 +3824,64 @@ var w = /* @__PURE__ */ Object.freeze({
3710
3824
  ZodEffects: de,
3711
3825
  ZodTransformer: de,
3712
3826
  ZodOptional: $e,
3713
- ZodNullable: Ye,
3827
+ ZodNullable: Ge,
3714
3828
  ZodDefault: Ut,
3715
3829
  ZodCatch: bn,
3716
3830
  ZodNaN: wn,
3717
- BRAND: aa,
3831
+ BRAND: la,
3718
3832
  ZodBranded: zs,
3719
3833
  ZodPipeline: Ft,
3720
3834
  ZodReadonly: xn,
3721
3835
  custom: Zs,
3722
3836
  Schema: I,
3723
3837
  ZodSchema: I,
3724
- late: oa,
3838
+ late: ca,
3725
3839
  get ZodFirstPartyTypeKind() {
3726
3840
  return T;
3727
3841
  },
3728
- coerce: Ha,
3729
- any: fa,
3730
- array: ba,
3731
- bigint: da,
3842
+ coerce: Wa,
3843
+ any: ya,
3844
+ array: xa,
3845
+ bigint: ha,
3732
3846
  boolean: Us,
3733
- date: ha,
3734
- discriminatedUnion: _a,
3847
+ date: pa,
3848
+ discriminatedUnion: Ta,
3735
3849
  effect: ds,
3736
- enum: Ma,
3737
- function: Aa,
3738
- instanceof: la,
3739
- intersection: $a,
3740
- lazy: Ia,
3741
- literal: Oa,
3742
- map: Sa,
3743
- nan: ca,
3744
- nativeEnum: Ra,
3745
- never: ya,
3746
- null: ma,
3747
- nullable: ja,
3850
+ enum: Na,
3851
+ function: Oa,
3852
+ instanceof: da,
3853
+ intersection: Ea,
3854
+ lazy: Ma,
3855
+ literal: Ra,
3856
+ map: Aa,
3857
+ nan: ua,
3858
+ nativeEnum: Pa,
3859
+ never: ba,
3860
+ null: fa,
3861
+ nullable: Za,
3748
3862
  number: Ds,
3749
- object: wa,
3750
- oboolean: Ua,
3751
- onumber: Da,
3752
- optional: Na,
3753
- ostring: La,
3754
- pipeline: Za,
3755
- preprocess: za,
3756
- promise: Pa,
3757
- record: Ea,
3758
- set: Ca,
3759
- strictObject: xa,
3863
+ object: _a,
3864
+ oboolean: Ba,
3865
+ onumber: Ha,
3866
+ optional: za,
3867
+ ostring: Ua,
3868
+ pipeline: Da,
3869
+ preprocess: La,
3870
+ promise: ja,
3871
+ record: Ca,
3872
+ set: Ia,
3873
+ strictObject: ka,
3760
3874
  string: Ls,
3761
- symbol: ua,
3875
+ symbol: ma,
3762
3876
  transformer: ds,
3763
- tuple: Ta,
3764
- undefined: pa,
3765
- union: ka,
3766
- unknown: ga,
3767
- void: va,
3768
- NEVER: Ba,
3877
+ tuple: Sa,
3878
+ undefined: ga,
3879
+ union: $a,
3880
+ unknown: va,
3881
+ void: wa,
3882
+ NEVER: Fa,
3769
3883
  ZodIssueCode: m,
3770
- quotelessJson: Vr,
3884
+ quotelessJson: Kr,
3771
3885
  ZodError: le
3772
3886
  });
3773
3887
  const Pn = w.object({
@@ -3779,6 +3893,7 @@ const Pn = w.object({
3779
3893
  inactivityWarningMessage: w.string().default("Are you still there? The chat will end soon if we don't hear from you."),
3780
3894
  chatEndedMessage: w.string().default("The chat has ended. Please restart the chat to continue."),
3781
3895
  initialReplyMessage: w.string().nullable().default(null),
3896
+ disclaimerMessage: w.string().nullable().default(null),
3782
3897
  simulateDelays: w.boolean().default(!0),
3783
3898
  placement: w.enum(["left", "right"]).default("right"),
3784
3899
  openChatButton: w.object({
@@ -3830,15 +3945,15 @@ const Pn = w.object({
3830
3945
  ).default({})
3831
3946
  }).default({})
3832
3947
  });
3833
- var Wa = Object.defineProperty, Fa = Object.getOwnPropertyDescriptor, Vt = (i, e, t, n) => {
3834
- for (var s = n > 1 ? void 0 : n ? Fa(e, t) : e, r = i.length - 1, a; r >= 0; r--)
3948
+ var Va = Object.defineProperty, qa = Object.getOwnPropertyDescriptor, Vt = (i, e, t, n) => {
3949
+ for (var s = n > 1 ? void 0 : n ? qa(e, t) : e, r = i.length - 1, a; r >= 0; r--)
3835
3950
  (a = i[r]) && (s = (n ? a(e, t, s) : a(s)) || s);
3836
- return n && s && Wa(e, t, s), s;
3951
+ return n && s && Va(e, t, s), s;
3837
3952
  };
3838
3953
  let Xe = class extends ne {
3839
3954
  constructor() {
3840
3955
  super(...arguments), this.isOpen = !1, this.onResizeHandler = () => {
3841
- this.isOpen && window.innerWidth < 768 ? Br(this) : os(this);
3956
+ this.isOpen && window.innerWidth < 768 ? Fr(this) : os(this);
3842
3957
  };
3843
3958
  }
3844
3959
  connectedCallback() {
@@ -3910,7 +4025,7 @@ Vt([
3910
4025
  V({ type: Object })
3911
4026
  ], Xe.prototype, "options", 2);
3912
4027
  Vt([
3913
- ft()
4028
+ gt()
3914
4029
  ], Xe.prototype, "isOpen", 2);
3915
4030
  Vt([
3916
4031
  An("iai-chat")
@@ -3922,7 +4037,7 @@ Xe = Vt([
3922
4037
  Ee("iai-chat-popup")
3923
4038
  ], Xe);
3924
4039
  const bi = "https://api-dev.ai.inhabit.work";
3925
- async function Va(i, e = {}) {
4040
+ async function Ka(i, e = {}) {
3926
4041
  return (await fetch(`${bi}/threads`, {
3927
4042
  method: "POST",
3928
4043
  headers: {
@@ -3931,7 +4046,7 @@ async function Va(i, e = {}) {
3931
4046
  body: JSON.stringify({ assistantId: i, params: e })
3932
4047
  })).json();
3933
4048
  }
3934
- async function qa(i, e) {
4049
+ async function Ja(i, e) {
3935
4050
  return (await fetch(`${bi}/threads/${i}/messages`, {
3936
4051
  method: "POST",
3937
4052
  headers: {
@@ -3940,7 +4055,7 @@ async function qa(i, e) {
3940
4055
  body: JSON.stringify({ content: e })
3941
4056
  })).json();
3942
4057
  }
3943
- async function Ka(i, e, t, n = !1) {
4058
+ async function Qa(i, e, t, n = !1) {
3944
4059
  return (await fetch(`${bi}/threads/${i}/functions/${e}`, {
3945
4060
  method: "POST",
3946
4061
  headers: {
@@ -3949,7 +4064,7 @@ async function Ka(i, e, t, n = !1) {
3949
4064
  body: JSON.stringify({ params: t, rerunLLM: n })
3950
4065
  })).json();
3951
4066
  }
3952
- function Ja(i) {
4067
+ function Ya(i) {
3953
4068
  return { all: i = i || /* @__PURE__ */ new Map(), on: function(e, t) {
3954
4069
  var n = i.get(e);
3955
4070
  n ? n.push(t) : i.set(e, [t]);
@@ -3999,7 +4114,7 @@ class Ga {
3999
4114
  simulateDelays: !1,
4000
4115
  historyKey: "main",
4001
4116
  ...t
4002
- }, this._emitter = Ja(), this.on = this._emitter.on.bind(this._emitter), this.off = this._emitter.off.bind(this._emitter), t.events && Object.entries(t.events).forEach(([n, s]) => {
4117
+ }, this._emitter = Ya(), this.on = this._emitter.on.bind(this._emitter), this.off = this._emitter.off.bind(this._emitter), t.events && Object.entries(t.events).forEach(([n, s]) => {
4003
4118
  this._emitter.on(n, s);
4004
4119
  }), t.historyKey) {
4005
4120
  this._messages = this.storageGet("messageHistory", []);
@@ -4058,7 +4173,7 @@ class Ga {
4058
4173
  async startChat() {
4059
4174
  if (this.chatStarted)
4060
4175
  return;
4061
- const { id: e, inactivityWaitTime: t, inactivityWarningTime: n } = await Va(this.assistantId, this.params);
4176
+ const { id: e, inactivityWaitTime: t, inactivityWarningTime: n } = await Ka(this.assistantId, this.params);
4062
4177
  if (!e)
4063
4178
  throw new Error("Could not start chat");
4064
4179
  this.setConversationDetails({ threadId: e, inactivityWaitTime: t, inactivityWarningTime: n });
@@ -4080,7 +4195,7 @@ class Ga {
4080
4195
  const s = this.simulateDelay(2e3);
4081
4196
  this.keepAlive(), await this.insertMessagesWithSimulatedDelays(
4082
4197
  Promise.all([
4083
- Ka(this.threadId, e, t, n),
4198
+ Qa(this.threadId, e, t, n),
4084
4199
  s
4085
4200
  ]).then(([r]) => r)
4086
4201
  );
@@ -4104,7 +4219,7 @@ class Ga {
4104
4219
  this.keepAlive();
4105
4220
  const { messages: n, functions: s } = await this.insertMessagesWithSimulatedDelays(
4106
4221
  Promise.all([
4107
- qa(this.threadId, e),
4222
+ Ja(this.threadId, e),
4108
4223
  t
4109
4224
  ]).then(([r]) => r)
4110
4225
  );
@@ -4195,7 +4310,7 @@ class Ga {
4195
4310
  function Re(i, e, t) {
4196
4311
  return i ? e(i) : t == null ? void 0 : t(i);
4197
4312
  }
4198
- function Qa(i) {
4313
+ function Xa(i) {
4199
4314
  return { all: i = i || /* @__PURE__ */ new Map(), on: function(e, t) {
4200
4315
  var n = i.get(e);
4201
4316
  n ? n.push(t) : i.set(e, [t]);
@@ -4223,7 +4338,7 @@ const Ht = z`
4223
4338
  <path
4224
4339
  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"/>
4225
4340
  </svg>
4226
- `, Ya = z`
4341
+ `, eo = z`
4227
4342
  <svg
4228
4343
  xmlns="http://www.w3.org/2000/svg"
4229
4344
  viewBox="0 0 24 24"
@@ -4235,7 +4350,7 @@ const Ht = z`
4235
4350
  <path
4236
4351
  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"/>
4237
4352
  </svg>
4238
- `, Xa = z`
4353
+ `, to = z`
4239
4354
  <svg
4240
4355
  xmlns="http://www.w3.org/2000/svg"
4241
4356
  viewBox="0 0 24 24"
@@ -4246,7 +4361,7 @@ const Ht = z`
4246
4361
  <title>send</title>
4247
4362
  <path d="M2,21L23,12L2,3V10L17,12L2,14V21Z"/>
4248
4363
  </svg>
4249
- `, eo = z`
4364
+ `, no = z`
4250
4365
  <svg
4251
4366
  xmlns="http://www.w3.org/2000/svg"
4252
4367
  viewBox="0 0 24 24"
@@ -4258,21 +4373,21 @@ const Ht = z`
4258
4373
  <path d="M17.65,6.35C16.2,4.9 14.21,4 12,4A8,8 0 0,0 4,12A8,8 0 0,0 12,20C15.73,20 18.84,17.45 19.73,14H17.65C16.83,16.33 14.61,18 12,18A6,6 0 0,1 6,12A6,6 0 0,1 12,6C13.66,6 15.14,6.69 16.22,7.78L13,11H20V4L17.65,6.35Z" />
4259
4374
  </svg>
4260
4375
  `;
4261
- var to = Object.defineProperty, no = Object.getOwnPropertyDescriptor, he = (i, e, t, n) => {
4262
- for (var s = n > 1 ? void 0 : n ? no(e, t) : e, r = i.length - 1, a; r >= 0; r--)
4376
+ var io = Object.defineProperty, so = Object.getOwnPropertyDescriptor, ue = (i, e, t, n) => {
4377
+ for (var s = n > 1 ? void 0 : n ? so(e, t) : e, r = i.length - 1, a; r >= 0; r--)
4263
4378
  (a = i[r]) && (s = (n ? a(e, t, s) : a(s)) || s);
4264
- return n && s && to(e, t, s), s;
4379
+ return n && s && io(e, t, s), s;
4265
4380
  }, Hs = (i, e, t) => {
4266
4381
  if (!e.has(i))
4267
4382
  throw TypeError("Cannot " + t);
4268
- }, rt = (i, e, t) => (Hs(i, e, "read from private field"), t ? t.call(i) : e.get(i)), hs = (i, e, t) => {
4383
+ }, rt = (i, e, t) => (Hs(i, e, "read from private field"), t ? t.call(i) : e.get(i)), us = (i, e, t) => {
4269
4384
  if (e.has(i))
4270
4385
  throw TypeError("Cannot add the same private member more than once");
4271
4386
  e instanceof WeakSet ? e.add(i) : e.set(i, t);
4272
- }, us = (i, e, t, n) => (Hs(i, e, "write to private field"), n ? n.call(i, t) : e.set(i, t), t), Oe, an;
4387
+ }, hs = (i, e, t, n) => (Hs(i, e, "write to private field"), n ? n.call(i, t) : e.set(i, t), t), Oe, an;
4273
4388
  let ie = class extends ne {
4274
4389
  constructor() {
4275
- super(), hs(this, Oe, void 0), hs(this, an, Promise.resolve()), this.disableInput = !1, this.showTyping = !1, this.messages = [], this.inputValue = "", this.internalDisableInput = !1, this.internalShowTyping = !1, this._emitter = Qa(), this._emitter.on("*", (i, e) => this.dispatchEvent(
4390
+ super(), us(this, Oe, void 0), us(this, an, Promise.resolve()), this.disableInput = !1, this.showTyping = !1, this.messages = [], this.inputValue = "", this.internalDisableInput = !1, this.internalShowTyping = !1, this._emitter = Xa(), this._emitter.on("*", (i, e) => this.dispatchEvent(
4276
4391
  new CustomEvent(`iai-chat-${i.toString()}`, {
4277
4392
  bubbles: !0,
4278
4393
  // Allow events to be reached through other elements
@@ -4287,7 +4402,7 @@ let ie = class extends ne {
4287
4402
  connectedCallback() {
4288
4403
  super.connectedCallback(), this.cleanOptions = Pn.parse(this.options || {});
4289
4404
  const { assistantId: i, params: e, config: t } = this.cleanOptions;
4290
- us(this, Oe, new Ga(i, {
4405
+ hs(this, Oe, new Ga(i, {
4291
4406
  params: e,
4292
4407
  simulateDelays: t.simulateDelays,
4293
4408
  historyKey: t.historyKey,
@@ -4336,16 +4451,16 @@ let ie = class extends ne {
4336
4451
  this.messages = [...i], this.scrollChatToBottom();
4337
4452
  }
4338
4453
  render() {
4339
- const { header: i, showCloseButton: e } = this.cleanOptions.config.chatWindow;
4454
+ const { chatWindow: i, disclaimerMessage: e } = this.cleanOptions.config, { header: t, showCloseButton: n } = i;
4340
4455
  return z`
4341
4456
  <div class="flex flex-col h-full rounded-lg shadow-lg bg-white">
4342
4457
  <div class="header rounded-t-lg text-lg p-2 flex justify-between items-center">
4343
4458
  <div class="flex flex-row h-full items-center">
4344
- ${Re(i.imageSrc, () => z`
4345
- <img src="${i.imageSrc}" alt="Logo" style="max-height: 100%" />
4459
+ ${Re(t.imageSrc, () => z`
4460
+ <img src="${t.imageSrc}" alt="Logo" style="max-height: 100%" />
4346
4461
  `)}
4347
- ${Re(i.text, () => z`
4348
- <span class="text-lg font-semibold ml-2">${i.text}</span>
4462
+ ${Re(t.text, () => z`
4463
+ <span class="text-lg font-semibold ml-2">${t.text}</span>
4349
4464
  `)}
4350
4465
  </div>
4351
4466
 
@@ -4355,10 +4470,10 @@ let ie = class extends ne {
4355
4470
  class="mr-2 h-6"
4356
4471
  @click="${this.resetChat}"
4357
4472
  >
4358
- ${eo}
4473
+ ${no}
4359
4474
  </button>
4360
4475
 
4361
- ${Re(e, () => z`
4476
+ ${Re(n, () => z`
4362
4477
  <button class="mr-2 h-6" @click="${this.closeChat}">
4363
4478
  ${Ht}
4364
4479
  </button>
@@ -4368,16 +4483,16 @@ let ie = class extends ne {
4368
4483
  <div id="chat-container" class="flex-1 overflow-y-auto p-4 flex flex-col gap-2">
4369
4484
  ${this.chatMessage({ id: "intro-message", role: "assistant", content: this.cleanOptions.config.welcomeMessage })}
4370
4485
 
4371
- ${Is(this.messages, (t) => t.id, (t, n) => z`
4486
+ ${Is(this.messages, (s) => s.id, (s, r) => z`
4372
4487
  <div>
4373
- ${this.nameLabel(n)}
4374
- ${this.chatMessage(t)}
4488
+ ${this.nameLabel(r)}
4489
+ ${this.chatMessage(s)}
4375
4490
  </div>
4376
4491
  `)}
4377
4492
  </div>
4378
4493
 
4379
- <div class="p-4">
4380
- <div class="mb-1 ml-1 ${this.internalShowTyping || this.showTyping ? "text-gray-400" : "text-white"}">
4494
+ <div class="px-4 pt-2 pb-2">
4495
+ <div class="mb-1 ml-1 text-sm ${this.internalShowTyping || this.showTyping ? "text-gray-400" : "text-white"}">
4381
4496
  Agent is typing...
4382
4497
  </div>
4383
4498
 
@@ -4393,17 +4508,21 @@ let ie = class extends ne {
4393
4508
  .disabled="${this.internalDisableInput || this.disableInput}"
4394
4509
  .value="${this.inputValue}"
4395
4510
  @input="${this.handleInput}"
4396
- @keydown="${(t) => this.handleKeyDown(t)}"
4511
+ @keydown="${(s) => this.handleKeyDown(s)}"
4397
4512
  ></textarea>
4398
4513
  <button
4399
4514
  type="submit"
4400
4515
  class="button rounded-lg p-2 disabled:opacity-50 h-9"
4401
4516
  .disabled="${this.isSubmitDisabled}"
4402
4517
  >
4403
- ${Xa}
4518
+ ${to}
4404
4519
  </button>
4405
4520
  </div>
4406
4521
  </form>
4522
+
4523
+ <p class="text-center text-gray-400 text-sm pt-1">
4524
+ ${e}
4525
+ </p>
4407
4526
  </div>
4408
4527
  </div>
4409
4528
  `;
@@ -4460,7 +4579,7 @@ let ie = class extends ne {
4460
4579
  message: this.inputValue
4461
4580
  },
4462
4581
  cancelable: !0
4463
- })) && (await rt(this, an), us(this, an, this.chatManager.sendUserMessage(this.inputValue))), this.inputValue = "", this.inputElement && (this.inputElement.style.height = "auto"), this.internalDisableInput = !1, setTimeout(() => {
4582
+ })) && (await rt(this, an), hs(this, an, this.chatManager.sendUserMessage(this.inputValue))), this.inputValue = "", this.inputElement && (this.inputElement.style.height = "auto"), this.internalDisableInput = !1, setTimeout(() => {
4464
4583
  this.focusOnInput();
4465
4584
  }, 0));
4466
4585
  }
@@ -4537,37 +4656,37 @@ ie.styles = [Se, nt`
4537
4656
  color: #8c8c8c;
4538
4657
  }
4539
4658
  `];
4540
- he([
4659
+ ue([
4541
4660
  V({ type: Object })
4542
4661
  ], ie.prototype, "options", 2);
4543
- he([
4662
+ ue([
4544
4663
  V()
4545
4664
  ], ie.prototype, "disableInput", 2);
4546
- he([
4665
+ ue([
4547
4666
  V()
4548
4667
  ], ie.prototype, "showTyping", 2);
4549
- he([
4550
- ft()
4668
+ ue([
4669
+ gt()
4551
4670
  ], ie.prototype, "messages", 2);
4552
- he([
4553
- ft()
4671
+ ue([
4672
+ gt()
4554
4673
  ], ie.prototype, "inputValue", 2);
4555
- he([
4556
- ft()
4674
+ ue([
4675
+ gt()
4557
4676
  ], ie.prototype, "internalDisableInput", 2);
4558
- he([
4559
- ft()
4677
+ ue([
4678
+ gt()
4560
4679
  ], ie.prototype, "internalShowTyping", 2);
4561
- he([
4680
+ ue([
4562
4681
  An("#chat-container")
4563
4682
  ], ie.prototype, "chatContainer", 2);
4564
- he([
4683
+ ue([
4565
4684
  An("#message-input")
4566
4685
  ], ie.prototype, "inputElement", 2);
4567
- he([
4686
+ ue([
4568
4687
  vi.debounce(1)
4569
4688
  ], ie.prototype, "scrollChatToBottom", 1);
4570
- ie = he([
4689
+ ie = ue([
4571
4690
  Ee("iai-chat")
4572
4691
  ], ie);
4573
4692
  var Bs = { exports: {} };
@@ -4575,12 +4694,12 @@ var Bs = { exports: {} };
4575
4694
  (function(e) {
4576
4695
  if (typeof window > "u")
4577
4696
  return;
4578
- var t = 0, n = !1, s = !1, r = "message", a = r.length, o = "[iFrameSizer]", l = o.length, d = null, h = window.requestAnimationFrame, p = Object.freeze({
4697
+ var t = 0, n = !1, s = !1, r = "message", a = r.length, o = "[iFrameSizer]", l = o.length, d = null, u = window.requestAnimationFrame, p = Object.freeze({
4579
4698
  max: 1,
4580
4699
  scroll: 1,
4581
4700
  bodyScroll: 1,
4582
4701
  documentElementScroll: 1
4583
- }), c = {}, f = null, O = Object.freeze({
4702
+ }), c = {}, g = null, O = Object.freeze({
4584
4703
  autoResize: !0,
4585
4704
  bodyBackground: null,
4586
4705
  bodyMargin: null,
@@ -4628,58 +4747,58 @@ var Bs = { exports: {} };
4628
4747
  function H() {
4629
4748
  return window.MutationObserver || window.WebKitMutationObserver || window.MozMutationObserver;
4630
4749
  }
4631
- function J(u, v, M) {
4632
- u.addEventListener(v, M, !1);
4750
+ function J(h, v, M) {
4751
+ h.addEventListener(v, M, !1);
4633
4752
  }
4634
- function Ce(u, v, M) {
4635
- u.removeEventListener(v, M, !1);
4753
+ function Ce(h, v, M) {
4754
+ h.removeEventListener(v, M, !1);
4636
4755
  }
4637
- function Gt() {
4638
- var u = ["moz", "webkit", "o", "ms"], v;
4639
- for (v = 0; v < u.length && !h; v += 1)
4640
- h = window[u[v] + "RequestAnimationFrame"];
4641
- h ? h = h.bind(window) : P("setup", "RequestAnimationFrame not supported");
4756
+ function Qt() {
4757
+ var h = ["moz", "webkit", "o", "ms"], v;
4758
+ for (v = 0; v < h.length && !u; v += 1)
4759
+ u = window[h[v] + "RequestAnimationFrame"];
4760
+ u ? u = u.bind(window) : N("setup", "RequestAnimationFrame not supported");
4642
4761
  }
4643
- function Qt(u) {
4644
- var v = "Host page: " + u;
4645
- return window.top !== window.self && (v = window.parentIFrame && window.parentIFrame.getId ? window.parentIFrame.getId() + ": " + u : "Nested host page: " + u), v;
4762
+ function Yt(h) {
4763
+ var v = "Host page: " + h;
4764
+ return window.top !== window.self && (v = window.parentIFrame && window.parentIFrame.getId ? window.parentIFrame.getId() + ": " + h : "Nested host page: " + h), v;
4646
4765
  }
4647
- function Yt(u) {
4648
- return o + "[" + Qt(u) + "]";
4766
+ function Gt(h) {
4767
+ return o + "[" + Yt(h) + "]";
4649
4768
  }
4650
- function st(u) {
4651
- return c[u] ? c[u].log : n;
4769
+ function st(h) {
4770
+ return c[h] ? c[h].log : n;
4652
4771
  }
4653
- function P(u, v) {
4654
- Zn("log", u, v, st(u));
4772
+ function N(h, v) {
4773
+ Zn("log", h, v, st(h));
4655
4774
  }
4656
- function Ci(u, v) {
4657
- Zn("info", u, v, st(u));
4775
+ function Ci(h, v) {
4776
+ Zn("info", h, v, st(h));
4658
4777
  }
4659
- function se(u, v) {
4660
- Zn("warn", u, v, !0);
4778
+ function se(h, v) {
4779
+ Zn("warn", h, v, !0);
4661
4780
  }
4662
- function Zn(u, v, M, k) {
4663
- k === !0 && typeof window.console == "object" && console[u](Yt(v), M);
4781
+ function Zn(h, v, M, _) {
4782
+ _ === !0 && typeof window.console == "object" && console[h](Gt(v), M);
4664
4783
  }
4665
- function or(u) {
4784
+ function or(h) {
4666
4785
  function v() {
4667
4786
  function b() {
4668
- Pi(j), Oi(E), Le("onResized", j);
4787
+ Ni(j), Oi(E), Le("onResized", j);
4669
4788
  }
4670
- Z("Height"), Z("Width"), Ni(b, j, "init");
4789
+ Z("Height"), Z("Width"), Pi(b, j, "init");
4671
4790
  }
4672
4791
  function M() {
4673
4792
  var b = ae.slice(l).split(":"), C = b[1] ? parseInt(b[1], 10) : 0, U = c[b[0]] && c[b[0]].iframe, B = getComputedStyle(U);
4674
4793
  return {
4675
4794
  iframe: U,
4676
4795
  id: b[0],
4677
- height: C + k(B) + R(B),
4796
+ height: C + _(B) + R(B),
4678
4797
  width: b[2],
4679
4798
  type: b[3]
4680
4799
  };
4681
4800
  }
4682
- function k(b) {
4801
+ function _(b) {
4683
4802
  if (b.boxSizing !== "border-box")
4684
4803
  return 0;
4685
4804
  var C = b.paddingTop ? parseInt(b.paddingTop, 10) : 0, U = b.paddingBottom ? parseInt(b.paddingBottom, 10) : 0;
@@ -4692,14 +4811,14 @@ var Bs = { exports: {} };
4692
4811
  return C + U;
4693
4812
  }
4694
4813
  function Z(b) {
4695
- var C = Number(c[E]["max" + b]), U = Number(c[E]["min" + b]), B = b.toLowerCase(), G = Number(j[B]);
4696
- P(E, "Checking " + B + " is in range " + U + "-" + C), G < U && (G = U, P(E, "Set " + B + " to min value")), G > C && (G = C, P(E, "Set " + B + " to max value")), j[B] = "" + G;
4814
+ var C = Number(c[E]["max" + b]), U = Number(c[E]["min" + b]), B = b.toLowerCase(), Q = Number(j[B]);
4815
+ N(E, "Checking " + B + " is in range " + U + "-" + C), Q < U && (Q = U, N(E, "Set " + B + " to min value")), Q > C && (Q = C, N(E, "Set " + B + " to max value")), j[B] = "" + Q;
4697
4816
  }
4698
4817
  function pe() {
4699
4818
  function b() {
4700
4819
  function B() {
4701
4820
  var X = 0, xe = !1;
4702
- for (P(
4821
+ for (N(
4703
4822
  E,
4704
4823
  "Checking connection is from allowed list of origins: " + U
4705
4824
  ); X < U.length; X++)
@@ -4709,16 +4828,16 @@ var Bs = { exports: {} };
4709
4828
  }
4710
4829
  return xe;
4711
4830
  }
4712
- function G() {
4831
+ function Q() {
4713
4832
  var X = c[E] && c[E].remoteHost;
4714
- return P(E, "Checking connection is from: " + X), C === X;
4833
+ return N(E, "Checking connection is from: " + X), C === X;
4715
4834
  }
4716
- return U.constructor === Array ? B() : G();
4835
+ return U.constructor === Array ? B() : Q();
4717
4836
  }
4718
- var C = u.origin, U = c[E] && c[E].checkOrigin;
4837
+ var C = h.origin, U = c[E] && c[E].checkOrigin;
4719
4838
  if (U && "" + C != "null" && !b())
4720
4839
  throw new Error(
4721
- "Unexpected message received from: " + C + " for " + j.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."
4840
+ "Unexpected message received from: " + C + " for " + j.iframe.id + ". Message was: " + h.data + ". This error can be disabled by setting the checkOrigin: false option or by providing of array of trusted domains."
4722
4841
  );
4723
4842
  return !0;
4724
4843
  }
@@ -4727,19 +4846,19 @@ var Bs = { exports: {} };
4727
4846
  }
4728
4847
  function be() {
4729
4848
  var b = j.type in { true: 1, false: 1, undefined: 1 };
4730
- return b && P(E, "Ignoring init message from meta parent page"), b;
4849
+ return b && N(E, "Ignoring init message from meta parent page"), b;
4731
4850
  }
4732
4851
  function we(b) {
4733
4852
  return ae.slice(ae.indexOf(":") + a + b);
4734
4853
  }
4735
4854
  function Ae(b) {
4736
- P(
4855
+ N(
4737
4856
  E,
4738
4857
  "onMessage passed: {iframe: " + j.iframe.id + ", message: " + b + "}"
4739
4858
  ), Le("onMessage", {
4740
4859
  iframe: j.iframe,
4741
4860
  message: JSON.parse(b)
4742
- }), P(E, "--");
4861
+ }), N(E, "--");
4743
4862
  }
4744
4863
  function Wn() {
4745
4864
  var b = document.body.getBoundingClientRect(), C = j.iframe.getBoundingClientRect();
@@ -4766,17 +4885,17 @@ var Bs = { exports: {} };
4766
4885
  }
4767
4886
  function Xt(b, C) {
4768
4887
  function U() {
4769
- ue("Send Page Info", "pageInfo:" + Wn(), b, C);
4888
+ he("Send Page Info", "pageInfo:" + Wn(), b, C);
4770
4889
  }
4771
4890
  cr(U, 32, C);
4772
4891
  }
4773
4892
  function Fn() {
4774
- function b(G, X) {
4893
+ function b(Q, X) {
4775
4894
  function xe() {
4776
4895
  c[B] ? Xt(c[B].iframe, B) : C();
4777
4896
  }
4778
4897
  ["scroll", "resize"].forEach(function(Di) {
4779
- P(B, G + Di + " listener for sendPageInfo"), X(window, Di, xe);
4898
+ N(B, Q + Di + " listener for sendPageInfo"), X(window, Di, xe);
4780
4899
  });
4781
4900
  }
4782
4901
  function C() {
@@ -4795,7 +4914,7 @@ var Bs = { exports: {} };
4795
4914
  var b = !0;
4796
4915
  return j.iframe === null && (se(E, "IFrame (" + j.id + ") not found"), b = !1), b;
4797
4916
  }
4798
- function _(b) {
4917
+ function k(b) {
4799
4918
  var C = b.getBoundingClientRect();
4800
4919
  return Ii(E), {
4801
4920
  x: Math.floor(Number(C.left) + Number(d.x)),
@@ -4804,12 +4923,12 @@ var Bs = { exports: {} };
4804
4923
  }
4805
4924
  function $(b) {
4806
4925
  function C() {
4807
- d = X, K(), P(E, "--");
4926
+ d = X, K(), N(E, "--");
4808
4927
  }
4809
4928
  function U() {
4810
4929
  return {
4811
- x: Number(j.width) + G.x,
4812
- y: Number(j.height) + G.y
4930
+ x: Number(j.width) + Q.x,
4931
+ y: Number(j.height) + Q.y
4813
4932
  };
4814
4933
  }
4815
4934
  function B() {
@@ -4821,34 +4940,34 @@ var Bs = { exports: {} };
4821
4940
  "Unable to scroll to requested position, window.parentIFrame not found"
4822
4941
  );
4823
4942
  }
4824
- var G = b ? _(j.iframe) : { x: 0, y: 0 }, X = U();
4825
- P(
4943
+ var Q = b ? k(j.iframe) : { x: 0, y: 0 }, X = U();
4944
+ N(
4826
4945
  E,
4827
- "Reposition requested from iFrame (offset x:" + G.x + " y:" + G.y + ")"
4946
+ "Reposition requested from iFrame (offset x:" + Q.x + " y:" + Q.y + ")"
4828
4947
  ), window.top === window.self ? C() : B();
4829
4948
  }
4830
4949
  function K() {
4831
4950
  Le("onScroll", d) === !1 ? Mi() : Oi(E);
4832
4951
  }
4833
- function Q(b) {
4952
+ function Y(b) {
4834
4953
  function C() {
4835
- var xe = _(X);
4836
- P(
4954
+ var xe = k(X);
4955
+ N(
4837
4956
  E,
4838
4957
  "Moving to in page link (#" + B + ") at x: " + xe.x + " y: " + xe.y
4839
4958
  ), d = {
4840
4959
  x: xe.x,
4841
4960
  y: xe.y
4842
- }, K(), P(E, "--");
4961
+ }, K(), N(E, "--");
4843
4962
  }
4844
4963
  function U() {
4845
- window.parentIFrame ? window.parentIFrame.moveToAnchor(B) : P(
4964
+ window.parentIFrame ? window.parentIFrame.moveToAnchor(B) : N(
4846
4965
  E,
4847
4966
  "In page link #" + B + " not found and window.parentIFrame not found"
4848
4967
  );
4849
4968
  }
4850
- var B = b.split("#")[1] || "", G = decodeURIComponent(B), X = document.getElementById(G) || document.getElementsByName(G)[0];
4851
- X ? C() : window.top === window.self ? P(E, "In page link #" + B + " not found") : U();
4969
+ var B = b.split("#")[1] || "", Q = decodeURIComponent(B), X = document.getElementById(Q) || document.getElementsByName(Q)[0];
4970
+ X ? C() : window.top === window.self ? N(E, "In page link #" + B + " not found") : U();
4852
4971
  }
4853
4972
  function re(b) {
4854
4973
  var C = {};
@@ -4874,7 +4993,7 @@ var Bs = { exports: {} };
4874
4993
  return Ln(E, b, C);
4875
4994
  }
4876
4995
  function Kn() {
4877
- switch (c[E] && c[E].firstRun && Qn(), j.type) {
4996
+ switch (c[E] && c[E].firstRun && Yn(), j.type) {
4878
4997
  case "close": {
4879
4998
  Dn(j.iframe);
4880
4999
  break;
@@ -4915,7 +5034,7 @@ var Bs = { exports: {} };
4915
5034
  break;
4916
5035
  }
4917
5036
  case "inPageLink": {
4918
- Q(we(9));
5037
+ Y(we(9));
4919
5038
  break;
4920
5039
  }
4921
5040
  case "reset": {
@@ -4938,240 +5057,240 @@ var Bs = { exports: {} };
4938
5057
  j.type + " No settings for " + b + ". Message was: " + ae
4939
5058
  )), C;
4940
5059
  }
4941
- function Gn() {
5060
+ function Qn() {
4942
5061
  for (var b in c)
4943
- ue(
5062
+ he(
4944
5063
  "iFrame requested init",
4945
5064
  ji(b),
4946
5065
  c[b].iframe,
4947
5066
  b
4948
5067
  );
4949
5068
  }
4950
- function Qn() {
5069
+ function Yn() {
4951
5070
  c[E] && (c[E].firstRun = !1);
4952
5071
  }
4953
- var ae = u.data, j = {}, E = null;
4954
- ae === "[iFrameResizerChild]Ready" ? Gn() : Ze() ? (j = M(), E = j.id, c[E] && (c[E].loaded = !0), !be() && Jn(E) && (P(E, "Received: " + ae), qn() && pe() && Kn())) : Ci(E, "Ignored: " + ae);
4955
- }
4956
- function Ln(u, v, M) {
4957
- var k = null, R = null;
4958
- if (c[u])
4959
- if (k = c[u][v], typeof k == "function")
4960
- R = k(M);
5072
+ var ae = h.data, j = {}, E = null;
5073
+ ae === "[iFrameResizerChild]Ready" ? Qn() : Ze() ? (j = M(), E = j.id, c[E] && (c[E].loaded = !0), !be() && Jn(E) && (N(E, "Received: " + ae), qn() && pe() && Kn())) : Ci(E, "Ignored: " + ae);
5074
+ }
5075
+ function Ln(h, v, M) {
5076
+ var _ = null, R = null;
5077
+ if (c[h])
5078
+ if (_ = c[h][v], typeof _ == "function")
5079
+ R = _(M);
4961
5080
  else
4962
5081
  throw new TypeError(
4963
- v + " on iFrame[" + u + "] is not a function"
5082
+ v + " on iFrame[" + h + "] is not a function"
4964
5083
  );
4965
5084
  return R;
4966
5085
  }
4967
- function Ai(u) {
4968
- var v = u.id;
5086
+ function Ai(h) {
5087
+ var v = h.id;
4969
5088
  delete c[v];
4970
5089
  }
4971
- function Dn(u) {
4972
- var v = u.id;
5090
+ function Dn(h) {
5091
+ var v = h.id;
4973
5092
  if (Ln(v, "onClose", v) === !1) {
4974
- P(v, "Close iframe cancelled by onClose event");
5093
+ N(v, "Close iframe cancelled by onClose event");
4975
5094
  return;
4976
5095
  }
4977
- P(v, "Removing iFrame: " + v);
5096
+ N(v, "Removing iFrame: " + v);
4978
5097
  try {
4979
- u.parentNode && u.parentNode.removeChild(u);
5098
+ h.parentNode && h.parentNode.removeChild(h);
4980
5099
  } catch (M) {
4981
5100
  se(M);
4982
5101
  }
4983
- Ln(v, "onClosed", v), P(v, "--"), Ai(u);
5102
+ Ln(v, "onClosed", v), N(v, "--"), Ai(h);
4984
5103
  }
4985
- function Ii(u) {
5104
+ function Ii(h) {
4986
5105
  d === null && (d = {
4987
5106
  x: window.pageXOffset === e ? document.documentElement.scrollLeft : window.pageXOffset,
4988
5107
  y: window.pageYOffset === e ? document.documentElement.scrollTop : window.pageYOffset
4989
- }, P(
4990
- u,
5108
+ }, N(
5109
+ h,
4991
5110
  "Get page position: " + d.x + "," + d.y
4992
5111
  ));
4993
5112
  }
4994
- function Oi(u) {
4995
- d !== null && (window.scrollTo(d.x, d.y), P(
4996
- u,
5113
+ function Oi(h) {
5114
+ d !== null && (window.scrollTo(d.x, d.y), N(
5115
+ h,
4997
5116
  "Set page position: " + d.x + "," + d.y
4998
5117
  ), Mi());
4999
5118
  }
5000
5119
  function Mi() {
5001
5120
  d = null;
5002
5121
  }
5003
- function Ri(u) {
5122
+ function Ri(h) {
5004
5123
  function v() {
5005
- Pi(u), ue("reset", "reset", u.iframe, u.id);
5124
+ Ni(h), he("reset", "reset", h.iframe, h.id);
5006
5125
  }
5007
- P(
5008
- u.id,
5009
- "Size reset requested by " + (u.type === "init" ? "host page" : "iFrame")
5010
- ), Ii(u.id), Ni(v, u, "reset");
5126
+ N(
5127
+ h.id,
5128
+ "Size reset requested by " + (h.type === "init" ? "host page" : "iFrame")
5129
+ ), Ii(h.id), Pi(v, h, "reset");
5011
5130
  }
5012
- function Pi(u) {
5131
+ function Ni(h) {
5013
5132
  function v(Z) {
5014
- if (!u.id) {
5015
- P("undefined", "messageData id not set");
5133
+ if (!h.id) {
5134
+ N("undefined", "messageData id not set");
5016
5135
  return;
5017
5136
  }
5018
- u.iframe.style[Z] = u[Z] + "px", P(
5019
- u.id,
5020
- "IFrame (" + R + ") " + Z + " set to " + u[Z] + "px"
5137
+ h.iframe.style[Z] = h[Z] + "px", N(
5138
+ h.id,
5139
+ "IFrame (" + R + ") " + Z + " set to " + h[Z] + "px"
5021
5140
  );
5022
5141
  }
5023
5142
  function M(Z) {
5024
- !s && u[Z] === "0" && (s = !0, P(R, "Hidden iFrame detected, creating visibility listener"), dr());
5143
+ !s && h[Z] === "0" && (s = !0, N(R, "Hidden iFrame detected, creating visibility listener"), dr());
5025
5144
  }
5026
- function k(Z) {
5145
+ function _(Z) {
5027
5146
  v(Z), M(Z);
5028
5147
  }
5029
- var R = u.iframe.id;
5030
- c[R] && (c[R].sizeHeight && k("height"), c[R].sizeWidth && k("width"));
5148
+ var R = h.iframe.id;
5149
+ c[R] && (c[R].sizeHeight && _("height"), c[R].sizeWidth && _("width"));
5031
5150
  }
5032
- function Ni(u, v, M) {
5033
- M !== v.type && h && // including check for jasmine because had trouble getting spy to work in unit test using requestAnimationFrame
5034
- !window.jasmine ? (P(v.id, "Requesting animation frame"), h(u)) : u();
5151
+ function Pi(h, v, M) {
5152
+ M !== v.type && u && // including check for jasmine because had trouble getting spy to work in unit test using requestAnimationFrame
5153
+ !window.jasmine ? (N(v.id, "Requesting animation frame"), u(h)) : h();
5035
5154
  }
5036
- function ue(u, v, M, k, R) {
5155
+ function he(h, v, M, _, R) {
5037
5156
  function Z() {
5038
- var Ae = c[k] && c[k].targetOrigin;
5039
- P(
5040
- k,
5041
- "[" + u + "] Sending msg to iframe[" + k + "] (" + v + ") targetOrigin: " + Ae
5157
+ var Ae = c[_] && c[_].targetOrigin;
5158
+ N(
5159
+ _,
5160
+ "[" + h + "] Sending msg to iframe[" + _ + "] (" + v + ") targetOrigin: " + Ae
5042
5161
  ), M.contentWindow.postMessage(o + v, Ae);
5043
5162
  }
5044
5163
  function pe() {
5045
- se(k, "[" + u + "] IFrame(" + k + ") not found");
5164
+ se(_, "[" + h + "] IFrame(" + _ + ") not found");
5046
5165
  }
5047
5166
  function Ze() {
5048
5167
  M && "contentWindow" in M && M.contentWindow !== null ? Z() : pe();
5049
5168
  }
5050
5169
  function be() {
5051
5170
  function Ae() {
5052
- c[k] && !c[k].loaded && !we && (we = !0, se(
5053
- k,
5054
- "IFrame has not responded within " + c[k].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."
5171
+ c[_] && !c[_].loaded && !we && (we = !0, se(
5172
+ _,
5173
+ "IFrame has not responded within " + c[_].warningTimeout / 1e3 + " seconds. Check iFrameResizer.contentWindow.js has been loaded in iFrame. This message can be ignored if everything is working, or you can set the warningTimeout option to a higher value or zero to suppress this warning."
5055
5174
  ));
5056
5175
  }
5057
- R && c[k] && c[k].warningTimeout && (c[k].msgTimeout = setTimeout(
5176
+ R && c[_] && c[_].warningTimeout && (c[_].msgTimeout = setTimeout(
5058
5177
  Ae,
5059
- c[k].warningTimeout
5178
+ c[_].warningTimeout
5060
5179
  ));
5061
5180
  }
5062
5181
  var we = !1;
5063
- k = k || M.id, c[k] && (Ze(), be());
5182
+ _ = _ || M.id, c[_] && (Ze(), be());
5064
5183
  }
5065
- function ji(u) {
5066
- return u + ":" + c[u].bodyMarginV1 + ":" + c[u].sizeWidth + ":" + c[u].log + ":" + c[u].interval + ":" + c[u].enablePublicMethods + ":" + c[u].autoResize + ":" + c[u].bodyMargin + ":" + c[u].heightCalculationMethod + ":" + c[u].bodyBackground + ":" + c[u].bodyPadding + ":" + c[u].tolerance + ":" + c[u].inPageLinks + ":" + c[u].resizeFrom + ":" + c[u].widthCalculationMethod + ":" + c[u].mouseEvents;
5184
+ function ji(h) {
5185
+ return h + ":" + c[h].bodyMarginV1 + ":" + c[h].sizeWidth + ":" + c[h].log + ":" + c[h].interval + ":" + c[h].enablePublicMethods + ":" + c[h].autoResize + ":" + c[h].bodyMargin + ":" + c[h].heightCalculationMethod + ":" + c[h].bodyBackground + ":" + c[h].bodyPadding + ":" + c[h].tolerance + ":" + c[h].inPageLinks + ":" + c[h].resizeFrom + ":" + c[h].widthCalculationMethod + ":" + c[h].mouseEvents;
5067
5186
  }
5068
- function lr(u) {
5069
- return typeof u == "number";
5187
+ function lr(h) {
5188
+ return typeof h == "number";
5070
5189
  }
5071
- function zi(u, v) {
5190
+ function zi(h, v) {
5072
5191
  function M() {
5073
- function $(Q) {
5074
- var re = c[_][Q];
5075
- re !== 1 / 0 && re !== 0 && (u.style[Q] = lr(re) ? re + "px" : re, P(_, "Set " + Q + " = " + u.style[Q]));
5192
+ function $(Y) {
5193
+ var re = c[k][Y];
5194
+ re !== 1 / 0 && re !== 0 && (h.style[Y] = lr(re) ? re + "px" : re, N(k, "Set " + Y + " = " + h.style[Y]));
5076
5195
  }
5077
- function K(Q) {
5078
- if (c[_]["min" + Q] > c[_]["max" + Q])
5196
+ function K(Y) {
5197
+ if (c[k]["min" + Y] > c[k]["max" + Y])
5079
5198
  throw new Error(
5080
- "Value for min" + Q + " can not be greater than max" + Q
5199
+ "Value for min" + Y + " can not be greater than max" + Y
5081
5200
  );
5082
5201
  }
5083
5202
  K("Height"), K("Width"), $("maxHeight"), $("minHeight"), $("maxWidth"), $("minWidth");
5084
5203
  }
5085
- function k() {
5204
+ function _() {
5086
5205
  var $ = v && v.id || O.id + t++;
5087
5206
  return document.getElementById($) !== null && ($ += t++), $;
5088
5207
  }
5089
5208
  function R($) {
5090
5209
  if (typeof $ != "string")
5091
5210
  throw new TypeError("Invaild id for iFrame. Expected String");
5092
- return $ === "" && (u.id = $ = k(), n = (v || {}).log, P(
5211
+ return $ === "" && (h.id = $ = _(), n = (v || {}).log, N(
5093
5212
  $,
5094
- "Added missing iframe ID: " + $ + " (" + u.src + ")"
5213
+ "Added missing iframe ID: " + $ + " (" + h.src + ")"
5095
5214
  )), $;
5096
5215
  }
5097
5216
  function Z() {
5098
- switch (P(
5099
- _,
5100
- "IFrame scrolling " + (c[_] && c[_].scrolling ? "enabled" : "disabled") + " for " + _
5101
- ), u.style.overflow = (c[_] && c[_].scrolling) === !1 ? "hidden" : "auto", c[_] && c[_].scrolling) {
5217
+ switch (N(
5218
+ k,
5219
+ "IFrame scrolling " + (c[k] && c[k].scrolling ? "enabled" : "disabled") + " for " + k
5220
+ ), h.style.overflow = (c[k] && c[k].scrolling) === !1 ? "hidden" : "auto", c[k] && c[k].scrolling) {
5102
5221
  case "omit":
5103
5222
  break;
5104
5223
  case !0: {
5105
- u.scrolling = "yes";
5224
+ h.scrolling = "yes";
5106
5225
  break;
5107
5226
  }
5108
5227
  case !1: {
5109
- u.scrolling = "no";
5228
+ h.scrolling = "no";
5110
5229
  break;
5111
5230
  }
5112
5231
  default:
5113
- u.scrolling = c[_] ? c[_].scrolling : "no";
5232
+ h.scrolling = c[k] ? c[k].scrolling : "no";
5114
5233
  }
5115
5234
  }
5116
5235
  function pe() {
5117
- (typeof (c[_] && c[_].bodyMargin) == "number" || (c[_] && c[_].bodyMargin) === "0") && (c[_].bodyMarginV1 = c[_].bodyMargin, c[_].bodyMargin = "" + c[_].bodyMargin + "px");
5236
+ (typeof (c[k] && c[k].bodyMargin) == "number" || (c[k] && c[k].bodyMargin) === "0") && (c[k].bodyMarginV1 = c[k].bodyMargin, c[k].bodyMargin = "" + c[k].bodyMargin + "px");
5118
5237
  }
5119
5238
  function Ze() {
5120
- var $ = c[_] && c[_].firstRun, K = c[_] && c[_].heightCalculationMethod in p;
5121
- !$ && K && Ri({ iframe: u, height: 0, width: 0, type: "init" });
5239
+ var $ = c[k] && c[k].firstRun, K = c[k] && c[k].heightCalculationMethod in p;
5240
+ !$ && K && Ri({ iframe: h, height: 0, width: 0, type: "init" });
5122
5241
  }
5123
5242
  function be() {
5124
- c[_] && (c[_].iframe.iFrameResizer = {
5125
- close: Dn.bind(null, c[_].iframe),
5243
+ c[k] && (c[k].iframe.iFrameResizer = {
5244
+ close: Dn.bind(null, c[k].iframe),
5126
5245
  removeListeners: Ai.bind(
5127
5246
  null,
5128
- c[_].iframe
5247
+ c[k].iframe
5129
5248
  ),
5130
- resize: ue.bind(
5249
+ resize: he.bind(
5131
5250
  null,
5132
5251
  "Window resize",
5133
5252
  "resize",
5134
- c[_].iframe
5253
+ c[k].iframe
5135
5254
  ),
5136
5255
  moveToAnchor: function($) {
5137
- ue(
5256
+ he(
5138
5257
  "Move to anchor",
5139
5258
  "moveToAnchor:" + $,
5140
- c[_].iframe,
5141
- _
5259
+ c[k].iframe,
5260
+ k
5142
5261
  );
5143
5262
  },
5144
5263
  sendMessage: function($) {
5145
- $ = JSON.stringify($), ue(
5264
+ $ = JSON.stringify($), he(
5146
5265
  "Send Message",
5147
5266
  "message:" + $,
5148
- c[_].iframe,
5149
- _
5267
+ c[k].iframe,
5268
+ k
5150
5269
  );
5151
5270
  }
5152
5271
  });
5153
5272
  }
5154
5273
  function we($) {
5155
5274
  function K() {
5156
- ue("iFrame.onload", $, u, e, !0), Ze();
5275
+ he("iFrame.onload", $, h, e, !0), Ze();
5157
5276
  }
5158
- function Q(Le) {
5159
- if (u.parentNode) {
5277
+ function Y(Le) {
5278
+ if (h.parentNode) {
5160
5279
  var Kn = new Le(function(Jn) {
5161
- Jn.forEach(function(Gn) {
5162
- var Qn = Array.prototype.slice.call(Gn.removedNodes);
5163
- Qn.forEach(function(ae) {
5164
- ae === u && Dn(u);
5280
+ Jn.forEach(function(Qn) {
5281
+ var Yn = Array.prototype.slice.call(Qn.removedNodes);
5282
+ Yn.forEach(function(ae) {
5283
+ ae === h && Dn(h);
5165
5284
  });
5166
5285
  });
5167
5286
  });
5168
- Kn.observe(u.parentNode, {
5287
+ Kn.observe(h.parentNode, {
5169
5288
  childList: !0
5170
5289
  });
5171
5290
  }
5172
5291
  }
5173
5292
  var re = H();
5174
- re && Q(re), J(u, "load", K), ue("init", $, u, e, !0);
5293
+ re && Y(re), J(h, "load", K), he("init", $, h, e, !0);
5175
5294
  }
5176
5295
  function Ae($) {
5177
5296
  if (typeof $ != "object")
@@ -5179,7 +5298,7 @@ var Bs = { exports: {} };
5179
5298
  }
5180
5299
  function Wn($) {
5181
5300
  for (var K in O)
5182
- Object.prototype.hasOwnProperty.call(O, K) && (c[_][K] = Object.prototype.hasOwnProperty.call(
5301
+ Object.prototype.hasOwnProperty.call(O, K) && (c[k][K] = Object.prototype.hasOwnProperty.call(
5183
5302
  $,
5184
5303
  K
5185
5304
  ) ? $[K] : O[K]);
@@ -5190,35 +5309,35 @@ var Bs = { exports: {} };
5190
5309
  function Fn($) {
5191
5310
  var K = $.split("Callback");
5192
5311
  if (K.length === 2) {
5193
- var Q = "on" + K[0].charAt(0).toUpperCase() + K[0].slice(1);
5194
- this[Q] = this[$], delete this[$], se(
5195
- _,
5196
- "Deprecated: '" + $ + "' has been renamed '" + Q + "'. The old method will be removed in the next major version."
5312
+ var Y = "on" + K[0].charAt(0).toUpperCase() + K[0].slice(1);
5313
+ this[Y] = this[$], delete this[$], se(
5314
+ k,
5315
+ "Deprecated: '" + $ + "' has been renamed '" + Y + "'. The old method will be removed in the next major version."
5197
5316
  );
5198
5317
  }
5199
5318
  }
5200
5319
  function Vn($) {
5201
- $ = $ || {}, c[_] = /* @__PURE__ */ Object.create(null), c[_].iframe = u, c[_].firstRun = !0, c[_].remoteHost = u.src && u.src.split("/").slice(0, 3).join("/"), Ae($), Object.keys($).forEach(Fn, $), Wn($), c[_] && (c[_].targetOrigin = c[_].checkOrigin === !0 ? Xt(c[_].remoteHost) : "*");
5320
+ $ = $ || {}, c[k] = /* @__PURE__ */ Object.create(null), c[k].iframe = h, c[k].firstRun = !0, c[k].remoteHost = h.src && h.src.split("/").slice(0, 3).join("/"), Ae($), Object.keys($).forEach(Fn, $), Wn($), c[k] && (c[k].targetOrigin = c[k].checkOrigin === !0 ? Xt(c[k].remoteHost) : "*");
5202
5321
  }
5203
5322
  function qn() {
5204
- return _ in c && "iFrameResizer" in u;
5323
+ return k in c && "iFrameResizer" in h;
5205
5324
  }
5206
- var _ = R(u.id);
5207
- qn() ? se(_, "Ignored iFrame, already setup.") : (Vn(v), Z(), M(), pe(), we(ji(_)), be());
5325
+ var k = R(h.id);
5326
+ qn() ? se(k, "Ignored iFrame, already setup.") : (Vn(v), Z(), M(), pe(), we(ji(k)), be());
5208
5327
  }
5209
- function Un(u, v) {
5210
- f === null && (f = setTimeout(function() {
5211
- f = null, u();
5328
+ function Un(h, v) {
5329
+ g === null && (g = setTimeout(function() {
5330
+ g = null, h();
5212
5331
  }, v));
5213
5332
  }
5214
5333
  var Hn = {};
5215
- function cr(u, v, M) {
5334
+ function cr(h, v, M) {
5216
5335
  Hn[M] || (Hn[M] = setTimeout(function() {
5217
- Hn[M] = null, u();
5336
+ Hn[M] = null, h();
5218
5337
  }, v));
5219
5338
  }
5220
5339
  function dr() {
5221
- function u() {
5340
+ function h() {
5222
5341
  function R(Z) {
5223
5342
  function pe(be) {
5224
5343
  return (c[Z] && c[Z].iframe.style[be]) === "0px";
@@ -5226,7 +5345,7 @@ var Bs = { exports: {} };
5226
5345
  function Ze(be) {
5227
5346
  return be.offsetParent !== null;
5228
5347
  }
5229
- c[Z] && Ze(c[Z].iframe) && (pe("height") || pe("width")) && ue(
5348
+ c[Z] && Ze(c[Z].iframe) && (pe("height") || pe("width")) && he(
5230
5349
  "Visibility change",
5231
5350
  "resize",
5232
5351
  c[Z].iframe,
@@ -5238,10 +5357,10 @@ var Bs = { exports: {} };
5238
5357
  });
5239
5358
  }
5240
5359
  function v(R) {
5241
- P(
5360
+ N(
5242
5361
  "window",
5243
5362
  "Mutation observed: " + R[0].target + " " + R[0].type
5244
- ), Un(u, 16);
5363
+ ), Un(h, 16);
5245
5364
  }
5246
5365
  function M() {
5247
5366
  var R = document.querySelector("body"), Z = {
@@ -5251,39 +5370,39 @@ var Bs = { exports: {} };
5251
5370
  characterDataOldValue: !1,
5252
5371
  childList: !0,
5253
5372
  subtree: !0
5254
- }, pe = new k(v);
5373
+ }, pe = new _(v);
5255
5374
  pe.observe(R, Z);
5256
5375
  }
5257
- var k = H();
5258
- k && M();
5376
+ var _ = H();
5377
+ _ && M();
5259
5378
  }
5260
- function hr(u) {
5379
+ function ur(h) {
5261
5380
  function v() {
5262
- Li("Window " + u, "resize");
5381
+ Li("Window " + h, "resize");
5263
5382
  }
5264
- P("window", "Trigger event: " + u), Un(v, 16);
5383
+ N("window", "Trigger event: " + h), Un(v, 16);
5265
5384
  }
5266
5385
  function Zi() {
5267
- function u() {
5386
+ function h() {
5268
5387
  Li("Tab Visible", "resize");
5269
5388
  }
5270
- document.visibilityState !== "hidden" && (P("document", "Trigger event: Visibility change"), Un(u, 16));
5389
+ document.visibilityState !== "hidden" && (N("document", "Trigger event: Visibility change"), Un(h, 16));
5271
5390
  }
5272
- function Li(u, v) {
5273
- function M(k) {
5274
- return c[k] && c[k].resizeFrom === "parent" && c[k].autoResize && !c[k].firstRun;
5391
+ function Li(h, v) {
5392
+ function M(_) {
5393
+ return c[_] && c[_].resizeFrom === "parent" && c[_].autoResize && !c[_].firstRun;
5275
5394
  }
5276
- Object.keys(c).forEach(function(k) {
5277
- M(k) && ue(u, v, c[k].iframe, k);
5395
+ Object.keys(c).forEach(function(_) {
5396
+ M(_) && he(h, v, c[_].iframe, _);
5278
5397
  });
5279
5398
  }
5280
- function ur() {
5399
+ function hr() {
5281
5400
  J(window, "message", or), J(window, "resize", function() {
5282
- hr("resize");
5401
+ ur("resize");
5283
5402
  }), J(document, "visibilitychange", Zi), J(document, "-webkit-visibilitychange", Zi);
5284
5403
  }
5285
5404
  function Bn() {
5286
- function u(k, R) {
5405
+ function h(_, R) {
5287
5406
  function Z() {
5288
5407
  if (R.tagName) {
5289
5408
  if (R.tagName.toUpperCase() !== "IFRAME")
@@ -5293,26 +5412,26 @@ var Bs = { exports: {} };
5293
5412
  } else
5294
5413
  throw new TypeError("Object is not a valid DOM element");
5295
5414
  }
5296
- R && (Z(), zi(R, k), M.push(R));
5415
+ R && (Z(), zi(R, _), M.push(R));
5297
5416
  }
5298
- function v(k) {
5299
- k && k.enablePublicMethods && se(
5417
+ function v(_) {
5418
+ _ && _.enablePublicMethods && se(
5300
5419
  "enablePublicMethods option has been removed, public methods are now always available in the iFrame"
5301
5420
  );
5302
5421
  }
5303
5422
  var M;
5304
- return Gt(), ur(), function(k, R) {
5305
- switch (M = [], v(k), typeof R) {
5423
+ return Qt(), hr(), function(_, R) {
5424
+ switch (M = [], v(_), typeof R) {
5306
5425
  case "undefined":
5307
5426
  case "string": {
5308
5427
  Array.prototype.forEach.call(
5309
5428
  document.querySelectorAll(R || "iframe"),
5310
- u.bind(e, k)
5429
+ h.bind(e, _)
5311
5430
  );
5312
5431
  break;
5313
5432
  }
5314
5433
  case "object": {
5315
- u(k, R);
5434
+ h(_, R);
5316
5435
  break;
5317
5436
  }
5318
5437
  default:
@@ -5321,9 +5440,9 @@ var Bs = { exports: {} };
5321
5440
  return M;
5322
5441
  };
5323
5442
  }
5324
- function pr(u) {
5325
- u.fn ? u.fn.iFrameResize || (u.fn.iFrameResize = function(v) {
5326
- function M(k, R) {
5443
+ function pr(h) {
5444
+ h.fn ? h.fn.iFrameResize || (h.fn.iFrameResize = function(v) {
5445
+ function M(_, R) {
5327
5446
  zi(R, v);
5328
5447
  }
5329
5448
  return this.filter("iframe").each(M).end();
@@ -5332,19 +5451,19 @@ var Bs = { exports: {} };
5332
5451
  window.jQuery !== e && pr(window.jQuery), typeof e == "function" && e.amd ? e([], Bn) : i.exports = Bn(), window.iFrameResize = window.iFrameResize || Bn();
5333
5452
  })();
5334
5453
  })(Bs);
5335
- var io = Bs.exports;
5336
- const so = /* @__PURE__ */ Fr(io);
5337
- var ro = Object.defineProperty, ao = Object.getOwnPropertyDescriptor, wi = (i, e, t, n) => {
5338
- for (var s = n > 1 ? void 0 : n ? ao(e, t) : e, r = i.length - 1, a; r >= 0; r--)
5454
+ var ro = Bs.exports;
5455
+ const ao = /* @__PURE__ */ qr(ro);
5456
+ var oo = Object.defineProperty, lo = Object.getOwnPropertyDescriptor, wi = (i, e, t, n) => {
5457
+ for (var s = n > 1 ? void 0 : n ? lo(e, t) : e, r = i.length - 1, a; r >= 0; r--)
5339
5458
  (a = i[r]) && (s = (n ? a(e, t, s) : a(s)) || s);
5340
- return n && s && ro(e, t, s), s;
5459
+ return n && s && oo(e, t, s), s;
5341
5460
  };
5342
5461
  let Bt = class extends ne {
5343
5462
  constructor() {
5344
5463
  super(...arguments), this.src = "", this.showCloseButton = !1;
5345
5464
  }
5346
5465
  async onLoad(i) {
5347
- so({
5466
+ ao({
5348
5467
  log: !1,
5349
5468
  heightCalculationMethod: "max",
5350
5469
  onMessage: ({ message: e }) => {
@@ -5387,10 +5506,10 @@ wi([
5387
5506
  Bt = wi([
5388
5507
  Ee("iai-chat-iframe")
5389
5508
  ], Bt);
5390
- var oo = Object.defineProperty, lo = Object.getOwnPropertyDescriptor, gt = (i, e, t, n) => {
5391
- for (var s = n > 1 ? void 0 : n ? lo(e, t) : e, r = i.length - 1, a; r >= 0; r--)
5509
+ var co = Object.defineProperty, uo = Object.getOwnPropertyDescriptor, ft = (i, e, t, n) => {
5510
+ for (var s = n > 1 ? void 0 : n ? uo(e, t) : e, r = i.length - 1, a; r >= 0; r--)
5392
5511
  (a = i[r]) && (s = (n ? a(e, t, s) : a(s)) || s);
5393
- return n && s && oo(e, t, s), s;
5512
+ return n && s && co(e, t, s), s;
5394
5513
  };
5395
5514
  let ze = class extends ne {
5396
5515
  constructor() {
@@ -5445,22 +5564,22 @@ ze.styles = [Se, nt`
5445
5564
  height: 50px;
5446
5565
  }
5447
5566
  `];
5448
- gt([
5567
+ ft([
5449
5568
  V({ type: String })
5450
5569
  ], ze.prototype, "title", 2);
5451
- gt([
5570
+ ft([
5452
5571
  V({ type: String })
5453
5572
  ], ze.prototype, "src", 2);
5454
- gt([
5573
+ ft([
5455
5574
  V({ type: String })
5456
5575
  ], ze.prototype, "width", 2);
5457
- gt([
5576
+ ft([
5458
5577
  V({ type: String })
5459
5578
  ], ze.prototype, "height", 2);
5460
- gt([
5579
+ ft([
5461
5580
  V({ type: Boolean })
5462
5581
  ], ze.prototype, "showHeader", 2);
5463
- ze = gt([
5582
+ ze = ft([
5464
5583
  Ee("iai-chat-iframe-modal")
5465
5584
  ], ze);
5466
5585
  /**
@@ -5476,7 +5595,7 @@ class oi extends Mn {
5476
5595
  render(e) {
5477
5596
  if (e === q || e == null)
5478
5597
  return this._t = void 0, this.it = e;
5479
- if (e === ge)
5598
+ if (e === fe)
5480
5599
  return e;
5481
5600
  if (typeof e != "string")
5482
5601
  throw Error(this.constructor.directiveName + "() called with a non-string value");
@@ -5507,33 +5626,33 @@ let it = xi();
5507
5626
  function Fs(i) {
5508
5627
  it = i;
5509
5628
  }
5510
- const Vs = /[&<>"']/, co = new RegExp(Vs.source, "g"), qs = /[<>"']|&(?!(#\d{1,7}|#[Xx][a-fA-F0-9]{1,6}|\w+);)/, ho = new RegExp(qs.source, "g"), uo = {
5629
+ const Vs = /[&<>"']/, ho = new RegExp(Vs.source, "g"), qs = /[<>"']|&(?!(#\d{1,7}|#[Xx][a-fA-F0-9]{1,6}|\w+);)/, po = new RegExp(qs.source, "g"), mo = {
5511
5630
  "&": "&amp;",
5512
5631
  "<": "&lt;",
5513
5632
  ">": "&gt;",
5514
5633
  '"': "&quot;",
5515
5634
  "'": "&#39;"
5516
- }, ps = (i) => uo[i];
5635
+ }, ps = (i) => mo[i];
5517
5636
  function te(i, e) {
5518
5637
  if (e) {
5519
5638
  if (Vs.test(i))
5520
- return i.replace(co, ps);
5639
+ return i.replace(ho, ps);
5521
5640
  } else if (qs.test(i))
5522
- return i.replace(ho, ps);
5641
+ return i.replace(po, ps);
5523
5642
  return i;
5524
5643
  }
5525
- const po = /&(#(?:\d+)|(?:#x[0-9A-Fa-f]+)|(?:\w+));?/ig;
5526
- function mo(i) {
5527
- return i.replace(po, (e, t) => (t = t.toLowerCase(), t === "colon" ? ":" : t.charAt(0) === "#" ? t.charAt(1) === "x" ? String.fromCharCode(parseInt(t.substring(2), 16)) : String.fromCharCode(+t.substring(1)) : ""));
5644
+ const go = /&(#(?:\d+)|(?:#x[0-9A-Fa-f]+)|(?:\w+));?/ig;
5645
+ function fo(i) {
5646
+ return i.replace(go, (e, t) => (t = t.toLowerCase(), t === "colon" ? ":" : t.charAt(0) === "#" ? t.charAt(1) === "x" ? String.fromCharCode(parseInt(t.substring(2), 16)) : String.fromCharCode(+t.substring(1)) : ""));
5528
5647
  }
5529
- const fo = /(^|[^\[])\^/g;
5648
+ const yo = /(^|[^\[])\^/g;
5530
5649
  function D(i, e) {
5531
5650
  let t = typeof i == "string" ? i : i.source;
5532
5651
  e = e || "";
5533
5652
  const n = {
5534
5653
  replace: (s, r) => {
5535
5654
  let a = typeof r == "string" ? r : r.source;
5536
- return a = a.replace(fo, "$1"), t = t.replace(s, a), n;
5655
+ return a = a.replace(yo, "$1"), t = t.replace(s, a), n;
5537
5656
  },
5538
5657
  getRegex: () => new RegExp(t, e)
5539
5658
  };
@@ -5547,8 +5666,8 @@ function ms(i) {
5547
5666
  }
5548
5667
  return i;
5549
5668
  }
5550
- const _t = { exec: () => null };
5551
- function fs(i, e) {
5669
+ const kt = { exec: () => null };
5670
+ function gs(i, e) {
5552
5671
  const t = i.replace(/\|/g, (r, a, o) => {
5553
5672
  let l = !1, d = a;
5554
5673
  for (; --d >= 0 && o[d] === "\\"; )
@@ -5582,7 +5701,7 @@ function tn(i, e, t) {
5582
5701
  }
5583
5702
  return i.slice(0, n - s);
5584
5703
  }
5585
- function go(i, e) {
5704
+ function vo(i, e) {
5586
5705
  if (i.indexOf(e[1]) === -1)
5587
5706
  return -1;
5588
5707
  let t = 0;
@@ -5595,7 +5714,7 @@ function go(i, e) {
5595
5714
  return n;
5596
5715
  return -1;
5597
5716
  }
5598
- function gs(i, e, t, n) {
5717
+ function fs(i, e, t, n) {
5599
5718
  const s = e.href, r = e.title ? te(e.title) : null, a = i[1].replace(/\\([\[\]])/g, "$1");
5600
5719
  if (i[0].charAt(0) !== "!") {
5601
5720
  n.state.inLink = !0;
@@ -5617,7 +5736,7 @@ function gs(i, e, t, n) {
5617
5736
  text: te(a)
5618
5737
  };
5619
5738
  }
5620
- function yo(i, e) {
5739
+ function bo(i, e) {
5621
5740
  const t = i.match(/^(\s+)(?:```)/);
5622
5741
  if (t === null)
5623
5742
  return e;
@@ -5632,7 +5751,7 @@ function yo(i, e) {
5632
5751
  }).join(`
5633
5752
  `);
5634
5753
  }
5635
- class kn {
5754
+ class _n {
5636
5755
  // set by the lexer
5637
5756
  constructor(e) {
5638
5757
  W(this, "options"), W(this, "rules"), W(this, "lexer"), this.options = e || it;
@@ -5661,7 +5780,7 @@ class kn {
5661
5780
  fences(e) {
5662
5781
  const t = this.rules.block.fences.exec(e);
5663
5782
  if (t) {
5664
- const n = t[0], s = yo(n, t[3] || "");
5783
+ const n = t[0], s = bo(n, t[3] || "");
5665
5784
  return {
5666
5785
  type: "code",
5667
5786
  raw: n,
@@ -5729,34 +5848,34 @@ class kn {
5729
5848
  const a = new RegExp(`^( {0,3}${n})((?:[ ][^\\n]*)?(?:\\n|$))`);
5730
5849
  let o = "", l = "", d = !1;
5731
5850
  for (; e; ) {
5732
- let h = !1;
5851
+ let u = !1;
5733
5852
  if (!(t = a.exec(e)) || this.rules.block.hr.test(e))
5734
5853
  break;
5735
5854
  o = t[0], e = e.substring(o.length);
5736
5855
  let p = t[2].split(`
5737
5856
  `, 1)[0].replace(/^\t+/, (Ce) => " ".repeat(3 * Ce.length)), c = e.split(`
5738
- `, 1)[0], f = 0;
5739
- this.options.pedantic ? (f = 2, l = p.trimStart()) : (f = t[2].search(/[^ ]/), f = f > 4 ? 1 : f, l = p.slice(f), f += t[1].length);
5857
+ `, 1)[0], g = 0;
5858
+ this.options.pedantic ? (g = 2, l = p.trimStart()) : (g = t[2].search(/[^ ]/), g = g > 4 ? 1 : g, l = p.slice(g), g += t[1].length);
5740
5859
  let O = !1;
5741
5860
  if (!p && /^ *$/.test(c) && (o += c + `
5742
- `, e = e.substring(c.length + 1), h = !0), !h) {
5743
- const Ce = new RegExp(`^ {0,${Math.min(3, f - 1)}}(?:[*+-]|\\d{1,9}[.)])((?:[ ][^\\n]*)?(?:\\n|$))`), Gt = new RegExp(`^ {0,${Math.min(3, f - 1)}}((?:- *){3,}|(?:_ *){3,}|(?:\\* *){3,})(?:\\n+|$)`), Qt = new RegExp(`^ {0,${Math.min(3, f - 1)}}(?:\`\`\`|~~~)`), Yt = new RegExp(`^ {0,${Math.min(3, f - 1)}}#`);
5861
+ `, e = e.substring(c.length + 1), u = !0), !u) {
5862
+ const Ce = new RegExp(`^ {0,${Math.min(3, g - 1)}}(?:[*+-]|\\d{1,9}[.)])((?:[ ][^\\n]*)?(?:\\n|$))`), Qt = new RegExp(`^ {0,${Math.min(3, g - 1)}}((?:- *){3,}|(?:_ *){3,}|(?:\\* *){3,})(?:\\n+|$)`), Yt = new RegExp(`^ {0,${Math.min(3, g - 1)}}(?:\`\`\`|~~~)`), Gt = new RegExp(`^ {0,${Math.min(3, g - 1)}}#`);
5744
5863
  for (; e; ) {
5745
5864
  const st = e.split(`
5746
5865
  `, 1)[0];
5747
- if (c = st, this.options.pedantic && (c = c.replace(/^ {1,4}(?=( {4})*[^ ])/g, " ")), Qt.test(c) || Yt.test(c) || Ce.test(c) || Gt.test(e))
5866
+ if (c = st, this.options.pedantic && (c = c.replace(/^ {1,4}(?=( {4})*[^ ])/g, " ")), Yt.test(c) || Gt.test(c) || Ce.test(c) || Qt.test(e))
5748
5867
  break;
5749
- if (c.search(/[^ ]/) >= f || !c.trim())
5868
+ if (c.search(/[^ ]/) >= g || !c.trim())
5750
5869
  l += `
5751
- ` + c.slice(f);
5870
+ ` + c.slice(g);
5752
5871
  else {
5753
- if (O || p.search(/[^ ]/) >= 4 || Qt.test(p) || Yt.test(p) || Gt.test(p))
5872
+ if (O || p.search(/[^ ]/) >= 4 || Yt.test(p) || Gt.test(p) || Qt.test(p))
5754
5873
  break;
5755
5874
  l += `
5756
5875
  ` + c;
5757
5876
  }
5758
5877
  !O && !c.trim() && (O = !0), o += st + `
5759
- `, e = e.substring(st.length + 1), p = c.slice(f);
5878
+ `, e = e.substring(st.length + 1), p = c.slice(g);
5760
5879
  }
5761
5880
  }
5762
5881
  r.loose || (d ? r.loose = !0 : /\n *\n *$/.test(o) && (d = !0));
@@ -5772,14 +5891,14 @@ class kn {
5772
5891
  }), r.raw += o;
5773
5892
  }
5774
5893
  r.items[r.items.length - 1].raw = o.trimEnd(), r.items[r.items.length - 1].text = l.trimEnd(), r.raw = r.raw.trimEnd();
5775
- for (let h = 0; h < r.items.length; h++)
5776
- if (this.lexer.state.top = !1, r.items[h].tokens = this.lexer.blockTokens(r.items[h].text, []), !r.loose) {
5777
- const p = r.items[h].tokens.filter((f) => f.type === "space"), c = p.length > 0 && p.some((f) => /\n.*\n/.test(f.raw));
5894
+ for (let u = 0; u < r.items.length; u++)
5895
+ if (this.lexer.state.top = !1, r.items[u].tokens = this.lexer.blockTokens(r.items[u].text, []), !r.loose) {
5896
+ const p = r.items[u].tokens.filter((g) => g.type === "space"), c = p.length > 0 && p.some((g) => /\n.*\n/.test(g.raw));
5778
5897
  r.loose = c;
5779
5898
  }
5780
5899
  if (r.loose)
5781
- for (let h = 0; h < r.items.length; h++)
5782
- r.items[h].loose = !0;
5900
+ for (let u = 0; u < r.items.length; u++)
5901
+ r.items[u].loose = !0;
5783
5902
  return r;
5784
5903
  }
5785
5904
  }
@@ -5811,7 +5930,7 @@ class kn {
5811
5930
  const t = this.rules.block.table.exec(e);
5812
5931
  if (!t || !/[:|]/.test(t[2]))
5813
5932
  return;
5814
- const n = fs(t[1]), s = t[2].replace(/^\||\| *$/g, "").split("|"), r = t[3] && t[3].trim() ? t[3].replace(/\n[ \t]*$/, "").split(`
5933
+ const n = gs(t[1]), s = t[2].replace(/^\||\| *$/g, "").split("|"), r = t[3] && t[3].trim() ? t[3].replace(/\n[ \t]*$/, "").split(`
5815
5934
  `) : [], a = {
5816
5935
  type: "table",
5817
5936
  raw: t[0],
@@ -5828,7 +5947,7 @@ class kn {
5828
5947
  tokens: this.lexer.inline(o)
5829
5948
  });
5830
5949
  for (const o of r)
5831
- a.rows.push(fs(o, a.header.length).map((l) => ({
5950
+ a.rows.push(gs(o, a.header.length).map((l) => ({
5832
5951
  text: l,
5833
5952
  tokens: this.lexer.inline(l)
5834
5953
  })));
@@ -5901,7 +6020,7 @@ class kn {
5901
6020
  if ((n.length - a.length) % 2 === 0)
5902
6021
  return;
5903
6022
  } else {
5904
- const a = go(t[2], "()");
6023
+ const a = vo(t[2], "()");
5905
6024
  if (a > -1) {
5906
6025
  const o = (t[0].indexOf("!") === 0 ? 5 : 4) + t[1].length + a;
5907
6026
  t[2] = t[2].substring(0, a), t[0] = t[0].substring(0, o).trim(), t[3] = "";
@@ -5913,7 +6032,7 @@ class kn {
5913
6032
  a && (s = a[1], r = a[3]);
5914
6033
  } else
5915
6034
  r = t[3] ? t[3].slice(1, -1) : "";
5916
- return s = s.trim(), /^</.test(s) && (this.options.pedantic && !/>$/.test(n) ? s = s.slice(1) : s = s.slice(1, -1)), gs(t, {
6035
+ return s = s.trim(), /^</.test(s) && (this.options.pedantic && !/>$/.test(n) ? s = s.slice(1) : s = s.slice(1, -1)), fs(t, {
5917
6036
  href: s && s.replace(this.rules.inline.anyPunctuation, "$1"),
5918
6037
  title: r && r.replace(this.rules.inline.anyPunctuation, "$1")
5919
6038
  }, t[0], this.lexer);
@@ -5931,7 +6050,7 @@ class kn {
5931
6050
  text: a
5932
6051
  };
5933
6052
  }
5934
- return gs(n, r, n[0], this.lexer);
6053
+ return fs(n, r, n[0], this.lexer);
5935
6054
  }
5936
6055
  }
5937
6056
  emStrong(e, t, n = "") {
@@ -5939,8 +6058,8 @@ class kn {
5939
6058
  if (!(!s || s[3] && n.match(/[\p{L}\p{N}]/u)) && (!(s[1] || s[2]) || !n || this.rules.inline.punctuation.exec(n))) {
5940
6059
  const r = [...s[0]].length - 1;
5941
6060
  let a, o, l = r, d = 0;
5942
- const h = s[0][0] === "*" ? this.rules.inline.emStrongRDelimAst : this.rules.inline.emStrongRDelimUnd;
5943
- for (h.lastIndex = 0, t = t.slice(-1 * e.length + r); (s = h.exec(t)) != null; ) {
6061
+ const u = s[0][0] === "*" ? this.rules.inline.emStrongRDelimAst : this.rules.inline.emStrongRDelimUnd;
6062
+ for (u.lastIndex = 0, t = t.slice(-1 * e.length + r); (s = u.exec(t)) != null; ) {
5944
6063
  if (a = s[1] || s[2] || s[3] || s[4] || s[5] || s[6], !a)
5945
6064
  continue;
5946
6065
  if (o = [...a].length, s[3] || s[4]) {
@@ -5963,12 +6082,12 @@ class kn {
5963
6082
  tokens: this.lexer.inlineTokens(O)
5964
6083
  };
5965
6084
  }
5966
- const f = c.slice(2, -2);
6085
+ const g = c.slice(2, -2);
5967
6086
  return {
5968
6087
  type: "strong",
5969
6088
  raw: c,
5970
- text: f,
5971
- tokens: this.lexer.inlineTokens(f)
6089
+ text: g,
6090
+ tokens: this.lexer.inlineTokens(g)
5972
6091
  };
5973
6092
  }
5974
6093
  }
@@ -6063,83 +6182,83 @@ class kn {
6063
6182
  }
6064
6183
  }
6065
6184
  }
6066
- const vo = /^(?: *(?:\n|$))+/, bo = /^( {4}[^\n]+(?:\n(?: *(?:\n|$))*)?)+/, wo = /^ {0,3}(`{3,}(?=[^`\n]*(?:\n|$))|~{3,})([^\n]*)(?:\n|$)(?:|([\s\S]*?)(?:\n|$))(?: {0,3}\1[~`]* *(?=\n|$)|$)/, qt = /^ {0,3}((?:-[\t ]*){3,}|(?:_[ \t]*){3,}|(?:\*[ \t]*){3,})(?:\n+|$)/, xo = /^ {0,3}(#{1,6})(?=\s|$)(.*)(?:\n+|$)/, Ks = /(?:[*+-]|\d{1,9}[.)])/, Js = D(/^(?!bull |blockCode|fences|blockquote|heading|html)((?:.|\n(?!\s*?\n|bull |blockCode|fences|blockquote|heading|html))+?)\n {0,3}(=+|-+) *(?:\n+|$)/).replace(/bull/g, Ks).replace(/blockCode/g, / {4}/).replace(/fences/g, / {0,3}(?:`{3,}|~{3,})/).replace(/blockquote/g, / {0,3}>/).replace(/heading/g, / {0,3}#{1,6}/).replace(/html/g, / {0,3}<[^\n>]+>\n/).getRegex(), ki = /^([^\n]+(?:\n(?!hr|heading|lheading|blockquote|fences|list|html|table| +\n)[^\n]+)*)/, ko = /^[^\n]+/, _i = /(?!\s*\])(?:\\.|[^\[\]\\])+/, _o = D(/^ {0,3}\[(label)\]: *(?:\n *)?([^<\s][^\s]*|<.*?>)(?:(?: +(?:\n *)?| *\n *)(title))? *(?:\n+|$)/).replace("label", _i).replace("title", /(?:"(?:\\"?|[^"\\])*"|'[^'\n]*(?:\n[^'\n]+)*\n?'|\([^()]*\))/).getRegex(), $o = D(/^( {0,3}bull)([ \t][^\n]+?)?(?:\n|$)/).replace(/bull/g, Ks).getRegex(), Nn = "address|article|aside|base|basefont|blockquote|body|caption|center|col|colgroup|dd|details|dialog|dir|div|dl|dt|fieldset|figcaption|figure|footer|form|frame|frameset|h[1-6]|head|header|hr|html|iframe|legend|li|link|main|menu|menuitem|meta|nav|noframes|ol|optgroup|option|p|param|search|section|summary|table|tbody|td|tfoot|th|thead|title|tr|track|ul", $i = /<!--(?:-?>|[\s\S]*?(?:-->|$))/, To = D("^ {0,3}(?:<(script|pre|style|textarea)[\\s>][\\s\\S]*?(?:</\\1>[^\\n]*\\n+|$)|comment[^\\n]*(\\n+|$)|<\\?[\\s\\S]*?(?:\\?>\\n*|$)|<![A-Z][\\s\\S]*?(?:>\\n*|$)|<!\\[CDATA\\[[\\s\\S]*?(?:\\]\\]>\\n*|$)|</?(tag)(?: +|\\n|/?>)[\\s\\S]*?(?:(?:\\n *)+\\n|$)|<(?!script|pre|style|textarea)([a-z][\\w-]*)(?:attribute)*? */?>(?=[ \\t]*(?:\\n|$))[\\s\\S]*?(?:(?:\\n *)+\\n|$)|</(?!script|pre|style|textarea)[a-z][\\w-]*\\s*>(?=[ \\t]*(?:\\n|$))[\\s\\S]*?(?:(?:\\n *)+\\n|$))", "i").replace("comment", $i).replace("tag", Nn).replace("attribute", / +[a-zA-Z:_][\w.:-]*(?: *= *"[^"\n]*"| *= *'[^'\n]*'| *= *[^\s"'=<>`]+)?/).getRegex(), Gs = D(ki).replace("hr", qt).replace("heading", " {0,3}#{1,6}(?:\\s|$)").replace("|lheading", "").replace("|table", "").replace("blockquote", " {0,3}>").replace("fences", " {0,3}(?:`{3,}(?=[^`\\n]*\\n)|~{3,})[^\\n]*\\n").replace("list", " {0,3}(?:[*+-]|1[.)]) ").replace("html", "</?(?:tag)(?: +|\\n|/?>)|<(?:script|pre|style|textarea|!--)").replace("tag", Nn).getRegex(), Eo = D(/^( {0,3}> ?(paragraph|[^\n]*)(?:\n|$))+/).replace("paragraph", Gs).getRegex(), Ti = {
6067
- blockquote: Eo,
6068
- code: bo,
6069
- def: _o,
6070
- fences: wo,
6071
- heading: xo,
6185
+ const wo = /^(?: *(?:\n|$))+/, xo = /^( {4}[^\n]+(?:\n(?: *(?:\n|$))*)?)+/, _o = /^ {0,3}(`{3,}(?=[^`\n]*(?:\n|$))|~{3,})([^\n]*)(?:\n|$)(?:|([\s\S]*?)(?:\n|$))(?: {0,3}\1[~`]* *(?=\n|$)|$)/, qt = /^ {0,3}((?:-[\t ]*){3,}|(?:_[ \t]*){3,}|(?:\*[ \t]*){3,})(?:\n+|$)/, ko = /^ {0,3}(#{1,6})(?=\s|$)(.*)(?:\n+|$)/, Ks = /(?:[*+-]|\d{1,9}[.)])/, Js = D(/^(?!bull |blockCode|fences|blockquote|heading|html)((?:.|\n(?!\s*?\n|bull |blockCode|fences|blockquote|heading|html))+?)\n {0,3}(=+|-+) *(?:\n+|$)/).replace(/bull/g, Ks).replace(/blockCode/g, / {4}/).replace(/fences/g, / {0,3}(?:`{3,}|~{3,})/).replace(/blockquote/g, / {0,3}>/).replace(/heading/g, / {0,3}#{1,6}/).replace(/html/g, / {0,3}<[^\n>]+>\n/).getRegex(), _i = /^([^\n]+(?:\n(?!hr|heading|lheading|blockquote|fences|list|html|table| +\n)[^\n]+)*)/, $o = /^[^\n]+/, ki = /(?!\s*\])(?:\\.|[^\[\]\\])+/, To = D(/^ {0,3}\[(label)\]: *(?:\n *)?([^<\s][^\s]*|<.*?>)(?:(?: +(?:\n *)?| *\n *)(title))? *(?:\n+|$)/).replace("label", ki).replace("title", /(?:"(?:\\"?|[^"\\])*"|'[^'\n]*(?:\n[^'\n]+)*\n?'|\([^()]*\))/).getRegex(), Eo = D(/^( {0,3}bull)([ \t][^\n]+?)?(?:\n|$)/).replace(/bull/g, Ks).getRegex(), jn = "address|article|aside|base|basefont|blockquote|body|caption|center|col|colgroup|dd|details|dialog|dir|div|dl|dt|fieldset|figcaption|figure|footer|form|frame|frameset|h[1-6]|head|header|hr|html|iframe|legend|li|link|main|menu|menuitem|meta|nav|noframes|ol|optgroup|option|p|param|search|section|summary|table|tbody|td|tfoot|th|thead|title|tr|track|ul", $i = /<!--(?:-?>|[\s\S]*?(?:-->|$))/, So = D("^ {0,3}(?:<(script|pre|style|textarea)[\\s>][\\s\\S]*?(?:</\\1>[^\\n]*\\n+|$)|comment[^\\n]*(\\n+|$)|<\\?[\\s\\S]*?(?:\\?>\\n*|$)|<![A-Z][\\s\\S]*?(?:>\\n*|$)|<!\\[CDATA\\[[\\s\\S]*?(?:\\]\\]>\\n*|$)|</?(tag)(?: +|\\n|/?>)[\\s\\S]*?(?:(?:\\n *)+\\n|$)|<(?!script|pre|style|textarea)([a-z][\\w-]*)(?:attribute)*? */?>(?=[ \\t]*(?:\\n|$))[\\s\\S]*?(?:(?:\\n *)+\\n|$)|</(?!script|pre|style|textarea)[a-z][\\w-]*\\s*>(?=[ \\t]*(?:\\n|$))[\\s\\S]*?(?:(?:\\n *)+\\n|$))", "i").replace("comment", $i).replace("tag", jn).replace("attribute", / +[a-zA-Z:_][\w.:-]*(?: *= *"[^"\n]*"| *= *'[^'\n]*'| *= *[^\s"'=<>`]+)?/).getRegex(), Qs = D(_i).replace("hr", qt).replace("heading", " {0,3}#{1,6}(?:\\s|$)").replace("|lheading", "").replace("|table", "").replace("blockquote", " {0,3}>").replace("fences", " {0,3}(?:`{3,}(?=[^`\\n]*\\n)|~{3,})[^\\n]*\\n").replace("list", " {0,3}(?:[*+-]|1[.)]) ").replace("html", "</?(?:tag)(?: +|\\n|/?>)|<(?:script|pre|style|textarea|!--)").replace("tag", jn).getRegex(), Co = D(/^( {0,3}> ?(paragraph|[^\n]*)(?:\n|$))+/).replace("paragraph", Qs).getRegex(), Ti = {
6186
+ blockquote: Co,
6187
+ code: xo,
6188
+ def: To,
6189
+ fences: _o,
6190
+ heading: ko,
6072
6191
  hr: qt,
6073
- html: To,
6192
+ html: So,
6074
6193
  lheading: Js,
6075
- list: $o,
6076
- newline: vo,
6077
- paragraph: Gs,
6078
- table: _t,
6079
- text: ko
6080
- }, ys = D("^ *([^\\n ].*)\\n {0,3}((?:\\| *)?:?-+:? *(?:\\| *:?-+:? *)*(?:\\| *)?)(?:\\n((?:(?! *\\n|hr|heading|blockquote|code|fences|list|html).*(?:\\n|$))*)\\n*|$)").replace("hr", qt).replace("heading", " {0,3}#{1,6}(?:\\s|$)").replace("blockquote", " {0,3}>").replace("code", " {4}[^\\n]").replace("fences", " {0,3}(?:`{3,}(?=[^`\\n]*\\n)|~{3,})[^\\n]*\\n").replace("list", " {0,3}(?:[*+-]|1[.)]) ").replace("html", "</?(?:tag)(?: +|\\n|/?>)|<(?:script|pre|style|textarea|!--)").replace("tag", Nn).getRegex(), So = {
6194
+ list: Eo,
6195
+ newline: wo,
6196
+ paragraph: Qs,
6197
+ table: kt,
6198
+ text: $o
6199
+ }, ys = D("^ *([^\\n ].*)\\n {0,3}((?:\\| *)?:?-+:? *(?:\\| *:?-+:? *)*(?:\\| *)?)(?:\\n((?:(?! *\\n|hr|heading|blockquote|code|fences|list|html).*(?:\\n|$))*)\\n*|$)").replace("hr", qt).replace("heading", " {0,3}#{1,6}(?:\\s|$)").replace("blockquote", " {0,3}>").replace("code", " {4}[^\\n]").replace("fences", " {0,3}(?:`{3,}(?=[^`\\n]*\\n)|~{3,})[^\\n]*\\n").replace("list", " {0,3}(?:[*+-]|1[.)]) ").replace("html", "</?(?:tag)(?: +|\\n|/?>)|<(?:script|pre|style|textarea|!--)").replace("tag", jn).getRegex(), Ao = {
6081
6200
  ...Ti,
6082
6201
  table: ys,
6083
- paragraph: D(ki).replace("hr", qt).replace("heading", " {0,3}#{1,6}(?:\\s|$)").replace("|lheading", "").replace("table", ys).replace("blockquote", " {0,3}>").replace("fences", " {0,3}(?:`{3,}(?=[^`\\n]*\\n)|~{3,})[^\\n]*\\n").replace("list", " {0,3}(?:[*+-]|1[.)]) ").replace("html", "</?(?:tag)(?: +|\\n|/?>)|<(?:script|pre|style|textarea|!--)").replace("tag", Nn).getRegex()
6084
- }, Co = {
6202
+ paragraph: D(_i).replace("hr", qt).replace("heading", " {0,3}#{1,6}(?:\\s|$)").replace("|lheading", "").replace("table", ys).replace("blockquote", " {0,3}>").replace("fences", " {0,3}(?:`{3,}(?=[^`\\n]*\\n)|~{3,})[^\\n]*\\n").replace("list", " {0,3}(?:[*+-]|1[.)]) ").replace("html", "</?(?:tag)(?: +|\\n|/?>)|<(?:script|pre|style|textarea|!--)").replace("tag", jn).getRegex()
6203
+ }, Io = {
6085
6204
  ...Ti,
6086
6205
  html: D(`^ *(?:comment *(?:\\n|\\s*$)|<(tag)[\\s\\S]+?</\\1> *(?:\\n{2,}|\\s*$)|<tag(?:"[^"]*"|'[^']*'|\\s[^'"/>\\s]*)*?/?> *(?:\\n{2,}|\\s*$))`).replace("comment", $i).replace(/tag/g, "(?!(?:a|em|strong|small|s|cite|q|dfn|abbr|data|time|code|var|samp|kbd|sub|sup|i|b|u|mark|ruby|rt|rp|bdi|bdo|span|br|wbr|ins|del|img)\\b)\\w+(?!:|[^\\w\\s@]*@)\\b").getRegex(),
6087
6206
  def: /^ *\[([^\]]+)\]: *<?([^\s>]+)>?(?: +(["(][^\n]+[")]))? *(?:\n+|$)/,
6088
6207
  heading: /^(#{1,6})(.*)(?:\n+|$)/,
6089
- fences: _t,
6208
+ fences: kt,
6090
6209
  // fences not supported
6091
6210
  lheading: /^(.+?)\n {0,3}(=+|-+) *(?:\n+|$)/,
6092
- paragraph: D(ki).replace("hr", qt).replace("heading", ` *#{1,6} *[^
6211
+ paragraph: D(_i).replace("hr", qt).replace("heading", ` *#{1,6} *[^
6093
6212
  ]`).replace("lheading", Js).replace("|table", "").replace("blockquote", " {0,3}>").replace("|fences", "").replace("|list", "").replace("|html", "").replace("|tag", "").getRegex()
6094
- }, Qs = /^\\([!"#$%&'()*+,\-./:;<=>?@\[\]\\^_`{|}~])/, Ao = /^(`+)([^`]|[^`][\s\S]*?[^`])\1(?!`)/, Ys = /^( {2,}|\\)\n(?!\s*$)/, Io = /^(`+|[^`])(?:(?= {2,}\n)|[\s\S]*?(?:(?=[\\<!\[`*_]|\b_|$)|[^ ](?= {2,}\n)))/, Kt = "\\p{P}\\p{S}", Oo = D(/^((?![*_])[\spunctuation])/, "u").replace(/punctuation/g, Kt).getRegex(), Mo = /\[[^[\]]*?\]\([^\(\)]*?\)|`[^`]*?`|<[^<>]*?>/g, Ro = D(/^(?:\*+(?:((?!\*)[punct])|[^\s*]))|^_+(?:((?!_)[punct])|([^\s_]))/, "u").replace(/punct/g, Kt).getRegex(), Po = D("^[^_*]*?__[^_*]*?\\*[^_*]*?(?=__)|[^*]+(?=[^*])|(?!\\*)[punct](\\*+)(?=[\\s]|$)|[^punct\\s](\\*+)(?!\\*)(?=[punct\\s]|$)|(?!\\*)[punct\\s](\\*+)(?=[^punct\\s])|[\\s](\\*+)(?!\\*)(?=[punct])|(?!\\*)[punct](\\*+)(?!\\*)(?=[punct])|[^punct\\s](\\*+)(?=[^punct\\s])", "gu").replace(/punct/g, Kt).getRegex(), No = D("^[^_*]*?\\*\\*[^_*]*?_[^_*]*?(?=\\*\\*)|[^_]+(?=[^_])|(?!_)[punct](_+)(?=[\\s]|$)|[^punct\\s](_+)(?!_)(?=[punct\\s]|$)|(?!_)[punct\\s](_+)(?=[^punct\\s])|[\\s](_+)(?!_)(?=[punct])|(?!_)[punct](_+)(?!_)(?=[punct])", "gu").replace(/punct/g, Kt).getRegex(), jo = D(/\\([punct])/, "gu").replace(/punct/g, Kt).getRegex(), zo = D(/^<(scheme:[^\s\x00-\x1f<>]*|email)>/).replace("scheme", /[a-zA-Z][a-zA-Z0-9+.-]{1,31}/).replace("email", /[a-zA-Z0-9.!#$%&'*+/=?^_`{|}~-]+(@)[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?(?:\.[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?)+(?![-_])/).getRegex(), Zo = D($i).replace("(?:-->|$)", "-->").getRegex(), Lo = D("^comment|^</[a-zA-Z][\\w:-]*\\s*>|^<[a-zA-Z][\\w-]*(?:attribute)*?\\s*/?>|^<\\?[\\s\\S]*?\\?>|^<![a-zA-Z]+\\s[\\s\\S]*?>|^<!\\[CDATA\\[[\\s\\S]*?\\]\\]>").replace("comment", Zo).replace("attribute", /\s+[a-zA-Z:_][\w.:-]*(?:\s*=\s*"[^"]*"|\s*=\s*'[^']*'|\s*=\s*[^\s"'=<>`]+)?/).getRegex(), _n = /(?:\[(?:\\.|[^\[\]\\])*\]|\\.|`[^`]*`|[^\[\]\\`])*?/, Do = D(/^!?\[(label)\]\(\s*(href)(?:\s+(title))?\s*\)/).replace("label", _n).replace("href", /<(?:\\.|[^\n<>\\])+>|[^\s\x00-\x1f]*/).replace("title", /"(?:\\"?|[^"\\])*"|'(?:\\'?|[^'\\])*'|\((?:\\\)?|[^)\\])*\)/).getRegex(), Xs = D(/^!?\[(label)\]\[(ref)\]/).replace("label", _n).replace("ref", _i).getRegex(), er = D(/^!?\[(ref)\](?:\[\])?/).replace("ref", _i).getRegex(), Uo = D("reflink|nolink(?!\\()", "g").replace("reflink", Xs).replace("nolink", er).getRegex(), Ei = {
6095
- _backpedal: _t,
6213
+ }, Ys = /^\\([!"#$%&'()*+,\-./:;<=>?@\[\]\\^_`{|}~])/, Oo = /^(`+)([^`]|[^`][\s\S]*?[^`])\1(?!`)/, Gs = /^( {2,}|\\)\n(?!\s*$)/, Mo = /^(`+|[^`])(?:(?= {2,}\n)|[\s\S]*?(?:(?=[\\<!\[`*_]|\b_|$)|[^ ](?= {2,}\n)))/, Kt = "\\p{P}\\p{S}", Ro = D(/^((?![*_])[\spunctuation])/, "u").replace(/punctuation/g, Kt).getRegex(), No = /\[[^[\]]*?\]\([^\(\)]*?\)|`[^`]*?`|<[^<>]*?>/g, Po = D(/^(?:\*+(?:((?!\*)[punct])|[^\s*]))|^_+(?:((?!_)[punct])|([^\s_]))/, "u").replace(/punct/g, Kt).getRegex(), jo = D("^[^_*]*?__[^_*]*?\\*[^_*]*?(?=__)|[^*]+(?=[^*])|(?!\\*)[punct](\\*+)(?=[\\s]|$)|[^punct\\s](\\*+)(?!\\*)(?=[punct\\s]|$)|(?!\\*)[punct\\s](\\*+)(?=[^punct\\s])|[\\s](\\*+)(?!\\*)(?=[punct])|(?!\\*)[punct](\\*+)(?!\\*)(?=[punct])|[^punct\\s](\\*+)(?=[^punct\\s])", "gu").replace(/punct/g, Kt).getRegex(), zo = D("^[^_*]*?\\*\\*[^_*]*?_[^_*]*?(?=\\*\\*)|[^_]+(?=[^_])|(?!_)[punct](_+)(?=[\\s]|$)|[^punct\\s](_+)(?!_)(?=[punct\\s]|$)|(?!_)[punct\\s](_+)(?=[^punct\\s])|[\\s](_+)(?!_)(?=[punct])|(?!_)[punct](_+)(?!_)(?=[punct])", "gu").replace(/punct/g, Kt).getRegex(), Zo = D(/\\([punct])/, "gu").replace(/punct/g, Kt).getRegex(), Lo = D(/^<(scheme:[^\s\x00-\x1f<>]*|email)>/).replace("scheme", /[a-zA-Z][a-zA-Z0-9+.-]{1,31}/).replace("email", /[a-zA-Z0-9.!#$%&'*+/=?^_`{|}~-]+(@)[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?(?:\.[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?)+(?![-_])/).getRegex(), Do = D($i).replace("(?:-->|$)", "-->").getRegex(), Uo = D("^comment|^</[a-zA-Z][\\w:-]*\\s*>|^<[a-zA-Z][\\w-]*(?:attribute)*?\\s*/?>|^<\\?[\\s\\S]*?\\?>|^<![a-zA-Z]+\\s[\\s\\S]*?>|^<!\\[CDATA\\[[\\s\\S]*?\\]\\]>").replace("comment", Do).replace("attribute", /\s+[a-zA-Z:_][\w.:-]*(?:\s*=\s*"[^"]*"|\s*=\s*'[^']*'|\s*=\s*[^\s"'=<>`]+)?/).getRegex(), kn = /(?:\[(?:\\.|[^\[\]\\])*\]|\\.|`[^`]*`|[^\[\]\\`])*?/, Ho = D(/^!?\[(label)\]\(\s*(href)(?:\s+(title))?\s*\)/).replace("label", kn).replace("href", /<(?:\\.|[^\n<>\\])+>|[^\s\x00-\x1f]*/).replace("title", /"(?:\\"?|[^"\\])*"|'(?:\\'?|[^'\\])*'|\((?:\\\)?|[^)\\])*\)/).getRegex(), Xs = D(/^!?\[(label)\]\[(ref)\]/).replace("label", kn).replace("ref", ki).getRegex(), er = D(/^!?\[(ref)\](?:\[\])?/).replace("ref", ki).getRegex(), Bo = D("reflink|nolink(?!\\()", "g").replace("reflink", Xs).replace("nolink", er).getRegex(), Ei = {
6214
+ _backpedal: kt,
6096
6215
  // only used for GFM url
6097
- anyPunctuation: jo,
6098
- autolink: zo,
6099
- blockSkip: Mo,
6100
- br: Ys,
6101
- code: Ao,
6102
- del: _t,
6103
- emStrongLDelim: Ro,
6104
- emStrongRDelimAst: Po,
6105
- emStrongRDelimUnd: No,
6106
- escape: Qs,
6107
- link: Do,
6216
+ anyPunctuation: Zo,
6217
+ autolink: Lo,
6218
+ blockSkip: No,
6219
+ br: Gs,
6220
+ code: Oo,
6221
+ del: kt,
6222
+ emStrongLDelim: Po,
6223
+ emStrongRDelimAst: jo,
6224
+ emStrongRDelimUnd: zo,
6225
+ escape: Ys,
6226
+ link: Ho,
6108
6227
  nolink: er,
6109
- punctuation: Oo,
6228
+ punctuation: Ro,
6110
6229
  reflink: Xs,
6111
- reflinkSearch: Uo,
6112
- tag: Lo,
6113
- text: Io,
6114
- url: _t
6115
- }, Ho = {
6230
+ reflinkSearch: Bo,
6231
+ tag: Uo,
6232
+ text: Mo,
6233
+ url: kt
6234
+ }, Wo = {
6116
6235
  ...Ei,
6117
- link: D(/^!?\[(label)\]\((.*?)\)/).replace("label", _n).getRegex(),
6118
- reflink: D(/^!?\[(label)\]\s*\[([^\]]*)\]/).replace("label", _n).getRegex()
6236
+ link: D(/^!?\[(label)\]\((.*?)\)/).replace("label", kn).getRegex(),
6237
+ reflink: D(/^!?\[(label)\]\s*\[([^\]]*)\]/).replace("label", kn).getRegex()
6119
6238
  }, li = {
6120
6239
  ...Ei,
6121
- escape: D(Qs).replace("])", "~|])").getRegex(),
6240
+ escape: D(Ys).replace("])", "~|])").getRegex(),
6122
6241
  url: D(/^((?:ftp|https?):\/\/|www\.)(?:[a-zA-Z0-9\-]+\.?)+[^\s<]*|^email/, "i").replace("email", /[A-Za-z0-9._+-]+(@)[a-zA-Z0-9-_]+(?:\.[a-zA-Z0-9-_]*[a-zA-Z0-9])+(?![-_])/).getRegex(),
6123
6242
  _backpedal: /(?:[^?!.,:;*_'"~()&]+|\([^)]*\)|&(?![a-zA-Z0-9]+;$)|[?!.,:;*_'"~)]+(?!$))+/,
6124
6243
  del: /^(~~?)(?=[^\s~])([\s\S]*?[^\s~])\1(?=[^~]|$)/,
6125
6244
  text: /^([`~]+|[^`~])(?:(?= {2,}\n)|(?=[a-zA-Z0-9.!#$%&'*+\/=?_`{\|}~-]+@)|[\s\S]*?(?:(?=[\\<!\[`*~_]|\b_|https?:\/\/|ftp:\/\/|www\.|$)|[^ ](?= {2,}\n)|[^a-zA-Z0-9.!#$%&'*+\/=?_`{\|}~-](?=[a-zA-Z0-9.!#$%&'*+\/=?_`{\|}~-]+@)))/
6126
- }, Bo = {
6245
+ }, Fo = {
6127
6246
  ...li,
6128
- br: D(Ys).replace("{2,}", "*").getRegex(),
6247
+ br: D(Gs).replace("{2,}", "*").getRegex(),
6129
6248
  text: D(li.text).replace("\\b_", "\\b_| {2,}\\n").replace(/\{2,\}/g, "*").getRegex()
6130
6249
  }, nn = {
6131
6250
  normal: Ti,
6132
- gfm: So,
6133
- pedantic: Co
6251
+ gfm: Ao,
6252
+ pedantic: Io
6134
6253
  }, bt = {
6135
6254
  normal: Ei,
6136
6255
  gfm: li,
6137
- breaks: Bo,
6138
- pedantic: Ho
6256
+ breaks: Fo,
6257
+ pedantic: Wo
6139
6258
  };
6140
6259
  class me {
6141
6260
  constructor(e) {
6142
- W(this, "tokens"), W(this, "options"), W(this, "state"), W(this, "tokenizer"), W(this, "inlineQueue"), this.tokens = [], this.tokens.links = /* @__PURE__ */ Object.create(null), this.options = e || it, this.options.tokenizer = this.options.tokenizer || new kn(), this.tokenizer = this.options.tokenizer, this.tokenizer.options = this.options, this.tokenizer.lexer = this, this.inlineQueue = [], this.state = {
6261
+ W(this, "tokens"), W(this, "options"), W(this, "state"), W(this, "tokenizer"), W(this, "inlineQueue"), this.tokens = [], this.tokens.links = /* @__PURE__ */ Object.create(null), this.options = e || it, this.options.tokenizer = this.options.tokenizer || new _n(), this.tokenizer = this.options.tokenizer, this.tokenizer.options = this.options, this.tokenizer.lexer = this, this.inlineQueue = [], this.state = {
6143
6262
  inLink: !1,
6144
6263
  inRawBlock: !1,
6145
6264
  top: !0
@@ -6244,8 +6363,8 @@ class me {
6244
6363
  let o = 1 / 0;
6245
6364
  const l = e.slice(1);
6246
6365
  let d;
6247
- this.options.extensions.startBlock.forEach((h) => {
6248
- d = h.call({ lexer: this }, l), typeof d == "number" && d >= 0 && (o = Math.min(o, d));
6366
+ this.options.extensions.startBlock.forEach((u) => {
6367
+ d = u.call({ lexer: this }, l), typeof d == "number" && d >= 0 && (o = Math.min(o, d));
6249
6368
  }), o < 1 / 0 && o >= 0 && (r = e.substring(0, o + 1));
6250
6369
  }
6251
6370
  if (this.state.top && (n = this.tokenizer.paragraph(r))) {
@@ -6280,17 +6399,17 @@ class me {
6280
6399
  inlineTokens(e, t = []) {
6281
6400
  let n, s, r, a = e, o, l, d;
6282
6401
  if (this.tokens.links) {
6283
- const h = Object.keys(this.tokens.links);
6284
- if (h.length > 0)
6402
+ const u = Object.keys(this.tokens.links);
6403
+ if (u.length > 0)
6285
6404
  for (; (o = this.tokenizer.rules.inline.reflinkSearch.exec(a)) != null; )
6286
- h.includes(o[0].slice(o[0].lastIndexOf("[") + 1, -1)) && (a = a.slice(0, o.index) + "[" + "a".repeat(o[0].length - 2) + "]" + a.slice(this.tokenizer.rules.inline.reflinkSearch.lastIndex));
6405
+ u.includes(o[0].slice(o[0].lastIndexOf("[") + 1, -1)) && (a = a.slice(0, o.index) + "[" + "a".repeat(o[0].length - 2) + "]" + a.slice(this.tokenizer.rules.inline.reflinkSearch.lastIndex));
6287
6406
  }
6288
6407
  for (; (o = this.tokenizer.rules.inline.blockSkip.exec(a)) != null; )
6289
6408
  a = a.slice(0, o.index) + "[" + "a".repeat(o[0].length - 2) + "]" + a.slice(this.tokenizer.rules.inline.blockSkip.lastIndex);
6290
6409
  for (; (o = this.tokenizer.rules.inline.anyPunctuation.exec(a)) != null; )
6291
6410
  a = a.slice(0, o.index) + "++" + a.slice(this.tokenizer.rules.inline.anyPunctuation.lastIndex);
6292
6411
  for (; e; )
6293
- if (l || (d = ""), l = !1, !(this.options.extensions && this.options.extensions.inline && this.options.extensions.inline.some((h) => (n = h.call({ lexer: this }, e, t)) ? (e = e.substring(n.raw.length), t.push(n), !0) : !1))) {
6412
+ if (l || (d = ""), l = !1, !(this.options.extensions && this.options.extensions.inline && this.options.extensions.inline.some((u) => (n = u.call({ lexer: this }, e, t)) ? (e = e.substring(n.raw.length), t.push(n), !0) : !1))) {
6294
6413
  if (n = this.tokenizer.escape(e)) {
6295
6414
  e = e.substring(n.raw.length), t.push(n);
6296
6415
  continue;
@@ -6332,24 +6451,24 @@ class me {
6332
6451
  continue;
6333
6452
  }
6334
6453
  if (r = e, this.options.extensions && this.options.extensions.startInline) {
6335
- let h = 1 / 0;
6454
+ let u = 1 / 0;
6336
6455
  const p = e.slice(1);
6337
6456
  let c;
6338
- this.options.extensions.startInline.forEach((f) => {
6339
- c = f.call({ lexer: this }, p), typeof c == "number" && c >= 0 && (h = Math.min(h, c));
6340
- }), h < 1 / 0 && h >= 0 && (r = e.substring(0, h + 1));
6457
+ this.options.extensions.startInline.forEach((g) => {
6458
+ c = g.call({ lexer: this }, p), typeof c == "number" && c >= 0 && (u = Math.min(u, c));
6459
+ }), u < 1 / 0 && u >= 0 && (r = e.substring(0, u + 1));
6341
6460
  }
6342
6461
  if (n = this.tokenizer.inlineText(r)) {
6343
6462
  e = e.substring(n.raw.length), n.raw.slice(-1) !== "_" && (d = n.raw.slice(-1)), l = !0, s = t[t.length - 1], s && s.type === "text" ? (s.raw += n.raw, s.text += n.text) : t.push(n);
6344
6463
  continue;
6345
6464
  }
6346
6465
  if (e) {
6347
- const h = "Infinite loop on byte: " + e.charCodeAt(0);
6466
+ const u = "Infinite loop on byte: " + e.charCodeAt(0);
6348
6467
  if (this.options.silent) {
6349
- console.error(h);
6468
+ console.error(u);
6350
6469
  break;
6351
6470
  } else
6352
- throw new Error(h);
6471
+ throw new Error(u);
6353
6472
  }
6354
6473
  }
6355
6474
  return t;
@@ -6485,7 +6604,7 @@ class Si {
6485
6604
  return "";
6486
6605
  }
6487
6606
  }
6488
- class fe {
6607
+ class ge {
6489
6608
  constructor(e) {
6490
6609
  W(this, "options"), W(this, "renderer"), W(this, "textRenderer"), this.options = e || it, this.options.renderer = this.options.renderer || new $n(), this.renderer = this.options.renderer, this.renderer.options = this.options, this.textRenderer = new Si();
6491
6610
  }
@@ -6493,13 +6612,13 @@ class fe {
6493
6612
  * Static Parse Method
6494
6613
  */
6495
6614
  static parse(e, t) {
6496
- return new fe(t).parse(e);
6615
+ return new ge(t).parse(e);
6497
6616
  }
6498
6617
  /**
6499
6618
  * Static Parse Inline Method
6500
6619
  */
6501
6620
  static parseInline(e, t) {
6502
- return new fe(t).parseInline(e);
6621
+ return new ge(t).parseInline(e);
6503
6622
  }
6504
6623
  /**
6505
6624
  * Parse Loop
@@ -6524,7 +6643,7 @@ class fe {
6524
6643
  }
6525
6644
  case "heading": {
6526
6645
  const a = r;
6527
- n += this.renderer.heading(this.parseInline(a.tokens), a.depth, mo(this.parseInline(a.tokens, this.textRenderer)));
6646
+ n += this.renderer.heading(this.parseInline(a.tokens), a.depth, fo(this.parseInline(a.tokens, this.textRenderer)));
6528
6647
  continue;
6529
6648
  }
6530
6649
  case "code": {
@@ -6535,12 +6654,12 @@ class fe {
6535
6654
  case "table": {
6536
6655
  const a = r;
6537
6656
  let o = "", l = "";
6538
- for (let h = 0; h < a.header.length; h++)
6539
- l += this.renderer.tablecell(this.parseInline(a.header[h].tokens), { header: !0, align: a.align[h] });
6657
+ for (let u = 0; u < a.header.length; u++)
6658
+ l += this.renderer.tablecell(this.parseInline(a.header[u].tokens), { header: !0, align: a.align[u] });
6540
6659
  o += this.renderer.tablerow(l);
6541
6660
  let d = "";
6542
- for (let h = 0; h < a.rows.length; h++) {
6543
- const p = a.rows[h];
6661
+ for (let u = 0; u < a.rows.length; u++) {
6662
+ const p = a.rows[u];
6544
6663
  l = "";
6545
6664
  for (let c = 0; c < p.length; c++)
6546
6665
  l += this.renderer.tablecell(this.parseInline(p[c].tokens), { header: !1, align: a.align[c] });
@@ -6556,20 +6675,20 @@ class fe {
6556
6675
  }
6557
6676
  case "list": {
6558
6677
  const a = r, o = a.ordered, l = a.start, d = a.loose;
6559
- let h = "";
6678
+ let u = "";
6560
6679
  for (let p = 0; p < a.items.length; p++) {
6561
- const c = a.items[p], f = c.checked, O = c.task;
6680
+ const c = a.items[p], g = c.checked, O = c.task;
6562
6681
  let H = "";
6563
6682
  if (c.task) {
6564
- const J = this.renderer.checkbox(!!f);
6683
+ const J = this.renderer.checkbox(!!g);
6565
6684
  d ? c.tokens.length > 0 && c.tokens[0].type === "paragraph" ? (c.tokens[0].text = J + " " + c.tokens[0].text, c.tokens[0].tokens && c.tokens[0].tokens.length > 0 && c.tokens[0].tokens[0].type === "text" && (c.tokens[0].tokens[0].text = J + " " + c.tokens[0].tokens[0].text)) : c.tokens.unshift({
6566
6685
  type: "text",
6567
6686
  text: J + " "
6568
6687
  }) : H += J + " ";
6569
6688
  }
6570
- H += this.parse(c.tokens, d), h += this.renderer.listitem(H, O, !!f);
6689
+ H += this.parse(c.tokens, d), u += this.renderer.listitem(H, O, !!g);
6571
6690
  }
6572
- n += this.renderer.list(h, o, l);
6691
+ n += this.renderer.list(u, o, l);
6573
6692
  continue;
6574
6693
  }
6575
6694
  case "html": {
@@ -6705,9 +6824,9 @@ W($t, "passThroughHooks", /* @__PURE__ */ new Set([
6705
6824
  "processAllTokens"
6706
6825
  ]));
6707
6826
  var on, ci, di, vs;
6708
- class Wo {
6827
+ class Vo {
6709
6828
  constructor(...e) {
6710
- rs(this, on), rs(this, di), W(this, "defaults", xi()), W(this, "options", this.setOptions), W(this, "parse", ni(this, on, ci).call(this, me.lex, fe.parse)), W(this, "parseInline", ni(this, on, ci).call(this, me.lexInline, fe.parseInline)), W(this, "Parser", fe), W(this, "Renderer", $n), W(this, "TextRenderer", Si), W(this, "Lexer", me), W(this, "Tokenizer", kn), W(this, "Hooks", $t), this.use(...e);
6829
+ Hi(this, on), Hi(this, di), W(this, "defaults", xi()), W(this, "options", this.setOptions), W(this, "parse", ni(this, on, ci).call(this, me.lex, ge.parse)), W(this, "parseInline", ni(this, on, ci).call(this, me.lexInline, ge.parseInline)), W(this, "Parser", ge), W(this, "Renderer", $n), W(this, "TextRenderer", Si), W(this, "Lexer", me), W(this, "Tokenizer", _n), W(this, "Hooks", $t), this.use(...e);
6711
6830
  }
6712
6831
  /**
6713
6832
  * Run callback for every token
@@ -6770,24 +6889,24 @@ class Wo {
6770
6889
  if (a === "options")
6771
6890
  continue;
6772
6891
  const o = a, l = n.renderer[o], d = r[o];
6773
- r[o] = (...h) => {
6774
- let p = l.apply(r, h);
6775
- return p === !1 && (p = d.apply(r, h)), p || "";
6892
+ r[o] = (...u) => {
6893
+ let p = l.apply(r, u);
6894
+ return p === !1 && (p = d.apply(r, u)), p || "";
6776
6895
  };
6777
6896
  }
6778
6897
  s.renderer = r;
6779
6898
  }
6780
6899
  if (n.tokenizer) {
6781
- const r = this.defaults.tokenizer || new kn(this.defaults);
6900
+ const r = this.defaults.tokenizer || new _n(this.defaults);
6782
6901
  for (const a in n.tokenizer) {
6783
6902
  if (!(a in r))
6784
6903
  throw new Error(`tokenizer '${a}' does not exist`);
6785
6904
  if (["options", "rules", "lexer"].includes(a))
6786
6905
  continue;
6787
6906
  const o = a, l = n.tokenizer[o], d = r[o];
6788
- r[o] = (...h) => {
6789
- let p = l.apply(r, h);
6790
- return p === !1 && (p = d.apply(r, h)), p;
6907
+ r[o] = (...u) => {
6908
+ let p = l.apply(r, u);
6909
+ return p === !1 && (p = d.apply(r, u)), p;
6791
6910
  };
6792
6911
  }
6793
6912
  s.tokenizer = r;
@@ -6800,14 +6919,14 @@ class Wo {
6800
6919
  if (a === "options")
6801
6920
  continue;
6802
6921
  const o = a, l = n.hooks[o], d = r[o];
6803
- $t.passThroughHooks.has(a) ? r[o] = (h) => {
6922
+ $t.passThroughHooks.has(a) ? r[o] = (u) => {
6804
6923
  if (this.defaults.async)
6805
- return Promise.resolve(l.call(r, h)).then((c) => d.call(r, c));
6806
- const p = l.call(r, h);
6924
+ return Promise.resolve(l.call(r, u)).then((c) => d.call(r, c));
6925
+ const p = l.call(r, u);
6807
6926
  return d.call(r, p);
6808
- } : r[o] = (...h) => {
6809
- let p = l.apply(r, h);
6810
- return p === !1 && (p = d.apply(r, h)), p;
6927
+ } : r[o] = (...u) => {
6928
+ let p = l.apply(r, u);
6929
+ return p === !1 && (p = d.apply(r, u)), p;
6811
6930
  };
6812
6931
  }
6813
6932
  s.hooks = r;
@@ -6829,7 +6948,7 @@ class Wo {
6829
6948
  return me.lex(e, t ?? this.defaults);
6830
6949
  }
6831
6950
  parser(e, t) {
6832
- return fe.parse(e, t ?? this.defaults);
6951
+ return ge.parse(e, t ?? this.defaults);
6833
6952
  }
6834
6953
  }
6835
6954
  on = /* @__PURE__ */ new WeakSet(), ci = function(i, e) {
@@ -6865,7 +6984,7 @@ Please report this to https://github.com/markedjs/marked.`, i) {
6865
6984
  throw t;
6866
6985
  };
6867
6986
  };
6868
- const et = new Wo();
6987
+ const et = new Vo();
6869
6988
  function L(i, e) {
6870
6989
  return et.parse(i, e);
6871
6990
  }
@@ -6881,13 +7000,13 @@ L.walkTokens = function(i, e) {
6881
7000
  return et.walkTokens(i, e);
6882
7001
  };
6883
7002
  L.parseInline = et.parseInline;
6884
- L.Parser = fe;
6885
- L.parser = fe.parse;
7003
+ L.Parser = ge;
7004
+ L.parser = ge.parse;
6886
7005
  L.Renderer = $n;
6887
7006
  L.TextRenderer = Si;
6888
7007
  L.Lexer = me;
6889
7008
  L.lexer = me.lex;
6890
- L.Tokenizer = kn;
7009
+ L.Tokenizer = _n;
6891
7010
  L.Hooks = $t;
6892
7011
  L.parse = L;
6893
7012
  L.options;
@@ -6895,18 +7014,18 @@ L.setOptions;
6895
7014
  L.use;
6896
7015
  L.walkTokens;
6897
7016
  L.parseInline;
6898
- fe.parse;
7017
+ ge.parse;
6899
7018
  me.lex;
6900
- function Fo(i) {
7019
+ function qo(i) {
6901
7020
  return i.replace(/([a-z0-9])([A-Z])/g, "$1-$2").toLowerCase();
6902
7021
  }
6903
7022
  function tr(i, e = "") {
6904
7023
  return Object.keys(i).reduce((t, n) => {
6905
- const s = Fo(n), r = e ? `${e}-${s}` : s;
7024
+ const s = qo(n), r = e ? `${e}-${s}` : s;
6906
7025
  return typeof i[n] == "object" && i[n] !== null ? Object.assign(t, tr(i[n], r)) : t[r] = i[n], t;
6907
7026
  }, {});
6908
7027
  }
6909
- function Vo(i) {
7028
+ function Ko(i) {
6910
7029
  const e = {
6911
7030
  "&": "&amp;",
6912
7031
  "<": "&lt;",
@@ -6917,13 +7036,13 @@ function Vo(i) {
6917
7036
  return i.replace(/[&<>"']/g, (t) => e[t]);
6918
7037
  }
6919
7038
  function nr(i) {
6920
- const e = Vo(i);
7039
+ const e = Ko(i);
6921
7040
  return L.parse(e);
6922
7041
  }
6923
- var qo = Object.defineProperty, Ko = Object.getOwnPropertyDescriptor, ir = (i, e, t, n) => {
6924
- for (var s = n > 1 ? void 0 : n ? Ko(e, t) : e, r = i.length - 1, a; r >= 0; r--)
7042
+ var Jo = Object.defineProperty, Qo = Object.getOwnPropertyDescriptor, ir = (i, e, t, n) => {
7043
+ for (var s = n > 1 ? void 0 : n ? Qo(e, t) : e, r = i.length - 1, a; r >= 0; r--)
6925
7044
  (a = i[r]) && (s = (n ? a(e, t, s) : a(s)) || s);
6926
- return n && s && qo(e, t, s), s;
7045
+ return n && s && Jo(e, t, s), s;
6927
7046
  };
6928
7047
  let Tn = class extends ne {
6929
7048
  constructor() {
@@ -6954,14 +7073,14 @@ ir([
6954
7073
  Tn = ir([
6955
7074
  Ee("iai-chat-message-assistant")
6956
7075
  ], Tn);
6957
- async function Jo(i, e) {
7076
+ async function Yo(i, e) {
6958
7077
  const { type: t, params: n } = i, s = e[t];
6959
7078
  if (!s)
6960
7079
  throw new Error(`No handler for enhanced content type ${t}`);
6961
7080
  return s({ params: n, html: z });
6962
7081
  }
6963
- var Go = Object.defineProperty, Qo = Object.getOwnPropertyDescriptor, Jt = (i, e, t, n) => {
6964
- for (var s = n > 1 ? void 0 : n ? Qo(e, t) : e, r = i.length - 1, a; r >= 0; r--)
7082
+ var Go = Object.defineProperty, Xo = Object.getOwnPropertyDescriptor, Jt = (i, e, t, n) => {
7083
+ for (var s = n > 1 ? void 0 : n ? Xo(e, t) : e, r = i.length - 1, a; r >= 0; r--)
6965
7084
  (a = i[r]) && (s = (n ? a(e, t, s) : a(s)) || s);
6966
7085
  return n && s && Go(e, t, s), s;
6967
7086
  };
@@ -6972,7 +7091,7 @@ let tt = class extends ne {
6972
7091
  async connectedCallback() {
6973
7092
  if (super.connectedCallback(), this.enhancedContent)
6974
7093
  try {
6975
- this.contentHtmlTemplate = await Jo(this.enhancedContent, this.options.handlers.enhancedContent);
7094
+ this.contentHtmlTemplate = await Yo(this.enhancedContent, this.options.handlers.enhancedContent);
6976
7095
  } catch (i) {
6977
7096
  console.warn("Error processing enhanced content", i);
6978
7097
  }
@@ -7002,10 +7121,10 @@ Jt([
7002
7121
  tt = Jt([
7003
7122
  Ee("iai-chat-message-system")
7004
7123
  ], tt);
7005
- var Yo = Object.defineProperty, Xo = Object.getOwnPropertyDescriptor, sr = (i, e, t, n) => {
7006
- for (var s = n > 1 ? void 0 : n ? Xo(e, t) : e, r = i.length - 1, a; r >= 0; r--)
7124
+ var el = Object.defineProperty, tl = Object.getOwnPropertyDescriptor, sr = (i, e, t, n) => {
7125
+ for (var s = n > 1 ? void 0 : n ? tl(e, t) : e, r = i.length - 1, a; r >= 0; r--)
7007
7126
  (a = i[r]) && (s = (n ? a(e, t, s) : a(s)) || s);
7008
- return n && s && Yo(e, t, s), s;
7127
+ return n && s && el(e, t, s), s;
7009
7128
  };
7010
7129
  let En = class extends ne {
7011
7130
  constructor() {
@@ -7033,12 +7152,12 @@ sr([
7033
7152
  En = sr([
7034
7153
  Ee("iai-chat-message-user")
7035
7154
  ], En);
7036
- var el = Object.defineProperty, tl = Object.getOwnPropertyDescriptor, jn = (i, e, t, n) => {
7037
- for (var s = n > 1 ? void 0 : n ? tl(e, t) : e, r = i.length - 1, a; r >= 0; r--)
7155
+ var nl = Object.defineProperty, il = Object.getOwnPropertyDescriptor, zn = (i, e, t, n) => {
7156
+ for (var s = n > 1 ? void 0 : n ? il(e, t) : e, r = i.length - 1, a; r >= 0; r--)
7038
7157
  (a = i[r]) && (s = (n ? a(e, t, s) : a(s)) || s);
7039
- return n && s && el(e, t, s), s;
7158
+ return n && s && nl(e, t, s), s;
7040
7159
  };
7041
- let ut = class extends ne {
7160
+ let pt = class extends ne {
7042
7161
  constructor() {
7043
7162
  super(...arguments), this.isChatWindowOpen = !1, this.isCtaOpen = !0;
7044
7163
  }
@@ -7077,7 +7196,7 @@ let ut = class extends ne {
7077
7196
  () => z`
7078
7197
  <div class="button rounded-full flex items-center justify-center" style=${a}>
7079
7198
  <div class="h-3/5 w-3/5">
7080
- ${Re(this.isChatWindowOpen, () => Ht, () => Ya)}
7199
+ ${Re(this.isChatWindowOpen, () => Ht, () => eo)}
7081
7200
  </div>
7082
7201
  </div>
7083
7202
  `
@@ -7090,25 +7209,25 @@ let ut = class extends ne {
7090
7209
  this.dispatchEvent(new CustomEvent("toggle-chat"));
7091
7210
  }
7092
7211
  };
7093
- ut.styles = [Se, nt`
7212
+ pt.styles = [Se, nt`
7094
7213
  .button {
7095
7214
  background-color: var(--iai-chat-i-ocb-bg);
7096
7215
  color: var(--iai-chat-i-ocb-fg);
7097
7216
  }
7098
7217
  `];
7099
- jn([
7218
+ zn([
7100
7219
  V({ type: Object })
7101
- ], ut.prototype, "options", 2);
7102
- jn([
7220
+ ], pt.prototype, "options", 2);
7221
+ zn([
7103
7222
  V({ type: Boolean })
7104
- ], ut.prototype, "isChatWindowOpen", 2);
7105
- jn([
7106
- ft()
7107
- ], ut.prototype, "isCtaOpen", 2);
7108
- ut = jn([
7223
+ ], pt.prototype, "isChatWindowOpen", 2);
7224
+ zn([
7225
+ gt()
7226
+ ], pt.prototype, "isCtaOpen", 2);
7227
+ pt = zn([
7109
7228
  Ee("iai-chat-open-chat-button")
7110
- ], ut);
7111
- class nl {
7229
+ ], pt);
7230
+ class sl {
7112
7231
  constructor(e) {
7113
7232
  this.widget = null, this.options = Pn.parse(e);
7114
7233
  const t = document.createElement("iai-chat-popup");
@@ -7129,121 +7248,6 @@ class nl {
7129
7248
  (e = this.widget) == null || e.remove(), this.widget = null;
7130
7249
  }
7131
7250
  }
7132
- var il = Object.defineProperty, sl = Object.getOwnPropertyDescriptor, zn = (i, e, t, n) => {
7133
- for (var s = n > 1 ? void 0 : n ? sl(e, t) : e, r = i.length - 1, a; r >= 0; r--)
7134
- (a = i[r]) && (s = (n ? a(e, t, s) : a(s)) || s);
7135
- return n && s && il(e, t, s), s;
7136
- };
7137
- let pt = class extends ne {
7138
- constructor() {
7139
- super(...arguments), this.activeIndex = 0, this.items = [];
7140
- }
7141
- render() {
7142
- return z`
7143
- <div>
7144
- <div
7145
- id="carousel"
7146
- class="flex overflow-x-auto snap-x snap-mandatory overflow-scrolling-touch m-0 p-0"
7147
- @scroll="${this.onScroll}"
7148
- >
7149
- <slot @slotchange=${this.onSlotChange}>zzz</slot>
7150
- </div>
7151
-
7152
- <div class="flex justify-between items-center">
7153
- <button class="cursor-pointer h-6" @click=${() => this.scrollCarousel(-1)}>
7154
-
7155
- <svg
7156
- xmlns="http://www.w3.org/2000/svg"
7157
- viewBox="0 0 24 24"
7158
- width="100%"
7159
- height="100%"
7160
- fill="currentColor"
7161
- >
7162
- <title>arrow-left</title>
7163
- <path d="M20,11V13H8L13.5,18.5L12.08,19.92L4.16,12L12.08,4.08L13.5,5.5L8,11H20Z" />
7164
- </svg>
7165
- </button>
7166
-
7167
- <div class="flex justify-center space-x-2">
7168
- ${Is(this.items, (i, e) => e, (i, e) => z`
7169
- <span
7170
- class="h-2.5 w-2.5 bg-gray-400 rounded-full inline-block ${this.activeIndex === e ? "bg-gray-600" : ""}"
7171
- @click=${() => this.scrollToIndex(e)}
7172
- />
7173
- `)}
7174
- </div>
7175
-
7176
- <button class="cursor-pointer h-6" @click=${() => this.scrollCarousel(1)}>
7177
- <svg
7178
- xmlns="http://www.w3.org/2000/svg"
7179
- viewBox="0 0 24 24"
7180
- width="100%"
7181
- height="100%"
7182
- fill="currentColor"
7183
- >
7184
- <title>arrow-right</title>
7185
- <path d="M4,11V13H16L10.5,18.5L11.92,19.92L19.84,12L11.92,4.08L10.5,5.5L16,11H4Z" />
7186
- </svg>
7187
- </button>
7188
- </div>
7189
- </div>
7190
- `;
7191
- }
7192
- onSlotChange(i) {
7193
- const e = i.target;
7194
- this.items = (e == null ? void 0 : e.assignedElements()) || [];
7195
- }
7196
- onScroll() {
7197
- const { carousel: i } = this;
7198
- if (!i)
7199
- return;
7200
- let e = 0, t = 1 / 0;
7201
- this.items.forEach((n, s) => {
7202
- const r = Math.abs(n.offsetLeft - i.scrollLeft);
7203
- r < t && (t = r, e = s);
7204
- }), this.activeIndex = e;
7205
- }
7206
- scrollCarousel(i) {
7207
- this.scrollToIndex(this.activeIndex + i);
7208
- }
7209
- scrollToIndex(i) {
7210
- i !== this.activeIndex && (this.activeIndex = Math.max(0, Math.min(i, this.items.length - 1)), this.scrollToActiveItem());
7211
- }
7212
- scrollToActiveItem() {
7213
- const { carousel: i, items: e, activeIndex: t } = this;
7214
- if (!i)
7215
- return;
7216
- const n = e[t];
7217
- n && i.scrollTo({
7218
- left: n.offsetLeft - i.clientWidth / 2 + n.clientWidth / 2,
7219
- behavior: "smooth"
7220
- });
7221
- }
7222
- };
7223
- pt.styles = [Se, nt`
7224
- ::slotted(div) {
7225
- flex: 0 0 auto;
7226
- scroll-snap-align: start;
7227
- width: 100%;
7228
- padding: 1rem;
7229
- background-color: #f8f9fa;
7230
- border: 1px solid rgba(0, 0, 0, 0.125);
7231
- border-radius: 0.25rem;
7232
- margin-right: 1rem;
7233
- }
7234
- `];
7235
- zn([
7236
- V({ type: Number })
7237
- ], pt.prototype, "activeIndex", 2);
7238
- zn([
7239
- V({ type: Array })
7240
- ], pt.prototype, "items", 2);
7241
- zn([
7242
- An("#carousel")
7243
- ], pt.prototype, "carousel", 2);
7244
- pt = zn([
7245
- Ee("iai-chat-carousel")
7246
- ], pt);
7247
7251
  function rl({ html: i, params: e }) {
7248
7252
  return i`
7249
7253
  <div>
@@ -7278,18 +7282,18 @@ function al(i) {
7278
7282
  }, a = document.createElement("iai-chat-iframe-modal");
7279
7283
  a.title = "Schedule a Tour", a.src = `${i}?${new URLSearchParams(r).toString()}`, a.showHeader = !1;
7280
7284
  const o = () => {
7281
- a.remove(), window.removeEventListener("beforeunload", h), s.setInputDisabled(!1);
7285
+ a.remove(), window.removeEventListener("beforeunload", u), s.setInputDisabled(!1);
7282
7286
  }, l = async ({ detail: p }) => {
7283
7287
  if (p.type !== "tourScheduled")
7284
7288
  return;
7285
- const { tourType: c, tourDate: f, tourTime: O } = p;
7289
+ const { tourType: c, tourDate: g, tourTime: O } = p;
7286
7290
  o(), s.addMessage({
7287
7291
  role: "system",
7288
7292
  content: "Your tour has been scheduled!"
7289
7293
  }), await s.sendFunctionCallResponse(t, {
7290
7294
  status: "scheduled",
7291
7295
  tourType: c,
7292
- tourDate: f,
7296
+ tourDate: g,
7293
7297
  tourTime: O
7294
7298
  }, !0);
7295
7299
  }, d = async () => {
@@ -7299,13 +7303,13 @@ function al(i) {
7299
7303
  }), await s.sendFunctionCallResponse(t, {
7300
7304
  status: "canceled"
7301
7305
  }, !0);
7302
- }, h = async () => {
7306
+ }, u = async () => {
7303
7307
  o(), s.addMessage({
7304
7308
  role: "system",
7305
7309
  content: "Tour Scheduler Closed"
7306
7310
  });
7307
7311
  };
7308
- a.addEventListener("message-received", l), a.addEventListener("close", d), window.addEventListener("beforeunload", h), document.body.appendChild(a), s.addMessage({
7312
+ a.addEventListener("message-received", l), a.addEventListener("close", d), window.addEventListener("beforeunload", u), document.body.appendChild(a), s.addMessage({
7309
7313
  role: "system",
7310
7314
  content: "Tour Scheduler Opened"
7311
7315
  });
@@ -7373,14 +7377,14 @@ var Sn;
7373
7377
  })(i.ConversationStatus || (i.ConversationStatus = {}));
7374
7378
  })(Sn || (Sn = {}));
7375
7379
  const ll = Sn.AcknowledgeType, cl = "Anyone Home", dl = "IB Chat Leasing - Development";
7376
- let hl = "https://five9.ah.inhabit.work";
7377
- const ul = "https://five9.ah.inhabit.work".replace("http", "ws").replace(/\/$/, "");
7378
- var ke, We;
7380
+ let ul = "https://five9.ah.inhabit.work";
7381
+ const hl = "https://five9.ah.inhabit.work".replace("http", "ws").replace(/\/$/, "");
7382
+ var _e, We;
7379
7383
  const Et = class Et {
7380
7384
  constructor() {
7381
- Yn(this, ke, void 0);
7382
- Yn(this, We, void 0);
7383
- this._emitter = rr(), this.on = this._emitter.on.bind(this._emitter), this.off = this._emitter.off.bind(this._emitter), Ie(this, ke, null), Ie(this, We, null), this.conversationStarted = !1;
7385
+ Gn(this, _e, void 0);
7386
+ Gn(this, We, void 0);
7387
+ this._emitter = rr(), this.on = this._emitter.on.bind(this._emitter), this.off = this._emitter.off.bind(this._emitter), Ie(this, _e, null), Ie(this, We, null), this.conversationStarted = !1;
7384
7388
  }
7385
7389
  serialize() {
7386
7390
  return JSON.stringify({
@@ -7405,10 +7409,10 @@ const Et = class Et {
7405
7409
  },
7406
7410
  body: JSON.stringify({ tenantName: cl })
7407
7411
  });
7408
- return Ie(this, ke, await e.json()), en(this, ke);
7412
+ return Ie(this, _e, await e.json()), en(this, _e);
7409
7413
  }
7410
7414
  setSession(e) {
7411
- Ie(this, ke, e);
7415
+ Ie(this, _e, e);
7412
7416
  }
7413
7417
  setConversationId(e) {
7414
7418
  Ie(this, We, e), this.five9WebSocket && (this.five9WebSocket.destroy(), this.five9WebSocket = void 0, e && this.connectToWebSocket());
@@ -7424,7 +7428,7 @@ const Et = class Et {
7424
7428
  if (!this.conversationId)
7425
7429
  throw new Error("Conversation not started");
7426
7430
  this.five9WebSocket && this.five9WebSocket.destroy();
7427
- const e = new ol(`${ul}/conversations/${this.conversationId}/ws`);
7431
+ const e = new ol(`${hl}/conversations/${this.conversationId}/ws`);
7428
7432
  e.on("*", (t, n) => {
7429
7433
  this._emitter.emit(t, n);
7430
7434
  }), e.on("conversationCreated", (t) => {
@@ -7492,7 +7496,7 @@ const Et = class Et {
7492
7496
  ...e,
7493
7497
  campaignName: dl,
7494
7498
  tenantId: this.tenantId,
7495
- callbackUrl: hl
7499
+ callbackUrl: ul
7496
7500
  };
7497
7501
  console.log("body", n);
7498
7502
  const s = await this.authenticatedFetch("/conversations", {
@@ -7540,11 +7544,11 @@ const Et = class Et {
7540
7544
  }), this.destroy();
7541
7545
  }
7542
7546
  destroy() {
7543
- this.five9WebSocket && this.five9WebSocket.destroy(), Ie(this, ke, null), Ie(this, We, null);
7547
+ this.five9WebSocket && this.five9WebSocket.destroy(), Ie(this, _e, null), Ie(this, We, null);
7544
7548
  }
7545
7549
  // Getters
7546
7550
  get sessionToken() {
7547
- return en(this, ke);
7551
+ return en(this, _e);
7548
7552
  }
7549
7553
  get conversationId() {
7550
7554
  return en(this, We);
@@ -7570,7 +7574,7 @@ const Et = class Et {
7570
7574
  return (e = this.sessionToken) == null ? void 0 : e.context.farmId;
7571
7575
  }
7572
7576
  };
7573
- ke = new WeakMap(), We = new WeakMap();
7577
+ _e = new WeakMap(), We = new WeakMap();
7574
7578
  let Cn = Et;
7575
7579
  function Tt(i) {
7576
7580
  return `any-${i || "main"}-chatSession`;
@@ -7722,9 +7726,9 @@ function ar(i, e) {
7722
7726
  }, s = async () => {
7723
7727
  console.log("reset fired"), await e.terminateConversation(), await n(), localStorage.removeItem(Tt(i.cleanOptions.config.historyKey));
7724
7728
  };
7725
- i.addEventListener("iai-chat-send-user-message", t), i.addEventListener("iai-chat-reset", s), i.addEventListener("iai-chat-destroy", n);
7729
+ i.cleanOptions.config.disclaimerMessage = "You are chatting with a live agent", i.addEventListener("iai-chat-send-user-message", t), i.addEventListener("iai-chat-reset", s), i.addEventListener("iai-chat-destroy", n);
7726
7730
  }
7727
- class bl {
7731
+ class gl {
7728
7732
  constructor(e, t) {
7729
7733
  const n = Pn.parse({
7730
7734
  assistantId: "7e59c8c1-a4ff-40f1-9a68-86ea294a4e75",
@@ -7734,7 +7738,7 @@ class bl {
7734
7738
  styles: e.styles || {}
7735
7739
  }
7736
7740
  });
7737
- n.handlers.functionCalls.transferToLiveAgent = pl, n.handlers.functionCalls.showScheduleTourWidget = al(t.schedulerUrl), n.handlers.enhancedContent.unitList = rl, this.chatWidget = new nl(n);
7741
+ n.handlers.functionCalls.transferToLiveAgent = pl, n.handlers.functionCalls.showScheduleTourWidget = al(t.schedulerUrl), n.handlers.enhancedContent.unitList = rl, this.chatWidget = new sl(n);
7738
7742
  const s = localStorage.getItem(Tt(n.config.historyKey));
7739
7743
  if (s) {
7740
7744
  const r = Cn.deserialize(s);
@@ -7748,5 +7752,5 @@ class bl {
7748
7752
  }
7749
7753
  }
7750
7754
  export {
7751
- bl as AnyChatWidget
7755
+ gl as AnyChatWidget
7752
7756
  };