@ix_waterford/lib 1.0.6 → 1.0.8

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 (36) hide show
  1. package/dist/index.html +1 -1
  2. package/dist/index.js +122379 -0
  3. package/dist/index.js.map +1 -0
  4. package/package.json +5 -5
  5. package/dist/static/js/async/reactPlayerDash.js +0 -351
  6. package/dist/static/js/async/reactPlayerDash.js.map +0 -1
  7. package/dist/static/js/async/reactPlayerHls.js +0 -430
  8. package/dist/static/js/async/reactPlayerHls.js.map +0 -1
  9. package/dist/static/js/async/reactPlayerMux.js +0 -16076
  10. package/dist/static/js/async/reactPlayerMux.js.map +0 -1
  11. package/dist/static/js/async/reactPlayerPreview.js +0 -112
  12. package/dist/static/js/async/reactPlayerPreview.js.map +0 -1
  13. package/dist/static/js/async/reactPlayerSpotify.js +0 -519
  14. package/dist/static/js/async/reactPlayerSpotify.js.map +0 -1
  15. package/dist/static/js/async/reactPlayerTiktok.js +0 -489
  16. package/dist/static/js/async/reactPlayerTiktok.js.map +0 -1
  17. package/dist/static/js/async/reactPlayerTwitch.js +0 -587
  18. package/dist/static/js/async/reactPlayerTwitch.js.map +0 -1
  19. package/dist/static/js/async/reactPlayerVimeo.js +0 -4265
  20. package/dist/static/js/async/reactPlayerVimeo.js.map +0 -1
  21. package/dist/static/js/async/reactPlayerWistia.js +0 -768
  22. package/dist/static/js/async/reactPlayerWistia.js.map +0 -1
  23. package/dist/static/js/async/reactPlayerYouTube.js +0 -739
  24. package/dist/static/js/async/reactPlayerYouTube.js.map +0 -1
  25. package/dist/static/js/async/vendors-node_modules_custom-media-element_dist_custom-media-element_js-node_modules_media-tra-835023.js +0 -1254
  26. package/dist/static/js/async/vendors-node_modules_custom-media-element_dist_custom-media-element_js-node_modules_media-tra-835023.js.map +0 -1
  27. package/dist/static/js/async/vendors-node_modules_dashjs_dist_modern_esm_dash_all_min_js.js +0 -22
  28. package/dist/static/js/async/vendors-node_modules_dashjs_dist_modern_esm_dash_all_min_js.js.map +0 -1
  29. package/dist/static/js/async/vendors-node_modules_hls_js_dist_hls_mjs.js +0 -36692
  30. package/dist/static/js/async/vendors-node_modules_hls_js_dist_hls_mjs.js.map +0 -1
  31. package/dist/static/js/index.js +0 -6362
  32. package/dist/static/js/index.js.map +0 -1
  33. package/dist/static/js/lib-react.js +0 -3235
  34. package/dist/static/js/lib-react.js.map +0 -1
  35. package/dist/static/js/vendors-node_modules_rspack_core_dist_cssExtractHmr_js-node_modules_dayjs_plugin_utc_js-node_-897cfa.js +0 -113737
  36. package/dist/static/js/vendors-node_modules_rspack_core_dist_cssExtractHmr_js-node_modules_dayjs_plugin_utc_js-node_-897cfa.js.map +0 -1
