@sapia-ai/chatbot-v3 1.0.3 → 1.1.0

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.
Files changed (49) hide show
  1. package/dist/{EmbeddedVideoPlayer-CNcds-dW.js → EmbeddedVideoPlayer-COUZHpPa.js} +14 -14
  2. package/dist/{Preview-Dmns6UWL.js → Preview-wPnYtccF.js} +3 -3
  3. package/dist/api/client.d.ts +6 -2
  4. package/dist/api/types/messages.d.ts +16 -5
  5. package/dist/api/types/responses.d.ts +48 -7
  6. package/dist/api.js +2 -2
  7. package/dist/core/bubbles/types.d.ts +2 -5
  8. package/dist/core/i18n/languages.d.ts +6 -1
  9. package/dist/core/interview.d.ts +15 -8
  10. package/dist/core/media/mimeTypes.d.ts +6 -1
  11. package/dist/core/media/recorder.d.ts +11 -2
  12. package/dist/core/store.d.ts +21 -1
  13. package/dist/core/theme/contrast.d.ts +6 -0
  14. package/dist/core/theme/cssVariables.d.ts +5 -0
  15. package/dist/core/theme/types.d.ts +3 -0
  16. package/dist/{dist-BSi28_cP.js → dist-BOe6WyvN.js} +92 -92
  17. package/dist/{dist-B9SbMqZU.js → dist-Bwlks_W8.js} +98 -98
  18. package/dist/{fix-webm-duration-BWL-ZRDX.js → fix-webm-duration-QAy9T6AR.js} +2 -2
  19. package/dist/index.js +7445 -5039
  20. package/dist/{jsx-runtime-8QqjHL5t.js → jsx-runtime-24G8w2Bf.js} +2 -2
  21. package/dist/{messages-Czlp86gl.js → messages-DCvBcspv.js} +260 -245
  22. package/dist/react/AnswerInput.d.ts +4 -5
  23. package/dist/react/bubbleViewModel.d.ts +25 -9
  24. package/dist/react/strings.d.ts +26 -3
  25. package/dist/{react-DJysvNxz.js → react-BjO903pN.js} +33 -33
  26. package/dist/{react-QrtEtv1G.js → react-Bw5AugJc.js} +31 -31
  27. package/dist/{react-dE7BdGuR.js → react-D8hV9uow.js} +10 -10
  28. package/dist/{react-NauLB_WU.js → react-DDjfkpOE.js} +38 -38
  29. package/dist/{react-Dbs-sPBo.js → react-DEF8h8hc.js} +37 -37
  30. package/dist/{react-B0K-sClg.js → react-DOgLiyZi.js} +2 -2
  31. package/dist/{react-be7q6yw_.js → react-DPFikgTM.js} +55 -55
  32. package/dist/{react-ChCcxVnw.js → react-qa12DkXH.js} +34 -34
  33. package/dist/{react-czRIxT0g.js → react-y4vaW3OH.js} +46 -46
  34. package/dist/ui/chat/ChatBubble/ChatBubble.d.ts +14 -5
  35. package/dist/ui/chat/ChatLog/ChatLog.d.ts +6 -4
  36. package/dist/ui/chat/EditBanner/EditBanner.d.ts +16 -0
  37. package/dist/ui/chat/SummaryCard/SummaryCard.d.ts +46 -0
  38. package/dist/ui/chat/types.d.ts +21 -8
  39. package/dist/ui/constants.d.ts +1 -0
  40. package/dist/ui/inputs/OptionList/OptionList.d.ts +3 -1
  41. package/dist/ui/inputs/TextAnswerInput/TextAnswerInput.d.ts +11 -4
  42. package/dist/ui/inputs/VideoRecorder/VideoRecorder.d.ts +6 -2
  43. package/dist/ui/markdown.d.ts +4 -0
  44. package/dist/ui/motion.d.ts +2 -0
  45. package/dist/ui/primitives/Button/Button.d.ts +5 -1
  46. package/dist/ui/primitives/Dialog/Dialog.d.ts +2 -1
  47. package/dist/ui/shell/WidgetRoot/WidgetRoot.d.ts +7 -1
  48. package/dist-umd/sapia-chatbot.umd.js +394 -270
  49. package/package.json +4 -1
