@linktr.ee/messaging-react 1.26.1 → 1.28.0-rc-1776225927

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 (58) hide show
  1. package/dist/Creator-D38dWn2X.js +318 -0
  2. package/dist/Creator-D38dWn2X.js.map +1 -0
  3. package/dist/MediaPlayer-DE9MC6k6.js +599 -0
  4. package/dist/MediaPlayer-DE9MC6k6.js.map +1 -0
  5. package/dist/Preview-DqAv16NS.js +87 -0
  6. package/dist/Preview-DqAv16NS.js.map +1 -0
  7. package/dist/Visitor-BG-9-3HU.js +199 -0
  8. package/dist/Visitor-BG-9-3HU.js.map +1 -0
  9. package/dist/dash.all.min-Duv4lvGS.js +18858 -0
  10. package/dist/dash.all.min-Duv4lvGS.js.map +1 -0
  11. package/dist/hls-Bogc7CBn.js +21710 -0
  12. package/dist/hls-Bogc7CBn.js.map +1 -0
  13. package/dist/index-Da-xN4Yq.js +16142 -0
  14. package/dist/index-Da-xN4Yq.js.map +1 -0
  15. package/dist/index-Dj9rqWcU.js +69 -0
  16. package/dist/index-Dj9rqWcU.js.map +1 -0
  17. package/dist/index.d.ts +74 -10
  18. package/dist/index.js +979 -934
  19. package/dist/index.js.map +1 -1
  20. package/dist/mixin-B6jYfIcp.js +808 -0
  21. package/dist/mixin-B6jYfIcp.js.map +1 -0
  22. package/dist/react-BxlQMOfz.js +419 -0
  23. package/dist/react-BxlQMOfz.js.map +1 -0
  24. package/dist/react-COAP-MIW.js +377 -0
  25. package/dist/react-COAP-MIW.js.map +1 -0
  26. package/dist/react-Cn4WlMcl.js +3108 -0
  27. package/dist/react-Cn4WlMcl.js.map +1 -0
  28. package/dist/react-CwTJArKY.js +459 -0
  29. package/dist/react-CwTJArKY.js.map +1 -0
  30. package/dist/react-DkfS_atT.js +373 -0
  31. package/dist/react-DkfS_atT.js.map +1 -0
  32. package/dist/react-Pea5fum1.js +286 -0
  33. package/dist/react-Pea5fum1.js.map +1 -0
  34. package/dist/react-RiBbsUDd.js +534 -0
  35. package/dist/react-RiBbsUDd.js.map +1 -0
  36. package/dist/react-dS1WBxxz.js +238 -0
  37. package/dist/react-dS1WBxxz.js.map +1 -0
  38. package/package.json +2 -1
  39. package/src/components/ChannelView.tsx +12 -2
  40. package/src/components/CustomMessage/CustomMessage.stories.tsx +173 -41
  41. package/src/components/CustomMessage/MessageTag.tsx +5 -0
  42. package/src/components/CustomMessage/index.tsx +43 -4
  43. package/src/components/LockedAttachment/LockedAttachment.stories.tsx +343 -0
  44. package/src/components/LockedAttachment/components/Creator.tsx +469 -0
  45. package/src/components/LockedAttachment/components/MediaPlayer.tsx +359 -0
  46. package/src/components/LockedAttachment/components/Visitor.tsx +356 -0
  47. package/src/components/LockedAttachment/index.tsx +39 -0
  48. package/src/components/LockedAttachment/types.ts +17 -0
  49. package/src/components/LockedAttachment/utils/icons.ts +53 -0
  50. package/src/components/LockedAttachment/utils/mimeType.test.ts +119 -0
  51. package/src/components/LockedAttachment/utils/mimeType.ts +37 -0
  52. package/src/components/ParticipantPicker/index.tsx +8 -1
  53. package/src/hooks/useParticipants.ts +3 -2
  54. package/src/index.ts +4 -0
  55. package/src/stories/decorators/storyUser.tsx +37 -0
  56. package/src/stream-custom-data.ts +9 -3
  57. package/src/types.ts +20 -1
  58. package/src/utils/isDevBuild.ts +10 -0
