@ix_waterford/lib 1.0.5 → 1.0.7

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 (52) hide show
  1. package/dist/{static/js/async → async}/reactPlayerDash.js +3 -4
  2. package/dist/async/reactPlayerDash.js.map +1 -0
  3. package/dist/{static/js/async → async}/reactPlayerHls.js +3 -4
  4. package/dist/async/reactPlayerHls.js.map +1 -0
  5. package/dist/{static/js/async → async}/reactPlayerMux.js +3 -4
  6. package/dist/async/reactPlayerMux.js.map +1 -0
  7. package/dist/{static/js/async → async}/reactPlayerPreview.js +6 -7
  8. package/dist/async/reactPlayerPreview.js.map +1 -0
  9. package/dist/{static/js/async → async}/reactPlayerSpotify.js +3 -4
  10. package/dist/async/reactPlayerSpotify.js.map +1 -0
  11. package/dist/{static/js/async → async}/reactPlayerTiktok.js +3 -4
  12. package/dist/async/reactPlayerTiktok.js.map +1 -0
  13. package/dist/{static/js/async → async}/reactPlayerTwitch.js +3 -4
  14. package/dist/async/reactPlayerTwitch.js.map +1 -0
  15. package/dist/{static/js/async → async}/reactPlayerVimeo.js +3 -4
  16. package/dist/async/reactPlayerVimeo.js.map +1 -0
  17. package/dist/{static/js/async → async}/reactPlayerWistia.js +3 -4
  18. package/dist/async/reactPlayerWistia.js.map +1 -0
  19. package/dist/{static/js/async → async}/reactPlayerYouTube.js +3 -4
  20. package/dist/async/reactPlayerYouTube.js.map +1 -0
  21. package/dist/{static/js/async → async}/vendors-node_modules_custom-media-element_dist_custom-media-element_js-node_modules_media-tra-835023.js +1 -2
  22. package/dist/async/vendors-node_modules_custom-media-element_dist_custom-media-element_js-node_modules_media-tra-835023.js.map +1 -0
  23. package/dist/{static/js/async → async}/vendors-node_modules_dashjs_dist_modern_esm_dash_all_min_js.js +1 -2
  24. package/dist/async/vendors-node_modules_dashjs_dist_modern_esm_dash_all_min_js.js.map +1 -0
  25. package/dist/{static/js/async → async}/vendors-node_modules_hls_js_dist_hls_mjs.js +1 -2
  26. package/dist/async/vendors-node_modules_hls_js_dist_hls_mjs.js.map +1 -0
  27. package/dist/index.html +1 -1
  28. package/dist/{static/js/index.js → index.js} +360 -364
  29. package/dist/index.js.map +1 -0
  30. package/dist/lib-react.js +1462 -0
  31. package/dist/lib-react.js.map +1 -0
  32. package/dist/vendors-node_modules_rspack_core_dist_cssExtractHmr_js-node_modules_dayjs_plugin_utc_js-node_-5eb95d.js +53062 -0
  33. package/dist/vendors-node_modules_rspack_core_dist_cssExtractHmr_js-node_modules_dayjs_plugin_utc_js-node_-5eb95d.js.map +1 -0
  34. package/package.json +5 -5
  35. package/dist/static/js/async/reactPlayerDash.js.map +0 -1
  36. package/dist/static/js/async/reactPlayerHls.js.map +0 -1
  37. package/dist/static/js/async/reactPlayerMux.js.map +0 -1
  38. package/dist/static/js/async/reactPlayerPreview.js.map +0 -1
  39. package/dist/static/js/async/reactPlayerSpotify.js.map +0 -1
  40. package/dist/static/js/async/reactPlayerTiktok.js.map +0 -1
  41. package/dist/static/js/async/reactPlayerTwitch.js.map +0 -1
  42. package/dist/static/js/async/reactPlayerVimeo.js.map +0 -1
  43. package/dist/static/js/async/reactPlayerWistia.js.map +0 -1
  44. package/dist/static/js/async/reactPlayerYouTube.js.map +0 -1
  45. 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
  46. package/dist/static/js/async/vendors-node_modules_dashjs_dist_modern_esm_dash_all_min_js.js.map +0 -1
  47. package/dist/static/js/async/vendors-node_modules_hls_js_dist_hls_mjs.js.map +0 -1
  48. package/dist/static/js/index.js.map +0 -1
  49. package/dist/static/js/lib-react.js +0 -3235
  50. package/dist/static/js/lib-react.js.map +0 -1
  51. package/dist/static/js/vendors-node_modules_rspack_core_dist_cssExtractHmr_js-node_modules_dayjs_plugin_utc_js-node_-897cfa.js +0 -113737
  52. 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,11 +1,10 @@