@@ -1,17 +1,17 @@
1
- import { b as e } from "./messages-Czlp86gl.js";
2
- import { t } from "./react-B0K-sClg.js";
3
- import { a as n, i as r, n as i, r as a, t as o } from "./classPrivateFieldSet2-DtQPURVD.js";
4
- import { t as s } from "./defineProperty-DiFpLzd2.js";
1
+ import { w as e } from "./messages-DCvBcspv.js";
2
+ import { t } from "./react-DOgLiyZi.js";
3
+ import { t as n } from "./defineProperty-DiFpLzd2.js";
4
+ import { a as r, i, n as a, r as o, t as s } from "./classPrivateFieldSet2-DtQPURVD.js";
5
5
  //#region ../../node_modules/.pnpm/super-media-element@1.4.2/node_modules/super-media-element/super-media-element.js
6
6
  var c = /* @__PURE__ */ e(t(), 1), l, u = /* @__PURE__ */ "abort.canplay.canplaythrough.durationchange.emptied.encrypted.ended.error.loadeddata.loadedmetadata.loadstart.pause.play.playing.progress.ratechange.seeked.seeking.stalled.suspend.timeupdate.volumechange.waiting.waitingforkey.resize.enterpictureinpicture.leavepictureinpicture.webkitbeginfullscreen.webkitendfullscreen.webkitpresentationmodechanged".split("."), d = (l = globalThis.document) == null ? void 0 : l.createElement("template");
7
7
  d && (d.innerHTML = "\n <style>\n :host {\n display: inline-block;\n line-height: 0;\n }\n\n video,\n audio {\n max-width: 100%;\n max-height: 100%;\n min-width: 100%;\n min-height: 100%;\n }\n </style>\n <slot></slot>\n ");
