@sapia-ai/chatbot-v3 1.1.1 → 1.3.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 (67) hide show
  1. package/dist/{EmbeddedVideoPlayer-COUZHpPa.js → EmbeddedVideoPlayer-DTzRqNcQ.js} +176 -186
  2. package/dist/{Preview-wPnYtccF.js → Preview-Dd7KyhMk.js} +3 -3
  3. package/dist/api/client.d.ts +10 -6
  4. package/dist/api/places.d.ts +33 -0
  5. package/dist/api/types/messages.d.ts +35 -4
  6. package/dist/api/types/responses.d.ts +20 -17
  7. package/dist/api.js +2 -2
  8. package/dist/core/bubbles/cards.d.ts +14 -0
  9. package/dist/core/bubbles/convert.d.ts +24 -2
  10. package/dist/core/bubbles/counters.d.ts +10 -0
  11. package/dist/core/bubbles/types.d.ts +21 -1
  12. package/dist/core/constants.d.ts +31 -0
  13. package/dist/core/events.d.ts +7 -0
  14. package/dist/core/internalUser.d.ts +13 -0
  15. package/dist/core/interview.d.ts +26 -9
  16. package/dist/core/persistence.d.ts +3 -0
  17. package/dist/core/redirect.d.ts +2 -0
  18. package/dist/core/store.d.ts +22 -9
  19. package/dist/core/validation/wordCount.d.ts +1 -0
  20. package/dist/{dist-Bwlks_W8.js → dist-waE-4cub.js} +3 -3
  21. package/dist/embed/compat.d.ts +1 -1
  22. package/dist/embed/createChatbot.d.ts +6 -0
  23. package/dist/{fix-webm-duration-QAy9T6AR.js → fix-webm-duration-IniZA6tF.js} +2 -2
  24. package/dist/index.d.ts +1 -0
  25. package/dist/index.js +6218 -5384
  26. package/dist/{jsx-runtime-24G8w2Bf.js → jsx-runtime-DN_m6Qdv.js} +2 -2
  27. package/dist/{messages-DCvBcspv.js → messages-C00e82NS.js} +44 -37
  28. package/dist/places-CT6PNW7B.js +52 -0
  29. package/dist/react/AnswerInput.d.ts +16 -5
  30. package/dist/react/SapiaChatbot.d.ts +7 -1
  31. package/dist/react/bubbleViewModel.d.ts +38 -11
  32. package/dist/react/strings.d.ts +46 -10
  33. package/dist/react/usePlacesSuggestions.d.ts +16 -0
  34. package/dist/{react-Bw5AugJc.js → react-A0_ZwPyM.js} +3 -3
  35. package/dist/{react-DEF8h8hc.js → react-BDGt_WsZ.js} +3 -3
  36. package/dist/{react-DDjfkpOE.js → react-B_YNH2g9.js} +3 -3
  37. package/dist/{react-D8hV9uow.js → react-ByP48xLV.js} +3 -3
  38. package/dist/{react-DPFikgTM.js → react-C9oBRlX8.js} +3 -3
  39. package/dist/{react-qa12DkXH.js → react-D5yWOfXN.js} +3 -3
  40. package/dist/{react-DOgLiyZi.js → react-DkQKleWD.js} +2 -2
  41. package/dist/{react-y4vaW3OH.js → react-d-THpGrV.js} +3 -3
  42. package/dist/{react-BjO903pN.js → react-euSb4sIX.js} +3 -3
  43. package/dist/ui/chat/ActionDock/ActionDock.d.ts +15 -0
  44. package/dist/ui/chat/ChatBubble/ChatBubble.d.ts +10 -3
  45. package/dist/ui/chat/ChatLog/ChatLog.d.ts +9 -4
  46. package/dist/ui/chat/EditBanner/EditBanner.d.ts +9 -3
  47. package/dist/ui/chat/HintDisclosure/HintDisclosure.d.ts +20 -0
  48. package/dist/ui/chat/SummaryCard/SummaryCard.d.ts +18 -23
  49. package/dist/ui/chat/types.d.ts +18 -2
  50. package/dist/ui/constants.d.ts +5 -0
  51. package/dist/ui/hooks/usePreventPaste.d.ts +17 -0
  52. package/dist/ui/inputs/LocationAnswerInput/LocationAnswerInput.d.ts +34 -0
  53. package/dist/ui/inputs/PhoneAnswerInput/PhoneAnswerInput.d.ts +5 -2
  54. package/dist/ui/inputs/SliderInput/SliderInput.d.ts +1 -2
  55. package/dist/ui/inputs/TextAnswerInput/TextAnswerInput.d.ts +38 -11
  56. package/dist/ui/media/EmbeddedVideo/EmbeddedVideoPlayer.d.ts +1 -1
  57. package/dist/ui/primitives/MarkdownText/MarkdownText.d.ts +24 -0
  58. package/dist/ui/shell/CohortClosedScreen/CohortClosedScreen.d.ts +9 -0
  59. package/dist/ui/shell/CopyLinkButton/CopyLinkButton.d.ts +10 -3
  60. package/dist/ui/shell/DoneScreen/DoneScreen.d.ts +4 -1
  61. package/dist/ui/shell/Header/AutoScrollTitle.d.ts +15 -0
  62. package/dist/ui/shell/Header/Header.d.ts +12 -0
  63. package/dist/ui/shell/Header/useAutoScrollTitle.d.ts +16 -0
  64. package/dist/ui/shell/TerminalMessageScreen/TerminalMessageScreen.d.ts +10 -0
  65. package/dist/ui/shell/WidgetRoot/themeVariables.d.ts +8 -0
  66. package/dist-umd/sapia-chatbot.umd.js +309 -309
  67. package/package.json +1 -1
@@ -1,6 +1,6 @@
1
- import { w as e } from "./messages-DCvBcspv.js";
2
- import { t } from "./react-DOgLiyZi.js";
3
- import { t as n } from "./jsx-runtime-24G8w2Bf.js";
1
+ import { T as e } from "./messages-C00e82NS.js";
2
+ import { t } from "./react-DkQKleWD.js";
3
+ import { t as n } from "./jsx-runtime-DN_m6Qdv.js";
4
4
  import { t as r } from "./defineProperty-DiFpLzd2.js";
5
5
  //#region ../../node_modules/.pnpm/react-player@3.4.0_@svta+cml-cta@1.0.6_@svta+cml-structured-field-values@1.1.3_@svta+cm_a4f64f295cc2a316f39ce360b0a6e480/node_modules/react-player/dist/patterns.js