@@ -0,0 +1,3108 @@
1
+ var rt = Object.defineProperty;
2
+ var Re = (r) => {
3
+ throw TypeError(r);
4
+ };
5
+ var nt = (r, t, e) => t in r ? rt(r, t, { enumerable: !0, configurable: !0, writable: !0, value: e }) : r[t] = e;
6
+ var fe = (r, t, e) => nt(r, typeof t != "symbol" ? t + "" : t, e), Me = (r, t, e) => t.has(r) || Re("Cannot " + e);
7
+ var _ = (r, t, e) => (Me(r, t, "read from private field"), e ? e.call(r) : t.get(r)), L = (r, t, e) => t.has(r) ? Re("Cannot add the same private member more than once") : t instanceof WeakSet ? t.add(r) : t.set(r, e), P = (r, t, e, n) => (Me(r, t, "write to private field"), n ? n.call(r, e) : t.set(r, e), e), Le = (r, t, e) => (Me(r, t, "access private method"), e);
8
+ import it from "react";
9
+ import { M as at } from "./index-Dj9rqWcU.js";
10
+ /*! @vimeo/player v2.29.0 | (c) 2025 Vimeo | MIT License | https://github.com/vimeo/player.js */
11
+ function je(r, t) {
12
+ var e = Object.keys(r);
13
+ if (Object.getOwnPropertySymbols) {
14
+ var n = Object.getOwnPropertySymbols(r);
15
+ t && (n = n.filter(function(i) {
16
+ return Object.getOwnPropertyDescriptor(r, i).enumerable;
17
+ })), e.push.apply(e, n);
18
+ }
19
+ return e;
20
+ }
21
+ function Ie(r) {
22
+ for (var t = 1; t < arguments.length; t++) {
23
+ var e = arguments[t] != null ? arguments[t] : {};
24
+ t % 2 ? je(Object(e), !0).forEach(function(n) {
25
+ ge(r, n, e[n]);
26
+ }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(r, Object.getOwnPropertyDescriptors(e)) : je(Object(e)).forEach(function(n) {
27
+ Object.defineProperty(r, n, Object.getOwnPropertyDescriptor(e, n));
28
+ });
29
+ }
30
+ return r;
31
+ }
32
+ function I() {
33
+ I = function() {
34
+ return r;
35
+ };
36
+ var r = {}, t = Object.prototype, e = t.hasOwnProperty, n = Object.defineProperty || function(c, l, d) {
37
+ c[l] = d.value;
38
+ }, i = typeof Symbol == "function" ? Symbol : {}, a = i.iterator || "@@iterator", o = i.asyncIterator || "@@asyncIterator", u = i.toStringTag || "@@toStringTag";
39
+ function h(c, l, d) {
40
+ return Object.defineProperty(c, l, {
41
+ value: d,
42
+ enumerable: !0,
43
+ configurable: !0,
44
+ writable: !0
45
+ }), c[l];
46
+ }
47
+ try {
48
+ h({}, "");
49
+ } catch {
50
+ h = function(l, d, S) {
51
+ return l[d] = S;
52
+ };
53
+ }
54
+ function s(c, l, d, S) {
55
+ var k = l && l.prototype instanceof M ? l : M, O = Object.create(k.prototype), R = new D(S || []);
56
+ return n(O, "_invoke", {
57
+ value: v(c, d, R)
58
+ }), O;
59
+ }
60
+ function g(c, l, d) {
61
+ try {
62
+ return {
63
+ type: "normal",
64
+ arg: c.call(l, d)
65
+ };
66
+ } catch (S) {
67
+ return {
68
+ type: "throw",
69
+ arg: S
70
+ };
71
+ }
72
+ }
73
+ r.wrap = s;
74
+ var y = {};
75
+ function M() {
76
+ }
77
+ function T() {
78
+ }
79
+ function w() {
80
+ }
81
+ var N = {};
82
+ h(N, a, function() {
83
+ return this;
84
+ });
85
+ var A = Object.getPrototypeOf, j = A && A(A(x([])));
86
+ j && j !== t && e.call(j, a) && (N = j);
87
+ var m = w.prototype = M.prototype = Object.create(N);
88
+ function p(c) {
89
+ ["next", "throw", "return"].forEach(function(l) {
90
+ h(c, l, function(d) {
91
+ return this._invoke(l, d);
92
+ });
93
+ });
94
+ }
95
+ function f(c, l) {
96
+ function d(k, O, R, $) {
97
+ var V = g(c[k], c, O);
98
+ if (V.type !== "throw") {
99
+ var ne = V.arg, ce = ne.value;
100
+ return ce && typeof ce == "object" && e.call(ce, "__await") ? l.resolve(ce.__await).then(function(Y) {
101
+ d("next", Y, R, $);
102
+ }, function(Y) {
103
+ d("throw", Y, R, $);
104
+ }) : l.resolve(ce).then(function(Y) {
105
+ ne.value = Y, R(ne);
106
+ }, function(Y) {
107
+ return d("throw", Y, R, $);
108
+ });
109
+ }
110
+ $(V.arg);
111
+ }
112
+ var S;
113
+ n(this, "_invoke", {
114
+ value: function(k, O) {
115
+ function R() {
116
+ return new l(function($, V) {
117
+ d(k, O, $, V);
118
+ });
119
+ }
120
+ return S = S ? S.then(R, R) : R();
121
+ }
122
+ });
123
+ }
124
+ function v(c, l, d) {
125
+ var S = "suspendedStart";
126
+ return function(k, O) {
127
+ if (S === "executing") throw new Error("Generator is already running");
128
+ if (S === "completed") {
129
+ if (k === "throw") throw O;
130
+ return Te();
131
+ }
132
+ for (d.method = k, d.arg = O; ; ) {
133
+ var R = d.delegate;
134
+ if (R) {
135
+ var $ = E(R, d);
136
+ if ($) {
137
+ if ($ === y) continue;
138
+ return $;
139
+ }
140
+ }
141
+ if (d.method === "next") d.sent = d._sent = d.arg;
142
+ else if (d.method === "throw") {
143
+ if (S === "suspendedStart") throw S = "completed", d.arg;
144
+ d.dispatchException(d.arg);
145
+ } else d.method === "return" && d.abrupt("return", d.arg);
146
+ S = "executing";
147
+ var V = g(c, l, d);
148
+ if (V.type === "normal") {
149
+ if (S = d.done ? "completed" : "suspendedYield", V.arg === y) continue;
150
+ return {
151
+ value: V.arg,
152
+ done: d.done
153
+ };
154
+ }
155
+ V.type === "throw" && (S = "completed", d.method = "throw", d.arg = V.arg);
156
+ }
157
+ };
158
+ }
159
+ function E(c, l) {
160
+ var d = l.method, S = c.iterator[d];
161
+ if (S === void 0) return l.delegate = null, d === "throw" && c.iterator.return && (l.method = "return", l.arg = void 0, E(c, l), l.method === "throw") || d !== "return" && (l.method = "throw", l.arg = new TypeError("The iterator does not provide a '" + d + "' method")), y;
162
+ var k = g(S, c.iterator, l.arg);
163
+ if (k.type === "throw") return l.method = "throw", l.arg = k.arg, l.delegate = null, y;
164
+ var O = k.arg;
165
+ return O ? O.done ? (l[c.resultName] = O.value, l.next = c.nextLoc, l.method !== "return" && (l.method = "next", l.arg = void 0), l.delegate = null, y) : O : (l.method = "throw", l.arg = new TypeError("iterator result is not an object"), l.delegate = null, y);
166
+ }
167
+ function C(c) {
168
+ var l = {
169
+ tryLoc: c[0]
170
+ };
171
+ 1 in c && (l.catchLoc = c[1]), 2 in c && (l.finallyLoc = c[2], l.afterLoc = c[3]), this.tryEntries.push(l);
172
+ }
173
+ function b(c) {
174
+ var l = c.completion || {};
175
+ l.type = "normal", delete l.arg, c.completion = l;
176
+ }
177
+ function D(c) {
178
+ this.tryEntries = [{
179
+ tryLoc: "root"
180
+ }], c.forEach(C, this), this.reset(!0);
181
+ }
182
+ function x(c) {
183
+ if (c) {
184
+ var l = c[a];
185
+ if (l) return l.call(c);
186
+ if (typeof c.next == "function") return c;
187
+ if (!isNaN(c.length)) {
188
+ var d = -1, S = function k() {
189
+ for (; ++d < c.length; ) if (e.call(c, d)) return k.value = c[d], k.done = !1, k;
190
+ return k.value = void 0, k.done = !0, k;
191
+ };
192
+ return S.next = S;
193
+ }
194
+ }
195
+ return {
196
+ next: Te
197
+ };
198
+ }
199
+ function Te() {
200
+ return {
201
+ value: void 0,
202
+ done: !0
203
+ };
204
+ }
205
+ return T.prototype = w, n(m, "constructor", {
206
+ value: w,
207
+ configurable: !0
208
+ }), n(w, "constructor", {
209
+ value: T,
210
+ configurable: !0
211
+ }), T.displayName = h(w, u, "GeneratorFunction"), r.isGeneratorFunction = function(c) {
212
+ var l = typeof c == "function" && c.constructor;
213
+ return !!l && (l === T || (l.displayName || l.name) === "GeneratorFunction");
214
+ }, r.mark = function(c) {
215
+ return Object.setPrototypeOf ? Object.setPrototypeOf(c, w) : (c.__proto__ = w, h(c, u, "GeneratorFunction")), c.prototype = Object.create(m), c;
216
+ }, r.awrap = function(c) {
217
+ return {
218
+ __await: c
219
+ };
220
+ }, p(f.prototype), h(f.prototype, o, function() {
221
+ return this;
222
+ }), r.AsyncIterator = f, r.async = function(c, l, d, S, k) {
223
+ k === void 0 && (k = Promise);
224
+ var O = new f(s(c, l, d, S), k);
225
+ return r.isGeneratorFunction(l) ? O : O.next().then(function(R) {
226
+ return R.done ? R.value : O.next();
227
+ });
228
+ }, p(m), h(m, u, "Generator"), h(m, a, function() {
229
+ return this;
230
+ }), h(m, "toString", function() {
231
+ return "[object Generator]";
232
+ }), r.keys = function(c) {
233
+ var l = Object(c), d = [];
234
+ for (var S in l) d.push(S);
235
+ return d.reverse(), function k() {
236
+ for (; d.length; ) {
237
+ var O = d.pop();
238
+ if (O in l) return k.value = O, k.done = !1, k;
239
+ }
240
+ return k.done = !0, k;
241
+ };
242
+ }, r.values = x, D.prototype = {
243
+ constructor: D,
244
+ reset: function(c) {
245
+ if (this.prev = 0, this.next = 0, this.sent = this._sent = void 0, this.done = !1, this.delegate = null, this.method = "next", this.arg = void 0, this.tryEntries.forEach(b), !c) for (var l in this) l.charAt(0) === "t" && e.call(this, l) && !isNaN(+l.slice(1)) && (this[l] = void 0);
246
+ },
247
+ stop: function() {
248
+ this.done = !0;
249
+ var c = this.tryEntries[0].completion;
250
+ if (c.type === "throw") throw c.arg;
251
+ return this.rval;
252
+ },
253
+ dispatchException: function(c) {
254
+ if (this.done) throw c;
255
+ var l = this;
256
+ function d(V, ne) {
257
+ return O.type = "throw", O.arg = c, l.next = V, ne && (l.method = "next", l.arg = void 0), !!ne;
258
+ }
259
+ for (var S = this.tryEntries.length - 1; S >= 0; --S) {
260
+ var k = this.tryEntries[S], O = k.completion;
261
+ if (k.tryLoc === "root") return d("end");
262
+ if (k.tryLoc <= this.prev) {
263
+ var R = e.call(k, "catchLoc"), $ = e.call(k, "finallyLoc");
264
+ if (R && $) {
265
+ if (this.prev < k.catchLoc) return d(k.catchLoc, !0);
266
+ if (this.prev < k.finallyLoc) return d(k.finallyLoc);
267
+ } else if (R) {
268
+ if (this.prev < k.catchLoc) return d(k.catchLoc, !0);
269
+ } else {
270
+ if (!$) throw new Error("try statement without catch or finally");
271
+ if (this.prev < k.finallyLoc) return d(k.finallyLoc);
272
+ }
273
+ }
274
+ }
275
+ },
276
+ abrupt: function(c, l) {
277
+ for (var d = this.tryEntries.length - 1; d >= 0; --d) {
278
+ var S = this.tryEntries[d];
279
+ if (S.tryLoc <= this.prev && e.call(S, "finallyLoc") && this.prev < S.finallyLoc) {
280
+ var k = S;
281
+ break;
282
+ }
283
+ }
284
+ k && (c === "break" || c === "continue") && k.tryLoc <= l && l <= k.finallyLoc && (k = null);
285
+ var O = k ? k.completion : {};
286
+ return O.type = c, O.arg = l, k ? (this.method = "next", this.next = k.finallyLoc, y) : this.complete(O);
287
+ },
288
+ complete: function(c, l) {
289
+ if (c.type === "throw") throw c.arg;
290
+ return c.type === "break" || c.type === "continue" ? this.next = c.arg : c.type === "return" ? (this.rval = this.arg = c.arg, this.method = "return", this.next = "end") : c.type === "normal" && l && (this.next = l), y;
291
+ },
292
+ finish: function(c) {
293
+ for (var l = this.tryEntries.length - 1; l >= 0; --l) {
294
+ var d = this.tryEntries[l];
295
+ if (d.finallyLoc === c) return this.complete(d.completion, d.afterLoc), b(d), y;
296
+ }
297
+ },
298
+ catch: function(c) {
299
+ for (var l = this.tryEntries.length - 1; l >= 0; --l) {
300
+ var d = this.tryEntries[l];
301
+ if (d.tryLoc === c) {
302
+ var S = d.completion;
303
+ if (S.type === "throw") {
304
+ var k = S.arg;
305
+ b(d);
306
+ }
307
+ return k;
308
+ }
309
+ }
310
+ throw new Error("illegal catch attempt");
311
+ },
312
+ delegateYield: function(c, l, d) {
313
+ return this.delegate = {
314
+ iterator: x(c),
315
+ resultName: l,
316
+ nextLoc: d
317
+ }, this.method === "next" && (this.arg = void 0), y;
318
+ }
319
+ }, r;
320
+ }
321
+ function Fe(r, t, e, n, i, a, o) {
322
+ try {
323
+ var u = r[a](o), h = u.value;
324
+ } catch (s) {
325
+ e(s);
326
+ return;
327
+ }
328
+ u.done ? t(h) : Promise.resolve(h).then(n, i);
329
+ }
330
+ function X(r) {
331
+ return function() {
332
+ var t = this, e = arguments;
333
+ return new Promise(function(n, i) {
334
+ var a = r.apply(t, e);
335
+ function o(h) {
336
+ Fe(a, n, i, o, u, "next", h);
337
+ }
338
+ function u(h) {
339
+ Fe(a, n, i, o, u, "throw", h);
340
+ }
341
+ o(void 0);
342
+ });
343
+ };
344
+ }
345
+ function Be(r, t) {
346
+ if (!(r instanceof t))
347
+ throw new TypeError("Cannot call a class as a function");
348
+ }
349
+ function ot(r, t) {
350
+ for (var e = 0; e < t.length; e++) {
351
+ var n = t[e];
352
+ n.enumerable = n.enumerable || !1, n.configurable = !0, "value" in n && (n.writable = !0), Object.defineProperty(r, Qe(n.key), n);
353
+ }
354
+ }
355
+ function Ge(r, t, e) {
356
+ return t && ot(r.prototype, t), Object.defineProperty(r, "prototype", {
357
+ writable: !1
358
+ }), r;
359
+ }
360
+ function ge(r, t, e) {
361
+ return t = Qe(t), t in r ? Object.defineProperty(r, t, {
362
+ value: e,
363
+ enumerable: !0,
364
+ configurable: !0,
365
+ writable: !0
366
+ }) : r[t] = e, r;
367
+ }
368
+ function ut(r, t) {
369
+ if (typeof t != "function" && t !== null)
370
+ throw new TypeError("Super expression must either be null or a function");
371
+ r.prototype = Object.create(t && t.prototype, {
372
+ constructor: {
373
+ value: r,
374
+ writable: !0,
375
+ configurable: !0
376
+ }
377
+ }), Object.defineProperty(r, "prototype", {
378
+ writable: !1
379
+ }), t && ve(r, t);
380
+ }
381
+ function pe(r) {
382
+ return pe = Object.setPrototypeOf ? Object.getPrototypeOf.bind() : function(e) {
383
+ return e.__proto__ || Object.getPrototypeOf(e);
384
+ }, pe(r);
385
+ }
386
+ function ve(r, t) {
387
+ return ve = Object.setPrototypeOf ? Object.setPrototypeOf.bind() : function(n, i) {
388
+ return n.__proto__ = i, n;
389
+ }, ve(r, t);
390
+ }
391
+ function Ue() {
392
+ if (typeof Reflect > "u" || !Reflect.construct || Reflect.construct.sham) return !1;
393
+ if (typeof Proxy == "function") return !0;
394
+ try {
395
+ return Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function() {
396
+ })), !0;
397
+ } catch {
398
+ return !1;
399
+ }
400
+ }
401
+ function ye(r, t, e) {
402
+ return Ue() ? ye = Reflect.construct.bind() : ye = function(i, a, o) {
403
+ var u = [null];
404
+ u.push.apply(u, a);
405
+ var h = Function.bind.apply(i, u), s = new h();
406
+ return o && ve(s, o.prototype), s;
407
+ }, ye.apply(null, arguments);
408
+ }
409
+ function st(r) {
410
+ return Function.toString.call(r).indexOf("[native code]") !== -1;
411
+ }
412
+ function _e(r) {
413
+ var t = typeof Map == "function" ? /* @__PURE__ */ new Map() : void 0;
414
+ return _e = function(n) {
415
+ if (n === null || !st(n)) return n;
416
+ if (typeof n != "function")
417
+ throw new TypeError("Super expression must either be null or a function");
418
+ if (typeof t < "u") {
419
+ if (t.has(n)) return t.get(n);
420
+ t.set(n, i);
421
+ }
422
+ function i() {
423
+ return ye(n, arguments, pe(this).constructor);
424
+ }
425
+ return i.prototype = Object.create(n.prototype, {
426
+ constructor: {
427
+ value: i,
428
+ enumerable: !1,
429
+ writable: !0,
430
+ configurable: !0
431
+ }
432
+ }), ve(i, n);
433
+ }, _e(r);
434
+ }
435
+ function we(r) {
436
+ if (r === void 0)
437
+ throw new ReferenceError("this hasn't been initialised - super() hasn't been called");
438
+ return r;
439
+ }
440
+ function lt(r, t) {
441
+ if (t && (typeof t == "object" || typeof t == "function"))
442
+ return t;
443
+ if (t !== void 0)
444
+ throw new TypeError("Derived constructors may only return object or undefined");
445
+ return we(r);
446
+ }
447
+ function ct(r) {
448
+ var t = Ue();
449
+ return function() {
450
+ var n = pe(r), i;
451
+ if (t) {
452
+ var a = pe(this).constructor;
453
+ i = Reflect.construct(n, arguments, a);
454
+ } else
455
+ i = n.apply(this, arguments);
456
+ return lt(this, i);
457
+ };
458
+ }
459
+ function ft(r, t) {
460
+ if (typeof r != "object" || r === null) return r;
461
+ var e = r[Symbol.toPrimitive];
462
+ if (e !== void 0) {
463
+ var n = e.call(r, t);
464
+ if (typeof n != "object") return n;
465
+ throw new TypeError("@@toPrimitive must return a primitive value.");
466
+ }
467
+ return String(r);
468
+ }
469
+ function Qe(r) {
470
+ var t = ft(r, "string");
471
+ return typeof t == "symbol" ? t : String(t);
472
+ }
473
+ var Ye = typeof global < "u" && {}.toString.call(global) === "[object global]";
474
+ function qe(r, t) {
475
+ return r.indexOf(t.toLowerCase()) === 0 ? r : "".concat(t.toLowerCase()).concat(r.substr(0, 1).toUpperCase()).concat(r.substr(1));
476
+ }
477
+ function ht(r) {
478
+ return !!(r && r.nodeType === 1 && "nodeName" in r && r.ownerDocument && r.ownerDocument.defaultView);
479
+ }
480
+ function dt(r) {
481
+ return !isNaN(parseFloat(r)) && isFinite(r) && Math.floor(r) == r;
482
+ }
483
+ function re(r) {
484
+ return /^(https?:)?\/\/((((player|www)\.)?vimeo\.com)|((player\.)?[a-zA-Z0-9-]+\.(videoji\.(hk|cn)|vimeo\.work)))(?=$|\/)/.test(r);
485
+ }
486
+ function Je(r) {
487
+ var t = /^https:\/\/player\.((vimeo\.com)|([a-zA-Z0-9-]+\.(videoji\.(hk|cn)|vimeo\.work)))\/video\/\d+/;
488
+ return t.test(r);
489
+ }
490
+ function pt(r) {
491
+ for (var t = (r || "").match(/^(?:https?:)?(?:\/\/)?([^/?]+)/), e = (t && t[1] || "").replace("player.", ""), n = [".videoji.hk", ".vimeo.work", ".videoji.cn"], i = 0, a = n; i < a.length; i++) {
492
+ var o = a[i];
493
+ if (e.endsWith(o))
494
+ return e;
495
+ }
496
+ return "vimeo.com";
497
+ }
498
+ function Xe() {
499
+ var r = arguments.length > 0 && arguments[0] !== void 0 ? arguments[0] : {}, t = r.id, e = r.url, n = t || e;
500
+ if (!n)
501
+ throw new Error("An id or url must be passed, either in an options object or as a data-vimeo-id or data-vimeo-url attribute.");
502
+ if (dt(n))
503
+ return "https://vimeo.com/".concat(n);
504
+ if (re(n))
505
+ return n.replace("http:", "https:");
506
+ throw t ? new TypeError("“".concat(t, "” is not a valid video id.")) : new TypeError("“".concat(n, "” is not a vimeo.com url."));
507
+ }
508
+ var De = function(t, e, n) {
509
+ var i = arguments.length > 3 && arguments[3] !== void 0 ? arguments[3] : "addEventListener", a = arguments.length > 4 && arguments[4] !== void 0 ? arguments[4] : "removeEventListener", o = typeof e == "string" ? [e] : e;
510
+ return o.forEach(function(u) {
511
+ t[i](u, n);
512
+ }), {
513
+ cancel: function() {
514
+ return o.forEach(function(h) {
515
+ return t[a](h, n);
516
+ });
517
+ }
518
+ };
519
+ }, vt = typeof Array.prototype.indexOf < "u", mt = typeof window < "u" && typeof window.postMessage < "u";
520
+ if (!Ye && (!vt || !mt))
521
+ throw new Error("Sorry, the Vimeo Player API is not available in this browser.");
522
+ var ae = typeof globalThis < "u" ? globalThis : typeof window < "u" ? window : typeof global < "u" ? global : typeof self < "u" ? self : {};
523
+ function gt(r, t) {
524
+ return t = { exports: {} }, r(t, t.exports), t.exports;
525
+ }
526
+ /*!
527
+ * weakmap-polyfill v2.0.4 - ECMAScript6 WeakMap polyfill
528
+ * https://github.com/polygonplanet/weakmap-polyfill
529
+ * Copyright (c) 2015-2021 polygonplanet <polygon.planet.aqua@gmail.com>
530
+ * @license MIT
531
+ */
532
+ (function(r) {
533
+ if (r.WeakMap)
534
+ return;
535
+ var t = Object.prototype.hasOwnProperty, e = Object.defineProperty && (function() {
536
+ try {
537
+ return Object.defineProperty({}, "x", {
538
+ value: 1
539
+ }).x === 1;
540
+ } catch {
541
+ }
542
+ })(), n = function(a, o, u) {
543
+ e ? Object.defineProperty(a, o, {
544
+ configurable: !0,
545
+ writable: !0,
546
+ value: u
547
+ }) : a[o] = u;
548
+ };
549
+ r.WeakMap = (function() {
550
+ function a() {
551
+ if (this === void 0)
552
+ throw new TypeError("Constructor WeakMap requires 'new'");
553
+ if (n(this, "_id", u("_WeakMap")), arguments.length > 0)
554
+ throw new TypeError("WeakMap iterable is not supported");
555
+ }
556
+ n(a.prototype, "delete", function(s) {
557
+ if (o(this, "delete"), !i(s))
558
+ return !1;
559
+ var g = s[this._id];
560
+ return g && g[0] === s ? (delete s[this._id], !0) : !1;
561
+ }), n(a.prototype, "get", function(s) {
562
+ if (o(this, "get"), !!i(s)) {
563
+ var g = s[this._id];
564
+ if (g && g[0] === s)
565
+ return g[1];
566
+ }
567
+ }), n(a.prototype, "has", function(s) {
568
+ if (o(this, "has"), !i(s))
569
+ return !1;
570
+ var g = s[this._id];
571
+ return !!(g && g[0] === s);
572
+ }), n(a.prototype, "set", function(s, g) {
573
+ if (o(this, "set"), !i(s))
574
+ throw new TypeError("Invalid value used as weak map key");
575
+ var y = s[this._id];
576
+ return y && y[0] === s ? (y[1] = g, this) : (n(s, this._id, [s, g]), this);
577
+ });
578
+ function o(s, g) {
579
+ if (!i(s) || !t.call(s, "_id"))
580
+ throw new TypeError(g + " method called on incompatible receiver " + typeof s);
581
+ }
582
+ function u(s) {
583
+ return s + "_" + h() + "." + h();
584
+ }
585
+ function h() {
586
+ return Math.random().toString().substring(2);
587
+ }
588
+ return n(a, "_polyfill", !0), a;
589
+ })();
590
+ function i(a) {
591
+ return Object(a) === a;
592
+ }
593
+ })(typeof globalThis < "u" ? globalThis : typeof self < "u" ? self : typeof window < "u" ? window : ae);
594
+ var W = gt(function(r) {
595
+ /*! Native Promise Only
596
+ v0.8.1 (c) Kyle Simpson
597
+ MIT License: http://getify.mit-license.org
598
+ */
599
+ (function(e, n, i) {
600
+ n[e] = n[e] || i(), r.exports && (r.exports = n[e]);
601
+ })("Promise", ae, function() {
602
+ var e, n, i, a = Object.prototype.toString, o = typeof setImmediate < "u" ? function(p) {
603
+ return setImmediate(p);
604
+ } : setTimeout;
605
+ try {
606
+ Object.defineProperty({}, "x", {}), e = function(p, f, v, E) {
607
+ return Object.defineProperty(p, f, {
608
+ value: v,
609
+ writable: !0,
610
+ configurable: E !== !1
611
+ });
612
+ };
613
+ } catch {
614
+ e = function(f, v, E) {
615
+ return f[v] = E, f;
616
+ };
617
+ }
618
+ i = /* @__PURE__ */ (function() {
619
+ var p, f, v;
620
+ function E(C, b) {
621
+ this.fn = C, this.self = b, this.next = void 0;
622
+ }
623
+ return {
624
+ add: function(b, D) {
625
+ v = new E(b, D), f ? f.next = v : p = v, f = v, v = void 0;
626
+ },
627
+ drain: function() {
628
+ var b = p;
629
+ for (p = f = n = void 0; b; )
630
+ b.fn.call(b.self), b = b.next;
631
+ }
632
+ };
633
+ })();
634
+ function u(m, p) {
635
+ i.add(m, p), n || (n = o(i.drain));
636
+ }
637
+ function h(m) {
638
+ var p, f = typeof m;
639
+ return m != null && (f == "object" || f == "function") && (p = m.then), typeof p == "function" ? p : !1;
640
+ }
641
+ function s() {
642
+ for (var m = 0; m < this.chain.length; m++)
643
+ g(this, this.state === 1 ? this.chain[m].success : this.chain[m].failure, this.chain[m]);
644
+ this.chain.length = 0;
645
+ }
646
+ function g(m, p, f) {
647
+ var v, E;
648
+ try {
649
+ p === !1 ? f.reject(m.msg) : (p === !0 ? v = m.msg : v = p.call(void 0, m.msg), v === f.promise ? f.reject(TypeError("Promise-chain cycle")) : (E = h(v)) ? E.call(v, f.resolve, f.reject) : f.resolve(v));
650
+ } catch (C) {
651
+ f.reject(C);
652
+ }
653
+ }
654
+ function y(m) {
655
+ var p, f = this;
656
+ if (!f.triggered) {
657
+ f.triggered = !0, f.def && (f = f.def);
658
+ try {
659
+ (p = h(m)) ? u(function() {
660
+ var v = new w(f);
661
+ try {
662
+ p.call(m, function() {
663
+ y.apply(v, arguments);
664
+ }, function() {
665
+ M.apply(v, arguments);
666
+ });
667
+ } catch (E) {
668
+ M.call(v, E);
669
+ }
670
+ }) : (f.msg = m, f.state = 1, f.chain.length > 0 && u(s, f));
671
+ } catch (v) {
672
+ M.call(new w(f), v);
673
+ }
674
+ }
675
+ }
676
+ function M(m) {
677
+ var p = this;
678
+ p.triggered || (p.triggered = !0, p.def && (p = p.def), p.msg = m, p.state = 2, p.chain.length > 0 && u(s, p));
679
+ }
680
+ function T(m, p, f, v) {
681
+ for (var E = 0; E < p.length; E++)
682
+ (function(b) {
683
+ m.resolve(p[b]).then(function(x) {
684
+ f(b, x);
685
+ }, v);
686
+ })(E);
687
+ }
688
+ function w(m) {
689
+ this.def = m, this.triggered = !1;
690
+ }
691
+ function N(m) {
692
+ this.promise = m, this.state = 0, this.triggered = !1, this.chain = [], this.msg = void 0;
693
+ }
694
+ function A(m) {
695
+ if (typeof m != "function")
696
+ throw TypeError("Not a function");
697
+ if (this.__NPO__ !== 0)
698
+ throw TypeError("Not a promise");
699
+ this.__NPO__ = 1;
700
+ var p = new N(this);
701
+ this.then = function(v, E) {
702
+ var C = {
703
+ success: typeof v == "function" ? v : !0,
704
+ failure: typeof E == "function" ? E : !1
705
+ };
706
+ return C.promise = new this.constructor(function(D, x) {
707
+ if (typeof D != "function" || typeof x != "function")
708
+ throw TypeError("Not a function");
709
+ C.resolve = D, C.reject = x;
710
+ }), p.chain.push(C), p.state !== 0 && u(s, p), C.promise;
711
+ }, this.catch = function(v) {
712
+ return this.then(void 0, v);
713
+ };
714
+ try {
715
+ m.call(void 0, function(v) {
716
+ y.call(p, v);
717
+ }, function(v) {
718
+ M.call(p, v);
719
+ });
720
+ } catch (f) {
721
+ M.call(p, f);
722
+ }
723
+ }
724
+ var j = e(
725
+ {},
726
+ "constructor",
727
+ A,
728
+ /*configurable=*/
729
+ !1
730
+ );
731
+ return A.prototype = j, e(
732
+ j,
733
+ "__NPO__",
734
+ 0,
735
+ /*configurable=*/
736
+ !1
737
+ ), e(A, "resolve", function(p) {
738
+ var f = this;
739
+ return p && typeof p == "object" && p.__NPO__ === 1 ? p : new f(function(E, C) {
740
+ if (typeof E != "function" || typeof C != "function")
741
+ throw TypeError("Not a function");
742
+ E(p);
743
+ });
744
+ }), e(A, "reject", function(p) {
745
+ return new this(function(v, E) {
746
+ if (typeof v != "function" || typeof E != "function")
747
+ throw TypeError("Not a function");
748
+ E(p);
749
+ });
750
+ }), e(A, "all", function(p) {
751
+ var f = this;
752
+ return a.call(p) != "[object Array]" ? f.reject(TypeError("Not an array")) : p.length === 0 ? f.resolve([]) : new f(function(E, C) {
753
+ if (typeof E != "function" || typeof C != "function")
754
+ throw TypeError("Not a function");
755
+ var b = p.length, D = Array(b), x = 0;
756
+ T(f, p, function(c, l) {
757
+ D[c] = l, ++x === b && E(D);
758
+ }, C);
759
+ });
760
+ }), e(A, "race", function(p) {
761
+ var f = this;
762
+ return a.call(p) != "[object Array]" ? f.reject(TypeError("Not an array")) : new f(function(E, C) {
763
+ if (typeof E != "function" || typeof C != "function")
764
+ throw TypeError("Not a function");
765
+ T(f, p, function(D, x) {
766
+ E(x);
767
+ }, C);
768
+ });
769
+ }), A;
770
+ });
771
+ }), H = /* @__PURE__ */ new WeakMap();
772
+ function he(r, t, e) {
773
+ var n = H.get(r.element) || {};
774
+ t in n || (n[t] = []), n[t].push(e), H.set(r.element, n);
775
+ }
776
+ function be(r, t) {
777
+ var e = H.get(r.element) || {};
778
+ return e[t] || [];
779
+ }
780
+ function ke(r, t, e) {
781
+ var n = H.get(r.element) || {};
782
+ if (!n[t])
783
+ return !0;
784
+ if (!e)
785
+ return n[t] = [], H.set(r.element, n), !0;
786
+ var i = n[t].indexOf(e);
787
+ return i !== -1 && n[t].splice(i, 1), H.set(r.element, n), n[t] && n[t].length === 0;
788
+ }
789
+ function yt(r, t) {
790
+ var e = be(r, t);
791
+ if (e.length < 1)
792
+ return !1;
793
+ var n = e.shift();
794
+ return ke(r, t, n), n;
795
+ }
796
+ function wt(r, t) {
797
+ var e = H.get(r);
798
+ H.set(t, e), H.delete(r);
799
+ }
800
+ function Pe(r) {
801
+ if (typeof r == "string")
802
+ try {
803
+ r = JSON.parse(r);
804
+ } catch (t) {
805
+ return console.warn(t), {};
806
+ }
807
+ return r;
808
+ }
809
+ function J(r, t, e) {
810
+ if (!(!r.element.contentWindow || !r.element.contentWindow.postMessage)) {
811
+ var n = {
812
+ method: t
813
+ };
814
+ e !== void 0 && (n.value = e);
815
+ var i = parseFloat(navigator.userAgent.toLowerCase().replace(/^.*msie (\d+).*$/, "$1"));
816
+ i >= 8 && i < 10 && (n = JSON.stringify(n)), r.element.contentWindow.postMessage(n, r.origin);
817
+ }
818
+ }
819
+ function bt(r, t) {
820
+ t = Pe(t);
821
+ var e = [], n;
822
+ if (t.event) {
823
+ if (t.event === "error") {
824
+ var i = be(r, t.data.method);
825
+ i.forEach(function(o) {
826
+ var u = new Error(t.data.message);
827
+ u.name = t.data.name, o.reject(u), ke(r, t.data.method, o);
828
+ });
829
+ }
830
+ e = be(r, "event:".concat(t.event)), n = t.data;
831
+ } else if (t.method) {
832
+ var a = yt(r, t.method);
833
+ a && (e.push(a), n = t.value);
834
+ }
835
+ e.forEach(function(o) {
836
+ try {
837
+ if (typeof o == "function") {
838
+ o.call(r, n);
839
+ return;
840
+ }
841
+ o.resolve(n);
842
+ } catch {
843
+ }
844
+ });
845
+ }
846
+ var kt = ["airplay", "audio_tracks", "audiotrack", "autopause", "autoplay", "background", "byline", "cc", "chapter_id", "chapters", "chromecast", "color", "colors", "controls", "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"];
847
+ function Ke(r) {
848
+ var t = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : {};
849
+ return kt.reduce(function(e, n) {
850
+ var i = r.getAttribute("data-vimeo-".concat(n));
851
+ return (i || i === "") && (e[n] = i === "" ? 1 : i), e;
852
+ }, t);
853
+ }
854
+ function Ae(r, t) {
855
+ var e = r.html;
856
+ if (!t)
857
+ throw new TypeError("An element must be provided");
858
+ if (t.getAttribute("data-vimeo-initialized") !== null)
859
+ return t.querySelector("iframe");
860
+ var n = document.createElement("div");
861
+ return n.innerHTML = e, t.appendChild(n.firstChild), t.setAttribute("data-vimeo-initialized", "true"), t.querySelector("iframe");
862
+ }
863
+ function Ze(r) {
864
+ var t = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : {}, e = arguments.length > 2 ? arguments[2] : void 0;
865
+ return new Promise(function(n, i) {
866
+ if (!re(r))
867
+ throw new TypeError("“".concat(r, "” is not a vimeo.com url."));
868
+ var a = pt(r), o = "https://".concat(a, "/api/oembed.json?url=").concat(encodeURIComponent(r));
869
+ for (var u in t)
870
+ t.hasOwnProperty(u) && (o += "&".concat(u, "=").concat(encodeURIComponent(t[u])));
871
+ var h = "XDomainRequest" in window ? new XDomainRequest() : new XMLHttpRequest();
872
+ h.open("GET", o, !0), h.onload = function() {
873
+ if (h.status === 404) {
874
+ i(new Error("“".concat(r, "” was not found.")));
875
+ return;
876
+ }
877
+ if (h.status === 403) {
878
+ i(new Error("“".concat(r, "” is not embeddable.")));
879
+ return;
880
+ }
881
+ try {
882
+ var s = JSON.parse(h.responseText);
883
+ if (s.domain_status_code === 403) {
884
+ Ae(s, e), i(new Error("“".concat(r, "” is not embeddable.")));
885
+ return;
886
+ }
887
+ n(s);
888
+ } catch (g) {
889
+ i(g);
890
+ }
891
+ }, h.onerror = function() {
892
+ var s = h.status ? " (".concat(h.status, ")") : "";
893
+ i(new Error("There was an error fetching the embed code from Vimeo".concat(s, ".")));
894
+ }, h.send();
895
+ });
896
+ }
897
+ function Et() {
898
+ var r = arguments.length > 0 && arguments[0] !== void 0 ? arguments[0] : document, t = [].slice.call(r.querySelectorAll("[data-vimeo-id], [data-vimeo-url]")), e = function(i) {
899
+ "console" in window && console.error && console.error("There was an error creating an embed: ".concat(i));
900
+ };
901
+ t.forEach(function(n) {
902
+ try {
903
+ if (n.getAttribute("data-vimeo-defer") !== null)
904
+ return;
905
+ var i = Ke(n), a = Xe(i);
906
+ Ze(a, i, n).then(function(o) {
907
+ return Ae(o, n);
908
+ }).catch(e);
909
+ } catch (o) {
910
+ e(o);
911
+ }
912
+ });
913
+ }
914
+ function Pt() {
915
+ var r = arguments.length > 0 && arguments[0] !== void 0 ? arguments[0] : document;
916
+ if (!window.VimeoPlayerResizeEmbeds_) {
917
+ window.VimeoPlayerResizeEmbeds_ = !0;
918
+ var t = function(n) {
919
+ if (re(n.origin) && !(!n.data || n.data.event !== "spacechange")) {
920
+ for (var i = r.querySelectorAll("iframe"), a = 0; a < i.length; a++)
921
+ if (i[a].contentWindow === n.source) {
922
+ var o = i[a].parentElement;
923
+ o.style.paddingBottom = "".concat(n.data.data[0].bottom, "px");
924
+ break;
925
+ }
926
+ }
927
+ };
928
+ window.addEventListener("message", t);
929
+ }
930
+ }
931
+ function Tt() {
932
+ var r = arguments.length > 0 && arguments[0] !== void 0 ? arguments[0] : document;
933
+ if (!window.VimeoSeoMetadataAppended) {
934
+ window.VimeoSeoMetadataAppended = !0;
935
+ var t = function(n) {
936
+ if (re(n.origin)) {
937
+ var i = Pe(n.data);
938
+ if (!(!i || i.event !== "ready"))
939
+ for (var a = r.querySelectorAll("iframe"), o = 0; o < a.length; o++) {
940
+ var u = a[o], h = u.contentWindow === n.source;
941
+ if (Je(u.src) && h) {
942
+ var s = new Ne(u);
943
+ s.callMethod("appendVideoMetadata", window.location.href);
944
+ }
945
+ }
946
+ }
947
+ };
948
+ window.addEventListener("message", t);
949
+ }
950
+ }
951
+ function Mt() {
952
+ var r = arguments.length > 0 && arguments[0] !== void 0 ? arguments[0] : document;
953
+ if (!window.VimeoCheckedUrlTimeParam) {
954
+ window.VimeoCheckedUrlTimeParam = !0;
955
+ var t = function(i) {
956
+ "console" in window && console.error && console.error("There was an error getting video Id: ".concat(i));
957
+ }, e = function(i) {
958
+ if (re(i.origin)) {
959
+ var a = Pe(i.data);
960
+ if (!(!a || a.event !== "ready"))
961
+ for (var o = r.querySelectorAll("iframe"), u = function() {
962
+ var g = o[h], y = g.contentWindow === i.source;
963
+ if (Je(g.src) && y) {
964
+ var M = new Ne(g);
965
+ M.getVideoId().then(function(T) {
966
+ var w = new RegExp("[?&]vimeo_t_".concat(T, "=([^&#]*)")).exec(window.location.href);
967
+ if (w && w[1]) {
968
+ var N = decodeURI(w[1]);
969
+ M.setCurrentTime(N);
970
+ }
971
+ }).catch(t);
972
+ }
973
+ }, h = 0; h < o.length; h++)
974
+ u();
975
+ }
976
+ };
977
+ window.addEventListener("message", e);
978
+ }
979
+ }
980
+ function St() {
981
+ var r = (function() {
982
+ for (var n, i = [
983
+ ["requestFullscreen", "exitFullscreen", "fullscreenElement", "fullscreenEnabled", "fullscreenchange", "fullscreenerror"],
984
+ // New WebKit
985
+ ["webkitRequestFullscreen", "webkitExitFullscreen", "webkitFullscreenElement", "webkitFullscreenEnabled", "webkitfullscreenchange", "webkitfullscreenerror"],
986
+ // Old WebKit
987
+ ["webkitRequestFullScreen", "webkitCancelFullScreen", "webkitCurrentFullScreenElement", "webkitCancelFullScreen", "webkitfullscreenchange", "webkitfullscreenerror"],
988
+ ["mozRequestFullScreen", "mozCancelFullScreen", "mozFullScreenElement", "mozFullScreenEnabled", "mozfullscreenchange", "mozfullscreenerror"],
989
+ ["msRequestFullscreen", "msExitFullscreen", "msFullscreenElement", "msFullscreenEnabled", "MSFullscreenChange", "MSFullscreenError"]
990
+ ], a = 0, o = i.length, u = {}; a < o; a++)
991
+ if (n = i[a], n && n[1] in document) {
992
+ for (a = 0; a < n.length; a++)
993
+ u[i[0][a]] = n[a];
994
+ return u;
995
+ }
996
+ return !1;
997
+ })(), t = {
998
+ fullscreenchange: r.fullscreenchange,
999
+ fullscreenerror: r.fullscreenerror
1000
+ }, e = {
1001
+ request: function(i) {
1002
+ return new Promise(function(a, o) {
1003
+ var u = function s() {
1004
+ e.off("fullscreenchange", s), a();
1005
+ };
1006
+ e.on("fullscreenchange", u), i = i || document.documentElement;
1007
+ var h = i[r.requestFullscreen]();
1008
+ h instanceof Promise && h.then(u).catch(o);
1009
+ });
1010
+ },
1011
+ exit: function() {
1012
+ return new Promise(function(i, a) {
1013
+ if (!e.isFullscreen) {
1014
+ i();
1015
+ return;
1016
+ }
1017
+ var o = function h() {
1018
+ e.off("fullscreenchange", h), i();
1019
+ };
1020
+ e.on("fullscreenchange", o);
1021
+ var u = document[r.exitFullscreen]();
1022
+ u instanceof Promise && u.then(o).catch(a);
1023
+ });
1024
+ },
1025
+ on: function(i, a) {
1026
+ var o = t[i];
1027
+ o && document.addEventListener(o, a);
1028
+ },
1029
+ off: function(i, a) {
1030
+ var o = t[i];
1031
+ o && document.removeEventListener(o, a);
1032
+ }
1033
+ };
1034
+ return Object.defineProperties(e, {
1035
+ isFullscreen: {
1036
+ get: function() {
1037
+ return !!document[r.fullscreenElement];
1038
+ }
1039
+ },
1040
+ element: {
1041
+ enumerable: !0,
1042
+ get: function() {
1043
+ return document[r.fullscreenElement];
1044
+ }
1045
+ },
1046
+ isEnabled: {
1047
+ enumerable: !0,
1048
+ get: function() {
1049
+ return !!document[r.fullscreenEnabled];
1050
+ }
1051
+ }
1052
+ }), e;
1053
+ }
1054
+ var Ct = {
1055
+ role: "viewer",
1056
+ autoPlayMuted: !0,
1057
+ allowedDrift: 0.3,
1058
+ maxAllowedDrift: 1,
1059
+ minCheckInterval: 0.1,
1060
+ maxRateAdjustment: 0.2,
1061
+ maxTimeToCatchUp: 1
1062
+ }, Ot = /* @__PURE__ */ (function(r) {
1063
+ ut(e, r);
1064
+ var t = ct(e);
1065
+ function e(n, i) {
1066
+ var a, o = arguments.length > 2 && arguments[2] !== void 0 ? arguments[2] : {}, u = arguments.length > 3 ? arguments[3] : void 0;
1067
+ return Be(this, e), a = t.call(this), ge(we(a), "logger", void 0), ge(we(a), "speedAdjustment", 0), ge(we(a), "adjustSpeed", /* @__PURE__ */ (function() {
1068
+ var h = X(/* @__PURE__ */ I().mark(function s(g, y) {
1069
+ var M;
1070
+ return I().wrap(function(w) {
1071
+ for (; ; ) switch (w.prev = w.next) {
1072
+ case 0:
1073
+ if (a.speedAdjustment !== y) {
1074
+ w.next = 2;
1075
+ break;
1076
+ }
1077
+ return w.abrupt("return");
1078
+ case 2:
1079
+ return w.next = 4, g.getPlaybackRate();
1080
+ case 4:
1081
+ return w.t0 = w.sent, w.t1 = a.speedAdjustment, w.t2 = w.t0 - w.t1, w.t3 = y, M = w.t2 + w.t3, a.log("New playbackRate: ".concat(M)), w.next = 12, g.setPlaybackRate(M);
1082
+ case 12:
1083
+ a.speedAdjustment = y;
1084
+ case 13:
1085
+ case "end":
1086
+ return w.stop();
1087
+ }
1088
+ }, s);
1089
+ }));
1090
+ return function(s, g) {
1091
+ return h.apply(this, arguments);
1092
+ };
1093
+ })()), a.logger = u, a.init(i, n, Ie(Ie({}, Ct), o)), a;
1094
+ }
1095
+ return Ge(e, [{
1096
+ key: "disconnect",
1097
+ value: function() {
1098
+ this.dispatchEvent(new Event("disconnect"));
1099
+ }
1100
+ /**
1101
+ * @param {TimingObject} timingObject
1102
+ * @param {PlayerControls} player
1103
+ * @param {TimingSrcConnectorOptions} options
1104
+ * @return {Promise<void>}
1105
+ */
1106
+ }, {
1107
+ key: "init",
1108
+ value: (function() {
1109
+ var n = X(/* @__PURE__ */ I().mark(function a(o, u, h) {
1110
+ var s = this, g, y, M;
1111
+ return I().wrap(function(w) {
1112
+ for (; ; ) switch (w.prev = w.next) {
1113
+ case 0:
1114
+ return w.next = 2, this.waitForTOReadyState(o, "open");
1115
+ case 2:
1116
+ if (h.role !== "viewer") {
1117
+ w.next = 10;
1118
+ break;
1119
+ }
1120
+ return w.next = 5, this.updatePlayer(o, u, h);
1121
+ case 5:
1122
+ g = De(o, "change", function() {
1123
+ return s.updatePlayer(o, u, h);
1124
+ }), y = this.maintainPlaybackPosition(o, u, h), this.addEventListener("disconnect", function() {
1125
+ y.cancel(), g.cancel();
1126
+ }), w.next = 14;
1127
+ break;
1128
+ case 10:
1129
+ return w.next = 12, this.updateTimingObject(o, u);
1130
+ case 12:
1131
+ M = De(u, ["seeked", "play", "pause", "ratechange"], function() {
1132
+ return s.updateTimingObject(o, u);
1133
+ }, "on", "off"), this.addEventListener("disconnect", function() {
1134
+ return M.cancel();
1135
+ });
1136
+ case 14:
1137
+ case "end":
1138
+ return w.stop();
1139
+ }
1140
+ }, a, this);
1141
+ }));
1142
+ function i(a, o, u) {
1143
+ return n.apply(this, arguments);
1144
+ }
1145
+ return i;
1146
+ })()
1147
+ /**
1148
+ * Sets the TimingObject's state to reflect that of the player
1149
+ *
1150
+ * @param {TimingObject} timingObject
1151
+ * @param {PlayerControls} player
1152
+ * @return {Promise<void>}
1153
+ */
1154
+ }, {
1155
+ key: "updateTimingObject",
1156
+ value: (function() {
1157
+ var n = X(/* @__PURE__ */ I().mark(function a(o, u) {
1158
+ return I().wrap(function(s) {
1159
+ for (; ; ) switch (s.prev = s.next) {
1160
+ case 0:
1161
+ return s.t0 = o, s.next = 3, u.getCurrentTime();
1162
+ case 3:
1163
+ return s.t1 = s.sent, s.next = 6, u.getPaused();
1164
+ case 6:
1165
+ if (!s.sent) {
1166
+ s.next = 10;
1167
+ break;
1168
+ }
1169
+ s.t2 = 0, s.next = 13;
1170
+ break;
1171
+ case 10:
1172
+ return s.next = 12, u.getPlaybackRate();
1173
+ case 12:
1174
+ s.t2 = s.sent;
1175
+ case 13:
1176
+ s.t3 = s.t2, s.t4 = {
1177
+ position: s.t1,
1178
+ velocity: s.t3
1179
+ }, s.t0.update.call(s.t0, s.t4);
1180
+ case 16:
1181
+ case "end":
1182
+ return s.stop();
1183
+ }
1184
+ }, a);
1185
+ }));
1186
+ function i(a, o) {
1187
+ return n.apply(this, arguments);
1188
+ }
1189
+ return i;
1190
+ })()
1191
+ /**
1192
+ * Sets the player's timing state to reflect that of the TimingObject
1193
+ *
1194
+ * @param {TimingObject} timingObject
1195
+ * @param {PlayerControls} player
1196
+ * @param {TimingSrcConnectorOptions} options
1197
+ * @return {Promise<void>}
1198
+ */
1199
+ }, {
1200
+ key: "updatePlayer",
1201
+ value: (function() {
1202
+ var n = X(/* @__PURE__ */ I().mark(function a(o, u, h) {
1203
+ var s, g, y;
1204
+ return I().wrap(function(T) {
1205
+ for (; ; ) switch (T.prev = T.next) {
1206
+ case 0:
1207
+ if (s = o.query(), g = s.position, y = s.velocity, typeof g == "number" && u.setCurrentTime(g), typeof y != "number") {
1208
+ T.next = 25;
1209
+ break;
1210
+ }
1211
+ if (y !== 0) {
1212
+ T.next = 11;
1213
+ break;
1214
+ }
1215
+ return T.next = 6, u.getPaused();
1216
+ case 6:
1217
+ if (T.t0 = T.sent, T.t0 !== !1) {
1218
+ T.next = 9;
1219
+ break;
1220
+ }
1221
+ u.pause();
1222
+ case 9:
1223
+ T.next = 25;
1224
+ break;
1225
+ case 11:
1226
+ if (!(y > 0)) {
1227
+ T.next = 25;
1228
+ break;
1229
+ }
1230
+ return T.next = 14, u.getPaused();
1231
+ case 14:
1232
+ if (T.t1 = T.sent, T.t1 !== !0) {
1233
+ T.next = 19;
1234
+ break;
1235
+ }
1236
+ return T.next = 18, u.play().catch(/* @__PURE__ */ (function() {
1237
+ var w = X(/* @__PURE__ */ I().mark(function N(A) {
1238
+ return I().wrap(function(m) {
1239
+ for (; ; ) switch (m.prev = m.next) {
1240
+ case 0:
1241
+ if (!(A.name === "NotAllowedError" && h.autoPlayMuted)) {
1242
+ m.next = 5;
1243
+ break;
1244
+ }
1245
+ return m.next = 3, u.setMuted(!0);
1246
+ case 3:
1247
+ return m.next = 5, u.play().catch(function(p) {
1248
+ return console.error("Couldn't play the video from TimingSrcConnector. Error:", p);
1249
+ });
1250
+ case 5:
1251
+ case "end":
1252
+ return m.stop();
1253
+ }
1254
+ }, N);
1255
+ }));
1256
+ return function(N) {
1257
+ return w.apply(this, arguments);
1258
+ };
1259
+ })());
1260
+ case 18:
1261
+ this.updatePlayer(o, u, h);
1262
+ case 19:
1263
+ return T.next = 21, u.getPlaybackRate();
1264
+ case 21:
1265
+ if (T.t2 = T.sent, T.t3 = y, T.t2 === T.t3) {
1266
+ T.next = 25;
1267
+ break;
1268
+ }
1269
+ u.setPlaybackRate(y);
1270
+ case 25:
1271
+ case "end":
1272
+ return T.stop();
1273
+ }
1274
+ }, a, this);
1275
+ }));
1276
+ function i(a, o, u) {
1277
+ return n.apply(this, arguments);
1278
+ }
1279
+ return i;
1280
+ })()
1281
+ /**
1282
+ * Since video players do not play with 100% time precision, we need to closely monitor
1283
+ * our player to be sure it remains in sync with the TimingObject.
1284
+ *
1285
+ * If out of sync, we use the current conditions and the options provided to determine
1286
+ * whether to re-sync via setting currentTime or adjusting the playbackRate
1287
+ *
1288
+ * @param {TimingObject} timingObject
1289
+ * @param {PlayerControls} player
1290
+ * @param {TimingSrcConnectorOptions} options
1291
+ * @return {{cancel: (function(): void)}}
1292
+ */
1293
+ }, {
1294
+ key: "maintainPlaybackPosition",
1295
+ value: function(i, a, o) {
1296
+ var u = this, h = o.allowedDrift, s = o.maxAllowedDrift, g = o.minCheckInterval, y = o.maxRateAdjustment, M = o.maxTimeToCatchUp, T = Math.min(M, Math.max(g, s)) * 1e3, w = /* @__PURE__ */ (function() {
1297
+ var A = X(/* @__PURE__ */ I().mark(function j() {
1298
+ var m, p, f, v, E;
1299
+ return I().wrap(function(b) {
1300
+ for (; ; ) switch (b.prev = b.next) {
1301
+ case 0:
1302
+ if (b.t0 = i.query().velocity === 0, b.t0) {
1303
+ b.next = 6;
1304
+ break;
1305
+ }
1306
+ return b.next = 4, a.getPaused();
1307
+ case 4:
1308
+ b.t1 = b.sent, b.t0 = b.t1 === !0;
1309
+ case 6:
1310
+ if (!b.t0) {
1311
+ b.next = 8;
1312
+ break;
1313
+ }
1314
+ return b.abrupt("return");
1315
+ case 8:
1316
+ return b.t2 = i.query().position, b.next = 11, a.getCurrentTime();
1317
+ case 11:
1318
+ if (b.t3 = b.sent, m = b.t2 - b.t3, p = Math.abs(m), u.log("Drift: ".concat(m)), !(p > s)) {
1319
+ b.next = 22;
1320
+ break;
1321
+ }
1322
+ return b.next = 18, u.adjustSpeed(a, 0);
1323
+ case 18:
1324
+ a.setCurrentTime(i.query().position), u.log("Resync by currentTime"), b.next = 29;
1325
+ break;
1326
+ case 22:
1327
+ if (!(p > h)) {
1328
+ b.next = 29;
1329
+ break;
1330
+ }
1331
+ return f = p / M, v = y, E = f < v ? (v - f) / 2 : v, b.next = 28, u.adjustSpeed(a, E * Math.sign(m));
1332
+ case 28:
1333
+ u.log("Resync by playbackRate");
1334
+ case 29:
1335
+ case "end":
1336
+ return b.stop();
1337
+ }
1338
+ }, j);
1339
+ }));
1340
+ return function() {
1341
+ return A.apply(this, arguments);
1342
+ };
1343
+ })(), N = setInterval(function() {
1344
+ return w();
1345
+ }, T);
1346
+ return {
1347
+ cancel: function() {
1348
+ return clearInterval(N);
1349
+ }
1350
+ };
1351
+ }
1352
+ /**
1353
+ * @param {string} msg
1354
+ */
1355
+ }, {
1356
+ key: "log",
1357
+ value: function(i) {
1358
+ var a;
1359
+ (a = this.logger) === null || a === void 0 || a.call(this, "TimingSrcConnector: ".concat(i));
1360
+ }
1361
+ }, {
1362
+ key: "waitForTOReadyState",
1363
+ value: (
1364
+ /**
1365
+ * @param {TimingObject} timingObject
1366
+ * @param {TConnectionState} state
1367
+ * @return {Promise<void>}
1368
+ */
1369
+ function(i, a) {
1370
+ return new Promise(function(o) {
1371
+ var u = function h() {
1372
+ i.readyState === a ? o() : i.addEventListener("readystatechange", h, {
1373
+ once: !0
1374
+ });
1375
+ };
1376
+ u();
1377
+ });
1378
+ }
1379
+ )
1380
+ }]), e;
1381
+ })(/* @__PURE__ */ _e(EventTarget)), ie = /* @__PURE__ */ new WeakMap(), Se = /* @__PURE__ */ new WeakMap(), F = {}, Ne = /* @__PURE__ */ (function() {
1382
+ function r(t) {
1383
+ var e = this, n = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : {};
1384
+ if (Be(this, r), window.jQuery && t instanceof jQuery && (t.length > 1 && window.console && console.warn && console.warn("A jQuery object with multiple elements was passed, using the first element."), t = t[0]), typeof document < "u" && typeof t == "string" && (t = document.getElementById(t)), !ht(t))
1385
+ throw new TypeError("You must pass either a valid element or a valid id.");
1386
+ if (t.nodeName !== "IFRAME") {
1387
+ var i = t.querySelector("iframe");
1388
+ i && (t = i);
1389
+ }
1390
+ if (t.nodeName === "IFRAME" && !re(t.getAttribute("src") || ""))
1391
+ throw new Error("The player element passed isn’t a Vimeo embed.");
1392
+ if (ie.has(t))
1393
+ return ie.get(t);
1394
+ this._window = t.ownerDocument.defaultView, this.element = t, this.origin = "*";
1395
+ var a = new W(function(u, h) {
1396
+ if (e._onMessage = function(y) {
1397
+ if (!(!re(y.origin) || e.element.contentWindow !== y.source)) {
1398
+ e.origin === "*" && (e.origin = y.origin);
1399
+ var M = Pe(y.data), T = M && M.event === "error", w = T && M.data && M.data.method === "ready";
1400
+ if (w) {
1401
+ var N = new Error(M.data.message);
1402
+ N.name = M.data.name, h(N);
1403
+ return;
1404
+ }
1405
+ var A = M && M.event === "ready", j = M && M.method === "ping";
1406
+ if (A || j) {
1407
+ e.element.setAttribute("data-ready", "true"), u();
1408
+ return;
1409
+ }
1410
+ bt(e, M);
1411
+ }
1412
+ }, e._window.addEventListener("message", e._onMessage), e.element.nodeName !== "IFRAME") {
1413
+ var s = Ke(t, n), g = Xe(s);
1414
+ Ze(g, s, t).then(function(y) {
1415
+ var M = Ae(y, t);
1416
+ return e.element = M, e._originalElement = t, wt(t, M), ie.set(e.element, e), y;
1417
+ }).catch(h);
1418
+ }
1419
+ });
1420
+ if (Se.set(this, a), ie.set(this.element, this), this.element.nodeName === "IFRAME" && J(this, "ping"), F.isEnabled) {
1421
+ var o = function() {
1422
+ return F.exit();
1423
+ };
1424
+ this.fullscreenchangeHandler = function() {
1425
+ F.isFullscreen ? he(e, "event:exitFullscreen", o) : ke(e, "event:exitFullscreen", o), e.ready().then(function() {
1426
+ J(e, "fullscreenchange", F.isFullscreen);
1427
+ });
1428
+ }, F.on("fullscreenchange", this.fullscreenchangeHandler);
1429
+ }
1430
+ return this;
1431
+ }
1432
+ return Ge(r, [{
1433
+ key: "callMethod",
1434
+ value: function(e) {
1435
+ for (var n = this, i = arguments.length, a = new Array(i > 1 ? i - 1 : 0), o = 1; o < i; o++)
1436
+ a[o - 1] = arguments[o];
1437
+ if (e == null)
1438
+ throw new TypeError("You must pass a method name.");
1439
+ return new W(function(u, h) {
1440
+ return n.ready().then(function() {
1441
+ he(n, e, {
1442
+ resolve: u,
1443
+ reject: h
1444
+ }), J(n, e, a);
1445
+ }).catch(h);
1446
+ });
1447
+ }
1448
+ /**
1449
+ * Get a promise for the value of a player property.
1450
+ *
1451
+ * @param {string} name The property name
1452
+ * @return {Promise}
1453
+ */
1454
+ }, {
1455
+ key: "get",
1456
+ value: function(e) {
1457
+ var n = this;
1458
+ return new W(function(i, a) {
1459
+ return e = qe(e, "get"), n.ready().then(function() {
1460
+ he(n, e, {
1461
+ resolve: i,
1462
+ reject: a
1463
+ }), J(n, e);
1464
+ }).catch(a);
1465
+ });
1466
+ }
1467
+ /**
1468
+ * Get a promise for setting the value of a player property.
1469
+ *
1470
+ * @param {string} name The API method to call.
1471
+ * @param {mixed} value The value to set.
1472
+ * @return {Promise}
1473
+ */
1474
+ }, {
1475
+ key: "set",
1476
+ value: function(e, n) {
1477
+ var i = this;
1478
+ return new W(function(a, o) {
1479
+ if (e = qe(e, "set"), n == null)
1480
+ throw new TypeError("There must be a value to set.");
1481
+ return i.ready().then(function() {
1482
+ he(i, e, {
1483
+ resolve: a,
1484
+ reject: o
1485
+ }), J(i, e, n);
1486
+ }).catch(o);
1487
+ });
1488
+ }
1489
+ /**
1490
+ * Add an event listener for the specified event. Will call the
1491
+ * callback with a single parameter, `data`, that contains the data for
1492
+ * that event.
1493
+ *
1494
+ * @param {string} eventName The name of the event.
1495
+ * @param {function(*)} callback The function to call when the event fires.
1496
+ * @return {void}
1497
+ */
1498
+ }, {
1499
+ key: "on",
1500
+ value: function(e, n) {
1501
+ if (!e)
1502
+ throw new TypeError("You must pass an event name.");
1503
+ if (!n)
1504
+ throw new TypeError("You must pass a callback function.");
1505
+ if (typeof n != "function")
1506
+ throw new TypeError("The callback must be a function.");
1507
+ var i = be(this, "event:".concat(e));
1508
+ i.length === 0 && this.callMethod("addEventListener", e).catch(function() {
1509
+ }), he(this, "event:".concat(e), n);
1510
+ }
1511
+ /**
1512
+ * Remove an event listener for the specified event. Will remove all
1513
+ * listeners for that event if a `callback` isn’t passed, or only that
1514
+ * specific callback if it is passed.
1515
+ *
1516
+ * @param {string} eventName The name of the event.
1517
+ * @param {function} [callback] The specific callback to remove.
1518
+ * @return {void}
1519
+ */
1520
+ }, {
1521
+ key: "off",
1522
+ value: function(e, n) {
1523
+ if (!e)
1524
+ throw new TypeError("You must pass an event name.");
1525
+ if (n && typeof n != "function")
1526
+ throw new TypeError("The callback must be a function.");
1527
+ var i = ke(this, "event:".concat(e), n);
1528
+ i && this.callMethod("removeEventListener", e).catch(function(a) {
1529
+ });
1530
+ }
1531
+ /**
1532
+ * A promise to load a new video.
1533
+ *
1534
+ * @promise LoadVideoPromise
1535
+ * @fulfill {number} The video with this id or url successfully loaded.
1536
+ * @reject {TypeError} The id was not a number.
1537
+ */
1538
+ /**
1539
+ * Load a new video into this embed. The promise will be resolved if
1540
+ * the video is successfully loaded, or it will be rejected if it could
1541
+ * not be loaded.
1542
+ *
1543
+ * @param {number|string|object} options The id of the video, the url of the video, or an object with embed options.
1544
+ * @return {LoadVideoPromise}
1545
+ */
1546
+ }, {
1547
+ key: "loadVideo",
1548
+ value: function(e) {
1549
+ return this.callMethod("loadVideo", e);
1550
+ }
1551
+ /**
1552
+ * A promise to perform an action when the Player is ready.
1553
+ *
1554
+ * @todo document errors
1555
+ * @promise LoadVideoPromise
1556
+ * @fulfill {void}
1557
+ */
1558
+ /**
1559
+ * Trigger a function when the player iframe has initialized. You do not
1560
+ * need to wait for `ready` to trigger to begin adding event listeners
1561
+ * or calling other methods.
1562
+ *
1563
+ * @return {ReadyPromise}
1564
+ */
1565
+ }, {
1566
+ key: "ready",
1567
+ value: function() {
1568
+ var e = Se.get(this) || new W(function(n, i) {
1569
+ i(new Error("Unknown player. Probably unloaded."));
1570
+ });
1571
+ return W.resolve(e);
1572
+ }
1573
+ /**
1574
+ * A promise to add a cue point to the player.
1575
+ *
1576
+ * @promise AddCuePointPromise
1577
+ * @fulfill {string} The id of the cue point to use for removeCuePoint.
1578
+ * @reject {RangeError} the time was less than 0 or greater than the
1579
+ * video’s duration.
1580
+ * @reject {UnsupportedError} Cue points are not supported with the current
1581
+ * player or browser.
1582
+ */
1583
+ /**
1584
+ * Add a cue point to the player.
1585
+ *
1586
+ * @param {number} time The time for the cue point.
1587
+ * @param {object} [data] Arbitrary data to be returned with the cue point.
1588
+ * @return {AddCuePointPromise}
1589
+ */
1590
+ }, {
1591
+ key: "addCuePoint",
1592
+ value: function(e) {
1593
+ var n = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : {};
1594
+ return this.callMethod("addCuePoint", {
1595
+ time: e,
1596
+ data: n
1597
+ });
1598
+ }
1599
+ /**
1600
+ * A promise to remove a cue point from the player.
1601
+ *
1602
+ * @promise AddCuePointPromise
1603
+ * @fulfill {string} The id of the cue point that was removed.
1604
+ * @reject {InvalidCuePoint} The cue point with the specified id was not
1605
+ * found.
1606
+ * @reject {UnsupportedError} Cue points are not supported with the current
1607
+ * player or browser.
1608
+ */
1609
+ /**
1610
+ * Remove a cue point from the video.
1611
+ *
1612
+ * @param {string} id The id of the cue point to remove.
1613
+ * @return {RemoveCuePointPromise}
1614
+ */
1615
+ }, {
1616
+ key: "removeCuePoint",
1617
+ value: function(e) {
1618
+ return this.callMethod("removeCuePoint", e);
1619
+ }
1620
+ /**
1621
+ * A representation of a text track on a video.
1622
+ *
1623
+ * @typedef {Object} VimeoTextTrack
1624
+ * @property {string} language The ISO language code.
1625
+ * @property {string} kind The kind of track it is (captions or subtitles).
1626
+ * @property {string} label The human‐readable label for the track.
1627
+ */
1628
+ /**
1629
+ * A promise to enable a text track.
1630
+ *
1631
+ * @promise EnableTextTrackPromise
1632
+ * @fulfill {VimeoTextTrack} The text track that was enabled.
1633
+ * @reject {InvalidTrackLanguageError} No track was available with the
1634
+ * specified language.
1635
+ * @reject {InvalidTrackError} No track was available with the specified
1636
+ * language and kind.
1637
+ */
1638
+ /**
1639
+ * Enable the text track with the specified language, and optionally the
1640
+ * specified kind (captions or subtitles).
1641
+ *
1642
+ * When set via the API, the track language will not change the viewer’s
1643
+ * stored preference.
1644
+ *
1645
+ * @param {string} language The two‐letter language code.
1646
+ * @param {string} [kind] The kind of track to enable (captions or subtitles).
1647
+ * @return {EnableTextTrackPromise}
1648
+ */
1649
+ }, {
1650
+ key: "enableTextTrack",
1651
+ value: function(e, n) {
1652
+ if (!e)
1653
+ throw new TypeError("You must pass a language.");
1654
+ return this.callMethod("enableTextTrack", {
1655
+ language: e,
1656
+ kind: n
1657
+ });
1658
+ }
1659
+ /**
1660
+ * A promise to disable the active text track.
1661
+ *
1662
+ * @promise DisableTextTrackPromise
1663
+ * @fulfill {void} The track was disabled.
1664
+ */
1665
+ /**
1666
+ * Disable the currently-active text track.
1667
+ *
1668
+ * @return {DisableTextTrackPromise}
1669
+ */
1670
+ }, {
1671
+ key: "disableTextTrack",
1672
+ value: function() {
1673
+ return this.callMethod("disableTextTrack");
1674
+ }
1675
+ /**
1676
+ * A promise to pause the video.
1677
+ *
1678
+ * @promise PausePromise
1679
+ * @fulfill {void} The video was paused.
1680
+ */
1681
+ /**
1682
+ * Pause the video if it’s playing.
1683
+ *
1684
+ * @return {PausePromise}
1685
+ */
1686
+ }, {
1687
+ key: "pause",
1688
+ value: function() {
1689
+ return this.callMethod("pause");
1690
+ }
1691
+ /**
1692
+ * A promise to play the video.
1693
+ *
1694
+ * @promise PlayPromise
1695
+ * @fulfill {void} The video was played.
1696
+ */
1697
+ /**
1698
+ * Play the video if it’s paused. **Note:** on iOS and some other
1699
+ * mobile devices, you cannot programmatically trigger play. Once the
1700
+ * viewer has tapped on the play button in the player, however, you
1701
+ * will be able to use this function.
1702
+ *
1703
+ * @return {PlayPromise}
1704
+ */
1705
+ }, {
1706
+ key: "play",
1707
+ value: function() {
1708
+ return this.callMethod("play");
1709
+ }
1710
+ /**
1711
+ * Request that the player enters fullscreen.
1712
+ * @return {Promise}
1713
+ */
1714
+ }, {
1715
+ key: "requestFullscreen",
1716
+ value: function() {
1717
+ return F.isEnabled ? F.request(this.element) : this.callMethod("requestFullscreen");
1718
+ }
1719
+ /**
1720
+ * Request that the player exits fullscreen.
1721
+ * @return {Promise}
1722
+ */
1723
+ }, {
1724
+ key: "exitFullscreen",
1725
+ value: function() {
1726
+ return F.isEnabled ? F.exit() : this.callMethod("exitFullscreen");
1727
+ }
1728
+ /**
1729
+ * Returns true if the player is currently fullscreen.
1730
+ * @return {Promise}
1731
+ */
1732
+ }, {
1733
+ key: "getFullscreen",
1734
+ value: function() {
1735
+ return F.isEnabled ? W.resolve(F.isFullscreen) : this.get("fullscreen");
1736
+ }
1737
+ /**
1738
+ * Request that the player enters picture-in-picture.
1739
+ * @return {Promise}
1740
+ */
1741
+ }, {
1742
+ key: "requestPictureInPicture",
1743
+ value: function() {
1744
+ return this.callMethod("requestPictureInPicture");
1745
+ }
1746
+ /**
1747
+ * Request that the player exits picture-in-picture.
1748
+ * @return {Promise}
1749
+ */
1750
+ }, {
1751
+ key: "exitPictureInPicture",
1752
+ value: function() {
1753
+ return this.callMethod("exitPictureInPicture");
1754
+ }
1755
+ /**
1756
+ * Returns true if the player is currently picture-in-picture.
1757
+ * @return {Promise}
1758
+ */
1759
+ }, {
1760
+ key: "getPictureInPicture",
1761
+ value: function() {
1762
+ return this.get("pictureInPicture");
1763
+ }
1764
+ /**
1765
+ * A promise to prompt the viewer to initiate remote playback.
1766
+ *
1767
+ * @promise RemotePlaybackPromptPromise
1768
+ * @fulfill {void}
1769
+ * @reject {NotFoundError} No remote playback device is available.
1770
+ */
1771
+ /**
1772
+ * Request to prompt the user to initiate remote playback.
1773
+ *
1774
+ * @return {RemotePlaybackPromptPromise}
1775
+ */
1776
+ }, {
1777
+ key: "remotePlaybackPrompt",
1778
+ value: function() {
1779
+ return this.callMethod("remotePlaybackPrompt");
1780
+ }
1781
+ /**
1782
+ * A promise to unload the video.
1783
+ *
1784
+ * @promise UnloadPromise
1785
+ * @fulfill {void} The video was unloaded.
1786
+ */
1787
+ /**
1788
+ * Return the player to its initial state.
1789
+ *
1790
+ * @return {UnloadPromise}
1791
+ */
1792
+ }, {
1793
+ key: "unload",
1794
+ value: function() {
1795
+ return this.callMethod("unload");
1796
+ }
1797
+ /**
1798
+ * Cleanup the player and remove it from the DOM
1799
+ *
1800
+ * It won't be usable and a new one should be constructed
1801
+ * in order to do any operations.
1802
+ *
1803
+ * @return {Promise}
1804
+ */
1805
+ }, {
1806
+ key: "destroy",
1807
+ value: function() {
1808
+ var e = this;
1809
+ return new W(function(n) {
1810
+ if (Se.delete(e), ie.delete(e.element), e._originalElement && (ie.delete(e._originalElement), e._originalElement.removeAttribute("data-vimeo-initialized")), e.element && e.element.nodeName === "IFRAME" && e.element.parentNode && (e.element.parentNode.parentNode && e._originalElement && e._originalElement !== e.element.parentNode ? e.element.parentNode.parentNode.removeChild(e.element.parentNode) : e.element.parentNode.removeChild(e.element)), e.element && e.element.nodeName === "DIV" && e.element.parentNode) {
1811
+ e.element.removeAttribute("data-vimeo-initialized");
1812
+ var i = e.element.querySelector("iframe");
1813
+ i && i.parentNode && (i.parentNode.parentNode && e._originalElement && e._originalElement !== i.parentNode ? i.parentNode.parentNode.removeChild(i.parentNode) : i.parentNode.removeChild(i));
1814
+ }
1815
+ e._window.removeEventListener("message", e._onMessage), F.isEnabled && F.off("fullscreenchange", e.fullscreenchangeHandler), n();
1816
+ });
1817
+ }
1818
+ /**
1819
+ * A promise to get the autopause behavior of the video.
1820
+ *
1821
+ * @promise GetAutopausePromise
1822
+ * @fulfill {boolean} Whether autopause is turned on or off.
1823
+ * @reject {UnsupportedError} Autopause is not supported with the current
1824
+ * player or browser.
1825
+ */
1826
+ /**
1827
+ * Get the autopause behavior for this player.
1828
+ *
1829
+ * @return {GetAutopausePromise}
1830
+ */
1831
+ }, {
1832
+ key: "getAutopause",
1833
+ value: function() {
1834
+ return this.get("autopause");
1835
+ }
1836
+ /**
1837
+ * A promise to set the autopause behavior of the video.
1838
+ *
1839
+ * @promise SetAutopausePromise
1840
+ * @fulfill {boolean} Whether autopause is turned on or off.
1841
+ * @reject {UnsupportedError} Autopause is not supported with the current
1842
+ * player or browser.
1843
+ */
1844
+ /**
1845
+ * Enable or disable the autopause behavior of this player.
1846
+ *
1847
+ * By default, when another video is played in the same browser, this
1848
+ * player will automatically pause. Unless you have a specific reason
1849
+ * for doing so, we recommend that you leave autopause set to the
1850
+ * default (`true`).
1851
+ *
1852
+ * @param {boolean} autopause
1853
+ * @return {SetAutopausePromise}
1854
+ */
1855
+ }, {
1856
+ key: "setAutopause",
1857
+ value: function(e) {
1858
+ return this.set("autopause", e);
1859
+ }
1860
+ /**
1861
+ * A promise to get the buffered property of the video.
1862
+ *
1863
+ * @promise GetBufferedPromise
1864
+ * @fulfill {Array} Buffered Timeranges converted to an Array.
1865
+ */
1866
+ /**
1867
+ * Get the buffered property of the video.
1868
+ *
1869
+ * @return {GetBufferedPromise}
1870
+ */
1871
+ }, {
1872
+ key: "getBuffered",
1873
+ value: function() {
1874
+ return this.get("buffered");
1875
+ }
1876
+ /**
1877
+ * @typedef {Object} CameraProperties
1878
+ * @prop {number} props.yaw - Number between 0 and 360.
1879
+ * @prop {number} props.pitch - Number between -90 and 90.
1880
+ * @prop {number} props.roll - Number between -180 and 180.
1881
+ * @prop {number} props.fov - The field of view in degrees.
1882
+ */
1883
+ /**
1884
+ * A promise to get the camera properties of the player.
1885
+ *
1886
+ * @promise GetCameraPromise
1887
+ * @fulfill {CameraProperties} The camera properties.
1888
+ */
1889
+ /**
1890
+ * For 360° videos get the camera properties for this player.
1891
+ *
1892
+ * @return {GetCameraPromise}
1893
+ */
1894
+ }, {
1895
+ key: "getCameraProps",
1896
+ value: function() {
1897
+ return this.get("cameraProps");
1898
+ }
1899
+ /**
1900
+ * A promise to set the camera properties of the player.
1901
+ *
1902
+ * @promise SetCameraPromise
1903
+ * @fulfill {Object} The camera was successfully set.
1904
+ * @reject {RangeError} The range was out of bounds.
1905
+ */
1906
+ /**
1907
+ * For 360° videos set the camera properties for this player.
1908
+ *
1909
+ * @param {CameraProperties} camera The camera properties
1910
+ * @return {SetCameraPromise}
1911
+ */
1912
+ }, {
1913
+ key: "setCameraProps",
1914
+ value: function(e) {
1915
+ return this.set("cameraProps", e);
1916
+ }
1917
+ /**
1918
+ * A representation of a chapter.
1919
+ *
1920
+ * @typedef {Object} VimeoChapter
1921
+ * @property {number} startTime The start time of the chapter.
1922
+ * @property {object} title The title of the chapter.
1923
+ * @property {number} index The place in the order of Chapters. Starts at 1.
1924
+ */
1925
+ /**
1926
+ * A promise to get chapters for the video.
1927
+ *
1928
+ * @promise GetChaptersPromise
1929
+ * @fulfill {VimeoChapter[]} The chapters for the video.
1930
+ */
1931
+ /**
1932
+ * Get an array of all the chapters for the video.
1933
+ *
1934
+ * @return {GetChaptersPromise}
1935
+ */
1936
+ }, {
1937
+ key: "getChapters",
1938
+ value: function() {
1939
+ return this.get("chapters");
1940
+ }
1941
+ /**
1942
+ * A promise to get the currently active chapter.
1943
+ *
1944
+ * @promise GetCurrentChaptersPromise
1945
+ * @fulfill {VimeoChapter|undefined} The current chapter for the video.
1946
+ */
1947
+ /**
1948
+ * Get the currently active chapter for the video.
1949
+ *
1950
+ * @return {GetCurrentChaptersPromise}
1951
+ */
1952
+ }, {
1953
+ key: "getCurrentChapter",
1954
+ value: function() {
1955
+ return this.get("currentChapter");
1956
+ }
1957
+ /**
1958
+ * A promise to get the accent color of the player.
1959
+ *
1960
+ * @promise GetColorPromise
1961
+ * @fulfill {string} The hex color of the player.
1962
+ */
1963
+ /**
1964
+ * Get the accent color for this player. Note this is deprecated in place of `getColorTwo`.
1965
+ *
1966
+ * @return {GetColorPromise}
1967
+ */
1968
+ }, {
1969
+ key: "getColor",
1970
+ value: function() {
1971
+ return this.get("color");
1972
+ }
1973
+ /**
1974
+ * A promise to get all colors for the player in an array.
1975
+ *
1976
+ * @promise GetColorsPromise
1977
+ * @fulfill {string[]} The hex colors of the player.
1978
+ */
1979
+ /**
1980
+ * Get all the colors for this player in an array: [colorOne, colorTwo, colorThree, colorFour]
1981
+ *
1982
+ * @return {GetColorPromise}
1983
+ */
1984
+ }, {
1985
+ key: "getColors",
1986
+ value: function() {
1987
+ return W.all([this.get("colorOne"), this.get("colorTwo"), this.get("colorThree"), this.get("colorFour")]);
1988
+ }
1989
+ /**
1990
+ * A promise to set the accent color of the player.
1991
+ *
1992
+ * @promise SetColorPromise
1993
+ * @fulfill {string} The color was successfully set.
1994
+ * @reject {TypeError} The string was not a valid hex or rgb color.
1995
+ * @reject {ContrastError} The color was set, but the contrast is
1996
+ * outside of the acceptable range.
1997
+ * @reject {EmbedSettingsError} The owner of the player has chosen to
1998
+ * use a specific color.
1999
+ */
2000
+ /**
2001
+ * Set the accent color of this player to a hex or rgb string. Setting the
2002
+ * color may fail if the owner of the video has set their embed
2003
+ * preferences to force a specific color.
2004
+ * Note this is deprecated in place of `setColorTwo`.
2005
+ *
2006
+ * @param {string} color The hex or rgb color string to set.
2007
+ * @return {SetColorPromise}
2008
+ */
2009
+ }, {
2010
+ key: "setColor",
2011
+ value: function(e) {
2012
+ return this.set("color", e);
2013
+ }
2014
+ /**
2015
+ * A promise to set all colors for the player.
2016
+ *
2017
+ * @promise SetColorsPromise
2018
+ * @fulfill {string[]} The colors were successfully set.
2019
+ * @reject {TypeError} The string was not a valid hex or rgb color.
2020
+ * @reject {ContrastError} The color was set, but the contrast is
2021
+ * outside of the acceptable range.
2022
+ * @reject {EmbedSettingsError} The owner of the player has chosen to
2023
+ * use a specific color.
2024
+ */
2025
+ /**
2026
+ * Set the colors of this player to a hex or rgb string. Setting the
2027
+ * color may fail if the owner of the video has set their embed
2028
+ * preferences to force a specific color.
2029
+ * The colors should be passed in as an array: [colorOne, colorTwo, colorThree, colorFour].
2030
+ * If a color should not be set, the index in the array can be left as null.
2031
+ *
2032
+ * @param {string[]} colors Array of the hex or rgb color strings to set.
2033
+ * @return {SetColorsPromise}
2034
+ */
2035
+ }, {
2036
+ key: "setColors",
2037
+ value: function(e) {
2038
+ if (!Array.isArray(e))
2039
+ return new W(function(a, o) {
2040
+ return o(new TypeError("Argument must be an array."));
2041
+ });
2042
+ var n = new W(function(a) {
2043
+ return a(null);
2044
+ }), i = [e[0] ? this.set("colorOne", e[0]) : n, e[1] ? this.set("colorTwo", e[1]) : n, e[2] ? this.set("colorThree", e[2]) : n, e[3] ? this.set("colorFour", e[3]) : n];
2045
+ return W.all(i);
2046
+ }
2047
+ /**
2048
+ * A representation of a cue point.
2049
+ *
2050
+ * @typedef {Object} VimeoCuePoint
2051
+ * @property {number} time The time of the cue point.
2052
+ * @property {object} data The data passed when adding the cue point.
2053
+ * @property {string} id The unique id for use with removeCuePoint.
2054
+ */
2055
+ /**
2056
+ * A promise to get the cue points of a video.
2057
+ *
2058
+ * @promise GetCuePointsPromise
2059
+ * @fulfill {VimeoCuePoint[]} The cue points added to the video.
2060
+ * @reject {UnsupportedError} Cue points are not supported with the current
2061
+ * player or browser.
2062
+ */
2063
+ /**
2064
+ * Get an array of the cue points added to the video.
2065
+ *
2066
+ * @return {GetCuePointsPromise}
2067
+ */
2068
+ }, {
2069
+ key: "getCuePoints",
2070
+ value: function() {
2071
+ return this.get("cuePoints");
2072
+ }
2073
+ /**
2074
+ * A promise to get the current time of the video.
2075
+ *
2076
+ * @promise GetCurrentTimePromise
2077
+ * @fulfill {number} The current time in seconds.
2078
+ */
2079
+ /**
2080
+ * Get the current playback position in seconds.
2081
+ *
2082
+ * @return {GetCurrentTimePromise}
2083
+ */
2084
+ }, {
2085
+ key: "getCurrentTime",
2086
+ value: function() {
2087
+ return this.get("currentTime");
2088
+ }
2089
+ /**
2090
+ * A promise to set the current time of the video.
2091
+ *
2092
+ * @promise SetCurrentTimePromise
2093
+ * @fulfill {number} The actual current time that was set.
2094
+ * @reject {RangeError} the time was less than 0 or greater than the
2095
+ * video’s duration.
2096
+ */
2097
+ /**
2098
+ * Set the current playback position in seconds. If the player was
2099
+ * paused, it will remain paused. Likewise, if the player was playing,
2100
+ * it will resume playing once the video has buffered.
2101
+ *
2102
+ * You can provide an accurate time and the player will attempt to seek
2103
+ * to as close to that time as possible. The exact time will be the
2104
+ * fulfilled value of the promise.
2105
+ *
2106
+ * @param {number} currentTime
2107
+ * @return {SetCurrentTimePromise}
2108
+ */
2109
+ }, {
2110
+ key: "setCurrentTime",
2111
+ value: function(e) {
2112
+ return this.set("currentTime", e);
2113
+ }
2114
+ /**
2115
+ * A promise to get the duration of the video.
2116
+ *
2117
+ * @promise GetDurationPromise
2118
+ * @fulfill {number} The duration in seconds.
2119
+ */
2120
+ /**
2121
+ * Get the duration of the video in seconds. It will be rounded to the
2122
+ * nearest second before playback begins, and to the nearest thousandth
2123
+ * of a second after playback begins.
2124
+ *
2125
+ * @return {GetDurationPromise}
2126
+ */
2127
+ }, {
2128
+ key: "getDuration",
2129
+ value: function() {
2130
+ return this.get("duration");
2131
+ }
2132
+ /**
2133
+ * A promise to get the ended state of the video.
2134
+ *
2135
+ * @promise GetEndedPromise
2136
+ * @fulfill {boolean} Whether or not the video has ended.
2137
+ */
2138
+ /**
2139
+ * Get the ended state of the video. The video has ended if
2140
+ * `currentTime === duration`.
2141
+ *
2142
+ * @return {GetEndedPromise}
2143
+ */
2144
+ }, {
2145
+ key: "getEnded",
2146
+ value: function() {
2147
+ return this.get("ended");
2148
+ }
2149
+ /**
2150
+ * A promise to get the loop state of the player.
2151
+ *
2152
+ * @promise GetLoopPromise
2153
+ * @fulfill {boolean} Whether or not the player is set to loop.
2154
+ */
2155
+ /**
2156
+ * Get the loop state of the player.
2157
+ *
2158
+ * @return {GetLoopPromise}
2159
+ */
2160
+ }, {
2161
+ key: "getLoop",
2162
+ value: function() {
2163
+ return this.get("loop");
2164
+ }
2165
+ /**
2166
+ * A promise to set the loop state of the player.
2167
+ *
2168
+ * @promise SetLoopPromise
2169
+ * @fulfill {boolean} The loop state that was set.
2170
+ */
2171
+ /**
2172
+ * Set the loop state of the player. When set to `true`, the player
2173
+ * will start over immediately once playback ends.
2174
+ *
2175
+ * @param {boolean} loop
2176
+ * @return {SetLoopPromise}
2177
+ */
2178
+ }, {
2179
+ key: "setLoop",
2180
+ value: function(e) {
2181
+ return this.set("loop", e);
2182
+ }
2183
+ /**
2184
+ * A promise to set the muted state of the player.
2185
+ *
2186
+ * @promise SetMutedPromise
2187
+ * @fulfill {boolean} The muted state that was set.
2188
+ */
2189
+ /**
2190
+ * Set the muted state of the player. When set to `true`, the player
2191
+ * volume will be muted.
2192
+ *
2193
+ * @param {boolean} muted
2194
+ * @return {SetMutedPromise}
2195
+ */
2196
+ }, {
2197
+ key: "setMuted",
2198
+ value: function(e) {
2199
+ return this.set("muted", e);
2200
+ }
2201
+ /**
2202
+ * A promise to get the muted state of the player.
2203
+ *
2204
+ * @promise GetMutedPromise
2205
+ * @fulfill {boolean} Whether or not the player is muted.
2206
+ */
2207
+ /**
2208
+ * Get the muted state of the player.
2209
+ *
2210
+ * @return {GetMutedPromise}
2211
+ */
2212
+ }, {
2213
+ key: "getMuted",
2214
+ value: function() {
2215
+ return this.get("muted");
2216
+ }
2217
+ /**
2218
+ * A promise to get the paused state of the player.
2219
+ *
2220
+ * @promise GetLoopPromise
2221
+ * @fulfill {boolean} Whether or not the video is paused.
2222
+ */
2223
+ /**
2224
+ * Get the paused state of the player.
2225
+ *
2226
+ * @return {GetLoopPromise}
2227
+ */
2228
+ }, {
2229
+ key: "getPaused",
2230
+ value: function() {
2231
+ return this.get("paused");
2232
+ }
2233
+ /**
2234
+ * A promise to get the playback rate of the player.
2235
+ *
2236
+ * @promise GetPlaybackRatePromise
2237
+ * @fulfill {number} The playback rate of the player on a scale from 0 to 2.
2238
+ */
2239
+ /**
2240
+ * Get the playback rate of the player on a scale from `0` to `2`.
2241
+ *
2242
+ * @return {GetPlaybackRatePromise}
2243
+ */
2244
+ }, {
2245
+ key: "getPlaybackRate",
2246
+ value: function() {
2247
+ return this.get("playbackRate");
2248
+ }
2249
+ /**
2250
+ * A promise to set the playbackrate of the player.
2251
+ *
2252
+ * @promise SetPlaybackRatePromise
2253
+ * @fulfill {number} The playback rate was set.
2254
+ * @reject {RangeError} The playback rate was less than 0 or greater than 2.
2255
+ */
2256
+ /**
2257
+ * Set the playback rate of the player on a scale from `0` to `2`. When set
2258
+ * via the API, the playback rate will not be synchronized to other
2259
+ * players or stored as the viewer's preference.
2260
+ *
2261
+ * @param {number} playbackRate
2262
+ * @return {SetPlaybackRatePromise}
2263
+ */
2264
+ }, {
2265
+ key: "setPlaybackRate",
2266
+ value: function(e) {
2267
+ return this.set("playbackRate", e);
2268
+ }
2269
+ /**
2270
+ * A promise to get the played property of the video.
2271
+ *
2272
+ * @promise GetPlayedPromise
2273
+ * @fulfill {Array} Played Timeranges converted to an Array.
2274
+ */
2275
+ /**
2276
+ * Get the played property of the video.
2277
+ *
2278
+ * @return {GetPlayedPromise}
2279
+ */
2280
+ }, {
2281
+ key: "getPlayed",
2282
+ value: function() {
2283
+ return this.get("played");
2284
+ }
2285
+ /**
2286
+ * A promise to get the qualities available of the current video.
2287
+ *
2288
+ * @promise GetQualitiesPromise
2289
+ * @fulfill {Array} The qualities of the video.
2290
+ */
2291
+ /**
2292
+ * Get the qualities of the current video.
2293
+ *
2294
+ * @return {GetQualitiesPromise}
2295
+ */
2296
+ }, {
2297
+ key: "getQualities",
2298
+ value: function() {
2299
+ return this.get("qualities");
2300
+ }
2301
+ /**
2302
+ * A promise to get the current set quality of the video.
2303
+ *
2304
+ * @promise GetQualityPromise
2305
+ * @fulfill {string} The current set quality.
2306
+ */
2307
+ /**
2308
+ * Get the current set quality of the video.
2309
+ *
2310
+ * @return {GetQualityPromise}
2311
+ */
2312
+ }, {
2313
+ key: "getQuality",
2314
+ value: function() {
2315
+ return this.get("quality");
2316
+ }
2317
+ /**
2318
+ * A promise to set the video quality.
2319
+ *
2320
+ * @promise SetQualityPromise
2321
+ * @fulfill {number} The quality was set.
2322
+ * @reject {RangeError} The quality is not available.
2323
+ */
2324
+ /**
2325
+ * Set a video quality.
2326
+ *
2327
+ * @param {string} quality
2328
+ * @return {SetQualityPromise}
2329
+ */
2330
+ }, {
2331
+ key: "setQuality",
2332
+ value: function(e) {
2333
+ return this.set("quality", e);
2334
+ }
2335
+ /**
2336
+ * A promise to get the remote playback availability.
2337
+ *
2338
+ * @promise RemotePlaybackAvailabilityPromise
2339
+ * @fulfill {boolean} Whether remote playback is available.
2340
+ */
2341
+ /**
2342
+ * Get the availability of remote playback.
2343
+ *
2344
+ * @return {RemotePlaybackAvailabilityPromise}
2345
+ */
2346
+ }, {
2347
+ key: "getRemotePlaybackAvailability",
2348
+ value: function() {
2349
+ return this.get("remotePlaybackAvailability");
2350
+ }
2351
+ /**
2352
+ * A promise to get the current remote playback state.
2353
+ *
2354
+ * @promise RemotePlaybackStatePromise
2355
+ * @fulfill {string} The state of the remote playback: connecting, connected, or disconnected.
2356
+ */
2357
+ /**
2358
+ * Get the current remote playback state.
2359
+ *
2360
+ * @return {RemotePlaybackStatePromise}
2361
+ */
2362
+ }, {
2363
+ key: "getRemotePlaybackState",
2364
+ value: function() {
2365
+ return this.get("remotePlaybackState");
2366
+ }
2367
+ /**
2368
+ * A promise to get the seekable property of the video.
2369
+ *
2370
+ * @promise GetSeekablePromise
2371
+ * @fulfill {Array} Seekable Timeranges converted to an Array.
2372
+ */
2373
+ /**
2374
+ * Get the seekable property of the video.
2375
+ *
2376
+ * @return {GetSeekablePromise}
2377
+ */
2378
+ }, {
2379
+ key: "getSeekable",
2380
+ value: function() {
2381
+ return this.get("seekable");
2382
+ }
2383
+ /**
2384
+ * A promise to get the seeking property of the player.
2385
+ *
2386
+ * @promise GetSeekingPromise
2387
+ * @fulfill {boolean} Whether or not the player is currently seeking.
2388
+ */
2389
+ /**
2390
+ * Get if the player is currently seeking.
2391
+ *
2392
+ * @return {GetSeekingPromise}
2393
+ */
2394
+ }, {
2395
+ key: "getSeeking",
2396
+ value: function() {
2397
+ return this.get("seeking");
2398
+ }
2399
+ /**
2400
+ * A promise to get the text tracks of a video.
2401
+ *
2402
+ * @promise GetTextTracksPromise
2403
+ * @fulfill {VimeoTextTrack[]} The text tracks associated with the video.
2404
+ */
2405
+ /**
2406
+ * Get an array of the text tracks that exist for the video.
2407
+ *
2408
+ * @return {GetTextTracksPromise}
2409
+ */
2410
+ }, {
2411
+ key: "getTextTracks",
2412
+ value: function() {
2413
+ return this.get("textTracks");
2414
+ }
2415
+ /**
2416
+ * A promise to get the embed code for the video.
2417
+ *
2418
+ * @promise GetVideoEmbedCodePromise
2419
+ * @fulfill {string} The `<iframe>` embed code for the video.
2420
+ */
2421
+ /**
2422
+ * Get the `<iframe>` embed code for the video.
2423
+ *
2424
+ * @return {GetVideoEmbedCodePromise}
2425
+ */
2426
+ }, {
2427
+ key: "getVideoEmbedCode",
2428
+ value: function() {
2429
+ return this.get("videoEmbedCode");
2430
+ }
2431
+ /**
2432
+ * A promise to get the id of the video.
2433
+ *
2434
+ * @promise GetVideoIdPromise
2435
+ * @fulfill {number} The id of the video.
2436
+ */
2437
+ /**
2438
+ * Get the id of the video.
2439
+ *
2440
+ * @return {GetVideoIdPromise}
2441
+ */
2442
+ }, {
2443
+ key: "getVideoId",
2444
+ value: function() {
2445
+ return this.get("videoId");
2446
+ }
2447
+ /**
2448
+ * A promise to get the title of the video.
2449
+ *
2450
+ * @promise GetVideoTitlePromise
2451
+ * @fulfill {number} The title of the video.
2452
+ */
2453
+ /**
2454
+ * Get the title of the video.
2455
+ *
2456
+ * @return {GetVideoTitlePromise}
2457
+ */
2458
+ }, {
2459
+ key: "getVideoTitle",
2460
+ value: function() {
2461
+ return this.get("videoTitle");
2462
+ }
2463
+ /**
2464
+ * A promise to get the native width of the video.
2465
+ *
2466
+ * @promise GetVideoWidthPromise
2467
+ * @fulfill {number} The native width of the video.
2468
+ */
2469
+ /**
2470
+ * Get the native width of the currently‐playing video. The width of
2471
+ * the highest‐resolution available will be used before playback begins.
2472
+ *
2473
+ * @return {GetVideoWidthPromise}
2474
+ */
2475
+ }, {
2476
+ key: "getVideoWidth",
2477
+ value: function() {
2478
+ return this.get("videoWidth");
2479
+ }
2480
+ /**
2481
+ * A promise to get the native height of the video.
2482
+ *
2483
+ * @promise GetVideoHeightPromise
2484
+ * @fulfill {number} The native height of the video.
2485
+ */
2486
+ /**
2487
+ * Get the native height of the currently‐playing video. The height of
2488
+ * the highest‐resolution available will be used before playback begins.
2489
+ *
2490
+ * @return {GetVideoHeightPromise}
2491
+ */
2492
+ }, {
2493
+ key: "getVideoHeight",
2494
+ value: function() {
2495
+ return this.get("videoHeight");
2496
+ }
2497
+ /**
2498
+ * A promise to get the vimeo.com url for the video.
2499
+ *
2500
+ * @promise GetVideoUrlPromise
2501
+ * @fulfill {number} The vimeo.com url for the video.
2502
+ * @reject {PrivacyError} The url isn’t available because of the video’s privacy setting.
2503
+ */
2504
+ /**
2505
+ * Get the vimeo.com url for the video.
2506
+ *
2507
+ * @return {GetVideoUrlPromise}
2508
+ */
2509
+ }, {
2510
+ key: "getVideoUrl",
2511
+ value: function() {
2512
+ return this.get("videoUrl");
2513
+ }
2514
+ /**
2515
+ * A promise to get the volume level of the player.
2516
+ *
2517
+ * @promise GetVolumePromise
2518
+ * @fulfill {number} The volume level of the player on a scale from 0 to 1.
2519
+ */
2520
+ /**
2521
+ * Get the current volume level of the player on a scale from `0` to `1`.
2522
+ *
2523
+ * Most mobile devices do not support an independent volume from the
2524
+ * system volume. In those cases, this method will always return `1`.
2525
+ *
2526
+ * @return {GetVolumePromise}
2527
+ */
2528
+ }, {
2529
+ key: "getVolume",
2530
+ value: function() {
2531
+ return this.get("volume");
2532
+ }
2533
+ /**
2534
+ * A promise to set the volume level of the player.
2535
+ *
2536
+ * @promise SetVolumePromise
2537
+ * @fulfill {number} The volume was set.
2538
+ * @reject {RangeError} The volume was less than 0 or greater than 1.
2539
+ */
2540
+ /**
2541
+ * Set the volume of the player on a scale from `0` to `1`. When set
2542
+ * via the API, the volume level will not be synchronized to other
2543
+ * players or stored as the viewer’s preference.
2544
+ *
2545
+ * Most mobile devices do not support setting the volume. An error will
2546
+ * *not* be triggered in that situation.
2547
+ *
2548
+ * @param {number} volume
2549
+ * @return {SetVolumePromise}
2550
+ */
2551
+ }, {
2552
+ key: "setVolume",
2553
+ value: function(e) {
2554
+ return this.set("volume", e);
2555
+ }
2556
+ /** @typedef {import('./lib/timing-object.types').TimingObject} TimingObject */
2557
+ /** @typedef {import('./lib/timing-src-connector.types').TimingSrcConnectorOptions} TimingSrcConnectorOptions */
2558
+ /** @typedef {import('./lib/timing-src-connector').TimingSrcConnector} TimingSrcConnector */
2559
+ /**
2560
+ * Connects a TimingObject to the video player (https://webtiming.github.io/timingobject/)
2561
+ *
2562
+ * @param {TimingObject} timingObject
2563
+ * @param {TimingSrcConnectorOptions} options
2564
+ *
2565
+ * @return {Promise<TimingSrcConnector>}
2566
+ */
2567
+ }, {
2568
+ key: "setTimingSrc",
2569
+ value: (function() {
2570
+ var t = X(/* @__PURE__ */ I().mark(function n(i, a) {
2571
+ var o = this, u;
2572
+ return I().wrap(function(s) {
2573
+ for (; ; ) switch (s.prev = s.next) {
2574
+ case 0:
2575
+ if (i) {
2576
+ s.next = 2;
2577
+ break;
2578
+ }
2579
+ throw new TypeError("A Timing Object must be provided.");
2580
+ case 2:
2581
+ return s.next = 4, this.ready();
2582
+ case 4:
2583
+ return u = new Ot(this, i, a), J(this, "notifyTimingObjectConnect"), u.addEventListener("disconnect", function() {
2584
+ return J(o, "notifyTimingObjectDisconnect");
2585
+ }), s.abrupt("return", u);
2586
+ case 8:
2587
+ case "end":
2588
+ return s.stop();
2589
+ }
2590
+ }, n, this);
2591
+ }));
2592
+ function e(n, i) {
2593
+ return t.apply(this, arguments);
2594
+ }
2595
+ return e;
2596
+ })()
2597
+ }]), r;
2598
+ })();
2599
+ Ye || (F = St(), Et(), Pt(), Tt(), Mt());
2600
+ const _t = "https://player.vimeo.com/video", At = "https://vimeo.com/event", Nt = /vimeo\.com\/(video\/|event\/)?(\d+)(?:\/([\w-]+))?/;
2601
+ function $e(r, t = {}) {
2602
+ var e;
2603
+ const n = {
2604
+ src: Rt(r, t),
2605
+ frameborder: 0,
2606
+ width: "100%",
2607
+ height: "100%",
2608
+ allow: "accelerometer; fullscreen; autoplay; encrypted-media; gyroscope; picture-in-picture"
2609
+ };
2610
+ return t.config && (n["data-config"] = JSON.stringify(t.config)), (e = t.config) != null && e.referrerpolicy && (n.referrerpolicy = t.config.referrerpolicy), /*html*/
2611
+ `
2612
+ <style>
2613
+ :host {
2614
+ display: inline-block;
2615
+ min-width: 300px;
2616
+ min-height: 150px;
2617
+ position: relative;
2618
+ }
2619
+ iframe {
2620
+ position: absolute;
2621
+ top: 0;
2622
+ left: 0;
2623
+ }
2624
+ :host(:not([controls])) {
2625
+ pointer-events: none;
2626
+ }
2627
+ </style>
2628
+ <iframe${Lt(n)}></iframe>
2629
+ `;
2630
+ }
2631
+ function Rt(r, t) {
2632
+ if (!r.src) return;
2633
+ let e = new URL(r.src);
2634
+ const n = r.src.match(Nt), i = n == null ? void 0 : n[1], a = n == null ? void 0 : n[2], o = e.searchParams.get("h") || (n == null ? void 0 : n[3]), u = {
2635
+ // ?controls=true is enabled by default in the iframe
2636
+ controls: r.controls === "" ? null : 0,
2637
+ autoplay: r.autoplay,
2638
+ loop: r.loop,
2639
+ muted: r.muted,
2640
+ playsinline: r.playsinline,
2641
+ preload: r.preload ?? "metadata",
2642
+ transparent: !1,
2643
+ autopause: r.autopause,
2644
+ h: o,
2645
+ // This param is required when the video is Unlisted.
2646
+ ...t.config
2647
+ };
2648
+ if (i === "event/") {
2649
+ const h = o ? `/${o}` : "";
2650
+ return delete u.h, `${At}/${a}/embed${h}?${Ve(u)}`;
2651
+ }
2652
+ return `${_t}/${a}?${Ve(u)}`;
2653
+ }
2654
+ var oe, ue, me, z, B, G, q, K, Z, U, ee, Q, se, le, te, Ee, et;
2655
+ class de extends at(globalThis.HTMLElement ?? class {
2656
+ }) {
2657
+ constructor() {
2658
+ super();
2659
+ L(this, Ee);
2660
+ fe(this, "loadComplete", new xe());
2661
+ L(this, oe);
2662
+ L(this, ue);
2663
+ L(this, me);
2664
+ L(this, z, 0);
2665
+ L(this, B, NaN);
2666
+ L(this, G, !1);
2667
+ L(this, q, !this.autoplay);
2668
+ L(this, K, 1);
2669
+ L(this, Z, 0);
2670
+ L(this, U, 0);
2671
+ L(this, ee, !1);
2672
+ L(this, Q, 1);
2673
+ L(this, se, NaN);
2674
+ L(this, le, NaN);
2675
+ L(this, te, null);
2676
+ Le(this, Ee, et).call(this, "config");
2677
+ }
2678
+ requestFullscreen() {
2679
+ var e, n;
2680
+ return (n = (e = this.api) == null ? void 0 : e.requestFullscreen) == null ? void 0 : n.call(e);
2681
+ }
2682
+ exitFullscreen() {
2683
+ var e, n;
2684
+ return (n = (e = this.api) == null ? void 0 : e.exitFullscreen) == null ? void 0 : n.call(e);
2685
+ }
2686
+ requestPictureInPicture() {
2687
+ var e, n;
2688
+ return (n = (e = this.api) == null ? void 0 : e.requestPictureInPicture) == null ? void 0 : n.call(e);
2689
+ }
2690
+ exitPictureInPicture() {
2691
+ var e, n;
2692
+ return (n = (e = this.api) == null ? void 0 : e.exitPictureInPicture) == null ? void 0 : n.call(e);
2693
+ }
2694
+ get config() {
2695
+ return _(this, te);
2696
+ }
2697
+ set config(e) {
2698
+ P(this, te, e);
2699
+ }
2700
+ async load() {
2701
+ var e;
2702
+ if (_(this, oe)) return;
2703
+ const n = !_(this, ue);
2704
+ _(this, ue) && (this.loadComplete = new xe()), P(this, ue, !0), await P(this, oe, Promise.resolve()), P(this, oe, null), P(this, z, 0), P(this, B, NaN), P(this, G, !1), P(this, q, !this.autoplay), P(this, K, 1), P(this, Z, 0), P(this, U, 0), P(this, ee, !1), P(this, Q, 1), P(this, U, 0), P(this, se, NaN), P(this, le, NaN), this.dispatchEvent(new Event("emptied"));
2705
+ let i = this.api;
2706
+ if (this.api = null, !this.src)
2707
+ return;
2708
+ this.dispatchEvent(new Event("loadstart"));
2709
+ const a = {
2710
+ autoplay: this.autoplay,
2711
+ controls: this.controls,
2712
+ loop: this.loop,
2713
+ muted: this.defaultMuted,
2714
+ playsinline: this.playsInline,
2715
+ preload: this.preload ?? "metadata",
2716
+ transparent: !1,
2717
+ autopause: this.hasAttribute("autopause"),
2718
+ ..._(this, te)
2719
+ }, o = async () => {
2720
+ P(this, U, 1), this.dispatchEvent(new Event("loadedmetadata")), this.api && (P(this, G, await this.api.getMuted()), P(this, Q, await this.api.getVolume()), this.dispatchEvent(new Event("volumechange")), P(this, B, await this.api.getDuration()), this.dispatchEvent(new Event("durationchange"))), this.dispatchEvent(new Event("loadcomplete")), this.loadComplete.resolve();
2721
+ };
2722
+ if (_(this, me)) {
2723
+ this.api = i, await this.api.loadVideo({
2724
+ ...a,
2725
+ url: this.src
2726
+ }), await o(), await this.loadComplete;
2727
+ return;
2728
+ }
2729
+ P(this, me, !0);
2730
+ let u = (e = this.shadowRoot) == null ? void 0 : e.querySelector("iframe");
2731
+ n && u && P(this, te, JSON.parse(u.getAttribute("data-config") || "{}")), this.shadowRoot || (this.attachShadow({ mode: "open" }), this.shadowRoot.innerHTML = $e(It(this.attributes), this), u = this.shadowRoot.querySelector("iframe")), this.api = new Ne(u);
2732
+ const h = document.createElement("video");
2733
+ this.textTracks = h.textTracks, this.api.getTextTracks().then((g) => {
2734
+ g.forEach((y) => {
2735
+ h.addTextTrack(y.kind, y.label, y.language);
2736
+ });
2737
+ }), this.textTracks.addEventListener("change", () => {
2738
+ const g = Array.from(this.textTracks).find((y) => y.mode === "showing");
2739
+ g ? this.api.enableTextTrack(g.language, g.kind) : this.api.disableTextTrack();
2740
+ });
2741
+ const s = () => {
2742
+ this.api.off("loaded", s), o();
2743
+ };
2744
+ this.api.on("loaded", s), this.api.on("bufferstart", () => {
2745
+ _(this, q) && (P(this, q, !1), this.dispatchEvent(new Event("play"))), this.dispatchEvent(new Event("waiting"));
2746
+ }), this.api.on("play", () => {
2747
+ _(this, q) && (P(this, q, !1), this.dispatchEvent(new Event("play")));
2748
+ }), this.api.on("playing", () => {
2749
+ P(this, U, 3), P(this, q, !1), this.dispatchEvent(new Event("playing"));
2750
+ }), this.api.on("seeking", () => {
2751
+ P(this, ee, !0), this.onSeeking(), this.dispatchEvent(new Event("seeking"));
2752
+ }), this.api.on("seeked", async () => {
2753
+ P(this, ee, !1), P(this, z, await this.api.getCurrentTime().catch(() => _(this, z))), this.dispatchEvent(new Event("seeked"));
2754
+ }), this.api.on("pause", () => {
2755
+ P(this, q, !0), this.dispatchEvent(new Event("pause"));
2756
+ }), this.api.on("ended", () => {
2757
+ P(this, q, !0), this.dispatchEvent(new Event("ended"));
2758
+ }), this.api.on("ratechange", ({ playbackRate: g }) => {
2759
+ P(this, K, g), this.dispatchEvent(new Event("ratechange"));
2760
+ }), this.api.on("volumechange", async ({ volume: g }) => {
2761
+ P(this, Q, g), this.api && P(this, G, await this.api.getMuted()), this.dispatchEvent(new Event("volumechange"));
2762
+ }), this.api.on("durationchange", ({ duration: g }) => {
2763
+ P(this, B, g), this.dispatchEvent(new Event("durationchange"));
2764
+ }), this.api.on("timeupdate", ({ seconds: g }) => {
2765
+ const y = Math.round(g * 100) / 100;
2766
+ P(this, z, y), this.dispatchEvent(new Event("timeupdate"));
2767
+ }), this.api.on("progress", ({ seconds: g }) => {
2768
+ P(this, Z, g), this.dispatchEvent(new Event("progress"));
2769
+ }), this.api.on("resize", ({ videoWidth: g, videoHeight: y }) => {
2770
+ P(this, se, g), P(this, le, y), this.dispatchEvent(new Event("resize"));
2771
+ }), await this.loadComplete;
2772
+ }
2773
+ async attributeChangedCallback(e, n, i) {
2774
+ if (n !== i) {
2775
+ switch (e) {
2776
+ case "autoplay":
2777
+ case "controls":
2778
+ case "src": {
2779
+ this.load();
2780
+ return;
2781
+ }
2782
+ }
2783
+ switch (await this.loadComplete, e) {
2784
+ case "loop": {
2785
+ this.api.setLoop(this.loop);
2786
+ break;
2787
+ }
2788
+ }
2789
+ }
2790
+ }
2791
+ async play() {
2792
+ var e;
2793
+ P(this, q, !1), this.dispatchEvent(new Event("play")), await this.loadComplete;
2794
+ try {
2795
+ await ((e = this.api) == null ? void 0 : e.play());
2796
+ } catch (n) {
2797
+ throw P(this, q, !0), this.dispatchEvent(new Event("pause")), n;
2798
+ }
2799
+ }
2800
+ async pause() {
2801
+ var e;
2802
+ return await this.loadComplete, (e = this.api) == null ? void 0 : e.pause();
2803
+ }
2804
+ get ended() {
2805
+ return _(this, z) >= _(this, B);
2806
+ }
2807
+ get seeking() {
2808
+ return _(this, ee);
2809
+ }
2810
+ get readyState() {
2811
+ return _(this, U);
2812
+ }
2813
+ get videoWidth() {
2814
+ return _(this, se);
2815
+ }
2816
+ get videoHeight() {
2817
+ return _(this, le);
2818
+ }
2819
+ get src() {
2820
+ return this.getAttribute("src");
2821
+ }
2822
+ set src(e) {
2823
+ this.src != e && this.setAttribute("src", e);
2824
+ }
2825
+ get paused() {
2826
+ return _(this, q);
2827
+ }
2828
+ get duration() {
2829
+ return _(this, B);
2830
+ }
2831
+ get autoplay() {
2832
+ return this.hasAttribute("autoplay");
2833
+ }
2834
+ set autoplay(e) {
2835
+ this.autoplay != e && this.toggleAttribute("autoplay", !!e);
2836
+ }
2837
+ get buffered() {
2838
+ return _(this, Z) > 0 ? We(0, _(this, Z)) : We();
2839
+ }
2840
+ get controls() {
2841
+ return this.hasAttribute("controls");
2842
+ }
2843
+ set controls(e) {
2844
+ this.controls != e && this.toggleAttribute("controls", !!e);
2845
+ }
2846
+ get currentTime() {
2847
+ return _(this, z);
2848
+ }
2849
+ set currentTime(e) {
2850
+ this.currentTime != e && (P(this, z, e), this.loadComplete.then(() => {
2851
+ var n;
2852
+ (n = this.api) == null || n.setCurrentTime(e).catch(() => {
2853
+ });
2854
+ }));
2855
+ }
2856
+ get defaultMuted() {
2857
+ return this.hasAttribute("muted");
2858
+ }
2859
+ set defaultMuted(e) {
2860
+ this.defaultMuted != e && this.toggleAttribute("muted", !!e);
2861
+ }
2862
+ get loop() {
2863
+ return this.hasAttribute("loop");
2864
+ }
2865
+ set loop(e) {
2866
+ this.loop != e && this.toggleAttribute("loop", !!e);
2867
+ }
2868
+ get muted() {
2869
+ return _(this, G);
2870
+ }
2871
+ set muted(e) {
2872
+ this.muted != e && (P(this, G, e), this.loadComplete.then(() => {
2873
+ var n;
2874
+ (n = this.api) == null || n.setMuted(e).catch(() => {
2875
+ });
2876
+ }));
2877
+ }
2878
+ get playbackRate() {
2879
+ return _(this, K);
2880
+ }
2881
+ set playbackRate(e) {
2882
+ this.playbackRate != e && (P(this, K, e), this.loadComplete.then(() => {
2883
+ var n;
2884
+ (n = this.api) == null || n.setPlaybackRate(e).catch(() => {
2885
+ });
2886
+ }));
2887
+ }
2888
+ get playsInline() {
2889
+ return this.hasAttribute("playsinline");
2890
+ }
2891
+ set playsInline(e) {
2892
+ this.playsInline != e && this.toggleAttribute("playsinline", !!e);
2893
+ }
2894
+ get poster() {
2895
+ return this.getAttribute("poster");
2896
+ }
2897
+ set poster(e) {
2898
+ this.poster != e && this.setAttribute("poster", `${e}`);
2899
+ }
2900
+ get volume() {
2901
+ return _(this, Q);
2902
+ }
2903
+ set volume(e) {
2904
+ this.volume != e && (P(this, Q, e), this.loadComplete.then(() => {
2905
+ var n;
2906
+ (n = this.api) == null || n.setVolume(e).catch(() => {
2907
+ });
2908
+ }));
2909
+ }
2910
+ }
2911
+ oe = new WeakMap(), ue = new WeakMap(), me = new WeakMap(), z = new WeakMap(), B = new WeakMap(), G = new WeakMap(), q = new WeakMap(), K = new WeakMap(), Z = new WeakMap(), U = new WeakMap(), ee = new WeakMap(), Q = new WeakMap(), se = new WeakMap(), le = new WeakMap(), te = new WeakMap(), Ee = new WeakSet(), // This is a pattern to update property values that are set before
2912
+ // the custom element is upgraded.
2913
+ // https://web.dev/custom-elements-best-practices/#make-properties-lazy
2914
+ et = function(e) {
2915
+ if (Object.prototype.hasOwnProperty.call(this, e)) {
2916
+ const n = this[e];
2917
+ delete this[e], this[e] = n;
2918
+ }
2919
+ }, fe(de, "getTemplateHTML", $e), fe(de, "shadowRootOptions", { mode: "open" }), fe(de, "observedAttributes", [
2920
+ "autoplay",
2921
+ "controls",
2922
+ "crossorigin",
2923
+ "loop",
2924
+ "muted",
2925
+ "playsinline",
2926
+ "poster",
2927
+ "preload",
2928
+ "src"
2929
+ ]);
2930
+ function Lt(r) {
2931
+ let t = "";
2932
+ for (const e in r) {
2933
+ const n = r[e];
2934
+ n === "" ? t += ` ${Ce(e)}` : t += ` ${Ce(e)}="${Ce(`${n}`)}"`;
2935
+ }
2936
+ return t;
2937
+ }
2938
+ function Ce(r) {
2939
+ return r.replace(/&/g, "&amp;").replace(/</g, "&lt;").replace(/>/g, "&gt;").replace(/"/g, "&quot;").replace(/'/g, "&apos;").replace(/`/g, "&#x60;");
2940
+ }
2941
+ function Ve(r) {
2942
+ return String(new URLSearchParams(jt(r)));
2943
+ }
2944
+ function jt(r) {
2945
+ let t = {};
2946
+ for (let e in r) {
2947
+ let n = r[e];
2948
+ n === !0 || n === "" ? t[e] = 1 : n === !1 ? t[e] = 0 : n != null && (t[e] = n);
2949
+ }
2950
+ return t;
2951
+ }
2952
+ function It(r) {
2953
+ let t = {};
2954
+ for (let e of r)
2955
+ t[e.name] = e.value;
2956
+ return t;
2957
+ }
2958
+ class xe extends Promise {
2959
+ constructor(t = () => {
2960
+ }) {
2961
+ let e, n;
2962
+ super((i, a) => {
2963
+ t(i, a), e = i, n = a;
2964
+ }), this.resolve = e, this.reject = n;
2965
+ }
2966
+ }
2967
+ function We(r, t) {
2968
+ return Array.isArray(r) ? Oe(r) : r == null || t == null || r === 0 && t === 0 ? Oe([[0, 0]]) : Oe([[r, t]]);
2969
+ }
2970
+ function Oe(r) {
2971
+ return Object.defineProperties(r, {
2972
+ start: {
2973
+ value: (t) => r[t][0]
2974
+ },
2975
+ end: {
2976
+ value: (t) => r[t][1]
2977
+ }
2978
+ }), r;
2979
+ }
2980
+ globalThis.customElements && !globalThis.customElements.get("vimeo-video") && globalThis.customElements.define("vimeo-video", de);
2981
+ var Ft = de, qt = /* @__PURE__ */ new Set([
2982
+ "style",
2983
+ "children",
2984
+ "ref",
2985
+ "key",
2986
+ "suppressContentEditableWarning",
2987
+ "suppressHydrationWarning",
2988
+ "dangerouslySetInnerHTML"
2989
+ ]), Dt = {
2990
+ className: "class",
2991
+ htmlFor: "for"
2992
+ };
2993
+ function tt(r) {
2994
+ return r.toLowerCase();
2995
+ }
2996
+ function ze(r) {
2997
+ if (typeof r == "boolean") return r ? "" : void 0;
2998
+ if (typeof r != "function" && !(typeof r == "object" && r !== null))
2999
+ return r;
3000
+ }
3001
+ function $t({
3002
+ react: r,
3003
+ tagName: t,
3004
+ elementClass: e,
3005
+ events: n,
3006
+ displayName: i,
3007
+ defaultProps: a,
3008
+ toAttributeName: o = tt,
3009
+ toAttributeValue: u = ze
3010
+ }) {
3011
+ const h = Number.parseInt(r.version) >= 19, s = r.forwardRef((g, y) => {
3012
+ var M, T;
3013
+ const w = r.useRef(null), N = r.useRef(/* @__PURE__ */ new Map()), A = {}, j = {}, m = {}, p = {};
3014
+ for (const [f, v] of Object.entries(g)) {
3015
+ if (qt.has(f)) {
3016
+ m[f] = v;
3017
+ continue;
3018
+ }
3019
+ const E = o(Dt[f] ?? f);
3020
+ if (e.prototype && f in e.prototype && !(f in (((M = globalThis.HTMLElement) == null ? void 0 : M.prototype) ?? {})) && !((T = e.observedAttributes) != null && T.some((b) => b === E))) {
3021
+ p[f] = v;
3022
+ continue;
3023
+ }
3024
+ if (f.startsWith("on")) {
3025
+ A[f] = v;
3026
+ continue;
3027
+ }
3028
+ const C = u(v);
3029
+ if (E && C != null && (j[E] = String(C), h || (m[E] = C)), E && h) {
3030
+ const b = ze(v);
3031
+ C !== b ? m[E] = C : m[E] = v;
3032
+ }
3033
+ }
3034
+ if (typeof window < "u") {
3035
+ for (const f in A) {
3036
+ const v = A[f], E = f.endsWith("Capture"), C = ((n == null ? void 0 : n[f]) ?? f.slice(2).toLowerCase()).slice(
3037
+ 0,
3038
+ E ? -7 : void 0
3039
+ );
3040
+ r.useLayoutEffect(() => {
3041
+ const b = w == null ? void 0 : w.current;
3042
+ if (!(!b || typeof v != "function"))
3043
+ return b.addEventListener(C, v, E), () => {
3044
+ b.removeEventListener(C, v, E);
3045
+ };
3046
+ }, [w == null ? void 0 : w.current, v]);
3047
+ }
3048
+ r.useLayoutEffect(() => {
3049
+ if (w.current === null) return;
3050
+ const f = /* @__PURE__ */ new Map();
3051
+ for (const v in p)
3052
+ He(w.current, v, p[v]), N.current.delete(v), f.set(v, p[v]);
3053
+ for (const [v, E] of N.current)
3054
+ He(w.current, v, void 0);
3055
+ N.current = f;
3056
+ });
3057
+ }
3058
+ if (typeof window > "u" && (e != null && e.getTemplateHTML) && (e != null && e.shadowRootOptions)) {
3059
+ const { mode: f, delegatesFocus: v } = e.shadowRootOptions, E = r.createElement("template", {
3060
+ shadowrootmode: f,
3061
+ shadowrootdelegatesfocus: v,
3062
+ dangerouslySetInnerHTML: {
3063
+ __html: e.getTemplateHTML(j, g)
3064
+ },
3065
+ key: "ce-la-react-ssr-template-shadow-root"
3066
+ });
3067
+ m.children = [E, m.children];
3068
+ }
3069
+ return r.createElement(t, {
3070
+ ...a,
3071
+ ...m,
3072
+ ref: r.useCallback(
3073
+ (f) => {
3074
+ w.current = f, typeof y == "function" ? y(f) : y !== null && (y.current = f);
3075
+ },
3076
+ [y]
3077
+ )
3078
+ }, m.children);
3079
+ });
3080
+ return s.displayName = i ?? e.name, s;
3081
+ }
3082
+ function He(r, t, e) {
3083
+ var n;
3084
+ r[t] = e, e == null && t in (((n = globalThis.HTMLElement) == null ? void 0 : n.prototype) ?? {}) && r.removeAttribute(t);
3085
+ }
3086
+ var zt = $t({
3087
+ react: it,
3088
+ tagName: "vimeo-video",
3089
+ elementClass: Ft,
3090
+ toAttributeName(r) {
3091
+ return r === "muted" ? "" : r === "defaultMuted" ? "muted" : tt(r);
3092
+ }
3093
+ });
3094
+ /*! Bundled license information:
3095
+
3096
+ ce-la-react/dist/ce-la-react.js:
3097
+ (**
3098
+ * @license
3099
+ * Copyright 2018 Google LLC
3100
+ * SPDX-License-Identifier: BSD-3-Clause
3101
+ *
3102
+ * Modified version of `@lit/react` for vanilla custom elements with support for SSR.
3103
+ *)
3104
+ */
3105
+ export {
3106
+ zt as default
3107
+ };
3108
+ //# sourceMappingURL=react-Cn4WlMcl.js.map