8
8
  var f = (e, { tag: t, is: c }) => {
9
9
  var l, f, h, g, _, v, y, b, x, S;
10
10
  let C = (l = globalThis.document) == null ? void 0 : l.createElement(t, { is: c }), w = C ? p(C) : [];
11
- return g = /* @__PURE__ */ new WeakMap(), _ = /* @__PURE__ */ new WeakMap(), v = /* @__PURE__ */ new WeakMap(), y = /* @__PURE__ */ new WeakMap(), b = /* @__PURE__ */ new WeakMap(), x = /* @__PURE__ */ new WeakMap(), S = /* @__PURE__ */ new WeakSet(), f = class s extends e {
11
+ return g = /* @__PURE__ */ new WeakMap(), _ = /* @__PURE__ */ new WeakMap(), v = /* @__PURE__ */ new WeakMap(), y = /* @__PURE__ */ new WeakMap(), b = /* @__PURE__ */ new WeakMap(), x = /* @__PURE__ */ new WeakMap(), S = /* @__PURE__ */ new WeakSet(), f = class n extends e {
12
12
  static get observedAttributes() {
13
13
  var e, t;
14
- return a(f, s, T).call(s), [
14
+ return o(f, n, T).call(n), [
15
15
  ...(e = C == null || (t = C.constructor) == null ? void 0 : t.observedAttributes) == null ? [] : e,
16
16
  "autopictureinpicture",
17
17
  "disablepictureinpicture",
@@ -29,25 +29,25 @@ var f = (e, { tag: t, is: c }) => {
29
29
  ];
30
30
  }
31
31
  constructor() {
32
- super(), n(this, S), r(this, g, void 0), r(this, _, void 0), r(this, v, !1), r(this, y, !1), r(this, b, void 0), r(this, x, void 0), this.shadowRoot || (this.attachShadow({ mode: "open" }), this.shadowRoot.append(this.constructor.template.content.cloneNode(!0))), this.load !== s.prototype.load && (this.loadComplete = new m());
32
+ super(), r(this, S), i(this, g, void 0), i(this, _, void 0), i(this, v, !1), i(this, y, !1), i(this, b, void 0), i(this, x, void 0), this.shadowRoot || (this.attachShadow({ mode: "open" }), this.shadowRoot.append(this.constructor.template.content.cloneNode(!0))), this.load !== n.prototype.load && (this.loadComplete = new m());
33
33
  }
34
34
  get loadComplete() {
35
- return i(_, this);
35
+ return a(_, this);
36
36
  }
37
37
  set loadComplete(e) {
38
- o(y, this, !1), o(_, this, e), e == null || e.then(() => {
39
- o(y, this, !0);
38
+ s(y, this, !1), s(_, this, e), e == null || e.then(() => {
39
+ s(y, this, !0);
40
40
  });
41
41
  }
42
42
  get isLoaded() {
43
- return i(y, this);
43
+ return a(y, this);
44
44
  }
45
45
  get nativeEl() {
46
46
  var e, n;
47
- return (e = (n = i(b, this)) == null ? this.shadowRoot.querySelector(t) : n) == null ? this.querySelector(t) : e;
47
+ return (e = (n = a(b, this)) == null ? this.shadowRoot.querySelector(t) : n) == null ? this.querySelector(t) : e;
48
48
  }
49
49
  set nativeEl(e) {
50
- o(b, this, e);
50
+ s(b, this, e);
51
51
  }
52
52
  get defaultMuted() {
53
53
  return this.hasAttribute("muted");
@@ -68,36 +68,36 @@ var f = (e, { tag: t, is: c }) => {
68
68
  set preload(e) {
69
69
  this.setAttribute("preload", `${e}`);
70
70
  }
71
- attributeChangedCallback(e, t, n) {
72
- a(S, this, E).call(this), e === "src" && this.load !== s.prototype.load && a(S, this, A).call(this), a(S, this, j).call(this, e, t, n);
71
+ attributeChangedCallback(e, t, r) {
72
+ o(S, this, E).call(this), e === "src" && this.load !== n.prototype.load && o(S, this, A).call(this), o(S, this, j).call(this, e, t, r);
73
73
  }
74
74
  connectedCallback() {
75
- a(S, this, E).call(this);
75
+ o(S, this, E).call(this);
76
76
  }
77
- }, s(f, "Events", u), s(f, "template", d), s(f, "skipAttributes", []), h = { _: void 0 }, f;
77
+ }, n(f, "Events", u), n(f, "template", d), n(f, "skipAttributes", []), h = { _: void 0 }, f;
78
78
  function T() {
79
- if (a(f, this, h)._) return;
80
- h._ = a(f, this, !0);
79
+ if (o(f, this, h)._) return;
80
+ h._ = o(f, this, !0);
81
81
  let e = new Set(this.observedAttributes);
82
82
  e.delete("muted");
83
83
  for (let t of w) if (!(t in this.prototype)) if (typeof C[t] == "function") this.prototype[t] = function(...e) {
84
- a(S, this, E).call(this);
84
+ o(S, this, E).call(this);
85
85
  let n = () => this.call ? this.call(t, ...e) : this.nativeEl[t].apply(this.nativeEl, e);
86
86
  return this.loadComplete && !this.isLoaded ? this.loadComplete.then(n) : n();
87
87
  };
88
88
  else {
89
89
  let n = { get() {
90
- var n, r, o, s;
91
- a(S, this, E).call(this);
90
+ var n, r, i, s;
91
+ o(S, this, E).call(this);
92
92
  let c = t.toLowerCase();
93
93
  if (e.has(c)) {
94
94
  let e = this.getAttribute(c);
95
95
  return e === null ? !1 : e === "" ? !0 : e;
96
96
  }
97
- return (n = (r = (o = this.get) == null ? void 0 : o.call(this, t)) == null ? (s = this.nativeEl) == null ? void 0 : s[t] : r) == null ? i(x, this)[t] : n;
97
+ return (n = (r = (i = this.get) == null ? void 0 : i.call(this, t)) == null ? (s = this.nativeEl) == null ? void 0 : s[t] : r) == null ? a(x, this)[t] : n;
98
98
  } };
99
99
  t !== t.toUpperCase() && (n.set = async function(n) {
100
- a(S, this, E).call(this);
100
+ o(S, this, E).call(this);
101
101
  let r = t.toLowerCase();
102
102
  if (e.has(r)) {
103
103
  n === !0 || n === !1 || n == null ? this.toggleAttribute(r, !!n) : this.setAttribute(r, n);
@@ -112,9 +112,9 @@ var f = (e, { tag: t, is: c }) => {
112
112
  }
113
113
  }
114
114
  async function E() {
115
- if (i(g, this)) return;
116
- o(g, this, !0), a(S, this, O).call(this), a(S, this, k).call(this);
117
- for (let e of w) a(S, this, D).call(this, e);
115
+ if (a(g, this)) return;
116
+ s(g, this, !0), o(S, this, O).call(this), o(S, this, k).call(this);
117
+ for (let e of w) o(S, this, D).call(this, e);
118
118
  let e = /* @__PURE__ */ new Map(), t = this.shadowRoot.querySelector("slot:not([name])");
119
119
  t == null || t.addEventListener("slotchange", () => {
120
120
  let n = new Map(e);
@@ -142,8 +142,8 @@ var f = (e, { tag: t, is: c }) => {
142
142
  let e = document.createElement(t, { is: c });
143
143
  e.muted = this.hasAttribute("muted");
144
144
  for (let { name: t, value: n } of this.attributes) e.setAttribute(t, n);
145
- o(x, this, {});
146
- for (let t of p(e)) i(x, this)[t] = e[t];
145
+ s(x, this, {});
146
+ for (let t of p(e)) a(x, this)[t] = e[t];
147
147
  e.removeAttribute("src"), e.load();
148
148
  }
149
149
  async function k() {
@@ -155,7 +155,7 @@ var f = (e, { tag: t, is: c }) => {
155
155
  }
156
156
  async function A() {
157
157
  var e;
158
- i(v, this) && (this.loadComplete = new m()), o(v, this, !0), await Promise.resolve(), await this.load(), (e = this.loadComplete) == null || e.resolve(), await this.loadComplete;
158
+ a(v, this) && (this.loadComplete = new m()), s(v, this, !0), await Promise.resolve(), await this.load(), (e = this.loadComplete) == null || e.resolve(), await this.loadComplete;
159
159
  }
160
160
  async function j(e, t, n) {
161
161
  if (this.loadComplete && !this.isLoaded && await this.loadComplete, ![
@@ -199,13 +199,13 @@ function b(e, t) {
199
199
  }
200
200
  var x = /* @__PURE__ */ new WeakMap(), S = class extends h {
201
201
  constructor() {
202
- super(), r(this, x, null), b(this, "config");
202
+ super(), i(this, x, null), b(this, "config");
203
203
  }
204
204
  get config() {
205
- return i(x, this);
205
+ return a(x, this);
206
206
  }
207
207
  set config(e) {
208
- o(x, this, e);
208
+ s(x, this, e);
209
209
  }
210
210
  get nativeEl() {
211
211
  var e, t;
@@ -215,7 +215,7 @@ var x = /* @__PURE__ */ new WeakMap(), S = class extends h {
215
215
  var e, t, n;
216
216
  if ((n = this.querySelector(".wistia_embed")) == null || n.remove(), !this.src) return;
217
217
  await new Promise((e) => setTimeout(e, 50));
218
- let r = this.src.match(/(?:wistia\.com|wi\.st)\/(?:medias|embed)\/(.*)$/i)[1], a = {
218
+ let r = this.src.match(/(?:wistia\.com|wi\.st)\/(?:medias|embed)\/(.*)$/i)[1], i = {
219
219
  autoPlay: this.autoplay,
220
220
  silentAutoPlay: this.autoplay ? "allow" : void 0,
221
221
  preload: (e = this.preload) == null ? "metadata" : e,
@@ -224,7 +224,7 @@ var x = /* @__PURE__ */ new WeakMap(), S = class extends h {
224
224
  chromeless: !this.controls,
225
225
  playButton: this.controls,
226
226
  muted: this.defaultMuted,
227
- ...(t = i(x, this)) == null ? {} : t
227
+ ...(t = a(x, this)) == null ? {} : t
228
228
  };
229
229
  this.append(v.content.cloneNode(!0));
230
230
  let o = this.querySelector(".wistia_embed");
@@ -232,7 +232,7 @@ var x = /* @__PURE__ */ new WeakMap(), S = class extends h {
232
232
  globalThis._wq.push({
233
233
  id: o.id,
234
234
  onReady: e,
235
- options: a
235
+ options: i
236
236
  });
237
237
  });
238
238
  }
@@ -255,7 +255,7 @@ var x = /* @__PURE__ */ new WeakMap(), S = class extends h {
255
255
  return await this.loadComplete, this.api.play(), new Promise((e) => this.addEventListener("playing", e));
256
256
  }
257
257
  };
258
- s(S, "template", y), s(S, "skipAttributes", ["src"]);
258
+ n(S, "template", y), n(S, "skipAttributes", ["src"]);
259
259
  var C = {};
260
260
  async function w(e, t) {
261
261
  if (!t) return import(
@@ -369,4 +369,4 @@ var P = M({
369
369
  //#endregion
370
370
  export { P as default };
371
371
 
372
- //# sourceMappingURL=react-NauLB_WU.js.map
372
+ //# sourceMappingURL=react-DDjfkpOE.js.map
@@ -1,7 +1,7 @@
1
- import { b as e } from "./messages-Czlp86gl.js";
2
- import { t } from "./react-B0K-sClg.js";
3
- import { a as n, i as r, n as i, r as a, t as o } from "./classPrivateFieldSet2-DtQPURVD.js";
4
- import { t as s } from "./defineProperty-DiFpLzd2.js";
1
+ import { w as e } from "./messages-DCvBcspv.js";
2
+ import { t } from "./react-DOgLiyZi.js";
3
+ import { t as n } from "./defineProperty-DiFpLzd2.js";
4
+ import { a as r, i, n as a, r as o, t as s } from "./classPrivateFieldSet2-DtQPURVD.js";
5
5
  import { t as c } from "./dist-FvHBWiRa.js";
6
6
  //#region ../../node_modules/.pnpm/youtube-video-element@1.9.0/node_modules/youtube-video-element/dist/youtube-video-element.js
7
7
  var l = /* @__PURE__ */ e(t(), 1), u, d = "https://www.youtube.com/embed", f = "https://www.youtube-nocookie.com/embed", p = "https://www.youtube.com/iframe_api", m = "YT", h = "onYouTubeIframeAPIReady", g = /(?:youtu\.be\/|youtube(?:-nocookie)?\.com\/(?:embed\/|v\/|watch\?v=|watch\?.+&v=|shorts\/|live\/))((\w|-){11})/, _ = /(?:youtu\.be\/|youtube(?:-nocookie)?\.com\/.*?[?&]list=)([\w_-]+)/;
@@ -73,62 +73,62 @@ function b(e, t) {
73
73
  }
74
74
  var x = /* @__PURE__ */ new WeakMap(), S = /* @__PURE__ */ new WeakMap(), C = /* @__PURE__ */ new WeakMap(), w = /* @__PURE__ */ new WeakMap(), T = /* @__PURE__ */ new WeakMap(), E = /* @__PURE__ */ new WeakMap(), D = /* @__PURE__ */ new WeakMap(), O = /* @__PURE__ */ new WeakMap(), k = /* @__PURE__ */ new WeakMap(), A = /* @__PURE__ */ new WeakSet(), j = class extends c((u = globalThis.HTMLElement) == null ? class {} : u) {
75
75
  constructor() {
76
- super(), n(this, A), s(this, "loadComplete", new U()), r(this, x, void 0), r(this, S, void 0), r(this, C, 0), r(this, w, !1), r(this, T, void 0), s(this, "isLoaded", !1), r(this, E, null), r(this, D, null), r(this, O, null), r(this, k, 1), a(A, this, M).call(this, "config");
76
+ super(), r(this, A), n(this, "loadComplete", new U()), i(this, x, void 0), i(this, S, void 0), i(this, C, 0), i(this, w, !1), i(this, T, void 0), n(this, "isLoaded", !1), i(this, E, null), i(this, D, null), i(this, O, null), i(this, k, 1), o(A, this, M).call(this, "config");
77
77
  }
78
78
  get config() {
79
- return i(D, this);
79
+ return a(D, this);
80
80
  }
81
81
  set config(e) {
82
- o(D, this, e);
82
+ s(D, this, e);
83
83
  }
84
84
  async load() {
85
- if (i(x, this)) return;
85
+ if (a(x, this)) return;
86
86
  this.shadowRoot || this.attachShadow({ mode: "open" });
87
- let e = !i(S, this);
88
- i(S, this) && (this.loadComplete = new U(), this.isLoaded = !1), o(S, this, !0), await o(x, this, Promise.resolve()), o(x, this, null), o(C, this, 0), this.dispatchEvent(new Event("emptied"));
87
+ let e = !a(S, this);
88
+ a(S, this) && (this.loadComplete = new U(), this.isLoaded = !1), s(S, this, !0), await s(x, this, Promise.resolve()), s(x, this, null), s(C, this, 0), this.dispatchEvent(new Event("emptied"));
89
89
  let t = this.api;
90
90
  if (this.api = null, !this.src) {
91
91
  t == null || t.destroy();
92
92
  return;
93
93
  }
94
- o(O, this, document.createElement("video")), this.textTracks = i(O, this).textTracks, this.textTracks.addEventListener("change", () => {
94
+ s(O, this, document.createElement("video")), this.textTracks = a(O, this).textTracks, this.textTracks.addEventListener("change", () => {
95
95
  var e;
96
96
  let t = Array.from(this.textTracks).find((e) => e.mode === "showing");
97
97
  (e = this.api) == null || e.setOption("captions", "track", t ? { languageCode: t.language } : {});
98
98
  }), this.dispatchEvent(new Event("loadstart"));
99
99
  let n = this.shadowRoot.querySelector("iframe"), r = L(this.attributes);
100
- e && n && o(D, this, JSON.parse(n.getAttribute("data-config") || "{}")), (!(n != null && n.src) || n.src !== b(r, this)) && (this.shadowRoot.innerHTML = y(r, this), n = this.shadowRoot.querySelector("iframe"));
101
- let a = await z(p, m, h);
102
- this.api = new a.Player(n, { events: {
100
+ e && n && s(D, this, JSON.parse(n.getAttribute("data-config") || "{}")), (!(n != null && n.src) || n.src !== b(r, this)) && (this.shadowRoot.innerHTML = y(r, this), n = this.shadowRoot.querySelector("iframe"));
101
+ let i = await z(p, m, h);
102
+ this.api = new i.Player(n, { events: {
103
103
  onReady: () => {
104
104
  var e;
105
- o(C, this, 1), this.dispatchEvent(new Event("loadedmetadata")), this.dispatchEvent(new Event("durationchange")), i(k, this) !== 1 && ((e = this.api) == null || e.setVolume(i(k, this) * 100)), this.dispatchEvent(new Event("volumechange")), this.dispatchEvent(new Event("loadcomplete")), this.isLoaded = !0, this.loadComplete.resolve();
105
+ s(C, this, 1), this.dispatchEvent(new Event("loadedmetadata")), this.dispatchEvent(new Event("durationchange")), a(k, this) !== 1 && ((e = this.api) == null || e.setVolume(a(k, this) * 100)), this.dispatchEvent(new Event("volumechange")), this.dispatchEvent(new Event("loadcomplete")), this.isLoaded = !0, this.loadComplete.resolve();
106
106
  },
107
107
  onError: (e) => {
108
- console.error(e), o(E, this, {
108
+ console.error(e), s(E, this, {
109
109
  code: e.data,
110
110
  message: `YouTube iframe player error #${e.data}; visit https://developers.google.com/youtube/iframe_api_reference#onError for the full error message.`
111
111
  }), this.dispatchEvent(new Event("error"));
112
112
  }
113
113
  } });
114
- let s = !1;
114
+ let o = !1;
115
115
  this.api.addEventListener("onStateChange", (e) => {
116
116
  var t;
117
117
  let n = e.data;
118
- if ((n === a.PlayerState.PLAYING || n === a.PlayerState.BUFFERING) && (s || (s = !0, this.dispatchEvent(new Event("play"))), (this.api.getOption("captions", "tracklist") || []).forEach((e) => {
119
- [...this.textTracks].some((t) => t.language === e.languageCode) || i(O, this).addTextTrack("subtitles", e.displayName, e.languageCode), this.textTracks = i(O, this).textTracks;
120
- }), this.dispatchEvent(new Event("loadstart"))), n === a.PlayerState.PLAYING) this.seeking && (o(w, this, !1), (t = i(T, this)) == null || t.resolve(), this.dispatchEvent(new Event("seeked"))), o(C, this, 3), this.dispatchEvent(new Event("playing"));
121
- else if (n === a.PlayerState.PAUSED) {
118
+ if ((n === i.PlayerState.PLAYING || n === i.PlayerState.BUFFERING) && (o || (o = !0, this.dispatchEvent(new Event("play"))), (this.api.getOption("captions", "tracklist") || []).forEach((e) => {
119
+ [...this.textTracks].some((t) => t.language === e.languageCode) || a(O, this).addTextTrack("subtitles", e.displayName, e.languageCode), this.textTracks = a(O, this).textTracks;
120
+ }), this.dispatchEvent(new Event("loadstart"))), n === i.PlayerState.PLAYING) this.seeking && (s(w, this, !1), (t = a(T, this)) == null || t.resolve(), this.dispatchEvent(new Event("seeked"))), s(C, this, 3), this.dispatchEvent(new Event("playing"));
121
+ else if (n === i.PlayerState.PAUSED) {
122
122
  let e = Math.abs(this.currentTime - c);
123
- !this.seeking && e > .1 && (o(w, this, !0), this.dispatchEvent(new Event("seeking"))), s = !1, this.dispatchEvent(new Event("pause"));
123
+ !this.seeking && e > .1 && (s(w, this, !0), this.dispatchEvent(new Event("seeking"))), o = !1, this.dispatchEvent(new Event("pause"));
124
124
  }
125
- n === a.PlayerState.ENDED && (s = !1, this.dispatchEvent(new Event("pause")), this.dispatchEvent(new Event("ended")), this.loop && this.play());
125
+ n === i.PlayerState.ENDED && (o = !1, this.dispatchEvent(new Event("pause")), this.dispatchEvent(new Event("ended")), this.loop && this.play());
126
126
  }), this.api.addEventListener("onPlaybackRateChange", () => {
127
127
  this.dispatchEvent(new Event("ratechange"));
128
128
  }), this.api.addEventListener("onVolumeChange", () => {
129
129
  var e;
130
130
  let t = ((e = this.api) == null ? void 0 : e.getVolume()) / 100;
131
- o(k, this, t), this.dispatchEvent(new Event("volumechange"));
131
+ s(k, this, t), this.dispatchEvent(new Event("volumechange"));
132
132
  }), this.api.addEventListener("onVideoProgress", () => {
133
133
  this.dispatchEvent(new Event("timeupdate"));
134
134
  }), await this.loadComplete;
@@ -136,11 +136,11 @@ var x = /* @__PURE__ */ new WeakMap(), S = /* @__PURE__ */ new WeakMap(), C = /*
136
136
  setInterval(() => {
137
137
  var e;
138
138
  let t = Math.abs(this.currentTime - c), n = this.buffered.end(this.buffered.length - 1);
139
- this.seeking && n > .1 ? (o(w, this, !1), (e = i(T, this)) == null || e.resolve(), this.dispatchEvent(new Event("seeked"))) : !this.seeking && t > .1 && (o(w, this, !0), this.dispatchEvent(new Event("seeking"))), c = this.currentTime;
139
+ this.seeking && n > .1 ? (s(w, this, !1), (e = a(T, this)) == null || e.resolve(), this.dispatchEvent(new Event("seeked"))) : !this.seeking && t > .1 && (s(w, this, !0), this.dispatchEvent(new Event("seeking"))), c = this.currentTime;
140
140
  }, 50);
141
141
  let l, u = setInterval(() => {
142
142
  let e = this.buffered.end(this.buffered.length - 1);
143
- e >= this.duration && (clearInterval(u), o(C, this, 4)), l != e && (l = e, this.dispatchEvent(new Event("progress")));
143
+ e >= this.duration && (clearInterval(u), s(C, this, 4)), l != e && (l = e, this.dispatchEvent(new Event("progress")));
144
144
  }, 100);
145
145
  }
146
146
  async attributeChangedCallback(e, t, n) {
@@ -154,17 +154,17 @@ var x = /* @__PURE__ */ new WeakMap(), S = /* @__PURE__ */ new WeakMap(), C = /*
154
154
  }
155
155
  async play() {
156
156
  var e;
157
- return o(T, this, null), await this.loadComplete, (e = this.api) == null || e.playVideo(), H(this);
157
+ return s(T, this, null), await this.loadComplete, (e = this.api) == null || e.playVideo(), H(this);
158
158
  }
159
159
  async pause() {
160
160
  var e;
161
161
  return await this.loadComplete, (e = this.api) == null ? void 0 : e.pauseVideo();
162
162
  }
163
163
  get seeking() {
164
- return i(w, this);
164
+ return a(w, this);
165
165
  }
166
166
  get readyState() {
167
- return i(C, this);
167
+ return a(C, this);
168
168
  }
169
169
  get src() {
170
170
  return this.getAttribute("src");
@@ -173,7 +173,7 @@ var x = /* @__PURE__ */ new WeakMap(), S = /* @__PURE__ */ new WeakMap(), C = /*
173
173
  this.src != e && this.setAttribute("src", e);
174
174
  }
175
175
  get error() {
176
- return i(E, this);
176
+ return a(E, this);
177
177
  }
178
178
  get paused() {
179
179
  var e, t;
@@ -211,11 +211,11 @@ var x = /* @__PURE__ */ new WeakMap(), S = /* @__PURE__ */ new WeakMap(), C = /*
211
211
  return (e = (n = (t = this.api) == null ? void 0 : t.getCurrentTime) == null ? void 0 : n.call(t)) == null ? 0 : e;
212
212
  }
213
213
  set currentTime(e) {
214
- this.currentTime != e && (o(T, this, new U()), this.loadComplete.then(() => {
214
+ this.currentTime != e && (s(T, this, new U()), this.loadComplete.then(() => {
215
215
  var t, n;
216
- (t = this.api) == null || t.seekTo(e, !0), this.paused && ((n = i(T, this)) == null || n.then(() => {
216
+ (t = this.api) == null || t.seekTo(e, !0), this.paused && ((n = a(T, this)) == null || n.then(() => {
217
217
  var e;
218
- i(T, this) && ((e = this.api) == null || e.pauseVideo());
218
+ a(T, this) && ((e = this.api) == null || e.pauseVideo());
219
219
  }));
220
220
  }));
221
221
  }
@@ -264,14 +264,14 @@ var x = /* @__PURE__ */ new WeakMap(), S = /* @__PURE__ */ new WeakMap(), C = /*
264
264
  this.poster != e && this.setAttribute("poster", `${e}`);
265
265
  }
266
266
  set volume(e) {
267
- this.volume != e && (o(k, this, e), this.loadComplete.then(() => {
267
+ this.volume != e && (s(k, this, e), this.loadComplete.then(() => {
268
268
  var t;
269
269
  (t = this.api) == null || t.setVolume(e * 100);
270
270
  }));
271
271
  }
272
272
  get volume() {
273
273
  var e;
274
- return this.isLoaded ? ((e = this.api) == null ? void 0 : e.getVolume()) / 100 : i(k, this);
274
+ return this.isLoaded ? ((e = this.api) == null ? void 0 : e.getVolume()) / 100 : a(k, this);
275
275
  }
276
276
  };
277
277
  function M(e) {
@@ -280,7 +280,7 @@ function M(e) {
280
280
  delete this[e], this[e] = t;
281
281
  }
282
282
  }
283
- s(j, "getTemplateHTML", y), s(j, "shadowRootOptions", { mode: "open" }), s(j, "observedAttributes", [
283
+ n(j, "getTemplateHTML", y), n(j, "shadowRootOptions", { mode: "open" }), n(j, "observedAttributes", [
284
284
  "autoplay",
285
285
  "controls",
286
286
  "crossorigin",
@@ -455,4 +455,4 @@ var $ = Z({
455
455
  //#endregion
456
456
  export { $ as default };
457
457
 
458
- //# sourceMappingURL=react-Dbs-sPBo.js.map
458
+ //# sourceMappingURL=react-DEF8h8hc.js.map
@@ -1,4 +1,4 @@
1
- import { v as e } from "./messages-Czlp86gl.js";
1
+ import { S as e } from "./messages-DCvBcspv.js";
2
2
  //#region ../../node_modules/.pnpm/react@19.2.7/node_modules/react/cjs/react.production.js
3
3
  var t = /* @__PURE__ */ e(((e) => {
4
4
  var t = Symbol.for("react.transitional.element"), n = Symbol.for("react.portal"), r = Symbol.for("react.fragment"), i = Symbol.for("react.strict_mode"), a = Symbol.for("react.profiler"), o = Symbol.for("react.consumer"), s = Symbol.for("react.context"), c = Symbol.for("react.forward_ref"), l = Symbol.for("react.suspense"), u = Symbol.for("react.memo"), d = Symbol.for("react.lazy"), f = Symbol.for("react.activity"), p = Symbol.iterator;
@@ -292,4 +292,4 @@ var t = /* @__PURE__ */ e(((e) => {
292
292
  //#endregion
293
293
  export { n as t };
294
294
 
295
- //# sourceMappingURL=react-B0K-sClg.js.map
295
+ //# sourceMappingURL=react-DOgLiyZi.js.map