6
6
  var i = /* @__PURE__ */ e(t(), 1), a = /\.(m4a|m4b|mp4a|mpga|mp2|mp2a|mp3|m2a|m3a|wav|weba|aac|oga|spx)($|\?)/i, o = /\.(mp4|og[gv]|webm|mov|m4v)(#t=[,\d+]+)?($|\?)/i, s = /\.(m3u8)($|\?)/i, c = /\.(mpd)($|\?)/i, l = /stream\.mux\.com\/(?!\w+\.m3u8)(\w+)/, u = /(?:youtu\.be\/|youtube(?:-nocookie|education)?\.com\/(?:embed\/|v\/|watch\/|watch\?v=|watch\?.+&v=|shorts\/|live\/))((\w|-){11})|youtube\.com\/playlist\?list=|youtube\.com\/user\//, d = /vimeo\.com\/(?!progressive_redirect).+/, f = /(?:wistia\.(?:com|net)|wi\.st)\/(?:medias|embed)\/(?:iframe\/)?([^?]+)/, p = /open\.spotify\.com\/(\w+)\/(\w+)/i, m = /(?:www\.|go\.)?twitch\.tv\/([a-zA-Z0-9_]+|(videos?\/|\?video=)\d+)($|\?)/, h = /tiktok\.com\/(?:player\/v1\/|share\/video\/|@[^/]+\/video\/)([0-9]+)/, g = (e, t) => {
@@ -34,7 +34,7 @@ var i = /* @__PURE__ */ e(t(), 1), a = /\.(m4a|m4b|mp4a|mpga|mp2|mp2a|mp3|m2a|m3
34
34
  canEnablePIP: () => !0,
35
35
  player: (0, i.lazy)(() => import(
36
36
  /* webpackChunkName: 'reactPlayerHls' */
37
- "./react-Bw5AugJc.js"
37
+ "./react-A0_ZwPyM.js"
38
38
  ))
39
39
  },
40
40
  {
@@ -44,7 +44,7 @@ var i = /* @__PURE__ */ e(t(), 1), a = /\.(m4a|m4b|mp4a|mpga|mp2|mp2a|mp3|m2a|m3
44
44
  canEnablePIP: () => !0,
45
45
  player: (0, i.lazy)(() => import(
46
46
  /* webpackChunkName: 'reactPlayerDash' */
47
- "./react-D8hV9uow.js"
47
+ "./react-ByP48xLV.js"
48
48
  ))
49
49
  },
50
50
  {
@@ -54,7 +54,7 @@ var i = /* @__PURE__ */ e(t(), 1), a = /\.(m4a|m4b|mp4a|mpga|mp2|mp2a|mp3|m2a|m3
54
54
  canEnablePIP: () => !0,
55
55
  player: (0, i.lazy)(() => import(
56
56
  /* webpackChunkName: 'reactPlayerMux' */
57
- "./dist-Bwlks_W8.js"
57
+ "./dist-waE-4cub.js"
58
58
  ))
59
59
  },
60
60
  {
@@ -63,7 +63,7 @@ var i = /* @__PURE__ */ e(t(), 1), a = /\.(m4a|m4b|mp4a|mpga|mp2|mp2a|mp3|m2a|m3
63
63
  canPlay: _.youtube,
64
64
  player: (0, i.lazy)(() => import(
65
65
  /* webpackChunkName: 'reactPlayerYouTube' */
66
- "./react-DEF8h8hc.js"
66
+ "./react-BDGt_WsZ.js"
67
67
  ))
68
68
  },
69
69
  {
@@ -72,7 +72,7 @@ var i = /* @__PURE__ */ e(t(), 1), a = /\.(m4a|m4b|mp4a|mpga|mp2|mp2a|mp3|m2a|m3
72
72
  canPlay: _.vimeo,
73
73
  player: (0, i.lazy)(() => import(
74
74
  /* webpackChunkName: 'reactPlayerVimeo' */
75
- "./react-DPFikgTM.js"
75
+ "./react-C9oBRlX8.js"
76
76
  ))
77
77
  },
78
78
  {
@@ -82,7 +82,7 @@ var i = /* @__PURE__ */ e(t(), 1), a = /\.(m4a|m4b|mp4a|mpga|mp2|mp2a|mp3|m2a|m3
82
82
  canEnablePIP: () => !0,
83
83
  player: (0, i.lazy)(() => import(
84
84
  /* webpackChunkName: 'reactPlayerWistia' */
85
- "./react-DDjfkpOE.js"
85
+ "./react-B_YNH2g9.js"
86
86
  ))
87
87
  },
88
88
  {
@@ -92,7 +92,7 @@ var i = /* @__PURE__ */ e(t(), 1), a = /\.(m4a|m4b|mp4a|mpga|mp2|mp2a|mp3|m2a|m3
92
92
  canEnablePIP: () => !1,
93
93
  player: (0, i.lazy)(() => import(
94
94
  /* webpackChunkName: 'reactPlayerSpotify' */
95
- "./react-BjO903pN.js"
95
+ "./react-euSb4sIX.js"
96
96
  ))
97
97
  },
98
98
  {
@@ -102,7 +102,7 @@ var i = /* @__PURE__ */ e(t(), 1), a = /\.(m4a|m4b|mp4a|mpga|mp2|mp2a|mp3|m2a|m3
102
102
  canEnablePIP: () => !1,
103
103
  player: (0, i.lazy)(() => import(
104
104
  /* webpackChunkName: 'reactPlayerTwitch' */
105
- "./react-y4vaW3OH.js"
105
+ "./react-d-THpGrV.js"
106
106
  ))
107
107
  },
108
108
  {
@@ -112,7 +112,7 @@ var i = /* @__PURE__ */ e(t(), 1), a = /\.(m4a|m4b|mp4a|mpga|mp2|mp2a|mp3|m2a|m3
112
112
  canEnablePIP: () => !1,
113
113
  player: (0, i.lazy)(() => import(
114
114
  /* webpackChunkName: 'reactPlayerTiktok' */
115
- "./react-qa12DkXH.js"
115
+ "./react-D5yWOfXN.js"
116
116
  ))
117
117
  },
118
118
  {
@@ -122,7 +122,7 @@ var i = /* @__PURE__ */ e(t(), 1), a = /\.(m4a|m4b|mp4a|mpga|mp2|mp2a|mp3|m2a|m3
122
122
  canEnablePIP: () => !0,
123
123
  player: v
124
124
  }
125
- ], ee = {
125
+ ], b = {
126
126
  width: "320px",
127
127
  height: "180px",
128
128
  volume: 1,
@@ -130,7 +130,7 @@ var i = /* @__PURE__ */ e(t(), 1), a = /\.(m4a|m4b|mp4a|mpga|mp2|mp2a|mp3|m2a|m3
130
130
  previewTabIndex: 0,
131
131
  previewAriaLabel: "",
132
132
  oEmbedUrl: "https://noembed.com/embed?url={url}"
133
- }, b = i.forwardRef((e, t) => {
133
+ }, x = i.forwardRef((e, t) => {
134
134
  let { playing: n, pip: r } = e, a = e.activePlayer, o = (0, i.useRef)(null), s = (0, i.useRef)(!0);
135
135
  (0, i.useEffect)(() => {
136
136
  var t, r;
@@ -178,17 +178,17 @@ var i = /* @__PURE__ */ e(t(), 1), a = /\.(m4a|m4b|mp4a|mpga|mp2|mp2a|mp3|m2a|m3
178
178
  onPlay: l
179
179
  }, e.children);
180
180
  });
181
- b.displayName = "Player";
182
- var te = b, ne = (0, i.lazy)(() => import(
181
+ x.displayName = "Player";
182
+ var ee = x, S = (0, i.lazy)(() => import(
183
183
  /* webpackChunkName: 'reactPlayerPreview' */
184
- "./Preview-wPnYtccF.js"
185
- )), x = [], S = (e, t) => {
184
+ "./Preview-Dd7KyhMk.js"
185
+ )), C = [], w = (e, t) => {
186
186
  let n = (n) => {
187
- for (let t of [...x, ...e]) if (n && t.canPlay(n)) return t;
187
+ for (let t of [...C, ...e]) if (n && t.canPlay(n)) return t;
188
188
  return t || null;
189
189
  }, r = i.forwardRef((e, t) => {
190
190
  let r = {
191
- ...ee,
191
+ ...b,
192
192
  ...e
193
193
  }, { src: a, slot: o, className: s, style: c, width: l, height: u, fallback: d, wrapper: f } = r, [p, m] = (0, i.useState)(!!r.light);
194
194
  (0, i.useEffect)(() => {
@@ -200,7 +200,7 @@ var te = b, ne = (0, i.lazy)(() => import(
200
200
  }, g = (e) => {
201
201
  if (!e) return null;
202
202
  let { light: t, playIcon: n, previewTabIndex: a, oEmbedUrl: o, previewAriaLabel: s } = r;
203
- return /* @__PURE__ */ i.createElement(ne, {
203
+ return /* @__PURE__ */ i.createElement(S, {
204
204
  src: e,
205
205
  light: t,
206
206
  playIcon: n,
@@ -214,7 +214,7 @@ var te = b, ne = (0, i.lazy)(() => import(
214
214
  let l = n(e);
215
215
  if (!l) return null;
216
216
  let { style: u, width: d, height: f, wrapper: p } = r, m = (a = r.config) == null ? void 0 : a[l.key];
217
- return /* @__PURE__ */ i.createElement(te, {
217
+ return /* @__PURE__ */ i.createElement(ee, {
218
218
  ...r,
219
219
  ref: t,
220
220
  activePlayer: (c = l.player) == null ? l : c,
@@ -232,7 +232,7 @@ var te = b, ne = (0, i.lazy)(() => import(
232
232
  },
233
233
  config: m
234
234
  });
235
- }, v = f == null ? C : f, y = d === !1 ? C : i.Suspense;
235
+ }, v = f == null ? T : f, y = d === !1 ? T : i.Suspense;
236
236
  return /* @__PURE__ */ i.createElement(v, {
237
237
  slot: o,
238
238
  className: s,
@@ -244,38 +244,38 @@ var te = b, ne = (0, i.lazy)(() => import(
244
244
  }, /* @__PURE__ */ i.createElement(y, { fallback: d }, p ? g(a) : _(a)));
245
245
  });
246
246
  return r.displayName = "ReactPlayer", r.addCustomPlayer = (e) => {
247
- x.push(e);
247
+ C.push(e);
248
248
  }, r.removeCustomPlayers = () => {
249
- x.length = 0;
249
+ C.length = 0;
250
250
  }, r.canPlay = (t) => {
251
251
  if (t) {
252
- for (let n of [...x, ...e]) if (n.canPlay(t)) return !0;
252
+ for (let n of [...C, ...e]) if (n.canPlay(t)) return !0;
253
253
  }
254
254
  return !1;
255
255
  }, r.canEnablePIP = (t) => {
256
256
  var n;
257
257
  if (t) {
258
- for (let r of [...x, ...e]) if (r.canPlay(t) && (n = r.canEnablePIP) != null && n.call(r)) return !0;
258
+ for (let r of [...C, ...e]) if (r.canPlay(t) && (n = r.canEnablePIP) != null && n.call(r)) return !0;
259
259
  }
260
260
  return !1;
261
261
  }, r;
262
- }, C = ({ children: e }) => e, w = y[y.length - 1], re = S(y, w), T, E = typeof global < "u" && {}.toString.call(global) === "[object global]", ie = typeof Bun < "u", ae = typeof Deno < "u", D = typeof WebSocketPair == "function" && ((T = caches) == null ? void 0 : T.default) !== void 0, O = E || ie || ae || D;
263
- function k(e, t) {
262
+ }, T = ({ children: e }) => e, te = y[y.length - 1], E = w(y, te), D, ne = typeof global < "u" && {}.toString.call(global) === "[object global]", re = typeof Bun < "u", ie = typeof Deno < "u", O = typeof WebSocketPair == "function" && ((D = caches) == null ? void 0 : D.default) !== void 0, k = ne || re || ie || O;
263
+ function A(e, t) {
264
264
  return e.indexOf(t.toLowerCase()) === 0 ? e : `${t.toLowerCase()}${e.substr(0, 1).toUpperCase()}${e.substr(1)}`;
265
265
  }
266
- function oe(e) {
266
+ function ae(e) {
267
267
  return !!(e && e.nodeType === 1 && "nodeName" in e && e.ownerDocument && e.ownerDocument.defaultView);
268
268
  }
269
- function se(e) {
269
+ function j(e) {
270
270
  return !isNaN(parseFloat(e)) && isFinite(e) && Math.floor(e) == e;
271
271
  }
272
- function A(e) {
272
+ function M(e) {
273
273
  return /^(https?:)?\/\/((((player|www)\.)?vimeo\.com)|((player\.)?[a-zA-Z0-9-]+\.(videoji\.(hk|cn)|vimeo\.work)))(?=$|\/)/.test(e);
274
274
  }
275
- function j(e) {
275
+ function N(e) {
276
276
  return /^https:\/\/player\.((vimeo\.com)|([a-zA-Z0-9-]+\.(videoji\.(hk|cn)|vimeo\.work)))\/video\/\d+/.test(e);
277
277
  }
278
- function M(e) {
278
+ function oe(e) {
279
279
  let t = (e || "").match(/^(?:https?:)?(?:\/\/)?([^/?]+)/), n = (t && t[1] || "").replace("player.", "");
280
280
  for (let e of [
281
281
  ".videoji.hk",
@@ -284,30 +284,30 @@ function M(e) {
284
284
  ]) if (n.endsWith(e)) return n;
285
285
  return "vimeo.com";
286
286
  }
287
- function N() {
287
+ function P() {
288
288
  let e = arguments.length > 0 && arguments[0] !== void 0 ? arguments[0] : {}, t = e.id, n = e.url, r = t || n;
289
289
  if (!r) throw Error("An id or url must be passed, either in an options object or as a data-vimeo-id or data-vimeo-url attribute.");
290
- if (se(r)) return `https://vimeo.com/${r}`;
291
- if (A(r)) return r.replace("http:", "https:");
290
+ if (j(r)) return `https://vimeo.com/${r}`;
291
+ if (M(r)) return r.replace("http:", "https:");
292
292
  throw TypeError(t ? `“${t}” is not a valid video id.` : `“${r}” is not a vimeo.com url.`);
293
293
  }
294
- var P = function(e, t, n) {
294
+ var F = function(e, t, n) {
295
295
  let r = arguments.length > 3 && arguments[3] !== void 0 ? arguments[3] : "addEventListener", i = arguments.length > 4 && arguments[4] !== void 0 ? arguments[4] : "removeEventListener", a = typeof t == "string" ? [t] : t;
296
296
  return a.forEach((t) => {
297
297
  e[r](t, n);
298
298
  }), { cancel: () => a.forEach((t) => e[i](t, n)) };
299
299
  };
300
- function F(e) {
300
+ function I(e) {
301
301
  let t = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : document;
302
302
  if (!e || !t || typeof t.querySelectorAll != "function") return null;
303
303
  let n = t.querySelectorAll("iframe");
304
304
  for (let t = 0; t < n.length; t++) if (n[t] && n[t].contentWindow === e) return n[t];
305
305
  return null;
306
306
  }
307
- var ce = Array.prototype.indexOf !== void 0, le = typeof window < "u" && window.postMessage !== void 0;
308
- if (!O && (!ce || !le)) throw Error("Sorry, the Vimeo Player API is not available in this browser.");
309
- var I = typeof globalThis < "u" ? globalThis : typeof window < "u" ? window : typeof global < "u" ? global : typeof self < "u" ? self : {};
310
- function ue(e, t) {
307
+ var se = Array.prototype.indexOf !== void 0, ce = typeof window < "u" && window.postMessage !== void 0;
308
+ if (!k && (!se || !ce)) throw Error("Sorry, the Vimeo Player API is not available in this browser.");
309
+ var L = typeof globalThis < "u" ? globalThis : typeof window < "u" ? window : typeof global < "u" ? global : typeof self < "u" ? self : {};
310
+ function le(e, t) {
311
311
  return t = { exports: {} }, e(t, t.exports), t.exports;
312
312
  }
313
313
  (function(e) {
@@ -360,11 +360,11 @@ function ue(e, t) {
360
360
  function i(e) {
361
361
  return Object(e) === e;
362
362
  }
363
- })(typeof globalThis < "u" ? globalThis : typeof self < "u" ? self : typeof window < "u" ? window : I);
364
- var L = ue(function(e) {
363
+ })(typeof globalThis < "u" ? globalThis : typeof self < "u" ? self : typeof window < "u" ? window : L);
364
+ var R = le(function(e) {
365
365
  (function(t, n, r) {
366
366
  n[t] = n[t] || r(), e.exports && (e.exports = n[t]);
367
- })("Promise", I, function() {
367
+ })("Promise", L, function() {
368
368
  var e, t, n, r = Object.prototype.toString, i = typeof setImmediate < "u" ? function(e) {
369
369
  return setImmediate(e);
370
370
  } : setTimeout;
@@ -512,32 +512,32 @@ var L = ue(function(e) {
512
512
  }) : t.reject(TypeError("Not an array"));
513
513
  }), m;
514
514
  });
515
- }), R = /* @__PURE__ */ new WeakMap();
516
- function z(e, t, n) {
517
- let r = R.get(e.element) || {};
518
- t in r || (r[t] = []), r[t].push(n), R.set(e.element, r);
515
+ }), z = /* @__PURE__ */ new WeakMap();
516
+ function B(e, t, n) {
517
+ let r = z.get(e.element) || {};
518
+ t in r || (r[t] = []), r[t].push(n), z.set(e.element, r);
519
519
  }
520
- function B(e, t) {
521
- return (R.get(e.element) || {})[t] || [];
520
+ function V(e, t) {
521
+ return (z.get(e.element) || {})[t] || [];
522
522
  }
523
- function V(e, t, n) {
524
- let r = R.get(e.element) || {};
523
+ function H(e, t, n) {
524
+ let r = z.get(e.element) || {};
525
525
  if (!r[t]) return !0;
526
- if (!n) return r[t] = [], R.set(e.element, r), !0;
526
+ if (!n) return r[t] = [], z.set(e.element, r), !0;
527
527
  let i = r[t].indexOf(n);
528
- return i !== -1 && r[t].splice(i, 1), R.set(e.element, r), r[t] && r[t].length === 0;
528
+ return i !== -1 && r[t].splice(i, 1), z.set(e.element, r), r[t] && r[t].length === 0;
529
529
  }
530
- function H(e, t) {
531
- let n = B(e, t);
530
+ function U(e, t) {
531
+ let n = V(e, t);
532
532
  if (n.length < 1) return !1;
533
533
  let r = n.shift();
534
- return V(e, t, r), r;
534
+ return H(e, t, r), r;
535
535
  }
536
- function de(e, t) {
537
- let n = R.get(e);
538
- R.set(t, n), R.delete(e);
536
+ function ue(e, t) {
537
+ let n = z.get(e);
538
+ z.set(t, n), z.delete(e);
539
539
  }
540
- function U(e) {
540
+ function W(e) {
541
541
  if (typeof e == "string") try {
542
542
  e = JSON.parse(e);
543
543
  } catch (e) {
@@ -545,22 +545,22 @@ function U(e) {
545
545
  }
546
546
  return e;
547
547
  }
548
- function W(e, t, n) {
548
+ function G(e, t, n) {
549
549
  if (!e.element.contentWindow || !e.element.contentWindow.postMessage) return;
550
550
  let r = { method: t };
551
551
  n !== void 0 && (r.value = n);
552
552
  let i = parseFloat(navigator.userAgent.toLowerCase().replace(/^.*msie (\d+).*$/, "$1"));
553
553
  i >= 8 && i < 10 && (r = JSON.stringify(r)), e.element.contentWindow.postMessage(r, e.origin);
554
554
  }
555
- function fe(e, t) {
556
- t = U(t);
555
+ function de(e, t) {
556
+ t = W(t);
557
557
  let n = [], r;
558
- if (t.event) t.event === "error" && B(e, t.data.method).forEach((n) => {
558
+ if (t.event) t.event === "error" && V(e, t.data.method).forEach((n) => {
559
559
  let r = Error(t.data.message);
560
- r.name = t.data.name, n.reject(r), V(e, t.data.method, n);
561
- }), n = B(e, `event:${t.event}`), r = t.data;
560
+ r.name = t.data.name, n.reject(r), H(e, t.data.method, n);
561
+ }), n = V(e, `event:${t.event}`), r = t.data;
562
562
  else if (t.method) {
563
- let i = H(e, t.method);
563
+ let i = U(e, t.method);
564
564
  i && (n.push(i), r = t.value);
565
565
  }
566
566
  n.forEach((t) => {
@@ -573,26 +573,26 @@ function fe(e, t) {
573
573
  } catch {}
574
574
  });
575
575
  }
576
- var pe = /* @__PURE__ */ "airplay.audio_tracks.audiotrack.autopause.autoplay.background.byline.cc.chapter_id.chapters.chromecast.color.colors.controls.disable_context_menu.dnt.end_time.fullscreen.height.id.initial_quality.interactive_params.keyboard.loop.maxheight.max_quality.maxwidth.min_quality.muted.play_button_position.playsinline.portrait.preload.progress_bar.quality.quality_selector.responsive.skipping_forward.speed.start_time.texttrack.thumbnail_id.title.transcript.transparent.unmute_button.url.vimeo_logo.volume.watch_full_video.width".split(".");
577
- function G(e) {
576
+ var fe = /* @__PURE__ */ "airplay.audio_tracks.audiotrack.autopause.autoplay.background.byline.cc.chapter_id.chapters.chromecast.color.colors.controls.disable_context_menu.dnt.end_time.fullscreen.height.id.initial_quality.interactive_params.keyboard.loop.maxheight.max_quality.maxwidth.min_quality.muted.play_button_position.playsinline.portrait.preload.progress_bar.quality.quality_selector.responsive.skipping_forward.speed.start_time.texttrack.thumbnail_id.title.transcript.transparent.unmute_button.url.vimeo_logo.volume.watch_full_video.width".split(".");
577
+ function K(e) {
578
578
  let t = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : {};
579
- return pe.reduce((t, n) => {
579
+ return fe.reduce((t, n) => {
580
580
  let r = e.getAttribute(`data-vimeo-${n}`);
581
581
  return (r || r === "") && (t[n] = r === "" ? 1 : r), t;
582
582
  }, t);
583
583
  }
584
- function K(e, t) {
584
+ function q(e, t) {
585
585
  let { html: n } = e;
586
586
  if (!t) throw TypeError("An element must be provided");
587
587
  if (t.getAttribute("data-vimeo-initialized") !== null) return t.querySelector("iframe");
588
588
  let r = document.createElement("div");
589
589
  return r.innerHTML = n, t.appendChild(r.firstChild), t.setAttribute("data-vimeo-initialized", "true"), t.querySelector("iframe");
590
590
  }
591
- function q(e) {
591
+ function J(e) {
592
592
  let t = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : {}, n = arguments.length > 2 ? arguments[2] : void 0;
593
593
  return new Promise((r, i) => {
594
- if (!A(e)) throw TypeError(`“${e}” is not a vimeo.com url.`);
595
- let a = `https://${M(e)}/api/oembed.json?url=${encodeURIComponent(e)}`;
594
+ if (!M(e)) throw TypeError(`“${e}” is not a vimeo.com url.`);
595
+ let a = `https://${oe(e)}/api/oembed.json?url=${encodeURIComponent(e)}`;
596
596
  for (let e in t) t.hasOwnProperty(e) && (a += `&${e}=${encodeURIComponent(t[e])}`);
597
597
  let o = "XDomainRequest" in window ? new XDomainRequest() : new XMLHttpRequest();
598
598
  o.open("GET", a, !0), o.onload = function() {
@@ -607,7 +607,7 @@ function q(e) {
607
607
  try {
608
608
  let t = JSON.parse(o.responseText);
609
609
  if (t.domain_status_code === 403) {
610
- K(t, n), i(/* @__PURE__ */ Error(`“${e}” is not embeddable.`));
610
+ q(t, n), i(/* @__PURE__ */ Error(`“${e}” is not embeddable.`));
611
611
  return;
612
612
  }
613
613
  r(t);
@@ -620,42 +620,42 @@ function q(e) {
620
620
  }, o.send();
621
621
  });
622
622
  }
623
- function me() {
623
+ function pe() {
624
624
  let e = arguments.length > 0 && arguments[0] !== void 0 ? arguments[0] : document, t = [].slice.call(e.querySelectorAll("[data-vimeo-id], [data-vimeo-url]")), n = (e) => {
625
625
  "console" in window && console.error && console.error(`There was an error creating an embed: ${e}`);
626
626
  };
627
627
  t.forEach((e) => {
628
628
  try {
629
629
  if (e.getAttribute("data-vimeo-defer") !== null) return;
630
- let t = G(e);
631
- q(N(t), t, e).then((t) => K(t, e)).catch(n);
630
+ let t = K(e);
631
+ J(P(t), t, e).then((t) => q(t, e)).catch(n);
632
632
  } catch (e) {
633
633
  n(e);
634
634
  }
635
635
  });
636
636
  }
637
- function he() {
637
+ function me() {
638
638
  let e = arguments.length > 0 && arguments[0] !== void 0 ? arguments[0] : document;
639
639
  window.VimeoPlayerResizeEmbeds_ || (window.VimeoPlayerResizeEmbeds_ = !0, window.addEventListener("message", (t) => {
640
- if (!A(t.origin) || !t.data || t.data.event !== "spacechange") return;
641
- let n = t.source ? F(t.source, e) : null;
640
+ if (!M(t.origin) || !t.data || t.data.event !== "spacechange") return;
641
+ let n = t.source ? I(t.source, e) : null;
642
642
  if (n) {
643
643
  let e = n.parentElement;
644
644
  e.style.paddingBottom = `${t.data.data[0].bottom}px`;
645
645
  }
646
646
  }));
647
647
  }
648
- function ge() {
648
+ function he() {
649
649
  let e = arguments.length > 0 && arguments[0] !== void 0 ? arguments[0] : document;
650
650
  window.VimeoSeoMetadataAppended || (window.VimeoSeoMetadataAppended = !0, window.addEventListener("message", (t) => {
651
- if (!A(t.origin)) return;
652
- let n = U(t.data);
651
+ if (!M(t.origin)) return;
652
+ let n = W(t.data);
653
653
  if (!n || n.event !== "ready") return;
654
- let r = t.source ? F(t.source, e) : null;
655
- r && j(r.src) && new Z(r).callMethod("appendVideoMetadata", window.location.href);
654
+ let r = t.source ? I(t.source, e) : null;
655
+ r && N(r.src) && new Q(r).callMethod("appendVideoMetadata", window.location.href);
656
656
  }));
657
657
  }
658
- function _e() {
658
+ function ge() {
659
659
  let e = arguments.length > 0 && arguments[0] !== void 0 ? arguments[0] : document;
660
660
  if (window.VimeoCheckedUrlTimeParam) return;
661
661
  window.VimeoCheckedUrlTimeParam = !0;
@@ -663,12 +663,12 @@ function _e() {
663
663
  "console" in window && console.error && console.error(`There was an error getting video Id: ${e}`);
664
664
  };
665
665
  window.addEventListener("message", (n) => {
666
- if (!A(n.origin)) return;
667
- let r = U(n.data);
666
+ if (!M(n.origin)) return;
667
+ let r = W(n.data);
668
668
  if (!r || r.event !== "ready") return;
669
- let i = n.source ? F(n.source, e) : null;
670
- if (i && j(i.src)) {
671
- let e = new Z(i);
669
+ let i = n.source ? I(n.source, e) : null;
670
+ if (i && N(i.src)) {
671
+ let e = new Q(i);
672
672
  e.getVideoId().then((t) => {
673
673
  let n = RegExp(`[?&]vimeo_t_${t}=([^&#]*)`).exec(window.location.href);
674
674
  if (n && n[1]) {
@@ -679,12 +679,12 @@ function _e() {
679
679
  }
680
680
  });
681
681
  }
682
- function ve() {
682
+ function _e() {
683
683
  window.VimeoDRMEmbedsUpdated || (window.VimeoDRMEmbedsUpdated = !0, window.addEventListener("message", (e) => {
684
- if (!A(e.origin)) return;
685
- let t = U(e.data);
684
+ if (!M(e.origin)) return;
685
+ let t = W(e.data);
686
686
  if (!t || t.event !== "drminitfailed") return;
687
- let n = e.source ? F(e.source) : null;
687
+ let n = e.source ? I(e.source) : null;
688
688
  if (!n) return;
689
689
  let r = n.getAttribute("allow") || "";
690
690
  if (!r.includes("encrypted-media")) {
@@ -695,7 +695,7 @@ function ve() {
695
695
  }
696
696
  }));
697
697
  }
698
- function ye() {
698
+ function ve() {
699
699
  let e = function() {
700
700
  let e, t = [
701
701
  [
@@ -799,7 +799,7 @@ function ye() {
799
799
  }
800
800
  }), n;
801
801
  }
802
- var be = {
802
+ var ye = {
803
803
  role: "viewer",
804
804
  autoPlayMuted: !0,
805
805
  allowedDrift: .3,
@@ -807,7 +807,7 @@ var be = {
807
807
  minCheckInterval: .1,
808
808
  maxRateAdjustment: .2,
809
809
  maxTimeToCatchUp: 1
810
- }, xe = class extends EventTarget {
810
+ }, be = class extends EventTarget {
811
811
  constructor(e, t) {
812
812
  let n = arguments.length > 2 && arguments[2] !== void 0 ? arguments[2] : {}, i = arguments.length > 3 ? arguments[3] : void 0;
813
813
  super(), r(this, "logger", void 0), r(this, "speedAdjustment", 0), r(this, "adjustSpeed", async (e, t) => {
@@ -815,7 +815,7 @@ var be = {
815
815
  let n = await e.getPlaybackRate() - this.speedAdjustment + t;
816
816
  this.log(`New playbackRate: ${n}`), await e.setPlaybackRate(n), this.speedAdjustment = t;
817
817
  }), this.logger = i, this.init(t, e, {
818
- ...be,
818
+ ...ye,
819
819
  ...n
820
820
  });
821
821
  }
@@ -825,13 +825,13 @@ var be = {
825
825
  async init(e, t, n) {
826
826
  if (await this.waitForTOReadyState(e, "open"), n.role === "viewer") {
827
827
  await this.updatePlayer(e, t, n);
828
- let r = P(e, "change", () => this.updatePlayer(e, t, n)), i = this.maintainPlaybackPosition(e, t, n);
828
+ let r = F(e, "change", () => this.updatePlayer(e, t, n)), i = this.maintainPlaybackPosition(e, t, n);
829
829
  this.addEventListener("disconnect", () => {
830
830
  i.cancel(), r.cancel();
831
831
  });
832
832
  } else {
833
833
  await this.updateTimingObject(e, t);
834
- let n = P(t, [
834
+ let n = F(t, [
835
835
  "seeked",
836
836
  "play",
837
837
  "pause",
@@ -881,22 +881,22 @@ var be = {
881
881
  r();
882
882
  });
883
883
  }
884
- }, J = /* @__PURE__ */ new WeakMap(), Y = /* @__PURE__ */ new WeakMap(), X = {}, Z = class {
884
+ }, Y = /* @__PURE__ */ new WeakMap(), X = /* @__PURE__ */ new WeakMap(), Z = {}, Q = class {
885
885
  constructor(e) {
886
886
  let t = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : {};
887
- if (window.jQuery && e instanceof jQuery && (e.length > 1 && window.console && console.warn && console.warn("A jQuery object with multiple elements was passed, using the first element."), e = e[0]), typeof document < "u" && typeof e == "string" && (e = document.getElementById(e)), !oe(e)) throw TypeError("You must pass either a valid element or a valid id.");
887
+ if (window.jQuery && e instanceof jQuery && (e.length > 1 && window.console && console.warn && console.warn("A jQuery object with multiple elements was passed, using the first element."), e = e[0]), typeof document < "u" && typeof e == "string" && (e = document.getElementById(e)), !ae(e)) throw TypeError("You must pass either a valid element or a valid id.");
888
888
  if (e.nodeName !== "IFRAME") {
889
889
  let t = e.querySelector("iframe");
890
890
  t && (e = t);
891
891
  }
892
- if (e.nodeName === "IFRAME" && !A(e.getAttribute("src") || "")) throw Error("The player element passed isn’t a Vimeo embed.");
893
- if (J.has(e)) return J.get(e);
892
+ if (e.nodeName === "IFRAME" && !M(e.getAttribute("src") || "")) throw Error("The player element passed isn’t a Vimeo embed.");
893
+ if (Y.has(e)) return Y.get(e);
894
894
  this._window = e.ownerDocument.defaultView, this.element = e, this.origin = "*";
895
- let n = new L((n, r) => {
895
+ let n = new R((n, r) => {
896
896
  if (this._onMessage = (e) => {
897
- if (!A(e.origin) || this.element.contentWindow !== e.source) return;
897
+ if (!M(e.origin) || this.element.contentWindow !== e.source) return;
898
898
  this.origin === "*" && (this.origin = e.origin);
899
- let t = U(e.data);
899
+ let t = W(e.data);
900
900
  if (t && t.event === "error" && t.data && t.data.method === "ready") {
901
901
  let e = Error(t.data.message);
902
902
  e.name = t.data.name, r(e);
@@ -907,54 +907,54 @@ var be = {
907
907
  this.element.setAttribute("data-ready", "true"), n();
908
908
  return;
909
909
  }
910
- fe(this, t);
910
+ de(this, t);
911
911
  }, this._window.addEventListener("message", this._onMessage), this.element.nodeName !== "IFRAME") {
912
- let n = G(e, t);
913
- q(N(n), n, e).then((t) => {
914
- let n = K(t, e);
915
- return this.element = n, this._originalElement = e, de(e, n), J.set(this.element, this), t;
912
+ let n = K(e, t);
913
+ J(P(n), n, e).then((t) => {
914
+ let n = q(t, e);
915
+ return this.element = n, this._originalElement = e, ue(e, n), Y.set(this.element, this), t;
916
916
  }).catch(r);
917
917
  }
918
918
  });
919
- if (Y.set(this, n), J.set(this.element, this), this.element.nodeName === "IFRAME" && W(this, "ping"), X.isEnabled) {
920
- let e = () => X.exit();
919
+ if (X.set(this, n), Y.set(this.element, this), this.element.nodeName === "IFRAME" && G(this, "ping"), Z.isEnabled) {
920
+ let e = () => Z.exit();
921
921
  this.fullscreenchangeHandler = () => {
922
- X.isFullscreen ? z(this, "event:exitFullscreen", e) : V(this, "event:exitFullscreen", e), this.ready().then(() => {
923
- W(this, "fullscreenchange", X.isFullscreen);
922
+ Z.isFullscreen ? B(this, "event:exitFullscreen", e) : H(this, "event:exitFullscreen", e), this.ready().then(() => {
923
+ G(this, "fullscreenchange", Z.isFullscreen);
924
924
  });
925
- }, X.on("fullscreenchange", this.fullscreenchangeHandler);
925
+ }, Z.on("fullscreenchange", this.fullscreenchangeHandler);
926
926
  }
927
927
  return this;
928
928
  }
929
929
  static isVimeoUrl(e) {
930
- return A(e);
930
+ return M(e);
931
931
  }
932
932
  callMethod(e) {
933
933
  var t = [...arguments].slice(1);
934
934
  if (e == null) throw TypeError("You must pass a method name.");
935
- return new L((n, r) => this.ready().then(() => {
936
- z(this, e, {
935
+ return new R((n, r) => this.ready().then(() => {
936
+ B(this, e, {
937
937
  resolve: n,
938
938
  reject: r
939
- }), t.length === 0 ? t = {} : t.length === 1 && (t = t[0]), W(this, e, t);
939
+ }), t.length === 0 ? t = {} : t.length === 1 && (t = t[0]), G(this, e, t);
940
940
  }).catch(r));
941
941
  }
942
942
  get(e) {
943
- return new L((t, n) => (e = k(e, "get"), this.ready().then(() => {
944
- z(this, e, {
943
+ return new R((t, n) => (e = A(e, "get"), this.ready().then(() => {
944
+ B(this, e, {
945
945
  resolve: t,
946
946
  reject: n
947
- }), W(this, e);
947
+ }), G(this, e);
948
948
  }).catch(n)));
949
949
  }
950
950
  set(e, t) {
951
- return new L((n, r) => {
952
- if (e = k(e, "set"), t == null) throw TypeError("There must be a value to set.");
951
+ return new R((n, r) => {
952
+ if (e = A(e, "set"), t == null) throw TypeError("There must be a value to set.");
953
953
  return this.ready().then(() => {
954
- z(this, e, {
954
+ B(this, e, {
955
955
  resolve: n,
956
956
  reject: r
957
- }), W(this, e, t);
957
+ }), G(this, e, t);
958
958
  }).catch(r);
959
959
  });
960
960
  }
@@ -962,21 +962,21 @@ var be = {
962
962
  if (!e) throw TypeError("You must pass an event name.");
963
963
  if (!t) throw TypeError("You must pass a callback function.");
964
964
  if (typeof t != "function") throw TypeError("The callback must be a function.");
965
- B(this, `event:${e}`).length === 0 && this.callMethod("addEventListener", e).catch(() => {}), z(this, `event:${e}`, t);
965
+ V(this, `event:${e}`).length === 0 && this.callMethod("addEventListener", e).catch(() => {}), B(this, `event:${e}`, t);
966
966
  }
967
967
  off(e, t) {
968
968
  if (!e) throw TypeError("You must pass an event name.");
969
969
  if (t && typeof t != "function") throw TypeError("The callback must be a function.");
970
- V(this, `event:${e}`, t) && this.callMethod("removeEventListener", e).catch((e) => {});
970
+ H(this, `event:${e}`, t) && this.callMethod("removeEventListener", e).catch((e) => {});
971
971
  }
972
972
  loadVideo(e) {
973
973
  return this.callMethod("loadVideo", e);
974
974
  }
975
975
  ready() {
976
- let e = Y.get(this) || new L((e, t) => {
976
+ let e = X.get(this) || new R((e, t) => {
977
977
  t(/* @__PURE__ */ Error("Unknown player. Probably unloaded."));
978
978
  });
979
- return L.resolve(e);
979
+ return R.resolve(e);
980
980
  }
981
981
  addCuePoint(e) {
982
982
  let t = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : {};
@@ -1017,13 +1017,13 @@ var be = {
1017
1017
  return this.callMethod("play");
1018
1018
  }
1019
1019
  requestFullscreen() {
1020
- return X.isEnabled ? X.request(this.element) : this.callMethod("requestFullscreen");
1020
+ return Z.isEnabled ? Z.request(this.element) : this.callMethod("requestFullscreen");
1021
1021
  }
1022
1022
  exitFullscreen() {
1023
- return X.isEnabled ? X.exit() : this.callMethod("exitFullscreen");
1023
+ return Z.isEnabled ? Z.exit() : this.callMethod("exitFullscreen");
1024
1024
  }
1025
1025
  getFullscreen() {
1026
- return X.isEnabled ? L.resolve(X.isFullscreen) : this.get("fullscreen");
1026
+ return Z.isEnabled ? R.resolve(Z.isFullscreen) : this.get("fullscreen");
1027
1027
  }
1028
1028
  requestPictureInPicture() {
1029
1029
  return this.callMethod("requestPictureInPicture");
@@ -1041,13 +1041,13 @@ var be = {
1041
1041
  return this.callMethod("unload");
1042
1042
  }
1043
1043
  destroy() {
1044
- return new L((e) => {
1045
- if (Y.delete(this), J.delete(this.element), this._originalElement && (J.delete(this._originalElement), this._originalElement.removeAttribute("data-vimeo-initialized")), this.element && this.element.nodeName === "IFRAME" && this.element.parentNode && (this.element.parentNode.parentNode && this._originalElement && this._originalElement !== this.element.parentNode ? this.element.parentNode.parentNode.removeChild(this.element.parentNode) : this.element.parentNode.removeChild(this.element)), this.element && this.element.nodeName === "DIV" && this.element.parentNode) {
1044
+ return new R((e) => {
1045
+ if (X.delete(this), Y.delete(this.element), this._originalElement && (Y.delete(this._originalElement), this._originalElement.removeAttribute("data-vimeo-initialized")), this.element && this.element.nodeName === "IFRAME" && this.element.parentNode && (this.element.parentNode.parentNode && this._originalElement && this._originalElement !== this.element.parentNode ? this.element.parentNode.parentNode.removeChild(this.element.parentNode) : this.element.parentNode.removeChild(this.element)), this.element && this.element.nodeName === "DIV" && this.element.parentNode) {
1046
1046
  this.element.removeAttribute("data-vimeo-initialized");
1047
1047
  let e = this.element.querySelector("iframe");
1048
1048
  e && e.parentNode && (e.parentNode.parentNode && this._originalElement && this._originalElement !== e.parentNode ? e.parentNode.parentNode.removeChild(e.parentNode) : e.parentNode.removeChild(e));
1049
1049
  }
1050
- this._window.removeEventListener("message", this._onMessage), X.isEnabled && X.off("fullscreenchange", this.fullscreenchangeHandler), e();
1050
+ this._window.removeEventListener("message", this._onMessage), Z.isEnabled && Z.off("fullscreenchange", this.fullscreenchangeHandler), e();
1051
1051
  });
1052
1052
  }
1053
1053
  getAutopause() {
@@ -1075,7 +1075,7 @@ var be = {
1075
1075
  return this.get("color");
1076
1076
  }
1077
1077
  getColors() {
1078
- return L.all([
1078
+ return R.all([
1079
1079
  this.get("colorOne"),
1080
1080
  this.get("colorTwo"),
1081
1081
  this.get("colorThree"),
@@ -1086,14 +1086,14 @@ var be = {
1086
1086
  return this.set("color", e);
1087
1087
  }
1088
1088
  setColors(e) {
1089
- if (!Array.isArray(e)) return new L((e, t) => t(/* @__PURE__ */ TypeError("Argument must be an array.")));
1090
- let t = new L((e) => e(null)), n = [
1089
+ if (!Array.isArray(e)) return new R((e, t) => t(/* @__PURE__ */ TypeError("Argument must be an array.")));
1090
+ let t = new R((e) => e(null)), n = [
1091
1091
  e[0] ? this.set("colorOne", e[0]) : t,
1092
1092
  e[1] ? this.set("colorTwo", e[1]) : t,
1093
1093
  e[2] ? this.set("colorThree", e[2]) : t,
1094
1094
  e[3] ? this.set("colorFour", e[3]) : t
1095
1095
  ];
1096
- return L.all(n);
1096
+ return R.all(n);
1097
1097
  }
1098
1098
  getCuePoints() {
1099
1099
  return this.get("cuePoints");
@@ -1194,14 +1194,14 @@ var be = {
1194
1194
  async setTimingSrc(e, t) {
1195
1195
  if (!e) throw TypeError("A Timing Object must be provided.");
1196
1196
  await this.ready();
1197
- let n = new xe(this, e, t);
1198
- return W(this, "notifyTimingObjectConnect"), n.addEventListener("disconnect", () => W(this, "notifyTimingObjectDisconnect")), n;
1197
+ let n = new be(this, e, t);
1198
+ return G(this, "notifyTimingObjectConnect"), n.addEventListener("disconnect", () => G(this, "notifyTimingObjectDisconnect")), n;
1199
1199
  }
1200
1200
  };
1201
- O || (X = ye(), me(), he(), ge(), _e(), ve());
1201
+ k || (Z = ve(), pe(), me(), he(), ge(), _e());
1202
1202
  //#endregion
1203
1203
  //#region src/ui/media/EmbeddedVideo/VimeoPlayer.tsx
1204
- var Q = n(), Se = (e) => {
1204
+ var $ = n(), xe = (e) => {
1205
1205
  let t = e.match(/vimeo\.com\/(video\/|event\/)?(\d+)(?:\/([a-zA-Z0-9]+))?/);
1206
1206
  if (!t) {
1207
1207
  let t = e.match(/player\.vimeo\.com\/video\/(\d+)/);
@@ -1215,25 +1215,25 @@ var Q = n(), Se = (e) => {
1215
1215
  videoId: n,
1216
1216
  privacyHash: r || void 0
1217
1217
  };
1218
- }, Ce = (e, t) => {
1218
+ }, Se = (e, t) => {
1219
1219
  let n = new URLSearchParams();
1220
1220
  return t && n.append("h", t), n.append("dnt", "1"), n.append("fullscreen", "1"), `https://player.vimeo.com/video/${e}?${n.toString()}`;
1221
- }, we = ({ src: e, title: t, width: n = "100%", height: r = "100%", onPlay: a, onPause: o, onEnded: s, onError: c }) => {
1221
+ }, Ce = ({ src: e, title: t, width: n = "100%", height: r = "100%", onPlay: a, onPause: o, onEnded: s, onError: c }) => {
1222
1222
  let l = (0, i.useRef)(null), u = (0, i.useRef)(null);
1223
1223
  return (0, i.useEffect)(() => {
1224
1224
  if (!l.current) return;
1225
- let i = Se(e);
1225
+ let i = xe(e);
1226
1226
  if (!i) {
1227
1227
  c == null || c(/* @__PURE__ */ Error("Invalid Vimeo URL"));
1228
1228
  return;
1229
1229
  }
1230
1230
  let d = document.createElement("iframe");
1231
- d.src = Ce(i.videoId, i.privacyHash), d.title = t, d.width = n, d.height = r, d.frameBorder = "0", d.referrerPolicy = "origin", d.allow = "autoplay; fullscreen; picture-in-picture", d.allowFullscreen = !0, d.style.width = "100%", d.style.height = "100%", d.style.border = "none", l.current.innerHTML = "", l.current.appendChild(d);
1232
- let f = new Z(d);
1231
+ d.src = Se(i.videoId, i.privacyHash), d.title = t, d.width = n, d.height = r, d.frameBorder = "0", d.referrerPolicy = "origin", d.allow = "autoplay; fullscreen; picture-in-picture", d.allowFullscreen = !0, d.style.width = "100%", d.style.height = "100%", d.style.border = "none", l.current.innerHTML = "", l.current.appendChild(d);
1232
+ let f = new Q(d);
1233
1233
  return u.current = f, f.on("play", () => a == null ? void 0 : a()), f.on("pause", () => o == null ? void 0 : o()), f.on("ended", () => s == null ? void 0 : s()), f.on("error", (e) => c == null ? void 0 : c(Error(e.message))), () => {
1234
1234
  f.destroy(), u.current = null;
1235
1235
  };
1236
- }, [e]), /* @__PURE__ */ (0, Q.jsx)("div", {
1236
+ }, [e]), /* @__PURE__ */ (0, $.jsx)("div", {
1237
1237
  ref: l,
1238
1238
  style: {
1239
1239
  width: n,
@@ -1242,37 +1242,27 @@ var Q = n(), Se = (e) => {
1242
1242
  maxHeight: "100%"
1243
1243
  }
1244
1244
  });
1245
- }, Te = (e) => /vimeo\.com/.test(e), $ = {
1246
- width: "100%",
1247
- aspectRatio: "16 / 9"
1248
- }, Ee = ({ url: e, label: t }) => {
1245
+ }, we = (e) => /vimeo\.com/.test(e), Te = ({ url: e, label: t }) => {
1249
1246
  let [n, r] = (0, i.useState)(!1);
1250
- return Te(e) ? /* @__PURE__ */ (0, Q.jsx)("div", {
1251
- style: $,
1252
- children: /* @__PURE__ */ (0, Q.jsx)(we, {
1253
- src: e,
1254
- title: t,
1255
- width: "100%",
1256
- height: "100%",
1257
- onPlay: () => r(!0),
1258
- onPause: () => r(!1)
1259
- })
1260
- }) : /* @__PURE__ */ (0, Q.jsx)("div", {
1261
- style: $,
1262
- children: /* @__PURE__ */ (0, Q.jsx)(re, {
1263
- src: e,
1264
- controls: !0,
1265
- width: "100%",
1266
- height: "100%",
1267
- playing: n,
1268
- onPlay: () => r(!0),
1269
- onPause: () => r(!1),
1270
- config: { youtube: { referrerpolicy: "strict-origin-when-cross-origin" } },
1271
- style: { maxWidth: "100%" }
1272
- })
1247
+ return we(e) ? /* @__PURE__ */ (0, $.jsx)(Ce, {
1248
+ src: e,
1249
+ title: t,
1250
+ width: "100%",
1251
+ height: "100%",
1252
+ onPlay: () => r(!0),
1253
+ onPause: () => r(!1)
1254
+ }) : /* @__PURE__ */ (0, $.jsx)(E, {
1255
+ src: e,
1256
+ controls: !0,
1257
+ width: "100%",
1258
+ height: "100%",
1259
+ playing: n,
1260
+ onPlay: () => r(!0),
1261
+ onPause: () => r(!1),
1262
+ config: { youtube: { referrerpolicy: "strict-origin-when-cross-origin" } }
1273
1263
  });
1274
1264
  };
1275
1265
  //#endregion
1276
- export { Ee as EmbeddedVideoPlayer };
1266
+ export { Te as EmbeddedVideoPlayer };
1277
1267
 
1278
- //# sourceMappingURL=EmbeddedVideoPlayer-COUZHpPa.js.map
1268
+ //# sourceMappingURL=EmbeddedVideoPlayer-DTzRqNcQ.js.map