@@ -1,768 +0,0 @@
1
- "use strict";
2
- (self["webpackChunk_ix_waterford_lib"] = self["webpackChunk_ix_waterford_lib"] || []).push([["reactPlayerWistia"], {
3
- "./node_modules/super-media-element/super-media-element.js": (function (__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) {
4
- __webpack_require__.r(__webpack_exports__);
5
- __webpack_require__.d(__webpack_exports__, {
6
- Events: () => (Events),
7
- SuperAudioElement: () => (SuperAudioElement),
8
- SuperMediaMixin: () => (SuperMediaMixin),
9
- SuperVideoElement: () => (SuperVideoElement),
10
- template: () => (template)
11
- });
12
- /**
13
- * Super Media Element
14
- * Based on https://github.com/muxinc/custom-video-element - Mux - MIT License
15
- *
16
- * The goal is to create an element that works just like the video element
17
- * but can be extended/sub-classed, because native elements cannot be
18
- * extended today across browsers. Support for extending async loaded video
19
- * like API's. e.g. video players.
20
- */
21
-
22
- // The onevent like props are weirdly set on the HTMLElement prototype with other
23
- // generic events making it impossible to pick these specific to HTMLMediaElement.
24
- const Events = [
25
- 'abort',
26
- 'canplay',
27
- 'canplaythrough',
28
- 'durationchange',
29
- 'emptied',
30
- 'encrypted',
31
- 'ended',
32
- 'error',
33
- 'loadeddata',
34
- 'loadedmetadata',
35
- 'loadstart',
36
- 'pause',
37
- 'play',
38
- 'playing',
39
- 'progress',
40
- 'ratechange',
41
- 'seeked',
42
- 'seeking',
43
- 'stalled',
44
- 'suspend',
45
- 'timeupdate',
46
- 'volumechange',
47
- 'waiting',
48
- 'waitingforkey',
49
- 'resize',
50
- 'enterpictureinpicture',
51
- 'leavepictureinpicture',
52
- 'webkitbeginfullscreen',
53
- 'webkitendfullscreen',
54
- 'webkitpresentationmodechanged',
55
- ];
56
-
57
- const template = globalThis.document?.createElement('template');
58
-
59
- if (template) {
60
- template.innerHTML = /*html*/`
61
- <style>
62
- :host {
63
- display: inline-block;
64
- line-height: 0;
65
- }
66
-
67
- video,
68
- audio {
69
- max-width: 100%;
70
- max-height: 100%;
71
- min-width: 100%;
72
- min-height: 100%;
73
- }
74
- </style>
75
- <slot></slot>
76
- `;
77
- }
78
-
79
- /**
80
- * @see https://justinfagnani.com/2015/12/21/real-mixins-with-javascript-classes/
81
- */
82
- const SuperMediaMixin = (superclass, { tag, is }) => {
83
-
84
- const nativeElTest = globalThis.document?.createElement(tag, { is });
85
- const nativeElProps = nativeElTest ? getNativeElProps(nativeElTest) : [];
86
-
87
- return class SuperMedia extends superclass {
88
- static Events = Events;
89
- static template = template;
90
- static skipAttributes = [];
91
- static #isDefined;
92
-
93
- static get observedAttributes() {
94
- SuperMedia.#define();
95
-
96
- // Include any attributes from the custom built-in.
97
- const natAttrs = nativeElTest?.constructor?.observedAttributes ?? [];
98
-
99
- return [
100
- ...natAttrs,
101
- 'autopictureinpicture',
102
- 'disablepictureinpicture',
103
- 'disableremoteplayback',
104
- 'autoplay',
105
- 'controls',
106
- 'controlslist',
107
- 'crossorigin',
108
- 'loop',
109
- 'muted',
110
- 'playsinline',
111
- 'poster',
112
- 'preload',
113
- 'src',
114
- ];
115
- }
116
-
117
- static #define() {
118
- if (this.#isDefined) return;
119
- this.#isDefined = true;
120
-
121
- const propsToAttrs = new Set(this.observedAttributes);
122
- // defaultMuted maps to the muted attribute, handled manually below.
123
- propsToAttrs.delete('muted');
124
-
125
- // Passthrough native el functions from the custom el to the native el
126
- for (let prop of nativeElProps) {
127
- if (prop in this.prototype) continue;
128
-
129
- const type = typeof nativeElTest[prop];
130
- if (type == 'function') {
131
- // Function
132
- this.prototype[prop] = function (...args) {
133
- this.#init();
134
-
135
- const fn = () => {
136
- if (this.call) return this.call(prop, ...args);
137
- return this.nativeEl[prop].apply(this.nativeEl, args);
138
- };
139
-
140
- if (this.loadComplete && !this.isLoaded) {
141
- return this.loadComplete.then(fn);
142
- }
143
- return fn();
144
- };
145
- } else {
146
- // Some properties like src, preload, defaultMuted are handled manually.
147
-
148
- // Getter
149
- let config = {
150
- get() {
151
- this.#init();
152
-
153
- let attr = prop.toLowerCase();
154
- if (propsToAttrs.has(attr)) {
155
- const val = this.getAttribute(attr);
156
- return val === null ? false : val === '' ? true : val;
157
- }
158
-
159
- return this.get?.(prop) ?? this.nativeEl?.[prop] ?? this.#standinEl[prop];
160
- },
161
- };
162
-
163
- if (prop !== prop.toUpperCase()) {
164
- // Setter (not a CONSTANT)
165
- config.set = async function (val) {
166
- this.#init();
167
-
168
- let attr = prop.toLowerCase();
169
- if (propsToAttrs.has(attr)) {
170
- if (val === true || val === false || val == null) {
171
- this.toggleAttribute(attr, Boolean(val));
172
- } else {
173
- this.setAttribute(attr, val);
174
- }
175
- return;
176
- }
177
-
178
- if (this.loadComplete && !this.isLoaded) await this.loadComplete;
179
-
180
- if (this.set) {
181
- this.set(prop, val);
182
- return;
183
- }
184
-
185
- this.nativeEl[prop] = val;
186
- };
187
- }
188
-
189
- Object.defineProperty(this.prototype, prop, config);
190
- }
191
- }
192
- }
193
-
194
- #isInit;
195
- #loadComplete;
196
- #hasLoaded = false;
197
- #isLoaded = false;
198
- #nativeEl;
199
- #standinEl;
200
-
201
- constructor() {
202
- super();
203
-
204
- if (!this.shadowRoot) {
205
- this.attachShadow({ mode: 'open' });
206
- this.shadowRoot.append(this.constructor.template.content.cloneNode(true));
207
- }
208
-
209
- // If a load method is provided in the child class create a load promise.
210
- if (this.load !== SuperMedia.prototype.load) {
211
- this.loadComplete = new PublicPromise();
212
- }
213
-
214
- // If the custom element is defined before the custom element's HTML is parsed
215
- // no attributes will be available in the constructor (construction process).
216
- // Wait until initializing in the attributeChangedCallback or
217
- // connectedCallback or accessing any properties.
218
- }
219
-
220
- get loadComplete() {
221
- return this.#loadComplete;
222
- }
223
-
224
- set loadComplete(promise) {
225
- this.#isLoaded = false;
226
- this.#loadComplete = promise;
227
- promise?.then(() => {
228
- this.#isLoaded = true;
229
- });
230
- }
231
-
232
- get isLoaded() {
233
- return this.#isLoaded;
234
- }
235
-
236
- get nativeEl() {
237
- return this.#nativeEl
238
- ?? this.shadowRoot.querySelector(tag)
239
- ?? this.querySelector(tag);
240
- }
241
-
242
- set nativeEl(val) {
243
- this.#nativeEl = val;
244
- }
245
-
246
- get defaultMuted() {
247
- return this.hasAttribute('muted');
248
- }
249
-
250
- set defaultMuted(val) {
251
- this.toggleAttribute('muted', Boolean(val));
252
- }
253
-
254
- get src() {
255
- return this.getAttribute('src');
256
- }
257
-
258
- set src(val) {
259
- this.setAttribute('src', `${val}`);
260
- }
261
-
262
- get preload() {
263
- return this.getAttribute('preload') ?? this.nativeEl?.preload;
264
- }
265
-
266
- set preload(val) {
267
- this.setAttribute('preload', `${val}`);
268
- }
269
-
270
- async #init() {
271
- if (this.#isInit) return;
272
- this.#isInit = true;
273
-
274
- this.#initStandinEl();
275
- this.#initNativeEl();
276
-
277
- for (let prop of nativeElProps)
278
- this.#upgradeProperty(prop);
279
-
280
- // Keep some native child elements like track and source in sync.
281
- const childMap = new Map();
282
- // An unnamed <slot> will be filled with all of the custom element's
283
- // top-level child nodes that do not have the slot attribute.
284
- const slotEl = this.shadowRoot.querySelector('slot:not([name])');
285
- slotEl?.addEventListener('slotchange', () => {
286
- const removeNativeChildren = new Map(childMap);
287
- slotEl
288
- .assignedElements()
289
- .filter((el) => ['track', 'source'].includes(el.localName))
290
- .forEach(async (el) => {
291
- // If the source or track is still in the assigned elements keep it.
292
- removeNativeChildren.delete(el);
293
- // Re-use clones if possible.
294
- let clone = childMap.get(el);
295
- if (!clone) {
296
- clone = el.cloneNode();
297
- childMap.set(el, clone);
298
- }
299
- if (this.loadComplete && !this.isLoaded) await this.loadComplete;
300
- this.nativeEl.append?.(clone);
301
- });
302
- removeNativeChildren.forEach((el) => el.remove());
303
- });
304
-
305
- // The video events are dispatched on the SuperMediaElement instance.
306
- // This makes it possible to add event listeners before the element is upgraded.
307
- for (let type of this.constructor.Events) {
308
- this.shadowRoot.addEventListener?.(type, (evt) => {
309
- if (evt.target !== this.nativeEl) return;
310
- this.dispatchEvent(new CustomEvent(evt.type, { detail: evt.detail }));
311
- }, true);
312
- }
313
- }
314
-
315
- #upgradeProperty(prop) {
316
- // Sets properties that are set before the custom element is upgraded.
317
- // https://web.dev/custom-elements-best-practices/#make-properties-lazy
318
- if (Object.prototype.hasOwnProperty.call(this, prop)) {
319
- const value = this[prop];
320
- // Delete the set property from this instance.
321
- delete this[prop];
322
- // Set the value again via the (prototype) setter on this class.
323
- this[prop] = value;
324
- }
325
- }
326
-
327
- #initStandinEl() {
328
- // Neither Chrome or Firefox support setting the muted attribute
329
- // after using document.createElement.
330
- // Get around this by setting the muted property manually.
331
- const dummyEl = document.createElement(tag, { is });
332
- dummyEl.muted = this.hasAttribute('muted');
333
-
334
- for (let { name, value } of this.attributes) {
335
- dummyEl.setAttribute(name, value);
336
- }
337
-
338
- this.#standinEl = {};
339
- for (let name of getNativeElProps(dummyEl)) {
340
- this.#standinEl[name] = dummyEl[name];
341
- }
342
-
343
- // unload dummy video element
344
- dummyEl.removeAttribute('src');
345
- dummyEl.load();
346
- }
347
-
348
- async #initNativeEl() {
349
- if (this.loadComplete && !this.isLoaded) await this.loadComplete;
350
-
351
- // If there is no nativeEl by now, create it our bloody selves.
352
- if (!this.nativeEl) {
353
- const nativeEl = document.createElement(tag, { is });
354
- nativeEl.part = tag;
355
- this.shadowRoot.append(nativeEl);
356
- }
357
-
358
- // Neither Chrome or Firefox support setting the muted attribute
359
- // after using document.createElement.
360
- // Get around this by setting the muted property manually.
361
- this.nativeEl.muted = this.hasAttribute('muted');
362
- }
363
-
364
- attributeChangedCallback(attrName, oldValue, newValue) {
365
- // Initialize right after construction when the attributes become available.
366
- this.#init();
367
-
368
- // Only call loadSrc when the super class has a load method.
369
- if (attrName === 'src' && this.load !== SuperMedia.prototype.load) {
370
- this.#loadSrc();
371
- }
372
-
373
- this.#forwardAttribute(attrName, oldValue, newValue);
374
- }
375
-
376
- async #loadSrc() {
377
- // The first time we use the Promise created in the constructor.
378
- if (this.#hasLoaded) this.loadComplete = new PublicPromise();
379
- this.#hasLoaded = true;
380
-
381
- // Wait 1 tick to allow other attributes to be set.
382
- await Promise.resolve();
383
- await this.load();
384
-
385
- this.loadComplete?.resolve();
386
- await this.loadComplete;
387
- }
388
-
389
- async #forwardAttribute(attrName, oldValue, newValue) {
390
- if (this.loadComplete && !this.isLoaded) await this.loadComplete;
391
-
392
- // Ignore a few that don't need to be passed & skipped attributes.
393
- // e.g. src: native element is using MSE and has a blob url as src attribute.
394
- if (['id', 'class', ...this.constructor.skipAttributes].includes(attrName)) {
395
- return;
396
- }
397
-
398
- if (newValue === null) {
399
- this.nativeEl.removeAttribute?.(attrName);
400
- } else {
401
- this.nativeEl.setAttribute?.(attrName, newValue);
402
- }
403
- }
404
-
405
- connectedCallback() {
406
- this.#init();
407
- }
408
- };
409
- };
410
-
411
- function getNativeElProps(nativeElTest) {
412
- // Map all native element properties to the custom element
413
- // so that they're applied to the native element.
414
- // Skipping HTMLElement because of things like "attachShadow"
415
- // causing issues. Most of those props still need to apply to
416
- // the custom element.
417
- let nativeElProps = [];
418
-
419
- // Walk the prototype chain up to HTMLElement.
420
- // This will grab all super class props in between.
421
- // i.e. VideoElement and MediaElement
422
- for (
423
- let proto = Object.getPrototypeOf(nativeElTest);
424
- proto && proto !== HTMLElement.prototype;
425
- proto = Object.getPrototypeOf(proto)
426
- ) {
427
- nativeElProps.push(...Object.getOwnPropertyNames(proto));
428
- }
429
-
430
- return nativeElProps;
431
- }
432
-
433
- /**
434
- * A utility to create Promises with convenient public resolve and reject methods.
435
- * @return {Promise}
436
- */
437
- class PublicPromise extends Promise {
438
- constructor(executor = () => {}) {
439
- let res, rej;
440
- super((resolve, reject) => {
441
- executor(resolve, reject);
442
- res = resolve;
443
- rej = reject;
444
- });
445
- this.resolve = res;
446
- this.reject = rej;
447
- }
448
- }
449
-
450
- const SuperVideoElement = globalThis.document ? SuperMediaMixin(HTMLElement, { tag: 'video' }) : class {};
451
-
452
- const SuperAudioElement = globalThis.document ? SuperMediaMixin(HTMLElement, { tag: 'audio' }) : class {};
453
-
454
-
455
- }),
456
- "./node_modules/wistia-video-element/dist/react.js": (function (__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) {
457
- __webpack_require__.r(__webpack_exports__);
458
- __webpack_require__.d(__webpack_exports__, {
459
- "default": () => (react_default)
460
- });
461
- /* import */var react__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__("./node_modules/react/index.js");
462
- /* import */var _wistia_video_element_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__("./node_modules/wistia-video-element/dist/wistia-video-element.js");
463
- "use client";
464
-
465
- // dist/react.ts
466
-
467
-
468
-
469
- // ../../node_modules/ce-la-react/dist/ce-la-react.js
470
- var reservedReactProps = /* @__PURE__ */ new Set([
471
- "style",
472
- "children",
473
- "ref",
474
- "key",
475
- "suppressContentEditableWarning",
476
- "suppressHydrationWarning",
477
- "dangerouslySetInnerHTML"
478
- ]);
479
- var reactPropToAttrNameMap = {
480
- className: "class",
481
- htmlFor: "for"
482
- };
483
- function defaultToAttributeName(propName) {
484
- return propName.toLowerCase();
485
- }
486
- function defaultToAttributeValue(propValue) {
487
- if (typeof propValue === "boolean") return propValue ? "" : void 0;
488
- if (typeof propValue === "function") return void 0;
489
- if (typeof propValue === "object" && propValue !== null) return void 0;
490
- return propValue;
491
- }
492
- function createComponent({
493
- react: React2,
494
- tagName,
495
- elementClass,
496
- events,
497
- displayName,
498
- defaultProps,
499
- toAttributeName = defaultToAttributeName,
500
- toAttributeValue = defaultToAttributeValue
501
- }) {
502
- const IS_REACT_19_OR_NEWER = Number.parseInt(React2.version) >= 19;
503
- const ReactComponent = React2.forwardRef((props, ref) => {
504
- var _a, _b;
505
- const elementRef = React2.useRef(null);
506
- const prevElemPropsRef = React2.useRef(/* @__PURE__ */ new Map());
507
- const eventProps = {};
508
- const attrs = {};
509
- const reactProps = {};
510
- const elementProps = {};
511
- for (const [k, v] of Object.entries(props)) {
512
- if (reservedReactProps.has(k)) {
513
- reactProps[k] = v;
514
- continue;
515
- }
516
- const attrName = toAttributeName(reactPropToAttrNameMap[k] ?? k);
517
- if (elementClass.prototype && k in elementClass.prototype && !(k in (((_a = globalThis.HTMLElement) == null ? void 0 : _a.prototype) ?? {})) && !((_b = elementClass.observedAttributes) == null ? void 0 : _b.some((attr) => attr === attrName))) {
518
- elementProps[k] = v;
519
- continue;
520
- }
521
- if (k.startsWith("on")) {
522
- eventProps[k] = v;
523
- continue;
524
- }
525
- const attrValue = toAttributeValue(v);
526
- if (attrName && attrValue != null) {
527
- attrs[attrName] = String(attrValue);
528
- if (!IS_REACT_19_OR_NEWER) {
529
- reactProps[attrName] = attrValue;
530
- }
531
- }
532
- if (attrName && IS_REACT_19_OR_NEWER) {
533
- const attrValueFromDefault = defaultToAttributeValue(v);
534
- if (attrValue !== attrValueFromDefault) {
535
- reactProps[attrName] = attrValue;
536
- } else {
537
- reactProps[attrName] = v;
538
- }
539
- }
540
- }
541
- if (typeof window !== "undefined") {
542
- for (const propName in eventProps) {
543
- const callback = eventProps[propName];
544
- const useCapture = propName.endsWith("Capture");
545
- const eventName = ((events == null ? void 0 : events[propName]) ?? propName.slice(2).toLowerCase()).slice(
546
- 0,
547
- useCapture ? -7 : void 0
548
- );
549
- React2.useLayoutEffect(() => {
550
- const eventTarget = elementRef == null ? void 0 : elementRef.current;
551
- if (!eventTarget || typeof callback !== "function") return;
552
- eventTarget.addEventListener(eventName, callback, useCapture);
553
- return () => {
554
- eventTarget.removeEventListener(eventName, callback, useCapture);
555
- };
556
- }, [elementRef == null ? void 0 : elementRef.current, callback]);
557
- }
558
- React2.useLayoutEffect(() => {
559
- if (elementRef.current === null) return;
560
- const newElemProps = /* @__PURE__ */ new Map();
561
- for (const key in elementProps) {
562
- setProperty(elementRef.current, key, elementProps[key]);
563
- prevElemPropsRef.current.delete(key);
564
- newElemProps.set(key, elementProps[key]);
565
- }
566
- for (const [key, _value] of prevElemPropsRef.current) {
567
- setProperty(elementRef.current, key, void 0);
568
- }
569
- prevElemPropsRef.current = newElemProps;
570
- });
571
- }
572
- if (typeof window === "undefined" && (elementClass == null ? void 0 : elementClass.getTemplateHTML) && (elementClass == null ? void 0 : elementClass.shadowRootOptions)) {
573
- const { mode, delegatesFocus } = elementClass.shadowRootOptions;
574
- const templateShadowRoot = React2.createElement("template", {
575
- shadowrootmode: mode,
576
- shadowrootdelegatesfocus: delegatesFocus,
577
- dangerouslySetInnerHTML: {
578
- __html: elementClass.getTemplateHTML(attrs, props)
579
- }
580
- });
581
- reactProps.children = [templateShadowRoot, reactProps.children];
582
- }
583
- return React2.createElement(tagName, {
584
- ...defaultProps,
585
- ...reactProps,
586
- ref: React2.useCallback(
587
- (node) => {
588
- elementRef.current = node;
589
- if (typeof ref === "function") {
590
- ref(node);
591
- } else if (ref !== null) {
592
- ref.current = node;
593
- }
594
- },
595
- [ref]
596
- )
597
- });
598
- });
599
- ReactComponent.displayName = displayName ?? elementClass.name;
600
- return ReactComponent;
601
- }
602
- function setProperty(node, name, value) {
603
- var _a;
604
- node[name] = value;
605
- if (value == null && name in (((_a = globalThis.HTMLElement) == null ? void 0 : _a.prototype) ?? {})) {
606
- node.removeAttribute(name);
607
- }
608
- }
609
-
610
- // dist/react.ts
611
- var react_default = createComponent({
612
- react: react__WEBPACK_IMPORTED_MODULE_0__,
613
- tagName: "wistia-video",
614
- elementClass: _wistia_video_element_js__WEBPACK_IMPORTED_MODULE_1__["default"],
615
- toAttributeName(propName) {
616
- if (propName === "muted") return "";
617
- if (propName === "defaultMuted") return "muted";
618
- return defaultToAttributeName(propName);
619
- }
620
- });
621
-
622
- /*! Bundled license information:
623
-
624
- ce-la-react/dist/ce-la-react.js:
625
- (**
626
- * @license
627
- * Copyright 2018 Google LLC
628
- * SPDX-License-Identifier: BSD-3-Clause
629
- *
630
- * Modified version of `@lit/react` for vanilla custom elements with support for SSR.
631
- *)
632
- */
633
-
634
-
635
- }),
636
- "./node_modules/wistia-video-element/dist/wistia-video-element.js": (function (__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) {
637
- __webpack_require__.r(__webpack_exports__);
638
- __webpack_require__.d(__webpack_exports__, {
639
- "default": () => (wistia_video_element_default),
640
- uniqueId: () => (uniqueId)
641
- });
642
- /* import */var super_media_element__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__("./node_modules/super-media-element/super-media-element.js");
643
- var _a, _b;
644
-
645
- const templateLightDOM = (_a = globalThis.document) == null ? void 0 : _a.createElement("template");
646
- if (templateLightDOM) {
647
- templateLightDOM.innerHTML = /*html*/
648
- `
649
- <div class="wistia_embed"></div>
650
- `;
651
- }
652
- const templateShadowDOM = (_b = globalThis.document) == null ? void 0 : _b.createElement("template");
653
- if (templateShadowDOM) {
654
- templateShadowDOM.innerHTML = /*html*/
655
- `
656
- <style>
657
- :host {
658
- display: inline-block;
659
- min-width: 300px;
660
- min-height: 150px;
661
- position: relative;
662
- }
663
- ::slotted(.wistia_embed) {
664
- position: absolute;
665
- width: 100%;
666
- height: 100%;
667
- }
668
- </style>
669
- <slot></slot>
670
- `;
671
- }
672
- class WistiaVideoElement extends super_media_element__WEBPACK_IMPORTED_MODULE_0__.SuperVideoElement {
673
- static template = templateShadowDOM;
674
- static skipAttributes = ["src"];
675
- get nativeEl() {
676
- var _a2;
677
- return ((_a2 = this.api) == null ? void 0 : _a2.elem()) ?? this.querySelector("video");
678
- }
679
- async load() {
680
- var _a2;
681
- (_a2 = this.querySelector(".wistia_embed")) == null ? void 0 : _a2.remove();
682
- if (!this.src) {
683
- return;
684
- }
685
- await new Promise((resolve) => setTimeout(resolve, 50));
686
- const MATCH_SRC = /(?:wistia\.com|wi\.st)\/(?:medias|embed)\/(.*)$/i;
687
- const id = this.src.match(MATCH_SRC)[1];
688
- const options = {
689
- autoPlay: this.autoplay,
690
- preload: this.preload ?? "metadata",
691
- playsinline: this.playsInline,
692
- endVideoBehavior: this.loop && "loop",
693
- chromeless: !this.controls,
694
- playButton: this.controls,
695
- muted: this.defaultMuted
696
- };
697
- this.append(templateLightDOM.content.cloneNode(true));
698
- const div = this.querySelector(".wistia_embed");
699
- if (!div.id) div.id = uniqueId(id);
700
- div.classList.add(`wistia_async_${id}`);
701
- const scriptUrl = "https://fast.wistia.com/assets/external/E-v1.js";
702
- await loadScript(scriptUrl, "Wistia");
703
- this.api = await new Promise((onReady) => {
704
- globalThis._wq.push({
705
- id: div.id,
706
- onReady,
707
- options
708
- });
709
- });
710
- }
711
- async attributeChangedCallback(attrName, oldValue, newValue) {
712
- if (attrName === "controls") {
713
- await this.loadComplete;
714
- switch (attrName) {
715
- case "controls":
716
- this.api.bigPlayButtonEnabled(this.controls);
717
- this.controls ? this.api.releaseChromeless() : this.api.requestChromeless();
718
- break;
719
- }
720
- return;
721
- }
722
- super.attributeChangedCallback(attrName, oldValue, newValue);
723
- }
724
- // Override some methods w/ defaults if the video element is not ready yet when called.
725
- // Some methods require the Wistia API instead of the native video element API.
726
- get duration() {
727
- var _a2;
728
- return (_a2 = this.api) == null ? void 0 : _a2.duration();
729
- }
730
- async play() {
731
- await this.loadComplete;
732
- this.api.play();
733
- return new Promise((resolve) => this.addEventListener("playing", resolve));
734
- }
735
- }
736
- const loadScriptCache = {};
737
- async function loadScript(src, globalName) {
738
- if (!globalName) return import(
739
- /* webpackIgnore: true */
740
- src
741
- );
742
- if (loadScriptCache[src]) return loadScriptCache[src];
743
- if (self[globalName]) return self[globalName];
744
- return loadScriptCache[src] = new Promise((resolve, reject) => {
745
- const script = document.createElement("script");
746
- script.defer = true;
747
- script.src = src;
748
- script.onload = () => resolve(self[globalName]);
749
- script.onerror = reject;
750
- document.head.append(script);
751
- });
752
- }
753
- let idCounter = 0;
754
- function uniqueId(prefix) {
755
- const id = ++idCounter;
756
- return `${prefix}${id}`;
757
- }
758
- if (globalThis.customElements && !globalThis.customElements.get("wistia-video")) {
759
- globalThis.customElements.define("wistia-video", WistiaVideoElement);
760
- }
761
- var wistia_video_element_default = WistiaVideoElement;
762
-
763
-
764
-
765
- }),
766
-
767
- }]);
768
- //# sourceMappingURL=reactPlayerWistia.js.map