@aigamo/nostalgic-diva 1.19.2 → 1.19.3
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.
- package/dist/AudioPlayer-B3HUFxrt.cjs +2 -0
- package/dist/AudioPlayer-B3HUFxrt.cjs.map +1 -0
- package/dist/AudioPlayer-D3YsODf_.js +34 -0
- package/dist/AudioPlayer-D3YsODf_.js.map +1 -0
- package/dist/DailymotionPlayer-BbM7QPqY.js +64 -0
- package/dist/DailymotionPlayer-BbM7QPqY.js.map +1 -0
- package/dist/DailymotionPlayer-CUowHniC.cjs +2 -0
- package/dist/DailymotionPlayer-CUowHniC.cjs.map +1 -0
- package/dist/NiconicoPlayer-BQO6a8Vb.js +35 -0
- package/dist/NiconicoPlayer-BQO6a8Vb.js.map +1 -0
- package/dist/NiconicoPlayer-DpSXQj5m.cjs +2 -0
- package/dist/NiconicoPlayer-DpSXQj5m.cjs.map +1 -0
- package/dist/SoundCloudPlayer-B8jkHu8t.js +42 -0
- package/dist/SoundCloudPlayer-B8jkHu8t.js.map +1 -0
- package/dist/SoundCloudPlayer-BV22QlM7.cjs +2 -0
- package/dist/SoundCloudPlayer-BV22QlM7.cjs.map +1 -0
- package/dist/TwitchPlayer-C9mAN-zs.js +39 -0
- package/dist/TwitchPlayer-C9mAN-zs.js.map +1 -0
- package/dist/TwitchPlayer-CAtEBZ_D.cjs +2 -0
- package/dist/TwitchPlayer-CAtEBZ_D.cjs.map +1 -0
- package/dist/VimeoPlayer-BeD9InZ2.cjs +2 -0
- package/dist/VimeoPlayer-BeD9InZ2.cjs.map +1 -0
- package/dist/VimeoPlayer-Dj_TPJOD.js +42 -0
- package/dist/VimeoPlayer-Dj_TPJOD.js.map +1 -0
- package/dist/YouTubePlayer-DLqd36LF.cjs +2 -0
- package/dist/YouTubePlayer-DLqd36LF.cjs.map +1 -0
- package/dist/YouTubePlayer-DnM2aTnC.js +38 -0
- package/dist/YouTubePlayer-DnM2aTnC.js.map +1 -0
- package/dist/ensureScriptLoaded-Blm1fjMc.cjs +2 -0
- package/dist/ensureScriptLoaded-Blm1fjMc.cjs.map +1 -0
- package/dist/ensureScriptLoaded-Jw9e6HLc.js +24 -0
- package/dist/ensureScriptLoaded-Jw9e6HLc.js.map +1 -0
- package/dist/index-D5CazY1_.js +1848 -0
- package/dist/index-D5CazY1_.js.map +1 -0
- package/dist/index-DFsUhc9i.cjs +15 -0
- package/dist/index-DFsUhc9i.cjs.map +1 -0
- package/dist/index.cjs.js +2 -2
- package/dist/index.cjs.js.map +1 -1
- package/dist/index.es.js +25 -772
- package/dist/index.es.js.map +1 -1
- package/package.json +4 -4
- package/dist/AudioPlayer-CWI95ZSf.cjs +0 -2
- package/dist/AudioPlayer-CWI95ZSf.cjs.map +0 -1
- package/dist/AudioPlayer-Rgj403rr.js +0 -30
- package/dist/AudioPlayer-Rgj403rr.js.map +0 -1
- package/dist/DailymotionPlayer-CqYR3YjJ.cjs +0 -2
- package/dist/DailymotionPlayer-CqYR3YjJ.cjs.map +0 -1
- package/dist/DailymotionPlayer-DKnJvBrE.js +0 -60
- package/dist/DailymotionPlayer-DKnJvBrE.js.map +0 -1
- package/dist/NiconicoPlayer-BWepjJRp.js +0 -34
- package/dist/NiconicoPlayer-BWepjJRp.js.map +0 -1
- package/dist/NiconicoPlayer-DK-XPLSb.cjs +0 -2
- package/dist/NiconicoPlayer-DK-XPLSb.cjs.map +0 -1
- package/dist/PlayerContainer-CxyDj9x4.js +0 -690
- package/dist/PlayerContainer-CxyDj9x4.js.map +0 -1
- package/dist/PlayerContainer-LUwekvvj.cjs +0 -17
- package/dist/PlayerContainer-LUwekvvj.cjs.map +0 -1
- package/dist/SoundCloudPlayer-CIo1SPsW.js +0 -32
- package/dist/SoundCloudPlayer-CIo1SPsW.js.map +0 -1
- package/dist/SoundCloudPlayer-D1-SE7fO.cjs +0 -2
- package/dist/SoundCloudPlayer-D1-SE7fO.cjs.map +0 -1
- package/dist/TwitchPlayer-C-Zg7RPI.cjs +0 -2
- package/dist/TwitchPlayer-C-Zg7RPI.cjs.map +0 -1
- package/dist/TwitchPlayer-CipxSXDX.js +0 -33
- package/dist/TwitchPlayer-CipxSXDX.js.map +0 -1
- package/dist/VimeoPlayer-B2ew922s.cjs +0 -2
- package/dist/VimeoPlayer-B2ew922s.cjs.map +0 -1
- package/dist/VimeoPlayer-C-0MryDy.js +0 -32
- package/dist/VimeoPlayer-C-0MryDy.js.map +0 -1
- package/dist/YouTubePlayer-DXq_8Mrm.js +0 -35
- package/dist/YouTubePlayer-DXq_8Mrm.js.map +0 -1
- package/dist/YouTubePlayer-RHJqDD5s.cjs +0 -2
- package/dist/YouTubePlayer-RHJqDD5s.cjs.map +0 -1
- package/dist/ensureScriptLoaded-Bd04DRhn.js +0 -26
- package/dist/ensureScriptLoaded-Bd04DRhn.js.map +0 -1
- package/dist/ensureScriptLoaded-TVFV277C.cjs +0 -2
- package/dist/ensureScriptLoaded-TVFV277C.cjs.map +0 -1
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index-D5CazY1_.js","sources":["../../../node_modules/.pnpm/react@18.3.1/node_modules/react/cjs/react-jsx-runtime.production.min.js","../../../node_modules/.pnpm/react@18.3.1/node_modules/react/cjs/react-jsx-runtime.development.js","../../../node_modules/.pnpm/react@18.3.1/node_modules/react/jsx-runtime.js","../src/controllers/Logger.ts","../src/controllers/NullPlayerController.ts","../src/components/NostalgicDivaProvider.tsx","../src/services/VideoService.ts","../src/services/AudioVideoService.ts","../src/services/DailymotionVideoService.ts","../src/services/NiconicoVideoService.ts","../src/services/SoundCloudVideoService.ts","../src/services/TwitchVideoService.ts","../src/services/VimeoVideoService.ts","../src/services/YouTubeVideoService.ts","../src/services/findVideoService.ts","../src/components/NostalgicDiva.tsx","../src/components/defineNostalgicDiva.tsx","../src/components/useFirstMountState.ts","../src/components/usePreviousDistinct.ts","../src/controllers/PlayerControllerImpl.ts","../src/controllers/PlayerController.ts","../src/components/PlayerContainer.tsx","../src/controllers/AudioPlayerController.ts","../src/controllers/DailymotionPlayerController.ts","../src/controllers/NiconicoPlayerController.ts","../src/controllers/SoundCloudPlayerController.ts","../src/controllers/TwitchPlayerController.ts","../src/controllers/VimeoPlayerController.ts","../src/controllers/YouTubePlayerController.ts"],"sourcesContent":["/**\n * @license React\n * react-jsx-runtime.production.min.js\n *\n * Copyright (c) Facebook, Inc. and its affiliates.\n *\n * This source code is licensed under the MIT license found in the\n * LICENSE file in the root directory of this source tree.\n */\n'use strict';var f=require(\"react\"),k=Symbol.for(\"react.element\"),l=Symbol.for(\"react.fragment\"),m=Object.prototype.hasOwnProperty,n=f.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED.ReactCurrentOwner,p={key:!0,ref:!0,__self:!0,__source:!0};\nfunction q(c,a,g){var b,d={},e=null,h=null;void 0!==g&&(e=\"\"+g);void 0!==a.key&&(e=\"\"+a.key);void 0!==a.ref&&(h=a.ref);for(b in a)m.call(a,b)&&!p.hasOwnProperty(b)&&(d[b]=a[b]);if(c&&c.defaultProps)for(b in a=c.defaultProps,a)void 0===d[b]&&(d[b]=a[b]);return{$$typeof:k,type:c,key:e,ref:h,props:d,_owner:n.current}}exports.Fragment=l;exports.jsx=q;exports.jsxs=q;\n","/**\n * @license React\n * react-jsx-runtime.development.js\n *\n * Copyright (c) Facebook, Inc. and its affiliates.\n *\n * This source code is licensed under the MIT license found in the\n * LICENSE file in the root directory of this source tree.\n */\n\n'use strict';\n\nif (process.env.NODE_ENV !== \"production\") {\n (function() {\n'use strict';\n\nvar React = require('react');\n\n// ATTENTION\n// When adding new symbols to this file,\n// Please consider also adding to 'react-devtools-shared/src/backend/ReactSymbols'\n// The Symbol used to tag the ReactElement-like types.\nvar REACT_ELEMENT_TYPE = Symbol.for('react.element');\nvar REACT_PORTAL_TYPE = Symbol.for('react.portal');\nvar REACT_FRAGMENT_TYPE = Symbol.for('react.fragment');\nvar REACT_STRICT_MODE_TYPE = Symbol.for('react.strict_mode');\nvar REACT_PROFILER_TYPE = Symbol.for('react.profiler');\nvar REACT_PROVIDER_TYPE = Symbol.for('react.provider');\nvar REACT_CONTEXT_TYPE = Symbol.for('react.context');\nvar REACT_FORWARD_REF_TYPE = Symbol.for('react.forward_ref');\nvar REACT_SUSPENSE_TYPE = Symbol.for('react.suspense');\nvar REACT_SUSPENSE_LIST_TYPE = Symbol.for('react.suspense_list');\nvar REACT_MEMO_TYPE = Symbol.for('react.memo');\nvar REACT_LAZY_TYPE = Symbol.for('react.lazy');\nvar REACT_OFFSCREEN_TYPE = Symbol.for('react.offscreen');\nvar MAYBE_ITERATOR_SYMBOL = Symbol.iterator;\nvar FAUX_ITERATOR_SYMBOL = '@@iterator';\nfunction getIteratorFn(maybeIterable) {\n if (maybeIterable === null || typeof maybeIterable !== 'object') {\n return null;\n }\n\n var maybeIterator = MAYBE_ITERATOR_SYMBOL && maybeIterable[MAYBE_ITERATOR_SYMBOL] || maybeIterable[FAUX_ITERATOR_SYMBOL];\n\n if (typeof maybeIterator === 'function') {\n return maybeIterator;\n }\n\n return null;\n}\n\nvar ReactSharedInternals = React.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED;\n\nfunction error(format) {\n {\n {\n for (var _len2 = arguments.length, args = new Array(_len2 > 1 ? _len2 - 1 : 0), _key2 = 1; _key2 < _len2; _key2++) {\n args[_key2 - 1] = arguments[_key2];\n }\n\n printWarning('error', format, args);\n }\n }\n}\n\nfunction printWarning(level, format, args) {\n // When changing this logic, you might want to also\n // update consoleWithStackDev.www.js as well.\n {\n var ReactDebugCurrentFrame = ReactSharedInternals.ReactDebugCurrentFrame;\n var stack = ReactDebugCurrentFrame.getStackAddendum();\n\n if (stack !== '') {\n format += '%s';\n args = args.concat([stack]);\n } // eslint-disable-next-line react-internal/safe-string-coercion\n\n\n var argsWithFormat = args.map(function (item) {\n return String(item);\n }); // Careful: RN currently depends on this prefix\n\n argsWithFormat.unshift('Warning: ' + format); // We intentionally don't use spread (or .apply) directly because it\n // breaks IE9: https://github.com/facebook/react/issues/13610\n // eslint-disable-next-line react-internal/no-production-logging\n\n Function.prototype.apply.call(console[level], console, argsWithFormat);\n }\n}\n\n// -----------------------------------------------------------------------------\n\nvar enableScopeAPI = false; // Experimental Create Event Handle API.\nvar enableCacheElement = false;\nvar enableTransitionTracing = false; // No known bugs, but needs performance testing\n\nvar enableLegacyHidden = false; // Enables unstable_avoidThisFallback feature in Fiber\n// stuff. Intended to enable React core members to more easily debug scheduling\n// issues in DEV builds.\n\nvar enableDebugTracing = false; // Track which Fiber(s) schedule render work.\n\nvar REACT_MODULE_REFERENCE;\n\n{\n REACT_MODULE_REFERENCE = Symbol.for('react.module.reference');\n}\n\nfunction isValidElementType(type) {\n if (typeof type === 'string' || typeof type === 'function') {\n return true;\n } // Note: typeof might be other than 'symbol' or 'number' (e.g. if it's a polyfill).\n\n\n if (type === REACT_FRAGMENT_TYPE || type === REACT_PROFILER_TYPE || enableDebugTracing || type === REACT_STRICT_MODE_TYPE || type === REACT_SUSPENSE_TYPE || type === REACT_SUSPENSE_LIST_TYPE || enableLegacyHidden || type === REACT_OFFSCREEN_TYPE || enableScopeAPI || enableCacheElement || enableTransitionTracing ) {\n return true;\n }\n\n if (typeof type === 'object' && type !== null) {\n if (type.$$typeof === REACT_LAZY_TYPE || type.$$typeof === REACT_MEMO_TYPE || type.$$typeof === REACT_PROVIDER_TYPE || type.$$typeof === REACT_CONTEXT_TYPE || type.$$typeof === REACT_FORWARD_REF_TYPE || // This needs to include all possible module reference object\n // types supported by any Flight configuration anywhere since\n // we don't know which Flight build this will end up being used\n // with.\n type.$$typeof === REACT_MODULE_REFERENCE || type.getModuleId !== undefined) {\n return true;\n }\n }\n\n return false;\n}\n\nfunction getWrappedName(outerType, innerType, wrapperName) {\n var displayName = outerType.displayName;\n\n if (displayName) {\n return displayName;\n }\n\n var functionName = innerType.displayName || innerType.name || '';\n return functionName !== '' ? wrapperName + \"(\" + functionName + \")\" : wrapperName;\n} // Keep in sync with react-reconciler/getComponentNameFromFiber\n\n\nfunction getContextName(type) {\n return type.displayName || 'Context';\n} // Note that the reconciler package should generally prefer to use getComponentNameFromFiber() instead.\n\n\nfunction getComponentNameFromType(type) {\n if (type == null) {\n // Host root, text node or just invalid type.\n return null;\n }\n\n {\n if (typeof type.tag === 'number') {\n error('Received an unexpected object in getComponentNameFromType(). ' + 'This is likely a bug in React. Please file an issue.');\n }\n }\n\n if (typeof type === 'function') {\n return type.displayName || type.name || null;\n }\n\n if (typeof type === 'string') {\n return type;\n }\n\n switch (type) {\n case REACT_FRAGMENT_TYPE:\n return 'Fragment';\n\n case REACT_PORTAL_TYPE:\n return 'Portal';\n\n case REACT_PROFILER_TYPE:\n return 'Profiler';\n\n case REACT_STRICT_MODE_TYPE:\n return 'StrictMode';\n\n case REACT_SUSPENSE_TYPE:\n return 'Suspense';\n\n case REACT_SUSPENSE_LIST_TYPE:\n return 'SuspenseList';\n\n }\n\n if (typeof type === 'object') {\n switch (type.$$typeof) {\n case REACT_CONTEXT_TYPE:\n var context = type;\n return getContextName(context) + '.Consumer';\n\n case REACT_PROVIDER_TYPE:\n var provider = type;\n return getContextName(provider._context) + '.Provider';\n\n case REACT_FORWARD_REF_TYPE:\n return getWrappedName(type, type.render, 'ForwardRef');\n\n case REACT_MEMO_TYPE:\n var outerName = type.displayName || null;\n\n if (outerName !== null) {\n return outerName;\n }\n\n return getComponentNameFromType(type.type) || 'Memo';\n\n case REACT_LAZY_TYPE:\n {\n var lazyComponent = type;\n var payload = lazyComponent._payload;\n var init = lazyComponent._init;\n\n try {\n return getComponentNameFromType(init(payload));\n } catch (x) {\n return null;\n }\n }\n\n // eslint-disable-next-line no-fallthrough\n }\n }\n\n return null;\n}\n\nvar assign = Object.assign;\n\n// Helpers to patch console.logs to avoid logging during side-effect free\n// replaying on render function. This currently only patches the object\n// lazily which won't cover if the log function was extracted eagerly.\n// We could also eagerly patch the method.\nvar disabledDepth = 0;\nvar prevLog;\nvar prevInfo;\nvar prevWarn;\nvar prevError;\nvar prevGroup;\nvar prevGroupCollapsed;\nvar prevGroupEnd;\n\nfunction disabledLog() {}\n\ndisabledLog.__reactDisabledLog = true;\nfunction disableLogs() {\n {\n if (disabledDepth === 0) {\n /* eslint-disable react-internal/no-production-logging */\n prevLog = console.log;\n prevInfo = console.info;\n prevWarn = console.warn;\n prevError = console.error;\n prevGroup = console.group;\n prevGroupCollapsed = console.groupCollapsed;\n prevGroupEnd = console.groupEnd; // https://github.com/facebook/react/issues/19099\n\n var props = {\n configurable: true,\n enumerable: true,\n value: disabledLog,\n writable: true\n }; // $FlowFixMe Flow thinks console is immutable.\n\n Object.defineProperties(console, {\n info: props,\n log: props,\n warn: props,\n error: props,\n group: props,\n groupCollapsed: props,\n groupEnd: props\n });\n /* eslint-enable react-internal/no-production-logging */\n }\n\n disabledDepth++;\n }\n}\nfunction reenableLogs() {\n {\n disabledDepth--;\n\n if (disabledDepth === 0) {\n /* eslint-disable react-internal/no-production-logging */\n var props = {\n configurable: true,\n enumerable: true,\n writable: true\n }; // $FlowFixMe Flow thinks console is immutable.\n\n Object.defineProperties(console, {\n log: assign({}, props, {\n value: prevLog\n }),\n info: assign({}, props, {\n value: prevInfo\n }),\n warn: assign({}, props, {\n value: prevWarn\n }),\n error: assign({}, props, {\n value: prevError\n }),\n group: assign({}, props, {\n value: prevGroup\n }),\n groupCollapsed: assign({}, props, {\n value: prevGroupCollapsed\n }),\n groupEnd: assign({}, props, {\n value: prevGroupEnd\n })\n });\n /* eslint-enable react-internal/no-production-logging */\n }\n\n if (disabledDepth < 0) {\n error('disabledDepth fell below zero. ' + 'This is a bug in React. Please file an issue.');\n }\n }\n}\n\nvar ReactCurrentDispatcher = ReactSharedInternals.ReactCurrentDispatcher;\nvar prefix;\nfunction describeBuiltInComponentFrame(name, source, ownerFn) {\n {\n if (prefix === undefined) {\n // Extract the VM specific prefix used by each line.\n try {\n throw Error();\n } catch (x) {\n var match = x.stack.trim().match(/\\n( *(at )?)/);\n prefix = match && match[1] || '';\n }\n } // We use the prefix to ensure our stacks line up with native stack frames.\n\n\n return '\\n' + prefix + name;\n }\n}\nvar reentry = false;\nvar componentFrameCache;\n\n{\n var PossiblyWeakMap = typeof WeakMap === 'function' ? WeakMap : Map;\n componentFrameCache = new PossiblyWeakMap();\n}\n\nfunction describeNativeComponentFrame(fn, construct) {\n // If something asked for a stack inside a fake render, it should get ignored.\n if ( !fn || reentry) {\n return '';\n }\n\n {\n var frame = componentFrameCache.get(fn);\n\n if (frame !== undefined) {\n return frame;\n }\n }\n\n var control;\n reentry = true;\n var previousPrepareStackTrace = Error.prepareStackTrace; // $FlowFixMe It does accept undefined.\n\n Error.prepareStackTrace = undefined;\n var previousDispatcher;\n\n {\n previousDispatcher = ReactCurrentDispatcher.current; // Set the dispatcher in DEV because this might be call in the render function\n // for warnings.\n\n ReactCurrentDispatcher.current = null;\n disableLogs();\n }\n\n try {\n // This should throw.\n if (construct) {\n // Something should be setting the props in the constructor.\n var Fake = function () {\n throw Error();\n }; // $FlowFixMe\n\n\n Object.defineProperty(Fake.prototype, 'props', {\n set: function () {\n // We use a throwing setter instead of frozen or non-writable props\n // because that won't throw in a non-strict mode function.\n throw Error();\n }\n });\n\n if (typeof Reflect === 'object' && Reflect.construct) {\n // We construct a different control for this case to include any extra\n // frames added by the construct call.\n try {\n Reflect.construct(Fake, []);\n } catch (x) {\n control = x;\n }\n\n Reflect.construct(fn, [], Fake);\n } else {\n try {\n Fake.call();\n } catch (x) {\n control = x;\n }\n\n fn.call(Fake.prototype);\n }\n } else {\n try {\n throw Error();\n } catch (x) {\n control = x;\n }\n\n fn();\n }\n } catch (sample) {\n // This is inlined manually because closure doesn't do it for us.\n if (sample && control && typeof sample.stack === 'string') {\n // This extracts the first frame from the sample that isn't also in the control.\n // Skipping one frame that we assume is the frame that calls the two.\n var sampleLines = sample.stack.split('\\n');\n var controlLines = control.stack.split('\\n');\n var s = sampleLines.length - 1;\n var c = controlLines.length - 1;\n\n while (s >= 1 && c >= 0 && sampleLines[s] !== controlLines[c]) {\n // We expect at least one stack frame to be shared.\n // Typically this will be the root most one. However, stack frames may be\n // cut off due to maximum stack limits. In this case, one maybe cut off\n // earlier than the other. We assume that the sample is longer or the same\n // and there for cut off earlier. So we should find the root most frame in\n // the sample somewhere in the control.\n c--;\n }\n\n for (; s >= 1 && c >= 0; s--, c--) {\n // Next we find the first one that isn't the same which should be the\n // frame that called our sample function and the control.\n if (sampleLines[s] !== controlLines[c]) {\n // In V8, the first line is describing the message but other VMs don't.\n // If we're about to return the first line, and the control is also on the same\n // line, that's a pretty good indicator that our sample threw at same line as\n // the control. I.e. before we entered the sample frame. So we ignore this result.\n // This can happen if you passed a class to function component, or non-function.\n if (s !== 1 || c !== 1) {\n do {\n s--;\n c--; // We may still have similar intermediate frames from the construct call.\n // The next one that isn't the same should be our match though.\n\n if (c < 0 || sampleLines[s] !== controlLines[c]) {\n // V8 adds a \"new\" prefix for native classes. Let's remove it to make it prettier.\n var _frame = '\\n' + sampleLines[s].replace(' at new ', ' at '); // If our component frame is labeled \"<anonymous>\"\n // but we have a user-provided \"displayName\"\n // splice it in to make the stack more readable.\n\n\n if (fn.displayName && _frame.includes('<anonymous>')) {\n _frame = _frame.replace('<anonymous>', fn.displayName);\n }\n\n {\n if (typeof fn === 'function') {\n componentFrameCache.set(fn, _frame);\n }\n } // Return the line we found.\n\n\n return _frame;\n }\n } while (s >= 1 && c >= 0);\n }\n\n break;\n }\n }\n }\n } finally {\n reentry = false;\n\n {\n ReactCurrentDispatcher.current = previousDispatcher;\n reenableLogs();\n }\n\n Error.prepareStackTrace = previousPrepareStackTrace;\n } // Fallback to just using the name if we couldn't make it throw.\n\n\n var name = fn ? fn.displayName || fn.name : '';\n var syntheticFrame = name ? describeBuiltInComponentFrame(name) : '';\n\n {\n if (typeof fn === 'function') {\n componentFrameCache.set(fn, syntheticFrame);\n }\n }\n\n return syntheticFrame;\n}\nfunction describeFunctionComponentFrame(fn, source, ownerFn) {\n {\n return describeNativeComponentFrame(fn, false);\n }\n}\n\nfunction shouldConstruct(Component) {\n var prototype = Component.prototype;\n return !!(prototype && prototype.isReactComponent);\n}\n\nfunction describeUnknownElementTypeFrameInDEV(type, source, ownerFn) {\n\n if (type == null) {\n return '';\n }\n\n if (typeof type === 'function') {\n {\n return describeNativeComponentFrame(type, shouldConstruct(type));\n }\n }\n\n if (typeof type === 'string') {\n return describeBuiltInComponentFrame(type);\n }\n\n switch (type) {\n case REACT_SUSPENSE_TYPE:\n return describeBuiltInComponentFrame('Suspense');\n\n case REACT_SUSPENSE_LIST_TYPE:\n return describeBuiltInComponentFrame('SuspenseList');\n }\n\n if (typeof type === 'object') {\n switch (type.$$typeof) {\n case REACT_FORWARD_REF_TYPE:\n return describeFunctionComponentFrame(type.render);\n\n case REACT_MEMO_TYPE:\n // Memo may contain any component type so we recursively resolve it.\n return describeUnknownElementTypeFrameInDEV(type.type, source, ownerFn);\n\n case REACT_LAZY_TYPE:\n {\n var lazyComponent = type;\n var payload = lazyComponent._payload;\n var init = lazyComponent._init;\n\n try {\n // Lazy may contain any component type so we recursively resolve it.\n return describeUnknownElementTypeFrameInDEV(init(payload), source, ownerFn);\n } catch (x) {}\n }\n }\n }\n\n return '';\n}\n\nvar hasOwnProperty = Object.prototype.hasOwnProperty;\n\nvar loggedTypeFailures = {};\nvar ReactDebugCurrentFrame = ReactSharedInternals.ReactDebugCurrentFrame;\n\nfunction setCurrentlyValidatingElement(element) {\n {\n if (element) {\n var owner = element._owner;\n var stack = describeUnknownElementTypeFrameInDEV(element.type, element._source, owner ? owner.type : null);\n ReactDebugCurrentFrame.setExtraStackFrame(stack);\n } else {\n ReactDebugCurrentFrame.setExtraStackFrame(null);\n }\n }\n}\n\nfunction checkPropTypes(typeSpecs, values, location, componentName, element) {\n {\n // $FlowFixMe This is okay but Flow doesn't know it.\n var has = Function.call.bind(hasOwnProperty);\n\n for (var typeSpecName in typeSpecs) {\n if (has(typeSpecs, typeSpecName)) {\n var error$1 = void 0; // Prop type validation may throw. In case they do, we don't want to\n // fail the render phase where it didn't fail before. So we log it.\n // After these have been cleaned up, we'll let them throw.\n\n try {\n // This is intentionally an invariant that gets caught. It's the same\n // behavior as without this statement except with a better message.\n if (typeof typeSpecs[typeSpecName] !== 'function') {\n // eslint-disable-next-line react-internal/prod-error-codes\n var err = Error((componentName || 'React class') + ': ' + location + ' type `' + typeSpecName + '` is invalid; ' + 'it must be a function, usually from the `prop-types` package, but received `' + typeof typeSpecs[typeSpecName] + '`.' + 'This often happens because of typos such as `PropTypes.function` instead of `PropTypes.func`.');\n err.name = 'Invariant Violation';\n throw err;\n }\n\n error$1 = typeSpecs[typeSpecName](values, typeSpecName, componentName, location, null, 'SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED');\n } catch (ex) {\n error$1 = ex;\n }\n\n if (error$1 && !(error$1 instanceof Error)) {\n setCurrentlyValidatingElement(element);\n\n error('%s: type specification of %s' + ' `%s` is invalid; the type checker ' + 'function must return `null` or an `Error` but returned a %s. ' + 'You may have forgotten to pass an argument to the type checker ' + 'creator (arrayOf, instanceOf, objectOf, oneOf, oneOfType, and ' + 'shape all require an argument).', componentName || 'React class', location, typeSpecName, typeof error$1);\n\n setCurrentlyValidatingElement(null);\n }\n\n if (error$1 instanceof Error && !(error$1.message in loggedTypeFailures)) {\n // Only monitor this failure once because there tends to be a lot of the\n // same error.\n loggedTypeFailures[error$1.message] = true;\n setCurrentlyValidatingElement(element);\n\n error('Failed %s type: %s', location, error$1.message);\n\n setCurrentlyValidatingElement(null);\n }\n }\n }\n }\n}\n\nvar isArrayImpl = Array.isArray; // eslint-disable-next-line no-redeclare\n\nfunction isArray(a) {\n return isArrayImpl(a);\n}\n\n/*\n * The `'' + value` pattern (used in in perf-sensitive code) throws for Symbol\n * and Temporal.* types. See https://github.com/facebook/react/pull/22064.\n *\n * The functions in this module will throw an easier-to-understand,\n * easier-to-debug exception with a clear errors message message explaining the\n * problem. (Instead of a confusing exception thrown inside the implementation\n * of the `value` object).\n */\n// $FlowFixMe only called in DEV, so void return is not possible.\nfunction typeName(value) {\n {\n // toStringTag is needed for namespaced types like Temporal.Instant\n var hasToStringTag = typeof Symbol === 'function' && Symbol.toStringTag;\n var type = hasToStringTag && value[Symbol.toStringTag] || value.constructor.name || 'Object';\n return type;\n }\n} // $FlowFixMe only called in DEV, so void return is not possible.\n\n\nfunction willCoercionThrow(value) {\n {\n try {\n testStringCoercion(value);\n return false;\n } catch (e) {\n return true;\n }\n }\n}\n\nfunction testStringCoercion(value) {\n // If you ended up here by following an exception call stack, here's what's\n // happened: you supplied an object or symbol value to React (as a prop, key,\n // DOM attribute, CSS property, string ref, etc.) and when React tried to\n // coerce it to a string using `'' + value`, an exception was thrown.\n //\n // The most common types that will cause this exception are `Symbol` instances\n // and Temporal objects like `Temporal.Instant`. But any object that has a\n // `valueOf` or `[Symbol.toPrimitive]` method that throws will also cause this\n // exception. (Library authors do this to prevent users from using built-in\n // numeric operators like `+` or comparison operators like `>=` because custom\n // methods are needed to perform accurate arithmetic or comparison.)\n //\n // To fix the problem, coerce this object or symbol value to a string before\n // passing it to React. The most reliable way is usually `String(value)`.\n //\n // To find which value is throwing, check the browser or debugger console.\n // Before this exception was thrown, there should be `console.error` output\n // that shows the type (Symbol, Temporal.PlainDate, etc.) that caused the\n // problem and how that type was used: key, atrribute, input value prop, etc.\n // In most cases, this console output also shows the component and its\n // ancestor components where the exception happened.\n //\n // eslint-disable-next-line react-internal/safe-string-coercion\n return '' + value;\n}\nfunction checkKeyStringCoercion(value) {\n {\n if (willCoercionThrow(value)) {\n error('The provided key is an unsupported type %s.' + ' This value must be coerced to a string before before using it here.', typeName(value));\n\n return testStringCoercion(value); // throw (to help callers find troubleshooting comments)\n }\n }\n}\n\nvar ReactCurrentOwner = ReactSharedInternals.ReactCurrentOwner;\nvar RESERVED_PROPS = {\n key: true,\n ref: true,\n __self: true,\n __source: true\n};\nvar specialPropKeyWarningShown;\nvar specialPropRefWarningShown;\nvar didWarnAboutStringRefs;\n\n{\n didWarnAboutStringRefs = {};\n}\n\nfunction hasValidRef(config) {\n {\n if (hasOwnProperty.call(config, 'ref')) {\n var getter = Object.getOwnPropertyDescriptor(config, 'ref').get;\n\n if (getter && getter.isReactWarning) {\n return false;\n }\n }\n }\n\n return config.ref !== undefined;\n}\n\nfunction hasValidKey(config) {\n {\n if (hasOwnProperty.call(config, 'key')) {\n var getter = Object.getOwnPropertyDescriptor(config, 'key').get;\n\n if (getter && getter.isReactWarning) {\n return false;\n }\n }\n }\n\n return config.key !== undefined;\n}\n\nfunction warnIfStringRefCannotBeAutoConverted(config, self) {\n {\n if (typeof config.ref === 'string' && ReactCurrentOwner.current && self && ReactCurrentOwner.current.stateNode !== self) {\n var componentName = getComponentNameFromType(ReactCurrentOwner.current.type);\n\n if (!didWarnAboutStringRefs[componentName]) {\n error('Component \"%s\" contains the string ref \"%s\". ' + 'Support for string refs will be removed in a future major release. ' + 'This case cannot be automatically converted to an arrow function. ' + 'We ask you to manually fix this case by using useRef() or createRef() instead. ' + 'Learn more about using refs safely here: ' + 'https://reactjs.org/link/strict-mode-string-ref', getComponentNameFromType(ReactCurrentOwner.current.type), config.ref);\n\n didWarnAboutStringRefs[componentName] = true;\n }\n }\n }\n}\n\nfunction defineKeyPropWarningGetter(props, displayName) {\n {\n var warnAboutAccessingKey = function () {\n if (!specialPropKeyWarningShown) {\n specialPropKeyWarningShown = true;\n\n error('%s: `key` is not a prop. Trying to access it will result ' + 'in `undefined` being returned. If you need to access the same ' + 'value within the child component, you should pass it as a different ' + 'prop. (https://reactjs.org/link/special-props)', displayName);\n }\n };\n\n warnAboutAccessingKey.isReactWarning = true;\n Object.defineProperty(props, 'key', {\n get: warnAboutAccessingKey,\n configurable: true\n });\n }\n}\n\nfunction defineRefPropWarningGetter(props, displayName) {\n {\n var warnAboutAccessingRef = function () {\n if (!specialPropRefWarningShown) {\n specialPropRefWarningShown = true;\n\n error('%s: `ref` is not a prop. Trying to access it will result ' + 'in `undefined` being returned. If you need to access the same ' + 'value within the child component, you should pass it as a different ' + 'prop. (https://reactjs.org/link/special-props)', displayName);\n }\n };\n\n warnAboutAccessingRef.isReactWarning = true;\n Object.defineProperty(props, 'ref', {\n get: warnAboutAccessingRef,\n configurable: true\n });\n }\n}\n/**\n * Factory method to create a new React element. This no longer adheres to\n * the class pattern, so do not use new to call it. Also, instanceof check\n * will not work. Instead test $$typeof field against Symbol.for('react.element') to check\n * if something is a React Element.\n *\n * @param {*} type\n * @param {*} props\n * @param {*} key\n * @param {string|object} ref\n * @param {*} owner\n * @param {*} self A *temporary* helper to detect places where `this` is\n * different from the `owner` when React.createElement is called, so that we\n * can warn. We want to get rid of owner and replace string `ref`s with arrow\n * functions, and as long as `this` and owner are the same, there will be no\n * change in behavior.\n * @param {*} source An annotation object (added by a transpiler or otherwise)\n * indicating filename, line number, and/or other information.\n * @internal\n */\n\n\nvar ReactElement = function (type, key, ref, self, source, owner, props) {\n var element = {\n // This tag allows us to uniquely identify this as a React Element\n $$typeof: REACT_ELEMENT_TYPE,\n // Built-in properties that belong on the element\n type: type,\n key: key,\n ref: ref,\n props: props,\n // Record the component responsible for creating this element.\n _owner: owner\n };\n\n {\n // The validation flag is currently mutative. We put it on\n // an external backing store so that we can freeze the whole object.\n // This can be replaced with a WeakMap once they are implemented in\n // commonly used development environments.\n element._store = {}; // To make comparing ReactElements easier for testing purposes, we make\n // the validation flag non-enumerable (where possible, which should\n // include every environment we run tests in), so the test framework\n // ignores it.\n\n Object.defineProperty(element._store, 'validated', {\n configurable: false,\n enumerable: false,\n writable: true,\n value: false\n }); // self and source are DEV only properties.\n\n Object.defineProperty(element, '_self', {\n configurable: false,\n enumerable: false,\n writable: false,\n value: self\n }); // Two elements created in two different places should be considered\n // equal for testing purposes and therefore we hide it from enumeration.\n\n Object.defineProperty(element, '_source', {\n configurable: false,\n enumerable: false,\n writable: false,\n value: source\n });\n\n if (Object.freeze) {\n Object.freeze(element.props);\n Object.freeze(element);\n }\n }\n\n return element;\n};\n/**\n * https://github.com/reactjs/rfcs/pull/107\n * @param {*} type\n * @param {object} props\n * @param {string} key\n */\n\nfunction jsxDEV(type, config, maybeKey, source, self) {\n {\n var propName; // Reserved names are extracted\n\n var props = {};\n var key = null;\n var ref = null; // Currently, key can be spread in as a prop. This causes a potential\n // issue if key is also explicitly declared (ie. <div {...props} key=\"Hi\" />\n // or <div key=\"Hi\" {...props} /> ). We want to deprecate key spread,\n // but as an intermediary step, we will use jsxDEV for everything except\n // <div {...props} key=\"Hi\" />, because we aren't currently able to tell if\n // key is explicitly declared to be undefined or not.\n\n if (maybeKey !== undefined) {\n {\n checkKeyStringCoercion(maybeKey);\n }\n\n key = '' + maybeKey;\n }\n\n if (hasValidKey(config)) {\n {\n checkKeyStringCoercion(config.key);\n }\n\n key = '' + config.key;\n }\n\n if (hasValidRef(config)) {\n ref = config.ref;\n warnIfStringRefCannotBeAutoConverted(config, self);\n } // Remaining properties are added to a new props object\n\n\n for (propName in config) {\n if (hasOwnProperty.call(config, propName) && !RESERVED_PROPS.hasOwnProperty(propName)) {\n props[propName] = config[propName];\n }\n } // Resolve default props\n\n\n if (type && type.defaultProps) {\n var defaultProps = type.defaultProps;\n\n for (propName in defaultProps) {\n if (props[propName] === undefined) {\n props[propName] = defaultProps[propName];\n }\n }\n }\n\n if (key || ref) {\n var displayName = typeof type === 'function' ? type.displayName || type.name || 'Unknown' : type;\n\n if (key) {\n defineKeyPropWarningGetter(props, displayName);\n }\n\n if (ref) {\n defineRefPropWarningGetter(props, displayName);\n }\n }\n\n return ReactElement(type, key, ref, self, source, ReactCurrentOwner.current, props);\n }\n}\n\nvar ReactCurrentOwner$1 = ReactSharedInternals.ReactCurrentOwner;\nvar ReactDebugCurrentFrame$1 = ReactSharedInternals.ReactDebugCurrentFrame;\n\nfunction setCurrentlyValidatingElement$1(element) {\n {\n if (element) {\n var owner = element._owner;\n var stack = describeUnknownElementTypeFrameInDEV(element.type, element._source, owner ? owner.type : null);\n ReactDebugCurrentFrame$1.setExtraStackFrame(stack);\n } else {\n ReactDebugCurrentFrame$1.setExtraStackFrame(null);\n }\n }\n}\n\nvar propTypesMisspellWarningShown;\n\n{\n propTypesMisspellWarningShown = false;\n}\n/**\n * Verifies the object is a ReactElement.\n * See https://reactjs.org/docs/react-api.html#isvalidelement\n * @param {?object} object\n * @return {boolean} True if `object` is a ReactElement.\n * @final\n */\n\n\nfunction isValidElement(object) {\n {\n return typeof object === 'object' && object !== null && object.$$typeof === REACT_ELEMENT_TYPE;\n }\n}\n\nfunction getDeclarationErrorAddendum() {\n {\n if (ReactCurrentOwner$1.current) {\n var name = getComponentNameFromType(ReactCurrentOwner$1.current.type);\n\n if (name) {\n return '\\n\\nCheck the render method of `' + name + '`.';\n }\n }\n\n return '';\n }\n}\n\nfunction getSourceInfoErrorAddendum(source) {\n {\n if (source !== undefined) {\n var fileName = source.fileName.replace(/^.*[\\\\\\/]/, '');\n var lineNumber = source.lineNumber;\n return '\\n\\nCheck your code at ' + fileName + ':' + lineNumber + '.';\n }\n\n return '';\n }\n}\n/**\n * Warn if there's no key explicitly set on dynamic arrays of children or\n * object keys are not valid. This allows us to keep track of children between\n * updates.\n */\n\n\nvar ownerHasKeyUseWarning = {};\n\nfunction getCurrentComponentErrorInfo(parentType) {\n {\n var info = getDeclarationErrorAddendum();\n\n if (!info) {\n var parentName = typeof parentType === 'string' ? parentType : parentType.displayName || parentType.name;\n\n if (parentName) {\n info = \"\\n\\nCheck the top-level render call using <\" + parentName + \">.\";\n }\n }\n\n return info;\n }\n}\n/**\n * Warn if the element doesn't have an explicit key assigned to it.\n * This element is in an array. The array could grow and shrink or be\n * reordered. All children that haven't already been validated are required to\n * have a \"key\" property assigned to it. Error statuses are cached so a warning\n * will only be shown once.\n *\n * @internal\n * @param {ReactElement} element Element that requires a key.\n * @param {*} parentType element's parent's type.\n */\n\n\nfunction validateExplicitKey(element, parentType) {\n {\n if (!element._store || element._store.validated || element.key != null) {\n return;\n }\n\n element._store.validated = true;\n var currentComponentErrorInfo = getCurrentComponentErrorInfo(parentType);\n\n if (ownerHasKeyUseWarning[currentComponentErrorInfo]) {\n return;\n }\n\n ownerHasKeyUseWarning[currentComponentErrorInfo] = true; // Usually the current owner is the offender, but if it accepts children as a\n // property, it may be the creator of the child that's responsible for\n // assigning it a key.\n\n var childOwner = '';\n\n if (element && element._owner && element._owner !== ReactCurrentOwner$1.current) {\n // Give the component that originally created this child.\n childOwner = \" It was passed a child from \" + getComponentNameFromType(element._owner.type) + \".\";\n }\n\n setCurrentlyValidatingElement$1(element);\n\n error('Each child in a list should have a unique \"key\" prop.' + '%s%s See https://reactjs.org/link/warning-keys for more information.', currentComponentErrorInfo, childOwner);\n\n setCurrentlyValidatingElement$1(null);\n }\n}\n/**\n * Ensure that every element either is passed in a static location, in an\n * array with an explicit keys property defined, or in an object literal\n * with valid key property.\n *\n * @internal\n * @param {ReactNode} node Statically passed child of any type.\n * @param {*} parentType node's parent's type.\n */\n\n\nfunction validateChildKeys(node, parentType) {\n {\n if (typeof node !== 'object') {\n return;\n }\n\n if (isArray(node)) {\n for (var i = 0; i < node.length; i++) {\n var child = node[i];\n\n if (isValidElement(child)) {\n validateExplicitKey(child, parentType);\n }\n }\n } else if (isValidElement(node)) {\n // This element was passed in a valid location.\n if (node._store) {\n node._store.validated = true;\n }\n } else if (node) {\n var iteratorFn = getIteratorFn(node);\n\n if (typeof iteratorFn === 'function') {\n // Entry iterators used to provide implicit keys,\n // but now we print a separate warning for them later.\n if (iteratorFn !== node.entries) {\n var iterator = iteratorFn.call(node);\n var step;\n\n while (!(step = iterator.next()).done) {\n if (isValidElement(step.value)) {\n validateExplicitKey(step.value, parentType);\n }\n }\n }\n }\n }\n }\n}\n/**\n * Given an element, validate that its props follow the propTypes definition,\n * provided by the type.\n *\n * @param {ReactElement} element\n */\n\n\nfunction validatePropTypes(element) {\n {\n var type = element.type;\n\n if (type === null || type === undefined || typeof type === 'string') {\n return;\n }\n\n var propTypes;\n\n if (typeof type === 'function') {\n propTypes = type.propTypes;\n } else if (typeof type === 'object' && (type.$$typeof === REACT_FORWARD_REF_TYPE || // Note: Memo only checks outer props here.\n // Inner props are checked in the reconciler.\n type.$$typeof === REACT_MEMO_TYPE)) {\n propTypes = type.propTypes;\n } else {\n return;\n }\n\n if (propTypes) {\n // Intentionally inside to avoid triggering lazy initializers:\n var name = getComponentNameFromType(type);\n checkPropTypes(propTypes, element.props, 'prop', name, element);\n } else if (type.PropTypes !== undefined && !propTypesMisspellWarningShown) {\n propTypesMisspellWarningShown = true; // Intentionally inside to avoid triggering lazy initializers:\n\n var _name = getComponentNameFromType(type);\n\n error('Component %s declared `PropTypes` instead of `propTypes`. Did you misspell the property assignment?', _name || 'Unknown');\n }\n\n if (typeof type.getDefaultProps === 'function' && !type.getDefaultProps.isReactClassApproved) {\n error('getDefaultProps is only used on classic React.createClass ' + 'definitions. Use a static property named `defaultProps` instead.');\n }\n }\n}\n/**\n * Given a fragment, validate that it can only be provided with fragment props\n * @param {ReactElement} fragment\n */\n\n\nfunction validateFragmentProps(fragment) {\n {\n var keys = Object.keys(fragment.props);\n\n for (var i = 0; i < keys.length; i++) {\n var key = keys[i];\n\n if (key !== 'children' && key !== 'key') {\n setCurrentlyValidatingElement$1(fragment);\n\n error('Invalid prop `%s` supplied to `React.Fragment`. ' + 'React.Fragment can only have `key` and `children` props.', key);\n\n setCurrentlyValidatingElement$1(null);\n break;\n }\n }\n\n if (fragment.ref !== null) {\n setCurrentlyValidatingElement$1(fragment);\n\n error('Invalid attribute `ref` supplied to `React.Fragment`.');\n\n setCurrentlyValidatingElement$1(null);\n }\n }\n}\n\nvar didWarnAboutKeySpread = {};\nfunction jsxWithValidation(type, props, key, isStaticChildren, source, self) {\n {\n var validType = isValidElementType(type); // We warn in this case but don't throw. We expect the element creation to\n // succeed and there will likely be errors in render.\n\n if (!validType) {\n var info = '';\n\n if (type === undefined || typeof type === 'object' && type !== null && Object.keys(type).length === 0) {\n info += ' You likely forgot to export your component from the file ' + \"it's defined in, or you might have mixed up default and named imports.\";\n }\n\n var sourceInfo = getSourceInfoErrorAddendum(source);\n\n if (sourceInfo) {\n info += sourceInfo;\n } else {\n info += getDeclarationErrorAddendum();\n }\n\n var typeString;\n\n if (type === null) {\n typeString = 'null';\n } else if (isArray(type)) {\n typeString = 'array';\n } else if (type !== undefined && type.$$typeof === REACT_ELEMENT_TYPE) {\n typeString = \"<\" + (getComponentNameFromType(type.type) || 'Unknown') + \" />\";\n info = ' Did you accidentally export a JSX literal instead of a component?';\n } else {\n typeString = typeof type;\n }\n\n error('React.jsx: type is invalid -- expected a string (for ' + 'built-in components) or a class/function (for composite ' + 'components) but got: %s.%s', typeString, info);\n }\n\n var element = jsxDEV(type, props, key, source, self); // The result can be nullish if a mock or a custom function is used.\n // TODO: Drop this when these are no longer allowed as the type argument.\n\n if (element == null) {\n return element;\n } // Skip key warning if the type isn't valid since our key validation logic\n // doesn't expect a non-string/function type and can throw confusing errors.\n // We don't want exception behavior to differ between dev and prod.\n // (Rendering will throw with a helpful message and as soon as the type is\n // fixed, the key warnings will appear.)\n\n\n if (validType) {\n var children = props.children;\n\n if (children !== undefined) {\n if (isStaticChildren) {\n if (isArray(children)) {\n for (var i = 0; i < children.length; i++) {\n validateChildKeys(children[i], type);\n }\n\n if (Object.freeze) {\n Object.freeze(children);\n }\n } else {\n error('React.jsx: Static children should always be an array. ' + 'You are likely explicitly calling React.jsxs or React.jsxDEV. ' + 'Use the Babel transform instead.');\n }\n } else {\n validateChildKeys(children, type);\n }\n }\n }\n\n {\n if (hasOwnProperty.call(props, 'key')) {\n var componentName = getComponentNameFromType(type);\n var keys = Object.keys(props).filter(function (k) {\n return k !== 'key';\n });\n var beforeExample = keys.length > 0 ? '{key: someKey, ' + keys.join(': ..., ') + ': ...}' : '{key: someKey}';\n\n if (!didWarnAboutKeySpread[componentName + beforeExample]) {\n var afterExample = keys.length > 0 ? '{' + keys.join(': ..., ') + ': ...}' : '{}';\n\n error('A props object containing a \"key\" prop is being spread into JSX:\\n' + ' let props = %s;\\n' + ' <%s {...props} />\\n' + 'React keys must be passed directly to JSX without using spread:\\n' + ' let props = %s;\\n' + ' <%s key={someKey} {...props} />', beforeExample, componentName, afterExample, componentName);\n\n didWarnAboutKeySpread[componentName + beforeExample] = true;\n }\n }\n }\n\n if (type === REACT_FRAGMENT_TYPE) {\n validateFragmentProps(element);\n } else {\n validatePropTypes(element);\n }\n\n return element;\n }\n} // These two functions exist to still get child warnings in dev\n// even with the prod transform. This means that jsxDEV is purely\n// opt-in behavior for better messages but that we won't stop\n// giving you warnings if you use production apis.\n\nfunction jsxWithValidationStatic(type, props, key) {\n {\n return jsxWithValidation(type, props, key, true);\n }\n}\nfunction jsxWithValidationDynamic(type, props, key) {\n {\n return jsxWithValidation(type, props, key, false);\n }\n}\n\nvar jsx = jsxWithValidationDynamic ; // we may want to special case jsxs internally to take advantage of static children.\n// for now we can ship identical prod functions\n\nvar jsxs = jsxWithValidationStatic ;\n\nexports.Fragment = REACT_FRAGMENT_TYPE;\nexports.jsx = jsx;\nexports.jsxs = jsxs;\n })();\n}\n","'use strict';\n\nif (process.env.NODE_ENV === 'production') {\n module.exports = require('./cjs/react-jsx-runtime.production.min.js');\n} else {\n module.exports = require('./cjs/react-jsx-runtime.development.js');\n}\n","// https://source.dot.net/#Microsoft.Extensions.Logging.Abstractions/LogLevel.cs,d07793e8b722b77e,references\nexport enum LogLevel {\n\t/**\n\t * Logs that contain the most detailed messages. These messages may contain sensitive application data.\n\t * These messages are disabled by default and should never be enabled in a production environment.\n\t */\n\tTrace = 0,\n\t/**\n\t * Logs that are used for interactive investigation during development. These logs should primarily contain\n\t * information useful for debugging and have no long-term value.\n\t */\n\tDebug = 1,\n\t/**\n\t * Logs that track the general flow of the application. These logs should have long-term value.\n\t */\n\tInformation = 2,\n\t/**\n\t * Logs that highlight an abnormal or unexpected event in the application flow, but do not otherwise cause the\n\t * application execution to stop.\n\t */\n\tWarning = 3,\n\t/**\n\t * Logs that highlight when the current flow of execution is stopped due to a failure. These should indicate a\n\t * failure in the current activity, not an application-wide failure.\n\t */\n\tError = 4,\n\t/**\n\t * Logs that describe an unrecoverable application or system crash, or a catastrophic failure that requires\n\t * immediate attention.\n\t */\n\tCritical = 5,\n\t/**\n\t * Not used for writing log messages. Specifies that a logging category should not write any messages.\n\t */\n\tNone = 6,\n}\n\n// https://source.dot.net/#Microsoft.Extensions.Logging.Abstractions/ILogger.cs,0976525f5d1b9e54,references\nexport interface ILogger {\n\tisEnabled(logLevel: LogLevel): boolean;\n\tlog(logLevel: LogLevel, message?: any, ...optionalParams: any[]): void;\n}\n\nclass Logger implements ILogger {\n\tprivate readonly title = 'nostalgic-diva';\n\n\tprivate createMessage(message: any): string {\n\t\treturn `[${this.title}] ${message}`;\n\t}\n\n\tprivate debug(message?: any, ...optionalParams: any): void {\n\t\tconsole.debug(this.createMessage(message), ...optionalParams);\n\t}\n\n\tprivate error(message?: any, ...optionalParams: any): void {\n\t\tconsole.error(this.createMessage(message), ...optionalParams);\n\t}\n\n\tprivate warn(message?: any, ...optionalParams: any): void {\n\t\tconsole.warn(this.createMessage(message), ...optionalParams);\n\t}\n\n\tisEnabled(): boolean {\n\t\treturn true;\n\t}\n\n\tlog(logLevel: LogLevel, message?: any, ...optionalParams: any[]): void {\n\t\tswitch (logLevel) {\n\t\t\tcase LogLevel.Debug:\n\t\t\t\tthis.debug(message, ...optionalParams);\n\t\t\t\tbreak;\n\t\t\tcase LogLevel.Warning:\n\t\t\t\tthis.warn(message, ...optionalParams);\n\t\t\t\tbreak;\n\t\t\tcase LogLevel.Error:\n\t\t\t\tthis.error(message, ...optionalParams);\n\t\t\t\tbreak;\n\t\t}\n\t}\n}\n\nexport const defaultLogger = new Logger();\n","import type {\n\tIPlayerCommands,\n\tIPlayerController,\n} from '@/controllers/PlayerController';\n\nclass NullPlayerController implements IPlayerController {\n\tasync attach(): Promise<void> {}\n\n\tasync detach(): Promise<void> {}\n\n\tasync loadVideo(_id: string): Promise<void> {}\n\n\tasync play(): Promise<void> {}\n\n\tasync pause(): Promise<void> {}\n\n\tasync setCurrentTime(_seconds: number): Promise<void> {}\n\n\tasync setVolume(_volume: number): Promise<void> {}\n\n\tasync setMuted(_muted: boolean): Promise<void> {}\n\n\tasync setPlaybackRate(_playbackRate: number): Promise<void> {}\n\n\tasync getDuration(): Promise<number> {\n\t\treturn 0;\n\t}\n\n\tasync getCurrentTime(): Promise<number> {\n\t\treturn 0;\n\t}\n\n\tasync getVolume(): Promise<number> {\n\t\treturn 0;\n\t}\n\n\tasync getMuted(): Promise<boolean> {\n\t\treturn false;\n\t}\n\n\tasync getPlaybackRate(): Promise<number> {\n\t\treturn 0;\n\t}\n\n\tsupports(_command: keyof IPlayerCommands): boolean {\n\t\treturn false;\n\t}\n}\n\nexport const nullPlayerController = new NullPlayerController();\n","import { type ILogger, LogLevel, defaultLogger } from '@/controllers/Logger';\nimport { nullPlayerController } from '@/controllers/NullPlayerController';\nimport type {\n\tIPlayerCommands,\n\tIPlayerController,\n} from '@/controllers/PlayerController';\nimport {\n\ttype ReactElement,\n\ttype ReactNode,\n\tcreateContext,\n\tuseCallback,\n\tuseContext,\n\tuseMemo,\n\tuseRef,\n} from 'react';\n\ninterface NostalgicDivaContextProps extends IPlayerController {\n\tlogger: ILogger;\n\thandleControllerChange: (value: IPlayerController) => void;\n}\n\nconst NostalgicDivaContext = createContext<NostalgicDivaContextProps>(\n\tundefined!,\n);\n\nexport interface NostalgicDivaProviderProps {\n\tchildren?: ReactNode;\n\tlogger?: ILogger;\n}\n\nexport const NostalgicDivaProvider = ({\n\tchildren,\n\tlogger = defaultLogger,\n}: NostalgicDivaProviderProps): ReactElement => {\n\tconst controllerRef = useRef<IPlayerController>(nullPlayerController);\n\n\tconst handleControllerChange = useCallback(\n\t\t(value: IPlayerController): void => {\n\t\t\tlogger.log(\n\t\t\t\tLogLevel.Debug,\n\t\t\t\t'NostalgicDivaProvider.handleControllerChange',\n\t\t\t\tcontrollerRef.current,\n\t\t\t\tvalue,\n\t\t\t);\n\n\t\t\tcontrollerRef.current = value;\n\t\t},\n\t\t[logger],\n\t);\n\n\tconst loadVideo = useCallback(\n\t\tasync (id: string): Promise<void> => {\n\t\t\tlogger.log(\n\t\t\t\tLogLevel.Debug,\n\t\t\t\t'NostalgicDivaProvider.loadVideo',\n\t\t\t\tcontrollerRef.current,\n\t\t\t);\n\n\t\t\tawait controllerRef.current.loadVideo(id);\n\t\t},\n\t\t[logger],\n\t);\n\n\tconst play = useCallback(async (): Promise<void> => {\n\t\tlogger.log(\n\t\t\tLogLevel.Debug,\n\t\t\t'NostalgicDivaProvider.play',\n\t\t\tcontrollerRef.current,\n\t\t);\n\n\t\tawait controllerRef.current.play();\n\t}, [logger]);\n\n\tconst pause = useCallback(async (): Promise<void> => {\n\t\tlogger.log(\n\t\t\tLogLevel.Debug,\n\t\t\t'NostalgicDivaProvider.pause',\n\t\t\tcontrollerRef.current,\n\t\t);\n\n\t\tawait controllerRef.current.pause();\n\t}, [logger]);\n\n\tconst setCurrentTime = useCallback(\n\t\tasync (seconds: number): Promise<void> => {\n\t\t\tlogger.log(\n\t\t\t\tLogLevel.Debug,\n\t\t\t\t'NostalgicDivaProvider.setCurrentTime',\n\t\t\t\tcontrollerRef.current,\n\t\t\t);\n\n\t\t\tawait controllerRef.current.setCurrentTime(seconds);\n\t\t\tawait controllerRef.current.play();\n\t\t},\n\t\t[logger],\n\t);\n\n\tconst setVolume = useCallback(\n\t\tasync (volume: number): Promise<void> => {\n\t\t\tlogger.log(\n\t\t\t\tLogLevel.Debug,\n\t\t\t\t'NostalgicDivaProvider.setVolume',\n\t\t\t\tcontrollerRef.current,\n\t\t\t);\n\n\t\t\tawait controllerRef.current.setVolume(volume);\n\t\t},\n\t\t[logger],\n\t);\n\n\tconst setMuted = useCallback(\n\t\tasync (muted: boolean): Promise<void> => {\n\t\t\tlogger.log(\n\t\t\t\tLogLevel.Debug,\n\t\t\t\t'NostalgicDivaProvider.setMuted',\n\t\t\t\tcontrollerRef.current,\n\t\t\t);\n\n\t\t\tawait controllerRef.current.setMuted(muted);\n\t\t},\n\t\t[logger],\n\t);\n\n\tconst setPlaybackRate = useCallback(\n\t\tasync (playbackRate: number): Promise<void> => {\n\t\t\tlogger.log(\n\t\t\t\tLogLevel.Debug,\n\t\t\t\t'NostalgicDivaProvider.setPlaybackRate',\n\t\t\t\tcontrollerRef.current,\n\t\t\t);\n\n\t\t\tawait controllerRef.current.setPlaybackRate(playbackRate);\n\t\t},\n\t\t[logger],\n\t);\n\n\tconst getDuration = useCallback(async (): Promise<number> => {\n\t\tlogger.log(\n\t\t\tLogLevel.Debug,\n\t\t\t'NostalgicDivaProvider.getDuration',\n\t\t\tcontrollerRef.current,\n\t\t);\n\n\t\treturn await controllerRef.current.getDuration();\n\t}, [logger]);\n\n\tconst getCurrentTime = useCallback(async (): Promise<number> => {\n\t\tlogger.log(\n\t\t\tLogLevel.Debug,\n\t\t\t'NostalgicDivaProvider.getCurrentTime',\n\t\t\tcontrollerRef.current,\n\t\t);\n\n\t\treturn await controllerRef.current.getCurrentTime();\n\t}, [logger]);\n\n\tconst getVolume = useCallback(async (): Promise<number> => {\n\t\tlogger.log(\n\t\t\tLogLevel.Debug,\n\t\t\t'NostalgicDivaProvider.getVolume',\n\t\t\tcontrollerRef.current,\n\t\t);\n\n\t\treturn await controllerRef.current.getVolume();\n\t}, [logger]);\n\n\tconst getMuted = useCallback(async (): Promise<boolean> => {\n\t\tlogger.log(\n\t\t\tLogLevel.Debug,\n\t\t\t'NostalgicDivaProvider.getMuted',\n\t\t\tcontrollerRef.current,\n\t\t);\n\n\t\treturn await controllerRef.current.getMuted();\n\t}, [logger]);\n\n\tconst getPlaybackRate = useCallback(async (): Promise<number> => {\n\t\tlogger.log(\n\t\t\tLogLevel.Debug,\n\t\t\t'NostalgicDivaProvider.getPlaybackRate',\n\t\t\tcontrollerRef.current,\n\t\t);\n\n\t\treturn await controllerRef.current.getPlaybackRate();\n\t}, [logger]);\n\n\tconst supports = useCallback(\n\t\t(command: keyof IPlayerCommands): boolean =>\n\t\t\tcontrollerRef.current.supports(command),\n\t\t[],\n\t);\n\n\tconst value = useMemo(\n\t\t(): NostalgicDivaContextProps => ({\n\t\t\tlogger,\n\t\t\thandleControllerChange,\n\t\t\tloadVideo,\n\t\t\tplay,\n\t\t\tpause,\n\t\t\tsetCurrentTime,\n\t\t\tsetVolume,\n\t\t\tsetMuted,\n\t\t\tsetPlaybackRate,\n\t\t\tgetDuration,\n\t\t\tgetCurrentTime,\n\t\t\tgetVolume,\n\t\t\tgetMuted,\n\t\t\tgetPlaybackRate,\n\t\t\tsupports,\n\t\t}),\n\t\t[\n\t\t\tlogger,\n\t\t\thandleControllerChange,\n\t\t\tloadVideo,\n\t\t\tplay,\n\t\t\tpause,\n\t\t\tsetCurrentTime,\n\t\t\tsetVolume,\n\t\t\tsetMuted,\n\t\t\tsetPlaybackRate,\n\t\t\tgetDuration,\n\t\t\tgetCurrentTime,\n\t\t\tgetVolume,\n\t\t\tgetMuted,\n\t\t\tgetPlaybackRate,\n\t\t\tsupports,\n\t\t],\n\t);\n\n\treturn (\n\t\t<NostalgicDivaContext.Provider value={value}>\n\t\t\t{children}\n\t\t</NostalgicDivaContext.Provider>\n\t);\n};\n\nexport const useNostalgicDiva = (): NostalgicDivaContextProps => {\n\treturn useContext(NostalgicDivaContext);\n};\n","import type { PlayerType } from '@/controllers/PlayerController';\n\nexport abstract class VideoService {\n\tprotected constructor(readonly type: PlayerType) {}\n\n\tabstract canPlay(url: string): boolean;\n\n\tabstract extractVideoId(url: string): string | undefined;\n}\n","import { VideoService } from '@/services/VideoService';\n\n// https://github.com/cookpete/react-player/blob/2811bc59b9368170acc20d4f1e39555413d0d9e1/src/patterns.js\nconst AUDIO_EXTENSIONS =\n\t/\\.(m4a|m4b|mp4a|mpga|mp2|mp2a|mp3|m2a|m3a|wav|weba|aac|oga|spx)($|\\?)/i;\nconst VIDEO_EXTENSIONS = /\\.(mp4|og[gv]|webm|mov|m4v)(#t=[,\\d+]+)?($|\\?)/i;\n\nexport class AudioVideoService extends VideoService {\n\tconstructor() {\n\t\tsuper('Audio');\n\t}\n\n\tcanPlay(url: string): boolean {\n\t\treturn AUDIO_EXTENSIONS.test(url) || VIDEO_EXTENSIONS.test(url);\n\t}\n\n\textractVideoId(url: string): string | undefined {\n\t\treturn url;\n\t}\n}\n","import { VideoService } from '@/services/VideoService';\n\n// https://github.com/cookpete/react-player/blob/2811bc59b9368170acc20d4f1e39555413d0d9e1/src/patterns.js\nconst MATCH_URL_DAILYMOTION =\n\t/^(?:(?:https?):)?(?:\\/\\/)?(?:www\\.)?(?:(?:dailymotion\\.com(?:\\/embed)?\\/video)|dai\\.ly)\\/([a-zA-Z0-9]+)(?:_[\\w_-]+)?(?:[\\w.#_-]+)?/;\n\nexport class DailymotionVideoService extends VideoService {\n\tconstructor() {\n\t\tsuper('Dailymotion');\n\t}\n\n\tcanPlay(url: string): boolean {\n\t\treturn MATCH_URL_DAILYMOTION.test(url);\n\t}\n\n\textractVideoId(url: string): string | undefined {\n\t\tconst matches = MATCH_URL_DAILYMOTION.exec(url);\n\t\treturn matches?.[1];\n\t}\n}\n","import { VideoService } from '@/services/VideoService';\n\nconst MATCH_URL_NICONICO = /(?:www\\.|)?nicovideo\\.jp\\/watch\\/(\\w+)$/;\n\nexport class NiconicoVideoService extends VideoService {\n\tconstructor() {\n\t\tsuper('Niconico');\n\t}\n\n\tcanPlay(url: string): boolean {\n\t\treturn MATCH_URL_NICONICO.test(url);\n\t}\n\n\textractVideoId(url: string): string | undefined {\n\t\tconst matches = MATCH_URL_NICONICO.exec(url);\n\t\treturn matches?.[1];\n\t}\n}\n","import { VideoService } from '@/services/VideoService';\n\n// https://github.com/cookpete/react-player/blob/2811bc59b9368170acc20d4f1e39555413d0d9e1/src/patterns.js\nconst MATCH_URL_SOUNDCLOUD = /(?:soundcloud\\.com|snd\\.sc)\\/[^.]+$/;\n\nexport class SoundCloudVideoService extends VideoService {\n\tconstructor() {\n\t\tsuper('SoundCloud');\n\t}\n\n\tcanPlay(url: string): boolean {\n\t\treturn MATCH_URL_SOUNDCLOUD.test(url);\n\t}\n\n\textractVideoId(url: string): string | undefined {\n\t\treturn url;\n\t}\n}\n","import { VideoService } from '@/services/VideoService';\n\n// https://github.com/cookpete/react-player/blob/2811bc59b9368170acc20d4f1e39555413d0d9e1/src/patterns.js\nconst MATCH_URL_TWITCH_VIDEO = /(?:www\\.|go\\.)?twitch\\.tv\\/videos\\/(\\d+)($|\\?)/;\n\nexport class TwitchVideoService extends VideoService {\n\tconstructor() {\n\t\tsuper('Twitch');\n\t}\n\n\tcanPlay(url: string): boolean {\n\t\treturn MATCH_URL_TWITCH_VIDEO.test(url);\n\t}\n\n\textractVideoId(url: string): string | undefined {\n\t\tconst matches = MATCH_URL_TWITCH_VIDEO.exec(url);\n\t\treturn matches?.[1];\n\t}\n}\n","import { VideoService } from '@/services/VideoService';\n\n// https://github.com/cookpete/react-player/blob/2811bc59b9368170acc20d4f1e39555413d0d9e1/src/patterns.js\nconst MATCH_URL_VIMEO = /vimeo\\.com\\/(\\d+)$/;\n\nexport class VimeoVideoService extends VideoService {\n\tconstructor() {\n\t\tsuper('Vimeo');\n\t}\n\n\tcanPlay(url: string): boolean {\n\t\treturn MATCH_URL_VIMEO.test(url);\n\t}\n\n\textractVideoId(url: string): string | undefined {\n\t\treturn MATCH_URL_VIMEO.exec(url)?.[1];\n\t}\n}\n","import { VideoService } from '@/services/VideoService';\n\n// https://github.com/cookpete/react-player/blob/2811bc59b9368170acc20d4f1e39555413d0d9e1/src/patterns.js\nconst MATCH_URL_YOUTUBE =\n\t/(?:youtu\\.be\\/|youtube(?:-nocookie|education)?\\.com\\/(?:embed\\/|v\\/|watch\\/|watch\\?v=|watch\\?.+&v=|shorts\\/|live\\/))((\\w|-){11})|youtube\\.com\\/playlist\\?list=|youtube\\.com\\/user\\//;\n\nexport class YouTubeVideoService extends VideoService {\n\tconstructor() {\n\t\tsuper('YouTube');\n\t}\n\n\tcanPlay(url: string): boolean {\n\t\treturn MATCH_URL_YOUTUBE.test(url);\n\t}\n\n\textractVideoId(url: string): string | undefined {\n\t\tconst matches = MATCH_URL_YOUTUBE.exec(url);\n\t\treturn matches?.[1];\n\t}\n}\n","import { AudioVideoService } from '@/services/AudioVideoService';\nimport { DailymotionVideoService } from '@/services/DailymotionVideoService';\nimport { NiconicoVideoService } from '@/services/NiconicoVideoService';\nimport { SoundCloudVideoService } from '@/services/SoundCloudVideoService';\nimport { TwitchVideoService } from '@/services/TwitchVideoService';\nimport type { VideoService } from '@/services/VideoService';\nimport { VimeoVideoService } from '@/services/VimeoVideoService';\nimport { YouTubeVideoService } from '@/services/YouTubeVideoService';\n\nexport const videoServices: VideoService[] = [\n\tnew YouTubeVideoService(),\n\tnew TwitchVideoService(),\n\tnew VimeoVideoService(),\n\tnew DailymotionVideoService(),\n\tnew SoundCloudVideoService(),\n\tnew AudioVideoService(),\n\tnew NiconicoVideoService(),\n];\n\nexport function findVideoService(url: string): VideoService | undefined {\n\treturn videoServices.find((videoService) => videoService.canPlay(url));\n}\n","import { useNostalgicDiva } from '@/components/NostalgicDivaProvider';\nimport type { PlayerProps } from '@/components/PlayerContainer';\nimport { LogLevel } from '@/controllers/Logger';\nimport type {\n\tIPlayerController,\n\tPlayerOptions,\n\tPlayerType,\n} from '@/controllers/PlayerController';\nimport { findVideoService } from '@/services/findVideoService';\nimport {\n\ttype ElementType,\n\ttype ReactElement,\n\tSuspense,\n\tlazy,\n\tmemo,\n\tuseCallback,\n} from 'react';\n\nexport const players: Map<PlayerType, ElementType<PlayerProps>> = new Map(\n\tObject.entries({\n\t\tAudio: lazy(() => import('./AudioPlayer')),\n\t\tDailymotion: lazy(() => import('./DailymotionPlayer')),\n\t\tNiconico: lazy(() => import('./NiconicoPlayer')),\n\t\tSoundCloud: lazy(() => import('./SoundCloudPlayer')),\n\t\tTwitch: lazy(() => import('./TwitchPlayer')),\n\t\tVimeo: lazy(() => import('./VimeoPlayer')),\n\t\tYouTube: lazy(() => import('./YouTubePlayer')),\n\t}),\n);\n\nexport interface NostalgicDivaProps {\n\tsrc: string;\n\toptions?: PlayerOptions;\n\tonControllerChange?: (value: IPlayerController) => void;\n}\n\nfunction getTypeAndVideoId(\n\turl: string,\n): { type: PlayerType; videoId: string } | undefined {\n\tconst videoService = findVideoService(url);\n\tif (videoService === undefined) {\n\t\treturn undefined;\n\t}\n\n\tconst { type, extractVideoId } = videoService;\n\n\tconst videoId = extractVideoId(url);\n\tif (videoId === undefined) {\n\t\treturn undefined;\n\t}\n\n\treturn { type: type, videoId: videoId };\n}\n\nconst EmptyPlayer = memo((): ReactElement => {\n\treturn (\n\t\t<div style={{ width: '100%', height: '100%' }}>\n\t\t\t<iframe\n\t\t\t\tsrc=\"about:blank\"\n\t\t\t\ttitle=\"about:blank\"\n\t\t\t\tstyle={{\n\t\t\t\t\twidth: '100%',\n\t\t\t\t\theight: '100%',\n\t\t\t\t\tborder: 0,\n\t\t\t\t}}\n\t\t\t/>\n\t\t</div>\n\t);\n});\n\nexport const NostalgicDiva = memo(\n\t({\n\t\tsrc,\n\t\toptions,\n\t\tonControllerChange,\n\t}: NostalgicDivaProps): ReactElement => {\n\t\tconst diva = useNostalgicDiva();\n\n\t\tconst handleControllerChange = useCallback(\n\t\t\t(value: IPlayerController) => {\n\t\t\t\tdiva.handleControllerChange(value);\n\n\t\t\t\tonControllerChange?.(value);\n\t\t\t},\n\t\t\t[diva, onControllerChange],\n\t\t);\n\n\t\tdiva.logger.log(LogLevel.Debug, 'NostalgicDiva');\n\n\t\tconst typeAndVideoId = getTypeAndVideoId(src);\n\t\tif (typeAndVideoId === undefined) {\n\t\t\tdiva.logger.log(\n\t\t\t\tLogLevel.Warning,\n\t\t\t\t`Failed to extract type and videoId from src: \"${src}\". Returning EmptyPlayer.`,\n\t\t\t);\n\t\t\treturn <EmptyPlayer />;\n\t\t}\n\n\t\tconst { type, videoId } = typeAndVideoId;\n\n\t\tconst Player = players.get(type);\n\t\tif (Player === undefined) {\n\t\t\tdiva.logger.log(\n\t\t\t\tLogLevel.Warning,\n\t\t\t\t`No player found for type \"${type}\" (videoId: \"${videoId}\"). Returning EmptyPlayer.`,\n\t\t\t);\n\t\t\treturn <EmptyPlayer />;\n\t\t}\n\n\t\treturn (\n\t\t\t<Suspense fallback={null}>\n\t\t\t\t<Player\n\t\t\t\t\tlogger={diva.logger}\n\t\t\t\t\ttype={type}\n\t\t\t\t\tonControllerChange={handleControllerChange}\n\t\t\t\t\tvideoId={videoId}\n\t\t\t\t\toptions={options}\n\t\t\t\t/>\n\t\t\t</Suspense>\n\t\t);\n\t},\n);\n","import { NostalgicDiva } from '@/components/NostalgicDiva';\nimport { NostalgicDivaProvider } from '@/components/NostalgicDivaProvider';\nimport { nullPlayerController } from '@/controllers/NullPlayerController';\nimport type {\n\tIPlayerCommands,\n\tIPlayerController,\n\tPlayerOptions,\n} from '@/controllers/PlayerController';\nimport ReactDOM from 'react-dom';\n\nexport class NostalgicDivaElement\n\textends HTMLElement\n\timplements IPlayerController\n{\n\tstatic readonly observedAttributes = ['src'];\n\n\tcontainer: ShadowRoot;\n\tcontroller: IPlayerController = nullPlayerController;\n\n\tconstructor() {\n\t\tsuper();\n\n\t\tthis.container = this.attachShadow({ mode: 'closed' });\n\t}\n\n\tget src(): string {\n\t\treturn this.getAttribute('src') ?? '';\n\t}\n\n\tset src(value: string) {\n\t\tthis.setAttribute('src', value);\n\t}\n\n\treadonly #options: PlayerOptions = {\n\t\tonError: (e) =>\n\t\t\tthis.dispatchEvent(new CustomEvent('error', { detail: e })),\n\t\tonLoaded: (e) =>\n\t\t\tthis.dispatchEvent(new CustomEvent('loaded', { detail: e })),\n\t\tonPlay: () => this.dispatchEvent(new CustomEvent('play')),\n\t\tonPause: () => this.dispatchEvent(new CustomEvent('pause')),\n\t\tonEnded: () => this.dispatchEvent(new CustomEvent('ended')),\n\t\tonTimeUpdate: (e) =>\n\t\t\tthis.dispatchEvent(new CustomEvent('timeupdate', { detail: e })),\n\t};\n\n\t#handleControllerChange = (value: IPlayerController): void => {\n\t\tconsole.debug(\n\t\t\t'[@nostalgic-diva/web-components] handleControllerChange',\n\t\t);\n\n\t\tthis.controller = value;\n\t};\n\n\t#render(): void {\n\t\tReactDOM.render(\n\t\t\t<NostalgicDivaProvider>\n\t\t\t\t<NostalgicDiva\n\t\t\t\t\tsrc={this.src}\n\t\t\t\t\toptions={this.#options}\n\t\t\t\t\tonControllerChange={this.#handleControllerChange}\n\t\t\t\t/>\n\t\t\t</NostalgicDivaProvider>,\n\t\t\tthis.container,\n\t\t);\n\t}\n\n\tconnectedCallback(): void {\n\t\tconsole.debug('[@nostalgic-diva/web-components] connectedCallback');\n\n\t\tthis.#render();\n\t}\n\n\tdisconnectedCallback(): void {\n\t\tconsole.debug('[@nostalgic-diva/web-components] disconnectedCallback');\n\t}\n\n\tattributeChangedCallback(): void {\n\t\tconsole.debug(\n\t\t\t'[@nostalgic-diva/web-components] attributeChangedCallback',\n\t\t);\n\n\t\tthis.#render();\n\t}\n\n\tasync loadVideo(id: string): Promise<void> {\n\t\tawait this.controller.loadVideo(id);\n\t}\n\n\tasync play(): Promise<void> {\n\t\tawait this.controller.play();\n\t}\n\n\tasync pause(): Promise<void> {\n\t\tawait this.controller.pause();\n\t}\n\n\tasync setCurrentTime(seconds: number): Promise<void> {\n\t\tawait this.controller.setCurrentTime(seconds);\n\t}\n\n\tasync setVolume(volume: number): Promise<void> {\n\t\tawait this.controller.setVolume(volume);\n\t}\n\n\tasync setMuted(muted: boolean): Promise<void> {\n\t\tawait this.controller.setMuted(muted);\n\t}\n\n\tasync setPlaybackRate(playbackRate: number): Promise<void> {\n\t\tawait this.controller.setPlaybackRate(playbackRate);\n\t}\n\n\tasync getDuration(): Promise<number> {\n\t\treturn await this.controller.getDuration();\n\t}\n\n\tasync getCurrentTime(): Promise<number> {\n\t\treturn await this.controller.getCurrentTime();\n\t}\n\n\tasync getVolume(): Promise<number> {\n\t\treturn await this.controller.getVolume();\n\t}\n\n\tasync getMuted(): Promise<boolean> {\n\t\treturn await this.controller.getMuted();\n\t}\n\n\tasync getPlaybackRate(): Promise<number> {\n\t\treturn await this.controller.getPlaybackRate();\n\t}\n\n\tsupports(command: keyof IPlayerCommands): boolean {\n\t\treturn this.controller.supports(command);\n\t}\n}\n\nexport function defineNostalgicDiva(): void {\n\tcustomElements.define('nostalgic-diva', NostalgicDivaElement);\n}\n","// https://github.com/streamich/react-use/blob/8ceb4c0f0c5625124f487b435a2fd0d3b3bc2a4f/src/useFirstMountState.ts\nimport { useRef } from 'react';\n\nexport function useFirstMountState(): boolean {\n\tconst isFirst = useRef(true);\n\n\tif (isFirst.current) {\n\t\tisFirst.current = false;\n\n\t\treturn true;\n\t}\n\n\treturn isFirst.current;\n}\n","// https://github.com/streamich/react-use/blob/8ceb4c0f0c5625124f487b435a2fd0d3b3bc2a4f/src/usePreviousDistinct.ts.\nimport { useFirstMountState } from '@/components/useFirstMountState';\nimport { useRef } from 'react';\n\nexport type Predicate<T> = (prev: T | undefined, next: T) => boolean;\n\nconst strictEquals = <T>(prev: T | undefined, next: T): boolean =>\n\tprev === next;\n\nexport default function usePreviousDistinct<T>(\n\tvalue: T,\n\tcompare: Predicate<T> = strictEquals,\n): T | undefined {\n\tconst prevRef = useRef<T>();\n\tconst curRef = useRef<T>(value);\n\tconst isFirstMount = useFirstMountState();\n\n\tif (!isFirstMount && !compare(curRef.current, value)) {\n\t\tprevRef.current = curRef.current;\n\t\tcurRef.current = value;\n\t}\n\n\treturn prevRef.current;\n}\n","import { type ILogger, LogLevel } from '@/controllers/Logger';\nimport type {\n\tIPlayerCommands,\n\tPlayerOptions,\n} from '@/controllers/PlayerController';\n\nexport abstract class PlayerControllerImpl<\n\tTPlayer,\n> implements Partial<IPlayerCommands> {\n\tconstructor(\n\t\tprotected readonly logger: ILogger,\n\t\tprotected readonly player: TPlayer,\n\t\tprotected readonly options: PlayerOptions | undefined,\n\t) {\n\t\tthis.logger.log(LogLevel.Debug, 'ctor');\n\t}\n\n\tabstract attach(id: string): Promise<void>;\n\tabstract detach(): Promise<void>;\n\tabstract loadVideo?(id: string): Promise<void>;\n\tabstract play?(): Promise<void>;\n\tabstract pause?(): Promise<void>;\n\tabstract setCurrentTime?(seconds: number): Promise<void>;\n\tabstract setVolume?(volume: number): Promise<void>;\n\tabstract setMuted?(muted: boolean): Promise<void>;\n\tabstract setPlaybackRate?(playbackRate: number): Promise<void>;\n\tabstract getDuration?(): Promise<number>;\n\tabstract getCurrentTime?(): Promise<number>;\n\tabstract getVolume?(): Promise<number>;\n\tabstract getMuted?(): Promise<boolean>;\n\tabstract getPlaybackRate?(): Promise<number>;\n\n\tsupports(command: keyof IPlayerCommands): boolean {\n\t\treturn this[command] !== undefined;\n\t}\n}\n","import { type ILogger, LogLevel } from '@/controllers/Logger';\nimport { PlayerControllerImpl } from '@/controllers/PlayerControllerImpl';\n\nexport type PlayerType =\n\t| 'Audio'\n\t| 'Dailymotion'\n\t| 'Niconico'\n\t| 'SoundCloud'\n\t| 'Twitch'\n\t| 'Vimeo'\n\t| 'YouTube'\n\t| (string & {});\n\nexport interface LoadedEvent {\n\tid: string;\n}\n\nexport interface TimeEvent {\n\tduration: number;\n\tpercent: number;\n\tseconds: number;\n}\n\nexport interface PlayerOptions {\n\tonError?(event: any): void;\n\tonLoaded?(event: LoadedEvent): void;\n\tonPlay?(): void;\n\tonPause?(): void;\n\tonEnded?(): void;\n\tonTimeUpdate?(event: TimeEvent): void;\n}\n\nexport interface IPlayerCommands {\n\tloadVideo(id: string): Promise<void>;\n\tplay(): Promise<void>;\n\tpause(): Promise<void>;\n\tsetCurrentTime(seconds: number): Promise<void>;\n\tsetVolume(volume: number): Promise<void>;\n\tsetMuted(muted: boolean): Promise<void>;\n\tsetPlaybackRate(playbackRate: number): Promise<void>;\n\tgetDuration(): Promise<number>;\n\tgetCurrentTime(): Promise<number>;\n\tgetVolume(): Promise<number>;\n\tgetMuted(): Promise<boolean>;\n\tgetPlaybackRate(): Promise<number>;\n}\n\nexport interface IPlayerController extends IPlayerCommands {\n\tsupports(command: keyof IPlayerCommands): boolean;\n}\n\nexport class PlayerController<\n\tTPlayer extends object,\n\tTController extends PlayerControllerImpl<TPlayer>,\n> implements IPlayerController {\n\tprivate static nextId = 1;\n\n\tprivate readonly id: number;\n\tprivate impl?: TController;\n\n\tconstructor(\n\t\tprivate readonly logger: ILogger,\n\t\tprivate readonly type: PlayerType,\n\t\tprivate readonly player: TPlayer,\n\t\tprivate readonly options: PlayerOptions | undefined,\n\t\tprivate readonly controllerFactory: new (\n\t\t\tlogger: ILogger,\n\t\t\tplayer: TPlayer,\n\t\t\toptions: PlayerOptions | undefined,\n\t\t) => TController,\n\t) {\n\t\tthis.id = PlayerController.nextId++;\n\t}\n\n\tprivate createMessage(message: any): string {\n\t\treturn `${this.type}#${this.id} ${message}`;\n\t}\n\n\tpublic debug(message?: any, ...optionalParams: any): void {\n\t\tthis.logger.log(\n\t\t\tLogLevel.Debug,\n\t\t\tthis.createMessage(message),\n\t\t\t...optionalParams,\n\t\t);\n\t}\n\n\tpublic error(message?: any, ...optionalParams: any): void {\n\t\tthis.logger.log(\n\t\t\tLogLevel.Error,\n\t\t\tthis.createMessage(message),\n\t\t\t...optionalParams,\n\t\t);\n\t}\n\n\tasync attach(id: string): Promise<void> {\n\t\tthis.debug('attach', id);\n\n\t\tif (this.impl) {\n\t\t\tthis.debug('player is already attached');\n\t\t\treturn;\n\t\t}\n\n\t\tthis.debug('Attaching player...');\n\n\t\tthis.impl = new this.controllerFactory(\n\t\t\tthis.logger,\n\t\t\tthis.player,\n\t\t\tthis.options,\n\t\t);\n\n\t\tawait this.impl.attach(id);\n\n\t\tthis.debug('player attached');\n\t}\n\n\tprivate createPlayerNotAttachedError(): Error {\n\t\tthis.error('player is not attached');\n\n\t\treturn new Error('player is not attached');\n\t}\n\n\tprivate createCommandNotSupportedError(\n\t\tcommand: keyof IPlayerCommands,\n\t): Error {\n\t\treturn new Error(`${command} is not supported`);\n\t}\n\n\tasync detach(): Promise<void> {\n\t\tthis.debug('detach');\n\n\t\tif (this.impl === undefined) {\n\t\t\tthrow this.createPlayerNotAttachedError();\n\t\t}\n\n\t\tawait this.impl.detach();\n\n\t\tthis.impl = undefined;\n\t}\n\n\tasync loadVideo(id: string): Promise<void> {\n\t\tthis.debug('loadVideo', id);\n\n\t\tif (this.impl === undefined) {\n\t\t\tthrow this.createPlayerNotAttachedError();\n\t\t}\n\n\t\tif (this.impl.loadVideo === undefined) {\n\t\t\tthrow this.createCommandNotSupportedError('loadVideo');\n\t\t}\n\n\t\tthis.debug('Loading video...');\n\n\t\tawait this.impl.loadVideo(id);\n\n\t\tthis.debug('video loaded', id);\n\t}\n\n\tplay(): Promise<void> {\n\t\tthis.debug('play');\n\n\t\tif (this.impl === undefined) {\n\t\t\tthrow this.createPlayerNotAttachedError();\n\t\t}\n\n\t\tif (this.impl.play === undefined) {\n\t\t\tthrow this.createCommandNotSupportedError('play');\n\t\t}\n\n\t\treturn this.impl.play();\n\t}\n\n\tpause(): Promise<void> {\n\t\tthis.debug('pause');\n\n\t\tif (this.impl === undefined) {\n\t\t\tthrow this.createPlayerNotAttachedError();\n\t\t}\n\n\t\tif (this.impl.pause === undefined) {\n\t\t\tthrow this.createCommandNotSupportedError('pause');\n\t\t}\n\n\t\treturn this.impl.pause();\n\t}\n\n\tsetCurrentTime(seconds: number): Promise<void> {\n\t\tthis.debug('setCurrentTime', seconds);\n\n\t\tif (this.impl === undefined) {\n\t\t\tthrow this.createPlayerNotAttachedError();\n\t\t}\n\n\t\tif (this.impl.setCurrentTime === undefined) {\n\t\t\tthrow this.createCommandNotSupportedError('setCurrentTime');\n\t\t}\n\n\t\treturn this.impl.setCurrentTime(seconds);\n\t}\n\n\tsetVolume(volume: number): Promise<void> {\n\t\tthis.debug('setVolume', volume);\n\n\t\tif (this.impl === undefined) {\n\t\t\tthrow this.createPlayerNotAttachedError();\n\t\t}\n\n\t\tif (this.impl.setVolume === undefined) {\n\t\t\tthrow this.createCommandNotSupportedError('setVolume');\n\t\t}\n\n\t\treturn this.impl.setVolume(volume);\n\t}\n\n\tsetMuted(muted: boolean): Promise<void> {\n\t\tthis.debug('setMuted', muted);\n\n\t\tif (this.impl === undefined) {\n\t\t\tthrow this.createPlayerNotAttachedError();\n\t\t}\n\n\t\tif (this.impl.setMuted === undefined) {\n\t\t\tthrow this.createCommandNotSupportedError('setMuted');\n\t\t}\n\n\t\treturn this.impl.setMuted(muted);\n\t}\n\n\tsetPlaybackRate(playbackRate: number): Promise<void> {\n\t\tthis.debug('setPlaybackRate', playbackRate);\n\n\t\tif (this.impl === undefined) {\n\t\t\tthrow this.createPlayerNotAttachedError();\n\t\t}\n\n\t\tif (this.impl.setPlaybackRate === undefined) {\n\t\t\tthrow this.createCommandNotSupportedError('setPlaybackRate');\n\t\t}\n\n\t\treturn this.impl.setPlaybackRate(playbackRate);\n\t}\n\n\tgetDuration(): Promise<number> {\n\t\tthis.debug('getDuration');\n\n\t\tif (this.impl === undefined) {\n\t\t\tthrow this.createPlayerNotAttachedError();\n\t\t}\n\n\t\tif (this.impl.getDuration === undefined) {\n\t\t\tthrow this.createCommandNotSupportedError('getDuration');\n\t\t}\n\n\t\treturn this.impl.getDuration();\n\t}\n\n\tgetCurrentTime(): Promise<number> {\n\t\tthis.debug('getCurrentTime');\n\n\t\tif (this.impl === undefined) {\n\t\t\tthrow this.createPlayerNotAttachedError();\n\t\t}\n\n\t\tif (this.impl.getCurrentTime === undefined) {\n\t\t\tthrow this.createCommandNotSupportedError('getCurrentTime');\n\t\t}\n\n\t\treturn this.impl.getCurrentTime();\n\t}\n\n\tgetVolume(): Promise<number> {\n\t\tthis.debug('getVolume');\n\n\t\tif (this.impl === undefined) {\n\t\t\tthrow this.createPlayerNotAttachedError();\n\t\t}\n\n\t\tif (this.impl.getVolume === undefined) {\n\t\t\tthrow this.createCommandNotSupportedError('getVolume');\n\t\t}\n\n\t\treturn this.impl.getVolume();\n\t}\n\n\tgetMuted(): Promise<boolean> {\n\t\tthis.debug('getMuted');\n\n\t\tif (this.impl === undefined) {\n\t\t\tthrow this.createPlayerNotAttachedError();\n\t\t}\n\n\t\tif (this.impl.getMuted === undefined) {\n\t\t\tthrow this.createCommandNotSupportedError('getMuted');\n\t\t}\n\n\t\treturn this.impl.getMuted();\n\t}\n\n\tgetPlaybackRate(): Promise<number> {\n\t\tthis.debug('getPlaybackRate');\n\n\t\tif (this.impl === undefined) {\n\t\t\tthrow this.createPlayerNotAttachedError();\n\t\t}\n\n\t\tif (this.impl.getPlaybackRate === undefined) {\n\t\t\tthrow this.createCommandNotSupportedError('getPlaybackRate');\n\t\t}\n\n\t\treturn this.impl.getPlaybackRate();\n\t}\n\n\tsupports(command: keyof IPlayerCommands): boolean {\n\t\tif (this.impl === undefined) {\n\t\t\tthrow this.createPlayerNotAttachedError();\n\t\t}\n\n\t\treturn this.impl.supports(command);\n\t}\n}\n","import usePreviousDistinct from '@/components/usePreviousDistinct';\nimport { type ILogger, LogLevel } from '@/controllers/Logger';\nimport { nullPlayerController } from '@/controllers/NullPlayerController';\nimport {\n\ttype IPlayerController,\n\tPlayerController,\n\ttype PlayerOptions,\n\ttype PlayerType,\n} from '@/controllers/PlayerController';\nimport { PlayerControllerImpl } from '@/controllers/PlayerControllerImpl';\nimport {\n\ttype MutableRefObject,\n\ttype ReactElement,\n\ttype ReactNode,\n\tuseCallback,\n\tuseEffect,\n\tuseRef,\n\tuseState,\n} from 'react';\n\nexport interface PlayerProps {\n\tlogger: ILogger;\n\ttype: PlayerType;\n\tonControllerChange: ((value: IPlayerController) => void) | undefined;\n\tvideoId: string;\n\toptions: PlayerOptions | undefined;\n}\n\ninterface PlayerContainerProps<\n\tTElement extends HTMLElement,\n\tTPlayer extends object,\n\tTController extends PlayerControllerImpl<TPlayer>,\n> extends PlayerProps {\n\tloadScript: (() => Promise<void>) | undefined;\n\tplayerFactory: (element: TElement, videoId: string) => Promise<TPlayer>;\n\tcontrollerFactory: new (\n\t\tlogger: ILogger,\n\t\tplayer: TPlayer,\n\t\toptions: PlayerOptions | undefined,\n\t) => TController;\n\tchildren: (\n\t\telementRef: MutableRefObject<TElement>,\n\t\tvideoId: string,\n\t) => ReactNode;\n}\n\nexport const PlayerContainer = <\n\tTElement extends HTMLElement,\n\tTPlayer extends object,\n\tTController extends PlayerControllerImpl<TPlayer>,\n>({\n\tlogger,\n\ttype,\n\tloadScript,\n\tplayerFactory,\n\tonControllerChange,\n\tvideoId,\n\toptions,\n\tcontrollerFactory,\n\tchildren,\n}: PlayerContainerProps<TElement, TPlayer, TController>): ReactElement<\n\tPlayerContainerProps<TElement, TPlayer, TController>\n> => {\n\tlogger.log(LogLevel.Debug, 'PlayerContainer');\n\n\tconst videoIdRef = useRef(videoId);\n\n\tconst elementRef = useRef<TElement>(undefined!);\n\n\tconst [player, setPlayer] = useState<TPlayer>();\n\n\tconst [controller, _setController] =\n\t\tuseState<IPlayerController>(nullPlayerController);\n\n\tconst setController = useCallback(\n\t\t(value: IPlayerController): void => {\n\t\t\t_setController(value);\n\n\t\t\tonControllerChange?.(value);\n\t\t},\n\t\t[onControllerChange],\n\t);\n\n\tuseEffect(() => {\n\t\tvoid (loadScript?.() ?? Promise.resolve())\n\t\t\t.then(() => playerFactory(elementRef.current, videoIdRef.current))\n\t\t\t.then((player) => setPlayer(player));\n\t}, [loadScript, playerFactory]);\n\n\t// Make sure that `options` do not change between re-rendering.\n\tuseEffect(() => {\n\t\tif (player === undefined) {\n\t\t\treturn;\n\t\t}\n\n\t\tconst controller = new PlayerController(\n\t\t\tlogger,\n\t\t\ttype,\n\t\t\tplayer,\n\t\t\toptions,\n\t\t\tcontrollerFactory,\n\t\t);\n\n\t\tvoid controller\n\t\t\t.attach(videoIdRef.current)\n\t\t\t.then(() => setController(controller));\n\n\t\treturn (): void => {\n\t\t\tvoid controller\n\t\t\t\t.detach()\n\t\t\t\t.finally(() => setController(nullPlayerController));\n\t\t};\n\t}, [\n\t\tlogger,\n\t\ttype,\n\t\tloadScript,\n\t\tplayer,\n\t\toptions,\n\t\tcontrollerFactory,\n\t\tsetController,\n\t]);\n\n\tconst previousVideoId = usePreviousDistinct(videoId);\n\tuseEffect(() => {\n\t\t// If `previousVideoId` is undefined, then it means that the video has already been loaded by either\n\t\t// 1. `<audio>`s `src` attribute (e.g. `AudioPlayer`),\n\t\t// 2. `<iframe>`'s `src` attribute (e.g. `NiconicoPlayer`, `SoundCloudPlayer` and `VimeoPlayer`), or\n\t\t// 3. the `attach` method of the player API (e.g. `YouTubePlayer`).\n\t\tif (previousVideoId === undefined) {\n\t\t\treturn;\n\t\t}\n\n\t\tvoid controller.loadVideo(videoId);\n\t}, [previousVideoId, videoId, controller]);\n\n\t// Make sure that `videoId` does not change between re-rendering.\n\treturn <>{children(elementRef, videoIdRef.current)}</>;\n};\n","import { PlayerControllerImpl } from '@/controllers/PlayerControllerImpl';\n\n// https://github.com/VocaDB/vocadb/blob/61b8c54f3eca906a477101dab4fdd9b154be310e/VocaDbWeb/Scripts/ViewModels/PVs/PVPlayerFile.ts.\nexport class AudioPlayerController extends PlayerControllerImpl<HTMLAudioElement> {\n\tasync attach(): Promise<void> {\n\t\tthis.player.onerror = (event): void => this.options?.onError?.(event);\n\t\tthis.player.onloadeddata = (): void =>\n\t\t\tthis.options?.onLoaded?.({ id: this.player.src });\n\t\tthis.player.onplay = (): void => this.options?.onPlay?.();\n\t\tthis.player.onpause = (): void => this.options?.onPause?.();\n\t\tthis.player.onended = (): void => this.options?.onEnded?.();\n\t\tthis.player.ontimeupdate = (): void => {\n\t\t\tthis.options?.onTimeUpdate?.({\n\t\t\t\tduration: this.player.duration,\n\t\t\t\tpercent: this.player.currentTime / this.player.duration,\n\t\t\t\tseconds: this.player.currentTime,\n\t\t\t});\n\t\t};\n\t}\n\n\tasync detach(): Promise<void> {\n\t\tthis.player.onerror = null;\n\t\tthis.player.onloadeddata = null;\n\t\tthis.player.onplay = null;\n\t\tthis.player.onpause = null;\n\t\tthis.player.onended = null;\n\t\tthis.player.ontimeupdate = null;\n\t}\n\n\tasync loadVideo(id: string): Promise<void> {\n\t\tthis.player.src = id;\n\t}\n\n\tasync play(): Promise<void> {\n\t\tawait this.player.play();\n\t}\n\n\tasync pause(): Promise<void> {\n\t\tthis.player.pause();\n\t}\n\n\tasync setCurrentTime(seconds: number): Promise<void> {\n\t\tthis.player.currentTime = seconds;\n\t}\n\n\tasync setVolume(volume: number): Promise<void> {\n\t\tthis.player.volume = volume;\n\t}\n\n\tasync setMuted(muted: boolean): Promise<void> {\n\t\tthis.player.muted = muted;\n\t}\n\n\tasync setPlaybackRate(playbackRate: number): Promise<void> {\n\t\tthis.player.playbackRate = playbackRate;\n\t}\n\n\tasync getDuration(): Promise<number> {\n\t\treturn this.player.duration;\n\t}\n\n\tasync getCurrentTime(): Promise<number> {\n\t\treturn this.player.currentTime;\n\t}\n\n\tasync getVolume(): Promise<number> {\n\t\treturn this.player.volume;\n\t}\n\n\tasync getMuted(): Promise<boolean> {\n\t\treturn this.player.muted;\n\t}\n\n\tasync getPlaybackRate(): Promise<number> {\n\t\treturn this.player.playbackRate;\n\t}\n}\n","import { PlayerControllerImpl } from '@/controllers/PlayerControllerImpl';\n\nconst events = [\n\t'apiready',\n\t'seeked',\n\t'video_end',\n\t'durationchange',\n\t'pause',\n\t'playing',\n\t'error',\n] satisfies DM.EventType[];\n\nexport class DailymotionPlayerController extends PlayerControllerImpl<DM.player> {\n\tprivate handlePlayerEvents = (e: { type: DM.EventType }): void => {\n\t\tswitch (e.type) {\n\t\t\tcase 'apiready':\n\t\t\t\tthis.options?.onLoaded?.({ id: this.player.video.videoId });\n\t\t\t\tbreak;\n\t\t\tcase 'seeked':\n\t\t\t\tthis.options?.onTimeUpdate?.({\n\t\t\t\t\tduration: this.player.duration,\n\t\t\t\t\tpercent: this.player.currentTime / this.player.duration,\n\t\t\t\t\tseconds: this.player.currentTime,\n\t\t\t\t});\n\t\t\t\tbreak;\n\t\t\tcase 'video_end':\n\t\t\t\tthis.options?.onEnded?.();\n\t\t\t\tbreak;\n\t\t\tcase 'durationchange':\n\t\t\t\tbreak;\n\t\t\tcase 'pause':\n\t\t\t\tthis.options?.onPause?.();\n\t\t\t\tbreak;\n\t\t\tcase 'playing':\n\t\t\t\tthis.options?.onPlay?.();\n\t\t\t\tbreak;\n\t\t\tcase 'error':\n\t\t\t\tthis.options?.onError?.(e);\n\t\t\t\tbreak;\n\t\t}\n\t};\n\n\tasync attach(_id: string): Promise<void> {\n\t\tfor (const event of events) {\n\t\t\tthis.player.addEventListener(event, this.handlePlayerEvents);\n\t\t}\n\t}\n\n\tasync detach(): Promise<void> {\n\t\tfor (const event of events) {\n\t\t\tthis.player.removeEventListener(event, this.handlePlayerEvents);\n\t\t}\n\t}\n\n\tasync loadVideo(id: string): Promise<void> {\n\t\tthis.player.load(id);\n\t}\n\n\tasync play(): Promise<void> {\n\t\tthis.player.play();\n\t}\n\n\tasync pause(): Promise<void> {\n\t\tthis.player.pause();\n\t}\n\n\tasync setCurrentTime(seconds: number): Promise<void> {\n\t\tthis.player.seek(seconds);\n\t}\n\n\tasync setVolume(volume: number): Promise<void> {\n\t\tthis.player.setVolume(volume);\n\t}\n\n\tasync setMuted(muted: boolean): Promise<void> {\n\t\tthis.player.setMuted(muted);\n\t}\n\n\tsetPlaybackRate = undefined;\n\n\tasync getDuration(): Promise<number> {\n\t\treturn this.player.duration;\n\t}\n\n\tasync getCurrentTime(): Promise<number> {\n\t\treturn this.player.currentTime;\n\t}\n\n\tasync getVolume(): Promise<number> {\n\t\treturn this.player.volume;\n\t}\n\n\tasync getMuted(): Promise<boolean> {\n\t\treturn this.player.muted;\n\t}\n\n\tgetPlaybackRate = undefined;\n}\n","import { LogLevel } from '@/controllers/Logger';\nimport { PlayerControllerImpl } from '@/controllers/PlayerControllerImpl';\n\ndeclare global {\n\tinterface Window {\n\t\tonNicoPlayerFactoryReady: (callback: nico.NicoPlayerFactory) => void;\n\t}\n}\n\nenum PlayerStatus {\n\tPlay = 2,\n\tPause = 3,\n\tEnd = 4,\n}\n\n// https://github.com/VocaDB/vocadb/blob/a4b5f9d8186772d7e6f58f997bbcbb51509d2539/VocaDbWeb/Scripts/ViewModels/PVs/PVPlayerNico.ts.\nexport class NiconicoPlayerController extends PlayerControllerImpl<HTMLIFrameElement> {\n\tprivate static readonly origin = 'https://embed.nicovideo.jp';\n\n\tprivate duration = 0;\n\tprivate currentTime = 0;\n\tprivate volume = 0;\n\tprivate muted = false;\n\n\tprivate handleMessage = (e: nico.PlayerEvent): void => {\n\t\tif (e.origin !== NiconicoPlayerController.origin) return;\n\n\t\tconst data = e.data;\n\n\t\tswitch (data.eventName) {\n\t\t\tcase 'playerStatusChange':\n\t\t\t\tthis.logger.log(\n\t\t\t\t\tLogLevel.Debug,\n\t\t\t\t\t`player status changed: ${\n\t\t\t\t\t\tPlayerStatus[data.data.playerStatus] ??\n\t\t\t\t\t\tdata.data.playerStatus\n\t\t\t\t\t}`,\n\t\t\t\t);\n\t\t\t\tbreak;\n\n\t\t\tcase 'statusChange':\n\t\t\t\tthis.logger.log(\n\t\t\t\t\tLogLevel.Debug,\n\t\t\t\t\t`status changed: ${\n\t\t\t\t\t\tPlayerStatus[data.data.playerStatus] ??\n\t\t\t\t\t\tdata.data.playerStatus\n\t\t\t\t\t}`,\n\t\t\t\t);\n\n\t\t\t\tswitch (data.data.playerStatus) {\n\t\t\t\t\tcase PlayerStatus.Play:\n\t\t\t\t\t\tthis.options?.onPlay?.();\n\t\t\t\t\t\tbreak;\n\n\t\t\t\t\tcase PlayerStatus.Pause:\n\t\t\t\t\t\tthis.options?.onPause?.();\n\t\t\t\t\t\tbreak;\n\n\t\t\t\t\tcase PlayerStatus.End:\n\t\t\t\t\t\tthis.options?.onEnded?.();\n\t\t\t\t\t\tbreak;\n\t\t\t\t}\n\t\t\t\tbreak;\n\n\t\t\tcase 'playerMetadataChange':\n\t\t\t\tif (data.data.duration !== undefined)\n\t\t\t\t\tthis.duration = data.data.duration / 1000;\n\n\t\t\t\tthis.currentTime =\n\t\t\t\t\tdata.data.currentTime === undefined\n\t\t\t\t\t\t? 0\n\t\t\t\t\t\t: data.data.currentTime / 1000;\n\n\t\t\t\tthis.volume = data.data.volume;\n\t\t\t\tthis.muted = data.data.muted;\n\n\t\t\t\tthis.options?.onTimeUpdate?.({\n\t\t\t\t\tduration: this.duration,\n\t\t\t\t\tpercent:\n\t\t\t\t\t\tthis.currentTime !== 0 && this.duration !== 0\n\t\t\t\t\t\t\t? this.currentTime / this.duration\n\t\t\t\t\t\t\t: 0,\n\t\t\t\t\tseconds: this.currentTime,\n\t\t\t\t});\n\t\t\t\tbreak;\n\n\t\t\tcase 'loadComplete':\n\t\t\t\tthis.logger.log(LogLevel.Debug, 'load completed');\n\n\t\t\t\tthis.duration = data.data.videoInfo.lengthInSeconds;\n\n\t\t\t\tthis.options?.onLoaded?.({ id: data.data.videoInfo.watchId });\n\t\t\t\tbreak;\n\n\t\t\tcase 'error':\n\t\t\t\t// TODO: Implement.\n\n\t\t\t\tthis.options?.onError?.(data);\n\t\t\t\tbreak;\n\n\t\t\tcase 'player-error:video:play':\n\t\t\tcase 'player-error:video:seek':\n\t\t\t\tthis.options?.onError?.(data);\n\t\t\t\tbreak;\n\n\t\t\tdefault:\n\t\t\t\tthis.logger.log(\n\t\t\t\t\tLogLevel.Debug,\n\t\t\t\t\t'message',\n\t\t\t\t\t(data as any).eventName,\n\t\t\t\t\t(data as any).data,\n\t\t\t\t);\n\t\t\t\tbreak;\n\t\t}\n\t};\n\n\tasync attach(): Promise<void> {\n\t\twindow.addEventListener('message', this.handleMessage);\n\t}\n\n\tasync detach(): Promise<void> {\n\t\twindow.removeEventListener('message', this.handleMessage);\n\t}\n\n\tasync loadVideo(id: string): Promise<void> {\n\t\treturn new Promise((resolve, _reject /* TODO: Reject. */) => {\n\t\t\tthis.duration = 0;\n\t\t\tthis.currentTime = 0;\n\t\t\tthis.volume = 0;\n\t\t\tthis.muted = false;\n\n\t\t\t// Wait for iframe to load.\n\t\t\tthis.player.onload = (): void => {\n\t\t\t\tthis.player.onload = null;\n\t\t\t\tresolve();\n\t\t\t};\n\n\t\t\tthis.player.src = `https://embed.nicovideo.jp/watch/${id}?jsapi=1&playerId=1`;\n\t\t});\n\t}\n\n\t// https://blog.hayu.io/web/create/nicovideo-embed-player-api/.\n\tprivate postMessage(message: any): void {\n\t\tthis.player.contentWindow?.postMessage(\n\t\t\t{\n\t\t\t\t...message,\n\t\t\t\tplayerId: '1' /* Needs to be a string, not a number. */,\n\t\t\t\tsourceConnectorType: 1,\n\t\t\t},\n\t\t\tNiconicoPlayerController.origin,\n\t\t);\n\t}\n\n\tasync play(): Promise<void> {\n\t\tthis.postMessage({ eventName: 'play' });\n\t}\n\n\tasync pause(): Promise<void> {\n\t\tthis.postMessage({ eventName: 'pause' });\n\t}\n\n\tasync setCurrentTime(seconds: number): Promise<void> {\n\t\tthis.postMessage({ eventName: 'seek', data: { time: seconds * 1000 } });\n\t}\n\n\tasync setVolume(volume: number): Promise<void> {\n\t\tthis.postMessage({\n\t\t\teventName: 'volumeChange',\n\t\t\tdata: { volume: volume },\n\t\t});\n\t}\n\n\tasync setMuted(muted: boolean): Promise<void> {\n\t\tthis.postMessage({\n\t\t\teventName: 'mute',\n\t\t\tdata: { mute: muted },\n\t\t});\n\t}\n\n\tsetPlaybackRate = undefined;\n\n\tasync getDuration(): Promise<number> {\n\t\treturn this.duration;\n\t}\n\n\tasync getCurrentTime(): Promise<number> {\n\t\treturn this.currentTime;\n\t}\n\n\tasync getVolume(): Promise<number> {\n\t\treturn this.volume;\n\t}\n\n\tasync getMuted(): Promise<boolean> {\n\t\treturn this.muted;\n\t}\n\n\tgetPlaybackRate = undefined;\n}\n","import { PlayerControllerImpl } from '@/controllers/PlayerControllerImpl';\n\n// https://github.com/VocaDB/vocadb/blob/e147650a8f1f85c8fa865d0ab562126c278527ec/VocaDbWeb/Scripts/ViewModels/PVs/PVPlayerSoundCloud.ts.\nexport class SoundCloudPlayerController extends PlayerControllerImpl<SC.SoundCloudWidget> {\n\tprivate getDurationCore(): Promise<number> {\n\t\treturn new Promise((resolve, _reject /* TODO: Reject. */) => {\n\t\t\tthis.player.getDuration(resolve);\n\t\t});\n\t}\n\n\tattach(id: string): Promise<void> {\n\t\treturn new Promise((resolve, _reject /* TODO: reject */) => {\n\t\t\tthis.player.bind(SC.Widget.Events.READY, () => {\n\t\t\t\tthis.player.bind(\n\t\t\t\t\tSC.Widget.Events.PLAY_PROGRESS,\n\t\t\t\t\tasync (event) => {\n\t\t\t\t\t\tconst duration = await this.getDurationCore();\n\n\t\t\t\t\t\tthis.options?.onTimeUpdate?.({\n\t\t\t\t\t\t\tduration: duration / 1000,\n\t\t\t\t\t\t\tpercent: event.currentPosition / duration,\n\t\t\t\t\t\t\tseconds: event.currentPosition / 1000,\n\t\t\t\t\t\t});\n\t\t\t\t\t},\n\t\t\t\t);\n\t\t\t\tthis.player.bind(SC.Widget.Events.ERROR, (event) =>\n\t\t\t\t\tthis.options?.onError?.(event),\n\t\t\t\t);\n\t\t\t\tthis.player.bind(SC.Widget.Events.PLAY, () =>\n\t\t\t\t\tthis.options?.onPlay?.(),\n\t\t\t\t);\n\t\t\t\tthis.player.bind(SC.Widget.Events.PAUSE, () =>\n\t\t\t\t\tthis.options?.onPause?.(),\n\t\t\t\t);\n\t\t\t\tthis.player.bind(SC.Widget.Events.FINISH, () =>\n\t\t\t\t\tthis.options?.onEnded?.(),\n\t\t\t\t);\n\n\t\t\t\tthis.options?.onLoaded?.({ id: id });\n\t\t\t\tresolve();\n\t\t\t});\n\t\t});\n\t}\n\n\tasync detach(): Promise<void> {\n\t\tthis.player.unbind(SC.Widget.Events.READY);\n\t\tthis.player.unbind(SC.Widget.Events.PLAY_PROGRESS);\n\t\tthis.player.unbind(SC.Widget.Events.ERROR);\n\t\tthis.player.unbind(SC.Widget.Events.PLAY);\n\t\tthis.player.unbind(SC.Widget.Events.PAUSE);\n\t\tthis.player.unbind(SC.Widget.Events.FINISH);\n\t}\n\n\tprivate static playerLoadAsync(\n\t\tplayer: SC.SoundCloudWidget,\n\t\turl: string,\n\t\toptions: Omit<SC.SoundCloudLoadOptions, 'callback'>,\n\t): Promise<void> {\n\t\treturn new Promise((resolve, _reject /* TODO: Reject. */) => {\n\t\t\tplayer.load(url, { ...options, callback: resolve });\n\t\t});\n\t}\n\n\tasync loadVideo(id: string): Promise<void> {\n\t\tawait SoundCloudPlayerController.playerLoadAsync(this.player, id, {\n\t\t\tauto_play: true,\n\t\t});\n\n\t\tthis.options?.onLoaded?.({ id: id });\n\t}\n\n\tasync play(): Promise<void> {\n\t\tthis.player.play();\n\t}\n\n\tasync pause(): Promise<void> {\n\t\tthis.player.pause();\n\t}\n\n\tasync setCurrentTime(seconds: number): Promise<void> {\n\t\tthis.player.seekTo(seconds * 1000);\n\t}\n\n\tasync setVolume(volume: number): Promise<void> {\n\t\tthis.player.setVolume(volume * 100);\n\t}\n\n\tsetMuted = undefined;\n\n\tsetPlaybackRate = undefined;\n\n\tasync getDuration(): Promise<number> {\n\t\tconst duration = await this.getDurationCore();\n\t\treturn duration / 1000;\n\t}\n\n\tprivate getCurrentTimeCore(): Promise<number> {\n\t\treturn new Promise((resolve, _reject /* TODO: Reject. */) => {\n\t\t\tthis.player.getPosition(resolve);\n\t\t});\n\t}\n\n\tasync getCurrentTime(): Promise<number> {\n\t\tconst position = await this.getCurrentTimeCore();\n\t\treturn position / 1000;\n\t}\n\n\tprivate getVolumeCore(): Promise<number> {\n\t\treturn new Promise((resolve, _reject /* TODO: Reject. */) => {\n\t\t\tthis.player.getVolume(resolve);\n\t\t});\n\t}\n\n\tasync getVolume(): Promise<number> {\n\t\tconst volume = await this.getVolumeCore();\n\t\treturn volume / 100;\n\t}\n\n\tgetMuted = undefined;\n\n\tgetPlaybackRate = undefined;\n}\n","import { PlayerControllerImpl } from '@/controllers/PlayerControllerImpl';\n\nexport class TwitchPlayerController extends PlayerControllerImpl<Twitch.Player> {\n\tprivate handleReady = (): void => {\n\t\tthis.options?.onLoaded?.({ id: this.player.getVideo() });\n\t};\n\n\tprivate handlePlay = (): void => {\n\t\tthis.options?.onPlay?.();\n\t};\n\n\tprivate handlePause = (): void => {\n\t\tthis.options?.onPause?.();\n\t};\n\n\tprivate handleEnded = (): void => {\n\t\tthis.options?.onEnded?.();\n\t};\n\n\tprivate handleSeek = (): void => {\n\t\tthis.options?.onTimeUpdate?.({\n\t\t\tduration: 0,\n\t\t\tpercent: 0,\n\t\t\tseconds: 0,\n\t\t});\n\t};\n\n\tasync attach(_id: string): Promise<void> {\n\t\tthis.player.addEventListener(Twitch.Player.READY, this.handleReady);\n\t\tthis.player.addEventListener(Twitch.Player.PLAYING, this.handlePlay);\n\t\tthis.player.addEventListener(Twitch.Player.PAUSE, this.handlePause);\n\t\tthis.player.addEventListener(Twitch.Player.ENDED, this.handleEnded);\n\t\tthis.player.addEventListener(Twitch.Player.SEEK, this.handleSeek);\n\t}\n\n\tasync detach(): Promise<void> {}\n\n\tasync loadVideo(id: string): Promise<void> {\n\t\tthis.player.setVideo(id, 0);\n\t}\n\n\tasync play(): Promise<void> {\n\t\tthis.player.play();\n\t}\n\n\tasync pause(): Promise<void> {\n\t\tthis.player.pause();\n\t}\n\n\tasync setCurrentTime(seconds: number): Promise<void> {\n\t\tthis.player.seek(seconds);\n\t}\n\n\tasync setVolume(volume: number): Promise<void> {\n\t\tthis.player.setVolume(volume);\n\t}\n\n\tasync setMuted(muted: boolean): Promise<void> {\n\t\tthis.player.setMuted(muted);\n\t}\n\n\tsetPlaybackRate = undefined;\n\n\tasync getDuration(): Promise<number> {\n\t\treturn this.player.getDuration();\n\t}\n\n\tasync getCurrentTime(): Promise<number> {\n\t\treturn this.player.getCurrentTime();\n\t}\n\n\tasync getVolume(): Promise<number> {\n\t\treturn this.player.getVolume();\n\t}\n\n\tasync getMuted(): Promise<boolean> {\n\t\treturn this.player.getMuted();\n\t}\n\n\tgetPlaybackRate = undefined;\n}\n","import { PlayerControllerImpl } from '@/controllers/PlayerControllerImpl';\n\n// https://github.com/cookpete/react-player/blob/e3c324bc6845698179d065fa408db515c2296b4b/src/players/Vimeo.js\nexport class VimeoPlayerController extends PlayerControllerImpl<Vimeo.Player> {\n\tasync attach(): Promise<void> {\n\t\tawait this.player.ready();\n\n\t\tthis.player.on('error', (data) => this.options?.onError?.(data));\n\t\tthis.player.on('loaded', (event) =>\n\t\t\tthis.options?.onLoaded?.({ id: event.id.toString() }),\n\t\t);\n\t\tthis.player.on('play', () => this.options?.onPlay?.());\n\t\tthis.player.on('pause', () => this.options?.onPause?.());\n\t\tthis.player.on('ended', () => this.options?.onEnded?.());\n\t\tthis.player.on('timeupdate', (data) => {\n\t\t\tthis.options?.onTimeUpdate?.({\n\t\t\t\tduration: data.duration,\n\t\t\t\tpercent: data.percent,\n\t\t\t\tseconds: data.seconds,\n\t\t\t});\n\t\t});\n\t}\n\n\tasync detach(): Promise<void> {\n\t\tthis.player.off('error');\n\t\tthis.player.off('loaded');\n\t\tthis.player.off('play');\n\t\tthis.player.off('pause');\n\t\tthis.player.off('ended');\n\t\tthis.player.off('timeupdate');\n\t}\n\n\tasync loadVideo(id: string): Promise<void> {\n\t\tawait this.player.loadVideo(id);\n\t}\n\n\tasync play(): Promise<void> {\n\t\tawait this.player.play();\n\t}\n\n\tasync pause(): Promise<void> {\n\t\tawait this.player.pause();\n\t}\n\n\tasync setCurrentTime(seconds: number): Promise<void> {\n\t\tawait this.player.setCurrentTime(seconds);\n\t}\n\n\tasync setVolume(fraction: number): Promise<void> {\n\t\tawait this.player.setVolume(fraction);\n\t}\n\n\tasync setMuted(muted: boolean): Promise<void> {\n\t\tawait this.player.setMuted(muted);\n\t}\n\n\tasync setPlaybackRate(playbackRate: number): Promise<void> {\n\t\tawait this.player.setPlaybackRate(playbackRate);\n\t}\n\n\tasync getDuration(): Promise<number> {\n\t\treturn this.player.getDuration();\n\t}\n\n\tasync getCurrentTime(): Promise<number> {\n\t\treturn this.player.getCurrentTime();\n\t}\n\n\tasync getVolume(): Promise<number> {\n\t\treturn this.player.getVolume();\n\t}\n\n\tasync getMuted(): Promise<boolean> {\n\t\treturn await this.player.getMuted();\n\t}\n\n\tasync getPlaybackRate(): Promise<number> {\n\t\treturn this.player.getPlaybackRate();\n\t}\n}\n","import { LogLevel } from '@/controllers/Logger';\nimport { PlayerControllerImpl } from '@/controllers/PlayerControllerImpl';\n\ndeclare global {\n\tinterface Window {\n\t\tonYouTubeIframeAPIReady(): void;\n\t}\n}\n\nenum PlayerState {\n\tUNSTARTED = -1,\n\tENDED = 0,\n\tPLAYING = 1,\n\tPAUSED = 2,\n\tBUFFERING = 3,\n\tCUED = 5,\n}\n\n// https://github.com/VocaDB/vocadb/blob/076dac9f0808aba5da7332209fdfd2ff4e12c235/VocaDbWeb/Scripts/ViewModels/PVs/PVPlayerYoutube.ts.\nexport class YouTubePlayerController extends PlayerControllerImpl<YT.Player> {\n\tprivate previousTime?: number;\n\n\tprivate timeUpdateIntervalId?: number;\n\n\tprivate clearTimeUpdateInterval(): void {\n\t\tthis.logger.log(\n\t\t\tLogLevel.Debug,\n\t\t\t'clearTimeUpdateInterval',\n\t\t\tthis.timeUpdateIntervalId,\n\t\t);\n\n\t\twindow.clearInterval(this.timeUpdateIntervalId);\n\n\t\tthis.timeUpdateIntervalId = undefined;\n\t}\n\n\tprivate invokeTimeUpdate(player: YT.Player): void {\n\t\tconst currentTime = player.getCurrentTime();\n\t\tif (currentTime === this.previousTime) return;\n\n\t\tconst duration = player.getDuration();\n\t\tthis.options?.onTimeUpdate?.({\n\t\t\tduration: duration,\n\t\t\tpercent: currentTime / duration,\n\t\t\tseconds: currentTime,\n\t\t});\n\n\t\tthis.previousTime = currentTime;\n\t}\n\n\tprivate setTimeUpdateInterval(): void {\n\t\tthis.logger.log(LogLevel.Debug, 'setTimeUpdateInterval');\n\n\t\tthis.clearTimeUpdateInterval();\n\n\t\tthis.timeUpdateIntervalId = window.setInterval(\n\t\t\t() => this.invokeTimeUpdate(this.player),\n\t\t\t250,\n\t\t);\n\n\t\tthis.logger.log(\n\t\t\tLogLevel.Debug,\n\t\t\t'timeUpdateIntervalId',\n\t\t\tthis.timeUpdateIntervalId,\n\t\t);\n\n\t\tthis.invokeTimeUpdate(this.player);\n\t}\n\n\tattach(id: string): Promise<void> {\n\t\treturn new Promise((resolve, _reject /* TODO: reject */) => {\n\t\t\tthis.player.addEventListener('onReady', async () => {\n\t\t\t\tthis.player.addEventListener('onError', (event) =>\n\t\t\t\t\tthis.options?.onError?.(event.data),\n\t\t\t\t);\n\t\t\t\tthis.player.addEventListener(\n\t\t\t\t\t'onStateChange',\n\t\t\t\t\t(event: YT.EventArgs): void => {\n\t\t\t\t\t\tthis.logger.log(\n\t\t\t\t\t\t\tLogLevel.Debug,\n\t\t\t\t\t\t\t`state changed: ${PlayerState[event.data]}`,\n\t\t\t\t\t\t);\n\n\t\t\t\t\t\tswitch (event.data) {\n\t\t\t\t\t\t\tcase YT.PlayerState.CUED:\n\t\t\t\t\t\t\t\tthis.options?.onLoaded?.({ id: id });\n\t\t\t\t\t\t\t\tbreak;\n\n\t\t\t\t\t\t\tcase YT.PlayerState.PLAYING:\n\t\t\t\t\t\t\t\tthis.options?.onPlay?.();\n\t\t\t\t\t\t\t\tthis.setTimeUpdateInterval();\n\t\t\t\t\t\t\t\tbreak;\n\n\t\t\t\t\t\t\tcase YT.PlayerState.PAUSED:\n\t\t\t\t\t\t\t\tthis.options?.onPause?.();\n\t\t\t\t\t\t\t\tthis.clearTimeUpdateInterval();\n\t\t\t\t\t\t\t\tbreak;\n\n\t\t\t\t\t\t\tcase YT.PlayerState.ENDED:\n\t\t\t\t\t\t\t\tthis.options?.onEnded?.();\n\t\t\t\t\t\t\t\tthis.clearTimeUpdateInterval();\n\t\t\t\t\t\t\t\tbreak;\n\t\t\t\t\t\t}\n\t\t\t\t\t},\n\t\t\t\t);\n\n\t\t\t\tawait this.loadVideo(id);\n\t\t\t\tresolve();\n\t\t\t});\n\t\t});\n\t}\n\n\tasync detach(): Promise<void> {\n\t\tthis.clearTimeUpdateInterval();\n\t}\n\n\tasync loadVideo(id: string): Promise<void> {\n\t\tthis.previousTime = undefined;\n\t\tthis.player.cueVideoById(id);\n\t}\n\n\tasync play(): Promise<void> {\n\t\tthis.player.playVideo();\n\t}\n\n\tasync pause(): Promise<void> {\n\t\tthis.player.pauseVideo();\n\t}\n\n\tasync setCurrentTime(seconds: number): Promise<void> {\n\t\tthis.player.seekTo(seconds);\n\n\t\tthis.invokeTimeUpdate(this.player);\n\t}\n\n\tasync setVolume(volume: number): Promise<void> {\n\t\tthis.player.setVolume(volume * 100);\n\t}\n\n\tasync setMuted(muted: boolean): Promise<void> {\n\t\tif (muted) {\n\t\t\tthis.player.mute();\n\t\t} else {\n\t\t\tthis.player.unMute();\n\t\t}\n\t}\n\n\tasync setPlaybackRate(playbackRate: number): Promise<void> {\n\t\tthis.player.setPlaybackRate(playbackRate);\n\t}\n\n\tasync getDuration(): Promise<number> {\n\t\treturn this.player.getDuration();\n\t}\n\n\tasync getCurrentTime(): Promise<number> {\n\t\treturn this.player.getCurrentTime();\n\t}\n\n\tasync getVolume(): Promise<number> {\n\t\treturn this.player.getVolume() / 100;\n\t}\n\n\tasync getMuted(): Promise<boolean> {\n\t\treturn this.player.isMuted();\n\t}\n\n\tasync getPlaybackRate(): Promise<number> {\n\t\treturn this.player.getPlaybackRate();\n\t}\n}\n"],"names":["f","require$$0","k","l","m","n","p","q","c","a","g","d","e","h","reactJsxRuntime_production_min","React","REACT_ELEMENT_TYPE","REACT_PORTAL_TYPE","REACT_FRAGMENT_TYPE","REACT_STRICT_MODE_TYPE","REACT_PROFILER_TYPE","REACT_PROVIDER_TYPE","REACT_CONTEXT_TYPE","REACT_FORWARD_REF_TYPE","REACT_SUSPENSE_TYPE","REACT_SUSPENSE_LIST_TYPE","REACT_MEMO_TYPE","REACT_LAZY_TYPE","REACT_OFFSCREEN_TYPE","MAYBE_ITERATOR_SYMBOL","FAUX_ITERATOR_SYMBOL","getIteratorFn","maybeIterable","maybeIterator","ReactSharedInternals","error","format","_len2","args","_key2","printWarning","level","ReactDebugCurrentFrame","stack","argsWithFormat","item","enableScopeAPI","enableCacheElement","enableTransitionTracing","enableLegacyHidden","enableDebugTracing","REACT_MODULE_REFERENCE","isValidElementType","type","getWrappedName","outerType","innerType","wrapperName","displayName","functionName","getContextName","getComponentNameFromType","context","provider","outerName","lazyComponent","payload","init","assign","disabledDepth","prevLog","prevInfo","prevWarn","prevError","prevGroup","prevGroupCollapsed","prevGroupEnd","disabledLog","disableLogs","props","reenableLogs","ReactCurrentDispatcher","prefix","describeBuiltInComponentFrame","name","source","ownerFn","x","match","reentry","componentFrameCache","PossiblyWeakMap","describeNativeComponentFrame","fn","construct","frame","control","previousPrepareStackTrace","previousDispatcher","Fake","sample","sampleLines","controlLines","s","_frame","syntheticFrame","describeFunctionComponentFrame","shouldConstruct","Component","prototype","describeUnknownElementTypeFrameInDEV","hasOwnProperty","loggedTypeFailures","setCurrentlyValidatingElement","element","owner","checkPropTypes","typeSpecs","values","location","componentName","has","typeSpecName","error$1","err","ex","isArrayImpl","isArray","typeName","value","hasToStringTag","willCoercionThrow","testStringCoercion","checkKeyStringCoercion","ReactCurrentOwner","RESERVED_PROPS","specialPropKeyWarningShown","specialPropRefWarningShown","hasValidRef","config","getter","hasValidKey","warnIfStringRefCannotBeAutoConverted","self","defineKeyPropWarningGetter","warnAboutAccessingKey","defineRefPropWarningGetter","warnAboutAccessingRef","ReactElement","key","ref","jsxDEV","maybeKey","propName","defaultProps","ReactCurrentOwner$1","ReactDebugCurrentFrame$1","setCurrentlyValidatingElement$1","propTypesMisspellWarningShown","isValidElement","object","getDeclarationErrorAddendum","getSourceInfoErrorAddendum","ownerHasKeyUseWarning","getCurrentComponentErrorInfo","parentType","info","parentName","validateExplicitKey","currentComponentErrorInfo","childOwner","validateChildKeys","node","child","iteratorFn","iterator","step","validatePropTypes","propTypes","_name","validateFragmentProps","fragment","keys","didWarnAboutKeySpread","jsxWithValidation","isStaticChildren","validType","sourceInfo","typeString","children","i","beforeExample","afterExample","jsxWithValidationStatic","jsxWithValidationDynamic","jsx","jsxs","reactJsxRuntime_development","jsxRuntimeModule","require$$1","LogLevel","Logger","message","optionalParams","logLevel","defaultLogger","NullPlayerController","_id","_seconds","_volume","_muted","_playbackRate","_command","nullPlayerController","NostalgicDivaContext","createContext","NostalgicDivaProvider","logger","controllerRef","useRef","handleControllerChange","useCallback","loadVideo","id","play","pause","setCurrentTime","seconds","setVolume","volume","setMuted","muted","setPlaybackRate","playbackRate","getDuration","getCurrentTime","getVolume","getMuted","getPlaybackRate","supports","command","useMemo","useNostalgicDiva","useContext","VideoService","AUDIO_EXTENSIONS","VIDEO_EXTENSIONS","AudioVideoService","url","MATCH_URL_DAILYMOTION","DailymotionVideoService","MATCH_URL_NICONICO","NiconicoVideoService","MATCH_URL_SOUNDCLOUD","SoundCloudVideoService","MATCH_URL_TWITCH_VIDEO","TwitchVideoService","MATCH_URL_VIMEO","VimeoVideoService","MATCH_URL_YOUTUBE","YouTubeVideoService","videoServices","findVideoService","videoService","players","lazy","getTypeAndVideoId","extractVideoId","videoId","EmptyPlayer","memo","NostalgicDiva","src","options","onControllerChange","diva","typeAndVideoId","Player","Suspense","NostalgicDivaElement","#options","#handleControllerChange","#render","ReactDOM","defineNostalgicDiva","useFirstMountState","isFirst","strictEquals","prev","next","usePreviousDistinct","compare","prevRef","curRef","PlayerControllerImpl","player","PlayerController","controllerFactory","PlayerContainer","loadScript","playerFactory","videoIdRef","elementRef","setPlayer","useState","controller","_setController","setController","useEffect","previousVideoId","Fragment","AudioPlayerController","event","events","DailymotionPlayerController","PlayerStatus","NiconicoPlayerController","data","resolve","_reject","SoundCloudPlayerController","duration","TwitchPlayerController","VimeoPlayerController","fraction","PlayerState","YouTubePlayerController","currentTime"],"mappings":";;;;;;;AASa,MAAIA,IAAEC,IAAiBC,IAAE,uBAAO,IAAI,eAAe,GAAEC,IAAE,uBAAO,IAAI,gBAAgB,GAAEC,IAAE,OAAO,UAAU,gBAAeC,IA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)return q;Ae=1;var n=o,e=Symbol.for("react.element"),r=Symbol.for("react.fragment"),l=Object.prototype.hasOwnProperty,d=n.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED.ReactCurrentOwner,m={key:!0,ref:!0,__self:!0,__source:!0};function R(P,v,w){var E,T={},_=null,N=null;w!==void 0&&(_=""+w),v.key!==void 0&&(_=""+v.key),v.ref!==void 0&&(N=v.ref);for(E in v)l.call(v,E)&&!m.hasOwnProperty(E)&&(T[E]=v[E]);if(P&&P.defaultProps)for(E in v=P.defaultProps,v)T[E]===void 0&&(T[E]=v[E]);return{$$typeof:e,type:P,key:_,ref:N,props:T,_owner:d.current}}return q.Fragment=r,q.jsx=R,q.jsxs=R,q}var G={};var Oe;function Ut(){return Oe||(Oe=1,process.env.NODE_ENV!=="production"&&(function(){var n=o,e=Symbol.for("react.element"),r=Symbol.for("react.portal"),l=Symbol.for("react.fragment"),d=Symbol.for("react.strict_mode"),m=Symbol.for("react.profiler"),R=Symbol.for("react.provider"),P=Symbol.for("react.context"),v=Symbol.for("react.forward_ref"),w=Symbol.for("react.suspense"),E=Symbol.for("react.suspense_list"),T=Symbol.for("react.memo"),_=Symbol.for("react.lazy"),N=Symbol.for("react.offscreen"),O=Symbol.iterator,I="@@iterator";function j(t){if(t===null||typeof t!="object")return null;var a=O&&t[O]||t[I];return typeof a=="function"?a:null}var C=n.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED;function h(t){{for(var a=arguments.length,i=new Array(a>1?a-1:0),s=1;s<a;s++)i[s-1]=arguments[s];tt("error",t,i)}}function tt(t,a,i){{var s=C.ReactDebugCurrentFrame,p=s.getStackAddendum();p!==""&&(a+="%s",i=i.concat([p]));var f=i.map(function(c){return String(c)});f.unshift("Warning: "+a),Function.prototype.apply.call(console[t],console,f)}}var rt=!1,at=!1,nt=!1,it=!1,st=!1,ce;ce=Symbol.for("react.module.reference");function ot(t){return!!(typeof t=="string"||typeof t=="function"||t===l||t===m||st||t===d||t===w||t===E||it||t===N||rt||at||nt||typeof t=="object"&&t!==null&&(t.$$typeof===_||t.$$typeof===T||t.$$typeof===R||t.$$typeof===P||t.$$typeof===v||t.$$typeof===ce||t.getModuleId!==void 0))}function lt(t,a,i){var s=t.displayName;if(s)return s;var p=a.displayName||a.name||"";return p!==""?i+"("+p+")":i}function de(t){return t.displayName||"Context"}function x(t){if(t==null)return null;if(typeof t.tag=="number"&&h("Received an unexpected object in getComponentNameFromType(). This is likely a bug in React. Please file an issue."),typeof t=="function")return t.displayName||t.name||null;if(typeof t=="string")return t;switch(t){case l:return"Fragment";case r:return"Portal";case m:return"Profiler";case d:return"StrictMode";case w:return"Suspense";case E:return"SuspenseList"}if(typeof t=="object")switch(t.$$typeof){case P:var a=t;return de(a)+".Consumer";case R:var i=t;return de(i._context)+".Provider";case v:return lt(t,t.render,"ForwardRef");case T:var s=t.displayName||null;return s!==null?s:x(t.type)||"Memo";case _:{var p=t,f=p._payload,c=p._init;try{return x(c(f))}catch{return null}}}return null}var U=Object.assign,W=0,he,pe,ye,fe,ve,me,ge;function be(){}be.__reactDisabledLog=!0;function ut(){{if(W===0){he=console.log,pe=console.info,ye=console.warn,fe=console.error,ve=console.group,me=console.groupCollapsed,ge=console.groupEnd;var t={configurable:!0,enumerable:!0,value:be,writable:!0};Object.defineProperties(console,{info:t,log:t,warn:t,error:t,group:t,groupCollapsed:t,groupEnd:t})}W++}}function ct(){{if(W--,W===0){var t={configurable:!0,enumerable:!0,writable:!0};Object.defineProperties(console,{log:U({},t,{value:he}),info:U({},t,{value:pe}),warn:U({},t,{value:ye}),error:U({},t,{value:fe}),group:U({},t,{value:ve}),groupCollapsed:U({},t,{value:me}),groupEnd:U({},t,{value:ge})})}W<0&&h("disabledDepth fell below zero. This is a bug in React. Please file an issue.")}}var ee=C.ReactCurrentDispatcher,te;function B(t,a,i){{if(te===void 0)try{throw Error()}catch(p){var s=p.stack.trim().match(/\n( *(at )?)/);te=s&&s[1]||""}return`
|
|
2
|
+
`+te+t}}var re=!1,H;{var dt=typeof WeakMap=="function"?WeakMap:Map;H=new dt}function Ee(t,a){if(!t||re)return"";{var i=H.get(t);if(i!==void 0)return i}var s;re=!0;var p=Error.prepareStackTrace;Error.prepareStackTrace=void 0;var f;f=ee.current,ee.current=null,ut();try{if(a){var c=function(){throw Error()};if(Object.defineProperty(c.prototype,"props",{set:function(){throw Error()}}),typeof Reflect=="object"&&Reflect.construct){try{Reflect.construct(c,[])}catch(D){s=D}Reflect.construct(t,[],c)}else{try{c.call()}catch(D){s=D}t.call(c.prototype)}}else{try{throw Error()}catch(D){s=D}t()}}catch(D){if(D&&s&&typeof D.stack=="string"){for(var u=D.stack.split(`
|
|
3
|
+
`),k=s.stack.split(`
|
|
4
|
+
`),g=u.length-1,b=k.length-1;g>=1&&b>=0&&u[g]!==k[b];)b--;for(;g>=1&&b>=0;g--,b--)if(u[g]!==k[b]){if(g!==1||b!==1)do if(g--,b--,b<0||u[g]!==k[b]){var S=`
|
|
5
|
+
`+u[g].replace(" at new "," at ");return t.displayName&&S.includes("<anonymous>")&&(S=S.replace("<anonymous>",t.displayName)),typeof t=="function"&&H.set(t,S),S}while(g>=1&&b>=0);break}}}finally{re=!1,ee.current=f,ct(),Error.prepareStackTrace=p}var $=t?t.displayName||t.name:"",F=$?B($):"";return typeof t=="function"&&H.set(t,F),F}function ht(t,a,i){return Ee(t,!1)}function pt(t){var a=t.prototype;return!!(a&&a.isReactComponent)}function J(t,a,i){if(t==null)return"";if(typeof t=="function")return Ee(t,pt(t));if(typeof t=="string")return B(t);switch(t){case w:return B("Suspense");case E:return B("SuspenseList")}if(typeof t=="object")switch(t.$$typeof){case v:return ht(t.render);case T:return J(t.type,a,i);case _:{var s=t,p=s._payload,f=s._init;try{return J(f(p),a,i)}catch{}}}return""}var L=Object.prototype.hasOwnProperty,Ce={},Pe=C.ReactDebugCurrentFrame;function K(t){if(t){var a=t._owner,i=J(t.type,t._source,a?a.type:null);Pe.setExtraStackFrame(i)}else Pe.setExtraStackFrame(null)}function yt(t,a,i,s,p){{var f=Function.call.bind(L);for(var c in t)if(f(t,c)){var u=void 0;try{if(typeof t[c]!="function"){var k=Error((s||"React class")+": "+i+" type `"+c+"` is invalid; it must be a function, usually from the `prop-types` package, but received `"+typeof t[c]+"`.This often happens because of typos such as `PropTypes.function` instead of `PropTypes.func`.");throw k.name="Invariant Violation",k}u=t[c](a,c,s,i,null,"SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED")}catch(g){u=g}u&&!(u instanceof Error)&&(K(p),h("%s: type specification of %s `%s` is invalid; the type checker function must return `null` or an `Error` but returned a %s. You may have forgotten to pass an argument to the type checker creator (arrayOf, instanceOf, objectOf, oneOf, oneOfType, and shape all require an argument).",s||"React class",i,c,typeof u),K(null)),u instanceof Error&&!(u.message in Ce)&&(Ce[u.message]=!0,K(p),h("Failed %s type: %s",i,u.message),K(null))}}}var ft=Array.isArray;function ae(t){return ft(t)}function vt(t){{var a=typeof Symbol=="function"&&Symbol.toStringTag,i=a&&t[Symbol.toStringTag]||t.constructor.name||"Object";return i}}function mt(t){try{return we(t),!1}catch{return!0}}function we(t){return""+t}function Te(t){if(mt(t))return h("The provided key is an unsupported type %s. This value must be coerced to a string before before using it here.",vt(t)),we(t)}var Re=C.ReactCurrentOwner,gt={key:!0,ref:!0,__self:!0,__source:!0},ke,De;function bt(t){if(L.call(t,"ref")){var a=Object.getOwnPropertyDescriptor(t,"ref").get;if(a&&a.isReactWarning)return!1}return t.ref!==void 0}function Et(t){if(L.call(t,"key")){var a=Object.getOwnPropertyDescriptor(t,"key").get;if(a&&a.isReactWarning)return!1}return t.key!==void 0}function Ct(t,a){typeof t.ref=="string"&&Re.current}function Pt(t,a){{var i=function(){ke||(ke=!0,h("%s: `key` is not a prop. Trying to access it will result in `undefined` being returned. If you need to access the same value within the child component, you should pass it as a different prop. (https://reactjs.org/link/special-props)",a))};i.isReactWarning=!0,Object.defineProperty(t,"key",{get:i,configurable:!0})}}function wt(t,a){{var i=function(){De||(De=!0,h("%s: `ref` is not a prop. Trying to access it will result in `undefined` being returned. If you need to access the same value within the child component, you should pass it as a different prop. (https://reactjs.org/link/special-props)",a))};i.isReactWarning=!0,Object.defineProperty(t,"ref",{get:i,configurable:!0})}}var Tt=function(t,a,i,s,p,f,c){var u={$$typeof:e,type:t,key:a,ref:i,props:c,_owner:f};return u._store={},Object.defineProperty(u._store,"validated",{configurable:!1,enumerable:!1,writable:!0,value:!1}),Object.defineProperty(u,"_self",{configurable:!1,enumerable:!1,writable:!1,value:s}),Object.defineProperty(u,"_source",{configurable:!1,enumerable:!1,writable:!1,value:p}),Object.freeze&&(Object.freeze(u.props),Object.freeze(u)),u};function Rt(t,a,i,s,p){{var f,c={},u=null,k=null;i!==void 0&&(Te(i),u=""+i),Et(a)&&(Te(a.key),u=""+a.key),bt(a)&&(k=a.ref,Ct(a,p));for(f in a)L.call(a,f)&&!gt.hasOwnProperty(f)&&(c[f]=a[f]);if(t&&t.defaultProps){var g=t.defaultProps;for(f in g)c[f]===void 0&&(c[f]=g[f])}if(u||k){var b=typeof t=="function"?t.displayName||t.name||"Unknown":t;u&&Pt(c,b),k&&wt(c,b)}return Tt(t,u,k,p,s,Re.current,c)}}var ne=C.ReactCurrentOwner,_e=C.ReactDebugCurrentFrame;function Y(t){if(t){var a=t._owner,i=J(t.type,t._source,a?a.type:null);_e.setExtraStackFrame(i)}else _e.setExtraStackFrame(null)}var ie;ie=!1;function se(t){return typeof t=="object"&&t!==null&&t.$$typeof===e}function Se(){{if(ne.current){var t=x(ne.current.type);if(t)return`
|
|
6
|
+
|
|
7
|
+
Check the render method of \``+t+"`."}return""}}function kt(t){return""}var Ve={};function Dt(t){{var a=Se();if(!a){var i=typeof t=="string"?t:t.displayName||t.name;i&&(a=`
|
|
8
|
+
|
|
9
|
+
Check the top-level render call using <`+i+">.")}return a}}function Ne(t,a){{if(!t._store||t._store.validated||t.key!=null)return;t._store.validated=!0;var i=Dt(a);if(Ve[i])return;Ve[i]=!0;var s="";t&&t._owner&&t._owner!==ne.current&&(s=" It was passed a child from "+x(t._owner.type)+"."),Y(t),h('Each child in a list should have a unique "key" prop.%s%s See https://reactjs.org/link/warning-keys for more information.',i,s),Y(null)}}function Ie(t,a){{if(typeof t!="object")return;if(ae(t))for(var i=0;i<t.length;i++){var s=t[i];se(s)&&Ne(s,a)}else if(se(t))t._store&&(t._store.validated=!0);else if(t){var p=j(t);if(typeof p=="function"&&p!==t.entries)for(var f=p.call(t),c;!(c=f.next()).done;)se(c.value)&&Ne(c.value,a)}}}function _t(t){{var a=t.type;if(a==null||typeof a=="string")return;var i;if(typeof a=="function")i=a.propTypes;else if(typeof a=="object"&&(a.$$typeof===v||a.$$typeof===T))i=a.propTypes;else return;if(i){var s=x(a);yt(i,t.props,"prop",s,t)}else if(a.PropTypes!==void 0&&!ie){ie=!0;var p=x(a);h("Component %s declared `PropTypes` instead of `propTypes`. Did you misspell the property assignment?",p||"Unknown")}typeof a.getDefaultProps=="function"&&!a.getDefaultProps.isReactClassApproved&&h("getDefaultProps is only used on classic React.createClass definitions. Use a static property named `defaultProps` instead.")}}function St(t){{for(var a=Object.keys(t.props),i=0;i<a.length;i++){var s=a[i];if(s!=="children"&&s!=="key"){Y(t),h("Invalid prop `%s` supplied to `React.Fragment`. React.Fragment can only have `key` and `children` props.",s),Y(null);break}}t.ref!==null&&(Y(t),h("Invalid attribute `ref` supplied to `React.Fragment`."),Y(null))}}var xe={};function Me(t,a,i,s,p,f){{var c=ot(t);if(!c){var u="";(t===void 0||typeof t=="object"&&t!==null&&Object.keys(t).length===0)&&(u+=" You likely forgot to export your component from the file it's defined in, or you might have mixed up default and named imports.");var k=kt();k?u+=k:u+=Se();var g;t===null?g="null":ae(t)?g="array":t!==void 0&&t.$$typeof===e?(g="<"+(x(t.type)||"Unknown")+" />",u=" Did you accidentally export a JSX literal instead of a component?"):g=typeof t,h("React.jsx: type is invalid -- expected a string (for built-in components) or a class/function (for composite components) but got: %s.%s",g,u)}var b=Rt(t,a,i,p,f);if(b==null)return b;if(c){var S=a.children;if(S!==void 0)if(s)if(ae(S)){for(var $=0;$<S.length;$++)Ie(S[$],t);Object.freeze&&Object.freeze(S)}else h("React.jsx: Static children should always be an array. You are likely explicitly calling React.jsxs or React.jsxDEV. Use the Babel transform instead.");else Ie(S,t)}if(L.call(a,"key")){var F=x(t),D=Object.keys(a).filter(function(At){return At!=="key"}),oe=D.length>0?"{key: someKey, "+D.join(": ..., ")+": ...}":"{key: someKey}";if(!xe[F+oe]){var Mt=D.length>0?"{"+D.join(": ..., ")+": ...}":"{}";h(`A props object containing a "key" prop is being spread into JSX:
|
|
10
|
+
let props = %s;
|
|
11
|
+
<%s {...props} />
|
|
12
|
+
React keys must be passed directly to JSX without using spread:
|
|
13
|
+
let props = %s;
|
|
14
|
+
<%s key={someKey} {...props} />`,oe,F,Mt,F),xe[F+oe]=!0}}return t===l?St(b):_t(b),b}}function Vt(t,a,i){return Me(t,a,i,!0)}function Nt(t,a,i){return Me(t,a,i,!1)}var It=Nt,xt=Vt;G.Fragment=l,G.jsx=It,G.jsxs=xt})()),G}var je;function Ft(){return je||(je=1,process.env.NODE_ENV==="production"?X.exports=jt():X.exports=Ut()),X.exports}var V=Ft(),y=(n=>(n[n.Trace=0]="Trace",n[n.Debug=1]="Debug",n[n.Information=2]="Information",n[n.Warning=3]="Warning",n[n.Error=4]="Error",n[n.Critical=5]="Critical",n[n.None=6]="None",n))(y||{});class Yt{title="nostalgic-diva";createMessage(e){return`[${this.title}] ${e}`}debug(e,...r){console.debug(this.createMessage(e),...r)}error(e,...r){console.error(this.createMessage(e),...r)}warn(e,...r){console.warn(this.createMessage(e),...r)}isEnabled(){return!0}log(e,r,...l){switch(e){case 1:this.debug(r,...l);break;case 3:this.warn(r,...l);break;case 4:this.error(r,...l);break}}}const Ge=new Yt;class $t{async attach(){}async detach(){}async loadVideo(e){}async play(){}async pause(){}async setCurrentTime(e){}async setVolume(e){}async setMuted(e){}async setPlaybackRate(e){}async getDuration(){return 0}async getCurrentTime(){return 0}async getVolume(){return 0}async getMuted(){return!1}async getPlaybackRate(){return 0}supports(e){return!1}}const z=new $t,ze=o.createContext(void 0),Be=({children:n,logger:e=Ge})=>{const r=o.useRef(z),l=o.useCallback(h=>{e.log(y.Debug,"NostalgicDivaProvider.handleControllerChange",r.current,h),r.current=h},[e]),d=o.useCallback(async h=>{e.log(y.Debug,"NostalgicDivaProvider.loadVideo",r.current),await r.current.loadVideo(h)},[e]),m=o.useCallback(async()=>{e.log(y.Debug,"NostalgicDivaProvider.play",r.current),await r.current.play()},[e]),R=o.useCallback(async()=>{e.log(y.Debug,"NostalgicDivaProvider.pause",r.current),await r.current.pause()},[e]),P=o.useCallback(async h=>{e.log(y.Debug,"NostalgicDivaProvider.setCurrentTime",r.current),await r.current.setCurrentTime(h),await r.current.play()},[e]),v=o.useCallback(async h=>{e.log(y.Debug,"NostalgicDivaProvider.setVolume",r.current),await r.current.setVolume(h)},[e]),w=o.useCallback(async h=>{e.log(y.Debug,"NostalgicDivaProvider.setMuted",r.current),await r.current.setMuted(h)},[e]),E=o.useCallback(async h=>{e.log(y.Debug,"NostalgicDivaProvider.setPlaybackRate",r.current),await r.current.setPlaybackRate(h)},[e]),T=o.useCallback(async()=>(e.log(y.Debug,"NostalgicDivaProvider.getDuration",r.current),await r.current.getDuration()),[e]),_=o.useCallback(async()=>(e.log(y.Debug,"NostalgicDivaProvider.getCurrentTime",r.current),await r.current.getCurrentTime()),[e]),N=o.useCallback(async()=>(e.log(y.Debug,"NostalgicDivaProvider.getVolume",r.current),await r.current.getVolume()),[e]),O=o.useCallback(async()=>(e.log(y.Debug,"NostalgicDivaProvider.getMuted",r.current),await r.current.getMuted()),[e]),I=o.useCallback(async()=>(e.log(y.Debug,"NostalgicDivaProvider.getPlaybackRate",r.current),await r.current.getPlaybackRate()),[e]),j=o.useCallback(h=>r.current.supports(h),[]),C=o.useMemo(()=>({logger:e,handleControllerChange:l,loadVideo:d,play:m,pause:R,setCurrentTime:P,setVolume:v,setMuted:w,setPlaybackRate:E,getDuration:T,getCurrentTime:_,getVolume:N,getMuted:O,getPlaybackRate:I,supports:j}),[e,l,d,m,R,P,v,w,E,T,_,N,O,I,j]);return V.jsx(ze.Provider,{value:C,children:n})},He=()=>o.useContext(ze);class M{constructor(e){this.type=e}}const Wt=/\.(m4a|m4b|mp4a|mpga|mp2|mp2a|mp3|m2a|m3a|wav|weba|aac|oga|spx)($|\?)/i,Lt=/\.(mp4|og[gv]|webm|mov|m4v)(#t=[,\d+]+)?($|\?)/i;class qt extends M{constructor(){super("Audio")}canPlay(e){return Wt.test(e)||Lt.test(e)}extractVideoId(e){return e}}const Ue=/^(?:(?:https?):)?(?:\/\/)?(?:www\.)?(?:(?:dailymotion\.com(?:\/embed)?\/video)|dai\.ly)\/([a-zA-Z0-9]+)(?:_[\w_-]+)?(?:[\w.#_-]+)?/;class Gt extends M{constructor(){super("Dailymotion")}canPlay(e){return Ue.test(e)}extractVideoId(e){return Ue.exec(e)?.[1]}}const Fe=/(?:www\.|)?nicovideo\.jp\/watch\/(\w+)$/;class zt extends M{constructor(){super("Niconico")}canPlay(e){return Fe.test(e)}extractVideoId(e){return Fe.exec(e)?.[1]}}const Bt=/(?:soundcloud\.com|snd\.sc)\/[^.]+$/;class Ht extends M{constructor(){super("SoundCloud")}canPlay(e){return Bt.test(e)}extractVideoId(e){return e}}const Ye=/(?:www\.|go\.)?twitch\.tv\/videos\/(\d+)($|\?)/;class Jt extends M{constructor(){super("Twitch")}canPlay(e){return Ye.test(e)}extractVideoId(e){return Ye.exec(e)?.[1]}}const $e=/vimeo\.com\/(\d+)$/;class Kt extends M{constructor(){super("Vimeo")}canPlay(e){return $e.test(e)}extractVideoId(e){return $e.exec(e)?.[1]}}const We=/(?:youtu\.be\/|youtube(?:-nocookie|education)?\.com\/(?:embed\/|v\/|watch\/|watch\?v=|watch\?.+&v=|shorts\/|live\/))((\w|-){11})|youtube\.com\/playlist\?list=|youtube\.com\/user\//;class Xt extends M{constructor(){super("YouTube")}canPlay(e){return We.test(e)}extractVideoId(e){return We.exec(e)?.[1]}}const Je=[new Xt,new Jt,new Kt,new Gt,new Ht,new qt,new zt];function Ke(n){return Je.find(e=>e.canPlay(n))}const Xe=new Map(Object.entries({Audio:o.lazy(()=>Promise.resolve().then(()=>require("./AudioPlayer-B3HUFxrt.cjs"))),Dailymotion:o.lazy(()=>Promise.resolve().then(()=>require("./DailymotionPlayer-CUowHniC.cjs"))),Niconico:o.lazy(()=>Promise.resolve().then(()=>require("./NiconicoPlayer-DpSXQj5m.cjs"))),SoundCloud:o.lazy(()=>Promise.resolve().then(()=>require("./SoundCloudPlayer-BV22QlM7.cjs"))),Twitch:o.lazy(()=>Promise.resolve().then(()=>require("./TwitchPlayer-CAtEBZ_D.cjs"))),Vimeo:o.lazy(()=>Promise.resolve().then(()=>require("./VimeoPlayer-BeD9InZ2.cjs"))),YouTube:o.lazy(()=>Promise.resolve().then(()=>require("./YouTubePlayer-DLqd36LF.cjs")))}));function Zt(n){const e=Ke(n);if(e===void 0)return;const{type:r,extractVideoId:l}=e,d=l(n);if(d!==void 0)return{type:r,videoId:d}}const Le=o.memo(()=>V.jsx("div",{style:{width:"100%",height:"100%"},children:V.jsx("iframe",{src:"about:blank",title:"about:blank",style:{width:"100%",height:"100%",border:0}})})),Ze=o.memo(({src:n,options:e,onControllerChange:r})=>{const l=He(),d=o.useCallback(w=>{l.handleControllerChange(w),r?.(w)},[l,r]);l.logger.log(y.Debug,"NostalgicDiva");const m=Zt(n);if(m===void 0)return l.logger.log(y.Warning,`Failed to extract type and videoId from src: "${n}". Returning EmptyPlayer.`),V.jsx(Le,{});const{type:R,videoId:P}=m,v=Xe.get(R);return v===void 0?(l.logger.log(y.Warning,`No player found for type "${R}" (videoId: "${P}"). Returning EmptyPlayer.`),V.jsx(Le,{})):V.jsx(o.Suspense,{fallback:null,children:V.jsx(v,{logger:l.logger,type:R,onControllerChange:d,videoId:P,options:e})})});class Qe extends HTMLElement{static observedAttributes=["src"];container;controller=z;constructor(){super(),this.container=this.attachShadow({mode:"closed"})}get src(){return this.getAttribute("src")??""}set src(e){this.setAttribute("src",e)}#t={onError:e=>this.dispatchEvent(new CustomEvent("error",{detail:e})),onLoaded:e=>this.dispatchEvent(new CustomEvent("loaded",{detail:e})),onPlay:()=>this.dispatchEvent(new CustomEvent("play")),onPause:()=>this.dispatchEvent(new CustomEvent("pause")),onEnded:()=>this.dispatchEvent(new CustomEvent("ended")),onTimeUpdate:e=>this.dispatchEvent(new CustomEvent("timeupdate",{detail:e}))};#r=e=>{console.debug("[@nostalgic-diva/web-components] handleControllerChange"),this.controller=e};#e(){Ot.render(V.jsx(Be,{children:V.jsx(Ze,{src:this.src,options:this.#t,onControllerChange:this.#r})}),this.container)}connectedCallback(){console.debug("[@nostalgic-diva/web-components] connectedCallback"),this.#e()}disconnectedCallback(){console.debug("[@nostalgic-diva/web-components] disconnectedCallback")}attributeChangedCallback(){console.debug("[@nostalgic-diva/web-components] attributeChangedCallback"),this.#e()}async loadVideo(e){await this.controller.loadVideo(e)}async play(){await this.controller.play()}async pause(){await this.controller.pause()}async setCurrentTime(e){await this.controller.setCurrentTime(e)}async setVolume(e){await this.controller.setVolume(e)}async setMuted(e){await this.controller.setMuted(e)}async setPlaybackRate(e){await this.controller.setPlaybackRate(e)}async getDuration(){return await this.controller.getDuration()}async getCurrentTime(){return await this.controller.getCurrentTime()}async getVolume(){return await this.controller.getVolume()}async getMuted(){return await this.controller.getMuted()}async getPlaybackRate(){return await this.controller.getPlaybackRate()}supports(e){return this.controller.supports(e)}}function Qt(){customElements.define("nostalgic-diva",Qe)}function er(){const n=o.useRef(!0);return n.current?(n.current=!1,!0):n.current}const tr=(n,e)=>n===e;function rr(n,e=tr){const r=o.useRef(),l=o.useRef(n);return!er()&&!e(l.current,n)&&(r.current=l.current,l.current=n),r.current}class A{constructor(e,r,l){this.logger=e,this.player=r,this.options=l,this.logger.log(y.Debug,"ctor")}supports(e){return this[e]!==void 0}}class Q{constructor(e,r,l,d,m){this.logger=e,this.type=r,this.player=l,this.options=d,this.controllerFactory=m,this.id=Q.nextId++}static nextId=1;id;impl;createMessage(e){return`${this.type}#${this.id} ${e}`}debug(e,...r){this.logger.log(y.Debug,this.createMessage(e),...r)}error(e,...r){this.logger.log(y.Error,this.createMessage(e),...r)}async attach(e){if(this.debug("attach",e),this.impl){this.debug("player is already attached");return}this.debug("Attaching player..."),this.impl=new this.controllerFactory(this.logger,this.player,this.options),await this.impl.attach(e),this.debug("player attached")}createPlayerNotAttachedError(){return this.error("player is not attached"),new Error("player is not attached")}createCommandNotSupportedError(e){return new Error(`${e} is not supported`)}async detach(){if(this.debug("detach"),this.impl===void 0)throw this.createPlayerNotAttachedError();await this.impl.detach(),this.impl=void 0}async loadVideo(e){if(this.debug("loadVideo",e),this.impl===void 0)throw this.createPlayerNotAttachedError();if(this.impl.loadVideo===void 0)throw this.createCommandNotSupportedError("loadVideo");this.debug("Loading video..."),await this.impl.loadVideo(e),this.debug("video loaded",e)}play(){if(this.debug("play"),this.impl===void 0)throw this.createPlayerNotAttachedError();if(this.impl.play===void 0)throw this.createCommandNotSupportedError("play");return this.impl.play()}pause(){if(this.debug("pause"),this.impl===void 0)throw this.createPlayerNotAttachedError();if(this.impl.pause===void 0)throw this.createCommandNotSupportedError("pause");return this.impl.pause()}setCurrentTime(e){if(this.debug("setCurrentTime",e),this.impl===void 0)throw this.createPlayerNotAttachedError();if(this.impl.setCurrentTime===void 0)throw this.createCommandNotSupportedError("setCurrentTime");return this.impl.setCurrentTime(e)}setVolume(e){if(this.debug("setVolume",e),this.impl===void 0)throw this.createPlayerNotAttachedError();if(this.impl.setVolume===void 0)throw this.createCommandNotSupportedError("setVolume");return this.impl.setVolume(e)}setMuted(e){if(this.debug("setMuted",e),this.impl===void 0)throw this.createPlayerNotAttachedError();if(this.impl.setMuted===void 0)throw this.createCommandNotSupportedError("setMuted");return this.impl.setMuted(e)}setPlaybackRate(e){if(this.debug("setPlaybackRate",e),this.impl===void 0)throw this.createPlayerNotAttachedError();if(this.impl.setPlaybackRate===void 0)throw this.createCommandNotSupportedError("setPlaybackRate");return this.impl.setPlaybackRate(e)}getDuration(){if(this.debug("getDuration"),this.impl===void 0)throw this.createPlayerNotAttachedError();if(this.impl.getDuration===void 0)throw this.createCommandNotSupportedError("getDuration");return this.impl.getDuration()}getCurrentTime(){if(this.debug("getCurrentTime"),this.impl===void 0)throw this.createPlayerNotAttachedError();if(this.impl.getCurrentTime===void 0)throw this.createCommandNotSupportedError("getCurrentTime");return this.impl.getCurrentTime()}getVolume(){if(this.debug("getVolume"),this.impl===void 0)throw this.createPlayerNotAttachedError();if(this.impl.getVolume===void 0)throw this.createCommandNotSupportedError("getVolume");return this.impl.getVolume()}getMuted(){if(this.debug("getMuted"),this.impl===void 0)throw this.createPlayerNotAttachedError();if(this.impl.getMuted===void 0)throw this.createCommandNotSupportedError("getMuted");return this.impl.getMuted()}getPlaybackRate(){if(this.debug("getPlaybackRate"),this.impl===void 0)throw this.createPlayerNotAttachedError();if(this.impl.getPlaybackRate===void 0)throw this.createCommandNotSupportedError("getPlaybackRate");return this.impl.getPlaybackRate()}supports(e){if(this.impl===void 0)throw this.createPlayerNotAttachedError();return this.impl.supports(e)}}const ar=({logger:n,type:e,loadScript:r,playerFactory:l,onControllerChange:d,videoId:m,options:R,controllerFactory:P,children:v})=>{n.log(y.Debug,"PlayerContainer");const w=o.useRef(m),E=o.useRef(void 0),[T,_]=o.useState(),[N,O]=o.useState(z),I=o.useCallback(C=>{O(C),d?.(C)},[d]);o.useEffect(()=>{(r?.()??Promise.resolve()).then(()=>l(E.current,w.current)).then(C=>_(C))},[r,l]),o.useEffect(()=>{if(T===void 0)return;const C=new Q(n,e,T,R,P);return C.attach(w.current).then(()=>I(C)),()=>{C.detach().finally(()=>I(z))}},[n,e,r,T,R,P,I]);const j=rr(m);return o.useEffect(()=>{j!==void 0&&N.loadVideo(m)},[j,m,N]),V.jsx(V.Fragment,{children:v(E,w.current)})};class nr extends A{async attach(){this.player.onerror=e=>this.options?.onError?.(e),this.player.onloadeddata=()=>this.options?.onLoaded?.({id:this.player.src}),this.player.onplay=()=>this.options?.onPlay?.(),this.player.onpause=()=>this.options?.onPause?.(),this.player.onended=()=>this.options?.onEnded?.(),this.player.ontimeupdate=()=>{this.options?.onTimeUpdate?.({duration:this.player.duration,percent:this.player.currentTime/this.player.duration,seconds:this.player.currentTime})}}async detach(){this.player.onerror=null,this.player.onloadeddata=null,this.player.onplay=null,this.player.onpause=null,this.player.onended=null,this.player.ontimeupdate=null}async loadVideo(e){this.player.src=e}async play(){await this.player.play()}async pause(){this.player.pause()}async setCurrentTime(e){this.player.currentTime=e}async setVolume(e){this.player.volume=e}async setMuted(e){this.player.muted=e}async setPlaybackRate(e){this.player.playbackRate=e}async getDuration(){return this.player.duration}async getCurrentTime(){return this.player.currentTime}async getVolume(){return this.player.volume}async getMuted(){return this.player.muted}async getPlaybackRate(){return this.player.playbackRate}}const qe=["apiready","seeked","video_end","durationchange","pause","playing","error"];class ir extends A{handlePlayerEvents=e=>{switch(e.type){case"apiready":this.options?.onLoaded?.({id:this.player.video.videoId});break;case"seeked":this.options?.onTimeUpdate?.({duration:this.player.duration,percent:this.player.currentTime/this.player.duration,seconds:this.player.currentTime});break;case"video_end":this.options?.onEnded?.();break;case"durationchange":break;case"pause":this.options?.onPause?.();break;case"playing":this.options?.onPlay?.();break;case"error":this.options?.onError?.(e);break}};async attach(e){for(const r of qe)this.player.addEventListener(r,this.handlePlayerEvents)}async detach(){for(const e of qe)this.player.removeEventListener(e,this.handlePlayerEvents)}async loadVideo(e){this.player.load(e)}async play(){this.player.play()}async pause(){this.player.pause()}async setCurrentTime(e){this.player.seek(e)}async setVolume(e){this.player.setVolume(e)}async setMuted(e){this.player.setMuted(e)}setPlaybackRate=void 0;async getDuration(){return this.player.duration}async getCurrentTime(){return this.player.currentTime}async getVolume(){return this.player.volume}async getMuted(){return this.player.muted}getPlaybackRate=void 0}var le=(n=>(n[n.Play=2]="Play",n[n.Pause=3]="Pause",n[n.End=4]="End",n))(le||{});class Z extends A{static origin="https://embed.nicovideo.jp";duration=0;currentTime=0;volume=0;muted=!1;handleMessage=e=>{if(e.origin!==Z.origin)return;const r=e.data;switch(r.eventName){case"playerStatusChange":this.logger.log(y.Debug,`player status changed: ${le[r.data.playerStatus]??r.data.playerStatus}`);break;case"statusChange":switch(this.logger.log(y.Debug,`status changed: ${le[r.data.playerStatus]??r.data.playerStatus}`),r.data.playerStatus){case 2:this.options?.onPlay?.();break;case 3:this.options?.onPause?.();break;case 4:this.options?.onEnded?.();break}break;case"playerMetadataChange":r.data.duration!==void 0&&(this.duration=r.data.duration/1e3),this.currentTime=r.data.currentTime===void 0?0:r.data.currentTime/1e3,this.volume=r.data.volume,this.muted=r.data.muted,this.options?.onTimeUpdate?.({duration:this.duration,percent:this.currentTime!==0&&this.duration!==0?this.currentTime/this.duration:0,seconds:this.currentTime});break;case"loadComplete":this.logger.log(y.Debug,"load completed"),this.duration=r.data.videoInfo.lengthInSeconds,this.options?.onLoaded?.({id:r.data.videoInfo.watchId});break;case"error":this.options?.onError?.(r);break;case"player-error:video:play":case"player-error:video:seek":this.options?.onError?.(r);break;default:this.logger.log(y.Debug,"message",r.eventName,r.data);break}};async attach(){window.addEventListener("message",this.handleMessage)}async detach(){window.removeEventListener("message",this.handleMessage)}async loadVideo(e){return new Promise((r,l)=>{this.duration=0,this.currentTime=0,this.volume=0,this.muted=!1,this.player.onload=()=>{this.player.onload=null,r()},this.player.src=`https://embed.nicovideo.jp/watch/${e}?jsapi=1&playerId=1`})}postMessage(e){this.player.contentWindow?.postMessage({...e,playerId:"1",sourceConnectorType:1},Z.origin)}async play(){this.postMessage({eventName:"play"})}async pause(){this.postMessage({eventName:"pause"})}async setCurrentTime(e){this.postMessage({eventName:"seek",data:{time:e*1e3}})}async setVolume(e){this.postMessage({eventName:"volumeChange",data:{volume:e}})}async setMuted(e){this.postMessage({eventName:"mute",data:{mute:e}})}setPlaybackRate=void 0;async getDuration(){return this.duration}async getCurrentTime(){return this.currentTime}async getVolume(){return this.volume}async getMuted(){return this.muted}getPlaybackRate=void 0}class ue extends A{getDurationCore(){return new Promise((e,r)=>{this.player.getDuration(e)})}attach(e){return new Promise((r,l)=>{this.player.bind(SC.Widget.Events.READY,()=>{this.player.bind(SC.Widget.Events.PLAY_PROGRESS,async d=>{const m=await this.getDurationCore();this.options?.onTimeUpdate?.({duration:m/1e3,percent:d.currentPosition/m,seconds:d.currentPosition/1e3})}),this.player.bind(SC.Widget.Events.ERROR,d=>this.options?.onError?.(d)),this.player.bind(SC.Widget.Events.PLAY,()=>this.options?.onPlay?.()),this.player.bind(SC.Widget.Events.PAUSE,()=>this.options?.onPause?.()),this.player.bind(SC.Widget.Events.FINISH,()=>this.options?.onEnded?.()),this.options?.onLoaded?.({id:e}),r()})})}async detach(){this.player.unbind(SC.Widget.Events.READY),this.player.unbind(SC.Widget.Events.PLAY_PROGRESS),this.player.unbind(SC.Widget.Events.ERROR),this.player.unbind(SC.Widget.Events.PLAY),this.player.unbind(SC.Widget.Events.PAUSE),this.player.unbind(SC.Widget.Events.FINISH)}static playerLoadAsync(e,r,l){return new Promise((d,m)=>{e.load(r,{...l,callback:d})})}async loadVideo(e){await ue.playerLoadAsync(this.player,e,{auto_play:!0}),this.options?.onLoaded?.({id:e})}async play(){this.player.play()}async pause(){this.player.pause()}async setCurrentTime(e){this.player.seekTo(e*1e3)}async setVolume(e){this.player.setVolume(e*100)}setMuted=void 0;setPlaybackRate=void 0;async getDuration(){return await this.getDurationCore()/1e3}getCurrentTimeCore(){return new Promise((e,r)=>{this.player.getPosition(e)})}async getCurrentTime(){return await this.getCurrentTimeCore()/1e3}getVolumeCore(){return new Promise((e,r)=>{this.player.getVolume(e)})}async getVolume(){return await this.getVolumeCore()/100}getMuted=void 0;getPlaybackRate=void 0}class sr extends A{handleReady=()=>{this.options?.onLoaded?.({id:this.player.getVideo()})};handlePlay=()=>{this.options?.onPlay?.()};handlePause=()=>{this.options?.onPause?.()};handleEnded=()=>{this.options?.onEnded?.()};handleSeek=()=>{this.options?.onTimeUpdate?.({duration:0,percent:0,seconds:0})};async attach(e){this.player.addEventListener(Twitch.Player.READY,this.handleReady),this.player.addEventListener(Twitch.Player.PLAYING,this.handlePlay),this.player.addEventListener(Twitch.Player.PAUSE,this.handlePause),this.player.addEventListener(Twitch.Player.ENDED,this.handleEnded),this.player.addEventListener(Twitch.Player.SEEK,this.handleSeek)}async detach(){}async loadVideo(e){this.player.setVideo(e,0)}async play(){this.player.play()}async pause(){this.player.pause()}async setCurrentTime(e){this.player.seek(e)}async setVolume(e){this.player.setVolume(e)}async setMuted(e){this.player.setMuted(e)}setPlaybackRate=void 0;async getDuration(){return this.player.getDuration()}async getCurrentTime(){return this.player.getCurrentTime()}async getVolume(){return this.player.getVolume()}async getMuted(){return this.player.getMuted()}getPlaybackRate=void 0}class or extends A{async attach(){await this.player.ready(),this.player.on("error",e=>this.options?.onError?.(e)),this.player.on("loaded",e=>this.options?.onLoaded?.({id:e.id.toString()})),this.player.on("play",()=>this.options?.onPlay?.()),this.player.on("pause",()=>this.options?.onPause?.()),this.player.on("ended",()=>this.options?.onEnded?.()),this.player.on("timeupdate",e=>{this.options?.onTimeUpdate?.({duration:e.duration,percent:e.percent,seconds:e.seconds})})}async detach(){this.player.off("error"),this.player.off("loaded"),this.player.off("play"),this.player.off("pause"),this.player.off("ended"),this.player.off("timeupdate")}async loadVideo(e){await this.player.loadVideo(e)}async play(){await this.player.play()}async pause(){await this.player.pause()}async setCurrentTime(e){await this.player.setCurrentTime(e)}async setVolume(e){await this.player.setVolume(e)}async setMuted(e){await this.player.setMuted(e)}async setPlaybackRate(e){await this.player.setPlaybackRate(e)}async getDuration(){return this.player.getDuration()}async getCurrentTime(){return this.player.getCurrentTime()}async getVolume(){return this.player.getVolume()}async getMuted(){return await this.player.getMuted()}async getPlaybackRate(){return this.player.getPlaybackRate()}}var et=(n=>(n[n.UNSTARTED=-1]="UNSTARTED",n[n.ENDED=0]="ENDED",n[n.PLAYING=1]="PLAYING",n[n.PAUSED=2]="PAUSED",n[n.BUFFERING=3]="BUFFERING",n[n.CUED=5]="CUED",n))(et||{});class lr extends A{previousTime;timeUpdateIntervalId;clearTimeUpdateInterval(){this.logger.log(y.Debug,"clearTimeUpdateInterval",this.timeUpdateIntervalId),window.clearInterval(this.timeUpdateIntervalId),this.timeUpdateIntervalId=void 0}invokeTimeUpdate(e){const r=e.getCurrentTime();if(r===this.previousTime)return;const l=e.getDuration();this.options?.onTimeUpdate?.({duration:l,percent:r/l,seconds:r}),this.previousTime=r}setTimeUpdateInterval(){this.logger.log(y.Debug,"setTimeUpdateInterval"),this.clearTimeUpdateInterval(),this.timeUpdateIntervalId=window.setInterval(()=>this.invokeTimeUpdate(this.player),250),this.logger.log(y.Debug,"timeUpdateIntervalId",this.timeUpdateIntervalId),this.invokeTimeUpdate(this.player)}attach(e){return new Promise((r,l)=>{this.player.addEventListener("onReady",async()=>{this.player.addEventListener("onError",d=>this.options?.onError?.(d.data)),this.player.addEventListener("onStateChange",d=>{switch(this.logger.log(y.Debug,`state changed: ${et[d.data]}`),d.data){case YT.PlayerState.CUED:this.options?.onLoaded?.({id:e});break;case YT.PlayerState.PLAYING:this.options?.onPlay?.(),this.setTimeUpdateInterval();break;case YT.PlayerState.PAUSED:this.options?.onPause?.(),this.clearTimeUpdateInterval();break;case YT.PlayerState.ENDED:this.options?.onEnded?.(),this.clearTimeUpdateInterval();break}}),await this.loadVideo(e),r()})})}async detach(){this.clearTimeUpdateInterval()}async loadVideo(e){this.previousTime=void 0,this.player.cueVideoById(e)}async play(){this.player.playVideo()}async pause(){this.player.pauseVideo()}async setCurrentTime(e){this.player.seekTo(e),this.invokeTimeUpdate(this.player)}async setVolume(e){this.player.setVolume(e*100)}async setMuted(e){e?this.player.mute():this.player.unMute()}async setPlaybackRate(e){this.player.setPlaybackRate(e)}async getDuration(){return this.player.getDuration()}async getCurrentTime(){return this.player.getCurrentTime()}async getVolume(){return this.player.getVolume()/100}async getMuted(){return this.player.isMuted()}async getPlaybackRate(){return this.player.getPlaybackRate()}}exports.AudioPlayerController=nr;exports.DailymotionPlayerController=ir;exports.LogLevel=y;exports.NiconicoPlayerController=Z;exports.NostalgicDiva=Ze;exports.NostalgicDivaElement=Qe;exports.NostalgicDivaProvider=Be;exports.PlayerContainer=ar;exports.PlayerController=Q;exports.PlayerControllerImpl=A;exports.SoundCloudPlayerController=ue;exports.TwitchPlayerController=sr;exports.VideoService=M;exports.VimeoPlayerController=or;exports.YouTubePlayerController=lr;exports.defaultLogger=Ge;exports.defineNostalgicDiva=Qt;exports.findVideoService=Ke;exports.jsxRuntimeExports=V;exports.nullPlayerController=z;exports.players=Xe;exports.useNostalgicDiva=He;exports.videoServices=Je;
|
|
15
|
+
//# sourceMappingURL=index-DFsUhc9i.cjs.map
|