1
- "use strict";
2
1
  (self["webpackChunk_ix_waterford_lib"] = self["webpackChunk_ix_waterford_lib"] || []).push([["reactPlayerPreview"], {
3
2
  "./node_modules/react-player/dist/Preview.js": (function (__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) {
4
3
  __webpack_require__.r(__webpack_exports__);
5
4
  __webpack_require__.d(__webpack_exports__, {
6
5
  "default": () => (Preview_default)
7
6
  });
8
- /* import */var react__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__("./node_modules/react/index.js");
7
+ /* import */var react__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__("react");
9
8
 
10
9
  const ICON_SIZE = "64px";
11
10
  const cache = {};
@@ -28,7 +27,7 @@ const Preview = ({
28
27
  light: light2,
29
28
  oEmbedUrl: oEmbedUrl2
30
29
  }) => {
31
- if (react__WEBPACK_IMPORTED_MODULE_0__.isValidElement(light2)) {
30
+ if (react__WEBPACK_IMPORTED_MODULE_0__["default"].isValidElement(light2)) {
32
31
  return;
33
32
  }
34
33
  if (typeof light2 === "string") {
@@ -56,7 +55,7 @@ const Preview = ({
56
55
  const handleClick = (e) => {
57
56
  onClickPreview == null ? void 0 : onClickPreview(e);
58
57
  };
59
- const isElement = react__WEBPACK_IMPORTED_MODULE_0__.isValidElement(light);
58
+ const isElement = react__WEBPACK_IMPORTED_MODULE_0__["default"].isValidElement(light);
60
59
  const flexCenter = {
61
60
  display: "flex",
62
61
  alignItems: "center",
@@ -87,8 +86,8 @@ const Preview = ({
87
86
  marginLeft: "7px"
88
87
  }
89
88
  };
90
- const defaultPlayIcon = /* @__PURE__ */ react__WEBPACK_IMPORTED_MODULE_0__.createElement("div", { style: styles.shadow, className: "react-player__shadow" }, /* @__PURE__ */ react__WEBPACK_IMPORTED_MODULE_0__.createElement("div", { style: styles.playIcon, className: "react-player__play-icon" }));
91
- return /* @__PURE__ */ react__WEBPACK_IMPORTED_MODULE_0__.createElement(
89
+ const defaultPlayIcon = /* @__PURE__ */ react__WEBPACK_IMPORTED_MODULE_0__["default"].createElement("div", { style: styles.shadow, className: "react-player__shadow" }, /* @__PURE__ */ react__WEBPACK_IMPORTED_MODULE_0__["default"].createElement("div", { style: styles.playIcon, className: "react-player__play-icon" }));
90
+ return /* @__PURE__ */ react__WEBPACK_IMPORTED_MODULE_0__["default"].createElement(
92
91
  "div",
93
92
  {
94
93
  style: styles.preview,
@@ -108,5 +107,5 @@ var Preview_default = Preview;
108
107
 
109
108
  }),
110
109
 
111
- }]);
110
+ }])
112
111
  //# sourceMappingURL=reactPlayerPreview.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"async/reactPlayerPreview.js","sources":["/Users/kirubakaran.r/Documents/projects/hub/components/waterford_library/node_modules/react-player/dist/Preview.js"],"sourcesContent":["import React, { useState, useEffect } from \"react\";\nconst ICON_SIZE = \"64px\";\nconst cache = {};\nconst Preview = ({\n src,\n light,\n oEmbedUrl,\n onClickPreview,\n playIcon,\n previewTabIndex,\n previewAriaLabel\n}) => {\n const [image, setImage] = useState(null);\n useEffect(() => {\n if (!src || !light || !oEmbedUrl) return;\n fetchImage({ src, light, oEmbedUrl });\n }, [src, light, oEmbedUrl]);\n const fetchImage = async ({\n src: src2,\n light: light2,\n oEmbedUrl: oEmbedUrl2\n }) => {\n if (React.isValidElement(light2)) {\n return;\n }\n if (typeof light2 === \"string\") {\n setImage(light2);\n return;\n }\n if (cache[src2]) {\n setImage(cache[src2]);\n return;\n }\n setImage(null);\n const response = await fetch(oEmbedUrl2.replace(\"{url}\", src2));\n const data = await response.json();\n if (data.thumbnail_url) {\n const fetchedImage = data.thumbnail_url.replace(\"height=100\", \"height=480\").replace(\"-d_295x166\", \"-d_640\");\n setImage(fetchedImage);\n cache[src2] = fetchedImage;\n }\n };\n const handleKeyPress = (e) => {\n if (e.key === \"Enter\" || e.key === \" \") {\n onClickPreview == null ? void 0 : onClickPreview(e);\n }\n };\n const handleClick = (e) => {\n onClickPreview == null ? void 0 : onClickPreview(e);\n };\n const isElement = React.isValidElement(light);\n const flexCenter = {\n display: \"flex\",\n alignItems: \"center\",\n justifyContent: \"center\"\n };\n const styles = {\n preview: {\n width: \"100%\",\n height: \"100%\",\n backgroundImage: image && !isElement ? `url(${image})` : void 0,\n backgroundSize: \"cover\",\n backgroundPosition: \"center\",\n cursor: \"pointer\",\n ...flexCenter\n },\n shadow: {\n background: \"radial-gradient(rgb(0, 0, 0, 0.3), rgba(0, 0, 0, 0) 60%)\",\n borderRadius: ICON_SIZE,\n width: ICON_SIZE,\n height: ICON_SIZE,\n position: isElement ? \"absolute\" : void 0,\n ...flexCenter\n },\n playIcon: {\n borderStyle: \"solid\",\n borderWidth: \"16px 0 16px 26px\",\n borderColor: \"transparent transparent transparent white\",\n marginLeft: \"7px\"\n }\n };\n const defaultPlayIcon = /* @__PURE__ */ React.createElement(\"div\", { style: styles.shadow, className: \"react-player__shadow\" }, /* @__PURE__ */ React.createElement(\"div\", { style: styles.playIcon, className: \"react-player__play-icon\" }));\n return /* @__PURE__ */ React.createElement(\n \"div\",\n {\n style: styles.preview,\n className: \"react-player__preview\",\n tabIndex: previewTabIndex,\n onClick: handleClick,\n onKeyDown: handleKeyPress,\n ...previewAriaLabel ? { \"aria-label\": previewAriaLabel } : {}\n },\n isElement ? light : null,\n playIcon || defaultPlayIcon\n );\n};\nvar Preview_default = Preview;\nexport {\n Preview_default as default\n};\n"],"names":[],"mappings":";;;;;;;AAAA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AAGA"}
@@ -1,11 +1,10 @@
1
- "use strict";
2
1
  (self["webpackChunk_ix_waterford_lib"] = self["webpackChunk_ix_waterford_lib"] || []).push([["reactPlayerSpotify"], {
3
2
  "./node_modules/spotify-audio-element/dist/react.js": (function (__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) {
4
3
  __webpack_require__.r(__webpack_exports__);
5
4
  __webpack_require__.d(__webpack_exports__, {
6
5
  "default": () => (react_default)
7
6
  });
8
- /* import */var react__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__("./node_modules/react/index.js");
7
+ /* import */var react__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__("react");
9
8
  /* import */var _spotify_audio_element_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__("./node_modules/spotify-audio-element/dist/spotify-audio-element.js");
10
9
  "use client";
11
10
 
@@ -156,7 +155,7 @@ function setProperty(node, name, value) {
156
155
 
157
156
  // dist/react.ts
158
157
  var react_default = createComponent({
159
- react: react__WEBPACK_IMPORTED_MODULE_0__,
158
+ react: react__WEBPACK_IMPORTED_MODULE_0__["default"],
160
159
  tagName: "spotify-audio",
161
160
  elementClass: _spotify_audio_element_js__WEBPACK_IMPORTED_MODULE_1__["default"],
162
161
  toAttributeName(propName) {
@@ -515,5 +514,5 @@ var spotify_audio_element_default = SpotifyAudioElement;
515
514
 
516
515
  }),
517
516
 
518
- }]);
517
+ }])
519
518
  //# sourceMappingURL=reactPlayerSpotify.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"async/reactPlayerSpotify.js","sources":["/Users/kirubakaran.r/Documents/projects/hub/components/waterford_library/node_modules/spotify-audio-element/dist/react.js","/Users/kirubakaran.r/Documents/projects/hub/components/waterford_library/node_modules/spotify-audio-element/dist/spotify-audio-element.js"],"sourcesContent":["\"use client\";\n\n// dist/react.ts\nimport React from \"react\";\nimport CustomMediaElement from \"./spotify-audio-element.js\";\n\n// ../../node_modules/ce-la-react/dist/ce-la-react.js\nvar reservedReactProps = /* @__PURE__ */ new Set([\n \"style\",\n \"children\",\n \"ref\",\n \"key\",\n \"suppressContentEditableWarning\",\n \"suppressHydrationWarning\",\n \"dangerouslySetInnerHTML\"\n]);\nvar reactPropToAttrNameMap = {\n className: \"class\",\n htmlFor: \"for\"\n};\nfunction defaultToAttributeName(propName) {\n return propName.toLowerCase();\n}\nfunction defaultToAttributeValue(propValue) {\n if (typeof propValue === \"boolean\") return propValue ? \"\" : void 0;\n if (typeof propValue === \"function\") return void 0;\n if (typeof propValue === \"object\" && propValue !== null) return void 0;\n return propValue;\n}\nfunction createComponent({\n react: React2,\n tagName,\n elementClass,\n events,\n displayName,\n defaultProps,\n toAttributeName = defaultToAttributeName,\n toAttributeValue = defaultToAttributeValue\n}) {\n const IS_REACT_19_OR_NEWER = Number.parseInt(React2.version) >= 19;\n const ReactComponent = React2.forwardRef((props, ref) => {\n var _a, _b;\n const elementRef = React2.useRef(null);\n const prevElemPropsRef = React2.useRef(/* @__PURE__ */ new Map());\n const eventProps = {};\n const attrs = {};\n const reactProps = {};\n const elementProps = {};\n for (const [k, v] of Object.entries(props)) {\n if (reservedReactProps.has(k)) {\n reactProps[k] = v;\n continue;\n }\n const attrName = toAttributeName(reactPropToAttrNameMap[k] ?? k);\n 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))) {\n elementProps[k] = v;\n continue;\n }\n if (k.startsWith(\"on\")) {\n eventProps[k] = v;\n continue;\n }\n const attrValue = toAttributeValue(v);\n if (attrName && attrValue != null) {\n attrs[attrName] = String(attrValue);\n if (!IS_REACT_19_OR_NEWER) {\n reactProps[attrName] = attrValue;\n }\n }\n if (attrName && IS_REACT_19_OR_NEWER) {\n const attrValueFromDefault = defaultToAttributeValue(v);\n if (attrValue !== attrValueFromDefault) {\n reactProps[attrName] = attrValue;\n } else {\n reactProps[attrName] = v;\n }\n }\n }\n if (typeof window !== \"undefined\") {\n for (const propName in eventProps) {\n const callback = eventProps[propName];\n const useCapture = propName.endsWith(\"Capture\");\n const eventName = ((events == null ? void 0 : events[propName]) ?? propName.slice(2).toLowerCase()).slice(\n 0,\n useCapture ? -7 : void 0\n );\n React2.useLayoutEffect(() => {\n const eventTarget = elementRef == null ? void 0 : elementRef.current;\n if (!eventTarget || typeof callback !== \"function\") return;\n eventTarget.addEventListener(eventName, callback, useCapture);\n return () => {\n eventTarget.removeEventListener(eventName, callback, useCapture);\n };\n }, [elementRef == null ? void 0 : elementRef.current, callback]);\n }\n React2.useLayoutEffect(() => {\n if (elementRef.current === null) return;\n const newElemProps = /* @__PURE__ */ new Map();\n for (const key in elementProps) {\n setProperty(elementRef.current, key, elementProps[key]);\n prevElemPropsRef.current.delete(key);\n newElemProps.set(key, elementProps[key]);\n }\n for (const [key, _value] of prevElemPropsRef.current) {\n setProperty(elementRef.current, key, void 0);\n }\n prevElemPropsRef.current = newElemProps;\n });\n }\n if (typeof window === \"undefined\" && (elementClass == null ? void 0 : elementClass.getTemplateHTML) && (elementClass == null ? void 0 : elementClass.shadowRootOptions)) {\n const { mode, delegatesFocus } = elementClass.shadowRootOptions;\n const templateShadowRoot = React2.createElement(\"template\", {\n shadowrootmode: mode,\n shadowrootdelegatesfocus: delegatesFocus,\n dangerouslySetInnerHTML: {\n __html: elementClass.getTemplateHTML(attrs, props)\n }\n });\n reactProps.children = [templateShadowRoot, reactProps.children];\n }\n return React2.createElement(tagName, {\n ...defaultProps,\n ...reactProps,\n ref: React2.useCallback(\n (node) => {\n elementRef.current = node;\n if (typeof ref === \"function\") {\n ref(node);\n } else if (ref !== null) {\n ref.current = node;\n }\n },\n [ref]\n )\n });\n });\n ReactComponent.displayName = displayName ?? elementClass.name;\n return ReactComponent;\n}\nfunction setProperty(node, name, value) {\n var _a;\n node[name] = value;\n if (value == null && name in (((_a = globalThis.HTMLElement) == null ? void 0 : _a.prototype) ?? {})) {\n node.removeAttribute(name);\n }\n}\n\n// dist/react.ts\nvar react_default = createComponent({\n react: React,\n tagName: \"spotify-audio\",\n elementClass: CustomMediaElement,\n toAttributeName(propName) {\n if (propName === \"muted\") return \"\";\n if (propName === \"defaultMuted\") return \"muted\";\n return defaultToAttributeName(propName);\n }\n});\nexport {\n react_default as default\n};\n/*! Bundled license information:\n\nce-la-react/dist/ce-la-react.js:\n (**\n * @license\n * Copyright 2018 Google LLC\n * SPDX-License-Identifier: BSD-3-Clause\n *\n * Modified version of `@lit/react` for vanilla custom elements with support for SSR.\n *)\n*/\n","const EMBED_BASE = \"https://open.spotify.com\";\nconst MATCH_SRC = /open\\.spotify\\.com\\/(\\w+)\\/(\\w+)/i;\nconst API_URL = \"https://open.spotify.com/embed-podcast/iframe-api/v1\";\nconst API_GLOBAL = \"SpotifyIframeApi\";\nconst API_GLOBAL_READY = \"onSpotifyIframeApiReady\";\nfunction getTemplateHTML(attrs, props = {}) {\n const iframeAttrs = {\n src: serializeIframeUrl(attrs, props),\n scrolling: \"no\",\n frameborder: 0,\n width: \"100%\",\n height: \"100%\",\n allow: \"accelerometer; fullscreen; autoplay; encrypted-media; gyroscope; picture-in-picture\"\n };\n return (\n /*html*/\n `\n <style>\n :host {\n display: inline-block;\n min-width: 160px;\n min-height: 80px;\n position: relative;\n }\n iframe {\n position: absolute;\n top: 0;\n left: 0;\n width: 100%;\n height: 100%;\n overflow: hidden;\n }\n :host(:not([controls])) {\n display: none !important;\n }\n </style>\n <iframe${serializeAttributes(iframeAttrs)}></iframe>\n `\n );\n}\nfunction serializeIframeUrl(attrs, props) {\n var _a, _b, _c;\n if (!attrs.src) return;\n const matches = attrs.src.match(MATCH_SRC);\n const type = matches && matches[1];\n const metaId = matches && matches[2];\n const params = {\n t: (_a = props.config) == null ? void 0 : _a.startAt,\n theme: ((_b = props.config) == null ? void 0 : _b.theme) === \"dark\" ? \"0\" : null\n };\n const videoPath = ((_c = props.config) == null ? void 0 : _c.preferVideo) ? \"/video\" : \"\";\n return `${EMBED_BASE}/embed/${type}/${metaId}${videoPath}?${serialize(params)}`;\n}\nclass SpotifyAudioElement extends (globalThis.HTMLElement ?? class {\n}) {\n static getTemplateHTML = getTemplateHTML;\n static shadowRootOptions = { mode: \"open\" };\n static observedAttributes = [\n \"controls\",\n \"loop\",\n \"src\"\n ];\n loadComplete = new PublicPromise();\n #loadRequested;\n #hasLoaded;\n #isInit;\n #isWaiting = false;\n #closeToEnded = false;\n #paused = true;\n #currentTime = 0;\n #duration = NaN;\n #seeking = false;\n #config = null;\n constructor() {\n super();\n this.#upgradeProperty(\"config\");\n }\n async load() {\n var _a, _b, _c;\n if (this.#loadRequested) return;\n if (this.#hasLoaded) this.loadComplete = new PublicPromise();\n this.#hasLoaded = true;\n await (this.#loadRequested = Promise.resolve());\n this.#loadRequested = null;\n this.#isWaiting = false;\n this.#closeToEnded = false;\n this.#currentTime = 0;\n this.#duration = NaN;\n this.#seeking = false;\n this.dispatchEvent(new Event(\"emptied\"));\n let oldApi = this.api;\n this.api = null;\n if (!this.src) {\n return;\n }\n this.dispatchEvent(new Event(\"loadstart\"));\n const options = {\n t: (_a = this.config) == null ? void 0 : _a.startAt,\n theme: ((_b = this.config) == null ? void 0 : _b.theme) === \"dark\" ? \"0\" : null,\n preferVideo: (_c = this.config) == null ? void 0 : _c.preferVideo\n };\n if (this.#isInit) {\n this.api = oldApi;\n this.api.iframeElement.src = serializeIframeUrl(namedNodeMapToObject(this.attributes), this);\n } else {\n this.#isInit = true;\n if (!this.shadowRoot) {\n this.attachShadow({ mode: \"open\" });\n this.shadowRoot.innerHTML = getTemplateHTML(namedNodeMapToObject(this.attributes), this);\n }\n let iframe = this.shadowRoot.querySelector(\"iframe\");\n const Spotify = await loadScript(API_URL, API_GLOBAL, API_GLOBAL_READY);\n this.api = await new Promise((resolve) => Spotify.createController(iframe, options, resolve));\n this.api.iframeElement = iframe;\n this.api.addListener(\"ready\", () => {\n this.dispatchEvent(new Event(\"loadedmetadata\"));\n this.dispatchEvent(new Event(\"durationchange\"));\n this.dispatchEvent(new Event(\"volumechange\"));\n });\n this.api.addListener(\"playback_update\", (event) => {\n if (this.#closeToEnded && this.#paused && (event.data.isBuffering || !event.data.isPaused)) {\n this.#closeToEnded = false;\n this.currentTime = 1;\n return;\n }\n if (event.data.duration / 1e3 !== this.#duration) {\n this.#closeToEnded = false;\n this.#duration = event.data.duration / 1e3;\n this.dispatchEvent(new Event(\"durationchange\"));\n }\n if (event.data.position / 1e3 !== this.#currentTime) {\n this.#seeking = false;\n this.#closeToEnded = false;\n this.#currentTime = event.data.position / 1e3;\n this.dispatchEvent(new Event(\"timeupdate\"));\n }\n if (!this.#isWaiting && !this.#paused && event.data.isPaused) {\n this.#paused = true;\n this.dispatchEvent(new Event(\"pause\"));\n return;\n }\n if (this.#paused && (event.data.isBuffering || !event.data.isPaused)) {\n this.#paused = false;\n this.dispatchEvent(new Event(\"play\"));\n this.#isWaiting = event.data.isBuffering;\n if (this.#isWaiting) {\n this.dispatchEvent(new Event(\"waiting\"));\n } else {\n this.dispatchEvent(new Event(\"playing\"));\n }\n return;\n }\n if (this.#isWaiting && !event.data.isPaused) {\n this.#isWaiting = false;\n this.dispatchEvent(new Event(\"playing\"));\n return;\n }\n if (!this.paused && !this.seeking && !this.#closeToEnded && Math.ceil(this.currentTime) >= this.duration) {\n this.#closeToEnded = true;\n if (this.loop) {\n this.currentTime = 1;\n return;\n }\n if (!this.continuous) {\n this.pause();\n this.dispatchEvent(new Event(\"ended\"));\n }\n return;\n }\n });\n }\n this.loadComplete.resolve();\n await this.loadComplete;\n }\n async attributeChangedCallback(attrName, oldValue, newValue) {\n if (oldValue === newValue) return;\n switch (attrName) {\n case \"src\": {\n this.load();\n return;\n }\n }\n }\n async play() {\n var _a;\n this.#paused = false;\n this.#isWaiting = true;\n this.dispatchEvent(new Event(\"play\"));\n await this.loadComplete;\n return (_a = this.api) == null ? void 0 : _a.resume();\n }\n async pause() {\n var _a;\n await this.loadComplete;\n return (_a = this.api) == null ? void 0 : _a.pause();\n }\n get config() {\n return this.#config;\n }\n set config(value) {\n this.#config = value;\n }\n get paused() {\n return this.#paused ?? true;\n }\n get muted() {\n return false;\n }\n set muted(val) {\n }\n get volume() {\n return 1;\n }\n set volume(val) {\n }\n get ended() {\n return Math.ceil(this.currentTime) >= this.duration;\n }\n get seeking() {\n return this.#seeking;\n }\n get loop() {\n return this.hasAttribute(\"loop\");\n }\n set loop(val) {\n if (this.loop == val) return;\n this.toggleAttribute(\"loop\", Boolean(val));\n }\n get currentTime() {\n return this.#currentTime;\n }\n set currentTime(val) {\n if (this.currentTime == val) return;\n this.#seeking = true;\n let oldTime = this.#currentTime;\n this.#currentTime = val;\n this.dispatchEvent(new Event(\"timeupdate\"));\n this.#currentTime = oldTime;\n this.loadComplete.then(() => {\n var _a;\n (_a = this.api) == null ? void 0 : _a.seek(val);\n });\n }\n get duration() {\n return this.#duration;\n }\n get src() {\n return this.getAttribute(\"src\");\n }\n set src(val) {\n this.setAttribute(\"src\", `${val}`);\n }\n // This is a pattern to update property values that are set before\n // the custom element is upgraded.\n // https://web.dev/custom-elements-best-practices/#make-properties-lazy\n #upgradeProperty(prop) {\n if (Object.prototype.hasOwnProperty.call(this, prop)) {\n const value = this[prop];\n delete this[prop];\n this[prop] = value;\n }\n }\n}\nfunction serializeAttributes(attrs) {\n let html = \"\";\n for (const key in attrs) {\n const value = attrs[key];\n if (value === \"\") html += ` ${key}`;\n else html += ` ${key}=\"${value}\"`;\n }\n return html;\n}\nfunction serialize(props) {\n return String(new URLSearchParams(boolToBinary(props)));\n}\nfunction boolToBinary(props) {\n let p = {};\n for (let key in props) {\n let val = props[key];\n if (val === true || val === \"\") p[key] = 1;\n else if (val === false) p[key] = 0;\n else if (val != null) p[key] = val;\n }\n return p;\n}\nfunction namedNodeMapToObject(namedNodeMap) {\n let obj = {};\n for (let attr of namedNodeMap) {\n obj[attr.name] = attr.value;\n }\n return obj;\n}\nconst loadScriptCache = {};\nasync function loadScript(src, globalName, readyFnName) {\n if (loadScriptCache[src]) return loadScriptCache[src];\n if (globalName && self[globalName]) {\n return Promise.resolve(self[globalName]);\n }\n return loadScriptCache[src] = new Promise(function(resolve, reject) {\n const script = document.createElement(\"script\");\n script.src = src;\n const ready = (api) => resolve(api);\n if (readyFnName) self[readyFnName] = ready;\n script.onload = () => !readyFnName && ready();\n script.onerror = reject;\n document.head.append(script);\n });\n}\nclass PublicPromise extends Promise {\n constructor(executor = () => {\n }) {\n let res, rej;\n super((resolve, reject) => {\n executor(resolve, reject);\n res = resolve;\n rej = reject;\n });\n this.resolve = res;\n this.reject = rej;\n }\n}\nif (globalThis.customElements && !globalThis.customElements.get(\"spotify-audio\")) {\n globalThis.customElements.define(\"spotify-audio\", SpotifyAudioElement);\n}\nvar spotify_audio_element_default = SpotifyAudioElement;\nexport {\n spotify_audio_element_default as default\n};\n"],"names":[],"mappings":";;;;;;;;AAAA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AAGA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;AC3KA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AAGA"}
@@ -1,11 +1,10 @@
1
- "use strict";
2
1
  (self["webpackChunk_ix_waterford_lib"] = self["webpackChunk_ix_waterford_lib"] || []).push([["reactPlayerTiktok"], {
3
2
  "./node_modules/tiktok-video-element/dist/react.js": (function (__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) {
4
3
  __webpack_require__.r(__webpack_exports__);
5
4
  __webpack_require__.d(__webpack_exports__, {
6
5
  "default": () => (react_default)
7
6
  });
8
- /* import */var react__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__("./node_modules/react/index.js");
7
+ /* import */var react__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__("react");
9
8
  /* import */var _tiktok_video_element_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__("./node_modules/tiktok-video-element/dist/tiktok-video-element.js");
10
9
  "use client";
11
10
 
@@ -156,7 +155,7 @@ function setProperty(node, name, value) {
156
155
 
157
156
  // dist/react.ts
158
157
  var react_default = createComponent({
159
- react: react__WEBPACK_IMPORTED_MODULE_0__,
158
+ react: react__WEBPACK_IMPORTED_MODULE_0__["default"],
160
159
  tagName: "tiktok-video",
161
160
  elementClass: _tiktok_video_element_js__WEBPACK_IMPORTED_MODULE_1__["default"],
162
161
  toAttributeName(propName) {
@@ -485,5 +484,5 @@ var tiktok_video_element_default = TikTokVideoElement;
485
484
 
486
485
  }),
487
486
 
488
- }]);
487
+ }])
489
488
  //# sourceMappingURL=reactPlayerTiktok.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"async/reactPlayerTiktok.js","sources":["/Users/kirubakaran.r/Documents/projects/hub/components/waterford_library/node_modules/tiktok-video-element/dist/react.js","/Users/kirubakaran.r/Documents/projects/hub/components/waterford_library/node_modules/tiktok-video-element/dist/tiktok-video-element.js"],"sourcesContent":["\"use client\";\n\n// dist/react.ts\nimport React from \"react\";\nimport CustomMediaElement from \"./tiktok-video-element.js\";\n\n// ../../node_modules/ce-la-react/dist/ce-la-react.js\nvar reservedReactProps = /* @__PURE__ */ new Set([\n \"style\",\n \"children\",\n \"ref\",\n \"key\",\n \"suppressContentEditableWarning\",\n \"suppressHydrationWarning\",\n \"dangerouslySetInnerHTML\"\n]);\nvar reactPropToAttrNameMap = {\n className: \"class\",\n htmlFor: \"for\"\n};\nfunction defaultToAttributeName(propName) {\n return propName.toLowerCase();\n}\nfunction defaultToAttributeValue(propValue) {\n if (typeof propValue === \"boolean\") return propValue ? \"\" : void 0;\n if (typeof propValue === \"function\") return void 0;\n if (typeof propValue === \"object\" && propValue !== null) return void 0;\n return propValue;\n}\nfunction createComponent({\n react: React2,\n tagName,\n elementClass,\n events,\n displayName,\n defaultProps,\n toAttributeName = defaultToAttributeName,\n toAttributeValue = defaultToAttributeValue\n}) {\n const IS_REACT_19_OR_NEWER = Number.parseInt(React2.version) >= 19;\n const ReactComponent = React2.forwardRef((props, ref) => {\n var _a, _b;\n const elementRef = React2.useRef(null);\n const prevElemPropsRef = React2.useRef(/* @__PURE__ */ new Map());\n const eventProps = {};\n const attrs = {};\n const reactProps = {};\n const elementProps = {};\n for (const [k, v] of Object.entries(props)) {\n if (reservedReactProps.has(k)) {\n reactProps[k] = v;\n continue;\n }\n const attrName = toAttributeName(reactPropToAttrNameMap[k] ?? k);\n 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))) {\n elementProps[k] = v;\n continue;\n }\n if (k.startsWith(\"on\")) {\n eventProps[k] = v;\n continue;\n }\n const attrValue = toAttributeValue(v);\n if (attrName && attrValue != null) {\n attrs[attrName] = String(attrValue);\n if (!IS_REACT_19_OR_NEWER) {\n reactProps[attrName] = attrValue;\n }\n }\n if (attrName && IS_REACT_19_OR_NEWER) {\n const attrValueFromDefault = defaultToAttributeValue(v);\n if (attrValue !== attrValueFromDefault) {\n reactProps[attrName] = attrValue;\n } else {\n reactProps[attrName] = v;\n }\n }\n }\n if (typeof window !== \"undefined\") {\n for (const propName in eventProps) {\n const callback = eventProps[propName];\n const useCapture = propName.endsWith(\"Capture\");\n const eventName = ((events == null ? void 0 : events[propName]) ?? propName.slice(2).toLowerCase()).slice(\n 0,\n useCapture ? -7 : void 0\n );\n React2.useLayoutEffect(() => {\n const eventTarget = elementRef == null ? void 0 : elementRef.current;\n if (!eventTarget || typeof callback !== \"function\") return;\n eventTarget.addEventListener(eventName, callback, useCapture);\n return () => {\n eventTarget.removeEventListener(eventName, callback, useCapture);\n };\n }, [elementRef == null ? void 0 : elementRef.current, callback]);\n }\n React2.useLayoutEffect(() => {\n if (elementRef.current === null) return;\n const newElemProps = /* @__PURE__ */ new Map();\n for (const key in elementProps) {\n setProperty(elementRef.current, key, elementProps[key]);\n prevElemPropsRef.current.delete(key);\n newElemProps.set(key, elementProps[key]);\n }\n for (const [key, _value] of prevElemPropsRef.current) {\n setProperty(elementRef.current, key, void 0);\n }\n prevElemPropsRef.current = newElemProps;\n });\n }\n if (typeof window === \"undefined\" && (elementClass == null ? void 0 : elementClass.getTemplateHTML) && (elementClass == null ? void 0 : elementClass.shadowRootOptions)) {\n const { mode, delegatesFocus } = elementClass.shadowRootOptions;\n const templateShadowRoot = React2.createElement(\"template\", {\n shadowrootmode: mode,\n shadowrootdelegatesfocus: delegatesFocus,\n dangerouslySetInnerHTML: {\n __html: elementClass.getTemplateHTML(attrs, props)\n }\n });\n reactProps.children = [templateShadowRoot, reactProps.children];\n }\n return React2.createElement(tagName, {\n ...defaultProps,\n ...reactProps,\n ref: React2.useCallback(\n (node) => {\n elementRef.current = node;\n if (typeof ref === \"function\") {\n ref(node);\n } else if (ref !== null) {\n ref.current = node;\n }\n },\n [ref]\n )\n });\n });\n ReactComponent.displayName = displayName ?? elementClass.name;\n return ReactComponent;\n}\nfunction setProperty(node, name, value) {\n var _a;\n node[name] = value;\n if (value == null && name in (((_a = globalThis.HTMLElement) == null ? void 0 : _a.prototype) ?? {})) {\n node.removeAttribute(name);\n }\n}\n\n// dist/react.ts\nvar react_default = createComponent({\n react: React,\n tagName: \"tiktok-video\",\n elementClass: CustomMediaElement,\n toAttributeName(propName) {\n if (propName === \"muted\") return \"\";\n if (propName === \"defaultMuted\") return \"muted\";\n return defaultToAttributeName(propName);\n }\n});\nexport {\n react_default as default\n};\n/*! Bundled license information:\n\nce-la-react/dist/ce-la-react.js:\n (**\n * @license\n * Copyright 2018 Google LLC\n * SPDX-License-Identifier: BSD-3-Clause\n *\n * Modified version of `@lit/react` for vanilla custom elements with support for SSR.\n *)\n*/\n","const EMBED_BASE = \"https://www.tiktok.com/player/v1\";\nconst MATCH_SRC = /tiktok\\.com\\/(?:player\\/v1\\/|share\\/video\\/|@[^/]+\\/video\\/)([0-9]+)/;\nconst PlayerState = { INIT: -1, ENDED: 0, PLAYING: 1, PAUSED: 2, BUFFERING: 3 };\nconst EventMap = {\n [PlayerState.INIT]: \"emptied\",\n [PlayerState.PAUSED]: \"pause\",\n [PlayerState.ENDED]: \"ended\",\n [PlayerState.PLAYING]: \"play\",\n [PlayerState.BUFFERING]: \"waiting\"\n};\nfunction getTemplateHTML(attrs, props = {}) {\n const iframeAttrs = {\n src: serializeIframeUrl(attrs, props),\n frameborder: 0,\n width: \"100%\",\n height: \"100%\",\n allow: \"accelerometer; autoplay; fullscreen; encrypted-media; gyroscope; picture-in-picture\"\n };\n if (props.config) {\n iframeAttrs[\"data-config\"] = JSON.stringify(props.config);\n }\n return (\n /*html*/\n `\n <style>\n :host {\n display:inline-block;\n min-width: 300px;\n min-height: 150px;\n position: relative;\n }\n iframe {\n position:absolute;\n top:0;\n left:0;\n width:100%;\n height:100%;\n border:0;\n }\n </style>\n <iframe ${serializeAttributes(iframeAttrs)} title=\"TikTok video\"></iframe>\n `\n );\n}\nfunction serializeIframeUrl(attrs, props = {}) {\n if (!attrs.src) return;\n const matches = attrs.src.match(MATCH_SRC);\n const srcId = matches && matches[1];\n const params = {\n controls: attrs.controls === \"\" ? null : 0,\n autoplay: attrs.autoplay,\n muted: attrs.muted,\n loop: attrs.loop,\n rel: 0,\n ...props.config\n };\n return `${EMBED_BASE}/${srcId}?${serialize(params)}`;\n}\nclass TikTokVideoElement extends (globalThis.HTMLElement ?? class {\n}) {\n static getTemplateHTML = getTemplateHTML;\n static shadowRootOptions = { mode: \"open\" };\n static get observedAttributes() {\n return [\"src\", \"controls\", \"loop\", \"autoplay\", \"muted\"];\n }\n loadComplete = new PublicPromise();\n #loadRequested;\n #hasLoaded;\n #muted = false;\n #currentTime = 0;\n #paused = true;\n #config = null;\n #volume = 100;\n #duration = 0;\n #iframe;\n constructor() {\n super();\n this.#upgradeProperty(\"config\");\n }\n async load() {\n if (this.#loadRequested) return;\n if (!this.shadowRoot) {\n this.attachShadow(TikTokVideoElement.shadowRootOptions);\n }\n const isFirstLoad = !this.#hasLoaded;\n if (this.#hasLoaded) {\n this.loadComplete = new PublicPromise();\n }\n this.#hasLoaded = true;\n await (this.#loadRequested = Promise.resolve());\n this.#loadRequested = null;\n this.#currentTime = 0;\n this.#muted = false;\n this.#paused = true;\n if (!this.src) {\n this.shadowRoot.innerHTML = \"\";\n globalThis.removeEventListener(\"message\", this.#onMessage);\n return;\n }\n let iframe = this.shadowRoot.querySelector(\"iframe\");\n const attrs = namedNodeMapToObject(this.attributes);\n if (isFirstLoad && iframe) {\n this.#config = JSON.parse(iframe.getAttribute(\"data-config\") || \"{}\");\n }\n if (!(iframe == null ? void 0 : iframe.src) || iframe.src !== serializeIframeUrl(attrs, this)) {\n this.shadowRoot.innerHTML = getTemplateHTML(attrs, this);\n iframe = this.shadowRoot.querySelector(\"iframe\");\n }\n this.#iframe = iframe;\n globalThis.addEventListener(\"message\", this.#onMessage);\n }\n async attributeChangedCallback(attrName, oldValue, newValue) {\n if (oldValue === newValue) return;\n switch (attrName) {\n case \"muted\": {\n await this.loadComplete;\n this.muted = newValue != null;\n break;\n }\n case \"autoplay\":\n case \"controls\":\n case \"loop\":\n case \"src\": {\n this.load();\n return;\n }\n }\n }\n get config() {\n return this.#config;\n }\n set config(value) {\n this.#config = value;\n }\n #onMessage = (event) => {\n var _a;\n if (event.source !== ((_a = this.#iframe) == null ? void 0 : _a.contentWindow)) return;\n const msg = event.data;\n if (!(msg == null ? void 0 : msg[\"x-tiktok-player\"])) return;\n switch (msg.type) {\n case \"onPlayerReady\":\n this.loadComplete.resolve();\n break;\n case \"onStateChange\": {\n this.#paused = [PlayerState.INIT, PlayerState.PAUSED, PlayerState.ENDED].includes(msg.value);\n const eventType = EventMap[msg.value];\n if (eventType) this.dispatchEvent(new Event(eventType));\n break;\n }\n case \"onCurrentTime\":\n this.#currentTime = msg.value.currentTime;\n this.#duration = msg.value.duration;\n this.dispatchEvent(new Event(\"durationchange\"));\n this.dispatchEvent(new Event(\"timeupdate\"));\n break;\n case \"onVolumeChange\":\n this.#volume = msg.value;\n this.dispatchEvent(new Event(\"volumechange\"));\n break;\n case \"onMute\":\n this.#muted = msg.value ? true : false;\n this.#volume = msg.value ? 0 : this.#volume;\n this.dispatchEvent(new Event(\"volumechange\"));\n break;\n case \"onError\":\n this.dispatchEvent(new Event(\"error\"));\n break;\n default:\n console.warn(\"Unhandled TikTok player message:\", msg);\n break;\n }\n };\n #post(type, value) {\n var _a;\n if (!((_a = this.#iframe) == null ? void 0 : _a.contentWindow)) return;\n const message = { \"x-tiktok-player\": true, type, ...value !== void 0 ? { value } : {} };\n this.#iframe.contentWindow.postMessage(message, \"*\");\n }\n async play() {\n await this.loadComplete;\n this.#post(\"play\");\n }\n async pause() {\n await this.loadComplete;\n this.#post(\"pause\");\n }\n async #seekTo(sec) {\n await this.loadComplete;\n this.#post(\"seekTo\", Number(sec));\n }\n async #mute() {\n await this.loadComplete;\n this.#post(\"mute\");\n }\n async #unMute() {\n await this.loadComplete;\n this.#post(\"unMute\");\n }\n get volume() {\n return this.#volume / 100;\n }\n set volume(_val) {\n console.warn(\"Volume control is not supported for TikTok videos.\");\n }\n get currentTime() {\n return this.#currentTime;\n }\n set currentTime(val) {\n this.#seekTo(val);\n }\n get muted() {\n return this.#muted;\n }\n set muted(val) {\n this.#muted = val;\n val ? this.#mute() : this.#unMute();\n }\n get defaultMuted() {\n return this.hasAttribute(\"muted\");\n }\n set defaultMuted(val) {\n this.toggleAttribute(\"muted\", !!val);\n }\n get paused() {\n return this.#paused;\n }\n get duration() {\n return this.#duration;\n }\n get src() {\n return this.getAttribute(\"src\");\n }\n set src(val) {\n this.setAttribute(\"src\", val ?? \"\");\n }\n // This is a pattern to update property values that are set before\n // the custom element is upgraded.\n // https://web.dev/custom-elements-best-practices/#make-properties-lazy\n #upgradeProperty(prop) {\n if (Object.prototype.hasOwnProperty.call(this, prop)) {\n const value = this[prop];\n delete this[prop];\n this[prop] = value;\n }\n }\n}\nclass PublicPromise extends Promise {\n constructor(executor = () => {\n }) {\n let res, rej;\n super((resolve, reject) => {\n executor(resolve, reject);\n res = resolve;\n rej = reject;\n });\n this.resolve = res;\n this.reject = rej;\n }\n}\nfunction namedNodeMapToObject(namedNodeMap) {\n let obj = {};\n for (let attr of namedNodeMap) {\n obj[attr.name] = attr.value;\n }\n return obj;\n}\nfunction boolToBinary(props) {\n let p = {};\n for (let key in props) {\n let val = props[key];\n if (val === true || val === \"\") p[key] = 1;\n else if (val === false) p[key] = 0;\n else if (val != null) p[key] = val;\n }\n return p;\n}\nfunction serialize(props) {\n return String(new URLSearchParams(boolToBinary(props)));\n}\nfunction serializeAttributes(attrs) {\n let html = \"\";\n for (const key in attrs) {\n const value = attrs[key];\n if (value === \"\") html += ` ${escapeHtml(key)}`;\n else html += ` ${escapeHtml(key)}=\"${escapeHtml(`${value}`)}\"`;\n }\n return html;\n}\nfunction escapeHtml(str) {\n return str.replace(/&/g, \"&amp;\").replace(/</g, \"&lt;\").replace(/>/g, \"&gt;\").replace(/\"/g, \"&quot;\").replace(/'/g, \"&apos;\").replace(/`/g, \"&#x60;\");\n}\nif (globalThis.customElements && !globalThis.customElements.get(\"tiktok-video\")) {\n globalThis.customElements.define(\"tiktok-video\", TikTokVideoElement);\n}\nvar tiktok_video_element_default = TikTokVideoElement;\nexport {\n tiktok_video_element_default as default\n};\n"],"names":[],"mappings":";;;;;;;;AAAA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AAGA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;AC3KA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AAGA"}
@@ -1,11 +1,10 @@
1
- "use strict";
2
1
  (self["webpackChunk_ix_waterford_lib"] = self["webpackChunk_ix_waterford_lib"] || []).push([["reactPlayerTwitch"], {
3
2
  "./node_modules/twitch-video-element/dist/react.js": (function (__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) {
4
3
  __webpack_require__.r(__webpack_exports__);
5
4
  __webpack_require__.d(__webpack_exports__, {
6
5
  "default": () => (react_default)
7
6
  });
8
- /* import */var react__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__("./node_modules/react/index.js");
7
+ /* import */var react__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__("react");
9
8
  /* import */var _twitch_video_element_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__("./node_modules/twitch-video-element/dist/twitch-video-element.js");
10
9
  "use client";
11
10
 
@@ -156,7 +155,7 @@ function setProperty(node, name, value) {
156
155
 
157
156
  // dist/react.ts
158
157
  var react_default = createComponent({
159
- react: react__WEBPACK_IMPORTED_MODULE_0__,
158
+ react: react__WEBPACK_IMPORTED_MODULE_0__["default"],
160
159
  tagName: "twitch-video",
161
160
  elementClass: _twitch_video_element_js__WEBPACK_IMPORTED_MODULE_1__["default"],
162
161
  toAttributeName(propName) {
@@ -583,5 +582,5 @@ var twitch_video_element_default = TwitchVideoElement;
583
582
 
584
583
  }),
585
584
 
586
- }]);
585
+ }])
587
586
  //# sourceMappingURL=reactPlayerTwitch.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"async/reactPlayerTwitch.js","sources":["/Users/kirubakaran.r/Documents/projects/hub/components/waterford_library/node_modules/twitch-video-element/dist/react.js","/Users/kirubakaran.r/Documents/projects/hub/components/waterford_library/node_modules/twitch-video-element/dist/twitch-video-element.js"],"sourcesContent":["\"use client\";\n\n// dist/react.ts\nimport React from \"react\";\nimport CustomMediaElement from \"./twitch-video-element.js\";\n\n// ../../node_modules/ce-la-react/dist/ce-la-react.js\nvar reservedReactProps = /* @__PURE__ */ new Set([\n \"style\",\n \"children\",\n \"ref\",\n \"key\",\n \"suppressContentEditableWarning\",\n \"suppressHydrationWarning\",\n \"dangerouslySetInnerHTML\"\n]);\nvar reactPropToAttrNameMap = {\n className: \"class\",\n htmlFor: \"for\"\n};\nfunction defaultToAttributeName(propName) {\n return propName.toLowerCase();\n}\nfunction defaultToAttributeValue(propValue) {\n if (typeof propValue === \"boolean\") return propValue ? \"\" : void 0;\n if (typeof propValue === \"function\") return void 0;\n if (typeof propValue === \"object\" && propValue !== null) return void 0;\n return propValue;\n}\nfunction createComponent({\n react: React2,\n tagName,\n elementClass,\n events,\n displayName,\n defaultProps,\n toAttributeName = defaultToAttributeName,\n toAttributeValue = defaultToAttributeValue\n}) {\n const IS_REACT_19_OR_NEWER = Number.parseInt(React2.version) >= 19;\n const ReactComponent = React2.forwardRef((props, ref) => {\n var _a, _b;\n const elementRef = React2.useRef(null);\n const prevElemPropsRef = React2.useRef(/* @__PURE__ */ new Map());\n const eventProps = {};\n const attrs = {};\n const reactProps = {};\n const elementProps = {};\n for (const [k, v] of Object.entries(props)) {\n if (reservedReactProps.has(k)) {\n reactProps[k] = v;\n continue;\n }\n const attrName = toAttributeName(reactPropToAttrNameMap[k] ?? k);\n 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))) {\n elementProps[k] = v;\n continue;\n }\n if (k.startsWith(\"on\")) {\n eventProps[k] = v;\n continue;\n }\n const attrValue = toAttributeValue(v);\n if (attrName && attrValue != null) {\n attrs[attrName] = String(attrValue);\n if (!IS_REACT_19_OR_NEWER) {\n reactProps[attrName] = attrValue;\n }\n }\n if (attrName && IS_REACT_19_OR_NEWER) {\n const attrValueFromDefault = defaultToAttributeValue(v);\n if (attrValue !== attrValueFromDefault) {\n reactProps[attrName] = attrValue;\n } else {\n reactProps[attrName] = v;\n }\n }\n }\n if (typeof window !== \"undefined\") {\n for (const propName in eventProps) {\n const callback = eventProps[propName];\n const useCapture = propName.endsWith(\"Capture\");\n const eventName = ((events == null ? void 0 : events[propName]) ?? propName.slice(2).toLowerCase()).slice(\n 0,\n useCapture ? -7 : void 0\n );\n React2.useLayoutEffect(() => {\n const eventTarget = elementRef == null ? void 0 : elementRef.current;\n if (!eventTarget || typeof callback !== \"function\") return;\n eventTarget.addEventListener(eventName, callback, useCapture);\n return () => {\n eventTarget.removeEventListener(eventName, callback, useCapture);\n };\n }, [elementRef == null ? void 0 : elementRef.current, callback]);\n }\n React2.useLayoutEffect(() => {\n if (elementRef.current === null) return;\n const newElemProps = /* @__PURE__ */ new Map();\n for (const key in elementProps) {\n setProperty(elementRef.current, key, elementProps[key]);\n prevElemPropsRef.current.delete(key);\n newElemProps.set(key, elementProps[key]);\n }\n for (const [key, _value] of prevElemPropsRef.current) {\n setProperty(elementRef.current, key, void 0);\n }\n prevElemPropsRef.current = newElemProps;\n });\n }\n if (typeof window === \"undefined\" && (elementClass == null ? void 0 : elementClass.getTemplateHTML) && (elementClass == null ? void 0 : elementClass.shadowRootOptions)) {\n const { mode, delegatesFocus } = elementClass.shadowRootOptions;\n const templateShadowRoot = React2.createElement(\"template\", {\n shadowrootmode: mode,\n shadowrootdelegatesfocus: delegatesFocus,\n dangerouslySetInnerHTML: {\n __html: elementClass.getTemplateHTML(attrs, props)\n }\n });\n reactProps.children = [templateShadowRoot, reactProps.children];\n }\n return React2.createElement(tagName, {\n ...defaultProps,\n ...reactProps,\n ref: React2.useCallback(\n (node) => {\n elementRef.current = node;\n if (typeof ref === \"function\") {\n ref(node);\n } else if (ref !== null) {\n ref.current = node;\n }\n },\n [ref]\n )\n });\n });\n ReactComponent.displayName = displayName ?? elementClass.name;\n return ReactComponent;\n}\nfunction setProperty(node, name, value) {\n var _a;\n node[name] = value;\n if (value == null && name in (((_a = globalThis.HTMLElement) == null ? void 0 : _a.prototype) ?? {})) {\n node.removeAttribute(name);\n }\n}\n\n// dist/react.ts\nvar react_default = createComponent({\n react: React,\n tagName: \"twitch-video\",\n elementClass: CustomMediaElement,\n toAttributeName(propName) {\n if (propName === \"muted\") return \"\";\n if (propName === \"defaultMuted\") return \"muted\";\n return defaultToAttributeName(propName);\n }\n});\nexport {\n react_default as default\n};\n/*! Bundled license information:\n\nce-la-react/dist/ce-la-react.js:\n (**\n * @license\n * Copyright 2018 Google LLC\n * SPDX-License-Identifier: BSD-3-Clause\n *\n * Modified version of `@lit/react` for vanilla custom elements with support for SSR.\n *)\n*/\n","const EMBED_BASE = \"https://player.twitch.tv\";\nconst MATCH_VIDEO = /(?:www\\.|go\\.)?twitch\\.tv\\/(?:videos?\\/|\\?video=)(\\d+)($|\\?)/;\nconst MATCH_CHANNEL = /(?:www\\.|go\\.)?twitch\\.tv\\/([a-zA-Z0-9_]+)($|\\?)/;\nconst PlaybackState = {\n IDLE: \"Idle\",\n READY: \"Ready\",\n BUFFERING: \"Buffering\",\n PLAYING: \"Playing\",\n ENDED: \"Ended\"\n};\nconst PlayerCommands = {\n DISABLE_CAPTIONS: 0,\n ENABLE_CAPTIONS: 1,\n PAUSE: 2,\n PLAY: 3,\n SEEK: 4,\n SET_CHANNEL: 5,\n SET_CHANNEL_ID: 6,\n SET_COLLECTION: 7,\n SET_QUALITY: 8,\n SET_VIDEO: 9,\n SET_MUTED: 10,\n SET_VOLUME: 11\n};\nfunction getTemplateHTML(attrs, props = {}) {\n const iframeAttrs = {\n src: serializeIframeUrl(attrs, props),\n frameborder: \"0\",\n width: \"100%\",\n height: \"100%\",\n allow: \"accelerometer; fullscreen; autoplay; encrypted-media; picture-in-picture;\",\n sandbox: \"allow-modals allow-scripts allow-same-origin allow-popups allow-popups-to-escape-sandbox\",\n scrolling: \"no\"\n };\n if (props.config) {\n iframeAttrs[\"data-config\"] = JSON.stringify(props.config);\n }\n return (\n /*html*/\n `\n <style>\n :host {\n display: inline-block;\n min-width: 300px;\n min-height: 150px;\n position: relative;\n }\n iframe {\n position: absolute;\n top: 0;\n left: 0;\n width: 100%;\n height: 100%;\n }\n :host(:not([controls])) {\n pointer-events: none;\n }\n </style>\n <iframe${serializeAttributes(iframeAttrs)}></iframe>\n `\n );\n}\nfunction serializeIframeUrl(attrs, props) {\n var _a;\n if (!attrs.src) return;\n const videoMatch = attrs.src.match(MATCH_VIDEO);\n const channelMatch = attrs.src.match(MATCH_CHANNEL);\n const params = {\n parent: (_a = globalThis.location) == null ? void 0 : _a.hostname,\n // ?controls=true is enabled by default in the iframe\n controls: attrs.controls === \"\" ? null : false,\n autoplay: attrs.autoplay === \"\" ? null : false,\n muted: attrs.muted,\n preload: attrs.preload,\n ...props.config\n };\n if (videoMatch) {\n const videoId = videoMatch[1];\n return `${EMBED_BASE}/?video=v${videoId}&${serialize(params)}`;\n } else if (channelMatch) {\n const channel = channelMatch[1];\n return `${EMBED_BASE}/?channel=${channel}&${serialize(params)}`;\n }\n return \"\";\n}\nclass TwitchVideoElement extends (globalThis.HTMLElement ?? class {\n}) {\n static getTemplateHTML = getTemplateHTML;\n static shadowRootOptions = { mode: \"open\" };\n static observedAttributes = [\"autoplay\", \"controls\", \"loop\", \"muted\", \"playsinline\", \"preload\", \"src\"];\n loadComplete = new PublicPromise();\n #loadRequested;\n #hasLoaded;\n #iframe;\n #playerState = {};\n #currentTime = 0;\n #muted = false;\n #volume = 1;\n #paused = !this.autoplay;\n #seeking = false;\n #readyState = 0;\n #config = null;\n constructor() {\n super();\n this.#upgradeProperty(\"config\");\n }\n get config() {\n return this.#config;\n }\n set config(value) {\n this.#config = value;\n }\n async load() {\n if (this.#loadRequested) return;\n if (!this.shadowRoot) {\n this.attachShadow({ mode: \"open\" });\n }\n const isFirstLoad = !this.#hasLoaded;\n if (this.#hasLoaded) {\n this.loadComplete = new PublicPromise();\n }\n this.#hasLoaded = true;\n await (this.#loadRequested = Promise.resolve());\n this.#loadRequested = null;\n this.#readyState = 0;\n this.dispatchEvent(new Event(\"emptied\"));\n if (!this.src) {\n this.shadowRoot.innerHTML = \"\";\n globalThis.removeEventListener(\"message\", this.#onMessage);\n return;\n }\n this.dispatchEvent(new Event(\"loadstart\"));\n let iframe = this.shadowRoot.querySelector(\"iframe\");\n const attrs = namedNodeMapToObject(this.attributes);\n if (isFirstLoad && iframe) {\n this.#config = JSON.parse(iframe.getAttribute(\"data-config\") || \"{}\");\n }\n if (!(iframe == null ? void 0 : iframe.src) || iframe.src !== serializeIframeUrl(attrs, this)) {\n this.shadowRoot.innerHTML = getTemplateHTML(attrs, this);\n iframe = this.shadowRoot.querySelector(\"iframe\");\n }\n this.#iframe = iframe;\n globalThis.addEventListener(\"message\", this.#onMessage);\n }\n attributeChangedCallback(attrName, oldValue, newValue) {\n if (oldValue === newValue) return;\n switch (attrName) {\n case \"src\":\n case \"controls\": {\n this.load();\n break;\n }\n }\n }\n getVideoPlaybackQuality() {\n return this.#playerState.stats.videoStats;\n }\n get src() {\n return this.getAttribute(\"src\");\n }\n set src(value) {\n this.setAttribute(\"src\", value);\n }\n get readyState() {\n return this.#readyState;\n }\n get seeking() {\n return this.#seeking;\n }\n get buffered() {\n var _a, _b;\n return createTimeRanges(0, ((_b = (_a = this.#playerState.stats) == null ? void 0 : _a.videoStats) == null ? void 0 : _b.bufferSize) ?? 0);\n }\n get paused() {\n if (!this.#playerState.playback) return this.#paused;\n return this.#playerState.playback === PlaybackState.IDLE;\n }\n get ended() {\n if (!this.#playerState.playback) return false;\n return this.#playerState.playback === PlaybackState.ENDED;\n }\n get duration() {\n return this.#playerState.duration ?? NaN;\n }\n get autoplay() {\n return this.hasAttribute(\"autoplay\");\n }\n set autoplay(val) {\n if (this.autoplay == val) return;\n this.toggleAttribute(\"autoplay\", Boolean(val));\n }\n get controls() {\n return this.hasAttribute(\"controls\");\n }\n set controls(val) {\n if (this.controls == val) return;\n this.toggleAttribute(\"controls\", Boolean(val));\n }\n get currentTime() {\n if (!this.#playerState.currentTime) return this.#currentTime;\n return this.#playerState.currentTime;\n }\n set currentTime(val) {\n this.#currentTime = val;\n this.loadComplete.then(() => {\n this.#sendCommand(PlayerCommands.SEEK, val);\n });\n }\n get defaultMuted() {\n return this.hasAttribute(\"muted\");\n }\n set defaultMuted(val) {\n this.toggleAttribute(\"muted\", Boolean(val));\n }\n get loop() {\n return this.hasAttribute(\"loop\");\n }\n set loop(val) {\n this.toggleAttribute(\"loop\", Boolean(val));\n }\n get muted() {\n return this.#muted;\n }\n set muted(val) {\n this.#muted = val;\n this.loadComplete.then(() => {\n this.#sendCommand(PlayerCommands.SET_MUTED, val);\n });\n }\n get volume() {\n return this.#volume;\n }\n set volume(val) {\n this.#volume = val;\n this.loadComplete.then(() => {\n this.#sendCommand(PlayerCommands.SET_VOLUME, val);\n });\n }\n get playsInline() {\n return this.hasAttribute(\"playsinline\");\n }\n set playsInline(val) {\n this.toggleAttribute(\"playsinline\", Boolean(val));\n }\n play() {\n this.#paused = false;\n this.#sendCommand(PlayerCommands.PLAY);\n }\n pause() {\n this.#paused = true;\n this.#sendCommand(PlayerCommands.PAUSE);\n }\n #onMessage = async (event) => {\n var _a, _b, _c, _d;\n if (!this.#iframe.contentWindow) return;\n const { data, source } = event;\n const isFromEmbedWindow = source === this.#iframe.contentWindow;\n if (!isFromEmbedWindow) return;\n if (data.namespace === \"twitch-embed\") {\n await new Promise((resolve) => setTimeout(resolve, 10));\n if (data.eventName === \"ready\") {\n this.dispatchEvent(new Event(\"loadcomplete\"));\n this.loadComplete.resolve();\n this.#readyState = 1;\n this.dispatchEvent(new Event(\"loadedmetadata\"));\n } else if (data.eventName === \"seek\") {\n this.#seeking = true;\n this.dispatchEvent(new Event(\"seeking\"));\n } else if (data.eventName === \"playing\") {\n if (this.#seeking) {\n this.#seeking = false;\n this.dispatchEvent(new Event(\"seeked\"));\n }\n this.#readyState = 3;\n this.dispatchEvent(new Event(\"playing\"));\n } else {\n this.dispatchEvent(new Event(data.eventName));\n }\n } else if (data.namespace === \"twitch-embed-player-proxy\" && data.eventName === \"UPDATE_STATE\") {\n const oldDuration = this.#playerState.duration;\n const oldCurrentTime = this.#playerState.currentTime;\n const oldVolume = this.#playerState.volume;\n const oldMuted = this.#playerState.muted;\n const oldBuffered = (_b = (_a = this.#playerState.stats) == null ? void 0 : _a.videoStats) == null ? void 0 : _b.bufferSize;\n this.#playerState = { ...this.#playerState, ...data.params };\n if (oldDuration !== this.#playerState.duration) {\n this.dispatchEvent(new Event(\"durationchange\"));\n }\n if (oldCurrentTime !== this.#playerState.currentTime) {\n this.dispatchEvent(new Event(\"timeupdate\"));\n }\n if (oldVolume !== this.#playerState.volume || oldMuted !== this.#playerState.muted) {\n if (this.#playerState.volume !== void 0) {\n this.#volume = this.#playerState.volume;\n }\n if (this.#playerState.muted !== void 0) {\n this.#muted = this.#playerState.muted;\n }\n this.dispatchEvent(new Event(\"volumechange\"));\n }\n if (oldBuffered !== ((_d = (_c = this.#playerState.stats) == null ? void 0 : _c.videoStats) == null ? void 0 : _d.bufferSize)) {\n this.dispatchEvent(new Event(\"progress\"));\n }\n }\n };\n #sendCommand(command, params) {\n if (!this.#iframe.contentWindow) return;\n const message = {\n eventName: command,\n params,\n namespace: \"twitch-embed-player-proxy\"\n };\n this.#iframe.contentWindow.postMessage(message, EMBED_BASE);\n }\n // This is a pattern to update property values that are set before\n // the custom element is upgraded.\n // https://web.dev/custom-elements-best-practices/#make-properties-lazy\n #upgradeProperty(prop) {\n if (Object.prototype.hasOwnProperty.call(this, prop)) {\n const value = this[prop];\n delete this[prop];\n this[prop] = value;\n }\n }\n}\nfunction namedNodeMapToObject(namedNodeMap) {\n let obj = {};\n for (let attr of namedNodeMap) {\n obj[attr.name] = attr.value;\n }\n return obj;\n}\nfunction serializeAttributes(attrs) {\n let html = \"\";\n for (const key in attrs) {\n const value = attrs[key];\n if (value === \"\") html += ` ${escapeHtml(key)}`;\n else html += ` ${escapeHtml(key)}=\"${escapeHtml(`${value}`)}\"`;\n }\n return html;\n}\nfunction escapeHtml(str) {\n return str.replace(/&/g, \"&amp;\").replace(/</g, \"&lt;\").replace(/>/g, \"&gt;\").replace(/\"/g, \"&quot;\").replace(/'/g, \"&apos;\").replace(/`/g, \"&#x60;\");\n}\nfunction serialize(props) {\n return String(new URLSearchParams(filterParams(props)));\n}\nfunction filterParams(props) {\n let p = {};\n for (let key in props) {\n let val = props[key];\n if (val === true || val === \"\") p[key] = true;\n else if (val === false) p[key] = false;\n else if (val != null) p[key] = val;\n }\n return p;\n}\nclass PublicPromise extends Promise {\n constructor(executor = () => {\n }) {\n let res, rej;\n super((resolve, reject) => {\n executor(resolve, reject);\n res = resolve;\n rej = reject;\n });\n this.resolve = res;\n this.reject = rej;\n }\n}\nfunction createTimeRanges(start, end) {\n if (Array.isArray(start)) {\n return createTimeRangesObj(start);\n } else if (start == null || end == null || start === 0 && end === 0) {\n return createTimeRangesObj([[0, 0]]);\n }\n return createTimeRangesObj([[start, end]]);\n}\nfunction createTimeRangesObj(ranges) {\n Object.defineProperties(ranges, {\n start: {\n value: (i) => ranges[i][0]\n },\n end: {\n value: (i) => ranges[i][1]\n }\n });\n return ranges;\n}\nif (globalThis.customElements && !globalThis.customElements.get(\"twitch-video\")) {\n globalThis.customElements.define(\"twitch-video\", TwitchVideoElement);\n}\nvar twitch_video_element_default = TwitchVideoElement;\nexport {\n twitch_video_element_default as default\n};\n"],"names":[],"mappings":";;;;;;;;AAAA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AAGA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;AC3KA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AAGA"}
@@ -1,4 +1,3 @@
1
- "use strict";
2
1
  (self["webpackChunk_ix_waterford_lib"] = self["webpackChunk_ix_waterford_lib"] || []).push([["reactPlayerVimeo"], {
3
2
  "./node_modules/@vimeo/player/dist/player.es.js": (function (__unused_webpack_module, __webpack_exports__, __webpack_require__) {
4
3
  __webpack_require__.r(__webpack_exports__);
@@ -3561,7 +3560,7 @@ __webpack_require__.r(__webpack_exports__);
3561
3560
  __webpack_require__.d(__webpack_exports__, {
3562
3561
  "default": () => (react_default)
3563
3562
  });
3564
- /* import */var react__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__("./node_modules/react/index.js");
3563
+ /* import */var react__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__("react");
3565
3564
  /* import */var _vimeo_video_element_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__("./node_modules/vimeo-video-element/dist/vimeo-video-element.js");
3566
3565
  "use client";
3567
3566
 
@@ -3712,7 +3711,7 @@ function setProperty(node, name, value) {
3712
3711
 
3713
3712
  // dist/react.ts
3714
3713
  var react_default = createComponent({
3715
- react: react__WEBPACK_IMPORTED_MODULE_0__,
3714
+ react: react__WEBPACK_IMPORTED_MODULE_0__["default"],
3716
3715
  tagName: "vimeo-video",
3717
3716
  elementClass: _vimeo_video_element_js__WEBPACK_IMPORTED_MODULE_1__["default"],
3718
3717
  toAttributeName(propName) {
@@ -4261,5 +4260,5 @@ var vimeo_video_element_default = VimeoVideoElement;
4261
4260
 
4262
4261
  }),
4263
4262
 
4264
- }]);
4263
+ }])
4265
4264
  //# sourceMappingURL=reactPlayerVimeo.js.map